input = $input; $this->parser = new MimeDir($input, $options); } /** * Every time getNext() is called, a new object will be parsed, until we * hit the end of the stream. * * When the end is reached, null will be returned. * * @return Sabre\VObject\Component|null */ function getNext() { try { $object = $this->parser->parse(); if (!$object instanceof VObject\Component\VCard) { throw new VObject\ParseException('The supplied input contained non-VCARD data.'); } } catch (VObject\EofException $e) { return; } return $object; } }