PHP Interface Silber\Bouncer\Contracts\CachedClipboard

Inheritance: extends Silber\Bouncer\Contracts\Clipboard
Show file Open project: JosephSilber/bouncer

Public Methods

Method Description
getAbilities ( Model $authority, boolean $allowed = true ) : Illuminate\Database\Eloquent\Collection Get the given authority's abilities.
getCache ( ) : Illuminate\Contracts\Cache\Store Get the cache instance.
getFreshAbilities ( Model $authority, boolean $allowed ) : Illuminate\Database\Eloquent\Collection Get a fresh copy of the given authority's abilities.
getRoles ( Model $authority ) : Collection Get the given authority's roles.
refresh ( null | Model $authority = null ) Clear the cache.
refreshFor ( Model $authority ) Clear the cache for the given authority.
setCache ( Illuminate\Contracts\Cache\Store $cache ) Set the cache instance.

Method Details

getAbilities() public method

Get the given authority's abilities.
public getAbilities ( Model $authority, boolean $allowed = true ) : Illuminate\Database\Eloquent\Collection
$authority Illuminate\Database\Eloquent\Model
$allowed boolean
return Illuminate\Database\Eloquent\Collection

getCache() public method

Get the cache instance.
public getCache ( ) : Illuminate\Contracts\Cache\Store
return Illuminate\Contracts\Cache\Store

getFreshAbilities() public method

Get a fresh copy of the given authority's abilities.
public getFreshAbilities ( Model $authority, boolean $allowed ) : Illuminate\Database\Eloquent\Collection
$authority Illuminate\Database\Eloquent\Model
$allowed boolean
return Illuminate\Database\Eloquent\Collection

getRoles() public method

Get the given authority's roles.
public getRoles ( Model $authority ) : Collection
$authority Illuminate\Database\Eloquent\Model
return Illuminate\Support\Collection

refresh() public method

Clear the cache.
public refresh ( null | Model $authority = null )
$authority null | Illuminate\Database\Eloquent\Model

refreshFor() public method

Clear the cache for the given authority.
public refreshFor ( Model $authority )
$authority Illuminate\Database\Eloquent\Model

setCache() public method

Set the cache instance.
public setCache ( Illuminate\Contracts\Cache\Store $cache )
$cache Illuminate\Contracts\Cache\Store