PHP Класс Bolt\Storage\EntityManager

Legacy methods:
Наследование: implements Bolt\Storage\EntityManagerInterface
Показать файл Открыть проект Примеры использования класса

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

Свойство Тип Описание
$aliases array
$builder Bolt\Storage\Entity\Builder
$collectionManager Bolt\Storage\Collection\CollectionManager
$conn Doctrine\DBAL\Connection
$defaultRepositoryFactory Callable
$eventManager Symfony\Component\EventDispatcher\EventDispatcherInterface
$fieldManager FieldManager
$legacyService Bolt\Storage\ContentLegacyService
$legacyStorage Bolt\Legacy\Storage
$logger Psr\Log\LoggerInterface
$mapping Bolt\Storage\Mapping\MetadataDriver
$repositories array

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

Метод Описание
__call ( string $method, string $args ) : mixed Magic call method acts as a catchall proxy to the legacy repository
__construct ( Doctrine\DBAL\Connection $conn, Symfony\Component\EventDispatcher\EventDispatcherInterface $eventManager, MetadataDriver $mapping, Psr\Log\LoggerInterface $logger = null ) Creates a new EntityManager that operates on the given database connection and uses the given EventManager.
addEntityAlias ( string $alias, string $namespace ) Registers shorter alias access for Entities.
create ( string $className, array $data, Doctrine\Common\Persistence\Mapping\ClassMetadata $metadata = null ) : Bolt\Storage\Entity\Entity Creates an entity of the given class, with the data supplied.
createCollection ( $className ) : mixed Shorthand access method to create collection. Consults aliases to allow short names.
createExpressionBuilder ( ) : Doctrine\DBAL\Query\Expression\ExpressionBuilder
createQueryBuilder ( ) : Doctrine\DBAL\Query\QueryBuilder
delete ( object $object ) : boolean Removes an object instance.
find ( string $className, mixed $id ) : object Finds an object by its identifier.
getCollectionManager ( ) : Bolt\Storage\Collection\CollectionManager
getConnection ( ) : Doctrine\DBAL\Connection Gets the DBAL Driver Connection.
getContent ( string $textquery, array $parameters = [], array &$pager = [], array $whereparameters = [] ) : Content | Content[] Note that this method is explicitly defined here because the magic method above cannot pass dynamic variables by reference
getDefaultRepositoryFactory ( Doctrine\Common\Persistence\Mapping\ClassMetadata $classMetadata ) : callable Returns the default repository factory set on this object
getEntityBuilder ( string $className = null, Bolt\Storage\Mapping\ClassMetadata $classMetadata = null ) : Builder Get an entity builder instance for a given class.
getEventManager ( ) : Symfony\Component\EventDispatcher\EventDispatcherInterface Gets the Event Manager.
getFieldManager ( ) : FieldManager
getLogger ( ) : Psr\Log\LoggerInterface Getter for logger object
getMapper ( ) : MetadataDriver Gets the Class Metadata Driver.
getRepository ( $className )
legacy ( ) : Storage Returns a proxy to the legacy storage service
save ( object $object ) : boolean The object will be entered into the database as a result of this operation.
setCollectionManager ( Bolt\Storage\Collection\CollectionManager $collectionManager )
setDefaultRepositoryFactory ( callable $factory ) Sets a default repository factory that can handle metadata that is not mapped to a specific entity.
setEntityBuilder ( Builder $builder ) : Builder Set an entity builder instance.
setFieldManager ( FieldManager $fieldManager )
setLegacyService ( Bolt\Storage\ContentLegacyService $service ) Sets the LegacyRepository
setLegacyStorage ( Storage $storage ) Sets the LegacyRepository
setRepository ( string $entityName, string $repositoryClass ) Sets a custom repository class for an entity.

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

__call() публичный метод

Magic call method acts as a catchall proxy to the legacy repository
public __call ( string $method, string $args ) : mixed
$method string
$args string
Результат mixed

__construct() публичный метод

Creates a new EntityManager that operates on the given database connection and uses the given EventManager.
public __construct ( Doctrine\DBAL\Connection $conn, Symfony\Component\EventDispatcher\EventDispatcherInterface $eventManager, MetadataDriver $mapping, Psr\Log\LoggerInterface $logger = null )
$conn Doctrine\DBAL\Connection
$eventManager Symfony\Component\EventDispatcher\EventDispatcherInterface
$mapping Bolt\Storage\Mapping\MetadataDriver
$logger Psr\Log\LoggerInterface

addEntityAlias() публичный метод

For example ->addEntityAlias('user', 'Project\Bundle\Module\Entity\User') would allow ->getRepository('user')
public addEntityAlias ( string $alias, string $namespace )
$alias string
$namespace string

create() публичный метод

Creates an entity of the given class, with the data supplied.
public create ( string $className, array $data, Doctrine\Common\Persistence\Mapping\ClassMetadata $metadata = null ) : Bolt\Storage\Entity\Entity
$className string The type of entity to create
$data array The data to use to hydrate the new entity
$metadata Doctrine\Common\Persistence\Mapping\ClassMetadata
Результат Bolt\Storage\Entity\Entity

createCollection() публичный метод

Shorthand access method to create collection. Consults aliases to allow short names.
public createCollection ( $className ) : mixed
$className
Результат mixed

createExpressionBuilder() публичный метод

public createExpressionBuilder ( ) : Doctrine\DBAL\Query\Expression\ExpressionBuilder
Результат Doctrine\DBAL\Query\Expression\ExpressionBuilder

