PHP Class Auth_Yadis_ParseHTML, vanilla

Datei anzeigen Open project: vanilla/vanilla Class Usage Examples

Public Properties

Property Type Description
$_attr_find
$_re_flags
$_removed_re
$_tag_expr

Public Methods

Method Description
__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.

Method Details

__construct() public method

public __construct ( )

getHTTPEquiv() public method

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
return mixed $content The "content" attribute value of the META tag, if found, or null if no such tag was found.

getMetaTags() public method

.. section of the document. The tag may be missing.
public getMetaTags ( string $html_string ) : array
$html_string string An HTMl document string
return array $tag_list Array of tags; each tag is an array of attribute -> value.

removeQuotes() public method

Strip single and double quotes off of a string, if they are present.
public removeQuotes ( string $str ) : string
$str string The original string
return string $new_str The new string with leading and trailing quotes removed

replaceEntities() public method

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
return string $new_str The new string entities decoded

tagPattern() public method

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
return string $regex A regular expression string to be used in, say, preg_match.

Property Details

$_attr_find public_oe property

public $_attr_find

$_re_flags public_oe property

public $_re_flags

$_removed_re public_oe property

public $_removed_re

$_tag_expr public_oe property

public $_tag_expr