public function push($alias, $value, $other = null)
    {
        if (isset($other)) {
            $values = func_get_args();
            array_shift($values);
        } else {
            $values = [$value];
        }

        $array = $this->get($alias);

        if (!is_array($array)) {
            throw new NestingUnderNonArrayException("You may only push items onto an array");
        }

        foreach ($values as $value) {
            array_push($array, $value);
        }
        $this->set($alias, $array);

        return count($values);
    }
public function push($alias, $value, $other = null)
    {
        if (isset($other)) {
            $values = func_get_args();
            array_shift($values);
        } else {
            $values = [$value];
        }

        $array = $this->get($alias);

        if (!is_array($array)) {
            throw new NestingUnderNonArrayException("You may only push items onto an array");
        }

        foreach ($values as $value) {
            array_push($array, $value);
        }
        $this->set($alias, $array);

        return count($values);
    }
public function push ( $ alias , $ value , $ other = null ) { if ( isset ( $ other ) ) { $ values = func_get_args ( ) ; array_shift ( $ values ) ; } else { $ values = [ $ value ] ; } $ array = $ this -> get ( $ alias ) ; if ( ! is_array ( $ array ) ) { throw new NestingUnderNonArrayException ( "You may only push items onto an array" ) ; } foreach ( $ values as $ value ) { array_push ( $ array , $ value ) ; } $ this -> set ( $ alias , $ array ) ; return count ( $ values ) ; }
Push a value or values onto the end of an array inside manager
@param string $alias The level of nested data
@param mixed $value The first value to append
@param null|mixed $other Optional other values to apend
@return int Number of items pushed
@throws ItemNotFoundException If pushing to unset array
Push a value or values onto the end of an array inside manager