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

Abstract parser. More...

+ Inheritance diagram for Sabre\VObject\Parser\Parser:
+ Collaboration diagram for Sabre\VObject\Parser\Parser:

Public Member Functions

 __construct ($input=null, $options=0)
 Creates the parser. More...
 
 parse ($input=null, $options=0)
 This method starts the parsing process. More...
 
 setInput ($input)
 Sets the input data. More...
 

Data Fields

const OPTION_FORGIVING = 1
 Turning on this option makes the parser more forgiving. More...
 
const OPTION_IGNORE_INVALID_LINES = 2
 If this option is turned on, any lines we cannot parse will be ignored by the reader. More...
 

Protected Attributes

 $options
 

Detailed Description

Abstract parser.

This class serves as a base-class for the different parsers.

Author
Evert Pot (http://evertpot.com/) http://sabre.io/license/ Modified BSD License

Definition at line 14 of file Parser.php.

Constructor & Destructor Documentation

◆ __construct()

Sabre\VObject\Parser\Parser::__construct (   $input = null,
  $options = 0 
)

Creates the parser.

Optionally, it's possible to parse the input stream here.

Parameters
mixed$input
int$optionsAny parser options (OPTION constants).
Returns
void

Definition at line 48 of file Parser.php.

References Sabre\VObject\$input, Sabre\VObject\Parser\Parser\$options, Sabre\VObject\Parser\Parser\parse(), and Sabre\VObject\Parser\Parser\setInput().

48  {
49 
50  if (!is_null($input)) {
51  $this->setInput($input);
52  }
53  $this->options = $options;
54  }
if($argc< 3) $input
setInput($input)
Sets the input data.
+ Here is the call graph for this function:

Member Function Documentation

◆ parse()

Sabre\VObject\Parser\Parser::parse (   $input = null,
  $options = 0 
)
abstract

This method starts the parsing process.

If the input was not supplied during construction, it's possible to pass it here instead.

If either input or options are not supplied, the defaults will be used.

Parameters
mixed$input
int$options
Returns
array

Referenced by Sabre\VObject\Parser\Parser\__construct().

+ Here is the caller graph for this function:

◆ setInput()

Sabre\VObject\Parser\Parser::setInput (   $input)
abstract

Sets the input data.

Parameters
mixed$input
Returns
void

Referenced by Sabre\VObject\Parser\Parser\__construct().

+ Here is the caller graph for this function:

Field Documentation

◆ $options

◆ OPTION_FORGIVING

const Sabre\VObject\Parser\Parser::OPTION_FORGIVING = 1

Turning on this option makes the parser more forgiving.

In the case of the MimeDir parser, this means that the parser will accept slashes and underscores in property names, and it will also attempt to fix Microsoft vCard 2.1's broken line folding.

Definition at line 23 of file Parser.php.

◆ OPTION_IGNORE_INVALID_LINES

const Sabre\VObject\Parser\Parser::OPTION_IGNORE_INVALID_LINES = 2

If this option is turned on, any lines we cannot parse will be ignored by the reader.

Definition at line 29 of file Parser.php.


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