public function view_app() { $this->assertLoggedIn(); $this->set('area', 'app'); try { $consumer = new OAuthConsumer($this->args('app_id')); if (!$consumer->isHydrated()) { throw new Exception("This app does not exist."); } $this->setTitle("View App - " . $consumer->getName()); $this->set('apps', $consumer->getApps()->getAll()); $this->set('consumer', $consumer); } catch (Exception $e) { $this->setTitle('View App - Error'); $this->set('megaerror', $e->getMessage()); } }