1: | <?php |
2: | /** |
3: | * This code is licensed under AGPLv3 license or Afterlogic Software License |
4: | * if commercial version of the product was purchased. |
5: | * For full statements of the licenses see LICENSE-AFTERLOGIC and LICENSE-AGPL3 files. |
6: | */ |
7: | |
8: | namespace Aurora\System\Module; |
9: | |
10: | /** |
11: | * @license https://www.gnu.org/licenses/agpl-3.0.html AGPL-3.0 |
12: | * @license https://afterlogic.com/products/common-licensing Afterlogic Software License |
13: | * @copyright Copyright (c) 2019, Afterlogic Corp. |
14: | * |
15: | * @package Api |
16: | */ |
17: | abstract class AbstractEntries |
18: | { |
19: | protected AbstractModule $module; |
20: | |
21: | protected $entries = []; |
22: | |
23: | public function __construct(AbstractModule $module) |
24: | { |
25: | $this->module = $module; |
26: | } |
27: | |
28: | final public function init() |
29: | { |
30: | if ($this->entries) { |
31: | \Aurora\System\Router::getInstance()->registerArray( |
32: | $this->module->getModuleName(), |
33: | $this->entries |
34: | ); |
35: | } |
36: | } |
37: | } |
38: |