Config_Container::getAttributes() – Get item attributes


require_once 'Config/Container.php';

array Config_Container::getAttributes ( void )


This method returns an array containing the attributes of this container.

Return value

array - item's attributes


This function can not be called statically.


Using attribute

= array('id' => 'db''language' => 'en');
$section =& new Config_Container('section''main'null$attributes);
$section->createDirective('authentication''test', array('type' => 'mysql',
'host' => 'localhost'));


Attributes are set for '@' key with php array type

$main['@']['id'] = 'db';
$main['@']['language'] = 'en';
$main['authentication']['#'] = 'test';
$main['authentication']['@']['type'] = 'mysql';
$main['authentication']['@']['host'] = 'localhost';

Attributes are set the usual way with xml type

       <?xml version="1.0" encoding="ISO-8859-1"?>
       <main id="db" language="en">
        <authentication type="mysql" host="localhost">
Get attribute value of item (Previous) Return child object at specified index. (Next)
Last updated: Thu, 26 Nov 2015 — Download Documentation
Do you think that something on this page is wrong? Please file a bug report or add a note.
View this page in:

User Notes:

There are no user contributed notes for this page.