PHP Class Predis\Silex\ClientServiceProvider

Author: Daniele Alessandri ([email protected])
Inheritance: implements Pimple\ServiceProviderInterface
Mostra file Open project: nrk/PredisServiceProvider Class Usage Examples

Protected Properties

Property Type Description
$prefix

Public Methods

Method Description
__construct ( string $prefix = 'predis' )
register ( Pimple\Container $app )

Protected Methods

Method Description
getClientInitializer ( Pimple\Container $app, string $prefix ) : Closure Returns an anonymous function used by the service provider initialize lazily new instances of Predis\Client.
getProviderHandler ( Pimple\Container $app, string $prefix ) : mixed Returns an anonymous function used by the service provider to handle accesses to the root prefix.

Method Details

__construct() public method

public __construct ( string $prefix = 'predis' )
$prefix string Prefix name used to register the service provider in Silex.

getClientInitializer() protected method

Returns an anonymous function used by the service provider initialize lazily new instances of Predis\Client.
protected getClientInitializer ( Pimple\Container $app, string $prefix ) : Closure
$app Pimple\Container
$prefix string
return Closure

getProviderHandler() protected method

Returns an anonymous function used by the service provider to handle accesses to the root prefix.
protected getProviderHandler ( Pimple\Container $app, string $prefix ) : mixed
$app Pimple\Container
$prefix string
return mixed

register() public method

public register ( Pimple\Container $app )
$app Pimple\Container

Property Details

$prefix protected_oe property

protected $prefix