PHP 클래스 LMongo\Eloquent\Model

상속: implements ArrayAcces\ArrayAccess, implements Illuminate\Support\Contracts\ArrayableInterface, implements Illuminate\Support\Contracts\JsonableInterface
파일 보기 프로젝트 열기: navruzm/lmongo 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
$exists boolean Indicates if the model exists.
$incrementing boolean Indicates if the IDs are auto-incrementing.
$snakeAttributes boolean Indicates whether attributes are snake cased on arrays.
$timestamps boolean Indicates if the model should be timestamped.

보호된 프로퍼티들

프로퍼티 타입 설명
$attributes array The model's attributes.
$booted array The array of booted models.
$collection string The collection associated with the model.
$connection string The connection name for the model.
$dispatcher Illuminate\Events\Dispatcher The event dispatcher instance.
$fillable array The attributes that are mass assignable.
$guarded array The attributes that aren't mass assignable.
$hidden array The attributes that should be hidden for arrays.
$mutatorCache array The cache of the mutated attributes for each class.
$original array The model attribute's original state.
$perPage integer The number of models to return for pagination.
$primaryKey string The primary key for the model.
$relations array The loaded relationships for the model.
$resolver LMongo\ConnectionResolverInterface The connection resolver instance.
$softDelete boolean Indicates if the model should soft delete.
$touches array The relationships that should be touched on save.
$unguarded boolean Indicates if all mass assignment is enabled.
$visible arrays The attributes that should be visible in arrays.
$with array The relations to eager load on every query.

공개 메소드들

