Source for file jSignificantUrlsCompiler.class.php

Documentation is available at jSignificantUrlsCompiler.class.php

  1. <?php
  2. /**
  3. @package     jelix
  4. @subpackage  urls_engine
  5. @author      Laurent Jouanneau
  6. @contributor Thibault Piront (nuKs)
  7. @copyright   2005-2012 Laurent Jouanneau
  8. @copyright   2007 Thibault Piront
  9. @link        http://www.jelix.org
  10. @licence     GNU Lesser General Public Licence see LICENCE file or http://www.gnu.org/licenses/lgpl.html
  11. */
  12.  
  13. class significantUrlInfoParsing {
  14.     public $entryPoint = '';
  15.     public $entryPointUrl = '';
  16.     public $isHttps = false;
  17.     public $isDefault = false;
  18.     public $action = '';
  19.     public $module = '';
  20.     public $actionOverride = false;
  21.     public $requestType = '';
  22.     public $statics = array();
  23.     public $params = array();
  24.     public $escapes = array();
  25.  
  26.     function __construct($rt$ep$isDefault$isHttps{
  27.         $this->requestType = $rt;
  28.         $this->entryPoint = $this->entryPointUrl = $ep;
  29.         $this->isDefault = $isDefault;
  30.         $this->isHttps = $isHttps;
  31.     }
  32.  
  33.     function getFullSel({
  34.         if ($this->action{
  35.             $act $this->action;
  36.             if (substr($act,-1== ':'// this is a rest action
  37.                 // we should add index because jSelectorAct resolve a "ctrl:" as "ctrl:index"
  38.                 // and then create the corresponding selector so url create infos will be found
  39.                 $act .= 'index';
  40.         }
  41.         else
  42.             $act '*';
  43.         return $this->module.'~'.$act.'@'.$this->requestType;
  44.     }
  45. }
  46.  
  47. /**
  48. * Compiler for significant url engine
  49. @package  jelix
  50. @subpackage urls_engine
  51. */
  52. class jSignificantUrlsCompiler implements jISimpleCompiler{
  53.  
  54.     protected $requestType;
  55.     protected $defaultUrl;
  56.     protected $parseInfos;
  57.     protected $createUrlInfos;
  58.     protected $createUrlContent;
  59.     protected $createUrlContentInc;
  60.     protected $checkHttps = true;
  61.  
  62.     protected $typeparam = array('string'=>'([^\/]+)','char'=>'([^\/])''letter'=>'(\w)',
  63.         'number'=>'(\d+)''int'=>'(\d+)''integer'=>'(\d+)''digit'=>'(\d)',
  64.         'date'=>'([0-2]\d{3}\-(?:0[1-9]|1[0-2])\-(?:[0-2][1-9]|3[0-1]))',
  65.         'year'=>'([0-2]\d{3})''month'=>'(0[1-9]|1[0-2])''day'=>'([0-2][1-9]|[1-2]0|3[0-1])',
  66.         'path'=>'(.*)''locale'=>'(\w{2,3}(?:(?:\-|_)\w{2,3})?)''lang'=>'(\w{2,3})'
  67.         );
  68.  
  69.     /**
  70.      *
  71.      */
  72.     public function compile($aSelector{
  73.  
  74.         $sourceFile $aSelector->getPath();
  75.         $cachefile $aSelector->getCompiledFilePath();
  76.  
  77.         $xml simplexml_load_file ($sourceFile);
  78.         if (!$xml{
  79.            return false;
  80.         }
  81.         /*
  82.         <urls>
  83.          <classicentrypoint name="index" default="true">
  84.             <url pathinfo="/test/:mois/:annee" module="" action="">
  85.                   <param name="mois" escape="true" regexp="\d{4}"/>
  86.                   <param name="annee" escape="false" />
  87.                   <static name="bla" value="cequejeveux" />
  88.             </url>
  89.             <url handler="" module="" action=""  />
  90.          </classicentrypoint>
  91.         </urls>
  92.  
  93.         The compiler generates two files.
  94.  
  95.         It generates a php file for each entrypoint. A file contains a $PARSE_URL
  96.         array:
  97.  
  98.             $PARSE_URL = array($isDefault, $infoparser, $infoparser, ... )
  99.  
  100.         where:
  101.             $isDefault: true if it is the default entry point. In this case and
  102.             where the url parser doesn't find a corresponding action, it will
  103.             ignore else it will generate an error
  104.  
  105.             $infoparser = array('module','action', 'regexp_pathinfo',
  106.                                 'handler selector', array('secondaries','actions'),
  107.                                 false // needs https or not
  108.                                 )
  109.             or
  110.             $infoparser = array('module','action','regexp_pathinfo',
  111.                array('year','month'), // list of dynamic value included in the url,
  112.                                       // alphabetical ascendant order
  113.                array(true, false),    // list of boolean which indicates for each
  114.                                       // dynamic value, if it is an escaped value or not
  115.                array('bla'=>'whatIWant' ), // list of static values
  116.                array('secondaries','actions'),
  117.                false  // need https or not
  118.             )
  119.  
  120.         It generates an other file common to all entry point. It contains an
  121.         array which contains informations to create urls
  122.  
  123.             $CREATE_URL = array(
  124.                'news~show@classic' => // the action selector
  125.                   array(0,'entrypoint', https true/false, 'handler selector')
  126.                   or
  127.                   array(1,'entrypoint', https true/false,
  128.                         array('year','month',), // list of dynamic values included in the url
  129.                         array(0, 1..), // list of integer which indicates for each
  130.                                        // dynamic value: 0: urlencode, 1:urlencode except '/', 2:escape, 4: lang, 8: locale
  131.                         "/news/%1/%2/", // the url
  132.                         array('bla'=>'whatIWant' ) // list of static values
  133.                         )
  134.                   or
  135.                   When there are  several urls to the same action, it is an array of this kind of the previous array:
  136.                   array(4, array(1,...), array(1,...)...)
  137.  
  138.                   or
  139.                   array(2,'entrypoint', https true/false), // for the patterns "@request"
  140.                   or
  141.                   array(3,'entrypoint', https true/false), // for the patterns "module~@request"
  142.         */
  143.  
  144.         $this->createUrlInfos = array();
  145.         $this->createUrlContent = "<?php \nif (jApp::config()->compilation['checkCacheFiletime'] &&( \n";
  146.         $this->createUrlContent .= "filemtime('".$sourceFile.'\') > '.filemtime($sourceFile);
  147.         $this->createUrlContentInc = '';
  148.         $this->readProjectXml();
  149.         $this->retrieveModulePaths(jApp::configPath('defaultconfig.ini.php'));
  150.         // for an app on a simple http server behind an https proxy, we shouldn't check HTTPS
  151.         $this->checkHttps = jApp::config()->urlengine['checkHttpsOnParsing'];
  152.  
  153.         foreach ($xml->children(as $tagname => $tag{
  154.             if (!preg_match("/^(.*)entrypoint$/"$tagname$m)) {
  155.                 //TODO : error
  156.                 continue;
  157.             }
  158.             $type $m[1];
  159.             if ($type == ''{
  160.                 if (isset($tag['type']))
  161.                     $type = (string)$tag['type'];
  162.                 if ($type == '')
  163.                     $type 'classic';
  164.             }
  165.  
  166.             $this->defaultUrl = new significantUrlInfoParsing (
  167.                 $type,
  168.                 (string)$tag['name'],
  169.                 (isset($tag['default'](((string)$tag['default']== 'true'):false),
  170.                 (isset($tag['https'](((string)$tag['https']== 'true'):false)
  171.             );
  172.  
  173.             if (isset($tag['noentrypoint']&& (string)$tag['noentrypoint'== 'true')
  174.                 $this->defaultUrl->entryPointUrl '';
  175.  
  176.             $optionalTrailingSlash (isset($tag['optionalTrailingSlash']&& $tag['optionalTrailingSlash'== 'true');
  177.  
  178.             $this->parseInfos = array($this->defaultUrl->isDefault);
  179.  
  180.             //let's read the modulesPath of the entry point
  181.             $this->retrieveModulePaths($this->getEntryPointConfig($this->defaultUrl->entryPoint));
  182.  
  183.             // if this is the default entry point for the request type,
  184.             // then we add a rule which will match urls which are not
  185.             // defined.
  186.             if ($this->defaultUrl->isDefault{
  187.                 $this->createUrlInfos['@'.$this->defaultUrl->requestTypearray(2$this->defaultUrl->entryPoint$this->defaultUrl->isHttps);
  188.             }
  189.  
  190.             $createUrlInfosDedicatedModules array();
  191.             $parseContent "<?php \n";
  192.  
  193.             foreach ($tag->children(as $tagname => $url{
  194.                 $u clone $this->defaultUrl;
  195.                 $u->module = (string)$url['module'];
  196.  
  197.                 if (isset($url['https'])) {
  198.                     $u->isHttps (((string)$url['https']== 'true');
  199.                 }
  200.  
  201.                 if (isset($url['noentrypoint']&& ((string)$url['noentrypoint']== 'true'{
  202.                     $u->entryPointUrl '';
  203.                 }
  204.  
  205.                 if (isset($url['include'])) {
  206.                     $this->readInclude($url$u);
  207.                     continue;
  208.                 }
  209.  
  210.                 // in the case of a non default entry point, if there is just an
  211.                 // <url module="" />, so all actions of this module will be assigned
  212.                 // to this entry point.
  213.                 if (!$u->isDefault && !isset($url['action']&& !isset($url['handler'])) {
  214.                     $this->parseInfos[array($u->module'''/.*/'array(),
  215.                                                 array()array()false,
  216.                                                 ($this->checkHttps && $u->isHttps));
  217.                     $createUrlInfosDedicatedModules[$u->getFullSel()array(3$u->entryPointUrl$u->isHttpstrue);
  218.                     continue;
  219.                 }
  220.  
  221.                 $u->action = (string)$url['action'];
  222.  
  223.                 if (strpos($u->action':'=== false{
  224.                     $u->action 'default:'.$u->action;
  225.                 }
  226.  
  227.                 if (isset($url['actionoverride'])) {
  228.                     $u->actionOverride preg_split("/[\s,]+/"(string)$url['actionoverride']);
  229.                     foreach ($u->actionOverride as &$each{
  230.                         if (strpos($each':'=== false{
  231.                             $each 'default:'.$each;
  232.                         }
  233.                     }
  234.                 }
  235.  
  236.                 // if there is an indicated handler, so, for the given module
  237.                 // (and optional action), we should call the given handler to
  238.                 // parse or create an url
  239.                 if (isset($url['handler'])) {
  240.                     $this->newHandler($u$url);
  241.                     continue;
  242.                 }
  243.  
  244.                 // parse dynamic parameters
  245.                 if (isset($url['pathinfo'])) {
  246.                     $path = (string)$url['pathinfo'];
  247.                     $regexppath $this->extractDynamicParams($url$path$u);
  248.                 }
  249.                 else {
  250.                     $regexppath '.*';
  251.                     $path '';
  252.                 }
  253.  
  254.                 $tempOptionalTrailingSlash $optionalTrailingSlash;
  255.                 if (isset($url['optionalTrailingSlash'])) {
  256.                     $tempOptionalTrailingSlash ($url['optionalTrailingSlash'== 'true');
  257.                 }
  258.                 if ($tempOptionalTrailingSlash{
  259.                     if (substr($regexppath-1== '/'{
  260.                         $regexppath .= '?';
  261.                     }
  262.                     else {
  263.                         $regexppath .= '\/?';
  264.                     }
  265.                 }
  266.  
  267.                 // parse static parameters
  268.                 foreach ($url->static as $var{
  269.                     $t "";
  270.                     if (isset($var['type'])) {
  271.                         switch ((string) $var['type']{
  272.                             case 'lang'$t '$l'break;
  273.                             case 'locale'$t '$L'break;
  274.                             default:
  275.                                 throw new Exception('urls definition: invalid type on a <static> element');
  276.                         }
  277.                     }
  278.                     $u->statics[(string)$var['name']] $t . (string)$var['value'];
  279.                 }
  280.  
  281.                 $this->parseInfos[array($u->module$u->action'!^'.$regexppath.'$!',
  282.                                             $u->params$u->escapes$u->statics,
  283.                                             $u->actionOverride($this->checkHttps && $u->isHttps));
  284.                 $this->appendUrlInfo($u$pathfalse);
  285.  
  286.                 if ($u->actionOverride{
  287.                     foreach ($u->actionOverride as $ao{
  288.                         $u->action $ao;
  289.                         $this->appendUrlInfo($u$pathtrue);
  290.                     }
  291.                 }
  292.             }
  293.             $c count($createUrlInfosDedicatedModules);
  294.             foreach ($createUrlInfosDedicatedModules as $k=>$inf{
  295.                 if ($c 1)
  296.                     $inf[3false;
  297.                 $this->createUrlInfos[$k$inf;
  298.             }
  299.  
  300.             $parseContent .= '$GLOBALS[\'SIGNIFICANT_PARSEURL\'][\''.rawurlencode($this->defaultUrl->entryPoint).'\'] = '
  301.                             .var_export($this->parseInfostrue).";\n?>";
  302.  
  303.             jFile::write(jApp::tempPath('compiled/urlsig/'.$aSelector->file.'.'.rawurlencode($this->defaultUrl->entryPoint).'.entrypoint.php'),$parseContent);
  304.         }
  305.         $this->createUrlContent .= ")) { return false; } else {\n";
  306.         $this->createUrlContent .= $this->createUrlContentInc;
  307.         $this->createUrlContent .= '$GLOBALS[\'SIGNIFICANT_CREATEURL\'] ='.var_export($this->createUrlInfostrue).";\nreturn true;";
  308.         $this->createUrlContent .= "\n}\n";
  309.         jFile::write(jApp::tempPath('compiled/urlsig/'.$aSelector->file.'.creationinfos_15.php')$this->createUrlContent);
  310.         return true;
  311.     }
  312.  
  313.     protected function readProjectXml({
  314.         $xml simplexml_load_file(jApp::appPath('project.xml'));
  315.         foreach ($xml->entrypoints->entry as $entrypoint{
  316.             $file = (string)$entrypoint['file'];
  317.             if (substr($file-4!= '.php')
  318.                 $file.='.php';
  319.             $configFile = (string)$entrypoint['config'];
  320.             $this->entryPoints[$file$configFile;
  321.         }
  322.     }
  323.  
  324.     protected function getEntryPointConfig($entrypoint{
  325.         if (substr($entrypoint-4!= '.php')
  326.             $entrypoint.='.php';
  327.         if (!isset($this->entryPoints[$entrypoint]))
  328.             throw new Exception('The entry point "'.$entrypoint.'" is not declared into project.xml');
  329.         return jApp::configPath($this->entryPoints[$entrypoint]);
  330.     }
  331.     /**
  332.      * list all entry points and their config
  333.      */
  334.     protected $entryPoints = array();
  335.  
  336.     /**
  337.      * list all modules repository
  338.      */
  339.     protected $modulesRepositories = array();
  340.  
  341.     /**
  342.      * list all modules path
  343.      */
  344.     protected $modulesPath = array();
  345.  
  346.     /**
  347.      * since urls.xml declare all entrypoints, current entry point does not have
  348.      * access to all modules, so doesn't know all their paths.
  349.      * this method retrieve all module paths declared in the configuration
  350.      * of an entry point or the global configuration
  351.      * @param string $configFile the config file name
  352.      */
  353.     protected function retrieveModulePaths($configFile{
  354.         $conf parse_ini_file($configFile);
  355.         if (!array_key_exists('modulesPath',$conf))
  356.             return;
  357.         $list preg_split('/ *, */',$conf['modulesPath']);
  358.         array_unshift($listJELIX_LIB_PATH.'core-modules/');
  359.  
  360.         foreach($list as $k=>$path){
  361.             if(trim($path== ''continue;
  362.             $p str_replace(array('lib:','app:')array(LIB_PATHjApp::appPath())$path);
  363.             if (!file_exists($p)) {
  364.                 continue;
  365.             }
  366.             if (substr($p,-1!='/')
  367.                 $p.='/';
  368.             if (isset($this->modulesRepositories[$p]))
  369.                 continue;
  370.             $this->modulesRepositories[$ptrue;
  371.             if ($handle opendir($p)) {
  372.                 while (false !== ($f readdir($handle))) {
  373.                     if ($f[0!= '.' && is_dir($p.$f)) {
  374.                         $this->modulesPath[$f]=$p.$f.'/';
  375.                     }
  376.                 }
  377.                 closedir($handle);
  378.             }
  379.         }
  380.     }
  381.  
  382.     /**
  383.      * @param significantUrlInfoParsing $u 
  384.      * @param simpleXmlElement $url 
  385.     */
  386.     protected function newHandler($u$url$pathinfo ''{
  387.         $class = (string)$url['handler'];
  388.         // we must have a module name in the selector, because, during the parsing of
  389.         // the url in the request process, we are not still in a module context
  390.         $p strpos($class,'~');
  391.         if ($p === false)
  392.             $selclass $u->module.'~'.$class;
  393.         elseif ($p == 0)
  394.             $selclass $u->module.$class;
  395.         else
  396.             $selclass $class;
  397.  
  398.         $s new jSelectorUrlHandler($selclass);
  399.         if (!isset($url['action'])) {
  400.             $u->action '*';
  401.         }
  402.         $regexp '';
  403.  
  404.         if (isset($url['pathinfo'])) {
  405.             $pathinfo .= '/'.trim((string)$url['pathinfo']'/');
  406.         }
  407.  
  408.         if ($pathinfo != '/'{
  409.             $regexp '!^'.preg_quote($pathinfo'!').'(/.*)?$!';
  410.         }
  411.  
  412.         $this->createUrlContentInc .= "include_once('".$s->getPath()."');\n";
  413.         $this->parseInfos[array($u->module$u->action$regexp$selclass$u->actionOverride($this->checkHttps && $u->isHttps));
  414.         $this->createUrlInfos[$u->getFullSel()array(0$u->entryPointUrl$u->isHttps$selclass$pathinfo);
  415.         if ($u->actionOverride{
  416.             foreach ($u->actionOverride as $ao{
  417.                 $u->action $ao;
  418.                 $this->createUrlInfos[$u->getFullSel()array(0$u->entryPointUrl$u->isHttps$selclass$pathinfo);
  419.             }
  420.         }
  421.     }
  422.  
  423.     /**
  424.      * extract all dynamic parts of a pathinfo, and read <param> elements
  425.      * @param simpleXmlElement $url the url element
  426.      * @param string $regexppath  the path info
  427.      * @param significantUrlInfoParsing $u 
  428.      * @return string the correponding regular expression
  429.      */
  430.     protected function extractDynamicParams($url$regexppath$u{
  431.         $regexppath preg_quote($regexppath '!');
  432.         if (preg_match_all("/\\\:([a-zA-Z_0-9]+)/"$regexppath$mPREG_PATTERN_ORDER)) {
  433.             $u->params $m[1];
  434.  
  435.             // process parameters which are declared in a <param> element
  436.             foreach ($url->param as $var{
  437.  
  438.                 $name = (string) $var['name'];
  439.                 $k array_search($name$u->params);
  440.                 if ($k === false{
  441.                     // TODO error
  442.                     continue;
  443.                 }
  444.  
  445.                 $type '';
  446.                 if (isset($var['type'])) {
  447.                     $type = (string)$var['type'];
  448.                     if (isset($this->typeparam[$type]))
  449.                         $regexp $this->typeparam[$type];
  450.                     else
  451.                         $regexp '([^\/]+)';
  452.                 }
  453.                 elseif (isset ($var['regexp'])) {
  454.                     $regexp '('.(string)$var['regexp'].')';
  455.                 }
  456.                 else {
  457.                     $regexp '([^\/]+)';
  458.                 }
  459.  
  460.                 $u->escapes[$k0;
  461.                 if ($type == 'path'{
  462.                     $u->escapes[$k1;
  463.                 }
  464.                 else if (isset($var['escape'])) {
  465.                     $u->escapes[$k(((string)$var['escape']== 'true'?2:0);
  466.                 }
  467.  
  468.                 if ($type == 'lang'{
  469.                     $u->escapes[$k|= 4;
  470.                 }
  471.                 else if ($type == 'locale'{
  472.                     $u->escapes[$k|= 8;
  473.                 }
  474.  
  475.                 $regexppath str_replace('\:'.$name$regexp$regexppath);
  476.             }
  477.  
  478.             // process parameters that are only declared in the pathinfo
  479.             foreach ($u->params as $k=>$name{
  480.                 if (isset($u->escapes[$k])) {
  481.                     continue;
  482.                 }
  483.                 $u->escapes[$k0;
  484.                 $regexppath str_replace('\:'.$name'([^\/]+)'$regexppath);
  485.             }
  486.         }
  487.         return $regexppath;
  488.     }
  489.  
  490.     /**
  491.      * register the given url informations
  492.      * @param significantUrlInfoParsing $u 
  493.      * @param string $path 
  494.      */
  495.     protected function appendUrlInfo($u$path$secondaryAction{
  496.         $cuisel $u->getFullSel();
  497.         $arr array(1$u->entryPointUrl$u->isHttps$u->params$u->escapes$path$secondaryAction$u->statics);
  498.         if (isset($this->createUrlInfos[$cuisel])) {
  499.             if ($this->createUrlInfos[$cuisel][0== 4{
  500.                 $this->createUrlInfos[$cuisel][$arr;
  501.             }
  502.             else {
  503.                 $this->createUrlInfos[$cuiselarray(4$this->createUrlInfos[$cuisel]$arr);
  504.             }
  505.         }
  506.         else {
  507.             $this->createUrlInfos[$cuisel$arr;
  508.         }
  509.     }
  510.  
  511.     /**
  512.      * @param simpleXmlElement $url 
  513.      * @param significantUrlInfoParsing $uInfo 
  514.     */
  515.     protected function readInclude($url$uInfo{
  516.  
  517.         $file = (string)$url['include'];
  518.         $pathinfo '/'.trim((string)$url['pathinfo']'/');
  519.  
  520.         if (!isset($this->modulesPath[$uInfo->module]))
  521.             throw new Exception ('urls.xml: the module '.$uInfo->module.' does not exist');
  522.  
  523.         $path $this->modulesPath[$uInfo->module];
  524.  
  525.         if (!file_exists($path.$file))
  526.             throw new Exception ('urls.xml: include file '.$file.' of the module '.$uInfo->module.' does not exist');
  527.  
  528.         $this->createUrlContent .= " || filemtime('".$path.$file.'\') > '.filemtime($path.$file)."\n";
  529.  
  530.         $xml simplexml_load_file ($path.$file);
  531.         if (!$xml{
  532.            throw new Exception ('urls.xml: include file '.$file.' of the module '.$uInfo->module.' is not a valid xml file');
  533.         }
  534.         $optionalTrailingSlash (isset($xml['optionalTrailingSlash']&& $xml['optionalTrailingSlash'== 'true');
  535.  
  536.         foreach ($xml->url as $url{
  537.             $u clone $uInfo;
  538.  
  539.             $u->action = (string)$url['action'];
  540.  
  541.             if (strpos($u->action':'=== false{
  542.                 $u->action 'default:'.$u->action;
  543.             }
  544.  
  545.             if (isset($url['actionoverride'])) {
  546.                 $u->actionOverride preg_split("/[\s,]+/"(string)$url['actionoverride']);
  547.                 foreach ($u->actionOverride as &$each{
  548.                     if (strpos($each':'=== false{
  549.                         $each 'default:'.$each;
  550.                     }
  551.                 }
  552.             }
  553.  
  554.             // if there is an indicated handler, so, for the given module
  555.             // (and optional action), we should call the given handler to
  556.             // parse or create an url
  557.             if (isset($url['handler'])) {
  558.                 $this->newHandler($u$url$pathinfo);
  559.                 continue;
  560.             }
  561.  
  562.             // parse dynamic parameters
  563.             if (isset($url['pathinfo'])) {
  564.                 $path $pathinfo.($pathinfo !='/'?'/':'').trim((string)$url['pathinfo'],'/');
  565.                 $regexppath $this->extractDynamicParams($url$path$u);
  566.             }
  567.             else {
  568.                 $regexppath '.*';
  569.                 $path '';
  570.             }
  571.  
  572.             $tempOptionalTrailingSlash $optionalTrailingSlash;
  573.             if (isset($url['optionalTrailingSlash'])) {
  574.                 $tempOptionalTrailingSlash ($url['optionalTrailingSlash'== 'true');
  575.             }
  576.             if ($tempOptionalTrailingSlash{
  577.                 if (substr($regexppath-1== '/'{
  578.                     $regexppath .= '?';
  579.                 }
  580.                 else {
  581.                     $regexppath .= '\/?';
  582.                 }
  583.             }
  584.  
  585.             // parse static parameters
  586.             foreach ($url->static as $var{
  587.                 $t "";
  588.                 if (isset($var['type'])) {
  589.                     switch ((string) $var['type']{
  590.                         case 'lang'$t '$l'break;
  591.                         case 'locale'$t '$L'break;
  592.                         default:
  593.                             throw new Exception('urls definition: invalid type on a <static> element');
  594.                     }
  595.                 }
  596.                 $u->statics[(string)$var['name']] $t . (string)$var['value'];
  597.             }
  598.  
  599.             $this->parseInfos[array($u->module$u->action'!^'.$regexppath.'$!',
  600.                                         $u->params$u->escapes$u->statics,
  601.                                         $u->actionOverride($this->checkHttps && $u->isHttps));
  602.             $this->appendUrlInfo($u$pathfalse);
  603.             if ($u->actionOverride{
  604.                 foreach ($u->actionOverride as $ao{
  605.                     $u->action $ao;
  606.                     $this->appendUrlInfo($u$pathtrue);
  607.                 }
  608.             }
  609.         }
  610.     }
  611.  
  612. }

Documentation generated on Wed, 04 Jan 2017 22:56:56 +0100 by phpDocumentor 1.4.3