TYPO3 CMS  TYPO3_6-2
Auth_OpenID_Parse Class Reference

Public Member Functions

 Auth_OpenID_Parse ()
 
 tagMatcher ($tag_name, $close_tags=null)
 
 openTag ($tag_name)
 
 closeTag ($tag_name)
 
 htmlBegin ($s)
 
 htmlEnd ($s)
 
 headFind ()
 
 replaceEntities ($str)
 
 removeQuotes ($str)
 
 match ($regexp, $text, &$match)
 
 parseLinkAttrs ($html)
 
 relMatches ($rel_attr, $target_rel)
 
 linkHasRel ($link_attrs, $target_rel)
 
 findLinksRel ($link_attrs_list, $target_rel)
 
 findFirstHref ($link_attrs_list, $target_rel)
 

Public Attributes

 $_re_flags = "si"
 
 $_removed_re
 
 $_tag_expr = "<%s\b(?!:)([^>]*?)(?:\/>|>(.*)(?:<\/?%s\s*>|\Z))"
 
 $_attr_find = '\b(\w+)=("[^"]*"|\'[^\']*\'|[^\'"\s\/<>]+)'
 
 $_open_tag_expr = "<%s\b"
 
 $_close_tag_expr = "<((\/%s\b)|(%s[^>\/]*\/))>"
 

Detailed Description

Require Auth_OpenID::arrayGet().

Definition at line 87 of file Parse.php.

Member Function Documentation

◆ Auth_OpenID_Parse()

Auth_OpenID_Parse::Auth_OpenID_Parse ( )

Definition at line 111 of file Parse.php.

Referenced by Auth_OpenID_legacy_discover().

◆ closeTag()

Auth_OpenID_Parse::closeTag (   $tag_name)

Definition at line 161 of file Parse.php.

Referenced by htmlEnd().

◆ findFirstHref()

Auth_OpenID_Parse::findFirstHref (   $link_attrs_list,
  $target_rel 
)

Definition at line 348 of file Parse.php.

References Auth_OpenID\arrayGet(), and findLinksRel().

◆ findLinksRel()

Auth_OpenID_Parse::findLinksRel (   $link_attrs_list,
  $target_rel 
)

Definition at line 333 of file Parse.php.

References $result, and linkHasRel().

Referenced by findFirstHref().

◆ headFind()

Auth_OpenID_Parse::headFind ( )

Definition at line 191 of file Parse.php.

References tagMatcher().

Referenced by parseLinkAttrs().

◆ htmlBegin()

Auth_OpenID_Parse::htmlBegin (   $s)

Definition at line 167 of file Parse.php.

References $result, and openTag().

Referenced by parseLinkAttrs().

◆ htmlEnd()

Auth_OpenID_Parse::htmlEnd (   $s)

Definition at line 179 of file Parse.php.

References $result, and closeTag().

Referenced by parseLinkAttrs().

◆ linkHasRel()

Auth_OpenID_Parse::linkHasRel (   $link_attrs,
  $target_rel 
)

Definition at line 324 of file Parse.php.

References relMatches().

Referenced by findLinksRel().

◆ match()

Auth_OpenID_Parse::match (   $regexp,
  $text,
$match 
)

Definition at line 219 of file Parse.php.

References $regexp.

Referenced by parseLinkAttrs().

◆ openTag()

Auth_OpenID_Parse::openTag (   $tag_name)

Definition at line 155 of file Parse.php.

Referenced by htmlBegin().

◆ parseLinkAttrs()

Auth_OpenID_Parse::parseLinkAttrs (   $html)

Find all link tags in a string representing a HTML document and return a list of their attributes.

Todo:
This is quite ineffective and may fail with the default pcre.backtrack_limit of 100000 in PHP 5.2, if $html is big. It should rather use stripos (in PHP5) or strpos()+strtoupper() in PHP4 to manage this.
Parameters
string$htmlThe text to parse
Returns
array $list An array of arrays of attributes, one for each link tag

Definition at line 251 of file Parse.php.

References headFind(), htmlBegin(), htmlEnd(), match(), removeQuotes(), and replaceEntities().

◆ relMatches()

Auth_OpenID_Parse::relMatches (   $rel_attr,
  $target_rel 
)

Definition at line 309 of file Parse.php.

Referenced by linkHasRel().

◆ removeQuotes()

Auth_OpenID_Parse::removeQuotes (   $str)

Definition at line 204 of file Parse.php.

Referenced by parseLinkAttrs().

◆ replaceEntities()

Auth_OpenID_Parse::replaceEntities (   $str)

Definition at line 196 of file Parse.php.

Referenced by parseLinkAttrs().

◆ tagMatcher()

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.

Referenced by headFind().

Member Data Documentation

◆ $_attr_find

Auth_OpenID_Parse::$_attr_find = '\b(\w+)=("[^"]*"|\'[^\']*\'|[^\'"\s\/<>]+)'

Definition at line 106 of file Parse.php.

◆ $_close_tag_expr

Auth_OpenID_Parse::$_close_tag_expr = "<((\/%s\b)|(%s[^>\/]*\/))>"

Definition at line 109 of file Parse.php.

◆ $_open_tag_expr

Auth_OpenID_Parse::$_open_tag_expr = "<%s\b"

Definition at line 108 of file Parse.php.

◆ $_re_flags

Auth_OpenID_Parse::$_re_flags = "si"

Specify some flags for use with regex matching.

Definition at line 92 of file Parse.php.

◆ $_removed_re

Auth_OpenID_Parse::$_removed_re
Initial value:
=
"<!--.*?-->|<!\[CDATA\[.*?\]\]>|<script\b(?!:)[^>]*>.*?<\/script>"

Stuff to remove before we start looking for tags

Definition at line 97 of file Parse.php.

◆ $_tag_expr

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().