PHP Class Xpressengine\Database\ProxyManager

* DynamicQuery 에서 first, get, insert, update, delete 처리 시 ProxyManager 에 등록된 Proxy 처리 - DynamicField package 를 Proxy interface 를 이용해서 지원 * VirtualConnectionInterface 의 dynamic() 메서드를 통해 획득한 DynamicQuery 에서 proxy 를 사용할 수 있음 * DynamicQuery 의 setProxy(true)->setProxyOption() 로 proxy 를 지원하도록 설정 할 수 있음
See also: Xpressengine\DynamicField\DatabaseProxy
Author: XE Developers ([email protected])
ファイルを表示 Open project: xpressengine/xpressengine Class Usage Examples

Protected Properties

Property Type Description
$conn Xpressengine\Database\VirtualConnectionInterface
$container Xpressengine\Register\Container
$options array

Public Methods

Method Description
delete ( array $wheres ) : void delete
destruct ( ) : void destroy singleton instance
first ( Builder $query ) : Builder 등록된 모든 proxy의 first()를 처리함.
get ( Builder $query ) : Builder 등록된 모든 proxy 의 get() interface 처리
getProxy ( string $name ) : Xpressengine\Database\ProxyInterface get registered proxy
gets ( ) : array get registered proxies
insert ( array $args ) : void insert
instance ( Container $container ) : object create instance if not exists
orders ( Builder $query, array $orders ) : Builder 등록된 모든 proxy의 orders()를 처리함.
register ( Xpressengine\Database\ProxyInterface $proxy ) : void register proxy
set ( Xpressengine\Database\VirtualConnectionInterface $conn, array $options ) : void set connection 등록된 proxy 로 connection 을 주입하기 위해 connection 정보를 가짐 DynamicQuery 에서 주입 받음
update ( array $args, array $wheres = null ) : void update
wheres ( Builder $query, array $wheres ) : Builder 등록된 모든 proxy의 wheres()를 처리함.

Private Methods

Method Description
__clone ( ) : void not able clone
__construct ( Container $container ) singleton

Method Details

delete() public method

delete
public delete ( array $wheres ) : void
$wheres array \Illuminate\Database\Query\Builder's wheres attribute
return void

destruct() public static method

destroy singleton instance
public static destruct ( ) : void
return void

first() public method

등록된 모든 proxy의 first()를 처리함.
public first ( Builder $query ) : Builder
$query Illuminate\Database\Query\Builder query builder
return Illuminate\Database\Query\Builder

get() public method

등록된 모든 proxy 의 get() interface 처리
public get ( Builder $query ) : Builder
$query Illuminate\Database\Query\Builder query builder
return Illuminate\Database\Query\Builder

getProxy() public method

get registered proxy
public getProxy ( string $name ) : Xpressengine\Database\ProxyInterface
$name string proxy name
return Xpressengine\Database\ProxyInterface

gets() public method

get registered proxies
public gets ( ) : array
return array

insert() public method

insert
public insert ( array $args ) : void
$args array parameters
return void

instance() public static method

create instance if not exists
public static instance ( Container $container ) : object
$container Xpressengine\Register\Container register's container
return object

orders() public method

등록된 모든 proxy의 orders()를 처리함.
public orders ( Builder $query, array $orders ) : Builder
$query Illuminate\Database\Query\Builder query builder
$orders array parameters for order
return Illuminate\Database\Query\Builder

register() public method

register proxy
public register ( Xpressengine\Database\ProxyInterface $proxy ) : void
$proxy Xpressengine\Database\ProxyInterface proxy instance
return void

set() public method

set connection 등록된 proxy 로 connection 을 주입하기 위해 connection 정보를 가짐 DynamicQuery 에서 주입 받음
public set ( Xpressengine\Database\VirtualConnectionInterface $conn, array $options ) : void
$conn Xpressengine\Database\VirtualConnectionInterface connection
$options array options
return void

update() public method

update
public update ( array $args, array $wheres = null ) : void
$args array parameters
$wheres array \Illuminate\Database\Query\Builder's wheres attribute
return void

wheres() public method

등록된 모든 proxy의 wheres()를 처리함.
public wheres ( Builder $query, array $wheres ) : Builder
$query Illuminate\Database\Query\Builder query builder
$wheres array parameters for where
return Illuminate\Database\Query\Builder

Property Details

$conn protected_oe property

protected VirtualConnectionInterface,Xpressengine\Database $conn
return Xpressengine\Database\VirtualConnectionInterface

$container protected_oe property

protected Container,Xpressengine\Register $container
return Xpressengine\Register\Container

$options protected_oe property

protected array $options
return array