Mercurial > hg > isophonics-drupal-site
annotate vendor/consolidation/annotated-command/src/Hooks/Dispatchers/HookDispatcher.php @ 0:4c8ae668cc8c
Initial import (non-working)
author | Chris Cannam |
---|---|
date | Wed, 29 Nov 2017 16:09:58 +0000 |
parents | |
children |
rev | line source |
---|---|
Chris@0 | 1 <?php |
Chris@0 | 2 |
Chris@0 | 3 namespace Consolidation\AnnotatedCommand\Hooks\Dispatchers; |
Chris@0 | 4 |
Chris@0 | 5 use Consolidation\AnnotatedCommand\Hooks\HookManager; |
Chris@0 | 6 use Consolidation\AnnotatedCommand\AnnotationData; |
Chris@0 | 7 |
Chris@0 | 8 /** |
Chris@0 | 9 * Call hooks |
Chris@0 | 10 */ |
Chris@0 | 11 class HookDispatcher |
Chris@0 | 12 { |
Chris@0 | 13 /** var HookManager */ |
Chris@0 | 14 protected $hookManager; |
Chris@0 | 15 protected $names; |
Chris@0 | 16 |
Chris@0 | 17 public function __construct(HookManager $hookManager, $names) |
Chris@0 | 18 { |
Chris@0 | 19 $this->hookManager = $hookManager; |
Chris@0 | 20 $this->names = $names; |
Chris@0 | 21 } |
Chris@0 | 22 |
Chris@0 | 23 public function getHooks($hooks, $annotationData = null) |
Chris@0 | 24 { |
Chris@0 | 25 return $this->hookManager->getHooks($this->names, $hooks, $annotationData); |
Chris@0 | 26 } |
Chris@0 | 27 } |