Property | Type | Description | |
---|---|---|---|
$_attr_find | |||
$_re_flags | |||
$_removed_re | |||
$_tag_expr |
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. |
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. |
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. |
public removeQuotes ( string $str ) : string | ||
$str | string | The original string |
return | string | $new_str The new string with leading and trailing quotes removed |
public replaceEntities ( string $str ) : string | ||
$str | string | The string in which to look for entities |
return | string | $new_str The new string entities decoded |
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. |