1 | <?php |
||
18 | class Bootstrap extends BaseBootstrap |
||
19 | { |
||
20 | private $_apis = []; |
||
21 | |||
22 | private $_urlRules = []; |
||
23 | |||
24 | private $_apiRules = []; |
||
25 | |||
26 | private $_adminAssets = []; |
||
27 | |||
28 | private $_adminMenus = []; |
||
29 | |||
30 | private $_jsTranslations = []; |
||
31 | |||
32 | /** |
||
33 | * Before bootstrap run process. |
||
34 | * |
||
35 | * @param Application $app |
||
36 | * @see \luya\base\BaseBootstrap::beforeRun() |
||
37 | */ |
||
38 | public function beforeRun($app) |
||
39 | { |
||
40 | foreach ($app->tags as $name => $config) { |
||
41 | TagParser::inject($name, $config); |
||
42 | } |
||
43 | |||
44 | foreach ($this->getModules() as $id => $module) { |
||
45 | foreach ($module->urlRules as $key => $rule) { |
||
46 | if (is_string($key)) { |
||
47 | $this->_urlRules[$key] = $rule; |
||
48 | } else { |
||
49 | $this->_urlRules[] = $rule; |
||
50 | } |
||
51 | } |
||
52 | |||
53 | // get all api rules (since 1.0.10) |
||
54 | foreach ($module->apiRules as $endpoint => $rule) { |
||
55 | $this->_apiRules[$endpoint] = $rule; |
||
56 | } |
||
57 | |||
58 | /** |
||
59 | * 'api-admin-user' => 'admin\apis\UserController', |
||
60 | * 'api-cms-navcontainer' => 'admin\apis\NavContainerController' |
||
61 | */ |
||
62 | foreach ($module->apis as $alias => $class) { |
||
63 | $this->_apis[$alias] = ['class' => $class, 'module' => $module]; |
||
64 | } |
||
65 | |||
66 | foreach ($module->tags as $name => $config) { |
||
67 | TagParser::inject($name, $config); |
||
68 | } |
||
69 | } |
||
70 | } |
||
71 | |||
72 | /** |
||
73 | * Generate the rest rule defintions for {{luya\admin\Module::$apiDefintions}}. |
||
74 | * |
||
75 | * @param array $apis The array of apis where key is the api name `['api-admin-user' => 'admin\apis\UserController', ...]`. |
||
76 | * @param array $rules The new {{luya\base\Module::$apiRules}} defintion `['api-admin-user' => [...], 'api-admin-group' => []]`. |
||
77 | * @return array |
||
78 | */ |
||
79 | protected function generateApiRuleDefintions(array $apis, array $rules) |
||
100 | |||
101 | /** |
||
102 | * Invokes the bootstraping process. |
||
103 | * |
||
104 | * @param Application $app |
||
105 | * @see \luya\base\BaseBootstrap::run() |
||
106 | */ |
||
107 | public function run($app) |
||
149 | } |
||
150 |
An attempt at access to an undefined property has been detected. This may either be a typographical error or the property has been renamed but there are still references to its old name.
If you really want to allow access to undefined properties, you can define magic methods to allow access. See the php core documentation on Overloading.