jSignificantUrlsCompiler
in package
implements
jISimpleCompiler
Compiler for significant url engine
Tags
Interfaces, Classes and Traits
- jISimpleCompiler
- interface for compiler which needs only one source file.
Table of Contents
- $checkHttps : mixed
- $createUrlContent : mixed
- $createUrlContentInc : mixed
- $createUrlInfos : mixed
- $defaultUrl : mixed
- $entryPoints : mixed
- list all entry points and their config
- $modulesPath : mixed
- list all modules path
- $parseInfos : mixed
- $requestType : mixed
- $typeparam : mixed
- compile() : bool
- parse the given file, and store the result in a cache file
- appendUrlInfo() : mixed
- register the given url informations
- extractDynamicParams() : string
- extract all dynamic parts of a pathinfo, and read <param> elements
- getEntryPointConfig() : mixed
- newHandler() : mixed
- readInclude() : mixed
- readProjectXml() : mixed
- retrieveModulePaths() : mixed
- since urls.xml declare all entrypoints, current entry point does not have access to all modules, so doesn't know all their paths.
Properties
$checkHttps
protected
mixed
$checkHttps
= rue
$createUrlContent
protected
mixed
$createUrlContent
$createUrlContentInc
protected
mixed
$createUrlContentInc
$createUrlInfos
protected
mixed
$createUrlInfos
$defaultUrl
protected
mixed
$defaultUrl
$entryPoints
list all entry points and their config
protected
mixed
$entryPoints
= array()
$modulesPath
list all modules path
protected
mixed
$modulesPath
= array()
$parseInfos
protected
mixed
$parseInfos
$requestType
protected
mixed
$requestType
$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})')
Methods
compile()
parse the given file, and store the result in a cache file
public
compile(mixed $aSelector) : bool
Parameters
- $aSelector : mixed
-
the file selector
Return values
bool —true : process ok
appendUrlInfo()
register the given url informations
protected
appendUrlInfo(significantUrlInfoParsing $u, string $path, mixed $secondaryAction) : mixed
Parameters
- $u : significantUrlInfoParsing
- $path : string
- $secondaryAction : mixed
Return values
mixed —extractDynamicParams()
extract all dynamic parts of a pathinfo, and read <param> elements
protected
extractDynamicParams(simpleXmlElement $url, mixed $pathinfo, significantUrlInfoParsing $u) : string
Parameters
- $url : simpleXmlElement
-
the url element
- $pathinfo : mixed
- $u : significantUrlInfoParsing
Return values
string —the correponding regular expression
getEntryPointConfig()
protected
getEntryPointConfig(mixed $entrypoint) : mixed
Parameters
- $entrypoint : mixed
Return values
mixed —newHandler()
protected
newHandler(significantUrlInfoParsing $u, simpleXmlElement $url[, mixed $pathinfo = '' ]) : mixed
Parameters
- $u : significantUrlInfoParsing
- $url : simpleXmlElement
- $pathinfo : mixed = ''
Return values
mixed —readInclude()
protected
readInclude(simpleXmlElement $url, significantUrlInfoParsing $uInfo) : mixed
Parameters
- $url : simpleXmlElement
- $uInfo : significantUrlInfoParsing
Tags
Return values
mixed —readProjectXml()
protected
readProjectXml() : mixed
Return values
mixed —retrieveModulePaths()
since urls.xml declare all entrypoints, current entry point does not have access to all modules, so doesn't know all their paths.
protected
retrieveModulePaths(string $configFile[, mixed $entrypoint = '' ]) : mixed
this method retrieve all module paths declared in the configuration of an entry point or the global configuration
Parameters
- $configFile : string
-
the config file name
- $entrypoint : mixed = ''