프로퍼티 | 타입 | 설명 | |
---|---|---|---|
$AllowMultipleSpaces | |||
$AllowNumericEntities | |||
$DOMDocumentClass | |||
$DetectErrorLevel | |||
$Document | |||
$InputTags | Each array element describes a tag that comes from the input. Arrays index is a tag's name. Each element is an array that may contain the following members: 'name' - a string representing a new name of the tag, 'nameHandler' - a name of the function that returns new tag name. Function format: function tagNameHandler( $tagName, &$attributes ) If no of those elements are defined the original tag's name is used. 'noChildren' - boolean value that determines if this tag could have child tags, default value is false. Example: public $InputTags = array( 'original-name' => array( 'name' => 'new-name' ), 'original-name2' => array( 'nameHandler' => 'tagNameHandler', 'noChildren' => true ), ... ); | ||
$IsInputValid | |||
$Messages | |||
$Namespaces | |||
$OutputTags | Each array element describes a tag presented in the output. Arrays index is a tag's name. Each element is an array that may contain the following members: 'parsingHandler' - "Parsing handler" called at parse pass 1 before processing tag's children. 'initHandler' - "Init handler" called at pass 2 before proccessing tag's children. 'structHandler' - "Structure handler" called at pass 2 after proccessing tag's children, but before schema validity check. It can be used to implement structure transformations. 'publishHandler' - "Publish handler" called at pass 2 after schema validity check, so it is called in case the element has it's guaranteed place in the DOM tree. 'attributes' - an array that describes attributes transformations. Array's index is the original name of an attribute, and the value is the new name. 'requiredInputAttributes' - attributes that are required in the input tag. If they are not presented it raises invalid input flag. Example: public $OutputTags = array( 'custom' => array( 'parsingHandler' => 'parsingHandlerCustom', 'initHandler' => 'initHandlerCustom', 'structHandler' => 'structHandlerCustom', 'publishHandler' => 'publishHandlerCustom', 'attributes' => array( 'title' => 'name' ) ), ... ); | ||
$ParentStack | |||
$ParseLineBreaks | options that depend on parameters passed | ||
$QuitProcess | |||
$RemoveDefaultAttrs | |||
$StrictHeaders | |||
$TrimSpaces | options that depend on settings | ||
$ValidateErrorLevel | |||
$XMLSchema | |||
$eZPublishVersion |
메소드 | 설명 | |
---|---|---|
callInputHandler ( $handlerName, $tagName, &$attributes ) | ||
callOutputHandler ( $handlerName, $element, &$params ) | ||
convertNumericEntities ( $text ) | ||
createAndPublishElement ( $elementName, &$ret ) | and call 'structure' and 'publish' handlers) | |
createRootNode ( ) | \public | |
eZXMLInputParser ( $validateErrorLevel = self::ERROR_NONE, $detectErrorLevel = self::ERROR_NONE, $parseLineBreaks = false, $removeDefaultAttrs = false ) | *! | |
entitiesDecode ( $text ) | ||
fixSubtree ( $element, $mainChild ) | Remove only nodes that don't match schema (recursively) | |
getMessages ( ) | \public | |
handleError ( $type, $message ) | ||
isValid ( ) | \public | |
parseAttributes ( $attributeString ) | ||
parseTag ( &$data, &$pos, &$parent ) | The main recursive function for pass 1 | |
performPass1 ( &$data ) | * \public Pass 1: Parsing the source HTML string. | |
performPass2 ( ) | *! \public Pass 2: Process the tree, run handlers, rebuild and validate. | |
process ( $text, $createRootNode = true ) | *! \public Call this function to process your input | |
processAttributesBySchema ( $element ) | ||
processBySchemaPresence ( $element ) | Check if the element is allowed to exist in this document and remove it if not. | |
processBySchemaTree ( $element ) | Check that element has a correct position in the tree and fix it if not. | |
processNewElements ( $createdElements ) | ||
processSubtree ( $element, &$lastHandlerResult ) | main recursive function for pass 2 | |
removeAllAttributes ( DOMElement $element ) | *! Removes all attribute nodes from element node $element | |
setAttributes ( $element, $attributes ) | ||
setDOMDocumentClass ( $DOMDocumentClass ) | \public | |
setParseLineBreaks ( $value ) | \public | |
setRemoveDefaultAttrs ( $value ) | \public | |
washText ( $textContent ) |
메소드 | 설명 | |
---|---|---|
wordMatchSupport ( $newTagName, $attributes, $attributeString ) | *! Returns modified attributes parameter |
메소드 | 설명 | |
---|---|---|
findEndOpeningTagPosition ( string $data, integer $tagBeginPos, integer $offset ) : integer | false | Finds the postion of the > character which marks the end of the opening tag that starts at $tagBeginPos in $data. | |
isValidXmlTag ( string $code ) : boolean | Checks whether $code can be considered as a valid XML excerpt. If not, it's probably because we found a '>' in the middle of an attribute. |
public createAndPublishElement ( $elementName, &$ret ) |
public eZXMLInputParser ( $validateErrorLevel = self::ERROR_NONE, $detectErrorLevel = self::ERROR_NONE, $parseLineBreaks = false, $removeDefaultAttrs = false ) |
public fixSubtree ( $element, $mainChild ) |
public parseTag ( &$data, &$pos, &$parent ) |
public performPass1 ( &$data ) |
public performPass2 ( ) |
public process ( $text, $createRootNode = true ) |
public processBySchemaPresence ( $element ) |
public processBySchemaTree ( $element ) |
public processSubtree ( $element, &$lastHandlerResult ) |
public removeAllAttributes ( DOMElement $element ) | ||
$element | DOMElement |
protected wordMatchSupport ( $newTagName, $attributes, $attributeString ) |
public $InputTags |
public $OutputTags |