LowerCaseServiceNameTrait
Trait for plugin managers that allows service names to be normalized to lowercase (for backward compatibility with ServiceManager v2).
Tags
Table of Contents
- get() : mixed
- Retrieve a plugin
- has() : bool
- Returns true if the container can return an entry for the given identifier.
- getNormalizedServiceName() : string
- Hack for backward compatibility with services defined under ServiceManager v2, when service names were case-insensitive.
Methods
get()
Retrieve a plugin
public
get(string $name[, null|array<string|int, mixed> $options = null ]) : mixed
Parameters
- $name : string
-
Name of plugin
- $options : null|array<string|int, mixed> = null
-
Options to use when creating the instance.
Return values
mixed —has()
Returns true if the container can return an entry for the given identifier.
public
has(string $id) : bool
Returns false otherwise.
Parameters
- $id : string
-
Identifier of the entry to look for.
Return values
bool —getNormalizedServiceName()
Hack for backward compatibility with services defined under ServiceManager v2, when service names were case-insensitive.
protected
getNormalizedServiceName(string $name) : string
TODO: set up aliases and/or normalize code to eliminate the need for this.
Parameters
- $name : string
-
Service name