src/Control/Session.php
public function addToArray($name, $val)
    {
        $names = explode('.', $name);

        // We still want to do this even if we have strict path checking for legacy code
        $var = &$this->data;
        $diffVar = &$this->changedData;

        foreach ($names as $n) {
            $var = &$var[$n];
            $diffVar = &$diffVar[$n];
        }

        $var[] = $val;
        $diffVar[sizeof($var) - 1] = $val;
    }
public function addToArray($name, $val)
    {
        $names = explode('.', $name);

        // We still want to do this even if we have strict path checking for legacy code
        $var = &$this->data;
        $diffVar = &$this->changedData;

        foreach ($names as $n) {
            $var = &$var[$n];
            $diffVar = &$diffVar[$n];
        }

        $var[] = $val;
        $diffVar[sizeof($var) - 1] = $val;
    }
public function addToArray ( $ name , $ val ) { $ names = explode ( '.' , $ name ) ; // We still want to do this even if we have strict path checking for legacy code $ var = & $ this -> data ; $ diffVar = & $ this -> changedData ; foreach ( $ names as $ n ) { $ var = & $ var [ $ n ] ; $ diffVar = & $ diffVar [ $ n ] ; } $ var [ ] = $ val ; $ diffVar [ sizeof ( $ var ) - 1 ] = $ val ; }
Merge value with array

@param string $name
@param mixed $val
Merge value with array