| 1 | <?php |
||
| 16 | abstract class Stub implements Node |
||
| 17 | { |
||
| 18 | protected $phar; |
||
| 19 | protected $appName; |
||
| 20 | protected $appVersion; |
||
| 21 | |||
| 22 | /** |
||
| 23 | * Writes the header stub to the phar. |
||
| 24 | * |
||
| 25 | * @param \Phar $phar |
||
| 26 | * @param string $appName |
||
| 27 | * @param string $appVersion |
||
| 28 | */ |
||
| 29 | public function __construct(\Phar $phar, $appName, $appVersion) |
||
| 35 | |||
| 36 | |||
| 37 | /** |
||
| 38 | * Compiles into the specified buffer. |
||
| 39 | * |
||
| 40 | * @param \Zicht\Tool\Script\Buffer $buffer |
||
| 41 | * @return void |
||
| 42 | */ |
||
| 43 | final public function compile(Buffer $buffer) |
||
| 57 | |||
| 58 | |||
| 59 | /** |
||
| 60 | * Should compile the initialization code into the buffer. |
||
| 61 | * |
||
| 62 | * @param \Zicht\Tool\Script\Buffer $buffer |
||
| 63 | * @return void |
||
| 64 | */ |
||
| 65 | abstract protected function compileInitialization(Buffer $buffer); |
||
| 66 | } |
||
| 67 |