Skip to content

Latest commit

 

History

History
926 lines (712 loc) · 22.5 KB

ConfigurationParameterBag.md

File metadata and controls

926 lines (712 loc) · 22.5 KB

BumbleDocGen / Technical description of the project / Class map / ConfigurationParameterBag


namespace BumbleDocGen\Core\Configuration;

final class ConfigurationParameterBag
Wrapper for getting raw configuration file data

Initialization methods:

  1. __construct

Methods:

  1. addValueFromFileIfNotExists
  2. addValueIfNotExists
  3. get
  4. getAll
  5. getConfigValues
  6. getConfigVersion
  7. getSubConfigurationParameterBag
  8. has
  9. loadFromArray
  10. loadFromFiles
  11. resolveValue
  12. set
  13. validateAndGetBooleanValue
  14. validateAndGetClassListValue
  15. validateAndGetClassValue
  16. validateAndGetDirectoryPathValue
  17. validateAndGetFilePathValue
  18. validateAndGetStringValue

Method details:

public function __construct(\BumbleDocGen\Core\Configuration\ValueTransformer\ValueToClassTransformer $valueToClassTransformer, array $resolvers);

Parameters:

Name Type Description
$valueToClassTransformer \BumbleDocGen\Core\Configuration\ValueTransformer\ValueToClassTransformer -
$resolvers array -

public function addValueFromFileIfNotExists(string $name, string ...$fileNames): void;

Parameters:

Name Type Description
$name string -
$fileNames (variadic) string -

Return value: void


public function addValueIfNotExists(string $name, mixed $value): void;

Parameters:

Name Type Description
$name string -
$value mixed -

Return value: void


public function get(string $name, bool $useResolvers = true): mixed;

Parameters:

Name Type Description
$name string -
$useResolvers bool -

Return value: mixed

Throws:


public function getAll(bool $useResolvers = true): array;

Parameters:

Name Type Description
$useResolvers bool -

Return value: array


public function getConfigValues(string ...$configurationFiles): array;

Parameters:

Name Type Description
$configurationFiles (variadic) string -

Return value: array


public function getConfigVersion(): string;

Parameters: not specified

Return value: string


public function getSubConfigurationParameterBag(string $parentKey): \BumbleDocGen\Core\Configuration\ConfigurationParameterBag;

Parameters:

Name Type Description
$parentKey string -

Return value: \BumbleDocGen\Core\Configuration\ConfigurationParameterBag


public function has(mixed $name): bool;

Parameters:

Name Type Description
$name mixed -

Return value: bool


public function loadFromArray(array $parameters): void;

Parameters:

Name Type Description
$parameters array -

Return value: void


public function loadFromFiles(string ...$fileNames): void;

Parameters:

Name Type Description
$fileNames (variadic) string -

Return value: void


public function resolveValue(mixed $value): mixed;

Parameters:

Name Type Description
$value mixed -

Return value: mixed


public function set(string $name, mixed $value): void;

Parameters:

Name Type Description
$name string -
$value mixed -

Return value: void


public function validateAndGetBooleanValue(string $parameterName): bool;

Parameters:

Name Type Description
$parameterName string -

Return value: bool

Throws:


public function validateAndGetClassListValue(string $parameterName, string $classInterfaceName, bool $nullable = true): array;

Parameters:

Name Type Description
$parameterName string -
$classInterfaceName string -
$nullable bool -

Return value: array

Throws:


public function validateAndGetClassValue(string $parameterName, string $classInterfaceName): object;

Parameters:

Name Type Description
$parameterName string -
$classInterfaceName string -

Return value: object

Throws:


public function validateAndGetDirectoryPathValue(string $parameterName, bool $nullable = true): string|null;

Parameters:

Name Type Description
$parameterName string -
$nullable bool -

Return value: string | null

Throws:


public function validateAndGetFilePathValue(string $parameterName, array $fileExtensions, bool $nullable = true): string|null;

Parameters:

Name Type Description
$parameterName string -
$fileExtensions string[] -
$nullable bool -

Return value: string | null

Throws:


public function validateAndGetStringValue(string $parameterName, bool $nullable = true): string|null;

Parameters:

Name Type Description
$parameterName string -
$nullable bool -

Return value: string | null

Throws: