protected function checkStartDocument($data)
    {
        if (count($this->stack)) {
            throw new Exceptions\OutputGeneratorException(
                'Starting a document may only be the very first operation.'
            );
        }

        $this->stack[] = array('document', $data, array());
    }
protected function checkStartDocument($data)
    {
        if (count($this->stack)) {
            throw new Exceptions\OutputGeneratorException(
                'Starting a document may only be the very first operation.'
            );
        }

        $this->stack[] = array('document', $data, array());
    }
protected function checkStartDocument ( $ data ) { if ( count ( $ this -> stack ) ) { throw new Exceptions \ OutputGeneratorException ( 'Starting a document may only be the very first operation.' ) ; } $ this -> stack [ ] = array ( 'document' , $ data , array ( ) ) ; }
Check start document.

@param mixed $data
Check start document .