Documentation TYPO3 par Ameos |
Public Member Functions | |
getSubpart ($content, $marker) | |
substituteSubpart ($content, $marker, $subpartContent, $recursive=1, $keepMarker=0) | |
splitIntoBlock ($tag, $content, $eliminateExtraEndTags=0) | |
splitIntoBlockRecursiveProc ($tag, $content, &$procObj, $callBackContent, $callBackTags, $level=0) | |
splitTags ($tag, $content) | |
getAllParts ($parts, $tag_parts=1, $include_tag=1) | |
removeFirstAndLastTag ($str) | |
getFirstTag ($str) | |
getFirstTagName ($str, $preserveCase=FALSE) | |
get_tag_attributes ($tag, $deHSC=0) | |
split_tag_attributes ($tag) | |
checkTagTypeCounts ($content, $blockTags='a, b, blockquote, body, div, em, font, form, h1, h2, h3, h4, h5, h6, i, li, map, ol, option, p, pre, select, span, strong, table, td, textarea, tr, u, ul', $soloTags='br, hr, img, input, area') | |
HTMLcleaner ($content, $tags=array(), $keepAll=0, $hSC=0, $addConfig=array()) | |
getSubpart ($content, $marker) | |
substituteSubpart ($content, $marker, $subpartContent, $recursive=1, $keepMarker=0) | |
splitIntoBlock ($tag, $content, $eliminateExtraEndTags=0) | |
splitIntoBlockRecursiveProc ($tag, $content, &$procObj, $callBackContent, $callBackTags, $level=0) | |
splitTags ($tag, $content) | |
getAllParts ($parts, $tag_parts=1, $include_tag=1) | |
removeFirstAndLastTag ($str) | |
getFirstTag ($str) | |
getFirstTagName ($str, $preserveCase=FALSE) | |
get_tag_attributes ($tag, $deHSC=0) | |
split_tag_attributes ($tag) | |
checkTagTypeCounts ($content, $blockTags='a, b, blockquote, body, div, em, font, form, h1, h2, h3, h4, h5, h6, i, li, map, ol, option, p, pre, select, span, strong, table, td, textarea, tr, u, ul', $soloTags='br, hr, img, input, area') | |
HTMLcleaner ($content, $tags=array(), $keepAll=0, $hSC=0, $addConfig=array()) | |
Public Attributes | |
$caseShift_cache = array() |
Definition at line 106 of file class.t3lib_parsehtml.php.
|
Checks whether block/solo tags are found in the correct amounts in HTML content Block tags are tags which are required to have an equal amount of start and end tags, eg. "<table>...</table>" Solo tags are tags which are required to have ONLY start tags (possibly with an XHTML ending like ".../>") NOTICE: Correct XHTML might actually fail since "<br></br>" is allowed as well as "<br/>". However only the LATTER is accepted by this function (with "br" in the "solo-tag" list), the first example will result in a warning. NOTICE: Correct XHTML might actually fail since "<p/>" is allowed as well as "<p></p>". However only the LATTER is accepted by this function (with "p" in the "block-tag" list), the first example will result in an ERROR! NOTICE: Correct HTML version "something" allows eg. and to be NON-ended (implicitly ended by other tags). However this is NOT accepted by this function (with "p" and "li" in the block-tag list) and it will result in an ERROR!
Definition at line 507 of file class.t3lib_parsehtml.php. |
|
Checks whether block/solo tags are found in the correct amounts in HTML content Block tags are tags which are required to have an equal amount of start and end tags, eg. "<table>...</table>" Solo tags are tags which are required to have ONLY start tags (possibly with an XHTML ending like ".../>") NOTICE: Correct XHTML might actually fail since "<br></br>" is allowed as well as "<br/>". However only the LATTER is accepted by this function (with "br" in the "solo-tag" list), the first example will result in a warning. NOTICE: Correct XHTML might actually fail since "<p/>" is allowed as well as "<p></p>". However only the LATTER is accepted by this function (with "p" in the "block-tag" list), the first example will result in an ERROR! NOTICE: Correct HTML version "something" allows eg. and to be NON-ended (implicitly ended by other tags). However this is NOT accepted by this function (with "p" and "li" in the block-tag list) and it will result in an ERROR!
Definition at line 507 of file class.t3lib_parsehtml.php. |
|
Returns an array with all attributes as keys. Attributes are only lowercase a-z If a attribute is empty (shorthand), then the value for the key is empty. You can check if it existed with isset()
Definition at line 422 of file class.t3lib_parsehtml.php. References t3lib_div::htmlspecialchars_decode(), and split_tag_attributes(). |
|
Returns an array with all attributes as keys. Attributes are only lowercase a-z If a attribute is empty (shorthand), then the value for the key is empty. You can check if it existed with isset()
Definition at line 422 of file class.t3lib_parsehtml.php. References t3lib_div::htmlspecialchars_decode(), and split_tag_attributes(). Referenced by HTMLcleaner(). |
|
Returns an array with either tag or non-tag content of the result from ->splitIntoBlock()/->splitTags()
Definition at line 354 of file class.t3lib_parsehtml.php. References removeFirstAndLastTag(). |
|
Returns an array with either tag or non-tag content of the result from ->splitIntoBlock()/->splitTags()
Definition at line 354 of file class.t3lib_parsehtml.php. References removeFirstAndLastTag(). |
|
Returns the first tag in $str Actually everything from the begining of the $str is returned, so you better make sure the tag is the first thing...
Definition at line 392 of file class.t3lib_parsehtml.php. |
|
Returns the first tag in $str Actually everything from the begining of the $str is returned, so you better make sure the tag is the first thing...
Definition at line 392 of file class.t3lib_parsehtml.php. Referenced by getFirstTagName(), and splitIntoBlockRecursiveProc(). |
|
Returns the NAME of the first tag in $str
Definition at line 407 of file class.t3lib_parsehtml.php. References getFirstTag(). |
|
Returns the NAME of the first tag in $str
Definition at line 407 of file class.t3lib_parsehtml.php. References getFirstTag(). Referenced by splitIntoBlockRecursiveProc(). |
|
Returns the first subpart encapsulated in the marker, $marker (possibly present in $content as a HTML comment)
Definition at line 123 of file class.t3lib_parsehtml.php. |
|
Returns the first subpart encapsulated in the marker, $marker (possibly present in $content as a HTML comment)
Definition at line 123 of file class.t3lib_parsehtml.php. |
|
Function that can clean up HTML content according to configuration given in the $tags array. Initializing the $tags array to allow a list of tags (in this case ,,<U> and ), set it like this: $tags = array_flip(explode(',','b,a,i,u')) If the value of the $tags[$tagname] entry is an array, advanced processing of the tags is initialized. These are the options: $tags[$tagname] = Array( 'overrideAttribs' => '' If set, this string is preset as the attributes of the tag 'allowedAttribs' => '0' (zero) = no attributes allowed, '[commalist of attributes]' = only allowed attributes. If blank, all attributes are allowed. 'fixAttrib' => Array( '[attribute name]' => Array ( 'set' => Force the attribute value to this value. 'unset' => Boolean: If set, the attribute is unset. 'default' => If no attribute exists by this name, this value is set as default value (if this value is not blank) 'always' => Boolean. If set, the attribute is always processed. Normally an attribute is processed only if it exists 'trim,intval,lower,upper' => All booleans. If any of these keys are set, the value is passed through the respective PHP-functions. 'range' => Array ('[low limit]','[high limit, optional]') Setting integer range. 'list' => Array ('[value1/default]','[value2]','[value3]') Attribute must be in this list. If not, the value is set to the first element. 'removeIfFalse' => Boolean/'blank'. If set, then the attribute is removed if it is 'false'. If this value is set to 'blank' then the value must be a blank string (that means a 'zero' value will not be removed) 'removeIfEquals' => [value] If the attribute value matches the value set here, then it is removed. 'casesensitiveComp' => 1 If set, then the removeIfEquals and list comparisons will be case sensitive. Otherwise not. ) ), 'protect' => '', Boolean. If set, the tag <> is converted to < and > 'remap' => '', String. If set, the tagname is remapped to this tagname 'rmTagIfNoAttrib' => '', Boolean. If set, then the tag is removed if no attributes happend to be there. 'nesting' => '', Boolean/'global'. If set true, then this tag must have starting and ending tags in the correct order. Any tags not in this order will be discarded. Thus '' will be converted to ''. Is the value 'global' then true nesting in relation to other tags marked for 'global' nesting control is preserved. This means that if and are set for global nesting then this string '' is converted to '' )
What it does NOT do (yet) according to XHTML specs.:
Definition at line 600 of file class.t3lib_parsehtml.php. References t3lib_div::callUserFunction(), get_tag_attributes(), t3lib_div::getIndpEnv(), t3lib_div::intInRange(), t3lib_div::isFirstPartOfStr(), and t3lib_div::trimExplode(). |
|
Function that can clean up HTML content according to configuration given in the $tags array. Initializing the $tags array to allow a list of tags (in this case ,,<U> and ), set it like this: $tags = array_flip(explode(',','b,a,i,u')) If the value of the $tags[$tagname] entry is an array, advanced processing of the tags is initialized. These are the options: $tags[$tagname] = Array( 'overrideAttribs' => '' If set, this string is preset as the attributes of the tag 'allowedAttribs' => '0' (zero) = no attributes allowed, '[commalist of attributes]' = only allowed attributes. If blank, all attributes are allowed. 'fixAttrib' => Array( '[attribute name]' => Array ( 'set' => Force the attribute value to this value. 'unset' => Boolean: If set, the attribute is unset. 'default' => If no attribute exists by this name, this value is set as default value (if this value is not blank) 'always' => Boolean. If set, the attribute is always processed. Normally an attribute is processed only if it exists 'trim,intval,lower,upper' => All booleans. If any of these keys are set, the value is passed through the respective PHP-functions. 'range' => Array ('[low limit]','[high limit, optional]') Setting integer range. 'list' => Array ('[value1/default]','[value2]','[value3]') Attribute must be in this list. If not, the value is set to the first element. 'removeIfFalse' => Boolean/'blank'. If set, then the attribute is removed if it is 'false'. If this value is set to 'blank' then the value must be a blank string (that means a 'zero' value will not be removed) 'removeIfEquals' => [value] If the attribute value matches the value set here, then it is removed. 'casesensitiveComp' => 1 If set, then the removeIfEquals and list comparisons will be case sensitive. Otherwise not. ) ), 'protect' => '', Boolean. If set, the tag <> is converted to < and > 'remap' => '', String. If set, the tagname is remapped to this tagname 'rmTagIfNoAttrib' => '', Boolean. If set, then the tag is removed if no attributes happend to be there. 'nesting' => '', Boolean/'global'. If set true, then this tag must have starting and ending tags in the correct order. Any tags not in this order will be discarded. Thus '' will be converted to ''. Is the value 'global' then true nesting in relation to other tags marked for 'global' nesting control is preserved. This means that if and are set for global nesting then this string '' is converted to '' )
What it does NOT do (yet) according to XHTML specs.:
Definition at line 600 of file class.t3lib_parsehtml.php. References t3lib_div::callUserFunction(), get_tag_attributes(), t3lib_div::getIndpEnv(), t3lib_div::intInRange(), t3lib_div::isFirstPartOfStr(), and t3lib_div::trimExplode(). |
|
Removes the first and last tag in the string Anything before and after the first and last tags respectively is also removed
Definition at line 373 of file class.t3lib_parsehtml.php. |
|
Removes the first and last tag in the string Anything before and after the first and last tags respectively is also removed
Definition at line 373 of file class.t3lib_parsehtml.php. Referenced by getAllParts(), and splitIntoBlockRecursiveProc(). |
|
Returns an array with the 'components' from an attribute list. The result is normally analyzed by get_tag_attributes Removes tag-name if found
Definition at line 464 of file class.t3lib_parsehtml.php. |
|
Returns an array with the 'components' from an attribute list. The result is normally analyzed by get_tag_attributes Removes tag-name if found
Definition at line 464 of file class.t3lib_parsehtml.php. Referenced by get_tag_attributes(). |
|
Returns an array with the $content divided by tag-blocks specified with the list of tags, $tag Even numbers in the array are outside the blocks, Odd numbers are block-content. Use ->getAllParts() and ->removeFirstAndLastTag() to process the content if needed.
Definition at line 223 of file class.t3lib_parsehtml.php. References t3lib_div::trimExplode(). |
|
Returns an array with the $content divided by tag-blocks specified with the list of tags, $tag Even numbers in the array are outside the blocks, Odd numbers are block-content. Use ->getAllParts() and ->removeFirstAndLastTag() to process the content if needed.
Definition at line 223 of file class.t3lib_parsehtml.php. References t3lib_div::trimExplode(). Referenced by splitIntoBlockRecursiveProc(). |
|
Splitting content into blocks *recursively* and processing tags/content with call back functions.
Definition at line 284 of file class.t3lib_parsehtml.php. References getFirstTag(), getFirstTagName(), removeFirstAndLastTag(), splitIntoBlock(), and splitIntoBlockRecursiveProc(). |
|
Splitting content into blocks *recursively* and processing tags/content with call back functions.
Definition at line 284 of file class.t3lib_parsehtml.php. References getFirstTag(), getFirstTagName(), removeFirstAndLastTag(), and splitIntoBlock(). Referenced by splitIntoBlockRecursiveProc(). |
|
Returns an array with the $content divided by tag-blocks specified with the list of tags, $tag Even numbers in the array are outside the blocks, Odd numbers are block-content. Use ->getAllParts() and ->removeFirstAndLastTag() to process the content if needed.
Definition at line 320 of file class.t3lib_parsehtml.php. References t3lib_div::trimExplode(). |
|
Returns an array with the $content divided by tag-blocks specified with the list of tags, $tag Even numbers in the array are outside the blocks, Odd numbers are block-content. Use ->getAllParts() and ->removeFirstAndLastTag() to process the content if needed.
Definition at line 320 of file class.t3lib_parsehtml.php. References t3lib_div::trimExplode(). |
|
Substitutes a subpart in $content with the content of $subpartContent.
Definition at line 151 of file class.t3lib_parsehtml.php. |
|
Substitutes a subpart in $content with the content of $subpartContent.
Definition at line 151 of file class.t3lib_parsehtml.php. |