PHP 클래스 Flarum\Database\AbstractModel

Adds the ability for custom relations to be added to a model during runtime. These relations behave in the same way that you would expect; they can be queried, eager loaded, and accessed as an attribute.
상속: extends Illuminate\Database\Eloquent\Model
파일 보기 프로젝트 열기: flarum/core 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
$timestamps boolean Indicates if the model should be timestamped. Turn off by default.

보호된 프로퍼티들

프로퍼티 타입 설명
$afterDeleteCallbacks callable[] An array of callbacks to be run once after the model is deleted.
$afterSaveCallbacks callable[] An array of callbacks to be run once after the model is saved.

공개 메소드들

메소드 설명
__call ( $method, $arguments )
__construct ( array $attributes = [] )
afterDelete ( callable $callback ) : void Register a callback to be run once after the model is deleted.
afterSave ( callable $callback ) : void Register a callback to be run once after the model is saved.
boot ( )
getAttribute ( string $key ) : mixed Get an attribute from the model. If nothing is found, attempt to load a custom relation method with this key.
getDates ( ) : array Get the attributes that should be converted to dates.
releaseAfterDeleteCallbacks ( ) : callable[]
releaseAfterSaveCallbacks ( ) : callable[]

보호된 메소드들

메소드 설명
getCustomRelation ( string $name ) : mixed Get a custom relation object.

메소드 상세

__call() 공개 메소드

public __call ( $method, $arguments )

__construct() 공개 메소드

public __construct ( array $attributes = [] )
$attributes array

afterDelete() 공개 메소드

Register a callback to be run once after the model is deleted.
public afterDelete ( callable $callback ) : void
$callback callable
리턴 void

afterSave() 공개 메소드

Register a callback to be run once after the model is saved.
public afterSave ( callable $callback ) : void
$callback callable
리턴 void

boot() 공개 정적인 메소드

public static boot ( )

getAttribute() 공개 메소드

Get an attribute from the model. If nothing is found, attempt to load a custom relation method with this key.
public getAttribute ( string $key ) : mixed
$key string
리턴 mixed

getCustomRelation() 보호된 메소드

Get a custom relation object.
protected getCustomRelation ( string $name ) : mixed
$name string
리턴 mixed

getDates() 공개 메소드

Get the attributes that should be converted to dates.
public getDates ( ) : array
리턴 array

releaseAfterDeleteCallbacks() 공개 메소드

public releaseAfterDeleteCallbacks ( ) : callable[]
리턴 callable[]

releaseAfterSaveCallbacks() 공개 메소드

public releaseAfterSaveCallbacks ( ) : callable[]
리턴 callable[]

프로퍼티 상세

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

An array of callbacks to be run once after the model is deleted.
protected callable[] $afterDeleteCallbacks
리턴 callable[]

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

An array of callbacks to be run once after the model is saved.
protected callable[] $afterSaveCallbacks
리턴 callable[]

$timestamps 공개적으로 프로퍼티

Indicates if the model should be timestamped. Turn off by default.
public bool $timestamps
리턴 boolean