PHP 클래스 Bolt\Storage\EntityManager

Legacy methods:
상속: implements Bolt\Storage\EntityManagerInterface
파일 보기 프로젝트 열기: bolt/bolt 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$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