appends values or an array of values to the data object
void
append
(array|string $name, [mixed $val = null], [bool $merge = false])
-
array|string
$name: an associative array of multiple (index=>value) or a string that is the index to use, i.e. a value assigned to "foo" will be accessible in the template through {$foo}
-
mixed
$val: the value to assign, or null if $name was an array
-
bool
$merge: true to merge data or false to append, defaults to false
appends a value by reference to the data object
void
appendByRef
(string $name, &$val, [bool $merge = false], mixed $val)
-
string
$name: the index to use, i.e. a value assigned to "foo" will be accessible in the template through {$foo}
-
mixed
$val: the value to append by reference
-
bool
$merge: true to merge data or false to append, defaults to false
-
&$val
assigns a value or an array of values to the data object
void
assign
(array|string $name, [mixed $val = null])
-
array|string
$name: an associative array of multiple (index=>value) or a string that is the index to use, i.e. a value assigned to "foo" will be accessible in the template through {$foo}
-
mixed
$val: the value to assign, or null if $name was an array
assigns a value by reference to the data object
void
assignByRef
(string $name, &$val, mixed $val)
-
string
$name: the index to use, i.e. a value assigned to "foo" will be accessible in the template through {$foo}
-
mixed
$val: the value to assign by reference
-
&$val
clears a the entire data or only the given key
void
clear
([array|string $name = null])
-
array|string
$name: clears only one value if you give a name, multiple values if you give an array of names, or the entire data if left null
returns a variable if it was assigned
mixed
get
(string $name)
-
string
$name: the variable name
returns the data array
array
getData
()
Implementation of:
- Dwoo_IDataProvider::getData()
- returns the data as an associative array that will be used in the template
returns true if the variable has been assigned already, false otherwise
bool
isAssigned
(string $name)
-
string
$name: the variable name
merges the given array(s) with the current data with array_merge
void
mergeData
( $data, array $data2)
-
array
$data: the array to merge
-
array
$data2: $data3 ... other arrays to merge, optional, etc.
overwrites the entire data with the given array
void
setData
( $data)
-
array
$data: the new data array to use
unassigns/removes a variable
void
unassign
(string $name)
-
string
$name: the variable name
allows to read variables using the object syntax
mixed
__get
(string $name)
-
string
$name: the variable name
supports calls to isset($dwooData->var)
void
__isset
(string $name)
-
string
$name: the variable name
allows to assign variables using the object syntax
void
__set
(string $name, string $value)
-
string
$name: the variable name
-
string
$value: the value to assign to it
supports unsetting variables using the object syntax
void
__unset
(string $name)
-
string
$name: the variable name