메소드 설명
__call ( string $method, array $parameters ) : mixed Handle dynamic method calls into the method.
__callStatic ( string $method, array $parameters ) : mixed Handle dynamic static method calls into the method.
__construct ( array $attributes = [] ) : void Create a new Eloquent model instance.
__get ( string $key ) : mixed Dynamically retrieve attributes on the model.
__isset ( string $key ) : void Determine if an attribute exists on the model.
__set ( string $key, mixed $value ) : void Dynamically set attributes on the model.
__toString ( ) : string Convert the model to its string representation.
__unset ( string $key ) : void Unset an attribute on the model.
all ( array $columns = [] ) : Collection Get all of the models from the database.
attributesToArray ( ) : array Convert the model's attributes to an array.
belongsTo ( string $related, string $foreignKey = null ) : BelongsTo Define an inverse one-to-one or many relationship.
belongsToMany ( string $related, string $foreignKey = null, string $otherKey = null ) : BelongsToMany Define a many-to-many relationship.
collection ( string $collection ) : void Set the collection associated with the model.
create ( array $attributes ) : Model Save a new model and return the instance.
created ( Closur\Closure | string $callback ) : void Register a created model event with the dispatcher.
creating ( Closur\Closure | string $callback ) : void Register a creating model event with the dispatcher.
delete ( ) : boolean | null Delete the model from the database.
deleted ( Closur\Closure | string $callback ) : void Register a deleted model event with the dispatcher.
deleting ( Closur\Closure | string $callback ) : void Register a deleting model event with the dispatcher.
destroy ( array | integer $ids ) : void Destroy the models for the given IDs.
fill ( array $attributes ) : Model Fill the model with an array of attributes.
fillable ( array $fillable ) : Model Set the fillable attributes for the model.
find ( mixed $id, array $columns = [] ) : Model | Collection Find a model by its primary key.
findOrFail ( mixed $id, array $columns = [] ) : Model | Collection Find a model by its primary key or throw an exception.
flushEventListeners ( ) : void Remove all of the event listeners for the model.
forceDelete ( ) : void Force a hard delete on a soft deleted model.
freshTimestamp ( ) : MongoDate Get a fresh MongoDate for the model.
getAttribute ( string $key ) : mixed Get an attribute from the model.
getAttributes ( ) : array Get all of the current attributes on the model.
getCollection ( ) : string Get the collection associated with the model.
getConnection ( ) : Connection Get the database connection for the model.
getConnectionName ( ) : string Get the current connection name for the model.
getConnectionResolver ( ) : LMongo\ConnectionResolverInterface Get the connection resolver instance.
getCreatedAtColumn ( ) : string Get the name of the "created at" column.
getDates ( ) : array Get the attributes that should be converted to dates.
getDeletedAtColumn ( ) : string Get the name of the "deleted at" column.
getDirty ( ) : array Get the attributes that have been changed since last sync.
getEventDispatcher ( ) : Illuminate\Events\Dispatcher Get the event dispatcher instance.
getFillable ( ) : array Get the fillable attributes for the model.
getForeignKey ( ) : string Get the default foreign key name for the model.
getHidden ( ) : array Get the hidden attributes for the model.
getIncrementing ( ) : boolean Get the value indicating whether the IDs are incrementing.
getKey ( ) : mixed Get the value of the model's primary key.
getKeyName ( ) : string Get the primary key for the model.
getMutatedAttributes ( ) : array Get the mutated attributes for a given instance.
getObservableEvents ( ) : array Get the observable event names.
getOriginal ( string $key = null, mixed $default = null ) : array Get the model's original attribute values.
getPerPage ( ) : integer Get the number of models to return per page.
getQualifiedDeletedAtColumn ( ) : string Get the fully qualified "deleted at" column.
getRelation ( string $relation ) : mixed Get a specified relationship.
getRelations ( ) : array Get all the loaded relations for the instance.
getTouchedRelations ( ) : array Get the relationships that are touched on save.
getUpdatedAtColumn ( ) : string Get the name of the "updated at" column.
guard ( array $guarded ) : Model Set the guarded attributes for the model.
hasGetMutator ( string $key ) : boolean Determine if a get mutator exists for an attribute.
hasMany ( string $related, string $foreignKey = null ) : HasMany Define a one-to-many relationship.
hasOne ( string $related, string $foreignKey = null ) : LMongo\Eloquent\Relation\HasOne Define a one-to-one relationship.
hasSetMutator ( string $key ) : boolean Determine if a set mutator exists for an attribute.
isDirty ( string $attribute ) : boolean Determine if a given attribute is dirty.
isFillable ( string $key ) : boolean Determine if the given attribute may be mass assigned.
isGuarded ( string $key ) : boolean Determine if the given key is guarded.
isSoftDeleting ( ) : boolean Determine if the model instance uses soft deletes.
load ( array | string $relations ) : void Eager load relations on the model.
morphMany ( string $related, string $name, string $type = null, string $id = null ) : LMongo\Eloquent\Relation\MorphMany Define a polymorphic one-to-many relationship.
morphOne ( string $related, string $name, string $type = null, string $id = null ) : LMongo\Eloquent\Relation\MorphOne Define a polymorphic one-to-one relationship.
morphTo ( string $name = null, string $type = null, string $id = null ) : BelongsTo Define an polymorphic, inverse one-to-one or many relationship.
newCollection ( array $models = [] ) : Collection Create a new Collection instance.
newFromBuilder ( array $attributes = [] ) : Model Create a new model instance that is existing.
newInstance ( array $attributes = [], boolean $exists = false ) : Model Create a new instance of the given model.
newQuery ( boolean $excludeDeleted = true ) : Builder Get a new query builder for the model's table.
newQueryWithDeleted ( ) : Builder Get a new query builder that includes soft deletes.
observe ( object $class ) : void Register an observer with the Model.
offsetExists ( mixed $offset ) : boolean Determine if the given attribute exists.
offsetGet ( mixed $offset ) : mixed Get the value for a given offset.
offsetSet ( mixed $offset, mixed $value ) : void Set the value for a given offset.
offsetUnset ( mixed $offset ) : void Unset the value for a given offset.
on ( string $connection = null ) : Builder Begin querying the model on a given connection.
onlyTrashed ( ) : Builder Get a new query builder that only includes soft deletes.
push ( ) : boolean Save the model and all of its relationships.
query ( ) : Builder Begin querying the model.
reguard ( ) : void Enable the mass assignment restrictions.
relationsToArray ( ) : array Get the model's relationships in array form.
replicate ( ) : Model Clone the model into a new, non-existing instance.
resolveConnection ( string $connection = null ) : Connection Resolve a connection instance.
restore ( ) : boolean | null Restore a soft-deleted model instance.
save ( ) : boolean Save the model to the database.
saved ( Closur\Closure | string $callback ) : void Register a saved model event with the dispatcher.
saving ( Closur\Closure | string $callback ) : void Register a saving model event with the dispatcher.
setAttribute ( string $key, mixed $value ) : void Set a given attribute on the model.
setConnection ( string $name ) : void Set the connection associated with the model.
setConnectionResolver ( LMongo\ConnectionResolverInterface $resolver ) : void Set the connection resolver instance.
setCreatedAt ( mixed $value ) : void Set the value of the "created at" attribute.
setEventDispatcher ( Illuminate\Events\Dispatcher $dispatcher ) : void Set the event dispatcher instance.
setHidden ( array $hidden ) : void Set the hidden attributes for the model.
setIncrementing ( boolean $value ) : void Set whether IDs are incrementing.
setPerPage ( integer $perPage ) : void Set the number of models ot return per page.
setRawAttributes ( array $attributes, boolean $sync = false ) : void Set the array of model attributes. No checking is done.
setRelation ( string $relation, mixed $value ) : Model Set the specific relationship in the model.
setRelations ( array $relations ) : Model Set the entire relations array on the model.
setSoftDeleting ( boolean $enabled ) : void Set the soft deleting property on the model.
setTouchedRelations ( array $touches ) : void Set the relationships that are touched on save.
setUnguardState ( boolean $state ) : void Set "unguard" to a given state.
setUpdatedAt ( mixed $value ) : void Set the value of the "updated at" attribute.
setVisible ( array $visible ) : void Set the visible attributes for the model.
syncOriginal ( ) : Model Sync the original attributes with the current.
toArray ( ) : array Convert the model instance to an array.
toJson ( integer $options ) : string Convert the model instance to JSON.
totallyGuarded ( ) : boolean Determine if the model is totally guarded.
touch ( ) : boolean Update the model's update timestamp.
touchOwners ( ) : void Touch the owning relations of the model.
touches ( string $relation ) : boolean Determine if the model touches a given relation.
trashed ( ) : boolean Determine if the model instance has been soft-deleted.
unguard ( ) : void Disable all mass assignable restrictions.
unsetEventDispatcher ( ) : void Unset the event dispatcher for models.
update ( array $attributes = [] ) : mixed Update the model in the database.
updated ( Closur\Closure | string $callback ) : void Register an updated model event with the dispatcher.
updating ( Closur\Closure | string $callback ) : void Register an updating model event with the dispatcher.
usesTimestamps ( ) : boolean Determine if the model uses timestamps.
with ( array | string $relations ) : Builder Being querying a model with eager loading.
withTrashed ( ) : Builder Get a new query builder that includes soft deletes.

