Example #1
0
File: Spt.php Project: zuniphp/uri
 public function getArr()
 {
     if (!$this->uri->getSegment()) {
         $container = Container::getInstance();
         $index = strtolower($container->get('startController'));
         return array($index, 'index');
     }
     return explode('/', rtrim($this->uri->getSegment(), '/'));
 }
Example #2
0
 private function setView($view)
 {
     $container = Container::getInstance();
     $conf['dirProject'] = 'app';
     $conf['pathRoot'] = '../';
     foreach ($conf as $key => $value) {
         if (!$container->has($key)) {
             $container->set($key, $value);
         }
     }
     $path = '' . rtrim($container->get('pathRoot'), '/') . DIRECTORY_SEPARATOR . rtrim($container->get('dirProject'), '/') . DIRECTORY_SEPARATOR . 'View' . DIRECTORY_SEPARATOR;
     $file = $view . '.php';
     $this->view = $path . $file;
     return $this;
 }