trait Eloquence

Methods

static void
bootEloquence()

Boot the trait.

static void
hook(string $method, string $hook)

Register hook on Eloquent method.

static boolean
hasHook(string $method)

Determine whether a method has any hooks registered.

array
parseMappedColumn(string $mapping)

Get the target relation and column from the mapping.

static boolean
hasColumn(string $key)

Determine whether the key is meta attribute or actual table field.

array
getSearchableColumns()

Get searchable columns defined on the model.

static array
getColumnListing()

Get model table columns.

newEloquentBuilder(Builder $query)

Create new Eloquence query builder for the instance.

static void
setAttributeMutator(Mutator $mutator)

Set attribute mutator instance.

static Mutator
getAttributeMutator()

Get attribute mutator instance.

queryHook(Builder $query, string $method, ArgumentBag $args)

Allow custom where method calls on the builder.

mixed
getAttribute(string $key)

Register hook for getAttribute.

void
setAttribute(string $key, mixed $value)

Register hook for setAttribute.

boolean
save(array $options = array())

Register hook for save.

mixed
toArray()

Register hook for toArray.

mixed
replicate(array $except = null)

Register hook for replicate.

boolean
__isset(string $key)

Register hook for isset call.

boolean
__unset(string $key)

Register hook for isset call.

Connection
getConnection()

No description

string
getTable()

No description

Details

at line 51
static void bootEloquence()

Boot the trait.

Return Value

void

at line 71
static void hook(string $method, string $hook)

Register hook on Eloquent method.

Parameters

string $method
string $hook

Return Value

void

at line 116
static boolean hasHook(string $method)

Determine whether a method has any hooks registered.

Parameters

string $method

Return Value

boolean

at line 168
array parseMappedColumn(string $mapping)

Get the target relation and column from the mapping.

Parameters

string $mapping

Return Value

array

at line 185
static boolean hasColumn(string $key)

Determine whether the key is meta attribute or actual table field.

Parameters

string $key

Return Value

boolean

at line 197
array getSearchableColumns()

Get searchable columns defined on the model.

Return Value

array

at line 207
static array getColumnListing()

Get model table columns.

Return Value

array

at line 236
Builder newEloquentBuilder(Builder $query)

Create new Eloquence query builder for the instance.

Parameters

Builder $query

Return Value

Builder

at line 249
static void setAttributeMutator(Mutator $mutator)

Set attribute mutator instance.

Parameters

Mutator $mutator

Return Value

void

at line 261
static Mutator getAttributeMutator()

Get attribute mutator instance.

Return Value

Mutator

at line 282
Builder queryHook(Builder $query, string $method, ArgumentBag $args)

Allow custom where method calls on the builder.

Parameters

Builder $query
string $method
ArgumentBag $args

Return Value

Builder

at line 304
mixed getAttribute(string $key)

Register hook for getAttribute.

Parameters

string $key

Return Value

mixed

at line 327
void setAttribute(string $key, mixed $value)

Register hook for setAttribute.

Parameters

string $key
mixed $value

Return Value

void

at line 348
boolean save(array $options = array())

Register hook for save.

Parameters

array $options

Return Value

boolean

at line 373
mixed toArray()

Register hook for toArray.

Return Value

mixed

at line 393
mixed replicate(array $except = null)

Register hook for replicate.

Parameters

array $except

Return Value

mixed

at line 416
boolean __isset(string $key)

Register hook for isset call.

Parameters

string $key

Return Value

boolean

at line 438
boolean __unset(string $key)

Register hook for isset call.

Parameters

string $key

Return Value

boolean

at line 14
Connection getConnection()

Return Value

Connection

at line 14
string getTable()

Return Value

string