Свойство | Тип | Описание | |
---|---|---|---|
$_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. |
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. |
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. |
public removeQuotes ( string $str ) : string | ||
$str | string | The original string |
Результат | 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 |
Результат | 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 |
Результат | string | $regex A regular expression string to be used in, say, preg_match. |