class ProxyManager

ProxyManager

  • DynamicQuery 에서 first, get, insert, update, delete 처리 시 ProxyManager 에 등록된 Proxy 처리

    • DynamicField package 를 Proxy interface 를 이용해서 지원
  • VirtualConnectionInterface 의 dynamic() 메서드를 통해 획득한 DynamicQuery 에서 proxy 를 사용할 수 있음

  • DynamicQuery 의 setProxy(true)->setProxyOption() 로 proxy 를 지원하도록 설정 할 수 있음

Constants

REGISTER_KEY

Properties

protected VirtualConnectionInterface $conn
protected array $options
protected Container $container
static private array $instance singleton instances

Methods

__construct(Container $container)

singleton

void
__clone()

not able clone

static object
instance(Container $container)

create instance if not exists

static void
destruct()

destroy singleton instance

void
register(ProxyInterface $proxy)

register proxy

array
gets()

get registered proxies

getProxy(string $name)

get registered proxy

void
set(VirtualConnectionInterface $conn, array $options)

set connection 등록된 proxy 로 connection 을 주입하기 위해 connection 정보를 가짐 DynamicQuery 에서 주입 받음

void
insert(array $args)

insert

void
update(array $args, array $wheres = null)

update

void
delete(array $wheres)

delete

Builder
get(Builder $query)

등록된 모든 proxy 의 get() interface 처리

Builder
first(Builder $query)

등록된 모든 proxy의 first()를 처리함.

Builder
wheres(Builder $query, array $wheres)

등록된 모든 proxy의 wheres()를 처리함.

Builder
orders(Builder $query, array $orders)

등록된 모든 proxy의 orders()를 처리함.

Details

at line 72
private __construct(Container $container)

singleton

Parameters

Container $container register's container

at line 83
private void __clone()

not able clone

Return Value

void

at line 94
static object instance(Container $container)

create instance if not exists

Parameters

Container $container register's container

Return Value

object

at line 106
static void destruct()

destroy singleton instance

Return Value

void

at line 117
void register(ProxyInterface $proxy)

register proxy

Parameters

ProxyInterface $proxy proxy instance

Return Value

void

at line 127
array gets()

get registered proxies

Return Value

array

at line 139
ProxyInterface getProxy(string $name)

get registered proxy

Parameters

string $name proxy name

Return Value

ProxyInterface

Exceptions

NotExistsProxyException

at line 158
void set(VirtualConnectionInterface $conn, array $options)

set connection 등록된 proxy 로 connection 을 주입하기 위해 connection 정보를 가짐 DynamicQuery 에서 주입 받음

Parameters

VirtualConnectionInterface $conn connection
array $options options

Return Value

void

at line 170
void insert(array $args)

insert

Parameters

array $args parameters

Return Value

void

at line 186
void update(array $args, array $wheres = null)

update

Parameters

array $args parameters
array $wheres \Illuminate\Database\Query\Builder's wheres attribute

Return Value

void

at line 201
void delete(array $wheres)

delete

Parameters

array $wheres \Illuminate\Database\Query\Builder's wheres attribute

Return Value

void

at line 216
Builder get(Builder $query)

등록된 모든 proxy 의 get() interface 처리

Parameters

Builder $query query builder

Return Value

Builder

at line 232
Builder first(Builder $query)

등록된 모든 proxy의 first()를 처리함.

Parameters

Builder $query query builder

Return Value

Builder

at line 249
Builder wheres(Builder $query, array $wheres)

등록된 모든 proxy의 wheres()를 처리함.

Parameters

Builder $query query builder
array $wheres parameters for where

Return Value

Builder

at line 266
Builder orders(Builder $query, array $orders)

등록된 모든 proxy의 orders()를 처리함.

Parameters

Builder $query query builder
array $orders parameters for order

Return Value

Builder