
Public Member Functions | |
| __construct ($targetType= '') | |
| Create a new page. | |
| appendMetaSlotToPage ($ms) | |
| Append the value of a meta-slot to the page buffer. | |
| appendSlotToMetaSlot ($slot, $meta) | |
| Append the value of a slot to a meta-slot. | |
| appendToMetaSlot ($index, $input) | |
| Append content to the end of a meta-slot. | |
| appendToPage ($input) | |
| Append the $input variable to the buffer of the whole page. | |
| appendToSlot ($index, $input) | |
| Append content to the end of a slot. | |
| frontAppendSlotToMetaSlot ($slot, $meta) | |
| Prepend the value of a slot to the front of a meta-slot. | |
| frontAppendToPage ($input) | |
| Prepend the $input variable to the (beginning of the) buffer of the whole page. | |
| getFormat () | |
| Get the format for the output page. | |
| getMetaSlot ($index) | |
| Get the value of an existing meta-slot. | |
| getPage () | |
| Get the content of the page buffer. | |
| getSlot ($index) | |
| Get the value of an existing slot. | |
| getTargetType () | |
| Get the target type for the output page (or the default type if none is set). | |
| setMetaSlot ($index, $input) | |
| Set the value of a meta-slot. | |
| setMetaSlotToSlot ($meta, $slot) | |
| Set the value of a meta-slot to the value of a slot. | |
| setPage ($input) | |
| Set the page buffer to $input. | |
| setSlot ($index, $input) | |
| Set the value of a slot in the page. | |
It allows other scripts to buffer content into small chunks called slots, which in turn can be combined into larger chunks called meta-slots. This class simply provides the methods to set, get, and append to slots and meta-slots, and to append slots to meta-slots
There are three levels of buffers:
A SLOT should be used for storing information such as the title of the page, the main body of the page content, etc.
A META-SLOT should represent an entire section of the page -- for instance, a top bar that pulls together a logo slot, some navigation slots, etc.
The PAGE buffer buffers the entire content of the output page.
Definition at line 23 of file SPage.php5.
| SPage::__construct | ( | $ | targetType = '' |
) |
Create a new page.
Create a new page object that will be used to buffer all the content that PR2 will render into a webpage (or other output document).
| $targetType | [string]: The type of the output document (typically 'html') |
Definition at line 43 of file SPage.php5.
| SPage::appendMetaSlotToPage | ( | $ | ms | ) |
Append the value of a meta-slot to the page buffer.
If you are building up the page buffer from a set of meta-slots, you can use this function to append the value of a meta-slot to the page buffer.
| $ms | [string]: The name of the meta-slot to append |
Definition at line 243 of file SPage.php5.
| SPage::appendSlotToMetaSlot | ( | $ | slot, | |
| $ | meta | |||
| ) |
Append the value of a slot to a meta-slot.
In case you are building up the value of a meta-slot from a number of slots, this function will let you add the value of one slot onto the end of a meta-slot buffer.
| $slot | [string]: The name of the slot to be appended to the meta-slot | |
| $meta | [string]: The name of the meta-slot |
Definition at line 165 of file SPage.php5.
| SPage::appendToMetaSlot | ( | $ | index, | |
| $ | input | |||
| ) |
Append content to the end of a meta-slot.
After a meta-slot has been rendered and buffered by PR2, you can add additional content to the end of a meta-slot using this function.
| $index | [string]: The name of the meta-slot | |
| $input | [string]: The input to be appended to the meta-slot |
Definition at line 134 of file SPage.php5.
| SPage::appendToPage | ( | $ | input | ) |
Append the $input variable to the buffer of the whole page.
| $input | [string]: The content to append to the page buffer |
Definition at line 221 of file SPage.php5.
| SPage::appendToSlot | ( | $ | index, | |
| $ | input | |||
| ) |
Append content to the end of a slot.
Add the value $input to what is in a slot named $index.
| $index | [string]: The name of the slot | |
| $input | [string]: The content to append to the slot |
Definition at line 84 of file SPage.php5.
| SPage::frontAppendSlotToMetaSlot | ( | $ | slot, | |
| $ | meta | |||
| ) |
Prepend the value of a slot to the front of a meta-slot.
In case you are building up the value of a meta-slot from a number of slots, this function will let you add the value of one slot onto the beginning of a meta-slot buffer.
| $slot | [string]: The name of the slot to be prepended to the meta-slot | |
| $meta | [string]: The name of the meta-slot |
Definition at line 181 of file SPage.php5.
| SPage::frontAppendToPage | ( | $ | input | ) |
Prepend the $input variable to the (beginning of the) buffer of the whole page.
| $input | [string]: The content to prepend to the page buffer |
Definition at line 230 of file SPage.php5.
| SPage::getFormat | ( | ) |
Get the format for the output page.
Definition at line 254 of file SPage.php5.
References getTargetType().
| SPage::getMetaSlot | ( | $ | index | ) |
Get the value of an existing meta-slot.
| $index | [string]: The name of the meta-slot |
Definition at line 147 of file SPage.php5.
| SPage::getPage | ( | ) |
Get the content of the page buffer.
Return the buffered content for the entire page
Definition at line 275 of file SPage.php5.
| SPage::getSlot | ( | $ | index | ) |
Get the value of an existing slot.
| $index | [string]: The name of the slot |
Definition at line 100 of file SPage.php5.
| SPage::getTargetType | ( | ) |
Get the target type for the output page (or the default type if none is set).
Definition at line 263 of file SPage.php5.
Referenced by getFormat().
| SPage::setMetaSlot | ( | $ | index, | |
| $ | input | |||
| ) |
Set the value of a meta-slot.
Set the value of a slot named $index to be $input. Meta-slots store large, related chunks of the final page. This meta-slot buffer in SPage is set during the rendering process after PR2 has rendered the meta-slot's final HTML by combining its child slots using a page layout/template.
| $index | [string]: The name of the meta-slot | |
| $input | [string]: The input to be stored in the meta-slot |
Definition at line 120 of file SPage.php5.
| SPage::setMetaSlotToSlot | ( | $ | meta, | |
| $ | slot | |||
| ) |
Set the value of a meta-slot to the value of a slot.
| $meta | [string]: The name of the meta-slot to be overwritten | |
| $slot | [string]: The name of the slot to be used as the value |
Definition at line 194 of file SPage.php5.
| SPage::setPage | ( | $ | input | ) |
Set the page buffer to $input.
Set the variable buffering the whole page to the value of the $input variable.
| $input | [string]: The content to store in the page buffer |
Definition at line 212 of file SPage.php5.
| SPage::setSlot | ( | $ | index, | |
| $ | input | |||
| ) |
Set the value of a slot in the page.
Set the value of slot $index to be $input. A slot is the smallest classification for buffering content in your page. It should be used to store one particular piece of content used to make up the final page, for instance the title of the page, the main body of the content, etc.
| $index | [string]: The name of the slot | |
| $input | [string]: The content to store in the slot |
Definition at line 71 of file SPage.php5.
1.5.6