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
显示文件 Open project: xpressengine/xpressengine Class Usage Examples

Protected Properties

Property 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.

Public Methods

Method 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.

Protected Methods

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

Private Methods

Method Description
schema ( ) : array get table schema

Method Details

fill() public method

fill
public fill ( array $attributes ) : void
$attributes array attributes
return void

filter() public method

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

getConnectionResolver() public static method

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

getDynamicAttributes() public method

get dynamic attributes
public getDynamicAttributes ( ) : array
return array

getKeyGen() public method

get key generator
public getKeyGen ( ) : Keygen
return Xpressengine\Keygen\Keygen

getProxyOptions() public method

get proxy option
public getProxyOptions ( ) : array
return array

newBaseQueryBuilder() protected method

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

newEloquentBuilder() public method

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

performInsert() protected method

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

resolveConnection() public static method

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

save() public method

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

setConnectionResolver() public static method

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

setDynamic() public method

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

setKeyGen() public static method

Set key generator
public static setKeyGen ( Keygen $keyGenerator ) : void
$keyGenerator Xpressengine\Keygen\Keygen key generator
return void

setProxyOptions() public method

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

unsetConnectionResolver() public static method

Unset the connection resolver for models.
public static unsetConnectionResolver ( ) : void
return void

Property Details

$dynamic protected_oe property

use dynamic query
protected $dynamic

$dynamicAttributes protected_oe property

dynamic mode 애서 사용될 attributes
protected array $dynamicAttributes
return 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
return Illuminate\Database\ConnectionResolverInterface