PHP Class Xpressengine\Database\Eloquent\DynamicModel

* Illuminate\Database\Eloquent\Model extends * DynamicQuery 를 처리하기 위해 proxy, dynamic 관련 설정 요소 추가 * XE3 에서 Database column 이름을 Camel case 로 사용함에 따른 날짜 column 이름 수정 * 레코드 추가할 때 Xpressengine\Keygen\Keygen 을 이용한 id 자동 생성 기능
Author: XE Developers ([email protected])
Inheritance: extends Illuminate\Database\Eloquent\Model
Afficher le fichier Open project: xpressengine/xpressengine Class Usage Examples

Protected Properties

Свойство Type Description
$dynamic use dynamic query
$dynamicAttributes array dynamic mode 애서 사용될 attributes
$keyGenerator key generator
$proxyOptions proxy options for database proxy
$resolver Illuminate\Database\ConnectionResolverInterface The connection resolver instance.

Méthodes publiques

Méthode Description
fill ( array $attributes ) : void fill
filter ( array $args, array $columns = [] ) : array $args 로 넘어온 데이터와 $columns 를 비교해서 $args 값을 거른다.
getConnectionResolver ( ) : Illuminate\Database\ConnectionResolverInterface Get the connection resolver instance.
getDynamicAttributes ( ) : array get dynamic attributes
getKeyGen ( ) : Keygen get key generator
getProxyOptions ( ) : array get proxy option
newEloquentBuilder ( DynamicQuery $query ) : Builder | static Create a new Eloquent query builder for the model.
resolveConnection ( string | null $connection = null ) : Connection Resolve a connection instance.
save ( array $options = [] ) : boolean Save the model to the database.
setConnectionResolver ( Illuminate\Database\ConnectionResolverInterface $resolver ) : void Set the connection resolver instance.
setDynamic ( boolean $use ) dynamic query 사용하도록 설정
setKeyGen ( Keygen $keyGenerator ) : void Set key generator
setProxyOptions ( array $options ) proxy option 설정
unsetConnectionResolver ( ) : void Unset the connection resolver for models.

Méthodes protégées

Méthode Description
newBaseQueryBuilder ( ) : DynamicQuery Illuminate Model 의 newBaseQueryBuilder 변경 VirtualConnection 을 통해 DynamicQuery 를 사용하도록 처리
performInsert ( Builder $query, array $options = [] ) : boolean

Private Methods

Méthode Description
schema ( ) : array get table schema

Method Details

fill() public méthode

fill
public fill ( array $attributes ) : void
$attributes array attributes
Résultat void

filter() public méthode

처리중인 $columns 와 같은 이름을 데이터만 리턴됨 이 처리는 dynamic 을 통해 proxy 를 처리 할 경우에 대해서 동작됨
public filter ( array $args, array $columns = [] ) : array
$args array insert, update data
$columns array table columns
Résultat array

getConnectionResolver() public static méthode

Get the connection resolver instance.
public static getConnectionResolver ( ) : Illuminate\Database\ConnectionResolverInterface
Résultat Illuminate\Database\ConnectionResolverInterface

getDynamicAttributes() public méthode

get dynamic attributes
public getDynamicAttributes ( ) : array
Résultat array

getKeyGen() public méthode

get key generator
public getKeyGen ( ) : Keygen
Résultat Xpressengine\Keygen\Keygen

getProxyOptions() public méthode

get proxy option
public getProxyOptions ( ) : array
Résultat array

newBaseQueryBuilder() protected méthode

Illuminate Model 의 newBaseQueryBuilder 변경 VirtualConnection 을 통해 DynamicQuery 를 사용하도록 처리
protected newBaseQueryBuilder ( ) : DynamicQuery
Résultat Xpressengine\Database\DynamicQuery

newEloquentBuilder() public méthode

Xpressengine\Database\Eloquent\Builder 울 사용하도록 변경
public newEloquentBuilder ( DynamicQuery $query ) : Builder | static
$query Xpressengine\Database\DynamicQuery dynamic query builder
Résultat Builder | static

performInsert() protected méthode

protected performInsert ( Builder $query, array $options = [] ) : boolean
$query Illuminate\Database\Eloquent\Builder Illuminate database eloquent buildere
$options array options
Résultat boolean

resolveConnection() public static méthode

Resolve a connection instance.
public static resolveConnection ( string | null $connection = null ) : Connection
$connection string | null connection name
Résultat Illuminate\Database\Connection

save() public méthode

Save the model to the database.
public save ( array $options = [] ) : boolean
$options array options
Résultat boolean

setConnectionResolver() public static méthode

Set the connection resolver instance.
public static setConnectionResolver ( Illuminate\Database\ConnectionResolverInterface $resolver ) : void
$resolver Illuminate\Database\ConnectionResolverInterface resolver
Résultat void

setDynamic() public méthode

dynamic query 사용하도록 설정
public setDynamic ( boolean $use )
$use boolean use dynamic query

setKeyGen() public static méthode

Set key generator
public static setKeyGen ( Keygen $keyGenerator ) : void
$keyGenerator Xpressengine\Keygen\Keygen key generator
Résultat void

setProxyOptions() public méthode

proxy option 설정
public setProxyOptions ( array $options )
$options array proxy options

unsetConnectionResolver() public static méthode

Unset the connection resolver for models.
public static unsetConnectionResolver ( ) : void
Résultat void

Property Details

$dynamic protected_oe property

use dynamic query
protected $dynamic

$dynamicAttributes protected_oe property

dynamic mode 애서 사용될 attributes
protected array $dynamicAttributes
Résultat array

$keyGenerator protected_oe static_oe property

key generator
protected static $keyGenerator

$proxyOptions protected_oe property

proxy options for database proxy
protected $proxyOptions

$resolver protected_oe static_oe property

The connection resolver instance.
protected static ConnectionResolverInterface,Illuminate\Database $resolver
Résultat Illuminate\Database\ConnectionResolverInterface