PHP Class Silber\Bouncer\Conductors\ChecksRole

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

Protected Properties

Property Type Description
$authority Illuminate\Database\Eloquent\Model The authority against which to check for roles.
$clipboard Silber\Bouncer\Clipboard The bouncer clipboard instance.

Public Methods

Method Description
__construct ( Model $authority, Clipboard $clipboard ) Constructor.
a ( string $role ) : boolean Check if the authority has any of the given roles.
all ( string $role ) : boolean Check if the authority has all of the given roles.
an ( string $role ) : boolean Alias to the "a" method.
notA ( string $role ) : boolean Check if the authority doesn't have any of the given roles.
notAn ( string $role ) : boolean Alias to the "notA" method.

Method Details

__construct() public method

Constructor.
public __construct ( Model $authority, Clipboard $clipboard )
$authority Illuminate\Database\Eloquent\Model
$clipboard Silber\Bouncer\Clipboard

a() public method

Check if the authority has any of the given roles.
public a ( string $role ) : boolean
$role string
return boolean

all() public method

Check if the authority has all of the given roles.
public all ( string $role ) : boolean
$role string
return boolean

an() public method

Alias to the "a" method.
public an ( string $role ) : boolean
$role string
return boolean

notA() public method

Check if the authority doesn't have any of the given roles.
public notA ( string $role ) : boolean
$role string
return boolean

notAn() public method

Alias to the "notA" method.
public notAn ( string $role ) : boolean
$role string
return boolean

Property Details

$authority protected_oe property

The authority against which to check for roles.
protected Model,Illuminate\Database\Eloquent $authority
return Illuminate\Database\Eloquent\Model

$clipboard protected_oe property

The bouncer clipboard instance.
protected Clipboard,Silber\Bouncer $clipboard
return Silber\Bouncer\Clipboard