public function __construct() { parent::__construct(); # verify testimonial token is sent. if (empty($_GET['ttk'])) { $this->render(View::factory('testimonials/public/blank')); } $this->testimonial_token = $_GET['ttk']; # define the form action url $this->form_url = url::site("/testimonials/save/{$this->owner->apikey}?ttk={$this->testimonial_token}"); # route to method here for better urls =p $allowed = array('crop'); $action = (isset($_GET['a']) and in_array($_GET['a'], $allowed)) ? $_GET['a'] : 'index'; die($this->{$action}()); }
public function __construct() { parent::__construct(); $this->index(); }