보호된 메소드들

메소드 설명
asDateTime ( mixed $value ) : DateTime Return a timestamp as DateTime object.
boot ( ) : void The "booting" method of the model.
decrement ( string $column, integer $amount = 1 ) : integer Decrement a column's value by a given amount.
finishSave ( ) : void Finish processing on a successful save operation.
fireModelEvent ( string $event, boolean $halt = true ) : mixed Fire the given event for the model.
fromDateTime ( DateTim\DateTime | integer $value ) : string Convert a DateTime to a storable string.
getArrayableAttributes ( ) : array Get an attribute array of all arrayable attributes.
getAttributeFromArray ( string $key ) : mixed Get an attribute from the $attributes array.
getAttributeValue ( string $key ) : mixed Get a plain attribute (not a relationship).
getDateFormat ( ) : string Get the format for database stored dates.
getMorphs ( string $name, string $type, string $id ) : array Get the polymorphic relationship columns.
increment ( string $column, integer $amount = 1 ) : integer Increment a column's value by a given amount.
incrementOrDecrement ( string $column, integer $amount, string $method ) : integer Run the increment or decrement method on the model.
insertAndSetId ( Builder $query, array $attributes ) : void Insert the given attributes and set the ID on the model.
mutateAttribute ( string $key, mixed $value ) : mixed Get the value of an attribute using its mutator.
newBaseQueryBuilder ( ) : Builder Get a new query builder instance for the connection.
performDeleteOnModel ( ) : void Perform the actual delete query on this model instance.
performInsert ( $query ) : boolean Perform a model insert operation.
performUpdate ( $query ) : boolean Perform a model update operation.
registerModelEvent ( string $event, Closur\Closure | string $callback ) : void Register a model event with the dispatcher.
setKeysForSaveQuery ( $query ) : Builder Set the keys for a save update query.
updateTimestamps ( ) : void Update the creation and update timestamps.

메소드 상세

__call() 공개 메소드

Handle dynamic method calls into the method.
public __call ( string $method, array $parameters ) : mixed
$method string
$parameters array
리턴 mixed

__callStatic() 공개 정적인 메소드

Handle dynamic static method calls into the method.
public static __callStatic ( string $method, array $parameters ) : mixed
$method string
$parameters array
리턴 mixed

__construct() 공개 메소드

Create a new Eloquent model instance.
public __construct ( array $attributes = [] ) : void
$attributes array
리턴 void

__get() 공개 메소드

Dynamically retrieve attributes on the model.
public __get ( string $key ) : mixed
$key string
리턴 mixed

__isset() 공개 메소드

Determine if an attribute exists on the model.
public __isset ( string $key ) : void
$key string
리턴 void

__set() 공개 메소드

Dynamically set attributes on the model.
public __set ( string $key, mixed $value ) : void
$key string
$value mixed
리턴 void

__toString() 공개 메소드

Convert the model to its string representation.
public __toString ( ) : string
리턴 string

