Пример #1
0
 function execute()
 {
     if ($this->query('setval')) {
         $this->session()->set('slot', $this->query('setval'));
     }
     return parent::execute();
 }
Пример #2
0
 function dispatch()
 {
     if ($this->identity()->anonymous()) {
         throw new k_NotAuthorized();
     }
     return parent::dispatch();
 }
Пример #3
0
 function execute()
 {
     $response = parent::execute();
     $response->setStatus(500);
     $response->setHeader('X-Foo', '42');
     return $response;
 }
Пример #4
0
 function dispatch()
 {
     if ($this->identity()->user() != 'ninja') {
         throw new k_Forbidden();
     }
     return parent::dispatch();
 }
Пример #5
0
 function dispatch()
 {
     if ($this->getCourse()->get('id') == 0) {
         throw new k_PageNotFound();
     }
     return parent::dispatch();
 }
Пример #6
0
 function dispatch()
 {
     $tilmelding = $this->getTilmelding();
     if (!$tilmelding->get('id') or !$tilmelding->get('navn')) {
         throw new k_Forbidden();
     }
     return parent::dispatch();
 }
Пример #7
0
 function dispatch()
 {
     $kursus = new VIH_Model_KortKursus($this->context->name());
     if ($kursus->getId() <= 0) {
         throw new k_Forbidden();
     }
     return parent::dispatch();
 }
Пример #8
0
 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();
 }
Пример #9
0
 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();
 }
Пример #10
0
 function dispatch()
 {
     $this->article = $this->articles->fetchBySlug($this->name());
     if (!$this->article) {
         throw new k_PageNotFound();
     }
     return parent::dispatch();
 }
Пример #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();
 }
Пример #12
0
 function dispatch()
 {
     $this->contact = $this->contacts->fetchByName($this->name());
     if (!$this->contact) {
         throw new k_PageNotFound();
     }
     return parent::dispatch();
 }
Пример #13
0
 function dispatch()
 {
     $kursus = new VIH_Model_LangtKursus($this->name());
     if ($kursus->get("id") == 0) {
         return new k_PageNotFound();
     }
     return parent::dispatch();
 }
Пример #14
0
 function dispatch()
 {
     $tilmelding = $this->getTilmelding();
     if ($tilmelding->get('id') == 0) {
         throw new k_PageNotFound();
     }
     return parent::dispatch();
 }
Пример #15
0
 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();
 }
Пример #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();
 }
Пример #17
0
 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();
 }
Пример #18
0
 function dispatch()
 {
     $this->questionAnswer = $this->faq->fetchBySlug($this->name());
     if (!$this->questionAnswer) {
         throw new k_PageNotFound();
     }
     return parent::dispatch();
 }
Пример #19
0
 function dispatch()
 {
     $this->ansat = $this->getAnsat();
     if ($this->getAnsat()->get('id') == 0) {
         throw new k_PageNotFound();
     }
     return parent::dispatch();
 }
Пример #20
0
 function dispatch()
 {
     $nyhed = new VIH_News($this->name());
     if ($nyhed->get('id') == 0) {
         throw new k_PageNotFound();
     }
     return parent::dispatch();
 }
Пример #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();
 }
Пример #22
0
 function execute()
 {
     return $this->wrap(parent::execute());
 }
Пример #23
0
 function execute()
 {
     $this->url_state->init("continue", $this->url('/'));
     return parent::execute();
 }
Пример #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();
 }