adding zend project folders into old campcaster.
This commit is contained in:
parent
56abfaf28e
commit
7ef0c18b26
4045 changed files with 1054952 additions and 0 deletions
36
library/pear/Calendar/docs/examples/18.php
Normal file
36
library/pear/Calendar/docs/examples/18.php
Normal file
|
@ -0,0 +1,36 @@
|
|||
<?php
|
||||
/**
|
||||
* Description: demonstrates using the Wrapper decorator
|
||||
*/
|
||||
|
||||
if (!@include 'Calendar/Calendar.php') {
|
||||
define('CALENDAR_ROOT', '../../');
|
||||
}
|
||||
require_once CALENDAR_ROOT.'Month.php';
|
||||
require_once CALENDAR_ROOT.'Decorator.php'; // Not really needed but added to help this make sense
|
||||
require_once CALENDAR_ROOT.'Decorator/Wrapper.php';
|
||||
|
||||
class MyBoldDecorator extends Calendar_Decorator
|
||||
{
|
||||
function MyBoldDecorator(&$Calendar)
|
||||
{
|
||||
parent::Calendar_Decorator($Calendar);
|
||||
}
|
||||
|
||||
function thisDay()
|
||||
{
|
||||
return '<b>'.parent::thisDay().'</b>';
|
||||
}
|
||||
}
|
||||
|
||||
$Month = new Calendar_Month(date('Y'), date('n'));
|
||||
|
||||
$Wrapper = & new Calendar_Decorator_Wrapper($Month);
|
||||
$Wrapper->build();
|
||||
|
||||
echo '<h2>The Wrapper decorator</h2>';
|
||||
echo '<i>Day numbers are rendered in bold</i><br /> <br />';
|
||||
while ($DecoratedDay = $Wrapper->fetch('MyBoldDecorator')) {
|
||||
echo $DecoratedDay->thisDay().'<br />';
|
||||
}
|
||||
?>
|
Loading…
Add table
Add a link
Reference in a new issue