__unset() 공개 메소드

Unset an attribute on the model.
public __unset ( string $key ) : void
$key string
리턴 void

all() 공개 정적인 메소드

Get all of the models from the database.
public static all ( array $columns = [] ) : Collection
$columns array
리턴 Collection

asDateTime() 보호된 메소드

Return a timestamp as DateTime object.
protected asDateTime ( mixed $value ) : DateTime
$value mixed
리턴 DateTime

attributesToArray() 공개 메소드

Convert the model's attributes to an array.
public attributesToArray ( ) : array
리턴 array

belongsTo() 공개 메소드

Define an inverse one-to-one or many relationship.
public belongsTo ( string $related, string $foreignKey = null ) : BelongsTo
$related string
$foreignKey string
리턴 LMongo\Eloquent\Relations\BelongsTo

belongsToMany() 공개 메소드

Define a many-to-many relationship.
public belongsToMany ( string $related, string $foreignKey = null, string $otherKey = null ) : BelongsToMany
$related string
$foreignKey string
$otherKey string
리턴 LMongo\Eloquent\Relations\BelongsToMany

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

The "booting" method of the model.
protected static boot ( ) : void
리턴 void

collection() 공개 메소드

Set the collection associated with the model.
public collection ( string $collection ) : void
$collection string
리턴 void

create() 공개 정적인 메소드

Save a new model and return the instance.
public static create ( array $attributes ) : Model
$attributes array
리턴 Model

created() 공개 정적인 메소드

Register a created model event with the dispatcher.
public static created ( Closur\Closure | string $callback ) : void
$callback Closur\Closure | string
리턴 void

creating() 공개 정적인 메소드

Register a creating model event with the dispatcher.
public static creating ( Closur\Closure | string $callback ) : void
$callback Closur\Closure | string
리턴 void

decrement() 보호된 메소드

Decrement a column's value by a given amount.
protected decrement ( string $column, integer $amount = 1 ) : integer
$column string
$amount integer
리턴 integer

delete() 공개 메소드

Delete the model from the database.
public delete ( ) : boolean | null
리턴 boolean | null

deleted() 공개 정적인 메소드

Register a deleted model event with the dispatcher.
public static deleted ( Closur\Closure | string $callback ) : void
$callback Closur\Closure | string
리턴 void

deleting() 공개 정적인 메소드

Register a deleting model event with the dispatcher.
public static deleting ( Closur\Closure | string $callback ) : void
$callback Closur\Closure | string
리턴 void

destroy() 공개 정적인 메소드

Destroy the models for the given IDs.
public static destroy ( array | integer $ids ) : void
$ids array | integer
리턴 void

fill() 공개 메소드

Fill the model with an array of attributes.
public fill ( array $attributes ) : Model
$attributes array
리턴 Model

fillable() 공개 메소드

Set the fillable attributes for the model.
public fillable ( array $fillable ) : Model
$fillable array
리턴 Model

find() 공개 정적인 메소드

Find a model by its primary key.
public static find ( mixed $id, array $columns = [] ) : Model | Collection
$id mixed
$columns array
리턴 Model | Collection

findOrFail() 공개 정적인 메소드

Find a model by its primary key or throw an exception.
public static findOrFail ( mixed $id, array $columns = [] ) : Model | Collection
$id mixed
$columns array
리턴 Model | Collection

finishSave() 보호된 메소드

Finish processing on a successful save operation.
protected finishSave ( ) : void
리턴 void

fireModelEvent() 보호된 메소드

Fire the given event for the model.
protected fireModelEvent ( string $event, boolean $halt = true ) : mixed
$event string
$halt boolean
리턴 mixed

flushEventListeners() 공개 정적인 메소드

Remove all of the event listeners for the model.
public static flushEventListeners ( ) : void
리턴 void

forceDelete() 공개 메소드

Force a hard delete on a soft deleted model.
public forceDelete ( ) : void
리턴 void

freshTimestamp() 공개 메소드

Get a fresh MongoDate for the model.
public freshTimestamp ( ) : MongoDate
리턴 MongoDate

fromDateTime() 보호된 메소드

Convert a DateTime to a storable string.
protected fromDateTime ( DateTim\DateTime | integer $value ) : string
$value DateTim\DateTime | integer
리턴 string

getArrayableAttributes() 보호된 메소드

Get an attribute array of all arrayable attributes.
protected getArrayableAttributes ( ) : array
리턴 array

getAttribute() 공개 메소드

Get an attribute from the model.
public getAttribute ( string $key ) : mixed
$key string
리턴 mixed

getAttributeFromArray() 보호된 메소드

