[ Index ]

PHP Cross Reference of Joomla 1.5.26 DE

title

Body

[close]

/libraries/openid/Auth/Yadis/ -> ParseHTML.php (summary)

This is the HTML pseudo-parser for the Yadis library. PHP versions 4 and 5

Author: JanRain, Inc. <openid@janrain.com>
Copyright: 2005-2008 Janrain, Inc.
License: http://www.apache.org/licenses/LICENSE-2.0 Apache
File Size: 262 lines (9 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

Auth_Yadis_ParseHTML:: (6 methods):
  Auth_Yadis_ParseHTML()
  replaceEntities()
  removeQuotes()
  tagPattern()
  getMetaTags()
  getHTTPEquiv()


Class: Auth_Yadis_ParseHTML  - X-Ref

This class is responsible for scanning an HTML string to find META
tags and their attributes.  This is used by the Yadis discovery
process.  This class must be instantiated to be used.

Auth_Yadis_ParseHTML()   X-Ref


replaceEntities($str)   X-Ref
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.

param: string $str The string in which to look for entities
return: string $new_str The new string entities decoded

removeQuotes($str)   X-Ref
Strip single and double quotes off of a string, if they are
present.

param: string $str The original string
return: string $new_str The new string with leading and

tagPattern($tag_names, $close, $self_close)   X-Ref
Create a regular expression that will match an opening
or closing tag from a set of names.

param: mixed $tag_names Tag names to match
param: mixed $close false/0 = no, true/1 = yes, other = maybe
param: mixed $self_close false/0 = no, true/1 = yes, other = maybe
return: string $regex A regular expression string to be used

getMetaTags($html_string)   X-Ref
Given an HTML document string, this finds all the META tags in
the document, provided they are found in the
<HTML><HEAD>...</HEAD> section of the document.  The <HTML> tag
may be missing.

param: string $html_string An HTMl document string
return: array $tag_list Array of tags; each tag is an array of

getHTTPEquiv($html_string)   X-Ref
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.

param: string $html_string An HTML document in string format
return: mixed $content The "content" attribute value of the



Generated: Wed Mar 28 15:54:07 2012 Cross-referenced by PHPXref 0.7.1