eZPublishCommunityProject(LegacyStack)  2013.9
eZXMLInputParser Class Reference
+ Inheritance diagram for eZXMLInputParser:

Public Member Functions

 callInputHandler ($handlerName, $tagName, &$attributes)
 
 callOutputHandler ($handlerName, $element, &$params)
 
 convertNumericEntities ($text)
 
 createAndPublishElement ($elementName, &$ret)
 
 createRootNode ()
 
 entitiesDecode ($text)
 
 eZXMLInputParser ($validateErrorLevel=self::ERROR_NONE, $detectErrorLevel=self::ERROR_NONE, $parseLineBreaks=false, $removeDefaultAttrs=false)
 
 fixSubtree ($element, $mainChild)
 
 getMessages ()
 
 handleError ($type, $message)
 
 isValid ()
 
 parseAttributes ($attributeString)
 
 parseTag (&$data, &$pos, &$parent)
 
 performPass1 (&$data)
 
 performPass2 ()
 
 process ($text, $createRootNode=true)
 
 processAttributesBySchema ($element)
 
 processBySchemaPresence ($element)
 
 processBySchemaTree ($element)
 
 processNewElements ($createdElements)
 
 processSubtree ($element, &$lastHandlerResult)
 
 removeAllAttributes (DOMElement $element)
 
 setAttributes ($element, $attributes)
 
 setDOMDocumentClass ($DOMDocumentClass)
 
 setParseLineBreaks ($value)
 
 setRemoveDefaultAttrs ($value)
 
 washText ($textContent)
 

Public Attributes

 $AllowMultipleSpaces = false
 
 $AllowNumericEntities = false
 
 $DetectErrorLevel
 
 $Document = null
 
 $DOMDocumentClass = 'DOMDocument'
 
 $eZPublishVersion
 
 $InputTags = array()
 
 $IsInputValid = true
 
 $Messages = array()
 
 $Namespaces
 
 $OutputTags = array()
 
 $ParentStack = array()
 
 $ParseLineBreaks = false
 
 $QuitProcess = false
 
 $RemoveDefaultAttrs = false
 
 $StrictHeaders = false
 
 $TrimSpaces = true
 
 $ValidateErrorLevel
 
 $XMLSchema
 
const ERROR_ALL = 28
 
const ERROR_DATA = 16
 
const ERROR_NONE = 0
 Use these constants for error types. More...
 
const ERROR_SCHEMA = 8
 
const ERROR_SYNTAX = 4
 
const SHOW_ALL_ERRORS = 2
 
const SHOW_NO_ERRORS = 0
 
const SHOW_SCHEMA_ERRORS = 1
 

Protected Member Functions

 wordMatchSupport ($newTagName, $attributes, $attributeString)
 

Member Function Documentation

eZXMLInputParser::callInputHandler (   $handlerName,
  $tagName,
$attributes 
)

Referenced by parseTag().

eZXMLInputParser::callOutputHandler (   $handlerName,
  $element,
$params 
)
eZXMLInputParser::convertNumericEntities (   $text)

Referenced by washText().

eZXMLInputParser::createAndPublishElement (   $elementName,
$ret 
)
eZXMLInputParser::createRootNode ( )

Referenced by process().

eZXMLInputParser::entitiesDecode (   $text)

Referenced by washText().

eZXMLInputParser::eZXMLInputParser (   $validateErrorLevel = self::ERROR_NONE,
  $detectErrorLevel = self::ERROR_NONE,
  $parseLineBreaks = false,
  $removeDefaultAttrs = false 
)

The constructor.

Parameters
$validate
$validateErrorLevelDetermines types of errors that break input processing It's possible to combine any error types, by creating a bitmask of EZ_XMLINPUTPARSER_ERROR_* constants. true value means that all errors defined by $detectErrorLevel parameter will break further processing
$detectErrorLevelDetermines types of errors that will be detected and added to error log ($Messages).

Referenced by eZSimplifiedXMLInputParser\eZSimplifiedXMLInputParser().

