PHP Trait Kodeine\Metable\Metable

Afficher le fichier Open project: kodeine/laravel-meta

Méthodes publiques

Méthode Description
__get ( $attr )
__isset ( $key )
__set ( $key, $value )
__unset ( $key )
getAttribute ( string $key ) : mixed Get an attribute from the model.
getMeta ( $key = null, $raw = false ) Get Meta Data functions -------------------------
scopeMeta ( $query ) Meta scope for easier join -------------------------
setMeta ( $key, $value = null ) Set Meta Data functions -------------------------
toArray ( ) : array Convert the model instance to an array.
unsetMeta ( $key ) Unset Meta Data functions -------------------------
whereMeta ( $key, $value ) Query Meta Table functions -------------------------

Méthodes protégées

Méthode Description
getMetaArray ( $keys, $raw = false )
getMetaData ( )
getMetaKeyName ( ) : string Return the foreign key name for the meta table
getMetaNull ( )
getMetaString ( $key, $raw = false )
getMetaTable ( ) : null Return the table name
getModelKey ( ) : string Return the key for the model
getModelStub ( )
saveMeta ( )
setMetaArray ( )
setMetaString ( $key, $value )
setObserver ( ) Trait specific functions -------------------------
unsetMetaArray ( )
unsetMetaString ( $key )

Method Details

__get() public méthode

public __get ( $attr )

__isset() public méthode

public __isset ( $key )

__set() public méthode

public __set ( $key, $value )

__unset() public méthode

public __unset ( $key )

getAttribute() public méthode

Get an attribute from the model.
public getAttribute ( string $key ) : mixed
$key string
Résultat mixed

getMeta() public méthode

Get Meta Data functions -------------------------
public getMeta ( $key = null, $raw = false )

getMetaArray() protected méthode

protected getMetaArray ( $keys, $raw = false )

getMetaData() protected méthode

protected getMetaData ( )

getMetaKeyName() protected méthode

Return the foreign key name for the meta table
protected getMetaKeyName ( ) : string
Résultat string

getMetaNull() protected méthode

protected getMetaNull ( )

getMetaString() protected méthode

protected getMetaString ( $key, $raw = false )

getMetaTable() protected méthode

Return the table name
protected getMetaTable ( ) : null
Résultat null

getModelKey() protected méthode

Return the key for the model
protected getModelKey ( ) : string
Résultat string

getModelStub() protected méthode

protected getModelStub ( )

saveMeta() protected méthode

protected saveMeta ( )

scopeMeta() public méthode

Meta scope for easier join -------------------------
public scopeMeta ( $query )

setMeta() public méthode

Set Meta Data functions -------------------------
public setMeta ( $key, $value = null )

setMetaArray() protected méthode

protected setMetaArray ( )

setMetaString() protected méthode

protected setMetaString ( $key, $value )

setObserver() protected méthode

Trait specific functions -------------------------
protected setObserver ( )

toArray() public méthode

Convert the model instance to an array.
public toArray ( ) : array
Résultat array

unsetMeta() public méthode

Unset Meta Data functions -------------------------
public unsetMeta ( $key )

unsetMetaArray() protected méthode

protected unsetMetaArray ( )

unsetMetaString() protected méthode

protected unsetMetaString ( $key )

whereMeta() public méthode

Query Meta Table functions -------------------------
public whereMeta ( $key, $value )