help with my static class logic with pushing new values into an array
<p>I am trying to make a class that will load my <code>.ini</code> files for me. The rundown is that I specify the name of the application I'm working with, then give it a single or array of files for it to load for me. Once that is done I just call it like so.</p>

<pre><code>Ini::path(BASE_PATH . "config" . DS);
Ini::set_app("testApp");
Ini::load(array("db", "web", "themer"));
</code></pre>

<p>then I'm trying to use it like this</p>

<pre><code>echo Ini::$get['testApp']['someKey']['someValue'];
</code></pre>

<p>at the moment I can use it without the <code>Ini::$app</code> being set because I'm trying to add that features. i.e <code>Ini::$get['someKey']['someValue'];</code></p>

<p>My problem is that I cannot figure out how to push more <code>.ini</code> files into the <code>Ini::$get</code> array. The usage should be something like this</p>

<p><code>Ini::push("anotherIni");</code></p>

<p>that is suppose to call my <code>push</code> method and push the new file into the array. But I can't seem to build the array correctly. Either that, or it is not possible to push a new value into a static array.</p>

<p>My array with the array_push attempt looks like this ounce outputted with a <code>print_r()</code></p>

<pre><code>Array ( [testApp] =&gt; )
</code></pre>

<p>otherwise it outputs this without me trying to push the new ini into the array</p>

<pre><code>Array ( [testApp] =&gt; Array ( [db] =&gt; [web] =&gt; [themer] =&gt; ) )
</code></pre>

<p>Here is my Class file (Updated to reflect answers)</p>

<pre><code>    class Ini {

    public static $get = array();
    public static $tmp = array();
    public static $path;
    public static $app;
    public static $push;

    public static function load($file)
    {
        if (is_array($file)) {

            foreach ($file as $ini)
                self::$get[self::$app][$ini] = parse_ini_file(self::$path . $ini . ".ini", true);

            //array_push(self::$get[self::$app], "testIni");
        } else {

            self::$get[self::$app][$file] = parse_ini_file(self::$path . $file . ".ini", true);
        }
    }

    public static function push($file)
    {
        self::$tmp[$file] = parse_ini_file(self::$path . $file . ".ini", true);
        array_push(self::$get[self::$app], self::$tmp[$file]);
    }

    public static function set_app($name)
    {
        self::$app = $name;
        self::$get[self::$app] = array();
    }

    public static function path($path)
    {
        self::$path = $path;
        return self::$path;
    }

    // TODO: Create 'write', 'delete', 'append' function to change ini values
}
</code></pre>
