PHP Class Bolt\Routing\CallbackResolver

Author: Carson Full ([email protected])
Inheritance: extends Silex\CallbackResolver
Mostra file Open project: bolt/bolt

Protected Properties

Property Type Description
$app Pimple
$classmap array

Public Methods

Method Description
__construct ( Pimple $app, array $classmap ) CallbackResolver Constructor.
convertCallback ( string $name ) : array Converts:
isValid ( string $name ) : boolean Returns true if the string is a valid service method representation or if the string/array references a class contained in the resolver's classmap.

Protected Methods

Method Description
instantiateClass ( string $class ) : object Create a new instance of a class.

Method Details

__construct() public method

CallbackResolver Constructor.
public __construct ( Pimple $app, array $classmap )
$app Pimple
$classmap array An array of class names as keys mapped to their service name as values Ex: 'Bolt\Controller\Frontend' => 'controller.frontend'

convertCallback() public method

- Bolt\\Controller\\Frontend::hompeage to controller.frontend:homepage - [Bolt\\Controller\\Frontend, homepage] to controller.frontend:homepage Those are then converted to valid callbacks with the controller object from application
public convertCallback ( string $name ) : array
$name string
return array A callable array

instantiateClass() protected method

Create a new instance of a class.
protected instantiateClass ( string $class ) : object
$class string
return object

isValid() public method

Returns true if the string is a valid service method representation or if the string/array references a class contained in the resolver's classmap.
public isValid ( string $name ) : boolean
$name string
return boolean

Property Details

$app protected_oe property

protected Pimple $app
return Pimple

$classmap protected_oe property

protected array $classmap
return array