Commit 64b57bbc authored by Benjamin Eberlei's avatar Benjamin Eberlei

Merge upstream into lock-support branch

parents c3303881 3b01277f
......@@ -52,6 +52,7 @@ $cli->addCommands(array(
new \Doctrine\ORM\Tools\Console\Command\GenerateProxiesCommand(),
new \Doctrine\ORM\Tools\Console\Command\ConvertMappingCommand(),
new \Doctrine\ORM\Tools\Console\Command\RunDqlCommand(),
new \Doctrine\ORM\Tools\Console\Command\ValidateSchemaCommand(),
));
$cli->run();
\ No newline at end of file
......@@ -179,7 +179,7 @@ class AnnotationReader
// Attempt to grab data from cache
if (($data = $this->_cache->fetch($cacheKey)) !== false) {
return $data;
}
}
$context = 'method ' . $method->getDeclaringClass()->getName() . '::' . $method->getName() . '()';
$annotations = $this->_parser->parse($method->getDocComment(), $context);
......
......@@ -19,7 +19,7 @@
namespace Doctrine\DBAL;
use PDO, Closure,
use PDO, Closure, Exception,
Doctrine\DBAL\Types\Type,
Doctrine\DBAL\Driver\Connection as DriverConnection,
Doctrine\Common\EventManager,
......@@ -310,9 +310,8 @@ class Connection implements DriverConnection
* @param string $statement The SQL query.
* @param array $params The query parameters.
* @return array
* @todo Rename: fetchAssoc
*/
public function fetchRow($statement, array $params = array())
public function fetchAssoc($statement, array $params = array())
{
return $this->executeQuery($statement, $params)->fetch(PDO::FETCH_ASSOC);
}
......@@ -583,10 +582,10 @@ class Connection implements DriverConnection
* represents a row of the result set.
* @return mixed The projected result of the query.
*/
public function project($query, array $params = array(), Closure $function)
public function project($query, array $params, Closure $function)
{
$result = array();
$stmt = $this->executeQuery($query, $params);
$stmt = $this->executeQuery($query, $params ?: array());
while ($row = $stmt->fetch()) {
$result[] = $function($row);
......@@ -706,6 +705,28 @@ class Connection implements DriverConnection
return $this->_conn->lastInsertId($seqName);
}
/**
* Executes a function in a transaction.
*
* The function gets passed this Connection instance as an (optional) parameter.
*
* If an exception occurs during execution of the function or transaction commit,
* the transaction is rolled back and the exception re-thrown.
*
* @param Closure $func The function to execute transactionally.
*/
public function transactional(Closure $func)
{
$this->beginTransaction();
try {
$func($this);
$this->commit();
} catch (Exception $e) {
$this->rollback();
throw $e;
}
}
/**
* Starts a transaction by suspending auto-commit mode.
*
......@@ -789,7 +810,7 @@ class Connection implements DriverConnection
* Gets the SchemaManager that can be used to inspect or change the
* database schema through the connection.
*
* @return Doctrine\DBAL\Schema\AbstractSchemaManager
* @return Doctrine\DBAL\Schema\SchemaManager
*/
public function getSchemaManager()
{
......@@ -820,7 +841,7 @@ class Connection implements DriverConnection
* @return boolean
* @throws ConnectionException If no transaction is active.
*/
public function getRollbackOnly()
public function isRollbackOnly()
{
if ($this->_transactionNestingLevel == 0) {
throw ConnectionException::noActiveTransaction();
......@@ -911,4 +932,4 @@ class Connection implements DriverConnection
}
}
}
}
}
\ No newline at end of file
<?php
/*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* This software consists of voluntary contributions made by many individuals
* and is licensed under the LGPL. For more information, see
* <http://www.doctrine-project.org>.
*/
namespace Doctrine\DBAL;
......@@ -51,5 +68,5 @@ interface Driver
* @param Doctrine\DBAL\Connection $conn
* @return string $database
*/
public function getDatabase(\Doctrine\DBAL\Connection $conn);
public function getDatabase(Connection $conn);
}
\ No newline at end of file
<?php
/*
* $Id$
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
......
<?php
/*
* $Id$
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
......@@ -25,13 +23,10 @@ use Doctrine\DBAL\Driver,
Doctrine\DBAL\Connection;
/**
* IBM Db2 Driver
* IBM DB2 Driver
*
* @license http://www.opensource.org/licenses/lgpl-license.php LGPL
* @link www.doctrine-project.com
* @since 1.0
* @version $Revision$
* @author Benjamin Eberlei <kontakt@beberlei.de>
* @since 2.0
* @author Benjamin Eberlei <kontakt@beberlei.de>
*/
class DB2Driver implements Driver
{
......
<?php
/*
* $Id$
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
......@@ -21,17 +19,17 @@
namespace Doctrine\DBAL\Driver\PDOMsSql;
use PDO, Doctrine\DBAL\Driver\Connection as DriverConnection;
/**
* MsSql Connection implementation.
*
* @since 2.0
*/
class Connection extends \PDO implements \Doctrine\DBAL\Driver\Connection
class Connection extends PDO implements DriverConnection
{
/**
* Performs the rollback.
*
* @override
* {@inheritdoc}
*/
public function rollback()
{
......@@ -39,9 +37,7 @@ class Connection extends \PDO implements \Doctrine\DBAL\Driver\Connection
}
/**
* Performs the commit.
*
* @override
* {@inheritdoc}
*/
public function commit()
{
......@@ -49,12 +45,21 @@ class Connection extends \PDO implements \Doctrine\DBAL\Driver\Connection
}
/**
* Begins a database transaction.
*
* @override
* {@inheritdoc}
*/
public function beginTransaction()
{
$this->exec('BEGIN TRANSACTION');
}
/**
* {@inheritdoc}
*/
public function lastInsertId($name = null)
{
$stmt = $this->query('SELECT SCOPE_IDENTITY()');
$id = $stmt->fetchColumn();
$stmt->closeCursor();
return $id;
}
}
\ No newline at end of file
<?php
/*
* $Id$
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
......
<?php
/*
* $Id$
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
......
<?php
/*
* $Id$
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
......
......@@ -1901,4 +1901,4 @@ abstract class AbstractPlatform
{
return 'TRUNCATE '.$tableName;
}
}
}
\ No newline at end of file
......@@ -25,7 +25,7 @@ use Doctrine\DBAL\Platforms\AbstractPlatform;
/**
* Type that maps an SQL INT to a PHP integer.
*
*
* @author Roman Borschel <roman@code-factory.org>
* @since 2.0
*/
......@@ -43,9 +43,9 @@ class IntegerType extends Type
public function convertToPHPValue($value, AbstractPlatform $platform)
{
return (int) $value;
return (null === $value) ? null : (int) $value;
}
public function getBindingType()
{
return \PDO::PARAM_INT;
......
<?php
/*
* $Id$
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
......@@ -21,7 +19,8 @@
namespace Doctrine\ORM;
use Doctrine\Common\EventManager,
use Closure, Exception,
Doctrine\Common\EventManager,
Doctrine\DBAL\Connection,
Doctrine\ORM\Mapping\ClassMetadata,
Doctrine\ORM\Mapping\ClassMetadataFactory,
......@@ -30,10 +29,7 @@ use Doctrine\Common\EventManager,
/**
* The EntityManager is the central access point to ORM functionality.
*
* @license http://www.opensource.org/licenses/lgpl-license.php LGPL
* @link www.doctrine-project.org
* @since 2.0
* @version $Revision$
* @author Benjamin Eberlei <kontakt@beberlei.de>
* @author Guilherme Blanco <guilhermeblanco@hotmail.com>
* @author Jonathan Wage <jonwage@gmail.com>
......@@ -154,11 +150,12 @@ class EntityManager
*
* Example:
*
* [php]
* <code>
* $qb = $em->createQueryBuilder();
* $expr = $em->getExpressionBuilder();
* $qb->select('u')->from('User', 'u')
* ->where($expr->orX($expr->eq('u.id', 1), $expr->eq('u.id', 2)));
* </code>
*
* @return ExpressionBuilder
*/
......@@ -172,14 +169,44 @@ class EntityManager
/**
* Starts a transaction on the underlying database connection.
*
* @deprecated Use {@link getConnection}.beginTransaction().
*/
public function beginTransaction()
{
$this->_conn->beginTransaction();
}
/**
* Executes a function in a transaction.
*
* The function gets passed this EntityManager instance as an (optional) parameter.
*
* {@link flush} is invoked prior to transaction commit.
*
* If an exception occurs during execution of the function or flushing or transaction commit,
* the transaction is rolled back, the EntityManager closed and the exception re-thrown.
*
* @param Closure $func The function to execute transactionally.
*/
public function transactional(Closure $func)
{
$this->_conn->beginTransaction();
try {
$func($this);
$this->flush();
$this->_conn->commit();
} catch (Exception $e) {
$this->close();
$this->_conn->rollback();
throw $e;
}
}
/**
* Commits a transaction on the underlying database connection.
*
* @deprecated Use {@link getConnection}.commit().
*/
public function commit()
{
......@@ -187,13 +214,13 @@ class EntityManager
}
/**
* Performs a rollback on the underlying database connection and closes the
* EntityManager as it may now be in a corrupted state.
* Performs a rollback on the underlying database connection.
*
* @deprecated Use {@link getConnection}.rollback().
*/
public function rollback()
{
$this->_conn->rollback();
$this->close();
}
/**
......@@ -274,6 +301,9 @@ class EntityManager
* Flushes all changes to objects that have been queued up to now to the database.
* This effectively synchronizes the in-memory state of managed objects with the
* database.
*
* @throws Doctrine\ORM\OptimisticLockException If a version check on an entity that
* makes use of optimistic locking fails.
*/
public function flush()
{
......
......@@ -21,23 +21,36 @@ namespace Doctrine\ORM\Id;
use Doctrine\ORM\EntityManager;
/**
* 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 IdentityGenerator extends AbstractIdGenerator
{
/** @var string The name of the sequence to pass to lastInsertId(), if any. */
private $_seqName;
/**
* @param string $seqName The name of the sequence to pass to lastInsertId()
* to obtain the last generated identifier within the current
* database session/connection, if any.
*/
public function __construct($seqName = null)
{
$this->_seqName = $seqName;
}
/**
* Generates an ID for the given entity.
*
* @param object $entity
* @return integer|float
* @override
* {@inheritdoc}
*/
public function generate(EntityManager $em, $entity)
{
return $em->getConnection()->lastInsertId();
return $em->getConnection()->lastInsertId($this->_seqName);
}
/**
* @return boolean
* @override
* {@inheritdoc}
*/
public function isPostInsertGenerator()
{
......
<?php
/*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* This software consists of voluntary contributions made by many individuals
* and is licensed under the LGPL. For more information, see
* <http://www.doctrine-project.org>.
*/
namespace Doctrine\ORM\Id;
use Doctrine\ORM\EntityManager;
class SequenceIdentityGenerator extends IdentityGenerator
{
private $_sequenceName;
public function __construct($sequenceName)
{
$this->_sequenceName = $sequenceName;
}
public function generate(EntityManager $em, $entity)
{
return $em->getConnection()->lastInsertId($this->_sequenceName);
}
/**
* @return boolean
* @override
*/
public function isPostInsertGenerator()
{
return true;
}
}
\ No newline at end of file
......@@ -19,8 +19,10 @@
namespace Doctrine\ORM\Mapping;
use Doctrine\ORM\ORMException,
Doctrine\DBAL\Platforms\AbstractPlatform,
use ReflectionException,
Doctrine\ORM\ORMException,
Doctrine\ORM\EntityManager,
Doctrine\DBAL\Platforms,
Doctrine\ORM\Events;
/**
......@@ -53,7 +55,7 @@ class ClassMetadataFactory
*
* @param $driver The metadata driver to use.
*/
public function __construct(\Doctrine\ORM\EntityManager $em)
public function __construct(EntityManager $em)
{
$this->_em = $em;
}
......@@ -94,15 +96,15 @@ class ClassMetadataFactory
if ( ! $this->_initialized) {
$this->_initialize();
}
$metadata = array();
foreach ($this->_driver->getAllClassNames() as $className) {
$metadata[] = $this->getMetadataFor($className);
}
return $metadata;
}
/**
* Lazy initialization of this stuff, especially the metadata driver,
* since these are not needed at all when a metadata cache is active.
......@@ -252,7 +254,7 @@ class ClassMetadataFactory
// Invoke driver
try {
$this->_driver->loadMetadataForClass($className, $class);
} catch(\ReflectionException $e) {
} catch(ReflectionException $e) {
throw MappingException::reflectionFailure($className, $e);
}
......@@ -275,9 +277,9 @@ class ClassMetadataFactory
} else {
$this->_completeIdGeneratorMapping($class);
}
if ($parent && $parent->isInheritanceTypeSingleTable()) {
$class->setTableName($parent->getTableName());
$class->setPrimaryTable($parent->table);
}
$class->setParentClasses($visited);
......@@ -376,7 +378,13 @@ class ClassMetadataFactory
// Create & assign an appropriate ID generator instance
switch ($class->generatorType) {
case ClassMetadata::GENERATOR_TYPE_IDENTITY:
$class->setIdGenerator(new \Doctrine\ORM\Id\IdentityGenerator());
// For PostgreSQL IDENTITY (SERIAL) we need a sequence name. It defaults to
// <table>_<column>_seq in PostgreSQL for SERIAL columns.
// Not pretty but necessary and the simplest solution that currently works.
$seqName = $this->_targetPlatform instanceof Platforms\PostgreSQLPlatform ?
$class->table['name'] . '_' . $class->columnNames[$class->identifier[0]] . '_seq' :
null;
$class->setIdGenerator(new \Doctrine\ORM\Id\IdentityGenerator($seqName));
break;
case ClassMetadata::GENERATOR_TYPE_SEQUENCE:
// If there is no sequence definition yet, create a default definition
......
......@@ -317,7 +317,7 @@ class ClassMetadataInfo
* READ-ONLY: The ID generator used for generating IDs for this class.
*
* @var AbstractIdGenerator
* @todo Remove
* @todo Remove!
*/
public $idGenerator;
......@@ -335,6 +335,7 @@ class ClassMetadataInfo
* </code>
*
* @var array
* @todo Merge with tableGeneratorDefinition into generic generatorDefinition
*/
public $sequenceGeneratorDefinition;
......@@ -343,6 +344,7 @@ class ClassMetadataInfo
* TABLE generation strategy.
*
* @var array
* @todo Merge with tableGeneratorDefinition into generic generatorDefinition
*/
public $tableGeneratorDefinition;
......@@ -395,7 +397,7 @@ class ClassMetadataInfo
public function getReflectionClass()
{
if ( ! $this->reflClass) {
$this->reflClass = new ReflectionClass($entityName);
$this->reflClass = new ReflectionClass($this->name);
}
return $this->reflClass;
}
......@@ -901,8 +903,8 @@ class ClassMetadataInfo
/**
* Sets the name of the primary table the class is mapped to.
*
* @param string $tableName The table name.
* @deprecated
* @param string $tableName The table name.
* @deprecated Use {@link setPrimaryTable}.
*/
public function setTableName($tableName)
{
......@@ -910,18 +912,22 @@ class ClassMetadataInfo
}
/**
* Sets the primary table definition. The provided array must have the
* Sets the primary table definition. The provided array supports the
* following structure:
*
* name => <tableName>
* schema => <schemaName>
* catalog => <catalogName>
* name => <tableName> (optional, defaults to class name)
* indexes => array of indexes (optional)
* uniqueConstraints => array of constraints (optional)
*
* @param array $primaryTableDefinition
* @param array $table
*/
public function setPrimaryTable(array $primaryTableDefinition)
public function setPrimaryTable(array $table)
{
$this->table = $primaryTableDefinition;
if (isset($table['name']) && $table['name'][0] == '`') {
$table['name'] = trim($table['name'], '`');
$table['quoted'] = true;
}
$this->table = $table;
}
/**
......
<?php
/*
* $Id$
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
......@@ -31,14 +29,11 @@ require __DIR__ . '/DoctrineAnnotations.php';
/**
* The AnnotationDriver reads the mapping metadata from docblock annotations.
*
* @license http://www.opensource.org/licenses/lgpl-license.php LGPL
* @link www.doctrine-project.org
* @since 2.0
* @version $Revision$
* @author Benjamin Eberlei <kontakt@beberlei.de>
* @author Guilherme Blanco <guilhermeblanco@hotmail.com>
* @author Jonathan H. Wage <jonwage@gmail.com>
* @author Roman Borschel <roman@code-factory.org>
* @since 2.0
* @author Benjamin Eberlei <kontakt@beberlei.de>
* @author Guilherme Blanco <guilhermeblanco@hotmail.com>
* @author Jonathan H. Wage <jonwage@gmail.com>
* @author Roman Borschel <roman@code-factory.org>
*/
class AnnotationDriver implements Driver
{
......
......@@ -78,13 +78,6 @@ class DatabaseDriver implements Driver
$ids = array();
$fieldMappings = array();
foreach ($columns as $column) {
// Skip columns that are foreign keys
foreach ($foreignKeys as $foreignKey) {
if (in_array(strtolower($column->getName()), array_map('strtolower', $foreignKey->getColumns()))) {
continue(2);
}
}
$fieldMapping = array();
if (isset($indexes['primary']) && in_array($column->getName(), $indexes['primary']->getColumns())) {
$fieldMapping['id'] = true;
......@@ -100,7 +93,7 @@ class DatabaseDriver implements Driver
} else if ($column->getType() instanceof \Doctrine\DBAL\Types\IntegerType) {
$fieldMapping['unsigned'] = $column->getUnsigned();
}
$fieldMapping['notnull'] = $column->getNotNull();
$fieldMapping['nullable'] = $column->getNotNull() ? false : true;
if (isset($fieldMapping['id'])) {
$ids[] = $fieldMapping;
......
<?php
/*
* $Id$
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
......
<?php
/*
* $Id$
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
......@@ -27,14 +25,11 @@ use Doctrine\ORM\Mapping\ClassMetadataInfo,
/**
* The YamlDriver reads the mapping metadata from yaml schema files.
*
* @license http://www.opensource.org/licenses/lgpl-license.php LGPL
* @link www.doctrine-project.org
* @since 2.0
* @version $Revision$
* @author Benjamin Eberlei <kontakt@beberlei.de>
* @author Guilherme Blanco <guilhermeblanco@hotmail.com>
* @author Jonathan H. Wage <jonwage@gmail.com>
* @author Roman Borschel <roman@code-factory.org>
* @since 2.0
* @author Benjamin Eberlei <kontakt@beberlei.de>
* @author Guilherme Blanco <guilhermeblanco@hotmail.com>
* @author Jonathan H. Wage <jonwage@gmail.com>
* @author Roman Borschel <roman@code-factory.org>
*/
class YamlDriver extends AbstractFileDriver
{
......@@ -61,13 +56,16 @@ class YamlDriver extends AbstractFileDriver
}
// Evaluate root level properties
$table = array();
if (isset($element['table'])) {
$metadata->table['name'] = $element['table'];
$table['name'] = $element['table'];
}
$metadata->setPrimaryTable($table);
/* not implemented specially anyway. use table = schema.table
if (isset($element['schema'])) {
$metadata->table['schema'] = $element['schema'];
}
}*/
if (isset($element['inheritanceType'])) {
$metadata->setInheritanceType(constant('Doctrine\ORM\Mapping\ClassMetadata::INHERITANCE_TYPE_' . strtoupper($element['inheritanceType'])));
......
......@@ -19,13 +19,15 @@
namespace Doctrine\ORM;
use Exception;
/**
* Base exception class for all ORM exceptions.
*
* @author Roman Borschel <roman@code-factory.org>
* @since 2.0
*/
class ORMException extends \Exception
class ORMException extends Exception
{
public static function missingMappingDriverImpl()
{
......
......@@ -20,16 +20,34 @@
namespace Doctrine\ORM;
/**
* OptimisticLockException
* An OptimisticLockException is thrown when a version check on an object
* that uses optimistic locking through a version field fails.
*
* @author Roman Borschel <roman@code-factory.org>
* @since 2.0
*/
class OptimisticLockException extends ORMException
{
public static function lockFailed()
private $entity;
public function __construct($msg, $entity)
{
$this->entity = $entity;
}
/**
* Gets the entity that caused the exception.
*
* @return object
*/
public function getEntity()
{
return $this->entity;
}
public static function lockFailed($entity)
{
return new self("The optimistic lock failed.");
return new self("The optimistic lock on an entity failed.", $entity);
}
public static function lockFailedVersionMissmatch($expectedLockVersion, $actualLockVersion)
......
......@@ -330,7 +330,7 @@ class BasicEntityPersister
$result = $this->_conn->executeUpdate($sql, $params, $types);
if ($this->_class->isVersioned && ! $result) {
throw OptimisticLockException::lockFailed();
throw OptimisticLockException::lockFailed($entity);
}
}
......
......@@ -36,7 +36,7 @@ class ManyToManyPersister extends AbstractCollectionPersister
*
* @override
*/
protected function _getDeleteRowSql(PersistentCollection $coll)
protected function _getDeleteRowSQL(PersistentCollection $coll)
{
$mapping = $coll->getMapping();
$joinTable = $mapping->joinTable;
......@@ -51,7 +51,7 @@ class ManyToManyPersister extends AbstractCollectionPersister
* @internal Order of the parameters must be the same as the order of the columns in
* _getDeleteRowSql.
*/
protected function _getDeleteRowSqlParameters(PersistentCollection $coll, $element)
protected function _getDeleteRowSQLParameters(PersistentCollection $coll, $element)
{
return $this->_collectJoinTableColumnParameters($coll, $element);
}
......@@ -61,7 +61,7 @@ class ManyToManyPersister extends AbstractCollectionPersister
*
* @override
*/
protected function _getUpdateRowSql(PersistentCollection $coll)
protected function _getUpdateRowSQL(PersistentCollection $coll)
{}
/**
......@@ -71,7 +71,7 @@ class ManyToManyPersister extends AbstractCollectionPersister
* @internal Order of the parameters must be the same as the order of the columns in
* _getInsertRowSql.
*/
protected function _getInsertRowSql(PersistentCollection $coll)
protected function _getInsertRowSQL(PersistentCollection $coll)
{
$mapping = $coll->getMapping();
$joinTable = $mapping->joinTable;
......@@ -87,11 +87,11 @@ class ManyToManyPersister extends AbstractCollectionPersister
* @internal Order of the parameters must be the same as the order of the columns in
* _getInsertRowSql.
*/
protected function _getInsertRowSqlParameters(PersistentCollection $coll, $element)
protected function _getInsertRowSQLParameters(PersistentCollection $coll, $element)
{
return $this->_collectJoinTableColumnParameters($coll, $element);
}
/**
* Collects the parameters for inserting/deleting on the join table in the order
* of the join table columns as specified in ManyToManyMapping#joinTableColumns.
......@@ -105,15 +105,15 @@ class ManyToManyPersister extends AbstractCollectionPersister
$params = array();
$mapping = $coll->getMapping();
$isComposite = count($mapping->joinTableColumns) > 2;
$identifier1 = $this->_uow->getEntityIdentifier($coll->getOwner());
$identifier2 = $this->_uow->getEntityIdentifier($element);
if ($isComposite) {
$class1 = $this->_em->getClassMetadata(get_class($coll->getOwner()));
$class2 = $coll->getTypeClass();
}
foreach ($mapping->joinTableColumns as $joinTableColumn) {
if (isset($mapping->relationToSourceKeyColumns[$joinTableColumn])) {
if ($isComposite) {
......@@ -138,7 +138,7 @@ class ManyToManyPersister extends AbstractCollectionPersister
*
* @override
*/
protected function _getDeleteSql(PersistentCollection $coll)
protected function _getDeleteSQL(PersistentCollection $coll)
{
$mapping = $coll->getMapping();
$joinTable = $mapping->joinTable;
......@@ -157,7 +157,7 @@ class ManyToManyPersister extends AbstractCollectionPersister
* @internal Order of the parameters must be the same as the order of the columns in
* _getDeleteSql.
*/
protected function _getDeleteSqlParameters(PersistentCollection $coll)
protected function _getDeleteSQLParameters(PersistentCollection $coll)
{
$params = array();
$mapping = $coll->getMapping();
......@@ -170,7 +170,7 @@ class ManyToManyPersister extends AbstractCollectionPersister
} else {
$params[] = array_pop($identifier);
}
return $params;
}
}
\ No newline at end of file
......@@ -25,7 +25,7 @@ use Doctrine\ORM\PersistentCollection;
/**
* Persister for one-to-many collections.
*
*
* IMPORTANT:
* This persister is only used for uni-directional one-to-many mappings on a foreign key
* (which are not yet supported). So currently this persister is not used.
......@@ -44,7 +44,7 @@ class OneToManyPersister extends AbstractCollectionPersister
* @return string
* @override
*/
protected function _getDeleteRowSql(PersistentCollection $coll)
protected function _getDeleteRowSQL(PersistentCollection $coll)
{
$mapping = $coll->getMapping();
$targetClass = $this->_em->getClassMetadata($mapping->getTargetEntityName());
......@@ -67,36 +67,36 @@ class OneToManyPersister extends AbstractCollectionPersister
return array("UPDATE $table SET $setClause WHERE $whereClause", $this->_uow->getEntityIdentifier($element));
}
protected function _getInsertRowSql(PersistentCollection $coll)
protected function _getInsertRowSQL(PersistentCollection $coll)
{
return "UPDATE xxx SET foreign_key = yyy WHERE foreign_key = zzz";
}
/* Not used for OneToManyPersister */
protected function _getUpdateRowSql(PersistentCollection $coll)
protected function _getUpdateRowSQL(PersistentCollection $coll)
{
return;
}
/**
* Generates the SQL UPDATE that updates all the foreign keys to null.
*
* @param PersistentCollection $coll
*/
protected function _getDeleteSql(PersistentCollection $coll)
protected function _getDeleteSQL(PersistentCollection $coll)
{
}
/**
* Gets the SQL parameters for the corresponding SQL statement to delete
* the given collection.
*
* @param PersistentCollection $coll
*/
protected function _getDeleteSqlParameters(PersistentCollection $coll)
protected function _getDeleteSQLParameters(PersistentCollection $coll)
{}
/**
* Gets the SQL parameters for the corresponding SQL statement to insert the given
* element of the given collection into the database.
......@@ -104,9 +104,9 @@ class OneToManyPersister extends AbstractCollectionPersister
* @param PersistentCollection $coll
* @param mixed $element
*/
protected function _getInsertRowSqlParameters(PersistentCollection $coll, $element)
protected function _getInsertRowSQLParameters(PersistentCollection $coll, $element)
{}
/**
* Gets the SQL parameters for the corresponding SQL statement to delete the given
* element from the given collection.
......@@ -114,6 +114,6 @@ class OneToManyPersister extends AbstractCollectionPersister
* @param PersistentCollection $coll
* @param mixed $element
*/
protected function _getDeleteRowSqlParameters(PersistentCollection $coll, $element)
protected function _getDeleteRowSQLParameters(PersistentCollection $coll, $element)
{}
}
\ No newline at end of file
......@@ -164,7 +164,11 @@ class ProxyFactory
}
if ($method->isPublic() && ! $method->isFinal() && ! $method->isStatic()) {
$methods .= PHP_EOL . ' public function ' . $method->getName() . '(';
$methods .= PHP_EOL . ' public function ';
if ($method->returnsReference()) {
$methods .= '&';
}
$methods .= $method->getName() . '(';
$firstParam = true;
$parameterString = $argumentString = '';
......
......@@ -267,11 +267,11 @@ class Parser
{
$AST = $this->getAST();
if ($customWalkers = $this->_query->getHint(Query::HINT_CUSTOM_TREE_WALKERS)) {
if (($customWalkers = $this->_query->getHint(Query::HINT_CUSTOM_TREE_WALKERS)) !== false) {
$this->_customTreeWalkers = $customWalkers;
}
if ($customOutputWalker = $this->_query->getHint(Query::HINT_CUSTOM_OUTPUT_WALKER)) {
if (($customOutputWalker = $this->_query->getHint(Query::HINT_CUSTOM_OUTPUT_WALKER)) !== false) {
$this->_customOutputWalker = $customOutputWalker;
}
......@@ -1786,6 +1786,12 @@ class Parser
$conditionalTerms[] = $this->ConditionalTerm();
}
// Phase 1 AST optimization: Prevent AST\ConditionalExpression
// if only one AST\ConditionalTerm is defined
if (count($conditionalTerms) == 1) {
return $conditionalTerms[0];
}
return new AST\ConditionalExpression($conditionalTerms);
}
......@@ -1804,6 +1810,12 @@ class Parser
$conditionalFactors[] = $this->ConditionalFactor();
}
// Phase 1 AST optimization: Prevent AST\ConditionalTerm
// if only one AST\ConditionalFactor is defined
if (count($conditionalFactors) == 1) {
return $conditionalFactors[0];
}
return new AST\ConditionalTerm($conditionalFactors);
}
......@@ -1820,11 +1832,19 @@ class Parser
$this->match(Lexer::T_NOT);
$not = true;
}
$conditionalPrimary = $this->ConditionalPrimary();
$condFactor = new AST\ConditionalFactor($this->ConditionalPrimary());
$condFactor->not = $not;
// Phase 1 AST optimization: Prevent AST\ConditionalFactor
// if only one AST\ConditionalPrimary is defined
if ( ! $not) {
return $conditionalPrimary;
}
$conditionalFactor = new AST\ConditionalFactor($conditionalPrimary);
$conditionalFactor->not = $not;
return $condFactor;
return $conditionalFactor;
}
/**
......@@ -2104,6 +2124,12 @@ class Parser
$terms[] = $this->ArithmeticTerm();
}
// Phase 1 AST optimization: Prevent AST\SimpleArithmeticExpression
// if only one AST\ArithmeticTerm is defined
if (count($terms) == 1) {
return $terms[0];
}
return new AST\SimpleArithmeticExpression($terms);
}
......@@ -2124,6 +2150,12 @@ class Parser
$factors[] = $this->ArithmeticFactor();
}
// Phase 1 AST optimization: Prevent AST\ArithmeticTerm
// if only one AST\ArithmeticFactor is defined
if (count($factors) == 1) {
return $factors[0];
}
return new AST\ArithmeticTerm($factors);
}
......@@ -2134,14 +2166,22 @@ class Parser
*/
public function ArithmeticFactor()
{
$sign = null;
$sign = null;
if (($isPlus = $this->_lexer->isNextToken(Lexer::T_PLUS)) || $this->_lexer->isNextToken(Lexer::T_MINUS)) {
$this->match(($isPlus) ? Lexer::T_PLUS : Lexer::T_MINUS);
$sign = $isPlus;
}
if (($isPlus = $this->_lexer->isNextToken(Lexer::T_PLUS)) || $this->_lexer->isNextToken(Lexer::T_MINUS)) {
$this->match(($isPlus) ? Lexer::T_PLUS : Lexer::T_MINUS);
$sign = $isPlus;
}
$primary = $this->ArithmeticPrimary();
// Phase 1 AST optimization: Prevent AST\ArithmeticFactor
// if only one AST\ArithmeticPrimary is defined
if ($sign === null) {
return $primary;
}
return new AST\ArithmeticFactor($this->ArithmeticPrimary(), $sign);
return new AST\ArithmeticFactor($primary, $sign);
}
/**
......
This diff is collapsed.
......@@ -218,6 +218,14 @@ interface TreeWalker
*/
function walkWhereClause($whereClause);
/**
* Walks down a ConditionalExpression AST node, thereby generating the appropriate SQL.
*
* @param ConditionalExpression
* @return string The SQL.
*/
function walkConditionalExpression($condExpr);
/**
* Walks down a ConditionalTerm AST node, thereby generating the appropriate SQL.
*
......@@ -234,6 +242,14 @@ interface TreeWalker
*/
function walkConditionalFactor($factor);
/**
* Walks down a ConditionalPrimary AST node, thereby generating the appropriate SQL.
*
* @param ConditionalPrimary
* @return string The SQL.
*/
function walkConditionalPrimary($primary);
/**
* Walks down an ExistsExpression AST node, thereby generating the appropriate SQL.
*
......
......@@ -252,6 +252,14 @@ abstract class TreeWalkerAdapter implements TreeWalker
*/
public function walkWhereClause($whereClause) {}
/**
* Walks down a ConditionalExpression AST node, thereby generating the appropriate SQL.
*
* @param ConditionalExpression
* @return string The SQL.
*/
public function walkConditionalExpression($condExpr) {}
/**
* Walks down a ConditionalTerm AST node, thereby generating the appropriate SQL.
*
......@@ -268,6 +276,14 @@ abstract class TreeWalkerAdapter implements TreeWalker
*/
public function walkConditionalFactor($factor) {}
/**
* Walks down a ConditionalPrimary AST node, thereby generating the appropriate SQL.
*
* @param ConditionalPrimary
* @return string The SQL.
*/
public function walkConditionalPrimary($primary) {}
/**
* Walks down an ExistsExpression AST node, thereby generating the appropriate SQL.
*
......
......@@ -355,6 +355,19 @@ class TreeWalkerChain implements TreeWalker
}
}
/**
* Walks down a ConditionalExpression AST node, thereby generating the appropriate SQL.
*
* @param ConditionalExpression
* @return string The SQL.
*/
public function walkConditionalExpression($condExpr)
{
foreach ($this->_walkers as $walker) {
$walker->walkConditionalExpression($condExpr);
}
}
/**
* Walks down a ConditionalTerm AST node, thereby generating the appropriate SQL.
*
......@@ -381,6 +394,19 @@ class TreeWalkerChain implements TreeWalker
}
}
/**
* Walks down a ConditionalPrimary AST node, thereby generating the appropriate SQL.
*
* @param ConditionalPrimary
* @return string The SQL.
*/
public function walkConditionalPrimary($condPrimary)
{
foreach ($this->_walkers as $walker) {
$walker->walkConditionalPrimary($condPrimary);
}
}
/**
* Walks down an ExistsExpression AST node, thereby generating the appropriate SQL.
*
......
This diff is collapsed.
......@@ -136,7 +136,7 @@ EOT
$converter = new ConvertDoctrine1Schema($fromPaths);
$metadata = $converter->getMetadata();
if ($metadatas) {
if ($metadata) {
$output->write(PHP_EOL);
foreach ($metadata as $class) {
......
......@@ -44,35 +44,46 @@ class ValidateSchemaCommand extends Console\Command\Command
*/
protected function configure()
{
$this->setName('orm:validate-schema')
->setDescription('Validate that the current metadata schema is valid.');
$this
->setName('orm:validate-schema')
->setDescription('Validate that the mapping files.')
->setHelp(<<<EOT
'Validate that the mapping files are correct and in sync with the database.'
EOT
);
}
/**
* @param InputInterface $input
* @param OutputInterface $output
* @see Console\Command\Command
*/
protected function execute(Console\Input\InputInterface $input, Console\Output\OutputInterface $output)
{
$emHelper = $this->getHelper('em');
/* @var $em \Doctrine\ORM\EntityManager */
$em = $emHelper->getEntityManager();
$metadatas = $em->getMetadataFactory()->getAllMetadata();
$em = $this->getHelper('em')->getEntityManager();
if ( ! empty($metadatas)) {
// Create SchemaTool
$tool = new \Doctrine\ORM\Tools\SchemaTool($em);
$updateSql = $tool->getUpdateSchemaSql($metadatas, false);
$validator = new \Doctrine\ORM\Tools\SchemaValidator($em);
$errors = $validator->validateMapping();
if (count($updateSql) == 0) {
$output->write("[Database] OK - Metadata schema exactly matches the database schema.");
} else {
$output->write("[Database] FAIL - There are differences between metadata and database schema.");
$exit = 0;
if ($errors) {
foreach ($errors AS $className => $errorMessages) {
$output->write("<error>[Mapping] FAIL - The entity-class '" . $className . "' mapping is invalid:</error>\n");
foreach ($errorMessages AS $errorMessage) {
$output->write('* ' . $errorMessage . "\n");
}
$output->write("\n");
}
$exit += 1;
} else {
$output->write("No metadata mappings found");
$output->write('<info>[Mapping] OK - The mapping files are correct.</info>' . "\n");
}
if (!$validator->schemaInSyncWithMetadata()) {
$output->write('<error>[Database] FAIL - The database schema is not in sync with the current mapping file.</error>' . "\n");
$exit += 2;
} else {
$output->write('<info>[Database] OK - The database schema is in sync with the mapping files.</info>' . "\n");
}
exit($exit);
}
}
\ No newline at end of file
This diff is collapsed.
......@@ -19,7 +19,8 @@
namespace Doctrine\ORM;
use Doctrine\Common\Collections\ArrayCollection,
use Exception,
Doctrine\Common\Collections\ArrayCollection,
Doctrine\Common\Collections\Collection,
Doctrine\Common\NotifyPropertyChanged,
Doctrine\Common\PropertyChangedListener,
......@@ -280,13 +281,13 @@ class UnitOfWork implements PropertyChangedListener
$conn = $this->_em->getConnection();
$conn->beginTransaction();
try {
try {
if ($this->_entityInsertions) {
foreach ($commitOrder as $class) {
$this->_executeInserts($class);
}
}
if ($this->_entityUpdates) {
foreach ($commitOrder as $class) {
$this->_executeUpdates($class);
......@@ -317,10 +318,9 @@ class UnitOfWork implements PropertyChangedListener
}
$conn->commit();
} catch (\Exception $e) {
$conn->setRollbackOnly();
$conn->rollback();
} catch (Exception $e) {
$this->_em->close();
$conn->rollback();
throw $e;
}
......@@ -485,7 +485,7 @@ class UnitOfWork implements PropertyChangedListener
}
}
}
// Look for changes in associations of the entity
foreach ($class->associationMappings as $assoc) {
$val = $class->reflFields[$assoc->sourceFieldName]->getValue($entity);
......@@ -1288,6 +1288,10 @@ class UnitOfWork implements PropertyChangedListener
*
* @param object $entity
* @return object The managed copy of the entity.
* @throws OptimisticLockException If the entity uses optimistic locking through a version
* attribute and the version check against the managed copy fails.
*
* @todo Require active transaction!? OptimisticLockException may result in undefined state!?
*/
public function merge($entity)
{
......@@ -1314,7 +1318,7 @@ class UnitOfWork implements PropertyChangedListener
throw new \InvalidArgumentException('New entity detected during merge.'
. ' Persist the new entity before merging.');
}
// MANAGED entities are ignored by the merge operation
if ($this->getEntityState($entity, self::STATE_DETACHED) == self::STATE_MANAGED) {
$managedCopy = $entity;
......@@ -1476,7 +1480,7 @@ class UnitOfWork implements PropertyChangedListener
$class = $this->_em->getClassMetadata(get_class($entity));
if ($this->getEntityState($entity) == self::STATE_MANAGED) {
$this->getEntityPersister($class->name)->refresh(
array_combine($class->getIdentifierColumnNames(), $this->_entityIdentifiers[$oid]),
array_combine($class->getIdentifierFieldNames(), $this->_entityIdentifiers[$oid]),
$entity
);
} else {
......@@ -2084,9 +2088,15 @@ class UnitOfWork implements PropertyChangedListener
$oid = spl_object_hash($entity);
$class = $this->_em->getClassMetadata(get_class($entity));
$isAssocField = isset($class->associationMappings[$propertyName]);
if ( ! $isAssocField && ! isset($class->fieldMappings[$propertyName])) {
return; // ignore non-persistent fields
}
$this->_entityChangeSets[$oid][$propertyName] = array($oldValue, $newValue);
if (isset($class->associationMappings[$propertyName])) {
if ($isAssocField) {
$assoc = $class->associationMappings[$propertyName];
if ($assoc->isOneToOne() && $assoc->isOwningSide) {
$this->_entityUpdates[$oid] = $entity;
......
This diff is collapsed.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">
<head>
<meta name="generator" content="PHPDoctor 2RC4 (http://phpdoctor.sourceforge.net/)">
<meta name="when" content="Wed, 14 Apr 2010 15:12:06 +0000">
<link rel="stylesheet" type="text/css" href="stylesheet.css">
<link rel="start" href="overview-summary.html">
<title>Deprecated (Doctrine)</title>
</head>
<body id="overview" onload="parent.document.title=document.title;">
<div class="header">
<h1>Doctrine</h1>
<ul>
<li><a href="overview-summary.html">Overview</a></li>
<li>Namespace</li><li>Class</li><li><a href="overview-tree.html">Tree</a></li>
<li class="active">Deprecated</li>
<li><a href="index-all.html">Index</a></li>
</ul>
</div>
<div class="small_links">
<a href="index.html" target="_top">Frames</a>
<a href="deprecated-list.html" target="_top">No frames</a>
</div>
<h1>Deprecated API</h1><hr>
<h2>Contents</h2>
<ul>
<li><a href="#deprecated_method">Deprecated Methods</a></li></ul>
<table id="deprecated_method" class="detail">
<tr><th colspan="2" class="title">Deprecated Methods</th></tr>
<tr>
<td class="name"><a href="doctrine/orm/mapping/classmetadatainfo.html#setTableName()">Doctrine\ORM\Mapping\ClassMetadataInfo\setTableName</a></td>
<td class="description">Sets the name of the primary table the class is mapped to.</td>
</tr>
</table>
<div class="header">
<h1>Doctrine</h1>
<ul>
<li><a href="overview-summary.html">Overview</a></li>
<li>Namespace</li><li>Class</li><li><a href="overview-tree.html">Tree</a></li>
<li class="active">Deprecated</li>
<li><a href="index-all.html">Index</a></li>
</ul>
</div>
<div class="small_links">
<a href="index.html" target="_top">Frames</a>
<a href="deprecated-list.html" target="_top">No frames</a>
</div>
<hr>
<p id="footer">This document was generated by <a href="http://peej.github.com/phpdoctor/">PHPDoctor: The PHP Documentation Creator</a></p>
</body>
</html>
\ No newline at end of file
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">
<head>
<meta name="generator" content="PHPDoctor 2RC4 (http://phpdoctor.sourceforge.net/)">
<meta name="when" content="Wed, 14 Apr 2010 15:12:03 +0000">
<link rel="stylesheet" type="text/css" href="../../../stylesheet.css">
<link rel="start" href="../../../overview-summary.html">
<title>Annotation (Doctrine)</title>
</head>
<body id="definition" onload="parent.document.title=document.title;">
<div class="header">
<h1>Doctrine</h1>
<ul>
<li><a href="../../../overview-summary.html">Overview</a></li>
<li><a href="../../../doctrine/common/annotations/package-summary.html">Namespace</a></li>
<li class="active">Class</li>
<li><a href="../../../doctrine/common/annotations/package-tree.html">Tree</a></li>
<li><a href="../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../index-all.html">Index</a></li>
</ul>
</div>
<div class="small_links">
<a href="../../../index.html" target="_top">Frames</a>
<a href="../../../doctrine/common/annotations/annotation.html" target="_top">No frames</a>
</div>
<div class="small_links">
Summary: <a href="#summary_field">Field</a> | <a href="#summary_method">Method</a> | <a href="#summary_constr">Constr</a>
Detail: <a href="#detail_field">Field</a> | <a href="#detail_method">Method</a> | <a href="#summary_constr">Constr</a>
</div>
<hr>
<div class="qualifiedName">Doctrine\Common\Annotations\Annotation</div>
<div class="location">/Doctrine/Common/Annotations/Annotation.php at line 35</div>
<h1>Class Annotation</h1>
<pre class="tree"><strong>Annotation</strong><br /></pre>
<hr>
<p class="signature">public class <strong>Annotation</strong></p>
<div class="comment" id="overview_description"><p>Annotations class</p></div>
<dl>
<dt>License:</dt>
<dd>http://www.opensource.org/licenses/lgpl-license.php LGPL</dd>
<dt>See Also:</dt>
<dd><code>www.doctrine-project.org</code></dd>
<dt>Since:</dt>
<dd>2.0</dd>
<dt>Version:</dt>
<dd>$Revision: 3938 $</dd>
<dt>Author:</dt>
<dd>Guilherme Blanco <guilhermeblanco@hotmail.com></dd>
<dd>Jonathan Wage <jonwage@gmail.com></dd>
<dd>Roman Borschel <roman@code-factory.org></dd>
</dl>
<hr>
<table id="summary_field">
<tr><th colspan="2">Field Summary</th></tr>
<tr>
<td class="type"> string</td>
<td class="description"><p class="name"><a href="#value">$value</a></p><p class="description">Value property. </p></td>
</tr>
</table>
<table id="summary_constr">
<tr><th colspan="2">Constructor Summary</th></tr>
<tr>
<td class="description"><p class="name"><a href="#Annotation()">Annotation</a>(array data)</p><p class="description">Constructor</p></td>
</tr>
</table>
<h2 id="detail_field">Field Detail</h2>
<div class="location">/Doctrine/Common/Annotations/Annotation.php at line 42</div>
<h3 id="value">value</h3>
<code class="signature">public string <strong>$value</strong></code>
<div class="details">
<p>Value property. Common among all derived classes.</p></div>
<hr>
<h2 id="detail_constr">Constructor Detail</h2>
<div class="location">/Doctrine/Common/Annotations/Annotation.php at line 49</div>
<h3 id="Annotation()">Annotation</h3>
<code class="signature">public <strong>Annotation</strong>(array data)</code>
<div class="details">
<p>Constructor</p><dl>
<dt>Parameters:</dt>
<dd>data - Key-value for properties to be defined in this class</dd>
</dl>
</div>
<hr>
<div class="header">
<h1>Doctrine</h1>
<ul>
<li><a href="../../../overview-summary.html">Overview</a></li>
<li><a href="../../../doctrine/common/annotations/package-summary.html">Namespace</a></li>
<li class="active">Class</li>
<li><a href="../../../doctrine/common/annotations/package-tree.html">Tree</a></li>
<li><a href="../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../index-all.html">Index</a></li>
</ul>
</div>
<div class="small_links">
<a href="../../../index.html" target="_top">Frames</a>
<a href="../../../doctrine/common/annotations/annotation.html" target="_top">No frames</a>
</div>
<div class="small_links">
Summary: <a href="#summary_field">Field</a> | <a href="#summary_method">Method</a> | <a href="#summary_constr">Constr</a>
Detail: <a href="#detail_field">Field</a> | <a href="#detail_method">Method</a> | <a href="#summary_constr">Constr</a>
</div>
<hr>
<p id="footer">This document was generated by <a href="http://peej.github.com/phpdoctor/">PHPDoctor: The PHP Documentation Creator</a></p>
</body>
</html>
\ No newline at end of file
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">
<head>
<meta name="generator" content="PHPDoctor 2RC4 (http://phpdoctor.sourceforge.net/)">
<meta name="when" content="Wed, 14 Apr 2010 15:12:03 +0000">
<link rel="stylesheet" type="text/css" href="../../../stylesheet.css">
<link rel="start" href="../../../overview-summary.html">
<title>AnnotationException (Doctrine)</title>
</head>
<body id="definition" onload="parent.document.title=document.title;">
<div class="header">
<h1>Doctrine</h1>
<ul>
<li><a href="../../../overview-summary.html">Overview</a></li>
<li><a href="../../../doctrine/common/annotations/package-summary.html">Namespace</a></li>
<li class="active">Class</li>
<li><a href="../../../doctrine/common/annotations/package-tree.html">Tree</a></li>
<li><a href="../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../index-all.html">Index</a></li>
</ul>
</div>
<div class="small_links">
<a href="../../../index.html" target="_top">Frames</a>
<a href="../../../doctrine/common/annotations/annotationexception.html" target="_top">No frames</a>
</div>
<div class="small_links">
Summary: <a href="#summary_field">Field</a> | <a href="#summary_method">Method</a> | <a href="#summary_constr">Constr</a>
Detail: <a href="#detail_field">Field</a> | <a href="#detail_method">Method</a> | <a href="#summary_constr">Constr</a>
</div>
<hr>
<div class="qualifiedName">Doctrine\Common\Annotations\AnnotationException</div>
<div class="location">/Doctrine/Common/Annotations/AnnotationException.php at line 35</div>
<h1>Class AnnotationException</h1>
<pre class="tree">Class:AnnotationException - Superclass: Doctrine
Doctrine<br>&lfloor;&nbsp;<strong>AnnotationException</strong><br /></pre>
<hr>
<p class="signature">public class <strong>AnnotationException</strong><br>extends Doctrine
</p>
<div class="comment" id="overview_description"><p>Description of AnnotationException</p></div>
<dl>
<dt>License:</dt>
<dd>http://www.opensource.org/licenses/lgpl-license.php LGPL</dd>
<dt>See Also:</dt>
<dd><code>www.doctrine-project.org</code></dd>
<dt>Since:</dt>
<dd>2.0</dd>
<dt>Version:</dt>
<dd>$Revision: 3938 $</dd>
<dt>Author:</dt>
<dd>Guilherme Blanco <guilhermeblanco@hotmail.com></dd>
<dd>Jonathan Wage <jonwage@gmail.com></dd>
<dd>Roman Borschel <roman@code-factory.org></dd>
</dl>
<hr>
<table id="summary_method">
<tr><th colspan="2">Method Summary</th></tr>
<tr>
<td class="type">static void</td>
<td class="description"><p class="name"><a href="#semanticalError()">semanticalError</a>(mixed message)</p></td>
</tr>
<tr>
<td class="type">static void</td>
<td class="description"><p class="name"><a href="#syntaxError()">syntaxError</a>(mixed message)</p></td>
</tr>
</table>
<h2 id="detail_method">Method Detail</h2>
<div class="location">/Doctrine/Common/Annotations/AnnotationException.php at line 43</div>
<h3 id="semanticalError()">semanticalError</h3>
<code class="signature">public static void <strong>semanticalError</strong>(mixed message)</code>
<div class="details">
</div>
<hr>
<div class="location">/Doctrine/Common/Annotations/AnnotationException.php at line 37</div>
<h3 id="syntaxError()">syntaxError</h3>
<code class="signature">public static void <strong>syntaxError</strong>(mixed message)</code>
<div class="details">
</div>
<hr>
<div class="header">
<h1>Doctrine</h1>
<ul>
<li><a href="../../../overview-summary.html">Overview</a></li>
<li><a href="../../../doctrine/common/annotations/package-summary.html">Namespace</a></li>
<li class="active">Class</li>
<li><a href="../../../doctrine/common/annotations/package-tree.html">Tree</a></li>
<li><a href="../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../index-all.html">Index</a></li>
</ul>
</div>
<div class="small_links">
<a href="../../../index.html" target="_top">Frames</a>
<a href="../../../doctrine/common/annotations/annotationexception.html" target="_top">No frames</a>
</div>
<div class="small_links">
Summary: <a href="#summary_field">Field</a> | <a href="#summary_method">Method</a> | <a href="#summary_constr">Constr</a>
Detail: <a href="#detail_field">Field</a> | <a href="#detail_method">Method</a> | <a href="#summary_constr">Constr</a>
</div>
<hr>
<p id="footer">This document was generated by <a href="http://peej.github.com/phpdoctor/">PHPDoctor: The PHP Documentation Creator</a></p>
</body>
</html>
\ No newline at end of file
This diff is collapsed.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">
<head>
<meta name="generator" content="PHPDoctor 2RC4 (http://phpdoctor.sourceforge.net/)">
<meta name="when" content="Wed, 14 Apr 2010 15:12:03 +0000">
<link rel="stylesheet" type="text/css" href="../../../stylesheet.css">
<link rel="start" href="../../../overview-summary.html">
<title>Doctrine\Common\Annotations (Doctrine)</title>
</head>
<body id="frame">
<h1><a href="package-summary.html" target="main">Doctrine\Common\Annotations</a></h1>
<h2>Classes</h2>
<ul>
<li><a href="../../../doctrine/common/annotations/annotation.html" target="main">Annotation</a></li>
<li><a href="../../../doctrine/common/annotations/annotationexception.html" target="main">AnnotationException</a></li>
<li><a href="../../../doctrine/common/annotations/annotationreader.html" target="main">AnnotationReader</a></li>
<li><a href="../../../doctrine/common/annotations/lexer.html" target="main">Lexer</a></li>
<li><a href="../../../doctrine/common/annotations/parser.html" target="main">Parser</a></li>
</ul>
</body>
</html>
\ No newline at end of file
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">
<head>
<meta name="generator" content="PHPDoctor 2RC4 (http://phpdoctor.sourceforge.net/)">
<meta name="when" content="Wed, 14 Apr 2010 15:12:06 +0000">
<link rel="stylesheet" type="text/css" href="../../../stylesheet.css">
<link rel="start" href="../../../overview-summary.html">
<title>Functions (Doctrine)</title>
</head>
<body id="definition" onload="parent.document.title=document.title;">
<div class="header">
<h1>Doctrine</h1>
<ul>
<li><a href="../../../overview-summary.html">Overview</a></li>
<li><a href="../../../doctrine/common/annotations/package-summary.html">Package</a></li>
<li class="active">Function</li>
<li><a href="../../../overview-tree.html">Tree</a></li>
<li><a href="../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../index-all.html">Index</a></li>
</ul>
</div>
<div class="small_links">
<a href="../../../index.html" target="_top">Frames</a>
<a href="../../../doctrine/common/annotations/package-functions.html" target="_top">No frames</a>
</div>
<div class="small_links">
Summary: <a href="#summary_function">Function</a>
Detail: <a href="#detail_function">Function</a>
</div>
<hr>
<h1>Functions</h1>
<hr>
<div class="header">
<h1>Doctrine</h1>
<ul>
<li><a href="../../../overview-summary.html">Overview</a></li>
<li><a href="../../../doctrine/common/annotations/package-summary.html">Package</a></li>
<li class="active">Function</li>
<li><a href="../../../overview-tree.html">Tree</a></li>
<li><a href="../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../index-all.html">Index</a></li>
</ul>
</div>
<div class="small_links">
<a href="../../../index.html" target="_top">Frames</a>
<a href="../../../doctrine/common/annotations/package-functions.html" target="_top">No frames</a>
</div>
<div class="small_links">
Summary: <a href="#summary_function">Function</a>
Detail: <a href="#detail_function">Function</a>
</div>
<hr>
<p id="footer">This document was generated by <a href="http://peej.github.com/phpdoctor/">PHPDoctor: The PHP Documentation Creator</a></p>
</body>
</html>
\ No newline at end of file
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">
<head>
<meta name="generator" content="PHPDoctor 2RC4 (http://phpdoctor.sourceforge.net/)">
<meta name="when" content="Wed, 14 Apr 2010 15:12:06 +0000">
<link rel="stylesheet" type="text/css" href="../../../stylesheet.css">
<link rel="start" href="../../../overview-summary.html">
<title>Globals (Doctrine)</title>
</head>
<body id="definition" onload="parent.document.title=document.title;">
<div class="header">
<h1>Doctrine</h1>
<ul>
<li><a href="../../../overview-summary.html">Overview</a></li>
<li><a href="../../../doctrine/common/annotations/package-summary.html">Package</a></li>
<li class="active">Global</li>
<li><a href="../../../overview-tree.html">Tree</a></li>
<li><a href="../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../index-all.html">Index</a></li>
</ul>
</div>
<div class="small_links">
<a href="../../../index.html" target="_top">Frames</a>
<a href="../../../doctrine/common/annotations/package-globals.html" target="_top">No frames</a>
</div>
<div class="small_links">
Summary: <a href="#summary_global">Global</a>
Detail: <a href="#detail_global">Global</a>
</div>
<hr>
<h1>Globals</h1>
<hr>
<div class="header">
<h1>Doctrine</h1>
<ul>
<li><a href="../../../overview-summary.html">Overview</a></li>
<li><a href="../../../doctrine/common/annotations/package-summary.html">Package</a></li>
<li class="active">Global</li>
<li><a href="../../../overview-tree.html">Tree</a></li>
<li><a href="../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../index-all.html">Index</a></li>
</ul>
</div>
<div class="small_links">
<a href="../../../index.html" target="_top">Frames</a>
<a href="../../../doctrine/common/annotations/package-globals.html" target="_top">No frames</a>
</div>
<div class="small_links">
Summary: <a href="#summary_global">Global</a>
Detail: <a href="#detail_global">Global</a>
</div>
<hr>
<p id="footer">This document was generated by <a href="http://peej.github.com/phpdoctor/">PHPDoctor: The PHP Documentation Creator</a></p>
</body>
</html>
\ No newline at end of file
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">
<head>
<meta name="generator" content="PHPDoctor 2RC4 (http://phpdoctor.sourceforge.net/)">
<meta name="when" content="Wed, 14 Apr 2010 15:12:03 +0000">
<link rel="stylesheet" type="text/css" href="../../../stylesheet.css">
<link rel="start" href="../../../overview-summary.html">
<title>Doctrine\Common\Annotations (Doctrine)</title>
</head>
<body id="tree" onload="parent.document.title=document.title;">
<div class="header">
<h1>Doctrine</h1>
<ul>
<li><a href="../../../overview-summary.html">Overview</a></li>
<li class="active">Namespace</li>
<li>Class</li><li><a href="../../../doctrine/common/annotations/package-tree.html">Tree</a></li>
<li><a href="../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../index-all.html">Index</a></li>
</ul>
</div>
<div class="small_links">
<a href="../../../index.html" target="_top">Frames</a>
<a href="../../../doctrine/common/annotations/package-summary.html" target="_top">No frames</a>
</div>
<hr>
<h1>Namespace Doctrine\Common\Annotations</h1>
<table class="title">
<tr><th colspan="2" class="title">Class Summary</th></tr>
<tr><td class="name"><a href="../../../doctrine/common/annotations/annotation.html">Annotation</a></td><td class="description">Annotations class</td></tr>
<tr><td class="name"><a href="../../../doctrine/common/annotations/annotationexception.html">AnnotationException</a></td><td class="description">Description of AnnotationException</td></tr>
<tr><td class="name"><a href="../../../doctrine/common/annotations/annotationreader.html">AnnotationReader</a></td><td class="description">A reader for docblock annotations.</td></tr>
<tr><td class="name"><a href="../../../doctrine/common/annotations/lexer.html">Lexer</a></td><td class="description">Simple lexer for docblock annotations.</td></tr>
<tr><td class="name"><a href="../../../doctrine/common/annotations/parser.html">Parser</a></td><td class="description">A simple parser for docblock annotations.</td></tr>
</table>
<hr>
<div class="header">
<h1>Doctrine</h1>
<ul>
<li><a href="../../../overview-summary.html">Overview</a></li>
<li class="active">Namespace</li>
<li>Class</li><li><a href="../../../doctrine/common/annotations/package-tree.html">Tree</a></li>
<li><a href="../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../index-all.html">Index</a></li>
</ul>
</div>
<div class="small_links">
<a href="../../../index.html" target="_top">Frames</a>
<a href="../../../doctrine/common/annotations/package-summary.html" target="_top">No frames</a>
</div>
<hr>
<p id="footer">This document was generated by <a href="http://peej.github.com/phpdoctor/">PHPDoctor: The PHP Documentation Creator</a></p>
</body>
</html>
\ No newline at end of file
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">
<head>
<meta name="generator" content="PHPDoctor 2RC4 (http://phpdoctor.sourceforge.net/)">
<meta name="when" content="Wed, 14 Apr 2010 15:12:03 +0000">
<link rel="stylesheet" type="text/css" href="../../../stylesheet.css">
<link rel="start" href="../../../overview-summary.html">
<title>Doctrine\Common\Annotations (Doctrine)</title>
</head>
<body id="tree" onload="parent.document.title=document.title;">
<div class="header">
<h1>Doctrine</h1>
<ul>
<li><a href="../../../overview-summary.html">Overview</a></li>
<li><a href="../../../doctrine/common/annotations/package-summary.html">Namespace</a></li>
<li>Class</li><li class="active">Tree</li>
<li><a href="../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../index-all.html">Index</a></li>
</ul>
</div>
<div class="small_links">
<a href="../../../index.html" target="_top">Frames</a>
<a href="../../../doctrine/common/annotations/package-tree.html" target="_top">No frames</a>
</div>
<h1>Class Hierarchy for Package Doctrine\Common\Annotations</h1><ul>
<li><a href="../../../doctrine/common/annotations/annotation.html">Doctrine\Common\Annotations\Annotation</a></li>
<li><a href="../../../doctrine/common/annotations/annotationreader.html">Doctrine\Common\Annotations\AnnotationReader</a></li>
<li><a href="../../../doctrine/common/annotations/parser.html">Doctrine\Common\Annotations\Parser</a></li>
</ul>
<div class="header">
<h1>Doctrine</h1>
<ul>
<li><a href="../../../overview-summary.html">Overview</a></li>
<li><a href="../../../doctrine/common/annotations/package-summary.html">Namespace</a></li>
<li>Class</li><li class="active">Tree</li>
<li><a href="../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../index-all.html">Index</a></li>
</ul>
</div>
<div class="small_links">
<a href="../../../index.html" target="_top">Frames</a>
<a href="../../../doctrine/common/annotations/package-tree.html" target="_top">No frames</a>
</div>
<hr>
<p id="footer">This document was generated by <a href="http://peej.github.com/phpdoctor/">PHPDoctor: The PHP Documentation Creator</a></p>
</body>
</html>
\ No newline at end of file
This diff is collapsed.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">
<head>
<meta name="generator" content="PHPDoctor 2RC4 (http://phpdoctor.sourceforge.net/)">
<meta name="when" content="Wed, 14 Apr 2010 15:12:03 +0000">
<link rel="stylesheet" type="text/css" href="../../../stylesheet.css">
<link rel="start" href="../../../overview-summary.html">
<title>AbstractCache (Doctrine)</title>
</head>
<body id="definition" onload="parent.document.title=document.title;">
<div class="header">
<h1>Doctrine</h1>
<ul>
<li><a href="../../../overview-summary.html">Overview</a></li>
<li><a href="../../../doctrine/common/cache/package-summary.html">Namespace</a></li>
<li class="active">Class</li>
<li><a href="../../../doctrine/common/cache/package-tree.html">Tree</a></li>
<li><a href="../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../index-all.html">Index</a></li>
</ul>
</div>
<div class="small_links">
<a href="../../../index.html" target="_top">Frames</a>
<a href="../../../doctrine/common/cache/abstractcache.html" target="_top">No frames</a>
</div>
<div class="small_links">
Summary: <a href="#summary_field">Field</a> | <a href="#summary_method">Method</a> | <a href="#summary_constr">Constr</a>
Detail: <a href="#detail_field">Field</a> | <a href="#detail_method">Method</a> | <a href="#summary_constr">Constr</a>
</div>
<hr>
<div class="qualifiedName">Doctrine\Common\Cache\AbstractCache</div>
<div class="location">/Doctrine/Common/Cache/AbstractCache.php at line 35</div>
<h1>Class AbstractCache</h1>
<pre class="tree"><strong>AbstractCache</strong><br /></pre>
<hr>
<p class="signature">public abstract class <strong>AbstractCache</strong></p>
<div class="comment" id="overview_description"><p>Base class for cache driver implementations.</p></div>
<dl>
<dt>License:</dt>
<dd>http://www.opensource.org/licenses/lgpl-license.php LGPL</dd>
<dt>See Also:</dt>
<dd><code>www.doctrine-project.org</code></dd>
<dt>Since:</dt>
<dd>2.0</dd>
<dt>Version:</dt>
<dd>$Revision: 3938 $</dd>
<dt>Author:</dt>
<dd>Guilherme Blanco <guilhermeblanco@hotmail.com></dd>
<dd>Jonathan Wage <jonwage@gmail.com></dd>
<dd>Roman Borschel <roman@code-factory.org></dd>
</dl>
<hr>
<table id="summary_method">
<tr><th colspan="2">Method Summary</th></tr>
<tr>
<td class="type"> void</td>
<td class="description"><p class="name"><a href="#contains()">contains</a>(mixed id)</p><p class="description">{@inheritdoc}</p></td>
</tr>
<tr>
<td class="type"> void</td>
<td class="description"><p class="name"><a href="#delete()">delete</a>(mixed id)</p><p class="description">{@inheritdoc}</p></td>
</tr>
<tr>
<td class="type"> array</td>
<td class="description"><p class="name"><a href="#deleteAll()">deleteAll</a>()</p><p class="description">Delete all cache entries.</p></td>
</tr>
<tr>
<td class="type"> array</td>
<td class="description"><p class="name"><a href="#deleteByPrefix()">deleteByPrefix</a>(string prefix)</p><p class="description">Delete cache entries where the id has the passed prefix</p></td>
</tr>
<tr>
<td class="type"> array</td>
<td class="description"><p class="name"><a href="#deleteByRegex()">deleteByRegex</a>(string regex)</p><p class="description">Delete cache entries where the id matches a PHP regular expressions</p></td>
</tr>
<tr>
<td class="type"> array</td>
<td class="description"><p class="name"><a href="#deleteBySuffix()">deleteBySuffix</a>(string suffix)</p><p class="description">Delete cache entries where the id has the passed suffix</p></td>
</tr>
<tr>
<td class="type"> void</td>
<td class="description"><p class="name"><a href="#fetch()">fetch</a>(mixed id)</p><p class="description">{@inheritdoc}</p></td>
</tr>
<tr>
<td class="type">abstract array</td>
<td class="description"><p class="name"><a href="#getIds()">getIds</a>()</p><p class="description">Get an array of all the cache ids stored</p></td>
</tr>
<tr>
<td class="type"> void</td>
<td class="description"><p class="name"><a href="#save()">save</a>(mixed id, mixed data, mixed lifeTime)</p><p class="description">{@inheritdoc}</p></td>
</tr>
<tr>
<td class="type"> void</td>
<td class="description"><p class="name"><a href="#setNamespace()">setNamespace</a>(string namespace)</p><p class="description">Set the namespace to prefix all cache ids with.</p></td>
</tr>
</table>
<h2 id="detail_method">Method Detail</h2>
<div class="location">/Doctrine/Common/Cache/AbstractCache.php at line 65</div>
<h3 id="contains()">contains</h3>
<code class="signature">public void <strong>contains</strong>(mixed id)</code>
<div class="details">
<p></p></div>
<hr>
<div class="location">/Doctrine/Common/Cache/AbstractCache.php at line 82</div>
<h3 id="delete()">delete</h3>
<code class="signature">public void <strong>delete</strong>(mixed id)</code>
<div class="details">
<p></p></div>
<hr>
<div class="location">/Doctrine/Common/Cache/AbstractCache.php at line 98</div>
<h3 id="deleteAll()">deleteAll</h3>
<code class="signature">public array <strong>deleteAll</strong>()</code>
<div class="details">
<p>Delete all cache entries.</p><dl>
<dt>Returns:</dt>
<dd>$deleted Array of the deleted cache ids</dd>
</dl>
</div>
<hr>
<div class="location">/Doctrine/Common/Cache/AbstractCache.php at line 132</div>
<h3 id="deleteByPrefix()">deleteByPrefix</h3>
<code class="signature">public array <strong>deleteByPrefix</strong>(string prefix)</code>
<div class="details">
<p>Delete cache entries where the id has the passed prefix</p><dl>
<dt>Returns:</dt>
<dd>$deleted Array of the deleted cache ids</dd>
</dl>
</div>
<hr>
<div class="location">/Doctrine/Common/Cache/AbstractCache.php at line 113</div>
<h3 id="deleteByRegex()">deleteByRegex</h3>
<code class="signature">public array <strong>deleteByRegex</strong>(string regex)</code>
<div class="details">
<p>Delete cache entries where the id matches a PHP regular expressions</p><dl>
<dt>Returns:</dt>
<dd>$deleted Array of the deleted cache ids</dd>
</dl>
</div>
<hr>
<div class="location">/Doctrine/Common/Cache/AbstractCache.php at line 151</div>
<h3 id="deleteBySuffix()">deleteBySuffix</h3>
<code class="signature">public array <strong>deleteBySuffix</strong>(string suffix)</code>
<div class="details">
<p>Delete cache entries where the id has the passed suffix</p><dl>
<dt>Returns:</dt>
<dd>$deleted Array of the deleted cache ids</dd>
</dl>
</div>
<hr>
<div class="location">/Doctrine/Common/Cache/AbstractCache.php at line 57</div>
<h3 id="fetch()">fetch</h3>
<code class="signature">public void <strong>fetch</strong>(mixed id)</code>
<div class="details">
<p></p></div>
<hr>
<div class="location">/Doctrine/Common/Cache/AbstractCache.php at line 218</div>
<h3 id="getIds()">getIds</h3>
<code class="signature">public abstract array <strong>getIds</strong>()</code>
<div class="details">
<p>Get an array of all the cache ids stored</p><dl>
<dt>Returns:</dt>
<dd>$ids</dd>
</dl>
</div>
<hr>
<div class="location">/Doctrine/Common/Cache/AbstractCache.php at line 73</div>
<h3 id="save()">save</h3>
<code class="signature">public void <strong>save</strong>(mixed id, mixed data, mixed lifeTime)</code>
<div class="details">
<p></p></div>
<hr>
<div class="location">/Doctrine/Common/Cache/AbstractCache.php at line 49</div>
<h3 id="setNamespace()">setNamespace</h3>
<code class="signature">public void <strong>setNamespace</strong>(string namespace)</code>
<div class="details">
<p>Set the namespace to prefix all cache ids with.</p></div>
<hr>
<div class="header">
<h1>Doctrine</h1>
<ul>
<li><a href="../../../overview-summary.html">Overview</a></li>
<li><a href="../../../doctrine/common/cache/package-summary.html">Namespace</a></li>
<li class="active">Class</li>
<li><a href="../../../doctrine/common/cache/package-tree.html">Tree</a></li>
<li><a href="../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../index-all.html">Index</a></li>
</ul>
</div>
<div class="small_links">
<a href="../../../index.html" target="_top">Frames</a>
<a href="../../../doctrine/common/cache/abstractcache.html" target="_top">No frames</a>
</div>
<div class="small_links">
Summary: <a href="#summary_field">Field</a> | <a href="#summary_method">Method</a> | <a href="#summary_constr">Constr</a>
Detail: <a href="#detail_field">Field</a> | <a href="#detail_method">Method</a> | <a href="#summary_constr">Constr</a>
</div>
<hr>
<p id="footer">This document was generated by <a href="http://peej.github.com/phpdoctor/">PHPDoctor: The PHP Documentation Creator</a></p>
</body>
</html>
\ No newline at end of file
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">
<head>
<meta name="generator" content="PHPDoctor 2RC4 (http://phpdoctor.sourceforge.net/)">
<meta name="when" content="Wed, 14 Apr 2010 15:12:03 +0000">
<link rel="stylesheet" type="text/css" href="../../../stylesheet.css">
<link rel="start" href="../../../overview-summary.html">
<title>ApcCache (Doctrine)</title>
</head>
<body id="definition" onload="parent.document.title=document.title;">
<div class="header">
<h1>Doctrine</h1>
<ul>
<li><a href="../../../overview-summary.html">Overview</a></li>
<li><a href="../../../doctrine/common/cache/package-summary.html">Namespace</a></li>
<li class="active">Class</li>
<li><a href="../../../doctrine/common/cache/package-tree.html">Tree</a></li>
<li><a href="../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../index-all.html">Index</a></li>
</ul>
</div>
<div class="small_links">
<a href="../../../index.html" target="_top">Frames</a>
<a href="../../../doctrine/common/cache/apccache.html" target="_top">No frames</a>
</div>
<div class="small_links">
Summary: <a href="#summary_field">Field</a> | <a href="#summary_method">Method</a> | <a href="#summary_constr">Constr</a>
Detail: <a href="#detail_field">Field</a> | <a href="#detail_method">Method</a> | <a href="#summary_constr">Constr</a>
</div>
<hr>
<div class="qualifiedName">Doctrine\Common\Cache\ApcCache</div>
<div class="location">/Doctrine/Common/Cache/ApcCache.php at line 38</div>
<h1>Class ApcCache</h1>
<pre class="tree">Class:ApcCache - Superclass: AbstractCache
<a href="../../../doctrine/common/cache/abstractcache.html">AbstractCache</a><br> &lfloor;&nbsp;<strong>ApcCache</strong><br /></pre>
<hr>
<p class="signature">public class <strong>ApcCache</strong><br>extends <a href="../../../doctrine/common/cache/abstractcache.html">AbstractCache</a>
</p>
<div class="comment" id="overview_description"><p>APC cache driver.</p></div>
<dl>
<dt>License:</dt>
<dd>http://www.opensource.org/licenses/lgpl-license.php LGPL</dd>
<dt>See Also:</dt>
<dd><code>www.doctrine-project.org</code></dd>
<dt>Since:</dt>
<dd>2.0</dd>
<dt>Version:</dt>
<dd>$Revision$</dd>
<dt>Author:</dt>
<dd>Benjamin Eberlei <kontakt@beberlei.de></dd>
<dd>Guilherme Blanco <guilhermeblanco@hotmail.com></dd>
<dd>Jonathan Wage <jonwage@gmail.com></dd>
<dd>Roman Borschel <roman@code-factory.org></dd>
<dd>David Abdemoulaie <dave@hobodave.com></dd>
<dt>Todo:</dt>
<dd>Rename: APCCache</dd>
</dl>
<hr>
<table id="summary_method">
<tr><th colspan="2">Method Summary</th></tr>
<tr>
<td class="type"> array</td>
<td class="description"><p class="name"><a href="#getIds()">getIds</a>()</p><p class="description">{@inheritdoc}</p></td>
</tr>
</table>
<table class="inherit">
<tr><th colspan="2">Methods inherited from Doctrine\Common\Cache\AbstractCache</th></tr>
<tr><td><a href="../../../doctrine/common/cache/abstractcache.html#contains()">contains</a>, <a href="../../../doctrine/common/cache/abstractcache.html#delete()">delete</a>, <a href="../../../doctrine/common/cache/abstractcache.html#deleteAll()">deleteAll</a>, <a href="../../../doctrine/common/cache/abstractcache.html#deleteByPrefix()">deleteByPrefix</a>, <a href="../../../doctrine/common/cache/abstractcache.html#deleteByRegex()">deleteByRegex</a>, <a href="../../../doctrine/common/cache/abstractcache.html#deleteBySuffix()">deleteBySuffix</a>, <a href="../../../doctrine/common/cache/abstractcache.html#fetch()">fetch</a>, <a href="../../../doctrine/common/cache/abstractcache.html#getIds()">getIds</a>, <a href="../../../doctrine/common/cache/abstractcache.html#save()">save</a>, <a href="../../../doctrine/common/cache/abstractcache.html#setNamespace()">setNamespace</a></td></tr></table>
<h2 id="detail_method">Method Detail</h2>
<div class="location">/Doctrine/Common/Cache/ApcCache.php at line 43</div>
<h3 id="getIds()">getIds</h3>
<code class="signature">public array <strong>getIds</strong>()</code>
<div class="details">
<p></p><dl>
<dt>Returns:</dt>
<dd>$ids</dd>
</dl>
</div>
<hr>
<div class="header">
<h1>Doctrine</h1>
<ul>
<li><a href="../../../overview-summary.html">Overview</a></li>
<li><a href="../../../doctrine/common/cache/package-summary.html">Namespace</a></li>
<li class="active">Class</li>
<li><a href="../../../doctrine/common/cache/package-tree.html">Tree</a></li>
<li><a href="../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../index-all.html">Index</a></li>
</ul>
</div>
<div class="small_links">
<a href="../../../index.html" target="_top">Frames</a>
<a href="../../../doctrine/common/cache/apccache.html" target="_top">No frames</a>
</div>
<div class="small_links">
Summary: <a href="#summary_field">Field</a> | <a href="#summary_method">Method</a> | <a href="#summary_constr">Constr</a>
Detail: <a href="#detail_field">Field</a> | <a href="#detail_method">Method</a> | <a href="#summary_constr">Constr</a>
</div>
<hr>
<p id="footer">This document was generated by <a href="http://peej.github.com/phpdoctor/">PHPDoctor: The PHP Documentation Creator</a></p>
</body>
</html>
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">
<head>
<meta name="generator" content="PHPDoctor 2RC4 (http://phpdoctor.sourceforge.net/)">
<meta name="when" content="Wed, 14 Apr 2010 15:12:03 +0000">
<link rel="stylesheet" type="text/css" href="../../../stylesheet.css">
<link rel="start" href="../../../overview-summary.html">
<title>Doctrine\Common\Cache (Doctrine)</title>
</head>
<body id="frame">
<h1><a href="package-summary.html" target="main">Doctrine\Common\Cache</a></h1>
<h2>Classes</h2>
<ul>
<li><a href="../../../doctrine/common/cache/abstractcache.html" target="main">AbstractCache</a></li>
<li><a href="../../../doctrine/common/cache/apccache.html" target="main">ApcCache</a></li>
<li><a href="../../../doctrine/common/cache/arraycache.html" target="main">ArrayCache</a></li>
<li><a href="../../../doctrine/common/cache/memcachecache.html" target="main">MemcacheCache</a></li>
<li><a href="../../../doctrine/common/cache/xcachecache.html" target="main">XcacheCache</a></li>
</ul>
<h2>Interfaces</h2>
<ul>
<li><a href="../../../doctrine/common/cache/cache.html" target="main">Cache</a></li>
</ul>
</body>
</html>
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment