Config_Container::createDirective() – Add directive to item


require_once 'Config/Container.php';

object Config_Container::createDirective ( string $name , string $content , mixed $attributes = null , string $where = 'bottom' , mixed $target = null )


The current item must be a section. This is a helper method that calls createItem()


string $name

Name of new directive

string $content

Content of new directive

mixed $attributes

Directive attributes

string $where

Where to create the new item ('top', 'bottom', 'before', 'after')

object $target

Required only if 'before' or 'after' is used for $where

Return value

object - reference to new item


Possible PEAR_Error values
Error code Error value Meaning Solution


This function can not be called statically.


Create a new directive using createDirective()

=& new Config_Container('section''conf');
Add comment to item (Previous) Create new child for section item (Next)
Last updated: Sat, 16 Feb 2019 — Download Documentation
Do you think that something on this page is wrong? Please file a bug report.
View this page in:
  • English

User Notes:

There are no user contributed notes for this page.