Exemple #1
0
 /**
  * @inheritdoc
  */
 public function build(\ReRoute\Url $url, \ReRoute\UrlBuilder $urlBuilder)
 {
     $prefix = $this->getPrefix();
     if (!empty($prefix)) {
         $url->setPath($this->getPrefix() . $url->getPath());
     }
 }
 /**
  * @inheritdoc
  */
 public function build(Url $url, UrlBuilder $urlBuilder)
 {
     $lang = $urlBuilder->useParameter('lang');
     if (!empty($lang)) {
         if ($lang != $this->defaultLanguage) {
             $url->setPath('/' . $lang . $url->getPath());
         }
     }
 }
 /**
  * @inheritdoc
  */
 public function build(Url $url, UrlBuilder $urlBuilder)
 {
     $url->setPath('my' . $url->getPath());
 }