Get an attribute from the $attributes array.
protected getAttributeFromArray ( string $key ) : mixed
$key string
리턴 mixed

getAttributeValue() 보호된 메소드

Get a plain attribute (not a relationship).
protected getAttributeValue ( string $key ) : mixed
$key string
리턴 mixed

getAttributes() 공개 메소드

Get all of the current attributes on the model.
public getAttributes ( ) : array
리턴 array

getCollection() 공개 메소드

Get the collection associated with the model.
public getCollection ( ) : string
리턴 string

getConnection() 공개 메소드

Get the database connection for the model.
public getConnection ( ) : Connection
리턴 LMongo\Connection

getConnectionName() 공개 메소드

Get the current connection name for the model.
public getConnectionName ( ) : string
리턴 string

getConnectionResolver() 공개 정적인 메소드

Get the connection resolver instance.
public static getConnectionResolver ( ) : LMongo\ConnectionResolverInterface
리턴 LMongo\ConnectionResolverInterface

getCreatedAtColumn() 공개 메소드

Get the name of the "created at" column.
public getCreatedAtColumn ( ) : string
리턴 string

getDateFormat() 보호된 메소드

Get the format for database stored dates.
protected getDateFormat ( ) : string
리턴 string

getDates() 공개 메소드

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

getDeletedAtColumn() 공개 메소드

Get the name of the "deleted at" column.
public getDeletedAtColumn ( ) : string
리턴 string

getDirty() 공개 메소드

Get the attributes that have been changed since last sync.
public getDirty ( ) : array
리턴 array

getEventDispatcher() 공개 정적인 메소드

Get the event dispatcher instance.
public static getEventDispatcher ( ) : Illuminate\Events\Dispatcher
리턴 Illuminate\Events\Dispatcher

getFillable() 공개 메소드

Get the fillable attributes for the model.
public getFillable ( ) : array
리턴 array

getForeignKey() 공개 메소드

Get the default foreign key name for the model.
public getForeignKey ( ) : string
리턴 string

getHidden() 공개 메소드

Get the hidden attributes for the model.
public getHidden ( ) : array
리턴 array

getIncrementing() 공개 메소드

Get the value indicating whether the IDs are incrementing.
public getIncrementing ( ) : boolean
리턴 boolean

getKey() 공개 메소드

Get the value of the model's primary key.
public getKey ( ) : mixed
리턴 mixed

getKeyName() 공개 메소드

Get the primary key for the model.
public getKeyName ( ) : string
리턴 string

getMorphs() 보호된 메소드

Get the polymorphic relationship columns.
protected getMorphs ( string $name, string $type, string $id ) : array
$name string
$type string
$id string
리턴 array

getMutatedAttributes() 공개 메소드

Get the mutated attributes for a given instance.
public getMutatedAttributes ( ) : array
리턴 array

getObservableEvents() 공개 메소드

Get the observable event names.
public getObservableEvents ( ) : array
리턴 array

getOriginal() 공개 메소드

Get the model's original attribute values.
public getOriginal ( string $key = null, mixed $default = null ) : array
$key string
$default mixed
리턴 array

getPerPage() 공개 메소드

Get the number of models to return per page.
public getPerPage ( ) : integer
리턴 integer

getQualifiedDeletedAtColumn() 공개 메소드

Get the fully qualified "deleted at" column.

getRelation() 공개 메소드

Get a specified relationship.
public getRelation ( string $relation ) : mixed
$relation string
리턴 mixed

getRelations() 공개 메소드

Get all the loaded relations for the instance.
public getRelations ( ) : array
리턴 array

getTouchedRelations() 공개 메소드

Get the relationships that are touched on save.
public getTouchedRelations ( ) : array
리턴 array

getUpdatedAtColumn() 공개 메소드

Get the name of the "updated at" column.
public getUpdatedAtColumn ( ) : string
리턴 string

guard() 공개 메소드

Set the guarded attributes for the model.
public guard ( array $guarded ) : Model
$guarded array
리턴 Model

hasGetMutator() 공개 메소드

Determine if a get mutator exists for an attribute.
public hasGetMutator ( string $key ) : boolean
$key string
리턴 boolean

hasMany() 공개 메소드

Define a one-to-many relationship.
public hasMany ( string $related, string $foreignKey = null ) : HasMany
$related string
$foreignKey string
리턴 LMongo\Eloquent\Relations\HasMany

hasOne() 공개 메소드

Define a one-to-one relationship.
public hasOne ( string $related, string $foreignKey = null ) : LMongo\Eloquent\Relation\HasOne
$related string
$foreignKey string
리턴 LMongo\Eloquent\Relation\HasOne

hasSetMutator() 공개 메소드

