PHP Trait Silber\Bouncer\Database\Authorizable

ファイルを表示 Open project: JosephSilber/bouncer

Public Methods

Method Description
can ( string $ability, Model | null $model = null ) : boolean Determine if the authority has a given ability.
cannot ( string $ability, Model | null $model = null ) : boolean Determine if the authority does not have a given ability.
cant ( string $ability, Model | null $model = null ) : boolean Determine if the authority does not have a given ability.

Protected Methods

Method Description
getClipboardInstance ( ) : Clipboard Get an instance of the bouncer's clipboard.

Method Details

can() public method

Determine if the authority has a given ability.
public can ( string $ability, Model | null $model = null ) : boolean
$ability string
$model Illuminate\Database\Eloquent\Model | null
return boolean

cannot() public method

Determine if the authority does not have a given ability.
public cannot ( string $ability, Model | null $model = null ) : boolean
$ability string
$model Illuminate\Database\Eloquent\Model | null
return boolean

cant() public method

Determine if the authority does not have a given ability.
public cant ( string $ability, Model | null $model = null ) : boolean
$ability string
$model Illuminate\Database\Eloquent\Model | null
return boolean

getClipboardInstance() protected method

Get an instance of the bouncer's clipboard.
protected getClipboardInstance ( ) : Clipboard
return Silber\Bouncer\Clipboard