ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
Sabre\VObject\Splitter\VCard Class Reference

Splitter. More...

+ Inheritance diagram for Sabre\VObject\Splitter\VCard:
+ Collaboration diagram for Sabre\VObject\Splitter\VCard:

Public Member Functions

 __construct ($input, $options=0)
 Constructor. More...
 
 getNext ()
 Every time getNext() is called, a new object will be parsed, until we hit the end of the stream. More...
 
- Public Member Functions inherited from Sabre\VObject\Splitter\SplitterInterface
 __construct ($input)
 Constructor. More...
 

Protected Attributes

 $input
 
 $parser
 

Detailed Description

Splitter.

This class is responsible for splitting up VCard objects.

It is assumed that the input stream contains 1 or more VCARD objects. This class checks for BEGIN:VCARD and END:VCARD and parses each encountered component individually.

Author
Dominik Tobschall (http://tobschall.de/)
Armin Hackmann http://sabre.io/license/ Modified BSD License

Definition at line 22 of file VCard.php.

Constructor & Destructor Documentation

◆ __construct()

Sabre\VObject\Splitter\VCard::__construct (   $input,
  $options = 0 
)

Constructor.

The splitter should receive an readable file stream as it's input.

Parameters
resource$input
int$optionsParser options, see the OPTIONS constants.

Definition at line 46 of file VCard.php.

References Sabre\VObject\$input, PHPMailer\PHPMailer\$options, and input.

46  {
47 
48  $this->input = $input;
49  $this->parser = new MimeDir($input, $options);
50 
51  }
if($argc< 3) $input
input
Definition: langcheck.php:166

Member Function Documentation

◆ getNext()

Sabre\VObject\Splitter\VCard::getNext ( )

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.

Returns
Sabre|null

Implements Sabre\VObject\Splitter\SplitterInterface.

Definition at line 61 of file VCard.php.

61  {
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  }

Field Documentation

◆ $input

Sabre\VObject\Splitter\VCard::$input
protected

Definition at line 29 of file VCard.php.

◆ $parser

Sabre\VObject\Splitter\VCard::$parser
protected

Definition at line 36 of file VCard.php.


The documentation for this class was generated from the following file: