Exemplo n.º 1
0
 function execute()
 {
     if ($this->query('setval')) {
         $this->session()->set('slot', $this->query('setval'));
     }
     return parent::execute();
 }
Exemplo n.º 2
0
 function dispatch()
 {
     if ($this->identity()->anonymous()) {
         throw new k_NotAuthorized();
     }
     return parent::dispatch();
 }
Exemplo n.º 3
0
 function execute()
 {
     $response = parent::execute();
     $response->setStatus(500);
     $response->setHeader('X-Foo', '42');
     return $response;
 }
Exemplo n.º 4
0
 function dispatch()
 {
     if ($this->identity()->user() != 'ninja') {
         throw new k_Forbidden();
     }
     return parent::dispatch();
 }
Exemplo n.º 5
0
 function dispatch()
 {
     if ($this->getCourse()->get('id') == 0) {
         throw new k_PageNotFound();
     }
     return parent::dispatch();
 }
Exemplo n.º 6
0
 function dispatch()
 {
     $tilmelding = $this->getTilmelding();
     if (!$tilmelding->get('id') or !$tilmelding->get('navn')) {
         throw new k_Forbidden();
     }
     return parent::dispatch();
 }
Exemplo n.º 7
0
 function dispatch()
 {
     $kursus = new VIH_Model_KortKursus($this->context->name());
     if ($kursus->getId() <= 0) {
         throw new k_Forbidden();
     }
     return parent::dispatch();
 }
Exemplo n.º 8
0
Arquivo: Show.php Projeto: vih/vih.dk
 function dispatch()
 {
     $f*g = new VIH_Model_Fag($this->name());
     if (!$f*g->get('id') or $f*g->get('active') != 1 or $f*g->get('published') != 1) {
         throw new k_PageNotFound();
     }
     return parent::dispatch();
 }
Exemplo n.º 9
0
Arquivo: Show.php Projeto: vih/vih.dk
 function dispatch()
 {
     $kursus = new VIH_Model_LangtKursus($this->name());
     if (!$kursus->get('id') or $kursus->get('dato_slut') < date('Y-m-d')) {
         throw new k_PageNotFound();
     }
     return parent::dispatch();
 }
Exemplo n.º 10
0
 function dispatch()
 {
     $this->article = $this->articles->fetchBySlug($this->name());
     if (!$this->article) {
         throw new k_PageNotFound();
     }
     return parent::dispatch();
 }
Exemplo n.º 11
0
 function dispatch()
 {
     $tilmelding = VIH_Model_KortKursus_Tilmelding::factory($this->name());
     if (!is_object($tilmelding) or !$tilmelding->get('id')) {
         throw new k_PageNotFound();
     }
     return parent::dispatch();
 }
Exemplo n.º 12
0
 function dispatch()
 {
     $this->contact = $this->contacts->fetchByName($this->name());
     if (!$this->contact) {
         throw new k_PageNotFound();
     }
     return parent::dispatch();
 }
Exemplo n.º 13
0
 function dispatch()
 {
     $kursus = new VIH_Model_LangtKursus($this->name());
     if ($kursus->get("id") == 0) {
         return new k_PageNotFound();
     }
     return parent::dispatch();
 }
Exemplo n.º 14
0
 function dispatch()
 {
     $tilmelding = $this->getTilmelding();
     if ($tilmelding->get('id') == 0) {
         throw new k_PageNotFound();
     }
     return parent::dispatch();
 }
Exemplo n.º 15
0
Arquivo: Show.php Projeto: vih/vih.dk
 function dispatch()
 {
     $kursus = $this->context->getGateway()->findById($this->name());
     if (!$kursus->get('kursusnavn') or $kursus->get('dato_slut') < date('Y-m-d') or $kursus->get('published') == 0) {
         throw new k_PageNotFound();
     }
     return parent::dispatch();
 }
Exemplo n.º 16
0
 function dispatch()
 {
     $tilmelding = new VIH_Model_KortKursus_OnlineTilmelding($this->context->name());
     if (!$tilmelding->get('id') or !$tilmelding->get('navn')) {
         throw new k_Forbidden();
     }
     return parent::dispatch();
 }
Exemplo n.º 17
0
Arquivo: Show.php Projeto: vih/vih.dk
 function dispatch()
 {
     $this->underviser = new VIH_Model_Ansat($this->name());
     if (!$this->underviser->get('id') or $this->underviser->get('published') == 0) {
         throw new k_PageNotFound();
     }
     return parent::dispatch();
 }
Exemplo n.º 18
0
 function dispatch()
 {
     $this->questionAnswer = $this->faq->fetchBySlug($this->name());
     if (!$this->questionAnswer) {
         throw new k_PageNotFound();
     }
     return parent::dispatch();
 }
Exemplo n.º 19
0
 function dispatch()
 {
     $this->ansat = $this->getAnsat();
     if ($this->getAnsat()->get('id') == 0) {
         throw new k_PageNotFound();
     }
     return parent::dispatch();
 }
Exemplo n.º 20
0
 function dispatch()
 {
     $nyhed = new VIH_News($this->name());
     if ($nyhed->get('id') == 0) {
         throw new k_PageNotFound();
     }
     return parent::dispatch();
 }
Exemplo n.º 21
0
 function dispatch()
 {
     return "Dispatching:\n  name: '" . $this->name() . "'\n  next: '" . $this->next() . "'\n  subtype: '" . $this->subtype() . "'\n  url: '" . $this->url() . "'\n" . parent::dispatch();
 }
Exemplo n.º 22
0
 function execute()
 {
     return $this->wrap(parent::execute());
 }
Exemplo n.º 23
0
 function execute()
 {
     $this->url_state->init("continue", $this->url('/'));
     return parent::execute();
 }
Exemplo n.º 24
0
 function dispatch()
 {
     $url = $this->self_url();
     $protocol = substr($url, 0, 5);
     if ($protocol != 'https') {
         $link = 'https' . substr($url, 4);
         return new k_SeeOther($link);
     }
     return parent::dispatch();
 }