1 | <?php |
||
32 | class ThemeManager extends \hiqdev\yii2\collection\Manager implements \yii\base\BootstrapInterface |
||
33 | { |
||
34 | /** |
||
35 | * {@inheritdoc} |
||
36 | */ |
||
37 | protected $_itemClass = Theme::class; |
||
38 | |||
39 | /** |
||
40 | * @var array additional dirs to look for views. |
||
41 | */ |
||
42 | public $pathDirs = []; |
||
43 | |||
44 | /** |
||
45 | * @var string default theme name |
||
46 | */ |
||
47 | protected $_defaultTheme; |
||
48 | |||
49 | /** |
||
50 | * Sets the default theme name. |
||
51 | * |
||
52 | * @param string $theme default theme name. |
||
53 | */ |
||
54 | public function setDefaultTheme($theme) |
||
58 | |||
59 | /** |
||
60 | * Returns the default theme. Returns the first of available themes by default. |
||
61 | * |
||
62 | * @return string default theme name. |
||
63 | */ |
||
64 | public function getDefaultTheme() |
||
73 | |||
74 | protected $_view; |
||
75 | |||
76 | /** |
||
77 | * Returns the view object that can be used to render views or view files. |
||
78 | * The [[render()]] and [[renderFile()]] methods will use |
||
79 | * this view object to implement the actual view rendering. |
||
80 | * If not set, it will default to the "view" application component. |
||
81 | * |
||
82 | * @return \yii\web\View the view object that can be used to render views or view files. |
||
83 | */ |
||
84 | public function getView() |
||
92 | |||
93 | /** |
||
94 | * Sets the view object to be used. |
||
95 | * |
||
96 | * @param View $view the view object that can be used to render views or view files. |
||
97 | */ |
||
98 | public function setView($view) |
||
102 | |||
103 | /** |
||
104 | * @var Theme current theme object |
||
105 | */ |
||
106 | protected $_theme; |
||
107 | |||
108 | /** |
||
109 | * Changes theme. |
||
110 | * |
||
111 | * @param string theme name |
||
112 | * |
||
113 | * @throws InvalidConfigException |
||
114 | */ |
||
115 | public function setTheme($name) |
||
122 | |||
123 | public function getTheme() |
||
135 | |||
136 | public function getSettings() |
||
140 | |||
141 | /** |
||
142 | * @return bool |
||
143 | */ |
||
144 | public static function isHomePage() |
||
150 | |||
151 | /** |
||
152 | * @var array assets of the application |
||
153 | */ |
||
154 | public $assets = []; |
||
155 | |||
156 | /** |
||
157 | * Register all the assets. |
||
158 | */ |
||
159 | public function registerAssets() |
||
168 | |||
169 | /** |
||
170 | * @var bool is already bootstrapped. |
||
171 | */ |
||
172 | protected $_isBootstrapped = false; |
||
173 | |||
174 | /** |
||
175 | * {@inheritdoc} |
||
176 | */ |
||
177 | public function bootstrap($app) |
||
193 | |||
194 | /* public function init() |
||
195 | { |
||
196 | parent::init(); |
||
197 | } */ |
||
198 | } |
||
199 |
Since your code implements the magic getter
_get
, this function will be called for any read access on an undefined variable. You can add the@property
annotation to your class or interface to document the existence of this variable.If the property has read access only, you can use the @property-read annotation instead.
Of course, you may also just have mistyped another name, in which case you should fix the error.
See also the PhpDoc documentation for @property.