1 | <?php |
||
26 | abstract class Hook extends Base |
||
27 | { |
||
28 | /** |
||
29 | * Hook to execute |
||
30 | * |
||
31 | * @var string |
||
32 | */ |
||
33 | protected $hookName; |
||
34 | |||
35 | /** |
||
36 | * Path to the configuration file to use. |
||
37 | * |
||
38 | * @var string |
||
39 | */ |
||
40 | protected $configFile; |
||
41 | |||
42 | /** |
||
43 | * Path to the git repository to use. |
||
44 | * |
||
45 | * @var string |
||
46 | */ |
||
47 | protected $repositoryPath; |
||
48 | |||
49 | /** |
||
50 | * Hook constructor. |
||
51 | * |
||
52 | * @param string $configFile |
||
53 | * @param string $repositoryPath |
||
54 | */ |
||
55 | 4 | public function __construct(string $configFile, string $repositoryPath) |
|
61 | |||
62 | /** |
||
63 | * Configure the command. |
||
64 | */ |
||
65 | 4 | protected function configure() |
|
71 | |||
72 | /** |
||
73 | * Execute the command. |
||
74 | * |
||
75 | * @param \Symfony\Component\Console\Input\InputInterface $input |
||
76 | * @param \Symfony\Component\Console\Output\OutputInterface $output |
||
77 | * @return void |
||
78 | */ |
||
79 | 4 | protected function execute(InputInterface $input, OutputInterface $output) |
|
93 | |||
94 | /** |
||
95 | * Setup the command. |
||
96 | * |
||
97 | * @param \Symfony\Component\Console\Input\InputInterface $input |
||
98 | * @param \Symfony\Component\Console\Output\OutputInterface $output |
||
99 | * @param \SebastianFeldmann\CaptainHook\Config $config |
||
100 | * @param \SebastianFeldmann\Git\Repository $repository |
||
101 | */ |
||
102 | protected function setup(InputInterface $input, OutputInterface $output, Config $config, Repository $repository) |
||
106 | } |
||
107 |