- バックアップ一覧
- 現在との差分 を表示
- ソース を表示
- バックアップ を表示
- PHP-symfony/コントローラ/フィルター へ行く。
- 1 (2011-11-30 (水) 14:21:25)
- 追加された行はこの色です。
- 削除された行はこの色です。
* フィルター [#kdb612af] <?php class fooFilter extends sfFilter { public function execute ($filterChain) { $filterChain->execute(); $request = $this->getContext()->getRequest(); $response = $this->getContext()->getResponse(); $contentType = $response->getContentType(); if (strpos($contentType, 'html') === false) { return; } $html = $response->getContent(); $html = str_replce('</body>', 'TEST</body>', $html); $response->setContent($html); } }