public function parse($input = null, $options = 0)
    {
        $this->root = null;

        if (!is_null($input)) {
            $this->setInput($input);
        }

        if (0 !== $options) {
            $this->options = $options;
        }

        $this->parseDocument();

        return $this->root;
    }
public function parse($input = null, $options = 0)
    {
        $this->root = null;

        if (!is_null($input)) {
            $this->setInput($input);
        }

        if (0 !== $options) {
            $this->options = $options;
        }

        $this->parseDocument();

        return $this->root;
    }
public function parse ( $ input = null , $ options = 0 ) { $ this -> root = null ; if ( ! is_null ( $ input ) ) { $ this -> setInput ( $ input ) ; } if ( 0 !== $ options ) { $ this -> options = $ options ; } $ this -> parseDocument ( ) ; return $ this -> root ; }
Parses an iCalendar or vCard file.

Pass a stream or a string. If null is parsed, the existing buffer is
used.

@param string|resource|null $input
@param int                  $options

@return \Sabre\VObject\Document
Parses an iCalendar or vCard file .