PHP 클래스 Silber\Bouncer\Database\Models

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

보호된 프로퍼티들

프로퍼티 타입 설명
$models array Map for the bouncer's models.
$ownership array Holds the map of ownership for models.
$prefix string The prefix for the tables.
$tables array Map for the bouncer's tables.

공개 메소드들

메소드 설명
ability ( array $attributes = [] ) : Ability Get an instance of the ability model.
classname ( string $model ) : string Get the classname mapping for the given model.
isOwnedBy ( Model $authority, Model $model ) : boolean Determines whether the given model is owned by the given authority.
ownedVia ( string | Closure $model, string | Closure | null $attribute = null ) : void Register an attribute/callback to determine if a model is owned by a given authority.
prefix ( ) : string Get the prefix for the tables.
reset ( ) : void Reset all settings to their original state.
role ( array $attributes = [] ) : Role Get an instance of the role model.
setAbilitiesModel ( string $model ) : void Set the model to be used for abilities.
setPrefix ( string $prefix ) : void Set the prefix for the tables.
setRolesModel ( string $model ) : void Set the model to be used for roles.
setTables ( array $map ) : void Set custom table names.
setUsersModel ( string $model ) : void Set the model to be used for users.
table ( string $table ) : string Get a custom table name mapping for the given table.
user ( array $attributes = [] ) : Model Get an instance of the user model.

보호된 메소드들

메소드 설명
basename ( string | object $class ) : string Get the basename of the given class.
isOwnedVia ( string | Closure $attribute, Model $authority, Model $model ) : boolean Determines ownership via the given attribute.
make ( string $model, array $attributes = [] ) : Model Get an instance of the given model.

메소드 상세

ability() 공개 정적인 메소드

Get an instance of the ability model.
public static ability ( array $attributes = [] ) : Ability
$attributes array
리턴 Ability

basename() 보호된 정적인 메소드

Get the basename of the given class.
protected static basename ( string | object $class ) : string
$class string | object
리턴 string

classname() 공개 정적인 메소드

Get the classname mapping for the given model.
public static classname ( string $model ) : string
$model string
리턴 string

isOwnedBy() 공개 정적인 메소드

Determines whether the given model is owned by the given authority.
public static isOwnedBy ( Model $authority, Model $model ) : boolean
$authority Illuminate\Database\Eloquent\Model
$model Illuminate\Database\Eloquent\Model
리턴 boolean

isOwnedVia() 보호된 정적인 메소드

Determines ownership via the given attribute.
protected static isOwnedVia ( string | Closure $attribute, Model $authority, Model $model ) : boolean
$attribute string | Closure
$authority Illuminate\Database\Eloquent\Model
$model Illuminate\Database\Eloquent\Model
리턴 boolean

make() 보호된 정적인 메소드

Get an instance of the given model.
protected static make ( string $model, array $attributes = [] ) : Model
$model string
$attributes array
리턴 Illuminate\Database\Eloquent\Model

ownedVia() 공개 정적인 메소드

Register an attribute/callback to determine if a model is owned by a given authority.
public static ownedVia ( string | Closure $model, string | Closure | null $attribute = null ) : void
$model string | Closure
$attribute string | Closure | null
리턴 void

prefix() 공개 정적인 메소드

Get the prefix for the tables.
public static prefix ( ) : string
리턴 string

reset() 공개 정적인 메소드

Reset all settings to their original state.
public static reset ( ) : void
리턴 void

role() 공개 정적인 메소드

Get an instance of the role model.
public static role ( array $attributes = [] ) : Role
$attributes array
리턴 Role

setAbilitiesModel() 공개 정적인 메소드

Set the model to be used for abilities.
public static setAbilitiesModel ( string $model ) : void
$model string
리턴 void

setPrefix() 공개 정적인 메소드

Set the prefix for the tables.
public static setPrefix ( string $prefix ) : void
$prefix string
리턴 void

setRolesModel() 공개 정적인 메소드

Set the model to be used for roles.
public static setRolesModel ( string $model ) : void
$model string
리턴 void

setTables() 공개 정적인 메소드

Set custom table names.
public static setTables ( array $map ) : void
$map array
리턴 void

setUsersModel() 공개 정적인 메소드

Set the model to be used for users.
public static setUsersModel ( string $model ) : void
$model string
리턴 void

table() 공개 정적인 메소드

Get a custom table name mapping for the given table.
public static table ( string $table ) : string
$table string
리턴 string

user() 공개 정적인 메소드

Get an instance of the user model.
public static user ( array $attributes = [] ) : Model
$attributes array
리턴 Illuminate\Database\Eloquent\Model

프로퍼티 상세

$models 보호되어 있는 정적으로 프로퍼티

Map for the bouncer's models.
protected static array $models
리턴 array

$ownership 보호되어 있는 정적으로 프로퍼티

Holds the map of ownership for models.
protected static array $ownership
리턴 array

$prefix 보호되어 있는 정적으로 프로퍼티

The prefix for the tables.
protected static string $prefix
리턴 string

$tables 보호되어 있는 정적으로 프로퍼티

Map for the bouncer's tables.
protected static array $tables
리턴 array