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
文件: Confirm.php 项目: vih/vih.dk
 function dispatch()
 {
     $tilmelding = $this->getTilmelding();
     if (!$tilmelding->get('id') or !$tilmelding->get('navn')) {
         throw new k_Forbidden();
     }
     return parent::dispatch();
 }
示例#7
0
文件: Venteliste.php 项目: vih/vih.dk
 function dispatch()
 {
     $kursus = new VIH_Model_KortKursus($this->context->name());
     if ($kursus->getId() <= 0) {
         throw new k_Forbidden();
     }
     return parent::dispatch();
 }
示例#8
0
文件: Show.php 项目: 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();
 }
示例#9
0
文件: Show.php 项目: 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();
 }
示例#10
0
文件: entity.php 项目: Tobbe/lsinfo
 function dispatch()
 {
     $this->article = $this->articles->fetchBySlug($this->name());
     if (!$this->article) {
         throw new k_PageNotFound();
     }
     return parent::dispatch();
 }
示例#11
0
文件: Tilmelding.php 项目: vih/vih.dk
 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
文件: Show.php 项目: 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();
 }
示例#16
0
文件: Reciept.php 项目: vih/vih.dk
 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
文件: Show.php 项目: 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();
 }
示例#18
0
文件: entity.php 项目: Tobbe/lsinfo
 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();
 }