|
ILIAS
release_5-1 Revision 5.0.0-5477-g43f3e3fab5f
|
This module implements a VERY limited parser that finds <link> tags in the head of HTML or XHTML documents and parses out their attributes according to the OpenID spec. More...
Collaboration diagram for Auth_OpenID_Parse:Public Member Functions | |
| Auth_OpenID_Parse () | |
| tagMatcher ($tag_name, $close_tags=null) | |
| Returns a regular expression that will match a given tag in an SGML string. More... | |
| openTag ($tag_name) | |
| closeTag ($tag_name) | |
| htmlBegin ($s) | |
| htmlEnd ($s) | |
| headFind () | |
| replaceEntities ($str) | |
| removeQuotes ($str) | |
| match ($regexp, $text, &$match) | |
| parseLinkAttrs ($html) | |
| Find all link tags in a string representing a HTML document and return a list of their attributes. More... | |
| relMatches ($rel_attr, $target_rel) | |
| linkHasRel ($link_attrs, $target_rel) | |
| findLinksRel ($link_attrs_list, $target_rel) | |
| findFirstHref ($link_attrs_list, $target_rel) | |
Data Fields | |
| $_re_flags = "si" | |
| Specify some flags for use with regex matching. More... | |
| $_removed_re | |
| Stuff to remove before we start looking for tags. More... | |
| $_tag_expr = "<%s\b(?!:)([^>]*?)(?:\/>|>(.*)(?:<\/?%s\s*>|\Z))" | |
| Starts with the tag name at a word boundary, where the tag name is not a namespace. More... | |
| $_attr_find = '\b(\w+)=("[^"]*"|\'[^\']*\'|[^\'"\s\/<>]+)' | |
| $_open_tag_expr = "<%s\b" | |
| $_close_tag_expr = "<((\/%s\b)|(%s[^>\/]*\/))>" | |
This module implements a VERY limited parser that finds <link> tags in the head of HTML or XHTML documents and parses out their attributes according to the OpenID spec.
It is a liberal parser, but it requires these things from the data in order to work:
From http://openid.net/specs.bml:
The parser ignores SGML comments and blocks. Both kinds of quoting are allowed for attributes.
The parser deals with invalid markup in these ways:
PHP versions 4 and 5
LICENSE: See the COPYING file included in this distribution.
@access private @package OpenID
| Auth_OpenID_Parse::Auth_OpenID_Parse | ( | ) |
Definition at line 111 of file Parse.php.
| Auth_OpenID_Parse::closeTag | ( | $tag_name | ) |
| Auth_OpenID_Parse::findFirstHref | ( | $link_attrs_list, | |
| $target_rel | |||
| ) |
Definition at line 344 of file Parse.php.
References Auth_OpenID\arrayGet(), and findLinksRel().
Here is the call graph for this function:| Auth_OpenID_Parse::findLinksRel | ( | $link_attrs_list, | |
| $target_rel | |||
| ) |
Definition at line 329 of file Parse.php.
References $result, and linkHasRel().
Referenced by findFirstHref().
Here is the call graph for this function:
Here is the caller graph for this function:| Auth_OpenID_Parse::headFind | ( | ) |
Definition at line 191 of file Parse.php.
References tagMatcher().
Referenced by parseLinkAttrs().
Here is the call graph for this function:
Here is the caller graph for this function:| Auth_OpenID_Parse::htmlBegin | ( | $s | ) |
Definition at line 167 of file Parse.php.
References $result, and openTag().
Referenced by parseLinkAttrs().
Here is the call graph for this function:
Here is the caller graph for this function:| Auth_OpenID_Parse::htmlEnd | ( | $s | ) |
Definition at line 179 of file Parse.php.
References $result, and closeTag().
Referenced by parseLinkAttrs().
Here is the call graph for this function:
Here is the caller graph for this function:| Auth_OpenID_Parse::linkHasRel | ( | $link_attrs, | |
| $target_rel | |||
| ) |
Definition at line 320 of file Parse.php.
References relMatches().
Referenced by findLinksRel().
Here is the call graph for this function:
Here is the caller graph for this function:| Auth_OpenID_Parse::match | ( | $regexp, | |
| $text, | |||
| & | $match | ||
| ) |
Definition at line 219 of file Parse.php.
References $text.
Referenced by parseLinkAttrs().
Here is the caller graph for this function:| Auth_OpenID_Parse::openTag | ( | $tag_name | ) |
Definition at line 155 of file Parse.php.
Referenced by htmlBegin().
Here is the caller graph for this function:| Auth_OpenID_Parse::parseLinkAttrs | ( | $html | ) |
Find all link tags in a string representing a HTML document and return a list of their attributes.
| string | $html | The text to parse |
Definition at line 247 of file Parse.php.
References $html, headFind(), htmlBegin(), htmlEnd(), match(), removeQuotes(), and replaceEntities().
Here is the call graph for this function:| Auth_OpenID_Parse::relMatches | ( | $rel_attr, | |
| $target_rel | |||
| ) |
Definition at line 305 of file Parse.php.
Referenced by linkHasRel().
Here is the caller graph for this function:| Auth_OpenID_Parse::removeQuotes | ( | $str | ) |
Definition at line 204 of file Parse.php.
Referenced by parseLinkAttrs().
Here is the caller graph for this function:| Auth_OpenID_Parse::replaceEntities | ( | $str | ) |
Definition at line 196 of file Parse.php.
Referenced by parseLinkAttrs().
Here is the caller graph for this function:| Auth_OpenID_Parse::tagMatcher | ( | $tag_name, | |
$close_tags = null |
|||
| ) |
Returns a regular expression that will match a given tag in an SGML string.
Definition at line 140 of file Parse.php.
References $_tag_expr, and $options.
Referenced by headFind().
Here is the caller graph for this function:| Auth_OpenID_Parse::$_attr_find = '\b(\w+)=("[^"]*"|\'[^\']*\'|[^\'"\s\/<>]+)' |
| Auth_OpenID_Parse::$_close_tag_expr = "<((\/%s\b)|(%s[^>\/]*\/))>" |
| Auth_OpenID_Parse::$_re_flags = "si" |
| Auth_OpenID_Parse::$_removed_re |
| Auth_OpenID_Parse::$_tag_expr = "<%s\b(?!:)([^>]*?)(?:\/>|>(.*)(?:<\/?%s\s*>|\Z))" |
Starts with the tag name at a word boundary, where the tag name is not a namespace.
Definition at line 104 of file Parse.php.
Referenced by tagMatcher().