classConfiguration
final class Configuration
Restricted visibility: declared "@visibility root". Code outside that scope must not name this declaration.
Catalog settings read from a YAML document.
Properties§
public array<string, list<string>> $options = []public array<string, string> $functionModels = []public string|null $file = nullMethods§
public function __construct(
public array<string, list<string>> $options = [],
public array<string, string> $functionModels = [],
public string|null $file = null,
)Parameters
$options | array<string, list<string>> | Validated command defaults, including source paths |
$functionModels | array<string, string> | Function names mapped to autoloadable model callables |
$file | string|null | The configuration's filename, or null for empty defaults |
public static function load(string $path): selfReads a catalog configuration without executing it as PHP.
Parameters
$path | string |
Returns
selfThrows
InvalidConfigurationException When the file or its settings are invalidTest cases 4
Called from 2
Calls 13
- function-call
is_fileline 40 - function-call
is_readableline 40 - new InvalidConfigurationException line 41
- function-call
sprintfline 41 - static-call
Yaml::parseFile()line 44 - class-const
Yaml::PARSE_EXCEPTION_ON_INVALID_TYPE()line 44 - class-const
Yaml::PARSE_OBJECT_FOR_MAP()line 44 - new
stdClassline 49 - function-call
realpathline 54 - new
selfline 57 - static-call ConfigurationSchema::options() line 58
- function-call
dirnameline 58 - static-call ConfigurationSchema::models() line 59
Adds configured models to a copy of an analyzer's current registry.
Parameters
$models | Registry |
Returns
Throws
RuntimeException When a configured model cannot be resolvedCalled from 1
Calls 1
- static-call NamedModel::resolve() line 73
Test cases 9§
Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.
Dedicated tests 5
ConfigurationTest::testApplyPreservesTheOriginalRegistryAndOverridesTheBuiltincallsConfigurationTest::testLoadAcceptsAnEmptyDocumentcallsConfigurationTest::testLoadReadsSettingsRelativeToTheFilecallsConfigurationTest::testLoadRejectsInvalidDocumentscallsConfigurationTest::testLoadRejectsMissingFilescalls
Other tests reaching this symbol 4
Relations§
Instantiated in 4
- new SqlCatalog\Cli\CommandLine::__construct() packages/sql-catalog/src/Cli/CommandLine.php:46
- new SqlCatalog\Cli\CommandLineParser::parse() packages/sql-catalog/src/Cli/CommandLineParser.php:72
- new SqlCatalog\Cli\CommandLineParser::configuration() packages/sql-catalog/src/Cli/CommandLineParser.php:91
- new SqlCatalog\Cli\CommandLineParser::build() packages/sql-catalog/src/Cli/CommandLineParser.php:139
Static calls 2
Method calls 1
Type declarations 5
- type SqlCatalog\Cli\CatalogCommand packages/sql-catalog/src/Cli/CatalogCommand.php:100
- type SqlCatalog\Cli\CommandLine packages/sql-catalog/src/Cli/CommandLine.php:46
- type SqlCatalog\Cli\CommandLineParser packages/sql-catalog/src/Cli/CommandLineParser.php:85
- type SqlCatalog\Cli\CommandLineParser packages/sql-catalog/src/Cli/CommandLineParser.php:139
- type SqlCatalog\Facade\Analyzer packages/sql-catalog/src/Facade/Analyzer.php:76