Issues (491)

docs/examples/22.php (2 issues)

Labels
Severity
1
<?php
2
/**
3
* Description: demonstrates using the Uri util
4
*/
5
if (!@include 'Calendar/Calendar.php') {
6
    define('CALENDAR_ROOT', '../../');
7
}
8
require_once CALENDAR_ROOT.'Month/Weekdays.php';
9
require_once CALENDAR_ROOT.'Util/Uri.php';
10
11
if (!isset($_GET['jahr'])) $_GET['jahr'] = date('Y');
12
if (!isset($_GET['monat'])) $_GET['monat'] = date('m');
13
14
// Build the month
15
$Calendar = new Calendar_Month_Weekdays($_GET['jahr'], $_GET['monat']);
0 ignored issues
show
The type Calendar_Month_Weekdays was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
16
17
echo ( '<p>The current month is '
18
        .$Calendar->thisMonth().' of year '.$Calendar->thisYear().'</p>');
19
20
$Uri = & new Calendar_Util_Uri('jahr','monat');
0 ignored issues
show
The type Calendar_Util_Uri was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
21
$Uri->setFragments('jahr','monat');
22
23
echo "\"Vector\" URIs<pre>";
24
echo ( "Previous Uri:\t".htmlentities($Uri->prev($Calendar, 'month'))."\n" );
25
echo ( "This Uri:\t".htmlentities($Uri->this($Calendar,  'month'))."\n" );
26
echo ( "Next Uri:\t".htmlentities($Uri->next($Calendar, 'month'))."\n" );
27
echo "</pre>";
28
29
// Switch to scalar URIs
30
$Uri->separator = '/'; // Default is &amp;
31
$Uri->scalar = true; // Omit variable names
32
33
echo "\"Scalar\" URIs<pre>";
34
echo ( "Previous Uri:\t".$Uri->prev($Calendar, 'month')."\n" );
35
echo ( "This Uri:\t".$Uri->this($Calendar,  'month')."\n" );
36
echo ( "Next Uri:\t".$Uri->next($Calendar, 'month')."\n" );
37
echo "</pre>";
38
39
// Restore the vector URIs
40
$Uri->separator = '&amp;';
41
$Uri->scalar = false;
42
?>
43
<p>
44
<a href="<?php echo($_SERVER['PHP_SELF'].'?'.$Uri->prev($Calendar, 'month'));?>">Prev</a> :
45
<a href="<?php echo($_SERVER['PHP_SELF'].'?'.$Uri->next($Calendar, 'month'));?>">Next</a>
46
</p>