PHP Class Doctrine\ODM\OrientDB\Manager

Inheritance: implements Doctrine\Common\Persistence\ObjectManager
Datei anzeigen Open project: doctrine/orientdb-odm Class Usage Examples

Protected Properties

Property Type Description
$binding
$cache
$configuration
$metadataFactory
$proxyFactory
$uow

Public Methods

Method Description
__construct ( Doctrine\OrientDB\Binding\BindingInterface $binding, Configuration $configuration ) Instatiates a new Mapper, injecting the $mapper that will be used to hydrate record retrieved through the $binding.
clear ( stdClass $object = null )
contains ( stdClass $object )
detach ( stdClass $object )
execute ( Query $query, $fetchPlan = null ) : array | Mixed Executes a $query against OrientDB.
find ( string $rid, string $fetchPlan = '*:0' ) : Doctrine\ODM\OrientDB\Proxy\Proxy | object Queries for an object with the given $rid.
findRecords ( array $rids, boolean $lazy = false, mixed $fetchPlan = '*:0' ) : Doctrine\ODM\OrientDB\Collections\ArrayCollection Queries for an array of objects with the given $rids.
flush ( )
getBinding ( ) : Doctrine\OrientDB\Binding\BindingInterface Returns the binding instance used to communicate OrientDB.
getCache ( ) : Doctrine\Common\Cache\Cache Returns the Cache.
getClassMetadata ( string $class ) : Doctrine\Common\Persistence\Mapping\ClassMetadata Gets the $class Metadata.
getConfiguration ( ) : Configuration Returns the Configuration of the Manager
getInflector ( ) : Doctrine\Common\Inflector\Inflector Returns the Inflector associated with this manager.
getMetadataFactory ( ) : Doctrine\Common\Persistence\Mapping\ClassMetadataFactory Returns the Metadata factory associated with this manager.
getProxyFactory ( ) : ProxyFactory Returns the ProxyFactory associated with this manager.
getReference ( $rid ) : Doctrine\ODM\OrientDB\Proxy\Proxy Returns a reference to an entity. It will be lazily and transparently loaded if anything other than the identifier is touched.
getRepository ( string $className ) : Repository Returns the Repository class associated with the $class.
getUnitOfWork ( )
initializeObject ( object $obj ) Helper method to initialize a lazy loading proxy or persistent collection.
merge ( stdClass $object )
persist ( stdClass $object )
refresh ( stdClass $object )
remove ( stdClass $object )

Method Details

__construct() public method

Instatiates a new Mapper, injecting the $mapper that will be used to hydrate record retrieved through the $binding.
public __construct ( Doctrine\OrientDB\Binding\BindingInterface $binding, Configuration $configuration )
$binding Doctrine\OrientDB\Binding\BindingInterface
$configuration Configuration

clear() public method

public clear ( stdClass $object = null )
$object stdClass

contains() public method

public contains ( stdClass $object )
$object stdClass

detach() public method

public detach ( stdClass $object )
$object stdClass

execute() public method

This method should be used to execute queries which should not return a result (UPDATE, INSERT) or to retrieve multiple objects: to retrieve a single record look at ->find*() methods.
public execute ( Query $query, $fetchPlan = null ) : array | Mixed
$query Doctrine\OrientDB\Query\Query
return array | Mixed

find() public method

If $lazy loading is used, all of this won't be executed unless the returned Proxy object is called via __invoke, e.g.: $lazyLoadedRecord = $manager->find('1:1', true); $record = $lazyLoadedRecord();
public find ( string $rid, string $fetchPlan = '*:0' ) : Doctrine\ODM\OrientDB\Proxy\Proxy | object
$rid string
$fetchPlan string
return Doctrine\ODM\OrientDB\Proxy\Proxy | object

findRecords() public method

In case of laziness a collection of proxies is returned which contain either uninitialized proxies for entities the UnitOfWork didn't know about yet, or already existing ones.
public findRecords ( array $rids, boolean $lazy = false, mixed $fetchPlan = '*:0' ) : Doctrine\ODM\OrientDB\Collections\ArrayCollection
$rids array
$lazy boolean
$fetchPlan mixed
return Doctrine\ODM\OrientDB\Collections\ArrayCollection

flush() public method

public flush ( )

getBinding() public method

Returns the binding instance used to communicate OrientDB.
public getBinding ( ) : Doctrine\OrientDB\Binding\BindingInterface
return Doctrine\OrientDB\Binding\BindingInterface

getCache() public method

Returns the Cache.
public getCache ( ) : Doctrine\Common\Cache\Cache
return Doctrine\Common\Cache\Cache

getClassMetadata() public method

Gets the $class Metadata.
public getClassMetadata ( string $class ) : Doctrine\Common\Persistence\Mapping\ClassMetadata
$class string
return Doctrine\Common\Persistence\Mapping\ClassMetadata

getConfiguration() public method

Returns the Configuration of the Manager
public getConfiguration ( ) : Configuration
return Configuration

getInflector() public method

Returns the Inflector associated with this manager.
public getInflector ( ) : Doctrine\Common\Inflector\Inflector
return Doctrine\Common\Inflector\Inflector

getMetadataFactory() public method

Returns the Metadata factory associated with this manager.
public getMetadataFactory ( ) : Doctrine\Common\Persistence\Mapping\ClassMetadataFactory
return Doctrine\Common\Persistence\Mapping\ClassMetadataFactory

getProxyFactory() public method

Returns the ProxyFactory associated with this manager.
public getProxyFactory ( ) : ProxyFactory
return Doctrine\ODM\OrientDB\Proxy\ProxyFactory

getReference() public method

Returns a reference to an entity. It will be lazily and transparently loaded if anything other than the identifier is touched.
public getReference ( $rid ) : Doctrine\ODM\OrientDB\Proxy\Proxy
$rid
return Doctrine\ODM\OrientDB\Proxy\Proxy

getRepository() public method

Returns the Repository class associated with the $class.
public getRepository ( string $className ) : Repository
$className string
return Repository

getUnitOfWork() public method

public getUnitOfWork ( )

initializeObject() public method

This method is a no-op for other objects.
public initializeObject ( object $obj )
$obj object

merge() public method

public merge ( stdClass $object )
$object stdClass

persist() public method

public persist ( stdClass $object )
$object stdClass

refresh() public method

public refresh ( stdClass $object )
$object stdClass

remove() public method

public remove ( stdClass $object )
$object stdClass

Property Details

$binding protected_oe property

protected $binding

$cache protected_oe property

protected $cache

$configuration protected_oe property

protected $configuration

$metadataFactory protected_oe property

protected $metadataFactory

$proxyFactory protected_oe property

protected $proxyFactory

$uow protected_oe property

protected $uow