public function toArray($type = Document::SIMPLE)
    {
        switch ($type) {
            case Document::MININAL:
                $this->simple = false;
                $this->complete = false;
                break;

            case Document::SIMPLE:
                $this->simple = true;
                break;

            case Document::COMPLETE:
                $this->complete = true;
                break;

            default:
                throw new DomException('Invalid type', 2);
        }

        return $this->getNodes($this->childNodes, true);
    }
public function toArray($type = Document::SIMPLE)
    {
        switch ($type) {
            case Document::MININAL:
                $this->simple = false;
                $this->complete = false;
                break;

            case Document::SIMPLE:
                $this->simple = true;
                break;

            case Document::COMPLETE:
                $this->complete = true;
                break;

            default:
                throw new DomException('Invalid type', 2);
        }

        return $this->getNodes($this->childNodes, true);
    }
public function toArray ( $ type = Document :: SIMPLE ) { switch ( $ type ) { case Document :: MININAL : $ this -> simple = false ; $ this -> complete = false ; break ; case Document :: SIMPLE : $ this -> simple = true ; break ; case Document :: COMPLETE : $ this -> complete = true ; break ; default : throw new DomException ( 'Invalid type' , 2 ) ; } return $ this -> getNodes ( $ this -> childNodes , true ) ; }
Convert DOM to Array

@param int $type
@throws \Inphinit\Experimental\Exception
@return array
Convert DOM to Array