Config_Container::setDirective
Вернуться к: Config_Container class
Config_Container::setDirective
Synopsis
void Config_Container::setDirective ( string $name , mixed $content , int $index = -1 )
This is an helper method that will first try to find the item with the desired name using getItem(). If the item is found, it will call its setContent() method. If not, it will just create a new directive at the bottom with the given name and content.
Parameter
- string $name
-
Name of the directive to look for
- mixed $content
-
New content, usually a string
- integer $index
-
Index of the directive to set, in case there are more than one directive with the same name
Return value
object - Newly set directive
Note
This function can not be called statically.
Вернуться к: Config_Container class