classLoader
final class Loader
Restricted visibility: declared "@visibility root" and "@visibility Deriver\Command". Code outside that scope must not name this declaration.
Reads YAML command settings and anchors configured paths to their configuration file.
Methods§
public function load(?string $path = null): ConfigurationExplicit files are required to exist; null selects defaults without file discovery.
Parameters
$path | ?string |
Returns
Throws
ConfigurationException If the file cannot be read or contains invalid settingsTest cases 7
LoaderTest::testLoadAnchorsDefaultRootForAnEmptyFilecallsLoaderTest::testLoadAnchorsRelativeRootsToTheConfigurationDirectorycallsLoaderTest::testLoadRejectsMalformedYamlWithItsCausecallsLoaderTest::testLoadRejectsMissingFilescallsLoaderTest::testLoadRejectsObjectTagscallsLoaderTest::testLoadRejectsScalarDocumentscallsLoaderTest::testLoadWithoutAPathUsesDefaultscalls
Called from 1
Calls 14
- static-call Configuration::fromArray() line 25
- function-call
str_containsline 27 - function-call
is_fileline 27 - function-call
is_readableline 27 - new ConfigurationException line 28
- function-call
set_error_handlerline 30 - function-call
file_get_contentsline 34 - function-call
restore_error_handlerline 36 - static-call
Yaml::parse()line 42 - class-const
Yaml::PARSE_EXCEPTION_ON_INVALID_TYPE()line 42 - function-call
is_arrayline 49 - function-call
array_mapline 53 - function-call
preg_matchline 53 - function-call
dirnameline 53
Test cases 7§
Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.
Dedicated tests 7
LoaderTest::testLoadAnchorsDefaultRootForAnEmptyFilecallsLoaderTest::testLoadAnchorsRelativeRootsToTheConfigurationDirectorycallsLoaderTest::testLoadRejectsMalformedYamlWithItsCausecallsLoaderTest::testLoadRejectsMissingFilescallsLoaderTest::testLoadRejectsObjectTagscallsLoaderTest::testLoadRejectsScalarDocumentscallsLoaderTest::testLoadWithoutAPathUsesDefaultscalls