src/AbstractJsonEncoder.php
private function pushStack($iterable)
    {
        $iterator = $this->getIterator($iterable);
        $isObject = $this->isObject($iterable, $iterator);

        if ($isObject) {
            $this->outputLine('{', JsonToken::T_LEFT_BRACE);
        } else {
            $this->outputLine('[', JsonToken::T_LEFT_BRACKET);
        }

        $this->first = true;
        $this->stack[] = $iterator;
        $this->stackType[] = $isObject;
    }
private function pushStack($iterable)
    {
        $iterator = $this->getIterator($iterable);
        $isObject = $this->isObject($iterable, $iterator);

        if ($isObject) {
            $this->outputLine('{', JsonToken::T_LEFT_BRACE);
        } else {
            $this->outputLine('[', JsonToken::T_LEFT_BRACKET);
        }

        $this->first = true;
        $this->stack[] = $iterator;
        $this->stackType[] = $isObject;
    }
private function pushStack ( $ iterable ) { $ iterator = $ this -> getIterator ( $ iterable ) ; $ isObject = $ this -> isObject ( $ iterable , $ iterator ) ; if ( $ isObject ) { $ this -> outputLine ( '{' , JsonToken :: T_LEFT_BRACE ) ; } else { $ this -> outputLine ( '[' , JsonToken :: T_LEFT_BRACKET ) ; } $ this -> first = true ; $ this -> stack [ ] = $ iterator ; $ this -> stackType [ ] = $ isObject ; }
Pushes the given iterable to the value stack.
@param object|array $iterable The iterable value to push to the stack
Pushes the given iterable to the value stack .