public function __construct() { $action = \Request::SimpletextRequired('op'); switch ($action) { case 'list': $this->tid = \Request::IntegerRequired('tid'); $church = new \Church($this->tid); $this->listOfChurch($church); break; case 'addform': $this->tid = \Request::IntegerRequired('tid'); $church = new \Church($this->tid); $this->newForm($church); break; case 'add': $this->tid = \Request::IntegerRequired('tid'); $church = new \Church($this->tid); $this->add($church); break; case 'modify': $this->template = 'remark_list.twig'; $rid = \Request::IntegerRequired('rid'); $remark = new \Remark($rid); $state = \Request::Simpletext('state'); $remark->changeState($state); $comment = \Request::Text('adminmegj'); if ($comment != '') { $remark->addComment($comment); } $this->tid = $remark->tid; $church = new \Church($this->tid); $this->listOfChurch($church); break; case 'add': break; } }