Overview

Namespaces

  • Charcoal
    • Factory

Classes

  • AbstractFactory
  • GenericFactory
  • GenericResolver
  • MapFactory
  • ResolverFactory

Interfaces

  • FactoryInterface
  • Overview
  • Namespace
  • Class

Class GenericResolver

Converts the given type into a class name.

Namespace: Charcoal\Factory
Located at Charcoal/Factory/GenericResolver.php
Methods summary
public
# __construct( array $data = null )

Parameters

$data
Optional class dependencies. Will use default values if none are provided.
public string
# __invoke( string $type )

Resolver needs to be callable

Resolver needs to be callable

Parameters

$type
The "type" of object to resolve (the object ident).

Returns

string
The resolved class name (FQN).
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.
API documentation generated by ApiGen