library); } public function handleRequest(AphrontRequest $request) { $this->path = $request->getURIData('path'); $this->hash = $request->getURIData('hash'); $this->library = $request->getURIData('library'); $this->postprocessorKey = $request->getURIData('postprocessor'); // Check that the resource library exists before trying to serve resources // from it. try { $this->getCelerityResourceMap(); } catch (Exception $ex) { return new Aphront400Response(); } return $this->serveResource( array( 'path' => $this->path, 'hash' => $this->hash, )); } protected function buildResourceTransformer() { $developer_on = PhabricatorEnv::getEnvConfig('phabricator.developer-mode'); $should_minify = !$developer_on; return id(new CelerityResourceTransformer()) ->setMinify($should_minify) ->setPostprocessorKey($this->postprocessorKey) ->setCelerityMap($this->getCelerityResourceMap()); } protected function getCacheKey($path) { return parent::getCacheKey($path.';'.$this->postprocessorKey); } }