1 | <?php |
||
33 | class CrawlerHook extends AbstractHook |
||
34 | { |
||
35 | /** |
||
36 | * (Hook-function called from TypoScriptFrontend, see ext_localconf.php for configuration). |
||
37 | * |
||
38 | * @param array $parameters Parameters delivered by TypoScriptFrontend |
||
39 | * @param TypoScriptFrontendController $parentObject The calling parent object (TypoScriptFrontend) |
||
40 | */ |
||
41 | 3 | public function clearVarnishCache(array $parameters, TypoScriptFrontendController $parentObject) |
|
|
|||
42 | { |
||
43 | 3 | if ($this->isCrawlerExtensionLoaded() && $this->isCrawlerRunning($parentObject)) { |
|
44 | 1 | $this->clearPageCacheInVarnish($parentObject->id); |
|
45 | } |
||
46 | 3 | } |
|
47 | |||
48 | /** |
||
49 | * @return boolean |
||
50 | */ |
||
51 | protected function isCrawlerExtensionLoaded() |
||
55 | |||
56 | /** |
||
57 | * @param integer $pageId |
||
58 | */ |
||
59 | 1 | private function clearPageCacheInVarnish($pageId) |
|
67 | |||
68 | /** |
||
69 | * @param TypoScriptFrontendController $tsfe |
||
70 | * @return boolean |
||
71 | */ |
||
72 | 2 | private function isCrawlerRunning(TypoScriptFrontendController $tsfe) { |
|
78 | } |
||
79 |
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.