PHP Класс Auth_Yadis_ParseHTML, vanilla

Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
$_attr_find
$_re_flags
$_removed_re
$_tag_expr

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

Метод Описание
__construct ( )
getHTTPEquiv ( string $html_string ) : mixed Looks for a META tag with an "http-equiv" attribute whose value is one of ("x-xrds-location", "x-yadis-location"), ignoring case. If such a META tag is found, its "content" attribute value is returned.
getMetaTags ( string $html_string ) : array Given an HTML document string, this finds all the META tags in the document, provided they are found in the .
removeQuotes ( string $str ) : string Strip single and double quotes off of a string, if they are present.
replaceEntities ( string $str ) : string Replace HTML entities (amp, lt, gt, and quot) as well as numeric entities (e.g. #x9f;) with their actual values and return the new string.
tagPattern ( mixed $tag_names, mixed $close, mixed $self_close ) : string Create a regular expression that will match an opening or closing tag from a set of names.

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

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

public __construct ( )

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

Looks for a META tag with an "http-equiv" attribute whose value is one of ("x-xrds-location", "x-yadis-location"), ignoring case. If such a META tag is found, its "content" attribute value is returned.
public getHTTPEquiv ( string $html_string ) : mixed
$html_string string An HTML document in string format
Результат mixed $content The "content" attribute value of the META tag, if found, or null if no such tag was found.

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

.. section of the document. The tag may be missing.
public getMetaTags ( string $html_string ) : array
$html_string string An HTMl document string
Результат array $tag_list Array of tags; each tag is an array of attribute -> value.

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

Strip single and double quotes off of a string, if they are present.
public removeQuotes ( string $str ) : string
$str string The original string
Результат string $new_str The new string with leading and trailing quotes removed

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

Replace HTML entities (amp, lt, gt, and quot) as well as numeric entities (e.g. #x9f;) with their actual values and return the new string.
public replaceEntities ( string $str ) : string
$str string The string in which to look for entities
Результат string $new_str The new string entities decoded

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

Create a regular expression that will match an opening or closing tag from a set of names.
public tagPattern ( mixed $tag_names, mixed $close, mixed $self_close ) : string
$tag_names mixed Tag names to match
$close mixed false/0 = no, true/1 = yes, other = maybe
$self_close mixed false/0 = no, true/1 = yes, other = maybe
Результат string $regex A regular expression string to be used in, say, preg_match.

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

$_attr_find публичное свойство

public $_attr_find

$_re_flags публичное свойство

public $_re_flags

$_removed_re публичное свойство

public $_removed_re

$_tag_expr публичное свойство

public $_tag_expr