Neos\Eel\Context::push PHP Method

push() public method

Is used to build array instances inside the evaluator.
public push ( mixed $value, string $key = null ) : Context
$value mixed
$key string
return Context
    public function push($value, $key = null)
    {
        if (!is_array($this->value)) {
            throw new EvaluationException('Array operation on non-array context', 1344418485);
        }
        if ($key === null) {
            $this->value[] = $value;
        } else {
            $this->value[$key] = $value;
        }
        return $this;
    }