PHP Класс Xpressengine\Database\Eloquent\DynamicModel

* Illuminate\Database\Eloquent\Model extends * DynamicQuery 를 처리하기 위해 proxy, dynamic 관련 설정 요소 추가 * XE3 에서 Database column 이름을 Camel case 로 사용함에 따른 날짜 column 이름 수정 * 레코드 추가할 때 Xpressengine\Keygen\Keygen 을 이용한 id 자동 생성 기능
Автор: XE Developers ([email protected])
Наследование: extends Illuminate\Database\Eloquent\Model
Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
$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.

Открытые методы

Метод Описание
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.

Защищенные методы

Метод Описание
newBaseQueryBuilder ( ) : DynamicQuery Illuminate Model 의 newBaseQueryBuilder 변경 VirtualConnection 을 통해 DynamicQuery 를 사용하도록 처리
performInsert ( Builder $query, array $options = [] ) : boolean

Приватные методы

Метод Описание
schema ( ) : array get table schema

Описание методов

fill() публичный Метод

fill
public fill ( array $attributes ) : void
$attributes array attributes
Результат void

filter() публичный Метод

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

getConnectionResolver() публичный статический Метод

Get the connection resolver instance.
public static getConnectionResolver ( ) : Illuminate\Database\ConnectionResolverInterface
Результат Illuminate\Database\ConnectionResolverInterface

getDynamicAttributes() публичный Метод

get dynamic attributes
public getDynamicAttributes ( ) : array
Результат array

getKeyGen() публичный Метод

get key generator
public getKeyGen ( ) : Keygen
Результат Xpressengine\Keygen\Keygen

getProxyOptions() публичный Метод

get proxy option
public getProxyOptions ( ) : array
Результат array

newBaseQueryBuilder() защищенный Метод

Illuminate Model 의 newBaseQueryBuilder 변경 VirtualConnection 을 통해 DynamicQuery 를 사용하도록 처리
protected newBaseQueryBuilder ( ) : DynamicQuery
Результат Xpressengine\Database\DynamicQuery

newEloquentBuilder() публичный Метод

Xpressengine\Database\Eloquent\Builder 울 사용하도록 변경
public newEloquentBuilder ( DynamicQuery $query ) : Builder | static
$query Xpressengine\Database\DynamicQuery dynamic query builder
Результат Builder | static

performInsert() защищенный Метод

protected performInsert ( Builder $query, array $options = [] ) : boolean
$query Illuminate\Database\Eloquent\Builder Illuminate database eloquent buildere
$options array options
Результат boolean

resolveConnection() публичный статический Метод

Resolve a connection instance.
public static resolveConnection ( string | null $connection = null ) : Connection
$connection string | null connection name
Результат Illuminate\Database\Connection

save() публичный Метод

Save the model to the database.
public save ( array $options = [] ) : boolean
$options array options
Результат boolean

setConnectionResolver() публичный статический Метод

Set the connection resolver instance.
public static setConnectionResolver ( Illuminate\Database\ConnectionResolverInterface $resolver ) : void
$resolver Illuminate\Database\ConnectionResolverInterface resolver
Результат void

setDynamic() публичный Метод

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

setKeyGen() публичный статический Метод

Set key generator
public static setKeyGen ( Keygen $keyGenerator ) : void
$keyGenerator Xpressengine\Keygen\Keygen key generator
Результат void

setProxyOptions() публичный Метод

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

unsetConnectionResolver() публичный статический Метод

Unset the connection resolver for models.
public static unsetConnectionResolver ( ) : void
Результат void

Описание свойств

$dynamic защищенное свойство

use dynamic query
protected $dynamic

$dynamicAttributes защищенное свойство

dynamic mode 애서 사용될 attributes
protected array $dynamicAttributes
Результат array

$keyGenerator защищенное статическое свойство

key generator
protected static $keyGenerator

$proxyOptions защищенное свойство

proxy options for database proxy
protected $proxyOptions

$resolver защищенное статическое свойство

The connection resolver instance.
protected static ConnectionResolverInterface,Illuminate\Database $resolver
Результат Illuminate\Database\ConnectionResolverInterface