Determine if a set mutator exists for an attribute.
public hasSetMutator ( string $key ) : boolean
$key string
리턴 boolean

increment() 보호된 메소드

Increment a column's value by a given amount.
protected increment ( string $column, integer $amount = 1 ) : integer
$column string
$amount integer
리턴 integer

incrementOrDecrement() 보호된 메소드

Run the increment or decrement method on the model.
protected incrementOrDecrement ( string $column, integer $amount, string $method ) : integer
$column string
$amount integer
$method string
리턴 integer

insertAndSetId() 보호된 메소드

Insert the given attributes and set the ID on the model.
protected insertAndSetId ( Builder $query, array $attributes ) : void
$query Builder
$attributes array
리턴 void

isDirty() 공개 메소드

Determine if a given attribute is dirty.
public isDirty ( string $attribute ) : boolean
$attribute string
리턴 boolean

isFillable() 공개 메소드

Determine if the given attribute may be mass assigned.
public isFillable ( string $key ) : boolean
$key string
리턴 boolean

isGuarded() 공개 메소드

Determine if the given key is guarded.
public isGuarded ( string $key ) : boolean
$key string
리턴 boolean

isSoftDeleting() 공개 메소드

Determine if the model instance uses soft deletes.
public isSoftDeleting ( ) : boolean
리턴 boolean

load() 공개 메소드

Eager load relations on the model.
public load ( array | string $relations ) : void
$relations array | string
리턴 void

morphMany() 공개 메소드

Define a polymorphic one-to-many relationship.
public morphMany ( string $related, string $name, string $type = null, string $id = null ) : LMongo\Eloquent\Relation\MorphMany
$related string
$name string
$type string
$id string
리턴 LMongo\Eloquent\Relation\MorphMany

morphOne() 공개 메소드

Define a polymorphic one-to-one relationship.
public morphOne ( string $related, string $name, string $type = null, string $id = null ) : LMongo\Eloquent\Relation\MorphOne
$related string
$name string
$type string
$id string
리턴 LMongo\Eloquent\Relation\MorphOne

morphTo() 공개 메소드

Define an polymorphic, inverse one-to-one or many relationship.
public morphTo ( string $name = null, string $type = null, string $id = null ) : BelongsTo
$name string
$type string
$id string
리턴 LMongo\Eloquent\Relations\BelongsTo

mutateAttribute() 보호된 메소드

Get the value of an attribute using its mutator.
protected mutateAttribute ( string $key, mixed $value ) : mixed
$key string
$value mixed
리턴 mixed

newBaseQueryBuilder() 보호된 메소드

Get a new query builder instance for the connection.
protected newBaseQueryBuilder ( ) : Builder
리턴 LMongo\Query\Builder

newCollection() 공개 메소드

Create a new Collection instance.
public newCollection ( array $models = [] ) : Collection
$models array
리턴 Collection

newFromBuilder() 공개 메소드

Create a new model instance that is existing.
public newFromBuilder ( array $attributes = [] ) : Model
$attributes array
리턴 Model

newInstance() 공개 메소드

Create a new instance of the given model.
public newInstance ( array $attributes = [], boolean $exists = false ) : Model
$attributes array
$exists boolean
리턴 Model

newQuery() 공개 메소드

Get a new query builder for the model's table.
public newQuery ( boolean $excludeDeleted = true ) : Builder
$excludeDeleted boolean
리턴 Builder

newQueryWithDeleted() 공개 메소드

Get a new query builder that includes soft deletes.
public newQueryWithDeleted ( ) : Builder
리턴 Illuminate\Database\Eloquent\Builder

observe() 공개 정적인 메소드

Register an observer with the Model.
public static observe ( object $class ) : void
$class object
리턴 void

offsetExists() 공개 메소드

Determine if the given attribute exists.
public offsetExists ( mixed $offset ) : boolean
$offset mixed
리턴 boolean

offsetGet() 공개 메소드

Get the value for a given offset.
public offsetGet ( mixed $offset ) : mixed
$offset mixed
리턴 mixed

offsetSet() 공개 메소드

Set the value for a given offset.
public offsetSet ( mixed $offset, mixed $value ) : void
$offset mixed
$value mixed
리턴 void

offsetUnset() 공개 메소드

Unset the value for a given offset.
public offsetUnset ( mixed $offset ) : void
$offset mixed
리턴 void

on() 공개 정적인 메소드

Begin querying the model on a given connection.
public static on ( string $connection = null ) : Builder
$connection string
리턴 Builder

onlyTrashed() 공개 정적인 메소드

Get a new query builder that only includes soft deletes.
public static onlyTrashed ( ) : Builder
리턴 Illuminate\Database\Eloquent\Builder