createQueryBuilder() публичный метод

public createQueryBuilder ( ) : Doctrine\DBAL\Query\QueryBuilder
Результат Doctrine\DBAL\Query\QueryBuilder

delete() публичный метод

Passed in object will be removed from the database as a result of this operation.
public delete ( object $object ) : boolean
$object object The object instance to remove.
Результат boolean

find() публичный метод

This is just a convenient shortcut for getRepository($className)->find($id).
public find ( string $className, mixed $id ) : object
$className string The class name of the object to find.
$id mixed The identity of the object to find.
Результат object The found object.

getCollectionManager() публичный метод

public getCollectionManager ( ) : Bolt\Storage\Collection\CollectionManager
Результат Bolt\Storage\Collection\CollectionManager

getConnection() публичный метод

Gets the DBAL Driver Connection.
public getConnection ( ) : Doctrine\DBAL\Connection
Результат Doctrine\DBAL\Connection

getContent() публичный метод

Note that this method is explicitly defined here because the magic method above cannot pass dynamic variables by reference
public getContent ( string $textquery, array $parameters = [], array &$pager = [], array $whereparameters = [] ) : Content | Content[]
$textquery string
$parameters array
$pager array
$whereparameters array
Результат Bolt\Legacy\Content | Bolt\Legacy\Content[]

getDefaultRepositoryFactory() публичный метод

Returns the default repository factory set on this object
public getDefaultRepositoryFactory ( Doctrine\Common\Persistence\Mapping\ClassMetadata $classMetadata ) : callable
$classMetadata Doctrine\Common\Persistence\Mapping\ClassMetadata
Результат callable $factory

getEntityBuilder() публичный метод

Get an entity builder instance for a given class.
public getEntityBuilder ( string $className = null, Bolt\Storage\Mapping\ClassMetadata $classMetadata = null ) : Builder
$className string
$classMetadata Bolt\Storage\Mapping\ClassMetadata
Результат Bolt\Storage\Entity\Builder

getEventManager() публичный метод

Gets the Event Manager.
public getEventManager ( ) : Symfony\Component\EventDispatcher\EventDispatcherInterface
Результат Symfony\Component\EventDispatcher\EventDispatcherInterface

getFieldManager() публичный метод

public getFieldManager ( ) : FieldManager
Результат FieldManager

getLogger() публичный метод

Getter for logger object
public getLogger ( ) : Psr\Log\LoggerInterface
Результат Psr\Log\LoggerInterface

getMapper() публичный метод

Gets the Class Metadata Driver.
public getMapper ( ) : MetadataDriver
Результат Bolt\Storage\Mapping\MetadataDriver

getRepository() публичный метод

public getRepository ( $className )

legacy() публичный метод

Returns a proxy to the legacy storage service
public legacy ( ) : Storage
Результат Bolt\Legacy\Storage

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

The object will be entered into the database as a result of this operation.
public save ( object $object ) : boolean
$object object The instance to persist to storage.
Результат boolean

setCollectionManager() публичный метод

public setCollectionManager ( Bolt\Storage\Collection\CollectionManager $collectionManager )
$collectionManager Bolt\Storage\Collection\CollectionManager

setDefaultRepositoryFactory() публичный метод

Sets a default repository factory that can handle metadata that is not mapped to a specific entity.
public setDefaultRepositoryFactory ( callable $factory )
$factory callable

setEntityBuilder() публичный метод

Set an entity builder instance.
public setEntityBuilder ( Builder $builder ) : Builder
$builder Bolt\Storage\Entity\Builder
Результат Bolt\Storage\Entity\Builder

setFieldManager() публичный метод

public setFieldManager ( FieldManager $fieldManager )
$fieldManager FieldManager

setLegacyService() публичный метод

Sets the LegacyRepository
public setLegacyService ( Bolt\Storage\ContentLegacyService $service )
$service Bolt\Storage\ContentLegacyService

setLegacyStorage() публичный метод

Sets the LegacyRepository
public setLegacyStorage ( Storage $storage )
$storage Bolt\Legacy\Storage

setRepository() публичный метод

Sets a custom repository class for an entity.
public setRepository ( string $entityName, string $repositoryClass )
$entityName string
$repositoryClass string

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

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

protected array $aliases
Результат array

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

protected Builder,Bolt\Storage\Entity $builder
Результат Bolt\Storage\Entity\Builder

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

protected CollectionManager,Bolt\Storage\Collection $collectionManager
Результат Bolt\Storage\Collection\CollectionManager

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

protected Connection,Doctrine\DBAL $conn
Результат Doctrine\DBAL\Connection

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

protected Callable $defaultRepositoryFactory
Результат Callable

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

protected EventDispatcherInterface,Symfony\Component\EventDispatcher $eventManager
Результат Symfony\Component\EventDispatcher\EventDispatcherInterface

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

protected FieldManager,Bolt\Storage $fieldManager
Результат FieldManager

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

protected ContentLegacyService,Bolt\Storage $legacyService
Результат Bolt\Storage\ContentLegacyService

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

protected Storage,Bolt\Legacy $legacyStorage
Результат Bolt\Legacy\Storage

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

protected LoggerInterface,Psr\Log $logger
Результат Psr\Log\LoggerInterface

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

protected MetadataDriver,Bolt\Storage\Mapping $mapping
Результат Bolt\Storage\Mapping\MetadataDriver

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

protected array $repositories
Результат array