| 1 | <?php |
||
| 10 | abstract class AbstractPass implements PassInterface |
||
| 11 | { |
||
| 12 | /** |
||
| 13 | * @var bool Whether the current set of strings is optional |
||
| 14 | */ |
||
| 15 | protected $isOptional; |
||
| 16 | |||
| 17 | /** |
||
| 18 | * {@inheritdoc} |
||
| 19 | */ |
||
| 20 | 27 | public function run(array $strings) |
|
| 28 | |||
| 29 | /** |
||
| 30 | * Process the list of strings after the pass is run |
||
| 31 | * |
||
| 32 | * @param array[] $strings |
||
| 33 | * @return array[] |
||
| 34 | */ |
||
| 35 | 27 | protected function afterRun(array $strings) |
|
| 44 | |||
| 45 | /** |
||
| 46 | * Prepare the list of strings before the pass is run |
||
| 47 | * |
||
| 48 | * @param array[] $strings |
||
| 49 | * @return array[] |
||
| 50 | */ |
||
| 51 | 27 | protected function beforeRun(array $strings) |
|
| 61 | |||
| 62 | /** |
||
| 63 | * Process a given list of strings |
||
| 64 | * |
||
| 65 | * @param array[] $strings |
||
| 66 | * @return array[] |
||
| 67 | */ |
||
| 68 | abstract protected function processStrings(array $strings); |
||
| 69 | } |