Configuration container for all configuration options of Doctrine.
It combines all configuration options from DBAL & ORM.
Internal note: When adding a new configuration option just write a getter/setter pair.
An EntityRepository serves as a repository for entities with generic as well as business specific methods for retrieving entities.
This class is designed for inheritance and users can subclass this class to write their own repositories with business-specific methods to locate entities.
A lazy collection that allow a fast count when using criteria object Once count gets executed once without collection being initialized, result is cached and returned on subsequent calls until collection gets loaded, then returning the number of loaded results.
Exception thrown when an ORM query unexpectedly returns more than one result.
Exception thrown when an ORM query unexpectedly does not return any results.
An OptimisticLockException is thrown when a version check on an object that uses optimistic locking through a version field fails.
Contains exception messages for all invalid lifecycle state exceptions inside UnitOfWork
A PersistentCollection represents a collection of elements that have persistent state.
Collections of entities represent only the associations (links) to those entities. That means, if the collection is part of a many-many mapping and you remove entities from the collection, only the links in the relation table are removed (on flush). Similarly, if you remove entities from a collection that is part of a one-many mapping this will only result in the nulling out of the foreign keys on flush.
This class is responsible for building DQL query strings via an object oriented PHP interface.
Is thrown when a transaction is required for the current operation, but there is none open.
Entity persister interface Define the behavior that should be implemented by all entity persisters.
Base class for entity persisters that implement a certain inheritance mapping strategy.
All these persisters are assumed to use a discriminator column to discriminate entity types in the hierarchy.
A BasicEntityPersister maps an entity to a single table in a relational database.
A persister is always responsible for a single entity type.
EntityPersisters are used during a UnitOfWork to apply any changes to the persistent state of entities onto a relational database when the UnitOfWork is committed, as well as for basic querying of entities and their associations (not DQL).
The persisting operations that are invoked during a commit of a UnitOfWork to persist the persistent entity state are:
As can be seen from the above list, insertions are batched and executed all at once for increased efficiency.
The querying operations invoked during a UnitOfWork, either through direct find requests or lazy-loading, are the following:
The BasicEntityPersister implementation provides the default behavior for persisting and querying entities that are mapped to a single database table.
Subclasses can be created to provide custom persisting and querying strategies, i.e. spanning multiple tables.
A swappable persister context to use as a container for the current generated query/resultSetMapping/type binding information.
This class is a utility class to be used only by the persister API
This object is highly mutable due to performance reasons. Same reasoning behind its properties being public.
The joined subclass persister maps a single entity instance to several tables in the database as it is defined by the <tt>Class Table Inheritance</tt> strategy.
All these persisters are assumed to use a discriminator column to discriminate entity types in the hierarchy.
Special generator for application-assigned identifiers (doesn't really generate anything).
Id generator that obtains IDs from special "identity" columns. These are columns that automatically get a database-generated, auto-incremented identifier on INSERT.
This generator obtains the last insert id after such an insert.
Class to help with converting Doctrine 1 schema files to Doctrine 2 mapping files
Use this logger to dump the identity map during the onFlush event. This is useful for debugging weird UnitOfWork behavior with complex operations.
The DisconnectedClassMetadataFactory is used to create ClassMetadataInfo objects that do not require the entity class actually exist. This allows us to load some mapping information and use it to do things like generate code from the mapping information.
This class was abstracted from the ORM ClassMetadataFactory.
Generic class used to generate PHP5 entity classes from ClassMetadataInfo instances.
[php] $classes = $em->getClassMetadataFactory()->getAllMetadata();
$generator = new \Doctrine\ORM\Tools\EntityGenerator();
$generator->setGenerateAnnotations(true);
$generator->setGenerateStubMethods(true);
$generator->setRegenerateEntityIfExists(false);
$generator->setUpdateEntityIfExists(true);
$generator->generate($classes, '/path/to/generate/entities');
ResolveTargetEntityListener
Mechanism to overwrite interfaces or classes specified as association targets.
The SchemaTool is a tool to create/drop/update database schemas based on <tt>ClassMetadata</tt> class descriptors.
Wraps the query in order to accurately count the root objects.
Given a DQL like SELECT u FROM User u
it will generate an SQL query like:
SELECT COUNT(*) (SELECT DISTINCT
Works with composite keys but cannot deal with queries that have multiple
root entities (e.g. SELECT f, b from Foo, Bar
)
Wraps the query in order to select root entity IDs for pagination.
Given a DQL like SELECT u FROM User u
it will generate an SQL query like:
SELECT DISTINCT
Works with composite keys but cannot deal with queries that have multiple
root entities (e.g. SELECT f, b from Foo, Bar
)
Replaces the selectClause of the AST with a SELECT DISTINCT root.id equivalent.
Event Args used for the Events::postGenerateSchema event.
This class contains no event data. It is used by events that do not pass state information to an event handler when an event is raised. The single empty EventArgs instance can be obtained through \Doctrine\ORM\Tools\Event\getEmptyInstance.
Event Args used for the Events::postGenerateSchemaTable event.
This class contains no event data. It is used by events that do not pass state information to an event handler when an event is raised. The single empty EventArgs instance can be obtained through \Doctrine\ORM\Tools\Event\getEmptyInstance.
Command to convert a Doctrine 1 schema to a Doctrine 2 mapping file.
Command to convert your mapping information between the various formats.
Command to ensure that Doctrine is properly configured for a production environment.
Command to generate entity classes and method stubs from your mapping information.
Command to create the database schema for a set of classes based on their mappings.
Cache entry interface
IMPORTANT NOTE:
Fields of classes that implement CacheEntry are public for performance reason.
Defines contract for concurrently managed data region.
It should be able to lock an specific cache entry in an atomic operation.
When a entry is locked another process should not be able to read or write the entry. All evict operation should not consider locks, even though an entry is locked evict should be able to delete the entry and its lock.
Defines a region that supports multi-get reading.
With one method call we can get multiple items.
Defines the contract for caches capable of storing query results.
These caches should only concern themselves with storing the matching result ids.
Defines a contract for accessing a particular named region.
With one method call we can get multiple items.
Defines the contract for a cache region which will specifically be used to store entity "update timestamps".
With one method call we can get multiple items.
Defines entity / collection / query key to be stored in the cache region.
Allows multiple roles to be stored in the same cache region.
Defines entity collection roles to be stored in the cache region.
Allows multiple roles to be stored in the same cache region.
Defines entity classes roles to be stored in the cache region.
Allows multiple roles to be stored in the same cache region.
A cache key that identifies a particular query.
Allows multiple roles to be stored in the same cache region.
ANSI compliant quote strategy, this strategy does not apply any quote.
To use this strategy all mapped tables and columns should be ANSI compliant.
This annotation is used to override association mapping of property for an entity relationship.
This annotation is used to override association mappings of relationship properties.
A <tt>ClassMetadata</tt> instance holds all the object-relational mapping metadata of an entity and its associations.
Once populated, ClassMetadata instances are usually cached in a serialized form.
IMPORTANT NOTE:
The fields of this class are only public for 2 reasons: 1) To allow fast READ access. 2) To drastically reduce the size of a serialized instance (private/protected members get the whole class name, namespace inclusive, prepended to every property in the serialized representation).
The ClassMetadataFactory is used to create ClassMetadata objects that contain all the metadata mapping information of a class which describes how a class should be mapped to a relational database.
This class was abstracted from the ORM ClassMetadataFactory.
A <tt>ClassMetadata</tt> instance holds all the object-relational mapping metadata of an entity and its associations.
Once populated, ClassMetadata instances are usually cached in a serialized form.
IMPORTANT NOTE:
The fields of this class are only public for 2 reasons: 1) To allow fast READ access. 2) To drastically reduce the size of a serialized instance (private/protected members get the whole class name, namespace inclusive, prepended to every property in the serialized representation).
References name of a column in the SELECT clause of a SQL query.
Scalar result types can be included in the query result by specifying this annotation in the metadata.
A set of rules for determining the physical column, alias and table quotes
The EntityListeners annotation specifies the callback listener classes to be used for an entity or mapped superclass.
The EntityListeners annotation may be applied to an entity class or mapped superclass.
References an entity in the SELECT clause of a SQL query.
If this annotation is used, the SQL statement should select all of the columns that are mapped to the entity object. This should include foreign key columns to related entities. The results obtained when insufficient data is available are undefined.
Is used to map the columns specified in the SELECT list of the query to the properties or fields of the entity class.
A MappingException indicates that something is wrong with the mapping setup.
Is used to specify an array of native SQL named queries.
The NamedNativeQueries annotation can be applied to an entity or mapped superclass.
Is used to specify a native SQL named query.
The NamedNativeQuery annotation can be applied to an entity or mapped superclass.
Acts as a proxy to a nested Property structure, making it look like just a single scalar property.
This way value objects "just work" without UnitOfWork, Persisters or Hydrators needing any changes.
TODO: Move this class into Common\Reflection
The SqlResultSetMapping annotation is used to specify the mapping of the result of a native SQL query.
The SqlResultSetMapping annotation can be applied to an entity or mapped superclass.
Is used to specify an array of mappings.
The SqlResultSetMappings annotation can be applied to an entity or mapped superclass.
The AnnotationDriver reads the mapping metadata from docblock annotations.
The DriverChain allows you to add multiple other mapping drivers for certain namespaces.
The PHPDriver includes php files which just populate ClassMetadataInfo instances with plain PHP code.
A file driver operates in a mode where it loads the mapping files of individual classes on demand. This requires the user to adhere to the convention of 1 mapping file per class and the file names of the mapping files must correspond to the full class name, including namespace, with the namespace delimiters '\', replaced by dots '.'.
XmlDriver that additionally looks for mapping information in a global file.
A file driver operates in a mode where it loads the mapping files of individual classes on demand. This requires the user to adhere to the convention of 1 mapping file per class and the file names of the mapping files must correspond to the full class name, including namespace, with the namespace delimiters '\', replaced by dots '.'.
YamlDriver that additionally looks for mapping information in a global file.
A file driver operates in a mode where it loads the mapping files of individual classes on demand. This requires the user to adhere to the convention of 1 mapping file per class and the file names of the mapping files must correspond to the full class name, including namespace, with the namespace delimiters '\', replaced by dots '.'.
The StaticPHPDriver calls a static loadMetadata() method on your entity classes where you can manually populate the ClassMetadata instance.
XmlDriver is a metadata driver that enables mapping through XML files.
A file driver operates in a mode where it loads the mapping files of individual classes on demand. This requires the user to adhere to the convention of 1 mapping file per class and the file names of the mapping files must correspond to the full class name, including namespace, with the namespace delimiters '\', replaced by dots '.'.
The YamlDriver reads the mapping metadata from yaml schema files.
A file driver operates in a mode where it loads the mapping files of individual classes on demand. This requires the user to adhere to the convention of 1 mapping file per class and the file names of the mapping files must correspond to the full class name, including namespace, with the namespace delimiters '\', replaced by dots '.'.
Scans a DQL query for tokens.
Lexer moved into its own Component Doctrine\Common\Lexer. This class only stays for being BC.
An LL(*) recursive-descent parser for the context-free grammar of the Doctrine Query Language.
Parses a DQL query, reports any errors in it, and generates an AST.
Encapsulates the resulting components from a DQL query parsing process that can be serialized.
A ResultSetMapping describes how a result set of an SQL query maps to a Doctrine result.
IMPORTANT NOTE: The properties of this class are only public for fast internal READ access and to (drastically) reduce the size of serialized instances for more effective caching due to better (un-)serialization performance.
Users should use the public methods.
A ResultSetMappingBuilder uses the EntityManager to automatically populate entity fields.
IMPORTANT NOTE: The properties of this class are only public for fast internal READ access and to (drastically) reduce the size of serialized instances for more effective caching due to better (un-)serialization performance.
Users should use the public methods.
The SqlWalker is a TreeWalker that walks over a DQL AST and constructs the corresponding SQL.
An adapter implementation of the TreeWalker interface. The methods in this class are empty. This class exists as convenience for creating tree walkers.
Executes the SQL statements for bulk DQL DELETE statements on classes in Class Table Inheritance (JOINED).
Executes the SQL statements for bulk DQL UPDATE statements on classes in Class Table Inheritance (JOINED).
ArithmeticExpression ::= SimpleArithmeticExpression | "(" Subselect ")"
CoalesceExpression ::= "COALESCE" "(" ScalarExpression {"," ScalarExpression}* ")"
CollectionMemberExpression ::= EntityExpression ["NOT"] "MEMBER" ["OF"] CollectionValuedPathExpression
ComparisonExpression ::= ArithmeticExpression ComparisonOperator ( QuantifiedExpression | ArithmeticExpression ) | StringExpression ComparisonOperator (StringExpression | QuantifiedExpression) | BooleanExpression ("=" | "<>" | "!=") (BooleanExpression | QuantifiedExpression) | EnumExpression ("=" | "<>" | "!=") (EnumExpression | QuantifiedExpression) | DatetimeExpression ComparisonOperator (DatetimeExpression | QuantifiedExpression) | EntityExpression ("=" | "<>") (EntityExpression | QuantifiedExpression)
ConditionalPrimary ::= SimpleConditionalExpression | "(" ConditionalExpression ")"
DeleteClause ::= "DELETE" ["FROM"] AbstractSchemaName [["AS"] AliasIdentificationVariable]
EmptyCollectionComparisonExpression ::= CollectionValuedPathExpression "IS" ["NOT"] "EMPTY"
FromClause ::= "FROM" IdentificationVariableDeclaration {"," IdentificationVariableDeclaration}
GeneralCaseExpression ::= "CASE" WhenClause {WhenClause}* "ELSE" ScalarExpression "END"
IdentificationVariableDeclaration ::= RangeVariableDeclaration [IndexBy] {JoinVariableDeclaration}*
InExpression ::= StateFieldPathExpression ["NOT"] "IN" "(" (Literal {"," Literal}* | Subselect) ")"
InstanceOfExpression ::= IdentificationVariable ["NOT"] "INSTANCE" ["OF"] (InstanceOfParameter | "(" InstanceOfParameter {"," InstanceOfParameter}* ")") InstanceOfParameter ::= AbstractSchemaName | InputParameter
Join ::= ["LEFT" ["OUTER"] | "INNER"] "JOIN" JoinAssociationPathExpression ["AS"] AliasIdentificationVariable [("ON" | "WITH") ConditionalExpression]
JoinAssociationDeclaration ::= JoinAssociationPathExpression ["AS"] AliasIdentificationVariable
JoinAssociationPathExpression ::= IdentificationVariable "." (SingleValuedAssociationField | CollectionValuedAssociationField)
JoinClassPathExpression ::= AbstractSchemaName ["AS"] AliasIdentificationVariable
NewObjectExpression ::= "NEW" IdentificationVariable "(" NewObjectArg {"," NewObjectArg}* ")"
NullComparisonExpression ::= (SingleValuedPathExpression | InputParameter) "IS" ["NOT"] "NULL"
NullIfExpression ::= "NULLIF" "(" ScalarExpression "," ScalarExpression ")"
AssociationPathExpression ::= CollectionValuedPathExpression | SingleValuedAssociationPathExpression SingleValuedPathExpression ::= StateFieldPathExpression | SingleValuedAssociationPathExpression StateFieldPathExpression ::= SimpleStateFieldPathExpression | SimpleStateFieldAssociationPathExpression SingleValuedAssociationPathExpression ::= IdentificationVariable "." SingleValuedAssociationField CollectionValuedPathExpression ::= IdentificationVariable "." CollectionValuedAssociationField StateField ::= {EmbeddedClassStateField "."}* SimpleStateField SimpleStateFieldPathExpression ::= IdentificationVariable "." StateField
RangeVariableDeclaration ::= AbstractSchemaName ["AS"] AliasIdentificationVariable
SelectExpression ::= IdentificationVariable ["." "*"] | StateFieldPathExpression | (AggregateExpression | "(" Subselect ")") [["AS"] ["HIDDEN"] FieldAliasIdentificationVariable]
SelectStatement = SelectClause FromClause [WhereClause] [GroupByClause] [HavingClause] [OrderByClause]
SimpleArithmeticExpression ::= ArithmeticTerm {("+" | "-") ArithmeticTerm}*
SimpleCaseExpression ::= "CASE" CaseOperand SimpleWhenClause {SimpleWhenClause}* "ELSE" ScalarExpression "END"
SimpleSelectExpression ::= StateFieldPathExpression | IdentificationVariable | (AggregateExpression [["AS"] FieldAliasIdentificationVariable])
Subselect ::= SimpleSelectClause SubselectFromClause [WhereClause] [GroupByClause] [HavingClause] [OrderByClause]
SubselectFromClause ::= "FROM" SubselectIdentificationVariableDeclaration {"," SubselectIdentificationVariableDeclaration}*
SubselectIdentificationVariableDeclaration ::= AssociationPathExpression ["AS"] AliasIdentificationVariable
UpdateClause ::= "UPDATE" AbstractSchemaName [["AS"] AliasIdentificationVariable] "SET" UpdateItem {"," UpdateItem}*
"DATE_ADD" "(" ArithmeticPrimary "," ArithmeticPrimary "," StringPrimary ")"
"LOCATE" "(" StringPrimary "," StringPrimary ["," SimpleArithmeticExpression]")"
"SUBSTRING" "(" StringPrimary "," SimpleArithmeticExpression "," SimpleArithmeticExpression ")"
Base class for all hydrators. A hydrator is a class that provides some form of transformation of an SQL result set into another structure.
The ArrayHydrator produces a nested array "graph" that is often (not always) interchangeable with the corresponding object graph for read-only access.
Represents a result structure that can be iterated over, hydrating row-by-row during the iteration. An IterableResult is obtained by AbstractHydrator#iterate().
The ObjectHydrator constructs an object graph out of an SQL result set.
Internal note: Highly performance-sensitive code.
Hydrator that produces flat, rectangular results of scalar data.
The created result is almost the same as a regular SQL result set, except that column names are mapped to field names and data type conversions take place.
Lifecycle Events are triggered by the UnitOfWork during lifecycle transitions of entities.
This class contains no event data. It is used by events that do not pass state information to an event handler when an event is raised. The single empty EventArgs instance can be obtained through \Doctrine\ORM\Event\getEmptyInstance.
Class that holds event arguments for a loadMetadata event.
This class contains no event data. It is used by events that do not pass state information to an event handler when an event is raised. The single empty EventArgs instance can be obtained through \Doctrine\ORM\Event\getEmptyInstance.
Class that holds event arguments for a `onClassMetadataNotFound` event.
This object is mutable by design, allowing callbacks having access to it to set the
found metadata in it, and therefore "cancelling" a onClassMetadataNotFound
event
Provides event arguments for the onClear event.
This class contains no event data. It is used by events that do not pass state information to an event handler when an event is raised. The single empty EventArgs instance can be obtained through \Doctrine\ORM\Event\getEmptyInstance.
Provides event arguments for the preFlush event.
This class contains no event data. It is used by events that do not pass state information to an event handler when an event is raised. The single empty EventArgs instance can be obtained through \Doctrine\ORM\Event\getEmptyInstance.
Provides event arguments for the postFlush event.
This class contains no event data. It is used by events that do not pass state information to an event handler when an event is raised. The single empty EventArgs instance can be obtained through \Doctrine\ORM\Event\getEmptyInstance.
Provides event arguments for the preFlush event.
This class contains no event data. It is used by events that do not pass state information to an event handler when an event is raised. The single empty EventArgs instance can be obtained through \Doctrine\ORM\Event\getEmptyInstance.
Class that holds event arguments for a preInsert/preUpdate event.
This class contains no event data. It is used by events that do not pass state information to an event handler when an event is raised. The single empty EventArgs instance can be obtained through \Doctrine\ORM\Event\getEmptyInstance.


Toggle navigation
Roma on Gaia
Share
Facebook
Twitter
Instagram
Download this template
❤
Roma on Gaia
♦
My stylish startup page
Learning how to use templates to create websites in a fast way
Download Demo