performDeleteOnModel() 보호된 메소드

Perform the actual delete query on this model instance.
protected performDeleteOnModel ( ) : void
리턴 void

performInsert() 보호된 메소드

Perform a model insert operation.
protected performInsert ( $query ) : boolean
리턴 boolean

performUpdate() 보호된 메소드

Perform a model update operation.
protected performUpdate ( $query ) : boolean
리턴 boolean

push() 공개 메소드

Save the model and all of its relationships.
public push ( ) : boolean
리턴 boolean

query() 공개 정적인 메소드

Begin querying the model.
public static query ( ) : Builder
리턴 Illuminate\Database\Eloquent\Builder

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

Register a model event with the dispatcher.
protected static registerModelEvent ( string $event, Closur\Closure | string $callback ) : void
$event string
$callback Closur\Closure | string
리턴 void

reguard() 공개 정적인 메소드

Enable the mass assignment restrictions.
public static reguard ( ) : void
리턴 void

relationsToArray() 공개 메소드

Get the model's relationships in array form.
public relationsToArray ( ) : array
리턴 array

replicate() 공개 메소드

Clone the model into a new, non-existing instance.
public replicate ( ) : Model
리턴 Model

resolveConnection() 공개 정적인 메소드

Resolve a connection instance.
public static resolveConnection ( string $connection = null ) : Connection
$connection string
리턴 LMongo\Connection

restore() 공개 메소드

Restore a soft-deleted model instance.
public restore ( ) : boolean | null
리턴 boolean | null

save() 공개 메소드

Save the model to the database.
public save ( ) : boolean
리턴 boolean

saved() 공개 정적인 메소드

Register a saved model event with the dispatcher.
public static saved ( Closur\Closure | string $callback ) : void
$callback Closur\Closure | string
리턴 void

saving() 공개 정적인 메소드

Register a saving model event with the dispatcher.
public static saving ( Closur\Closure | string $callback ) : void
$callback Closur\Closure | string
리턴 void

setAttribute() 공개 메소드

Set a given attribute on the model.
public setAttribute ( string $key, mixed $value ) : void
$key string
$value mixed
리턴 void

setConnection() 공개 메소드

Set the connection associated with the model.
public setConnection ( string $name ) : void
$name string
리턴 void

setConnectionResolver() 공개 정적인 메소드

Set the connection resolver instance.
public static setConnectionResolver ( LMongo\ConnectionResolverInterface $resolver ) : void
$resolver LMongo\ConnectionResolverInterface
리턴 void

setCreatedAt() 공개 메소드

Set the value of the "created at" attribute.
public setCreatedAt ( mixed $value ) : void
$value mixed
리턴 void

setEventDispatcher() 공개 정적인 메소드

Set the event dispatcher instance.
public static setEventDispatcher ( Illuminate\Events\Dispatcher $dispatcher ) : void
$dispatcher Illuminate\Events\Dispatcher
리턴 void

setHidden() 공개 메소드

Set the hidden attributes for the model.
public setHidden ( array $hidden ) : void
$hidden array
리턴 void

setIncrementing() 공개 메소드

Set whether IDs are incrementing.
public setIncrementing ( boolean $value ) : void
$value boolean
리턴 void

setKeysForSaveQuery() 보호된 메소드

Set the keys for a save update query.
protected setKeysForSaveQuery ( $query ) : Builder
리턴 Builder

setPerPage() 공개 메소드

Set the number of models ot return per page.
public setPerPage ( integer $perPage ) : void
$perPage integer
리턴 void

setRawAttributes() 공개 메소드

Set the array of model attributes. No checking is done.
public setRawAttributes ( array $attributes, boolean $sync = false ) : void
$attributes array
$sync boolean
리턴 void

setRelation() 공개 메소드

Set the specific relationship in the model.
public setRelation ( string $relation, mixed $value ) : Model
$relation string
$value mixed
리턴 Model

setRelations() 공개 메소드

Set the entire relations array on the model.
public setRelations ( array $relations ) : Model
$relations array
리턴 Model

setSoftDeleting() 공개 메소드

Set the soft deleting property on the model.
public setSoftDeleting ( boolean $enabled ) : void
$enabled boolean
리턴 void

setTouchedRelations() 공개 메소드

Set the relationships that are touched on save.
public setTouchedRelations ( array $touches ) : void
$touches array
리턴 void

setUnguardState() 공개 정적인 메소드

Set "unguard" to a given state.
public static setUnguardState ( boolean $state ) : void
$state boolean
리턴 void

setUpdatedAt() 공개 메소드

Set the value of the "updated at" attribute.
public setUpdatedAt ( mixed $value ) : void
$value mixed
리턴 void

