public function getErrors($type = self::ERROR_ALL) {
        if ($type === self::ERROR_ALL) {
            return $this->_errors;
        }

        $clean = array();

        if ($this->_errors) {
            foreach ($this->_errors as $error) {
                if ($error['type'] === self::ERROR_NESTING) {
                    $clean[] = $error;

                } else if ($error['type'] === self::ERROR_CLOSING) {
                    $clean[] = $error;

                } else if ($error['type'] === self::ERROR_SCOPE) {
                    $clean[] = $error;
                }
            }
        }

        return $clean;
    }
public function getErrors($type = self::ERROR_ALL) {
        if ($type === self::ERROR_ALL) {
            return $this->_errors;
        }

        $clean = array();

        if ($this->_errors) {
            foreach ($this->_errors as $error) {
                if ($error['type'] === self::ERROR_NESTING) {
                    $clean[] = $error;

                } else if ($error['type'] === self::ERROR_CLOSING) {
                    $clean[] = $error;

                } else if ($error['type'] === self::ERROR_SCOPE) {
                    $clean[] = $error;
                }
            }
        }

        return $clean;
    }
public function getErrors ( $ type = self :: ERROR_ALL ) { if ( $ type === self :: ERROR_ALL ) { return $ this -> _errors ; } $ clean = array ( ) ; if ( $ this -> _errors ) { foreach ( $ this -> _errors as $ error ) { if ( $ error [ 'type' ] === self :: ERROR_NESTING ) { $ clean [ ] = $ error ; } else if ( $ error [ 'type' ] === self :: ERROR_CLOSING ) { $ clean [ ] = $ error ; } else if ( $ error [ 'type' ] === self :: ERROR_SCOPE ) { $ clean [ ] = $ error ; } } } return $ clean ; }
Return the parsing errors.

@param int $type
@return array
Return the parsing errors .