PHP Класс JeroenDesloovere\VCard\VCardParser

This class is heavily based on the Zendvcard project (seemingly abandoned), which is licensed under the Apache 2.0 license. More information can be found at https://code.google.com/archive/p/zendvcard/
Автор: Thomas Schaaf ([email protected])
Автор: ruzicka.jan
Автор: Wouter Admiraal ([email protected])
Наследование: implements Iterato\Iterator
Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
$content string The raw VCard content.
$position integer The iterator position.
$vcardObjects array The VCard data objects.

Открытые методы

Метод Описание
__construct ( $content )
current ( )
getCardAtIndex ( integer $i ) : stdClass Fetch the imported VCard at the specified index.
getCards ( ) : array Fetch all the imported VCards.
key ( )
next ( )
parseFromFile ( string $filename ) : JeroenDesloovere\VCard\VCardParser Helper function to parse a file directly.
rewind ( )
valid ( )

Защищенные методы

Метод Описание
parse ( ) Start the parsing process.
parseAddress ( $value )
parseBirthday ( $value )
parseName ( $value )
unescape ( string $text ) : string Unescape newline characters according to RFC2425 section 5.8.4.

Описание методов

__construct() публичный Метод

public __construct ( $content )

current() публичный Метод

public current ( )

getCardAtIndex() публичный Метод

Fetch the imported VCard at the specified index.
public getCardAtIndex ( integer $i ) : stdClass
$i integer
Результат stdClass The card data object.

getCards() публичный Метод

Fetch all the imported VCards.
public getCards ( ) : array
Результат array A list of VCard card data objects.

key() публичный Метод

public key ( )

next() публичный Метод

public next ( )

parse() защищенный Метод

This method will populate the data object.
protected parse ( )

parseAddress() защищенный Метод

protected parseAddress ( $value )

parseBirthday() защищенный Метод

protected parseBirthday ( $value )

parseFromFile() публичный статический Метод

Helper function to parse a file directly.
public static parseFromFile ( string $filename ) : JeroenDesloovere\VCard\VCardParser
$filename string
Результат JeroenDesloovere\VCard\VCardParser

parseName() защищенный Метод

protected parseName ( $value )

rewind() публичный Метод

public rewind ( )

unescape() защищенный Метод

This function will replace escaped line breaks with PHP_EOL.
protected unescape ( string $text ) : string
$text string
Результат string

valid() публичный Метод

public valid ( )

Описание свойств

$content защищенное свойство

The raw VCard content.
protected string $content
Результат string

$position защищенное свойство

The iterator position.
protected int $position
Результат integer

$vcardObjects защищенное свойство

The VCard data objects.
protected array $vcardObjects
Результат array