public function initialize() { if ($this->action === 'install' && mfwRequest::has('token')) { // token付きインストールリンクの場合, token情報のみで認証する. return $this->initializeByInstallToken(mfwRequest::param('token')); } if ($err = parent::initialize()) { return $err; } $id = mfwRequest::param('id'); $this->package = PackageDb::retrieveByPK($id); if (!$this->package) { return $this->buildErrorPage('Not Found', array(self::HTTP_404_NOTFOUND)); } $this->app = $this->package->getApplication(); return null; }