Class ResolverFactory
The Resolver Factory resolves the class name by different configurably
methods applied to the type.
-
Charcoal\Factory\AbstractFactory
implements
Charcoal\Factory\FactoryInterface
-
Charcoal\Factory\ResolverFactory
Methods summary
public
|
|
public
Charcoal\Factory\ResolverFactory
|
#
setResolverPrefix( string $prefix )
Parameters
- $prefix
- The resolver prefix string.
Returns
Throws
InvalidArgumentException If the prefix argument is not a string.
|
public
string
|
|
public
Charcoal\Factory\ResolverFactory
|
#
setResolverSuffix( string $suffix )
Parameters
- $suffix
- The resolver suffix string.
Returns
Throws
InvalidArgumentException If the suffix argument is not a string.
|
public
string
|
|
public
Charcoal\Factory\ResolverFactory
|
#
setResolverCapitals( array $capitals )
Parameters
- $capitals
- The array of letter to "calitalize-next" (uppercase next letter in the string).
Returns
|
public
array
|
|
public
Charcoal\Factory\ResolverFactory
|
#
setResolverReplacements( array $replacements )
Parameters
- $replacements
- The array (key=>value) of replacements.
Returns
|
public
array
|
|
public
string
|
#
resolve( string $type )
Resolve the class name from the requested type.
Resolve the class name from the requested type.
Parameters
- $type
- The "type" of object to resolve (the object ident).
Returns
string The resolved class name (FQN).
Throws
InvalidArgumentException If the type parameter is not a string.
Overrides
|
public
boolean
|
#
isResolvable( string $type )
Parameters
- $type
- The "type" of object to resolve (the object ident).
Returns
boolean
Throws
InvalidArgumentException If the type parameter is not a string.
Overrides
|
Methods inherited from Charcoal\Factory\AbstractFactory
addClassToMap(),
arguments(),
baseClass(),
callback(),
create(),
createClass(),
defaultClass(),
get(),
map(),
resolver(),
setArguments(),
setBaseClass(),
setCallback(),
setDefaultClass()
|