setVisible() 공개 메소드

Set the visible attributes for the model.
public setVisible ( array $visible ) : void
$visible array
리턴 void

syncOriginal() 공개 메소드

Sync the original attributes with the current.
public syncOriginal ( ) : Model
리턴 Model

toArray() 공개 메소드

Convert the model instance to an array.
public toArray ( ) : array
리턴 array

toJson() 공개 메소드

Convert the model instance to JSON.
public toJson ( integer $options ) : string
$options integer
리턴 string

totallyGuarded() 공개 메소드

Determine if the model is totally guarded.
public totallyGuarded ( ) : boolean
리턴 boolean

touch() 공개 메소드

Update the model's update timestamp.
public touch ( ) : boolean
리턴 boolean

touchOwners() 공개 메소드

Touch the owning relations of the model.
public touchOwners ( ) : void
리턴 void

touches() 공개 메소드

Determine if the model touches a given relation.
public touches ( string $relation ) : boolean
$relation string
리턴 boolean

trashed() 공개 메소드

Determine if the model instance has been soft-deleted.
public trashed ( ) : boolean
리턴 boolean

unguard() 공개 정적인 메소드

Disable all mass assignable restrictions.
public static unguard ( ) : void
리턴 void

unsetEventDispatcher() 공개 정적인 메소드

Unset the event dispatcher for models.
public static unsetEventDispatcher ( ) : void
리턴 void

update() 공개 메소드

Update the model in the database.
public update ( array $attributes = [] ) : mixed
$attributes array
리턴 mixed

updateTimestamps() 보호된 메소드

Update the creation and update timestamps.
protected updateTimestamps ( ) : void
리턴 void

updated() 공개 정적인 메소드

Register an updated model event with the dispatcher.
public static updated ( Closur\Closure | string $callback ) : void
$callback Closur\Closure | string
리턴 void

updating() 공개 정적인 메소드

Register an updating model event with the dispatcher.
public static updating ( Closur\Closure | string $callback ) : void
$callback Closur\Closure | string
리턴 void

usesTimestamps() 공개 메소드

Determine if the model uses timestamps.
public usesTimestamps ( ) : boolean
리턴 boolean

with() 공개 정적인 메소드

Being querying a model with eager loading.
public static with ( array | string $relations ) : Builder
$relations array | string
리턴 Builder

withTrashed() 공개 정적인 메소드

Get a new query builder that includes soft deletes.
public static withTrashed ( ) : Builder
리턴 Illuminate\Database\Eloquent\Builder

프로퍼티 상세

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

The model's attributes.
protected array $attributes
리턴 array

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

The array of booted models.
protected static array $booted
리턴 array

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

The collection associated with the model.
protected string $collection
리턴 string

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

The connection name for the model.
protected string $connection
리턴 string

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

The event dispatcher instance.
protected static Dispatcher,Illuminate\Events $dispatcher
리턴 Illuminate\Events\Dispatcher

$exists 공개적으로 프로퍼티

Indicates if the model exists.
public bool $exists
리턴 boolean

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

The attributes that are mass assignable.
protected array $fillable
리턴 array

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

The attributes that aren't mass assignable.
protected array $guarded
리턴 array

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

The attributes that should be hidden for arrays.
protected array $hidden
리턴 array

$incrementing 공개적으로 프로퍼티

Indicates if the IDs are auto-incrementing.
public bool $incrementing
리턴 boolean

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

The cache of the mutated attributes for each class.
protected static array $mutatorCache
리턴 array

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

The model attribute's original state.
protected array $original
리턴 array

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

The number of models to return for pagination.
protected int $perPage
리턴 integer

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

The primary key for the model.
protected string $primaryKey
리턴 string

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

The loaded relationships for the model.
protected array $relations
리턴 array

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

The connection resolver instance.
protected static ConnectionResolverInterface,LMongo $resolver
리턴 LMongo\ConnectionResolverInterface

$snakeAttributes 공개적으로 정적으로 프로퍼티

Indicates whether attributes are snake cased on arrays.
public static bool $snakeAttributes
리턴 boolean

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

Indicates if the model should soft delete.
protected bool $softDelete
리턴 boolean

$timestamps 공개적으로 프로퍼티

Indicates if the model should be timestamped.
public bool $timestamps
리턴 boolean

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

The relationships that should be touched on save.
protected array $touches
리턴 array

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

Indicates if all mass assignment is enabled.
protected static bool $unguarded
리턴 boolean

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

The attributes that should be visible in arrays.
protected arrays $visible
리턴 arrays

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

The relations to eager load on every query.
protected array $with
리턴 array