PHP Class Silber\Bouncer\Database\Queries\AbilitiesForModel

Exibir arquivo Open project: JosephSilber/bouncer

Protected Properties

Property Type Description
$table string The name of the abilities table.

Public Methods

Method Description
__construct ( ) Constructor.
constrain ( Builder | Builder $query, Model | string $model, boolean $strict = false ) : void Constrain a query to an ability for a specific model or wildcard.

Protected Methods

Method Description
abilitySubqueryConstraint ( Model $model, boolean $strict ) : Closure Get the constraint for the ability subquery.
constrainByModel ( Builder | Builder $query, Model $model, boolean $strict = false ) : void Constrain a query to an ability for a specific model.
constrainByWildcard ( Builder | Builder $query, boolean $strict = false ) : void Constrain a query to a model wiildcard.

Method Details

__construct() public method

Constructor.
public __construct ( )

abilitySubqueryConstraint() protected method

Get the constraint for the ability subquery.
protected abilitySubqueryConstraint ( Model $model, boolean $strict ) : Closure
$model Illuminate\Database\Eloquent\Model
$strict boolean
return Closure

constrain() public method

Constrain a query to an ability for a specific model or wildcard.
public constrain ( Builder | Builder $query, Model | string $model, boolean $strict = false ) : void
$query Illuminate\Database\Eloquent\Builder | Illuminate\Database\Query\Builder
$model Illuminate\Database\Eloquent\Model | string
$strict boolean
return void

constrainByModel() protected method

Constrain a query to an ability for a specific model.
protected constrainByModel ( Builder | Builder $query, Model $model, boolean $strict = false ) : void
$query Illuminate\Database\Eloquent\Builder | Illuminate\Database\Query\Builder
$model Illuminate\Database\Eloquent\Model
$strict boolean
return void

constrainByWildcard() protected method

Constrain a query to a model wiildcard.
protected constrainByWildcard ( Builder | Builder $query, boolean $strict = false ) : void
$query Illuminate\Database\Eloquent\Builder | Illuminate\Database\Query\Builder
$strict boolean
return void

Property Details

$table protected_oe property

The name of the abilities table.
protected string $table
return string