PHP Class Silber\Bouncer\Factory

Show file Open project: JosephSilber/bouncer

Protected Properties

Property Type Description
$cache Illuminate\Contracts\Cache\Store The cache instance to use for the clipboard.
$clipboard Silber\Bouncer\Contracts\Clipboard The clipboard instance to use.
$gate Illuminate\Contracts\Auth\Access\Gate The gate instance to use.
$user Illuminate\Datbase\Eloquent\Model The user model to use for the gate.

Public Methods

Method Description
create ( Model $user = null ) : Bouncer Create an instance of Bouncer.
withCache ( Illuminate\Contracts\Cache\Store $cache ) Set the cache instance to use for the clipboard.
withClipboard ( Silber\Bouncer\Contracts\Clipboard $clipboard ) Set the instance of the clipboard to use.
withGate ( Illuminate\Contracts\Auth\Access\Gate $gate ) Set the gate instance to use.
withUser ( Model $user ) Set the user model to use for the gate.

Protected Methods

Method Description
getCacheStore ( ) : Illuminate\Contracts\Cache\Store Get an instance of the cache store.
getClipboard ( ) : Silber\Bouncer\Contracts\Clipboard Get an instance of the clipboard.
getContainer ( ) : Illuminate\Container\Container Get the container singleton.
getGate ( ) : Illuminate\Contracts\Auth\Access\Gate Get an instance of the gate.

Method Details

create() public method

Create an instance of Bouncer.
public create ( Model $user = null ) : Bouncer
$user Illuminate\Database\Eloquent\Model
return Bouncer

getCacheStore() protected method

Get an instance of the cache store.
protected getCacheStore ( ) : Illuminate\Contracts\Cache\Store
return Illuminate\Contracts\Cache\Store

getClipboard() protected method

Get an instance of the clipboard.
protected getClipboard ( ) : Silber\Bouncer\Contracts\Clipboard
return Silber\Bouncer\Contracts\Clipboard

getContainer() protected method

Get the container singleton.
protected getContainer ( ) : Illuminate\Container\Container
return Illuminate\Container\Container

getGate() protected method

Get an instance of the gate.
protected getGate ( ) : Illuminate\Contracts\Auth\Access\Gate
return Illuminate\Contracts\Auth\Access\Gate

withCache() public method

Set the cache instance to use for the clipboard.
public withCache ( Illuminate\Contracts\Cache\Store $cache )
$cache Illuminate\Contracts\Cache\Store

withClipboard() public method

Set the instance of the clipboard to use.
public withClipboard ( Silber\Bouncer\Contracts\Clipboard $clipboard )
$clipboard Silber\Bouncer\Contracts\Clipboard

withGate() public method

Set the gate instance to use.
public withGate ( Illuminate\Contracts\Auth\Access\Gate $gate )
$gate Illuminate\Contracts\Auth\Access\Gate

withUser() public method

Set the user model to use for the gate.
public withUser ( Model $user )
$user Illuminate\Database\Eloquent\Model

Property Details

$cache protected property

The cache instance to use for the clipboard.
protected Store,Illuminate\Contracts\Cache $cache
return Illuminate\Contracts\Cache\Store

$clipboard protected property

The clipboard instance to use.
protected Clipboard,Silber\Bouncer\Contracts $clipboard
return Silber\Bouncer\Contracts\Clipboard

$gate protected property

The gate instance to use.
protected Gate,Illuminate\Contracts\Auth\Access $gate
return Illuminate\Contracts\Auth\Access\Gate

$user protected property

The user model to use for the gate.
protected Model,Illuminate\Datbase\Eloquent $user
return Illuminate\Datbase\Eloquent\Model