1234567891011121314151617181920212223242526272829303132333435363738394041424344454647 |
- <?php
- namespace yii\db;
- trait ViewFinderTrait
- {
-
- private $_viewNames = [];
-
- abstract protected function findViewNames($schema = '');
-
- public function getViewNames($schema = '', $refresh = false)
- {
- if (!isset($this->_viewNames[$schema]) || $refresh) {
- $this->_viewNames[$schema] = $this->findViewNames($schema);
- }
- return $this->_viewNames[$schema];
- }
- }
|