Ejemplo n.º 1
0
 public function attachEvents()
 {
     foreach (Memory::get(ACTION) as $namespace => $action) {
         $this->attachActionEvents($action, $namespace);
     }
     foreach (Memory::get(VIEW) as $namespace => $view) {
         $this->attachViewEvents($view, $namespace);
     }
 }
Ejemplo n.º 2
0
 public function redirect($location, array $args = [])
 {
     if (false === stripos($location, '/')) {
         $url = new UrlHelper();
         $url->setArguments(array_merge(['url' => $location], $args));
         $location = $url->render();
     }
     Memory::get(HTTP)->set(HEADER, ['Location' => $location]);
     Memory::get(HTTP)->set(CODE, 302);
     Memory::events()->emit(END, ['content' => '']);
     Memory::events()->emit(STOP);
 }
Ejemplo n.º 3
0
 public function getCacheDir()
 {
     return Memory::get(SCOPE)->get(CACHE, false) ?: Memory::get(SCOPE)->get(BASE) . DS . CACHE . DS;
 }