eZXMLInputParser::fixSubtree (   $element,
  $mainChild 
)

Referenced by processBySchemaTree().

eZXMLInputParser::getMessages ( )
eZXMLInputParser::isValid ( )
eZXMLInputParser::parseAttributes (   $attributeString)

Referenced by parseTag().

eZXMLInputParser::parseTag ( $data,
$pos,
$parent 
)

Referenced by performPass1().

eZXMLInputParser::performPass1 ( $data)

Referenced by process().

eZXMLInputParser::performPass2 ( )

Pass 2: Process the tree, run handlers, rebuild and validate.

Referenced by process().

eZXMLInputParser::process (   $text,
  $createRootNode = true 
)

Call this function to process your input

eZXMLInputParser::processAttributesBySchema (   $element)
eZXMLInputParser::processBySchemaPresence (   $element)
eZXMLInputParser::processBySchemaTree (   $element)
eZXMLInputParser::processNewElements (   $createdElements)

Referenced by processSubtree().

eZXMLInputParser::processSubtree (   $element,
$lastHandlerResult 
)

Referenced by performPass2().

eZXMLInputParser::removeAllAttributes ( DOMElement  $element)

Removes all attribute nodes from element node $element

Referenced by processNewElements(), and processSubtree().

eZXMLInputParser::setAttributes (   $element,
  $attributes 
)

Referenced by parseTag().

eZXMLInputParser::setDOMDocumentClass (   $DOMDocumentClass)
eZXMLInputParser::setParseLineBreaks (   $value)
eZXMLInputParser::setRemoveDefaultAttrs (   $value)
eZXMLInputParser::washText (   $textContent)

Referenced by parseTag().

eZXMLInputParser::wordMatchSupport (   $newTagName,
  $attributes,
  $attributeString 
)
protected

Returns modified attributes parameter

Referenced by parseTag().

Member Data Documentation

eZXMLInputParser::$AllowMultipleSpaces = false
eZXMLInputParser::$AllowNumericEntities = false
eZXMLInputParser::$DetectErrorLevel
eZXMLInputParser::$Document = null

Referenced by createRootNode(), and process().

eZXMLInputParser::$DOMDocumentClass = 'DOMDocument'

Referenced by setDOMDocumentClass().

eZXMLInputParser::$eZPublishVersion
eZXMLInputParser::$InputTags = array()
eZXMLInputParser::$IsInputValid = true

Referenced by isValid().

eZXMLInputParser::$Messages = array()

Referenced by getMessages().

eZXMLInputParser::$Namespaces
Initial value:
= array( 'image' => 'http://ez.no/namespaces/ezpublish3/image/',
'xhtml' => 'http://ez.no/namespaces/ezpublish3/xhtml/',
'custom' => 'http://ez.no/namespaces/ezpublish3/custom/',
'tmp' => 'http://ez.no/namespaces/ezpublish3/temporary/' )
eZXMLInputParser::$OutputTags = array()
eZXMLInputParser::$ParentStack = array()
eZXMLInputParser::$ParseLineBreaks = false
eZXMLInputParser::$QuitProcess = false
eZXMLInputParser::$RemoveDefaultAttrs = false
eZXMLInputParser::$StrictHeaders = false
eZXMLInputParser::$TrimSpaces = true
eZXMLInputParser::$ValidateErrorLevel
eZXMLInputParser::$XMLSchema
const eZXMLInputParser::ERROR_ALL = 28
const eZXMLInputParser::ERROR_NONE = 0

Use these constants for error types.

const eZXMLInputParser::ERROR_SCHEMA = 8
const eZXMLInputParser::ERROR_SYNTAX = 4
const eZXMLInputParser::SHOW_ALL_ERRORS = 2
const eZXMLInputParser::SHOW_NO_ERRORS = 0
Deprecated:
(back-compatibility)
const eZXMLInputParser::SHOW_SCHEMA_ERRORS = 1

The documentation for this class was generated from the following file: