ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
VCard.php
Go to the documentation of this file.
1<?php
2
4
7
22class 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}
An exception for terminatinating execution or to throw for unit testing.
The VCard component.
Definition: VCard.php:18
Exception thrown by parser when the end of the stream has been reached, before this was expected.
Exception thrown by Reader if an invalid object was attempted to be parsed.
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
input
Definition: langcheck.php:166
foreach($paths as $path) if($argc< 3) $input