notice error on arrayObject
<p>Hello i'm having trouble with this class when it comes to multidimensional arrays and setting them and i cannot understand why is behaving like this...
Anyone who can help me fix it?</p>

<p>Few Usage Examples:</p>

<pre><code>echo $config-&gt;session-&gt;gcDivisor;
echo $config['session']['gcDivisor'];
$config['logged'] = '1';
$config-&gt;logged = '1';
$config['user']['logged'] = '1';
$config-&gt;user-&gt;logged = '1';
</code></pre>

<p>Errors for each of the lines</p>

<pre><code>Notice:  Trying to get property of non-object in /home/biroexpert/subdomains/prod/index.php on line 33

200

Notice:  Undefined index:  user in /home/biroexpert/subdomains/prod/Library/Twelve/Config/Config.php on line 67

Notice:  Indirect modification of overloaded element of Twelve\Config\Config has no effect in /home/biroexpert/subdomains/prod/index.php on line 37

Notice:  Undefined index:  user in /home//subdomains/prod/Library/Twelve/Config/Config.php on line 87

Notice:  Indirect modification of overloaded property Twelve\Config\Config::$user has no effect in /home//subdomains/prod/index.php on line 38

Strict Standards:  Creating default object from empty value in /home//subdomains/prod/index.php on line 38
</code></pre>

<p>Code</p>

<pre><code>&lt;?php
namespace Twelve\Config;
use \ArrayObject;
use \Twelve\SingletonPattern\LazySingleton;
use \Twelve\SingletonPattern\Interfaces\ILazySingleton;

/**
 *  Singleton With Configuration Info
 */
class Config extends ArrayObject implements ILazySingleton
{
    /**
     * Stores FileName
     * @var Config
     */
    protected static $_configFile = '';

    /**
     * Config Settings Array
     * @var Config
     */
    protected $_settings = array();

    public static function getInstance(){
        return LazySingleton::getInstance(__CLASS__);
    }

    /**
     *  Set the Config File Path
     */
    public static function setFile($filePath)
    {
        static::$_configFile = $filePath;
    }

    public function __construct()
    {
        LazySingleton::validate(__CLASS__);

        $values = include(static::$_configFile);
        if(is_array($values))
        {
            // Allow accessing properties as either array keys or object properties:
            $this-&gt;_settings = new ArrayObject($values, ArrayObject::ARRAY_AS_PROPS);
        }
    }

    // some debug method
    public function dumpArray()
    {
        echo "&lt;pre&gt;";
        print_r($this-&gt;_settings);
    }

    public function getIterator()
    {
        return $this-&gt;_settings-&gt;getIterator();
    }

    public function offsetExists($index)
    {
        return $this-&gt;_settings-&gt;offsetExists($index);
    }

    public function offsetGet($index)
    {
        return $this-&gt;_settings-&gt;offsetGet($index);
    }

    public function offsetSet($key, $value)
    {
        return $this-&gt;_settings-&gt;offsetSet($key, $value);
    }

    public function offsetUnset($index)
    {
        return $this-&gt;_settings-&gt;offsetUnset($index);
    }

    public function count()
    {
        return $this-&gt;_settings-&gt;count();
    }
    /**
     * Prevent Cloning
     */
    public function __clone()
    {
        trigger_error('Clone is not allowed.', E_USER_ERROR);

        // No Cloning Allowed
    }
}
</code></pre>
