SecurityConfigHandler
Parses a security.{php,xml,yml,yaml} file — <password_hashers>, <providers>, <firewalls> (each <firewall> carrying pattern, stateless, sessionless, entry-point, provider, and an ordered list of <authenticator ref="..."> elements) — into a canonical array of password-hasher/provider/firewall definitions.
This handler only produces that array — turning it into live Firewall/ AuthenticatorInterface objects is FirewallFactory’s job, kept separate so apps that assemble firewalls purely in PHP never need this class at all.
Not wired into Quiote\Config\defaults\config_handlers.xml (that file is core-only): a consuming app registers a <handler pattern="..." class="Quiote\Security\Auth\Config\SecurityConfigHandler"> entry in its own config_handlers.xml, exactly as any other non-core-default config kind does (see Quiote\Config\RbacDefinitionConfigHandler for the identical, core-default case of this same mechanism).
Synopsis
Section titled “Synopsis”class SecurityConfigHandler extends XmlConfigHandler implements IArrayConfigHandler, IPositionAwareConfigHandler, ISchemaAwareConfigHandler
| Extends | XmlConfigHandler |
| Implements | IArrayConfigHandler, IPositionAwareConfigHandler, ISchemaAwareConfigHandler |
| Since | 1.0.0 |
| Source | Config/SecurityConfigHandler.php |
Constants
Section titled “Constants”| Constant | Value | Description |
|---|---|---|
XML_NAMESPACE | 'http://quiote.dev/quiote/config/parts/security/1.1' |
Methods
Section titled “Methods”execute()
Section titled “execute()”public function execute(XmlConfigDomDocument $document): mixed
The parsed security.xml document.
| Parameter | Type | Description |
|---|---|---|
$document | XmlConfigDomDocument | The parsed security.xml document. |
Returns mixed — The canonical array (see toCanonicalArray()) as the declaration to be cached.
| Throws | When |
|---|---|
UnreadableException | If a requested configuration file does not exist or is not readable. |
ParseException | If a requested configuration file is improperly formatted. |
executeArray()
Section titled “executeArray()”public function executeArray(array{password_hasher_algorithm: ?string, providers: array<string, array{type: string, connection: ?string, table: ?string, identifier_column: ?string, password_column: ?string}>, firewalls: array<string, array{pattern: string, stateless: bool, sessionless: bool, entry_point: ?string, provider: ?string, authenticators: array<int, string>}>} $config, ?string $sourceRef = null): mixed
Origin reference for the compiled cache file’s header comment.
| Parameter | Type | Description |
|---|---|---|
$config | array{password_hasher_algorithm: ?string, providers: array<string, array{type: string, connection: ?string, table: ?string, identifier_column: ?string, password_column: ?string}>, firewalls: array<string, array{pattern: string, stateless: bool, sessionless: bool, entry_point: ?string, provider: ?string, authenticators: array<int, string>}>} | The canonical config array, matching the shape returned by toCanonicalArray(). |
$sourceRef | ?``string | Origin reference for the compiled cache file’s header comment. |
Returns mixed — The declaration to be cached, exactly as execute() returns.
schema()
Section titled “schema()”public function schema(): Rule
Returns the structural rule the handler’s canonical array must satisfy.
The rule describes the shape produced by the handler’s toCanonicalArray(), whatever source format that array came from, so a PHP-array or YAML config is checked against exactly the same structure as the XML one.
Returns Rule — The structural schema for the canonical array returned by toCanonicalArray().
toCanonicalArray()
Section titled “toCanonicalArray()”public function toCanonicalArray(XmlConfigDomDocument $document): array{password_hasher_algorithm: ?string, providers: array<string, array{type: string, connection: ?string, table: ?string, identifier_column: ?string, password_column: ?string}>, firewalls: array<string, array{pattern: string, stateless: bool, sessionless: bool, entry_point: ?string, provider: ?string, authenticators: array<int, string>}>}
The parsed security.xml document.
| Parameter | Type | Description |
|---|---|---|
$document | XmlConfigDomDocument | The parsed security.xml document. |
Returns array{password_hasher_algorithm: ?string, providers: array<string, array{type: string, connection: ?string, table: ?string, identifier_column: ?string, password_column: ?string}>, firewalls: array<string, array{pattern: string, stateless: bool, sessionless: bool, entry_point: ?string, provider: ?string, authenticators: array<int, string>}>}
toCanonicalArrayWithPositions()
Section titled “toCanonicalArrayWithPositions()”public function toCanonicalArrayWithPositions(XmlConfigDomDocument $document, ElementPositionIndex $positions): array{data: array{password_hasher_algorithm: ?string, providers: array<string, array{type: string, connection: ?string, table: ?string, identifier_column: ?string, password_column: ?string}>, firewalls: array<string, array{pattern: string, stateless: bool, sessionless: bool, entry_point: ?string, provider: ?string, authenticators: array<int, string>}>}, positions: array<string, array{file: string, line: int}>}
Correlates surviving elements back to their source file/line.
| Parameter | Type | Description |
|---|---|---|
$document | XmlConfigDomDocument | The parsed security.xml document. |
$positions | ElementPositionIndex | Correlates surviving elements back to their source file/line. |
Returns array{data: array{password_hasher_algorithm: ?string, providers: array<string, array{type: string, connection: ?string, table: ?string, identifier_column: ?string, password_column: ?string}>, firewalls: array<string, array{pattern: string, stateless: bool, sessionless: bool, entry_point: ?string, provider: ?string, authenticators: array<int, string>}>}, positions: array<string, array{file: string, line: int}>}
Inherited methods
Section titled “Inherited methods”These come from an ancestor and are documented where they are declared.
| Method | Declared in | Description |
|---|---|---|
appendParameter() | ParameterHolder | Append a parameter. |
appendParameterByRef() | ParameterHolder | Append a parameter by reference. |
clearParameters() | ParameterHolder | Clear all parameters associated with this request. |
getFlatParameterNames() | ParameterHolder | Retrieve an array of flattened parameter names. |
getParameter() | ParameterHolder | Retrieve a parameter. |
getParameterNames() | ParameterHolder | Retrieve an array of parameter names. |
getParameters() | ParameterHolder | Retrieve an array of parameters. |
hasParameter() | ParameterHolder | Indicates whether or not a parameter exists. |
initialize() | XmlConfigHandler | Initialize this ConfigHandler. |
literalize() | BaseConfigHandler | Literalize a string value. |
removeParameter() | ParameterHolder | Remove a parameter. |
replaceConstants() | BaseConfigHandler | Replace configuration directive identifiers in a string. |
replacePath() | BaseConfigHandler | Replace a relative filesystem path with an absolute one. |
reset() | ParameterHolder | Removes every parameter held, leaving the holder empty for reuse. |
setParameter() | ParameterHolder | Set a parameter. |
setParameterByRef() | ParameterHolder | Set a parameter by reference. |
setParameters() | ParameterHolder | Set an array of parameters. |
setParametersByRef() | ParameterHolder | Set an array of parameters by reference. |