XmlMapParser
    
            
            in package
            
        
    
            
            implements
                            jISimpleCompiler                    
    
    
        
            Compiler for the url engine. It can parse urls.xml files.
Interfaces, Classes and Traits
- jISimpleCompiler
 - interface for compiler which needs only one source file.
 
Table of Contents
- ESCAPE_LANG = 4
 - ESCAPE_LOCALE = 8
 - ESCAPE_NON_ASCII = 2
 - ESCAPE_SLASH = 1
 - ESCAPE_URLENCODE = 0
 - $createUrlContent : mixed
 - $createUrlContentInc : mixed
 - $createUrlInfos : mixed
 - $createUrlInfosDedicatedModules : mixed
 - $defaultEntrypointsByType : array<string|int, UrlMapData>
 - contain the UrlMapData object corresponding of the default entrypoint of each type.
 - $entrypoints : mixed
 - first element is UrlMapData second element is a parseInfos array.
 - $entryPointTypeHavingActionInBody : mixed
 - $epHasDefaultUrl : mixed
 - $modulesDedicatedToDefaultEp : array<string|int, mixed>
 - contains, for each entrypoint type, the list of modules that don't appear in any url definitions of any entrypoint of the same type theses modules will then be attached to the default entrypoint of the corresponding entrypoint type.
 - $modulesPath : mixed
 - list all modules path.
 - $parseInfos : mixed
 - $typeparam : mixed
 - $xmlfile : string
 - compile() : bool
 - parse the given file, and store the result in a cache file.
 - appendUrlInfo() : mixed
 - register the given url informations.
 - buildDynamicParamsRegexp() : string
 - build the regexp corresponding to dynamic parts of a pathinfo.
 - checkStaticPathInfo() : mixed
 - extractDynamicParams() : array<string|int, mixed>
 - extract all dynamic parts of a pathinfo, read <param> elements.
 - extractStaticParams() : mixed
 - getErrorMsg() : string
 - getFinalPathInfo() : string
 - returns the combination between $rootPathInfo and the pathinfo attribute of the given $url.
 - newDedicatedModule() : mixed
 - all actions of this module will be assigned to this entry point.
 - newHandler() : mixed
 - newWholeController() : mixed
 - all methods of a specific controller will be assigned to this entry point.
 - parseEntryPointElement() : mixed
 - extract informations from an <entrypoint> element.
 - parseUrlElement() : mixed
 - extract informations from an <url> element.
 - parseXml() : mixed
 - readInclude() : mixed
 - registerDedicatedModules() : mixed
 - register all modules dedicated to specific entrypoints into urls parser/generator data.
 - registerDefaultEntrypoints() : mixed
 - Verify that there is a default entrypoint for each entrypoint type and register these default entrypoints into url parser/generator data.
 
Constants
ESCAPE_LANG
    public
    mixed
    ESCAPE_LANG
    = 4
        
        
    
ESCAPE_LOCALE
    public
    mixed
    ESCAPE_LOCALE
    = 8
        
        
    
ESCAPE_NON_ASCII
    public
    mixed
    ESCAPE_NON_ASCII
    = 2
        
        
    
ESCAPE_SLASH
    public
    mixed
    ESCAPE_SLASH
    = 1
        
        
    
ESCAPE_URLENCODE
    public
    mixed
    ESCAPE_URLENCODE
    = 0
        
        
    
Properties
$createUrlContent
    protected
        mixed
    $createUrlContent
    
        
        
    
$createUrlContentInc
    protected
        mixed
    $createUrlContentInc
    
        
        
    
$createUrlInfos
    protected
        mixed
    $createUrlInfos
    
        
        
    
$createUrlInfosDedicatedModules
    protected
        mixed
    $createUrlInfosDedicatedModules
    
        
        
    
$defaultEntrypointsByType
contain the UrlMapData object corresponding of the default entrypoint of each type.
    protected
        array<string|int, UrlMapData>
    $defaultEntrypointsByType
     = array()
    
    
    
$entrypoints
first element is UrlMapData second element is a parseInfos array.
    protected
        mixed
    $entrypoints
     = array()
    
        
    
$entryPointTypeHavingActionInBody
    protected
        mixed
    $entryPointTypeHavingActionInBody
     = array('xmlrpc', 'jsonrpc', 'soap')
        
        
    
$epHasDefaultUrl
    protected
        mixed
    $epHasDefaultUrl
     = false
        
        
    
$modulesDedicatedToDefaultEp
contains, for each entrypoint type, the list of modules that don't appear in any url definitions of any entrypoint of the same type theses modules will then be attached to the default entrypoint of the corresponding entrypoint type.
    protected
        array<string|int, mixed>
    $modulesDedicatedToDefaultEp
    
    
        key = entrypoint type, value = list of modules
$modulesPath
list all modules path.
    protected
        mixed
    $modulesPath
     = array()
    
        
    
$parseInfos
    protected
        mixed
    $parseInfos
    
        
        
    
$typeparam
    protected
        mixed
    $typeparam
     = array('string' => '([^\/]+)', 'char' => '([^\/])', 'letter' => '(\w)', 'number' => '(\d+)', 'int' => '(\d+)', 'integer' => '(\d+)', 'digit' => '(\d)', 'date' => '([0-2]\d{3}\-(?:0[1-9]|1[0-2])\-(?:[0-2][1-9]|3[0-1]))', 'year' => '([0-2]\d{3})', 'month' => '(0[1-9]|1[0-2])', 'day' => '([0-2][1-9]|[1-2]0|3[0-1])', 'path' => '(.*)', 'locale' => '(\w{2,3}(?:(?:\-|_)\w{2,3})?)', 'lang' => '(\w{2,3})')
        
        
    
$xmlfile
    protected
        string
    $xmlfile
     = ''
    
    
    
Methods
compile()
parse the given file, and store the result in a cache file.
    public
                compile(SelectorUrlXmlMap $aSelector) : bool
    
        Parameters
- $aSelector : SelectorUrlXmlMap
 
Return values
bool —true if it is a success
appendUrlInfo()
register the given url informations.
    protected
                appendUrlInfo(UrlMapData $u, string $path, mixed $secondaryAction) : mixed
    
        Parameters
- $u : UrlMapData
 - $path : string
 - $secondaryAction : mixed
 
Return values
mixed —buildDynamicParamsRegexp()
build the regexp corresponding to dynamic parts of a pathinfo.
    protected
                buildDynamicParamsRegexp(SimpleXmlElement $url, mixed $pathinfo, UrlMapData $u) : string
    
        Parameters
- $url : SimpleXmlElement
 - 
                    
the url element
 - $pathinfo : mixed
 - $u : UrlMapData
 
Return values
string —the corresponding regular expression
checkStaticPathInfo()
    protected
                checkStaticPathInfo(SimpleXMLElement $url) : mixed
        
        Parameters
- $url : SimpleXMLElement
 
Return values
mixed —extractDynamicParams()
extract all dynamic parts of a pathinfo, read <param> elements.
    protected
                extractDynamicParams(SimpleXmlElement $url, UrlMapData $u, bool $optionalTrailingSlash[, string $rootPathInfo = '/' ]) : array<string|int, mixed>
    
        Parameters
- $url : SimpleXmlElement
 - 
                    
the url element
 - $u : UrlMapData
 - $optionalTrailingSlash : bool
 - $rootPathInfo : string = '/'
 - 
                    
the path info prefix
 
Return values
array<string|int, mixed> —first element is the final pathinfo second element is the correponding regular expression
extractStaticParams()
    protected
                extractStaticParams(SimpleXmlElement $url, UrlMapData $u) : mixed
    
        Parameters
- $url : SimpleXmlElement
 - 
                    
the url element
 - $u : UrlMapData
 
Return values
mixed —getErrorMsg()
    protected
                getErrorMsg(SimpleXMLElement $xml, string $message) : string
    
        Parameters
- $xml : SimpleXMLElement
 - $message : string
 
Return values
string —getFinalPathInfo()
returns the combination between $rootPathInfo and the pathinfo attribute of the given $url.
    protected
                getFinalPathInfo(SimpleXMLElement $url, mixed $rootPathInfo) : string
    
        Parameters
- $url : SimpleXMLElement
 - $rootPathInfo : mixed
 
Return values
string —full pathinfo, or "" if both are empty or "/"
newDedicatedModule()
all actions of this module will be assigned to this entry point.
    protected
                newDedicatedModule(UrlMapData $u, SimpleXMLElement $url) : mixed
    
        Parameters
- $u : UrlMapData
 - $url : SimpleXMLElement
 
Return values
mixed —newHandler()
    protected
                newHandler(UrlMapData $u, SimpleXmlElement $url[, mixed $rootPathInfo = '/' ]) : mixed
    
        Parameters
- $u : UrlMapData
 - $url : SimpleXmlElement
 - $rootPathInfo : mixed = '/'
 
Return values
mixed —newWholeController()
all methods of a specific controller will be assigned to this entry point.
    protected
                newWholeController(UrlMapData $u, SimpleXMLElement $url[, mixed $rootPathInfo = '' ]) : mixed
    
        Parameters
- $u : UrlMapData
 - $url : SimpleXMLElement
 - $rootPathInfo : mixed = ''
 
Return values
mixed —parseEntryPointElement()
extract informations from an <entrypoint> element.
    protected
                parseEntryPointElement(SimpleXMLElement $tag, mixed $type) : mixed
    
        Parameters
- $tag : SimpleXMLElement
 - $type : mixed
 
Tags
Return values
mixed —parseUrlElement()
extract informations from an <url> element.
    protected
                parseUrlElement(SimpleXMLElement $url, UrlMapData $u, bool $optionalTrailingSlash) : mixed
    
        Parameters
- $url : SimpleXMLElement
 - $u : UrlMapData
 - $optionalTrailingSlash : bool
 
Return values
mixed —parseXml()
    protected
                parseXml(SimpleXMLElement $xml) : mixed
    
        Parameters
- $xml : SimpleXMLElement
 
Tags
Return values
mixed —readInclude()
    protected
                readInclude(SimpleXmlElement $url, UrlMapData $uInfo, mixed $file) : mixed
    
        Parameters
- $url : SimpleXmlElement
 - $uInfo : UrlMapData
 - $file : mixed
 
Return values
mixed —registerDedicatedModules()
register all modules dedicated to specific entrypoints into urls parser/generator data.
    protected
                registerDedicatedModules() : mixed
    
    
    
        Return values
mixed —registerDefaultEntrypoints()
Verify that there is a default entrypoint for each entrypoint type and register these default entrypoints into url parser/generator data.
    protected
                registerDefaultEntrypoints() : mixed
    
    
    
        