previousConfig_Container::createItem (Previous) (Next) Config_Container::getAttributenext

View this page in Last updated: Sun, 18 Oct 2009
English | Brazilian Portuguese | Chinese | Dutch | French | German | Hungarian | Japanese | Polish | Russian | Spanish | Turkish

Config_Container::createSection

Config_Container::createSection() – Add section to item

Synopsis

require_once 'Config/Container.php';

objectConfig_Container::createSection ( string $name , array $attributes = null , string $where = 'bottom' , object $target = null )

Description

Must be called on a section. This is a helper method that calls createItem()

Parameter

string $name

Name of new section

array array $attributes

Section 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

Throws

Possible PEAR_Error values
Error code Error value Meaning Solution
  "    

Note

This function can not be called statically.

Example

Create a new section using createSection()

<?php
$conf 
=& new Config_Container('section''MAIN');
$dbConf =& $conf->createSection('DB');
$dbConf->createDirective('user''mansion');
?>
previousConfig_Container::createItem (Previous) (Next) Config_Container::getAttributenext

Download Documentation Last updated: Sun, 18 Oct 2009
Do you think that something on this page is wrong? Please file a bug report or add a note.
User Notes:
There are no user contributed notes for this page.