classViewDefinitionSet
final class ViewDefinitionSet
The views a database has, in an order they can be created in.
A view may select from another, so recreating them in the shadow means having the ones a view depends on before it.
Methods§
public function register(string $viewName, ViewDefinition $definition): voidRegister.
Parameters
$viewName | string | |
$definition | ViewDefinition |
Test cases 7
ViewDefinitionSetTest::testHasAnswersForAViewTheSetKnowscovers and callsViewDefinitionSetTest::testHasAnyViewsIsFalseUntilOneIsRegisteredcovers and callsViewDefinitionSetTest::testKeepsCyclicDefinitionsDeterministiccovers and callsViewDefinitionSetTest::testOrdersThreeDependencyLevelscovers and callsViewDefinitionSetTest::testOrdersViewsAfterTheirDependenciescovers and callsViewDefinitionSetTest::testRegisterMakesAViewOneOfTheSetcovers and callsViewDefinitionSetTest::testRegisterUnderANameAlreadyThereTakesThePlaceOfItcovers and calls
public function has(string $viewName): boolReports whether.
Parameters
$viewName | string |
Returns
boolTest cases 1
ViewDefinitionSetTest::testHasAnswersForAViewTheSetKnowscovers and calls
public function hasAnyViews(): boolReports whether any views.
Returns
boolTest cases 1
ViewDefinitionSetTest::testHasAnyViewsIsFalseUntilOneIsRegisteredcovers and calls
public function orderedDefinitions(): array<string, ViewDefinition>Returns
array<string, ViewDefinition>Test cases 6
ViewDefinitionSetTest::testKeepsCyclicDefinitionsDeterministiccovers and callsViewDefinitionSetTest::testOrderedDefinitionsIsEmptyForASetWithNoViewscovers and callsViewDefinitionSetTest::testOrdersThreeDependencyLevelscovers and callsViewDefinitionSetTest::testOrdersViewsAfterTheirDependenciescovers and callsViewDefinitionSetTest::testRegisterMakesAViewOneOfTheSetcovers and callsViewDefinitionSetTest::testRegisterUnderANameAlreadyThereTakesThePlaceOfItcovers and calls
Calls 1
- function-call
array_filterline 60
Private surface 1§
Implementation details, listed for orientation only.
private array<string, ViewDefinition> $definitions = []Test cases 8§
Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.
Dedicated tests 8
ViewDefinitionSetTest::testHasAnswersForAViewTheSetKnowscovers and callsViewDefinitionSetTest::testHasAnyViewsIsFalseUntilOneIsRegisteredcovers and callsViewDefinitionSetTest::testKeepsCyclicDefinitionsDeterministiccovers and callsViewDefinitionSetTest::testOrderedDefinitionsIsEmptyForASetWithNoViewscovers and callsViewDefinitionSetTest::testOrdersThreeDependencyLevelscovers and callsViewDefinitionSetTest::testOrdersViewsAfterTheirDependenciescovers and callsViewDefinitionSetTest::testRegisterMakesAViewOneOfTheSetcovers and callsViewDefinitionSetTest::testRegisterUnderANameAlreadyThereTakesThePlaceOfItcovers and calls