| 1 | <?php |
||
| 3 | abstract class UpdateComposer extends Object |
||
| 4 | { |
||
| 5 | protected $composerJsonObj = null; |
||
| 6 | |||
| 7 | public function __construct($composerJsonObj) |
||
| 8 | { |
||
| 9 | $this->composerJsonObj = $composerJsonObj; |
||
| 10 | if (! $this->composerJsonObj->getJsonData()) { |
||
| 11 | user_error('No Json data!'); |
||
| 12 | } |
||
| 13 | } |
||
| 14 | |||
| 15 | abstract public function run(); |
||
| 16 | |||
| 17 | /** |
||
| 18 | * @return array |
||
| 19 | */ |
||
| 20 | protected function getJsonData() |
||
| 21 | { |
||
| 22 | return $this->composerJsonObj->getJsonData(); |
||
| 23 | } |
||
| 24 | |||
| 25 | /** |
||
| 26 | * @param array $array [description] |
||
| 27 | */ |
||
| 28 | protected function setJsonData(array $array) |
||
| 31 | } |
||
| 32 | } |
||
| 33 |