PHP Class duxet\Rethinkdb\Eloquent\Model

Inheritance: extends Illuminate\Database\Eloquent\Model
Datei anzeigen Open project: duxet/laravel-rethinkdb Class Usage Examples

Public Methods

Method Description
belongsTo ( string $related, string $foreignKey = null, string $otherKey = null, string $relation = null ) : BelongsTo Define an inverse one-to-one or many relationship.
fromDateTime ( DateTime $value ) : string Retain DateTime format for storage.
getQualifiedKeyName ( ) : string Get the table qualified key name.
hasMany ( string $related, string $foreignKey = null, string $localKey = null ) : Illuminate\Database\Eloquent\Relations\HasMany Define a one-to-many relationship.
hasOne ( string $related, string $foreignKey = null, string $localKey = null ) : Illuminate\Database\Eloquent\Relations\HasOne Define a one-to-one relationship.
newEloquentBuilder ( duxet\Rethinkdb\Query\Builder $query ) : duxet\Rethinkdb\Eloquent\Builder | static Create a new Eloquent query builder for the model.

Protected Methods

Method Description
asDateTime ( DateTime $value ) : DateTime Ensure Timestamps are returned in DateTime.
getDateFormat ( ) : string Get the format for database stored dates.
newBaseQueryBuilder ( ) : Builder Get a new query builder instance for the connection.
originalIsNumericallyEquivalent ( string $key ) : boolean Determine if the new and old values for a given key are numerically equivalent.

Method Details

asDateTime() protected method

Ensure Timestamps are returned in DateTime.
protected asDateTime ( DateTime $value ) : DateTime
$value DateTime
return DateTime

belongsTo() public method

Define an inverse one-to-one or many relationship.
public belongsTo ( string $related, string $foreignKey = null, string $otherKey = null, string $relation = null ) : BelongsTo
$related string
$foreignKey string
$otherKey string
$relation string
return Illuminate\Database\Eloquent\Relations\BelongsTo

fromDateTime() public method

Retain DateTime format for storage.
public fromDateTime ( DateTime $value ) : string
$value DateTime
return string

getDateFormat() protected method

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

getQualifiedKeyName() public method

Get the table qualified key name.
public getQualifiedKeyName ( ) : string
return string

hasMany() public method

Define a one-to-many relationship.
public hasMany ( string $related, string $foreignKey = null, string $localKey = null ) : Illuminate\Database\Eloquent\Relations\HasMany
$related string
$foreignKey string
$localKey string
return Illuminate\Database\Eloquent\Relations\HasMany

hasOne() public method

Define a one-to-one relationship.
public hasOne ( string $related, string $foreignKey = null, string $localKey = null ) : Illuminate\Database\Eloquent\Relations\HasOne
$related string
$foreignKey string
$localKey string
return Illuminate\Database\Eloquent\Relations\HasOne

newBaseQueryBuilder() protected method

Get a new query builder instance for the connection.
protected newBaseQueryBuilder ( ) : Builder
return Builder

newEloquentBuilder() public method

Create a new Eloquent query builder for the model.
public newEloquentBuilder ( duxet\Rethinkdb\Query\Builder $query ) : duxet\Rethinkdb\Eloquent\Builder | static
$query duxet\Rethinkdb\Query\Builder
return duxet\Rethinkdb\Eloquent\Builder | static

originalIsNumericallyEquivalent() protected method

Determine if the new and old values for a given key are numerically equivalent.
protected originalIsNumericallyEquivalent ( string $key ) : boolean
$key string
return boolean