function setupView() { $view = $this->getView(); $view->assign('controller', Pfw_Request::getParam('controller')); if (self::is_logged_in()) { # gettng user with profile photo Pfw_Loader::loadModel('User'); $user = User::Q()->where(array('this.id = %s', Pfw_Session::get('login_id')))->exec(); $logged_in_user = $user[0]; $view->assign('logged_in_user', $logged_in_user); $view->assign('is_logged_in', true); } }
/** * Gets a variable from a the request environment, for example * from a matching :name route segment, or by index from a route * wildcard. * * @param string $name the route * @return string the value of the request environment variable */ public function getParam($name) { return Pfw_Request::getParam($name); }