ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
VCard.php
Go to the documentation of this file.
1 <?php
2 
3 namespace Sabre\VObject\Splitter;
4 
5 use Sabre\VObject;
7 
22 class VCard implements SplitterInterface {
23 
29  protected $input;
30 
36  protected $parser;
37 
46  function __construct($input, $options = 0) {
47 
48  $this->input = $input;
49  $this->parser = new MimeDir($input, $options);
50 
51  }
52 
61  function getNext() {
62 
63  try {
64  $object = $this->parser->parse();
65 
66  if (!$object instanceof VObject\Component\VCard) {
67  throw new VObject\ParseException('The supplied input contained non-VCARD data.');
68  }
69 
70  } catch (VObject\EofException $e) {
71  return;
72  }
73 
74  return $object;
75 
76  }
77 
78 }
if($argc< 3) $input
input
Definition: langcheck.php:166
MimeDir parser.
Definition: MimeDir.php:25
getNext()
Every time getNext() is called, a new object will be parsed, until we hit the end of the stream...
Definition: VCard.php:61
__construct($input, $options=0)
Constructor.
Definition: VCard.php:46
Exception thrown by Reader if an invalid object was attempted to be parsed.
Exception thrown by parser when the end of the stream has been reached, before this was expected...
The VCard component.
Definition: VCard.php:18