123456789101112131415161718192021222324252627282930313233343536373839404142434445464748 |
- <?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];
- }
- }
|