void add(
string
$name, mixed
$value
)
|
|
Adds a slot.
Slot $name must not exist.
Parameters:
|
string |
$name: |
name for this slot |
|
mixed |
$value: |
value for this slot |
API Tags:
Information Tags:
Stores the previously opened slot. Throws a SlotException if no slot is open.
API Tags:
Information Tags:
| Throws: | SlotException |
| Since: | 0.1 |
void crashIfExists(
$name
)
|
|
Throws a SlotException if slot $name exists.
Parameters:
API Tags:
Information Tags:
| Throws: | SlotException |
| Since: | 0.1 |
If a slot is open, terminates the output buffer and throws a SlotException.
API Tags:
Information Tags:
| Throws: | SlotException |
| Since: | 0.1 |
bool exist(
string
$name
)
|
|
Returns True if slot $name exists, False otherwise.
Parameters:
API Tags:
Information Tags:
mixed getOrCrash(
string
$name
)
|
|
Returns the slot $name.
Throws a SlotException if this slot does not exist.
Parameters:
API Tags:
Information Tags:
| Throws: | SlotException |
| Since: | 0.1 |
mixed getOrDefault(
string
$name, mixed
$default
)
|
|
Returns the value of slot $name if it exists, the default value otherwise.
Parameters:
|
string |
$name: |
|
|
mixed |
$default: |
|
API Tags:
Information Tags:
Returns True if a slot is opened.
API Tags:
Information Tags:
void open(
string
$name
)
|
|
Opens a slot. Its contents will be the text printed until a call to SlotHolder::close() is issued.
No slot must be opened, and slot $name must not exist.
Parameters:
|
string |
$name: |
the name of this slot |
API Tags:
Information Tags: