class UnitOfWork (View source)

Class UnitOfWork

Methods

__construct(Manager $manager)

No description

execute(Query $query, $fetchPlan = null)

No description

hasProxyFor(Rid $rid)

No description

getProxyFor(Rid $rid, bool $lazy = true, null $fetchPlan = null)

No description

getCollectionFor(array $rids, bool $lazy = true, string $fetchPlan = null)

No description

attach(Proxy $proxy)

No description

string
getRid(Proxy $proxy)

Gets the rid of the proxy.

object|null
load(Rid $rid, mixed $fetchPlan = null)

Executes a query against OrientDB to find the specified RID and finalizes the hydration result.

getManager()

Returns the manager the UnitOfWork is attached to

getHydrator()

Lazily instantiates and returns the Hydrator

getInflector()

No description

Details

__construct(Manager $manager)

Parameters

Manager $manager

execute(Query $query, $fetchPlan = null)

Parameters

Query $query
$fetchPlan

hasProxyFor(Rid $rid)

Parameters

Rid $rid

Proxy getProxyFor(Rid $rid, bool $lazy = true, null $fetchPlan = null)

Parameters

Rid $rid
bool $lazy
null $fetchPlan

Return Value

Proxy

ArrayCollection|null getCollectionFor(array $rids, bool $lazy = true, string $fetchPlan = null)

Parameters

array $rids
bool $lazy
string $fetchPlan

Return Value

ArrayCollection|null

attach(Proxy $proxy)

Parameters

Proxy $proxy

protected string getRid(Proxy $proxy)

Gets the rid of the proxy.

Parameters

Proxy $proxy

Return Value

string

protected object|null load(Rid $rid, mixed $fetchPlan = null)

Executes a query against OrientDB to find the specified RID and finalizes the hydration result.

Optionally the query can be executed using the specified fetch plan.

Parameters

Rid $rid
mixed $fetchPlan

Return Value

object|null

Manager getManager()

Returns the manager the UnitOfWork is attached to

Return Value

Manager

Hydrator getHydrator()

Lazily instantiates and returns the Hydrator

Return Value

Hydrator

protected getInflector()