| Total Complexity | 3 |
| Total Lines | 30 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 7 | trait ViewFinderTrait |
||
| 8 | { |
||
| 9 | private array $viewNames = []; |
||
| 10 | |||
| 11 | /** |
||
| 12 | * Returns all views names in the database. |
||
| 13 | * |
||
| 14 | * @param string $schema the schema of the views. Defaults to empty string, meaning the current or default schema. |
||
| 15 | * |
||
| 16 | * @return array all views names in the database. The names have NO schema name prefix. |
||
| 17 | */ |
||
| 18 | abstract protected function findViewNames(string $schema = ''): array; |
||
| 19 | |||
| 20 | /** |
||
| 21 | * Returns all view names in the database. |
||
| 22 | * |
||
| 23 | * @param string $schema the schema of the views. Defaults to empty string, meaning the current or default schema |
||
| 24 | * name. If not empty, the returned view names will be prefixed with the schema name. |
||
| 25 | * @param bool $refresh whether to fetch the latest available view names. If this is false, view names fetched |
||
| 26 | * previously (if available) will be returned. |
||
| 27 | * |
||
| 28 | * @return array all view names in the database. |
||
| 29 | */ |
||
| 30 | 1 | public function getViewNames(string $schema = '', bool $refresh = false): array |
|
| 39 |