Ejemplo n.º 1
0
 /**
  * @dataProvider urlsProvider
  */
 public function testBasicHasGoodTermination($url, $status)
 {
     if ($status) {
         $this->assertTrue(UrlParserA::hasGoodTermination($url));
     } else {
         $this->assertFalse(UrlParserA::hasGoodTermination($url));
     }
 }
Ejemplo n.º 2
0
 /**
  * @return string
  */
 public function getModulePath()
 {
     $sModulePath = $this->getPath();
     if (!SiteMapA::isValidMapPath($sModulePath) && SiteMapA::isValidObjectPath($sModulePath)) {
         $sModulePath = $this->getModuleMap()->getModulePath();
     }
     if (!UrlParserA::hasGoodTermination($sModulePath, DIRECTORY_SEPARATOR)) {
         $sModulePath .= DIRECTORY_SEPARATOR;
     }
     return $sModulePath;
 }
Ejemplo n.º 3
0
 /**
  * @return string
  * @throws ExceptionView
  */
 public function getTemplatePath()
 {
     $sTemplatePath = $this->getMap()->getTemplatePath();
     $sViewFolder = $this->getViewFolder();
     if (!empty($sViewFolder)) {
         $sTemplatePath .= DIRECTORY_SEPARATOR . $sViewFolder;
     }
     if (!is_dir($sTemplatePath)) {
         return;
     }
     if (!UrlParserA::hasGoodTermination($sTemplatePath, DIRECTORY_SEPARATOR)) {
         $sTemplatePath .= DIRECTORY_SEPARATOR;
     }
     return $sTemplatePath;
 }