| Total Complexity | 3 |
| Total Lines | 29 |
| Duplicated Lines | 0 % |
| Coverage | 0% |
| Changes | 0 | ||
| 1 | <?php |
||
| 17 | trait ViewFinderTrait |
||
| 18 | { |
||
| 19 | /** |
||
| 20 | * @var array list of ALL view names in the database |
||
| 21 | */ |
||
| 22 | private $_viewNames = []; |
||
| 23 | |||
| 24 | /** |
||
| 25 | * Returns all views names in the database. |
||
| 26 | * @param string $schema the schema of the views. Defaults to empty string, meaning the current or default schema. |
||
| 27 | * @return array all views names in the database. The names have NO schema name prefix. |
||
| 28 | */ |
||
| 29 | abstract protected function findViewNames($schema = ''); |
||
| 30 | |||
| 31 | /** |
||
| 32 | * Returns all view names in the database. |
||
| 33 | * @param string $schema the schema of the views. Defaults to empty string, meaning the current or default schema name. |
||
| 34 | * If not empty, the returned view names will be prefixed with the schema name. |
||
| 35 | * @param bool $refresh whether to fetch the latest available view names. If this is false, |
||
| 36 | * view names fetched previously (if available) will be returned. |
||
| 37 | * @return string[] all view names in the database. |
||
| 38 | */ |
||
| 39 | public function getViewNames($schema = '', $refresh = false) |
||
| 48 |