Beispiel #1
0
 public function __toString()
 {
     $args = array('expr' => $this->getExpr(), 'preRoute' => $this->getFilters('preroute'), 'postRoute' => $this->getFilters('postroute'), 'compiler' => $this->compiler, 'url' => $this);
     return Templates::get('url')->render($args, true);
 }
Beispiel #2
0
 public function __toString()
 {
     return Templates::get('groups/if')->render(array('self' => $this), true);
 }
Beispiel #3
0
 protected function compile()
 {
     $this->readFilters();
     $this->createUrlObjects();
     $groups = $this->groupByApps($this->urls);
     $groups->iterate(array($this, 'groupByMethod'));
     $groups->iterate(array($this, 'groupByPartsSize'));
     $groups->iterate(array($this, 'groupByPatterns'));
     $self = $this;
     $groups->sort(function ($obj1, $obj2) use($self) {
         return $obj1->getWeight($self) - $obj2->getWeight($self);
     });
     $config = $this->config;
     $output = $this->config->getOutput();
     $self = $this;
     $args = compact('self', 'groups', 'config', 'complex');
     $this->output = Templates::get('main')->render($args, true);
     $this->output = FixCode::fix($this->output);
 }