PHP 클래스 Silber\Bouncer\CachedClipboard

상속: extends Clipboard
파일 보기 프로젝트 열기: JosephSilber/bouncer 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$cache Illuminate\Contracts\Cache\Store The cache store.
$tag string The tag used for caching.

공개 메소드들

메소드 설명
__construct ( Illuminate\Contracts\Cache\Store $cache ) Constructor.
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.

보호된 메소드들

메소드 설명
deserializeAbilities ( array $abilities ) : Illuminate\Database\Eloquent\Collection Deserialize an array of abilities into a collection of models.
getCacheKey ( Model $model, string $type, boolean $allowed = true ) : string Get the cache key for the given model's cache type.
refreshAllIteratively ( ) : void Refresh the cache for all roles and users, iteratively.
sear ( string $key, callable $callback ) : mixed Get an item from the cache, or store the default value forever.
serializeAbilities ( Illuminate\Database\Eloquent\Collection $abilities ) : array Serialize a collection of ability models into a plain array.

메소드 상세

__construct() 공개 메소드

Constructor.
public __construct ( Illuminate\Contracts\Cache\Store $cache )
$cache Illuminate\Contracts\Cache\Store

deserializeAbilities() 보호된 메소드

Deserialize an array of abilities into a collection of models.
protected deserializeAbilities ( array $abilities ) : Illuminate\Database\Eloquent\Collection
$abilities array
리턴 Illuminate\Database\Eloquent\Collection

getAbilities() 공개 메소드

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

getCache() 공개 메소드

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

getCacheKey() 보호된 메소드

Get the cache key for the given model's cache type.
protected getCacheKey ( Model $model, string $type, boolean $allowed = true ) : string
$model Illuminate\Database\Eloquent\Model
$type string
$allowed boolean
리턴 string

getFreshAbilities() 공개 메소드

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
리턴 Illuminate\Database\Eloquent\Collection

getRoles() 공개 메소드

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

refresh() 공개 메소드

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

refreshAllIteratively() 보호된 메소드

Refresh the cache for all roles and users, iteratively.
protected refreshAllIteratively ( ) : void
리턴 void

refreshFor() 공개 메소드

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

sear() 보호된 메소드

Get an item from the cache, or store the default value forever.
protected sear ( string $key, callable $callback ) : mixed
$key string
$callback callable
리턴 mixed

serializeAbilities() 보호된 메소드

Serialize a collection of ability models into a plain array.
protected serializeAbilities ( Illuminate\Database\Eloquent\Collection $abilities ) : array
$abilities Illuminate\Database\Eloquent\Collection
리턴 array

setCache() 공개 메소드

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

프로퍼티 상세

$cache 보호되어 있는 프로퍼티

The cache store.
protected Store,Illuminate\Contracts\Cache $cache
리턴 Illuminate\Contracts\Cache\Store

$tag 보호되어 있는 프로퍼티

The tag used for caching.
protected string $tag
리턴 string