| 1: | <?php |
| 2: | |
| 3: | namespace LaravelUi5\Core\Ui5; |
| 4: | |
| 5: | use Flat3\Lodata\Endpoint; |
| 6: | use LaravelUi5\Core\Introspection\App\Ui5AppSource; |
| 7: | use LaravelUi5\Core\Ui5\Contracts\Ui5AppInterface; |
| 8: | use LaravelUi5\Core\Ui5\Contracts\Ui5ModuleInterface; |
| 9: | |
| 10: | abstract class AbstractUi5App extends Endpoint implements Ui5AppInterface |
| 11: | { |
| 12: | public function __construct(protected Ui5ModuleInterface $module) |
| 13: | { |
| 14: | parent::__construct($module->getSlug()); |
| 15: | } |
| 16: | |
| 17: | public function getModule(): Ui5ModuleInterface |
| 18: | { |
| 19: | return $this->module; |
| 20: | } |
| 21: | |
| 22: | public function getSource(): Ui5AppSource |
| 23: | { |
| 24: | return $this->module->getSourceStrategy()->createAppSource($this->getVendor()); |
| 25: | } |
| 26: | |
| 27: | public function getManifestPath(): string |
| 28: | { |
| 29: | return $this->module->getSourceStrategy()->getSourcePath() . '/manifest.json'; |
| 30: | } |
| 31: | } |
| 32: | |