Class: Config_Container
Source Location: /Config-1.7/Config/Container.php
Interface for Config containers
Author(s):
|
|
|
Inherited Variables
|
Inherited Methods
|
Class Details
Class Variables
Method Detail
Config_Container (Constructor) [line 86]
object reference &Config_Container(
[string
$type = 'section'], [string
$name = ''], [string
$content = ''], [array
$attributes = null])
|
|
Constructor
Parameters:
addItem [line 154]
mixed &addItem(
object
&$item, [string
$where = 'bottom'], [object
$target = null])
|
|
Adds an item to this item.
Parameters:
countChildren [line 345]
int countChildren(
[string
$type = null], [string
$name = null])
|
|
Returns how many children this container has
Parameters:
createBlank [line 217]
object reference &createBlank(
[mixed
$where = 'bottom'], [mixed
$target = null])
|
|
Adds a blank line to this item. This is a helper method that calls createItem
createComment [line 205]
object reference &createComment(
[string
$content = ''], [string
$where = 'bottom'], [object
$target = null])
|
|
Adds a comment to this item. This is a helper method that calls createItem
Parameters:
createDirective [line 234]
object reference &createDirective(
string
$name, string
$content, [mixed
$attributes = null], [string
$where = 'bottom'], [object
$target = null])
|
|
Adds a directive to this item. This is a helper method that calls createItem
Parameters:
createItem [line 107]
object reference &createItem(
string
$type, mixed
$item, string
$content, [array
$attributes = null], [string
$where = 'bottom'], [object
$target = null])
|
|
Create a child for this item.
Parameters:
createSection [line 253]
object reference &createSection(
string
$name, [array
$attributes = null], [string
$where = 'bottom'], [object
$target = null])
|
|
Adds a section to this item. This is a helper method that calls createItem If the section already exists, it won't create a new one. It will return reference to existing item.
Parameters:
getAttribute [line 556]
mixed getAttribute(
string
$attribute)
|
|
Get one attribute value of this item
Parameters:
getAttributes [line 546]
Get this item's attributes.
getChild [line 455]
mixed &getChild(
[mixed
$index = 0])
|
|
Returns the item parent object.
getContent [line 495]
getItem [line 278]
mixed &getItem(
string
$type, [mixed
$name = null], [mixed
$content = null], [array
$attributes = null], [int
$index = -1])
|
|
Tries to find the specified item(s) and returns the objects. Examples: $directives =& $obj->getItem('directive'); $directive_bar_4 =& $obj->getItem('directive', 'bar', null, 4); $section_foo =& $obj->getItem('section', 'foo'); This method can only be called on an object of type 'section'. Note that root is a section. This method is not recursive and tries to keep the current structure.
Parameters:
getItemIndex [line 404]
Returns the item index in its parent children array.
getItemPosition [line 423]
Returns the item rank in its parent children array according to other items with same type and name.
getName [line 477]
getParent [line 446]
object returns &getParent(
)
|
|
Returns the item parent object.
getType [line 513]
isRoot [line 594]
Is this item root, in a config container object
removeItem [line 387]
Deletes an item (section, directive, comment...) from the current object TODO: recursive remove in sub-sections
setAttributes [line 523]
void setAttributes(
array
$attributes)
|
|
Set this item's attributes.
Parameters:
setContent [line 486]
void setContent(
mixed
$content)
|
|
Set this item's content.
setDirective [line 576]
object newly &setDirective(
string
$name, mixed
$content, [int
$index = -1])
|
|
Set a children directive content. This is an helper method calling getItem and addItem or setContent for you. If the directive does not exist, it will be created at the bottom.
Parameters:
setName [line 468]
void setName(
mixed
$name)
|
|
Set this item's name.
setType [line 504]
void setType(
mixed
$type)
|
|
Set this item's type.
toArray [line 630]
Returns a key/value pair array of the container and its children. Format : section[directive][index] = value If the container has attributes, it will use '@' and '#' index is here because multiple directives can have the same name.
toString [line 608]
mixed toString(
string
$configType, [array
$options = array()])
|
|
Call the toString methods in the container plugin
Parameters:
updateAttributes [line 533]
void updateAttributes(
array
$attributes)
|
|
Set this item's attributes.
Parameters:
writeDatasrc [line 683]
mixed writeDatasrc(
mixed
$datasrc, string
$configType, [array
$options = array()])
|
|
Writes the configuration to a file
Parameters:
Documentation generated on Fri, 30 Apr 2004 23:49:12 +0200 by phpDocumentor 1.2.3. PEAR Logo Copyright © PHP Group 2004.
|
|