Class: Config_Container
Source Location: /Config-1.4/Config/Container.php
Interface for Config containers
Author(s):
|
|
|
Inherited Variables
|
Inherited Methods
|
Class Details
Class Variables
Method Detail
Config_Container (Constructor) [line 76]
object reference &Config_Container(
[string
$type = ''], [string
$name = ''], [string
$content = ''], [array
$attributes = null])
|
|
Constructor
Parameters:
addItem [line 143]
mixed &addItem(
object
&$item, [string
$where = 'bottom'], [object
$target = null])
|
|
Adds an item to this item.
Parameters:
countChildren [line 334]
int countChildren(
[string
$type = null], [string
$name = null])
|
|
Returns how many children this container has
Parameters:
createBlank [line 206]
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 194]
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 223]
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 96]
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 242]
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 554]
mixed getAttribute(
string
$attribute)
|
|
Get one attribute value of this item
Parameters:
getAttributes [line 544]
Get this item's attributes.
getChild [line 453]
mixed &getChild(
[mixed
$index = 0])
|
|
Returns the item parent object.
getContent [line 493]
getItem [line 267]
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 393]
Returns the item index in its parent children array.
getItemPosition [line 418]
Returns the item rank in its parent children array according to other items with same type and name.
getName [line 475]
getParent [line 444]
object returns &getParent(
)
|
|
Returns the item parent object.
getType [line 511]
isRoot [line 592]
Is this item root, in a config container object
removeItem [line 376]
Deletes an item (section, directive, comment...) from the current object TODO: recursive remove in sub-sections
setAttributes [line 521]
void setAttributes(
array
$attributes)
|
|
Set this item's attributes.
Parameters:
setContent [line 484]
void setContent(
mixed
$content)
|
|
Set this item's content.
setDirective [line 574]
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 466]
void setName(
mixed
$name)
|
|
Set this item's name.
setType [line 502]
void setType(
mixed
$type)
|
|
Set this item's type.
toArray [line 628]
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 606]
mixed toString(
string
$configType, [array
$options = array()])
|
|
Call the toString methods in the container plugin
Parameters:
updateAttributes [line 531]
void updateAttributes(
array
$attributes)
|
|
Set this item's attributes.
Parameters:
writeDatasrc [line 676]
mixed writeDatasrc(
mixed
$datasrc, string
$configType, [array
$options = array()])
|
|
Writes the configuration to a file
Parameters:
Documentation generated on Fri, 30 Apr 2004 22:59:03 +0200 by phpDocumentor 1.2.3. PEAR Logo Copyright © PHP Group 2004.
|
|