public static function read($data, $options = 0, $charset = 'UTF-8')
    {
        $parser = new Parser\MimeDir();
        $parser->setCharset($charset);
        $result = $parser->parse($data, $options);

        return $result;
    }
public static function read($data, $options = 0, $charset = 'UTF-8')
    {
        $parser = new Parser\MimeDir();
        $parser->setCharset($charset);
        $result = $parser->parse($data, $options);

        return $result;
    }
public static function read ( $ data , $ options = 0 , $ charset = 'UTF-8' ) { $ parser = new Parser \ MimeDir ( ) ; $ parser -> setCharset ( $ charset ) ; $ result = $ parser -> parse ( $ data , $ options ) ; return $ result ; }
Parses a vCard or iCalendar object, and returns the top component.

The options argument is a bitfield. Pass any of the OPTIONS constant to
alter the parsers' behaviour.

You can either supply a string, or a readable stream for input.

@param string|resource $data
@param int             $options
@param string          $charset

@return Document
Parses a vCard or iCalendar object and returns the top component .