From 324b3ee426fa033e1dc165235b40bb67a5d5ec07 Mon Sep 17 00:00:00 2001 From: Benjamin Eberlei Date: Wed, 7 Apr 2010 20:35:33 +0200 Subject: [PATCH 01/86] Fix Testsuite to work with Git --- tests/.gitignore | 2 ++ .../ORM/Mapping/YamlMappingDriverTest.php | 4 ++++ .../ORM/Tools/ConvertDoctrine1SchemaTest.php | 4 ++++ .../Export/YamlClassMetadataExporterTest.php | 4 ++++ tests/Doctrine/Tests/TestInit.php | 21 +++++++++++++++++-- 5 files changed, 33 insertions(+), 2 deletions(-) create mode 100644 tests/.gitignore diff --git a/tests/.gitignore b/tests/.gitignore new file mode 100644 index 000000000..aab720af4 --- /dev/null +++ b/tests/.gitignore @@ -0,0 +1,2 @@ +Doctrine/Tests/Proxies/ +Doctrine/Tests/ORM/Proxy/generated/ \ No newline at end of file diff --git a/tests/Doctrine/Tests/ORM/Mapping/YamlMappingDriverTest.php b/tests/Doctrine/Tests/ORM/Mapping/YamlMappingDriverTest.php index b9193d581..2aad38645 100644 --- a/tests/Doctrine/Tests/ORM/Mapping/YamlMappingDriverTest.php +++ b/tests/Doctrine/Tests/ORM/Mapping/YamlMappingDriverTest.php @@ -12,6 +12,10 @@ class YamlMappingDriverTest extends AbstractMappingDriverTest { protected function _loadDriver() { + if (!class_exists('Symfony\Components\Yaml\Yaml', true)) { + $this->markTestSkipped('Please install Symfony YAML Component into the include path of your PHP installation.'); + } + return new YamlDriver(__DIR__ . DIRECTORY_SEPARATOR . 'yaml'); } } \ No newline at end of file diff --git a/tests/Doctrine/Tests/ORM/Tools/ConvertDoctrine1SchemaTest.php b/tests/Doctrine/Tests/ORM/Tools/ConvertDoctrine1SchemaTest.php index 088c871f7..f76f7baa7 100644 --- a/tests/Doctrine/Tests/ORM/Tools/ConvertDoctrine1SchemaTest.php +++ b/tests/Doctrine/Tests/ORM/Tools/ConvertDoctrine1SchemaTest.php @@ -40,6 +40,10 @@ class ConvertDoctrine1SchemaTest extends \Doctrine\Tests\OrmTestCase { public function testTest() { + if (!class_exists('Symfony\Components\Yaml\Yaml', true)) { + $this->markTestSkipped('Please install Symfony YAML Component into the include path of your PHP installation.'); + } + $cme = new ClassMetadataExporter(); $converter = new ConvertDoctrine1Schema(__DIR__ . '/doctrine1schema'); diff --git a/tests/Doctrine/Tests/ORM/Tools/Export/YamlClassMetadataExporterTest.php b/tests/Doctrine/Tests/ORM/Tools/Export/YamlClassMetadataExporterTest.php index 03a246b40..d7258a561 100644 --- a/tests/Doctrine/Tests/ORM/Tools/Export/YamlClassMetadataExporterTest.php +++ b/tests/Doctrine/Tests/ORM/Tools/Export/YamlClassMetadataExporterTest.php @@ -37,6 +37,10 @@ class YamlClassMetadataExporterTest extends AbstractClassMetadataExporterTest { protected function _getType() { + if (!class_exists('Symfony\Components\Yaml\Yaml', true)) { + $this->markTestSkipped('Please install Symfony YAML Component into the include path of your PHP installation.'); + } + return 'yaml'; } } \ No newline at end of file diff --git a/tests/Doctrine/Tests/TestInit.php b/tests/Doctrine/Tests/TestInit.php index 0945ce50c..c6b0e29f8 100644 --- a/tests/Doctrine/Tests/TestInit.php +++ b/tests/Doctrine/Tests/TestInit.php @@ -13,8 +13,25 @@ require_once __DIR__ . '/../../../lib/Doctrine/Common/ClassLoader.php'; $classLoader = new \Doctrine\Common\ClassLoader('Doctrine'); $classLoader->register(); -$classLoader = new \Doctrine\Common\ClassLoader('Symfony', __DIR__ . '/../../../lib/vendor'); -$classLoader->register(); +if (!file_exists(__DIR__."/Proxies")) { + if (!mkdir(__DIR__."/Proxies")) { + throw new Exception("Could not create " . __DIR__."/Proxies Folder."); + } +} +if (!file_exists(__DIR__."/ORM/Proxy/generated")) { + if (!mkdir(__DIR__."/ORM/Proxy/generated")) { + throw new Exception("Could not create " . __DIR__."/ORM/Proxy/generated Folder."); + } +} + +spl_autoload_register(function($class) { + if (strpos($class, 'Symfony') === 0) { + $file = str_replace("\\", "/", $class); + if (@fopen($class, "r")) { + require_once ($file); + } + } +}); set_include_path( __DIR__ . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . 'lib' From 5381e3d5a40f2144b460ca1233f11fb448a7c10e Mon Sep 17 00:00:00 2001 From: Benjamin Eberlei Date: Wed, 7 Apr 2010 20:38:13 +0200 Subject: [PATCH 02/86] Fix Testsuite to work with Git --- tests/.gitignore | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/.gitignore b/tests/.gitignore index aab720af4..721040526 100644 --- a/tests/.gitignore +++ b/tests/.gitignore @@ -1,2 +1,3 @@ Doctrine/Tests/Proxies/ -Doctrine/Tests/ORM/Proxy/generated/ \ No newline at end of file +Doctrine/Tests/ORM/Proxy/generated/ +Doctrine/Tests/ORM/Tools/Export/export From 45de5c69324018004b83cf1e8f6c35eefff071d2 Mon Sep 17 00:00:00 2001 From: Guilherme Blanco Date: Thu, 8 Apr 2010 00:30:11 -0300 Subject: [PATCH 03/86] [2.0] Removed old CLI support. --- lib/Doctrine/Common/CLI/AbstractNamespace.php | 234 --------- lib/Doctrine/Common/CLI/CLIController.php | 306 ----------- lib/Doctrine/Common/CLI/CLIException.php | 59 --- lib/Doctrine/Common/CLI/Configuration.php | 86 ---- lib/Doctrine/Common/CLI/Option.php | 103 ---- lib/Doctrine/Common/CLI/OptionGroup.php | 482 ------------------ .../Common/CLI/Printers/AbstractPrinter.php | 190 ------- .../Common/CLI/Printers/AnsiColorPrinter.php | 214 -------- .../Common/CLI/Printers/NormalPrinter.php | 46 -- lib/Doctrine/Common/CLI/Style.php | 93 ---- lib/Doctrine/Common/CLI/TaskDocumentation.php | 192 ------- lib/Doctrine/Common/CLI/TaskNamespace.php | 251 --------- .../Common/CLI/Tasks/AbstractTask.php | 200 -------- lib/Doctrine/Common/CLI/Tasks/HelpTask.php | 79 --- lib/Doctrine/Common/CLI/Tasks/VersionTask.php | 61 --- .../DBAL/Tools/CLI/Tasks/RunSqlTask.php | 171 ------- .../DBAL/Tools/CLI/Tasks/VersionTask.php | 62 --- .../ORM/Tools/CLI/Tasks/ClearCacheTask.php | 205 -------- .../CLI/Tasks/ConvertDoctrine1SchemaTask.php | 117 ----- .../Tools/CLI/Tasks/ConvertMappingTask.php | 163 ------ .../Tasks/EnsureProductionSettingsTask.php | 78 --- .../Tools/CLI/Tasks/GenerateEntitiesTask.php | 120 ----- .../Tools/CLI/Tasks/GenerateProxiesTask.php | 108 ---- .../CLI/Tasks/GenerateRepositoriesTask.php | 146 ------ .../ORM/Tools/CLI/Tasks/RunDqlTask.php | 147 ------ .../ORM/Tools/CLI/Tasks/SchemaToolTask.php | 224 -------- .../ORM/Tools/CLI/Tasks/VersionTask.php | 62 --- 27 files changed, 4199 deletions(-) delete mode 100644 lib/Doctrine/Common/CLI/AbstractNamespace.php delete mode 100644 lib/Doctrine/Common/CLI/CLIController.php delete mode 100644 lib/Doctrine/Common/CLI/CLIException.php delete mode 100644 lib/Doctrine/Common/CLI/Configuration.php delete mode 100644 lib/Doctrine/Common/CLI/Option.php delete mode 100644 lib/Doctrine/Common/CLI/OptionGroup.php delete mode 100644 lib/Doctrine/Common/CLI/Printers/AbstractPrinter.php delete mode 100644 lib/Doctrine/Common/CLI/Printers/AnsiColorPrinter.php delete mode 100644 lib/Doctrine/Common/CLI/Printers/NormalPrinter.php delete mode 100644 lib/Doctrine/Common/CLI/Style.php delete mode 100644 lib/Doctrine/Common/CLI/TaskDocumentation.php delete mode 100644 lib/Doctrine/Common/CLI/TaskNamespace.php delete mode 100644 lib/Doctrine/Common/CLI/Tasks/AbstractTask.php delete mode 100644 lib/Doctrine/Common/CLI/Tasks/HelpTask.php delete mode 100644 lib/Doctrine/Common/CLI/Tasks/VersionTask.php delete mode 100644 lib/Doctrine/DBAL/Tools/CLI/Tasks/RunSqlTask.php delete mode 100644 lib/Doctrine/DBAL/Tools/CLI/Tasks/VersionTask.php delete mode 100644 lib/Doctrine/ORM/Tools/CLI/Tasks/ClearCacheTask.php delete mode 100644 lib/Doctrine/ORM/Tools/CLI/Tasks/ConvertDoctrine1SchemaTask.php delete mode 100644 lib/Doctrine/ORM/Tools/CLI/Tasks/ConvertMappingTask.php delete mode 100644 lib/Doctrine/ORM/Tools/CLI/Tasks/EnsureProductionSettingsTask.php delete mode 100644 lib/Doctrine/ORM/Tools/CLI/Tasks/GenerateEntitiesTask.php delete mode 100644 lib/Doctrine/ORM/Tools/CLI/Tasks/GenerateProxiesTask.php delete mode 100644 lib/Doctrine/ORM/Tools/CLI/Tasks/GenerateRepositoriesTask.php delete mode 100644 lib/Doctrine/ORM/Tools/CLI/Tasks/RunDqlTask.php delete mode 100644 lib/Doctrine/ORM/Tools/CLI/Tasks/SchemaToolTask.php delete mode 100644 lib/Doctrine/ORM/Tools/CLI/Tasks/VersionTask.php diff --git a/lib/Doctrine/Common/CLI/AbstractNamespace.php b/lib/Doctrine/Common/CLI/AbstractNamespace.php deleted file mode 100644 index fb552c118..000000000 --- a/lib/Doctrine/Common/CLI/AbstractNamespace.php +++ /dev/null @@ -1,234 +0,0 @@ -. - */ - -namespace Doctrine\Common\CLI; - -use Doctrine\Common\Util\Inflector; - -/** - * Abstract CLI Namespace class - * - * @license http://www.opensource.org/licenses/lgpl-license.php LGPL - * @link www.doctrine-project.org - * @since 2.0 - * @version $Revision$ - * @author Benjamin Eberlei - * @author Guilherme Blanco - * @author Jonathan Wage - * @author Roman Borschel - */ -abstract class AbstractNamespace -{ - /** - * @var Configuration CLI Configuration instance - */ - private $_configuration = null; - - /** - * @var AbstractPrinter CLI Printer instance - */ - private $_printer = null; - - /** - * @var AbstractNamespace CLI Namespace instance - */ - private $_parentNamespace = null; - - /** - * @var array Available namespaces - */ - private $_namespaces = array(); - - /** - * Add a single namespace to CLI. - * Example of inclusion support to a single namespace: - * - * [php] - * $cliOrmNamespace->addNamespace('my-custom-namespace'); - * - * @param string $name CLI Namespace name - * - * @return CliController This object instance - */ - public function addNamespace($name) - { - $name = self::formatName($name); - - if ($this->hasNamespace($name)) { - throw CLIException::cannotOverrideNamespace($name); - } - - return $this->overrideNamespace($name); - } - - /** - * Overrides a namespace to CLI. - * Example of inclusion support to a single namespace: - * - * [php] - * $cli->overrideNamespace('orm'); - * - * @param string $name CLI Namespace name - * - * @return AbstractNamespace Newly created CLI Namespace - */ - public function overrideNamespace($name) - { - $taskNamespace = new TaskNamespace($name); - - $taskNamespace->setParentNamespace($this); - $taskNamespace->setPrinter($this->_printer); - $taskNamespace->setConfiguration($this->_configuration); - - $this->_namespaces[$taskNamespace->getName()] = $taskNamespace; - - return $taskNamespace; - } - - /** - * Retrieve CLI Namespace. - * Example of usage: - * - * [php] - * $cliOrmNamespace = $cli->getNamespace('ORM'); - * - * @param string $name CLI Namespace name - * - * @return TaskNamespace CLI Namespace - */ - public function getNamespace($name) - { - $name = self::formatName($name); - - return isset($this->_namespaces[$name]) - ? $this->_namespaces[$name] : null; - } - - /** - * Check existance of a CLI Namespace - * - * @param string CLI Namespace name - * - * @return boolean TRUE if namespace if defined, false otherwise - */ - public function hasNamespace($name) - { - return ($this->getNamespace($name) !== null); - } - - /** - * Defines the parent CLI Namespace - * - * @return AbstractNamespace - */ - public function setParentNamespace(AbstractNamespace $namespace) - { - $this->_parentNamespace = $namespace; - - return $this; - } - - /** - * Retrieves currently parent CLI Namespace - * - * @return AbstractNamespace - */ - public function getParentNamespace() - { - return $this->_parentNamespace; - } - - /** - * Retrieve all defined CLI Tasks - * - * @return array - */ - public function getAvailableTasks() - { - $tasks = array(); - - foreach ($this->_namespaces as $namespace) { - $tasks = array_merge($tasks, $namespace->getAvailableTasks()); - } - - return $tasks; - } - - /** - * Defines the CLI Output Printer - * - * @param AbstractPrinter $printer CLI Output Printer - * - * @return AbstractNamespace - */ - public function setPrinter(Printers\AbstractPrinter $printer = null) - { - $this->_printer = $printer ?: new Printers\AnsiColorPrinter; - - return $this; - } - - /** - * Retrieves currently used CLI Output Printer - * - * @return AbstractPrinter - */ - public function getPrinter() - { - return $this->_printer; - } - - /** - * Defines the CLI Configuration - * - * #param Configuration $configuration CLI Configuration - * - * @return AbstractNamespace - */ - public function setConfiguration(Configuration $config) - { - $this->_configuration = $config; - - return $this; - } - - /** - * Retrieves currently used CLI Configuration - * - * @return Configuration - */ - public function getConfiguration() - { - return $this->_configuration; - } - - /** - * Formats the CLI Namespace name into a camel-cased name - * - * @param string $name CLI Namespace name - * - * @return string Formatted CLI Namespace name - */ - public static function formatName($name) - { - return Inflector::classify($name); - } -} \ No newline at end of file diff --git a/lib/Doctrine/Common/CLI/CLIController.php b/lib/Doctrine/Common/CLI/CLIController.php deleted file mode 100644 index d11fc708a..000000000 --- a/lib/Doctrine/Common/CLI/CLIController.php +++ /dev/null @@ -1,306 +0,0 @@ -. - */ - -namespace Doctrine\Common\CLI; - -/** - * Generic CLI Controller of Tasks execution - * - * To include a new Task support, create a task: - * - * [php] - * class MyProject\Tools\CLI\Tasks\MyTask extends Doctrine\ORM\Tools\CLI\Tasks\AbstractTask - * { - * public function run(); - * public function basicHelp(); - * public function extendedHelp(); - * public function validate(); - * } - * - * And then, load the namespace assoaicated an include the support to it in your command-line script: - * - * [php] - * $cli = new Doctrine\Common\CLI\CLIController(); - * $cliNS = $cli->getNamespace('custom'); - * $cliNS->addTask('myTask', 'MyProject\Tools\CLI\Tasks\MyTask'); - * - * To execute, just type any classify-able name: - * - * $ cli.php custom:my-task - * - * @license http://www.opensource.org/licenses/lgpl-license.php LGPL - * @link www.doctrine-project.org - * @since 2.0 - * @version $Revision$ - * @author Benjamin Eberlei - * @author Guilherme Blanco - * @author Jonathan Wage - * @author Roman Borschel - */ -class CLIController extends AbstractNamespace -{ - /** - * The CLI processor of tasks - * - * @param Configuration $config - * @param AbstractPrinter $printer CLI Output printer - */ - public function __construct(Configuration $config, Printers\AbstractPrinter $printer = null) - { - $this->setPrinter($printer); - $this->setConfiguration($config); - - // Include core namespaces of tasks - $ns = 'Doctrine\Common\CLI\Tasks'; - $this->addNamespace('Core') - ->addTask('help', $ns . '\HelpTask') - ->addTask('version', $ns . '\VersionTask'); - - $ns = 'Doctrine\ORM\Tools\CLI\Tasks'; - $this->addNamespace('Orm') - ->addTask('clear-cache', $ns . '\ClearCacheTask') - ->addTask('convert-mapping', $ns . '\ConvertMappingTask') - ->addTask('ensure-production-settings', $ns . '\EnsureProductionSettingsTask') - ->addTask('generate-proxies', $ns . '\GenerateProxiesTask') - ->addTask('run-dql', $ns . '\RunDqlTask') - ->addTask('schema-tool', $ns . '\SchemaToolTask') - ->addTask('version', $ns . '\VersionTask') - ->addTask('convert-d1-schema', $ns . '\ConvertDoctrine1SchemaTask') - ->addTask('generate-entities', $ns . '\GenerateEntitiesTask') - ->addTask('generate-repositories', $ns . '\GenerateRepositoriesTask'); - - $ns = 'Doctrine\DBAL\Tools\CLI\Tasks'; - $this->addNamespace('Dbal') - ->addTask('run-sql', $ns . '\RunSqlTask') - ->addTask('version', $ns . '\VersionTask'); - } - - /** - * Add a single task to CLI Core Namespace. This method acts as a delegate. - * Example of inclusion support to a single task: - * - * [php] - * $cli->addTask('my-custom-task', 'MyProject\CLI\Tasks\MyCustomTask'); - * - * @param string $name CLI Task name - * @param string $class CLI Task class (FQCN - Fully Qualified Class Name) - * - * @return CLIController This object instance - */ - public function addTask($name, $class) - { - $this->getNamespace('Core')->addTask($name, $class); - - return $this; - } - - /** - * Processor of CLI Tasks. Handles multiple task calls, instantiate - * respective classes and run them. - * - * @param array $args CLI Arguments - */ - public function run($args = array()) - { - // Remove script file argument - $scriptFile = array_shift($args); - - // If not arguments are defined, include "help" - if (empty($args)) { - array_unshift($args, 'Core:Help'); - } - - // Process all sent arguments - $args = $this->_processArguments($args); - - try { - $this->getPrinter()->writeln('Doctrine Command Line Interface' . PHP_EOL, 'HEADER'); - - // Handle possible multiple tasks on a single command - foreach($args as $taskData) { - $taskName = $taskData['name']; - $taskArguments = $taskData['args']; - - $this->runTask($taskName, $taskArguments); - } - - return true; - } catch (\Exception $e) { - $message = $taskName . ' => ' . $e->getMessage(); - - if (isset($taskArguments['trace']) && $taskArguments['trace']) { - $message .= PHP_EOL . PHP_EOL . $e->getTraceAsString(); - } - - $this->getPrinter()->writeln($message, 'ERROR'); - - return false; - } - } - - /** - * Executes a given CLI Task - * - * @param atring $name CLI Task name - * @param array $args CLI Arguments - */ - public function runTask($name, $args = array()) - { - // Retrieve namespace name, task name and arguments - $taskPath = explode(':', $name); - - // Find the correct namespace where the task is defined - $taskName = array_pop($taskPath); - $taskNamespace = $this->_retrieveTaskNamespace($taskPath); - - $taskNamespace->runTask($taskName, $args); - } - - /** - * Processes arguments and returns a structured hierachy. - * Example: - * - * cli.php foo -abc --option=value bar --option -a=value --optArr=value1,value2 - * - * Returns: - * - * array( - * 0 => array( - * 'name' => 'foo', - * 'args' => array( - * 'a' => true, - * 'b' => true, - * 'c' => true, - * 'option' => 'value', - * ), - * ), - * 1 => array( - * 'name' => 'bar', - * 'args' => array( - * 'option' => true, - * 'a' => 'value', - * 'optArr' => array( - * 'value1', 'value2' - * ), - * ), - * ), - * ) - * - * Based on implementation of Patrick Fisher available at: - * http://pwfisher.com/nucleus/index.php?itemid=45 - * - * @param array $args - * - * @return array - */ - private function _processArguments($args = array()) - { - $flags = PREG_SPLIT_NO_EMPTY | PREG_SPLIT_DELIM_CAPTURE; - $regex = '/\s*[,]?\s*"([^"]*)"|\s*[,]?\s*([^,]*)/i'; - $preparedArgs = array(); - $out = & $preparedArgs; - - foreach ($args as $arg){ - // --foo --bar=baz - if (substr($arg, 0, 2) == '--'){ - $eqPos = strpos($arg, '='); - - // --foo - if ($eqPos === false){ - $key = substr($arg, 2); - $out[$key] = isset($out[$key]) ? $out[$key] : true; - // --bar=baz - } else { - $key = substr($arg, 2, $eqPos - 2); - $value = substr($arg, $eqPos + 1); - $value = (strpos($value, ' ') !== false) ? $value : array_values(array_filter( - explode(',', $value), function ($v) { return trim($v) != ''; } - )); - $out[$key] = ( ! is_array($value) || empty($value) || (is_array($value) && count($value) > 1)) - ? $value : $value[0]; - } - // -k=value -abc - } else if (substr($arg, 0, 1) == '-'){ - // -k=value - if (substr($arg, 2, 1) == '='){ - $key = substr($arg, 1, 1); - $value = substr($arg, 3); - $value = (strpos($value, ' ') !== false) ? $value : array_values(array_filter( - explode(',', $value), function ($v) { return trim($v) != ''; } - )); - $out[$key] = ( ! is_array($value) || (is_array($value) && count($value) > 1)) - ? $value : $value[0]; - // -abc - } else { - $chars = str_split(substr($arg, 1)); - - foreach ($chars as $char){ - $key = $char; - $out[$key] = isset($out[$key]) ? $out[$key] : true; - } - } - // plain-arg - } else { - $key = count($preparedArgs); - $preparedArgs[$key] = array( - 'name' => $arg, - 'args' => array() - ); - $out = & $preparedArgs[$key]['args']; - } - } - - return $preparedArgs; - } - - /** - * Retrieve the correct namespace given a namespace path - * - * @param array $namespacePath CLI Namespace path - * - * @return AbstractNamespace - */ - private function _retrieveTaskNamespace($namespacePath) - { - $taskNamespace = $this; - $currentNamespacePath = ''; - - // Consider possible missing namespace (ie. "help") and forward to "core" - if (count($namespacePath) == 0) { - $namespacePath = array('Core'); - } - - // Loop through each namespace - foreach ($namespacePath as $namespaceName) { - $taskNamespace = $taskNamespace->getNamespace($namespaceName); - - // If the given namespace returned "null", throw exception - if ($taskNamespace === null) { - throw CLIException::namespaceDoesNotExist($namespaceName, $currentNamespacePath); - } - - $currentNamespacePath = (( ! empty($currentNamespacePath)) ? ':' : '') - . $taskNamespace->getName(); - } - - return $taskNamespace; - } -} \ No newline at end of file diff --git a/lib/Doctrine/Common/CLI/CLIException.php b/lib/Doctrine/Common/CLI/CLIException.php deleted file mode 100644 index 33b0a609d..000000000 --- a/lib/Doctrine/Common/CLI/CLIException.php +++ /dev/null @@ -1,59 +0,0 @@ -. - */ - -namespace Doctrine\Common\CLI; - -/** - * CLI Exception class - * - * @license http://www.opensource.org/licenses/lgpl-license.php LGPL - * @link www.doctrine-project.org - * @since 2.0 - * @version $Revision$ - * @author Benjamin Eberlei - * @author Guilherme Blanco - * @author Jonathan Wage - * @author Roman Borschel - */ -class CLIException extends \Exception -{ - public static function namespaceDoesNotExist($namespaceName, $namespacePath = '') - { - return new self( - "Namespace '{$namespaceName}' does not exist" . - (( ! empty($namespacePath)) ? " in '{$namespacePath}'." : '.') - ); - } - - public static function taskDoesNotExist($taskName, $namespacePath) - { - return new self("Task '{$taskName}' does not exist in '{$namespacePath}'."); - } - - public static function cannotOverrideTask($taskName) - { - return new self("Task '{$taskName}' cannot be overriden."); - } - - public static function cannotOverrideNamespace($namespace) { - return new self("Namespace '$namespace' cannot be overriden. Call overrideNamespace() directly."); - } -} \ No newline at end of file diff --git a/lib/Doctrine/Common/CLI/Configuration.php b/lib/Doctrine/Common/CLI/Configuration.php deleted file mode 100644 index 99a6ad18e..000000000 --- a/lib/Doctrine/Common/CLI/Configuration.php +++ /dev/null @@ -1,86 +0,0 @@ -. - */ - -namespace Doctrine\Common\CLI; - -/** - * CLI Configuration class - * - * @license http://www.opensource.org/licenses/lgpl-license.php LGPL - * @link www.doctrine-project.org - * @since 2.0 - * @version $Revision$ - * @author Benjamin Eberlei - * @author Guilherme Blanco - * @author Jonathan Wage - * @author Roman Borschel - */ -class Configuration -{ - /** - * @var array Configuration attributes - */ - private $_attributes = array(); - - /** - * Defines a new configuration attribute - * - * @param string $name Attribute name - * @param mixed $value Attribute value - * - * @return Configuration This object instance - */ - public function setAttribute($name, $value = null) - { - $this->_attributes[$name] = $value; - - if ($value === null) { - unset($this->_attributes[$name]); - } - - return $this; - } - - /** - * Retrieves a configuration attribute - * - * @param string $name Attribute name - * - * @return mixed Attribute value - */ - public function getAttribute($name) - { - return isset($this->_attributes[$name]) - ? $this->_attributes[$name] : null; - } - - /** - * Checks if configuration attribute is defined - * - * @param string $name Attribute name - * - * @return boolean TRUE if attribute exists, FALSE otherwise - */ - public function hasAttribute($name) - { - return isset($this->_attributes[$name]); - } -} \ No newline at end of file diff --git a/lib/Doctrine/Common/CLI/Option.php b/lib/Doctrine/Common/CLI/Option.php deleted file mode 100644 index d50427f2d..000000000 --- a/lib/Doctrine/Common/CLI/Option.php +++ /dev/null @@ -1,103 +0,0 @@ -. - */ - -namespace Doctrine\Common\CLI; - -/** - * CLI Option definition - * - * @license http://www.opensource.org/licenses/lgpl-license.php LGPL - * @link www.doctrine-project.org - * @since 2.0 - * @version $Revision$ - * @author Guilherme Blanco - * @author Jonathan Wage - * @author Roman Borschel - */ -class Option -{ - /** @var string Option name */ - private $_name; - - /** @var string Option default value */ - private $_defaultValue; - - /** @var string Option description */ - private $description; - - /** - * Constructs a CLI Option - * - * @param string Option name - * @param integer Option type - * @param string Option description - */ - public function __construct($name, $defaultValue, $description) - { - $this->_name = $name; - $this->_defaultValue = $defaultValue; - $this->_description = $description; - } - - /** - * Retrieves the CLI Option name - * - * @return string Option name - */ - public function getName() - { - return $this->_name; - } - - /** - * Retrieves the CLI Option default value - * - * @return mixed Option default value - */ - public function getDefaultValue() - { - return $this->_defaultValue; - } - - /** - * Retrieves the CLI Option description - * - * @return string Option description - */ - public function getDescription() - { - return $this->_description; - } - - /** - * Converts the Option instance into a string representation - * - * @return string CLI Option representation in string - */ - public function __toString() - { - $defaultValue = ( ! is_null($this->_defaultValue)) - ? '=' . (is_array($this->_defaultValue) ? implode(',', $this->_defaultValue) : $this->_defaultValue) - : ''; - - return '--' . $this->_name . $defaultValue; - } -} \ No newline at end of file diff --git a/lib/Doctrine/Common/CLI/OptionGroup.php b/lib/Doctrine/Common/CLI/OptionGroup.php deleted file mode 100644 index 440d79e1b..000000000 --- a/lib/Doctrine/Common/CLI/OptionGroup.php +++ /dev/null @@ -1,482 +0,0 @@ -. - */ - -namespace Doctrine\Common\CLI; - -use Doctrine\Common\CLI\Printers\AbstractPrinter; - -/** - * CLI Option Group definition - * - * @license http://www.opensource.org/licenses/lgpl-license.php LGPL - * @link www.doctrine-project.org - * @since 2.0 - * @version $Revision$ - * @author Guilherme Blanco - * @author Jonathan Wage - * @author Roman Borschel - */ -class OptionGroup -{ - /* CLI Option Group CARDINALITY */ - /** - * Defines the cardinality 0..N to CLI Option Group. - * This means options in this group are optional and you can - * define more than one CLI Option on a single command. - */ - const CARDINALITY_0_N = 0; // [...] [...] [...] - - /** - * Defines the cardinality 0..1 to CLI Option Group. - * This means all options in this group are optional and you can - * define only one CLI Option on a single command. - */ - const CARDINALITY_0_1 = 1; // [...|...|...] - - /** - * Defines the cardinality 1..1 to CLI Option Group. - * This means all options in this group are required and you must - * define only one CLI Option on a single command. - */ - const CARDINALITY_1_1 = 2; // (...|...|...) - - /** - * Defines the cardinality 1..N to CLI Option Group. - * This means all options in this group are required and you must - * define at least one CLI Option on a single command. - */ - const CARDINALITY_1_N = 3; // (... ... ...) - - /** - * Defines the cardinality N..N to CLI Option Group. - * This means all options in this group are required and you must - * define all CLI Options on a single command. - */ - const CARDINALITY_N_N = 4; // ... ... ... - - /** - * Defines the cardinality M..N to CLI Option Group. - * This means all options in this group are either required or - * optional and you can CLI Options on a single command. - * This is the option to skip CLI Option validation. - */ - const CARDINALITY_M_N = 5; // ... ... ... - - - /** @var integer Option Group cardinality */ - private $_cadinality; - - /** @var array Option Group list of CLI Options */ - private $_options; - - - /** - * Constructs a new CLI Option Group - * - * @param integer Option Group cardinality - * @param array CLI Option Group options - */ - public function __construct($cardinality, $options = array()) - { - $this->_cardinality = $cardinality; - $this->_options = $options; - } - - /** - * Retrieves the CLI Option Group cardinality - * - * @return integer Option Group cardinality - */ - public function getCardinality() - { - return $this->_cardinality; - } - - /** - * Retrieves the CLI Option Group options - * - * @return array Option Group options - */ - public function getOptions() - { - return $this->_options; - } - - /** - * Cleans the CLI Options inside this CLI Option Group - * - */ - public function clear() - { - $this->_options = array(); - } - - /** - * Includes a new CLI Option to the Option Group - * - * @param Option|OptionGroup CLI Option or CLI Option Group - * @return OptionGroup This object instance - */ - public function addOption($option) - { - if ($option instanceof Option || $option instanceof OptionGroup) { - $this->_options[] = $option; - } - - return $this; - } - - /** - * Formats the CLI Option Group into a single line representation - * - * @param AbstractPrinter CLI Printer - * @return string Single line string representation of CLI Option Group - */ - public function formatPlain(AbstractPrinter $printer) - { - $numOptions = count($this->_options); - - if ($numOptions == 0) { - return ''; - } - - $style = $this->_getGroupOptionStyle(); - $shouldDisplayExtras = ( - $numOptions > 1 || - $this->_cardinality == self::CARDINALITY_0_1 || - $this->_cardinality == self::CARDINALITY_0_N - ); - - $str = ($shouldDisplayExtras) ? $printer->format($this->_startGroupDeclaration(), $style) : ''; - - // Loop through all CLI Options defined in OptionGroup - for ($i = 0; $i < $numOptions; $i++) { - $option = $this->_options[$i]; - - // Check for possible recursive OptionGroup - if ($option instanceof OptionGroup) { - // Simple increase nesting level by calling format recursively - $str .= $option->formatPlain($printer); - } else { - // Expose the option formatted - $str .= $printer->format((string) $option, $style); - } - - // Possibly append content if needed - if ($i < $numOptions - 1) { - $str .= $printer->format($this->_separatorGroupDeclaration(), $style); - } - } - - $str .= ($shouldDisplayExtras) ? $printer->format($this->_endGroupDeclaration(), $style) : ''; - - return $str; - } - - /** - * INTERNAL: - * Defines the start Option Group declaration string - * - * @return string Start Option Group declaration string - */ - private function _startGroupDeclaration() - { - $str = ''; - - // Inspect cardinality of OptionGroup - switch ($this->_cardinality) { - case self::CARDINALITY_0_1: - case self::CARDINALITY_0_N: - $str .= '['; - break; - - case self::CARDINALITY_1_1: - case self::CARDINALITY_1_N: - $str .= '('; - break; - - case self::CARDINALITY_N_N: - case self::CARDINALITY_M_N: - default: - // Does nothing - break; - } - - return $str; - } - - /** - * INTERNAL: - * Defines the separator Option Group declaration string - * - * @return string Separator Option Group declaration string - */ - private function _separatorGroupDeclaration() - { - $str = ''; - - // Inspect cardinality of OptionGroup - switch ($this->_cardinality) { - case self::CARDINALITY_0_1: - case self::CARDINALITY_1_1: - $str .= ' | '; - break; - - case self::CARDINALITY_1_N: - case self::CARDINALITY_N_N: - case self::CARDINALITY_M_N: - $str .= ' '; - break; - - case self::CARDINALITY_0_N: - $str .= '] ['; - break; - - default: - // Does nothing - break; - } - - return $str; - } - - /** - * INTERNAL: - * Defines the end Option Group declaration string - * - * @return string End Option Group declaration string - */ - private function _endGroupDeclaration() - { - $str = ''; - - // Inspect cardinality of OptionGroup - switch ($this->_cardinality) { - case self::CARDINALITY_0_1: - case self::CARDINALITY_0_N: - $str .= ']'; - break; - - case self::CARDINALITY_1_1: - case self::CARDINALITY_1_N: - $str .= ')'; - break; - - case self::CARDINALITY_N_N: - case self::CARDINALITY_M_N: - default: - // Does nothing - break; - } - - return $str; - } - - /** - * INTERNAL: - * Retrieve the Option Group style based on defined cardinality - * - * @return string CLI Style string representation - */ - private function _getGroupOptionStyle() - { - $style = 'NONE'; - - // Inspect cardinality of OptionGroup - switch ($this->_cardinality) { - case self::CARDINALITY_0_1: - case self::CARDINALITY_0_N: - $style = 'OPT_ARG'; - break; - - case self::CARDINALITY_1_1: - case self::CARDINALITY_1_N: - case self::CARDINALITY_N_N: - case self::CARDINALITY_M_N: - $style = 'REQ_ARG'; - break; - - default: - // Does nothing - break; - } - - return $style; - } - - /** - * Formats the CLI Option Group into a multi-line list with respective description - * - * @param AbstractPrinter CLI Printer - * @return string Multi-line string representation of CLI Option Group - */ - public function formatWithDescription(AbstractPrinter $printer) - { - $numOptions = count($this->_options); - - if ($numOptions == 0) { - return 'No available options' . PHP_EOL . PHP_EOL; - } - - $str = ''; - - // Get list of required and optional and max length options - list( - $requiredOptions, $optionalOptions, $maxOptionLength - ) = $this->_getOrganizedOptions( - $this->_options, $this->_cardinality, 0 - ); - - // Array-unique options - $requiredOptions = array_unique($requiredOptions); - $optionalOptions = array_unique($optionalOptions); - - // TODO Sort options alphabetically - - // Displaying required options - for ($i = 0, $l = count($requiredOptions); $i < $l; $i++) { - $str .= $this->_displayOptionWithDescription( - $printer, $requiredOptions[$i], 'REQ_ARG', $maxOptionLength - ); - - // Include extra line breaks between options - $str .= PHP_EOL . PHP_EOL; - } - - // Displaying optional options - for ($i = 0, $l = count($optionalOptions); $i < $l; $i++) { - $str .= $this->_displayOptionWithDescription( - $printer, $optionalOptions[$i], 'OPT_ARG', $maxOptionLength - ); - - // Include extra line breaks between options - $str .= PHP_EOL . PHP_EOL; - } - - return $str; - } - - /** - * Organize the Options into arrays of required and optional options. - * Also define the maximum length of CLI Options. - * - * @param array Array of CLI Option or CLI Option Group - * @param integer Current CLI OptionGroup cardinality - * @param integer Maximum length of CLI Options - * @return array Array containing 3 indexes: required options, optional - * options and maximum length of CLI Options - */ - private function _getOrganizedOptions($options, $cardinality, $maxColumn) - { - // Calculate maximum length and also organize the - // options into required and optional ones - $numOptions = count($options); - $requiredOptions = array(); - $optionalOptions = array(); - - for ($i = 0; $i < $numOptions; $i++) { - $option = $options[$i]; - - // Check for possible recursive OptionGroup - if ($option instanceof OptionGroup) { - // Initialize OptionGroup options - $groupRequiredOptions = array(); - $groupOptionalOptions = array(); - - // Get nested information - list( - $groupRequiredOptions, $groupOptionalOptions, $maxGroupColumn - ) = $this->_getOrganizedOptions( - $option->getOptions(), $option->getCardinality(), $maxColumn - ); - - // Merge nested required and optional options - $requiredOptions = array_merge($requiredOptions, $groupRequiredOptions); - $optionalOptions = array_merge($optionalOptions, $groupOptionalOptions); - - // If OptionGroup length is bigger than the current maximum, update - if ($maxColumn < $maxGroupColumn) { - $maxColumn = $maxGroupColumn; - } - } else { - // Cardinality defines between optional or required options - switch ($cardinality) { - case self::CARDINALITY_0_1: - case self::CARDINALITY_0_N: - $optionalOptions[] = $option; - break; - - case self::CARDINALITY_1_1: - case self::CARDINALITY_1_N: - case self::CARDINALITY_N_N: - case self::CARDINALITY_M_N: - $requiredOptions[] = $option; - break; - - default: - // Does nothing - break; - } - - // Build Option string - $optionStr = (string) $option; - - // + 2 = aditional spaces after option - $length = strlen($optionStr) + 2; - - if ($maxColumn < $length) { - $maxColumn = $length; - } - } - } - - return array($requiredOptions, $optionalOptions, $maxColumn); - } - - /** - * INTERNAL: - * Formats the CLI Option and also include the description - * - * @param AbstractPrinter CLI Printer - * @param Option CLI Option to be formatted - * @param string CLI Style string representation - * @param integer Maximum CLI Option length - * @return string Formats the current CLI Option line(s) - */ - private function _displayOptionWithDescription($printer, $option, $style, $maxOptionLength) - { - // Expose the option formatted - $optionStr = (string) $option; - - // Format Option string - $str = $printer->format($optionStr, $style); - - // Include missing spaces - $str .= str_repeat(' ', $maxOptionLength - strlen($optionStr)); - - // Calculate and display description - $str .= str_replace( - PHP_EOL, PHP_EOL . str_repeat(' ', $maxOptionLength), $option->getDescription() - ); - - return $str; - } -} \ No newline at end of file diff --git a/lib/Doctrine/Common/CLI/Printers/AbstractPrinter.php b/lib/Doctrine/Common/CLI/Printers/AbstractPrinter.php deleted file mode 100644 index 7dd1a7907..000000000 --- a/lib/Doctrine/Common/CLI/Printers/AbstractPrinter.php +++ /dev/null @@ -1,190 +0,0 @@ -. - */ - -namespace Doctrine\Common\CLI\Printers; - -use Doctrine\Common\CLI\Style; - -/** - * CLI Output Printer. - * Abstract class responsable to provide basic methods to support output - * styling and excerpt limited by output margin. - * - * @license http://www.opensource.org/licenses/lgpl-license.php LGPL - * @link www.doctrine-project.org - * @since 2.0 - * @version $Revision$ - * @author Guilherme Blanco - * @author Jonathan Wage - * @author Roman Borschel - */ -abstract class AbstractPrinter -{ - /** - * @var resource Output Stream - */ - protected $_stream; - - /** - * @var integer Maximum column size - */ - protected $_maxColumnSize; - - /** - * @var array Array of Styles - */ - protected $_styles; - - /** - * Creates an instance of Printer - * - * @param resource $stream Output Stream - */ - public function __construct($stream = STDOUT) - { - $this->_stream = $stream; - $this->_maxColumnSize = 80; - - $this->_initStyles(); - } - - /** - * Initializes Printer Styles - * - */ - protected function _initStyles() - { - // Defines base styles - $this->addStyles(array( - 'ERROR' => new Style(), - 'INFO' => new Style(), - 'COMMENT' => new Style(), - 'HEADER' => new Style(), - 'NONE' => new Style(), - )); - } - - /** - * Add a collection of styles to the Printer. - * To include them, just call the method with the following structure: - * - * [php] - * $printer->addStyles(array( - * 'ERROR' => new Style('BLACK', 'DEFAULT', array('BOLD' => true)), - * ... - * )); - * - * @param array $tasks CLI Tasks to be included - */ - public function addStyles($styles) - { - foreach ($styles as $name => $style) { - $this->addStyle($name, $style); - } - } - - /** - * Add a single Style to Printer. - * Example of inclusion to support a new Style: - * - * [php] - * $printer->addStyle('ERROR', new Style('BLACK', 'DEFAULT', array('BOLD' => true))); - * - * @param string $name Style name - * @param Style $style Style instance - */ - public function addStyle($name, Style $style) - { - $this->_styles[strtoupper($name)] = $style; - } - - /** - * Retrieves a defined Style. - * - * @return Style - */ - public function getStyle($name) - { - if (is_string($name)) { - $name = strtoupper($name); - return isset($this->_styles[$name]) ? $this->_styles[$name] : null; - } - - return $name; - } - - /** - * Sets the maximum column size (defines the CLI margin). - * - * @param integer $maxColumnSize The maximum column size for a message - */ - public function setMaxColumnSize($maxColumnSize) - { - $this->_maxColumnSize = $maxColumnSize; - } - - /** - * Writes to the output stream. - * - * @param string $message Message to be outputted - */ - public function output($message) - { - fwrite($this->_stream, $message); - - return $this; - } - - /** - * Formats message applying the defined style and writes to the output stream. - * - * @param string $message Message to be outputted - * @param mixed $style Optional style to be applied in message - */ - public function write($message, $style = 'NONE') - { - $this->output($this->format($message, $style)); - - return $this; - } - - /** - * Writes a line to the output stream, formatting it by applying the defined style. - * - * @param string $message Message to be outputted - * @param mixed $style Optional style to be applied in message - */ - public function writeln($message, $style = 'NONE') - { - $this->output($this->format($message, $style) . PHP_EOL); - - return $this; - } - - /** - * Formats the given message with the defined style. - * - * @param string $message Message to be formatted - * @param mixed $style Style to be applied in message - * @return string Formatted message - */ - abstract public function format($message, $style); -} \ No newline at end of file diff --git a/lib/Doctrine/Common/CLI/Printers/AnsiColorPrinter.php b/lib/Doctrine/Common/CLI/Printers/AnsiColorPrinter.php deleted file mode 100644 index ef78b9ed5..000000000 --- a/lib/Doctrine/Common/CLI/Printers/AnsiColorPrinter.php +++ /dev/null @@ -1,214 +0,0 @@ -. - */ - -namespace Doctrine\Common\CLI\Printers; - -use Doctrine\Common\CLI\Style; - -/** - * CLI Output Printer for ANSI Color terminal - * - * @license http://www.opensource.org/licenses/lgpl-license.php LGPL - * @link www.doctrine-project.org - * @since 2.0 - * @version $Revision$ - * @author Guilherme Blanco - * @author Jonathan Wage - * @author Roman Borschel - */ -class AnsiColorPrinter extends AbstractPrinter -{ - /** - * @inheritdoc - */ - protected function _initStyles() - { - $this->addStyles(array( - 'HEADER' => new Style('DEFAULT', 'DEFAULT', array('BOLD' => true)), - 'ERROR' => new Style('WHITE', 'RED', array('BOLD' => true)), - 'WARNING' => new Style('DEFAULT', 'YELLOW'), - 'KEYWORD' => new Style('BLUE', 'DEFAULT', array('BOLD' => true)), - 'REQ_ARG' => new Style('MAGENTA', 'DEFAULT', array('BOLD' => true)), - 'OPT_ARG' => new Style('CYAN', 'DEFAULT', array('BOLD' => true)), - 'INFO' => new Style('GREEN', 'DEFAULT', array('BOLD' => true)), - 'COMMENT' => new Style('DEFAULT', 'MAGENTA'), - 'NONE' => new Style(), - )); - } - - /** - * @inheritdoc - */ - public function format($message, $style = 'NONE') - { - if ( ! $this->_supportsColor()) { - return $message; - } - - $style = $this->getStyle($style); - $str = $this->_getForegroundString($style) - . $this->_getBackgroundString($style); - $styleSet = ($str != ''); - - return $str . $message . ($styleSet ? chr(27) . '[0m' : ''); - } - - /** - * Retrieves the ANSI string representation of requested color name - * - * @param Style $style Style - * @return string - */ - protected function _getBackgroundString(Style $style) - { - $background = $style->getBackground(); - - if (empty($background)) { - return ''; - } - - $esc = chr(27); - - switch (strtoupper($background)) { - case 'BLACK': - return $esc . '[40m'; - case 'RED': - return $esc . '[41m'; - case 'GREEN': - return $esc . '[42m'; - case 'YELLOW': - return $esc . '[43m'; - case 'BLUE': - return $esc . '[44m'; - case 'MAGENTA': - return $esc . '[45m'; - case 'CYAN': - return $esc . '[46m'; - case 'WHITE': - return $esc . '[47m'; - case 'DEFAULT': - default: - return $esc . '[48m'; - } - } - - /** - * Retrieves the ANSI string representation of requested color name - * - * @param Style $style Style - * @return string - */ - protected function _getForegroundString(Style $style) - { - $foreground = $style->getForeground(); - - if (empty($foreground)) { - return ''; - } - - $str = chr(27) . '[' . $this->_getOptionsString($style); - - switch (strtoupper($foreground)) { - case 'BLACK': - return $str . '30m'; - case 'RED': - return $str . '31m'; - case 'GREEN': - return $str . '32m'; - case 'YELLOW': - return $str . '33m'; - case 'BLUE': - return $str . '34m'; - case 'MAGENTA': - return $str . '35m'; - case 'CYAN': - return $str . '36m'; - case 'WHITE': - return $str . '37m'; - case 'DEFAULT_FGU': - return $str . '38m'; - case 'DEFAULT': - default: - return $str . '39m'; - } - } - - /** - * Retrieves the ANSI string representation of requested options - * - * @param Style $style Style - * @return string - */ - protected function _getOptionsString(Style $style) - { - $options = $style->getOptions(); - - if (empty($options)) { - return ''; - } - - $str = ''; - - foreach ($options as $name => $value) { - if ($value) { - $name = strtoupper($name); - - switch ($name) { - case 'BOLD': - $str .= '1;'; - break; - case 'HALF': - $str .= '2;'; - break; - case 'UNDERLINE': - $str .= '4;'; - break; - case 'BLINK': - $str .= '5;'; - break; - case 'REVERSE': - $str .= '7;'; - break; - case 'CONCEAL': - $str .= '8;'; - break; - default: - // Ignore unknown option - break; - } - } - } - - return $str; - } - - /** - * Checks if the current Output Stream supports ANSI Colors - * - * @return boolean - */ - private function _supportsColor() - { - return DIRECTORY_SEPARATOR != '\\' && - function_exists('posix_isatty') && - @posix_isatty($this->_stream); - } -} \ No newline at end of file diff --git a/lib/Doctrine/Common/CLI/Printers/NormalPrinter.php b/lib/Doctrine/Common/CLI/Printers/NormalPrinter.php deleted file mode 100644 index 2293be4fe..000000000 --- a/lib/Doctrine/Common/CLI/Printers/NormalPrinter.php +++ /dev/null @@ -1,46 +0,0 @@ -. - */ - -namespace Doctrine\Common\CLI\Printers; - -use Doctrine\Common\CLI\Style; - -/** - * CLI Output Printer for Normal terminal - * - * @license http://www.opensource.org/licenses/lgpl-license.php LGPL - * @link www.doctrine-project.org - * @since 2.0 - * @version $Revision$ - * @author Guilherme Blanco - * @author Jonathan Wage - * @author Roman Borschel - */ -class NormalPrinter extends AbstractPrinter -{ - /** - * @inheritdoc - */ - public function format($message, $style) - { - return $message; - } -} \ No newline at end of file diff --git a/lib/Doctrine/Common/CLI/Style.php b/lib/Doctrine/Common/CLI/Style.php deleted file mode 100644 index 12a35acb5..000000000 --- a/lib/Doctrine/Common/CLI/Style.php +++ /dev/null @@ -1,93 +0,0 @@ -. - */ - -namespace Doctrine\Common\CLI; - -/** - * CLI Output Style - * - * @license http://www.opensource.org/licenses/lgpl-license.php LGPL - * @link www.doctrine-project.org - * @since 2.0 - * @version $Revision$ - * @author Guilherme Blanco - * @author Jonathan Wage - * @author Roman Borschel - */ -class Style -{ - /** - * @var string Background color - */ - private $_background; - - /** - * @var string Foreground color - */ - private $_foreground; - - /** - * @var array Formatting options - */ - private $_options = array(); - - /** - * @param string $foreground Foreground color name - * @param string $background Background color name - * @param array $options Formatting options - */ - public function __construct($foreground = null, $background = null, $options = array()) - { - $this->_foreground = strtoupper($foreground); - $this->_background = strtoupper($background); - $this->_options = $options; - } - - /** - * Retrieves the foreground color name - * - * @return string - */ - public function getForeground() - { - return $this->_foreground; - } - - /** - * Retrieves the background color name - * - * @return string - */ - public function getBackground() - { - return $this->_background; - } - - /** - * Retrieves the formatting options - * - * @return string - */ - public function getOptions() - { - return $this->_options; - } -} \ No newline at end of file diff --git a/lib/Doctrine/Common/CLI/TaskDocumentation.php b/lib/Doctrine/Common/CLI/TaskDocumentation.php deleted file mode 100644 index 5cf658ff6..000000000 --- a/lib/Doctrine/Common/CLI/TaskDocumentation.php +++ /dev/null @@ -1,192 +0,0 @@ -. - */ - -namespace Doctrine\Common\CLI; - -use Doctrine\Common\CLI\Printers\AbstractPrinter, - Doctrine\Common\CLI\OptionGroup, - Doctrine\Common\CLI\Option; - -/** - * CLI Task documentation - * - * @license http://www.opensource.org/licenses/lgpl-license.php LGPL - * @link www.doctrine-project.org - * @since 2.0 - * @version $Revision$ - * @author Guilherme Blanco - * @author Jonathan Wage - * @author Roman Borschel - */ -class TaskDocumentation -{ - /** @var AbstractPrinter CLI Printer */ - private $_printer; - - /** @var AbstractNamespace CLI Namespace */ - private $_namespace; - - /** @var string CLI Task name */ - private $_name; - - /** @var string CLI Task description */ - private $_description; - - /** @var array CLI Task Option Group */ - private $_optionGroup; - - /** - * Constructs a new CLI Task Documentation - * - * @param AbstractNamespace CLI Namespace - */ - public function __construct(AbstractNamespace $namespace) - { - $this->_namespace = $namespace; - $this->_printer = $namespace->getPrinter(); - $this->_optionGroup = new OptionGroup(OptionGroup::CARDINALITY_M_N); - } - - /** - * Retrieves the CLI Namespace - * - * @return AbstractNamespace - */ - public function getNamespace() - { - return $this->_namespace; - } - - /** - * Defines the CLI Task name - * - * @param string Task name - * @return TaskDocumentation This object instance - */ - public function setName($name) - { - $this->_name = $name; - - return $this; - } - - /** - * Retrieves the CLI Task name - * - * @return string Task name - */ - public function getName() - { - return $this->_name; - } - - /** - * Retrieves the full CLI Task name - * - * @return string Task full name - */ - public function getFullName() - { - return $this->getNamespace()->getFullName() . ':' . $this->_name; - } - - /** - * Defines the CLI Task description - * - * @param string Task description - * @return TaskDocumentation This object instance - */ - public function setDescription($description) - { - $this->_description = $description; - - return $this; - } - - /** - * Retrieves the CLI Task description - * - * @var string Task description - */ - public function getDescription() - { - return $this->_description; - } - - /** - * Retrieves the CLI Task Option Group - * - * @return OptionGroup CLI Task Option Group - */ - public function getOptionGroup() - { - return $this->_optionGroup; - } - - /** - * Includes a new CLI Option Group to the CLI Task documentation - * - * @param OptionGroup CLI Option Group - * @return TaskDocumentation This object instance - */ - public function addOption($option) - { - if ($option instanceof OptionGroup) { - $this->_optionGroup->addOption($option); - } - - return $this; - } - - /** - * Retrieves the synopsis of associated CLI Task - * - * @return string CLI Task synopsis - */ - public function getSynopsis() - { - return $this->_printer->format($this->getFullName(), 'KEYWORD') . ' ' - . trim($this->_optionGroup->formatPlain($this->_printer)); - } - - /** - * Retrieve the complete documentation of associated CLI Task - * - * @return string CLI Task complete documentation - */ - public function getCompleteDocumentation() - { - $printer = $this->_printer; - - return $printer->format('Task: ') - . $printer->format($this->getFullName(), 'KEYWORD') - . $printer->format(PHP_EOL) - . $printer->format('Synopsis: ') - . $this->getSynopsis() - . $printer->format(PHP_EOL) - . $printer->format('Description: ') - . $printer->format($this->_description) - . $printer->format(PHP_EOL) - . $printer->format('Options: ') - . $printer->format(PHP_EOL) - . $this->_optionGroup->formatWithDescription($printer); - } -} diff --git a/lib/Doctrine/Common/CLI/TaskNamespace.php b/lib/Doctrine/Common/CLI/TaskNamespace.php deleted file mode 100644 index 9c9936f47..000000000 --- a/lib/Doctrine/Common/CLI/TaskNamespace.php +++ /dev/null @@ -1,251 +0,0 @@ -. - */ - -namespace Doctrine\Common\CLI; - -/** - * CLI Namespace class - * - * @license http://www.opensource.org/licenses/lgpl-license.php LGPL - * @link www.doctrine-project.org - * @since 2.0 - * @version $Revision$ - * @author Benjamin Eberlei - * @author Guilherme Blanco - * @author Jonathan Wage - * @author Roman Borschel - */ -class TaskNamespace extends AbstractNamespace -{ - /** - * @var boolean CLI Tasks flag to check if they are already initialized - */ - private $_initialized = false; - - /** - * @var string CLI Namespace full name - */ - private $_fullName = null; - - /** - * @var string CLI Namespace name - */ - private $_name = null; - - /** - * @var array Available tasks - */ - private $_tasks = array(); - - /** - * The CLI namespace - * - * @param string $name CLI Namespace name - */ - public function __construct($name) - { - $this->_name = self::formatName($name); - } - - /** - * Retrieve an instantiated CLI Task by given its name. - * - * @param string $name CLI Task name - * - * @return AbstractTask - */ - public function getTask($name) - { - // Check if task exists in namespace - if ($this->hasTask($name)) { - $taskClass = $this->_tasks[self::formatName($name)]; - - return new $taskClass($this); - } - - throw CLIException::taskDoesNotExist($name, $this->getFullName()); - } - - /** - * Retrieve all CLI Task in this Namespace. - * - * @return array - */ - public function getTasks() - { - return $this->_tasks; - } - - /** - * Retrieve all defined CLI Tasks - * - * @return array - */ - public function getAvailableTasks() - { - $tasks = parent::getAvailableTasks(); - - foreach ($this->_tasks as $taskName => $taskClass) { - $fullName = $this->getFullName() . ':' . $taskName; - - $tasks[$fullName] = $taskClass; - } - - return $tasks; - } - - /** - * Add a single task to CLI Namespace. - * Example of inclusion support to a single task: - * - * [php] - * $cliOrmNamespace->addTask('my-custom-task', 'MyProject\Cli\Tasks\MyCustomTask'); - * - * @param string $name CLI Task name - * @param string $class CLI Task class (FQCN - Fully Qualified Class Name) - * - * @return TaskNamespace This object instance - */ - public function addTask($name, $class) - { - $name = self::formatName($name); - - if ($this->hasTask($name)) { - throw CLIException::cannotOverrideTask($name); - } - - return $this->overrideTask($name, $class); - } - - /** - * Overrides task on CLI Namespace. - * Example of inclusion support to a single task: - * - * [php] - * $cliOrmNamespace->overrideTask('schema-tool', 'MyProject\Cli\Tasks\MyCustomTask'); - * - * @param string $name CLI Task name - * @param string $class CLI Task class (FQCN - Fully Qualified Class Name) - * - * @return TaskNamespace This object instance - */ - public function overrideTask($name, $class) - { - $name = self::formatName($name); - - $this->_tasks[$name] = $class; - - return $this; - } - - /** - * Check existance of a CLI Task - * - * @param string CLI Task name - * - * @return boolean TRUE if CLI Task if defined, false otherwise - */ - public function hasTask($name) - { - $name = self::formatName($name); - - return isset($this->_tasks[$name]); - } - - /** - * Retrieves the CLI Namespace name - * - * @return string CLI Namespace name - */ - public function getName() - { - return $this->_name; - } - - /** - * Retrieves the full CLI Namespace name - * - * @return string CLI Namespace full name - */ - public function getFullName() - { - if ($this->_fullName === null) { - $str = $this->_name; - - while ( - ($parentNamespace = $this->getParentNamespace()) !== null && - ! ($parentNamespace instanceof CliController) - ) { - $str = $parentNamespace->getFullName() . ':' . $str; - } - - $this->_fullName = $str; - } - - return $this->_fullName; - } - - /** - * Effectively instantiate and execute a given CLI Task - * - * @param string $name CLI Task name - * @param array $arguments CLI Task arguments - */ - public function runTask($name, $arguments = array()) - { - try { - $task = $this->getTask($name); - - // Merge global configuration if it exists - if (($globalArgs = $this->getConfiguration()->getAttribute('globalArguments')) !== null) { - $arguments = array_merge($globalArgs, $arguments); - } - - $task->setArguments($arguments); - - if ((isset($arguments['help']) && $arguments['help']) || (isset($arguments['h']) && $arguments['h'])) { - $task->extendedHelp(); // User explicitly asked for help option - } else if (isset($arguments['basic-help']) && $arguments['basic-help']) { - $task->basicHelp(); // User explicitly asked for basic help option - } else if ($task->validate()) { - $task->run(); - } - } catch (CLIException $e) { - $message = $this->getFullName() . ':' . $name . ' => ' . $e->getMessage(); - $printer = $this->getPrinter(); - - // If we want the trace of calls, append to error message - if (isset($arguments['trace']) && $arguments['trace']) { - $message .= PHP_EOL . PHP_EOL . $e->getTraceAsString(); - } - - $printer->writeln($message, 'ERROR'); - - // Unable instantiate task or task is not valid - if (isset($task) && $task !== null) { - $printer->write(PHP_EOL); - $task->basicHelp(); // Fallback of not-valid task arguments - } - - $printer->write(PHP_EOL); - } - } -} \ No newline at end of file diff --git a/lib/Doctrine/Common/CLI/Tasks/AbstractTask.php b/lib/Doctrine/Common/CLI/Tasks/AbstractTask.php deleted file mode 100644 index 28c783b0b..000000000 --- a/lib/Doctrine/Common/CLI/Tasks/AbstractTask.php +++ /dev/null @@ -1,200 +0,0 @@ -. - */ - -namespace Doctrine\Common\CLI\Tasks; - -use Doctrine\Common\CLI\AbstractNamespace, - Doctrine\Common\CLI\TaskDocumentation; - -/** - * Base class for CLI Tasks. - * Provides basic methods and requires implementation of methods that - * each task should implement in order to correctly work. - * - * @license http://www.opensource.org/licenses/lgpl-license.php LGPL - * @link www.doctrine-project.org - * @since 2.0 - * @version $Revision$ - * @author Benjamin Eberlei - * @author Guilherme Blanco - * @author Jonathan Wage - * @author Roman Borschel - */ -abstract class AbstractTask -{ - /** - * @var AbstractNamespace CLI Namespace - */ - protected $_printer; - - /** - * @var TaskDocumentation CLI Task Documentation - */ - protected $_documentation; - - /** - * @var array CLI Task arguments - */ - protected $_arguments = array(); - - /** - * Constructor of CLI Task - * - * @param AbstractNamespace CLI Namespace - */ - public function __construct(AbstractNamespace $namespace) - { - $this->_namespace = $namespace; - $this->_documentation = new TaskDocumentation($namespace); - - // Complete the CLI Task Documentation creation - $this->buildDocumentation(); - } - - /** - * Retrieves the CLI Namespace - * - * @return AbstractNamespace - */ - public function getNamespace() - { - return $this->_namespace; - } - - /** - * Retrieves the CLI Task Documentation - * - * @return TaskDocumentation - */ - public function getDocumentation() - { - return $this->_documentation; - } - - /** - * Defines the CLI Task arguments - * - * @param array $arguments CLI Task arguments - * - * @return AbstractTask - */ - public function setArguments(array $arguments = array()) - { - $this->_arguments = $arguments; - - return $this; - } - - /** - * Retrieves the CLI Task arguments - * - * @return array - */ - public function getArguments() - { - return $this->_arguments; - } - - /** - * Retrieves currently used CLI Output Printer - * - * @return AbstractPrinter - */ - public function getPrinter() - { - return $this->_namespace->getPrinter(); - } - - /** - * Retrieves current used CLI Configuration - * - * @return Configuration - */ - public function getConfiguration() - { - return $this->_namespace->getConfiguration(); - } - - /** - * Expose to CLI Output Printer the extended help of the given task. - * This means it should detail all parameters, options and the meaning - * of each one. - * This method is executed when user types in CLI the following command: - * - * [bash] - * ./doctrine task --help - * - */ - public function extendedHelp() - { - $this->getPrinter()->output($this->_documentation->getCompleteDocumentation()); - } - - /** - * Expose to CLI Output Printer the basic help of the given task. - * This means it should only expose the basic task call. It is also - * executed when user calls the global help; so this means it should - * not pollute the Printer. - * Basic help exposure is displayed when task does not pass the validate - * (which means when user does not type the required options or when given - * options are invalid, ie: invalid option), or when user requests to have - * description of all available tasks. - * This method is executed when user uses the following commands: - * - * [bash] - * ./doctrine task --invalid-option - * ./doctrine --help - * - */ - public function basicHelp() - { - $this->getPrinter() - ->output($this->_documentation->getSynopsis()) - ->output(PHP_EOL) - ->output(' ' . $this->_documentation->getDescription()) - ->output(PHP_EOL . PHP_EOL); - } - - /** - * Assures the given arguments matches with required/optional ones. - * This method should be used to introspect arguments to check for - * missing required arguments and also for invalid defined options. - * - * @return boolean - */ - public function validate() - { - // TODO implement DAG here! - return true; - } - - /** - * Safely execution of task. - * Each CLI task should implement this as normal flow execution of - * what is supposed to do. - */ - abstract public function run(); - - /** - * Generate the CLI Task Documentation - */ - abstract public function buildDocumentation(); -} diff --git a/lib/Doctrine/Common/CLI/Tasks/HelpTask.php b/lib/Doctrine/Common/CLI/Tasks/HelpTask.php deleted file mode 100644 index 7e25a00dd..000000000 --- a/lib/Doctrine/Common/CLI/Tasks/HelpTask.php +++ /dev/null @@ -1,79 +0,0 @@ -. - */ - -namespace Doctrine\Common\CLI\Tasks; - -use Doctrine\Common\CLI\CLIException; - -/** - * CLI Task to display available commands help - * - * @license http://www.opensource.org/licenses/lgpl-license.php LGPL - * @link www.doctrine-project.org - * @since 2.0 - * @version $Revision$ - * @author Benjamin Eberlei - * @author Guilherme Blanco - * @author Jonathan Wage - * @author Roman Borschel - */ -class HelpTask extends AbstractTask -{ - /** - * @inheritdoc - */ - public function buildDocumentation() - { - $doc = $this->getDocumentation(); - $doc->setName('help') - ->setDescription('Exposes helpful information about all available tasks.'); - } - - /** - * @inheritdoc - */ - public function extendedHelp() - { - $this->run(); - } - - /** - * Exposes the available tasks - * - */ - public function run() - { - $this->getPrinter()->writeln('Available Tasks:', 'HEADER')->write(PHP_EOL); - - // Find the CLI Controller - $cliController = $this->getNamespace()->getParentNamespace(); - - // Switch between ALL available tasks and display the basic Help of each one - $availableTasks = $cliController->getAvailableTasks(); - //unset($availableTasks['Core:Help']); - - ksort($availableTasks); - - foreach (array_keys($availableTasks) as $taskName) { - $cliController->runTask($taskName, array('basic-help' => true)); - } - } -} \ No newline at end of file diff --git a/lib/Doctrine/Common/CLI/Tasks/VersionTask.php b/lib/Doctrine/Common/CLI/Tasks/VersionTask.php deleted file mode 100644 index 119d08753..000000000 --- a/lib/Doctrine/Common/CLI/Tasks/VersionTask.php +++ /dev/null @@ -1,61 +0,0 @@ -. - */ - -namespace Doctrine\Common\CLI\Tasks; - -use Doctrine\Common\Version; - -/** - * CLI Task to display the doctrine version - * - * @license http://www.opensource.org/licenses/lgpl-license.php LGPL - * @link www.doctrine-project.org - * @since 2.0 - * @version $Revision$ - * @author Benjamin Eberlei - * @author Guilherme Blanco - * @author Jonathan Wage - * @author Roman Borschel - */ -class VersionTask extends AbstractTask -{ - /** - * @inheritdoc - */ - public function buildDocumentation() - { - // There're no options on this task - $this->getDocumentation()->getOptionGroup()->clear(); - - $doc = $this->getDocumentation(); - $doc->setName('version') - ->setDescription('Displays the current installed Doctrine version.'); - } - - /** - * Displays the current version of Doctrine - * - */ - public function run() - { - $this->getPrinter()->writeln('You are currently running Doctrine ' . Version::VERSION, 'INFO'); - } -} \ No newline at end of file diff --git a/lib/Doctrine/DBAL/Tools/CLI/Tasks/RunSqlTask.php b/lib/Doctrine/DBAL/Tools/CLI/Tasks/RunSqlTask.php deleted file mode 100644 index 687f5e071..000000000 --- a/lib/Doctrine/DBAL/Tools/CLI/Tasks/RunSqlTask.php +++ /dev/null @@ -1,171 +0,0 @@ -. - */ - -namespace Doctrine\DBAL\Tools\CLI\Tasks; - -use Doctrine\Common\CLI\Tasks\AbstractTask, - Doctrine\Common\CLI\CLIException, - Doctrine\Common\Util\Debug, - Doctrine\Common\CLI\Option, - Doctrine\Common\CLI\OptionGroup; - -/** - * Task for executing arbitrary SQL that can come from a file or directly from - * the command line. - * - * @license http://www.opensource.org/licenses/lgpl-license.php LGPL - * @link www.doctrine-project.org - * @since 2.0 - * @version $Revision$ - * @author Guilherme Blanco - * @author Jonathan Wage - * @author Roman Borschel - */ -class RunSqlTask extends AbstractTask -{ - /** - * @inheritdoc - */ - public function buildDocumentation() - { - $dqlAndFile = new OptionGroup(OptionGroup::CARDINALITY_1_1, array( - new Option( - 'sql', '', 'The SQL to execute.' . PHP_EOL . - 'If defined, --file can not be requested on same task.' - ), - new Option( - 'file', '', 'The path to the file with the SQL to execute.' . PHP_EOL . - 'If defined, --sql can not be requested on same task.' - ) - )); - - $depth = new OptionGroup(OptionGroup::CARDINALITY_0_1, array( - new Option('depth', '', 'Dumping depth of Entities graph.') - )); - - $doc = $this->getDocumentation(); - $doc->setName('run-sql') - ->setDescription('Executes arbitrary SQL from a file or directly from the command line.') - ->getOptionGroup() - ->addOption($dqlAndFile) - ->addOption($depth); - } - - /** - * @inheritdoc - */ - public function validate() - { - $arguments = $this->getArguments(); - $em = $this->getConfiguration()->getAttribute('em'); - - if ($em === null) { - throw new CLIException( - "Attribute 'em' of CLI Configuration is not defined or it is not a valid EntityManager." - ); - } - - if ( ! (isset($arguments['sql']) ^ isset($arguments['file']))) { - throw new CLIException('One of --sql or --file required, and only one.'); - } - - return true; - } - - - /** - * Executes the task. - */ - public function run() - { - $arguments = $this->getArguments(); - - if (isset($arguments['file'])) { - $em = $this->getConfiguration()->getAttribute('em'); - $conn = $em->getConnection(); - $printer = $this->getPrinter(); - - $fileNames = (array) $arguments['file']; - - foreach ($fileNames as $fileName) { - if ( ! file_exists($fileName)) { - throw new CLIException(sprintf('The SQL file [%s] does not exist.', $fileName)); - } else if ( ! is_readable($fileName)) { - throw new CLIException(sprintf('The SQL file [%s] does not have read permissions.', $fileName)); - } - - $printer->write('Processing file [' . $fileName . ']... '); - $sql = file_get_contents($fileName); - - if ($conn instanceof \Doctrine\DBAL\Driver\PDOConnection) { - // PDO Drivers - try { - $lines = 0; - - $stmt = $conn->prepare($sql); - $stmt->execute(); - - do { - // Required due to "MySQL has gone away!" issue - $stmt->fetch(); - $stmt->closeCursor(); - - $lines++; - } while ($stmt->nextRowset()); - - $printer->writeln(sprintf('%d statements executed!', $lines)); - } catch (\PDOException $e) { - $printer->writeln('error!') - ->writeln($e->getMessage()); - } - } else { - // Non-PDO Drivers (ie. OCI8 driver) - $stmt = $conn->prepare($sql); - $rs = $stmt->execute(); - - if ($rs) { - $printer->writeln('OK!'); - } else { - $error = $stmt->errorInfo(); - - $printer->writeln('error!') - ->writeln($error['message']); - } - - $stmt->closeCursor(); - } - } - } else if (isset($arguments['sql'])) { - $em = $this->getConfiguration()->getAttribute('em'); - - if (preg_match('/^select/i', $arguments['sql'])) { - $stmt = $em->getConnection()->executeQuery($arguments['sql']); - $resultSet = $stmt->fetchAll(\Doctrine\DBAL\Connection::FETCH_ASSOC); - } else { - $resultSet = $em->getConnection()->executeUpdate($arguments['sql']); - } - - $maxDepth = isset($arguments['depth']) ? $arguments['depth'] : 7; - - Debug::dump($resultSet, $maxDepth); - } - } -} \ No newline at end of file diff --git a/lib/Doctrine/DBAL/Tools/CLI/Tasks/VersionTask.php b/lib/Doctrine/DBAL/Tools/CLI/Tasks/VersionTask.php deleted file mode 100644 index 273132d9b..000000000 --- a/lib/Doctrine/DBAL/Tools/CLI/Tasks/VersionTask.php +++ /dev/null @@ -1,62 +0,0 @@ -. - */ - -namespace Doctrine\DBAL\Tools\CLI\Tasks; - -use Doctrine\Common\CLI\Tasks\AbstractTask, - Doctrine\Common\Version; - -/** - * CLI Task to display the doctrine version - * - * @license http://www.opensource.org/licenses/lgpl-license.php LGPL - * @link www.doctrine-project.org - * @since 2.0 - * @version $Revision$ - * @author Benjamin Eberlei - * @author Guilherme Blanco - * @author Jonathan Wage - * @author Roman Borschel - */ -class VersionTask extends AbstractTask -{ - /** - * @inheritdoc - */ - public function buildDocumentation() - { - // There're no options on this task - $this->getDocumentation()->getOptionGroup()->clear(); - - $doc = $this->getDocumentation(); - $doc->setName('version') - ->setDescription('Displays the current installed Doctrine version.'); - } - - /** - * Displays the current version of Doctrine - * - */ - public function run() - { - $this->getPrinter()->writeln('You are currently running Doctrine ' . Version::VERSION, 'INFO'); - } -} \ No newline at end of file diff --git a/lib/Doctrine/ORM/Tools/CLI/Tasks/ClearCacheTask.php b/lib/Doctrine/ORM/Tools/CLI/Tasks/ClearCacheTask.php deleted file mode 100644 index 5dcfed081..000000000 --- a/lib/Doctrine/ORM/Tools/CLI/Tasks/ClearCacheTask.php +++ /dev/null @@ -1,205 +0,0 @@ -. - */ - -namespace Doctrine\ORM\Tools\CLI\Tasks; - -use Doctrine\Common\CLI\Tasks\AbstractTask, - Doctrine\Common\CLI\CliException, - Doctrine\Common\CLI\Option, - Doctrine\Common\CLI\OptionGroup, - Doctrine\Common\Cache\AbstractDriver; - -/** - * CLI Task to clear the cache of the various cache drivers - * - * @license http://www.opensource.org/licenses/lgpl-license.php LGPL - * @link www.doctrine-project.org - * @since 2.0 - * @version $Revision$ - * @author Guilherme Blanco - * @author Jonathan Wage - * @author Roman Borschel - */ -class ClearCacheTask extends AbstractTask -{ - /** - * @inheritdoc - */ - public function buildDocumentation() - { - $cacheOptions = new OptionGroup(OptionGroup::CARDINALITY_1_1, array( - new Option('query', null, 'Clear the query cache.'), - new Option('metadata', null, 'Clear the metadata cache.'), - new OptionGroup(OptionGroup::CARDINALITY_M_N, array( - new OptionGroup(OptionGroup::CARDINALITY_1_1, array( - new Option('result', null, 'Clear the result cache.') - )), - new OptionGroup(OptionGroup::CARDINALITY_0_N, array( - new Option('id', '', 'The id of the cache entry to delete (accepts * wildcards).'), - new Option('regex', '', 'Delete cache entries that match the given regular expression.'), - new Option('prefix', '', 'Delete cache entries that have the given prefix.'), - new Option('suffix', '', 'Delete cache entries that have the given suffix.') - )) - )) - )); - - $doc = $this->getDocumentation(); - $doc->setName('clear-cache') - ->setDescription('Clear cache from configured query, result and metadata drivers.') - ->getOptionGroup() - ->addOption($cacheOptions); - } - - /** - * @inheritdoc - */ - public function validate() - { - $arguments = $this->getArguments(); - - // Check if we have an active EntityManager - $em = $this->getConfiguration()->getAttribute('em'); - - if ($em === null) { - throw new CLIException( - "Attribute 'em' of CLI Configuration is not defined or it is not a valid EntityManager." - ); - } - - // When clearing the query cache no need to specify - // id, regex, prefix or suffix. - if ( - (isset($arguments['query']) || isset($arguments['metadata'])) && (isset($arguments['id']) || - isset($arguments['regex']) || isset($arguments['prefix']) || isset($arguments['suffix'])) - ) { - throw new CLIException( - 'When clearing the query or metadata cache do not ' . - 'specify any --id, --regex, --prefix or --suffix.' - ); - } - - return true; - } - - /** - * @inheritdoc - */ - public function run() - { - $arguments = $this->getArguments(); - $printer = $this->getPrinter(); - - $query = isset($arguments['query']); - $result = isset($arguments['result']); - $metadata = isset($arguments['metadata']); - $id = isset($arguments['id']) ? $arguments['id'] : null; - $regex = isset($arguments['regex']) ? $arguments['regex'] : null; - $prefix = isset($arguments['prefix']) ? $arguments['prefix'] : null; - $suffix = isset($arguments['suffix']) ? $arguments['suffix'] : null; - - $all = false; - - if ( ! $query && ! $result && ! $metadata) { - $all = true; - } - - $em = $this->getConfiguration()->getAttribute('em'); - $configuration = $em->getConfiguration(); - - if ($query || $all) { - $this->_doDelete( - 'query', $configuration->getQueryCacheImpl(), $id, $regex, $prefix, $suffix - ); - } - - if ($result || $all) { - $this->_doDelete( - 'result', $configuration->getResultCacheImpl(), $id, $regex, $prefix, $suffix - ); - } - - if ($metadata || $all) { - $this->_doDelete( - 'metadata', $configuration->getMetadataCacheImpl(), $id, $regex, $prefix, $suffix - ); - } - } - - private function _doDelete($type, $cacheDriver, $id, $regex, $prefix, $suffix) - { - $printer = $this->getPrinter(); - - if ( ! $cacheDriver) { - throw new CLIException('No driver has been configured for the ' . $type . ' cache.'); - } - - if ($id) { - $printer->writeln('Clearing ' . $type . ' cache entries that match the id "' . $id . '".', 'INFO'); - - $deleted = $cacheDriver->delete($id); - - if (is_array($deleted)) { - $this->_printDeleted($type, $deleted); - } else if (is_bool($deleted) && $deleted) { - $this->_printDeleted($type, array($id)); - } - } - - if ($regex) { - $printer->writeln('Clearing ' . $type . ' cache entries that match the regular expression ".' . $regex . '"', 'INFO'); - - $this->_printDeleted($type, $cacheDriver->deleteByRegex('/' . $regex. '/')); - } - - if ($prefix) { - $printer->writeln('Clearing ' . $type . ' cache entries that have the prefix "' . $prefix . '".', 'INFO'); - - $this->_printDeleted($type, $cacheDriver->deleteByPrefix($prefix)); - } - - if ($suffix) { - $printer->writeln('Clearing ' . $type . ' cache entries that have the suffix "' . $suffix . '".', 'INFO'); - - $this->_printDeleted($type, $cacheDriver->deleteBySuffix($suffix)); - } - - if ( ! $id && ! $regex && ! $prefix && ! $suffix) { - $printer->writeln('Clearing all ' . $type . ' cache entries.', 'INFO'); - - $this->_printDeleted($type, $cacheDriver->deleteAll()); - } - } - - private function _printDeleted($type, array $ids) - { - $printer = $this->getPrinter(); - - if ( ! empty($ids)) { - foreach ($ids as $id) { - $printer->writeln(' - ' . $id); - } - } else { - throw new CLIException('No ' . $type . ' cache entries found.'); - } - - $printer->write(PHP_EOL); - } -} \ No newline at end of file diff --git a/lib/Doctrine/ORM/Tools/CLI/Tasks/ConvertDoctrine1SchemaTask.php b/lib/Doctrine/ORM/Tools/CLI/Tasks/ConvertDoctrine1SchemaTask.php deleted file mode 100644 index 42bbfda20..000000000 --- a/lib/Doctrine/ORM/Tools/CLI/Tasks/ConvertDoctrine1SchemaTask.php +++ /dev/null @@ -1,117 +0,0 @@ -. - */ - -namespace Doctrine\ORM\Tools\CLI\Tasks; - -use Doctrine\Common\CLI\Tasks\AbstractTask, - Doctrine\ORM\Tools\Export\ClassMetadataExporter, - Doctrine\Common\CLI\CliException, - Doctrine\Common\CLI\Option, - Doctrine\Common\CLI\OptionGroup, - Doctrine\ORM\Tools\ConvertDoctrine1Schema, - Doctrine\ORM\Tools\EntityGenerator; - -/** - * CLI Task to convert a Doctrine 1 schema to a Doctrine 2 mapping file - * - * @license http://www.opensource.org/licenses/lgpl-license.php LGPL - * @link www.doctrine-project.org - * @since 2.0 - * @version $Revision$ - * @author Benjamin Eberlei - * @author Guilherme Blanco - * @author Jonathan Wage - * @author Roman Borschel - */ -class ConvertDoctrine1SchemaTask extends AbstractTask -{ - /** - * @inheritdoc - */ - public function buildDocumentation() - { - $options = new OptionGroup(OptionGroup::CARDINALITY_N_N, array( - new Option('from', '', 'The path to the Doctrine 1 schema.'), - new Option('to', '', 'The Doctrine 2 mapping format to convert to.'), - new Option('dest', '', 'The path to export the converted schema.') - )); - - $doc = $this->getDocumentation(); - $doc->setName('convert-10-schema') - ->setDescription('Converts a Doctrine 1.X schema into a Doctrine 2.X schema.') - ->getOptionGroup() - ->addOption($options); - } - - /** - * @inheritdoc - */ - public function validate() - { - $arguments = $this->getArguments(); - $em = $this->getConfiguration()->getAttribute('em'); - - if ( ! isset($arguments['from']) || ! isset($arguments['to']) || ! isset($arguments['dest'])) { - throw new CLIException('You must specify a value for --from, --to and --dest'); - } - - return true; - } - - public function run() - { - $arguments = $this->getArguments(); - $printer = $this->getPrinter(); - - $printer->writeln(sprintf( - 'Converting Doctrine 1 schema at "%s" to the "%s" format', - $printer->format($arguments['from'], 'KEYWORD'), - $printer->format($arguments['to'], 'KEYWORD') - ) - ); - - $cme = new ClassMetadataExporter(); - $exporter = $cme->getExporter($arguments['to'], $arguments['dest']); - - if ($arguments['to'] === 'annotation') { - $entityGenerator = new EntityGenerator(); - $exporter->setEntityGenerator($entityGenerator); - } - - $converter = new ConvertDoctrine1Schema($arguments['from']); - $metadatas = $converter->getMetadatas(); - - foreach ($metadatas as $metadata) { - $printer->writeln( - sprintf('Processing entity "%s"', $printer->format($metadata->name, 'KEYWORD')) - ); - } - - $exporter->setMetadatas($metadatas); - $exporter->export(); - - $printer->writeln(sprintf( - 'Writing Doctrine 2 mapping files to "%s"', - $printer->format($arguments['dest'], 'KEYWORD') - ) - ); - } -} \ No newline at end of file diff --git a/lib/Doctrine/ORM/Tools/CLI/Tasks/ConvertMappingTask.php b/lib/Doctrine/ORM/Tools/CLI/Tasks/ConvertMappingTask.php deleted file mode 100644 index 962b6fdc7..000000000 --- a/lib/Doctrine/ORM/Tools/CLI/Tasks/ConvertMappingTask.php +++ /dev/null @@ -1,163 +0,0 @@ -. - */ - -namespace Doctrine\ORM\Tools\CLI\Tasks; - -use Doctrine\Common\CLI\Tasks\AbstractTask, - Doctrine\Common\CLI\CliException, - Doctrine\Common\CLI\Option, - Doctrine\Common\CLI\OptionGroup, - Doctrine\ORM\Tools\EntityGenerator, - Doctrine\ORM\Tools\Export\ClassMetadataExporter, - Doctrine\ORM\Mapping\Driver\DriverChain, - Doctrine\ORM\Mapping\Driver\AnnotationDriver, - Doctrine\ORM\Mapping\Driver\Driver; - -/** - * CLI Task to convert your mapping information between the various formats - * - * @license http://www.opensource.org/licenses/lgpl-license.php LGPL - * @link www.doctrine-project.org - * @since 2.0 - * @version $Revision$ - * @author Guilherme Blanco - * @author Jonathan Wage - * @author Roman Borschel - */ -class ConvertMappingTask extends AbstractTask -{ - /** - * @inheritdoc - */ - public function buildDocumentation() - { - $convertOptions = new OptionGroup(OptionGroup::CARDINALITY_N_N, array( - new OptionGroup(OptionGroup::CARDINALITY_1_1, array( - new Option('from', '', 'The path to the mapping information to convert from (yml, xml, php, annotation).'), - new Option('from-database', null, 'Use this option if you wish to reverse engineer your database to a set of Doctrine mapping files.') - )), - new Option('to', '', 'The format to convert to (yml, xml, php, annotation).'), - new Option('dest', '', 'The path to write the converted mapping information.') - )); - - $doc = $this->getDocumentation(); - $doc->setName('convert-mapping') - ->setDescription('Convert mapping information between supported formats.') - ->getOptionGroup() - ->addOption($convertOptions); - } - - /** - * @inheritdoc - */ - public function validate() - { - $arguments = $this->getArguments(); - - if (isset($arguments['from-database']) && $arguments['from-database']) { - $arguments['from'] = 'database'; - - $this->setArguments($arguments); - } - - if (!(isset($arguments['from']) && isset($arguments['to']) && isset($arguments['dest']))) { - throw new CLIException( - 'You must include a value for all three options: --from, --to and --dest.' - ); - } - - if (strtolower($arguments['to']) != 'annotation' && isset($arguments['extend'])) { - throw new CLIException( - 'You can only use the --extend argument when converting to annotations.' - ); - } - - if (strtolower($arguments['from']) == 'database') { - // Check if we have an active EntityManager - $em = $this->getConfiguration()->getAttribute('em'); - - if ($em === null) { - throw new CLIException( - "Attribute 'em' of CLI Configuration is not defined or it is not a valid EntityManager." - ); - } - - $config = $em->getConfiguration(); - $config->setMetadataDriverImpl( - new \Doctrine\ORM\Mapping\Driver\DatabaseDriver( - $em->getConnection()->getSchemaManager() - ) - ); - } - - return true; - } - - public function run() - { - $arguments = $this->getArguments(); - $cme = new ClassMetadataExporter(); - $cme->setEntityManager($this->getConfiguration()->getAttribute('em')); - $printer = $this->getPrinter(); - - // Get exporter and configure it - $exporter = $cme->getExporter($arguments['to'], $arguments['dest']); - - if ($arguments['to'] === 'annotation') { - $entityGenerator = new EntityGenerator(); - $exporter->setEntityGenerator($entityGenerator); - - if (isset($arguments['extend']) && $arguments['extend']) { - $entityGenerator->setClassToExtend($arguments['extend']); - } - - if (isset($arguments['num-spaces']) && $arguments['extend']) { - $entityGenerator->setNumSpaces($arguments['num-spaces']); - } - } - - $from = (array) $arguments['from']; - - foreach ($from as $source) { - $cme->addMappingSource($source); - } - - $metadatas = $cme->getMetadatas(); - - foreach ($metadatas as $metadata) { - $printer->writeln( - sprintf('Processing entity "%s"', $printer->format($metadata->name, 'KEYWORD')) - ); - } - - $printer->writeln(''); - $printer->writeln( - sprintf( - 'Exporting "%s" mapping information to "%s"', - $printer->format($arguments['to'], 'KEYWORD'), - $printer->format($arguments['dest'], 'KEYWORD') - ) - ); - - $exporter->setMetadatas($metadatas); - $exporter->export(); - } -} \ No newline at end of file diff --git a/lib/Doctrine/ORM/Tools/CLI/Tasks/EnsureProductionSettingsTask.php b/lib/Doctrine/ORM/Tools/CLI/Tasks/EnsureProductionSettingsTask.php deleted file mode 100644 index effc6e969..000000000 --- a/lib/Doctrine/ORM/Tools/CLI/Tasks/EnsureProductionSettingsTask.php +++ /dev/null @@ -1,78 +0,0 @@ -. - */ - -namespace Doctrine\ORM\Tools\CLI\Tasks; - -use Doctrine\Common\CLI\Tasks\AbstractTask, - Doctrine\Common\CLI\CLIException; - -/** - * CLI Task to ensure that Doctrine is properly configured for a production environment. - * - * @license http://www.opensource.org/licenses/lgpl-license.php LGPL - * @link www.doctrine-project.org - * @since 2.0 - * @version $Revision$ - * @author Benjamin Eberlei - * @author Guilherme Blanco - * @author Jonathan Wage - * @author Roman Borschel - */ -class EnsureProductionSettingsTask extends AbstractTask -{ - /** - * @inheritdoc - */ - public function buildDocumentation() - { - $doc = $this->getDocumentation(); - $doc->setName('ensure-production-settings') - ->setDescription('Verify that Doctrine is properly configured for a production environment.'); - } - - /** - * @inheritdoc - */ - public function validate() - { - // Check if we have an active EntityManager - $em = $this->getConfiguration()->getAttribute('em'); - - if ($em === null) { - throw new CLIException( - "Attribute 'em' of CLI Configuration is not defined or it is not a valid EntityManager." - ); - } - - return true; - } - - /** - * @inheritdoc - */ - public function run() - { - $em = $this->getConfiguration()->getAttribute('em'); - $em->getConfiguration()->ensureProductionSettings(); - - $this->getPrinter()->writeln('Environment is correctly configured for production.'); - } -} \ No newline at end of file diff --git a/lib/Doctrine/ORM/Tools/CLI/Tasks/GenerateEntitiesTask.php b/lib/Doctrine/ORM/Tools/CLI/Tasks/GenerateEntitiesTask.php deleted file mode 100644 index 3bc9c5262..000000000 --- a/lib/Doctrine/ORM/Tools/CLI/Tasks/GenerateEntitiesTask.php +++ /dev/null @@ -1,120 +0,0 @@ -. - */ - -namespace Doctrine\ORM\Tools\CLI\Tasks; - -use Doctrine\Common\CLI\Tasks\AbstractTask, - Doctrine\Common\CLI\Option, - Doctrine\Common\CLI\OptionGroup, - Doctrine\Common\CLI\CLIException, - Doctrine\ORM\Tools\EntityGenerator, - Doctrine\ORM\Tools\ClassMetadataReader; - -/** - * CLI Task to generate entity classes and method stubs from your mapping information. - * - * @license http://www.opensource.org/licenses/lgpl-license.php LGPL - * @link www.doctrine-project.org - * @since 2.0 - * @version $Revision$ - * @author Benjamin Eberlei - * @author Guilherme Blanco - * @author Jonathan Wage - * @author Roman Borschel - */ -class GenerateEntitiesTask extends AbstractTask -{ - /** - * @inheritdoc - */ - public function buildDocumentation() - { - $options = new OptionGroup(OptionGroup::CARDINALITY_N_N, array( - new Option('from', '', 'The path to mapping information.'), - new Option('dest', '', 'The path to generate your entity classes.') - )); - - $doc = $this->getDocumentation(); - $doc->setName('generate-entities') - ->setDescription('Generate entity classes and method stubs from your mapping information.') - ->getOptionGroup() - ->addOption($options); - } - - /** - * @inheritdoc - */ - public function validate() - { - $arguments = $this->getArguments(); - - if ( ! isset($arguments['from']) || ! isset($arguments['dest'])) { - throw new CLIException('You must specify a value for --from and --dest'); - } - - return true; - } - - /** - * @inheritdoc - */ - public function run() - { - $printer = $this->getPrinter(); - $arguments = $this->getArguments(); - $from = $arguments['from']; - $dest = realpath($arguments['dest']); - - $entityGenerator = new EntityGenerator(); - $entityGenerator->setGenerateAnnotations(false); - $entityGenerator->setGenerateStubMethods(true); - $entityGenerator->setRegenerateEntityIfExists(false); - $entityGenerator->setUpdateEntityIfExists(true); - - if (isset($arguments['extend']) && $arguments['extend']) { - $entityGenerator->setClassToExtend($arguments['extend']); - } - - if (isset($arguments['num-spaces']) && $arguments['extend']) { - $entityGenerator->setNumSpaces($arguments['num-spaces']); - } - - $reader = new ClassMetadataReader(); - $reader->setEntityManager($this->getConfiguration()->getAttribute('em')); - $reader->addMappingSource($from); - $metadatas = $reader->getMetadatas(); - - foreach ($metadatas as $metadata) { - $printer->writeln( - sprintf('Processing entity "%s"', $printer->format($metadata->name, 'KEYWORD')) - ); - } - - $entityGenerator->generate($metadatas, $dest); - - $printer->write(PHP_EOL); - $printer->writeln( - sprintf('Entity classes generated to "%s"', - $printer->format($dest, 'KEYWORD') - ) - ); - } -} \ No newline at end of file diff --git a/lib/Doctrine/ORM/Tools/CLI/Tasks/GenerateProxiesTask.php b/lib/Doctrine/ORM/Tools/CLI/Tasks/GenerateProxiesTask.php deleted file mode 100644 index e1589d59a..000000000 --- a/lib/Doctrine/ORM/Tools/CLI/Tasks/GenerateProxiesTask.php +++ /dev/null @@ -1,108 +0,0 @@ - - * @author Jonathan Wage - * @author Roman Borschel - */ -class GenerateProxiesTask extends AbstractTask -{ - /** - * @inheritdoc - */ - public function buildDocumentation() - { - $classDir = new OptionGroup(OptionGroup::CARDINALITY_1_1, array( - new Option('class-dir', '', 'Specified directory where mapping classes are located.') - )); - - $toDir = new OptionGroup(OptionGroup::CARDINALITY_0_1, array( - new Option('to-dir', '', 'Generates the classes in the specified directory.') - )); - - $doc = $this->getDocumentation(); - $doc->setName('generate-proxies') - ->setDescription('Generates proxy classes for entity classes.') - ->getOptionGroup() - ->addOption($classDir) - ->addOption($toDir); - } - - /** - * @inheritdoc - */ - public function validate() - { - $arguments = $this->getArguments(); - $em = $this->getConfiguration()->getAttribute('em'); - - if ($em === null) { - throw new CLIException( - "Attribute 'em' of CLI Configuration is not defined or it is not a valid EntityManager." - ); - } - - $metadataDriver = $em->getConfiguration()->getMetadataDriverImpl(); - - if ($metadataDriver instanceof \Doctrine\ORM\Mapping\Driver\AnnotationDriver) { - if (isset($arguments['class-dir'])) { - $metadataDriver->addPaths((array) $arguments['class-dir']); - } else { - throw new CLIException( - 'The supplied configuration uses the annotation metadata driver. ' . - "The 'class-dir' argument is required for this driver." - ); - } - } - - return true; - } - - /** - * @inheritdoc - */ - public function run() - { - $arguments = $this->getArguments(); - $printer = $this->getPrinter(); - - $em = $this->getConfiguration()->getAttribute('em'); - $cmf = $em->getMetadataFactory(); - $classes = $cmf->getAllMetadata(); - $factory = $em->getProxyFactory(); - - if (empty($classes)) { - $printer->writeln('No classes to process.', 'INFO'); - } else { - foreach ($classes as $class) { - $printer->writeln( - sprintf('Processing entity "%s"', $printer->format($class->name, 'KEYWORD')) - ); - } - - $factory->generateProxyClasses( - $classes, isset($arguments['to-dir']) ? $arguments['to-dir'] : null - ); - - $printer->writeln(''); - - $printer->writeln( - sprintf('Proxy classes generated to "%s"', - $printer->format(isset($arguments['to-dir']) ? $arguments['to-dir'] : $em->getConfiguration()->getProxyDir(), 'KEYWORD')) - ); - } - } -} \ No newline at end of file diff --git a/lib/Doctrine/ORM/Tools/CLI/Tasks/GenerateRepositoriesTask.php b/lib/Doctrine/ORM/Tools/CLI/Tasks/GenerateRepositoriesTask.php deleted file mode 100644 index 5d1e6f53a..000000000 --- a/lib/Doctrine/ORM/Tools/CLI/Tasks/GenerateRepositoriesTask.php +++ /dev/null @@ -1,146 +0,0 @@ -. - */ - -namespace Doctrine\ORM\Tools\CLI\Tasks; - -use Doctrine\Common\CLI\Tasks\AbstractTask, - Doctrine\Common\CLI\Option, - Doctrine\Common\CLI\OptionGroup, - Doctrine\Common\CLI\CLIException, - Doctrine\ORM\Tools\ClassMetadataReader; - -/** - * CLI Task to generate repository classes for some mapping information - * - * @license http://www.opensource.org/licenses/lgpl-license.php LGPL - * @link www.doctrine-project.org - * @since 2.0 - * @version $Revision$ - * @author Benjamin Eberlei - * @author Guilherme Blanco - * @author Jonathan Wage - * @author Roman Borschel - */ -class GenerateRepositoriesTask extends ConvertMappingTask -{ - private static $_template = -'; - -use \Doctrine\ORM\EntityRepository; - -/** - * - * - * This class was generated by the Doctrine ORM. Add your own custom - * repository methods below. - */ -class extends EntityRepository -{ -}'; - - /** - * @inheritdoc - */ - public function buildDocumentation() - { - $options = new OptionGroup(OptionGroup::CARDINALITY_N_N, array( - new Option('from', '', 'The path to mapping information.'), - new Option('dest', '', 'The path to generate your repository classes.') - )); - - $doc = $this->getDocumentation(); - $doc->setName('generate-repositories') - ->setDescription('Generate repository classes for some mapping information.') - ->getOptionGroup() - ->addOption($options); - } - - /** - * @inheritdoc - */ - public function validate() - { - $arguments = $this->getArguments(); - $em = $this->getConfiguration()->getAttribute('em'); - - if ( ! isset($arguments['from']) || ! isset($arguments['dest'])) { - throw new CLIException('You must specify a value for --from and --dest'); - } - - return true; - } - - public function run() - { - $printer = $this->getPrinter(); - $arguments = $this->getArguments(); - $dest = realpath($arguments['dest']); - - $reader = new ClassMetadataReader(); - $reader->setEntityManager($this->getConfiguration()->getAttribute('em')); - $reader->addMappingSource($arguments['from']); - $metadatas = $reader->getMetadatas(); - - foreach ($metadatas as $metadata) { - if ($metadata->customRepositoryClassName) { - $code = $this->_generateRepositoryClass($metadata->customRepositoryClassName); - $path = $dest . '/' . str_replace('\\', '/', $metadata->customRepositoryClassName) . '.php'; - $dir = dirname($path); - if ( ! is_dir($dir)) { - mkdir($dir, 0777, true); - } - $printer->writeln( - sprintf('Processing entity "%s"', - $printer->format($metadata->customRepositoryClassName, 'KEYWORD') - ) - ); - file_put_contents($path, $code); - } - } - $printer->writeln(''); - $printer->writeln( - sprintf('Entity repository classes generated to "%s"', - $printer->format($dest, 'KEYWORD') - ) - ); - } - - private function _generateRepositoryClass($fullyQualifiedClassName) - { - $namespace = substr($fullyQualifiedClassName, 0, strrpos($fullyQualifiedClassName, '\\')); - - $pos = strrpos($fullyQualifiedClassName, '\\'); - $className = substr($fullyQualifiedClassName, $pos + 1, strlen($fullyQualifiedClassName)); - - $placeHolders = array( - '', - '' - ); - $replacements = array( - $namespace, - $className - ); - $code = str_replace($placeHolders, $replacements, self::$_template); - return $code; - } -} \ No newline at end of file diff --git a/lib/Doctrine/ORM/Tools/CLI/Tasks/RunDqlTask.php b/lib/Doctrine/ORM/Tools/CLI/Tasks/RunDqlTask.php deleted file mode 100644 index b7aead638..000000000 --- a/lib/Doctrine/ORM/Tools/CLI/Tasks/RunDqlTask.php +++ /dev/null @@ -1,147 +0,0 @@ -. - */ - -namespace Doctrine\ORM\Tools\CLI\Tasks; - -use Doctrine\Common\CLI\Tasks\AbstractTask, - Doctrine\Common\CLI\CLIException, - Doctrine\Common\Util\Debug, - Doctrine\Common\CLI\Option, - Doctrine\Common\CLI\OptionGroup, - Doctrine\ORM\Query; - -/** - * Task for executing DQL in passed EntityManager. - * - * @license http://www.opensource.org/licenses/lgpl-license.php LGPL - * @link www.doctrine-project.org - * @since 2.0 - * @version $Revision$ - * @author Guilherme Blanco - * @author Jonathan Wage - * @author Roman Borschel - */ -class RunDqlTask extends AbstractTask -{ - /** - * @inheritdoc - */ - public function buildDocumentation() - { - $dql = new OptionGroup(OptionGroup::CARDINALITY_1_1, array( - new Option('dql', '', 'The DQL to execute.') - )); - - $hydrate = new OptionGroup(OptionGroup::CARDINALITY_0_1, array( - new Option( - 'hydrate', '', - 'Hydration mode of result set.' . PHP_EOL . - 'Should be either: object, array, scalar or single-scalar.' - ) - )); - - $firstResult = new OptionGroup(OptionGroup::CARDINALITY_0_1, array( - new Option('first-result', '', 'The first result in the result set.') - )); - - $maxResults = new OptionGroup(OptionGroup::CARDINALITY_0_1, array( - new Option('max-results', '', 'The maximum number of results in the result set.') - )); - - $depth = new OptionGroup(OptionGroup::CARDINALITY_0_1, array( - new Option('depth', '', 'Dumping depth of Entities graph.') - )); - - $doc = $this->getDocumentation(); - $doc->setName('run-dql') - ->setDescription('Executes arbitrary DQL directly from the command line.') - ->getOptionGroup() - ->addOption($dql) - ->addOption($hydrate) - ->addOption($firstResult) - ->addOption($maxResults) - ->addOption($depth); - } - - /** - * @inheritdoc - */ - public function validate() - { - $arguments = $this->getArguments(); - $em = $this->getConfiguration()->getAttribute('em'); - - if ($em === null) { - throw new CLIException( - "Attribute 'em' of CLI Configuration is not defined or it is not a valid EntityManager." - ); - } - - if ( ! isset($arguments['dql'])) { - throw new CLIException('Argument --dql must be defined.'); - } - - if (isset($arguments['hydrate'])) { - $hydrationModeName = 'Doctrine\ORM\Query::HYDRATE_' . strtoupper(str_replace('-', '_', $arguments['hydrate'])); - - if ( ! defined($hydrationModeName)) { - throw new CLIException("Argument --hydrate must be either 'object', 'array', 'scalar' or 'single-scalar'."); - } - } - - if (isset($arguments['first-result']) && ! ctype_digit($arguments['first-result'])) { - throw new CLIException('Argument --first-result must be an integer value.'); - } - - if (isset($arguments['max-results']) && ! ctype_digit($arguments['max-results'])) { - throw new CLIException('Argument --max-results must be an integer value.'); - } - - return true; - } - - /** - * @inheritdoc - */ - public function run() - { - $arguments = $this->getArguments(); - $em = $this->getConfiguration()->getAttribute('em'); - $query = $em->createQuery($arguments['dql']); - - $hydrationMode = isset($arguments['hydrate']) - ? constant('Doctrine\ORM\Query::HYDRATE_' . strtoupper(str_replace('-', '_', $arguments['hydrate']))) - : Query::HYDRATE_OBJECT; - - if (isset($arguments['first-result'])) { - $query->setFirstResult($arguments['first-result']); - } - - if (isset($arguments['max-results'])) { - $query->setMaxResults($arguments['max-results']); - } - - $resultSet = $query->getResult($hydrationMode); - $maxDepth = isset($arguments['depth']) ? $arguments['depth'] : 7; - - Debug::dump($resultSet, $maxDepth); - } -} \ No newline at end of file diff --git a/lib/Doctrine/ORM/Tools/CLI/Tasks/SchemaToolTask.php b/lib/Doctrine/ORM/Tools/CLI/Tasks/SchemaToolTask.php deleted file mode 100644 index 3564a8b01..000000000 --- a/lib/Doctrine/ORM/Tools/CLI/Tasks/SchemaToolTask.php +++ /dev/null @@ -1,224 +0,0 @@ ---class-dir= - * Specifies the directory where to start looking for mapped classes. - * This argument is required when the annotation metadata driver is used, - * otherwise it has no effect. - * - * --dump-sql - * Specifies that instead of directly executing the SQL statements, - * they should be printed to the standard output. - * - * --create - * Specifies that the schema of the classes should be created. - * - * --drop - * Specifies that the schema of the classes should be dropped. - * - * --update - * Specifies that the schema of the classes should be updated. - * - * - * @license http://www.opensource.org/licenses/lgpl-license.php LGPL - * @link www.doctrine-project.org - * @since 2.0 - * @version $Revision: 3938 $ - * @author Guilherme Blanco - * @author Jonathan Wage - * @author Roman Borschel - */ -class SchemaToolTask extends AbstractTask -{ - /** - * @inheritdoc - */ - public function buildDocumentation() - { - $schemaOption = new OptionGroup(OptionGroup::CARDINALITY_1_1, array( - new Option( - 'create', null, - 'Creates the schema in EntityManager (create tables on Database).' . PHP_EOL . - 'If defined, --drop, --update and --re-create can not be requested on same task.' - ), - new Option( - 'drop', null, - 'Drops the schema of EntityManager (drop tables on Database).' . PHP_EOL . - 'Beware that the complete database is dropped by this command, '.PHP_EOL. - 'even tables that are not relevant to your metadata model.' . PHP_EOL . - 'If defined, --create, --update and --re-create can not be requested on same task.' - ), - new Option( - 'update', null, - 'Updates the schema in EntityManager (update tables on Database).' . PHP_EOL . - 'This command does a save update, which does not delete any tables, sequences or affected foreign keys.' . PHP_EOL . - 'If defined, --create, --drop and --complete-update --re-create can not be requested on same task.' - ), - new Option( - 'complete-update', null, - 'Updates the schema in EntityManager (update tables on Database).' . PHP_EOL . - 'Beware that all assets of the database which are not relevant to the current metadata are dropped by this command.'.PHP_EOL. - 'If defined, --create, --drop and --update --re-create can not be requested on same task.' - ), - new Option( - 're-create', null, - 'Runs --drop then --create to re-create the database.' . PHP_EOL . - 'If defined, --create, --update and --drop can not be requested on same task.' - ) - )); - - $optionalOptions = new OptionGroup(OptionGroup::CARDINALITY_0_N, array( - new Option('dump-sql', null, 'Instead of try to apply generated SQLs into EntityManager, output them.'), - new Option('class-dir', '', 'Optional class directory to fetch for Entities.') - )); - - $doc = $this->getDocumentation(); - $doc->setName('schema-tool') - ->setDescription('Processes the schema and either apply it directly on EntityManager or generate the SQL output.') - ->getOptionGroup() - ->addOption($schemaOption) - ->addOption($optionalOptions); - } - - /** - * @inheritdoc - */ - public function validate() - { - $arguments = $this->getArguments(); - $em = $this->getConfiguration()->getAttribute('em'); - - if ($em === null) { - throw new CLIException( - "Attribute 'em' of CLI Configuration is not defined or it is not a valid EntityManager." - ); - } - - if (isset($arguments['re-create'])) { - $arguments['drop'] = true; - $arguments['create'] = true; - - unset($arguments['re-create']); - - $this->setArguments($arguments); - } - - $isCreate = isset($arguments['create']) && $arguments['create']; - $isDrop = isset($arguments['drop']) && $arguments['drop']; - $isUpdate = isset($arguments['update']) && $arguments['update']; - $isCompleteUpdate = isset($arguments['complete-update']) && $arguments['complete-update']; - - if ($isUpdate && ($isCreate || $isDrop || $isCompleteUpdate)) { - throw new CLIException( - 'You cannot use --update with --create, --drop or --complete-update.' - ); - } - - if ($isCompleteUpdate && ($isCreate || $isDrop || $isUpdate)) { - throw new CLIException('You cannot use --complete-update with --create, --drop or --update.'); - } - - if ( ! ($isCreate || $isDrop || $isUpdate || $isCompleteUpdate)) { - throw new CLIException( - 'You must specify at a minimum one of the options: ' . - '--create, --drop, --update, --re-create or --complete-update.' - ); - } - - $metadataDriver = $em->getConfiguration()->getMetadataDriverImpl(); - - if ($metadataDriver instanceof \Doctrine\ORM\Mapping\Driver\AnnotationDriver) { - if (isset($arguments['class-dir'])) { - $metadataDriver->addPaths((array) $arguments['class-dir']); - } else { - throw new CLIException( - 'The supplied configuration uses the annotation metadata driver. ' . - "The 'class-dir' argument is required for this driver." - ); - } - } - - return true; - } - - /** - * @inheritdoc - */ - public function run() - { - $arguments = $this->getArguments(); - $printer = $this->getPrinter(); - - $isCreate = isset($arguments['create']) && $arguments['create']; - $isDrop = isset($arguments['drop']) && $arguments['drop']; - $isUpdate = isset($arguments['update']) && $arguments['update']; - $isCompleteUpdate = isset($arguments['complete-update']) && $arguments['complete-update']; - - $em = $this->getConfiguration()->getAttribute('em'); - - $cmf = $em->getMetadataFactory(); - $classes = $cmf->getAllMetadata(); - - if (empty($classes)) { - $printer->writeln('No classes to process.', 'INFO'); - - return; - } - - $tool = new SchemaTool($em); - - if ($isDrop) { - if (isset($arguments['dump-sql'])) { - foreach ($tool->getDropSchemaSql($classes) as $sql) { - $printer->writeln($sql . ";"); - } - } else { - $printer->writeln('Dropping database schema...', 'INFO'); - $tool->dropSchema($classes); - $printer->writeln('Database schema dropped successfully.', 'INFO'); - } - } - - if ($isCreate) { - if (isset($arguments['dump-sql'])) { - foreach ($tool->getCreateSchemaSql($classes) as $sql) { - $printer->writeln($sql . ";"); - } - } else { - $printer->writeln('Creating database schema...', 'INFO'); - $tool->createSchema($classes); - $printer->writeln('Database schema created successfully.', 'INFO'); - } - } - - if ($isUpdate || $isCompleteUpdate) { - $saveMode = $isUpdate ? true : false; - - if (isset($arguments['dump-sql'])) { - foreach ($tool->getUpdateSchemaSql($classes, $saveMode) as $sql) { - $printer->writeln($sql . ";"); - } - } else { - $printer->writeln('Updating database schema...', 'INFO'); - $tool->updateSchema($classes, $saveMode); - $printer->writeln('Database schema updated successfully.', 'INFO'); - } - } - } -} \ No newline at end of file diff --git a/lib/Doctrine/ORM/Tools/CLI/Tasks/VersionTask.php b/lib/Doctrine/ORM/Tools/CLI/Tasks/VersionTask.php deleted file mode 100644 index e43f5128b..000000000 --- a/lib/Doctrine/ORM/Tools/CLI/Tasks/VersionTask.php +++ /dev/null @@ -1,62 +0,0 @@ -. - */ - -namespace Doctrine\ORM\Tools\CLI\Tasks; - -use Doctrine\Common\CLI\Tasks\AbstractTask, - Doctrine\Common\Version; - -/** - * CLI Task to display the doctrine version - * - * @license http://www.opensource.org/licenses/lgpl-license.php LGPL - * @link www.doctrine-project.org - * @since 2.0 - * @version $Revision$ - * @author Benjamin Eberlei - * @author Guilherme Blanco - * @author Jonathan Wage - * @author Roman Borschel - */ -class VersionTask extends AbstractTask -{ - /** - * @inheritdoc - */ - public function buildDocumentation() - { - // There're no options on this task - $this->getDocumentation()->getOptionGroup()->clear(); - - $doc = $this->getDocumentation(); - $doc->setName('version') - ->setDescription('Displays the current installed Doctrine version.'); - } - - /** - * Displays the current version of Doctrine - * - */ - public function run() - { - $this->getPrinter()->writeln('You are currently running Doctrine ' . Version::VERSION, 'INFO'); - } -} \ No newline at end of file From 5854bcab11ed8101d0f3c7e798fd669f17abab38 Mon Sep 17 00:00:00 2001 From: Guilherme Blanco Date: Thu, 8 Apr 2010 00:47:42 -0300 Subject: [PATCH 04/86] [2.0] Added new Console support --- .../Tools/Console/Command/ImportCommand.php | 127 +++++++++++++ .../Tools/Console/Command/RunSqlCommand.php | 87 +++++++++ .../Tools/Console/Helper/ConnectionHelper.php | 74 ++++++++ .../Command/ClearCache/MetadataCommand.php | 81 +++++++++ .../Command/ClearCache/QueryCommand.php | 81 +++++++++ .../Command/ClearCache/ResultCommand.php | 164 +++++++++++++++++ .../Command/ConvertDoctrine1SchemaCommand.php | 154 ++++++++++++++++ .../Console/Command/ConvertMappingCommand.php | 165 +++++++++++++++++ .../EnsureProductionSettingsCommand.php | 76 ++++++++ .../Command/GenerateEntitiesCommand.php | 167 +++++++++++++++++ .../Command/GenerateProxiesCommand.php | 136 ++++++++++++++ .../Command/GenerateRepositoriesCommand.php | 171 ++++++++++++++++++ .../Tools/Console/Command/RunDqlCommand.php | 124 +++++++++++++ .../Command/SchemaTool/CreateCommand.php | 120 ++++++++++++ .../Command/SchemaTool/DropCommand.php | 121 +++++++++++++ .../Command/SchemaTool/UpdateCommand.php | 129 +++++++++++++ .../Console/Helper/EntityManagerHelper.php | 74 ++++++++ .../ORM/Tools/ConvertDoctrine1Schema.php | 2 +- lib/Doctrine/ORM/Tools/SchemaTool.php | 15 +- tools/sandbox/cli-config.php | 9 +- tools/sandbox/doctrine.php | 32 +++- 21 files changed, 2087 insertions(+), 22 deletions(-) create mode 100644 lib/Doctrine/DBAL/Tools/Console/Command/ImportCommand.php create mode 100644 lib/Doctrine/DBAL/Tools/Console/Command/RunSqlCommand.php create mode 100644 lib/Doctrine/DBAL/Tools/Console/Helper/ConnectionHelper.php create mode 100644 lib/Doctrine/ORM/Tools/Console/Command/ClearCache/MetadataCommand.php create mode 100644 lib/Doctrine/ORM/Tools/Console/Command/ClearCache/QueryCommand.php create mode 100644 lib/Doctrine/ORM/Tools/Console/Command/ClearCache/ResultCommand.php create mode 100644 lib/Doctrine/ORM/Tools/Console/Command/ConvertDoctrine1SchemaCommand.php create mode 100644 lib/Doctrine/ORM/Tools/Console/Command/ConvertMappingCommand.php create mode 100644 lib/Doctrine/ORM/Tools/Console/Command/EnsureProductionSettingsCommand.php create mode 100644 lib/Doctrine/ORM/Tools/Console/Command/GenerateEntitiesCommand.php create mode 100644 lib/Doctrine/ORM/Tools/Console/Command/GenerateProxiesCommand.php create mode 100644 lib/Doctrine/ORM/Tools/Console/Command/GenerateRepositoriesCommand.php create mode 100644 lib/Doctrine/ORM/Tools/Console/Command/RunDqlCommand.php create mode 100644 lib/Doctrine/ORM/Tools/Console/Command/SchemaTool/CreateCommand.php create mode 100644 lib/Doctrine/ORM/Tools/Console/Command/SchemaTool/DropCommand.php create mode 100644 lib/Doctrine/ORM/Tools/Console/Command/SchemaTool/UpdateCommand.php create mode 100644 lib/Doctrine/ORM/Tools/Console/Helper/EntityManagerHelper.php diff --git a/lib/Doctrine/DBAL/Tools/Console/Command/ImportCommand.php b/lib/Doctrine/DBAL/Tools/Console/Command/ImportCommand.php new file mode 100644 index 000000000..8c3dd2b76 --- /dev/null +++ b/lib/Doctrine/DBAL/Tools/Console/Command/ImportCommand.php @@ -0,0 +1,127 @@ +. + */ + +namespace Doctrine\DBAL\Tools\Console\Command; + +use Symfony\Components\Console\Input\InputArgument, + Symfony\Components\Console; + +/** + * Task for executing arbitrary SQL that can come from a file or directly from + * the command line. + * + * @license http://www.opensource.org/licenses/lgpl-license.php LGPL + * @link www.doctrine-project.org + * @since 2.0 + * @version $Revision$ + * @author Benjamin Eberlei + * @author Guilherme Blanco + * @author Jonathan Wage + * @author Roman Borschel + */ +class ImportCommand extends Console\Command\Command +{ + /** + * @see Console\Command\Command + */ + protected function configure() + { + $this + ->setName('dbal:import') + ->setDescription('Import SQL file(s) directly to Database.') + ->setDefinition(array( + new InputArgument( + 'file', InputArgument::REQUIRED | InputArgument::IS_ARRAY, 'File path(s) of SQL to be executed.' + ) + )) + ->setHelp(<<getHelper('db')->getConnection(); + + if (($fileNames = $input->getArgument('file')) !== null) { + foreach ((array) $fileNames as $fileName) { + $fileName = realpath($fileName); + + if ( ! file_exists($fileName)) { + throw new \InvalidArgumentException( + sprintf("SQL file '%s' does not exist.", $fileName) + ); + } else if ( ! is_readable($fileName)) { + throw new \InvalidArgumentException( + sprintf("SQL file '%s' does not have read permissions.", $fileName) + ); + } + + $output->write(sprintf("Processing file '%s'... ", $fileName)); + $sql = file_get_contents($fileName); + + if ($conn instanceof \Doctrine\DBAL\Driver\PDOConnection) { + // PDO Drivers + try { + $lines = 0; + + $stmt = $conn->prepare($sql); + $stmt->execute(); + + do { + // Required due to "MySQL has gone away!" issue + $stmt->fetch(); + $stmt->closeCursor(); + + $lines++; + } while ($stmt->nextRowset()); + + $output->write(sprintf('%d statements executed!', $lines) . PHP_EOL); + } catch (\PDOException $e) { + $output->write('error!' . PHP_EOL); + + throw new \RuntimeException($e->getMessage(), $e->getCode(), $e); + } + } else { + // Non-PDO Drivers (ie. OCI8 driver) + $stmt = $conn->prepare($sql); + $rs = $stmt->execute(); + + if ($rs) { + $printer->writeln('OK!'); + } else { + $error = $stmt->errorInfo(); + + $output->write('error!' . PHP_EOL); + + throw new \RuntimeException($error[2], $error[0]); + } + + $stmt->closeCursor(); + } + } + } + } +} \ No newline at end of file diff --git a/lib/Doctrine/DBAL/Tools/Console/Command/RunSqlCommand.php b/lib/Doctrine/DBAL/Tools/Console/Command/RunSqlCommand.php new file mode 100644 index 000000000..6c5ee824e --- /dev/null +++ b/lib/Doctrine/DBAL/Tools/Console/Command/RunSqlCommand.php @@ -0,0 +1,87 @@ +. + */ + +namespace Doctrine\DBAL\Tools\Console\Command; + +use Symfony\Components\Console\Input\InputArgument, + Symfony\Components\Console\Input\InputOption, + Symfony\Components\Console; + +/** + * Task for executing arbitrary SQL that can come from a file or directly from + * the command line. + * + * @license http://www.opensource.org/licenses/lgpl-license.php LGPL + * @link www.doctrine-project.org + * @since 2.0 + * @version $Revision$ + * @author Benjamin Eberlei + * @author Guilherme Blanco + * @author Jonathan Wage + * @author Roman Borschel + */ +class RunSqlCommand extends Console\Command\Command +{ + /** + * @see Console\Command\Command + */ + protected function configure() + { + $this + ->setName('dbal:run-sql') + ->setDescription('Executes arbitrary SQL directly from the command line.') + ->setDefinition(array( + new InputArgument('sql', InputArgument::REQUIRED, 'The SQL statement to execute.'), + new InputOption('depth', null, InputOption::PARAMETER_REQUIRED, 'Dumping depth of result set.', 7) + )) + ->setHelp(<<getHelper('db')->getConnection(); + + if (($sql = $input->getArgument('sql')) === null) { + throw new \RuntimeException("Argument 'SQL' is required in order to execute this command correctly."); + } + + $depth = $input->getOption('depth'); + + if ( ! is_numeric($depth)) { + throw new \LogicException("Option 'depth' must contains an integer value"); + } + + if (preg_match('/^select/i', $sql)) { + $stmt = $conn->execute($sql); + $resultSet = $stmt->fetchAll(\Doctrine\DBAL\Connection::FETCH_ASSOC); + } else { + $resultSet = $em->getConnection()->executeUpdate($sql); + } + + \Doctrine\Common\Util\Debug::dump($resultSet, (int) $depth); + } +} \ No newline at end of file diff --git a/lib/Doctrine/DBAL/Tools/Console/Helper/ConnectionHelper.php b/lib/Doctrine/DBAL/Tools/Console/Helper/ConnectionHelper.php new file mode 100644 index 000000000..bcf6f8d97 --- /dev/null +++ b/lib/Doctrine/DBAL/Tools/Console/Helper/ConnectionHelper.php @@ -0,0 +1,74 @@ +. + */ + +namespace Doctrine\DBAL\Tools\Console\Helper; + +use Symfony\Components\Console\Helper\Helper, + Doctrine\DBAL\Connection; + +/** + * Doctrine CLI Connection Helper. + * + * @license http://www.opensource.org/licenses/lgpl-license.php LGPL + * @link www.doctrine-project.org + * @since 2.0 + * @version $Revision$ + * @author Benjamin Eberlei + * @author Guilherme Blanco + * @author Jonathan Wage + * @author Roman Borschel + */ +class ConnectionHelper extends Helper +{ + /** + * Doctrine Database Connection + * @var Connection + */ + protected $_connection; + + /** + * Constructor + * + * @param Connection $connection Doctrine Database Connection + */ + public function __construct(Connection $connection) + { + $this->_connection = $connection; + } + + /** + * Retrieves Doctrine Database Connection + * + * @return Connection + */ + public function getConnection() + { + return $this->_connection; + } + + /** + * @see Helper + */ + public function getName() + { + return 'connection'; + } +} \ No newline at end of file diff --git a/lib/Doctrine/ORM/Tools/Console/Command/ClearCache/MetadataCommand.php b/lib/Doctrine/ORM/Tools/Console/Command/ClearCache/MetadataCommand.php new file mode 100644 index 000000000..711bffd2d --- /dev/null +++ b/lib/Doctrine/ORM/Tools/Console/Command/ClearCache/MetadataCommand.php @@ -0,0 +1,81 @@ +. + */ + +namespace Doctrine\ORM\Tools\Console\Command\ClearCache; + +use Symfony\Components\Console\Input\InputArgument, + Symfony\Components\Console\Input\InputOption, + Symfony\Components\Console; + +/** + * Command to clear the metadata cache of the various cache drivers. + * + * @license http://www.opensource.org/licenses/lgpl-license.php LGPL + * @link www.doctrine-project.org + * @since 2.0 + * @version $Revision$ + * @author Benjamin Eberlei + * @author Guilherme Blanco + * @author Jonathan Wage + * @author Roman Borschel + */ +class MetadataCommand extends Console\Command\Command +{ + /** + * @see Console\Command\Command + */ + protected function configure() + { + $this + ->setName('orm:clear-cache:metadata') + ->setDescription('Clear all metadata cache of the various cache drivers.') + ->setDefinition(array()) + ->setHelp(<<getHelper('em')->getEntityManager(); + $cacheDriver = $em->getConfiguration()->getMetadataCacheImpl(); + + if ( ! $cacheDriver) { + throw new \InvalidArgumentException('No Metadata cache driver is configured on given EntityManager.'); + } + + $output->write('Clearing ALL Metadata cache entries' . PHP_EOL); + + $cacheIds = $cacheDriver->deleteAll(); + + if ($cacheIds) { + foreach ($cacheIds as $cacheId) { + $output->write(' - ' . $cacheId . PHP_EOL); + } + } else { + $output->write('No entries to be deleted.' . PHP_EOL); + } + } +} \ No newline at end of file diff --git a/lib/Doctrine/ORM/Tools/Console/Command/ClearCache/QueryCommand.php b/lib/Doctrine/ORM/Tools/Console/Command/ClearCache/QueryCommand.php new file mode 100644 index 000000000..b16fec3eb --- /dev/null +++ b/lib/Doctrine/ORM/Tools/Console/Command/ClearCache/QueryCommand.php @@ -0,0 +1,81 @@ +. + */ + +namespace Doctrine\ORM\Tools\Console\Command\ClearCache; + +use Symfony\Components\Console\Input\InputArgument, + Symfony\Components\Console\Input\InputOption, + Symfony\Components\Console; + +/** + * Command to clear the query cache of the various cache drivers. + * + * @license http://www.opensource.org/licenses/lgpl-license.php LGPL + * @link www.doctrine-project.org + * @since 2.0 + * @version $Revision$ + * @author Benjamin Eberlei + * @author Guilherme Blanco + * @author Jonathan Wage + * @author Roman Borschel + */ +class QueryCommand extends Console\Command\Command +{ + /** + * @see Console\Command\Command + */ + protected function configure() + { + $this + ->setName('orm:clear-cache:query') + ->setDescription('Clear all query cache of the various cache drivers.') + ->setDefinition(array()) + ->setHelp(<<getHelper('em')->getEntityManager(); + $cacheDriver = $em->getConfiguration()->getQueryCacheImpl(); + + if ( ! $cacheDriver) { + throw new \InvalidArgumentException('No Query cache driver is configured on given EntityManager.'); + } + + $output->write('Clearing ALL Query cache entries' . PHP_EOL); + + $cacheIds = $cacheDriver->deleteAll(); + + if ($cacheIds) { + foreach ($cacheIds as $cacheId) { + $output->write(' - ' . $cacheId . PHP_EOL); + } + } else { + $output->write('No entries to be deleted.' . PHP_EOL); + } + } +} \ No newline at end of file diff --git a/lib/Doctrine/ORM/Tools/Console/Command/ClearCache/ResultCommand.php b/lib/Doctrine/ORM/Tools/Console/Command/ClearCache/ResultCommand.php new file mode 100644 index 000000000..947cac9fb --- /dev/null +++ b/lib/Doctrine/ORM/Tools/Console/Command/ClearCache/ResultCommand.php @@ -0,0 +1,164 @@ +. + */ + +namespace Doctrine\ORM\Tools\Console\Command\ClearCache; + +use Symfony\Components\Console\Input\InputArgument, + Symfony\Components\Console\Input\InputOption, + Symfony\Components\Console; + +/** + * Command to clear the result cache of the various cache drivers. + * + * @license http://www.opensource.org/licenses/lgpl-license.php LGPL + * @link www.doctrine-project.org + * @since 2.0 + * @version $Revision$ + * @author Benjamin Eberlei + * @author Guilherme Blanco + * @author Jonathan Wage + * @author Roman Borschel + */ +class ResultCommand extends Console\Command\Command +{ + /** + * @see Console\Command\Command + */ + protected function configure() + { + $this + ->setName('orm:clear-cache:result') + ->setDescription('Clear result cache of the various cache drivers.') + ->setDefinition(array( + new InputOption( + 'id', null, InputOption::PARAMETER_REQUIRED | InputOption::PARAMETER_IS_ARRAY, + 'ID(s) of the cache entry to delete (accepts * wildcards).', array() + ), + new InputOption( + 'regex', null, InputOption::PARAMETER_REQUIRED | InputOption::PARAMETER_IS_ARRAY, + 'Delete cache entries that match the given regular expression(s).', array() + ), + new InputOption( + 'prefix', null, InputOption::PARAMETER_REQUIRED | InputOption::PARAMETER_IS_ARRAY, + 'Delete cache entries that have the given prefix(es).', array() + ), + new InputOption( + 'suffix', null, InputOption::PARAMETER_REQUIRED | InputOption::PARAMETER_IS_ARRAY, + 'Delete cache entries that have the given suffix(es).', array() + ), + )) + ->setHelp(<<getHelper('em')->getEntityManager(); + $cacheDriver = $em->getConfiguration()->getResultCacheImpl(); + + if ( ! $cacheDriver) { + throw new \InvalidArgumentException('No Result cache driver is configured on given EntityManager.'); + } + + $outputed = false; + + // Removing based on --id + if (($ids = $input->getOption('id')) !== null && $ids) { + foreach ($ids as $id) { + $output->write($outputed ? PHP_EOL : ''); + $output->write(sprintf('Clearing Result cache entries that match the id "%s"', $id) . PHP_EOL); + + $deleted = $cacheDriver->delete($id); + + if (is_array($deleted)) { + $this->_printDeleted($deleted); + } else if (is_bool($deleted) && $deleted) { + $this->_printDeleted(array($id)); + } + + $outputed = true; + } + } + + // Removing based on --regex + if (($regex = $input->getOption('regex')) !== null && $regexps) { + foreach($regexps as $regex) { + $output->write($outputed ? PHP_EOL : ''); + $output->write(sprintf('Clearing Result cache entries that match the regular expression "%s"', $regex) . PHP_EOL); + + $this->_printDeleted($cacheDriver->deleteByRegex('/' . $regex. '/')); + + $outputed = true; + } + } + + // Removing based on --prefix + if (($prefixes = $input->getOption('prefix')) !== null & $prefixes) { + foreach ($prefixes as $prefix) { + $output->write($outputed ? PHP_EOL : ''); + $output->write(sprintf('Clearing Result cache entries that have the prefix "%s"', $prefix) . PHP_EOL); + + $this->_printDeleted($cacheDriver->deleteByPrefix($prefix)); + + $outputed = true; + } + } + + // Removing based on --suffix + if (($suffixes = $input->getOption('suffix')) !== null && $suffixes) { + foreach ($suffixes as $suffix) { + $output->write($outputed ? PHP_EOL : ''); + $output->write(sprintf('Clearing Result cache entries that have the suffix "%s"', $suffix) . PHP_EOL); + + $this->_printDeleted($cacheDriver->deleteBySuffix($suffix)); + + $outputed = true; + } + } + + // Removing ALL entries + if ( ! $ids && ! $regexps && ! $prefixes && ! $suffixes) { + $output->write($outputed ? PHP_EOL : ''); + $output->write('Clearing ALL Result cache entries'); + + $this->_printDeleted($cacheDriver->deleteAll()); + + $outputed = true; + } + } + + private function _printDeleted(Console\Output\OutputInterface $output, array $items) + { + if ($items) { + foreach ($items as $item) { + $output->write(' - ' . $item . PHP_EOL); + } + } else { + $output->write('No entries to be deleted.' . PHP_EOL); + } + } +} \ No newline at end of file diff --git a/lib/Doctrine/ORM/Tools/Console/Command/ConvertDoctrine1SchemaCommand.php b/lib/Doctrine/ORM/Tools/Console/Command/ConvertDoctrine1SchemaCommand.php new file mode 100644 index 000000000..48ce45fb0 --- /dev/null +++ b/lib/Doctrine/ORM/Tools/Console/Command/ConvertDoctrine1SchemaCommand.php @@ -0,0 +1,154 @@ +. + */ + +namespace Doctrine\ORM\Tools\Console\Command; + +use Symfony\Components\Console\Input\InputArgument, + Symfony\Components\Console\Input\InputOption, + Symfony\Components\Console; + +/** + * Command to convert a Doctrine 1 schema to a Doctrine 2 mapping file. + * + * @license http://www.opensource.org/licenses/lgpl-license.php LGPL + * @link www.doctrine-project.org + * @since 2.0 + * @version $Revision$ + * @author Benjamin Eberlei + * @author Guilherme Blanco + * @author Jonathan Wage + * @author Roman Borschel + */ +class ConvertDoctrine1SchemaCommand extends Console\Command\Command +{ + /** + * @see Console\Command\Command + */ + protected function configure() + { + $this + ->setName('orm:convert-d1-schema') + ->setDescription('Converts Doctrine 1.X schema into a Doctrine 2.X schema.') + ->setDefinition(array( + new InputArgument( + 'from-path', InputArgument::REQUIRED, 'The path of Doctrine 1.X schema information.' + ), + new InputArgument( + 'to-type', InputArgument::REQUIRED, 'The destination Doctrine 2.X mapping type.' + ), + new InputArgument( + 'dest-path', InputArgument::REQUIRED, + 'The path to generate your Doctrine 2.X mapping information.' + ), + new InputOption( + 'from', null, InputOption::PARAMETER_REQUIRED | InputOption::PARAMETER_IS_ARRAY, + 'Optional paths of Doctrine 1.X schema information.', + array() + ), + new InputOption( + 'extend', null, InputOption::PARAMETER_OPTIONAL, + 'Defines a base class to be extended by generated entity classes.' + ), + new InputOption( + 'num-spaces', null, InputOption::PARAMETER_OPTIONAL, + 'Defines the number of indentation spaces', 4 + ) + )) + ->setHelp(<<getHelper('em')->getEntityManager(); + + // Process source directories + $fromPaths = array_merge(array($input->getArgument('from-path')), $input->getOption('from')); + + foreach ($fromPaths as &$dirName) { + $dirName = realpath($dirName); + + if ( ! file_exists($dirName)) { + throw new \InvalidArgumentException( + sprintf("Doctrine 1.X schema directory '%s' does not exist.", $dirName) + ); + } else if ( ! is_readable($dirName)) { + throw new \InvalidArgumentException( + sprintf("Doctrine 1.X schema directory '%s' does not have read permissions.", $dirName) + ); + } + } + + // Process destination directory + $destPath = realpath($input->getArgument('dest-path')); + + if ( ! file_exists($destPath)) { + throw new \InvalidArgumentException( + sprintf("Doctrine 2.X mapping destination directory '%s' does not exist.", $destPath) + ); + } else if ( ! is_writable($destPath)) { + throw new \InvalidArgumentException( + sprintf("Doctrine 2.X mapping destination directory '%s' does not have write permissions.", $destPath) + ); + } + + $toType = $input->getArgument('to-type'); + + $cme = new ClassMetadataExporter(); + $exporter = $cme->getExporter($toType, $destPath); + + if (strtolower($toType) === 'annotation') { + $entityGenerator = new EntityGenerator(); + $exporter->setEntityGenerator($entityGenerator); + + $entityGenerator->setNumSpaces($input->getOption('num-spaces')); + + if (($extend = $input->getOption('extend')) !== null) { + $entityGenerator->setClassToExtend($extend); + } + } + + $converter = new ConvertDoctrine1Schema($fromPaths); + $metadatas = $converter->getMetadatas(); + + if ($metadatas) { + $output->write(PHP_EOL); + + foreach ($metadatas as $metadata) { + $output->write(sprintf('Processing entity "%s"', $metadata->name) . PHP_EOL); + } + + $exporter->setMetadatas($metadatas); + $exporter->export(); + + $output->write(PHP_EOL . sprintf( + 'Converting Doctrine 1.X schema to "%s" mapping type in "%s"', $toType, $destPath + )); + } else { + $output->write('No Metadata Classes to process.' . PHP_EOL); + } + } +} \ No newline at end of file diff --git a/lib/Doctrine/ORM/Tools/Console/Command/ConvertMappingCommand.php b/lib/Doctrine/ORM/Tools/Console/Command/ConvertMappingCommand.php new file mode 100644 index 000000000..45bc79714 --- /dev/null +++ b/lib/Doctrine/ORM/Tools/Console/Command/ConvertMappingCommand.php @@ -0,0 +1,165 @@ +. + */ + +namespace Doctrine\ORM\Tools\Console\Command; + +use Symfony\Components\Console\Input\InputArgument, + Symfony\Components\Console\Input\InputOption, + Symfony\Components\Console; + +/** + * Command to convert your mapping information between the various formats. + * + * @license http://www.opensource.org/licenses/lgpl-license.php LGPL + * @link www.doctrine-project.org + * @since 2.0 + * @version $Revision$ + * @author Benjamin Eberlei + * @author Guilherme Blanco + * @author Jonathan Wage + * @author Roman Borschel + */ +class ConvertMappingCommand extends Console\Command\Command +{ + /** + * @see Console\Command\Command + */ + protected function configure() + { + $this + ->setName('orm:convert-mapping') + ->setDescription('Convert mapping information between supported formats.') + ->setDefinition(array( + new InputArgument( + 'from-path', InputArgument::REQUIRED, 'The path of mapping information.' + ), + new InputArgument( + 'to-type', InputArgument::REQUIRED, 'The mapping type to be converted.' + ), + new InputArgument( + 'dest-path', InputArgument::REQUIRED, + 'The path to generate your entities classes.' + ), + new InputOption( + 'from', null, InputOption::PARAMETER_REQUIRED | InputOption::PARAMETER_IS_ARRAY, + 'Optional paths of mapping information.', + array() + ), + new InputOption( + 'extend', null, InputOption::PARAMETER_OPTIONAL, + 'Defines a base class to be extended by generated entity classes.' + ), + new InputOption( + 'num-spaces', null, InputOption::PARAMETER_OPTIONAL, + 'Defines the number of indentation spaces', 4 + ) + )) + ->setHelp(<<getHelper('em')->getEntityManager(); + $cme = new ClassMetadataExporter(); + + // Process source directories + $fromPath = $input->getArgument('from-path'); + + if (strtolower($fromPath) !== 'database') { + $fromPaths = array_merge(array($fromPath), $input->getOption('from')); + + foreach ($fromPaths as &$dirName) { + $dirName = realpath($dirName); + + if ( ! file_exists($dirName)) { + throw new \InvalidArgumentException( + sprintf("Mapping directory '%s' does not exist.", $dirName) + ); + } else if ( ! is_readable($dirName)) { + throw new \InvalidArgumentException( + sprintf("Mapping directory '%s' does not have read permissions.", $dirName) + ); + } + + $cme->addMappingSource($dirName); + } + } else { + $em->getConfiguration()->setMetadataDriverImpl( + new \Doctrine\ORM\Mapping\Driver\DatabaseDriver( + $em->getConnection()->getSchemaManager() + ) + ); + + $cme->addMappingSource($fromPath); + } + + // Process destination directory + $destPath = realpath($input->getArgument('dest-path')); + + if ( ! file_exists($destPath)) { + throw new \InvalidArgumentException( + sprintf("Mapping destination directory '%s' does not exist.", $destPath) + ); + } else if ( ! is_writable($destPath)) { + throw new \InvalidArgumentException( + sprintf("Mapping destination directory '%s' does not have write permissions.", $destPath) + ); + } + + $toType = strtolower($input->getArgument('to-type')); + + $exporter = $cme->getExporter($toType, $destPath); + + if ($toType == 'annotation') { + $entityGenerator = new EntityGenerator(); + $exporter->setEntityGenerator($entityGenerator); + + $entityGenerator->setNumSpaces($input->getOption('num-spaces')); + + if (($extend = $input->getOption('extend')) !== null) { + $entityGenerator->setClassToExtend($extend); + } + } + + $metadatas = $cme->getMetadatas(); + + if ($metadatas) { + foreach ($metadatas as $metadata) { + $output->write(sprintf('Processing entity "%s"', $metadata->name) . PHP_EOL); + } + + $exporter->setMetadatas($metadatas); + $exporter->export(); + + $output->write(PHP_EOL . sprintf( + 'Exporting "%s" mapping information to "%s"', $toType, $destPath + )); + } else { + $output->write('No Metadata Classes to process.' . PHP_EOL); + } + } +} \ No newline at end of file diff --git a/lib/Doctrine/ORM/Tools/Console/Command/EnsureProductionSettingsCommand.php b/lib/Doctrine/ORM/Tools/Console/Command/EnsureProductionSettingsCommand.php new file mode 100644 index 000000000..44cdd5688 --- /dev/null +++ b/lib/Doctrine/ORM/Tools/Console/Command/EnsureProductionSettingsCommand.php @@ -0,0 +1,76 @@ +. + */ + +namespace Doctrine\ORM\Tools\Console\Command; + +use Symfony\Components\Console\Input\InputArgument, + Symfony\Components\Console\Input\InputOption, + Symfony\Components\Console; + +/** + * Command to ensure that Doctrine is properly configured for a production environment. + * + * @license http://www.opensource.org/licenses/lgpl-license.php LGPL + * @link www.doctrine-project.org + * @since 2.0 + * @version $Revision$ + * @author Benjamin Eberlei + * @author Guilherme Blanco + * @author Jonathan Wage + * @author Roman Borschel + */ +class EnsureProductionSettingsCommand extends Console\Command\Command +{ + /** + * @see Console\Command\Command + */ + protected function configure() + { + $this + ->setName('orm:ensure-production-settings') + ->setDescription('Verify that Doctrine is properly configured for a production environment.') + ->setDefinition(array( + new InputOption( + 'complete', null, InputOption::PARAMETER_NONE, + 'Flag to also inspect database connection existance.' + ) + )) + ->setHelp(<<getHelper('em')->getEntityManager(); + $em->getConfiguration()->ensureProductionSettings(); + + if ($input->getOption('complete') !== null) { + $em->getConnection()->connect(); + } + + $output->write('Environment is correctly configured for production.'); + } +} \ No newline at end of file diff --git a/lib/Doctrine/ORM/Tools/Console/Command/GenerateEntitiesCommand.php b/lib/Doctrine/ORM/Tools/Console/Command/GenerateEntitiesCommand.php new file mode 100644 index 000000000..0cf0230dd --- /dev/null +++ b/lib/Doctrine/ORM/Tools/Console/Command/GenerateEntitiesCommand.php @@ -0,0 +1,167 @@ +. + */ + +namespace Doctrine\ORM\Tools\Console\Command; + +use Symfony\Components\Console\Input\InputArgument, + Symfony\Components\Console\Input\InputOption, + Symfony\Components\Console; + +/** + * Command to generate entity classes and method stubs from your mapping information. + * + * @license http://www.opensource.org/licenses/lgpl-license.php LGPL + * @link www.doctrine-project.org + * @since 2.0 + * @version $Revision$ + * @author Benjamin Eberlei + * @author Guilherme Blanco + * @author Jonathan Wage + * @author Roman Borschel + */ +class GenerateEntitiesCommand extends Console\Command\Command +{ + /** + * @see Console\Command\Command + */ + protected function configure() + { + $this + ->setName('orm:generate-entities') + ->setDescription('Generate entity classes and method stubs from your mapping information.') + ->setDefinition(array( + new InputArgument( + 'from-path', InputArgument::REQUIRED, 'The path of mapping information.' + ), + new InputArgument( + 'dest-path', InputArgument::REQUIRED, 'The path to generate your entity classes.' + ), + new InputOption( + 'from', null, InputOption::PARAMETER_REQUIRED | InputOption::PARAMETER_IS_ARRAY, + 'Optional paths of mapping information.', + array() + ), + new InputOption( + 'generate-annotations', null, InputOption::PARAMETER_OPTIONAL, + 'Flag to define if generator should generate annotation metadata on entities.', false + ), + new InputOption( + 'generate-methods', null, InputOption::PARAMETER_OPTIONAL, + 'Flag to define if generator should generate stub methods on entities.', true + ), + new InputOption( + 'regenerate-entities', null, InputOption::PARAMETER_OPTIONAL, + 'Flag to define if generator should regenerate entity if it exists.', false + ), + new InputOption( + 'update-entities', null, InputOption::PARAMETER_OPTIONAL, + 'Flag to define if generator should only update entity if it exists.', true + ), + new InputOption( + 'extend', null, InputOption::PARAMETER_OPTIONAL, + 'Defines a base class to be extended by generated entity classes.' + ), + new InputOption( + 'num-spaces', null, InputOption::PARAMETER_OPTIONAL, + 'Defines the number of indentation spaces', 4 + ) + )) + ->setHelp(<<getHelper('em')->getEntityManager(); + + $reader = new ClassMetadataReader(); + $reader->setEntityManager($em); + + // Process source directories + $fromPaths = array_merge(array($input->getArgument('from-path')), $input->getOption('from')); + + foreach ($fromPaths as $dirName) { + $dirName = realpath($dirName); + + if ( ! file_exists($dirName)) { + throw new \InvalidArgumentException( + sprintf("Mapping directory '%s' does not exist.", $dirName) + ); + } else if ( ! is_readable($dirName)) { + throw new \InvalidArgumentException( + sprintf("Mapping directory '%s' does not have read permissions.", $dirName) + ); + } + + $reader->addMappingSource($dirName); + } + + // Process destination directory + $destPath = realpath($input->getArgument('dest-path')); + + if ( ! file_exists($destPath)) { + throw new \InvalidArgumentException( + sprintf("Entities destination directory '%s' does not exist.", $destPath) + ); + } else if ( ! is_writable($destPath)) { + throw new \InvalidArgumentException( + sprintf("Entities destination directory '%s' does not have write permissions.", $destPath) + ); + } + + // Create EntityGenerator + $entityGenerator = new EntityGenerator(); + + $entityGenerator->setGenerateAnnotations($input->getOption('generate-annotations')); + $entityGenerator->setGenerateStubMethods($input->getOption('generate-methods')); + $entityGenerator->setRegenerateEntityIfExists($input->getOption('regenerate-entities')); + $entityGenerator->setUpdateEntityIfExists($input->getOption('update-entities')); + $entityGenerator->setNumSpaces($input->getOption('num-spaces')); + + if (($extend = $input->getOption('extend')) !== null) { + $entityGenerator->setClassToExtend($extend); + } + + // Retrieving ClassMetadatas + $metadatas = $reader->getMetadatas(); + + if ( ! empty($metadatas)) { + foreach ($metadatas as $metadata) { + $output->write( + sprintf('Processing entity "%s"', $metadata->name) . PHP_EOL + ); + } + + // Generating Entities + $entityGenerator->generate($metadatas, $destPath); + + // Outputting information message + $output->write(PHP_EOL . sprintf('Entity classes generated to "%s"', $destPath) . PHP_EOL); + } else { + $output->write('No Metadata Classes to process.' . PHP_EOL); + } + } +} \ No newline at end of file diff --git a/lib/Doctrine/ORM/Tools/Console/Command/GenerateProxiesCommand.php b/lib/Doctrine/ORM/Tools/Console/Command/GenerateProxiesCommand.php new file mode 100644 index 000000000..4b6333b6f --- /dev/null +++ b/lib/Doctrine/ORM/Tools/Console/Command/GenerateProxiesCommand.php @@ -0,0 +1,136 @@ +. + */ + +namespace Doctrine\ORM\Tools\Console\Command; + +use Symfony\Components\Console\Input\InputArgument, + Symfony\Components\Console\Input\InputOption, + Symfony\Components\Console; + +/** + * Command to (re)generate the proxy classes used by doctrine. + * + * @license http://www.opensource.org/licenses/lgpl-license.php LGPL + * @link www.doctrine-project.org + * @since 2.0 + * @version $Revision$ + * @author Benjamin Eberlei + * @author Guilherme Blanco + * @author Jonathan Wage + * @author Roman Borschel + */ +class GenerateProxiesCommand extends Console\Command\Command +{ + /** + * @see Console\Command\Command + */ + protected function configure() + { + $this + ->setName('orm:generate-proxies') + ->setDescription('Generates proxy classes for entity classes.') + ->setDefinition(array( + new InputArgument( + 'from-path', InputArgument::REQUIRED, 'The path of mapping information.' + ), + new InputArgument( + 'dest-path', InputArgument::OPTIONAL, + 'The path to generate your proxy classes. If none is provided, it will attempt to grab from configuration.' + ), + new InputOption( + 'from', null, InputOption::PARAMETER_REQUIRED | InputOption::PARAMETER_IS_ARRAY, + 'Optional paths of mapping information.', + array() + ) + )) + ->setHelp(<<getHelper('em')->getEntityManager(); + + $reader = new ClassMetadataReader(); + $reader->setEntityManager($em); + + // Process source directories + $fromPaths = array_merge(array($input->getArgument('from-path')), $input->getOption('from')); + + foreach ($fromPaths as $dirName) { + $dirName = realpath($dirName); + + if ( ! file_exists($dirName)) { + throw new \InvalidArgumentException( + sprintf("Mapping directory '%s' does not exist.", $dirName) + ); + } else if ( ! is_readable($dirName)) { + throw new \InvalidArgumentException( + sprintf("Mapping directory '%s' does not have read permissions.", $dirName) + ); + } + + $reader->addMappingSource($dirName); + } + + // Process destination directory + if (($destPath = $input->getArgument('dest-path')) === null) { + $destPath = $em->getConfiguration()->getProxyDir(); + } + + $destPath = realpath($destPath); + + if ( ! file_exists($destPath)) { + throw new \InvalidArgumentException( + sprintf("Proxies destination directory '%s' does not exist.", $destPath) + ); + } else if ( ! is_writable($destPath)) { + throw new \InvalidArgumentException( + sprintf("Proxies destination directory '%s' does not have write permissions.", $destPath) + ); + } + + // Retrieving ClassMetadatas + $metadatas = $reader->getMetadatas(); + + if ( ! empty($metadatas)) { + foreach ($metadatas as $metadata) { + $output->write( + sprintf('Processing entity "%s"', $metadata->name) . PHP_EOL + ); + } + + // Generating Proxies + $em->getProxyFactory()->generateProxyClasses($metadatas, $destPath); + + // Outputting information message + $output->write(PHP_EOL . sprintf('Proxy classes generated to "%s"', $destPath) . PHP_EOL); + } else { + $output->write('No Metadata Classes to process.' . PHP_EOL); + } + + } +} \ No newline at end of file diff --git a/lib/Doctrine/ORM/Tools/Console/Command/GenerateRepositoriesCommand.php b/lib/Doctrine/ORM/Tools/Console/Command/GenerateRepositoriesCommand.php new file mode 100644 index 000000000..1d24fccb3 --- /dev/null +++ b/lib/Doctrine/ORM/Tools/Console/Command/GenerateRepositoriesCommand.php @@ -0,0 +1,171 @@ +. + */ + +namespace Doctrine\ORM\Tools\Console\Command; + +use Symfony\Components\Console\Input\InputArgument, + Symfony\Components\Console\Input\InputOption, + Symfony\Components\Console; + +/** + * Command to generate repository classes for mapping information. + * + * @license http://www.opensource.org/licenses/lgpl-license.php LGPL + * @link www.doctrine-project.org + * @since 2.0 + * @version $Revision$ + * @author Benjamin Eberlei + * @author Guilherme Blanco + * @author Jonathan Wage + * @author Roman Borschel + */ +class GenerateRepositoriesCommand extends Console\Command\Command +{ + private static $_template = +'; + +use \Doctrine\ORM\EntityRepository; + +/** + * + * + * This class was generated by the Doctrine ORM. Add your own custom + * repository methods below. + */ +class extends EntityRepository +{ +}'; + + /** + * @see Console\Command\Command + */ + protected function configure() + { + $this + ->setName('orm:generate-repositories') + ->setDescription('Generate repository classes from your mapping information.') + ->setDefinition(array( + new InputArgument( + 'from-path', InputArgument::REQUIRED, 'The path of mapping information.' + ), + new InputArgument( + 'dest-path', InputArgument::REQUIRED, 'The path to generate your repository classes.' + ), + new InputOption( + 'from', null, InputOption::PARAMETER_REQUIRED | InputOption::PARAMETER_IS_ARRAY, + 'Optional paths of mapping information.', + array() + ) + )) + ->setHelp(<<getHelper('em')->getEntityManager(); + + $reader = new ClassMetadataReader(); + $reader->setEntityManager($em); + + // Process source directories + $fromPaths = array_merge(array($input->getArgument('from-path')), $input->getOption('from')); + + foreach ($fromPaths as $dirName) { + $dirName = realpath($dirName); + + if ( ! file_exists($dirName)) { + throw new \InvalidArgumentException( + sprintf("Mapping directory '%s' does not exist.", $dirName) + ); + } else if ( ! is_readable($dirName)) { + throw new \InvalidArgumentException( + sprintf("Mapping directory '%s' does not have read permissions.", $dirName) + ); + } + + $reader->addMappingSource($dirName); + } + + // Process destination directory + $destPath = realpath($input->getArgument('dest-path')); + + if ( ! file_exists($destPath)) { + throw new \InvalidArgumentException( + sprintf("Entities destination directory '%s' does not exist.", $destPath) + ); + } else if ( ! is_writable($destPath)) { + throw new \InvalidArgumentException( + sprintf("Entities destination directory '%s' does not have write permissions.", $destPath) + ); + } + + // Retrieving ClassMetadatas + $metadatas = $reader->getMetadatas(); + + if ( ! empty($metadatas)) { + $numRepositories = 0; + + foreach ($metadatas as $metadata) { + if ($metadata->customRepositoryClassName) { + $output->write( + sprintf('Processing repository "%s"', $metadata->customRepositoryClassName) . PHP_EOL + ); + + $this->_generateRepositoryClass($metadata, $destPath); + + $numRepositories++; + } + } + + if ($numRepositories) { + // Outputting information message + $output->write(PHP_EOL . sprintf('Repository classes generated to "%s"', $destPath) . PHP_EOL); + } else { + $output->write('No Repository classes were found to be processed.' . PHP_EOL); + } + } else { + $output->write('No Metadata Classes to process.' . PHP_EOL); + } + } + + private function _generateRepositoryClass($metadata, $destPath) + { + $code = $this->_generateRepositoryClass($metadata->customRepositoryClassName); + + $path = $destPath . DIRECTORY_SEPARATOR + . str_replace('\\', \DIRECTORY_SEPARATOR, $metadata->customRepositoryClassName) . '.php'; + $dir = dirname($path); + + if ( ! is_dir($dir)) { + mkdir($dir, 0777, true); + } + + file_put_contents($path, $code); + } +} \ No newline at end of file diff --git a/lib/Doctrine/ORM/Tools/Console/Command/RunDqlCommand.php b/lib/Doctrine/ORM/Tools/Console/Command/RunDqlCommand.php new file mode 100644 index 000000000..c995fba7b --- /dev/null +++ b/lib/Doctrine/ORM/Tools/Console/Command/RunDqlCommand.php @@ -0,0 +1,124 @@ +. + */ + +namespace Doctrine\ORM\Tools\Console\Command; + +use Symfony\Components\Console\Input\InputArgument, + Symfony\Components\Console\Input\InputOption, + Symfony\Components\Console; + +/** + * Command to execute DQL queries in a given EntityManager. + * + * @license http://www.opensource.org/licenses/lgpl-license.php LGPL + * @link www.doctrine-project.org + * @since 2.0 + * @version $Revision$ + * @author Benjamin Eberlei + * @author Guilherme Blanco + * @author Jonathan Wage + * @author Roman Borschel + */ +class RunDqlCommand extends Console\Command\Command +{ + /** + * @see Console\Command\Command + */ + protected function configure() + { + $this + ->setName('orm:run-dql') + ->setDescription('Executes arbitrary DQL directly from the command line.') + ->setDefinition(array( + new InputArgument('dql', InputArgument::REQUIRED, 'The DQL to execute.'), + new InputOption( + 'hydrate', null, InputOption::PARAMETER_REQUIRED, + 'Hydration mode of result set. Should be either: object, array, scalar or single-scalar.', + 'object' + ), + new InputOption( + 'first-result', null, InputOption::PARAMETER_REQUIRED, + 'The first result in the result set.' + ), + new InputOption( + 'max-result', null, InputOption::PARAMETER_REQUIRED, + 'The maximum number of results in the result set.' + ), + new InputOption( + 'depth', null, InputOption::PARAMETER_REQUIRED, + 'Dumping depth of Entity graph.', 7 + ) + )) + ->setHelp(<<getHelper('em')->getEntityManager(); + + if (($dql = $input->getArgument('dql')) === null) { + throw new \RuntimeException("Argument 'DQL' is required in order to execute this command correctly."); + } + + $depth = $input->getOption('depth'); + + if ( ! is_numeric($depth)) { + throw new \LogicException("Option 'depth' must contains an integer value"); + } + + $hydrationModeName = $input->getOption('hydrate'); + $hydrationMode = 'Doctrine\ORM\Query::HYDRATE_' . strtoupper(str_replace('-', '_', $hydrationModeName)); + + if ( ! defined($hydrationMode)) { + throw new \RuntimeException( + "Hydration mode '$hydrationModeName' does not exist. It should be either: object. array, scalar or single-scalar." + ); + } + + $query = $em->createQuery($dql); + + if (($firstResult = $input->getOption('first-result')) !== null) { + if ( ! is_numeric($firstResult)) { + throw new \LogicException("Option 'first-result' must contains an integer value"); + } + + $query->setFirstResult((int) $firstResult); + } + + if (($maxResult = $input->getOption('max-result')) !== null) { + if ( ! is_numeric($maxResult)) { + throw new \LogicException("Option 'max-result' must contains an integer value"); + } + + $query->setMaxResult((int) $maxResult); + } + + $resultSet = $query->execute(array(), $hydrationMode); + + \Doctrine\Common\Util\Debug::dump($resultSet, $input->getOption('depth')); + } +} \ No newline at end of file diff --git a/lib/Doctrine/ORM/Tools/Console/Command/SchemaTool/CreateCommand.php b/lib/Doctrine/ORM/Tools/Console/Command/SchemaTool/CreateCommand.php new file mode 100644 index 000000000..4ca0b3090 --- /dev/null +++ b/lib/Doctrine/ORM/Tools/Console/Command/SchemaTool/CreateCommand.php @@ -0,0 +1,120 @@ +. + */ + +namespace Doctrine\ORM\Tools\Console\Command\SchemaTool; + +use Symfony\Components\Console\Input\InputArgument, + Symfony\Components\Console\Input\InputOption, + Symfony\Components\Console; + +/** + * Command to create the database schema for a set of classes based on their mappings. + * + * @license http://www.opensource.org/licenses/lgpl-license.php LGPL + * @link www.doctrine-project.org + * @since 2.0 + * @version $Revision$ + * @author Benjamin Eberlei + * @author Guilherme Blanco + * @author Jonathan Wage + * @author Roman Borschel + */ +class CreateCommand extends Console\Command\Command +{ + /** + * @see Console\Command\Command + */ + protected function configure() + { + $this + ->setName('orm:schema-tool:create') + ->setDescription( + 'Processes the schema and either create it directly on EntityManager Storage Connection or generate the SQL output.' + ) + ->setDefinition(array( + new InputArgument( + 'from-path', InputArgument::REQUIRED, 'The path of mapping information.' + ), + new InputOption( + 'from', null, InputOption::PARAMETER_REQUIRED | InputOption::PARAMETER_IS_ARRAY, + 'Optional paths of mapping information.', + array() + ), + new InputOption( + 'dump-sql', null, InputOption::PARAMETER_NONE, + 'Instead of try to apply generated SQLs into EntityManager Storage Connection, output them.' + ) + )) + ->setHelp(<<getHelper('em')->getEntityManager(); + + $reader = new ClassMetadataReader(); + $reader->setEntityManager($em); + + // Process source directories + $fromPaths = array_merge(array($input->getArgument('from-path')), $input->getOption('from')); + + foreach ($fromPaths as $dirName) { + $dirName = realpath($dirName); + + if ( ! file_exists($dirName)) { + throw new \InvalidArgumentException( + sprintf("Mapping directory '%s' does not exist.", $dirName) + ); + } else if ( ! is_readable($dirName)) { + throw new \InvalidArgumentException( + sprintf("Mapping directory '%s' does not have read permissions.", $dirName) + ); + } + + $reader->addMappingSource($dirName); + } + + // Retrieving ClassMetadatas + $metadatas = $reader->getMetadatas(); + + if ( ! empty($metadatas)) { + // Create SchemaTool + $tool = new \Doctrine\ORM\Tools\SchemaTool($em); + + if ($input->getOption('dump-sql') === null) { + $sqls = $tool->getCreateSchemaSql($metadatas); + $output->write(implode(';' . PHP_EOL, $sqls)); + } else { + $output->write('Creating database schema...' . PHP_EOL); + $tool->createSchema($metadatas); + $output->write('Database schema created successfully!' . PHP_EOL); + } + } else { + $output->write('No Metadata Classes to process.' . PHP_EOL); + } + } +} \ No newline at end of file diff --git a/lib/Doctrine/ORM/Tools/Console/Command/SchemaTool/DropCommand.php b/lib/Doctrine/ORM/Tools/Console/Command/SchemaTool/DropCommand.php new file mode 100644 index 000000000..b41c616a8 --- /dev/null +++ b/lib/Doctrine/ORM/Tools/Console/Command/SchemaTool/DropCommand.php @@ -0,0 +1,121 @@ +. + */ + +namespace Doctrine\ORM\Tools\Console\Command\SchemaTool; + +use Symfony\Components\Console\Input\InputArgument, + Symfony\Components\Console\Input\InputOption, + Symfony\Components\Console; + +/** + * Command to drop the database schema for a set of classes based on their mappings. + * + * @license http://www.opensource.org/licenses/lgpl-license.php LGPL + * @link www.doctrine-project.org + * @since 2.0 + * @version $Revision$ + * @author Benjamin Eberlei + * @author Guilherme Blanco + * @author Jonathan Wage + * @author Roman Borschel + */ +class DropCommand extends Console\Command\Command +{ + /** + * @see Console\Command\Command + */ + protected function configure() + { + $this + ->setName('orm:schema-tool:drop') + ->setDescription( + 'Processes the schema and either drop the database schema of EntityManager Storage Connection or generate the SQL output.' + ) + ->setDefinition(array( + new InputArgument( + 'from-path', InputArgument::REQUIRED, 'The path of mapping information.' + ), + new InputOption( + 'from', null, InputOption::PARAMETER_REQUIRED | InputOption::PARAMETER_IS_ARRAY, + 'Optional paths of mapping information.', + array() + ), + new InputOption( + 'dump-sql', null, InputOption::PARAMETER_NONE, + 'Instead of try to apply generated SQLs into EntityManager Storage Connection, output them.' + ) + )) + ->setHelp(<<getHelper('em')->getEntityManager(); + + $reader = new ClassMetadataReader(); + $reader->setEntityManager($em); + + // Process source directories + $fromPaths = array_merge(array($input->getArgument('from-path')), $input->getOption('from')); + + foreach ($fromPaths as $dirName) { + $dirName = realpath($dirName); + + if ( ! file_exists($dirName)) { + throw new \InvalidArgumentException( + sprintf("Mapping directory '%s' does not exist.", $dirName) + ); + } else if ( ! is_readable($dirName)) { + throw new \InvalidArgumentException( + sprintf("Mapping directory '%s' does not have read permissions.", $dirName) + ); + } + + $reader->addMappingSource($dirName); + } + + // Retrieving ClassMetadatas + $metadatas = $reader->getMetadatas(); + + if ( ! empty($metadatas)) { + // Create SchemaTool + $tool = new \Doctrine\ORM\Tools\SchemaTool($em); + + if ($input->getOption('dump-sql') === null) { + $sqls = $tool->getDropSchemaSql($metadatas); + $output->write(implode(';' . PHP_EOL, $sqls)); + } else { + $output->write('Dropping database schema...' . PHP_EOL); + $tool->dropSchema($metadatas); + $output->write('Database schema dropped successfully!' . PHP_EOL); + } + } else { + $output->write('No Metadata Classes to process.' . PHP_EOL); + } + } +} \ No newline at end of file diff --git a/lib/Doctrine/ORM/Tools/Console/Command/SchemaTool/UpdateCommand.php b/lib/Doctrine/ORM/Tools/Console/Command/SchemaTool/UpdateCommand.php new file mode 100644 index 000000000..9aba1e9cd --- /dev/null +++ b/lib/Doctrine/ORM/Tools/Console/Command/SchemaTool/UpdateCommand.php @@ -0,0 +1,129 @@ +. + */ + +namespace Doctrine\ORM\Tools\Console\Command\SchemaTool; + +use Symfony\Components\Console\Input\InputArgument, + Symfony\Components\Console\Input\InputOption, + Symfony\Components\Console; + +/** + * Command to update the database schema for a set of classes based on their mappings. + * + * @license http://www.opensource.org/licenses/lgpl-license.php LGPL + * @link www.doctrine-project.org + * @since 2.0 + * @version $Revision$ + * @author Benjamin Eberlei + * @author Guilherme Blanco + * @author Jonathan Wage + * @author Roman Borschel + */ +class UpdateCommand extends Console\Command\Command +{ + /** + * @see Console\Command\Command + */ + protected function configure() + { + $this + ->setName('orm:schema-tool:update') + ->setDescription( + 'Processes the schema and either update the database schema of EntityManager Storage Connection or generate the SQL output.' + ) + ->setDefinition(array( + new InputArgument( + 'from-path', InputArgument::REQUIRED, 'The path of mapping information.' + ), + new InputOption( + 'from', null, InputOption::PARAMETER_REQUIRED | InputOption::PARAMETER_IS_ARRAY, + 'Optional paths of mapping information.', + array() + ), + new InputOption( + 'complete', null, InputOption::PARAMETER_NONE, + 'If defined, all assets of the database which are not relevant to the current metadata will be dropped.' + ), + new InputOption( + 'dump-sql', null, InputOption::PARAMETER_NONE, + 'Instead of try to apply generated SQLs into EntityManager Storage Connection, output them.' + ) + )) + ->setHelp(<<getHelper('em')->getEntityManager(); + + $reader = new ClassMetadataReader(); + $reader->setEntityManager($em); + + // Process source directories + $fromPaths = array_merge(array($input->getArgument('from-path')), $input->getOption('from')); + + foreach ($fromPaths as $dirName) { + $dirName = realpath($dirName); + + if ( ! file_exists($dirName)) { + throw new \InvalidArgumentException( + sprintf("Mapping directory '%s' does not exist.", $dirName) + ); + } else if ( ! is_readable($dirName)) { + throw new \InvalidArgumentException( + sprintf("Mapping directory '%s' does not have read permissions.", $dirName) + ); + } + + $reader->addMappingSource($dirName); + } + + // Defining if update is complete or not (--complete not defined means $saveMode = true) + $saveMode = ($input->getOption('complete') === null); + + // Retrieving ClassMetadatas + $metadatas = $reader->getMetadatas(); + + if ( ! empty($metadatas)) { + // Create SchemaTool + $tool = new \Doctrine\ORM\Tools\SchemaTool($em); + + if ($input->getOption('dump-sql') === null) { + $sqls = $tool->getUpdateSchemaSql($metadatas, $saveMode); + $output->write(implode(';' . PHP_EOL, $sqls)); + } else { + $output->write('Updating database schema...' . PHP_EOL); + $tool->updateSchema($metadatas, $saveMode); + $output->write('Database schema updated successfully!' . PHP_EOL); + } + } else { + $output->write('No Metadata Classes to process.' . PHP_EOL); + } + } +} \ No newline at end of file diff --git a/lib/Doctrine/ORM/Tools/Console/Helper/EntityManagerHelper.php b/lib/Doctrine/ORM/Tools/Console/Helper/EntityManagerHelper.php new file mode 100644 index 000000000..2636006e3 --- /dev/null +++ b/lib/Doctrine/ORM/Tools/Console/Helper/EntityManagerHelper.php @@ -0,0 +1,74 @@ +. + */ + +namespace Doctrine\ORM\Tools\Console\Helper; + +use Symfony\Components\Console\Helper\Helper, + Doctrine\ORM\EntityManager; + +/** + * Doctrine CLI Connection Helper. + * + * @license http://www.opensource.org/licenses/lgpl-license.php LGPL + * @link www.doctrine-project.org + * @since 2.0 + * @version $Revision$ + * @author Benjamin Eberlei + * @author Guilherme Blanco + * @author Jonathan Wage + * @author Roman Borschel + */ +class EntityManagerHelper extends Helper +{ + /** + * Doctrine ORM EntityManager + * @var EntityManager + */ + protected $_em; + + /** + * Constructor + * + * @param Connection $connection Doctrine Database Connection + */ + public function __construct(EntityManager $em) + { + $this->_em = $em; + } + + /** + * Retrieves Doctrine ORM EntityManager + * + * @return EntityManager + */ + public function getEntityManager() + { + return $this->_em; + } + + /** + * @see Helper + */ + public function getName() + { + return 'entityManager'; + } +} \ No newline at end of file diff --git a/lib/Doctrine/ORM/Tools/ConvertDoctrine1Schema.php b/lib/Doctrine/ORM/Tools/ConvertDoctrine1Schema.php index 89744c0f1..b559913a4 100644 --- a/lib/Doctrine/ORM/Tools/ConvertDoctrine1Schema.php +++ b/lib/Doctrine/ORM/Tools/ConvertDoctrine1Schema.php @@ -48,7 +48,7 @@ class ConvertDoctrine1Schema * Constructor passes the directory or array of directories * to convert the Doctrine 1 schema files from * - * @param string $from + * @param array $from * @author Jonathan Wage */ public function __construct($from) diff --git a/lib/Doctrine/ORM/Tools/SchemaTool.php b/lib/Doctrine/ORM/Tools/SchemaTool.php index 129c9aa02..5897e0a72 100644 --- a/lib/Doctrine/ORM/Tools/SchemaTool.php +++ b/lib/Doctrine/ORM/Tools/SchemaTool.php @@ -43,15 +43,6 @@ use Doctrine\ORM\ORMException, */ class SchemaTool { - /** - * @var string - */ - const DROP_METADATA = "metadata"; - /** - * @var string - */ - const DROP_DATABASE = "database"; - /** * @var \Doctrine\ORM\EntityManager */ @@ -473,12 +464,11 @@ class SchemaTool * issued for all classes of the schema and some probably just don't exist. * * @param array $classes - * @param string $mode * @return void */ - public function dropSchema(array $classes, $mode=self::DROP_METADATA) + public function dropSchema(array $classes) { - $dropSchemaSql = $this->getDropSchemaSql($classes, $mode); + $dropSchemaSql = $this->getDropSchemaSql($classes); $conn = $this->_em->getConnection(); foreach ($dropSchemaSql as $sql) { @@ -490,7 +480,6 @@ class SchemaTool * Gets the SQL needed to drop the database schema for the given classes. * * @param array $classes - * @param string $mode * @return array */ public function getDropSchemaSql(array $classes) diff --git a/tools/sandbox/cli-config.php b/tools/sandbox/cli-config.php index 06cb51f07..887780dd9 100644 --- a/tools/sandbox/cli-config.php +++ b/tools/sandbox/cli-config.php @@ -22,9 +22,6 @@ $classLoader->register(); $classLoader = new \Doctrine\Common\ClassLoader('Proxies', __DIR__); $classLoader->register(); -$classLoader = new \Doctrine\Common\ClassLoader('Symfony', __DIR__ . '/../../lib/vendor'); -$classLoader->register(); - $config = new \Doctrine\ORM\Configuration(); $config->setMetadataCacheImpl(new \Doctrine\Common\Cache\ArrayCache); $config->setProxyDir(__DIR__ . '/Proxies'); @@ -37,5 +34,7 @@ $connectionOptions = array( $em = \Doctrine\ORM\EntityManager::create($connectionOptions, $config); -$configuration = new \Doctrine\Common\CLI\Configuration(); -$configuration->setAttribute('em', $em); \ No newline at end of file +$helperSet = new \Symfony\Components\Console\Helper\HelperSet(array( + 'db' => new \Doctrine\DBAL\Tools\Console\Helper\ConnectionHelper($em->getConnection()), + 'em' => new \Doctrine\ORM\Tools\Console\Helper\EntityManagerHelper($em) +)); \ No newline at end of file diff --git a/tools/sandbox/doctrine.php b/tools/sandbox/doctrine.php index 9b29b5e49..152a9932e 100644 --- a/tools/sandbox/doctrine.php +++ b/tools/sandbox/doctrine.php @@ -5,8 +5,34 @@ require __DIR__ . '/../../lib/Doctrine/Common/ClassLoader.php'; $classLoader = new \Doctrine\Common\ClassLoader('Doctrine', __DIR__ . '/../../lib'); $classLoader->register(); -// Variable $configuration is defined inside cli-config.php +$classLoader = new \Doctrine\Common\ClassLoader('Symfony', __DIR__ . '/../../lib/vendor'); +$classLoader->register(); + +// Variable $helperSet is defined inside cli-config.php require __DIR__ . '/cli-config.php'; -$cli = new \Doctrine\Common\CLI\CLIController($configuration); -$cli->run($_SERVER['argv']); \ No newline at end of file +$cli = new \Symfony\Components\Console\Application('Doctrine Command Line Interface', Doctrine\Common\Version::VERSION); +$cli->setCatchExceptions(true); +$cli->setHelperSet($helperSet); +$cli->addCommands(array( + // DBAL Commands + new \Doctrine\DBAL\Tools\Console\Command\RunSqlCommand(), + new \Doctrine\DBAL\Tools\Console\Command\ImportCommand(), + + // ORM Commands + new \Doctrine\ORM\Tools\Console\Command\ClearCache\MetadataCommand(), + new \Doctrine\ORM\Tools\Console\Command\ClearCache\ResultCommand(), + new \Doctrine\ORM\Tools\Console\Command\ClearCache\QueryCommand(), + new \Doctrine\ORM\Tools\Console\Command\SchemaTool\CreateCommand(), + new \Doctrine\ORM\Tools\Console\Command\SchemaTool\UpdateCommand(), + new \Doctrine\ORM\Tools\Console\Command\SchemaTool\DropCommand(), + new \Doctrine\ORM\Tools\Console\Command\EnsureProductionSettingsCommand(), + new \Doctrine\ORM\Tools\Console\Command\ConvertDoctrine1SchemaCommand(), + new \Doctrine\ORM\Tools\Console\Command\GenerateRepositoriesCommand(), + new \Doctrine\ORM\Tools\Console\Command\GenerateEntitiesCommand(), + new \Doctrine\ORM\Tools\Console\Command\GenerateProxiesCommand(), + new \Doctrine\ORM\Tools\Console\Command\ConvertMappingCommand(), + new \Doctrine\ORM\Tools\Console\Command\RunDqlCommand(), + +)); +$cli->run(); \ No newline at end of file From b0e26fa17da2376a1d896aee292491ba5908f1f3 Mon Sep 17 00:00:00 2001 From: Guilherme Blanco Date: Thu, 8 Apr 2010 01:03:04 -0300 Subject: [PATCH 05/86] [2.0] Added Symfony Components dependencies --- .../Components/Console/Application.php | 804 ++++++++++++++++++ .../Components/Console/Command/Command.php | 508 +++++++++++ .../Console/Command/HelpCommand.php | 83 ++ .../Console/Command/ListCommand.php | 72 ++ .../Console/Helper/DialogHelper.php | 119 +++ .../Console/Helper/FormatterHelper.php | 89 ++ .../Components/Console/Helper/Helper.php | 45 + .../Console/Helper/HelperInterface.php | 43 + .../Components/Console/Helper/HelperSet.php | 104 +++ .../Components/Console/Input/ArgvInput.php | 284 +++++++ .../Components/Console/Input/ArrayInput.php | 174 ++++ .../Components/Console/Input/Input.php | 198 +++++ .../Console/Input/InputArgument.php | 134 +++ .../Console/Input/InputDefinition.php | 507 +++++++++++ .../Console/Input/InputInterface.php | 58 ++ .../Components/Console/Input/InputOption.php | 191 +++++ .../Components/Console/Input/StringInput.php | 80 ++ .../Console/Output/ConsoleOutput.php | 41 + .../Components/Console/Output/NullOutput.php | 34 + .../Components/Console/Output/Output.php | 230 +++++ .../Console/Output/OutputInterface.php | 44 + .../Console/Output/StreamOutput.php | 109 +++ .../Symfony/Components/Console/Shell.php | 146 ++++ .../Console/Tester/ApplicationTester.php | 92 ++ .../Console/Tester/CommandTester.php | 92 ++ lib/vendor/Symfony/Components/Yaml/Dumper.php | 59 ++ .../Symfony/Components/Yaml/Exception.php | 23 + lib/vendor/Symfony/Components/Yaml/Inline.php | 410 +++++++++ lib/vendor/Symfony/Components/Yaml/Parser.php | 587 +++++++++++++ .../Components/Yaml/ParserException.php | 23 + lib/vendor/Symfony/Components/Yaml/Yaml.php | 121 +++ 31 files changed, 5504 insertions(+) create mode 100644 lib/vendor/Symfony/Components/Console/Application.php create mode 100644 lib/vendor/Symfony/Components/Console/Command/Command.php create mode 100644 lib/vendor/Symfony/Components/Console/Command/HelpCommand.php create mode 100644 lib/vendor/Symfony/Components/Console/Command/ListCommand.php create mode 100644 lib/vendor/Symfony/Components/Console/Helper/DialogHelper.php create mode 100644 lib/vendor/Symfony/Components/Console/Helper/FormatterHelper.php create mode 100644 lib/vendor/Symfony/Components/Console/Helper/Helper.php create mode 100644 lib/vendor/Symfony/Components/Console/Helper/HelperInterface.php create mode 100644 lib/vendor/Symfony/Components/Console/Helper/HelperSet.php create mode 100644 lib/vendor/Symfony/Components/Console/Input/ArgvInput.php create mode 100644 lib/vendor/Symfony/Components/Console/Input/ArrayInput.php create mode 100644 lib/vendor/Symfony/Components/Console/Input/Input.php create mode 100644 lib/vendor/Symfony/Components/Console/Input/InputArgument.php create mode 100644 lib/vendor/Symfony/Components/Console/Input/InputDefinition.php create mode 100644 lib/vendor/Symfony/Components/Console/Input/InputInterface.php create mode 100644 lib/vendor/Symfony/Components/Console/Input/InputOption.php create mode 100644 lib/vendor/Symfony/Components/Console/Input/StringInput.php create mode 100644 lib/vendor/Symfony/Components/Console/Output/ConsoleOutput.php create mode 100644 lib/vendor/Symfony/Components/Console/Output/NullOutput.php create mode 100644 lib/vendor/Symfony/Components/Console/Output/Output.php create mode 100644 lib/vendor/Symfony/Components/Console/Output/OutputInterface.php create mode 100644 lib/vendor/Symfony/Components/Console/Output/StreamOutput.php create mode 100644 lib/vendor/Symfony/Components/Console/Shell.php create mode 100644 lib/vendor/Symfony/Components/Console/Tester/ApplicationTester.php create mode 100644 lib/vendor/Symfony/Components/Console/Tester/CommandTester.php create mode 100644 lib/vendor/Symfony/Components/Yaml/Dumper.php create mode 100644 lib/vendor/Symfony/Components/Yaml/Exception.php create mode 100644 lib/vendor/Symfony/Components/Yaml/Inline.php create mode 100644 lib/vendor/Symfony/Components/Yaml/Parser.php create mode 100644 lib/vendor/Symfony/Components/Yaml/ParserException.php create mode 100644 lib/vendor/Symfony/Components/Yaml/Yaml.php diff --git a/lib/vendor/Symfony/Components/Console/Application.php b/lib/vendor/Symfony/Components/Console/Application.php new file mode 100644 index 000000000..e26319be7 --- /dev/null +++ b/lib/vendor/Symfony/Components/Console/Application.php @@ -0,0 +1,804 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +/** + * An Application is the container for a collection of commands. + * + * It is the main entry point of a Console application. + * + * This class is optimized for a standard CLI environment. + * + * Usage: + * + * $app = new Application('myapp', '1.0 (stable)'); + * $app->addCommand(new SimpleCommand()); + * $app->run(); + * + * @package symfony + * @subpackage console + * @author Fabien Potencier + */ +class Application +{ + protected $commands; + protected $aliases; + protected $application; + protected $wantHelps = false; + protected $runningCommand; + protected $name; + protected $version; + protected $catchExceptions; + protected $autoExit; + protected $definition; + protected $helperSet; + + /** + * Constructor. + * + * @param string $name The name of the application + * @param string $version The version of the application + */ + public function __construct($name = 'UNKNOWN', $version = 'UNKNOWN') + { + $this->name = $name; + $this->version = $version; + $this->catchExceptions = true; + $this->autoExit = true; + $this->commands = array(); + $this->aliases = array(); + $this->helperSet = new HelperSet(array( + new FormatterHelper(), + new DialogHelper(), + )); + + $this->addCommand(new HelpCommand()); + $this->addCommand(new ListCommand()); + + $this->definition = new InputDefinition(array( + new InputArgument('command', InputArgument::REQUIRED, 'The command to execute'), + + new InputOption('--help', '-h', InputOption::PARAMETER_NONE, 'Display this help message.'), + new InputOption('--quiet', '-q', InputOption::PARAMETER_NONE, 'Do not output any message.'), + new InputOption('--verbose', '-v', InputOption::PARAMETER_NONE, 'Increase verbosity of messages.'), + new InputOption('--version', '-V', InputOption::PARAMETER_NONE, 'Display this program version.'), + new InputOption('--color', '-c', InputOption::PARAMETER_NONE, 'Force ANSI color output.'), + new InputOption('--no-interaction', '-n', InputOption::PARAMETER_NONE, 'Do not ask any interactive question.'), + )); + } + + /** + * Runs the current application. + * + * @param InputInterface $input An Input instance + * @param OutputInterface $output An Output instance + * + * @return integer 0 if everything went fine, or an error code + */ + public function run(InputInterface $input = null, OutputInterface $output = null) + { + if (null === $input) + { + $input = new ArgvInput(); + } + + if (null === $output) + { + $output = new ConsoleOutput(); + } + + try + { + $statusCode = $this->doRun($input, $output); + } + catch (\Exception $e) + { + if (!$this->catchExceptions) + { + throw $e; + } + + $this->renderException($e, $output); + $statusCode = $e->getCode(); + + $statusCode = is_numeric($statusCode) && $statusCode ? $statusCode : 1; + } + + if ($this->autoExit) + { + // @codeCoverageIgnoreStart + exit($statusCode); + // @codeCoverageIgnoreEnd + } + else + { + return $statusCode; + } + } + + /** + * Runs the current application. + * + * @param InputInterface $input An Input instance + * @param OutputInterface $output An Output instance + * + * @return integer 0 if everything went fine, or an error code + */ + public function doRun(InputInterface $input, OutputInterface $output) + { + $name = $input->getFirstArgument('command'); + + if (true === $input->hasParameterOption(array('--color', '-c'))) + { + $output->setDecorated(true); + } + + if (true === $input->hasParameterOption(array('--help', '-H'))) + { + if (!$name) + { + $name = 'help'; + $input = new ArrayInput(array('command' => 'help')); + } + else + { + $this->wantHelps = true; + } + } + + if (true === $input->hasParameterOption(array('--no-interaction', '-n'))) + { + $input->setInteractive(false); + } + + if (true === $input->hasParameterOption(array('--quiet', '-q'))) + { + $output->setVerbosity(Output::VERBOSITY_QUIET); + } + elseif (true === $input->hasParameterOption(array('--verbose', '-v'))) + { + $output->setVerbosity(Output::VERBOSITY_VERBOSE); + } + + if (true === $input->hasParameterOption(array('--version', '-V'))) + { + $output->writeln($this->getLongVersion()); + + return 0; + } + + if (!$name) + { + $name = 'list'; + $input = new ArrayInput(array('command' => 'list')); + } + + // the command name MUST be the first element of the input + $command = $this->findCommand($name); + + $this->runningCommand = $command; + $statusCode = $command->run($input, $output); + $this->runningCommand = null; + + return is_numeric($statusCode) ? $statusCode : 0; + } + + /** + * Set a helper set to be used with the command. + * + * @param HelperSet $helperSet The helper set + */ + public function setHelperSet(HelperSet $helperSet) + { + $this->helperSet = $helperSet; + } + + /** + * Get the helper set associated with the command + * + * @return HelperSet The HelperSet isntance associated with this command + */ + public function getHelperSet() + { + return $this->helperSet; + } + + /** + * Gets the InputDefinition related to this Application. + * + * @return InputDefinition The InputDefinition instance + */ + public function getDefinition() + { + return $this->definition; + } + + /** + * Gets the help message. + * + * @return string A help message. + */ + public function getHelp() + { + $messages = array( + $this->getLongVersion(), + '', + 'Usage:', + sprintf(" [options] command [arguments]\n"), + 'Options:', + ); + + foreach ($this->definition->getOptions() as $option) + { + $messages[] = sprintf(' %-29s %s %s', + '--'.$option->getName().'', + $option->getShortcut() ? '-'.$option->getShortcut().'' : ' ', + $option->getDescription() + ); + } + + return implode("\n", $messages); + } + + /** + * Sets whether to catch exceptions or not during commands execution. + * + * @param Boolean $boolean Whether to catch exceptions or not during commands execution + */ + public function setCatchExceptions($boolean) + { + $this->catchExceptions = (Boolean) $boolean; + } + + /** + * Sets whether to automatically exit after a command execution or not. + * + * @param Boolean $boolean Whether to automatically exit after a command execution or not + */ + public function setAutoExit($boolean) + { + $this->autoExit = (Boolean) $boolean; + } + + /** + * Gets the name of the application. + * + * @return string The application name + */ + public function getName() + { + return $this->name; + } + + /** + * Sets the application name. + * + * @param string $name The application name + */ + public function setName($name) + { + $this->name = $name; + } + + /** + * Gets the application version. + * + * @return string The application version + */ + public function getVersion() + { + return $this->version; + } + + /** + * Sets the application version. + * + * @param string $version The application version + */ + public function setVersion($version) + { + $this->version = $version; + } + + /** + * Returns the long version of the application. + * + * @return string The long application version + */ + public function getLongVersion() + { + if ('UNKNOWN' !== $this->getName() && 'UNKNOWN' !== $this->getVersion()) + { + return sprintf('%s version %s', $this->getName(), $this->getVersion()); + } + else + { + return 'Console Tool'; + } + } + + /** + * Registers a new command. + * + * @param string $name The command name + * + * @return Command The newly created command + */ + public function register($name) + { + return $this->addCommand(new Command($name)); + } + + /** + * Adds an array of command objects. + * + * @param array $commands An array of commands + */ + public function addCommands(array $commands) + { + foreach ($commands as $command) + { + $this->addCommand($command); + } + } + + /** + * Adds a command object. + * + * If a command with the same name already exists, it will be overridden. + * + * @param Command $command A Command object + * + * @return Command The registered command + */ + public function addCommand(Command $command) + { + $command->setApplication($this); + + $this->commands[$command->getFullName()] = $command; + + foreach ($command->getAliases() as $alias) + { + $this->aliases[$alias] = $command; + } + + return $command; + } + + /** + * Returns a registered command by name or alias. + * + * @param string $name The command name or alias + * + * @return Command A Command object + */ + public function getCommand($name) + { + if (!isset($this->commands[$name]) && !isset($this->aliases[$name])) + { + throw new \InvalidArgumentException(sprintf('The command "%s" does not exist.', $name)); + } + + $command = isset($this->commands[$name]) ? $this->commands[$name] : $this->aliases[$name]; + + if ($this->wantHelps) + { + $this->wantHelps = false; + + $helpCommand = $this->getCommand('help'); + $helpCommand->setCommand($command); + + return $helpCommand; + } + + return $command; + } + + /** + * Returns true if the command exists, false otherwise + * + * @param string $name The command name or alias + * + * @return Boolean true if the command exists, false otherwise + */ + public function hasCommand($name) + { + return isset($this->commands[$name]) || isset($this->aliases[$name]); + } + + /** + * Returns an array of all unique namespaces used by currently registered commands. + * + * It does not returns the global namespace which always exists. + * + * @return array An array of namespaces + */ + public function getNamespaces() + { + $namespaces = array(); + foreach ($this->commands as $command) + { + if ($command->getNamespace()) + { + $namespaces[$command->getNamespace()] = true; + } + } + + return array_keys($namespaces); + } + + /** + * Finds a registered namespace by a name or an abbreviation. + * + * @return string A registered namespace + */ + public function findNamespace($namespace) + { + $abbrevs = static::getAbbreviations($this->getNamespaces()); + + if (!isset($abbrevs[$namespace])) + { + throw new \InvalidArgumentException(sprintf('There are no commands defined in the "%s" namespace.', $namespace)); + } + + if (count($abbrevs[$namespace]) > 1) + { + throw new \InvalidArgumentException(sprintf('The namespace "%s" is ambiguous (%s).', $namespace, $this->getAbbreviationSuggestions($abbrevs[$namespace]))); + } + + return $abbrevs[$namespace][0]; + } + + /** + * Finds a command by name or alias. + * + * Contrary to getCommand, this command tries to find the best + * match if you give it an abbreviation of a name or alias. + * + * @param string $name A command name or a command alias + * + * @return Command A Command instance + */ + public function findCommand($name) + { + // namespace + $namespace = ''; + if (false !== $pos = strpos($name, ':')) + { + $namespace = $this->findNamespace(substr($name, 0, $pos)); + $name = substr($name, $pos + 1); + } + + $fullName = $namespace ? $namespace.':'.$name : $name; + + // name + $commands = array(); + foreach ($this->commands as $command) + { + if ($command->getNamespace() == $namespace) + { + $commands[] = $command->getName(); + } + } + + $abbrevs = static::getAbbreviations($commands); + if (isset($abbrevs[$name]) && 1 == count($abbrevs[$name])) + { + return $this->getCommand($namespace ? $namespace.':'.$abbrevs[$name][0] : $abbrevs[$name][0]); + } + + if (isset($abbrevs[$name]) && count($abbrevs[$name]) > 1) + { + $suggestions = $this->getAbbreviationSuggestions(array_map(function ($command) use ($namespace) { return $namespace.':'.$command; }, $abbrevs[$name])); + + throw new \InvalidArgumentException(sprintf('Command "%s" is ambiguous (%s).', $fullName, $suggestions)); + } + + // aliases + $abbrevs = static::getAbbreviations(array_keys($this->aliases)); + if (!isset($abbrevs[$fullName])) + { + throw new \InvalidArgumentException(sprintf('Command "%s" is not defined.', $fullName)); + } + + if (count($abbrevs[$fullName]) > 1) + { + throw new \InvalidArgumentException(sprintf('Command "%s" is ambiguous (%s).', $fullName, $this->getAbbreviationSuggestions($abbrevs[$fullName]))); + } + + return $this->getCommand($abbrevs[$fullName][0]); + } + + /** + * Gets the commands (registered in the given namespace if provided). + * + * The array keys are the full names and the values the command instances. + * + * @param string $namespace A namespace name + * + * @return array An array of Command instances + */ + public function getCommands($namespace = null) + { + if (null === $namespace) + { + return $this->commands; + } + + $commands = array(); + foreach ($this->commands as $name => $command) + { + if ($namespace === $command->getNamespace()) + { + $commands[$name] = $command; + } + } + + return $commands; + } + + /** + * Returns an array of possible abbreviations given a set of names. + * + * @param array An array of names + * + * @return array An array of abbreviations + */ + static public function getAbbreviations($names) + { + $abbrevs = array(); + foreach ($names as $name) + { + for ($len = strlen($name) - 1; $len > 0; --$len) + { + $abbrev = substr($name, 0, $len); + if (!isset($abbrevs[$abbrev])) + { + $abbrevs[$abbrev] = array($name); + } + else + { + $abbrevs[$abbrev][] = $name; + } + } + } + + // Non-abbreviations always get entered, even if they aren't unique + foreach ($names as $name) + { + $abbrevs[$name] = array($name); + } + + return $abbrevs; + } + + /** + * Returns a text representation of the Application. + * + * @param string $namespace An optional namespace name + * + * @return string A string representing the Application + */ + public function asText($namespace = null) + { + $commands = $namespace ? $this->getCommands($this->findNamespace($namespace)) : $this->commands; + + $messages = array($this->getHelp(), ''); + if ($namespace) + { + $messages[] = sprintf("Available commands for the \"%s\" namespace:", $namespace); + } + else + { + $messages[] = 'Available commands:'; + } + + $width = 0; + foreach ($commands as $command) + { + $width = strlen($command->getName()) > $width ? strlen($command->getName()) : $width; + } + $width += 2; + + // add commands by namespace + foreach ($this->sortCommands($commands) as $space => $commands) + { + if (!$namespace && '_global' !== $space) + { + $messages[] = ''.$space.''; + } + + foreach ($commands as $command) + { + $aliases = $command->getAliases() ? ' ('.implode(', ', $command->getAliases()).')' : ''; + + $messages[] = sprintf(" %-${width}s %s%s", ($command->getNamespace() ? ':' : '').$command->getName(), $command->getDescription(), $aliases); + } + } + + return implode("\n", $messages); + } + + /** + * Returns an XML representation of the Application. + * + * @param string $namespace An optional namespace name + * @param Boolean $asDom Whether to return a DOM or an XML string + * + * @return string|DOMDocument An XML string representing the Application + */ + public function asXml($namespace = null, $asDom = false) + { + $commands = $namespace ? $this->getCommands($this->findNamespace($namespace)) : $this->commands; + + $dom = new \DOMDocument('1.0', 'UTF-8'); + $dom->formatOutput = true; + $dom->appendChild($xml = $dom->createElement('symfony')); + + $xml->appendChild($commandsXML = $dom->createElement('commands')); + + if ($namespace) + { + $commandsXML->setAttribute('namespace', $namespace); + } + else + { + $xml->appendChild($namespacesXML = $dom->createElement('namespaces')); + } + + // add commands by namespace + foreach ($this->sortCommands($commands) as $space => $commands) + { + if (!$namespace) + { + $namespacesXML->appendChild($namespaceArrayXML = $dom->createElement('namespace')); + $namespaceArrayXML->setAttribute('id', $space); + } + + foreach ($commands as $command) + { + if (!$namespace) + { + $namespaceArrayXML->appendChild($commandXML = $dom->createElement('command')); + $commandXML->appendChild($dom->createTextNode($command->getName())); + } + + $commandXML = new \DOMDocument('1.0', 'UTF-8'); + $commandXML->formatOutput = true; + $commandXML->loadXML($command->asXml()); + $node = $commandXML->getElementsByTagName('command')->item(0); + $node = $dom->importNode($node, true); + + $commandsXML->appendChild($node); + } + } + + return $asDom ? $dom : $dom->saveXml(); + } + + /** + * Renders a catched exception. + * + * @param Exception $e An exception instance + * @param OutputInterface $output An OutputInterface instance + */ + public function renderException($e, $output) + { + $strlen = function ($string) + { + return function_exists('mb_strlen') ? mb_strlen($string) : strlen($string); + }; + + $title = sprintf(' [%s] ', get_class($e)); + $len = $strlen($title); + $lines = array(); + foreach (explode("\n", $e->getMessage()) as $line) + { + $lines[] = sprintf(' %s ', $line); + $len = max($strlen($line) + 4, $len); + } + + $messages = array(str_repeat(' ', $len), $title.str_repeat(' ', $len - $strlen($title))); + + foreach ($lines as $line) + { + $messages[] = $line.str_repeat(' ', $len - $strlen($line)); + } + + $messages[] = str_repeat(' ', $len); + + $output->writeln("\n"); + foreach ($messages as $message) + { + $output->writeln("$message"); + } + $output->writeln("\n"); + + if (null !== $this->runningCommand) + { + $output->writeln(sprintf('%s', sprintf($this->runningCommand->getSynopsis(), $this->getName()))); + $output->writeln("\n"); + } + + if (Output::VERBOSITY_VERBOSE === $output->getVerbosity()) + { + $output->writeln('Exception trace:'); + + // exception related properties + $trace = $e->getTrace(); + array_unshift($trace, array( + 'function' => '', + 'file' => $e->getFile() != null ? $e->getFile() : 'n/a', + 'line' => $e->getLine() != null ? $e->getLine() : 'n/a', + 'args' => array(), + )); + + for ($i = 0, $count = count($trace); $i < $count; $i++) + { + $class = isset($trace[$i]['class']) ? $trace[$i]['class'] : ''; + $type = isset($trace[$i]['type']) ? $trace[$i]['type'] : ''; + $function = $trace[$i]['function']; + $file = isset($trace[$i]['file']) ? $trace[$i]['file'] : 'n/a'; + $line = isset($trace[$i]['line']) ? $trace[$i]['line'] : 'n/a'; + + $output->writeln(sprintf(' %s%s%s() at %s:%s', $class, $type, $function, $file, $line)); + } + + $output->writeln("\n"); + } + } + + private function sortCommands($commands) + { + $namespacedCommands = array(); + foreach ($commands as $name => $command) + { + $key = $command->getNamespace() ? $command->getNamespace() : '_global'; + + if (!isset($namespacedCommands[$key])) + { + $namespacedCommands[$key] = array(); + } + + $namespacedCommands[$key][$name] = $command; + } + ksort($namespacedCommands); + + foreach ($namespacedCommands as $name => &$commands) + { + ksort($commands); + } + + return $namespacedCommands; + } + + private function getAbbreviationSuggestions($abbrevs) + { + return sprintf('%s, %s%s', $abbrevs[0], $abbrevs[1], count($abbrevs) > 2 ? sprintf(' and %d more', count($abbrevs) - 2) : ''); + } +} diff --git a/lib/vendor/Symfony/Components/Console/Command/Command.php b/lib/vendor/Symfony/Components/Console/Command/Command.php new file mode 100644 index 000000000..bbde5f94e --- /dev/null +++ b/lib/vendor/Symfony/Components/Console/Command/Command.php @@ -0,0 +1,508 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +/** + * Base class for all commands. + * + * @package symfony + * @subpackage console + * @author Fabien Potencier + */ +class Command +{ + protected $name; + protected $namespace; + protected $aliases; + protected $definition; + protected $help; + protected $application; + protected $description; + protected $ignoreValidationErrors; + protected $formatter; + protected $applicationDefinitionMerged; + protected $code; + + /** + * Constructor. + * + * @param string $name The name of the command + */ + public function __construct($name = null) + { + $this->definition = new InputDefinition(); + $this->ignoreValidationErrors = false; + $this->applicationDefinitionMerged = false; + $this->aliases = array(); + + if (null !== $name) + { + $this->setName($name); + } + + $this->configure(); + + if (!$this->name) + { + throw new \LogicException('The command name cannot be empty.'); + } + } + + /** + * Sets the application instance for this command. + * + * @param Application $application An Application instance + */ + public function setApplication(Application $application = null) + { + $this->application = $application; + } + + /** + * Configures the current command. + */ + protected function configure() + { + } + + /** + * Executes the current command. + * + * @param InputInterface $input An InputInterface instance + * @param OutputInterface $output An OutputInterface instance + * + * @return integer 0 if everything went fine, or an error code + */ + protected function execute(InputInterface $input, OutputInterface $output) + { + throw new \LogicException('You must override the execute() method in the concrete command class.'); + } + + /** + * Interacts with the user. + * + * @param InputInterface $input An InputInterface instance + * @param OutputInterface $output An OutputInterface instance + */ + protected function interact(InputInterface $input, OutputInterface $output) + { + } + + /** + * Initializes the command just after the input has been validated. + * + * This is mainly useful when a lot of commands extends one main command + * where some things need to be initialized based on the input arguments and options. + * + * @param InputInterface $input An InputInterface instance + * @param OutputInterface $output An OutputInterface instance + */ + protected function initialize(InputInterface $input, OutputInterface $output) + { + } + + /** + * Runs the command. + * + * @param InputInterface $input An InputInterface instance + * @param OutputInterface $output An OutputInterface instance + */ + public function run(InputInterface $input, OutputInterface $output) + { + // add the application arguments and options + $this->mergeApplicationDefinition(); + + // bind the input against the command specific arguments/options + try + { + $input->bind($this->definition); + } + catch (\Exception $e) + { + if (!$this->ignoreValidationErrors) + { + throw $e; + } + } + + $this->initialize($input, $output); + + if ($input->isInteractive()) + { + $this->interact($input, $output); + } + + $input->validate(); + + if ($this->code) + { + return call_user_func($this->code, $input, $output); + } + else + { + return $this->execute($input, $output); + } + } + + /** + * Sets the code to execute when running this command. + * + * @param \Closure $code A \Closure + * + * @return Command The current instance + */ + public function setCode(\Closure $code) + { + $this->code = $code; + + return $this; + } + + /** + * Merges the application definition with the command definition. + */ + protected function mergeApplicationDefinition() + { + if (null === $this->application || true === $this->applicationDefinitionMerged) + { + return; + } + + $this->definition->setArguments(array_merge( + $this->application->getDefinition()->getArguments(), + $this->definition->getArguments() + )); + + $this->definition->addOptions($this->application->getDefinition()->getOptions()); + + $this->applicationDefinitionMerged = true; + } + + /** + * Sets an array of argument and option instances. + * + * @param array|Definition $definition An array of argument and option instances or a definition instance + * + * @return Command The current instance + */ + public function setDefinition($definition) + { + if ($definition instanceof InputDefinition) + { + $this->definition = $definition; + } + else + { + $this->definition->setDefinition($definition); + } + + $this->applicationDefinitionMerged = false; + + return $this; + } + + /** + * Gets the InputDefinition attached to this Command. + * + * @return InputDefinition $definition An InputDefinition instance + */ + public function getDefinition() + { + return $this->definition; + } + + /** + * Adds an argument. + * + * @param string $name The argument name + * @param integer $mode The argument mode: InputArgument::REQUIRED or InputArgument::OPTIONAL + * @param string $description A description text + * @param mixed $default The default value (for InputArgument::OPTIONAL mode only) + * + * @return Command The current instance + */ + public function addArgument($name, $mode = null, $description = '', $default = null) + { + $this->definition->addArgument(new InputArgument($name, $mode, $description, $default)); + + return $this; + } + + /** + * Adds an option. + * + * @param string $name The option name + * @param string $shortcut The shortcut (can be null) + * @param integer $mode The option mode: self::PARAMETER_REQUIRED, self::PARAMETER_NONE or self::PARAMETER_OPTIONAL + * @param string $description A description text + * @param mixed $default The default value (must be null for self::PARAMETER_REQUIRED or self::PARAMETER_NONE) + * + * @return Command The current instance + */ + public function addOption($name, $shortcut = null, $mode = null, $description = '', $default = null) + { + $this->definition->addOption(new InputOption($name, $shortcut, $mode, $description, $default)); + + return $this; + } + + /** + * Sets the name of the command. + * + * This method can set both the namespace and the name if + * you separate them by a colon (:) + * + * $command->setName('foo:bar'); + * + * @param string $name The command name + * + * @return Command The current instance + */ + public function setName($name) + { + if (false !== $pos = strpos($name, ':')) + { + $namespace = substr($name, 0, $pos); + $name = substr($name, $pos + 1); + } + else + { + $namespace = $this->namespace; + } + + if (!$name) + { + throw new \InvalidArgumentException('A command name cannot be empty'); + } + + $this->namespace = $namespace; + $this->name = $name; + + return $this; + } + + /** + * Returns the command namespace. + * + * @return string The command namespace + */ + public function getNamespace() + { + return $this->namespace; + } + + /** + * Returns the command name + * + * @return string The command name + */ + public function getName() + { + return $this->name; + } + + /** + * Returns the fully qualified command name. + * + * @return string The fully qualified command name + */ + public function getFullName() + { + return $this->getNamespace() ? $this->getNamespace().':'.$this->getName() : $this->getName(); + } + + /** + * Sets the description for the command. + * + * @param string $description The description for the command + * + * @return Command The current instance + */ + public function setDescription($description) + { + $this->description = $description; + + return $this; + } + + /** + * Returns the description for the command. + * + * @return string The description for the command + */ + public function getDescription() + { + return $this->description; + } + + /** + * Sets the help for the command. + * + * @param string $help The help for the command + * + * @return Command The current instance + */ + public function setHelp($help) + { + $this->help = $help; + + return $this; + } + + /** + * Returns the help for the command. + * + * @return string The help for the command + */ + public function getHelp() + { + return $this->help; + } + + /** + * Sets the aliases for the command. + * + * @param array $aliases An array of aliases for the command + * + * @return Command The current instance + */ + public function setAliases($aliases) + { + $this->aliases = $aliases; + + return $this; + } + + /** + * Returns the aliases for the command. + * + * @return array An array of aliases for the command + */ + public function getAliases() + { + return $this->aliases; + } + + /** + * Returns the synopsis for the command. + * + * @return string The synopsis + */ + public function getSynopsis() + { + return sprintf('%s %s', $this->getFullName(), $this->definition->getSynopsis()); + } + + /** + * Gets a helper instance by name. + * + * @param string $name The helper name + * + * @return mixed The helper value + * + * @throws \InvalidArgumentException if the helper is not defined + */ + protected function getHelper($name) + { + return $this->application->getHelperSet()->get($name); + } + + /** + * Gets a helper instance by name. + * + * @param string $name The helper name + * + * @return mixed The helper value + * + * @throws \InvalidArgumentException if the helper is not defined + */ + public function __get($name) + { + return $this->application->getHelperSet()->get($name); + } + + /** + * Returns a text representation of the command. + * + * @return string A string representing the command + */ + public function asText() + { + $messages = array( + 'Usage:', + ' '.$this->getSynopsis(), + '', + ); + + if ($this->getAliases()) + { + $messages[] = 'Aliases: '.implode(', ', $this->getAliases()).''; + } + + $messages[] = $this->definition->asText(); + + if ($help = $this->getHelp()) + { + $messages[] = 'Help:'; + $messages[] = ' '.implode("\n ", explode("\n", $help))."\n"; + } + + return implode("\n", $messages); + } + + /** + * Returns an XML representation of the command. + * + * @param Boolean $asDom Whether to return a DOM or an XML string + * + * @return string|DOMDocument An XML string representing the command + */ + public function asXml($asDom = false) + { + $dom = new \DOMDocument('1.0', 'UTF-8'); + $dom->formatOutput = true; + $dom->appendChild($commandXML = $dom->createElement('command')); + $commandXML->setAttribute('id', $this->getFullName()); + $commandXML->setAttribute('namespace', $this->getNamespace() ? $this->getNamespace() : '_global'); + $commandXML->setAttribute('name', $this->getName()); + + $commandXML->appendChild($usageXML = $dom->createElement('usage')); + $usageXML->appendChild($dom->createTextNode(sprintf($this->getSynopsis(), ''))); + + $commandXML->appendChild($descriptionXML = $dom->createElement('description')); + $descriptionXML->appendChild($dom->createTextNode(implode("\n ", explode("\n", $this->getDescription())))); + + $commandXML->appendChild($helpXML = $dom->createElement('help')); + $help = $this->help; + $helpXML->appendChild($dom->createTextNode(implode("\n ", explode("\n", $help)))); + + $commandXML->appendChild($aliasesXML = $dom->createElement('aliases')); + foreach ($this->getAliases() as $alias) + { + $aliasesXML->appendChild($aliasXML = $dom->createElement('alias')); + $aliasXML->appendChild($dom->createTextNode($alias)); + } + + $definition = $this->definition->asXml(true); + $commandXML->appendChild($dom->importNode($definition->getElementsByTagName('arguments')->item(0), true)); + $commandXML->appendChild($dom->importNode($definition->getElementsByTagName('options')->item(0), true)); + + return $asDom ? $dom : $dom->saveXml(); + } +} diff --git a/lib/vendor/Symfony/Components/Console/Command/HelpCommand.php b/lib/vendor/Symfony/Components/Console/Command/HelpCommand.php new file mode 100644 index 000000000..8258c5c18 --- /dev/null +++ b/lib/vendor/Symfony/Components/Console/Command/HelpCommand.php @@ -0,0 +1,83 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +/** + * HelpCommand displays the help for a given command. + * + * @package symfony + * @subpackage console + * @author Fabien Potencier + */ +class HelpCommand extends Command +{ + protected $command; + + /** + * @see Command + */ + protected function configure() + { + $this->ignoreValidationErrors = true; + + $this + ->setDefinition(array( + new InputArgument('command_name', InputArgument::OPTIONAL, 'The command name', 'help'), + new InputOption('xml', null, InputOption::PARAMETER_NONE, 'To output help as XML'), + )) + ->setName('help') + ->setAliases(array('?')) + ->setDescription('Displays help for a command') + ->setHelp(<<help command displays help for a given command: + + ./symfony help test:all + +You can also output the help as XML by using the --xml option: + + ./symfony help --xml test:all +EOF + ); + } + + public function setCommand(Command $command) + { + $this->command = $command; + } + + /** + * @see Command + */ + protected function execute(InputInterface $input, OutputInterface $output) + { + if (null === $this->command) + { + $this->command = $this->application->getCommand($input->getArgument('command_name')); + } + + if ($input->getOption('xml')) + { + $output->writeln($this->command->asXml(), Output::OUTPUT_RAW); + } + else + { + $output->writeln($this->command->asText()); + } + } +} diff --git a/lib/vendor/Symfony/Components/Console/Command/ListCommand.php b/lib/vendor/Symfony/Components/Console/Command/ListCommand.php new file mode 100644 index 000000000..3fddbc224 --- /dev/null +++ b/lib/vendor/Symfony/Components/Console/Command/ListCommand.php @@ -0,0 +1,72 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +/** + * ListCommand displays the list of all available commands for the application. + * + * @package symfony + * @subpackage console + * @author Fabien Potencier + */ +class ListCommand extends Command +{ + /** + * @see Command + */ + protected function configure() + { + $this + ->setDefinition(array( + new InputArgument('namespace', InputArgument::OPTIONAL, 'The namespace name'), + new InputOption('xml', null, InputOption::PARAMETER_NONE, 'To output help as XML'), + )) + ->setName('list') + ->setDescription('Lists commands') + ->setHelp(<<list command lists all commands: + + ./symfony list + +You can also display the commands for a specific namespace: + + ./symfony list test + +You can also output the information as XML by using the --xml option: + + ./symfony list --xml +EOF + ); + } + + /** + * @see Command + */ + protected function execute(InputInterface $input, OutputInterface $output) + { + if ($input->getOption('xml')) + { + $output->writeln($this->application->asXml($input->getArgument('namespace')), Output::OUTPUT_RAW); + } + else + { + $output->writeln($this->application->asText($input->getArgument('namespace'))); + } + } +} diff --git a/lib/vendor/Symfony/Components/Console/Helper/DialogHelper.php b/lib/vendor/Symfony/Components/Console/Helper/DialogHelper.php new file mode 100644 index 000000000..a19c3d949 --- /dev/null +++ b/lib/vendor/Symfony/Components/Console/Helper/DialogHelper.php @@ -0,0 +1,119 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +/** + * The Dialog class provides helpers to interact with the user. + * + * @package symfony + * @subpackage console + * @author Fabien Potencier + */ +class DialogHelper extends Helper +{ + /** + * Asks a question to the user. + * + * @param OutputInterface $output + * @param string|array $question The question to ask + * @param string $default The default answer if none is given by the user + * + * @param string The user answer + */ + public function ask(OutputInterface $output, $question, $default = null) + { + // @codeCoverageIgnoreStart + $output->writeln($question); + + $ret = trim(fgets(STDIN)); + + return $ret ? $ret : $default; + // @codeCoverageIgnoreEnd + } + + /** + * Asks a confirmation to the user. + * + * The question will be asked until the user answer by nothing, yes, or no. + * + * @param OutputInterface $output + * @param string|array $question The question to ask + * @param Boolean $default The default answer if the user enters nothing + * + * @param Boolean true if the user has confirmed, false otherwise + */ + public function askConfirmation(OutputInterface $output, $question, $default = true) + { + // @codeCoverageIgnoreStart + $answer = 'z'; + while ($answer && !in_array(strtolower($answer[0]), array('y', 'n'))) + { + $answer = $this->ask($output, $question); + } + + if (false === $default) + { + return $answer && 'y' == strtolower($answer[0]); + } + else + { + return !$answer || 'y' == strtolower($answer[0]); + } + // @codeCoverageIgnoreEnd + } + + /** + * Asks for a value and validates the response. + * + * @param OutputInterface $output + * @param string|array $question + * @param Closure $validator + * @param integer $attempts Max number of times to ask before giving up (false by default, which means infinite) + * + * @return mixed + */ + public function askAndValidate(OutputInterface $output, $question, \Closure $validator, $attempts = false) + { + // @codeCoverageIgnoreStart + $error = null; + while (false === $attempts || $attempts--) + { + if (null !== $error) + { + $output->writeln($this->getHelperSet()->get('formatter')->formatBlock($error->getMessage(), 'error')); + } + + $value = $this->ask($output, $question, null); + + try + { + return $validator($value); + } + catch (\Exception $error) + { + } + } + + throw $error; + // @codeCoverageIgnoreEnd + } + + /** + * Returns the helper's canonical name + */ + public function getName() + { + return 'dialog'; + } +} diff --git a/lib/vendor/Symfony/Components/Console/Helper/FormatterHelper.php b/lib/vendor/Symfony/Components/Console/Helper/FormatterHelper.php new file mode 100644 index 000000000..6eedca733 --- /dev/null +++ b/lib/vendor/Symfony/Components/Console/Helper/FormatterHelper.php @@ -0,0 +1,89 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +/** + * The Formatter class provides helpers to format messages. + * + * @package symfony + * @subpackage console + * @author Fabien Potencier + */ +class FormatterHelper extends Helper +{ + /** + * Formats a message within a section. + * + * @param string $section The section name + * @param string $message The message + * @param string $style The style to apply to the section + */ + public function formatSection($section, $message, $style = 'info') + { + return sprintf("<%s>[%s] %s", $style, $section, $style, $message); + } + + /** + * Formats a message as a block of text. + * + * @param string|array $messages The message to write in the block + * @param string $style The style to apply to the whole block + * @param Boolean $large Whether to return a large block + * + * @return string The formatter message + */ + public function formatBlock($messages, $style, $large = false) + { + if (!is_array($messages)) + { + $messages = array($messages); + } + + $len = 0; + $lines = array(); + foreach ($messages as $message) + { + $lines[] = sprintf($large ? ' %s ' : ' %s ', $message); + $len = max($this->strlen($message) + ($large ? 4 : 2), $len); + } + + $messages = $large ? array(str_repeat(' ', $len)) : array(); + foreach ($lines as $line) + { + $messages[] = $line.str_repeat(' ', $len - $this->strlen($line)); + } + if ($large) + { + $messages[] = str_repeat(' ', $len); + } + + foreach ($messages as &$message) + { + $message = sprintf('<%s>%s', $style, $message, $style); + } + + return implode("\n", $messages); + } + + protected function strlen($string) + { + return function_exists('mb_strlen') ? mb_strlen($string) : strlen($string); + } + + /** + * Returns the helper's canonical name + */ + public function getName() + { + return 'formatter'; + } +} diff --git a/lib/vendor/Symfony/Components/Console/Helper/Helper.php b/lib/vendor/Symfony/Components/Console/Helper/Helper.php new file mode 100644 index 000000000..f083b47ab --- /dev/null +++ b/lib/vendor/Symfony/Components/Console/Helper/Helper.php @@ -0,0 +1,45 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +/** + * Helper is the base class for all helper classes. + * + * @package symfony + * @subpackage console + * @author Fabien Potencier + */ +abstract class Helper implements HelperInterface +{ + protected + $helperSet = null; + + /** + * Sets the helper set associated with this helper. + * + * @param HelperSet $helperSet A HelperSet instance + */ + public function setHelperSet(HelperSet $helperSet = null) + { + $this->helperSet = $helperSet; + } + + /** + * Gets the helper set associated with this helper. + * + * @return HelperSet A HelperSet instance + */ + public function getHelperSet() + { + return $this->helperSet; + } +} diff --git a/lib/vendor/Symfony/Components/Console/Helper/HelperInterface.php b/lib/vendor/Symfony/Components/Console/Helper/HelperInterface.php new file mode 100644 index 000000000..f3de9aa65 --- /dev/null +++ b/lib/vendor/Symfony/Components/Console/Helper/HelperInterface.php @@ -0,0 +1,43 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +/** + * HelperInterface is the interface all helpers must implement. + * + * @package symfony + * @subpackage console + * @author Fabien Potencier + */ +interface HelperInterface +{ + /** + * Sets the helper set associated with this helper. + * + * @param HelperSet $helperSet A HelperSet instance + */ + function setHelperSet(HelperSet $helperSet = null); + + /** + * Gets the helper set associated with this helper. + * + * @return HelperSet A HelperSet instance + */ + function getHelperSet(); + + /** + * Returns the canonical name of this helper. + * + * @return string The canonical name + */ + function getName(); +} diff --git a/lib/vendor/Symfony/Components/Console/Helper/HelperSet.php b/lib/vendor/Symfony/Components/Console/Helper/HelperSet.php new file mode 100644 index 000000000..67d764f52 --- /dev/null +++ b/lib/vendor/Symfony/Components/Console/Helper/HelperSet.php @@ -0,0 +1,104 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +/** + * HelperSet represents a set of helpers to be used with a command. + * + * @package symfony + * @subpackage console + * @author Fabien Potencier + */ +class HelperSet +{ + protected + $helpers = array(), + $command = null; + + public function __construct(array $helpers = array()) + { + foreach ($helpers as $alias => $helper) + { + $this->set($helper, is_int($alias) ? null : $alias); + } + } + + /** + * Sets a helper. + * + * @param HelperInterface $value The helper instance + * @param string $alias An alias + */ + public function set(HelperInterface $helper, $alias = null) + { + $this->helpers[$helper->getName()] = $helper; + if (null !== $alias) + { + $this->helpers[$alias] = $helper; + } + + $helper->setHelperSet($this); + } + + /** + * Returns true if the helper if defined. + * + * @param string $name The helper name + * + * @return Boolean true if the helper is defined, false otherwise + */ + public function has($name) + { + return isset($this->helpers[$name]); + } + + /** + * Gets a helper value. + * + * @param string $name The helper name + * + * @return HelperInterface The helper instance + * + * @throws \InvalidArgumentException if the helper is not defined + */ + public function get($name) + { + if (!$this->has($name)) + { + throw new \InvalidArgumentException(sprintf('The helper "%s" is not defined.', $name)); + } + + return $this->helpers[$name]; + } + + /** + * Sets the command associated with this helper set. + * + * @param Command $command A Command instance + */ + public function setCommand(Command $command = null) + { + $this->command = $command; + } + + /** + * Gets the command associated with this helper set. + * + * @return Command A Command instance + */ + public function getCommand() + { + return $this->command; + } +} diff --git a/lib/vendor/Symfony/Components/Console/Input/ArgvInput.php b/lib/vendor/Symfony/Components/Console/Input/ArgvInput.php new file mode 100644 index 000000000..a140219bf --- /dev/null +++ b/lib/vendor/Symfony/Components/Console/Input/ArgvInput.php @@ -0,0 +1,284 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +/** + * ArgvInput represents an input coming from the CLI arguments. + * + * Usage: + * + * $input = new ArgvInput(); + * + * By default, the `$_SERVER['argv']` array is used for the input values. + * + * This can be overriden by explicitly passing the input values in the constructor: + * + * $input = new ArgvInput($_SERVER['argv']); + * + * If you pass it yourself, don't forget that the first element of the array + * is the name of the running program. + * + * When passing an argument to the constructor, be sure that it respects + * the same rules as the argv one. It's almost always better to use the + * `StringInput` when you want to provide your own input. + * + * @package symfony + * @subpackage console + * @author Fabien Potencier + * + * @see http://www.gnu.org/software/libc/manual/html_node/Argument-Syntax.html + * @see http://www.opengroup.org/onlinepubs/009695399/basedefs/xbd_chap12.html#tag_12_02 + */ +class ArgvInput extends Input +{ + protected $tokens; + protected $parsed; + + /** + * Constructor. + * + * @param array $argv An array of parameters from the CLI (in the argv format) + * @param InputDefinition $definition A InputDefinition instance + */ + public function __construct(array $argv = null, InputDefinition $definition = null) + { + if (null === $argv) + { + $argv = $_SERVER['argv']; + } + + // strip the program name + array_shift($argv); + + $this->tokens = $argv; + + parent::__construct($definition); + } + + /** + * Processes command line arguments. + */ + protected function parse() + { + $this->parsed = $this->tokens; + while ($token = array_shift($this->parsed)) + { + if ('--' === substr($token, 0, 2)) + { + $this->parseLongOption($token); + } + elseif ('-' === $token[0]) + { + $this->parseShortOption($token); + } + else + { + $this->parseArgument($token); + } + } + } + + /** + * Parses a short option. + * + * @param string $token The current token. + */ + protected function parseShortOption($token) + { + $name = substr($token, 1); + + if (strlen($name) > 1) + { + if ($this->definition->hasShortcut($name[0]) && $this->definition->getOptionForShortcut($name[0])->acceptParameter()) + { + // an option with a value (with no space) + $this->addShortOption($name[0], substr($name, 1)); + } + else + { + $this->parseShortOptionSet($name); + } + } + else + { + $this->addShortOption($name, null); + } + } + + /** + * Parses a short option set. + * + * @param string $token The current token + */ + protected function parseShortOptionSet($name) + { + $len = strlen($name); + for ($i = 0; $i < $len; $i++) + { + if (!$this->definition->hasShortcut($name[$i])) + { + throw new \RuntimeException(sprintf('The "-%s" option does not exist.', $name[$i])); + } + + $option = $this->definition->getOptionForShortcut($name[$i]); + if ($option->acceptParameter()) + { + $this->addLongOption($option->getName(), $i === $len - 1 ? null : substr($name, $i + 1)); + + break; + } + else + { + $this->addLongOption($option->getName(), true); + } + } + } + + /** + * Parses a long option. + * + * @param string $token The current token + */ + protected function parseLongOption($token) + { + $name = substr($token, 2); + + if (false !== $pos = strpos($name, '=')) + { + $this->addLongOption(substr($name, 0, $pos), substr($name, $pos + 1)); + } + else + { + $this->addLongOption($name, null); + } + } + + /** + * Parses an argument. + * + * @param string $token The current token + */ + protected function parseArgument($token) + { + if (!$this->definition->hasArgument(count($this->arguments))) + { + throw new \RuntimeException('Too many arguments.'); + } + + $this->arguments[$this->definition->getArgument(count($this->arguments))->getName()] = $token; + } + + /** + * Adds a short option value. + * + * @param string $shortcut The short option key + * @param mixed $value The value for the option + */ + protected function addShortOption($shortcut, $value) + { + if (!$this->definition->hasShortcut($shortcut)) + { + throw new \RuntimeException(sprintf('The "-%s" option does not exist.', $shortcut)); + } + + $this->addLongOption($this->definition->getOptionForShortcut($shortcut)->getName(), $value); + } + + /** + * Adds a long option value. + * + * @param string $name The long option key + * @param mixed $value The value for the option + */ + protected function addLongOption($name, $value) + { + if (!$this->definition->hasOption($name)) + { + throw new \RuntimeException(sprintf('The "--%s" option does not exist.', $name)); + } + + $option = $this->definition->getOption($name); + + if (null === $value && $option->acceptParameter()) + { + // if option accepts an optional or mandatory argument + // let's see if there is one provided + $next = array_shift($this->parsed); + if ('-' !== $next[0]) + { + $value = $next; + } + else + { + array_unshift($this->parsed, $next); + } + } + + if (null === $value) + { + if ($option->isParameterRequired()) + { + throw new \RuntimeException(sprintf('The "--%s" option requires a value.', $name)); + } + + $value = $option->isParameterOptional() ? $option->getDefault() : true; + } + + $this->options[$name] = $value; + } + + /** + * Returns the first argument from the raw parameters (not parsed). + * + * @return string The value of the first argument or null otherwise + */ + public function getFirstArgument() + { + foreach ($this->tokens as $token) + { + if ($token && '-' === $token[0]) + { + continue; + } + + return $token; + } + } + + /** + * Returns true if the raw parameters (not parsed) contains a value. + * + * This method is to be used to introspect the input parameters + * before it has been validated. It must be used carefully. + * + * @param string|array $values The value(s) to look for in the raw parameters (can be an array) + * + * @return Boolean true if the value is contained in the raw parameters + */ + public function hasParameterOption($values) + { + if (!is_array($values)) + { + $values = array($values); + } + + foreach ($this->tokens as $v) + { + if (in_array($v, $values)) + { + return true; + } + } + + return false; + } +} diff --git a/lib/vendor/Symfony/Components/Console/Input/ArrayInput.php b/lib/vendor/Symfony/Components/Console/Input/ArrayInput.php new file mode 100644 index 000000000..3ae6154d3 --- /dev/null +++ b/lib/vendor/Symfony/Components/Console/Input/ArrayInput.php @@ -0,0 +1,174 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +/** + * ArrayInput represents an input provided as an array. + * + * Usage: + * + * $input = new ArrayInput(array('name' => 'foo', '--bar' => 'foobar')); + * + * @package symfony + * @subpackage console + * @author Fabien Potencier + */ +class ArrayInput extends Input +{ + protected $parameters; + + /** + * Constructor. + * + * @param array $param An array of parameters + * @param InputDefinition $definition A InputDefinition instance + */ + public function __construct(array $parameters, InputDefinition $definition = null) + { + $this->parameters = $parameters; + + parent::__construct($definition); + } + + /** + * Returns the first argument from the raw parameters (not parsed). + * + * @return string The value of the first argument or null otherwise + */ + public function getFirstArgument() + { + foreach ($this->parameters as $key => $value) + { + if ($key && '-' === $key[0]) + { + continue; + } + + return $value; + } + } + + /** + * Returns true if the raw parameters (not parsed) contains a value. + * + * This method is to be used to introspect the input parameters + * before it has been validated. It must be used carefully. + * + * @param string|array $value The values to look for in the raw parameters (can be an array) + * + * @return Boolean true if the value is contained in the raw parameters + */ + public function hasParameterOption($values) + { + if (!is_array($values)) + { + $values = array($values); + } + + foreach ($this->parameters as $k => $v) + { + if (!is_int($k)) + { + $v = $k; + } + + if (in_array($v, $values)) + { + return true; + } + } + + return false; + } + + /** + * Processes command line arguments. + */ + protected function parse() + { + foreach ($this->parameters as $key => $value) + { + if ('--' === substr($key, 0, 2)) + { + $this->addLongOption(substr($key, 2), $value); + } + elseif ('-' === $key[0]) + { + $this->addShortOption(substr($key, 1), $value); + } + else + { + $this->addArgument($key, $value); + } + } + } + + /** + * Adds a short option value. + * + * @param string $shortcut The short option key + * @param mixed $value The value for the option + */ + protected function addShortOption($shortcut, $value) + { + if (!$this->definition->hasShortcut($shortcut)) + { + throw new \RuntimeException(sprintf('The "-%s" option does not exist.', $shortcut)); + } + + $this->addLongOption($this->definition->getOptionForShortcut($shortcut)->getName(), $value); + } + + /** + * Adds a long option value. + * + * @param string $name The long option key + * @param mixed $value The value for the option + */ + protected function addLongOption($name, $value) + { + if (!$this->definition->hasOption($name)) + { + throw new \RuntimeException(sprintf('The "--%s" option does not exist.', $name)); + } + + $option = $this->definition->getOption($name); + + if (null === $value) + { + if ($option->isParameterRequired()) + { + throw new \RuntimeException(sprintf('The "--%s" option requires a value.', $name)); + } + + $value = $option->isParameterOptional() ? $option->getDefault() : true; + } + + $this->options[$name] = $value; + } + + /** + * Adds an argument value. + * + * @param string $name The argument name + * @param mixed $value The value for the argument + */ + protected function addArgument($name, $value) + { + if (!$this->definition->hasArgument($name)) + { + throw new \RuntimeException(sprintf('The "%s" argument does not exist.', $name)); + } + + $this->arguments[$name] = $value; + } +} diff --git a/lib/vendor/Symfony/Components/Console/Input/Input.php b/lib/vendor/Symfony/Components/Console/Input/Input.php new file mode 100644 index 000000000..9e9e5f482 --- /dev/null +++ b/lib/vendor/Symfony/Components/Console/Input/Input.php @@ -0,0 +1,198 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +/** + * Input is the base class for all concrete Input classes. + * + * Three concrete classes are provided by default: + * + * * `ArgvInput`: The input comes from the CLI arguments (argv) + * * `StringInput`: The input is provided as a string + * * `ArrayInput`: The input is provided as an array + * + * @package symfony + * @subpackage console + * @author Fabien Potencier + */ +abstract class Input implements InputInterface +{ + protected $definition; + protected $options; + protected $arguments; + protected $interactive = true; + + /** + * Constructor. + * + * @param InputDefinition $definition A InputDefinition instance + */ + public function __construct(InputDefinition $definition = null) + { + if (null === $definition) + { + $this->definition = new InputDefinition(); + } + else + { + $this->bind($definition); + $this->validate(); + } + } + + /** + * Binds the current Input instance with the given arguments and options. + * + * @param InputDefinition $definition A InputDefinition instance + */ + public function bind(InputDefinition $definition) + { + $this->arguments = array(); + $this->options = array(); + $this->definition = $definition; + + $this->parse(); + } + + /** + * Processes command line arguments. + */ + abstract protected function parse(); + + public function validate() + { + if (count($this->arguments) < $this->definition->getArgumentRequiredCount()) + { + throw new \RuntimeException('Not enough arguments.'); + } + } + + public function isInteractive() + { + return $this->interactive; + } + + public function setInteractive($interactive) + { + $this->interactive = (Boolean) $interactive; + } + + /** + * Returns the argument values. + * + * @return array An array of argument values + */ + public function getArguments() + { + return array_merge($this->definition->getArgumentDefaults(), $this->arguments); + } + + /** + * Returns the argument value for a given argument name. + * + * @param string $name The argument name + * + * @return mixed The argument value + */ + public function getArgument($name) + { + if (!$this->definition->hasArgument($name)) + { + throw new \InvalidArgumentException(sprintf('The "%s" argument does not exist.', $name)); + } + + return isset($this->arguments[$name]) ? $this->arguments[$name] : $this->definition->getArgument($name)->getDefault(); + } + + /** + * Sets an argument value by name. + * + * @param string $name The argument name + * @param string $value The argument value + */ + public function setArgument($name, $value) + { + if (!$this->definition->hasArgument($name)) + { + throw new \InvalidArgumentException(sprintf('The "%s" argument does not exist.', $name)); + } + + $this->arguments[$name] = $value; + } + + /** + * Returns true if an InputArgument object exists by name or position. + * + * @param string|integer $name The InputArgument name or position + * + * @return Boolean true if the InputArgument object exists, false otherwise + */ + public function hasArgument($name) + { + return $this->definition->hasArgument($name); + } + + /** + * Returns the options values. + * + * @return array An array of option values + */ + public function getOptions() + { + return array_merge($this->definition->getOptionDefaults(), $this->options); + } + + /** + * Returns the option value for a given option name. + * + * @param string $name The option name + * + * @return mixed The option value + */ + public function getOption($name) + { + if (!$this->definition->hasOption($name)) + { + throw new \InvalidArgumentException(sprintf('The "%s" option does not exist.', $name)); + } + + return isset($this->options[$name]) ? $this->options[$name] : $this->definition->getOption($name)->getDefault(); + } + + /** + * Sets an option value by name. + * + * @param string $name The option name + * @param string $value The option value + */ + public function setOption($name, $value) + { + if (!$this->definition->hasOption($name)) + { + throw new \InvalidArgumentException(sprintf('The "%s" option does not exist.', $name)); + } + + $this->options[$name] = $value; + } + + /** + * Returns true if an InputOption object exists by name. + * + * @param string $name The InputOption name + * + * @return Boolean true if the InputOption object exists, false otherwise + */ + public function hasOption($name) + { + return $this->definition->hasOption($name); + } +} diff --git a/lib/vendor/Symfony/Components/Console/Input/InputArgument.php b/lib/vendor/Symfony/Components/Console/Input/InputArgument.php new file mode 100644 index 000000000..9b5925b4b --- /dev/null +++ b/lib/vendor/Symfony/Components/Console/Input/InputArgument.php @@ -0,0 +1,134 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +/** + * Represents a command line argument. + * + * @package symfony + * @subpackage console + * @author Fabien Potencier + */ +class InputArgument +{ + const REQUIRED = 1; + const OPTIONAL = 2; + const IS_ARRAY = 4; + + protected $name; + protected $mode; + protected $default; + protected $description; + + /** + * Constructor. + * + * @param string $name The argument name + * @param integer $mode The argument mode: self::REQUIRED or self::OPTIONAL + * @param string $description A description text + * @param mixed $default The default value (for self::OPTIONAL mode only) + */ + public function __construct($name, $mode = null, $description = '', $default = null) + { + if (null === $mode) + { + $mode = self::OPTIONAL; + } + else if (is_string($mode) || $mode > 7) + { + throw new \InvalidArgumentException(sprintf('Argument mode "%s" is not valid.', $mode)); + } + + $this->name = $name; + $this->mode = $mode; + $this->description = $description; + + $this->setDefault($default); + } + + /** + * Returns the argument name. + * + * @return string The argument name + */ + public function getName() + { + return $this->name; + } + + /** + * Returns true if the argument is required. + * + * @return Boolean true if parameter mode is self::REQUIRED, false otherwise + */ + public function isRequired() + { + return self::REQUIRED === (self::REQUIRED & $this->mode); + } + + /** + * Returns true if the argument can take multiple values. + * + * @return Boolean true if mode is self::IS_ARRAY, false otherwise + */ + public function isArray() + { + return self::IS_ARRAY === (self::IS_ARRAY & $this->mode); + } + + /** + * Sets the default value. + * + * @param mixed $default The default value + */ + public function setDefault($default = null) + { + if (self::REQUIRED === $this->mode && null !== $default) + { + throw new \LogicException('Cannot set a default value except for Parameter::OPTIONAL mode.'); + } + + if ($this->isArray()) + { + if (null === $default) + { + $default = array(); + } + else if (!is_array($default)) + { + throw new \LogicException('A default value for an array argument must be an array.'); + } + } + + $this->default = $default; + } + + /** + * Returns the default value. + * + * @return mixed The default value + */ + public function getDefault() + { + return $this->default; + } + + /** + * Returns the description text. + * + * @return string The description text + */ + public function getDescription() + { + return $this->description; + } +} diff --git a/lib/vendor/Symfony/Components/Console/Input/InputDefinition.php b/lib/vendor/Symfony/Components/Console/Input/InputDefinition.php new file mode 100644 index 000000000..2977e7fd6 --- /dev/null +++ b/lib/vendor/Symfony/Components/Console/Input/InputDefinition.php @@ -0,0 +1,507 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +/** + * A InputDefinition represents a set of valid command line arguments and options. + * + * Usage: + * + * $definition = new InputDefinition(array( + * new InputArgument('name', InputArgument::REQUIRED), + * new InputOption('foo', 'f', InputOption::PARAMETER_REQUIRED), + * )); + * + * @package symfony + * @subpackage console + * @author Fabien Potencier + */ +class InputDefinition +{ + protected $arguments; + protected $requiredCount; + protected $hasAnArrayArgument = false; + protected $hasOptional; + protected $options; + protected $shortcuts; + + /** + * Constructor. + * + * @param array $definition An array of InputArgument and InputOption instance + */ + public function __construct(array $definition = array()) + { + $this->setDefinition($definition); + } + + public function setDefinition(array $definition) + { + $arguments = array(); + $options = array(); + foreach ($definition as $item) + { + if ($item instanceof InputOption) + { + $options[] = $item; + } + else + { + $arguments[] = $item; + } + } + + $this->setArguments($arguments); + $this->setOptions($options); + } + + /** + * Sets the InputArgument objects. + * + * @param array $arguments An array of InputArgument objects + */ + public function setArguments($arguments = array()) + { + $this->arguments = array(); + $this->requiredCount = 0; + $this->hasOptional = false; + $this->addArguments($arguments); + } + + /** + * Add an array of InputArgument objects. + * + * @param array $arguments An array of InputArgument objects + */ + public function addArguments($arguments = array()) + { + if (null !== $arguments) + { + foreach ($arguments as $argument) + { + $this->addArgument($argument); + } + } + } + + /** + * Add an InputArgument object. + * + * @param InputArgument $argument An InputArgument object + */ + public function addArgument(InputArgument $argument) + { + if (isset($this->arguments[$argument->getName()])) + { + throw new \LogicException(sprintf('An argument with name "%s" already exist.', $argument->getName())); + } + + if ($this->hasAnArrayArgument) + { + throw new \LogicException('Cannot add an argument after an array argument.'); + } + + if ($argument->isRequired() && $this->hasOptional) + { + throw new \LogicException('Cannot add a required argument after an optional one.'); + } + + if ($argument->isArray()) + { + $this->hasAnArrayArgument = true; + } + + if ($argument->isRequired()) + { + ++$this->requiredCount; + } + else + { + $this->hasOptional = true; + } + + $this->arguments[$argument->getName()] = $argument; + } + + /** + * Returns an InputArgument by name or by position. + * + * @param string|integer $name The InputArgument name or position + * + * @return InputArgument An InputArgument object + */ + public function getArgument($name) + { + $arguments = is_int($name) ? array_values($this->arguments) : $this->arguments; + + if (!$this->hasArgument($name)) + { + throw new \InvalidArgumentException(sprintf('The "%s" argument does not exist.', $name)); + } + + return $arguments[$name]; + } + + /** + * Returns true if an InputArgument object exists by name or position. + * + * @param string|integer $name The InputArgument name or position + * + * @return Boolean true if the InputArgument object exists, false otherwise + */ + public function hasArgument($name) + { + $arguments = is_int($name) ? array_values($this->arguments) : $this->arguments; + + return isset($arguments[$name]); + } + + /** + * Gets the array of InputArgument objects. + * + * @return array An array of InputArgument objects + */ + public function getArguments() + { + return $this->arguments; + } + + /** + * Returns the number of InputArguments. + * + * @return integer The number of InputArguments + */ + public function getArgumentCount() + { + return $this->hasAnArrayArgument ? PHP_INT_MAX : count($this->arguments); + } + + /** + * Returns the number of required InputArguments. + * + * @return integer The number of required InputArguments + */ + public function getArgumentRequiredCount() + { + return $this->requiredCount; + } + + /** + * Gets the default values. + * + * @return array An array of default values + */ + public function getArgumentDefaults() + { + $values = array(); + foreach ($this->arguments as $argument) + { + $values[$argument->getName()] = $argument->getDefault(); + } + + return $values; + } + + /** + * Sets the InputOption objects. + * + * @param array $options An array of InputOption objects + */ + public function setOptions($options = array()) + { + $this->options = array(); + $this->shortcuts = array(); + $this->addOptions($options); + } + + /** + * Add an array of InputOption objects. + * + * @param array $options An array of InputOption objects + */ + public function addOptions($options = array()) + { + foreach ($options as $option) + { + $this->addOption($option); + } + } + + /** + * Add an InputOption object. + * + * @param InputOption $option An InputOption object + */ + public function addOption(InputOption $option) + { + if (isset($this->options[$option->getName()])) + { + throw new \LogicException(sprintf('An option named "%s" already exist.', $option->getName())); + } + else if (isset($this->shortcuts[$option->getShortcut()])) + { + throw new \LogicException(sprintf('An option with shortcut "%s" already exist.', $option->getShortcut())); + } + + $this->options[$option->getName()] = $option; + if ($option->getShortcut()) + { + $this->shortcuts[$option->getShortcut()] = $option->getName(); + } + } + + /** + * Returns an InputOption by name. + * + * @param string $name The InputOption name + * + * @return InputOption A InputOption object + */ + public function getOption($name) + { + if (!$this->hasOption($name)) + { + throw new \InvalidArgumentException(sprintf('The "--%s" option does not exist.', $name)); + } + + return $this->options[$name]; + } + + /** + * Returns true if an InputOption object exists by name. + * + * @param string $name The InputOption name + * + * @return Boolean true if the InputOption object exists, false otherwise + */ + public function hasOption($name) + { + return isset($this->options[$name]); + } + + /** + * Gets the array of InputOption objects. + * + * @return array An array of InputOption objects + */ + public function getOptions() + { + return $this->options; + } + + /** + * Returns true if an InputOption object exists by shortcut. + * + * @param string $name The InputOption shortcut + * + * @return Boolean true if the InputOption object exists, false otherwise + */ + public function hasShortcut($name) + { + return isset($this->shortcuts[$name]); + } + + /** + * Gets an InputOption by shortcut. + * + * @return InputOption An InputOption object + */ + public function getOptionForShortcut($shortcut) + { + return $this->getOption($this->shortcutToName($shortcut)); + } + + /** + * Gets an array of default values. + * + * @return array An array of all default values + */ + public function getOptionDefaults() + { + $values = array(); + foreach ($this->options as $option) + { + $values[$option->getName()] = $option->getDefault(); + } + + return $values; + } + + /** + * Returns the InputOption name given a shortcut. + * + * @param string $shortcut The shortcut + * + * @return string The InputOption name + */ + protected function shortcutToName($shortcut) + { + if (!isset($this->shortcuts[$shortcut])) + { + throw new \InvalidArgumentException(sprintf('The "-%s" option does not exist.', $shortcut)); + } + + return $this->shortcuts[$shortcut]; + } + + /** + * Gets the synopsis. + * + * @return string The synopsis + */ + public function getSynopsis() + { + $elements = array(); + foreach ($this->getOptions() as $option) + { + $shortcut = $option->getShortcut() ? sprintf('-%s|', $option->getShortcut()) : ''; + $elements[] = sprintf('['.($option->isParameterRequired() ? '%s--%s="..."' : ($option->isParameterOptional() ? '%s--%s[="..."]' : '%s--%s')).']', $shortcut, $option->getName()); + } + + foreach ($this->getArguments() as $argument) + { + $elements[] = sprintf($argument->isRequired() ? '%s' : '[%s]', $argument->getName().($argument->isArray() ? '1' : '')); + + if ($argument->isArray()) + { + $elements[] = sprintf('... [%sN]', $argument->getName()); + } + } + + return implode(' ', $elements); + } + + /** + * Returns a textual representation of the InputDefinition. + * + * @return string A string representing the InputDefinition + */ + public function asText() + { + // find the largest option or argument name + $max = 0; + foreach ($this->getOptions() as $option) + { + $max = strlen($option->getName()) + 2 > $max ? strlen($option->getName()) + 2 : $max; + } + foreach ($this->getArguments() as $argument) + { + $max = strlen($argument->getName()) > $max ? strlen($argument->getName()) : $max; + } + ++$max; + + $text = array(); + + if ($this->getArguments()) + { + $text[] = 'Arguments:'; + foreach ($this->getArguments() as $argument) + { + if (null !== $argument->getDefault() && (!is_array($argument->getDefault()) || count($argument->getDefault()))) + { + $default = sprintf(' (default: %s)', is_array($argument->getDefault()) ? str_replace("\n", '', var_export($argument->getDefault(), true)): $argument->getDefault()); + } + else + { + $default = ''; + } + + $text[] = sprintf(" %-${max}s %s%s", $argument->getName(), $argument->getDescription(), $default); + } + + $text[] = ''; + } + + if ($this->getOptions()) + { + $text[] = 'Options:'; + + foreach ($this->getOptions() as $option) + { + if ($option->acceptParameter() && null !== $option->getDefault() && (!is_array($option->getDefault()) || count($option->getDefault()))) + { + $default = sprintf(' (default: %s)', is_array($option->getDefault()) ? str_replace("\n", '', print_r($option->getDefault(), true)): $option->getDefault()); + } + else + { + $default = ''; + } + + $multiple = $option->isArray() ? ' (multiple values allowed)' : ''; + $text[] = sprintf(' %-'.$max.'s %s%s%s%s', '--'.$option->getName().'', $option->getShortcut() ? sprintf('(-%s) ', $option->getShortcut()) : '', $option->getDescription(), $default, $multiple); + } + + $text[] = ''; + } + + return implode("\n", $text); + } + + /** + * Returns an XML representation of the InputDefinition. + * + * @param Boolean $asDom Whether to return a DOM or an XML string + * + * @return string|DOMDocument An XML string representing the InputDefinition + */ + public function asXml($asDom = false) + { + $dom = new \DOMDocument('1.0', 'UTF-8'); + $dom->formatOutput = true; + $dom->appendChild($definitionXML = $dom->createElement('definition')); + + $definitionXML->appendChild($argumentsXML = $dom->createElement('arguments')); + foreach ($this->getArguments() as $argument) + { + $argumentsXML->appendChild($argumentXML = $dom->createElement('argument')); + $argumentXML->setAttribute('name', $argument->getName()); + $argumentXML->setAttribute('is_required', $argument->isRequired() ? 1 : 0); + $argumentXML->setAttribute('is_array', $argument->isArray() ? 1 : 0); + $argumentXML->appendChild($descriptionXML = $dom->createElement('description')); + $descriptionXML->appendChild($dom->createTextNode($argument->getDescription())); + + $argumentXML->appendChild($defaultsXML = $dom->createElement('defaults')); + $defaults = is_array($argument->getDefault()) ? $argument->getDefault() : ($argument->getDefault() ? array($argument->getDefault()) : array()); + foreach ($defaults as $default) + { + $defaultsXML->appendChild($defaultXML = $dom->createElement('default')); + $defaultXML->appendChild($dom->createTextNode($default)); + } + } + + $definitionXML->appendChild($optionsXML = $dom->createElement('options')); + foreach ($this->getOptions() as $option) + { + $optionsXML->appendChild($optionXML = $dom->createElement('option')); + $optionXML->setAttribute('name', '--'.$option->getName()); + $optionXML->setAttribute('shortcut', $option->getShortcut() ? '-'.$option->getShortcut() : ''); + $optionXML->setAttribute('accept_parameter', $option->acceptParameter() ? 1 : 0); + $optionXML->setAttribute('is_parameter_required', $option->isParameterRequired() ? 1 : 0); + $optionXML->setAttribute('is_multiple', $option->isArray() ? 1 : 0); + $optionXML->appendChild($descriptionXML = $dom->createElement('description')); + $descriptionXML->appendChild($dom->createTextNode($option->getDescription())); + + if ($option->acceptParameter()) + { + $optionXML->appendChild($defaultsXML = $dom->createElement('defaults')); + $defaults = is_array($option->getDefault()) ? $option->getDefault() : ($option->getDefault() ? array($option->getDefault()) : array()); + foreach ($defaults as $default) + { + $defaultsXML->appendChild($defaultXML = $dom->createElement('default')); + $defaultXML->appendChild($dom->createTextNode($default)); + } + } + } + + return $asDom ? $dom : $dom->saveXml(); + } +} diff --git a/lib/vendor/Symfony/Components/Console/Input/InputInterface.php b/lib/vendor/Symfony/Components/Console/Input/InputInterface.php new file mode 100644 index 000000000..953553e78 --- /dev/null +++ b/lib/vendor/Symfony/Components/Console/Input/InputInterface.php @@ -0,0 +1,58 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +/** + * InputInterface is the interface implemented by all input classes. + * + * @package symfony + * @subpackage console + * @author Fabien Potencier + */ +interface InputInterface +{ + /** + * Returns the first argument from the raw parameters (not parsed). + * + * @return string The value of the first argument or null otherwise + */ + function getFirstArgument(); + + /** + * Returns true if the raw parameters (not parsed) contains a value. + * + * This method is to be used to introspect the input parameters + * before it has been validated. It must be used carefully. + * + * @param string $value The value to look for in the raw parameters + * + * @return Boolean true if the value is contained in the raw parameters + */ + function hasParameterOption($value); + + /** + * Binds the current Input instance with the given arguments and options. + * + * @param InputDefinition $definition A InputDefinition instance + */ + function bind(InputDefinition $definition); + + function validate(); + + function getArguments(); + + function getArgument($name); + + function getOptions(); + + function getOption($name); +} diff --git a/lib/vendor/Symfony/Components/Console/Input/InputOption.php b/lib/vendor/Symfony/Components/Console/Input/InputOption.php new file mode 100644 index 000000000..46a47d0d5 --- /dev/null +++ b/lib/vendor/Symfony/Components/Console/Input/InputOption.php @@ -0,0 +1,191 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +/** + * Represents a command line option. + * + * @package symfony + * @subpackage console + * @author Fabien Potencier + */ +class InputOption +{ + const PARAMETER_NONE = 1; + const PARAMETER_REQUIRED = 2; + const PARAMETER_OPTIONAL = 4; + const PARAMETER_IS_ARRAY = 8; + + protected $name; + protected $shortcut; + protected $mode; + protected $default; + protected $description; + + /** + * Constructor. + * + * @param string $name The option name + * @param string $shortcut The shortcut (can be null) + * @param integer $mode The option mode: self::PARAMETER_REQUIRED, self::PARAMETER_NONE or self::PARAMETER_OPTIONAL + * @param string $description A description text + * @param mixed $default The default value (must be null for self::PARAMETER_REQUIRED or self::PARAMETER_NONE) + */ + public function __construct($name, $shortcut = null, $mode = null, $description = '', $default = null) + { + if ('--' === substr($name, 0, 2)) + { + $name = substr($name, 2); + } + + if (empty($shortcut)) + { + $shortcut = null; + } + + if (null !== $shortcut) + { + if ('-' === $shortcut[0]) + { + $shortcut = substr($shortcut, 1); + } + } + + if (null === $mode) + { + $mode = self::PARAMETER_NONE; + } + else if (!is_int($mode) || $mode > 15) + { + throw new \InvalidArgumentException(sprintf('Option mode "%s" is not valid.', $mode)); + } + + $this->name = $name; + $this->shortcut = $shortcut; + $this->mode = $mode; + $this->description = $description; + + if ($this->isArray() && !$this->acceptParameter()) + { + throw new \InvalidArgumentException('Impossible to have an option mode PARAMETER_IS_ARRAY if the option does not accept a parameter.'); + } + + $this->setDefault($default); + } + + /** + * Returns the shortcut. + * + * @return string The shortcut + */ + public function getShortcut() + { + return $this->shortcut; + } + + /** + * Returns the name. + * + * @return string The name + */ + public function getName() + { + return $this->name; + } + + /** + * Returns true if the option accept a parameter. + * + * @return Boolean true if parameter mode is not self::PARAMETER_NONE, false otherwise + */ + public function acceptParameter() + { + return $this->isParameterRequired() || $this->isParameterOptional(); + } + + /** + * Returns true if the option requires a parameter. + * + * @return Boolean true if parameter mode is self::PARAMETER_REQUIRED, false otherwise + */ + public function isParameterRequired() + { + return self::PARAMETER_REQUIRED === (self::PARAMETER_REQUIRED & $this->mode); + } + + /** + * Returns true if the option takes an optional parameter. + * + * @return Boolean true if parameter mode is self::PARAMETER_OPTIONAL, false otherwise + */ + public function isParameterOptional() + { + return self::PARAMETER_OPTIONAL === (self::PARAMETER_OPTIONAL & $this->mode); + } + + /** + * Returns true if the option can take multiple values. + * + * @return Boolean true if mode is self::PARAMETER_IS_ARRAY, false otherwise + */ + public function isArray() + { + return self::PARAMETER_IS_ARRAY === (self::PARAMETER_IS_ARRAY & $this->mode); + } + + /** + * Sets the default value. + * + * @param mixed $default The default value + */ + public function setDefault($default = null) + { + if (self::PARAMETER_NONE === (self::PARAMETER_NONE & $this->mode) && null !== $default) + { + throw new \LogicException('Cannot set a default value when using Option::PARAMETER_NONE mode.'); + } + + if ($this->isArray()) + { + if (null === $default) + { + $default = array(); + } + elseif (!is_array($default)) + { + throw new \LogicException('A default value for an array option must be an array.'); + } + } + + $this->default = $this->acceptParameter() ? $default : false; + } + + /** + * Returns the default value. + * + * @return mixed The default value + */ + public function getDefault() + { + return $this->default; + } + + /** + * Returns the description text. + * + * @return string The description text + */ + public function getDescription() + { + return $this->description; + } +} diff --git a/lib/vendor/Symfony/Components/Console/Input/StringInput.php b/lib/vendor/Symfony/Components/Console/Input/StringInput.php new file mode 100644 index 000000000..c66f7b9dc --- /dev/null +++ b/lib/vendor/Symfony/Components/Console/Input/StringInput.php @@ -0,0 +1,80 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +/** + * StringInput represents an input provided as a string. + * + * Usage: + * + * $input = new StringInput('foo --bar="foobar"'); + * + * @package symfony + * @subpackage console + * @author Fabien Potencier + */ +class StringInput extends ArgvInput +{ + const REGEX_STRING = '([^ ]+?)(?: |(?tokens = $this->tokenize($input); + } + + protected function tokenize($input) + { + $input = preg_replace('/(\r\n|\r|\n|\t)/', ' ', $input); + + $tokens = array(); + $length = strlen($input); + $cursor = 0; + while ($cursor < $length) + { + if (preg_match('/\s+/A', $input, $match, null, $cursor)) + { + } + elseif (preg_match('/([^="\' ]+?)(=?)('.self::REGEX_QUOTED_STRING.'+)/A', $input, $match, null, $cursor)) + { + $tokens[] = $match[1].$match[2].stripcslashes(str_replace(array('"\'', '\'"', '\'\'', '""'), '', substr($match[3], 1, strlen($match[3]) - 2))); + } + elseif (preg_match('/'.self::REGEX_QUOTED_STRING.'/A', $input, $match, null, $cursor)) + { + $tokens[] = stripcslashes(substr($match[0], 1, strlen($match[0]) - 2)); + } + elseif (preg_match('/'.self::REGEX_STRING.'/A', $input, $match, null, $cursor)) + { + $tokens[] = stripcslashes($match[1]); + } + else + { + // should never happen + // @codeCoverageIgnoreStart + throw new \InvalidArgumentException(sprintf('Unable to parse input near "... %s ..."', substr($input, $cursor, 10))); + // @codeCoverageIgnoreEnd + } + + $cursor += strlen($match[0]); + } + + return $tokens; + } +} diff --git a/lib/vendor/Symfony/Components/Console/Output/ConsoleOutput.php b/lib/vendor/Symfony/Components/Console/Output/ConsoleOutput.php new file mode 100644 index 000000000..7950c25ec --- /dev/null +++ b/lib/vendor/Symfony/Components/Console/Output/ConsoleOutput.php @@ -0,0 +1,41 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +/** + * ConsoleOutput is the default class for all CLI output. It uses STDOUT. + * + * This class is a convenient wrapper around `StreamOutput`. + * + * $output = new ConsoleOutput(); + * + * This is equivalent to: + * + * $output = new StreamOutput(fopen('php://stdout', 'w')); + * + * @package symfony + * @subpackage console + * @author Fabien Potencier + */ +class ConsoleOutput extends StreamOutput +{ + /** + * Constructor. + * + * @param integer $verbosity The verbosity level (self::VERBOSITY_QUIET, self::VERBOSITY_NORMAL, self::VERBOSITY_VERBOSE) + * @param Boolean $decorated Whether to decorate messages or not (null for auto-guessing) + */ + public function __construct($verbosity = self::VERBOSITY_NORMAL, $decorated = null) + { + parent::__construct(fopen('php://stdout', 'w'), $verbosity, $decorated); + } +} diff --git a/lib/vendor/Symfony/Components/Console/Output/NullOutput.php b/lib/vendor/Symfony/Components/Console/Output/NullOutput.php new file mode 100644 index 000000000..86e2c326f --- /dev/null +++ b/lib/vendor/Symfony/Components/Console/Output/NullOutput.php @@ -0,0 +1,34 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +/** + * NullOutput suppresses all output. + * + * $output = new NullOutput(); + * + * @package symfony + * @subpackage console + * @author Fabien Potencier + */ +class NullOutput extends Output +{ + /** + * Writes a message to the output. + * + * @param string $message A message to write to the output + * @param Boolean $newline Whether to add a newline or not + */ + public function doWrite($message, $newline) + { + } +} diff --git a/lib/vendor/Symfony/Components/Console/Output/Output.php b/lib/vendor/Symfony/Components/Console/Output/Output.php new file mode 100644 index 000000000..7bfa8bf01 --- /dev/null +++ b/lib/vendor/Symfony/Components/Console/Output/Output.php @@ -0,0 +1,230 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +/** + * Base class for output classes. + * + * There is three level of verbosity: + * + * * normal: no option passed (normal output - information) + * * verbose: -v (more output - debug) + * * quiet: -q (no output) + * + * @package symfony + * @subpackage console + * @author Fabien Potencier + */ +abstract class Output implements OutputInterface +{ + const VERBOSITY_QUIET = 0; + const VERBOSITY_NORMAL = 1; + const VERBOSITY_VERBOSE = 2; + + const OUTPUT_NORMAL = 0; + const OUTPUT_RAW = 1; + const OUTPUT_PLAIN = 2; + + protected $verbosity; + protected $decorated; + + static protected $styles = array( + 'error' => array('bg' => 'red', 'fg' => 'white'), + 'info' => array('fg' => 'green'), + 'comment' => array('fg' => 'yellow'), + 'question' => array('bg' => 'cyan', 'fg' => 'black'), + ); + static protected $options = array('bold' => 1, 'underscore' => 4, 'blink' => 5, 'reverse' => 7, 'conceal' => 8); + static protected $foreground = array('black' => 30, 'red' => 31, 'green' => 32, 'yellow' => 33, 'blue' => 34, 'magenta' => 35, 'cyan' => 36, 'white' => 37); + static protected $background = array('black' => 40, 'red' => 41, 'green' => 42, 'yellow' => 43, 'blue' => 44, 'magenta' => 45, 'cyan' => 46, 'white' => 47); + + /** + * Constructor. + * + * @param integer $verbosity The verbosity level (self::VERBOSITY_QUIET, self::VERBOSITY_NORMAL, self::VERBOSITY_VERBOSE) + * @param Boolean $decorated Whether to decorate messages or not (null for auto-guessing) + */ + public function __construct($verbosity = self::VERBOSITY_NORMAL, $decorated = null) + { + $this->decorated = (Boolean) $decorated; + $this->verbosity = null === $verbosity ? self::VERBOSITY_NORMAL : $verbosity; + } + + /** + * Sets a new style. + * + * @param string $name The style name + * @param array $options An array of options + */ + static public function setStyle($name, $options = array()) + { + static::$styles[strtolower($name)] = $options; + } + + /** + * Sets the decorated flag. + * + * @param Boolean $decorated Whether to decorated the messages or not + */ + public function setDecorated($decorated) + { + $this->decorated = (Boolean) $decorated; + } + + /** + * Gets the decorated flag. + * + * @return Boolean true if the output will decorate messages, false otherwise + */ + public function isDecorated() + { + return $this->decorated; + } + + /** + * Sets the verbosity of the output. + * + * @param integer $level The level of verbosity + */ + public function setVerbosity($level) + { + $this->verbosity = (int) $level; + } + + /** + * Gets the current verbosity of the output. + * + * @return integer The current level of verbosity + */ + public function getVerbosity() + { + return $this->verbosity; + } + + /** + * Writes a message to the output and adds a newline at the end. + * + * @param string|array $messages The message as an array of lines of a single string + * @param integer $type The type of output + */ + public function writeln($messages, $type = 0) + { + $this->write($messages, true, $type); + } + + /** + * Writes a message to the output. + * + * @param string|array $messages The message as an array of lines of a single string + * @param Boolean $newline Whether to add a newline or not + * @param integer $type The type of output + */ + public function write($messages, $newline = false, $type = 0) + { + if (self::VERBOSITY_QUIET === $this->verbosity) + { + return; + } + + if (!is_array($messages)) + { + $messages = array($messages); + } + + foreach ($messages as $message) + { + switch ($type) + { + case Output::OUTPUT_NORMAL: + $message = $this->format($message); + break; + case Output::OUTPUT_RAW: + break; + case Output::OUTPUT_PLAIN: + $message = strip_tags($this->format($message)); + break; + default: + throw new \InvalidArgumentException(sprintf('Unknown output type given (%s)', $type)); + } + + $this->doWrite($message, $newline); + } + } + + /** + * Writes a message to the output. + * + * @param string $message A message to write to the output + * @param Boolean $newline Whether to add a newline or not + */ + abstract public function doWrite($message, $newline); + + /** + * Formats a message according to the given styles. + * + * @param string $message The message to style + * + * @return string The styled message + */ + protected function format($message) + { + $message = preg_replace_callback('#<([a-z][a-z0-9\-_]+)>#i', array($this, 'replaceStartStyle'), $message); + + return preg_replace_callback('##i', array($this, 'replaceEndStyle'), $message); + } + + protected function replaceStartStyle($match) + { + if (!$this->decorated) + { + return ''; + } + + if (!isset(static::$styles[strtolower($match[1])])) + { + throw new \InvalidArgumentException(sprintf('Unknown style "%s".', $match[1])); + } + + $parameters = static::$styles[strtolower($match[1])]; + $codes = array(); + + if (isset($parameters['fg'])) + { + $codes[] = static::$foreground[$parameters['fg']]; + } + + if (isset($parameters['bg'])) + { + $codes[] = static::$background[$parameters['bg']]; + } + + foreach (static::$options as $option => $value) + { + if (isset($parameters[$option]) && $parameters[$option]) + { + $codes[] = $value; + } + } + + return "\033[".implode(';', $codes)."m"; + } + + protected function replaceEndStyle($match) + { + if (!$this->decorated) + { + return ''; + } + + return "\033[0m"; + } +} diff --git a/lib/vendor/Symfony/Components/Console/Output/OutputInterface.php b/lib/vendor/Symfony/Components/Console/Output/OutputInterface.php new file mode 100644 index 000000000..26bc6b76e --- /dev/null +++ b/lib/vendor/Symfony/Components/Console/Output/OutputInterface.php @@ -0,0 +1,44 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +/** + * OutputInterface is the interface implemented by all Output classes. + * + * @package symfony + * @subpackage console + * @author Fabien Potencier + */ +interface OutputInterface +{ + /** + * Writes a message to the output. + * + * @param string|array $messages The message as an array of lines of a single string + * @param integer $type The type of output + */ + public function write($messages, $type = 0); + + /** + * Sets the verbosity of the output. + * + * @param integer $level The level of verbosity + */ + public function setVerbosity($level); + + /** + * Sets the decorated flag. + * + * @param Boolean $decorated Whether to decorated the messages or not + */ + public function setDecorated($decorated); +} diff --git a/lib/vendor/Symfony/Components/Console/Output/StreamOutput.php b/lib/vendor/Symfony/Components/Console/Output/StreamOutput.php new file mode 100644 index 000000000..fdb74debe --- /dev/null +++ b/lib/vendor/Symfony/Components/Console/Output/StreamOutput.php @@ -0,0 +1,109 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +/** + * StreamOutput writes the output to a given stream. + * + * Usage: + * + * $output = new StreamOutput(fopen('php://stdout', 'w')); + * + * As `StreamOutput` can use any stream, you can also use a file: + * + * $output = new StreamOutput(fopen('/path/to/output.log', 'a', false)); + * + * @package symfony + * @subpackage console + * @author Fabien Potencier + */ +class StreamOutput extends Output +{ + protected $stream; + + /** + * Constructor. + * + * @param mixed $stream A stream resource + * @param integer $verbosity The verbosity level (self::VERBOSITY_QUIET, self::VERBOSITY_NORMAL, self::VERBOSITY_VERBOSE) + * @param Boolean $decorated Whether to decorate messages or not (null for auto-guessing) + */ + public function __construct($stream, $verbosity = self::VERBOSITY_NORMAL, $decorated = null) + { + if (!is_resource($stream) || 'stream' !== get_resource_type($stream)) + { + throw new \InvalidArgumentException('The StreamOutput class needs a stream as its first argument.'); + } + + $this->stream = $stream; + + if (null === $decorated) + { + $decorated = $this->hasColorSupport($decorated); + } + + parent::__construct($verbosity, $decorated); + } + + /** + * Gets the stream attached to this StreamOutput instance. + * + * @return resource A stream resource + */ + public function getStream() + { + return $this->stream; + } + + /** + * Writes a message to the output. + * + * @param string $message A message to write to the output + * @param Boolean $newline Whether to add a newline or not + */ + public function doWrite($message, $newline) + { + if (false === @fwrite($this->stream, $message.($newline ? PHP_EOL : ''))) + { + // @codeCoverageIgnoreStart + // should never happen + throw new \RuntimeException('Unable to write output.'); + // @codeCoverageIgnoreEnd + } + + flush(); + } + + /** + * Returns true if the stream supports colorization. + * + * Colorization is disabled if not supported by the stream: + * + * - windows without ansicon + * - non tty consoles + * + * @return Boolean true if the stream supports colorization, false otherwise + */ + protected function hasColorSupport() + { + // @codeCoverageIgnoreStart + if (DIRECTORY_SEPARATOR == '\\') + { + return false !== getenv('ANSICON'); + } + else + { + return function_exists('posix_isatty') && @posix_isatty($this->stream); + } + // @codeCoverageIgnoreEnd + } +} diff --git a/lib/vendor/Symfony/Components/Console/Shell.php b/lib/vendor/Symfony/Components/Console/Shell.php new file mode 100644 index 000000000..f91965c0b --- /dev/null +++ b/lib/vendor/Symfony/Components/Console/Shell.php @@ -0,0 +1,146 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +/** + * A Shell wraps an Application to add shell capabilities to it. + * + * This class only works with a PHP compiled with readline support + * (either --with-readline or --with-libedit) + * + * @package symfony + * @subpackage cli + * @author Fabien Potencier + */ +class Shell +{ + protected $application; + protected $history; + protected $output; + + /** + * Constructor. + * + * If there is no readline support for the current PHP executable + * a \RuntimeException exception is thrown. + * + * @param Application $application An application instance + */ + public function __construct(Application $application) + { + if (!function_exists('readline')) + { + throw new \RuntimeException('Unable to start the shell as the Readline extension is not enabled.'); + } + + $this->application = $application; + $this->history = getenv('HOME').'/.history_'.$application->getName(); + $this->output = new ConsoleOutput(); + } + + /** + * Runs the shell. + */ + public function run() + { + $this->application->setAutoExit(false); + $this->application->setCatchExceptions(true); + + readline_read_history($this->history); + readline_completion_function(array($this, 'autocompleter')); + + $this->output->writeln($this->getHeader()); + while (true) + { + $command = readline($this->application->getName().' > '); + + if (false === $command) + { + $this->output->writeln("\n"); + + break; + } + + readline_add_history($command); + readline_write_history($this->history); + + if (0 !== $ret = $this->application->run(new StringInput($command), $this->output)) + { + $this->output->writeln(sprintf('The command terminated with an error status (%s)', $ret)); + } + } + } + + /** + * Tries to return autocompletion for the current entered text. + * + * @param string $text The last segment of the entered text + * @param integer $position The current position + */ + protected function autocompleter($text, $position) + { + $info = readline_info(); + $text = substr($info['line_buffer'], 0, $info['end']); + + if ($info['point'] !== $info['end']) + { + return true; + } + + // task name? + if (false === strpos($text, ' ') || !$text) + { + return array_keys($this->application->getCommands()); + } + + // options and arguments? + try + { + $command = $this->application->findCommand(substr($text, 0, strpos($text, ' '))); + } + catch (\Exception $e) + { + return true; + } + + $list = array('--help'); + foreach ($command->getDefinition()->getOptions() as $option) + { + $list[] = '--'.$option->getName(); + } + + return $list; + } + + /** + * Returns the shell header. + * + * @return string The header string + */ + protected function getHeader() + { + return <<{$this->application->getName()} shell ({$this->application->getVersion()}). + +At the prompt, type help for some help, +or list to get a list available commands. + +To exit the shell, type ^D. + +EOF; + } +} diff --git a/lib/vendor/Symfony/Components/Console/Tester/ApplicationTester.php b/lib/vendor/Symfony/Components/Console/Tester/ApplicationTester.php new file mode 100644 index 000000000..aa31f71cb --- /dev/null +++ b/lib/vendor/Symfony/Components/Console/Tester/ApplicationTester.php @@ -0,0 +1,92 @@ +application = $application; + } + + /** + * Executes the application. + * + * Available options: + * + * * interactive: Sets the input interactive flag + * * decorated: Sets the output decorated flag + * * verbosity: Sets the output verbosity flag + * + * @param array $input An array of arguments and options + * @param array $options An array of options + */ + public function run(array $input, $options = array()) + { + $this->input = new ArrayInput($input); + if (isset($options['interactive'])) + { + $this->input->setInteractive($options['interactive']); + } + + $this->output = new StreamOutput(fopen('php://memory', 'w', false)); + if (isset($options['decorated'])) + { + $this->output->setDecorated($options['decorated']); + } + if (isset($options['verbosity'])) + { + $this->output->setVerbosity($options['verbosity']); + } + + $ret = $this->application->run($this->input, $this->output); + + rewind($this->output->getStream()); + + return $this->display = stream_get_contents($this->output->getStream()); + } + + /** + * Gets the display returned by the last execution of the application. + * + * @return string The display + */ + public function getDisplay() + { + return $this->display; + } + + /** + * Gets the input instance used by the last execution of the application. + * + * @return InputInterface The current input instance + */ + public function getInput() + { + return $this->input; + } + + /** + * Gets the output instance used by the last execution of the application. + * + * @return OutputInterface The current output instance + */ + public function getOutput() + { + return $this->output; + } +} diff --git a/lib/vendor/Symfony/Components/Console/Tester/CommandTester.php b/lib/vendor/Symfony/Components/Console/Tester/CommandTester.php new file mode 100644 index 000000000..bc0ee8879 --- /dev/null +++ b/lib/vendor/Symfony/Components/Console/Tester/CommandTester.php @@ -0,0 +1,92 @@ +command = $command; + } + + /** + * Executes the command. + * + * Available options: + * + * * interactive: Sets the input interactive flag + * * decorated: Sets the output decorated flag + * * verbosity: Sets the output verbosity flag + * + * @param array $input An array of arguments and options + * @param array $options An array of options + */ + public function execute(array $input, array $options = array()) + { + $this->input = new ArrayInput(array_merge($input, array('command' => $this->command->getFullName()))); + if (isset($options['interactive'])) + { + $this->input->setInteractive($options['interactive']); + } + + $this->output = new StreamOutput(fopen('php://memory', 'w', false)); + if (isset($options['decorated'])) + { + $this->output->setDecorated($options['decorated']); + } + if (isset($options['verbosity'])) + { + $this->output->setVerbosity($options['verbosity']); + } + + $ret = $this->command->run($this->input, $this->output); + + rewind($this->output->getStream()); + + return $this->display = stream_get_contents($this->output->getStream()); + } + + /** + * Gets the display returned by the last execution of the command. + * + * @return string The display + */ + public function getDisplay() + { + return $this->display; + } + + /** + * Gets the input instance used by the last execution of the command. + * + * @return InputInterface The current input instance + */ + public function getInput() + { + return $this->input; + } + + /** + * Gets the output instance used by the last execution of the command. + * + * @return OutputInterface The current output instance + */ + public function getOutput() + { + return $this->output; + } +} diff --git a/lib/vendor/Symfony/Components/Yaml/Dumper.php b/lib/vendor/Symfony/Components/Yaml/Dumper.php new file mode 100644 index 000000000..2db3f6cf1 --- /dev/null +++ b/lib/vendor/Symfony/Components/Yaml/Dumper.php @@ -0,0 +1,59 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/** + * Dumper dumps PHP variables to YAML strings. + * + * @package symfony + * @subpackage yaml + * @author Fabien Potencier + */ +class Dumper +{ + /** + * Dumps a PHP value to YAML. + * + * @param mixed $input The PHP value + * @param integer $inline The level where you switch to inline YAML + * @param integer $indent The level o indentation indentation (used internally) + * + * @return string The YAML representation of the PHP value + */ + public function dump($input, $inline = 0, $indent = 0) + { + $output = ''; + $prefix = $indent ? str_repeat(' ', $indent) : ''; + + if ($inline <= 0 || !is_array($input) || empty($input)) + { + $output .= $prefix.Inline::dump($input); + } + else + { + $isAHash = array_keys($input) !== range(0, count($input) - 1); + + foreach ($input as $key => $value) + { + $willBeInlined = $inline - 1 <= 0 || !is_array($value) || empty($value); + + $output .= sprintf('%s%s%s%s', + $prefix, + $isAHash ? Inline::dump($key).':' : '-', + $willBeInlined ? ' ' : "\n", + $this->dump($value, $inline - 1, $willBeInlined ? 0 : $indent + 2) + ).($willBeInlined ? "\n" : ''); + } + } + + return $output; + } +} diff --git a/lib/vendor/Symfony/Components/Yaml/Exception.php b/lib/vendor/Symfony/Components/Yaml/Exception.php new file mode 100644 index 000000000..49cb7949e --- /dev/null +++ b/lib/vendor/Symfony/Components/Yaml/Exception.php @@ -0,0 +1,23 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/** + * Exception class used by all exceptions thrown by the component. + * + * @package symfony + * @subpackage yaml + * @author Fabien Potencier + */ +class Exception extends \Exception +{ +} diff --git a/lib/vendor/Symfony/Components/Yaml/Inline.php b/lib/vendor/Symfony/Components/Yaml/Inline.php new file mode 100644 index 000000000..854f4bba5 --- /dev/null +++ b/lib/vendor/Symfony/Components/Yaml/Inline.php @@ -0,0 +1,410 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/** + * Inline implements a YAML parser/dumper for the YAML inline syntax. + * + * @package symfony + * @subpackage yaml + * @author Fabien Potencier + */ +class Inline +{ + const REGEX_QUOTED_STRING = '(?:"([^"\\\\]*(?:\\\\.[^"\\\\]*)*)"|\'([^\']*(?:\'\'[^\']*)*)\')'; + + /** + * Convert a YAML string to a PHP array. + * + * @param string $value A YAML string + * + * @return array A PHP array representing the YAML string + */ + static public function load($value) + { + $value = trim($value); + + if (0 == strlen($value)) + { + return ''; + } + + switch ($value[0]) + { + case '[': + return self::parseSequence($value); + case '{': + return self::parseMapping($value); + default: + return self::parseScalar($value); + } + } + + /** + * Dumps a given PHP variable to a YAML string. + * + * @param mixed $value The PHP variable to convert + * + * @return string The YAML string representing the PHP array + */ + static public function dump($value) + { + $trueValues = '1.1' == Yaml::getSpecVersion() ? array('true', 'on', '+', 'yes', 'y') : array('true'); + $falseValues = '1.1' == Yaml::getSpecVersion() ? array('false', 'off', '-', 'no', 'n') : array('false'); + + switch (true) + { + case is_resource($value): + throw new Exception('Unable to dump PHP resources in a YAML file.'); + case is_object($value): + return '!!php/object:'.serialize($value); + case is_array($value): + return self::dumpArray($value); + case null === $value: + return 'null'; + case true === $value: + return 'true'; + case false === $value: + return 'false'; + case ctype_digit($value): + return is_string($value) ? "'$value'" : (int) $value; + case is_numeric($value): + return is_infinite($value) ? str_ireplace('INF', '.Inf', strval($value)) : (is_string($value) ? "'$value'" : $value); + case false !== strpos($value, "\n") || false !== strpos($value, "\r"): + return sprintf('"%s"', str_replace(array('"', "\n", "\r"), array('\\"', '\n', '\r'), $value)); + case preg_match('/[ \s \' " \: \{ \} \[ \] , & \* \# \?] | \A[ - ? | < > = ! % @ ` ]/x', $value): + return sprintf("'%s'", str_replace('\'', '\'\'', $value)); + case '' == $value: + return "''"; + case preg_match(self::getTimestampRegex(), $value): + return "'$value'"; + case in_array(strtolower($value), $trueValues): + return "'$value'"; + case in_array(strtolower($value), $falseValues): + return "'$value'"; + case in_array(strtolower($value), array('null', '~')): + return "'$value'"; + default: + return $value; + } + } + + /** + * Dumps a PHP array to a YAML string. + * + * @param array $value The PHP array to dump + * + * @return string The YAML string representing the PHP array + */ + static protected function dumpArray($value) + { + // array + $keys = array_keys($value); + if ( + (1 == count($keys) && '0' == $keys[0]) + || + (count($keys) > 1 && array_reduce($keys, function ($v, $w) { return (integer) $v + $w; }, 0) == count($keys) * (count($keys) - 1) / 2)) + { + $output = array(); + foreach ($value as $val) + { + $output[] = self::dump($val); + } + + return sprintf('[%s]', implode(', ', $output)); + } + + // mapping + $output = array(); + foreach ($value as $key => $val) + { + $output[] = sprintf('%s: %s', self::dump($key), self::dump($val)); + } + + return sprintf('{ %s }', implode(', ', $output)); + } + + /** + * Parses a scalar to a YAML string. + * + * @param scalar $scalar + * @param string $delimiters + * @param array $stringDelimiter + * @param integer $i + * @param boolean $evaluate + * + * @return string A YAML string + */ + static public function parseScalar($scalar, $delimiters = null, $stringDelimiters = array('"', "'"), &$i = 0, $evaluate = true) + { + if (in_array($scalar[$i], $stringDelimiters)) + { + // quoted scalar + $output = self::parseQuotedScalar($scalar, $i); + } + else + { + // "normal" string + if (!$delimiters) + { + $output = substr($scalar, $i); + $i += strlen($output); + + // remove comments + if (false !== $strpos = strpos($output, ' #')) + { + $output = rtrim(substr($output, 0, $strpos)); + } + } + else if (preg_match('/^(.+?)('.implode('|', $delimiters).')/', substr($scalar, $i), $match)) + { + $output = $match[1]; + $i += strlen($output); + } + else + { + throw new ParserException(sprintf('Malformed inline YAML string (%s).', $scalar)); + } + + $output = $evaluate ? self::evaluateScalar($output) : $output; + } + + return $output; + } + + /** + * Parses a quoted scalar to YAML. + * + * @param string $scalar + * @param integer $i + * + * @return string A YAML string + */ + static protected function parseQuotedScalar($scalar, &$i) + { + if (!preg_match('/'.self::REGEX_QUOTED_STRING.'/A', substr($scalar, $i), $match)) + { + throw new ParserException(sprintf('Malformed inline YAML string (%s).', substr($scalar, $i))); + } + + $output = substr($match[0], 1, strlen($match[0]) - 2); + + if ('"' == $scalar[$i]) + { + // evaluate the string + $output = str_replace(array('\\"', '\\n', '\\r'), array('"', "\n", "\r"), $output); + } + else + { + // unescape ' + $output = str_replace('\'\'', '\'', $output); + } + + $i += strlen($match[0]); + + return $output; + } + + /** + * Parses a sequence to a YAML string. + * + * @param string $sequence + * @param integer $i + * + * @return string A YAML string + */ + static protected function parseSequence($sequence, &$i = 0) + { + $output = array(); + $len = strlen($sequence); + $i += 1; + + // [foo, bar, ...] + while ($i < $len) + { + switch ($sequence[$i]) + { + case '[': + // nested sequence + $output[] = self::parseSequence($sequence, $i); + break; + case '{': + // nested mapping + $output[] = self::parseMapping($sequence, $i); + break; + case ']': + return $output; + case ',': + case ' ': + break; + default: + $isQuoted = in_array($sequence[$i], array('"', "'")); + $value = self::parseScalar($sequence, array(',', ']'), array('"', "'"), $i); + + if (!$isQuoted && false !== strpos($value, ': ')) + { + // embedded mapping? + try + { + $value = self::parseMapping('{'.$value.'}'); + } + catch (\InvalidArgumentException $e) + { + // no, it's not + } + } + + $output[] = $value; + + --$i; + } + + ++$i; + } + + throw new ParserException(sprintf('Malformed inline YAML string %s', $sequence)); + } + + /** + * Parses a mapping to a YAML string. + * + * @param string $mapping + * @param integer $i + * + * @return string A YAML string + */ + static protected function parseMapping($mapping, &$i = 0) + { + $output = array(); + $len = strlen($mapping); + $i += 1; + + // {foo: bar, bar:foo, ...} + while ($i < $len) + { + switch ($mapping[$i]) + { + case ' ': + case ',': + ++$i; + continue 2; + case '}': + return $output; + } + + // key + $key = self::parseScalar($mapping, array(':', ' '), array('"', "'"), $i, false); + + // value + $done = false; + while ($i < $len) + { + switch ($mapping[$i]) + { + case '[': + // nested sequence + $output[$key] = self::parseSequence($mapping, $i); + $done = true; + break; + case '{': + // nested mapping + $output[$key] = self::parseMapping($mapping, $i); + $done = true; + break; + case ':': + case ' ': + break; + default: + $output[$key] = self::parseScalar($mapping, array(',', '}'), array('"', "'"), $i); + $done = true; + --$i; + } + + ++$i; + + if ($done) + { + continue 2; + } + } + } + + throw new ParserException(sprintf('Malformed inline YAML string %s', $mapping)); + } + + /** + * Evaluates scalars and replaces magic values. + * + * @param string $scalar + * + * @return string A YAML string + */ + static protected function evaluateScalar($scalar) + { + $scalar = trim($scalar); + + $trueValues = '1.1' == Yaml::getSpecVersion() ? array('true', 'on', '+', 'yes', 'y') : array('true'); + $falseValues = '1.1' == Yaml::getSpecVersion() ? array('false', 'off', '-', 'no', 'n') : array('false'); + + switch (true) + { + case 'null' == strtolower($scalar): + case '' == $scalar: + case '~' == $scalar: + return null; + case 0 === strpos($scalar, '!str'): + return (string) substr($scalar, 5); + case 0 === strpos($scalar, '! '): + return intval(self::parseScalar(substr($scalar, 2))); + case 0 === strpos($scalar, '!!php/object:'): + return unserialize(substr($scalar, 13)); + case ctype_digit($scalar): + $raw = $scalar; + $cast = intval($scalar); + return '0' == $scalar[0] ? octdec($scalar) : (((string) $raw == (string) $cast) ? $cast : $raw); + case in_array(strtolower($scalar), $trueValues): + return true; + case in_array(strtolower($scalar), $falseValues): + return false; + case is_numeric($scalar): + return '0x' == $scalar[0].$scalar[1] ? hexdec($scalar) : floatval($scalar); + case 0 == strcasecmp($scalar, '.inf'): + case 0 == strcasecmp($scalar, '.NaN'): + return -log(0); + case 0 == strcasecmp($scalar, '-.inf'): + return log(0); + case preg_match('/^(-|\+)?[0-9,]+(\.[0-9]+)?$/', $scalar): + return floatval(str_replace(',', '', $scalar)); + case preg_match(self::getTimestampRegex(), $scalar): + return strtotime($scalar); + default: + return (string) $scalar; + } + } + + static protected function getTimestampRegex() + { + return <<[0-9][0-9][0-9][0-9]) + -(?P[0-9][0-9]?) + -(?P[0-9][0-9]?) + (?:(?:[Tt]|[ \t]+) + (?P[0-9][0-9]?) + :(?P[0-9][0-9]) + :(?P[0-9][0-9]) + (?:\.(?P[0-9]*))? + (?:[ \t]*(?PZ|(?P[-+])(?P[0-9][0-9]?) + (?::(?P[0-9][0-9]))?))?)? + $~x +EOF; + } +} diff --git a/lib/vendor/Symfony/Components/Yaml/Parser.php b/lib/vendor/Symfony/Components/Yaml/Parser.php new file mode 100644 index 000000000..330f9a1ef --- /dev/null +++ b/lib/vendor/Symfony/Components/Yaml/Parser.php @@ -0,0 +1,587 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/** + * Parser parses YAML strings to convert them to PHP arrays. + * + * @package symfony + * @subpackage yaml + * @author Fabien Potencier + */ +class Parser +{ + protected $offset = 0; + protected $lines = array(); + protected $currentLineNb = -1; + protected $currentLine = ''; + protected $refs = array(); + + /** + * Constructor + * + * @param integer $offset The offset of YAML document (used for line numbers in error messages) + */ + public function __construct($offset = 0) + { + $this->offset = $offset; + } + + /** + * Parses a YAML string to a PHP value. + * + * @param string $value A YAML string + * + * @return mixed A PHP value + * + * @throws \InvalidArgumentException If the YAML is not valid + */ + public function parse($value) + { + $this->currentLineNb = -1; + $this->currentLine = ''; + $this->lines = explode("\n", $this->cleanup($value)); + + $data = array(); + while ($this->moveToNextLine()) + { + if ($this->isCurrentLineEmpty()) + { + continue; + } + + // tab? + if (preg_match('#^\t+#', $this->currentLine)) + { + throw new ParserException(sprintf('A YAML file cannot contain tabs as indentation at line %d (%s).', $this->getRealCurrentLineNb() + 1, $this->currentLine)); + } + + $isRef = $isInPlace = $isProcessed = false; + if (preg_match('#^\-((?P\s+)(?P.+?))?\s*$#', $this->currentLine, $values)) + { + if (isset($values['value']) && preg_match('#^&(?P[^ ]+) *(?P.*)#', $values['value'], $matches)) + { + $isRef = $matches['ref']; + $values['value'] = $matches['value']; + } + + // array + if (!isset($values['value']) || '' == trim($values['value'], ' ') || 0 === strpos(ltrim($values['value'], ' '), '#')) + { + $c = $this->getRealCurrentLineNb() + 1; + $parser = new Parser($c); + $parser->refs =& $this->refs; + $data[] = $parser->parse($this->getNextEmbedBlock()); + } + else + { + if (isset($values['leadspaces']) + && ' ' == $values['leadspaces'] + && preg_match('#^(?P'.Inline::REGEX_QUOTED_STRING.'|[^ \'"\{].*?) *\:(\s+(?P.+?))?\s*$#', $values['value'], $matches)) + { + // this is a compact notation element, add to next block and parse + $c = $this->getRealCurrentLineNb(); + $parser = new Parser($c); + $parser->refs =& $this->refs; + + $block = $values['value']; + if (!$this->isNextLineIndented()) + { + $block .= "\n".$this->getNextEmbedBlock($this->getCurrentLineIndentation() + 2); + } + + $data[] = $parser->parse($block); + } + else + { + $data[] = $this->parseValue($values['value']); + } + } + } + else if (preg_match('#^(?P'.Inline::REGEX_QUOTED_STRING.'|[^ \'"].*?) *\:(\s+(?P.+?))?\s*$#', $this->currentLine, $values)) + { + $key = Inline::parseScalar($values['key']); + + if ('<<' === $key) + { + if (isset($values['value']) && '*' === substr($values['value'], 0, 1)) + { + $isInPlace = substr($values['value'], 1); + if (!array_key_exists($isInPlace, $this->refs)) + { + throw new ParserException(sprintf('Reference "%s" does not exist at line %s (%s).', $isInPlace, $this->getRealCurrentLineNb() + 1, $this->currentLine)); + } + } + else + { + if (isset($values['value']) && $values['value'] !== '') + { + $value = $values['value']; + } + else + { + $value = $this->getNextEmbedBlock(); + } + $c = $this->getRealCurrentLineNb() + 1; + $parser = new Parser($c); + $parser->refs =& $this->refs; + $parsed = $parser->parse($value); + + $merged = array(); + if (!is_array($parsed)) + { + throw new ParserException(sprintf("YAML merge keys used with a scalar value instead of an array at line %s (%s)", $this->getRealCurrentLineNb() + 1, $this->currentLine)); + } + else if (isset($parsed[0])) + { + // Numeric array, merge individual elements + foreach (array_reverse($parsed) as $parsedItem) + { + if (!is_array($parsedItem)) + { + throw new ParserException(sprintf("Merge items must be arrays at line %s (%s).", $this->getRealCurrentLineNb() + 1, $parsedItem)); + } + $merged = array_merge($parsedItem, $merged); + } + } + else + { + // Associative array, merge + $merged = array_merge($merge, $parsed); + } + + $isProcessed = $merged; + } + } + else if (isset($values['value']) && preg_match('#^&(?P[^ ]+) *(?P.*)#', $values['value'], $matches)) + { + $isRef = $matches['ref']; + $values['value'] = $matches['value']; + } + + if ($isProcessed) + { + // Merge keys + $data = $isProcessed; + } + // hash + else if (!isset($values['value']) || '' == trim($values['value'], ' ') || 0 === strpos(ltrim($values['value'], ' '), '#')) + { + // if next line is less indented or equal, then it means that the current value is null + if ($this->isNextLineIndented()) + { + $data[$key] = null; + } + else + { + $c = $this->getRealCurrentLineNb() + 1; + $parser = new Parser($c); + $parser->refs =& $this->refs; + $data[$key] = $parser->parse($this->getNextEmbedBlock()); + } + } + else + { + if ($isInPlace) + { + $data = $this->refs[$isInPlace]; + } + else + { + $data[$key] = $this->parseValue($values['value']); + } + } + } + else + { + // 1-liner followed by newline + if (2 == count($this->lines) && empty($this->lines[1])) + { + $value = Inline::load($this->lines[0]); + if (is_array($value)) + { + $first = reset($value); + if ('*' === substr($first, 0, 1)) + { + $data = array(); + foreach ($value as $alias) + { + $data[] = $this->refs[substr($alias, 1)]; + } + $value = $data; + } + } + + return $value; + } + + switch (preg_last_error()) + { + case PREG_INTERNAL_ERROR: + $error = 'Internal PCRE error on line'; + break; + case PREG_BACKTRACK_LIMIT_ERROR: + $error = 'pcre.backtrack_limit reached on line'; + break; + case PREG_RECURSION_LIMIT_ERROR: + $error = 'pcre.recursion_limit reached on line'; + break; + case PREG_BAD_UTF8_ERROR: + $error = 'Malformed UTF-8 data on line'; + break; + case PREG_BAD_UTF8_OFFSET_ERROR: + $error = 'Offset doesn\'t correspond to the begin of a valid UTF-8 code point on line'; + break; + default: + $error = 'Unable to parse line'; + } + + throw new ParserException(sprintf('%s %d (%s).', $error, $this->getRealCurrentLineNb() + 1, $this->currentLine)); + } + + if ($isRef) + { + $this->refs[$isRef] = end($data); + } + } + + return empty($data) ? null : $data; + } + + /** + * Returns the current line number (takes the offset into account). + * + * @return integer The current line number + */ + protected function getRealCurrentLineNb() + { + return $this->currentLineNb + $this->offset; + } + + /** + * Returns the current line indentation. + * + * @return integer The current line indentation + */ + protected function getCurrentLineIndentation() + { + return strlen($this->currentLine) - strlen(ltrim($this->currentLine, ' ')); + } + + /** + * Returns the next embed block of YAML. + * + * @param integer $indentation The indent level at which the block is to be read, or null for default + * + * @return string A YAML string + */ + protected function getNextEmbedBlock($indentation = null) + { + $this->moveToNextLine(); + + if (null === $indentation) + { + $newIndent = $this->getCurrentLineIndentation(); + + if (!$this->isCurrentLineEmpty() && 0 == $newIndent) + { + throw new ParserException(sprintf('Indentation problem at line %d (%s)', $this->getRealCurrentLineNb() + 1, $this->currentLine)); + } + } + else + { + $newIndent = $indentation; + } + + $data = array(substr($this->currentLine, $newIndent)); + + while ($this->moveToNextLine()) + { + if ($this->isCurrentLineEmpty()) + { + if ($this->isCurrentLineBlank()) + { + $data[] = substr($this->currentLine, $newIndent); + } + + continue; + } + + $indent = $this->getCurrentLineIndentation(); + + if (preg_match('#^(?P *)$#', $this->currentLine, $match)) + { + // empty line + $data[] = $match['text']; + } + else if ($indent >= $newIndent) + { + $data[] = substr($this->currentLine, $newIndent); + } + else if (0 == $indent) + { + $this->moveToPreviousLine(); + + break; + } + else + { + throw new ParserException(sprintf('Indentation problem at line %d (%s)', $this->getRealCurrentLineNb() + 1, $this->currentLine)); + } + } + + return implode("\n", $data); + } + + /** + * Moves the parser to the next line. + */ + protected function moveToNextLine() + { + if ($this->currentLineNb >= count($this->lines) - 1) + { + return false; + } + + $this->currentLine = $this->lines[++$this->currentLineNb]; + + return true; + } + + /** + * Moves the parser to the previous line. + */ + protected function moveToPreviousLine() + { + $this->currentLine = $this->lines[--$this->currentLineNb]; + } + + /** + * Parses a YAML value. + * + * @param string $value A YAML value + * + * @return mixed A PHP value + */ + protected function parseValue($value) + { + if ('*' === substr($value, 0, 1)) + { + if (false !== $pos = strpos($value, '#')) + { + $value = substr($value, 1, $pos - 2); + } + else + { + $value = substr($value, 1); + } + + if (!array_key_exists($value, $this->refs)) + { + throw new ParserException(sprintf('Reference "%s" does not exist (%s).', $value, $this->currentLine)); + } + return $this->refs[$value]; + } + + if (preg_match('/^(?P\||>)(?P\+|\-|\d+|\+\d+|\-\d+|\d+\+|\d+\-)?(?P +#.*)?$/', $value, $matches)) + { + $modifiers = isset($matches['modifiers']) ? $matches['modifiers'] : ''; + + return $this->parseFoldedScalar($matches['separator'], preg_replace('#\d+#', '', $modifiers), intval(abs($modifiers))); + } + else + { + return Inline::load($value); + } + } + + /** + * Parses a folded scalar. + * + * @param string $separator The separator that was used to begin this folded scalar (| or >) + * @param string $indicator The indicator that was used to begin this folded scalar (+ or -) + * @param integer $indentation The indentation that was used to begin this folded scalar + * + * @return string The text value + */ + protected function parseFoldedScalar($separator, $indicator = '', $indentation = 0) + { + $separator = '|' == $separator ? "\n" : ' '; + $text = ''; + + $notEOF = $this->moveToNextLine(); + + while ($notEOF && $this->isCurrentLineBlank()) + { + $text .= "\n"; + + $notEOF = $this->moveToNextLine(); + } + + if (!$notEOF) + { + return ''; + } + + if (!preg_match('#^(?P'.($indentation ? str_repeat(' ', $indentation) : ' +').')(?P.*)$#', $this->currentLine, $matches)) + { + $this->moveToPreviousLine(); + + return ''; + } + + $textIndent = $matches['indent']; + $previousIndent = 0; + + $text .= $matches['text'].$separator; + while ($this->currentLineNb + 1 < count($this->lines)) + { + $this->moveToNextLine(); + + if (preg_match('#^(?P {'.strlen($textIndent).',})(?P.+)$#', $this->currentLine, $matches)) + { + if (' ' == $separator && $previousIndent != $matches['indent']) + { + $text = substr($text, 0, -1)."\n"; + } + $previousIndent = $matches['indent']; + + $text .= str_repeat(' ', $diff = strlen($matches['indent']) - strlen($textIndent)).$matches['text'].($diff ? "\n" : $separator); + } + else if (preg_match('#^(?P *)$#', $this->currentLine, $matches)) + { + $text .= preg_replace('#^ {1,'.strlen($textIndent).'}#', '', $matches['text'])."\n"; + } + else + { + $this->moveToPreviousLine(); + + break; + } + } + + if (' ' == $separator) + { + // replace last separator by a newline + $text = preg_replace('/ (\n*)$/', "\n$1", $text); + } + + switch ($indicator) + { + case '': + $text = preg_replace('#\n+$#s', "\n", $text); + break; + case '+': + break; + case '-': + $text = preg_replace('#\n+$#s', '', $text); + break; + } + + return $text; + } + + /** + * Returns true if the next line is indented. + * + * @return Boolean Returns true if the next line is indented, false otherwise + */ + protected function isNextLineIndented() + { + $currentIndentation = $this->getCurrentLineIndentation(); + $notEOF = $this->moveToNextLine(); + + while ($notEOF && $this->isCurrentLineEmpty()) + { + $notEOF = $this->moveToNextLine(); + } + + if (false === $notEOF) + { + return false; + } + + $ret = false; + if ($this->getCurrentLineIndentation() <= $currentIndentation) + { + $ret = true; + } + + $this->moveToPreviousLine(); + + return $ret; + } + + /** + * Returns true if the current line is blank or if it is a comment line. + * + * @return Boolean Returns true if the current line is empty or if it is a comment line, false otherwise + */ + protected function isCurrentLineEmpty() + { + return $this->isCurrentLineBlank() || $this->isCurrentLineComment(); + } + + /** + * Returns true if the current line is blank. + * + * @return Boolean Returns true if the current line is blank, false otherwise + */ + protected function isCurrentLineBlank() + { + return '' == trim($this->currentLine, ' '); + } + + /** + * Returns true if the current line is a comment line. + * + * @return Boolean Returns true if the current line is a comment line, false otherwise + */ + protected function isCurrentLineComment() + { + //checking explicitly the first char of the trim is faster than loops or strpos + $ltrimmedLine = ltrim($this->currentLine, ' '); + return $ltrimmedLine[0] === '#'; + } + + /** + * Cleanups a YAML string to be parsed. + * + * @param string $value The input YAML string + * + * @return string A cleaned up YAML string + */ + protected function cleanup($value) + { + $value = str_replace(array("\r\n", "\r"), "\n", $value); + + if (!preg_match("#\n$#", $value)) + { + $value .= "\n"; + } + + // strip YAML header + $count = 0; + $value = preg_replace('#^\%YAML[: ][\d\.]+.*\n#s', '', $value, -1, $count); + $this->offset += $count; + + // remove leading comments and/or --- + $trimmedValue = preg_replace('#^((\#.*?\n)|(\-\-\-.*?\n))*#s', '', $value, -1, $count); + if ($count == 1) + { + // items have been removed, update the offset + $this->offset += substr_count($value, "\n") - substr_count($trimmedValue, "\n"); + $value = $trimmedValue; + } + + return $value; + } +} diff --git a/lib/vendor/Symfony/Components/Yaml/ParserException.php b/lib/vendor/Symfony/Components/Yaml/ParserException.php new file mode 100644 index 000000000..5ba22291d --- /dev/null +++ b/lib/vendor/Symfony/Components/Yaml/ParserException.php @@ -0,0 +1,23 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/** + * Exception class used by all exceptions thrown by the component. + * + * @package symfony + * @subpackage yaml + * @author Fabien Potencier + */ +class ParserException extends Exception +{ +} diff --git a/lib/vendor/Symfony/Components/Yaml/Yaml.php b/lib/vendor/Symfony/Components/Yaml/Yaml.php new file mode 100644 index 000000000..ff8671d5f --- /dev/null +++ b/lib/vendor/Symfony/Components/Yaml/Yaml.php @@ -0,0 +1,121 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +/** + * Yaml offers convenience methods to load and dump YAML. + * + * @package symfony + * @subpackage yaml + * @author Fabien Potencier + */ +class Yaml +{ + static protected $spec = '1.2'; + + /** + * Sets the YAML specification version to use. + * + * @param string $version The YAML specification version + */ + static public function setSpecVersion($version) + { + if (!in_array($version, array('1.1', '1.2'))) + { + throw new \InvalidArgumentException(sprintf('Version %s of the YAML specifications is not supported', $version)); + } + + self::$spec = $version; + } + + /** + * Gets the YAML specification version to use. + * + * @return string The YAML specification version + */ + static public function getSpecVersion() + { + return self::$spec; + } + + /** + * Loads YAML into a PHP array. + * + * The load method, when supplied with a YAML stream (string or file), + * will do its best to convert YAML in a file into a PHP array. + * + * Usage: + * + * $array = Yaml::load('config.yml'); + * print_r($array); + * + * + * @param string $input Path of YAML file or string containing YAML + * + * @return array The YAML converted to a PHP array + * + * @throws \InvalidArgumentException If the YAML is not valid + */ + public static function load($input) + { + $file = ''; + + // if input is a file, process it + if (strpos($input, "\n") === false && is_file($input)) + { + $file = $input; + + ob_start(); + $retval = include($input); + $content = ob_get_clean(); + + // if an array is returned by the config file assume it's in plain php form else in YAML + $input = is_array($retval) ? $retval : $content; + } + + // if an array is returned by the config file assume it's in plain php form else in YAML + if (is_array($input)) + { + return $input; + } + + $yaml = new Parser(); + + try + { + $ret = $yaml->parse($input); + } + catch (\Exception $e) + { + throw new \InvalidArgumentException(sprintf('Unable to parse %s: %s', $file ? sprintf('file "%s"', $file) : 'string', $e->getMessage())); + } + + return $ret; + } + + /** + * Dumps a PHP array to a YAML string. + * + * The dump method, when supplied with an array, will do its best + * to convert the array into friendly YAML. + * + * @param array $array PHP array + * @param integer $inline The level where you switch to inline YAML + * + * @return string A YAML string representing the original PHP array + */ + public static function dump($array, $inline = 2) + { + $yaml = new Dumper(); + + return $yaml->dump($array, $inline); + } +} From e4d8efa39466620dad6b86d812b083e0400dd44f Mon Sep 17 00:00:00 2001 From: Guilherme Blanco Date: Fri, 9 Apr 2010 00:53:29 -0300 Subject: [PATCH 06/86] [2.0] Couple of fixes to new Console implementation --- lib/Doctrine/Common/Version.php | 2 +- .../DBAL/Tools/Console/Command/RunSqlCommand.php | 3 +-- .../ORM/Tools/Console/Command/RunDqlCommand.php | 2 +- .../Console/Command/SchemaTool/CreateCommand.php | 2 +- .../Console/Command/SchemaTool/DropCommand.php | 2 +- .../Console/Command/SchemaTool/UpdateCommand.php | 2 +- tools/sandbox/cli-config.php | 14 -------------- 7 files changed, 6 insertions(+), 21 deletions(-) diff --git a/lib/Doctrine/Common/Version.php b/lib/Doctrine/Common/Version.php index 2e1847dc6..fd1b499f0 100644 --- a/lib/Doctrine/Common/Version.php +++ b/lib/Doctrine/Common/Version.php @@ -38,7 +38,7 @@ class Version /** * Current Doctrine Version */ - const VERSION = '2.0 ALPHA 4'; + const VERSION = '2.0-DEV'; /** * Compares a Doctrine version with the current one. diff --git a/lib/Doctrine/DBAL/Tools/Console/Command/RunSqlCommand.php b/lib/Doctrine/DBAL/Tools/Console/Command/RunSqlCommand.php index 6c5ee824e..0e6c05c82 100644 --- a/lib/Doctrine/DBAL/Tools/Console/Command/RunSqlCommand.php +++ b/lib/Doctrine/DBAL/Tools/Console/Command/RunSqlCommand.php @@ -76,8 +76,7 @@ EOT } if (preg_match('/^select/i', $sql)) { - $stmt = $conn->execute($sql); - $resultSet = $stmt->fetchAll(\Doctrine\DBAL\Connection::FETCH_ASSOC); + $resultSet = $conn->fetchAll($sql); } else { $resultSet = $em->getConnection()->executeUpdate($sql); } diff --git a/lib/Doctrine/ORM/Tools/Console/Command/RunDqlCommand.php b/lib/Doctrine/ORM/Tools/Console/Command/RunDqlCommand.php index c995fba7b..fc375812b 100644 --- a/lib/Doctrine/ORM/Tools/Console/Command/RunDqlCommand.php +++ b/lib/Doctrine/ORM/Tools/Console/Command/RunDqlCommand.php @@ -117,7 +117,7 @@ EOT $query->setMaxResult((int) $maxResult); } - $resultSet = $query->execute(array(), $hydrationMode); + $resultSet = $query->execute(array(), constant($hydrationMode)); \Doctrine\Common\Util\Debug::dump($resultSet, $input->getOption('depth')); } diff --git a/lib/Doctrine/ORM/Tools/Console/Command/SchemaTool/CreateCommand.php b/lib/Doctrine/ORM/Tools/Console/Command/SchemaTool/CreateCommand.php index 4ca0b3090..fd724c2df 100644 --- a/lib/Doctrine/ORM/Tools/Console/Command/SchemaTool/CreateCommand.php +++ b/lib/Doctrine/ORM/Tools/Console/Command/SchemaTool/CreateCommand.php @@ -76,7 +76,7 @@ EOT { $em = $this->getHelper('em')->getEntityManager(); - $reader = new ClassMetadataReader(); + $reader = new \Doctrine\ORM\Tools\ClassMetadataReader(); $reader->setEntityManager($em); // Process source directories diff --git a/lib/Doctrine/ORM/Tools/Console/Command/SchemaTool/DropCommand.php b/lib/Doctrine/ORM/Tools/Console/Command/SchemaTool/DropCommand.php index b41c616a8..9bcf280e7 100644 --- a/lib/Doctrine/ORM/Tools/Console/Command/SchemaTool/DropCommand.php +++ b/lib/Doctrine/ORM/Tools/Console/Command/SchemaTool/DropCommand.php @@ -77,7 +77,7 @@ EOT { $em = $this->getHelper('em')->getEntityManager(); - $reader = new ClassMetadataReader(); + $reader = new \Doctrine\ORM\Tools\ClassMetadataReader(); $reader->setEntityManager($em); // Process source directories diff --git a/lib/Doctrine/ORM/Tools/Console/Command/SchemaTool/UpdateCommand.php b/lib/Doctrine/ORM/Tools/Console/Command/SchemaTool/UpdateCommand.php index 9aba1e9cd..7d85bb6a9 100644 --- a/lib/Doctrine/ORM/Tools/Console/Command/SchemaTool/UpdateCommand.php +++ b/lib/Doctrine/ORM/Tools/Console/Command/SchemaTool/UpdateCommand.php @@ -82,7 +82,7 @@ EOT { $em = $this->getHelper('em')->getEntityManager(); - $reader = new ClassMetadataReader(); + $reader = new \Doctrine\ORM\Tools\ClassMetadataReader(); $reader->setEntityManager($em); // Process source directories diff --git a/tools/sandbox/cli-config.php b/tools/sandbox/cli-config.php index 887780dd9..dc2c9875e 100644 --- a/tools/sandbox/cli-config.php +++ b/tools/sandbox/cli-config.php @@ -1,18 +1,4 @@ option where you can specify the configuration -# file to use for a particular task. If this option is not given, the CLI looks for a file -# named "cli-config.php" (this one) in the same directory and uses that by default. -# require_once __DIR__ . '/../../lib/Doctrine/Common/ClassLoader.php'; From c98543c1efc3ddd8ee80cf62b56775922cf69173 Mon Sep 17 00:00:00 2001 From: Benjamin Eberlei Date: Fri, 9 Apr 2010 15:34:53 +0200 Subject: [PATCH 07/86] Fix bin/doctrine.php global doctrine binary to work with Symfony components --- bin/doctrine.php | 42 ++++++++++++++++++++++++++++++++++-------- 1 file changed, 34 insertions(+), 8 deletions(-) diff --git a/bin/doctrine.php b/bin/doctrine.php index cd507f6c7..b1a29efeb 100644 --- a/bin/doctrine.php +++ b/bin/doctrine.php @@ -2,12 +2,15 @@ require_once 'Doctrine/Common/ClassLoader.php'; -$classLoader = new \Doctrine\Common\ClassLoader('Doctrine'); +$classLoader = new \Doctrine\Common\ClassLoader('Doctrine', __DIR__ . '/../lib'); +$classLoader->register(); + +$classLoader = new \Doctrine\Common\ClassLoader('Symfony', __DIR__ . '/../lib/vendor'); $classLoader->register(); $configFile = getcwd() . DIRECTORY_SEPARATOR . 'cli-config.php'; -$configuration = null; +$helperSet = null; if (file_exists($configFile)) { if ( ! is_readable($configFile)) { trigger_error( @@ -17,15 +20,38 @@ if (file_exists($configFile)) { require $configFile; - foreach ($GLOBALS as $configCandidate) { - if ($configCandidate instanceof \Doctrine\Common\CLI\Configuration) { - $configuration = $configCandidate; + foreach ($GLOBALS as $helperSetCandidate) { + if ($helperSetCandidate instanceof \Symfony\Components\Console\Helper\HelperSet) { + $helperSet = $helperSetCandidate; break; } } } -$configuration = ($configuration) ?: new \Doctrine\Common\CLI\Configuration(); +$helperSet = ($helperSet) ?: new \Symfony\Components\Console\Helper\HelperSet(); -$cli = new \Doctrine\Common\CLI\CLIController($configuration); -$cli->run($_SERVER['argv']); \ No newline at end of file +$cli = new \Symfony\Components\Console\Application('Doctrine Command Line Interface', Doctrine\Common\Version::VERSION); +$cli->setCatchExceptions(true); +$cli->setHelperSet($helperSet); +$cli->addCommands(array( + // DBAL Commands + new \Doctrine\DBAL\Tools\Console\Command\RunSqlCommand(), + new \Doctrine\DBAL\Tools\Console\Command\ImportCommand(), + + // ORM Commands + new \Doctrine\ORM\Tools\Console\Command\ClearCache\MetadataCommand(), + new \Doctrine\ORM\Tools\Console\Command\ClearCache\ResultCommand(), + new \Doctrine\ORM\Tools\Console\Command\ClearCache\QueryCommand(), + new \Doctrine\ORM\Tools\Console\Command\SchemaTool\CreateCommand(), + new \Doctrine\ORM\Tools\Console\Command\SchemaTool\UpdateCommand(), + new \Doctrine\ORM\Tools\Console\Command\SchemaTool\DropCommand(), + new \Doctrine\ORM\Tools\Console\Command\EnsureProductionSettingsCommand(), + new \Doctrine\ORM\Tools\Console\Command\ConvertDoctrine1SchemaCommand(), + new \Doctrine\ORM\Tools\Console\Command\GenerateRepositoriesCommand(), + new \Doctrine\ORM\Tools\Console\Command\GenerateEntitiesCommand(), + new \Doctrine\ORM\Tools\Console\Command\GenerateProxiesCommand(), + new \Doctrine\ORM\Tools\Console\Command\ConvertMappingCommand(), + new \Doctrine\ORM\Tools\Console\Command\RunDqlCommand(), + +)); +$cli->run(); \ No newline at end of file From b67e1f86228ceba5d90fc7a0bfc5ede4e1616d0a Mon Sep 17 00:00:00 2001 From: Benjamin Eberlei Date: Fri, 9 Apr 2010 15:40:42 +0200 Subject: [PATCH 08/86] Fixed testsuite after CLI refactorings, Removed Symfony YAML Autoloader Hack --- tests/Doctrine/Tests/Common/AllTests.php | 1 - tests/Doctrine/Tests/Common/CLI/AllTests.php | 34 ----- .../Tests/Common/CLI/CLIControllerTest.php | 115 ---------------- .../Tests/Common/CLI/ConfigurationTest.php | 23 ---- .../Tests/Common/CLI/OptionGroupTest.php | 123 ------------------ .../Doctrine/Tests/Common/CLI/OptionTest.php | 40 ------ tests/Doctrine/Tests/Common/CLI/StyleTest.php | 19 --- tests/Doctrine/Tests/TestInit.php | 12 +- 8 files changed, 3 insertions(+), 364 deletions(-) delete mode 100644 tests/Doctrine/Tests/Common/CLI/AllTests.php delete mode 100644 tests/Doctrine/Tests/Common/CLI/CLIControllerTest.php delete mode 100644 tests/Doctrine/Tests/Common/CLI/ConfigurationTest.php delete mode 100644 tests/Doctrine/Tests/Common/CLI/OptionGroupTest.php delete mode 100644 tests/Doctrine/Tests/Common/CLI/OptionTest.php delete mode 100644 tests/Doctrine/Tests/Common/CLI/StyleTest.php diff --git a/tests/Doctrine/Tests/Common/AllTests.php b/tests/Doctrine/Tests/Common/AllTests.php index 0afc81277..db6e81ffa 100644 --- a/tests/Doctrine/Tests/Common/AllTests.php +++ b/tests/Doctrine/Tests/Common/AllTests.php @@ -29,7 +29,6 @@ class AllTests $suite->addTest(Collections\AllTests::suite()); $suite->addTest(Annotations\AllTests::suite()); $suite->addTest(Cache\AllTests::suite()); - $suite->addTest(CLI\AllTests::suite()); return $suite; } diff --git a/tests/Doctrine/Tests/Common/CLI/AllTests.php b/tests/Doctrine/Tests/Common/CLI/AllTests.php deleted file mode 100644 index 101309fe5..000000000 --- a/tests/Doctrine/Tests/Common/CLI/AllTests.php +++ /dev/null @@ -1,34 +0,0 @@ -addTestSuite('Doctrine\Tests\Common\CLI\ConfigurationTest'); - $suite->addTestSuite('Doctrine\Tests\Common\CLI\OptionTest'); - $suite->addTestSuite('Doctrine\Tests\Common\CLI\OptionGroupTest'); - $suite->addTestSuite('Doctrine\Tests\Common\CLI\StyleTest'); - //$suite->addTestSuite('Doctrine\Tests\Common\CLI\CLIControllerTest'); - - return $suite; - } -} - -if (PHPUnit_MAIN_METHOD == 'Common_CLI_AllTests::main') { - AllTests::main(); -} \ No newline at end of file diff --git a/tests/Doctrine/Tests/Common/CLI/CLIControllerTest.php b/tests/Doctrine/Tests/Common/CLI/CLIControllerTest.php deleted file mode 100644 index 60d7214a7..000000000 --- a/tests/Doctrine/Tests/Common/CLI/CLIControllerTest.php +++ /dev/null @@ -1,115 +0,0 @@ - - */ -class CLIControllerTest extends \Doctrine\Tests\DoctrineTestCase -{ - private $cli; - - /** - * Sets up a CLIController instance with a task referencing the TaskMock - * class. Instances of that class created by the CLIController can be - * inspected for correctness. - */ - function setUp() - { - $config = $this->getMock('\Doctrine\Common\CLI\Configuration'); - $printer = $this->getMockForAbstractClass('\Doctrine\Common\CLI\Printers\AbstractPrinter'); - - $this->cli = new CLIController($config, $printer); - - TaskMock::$instances = array(); - - $this->cli->addTask('task-mock', '\Doctrine\Tests\Mocks\TaskMock'); - } - - /** - * Data provider with a bunch of task-mock calls with different arguments - * and their expected parsed format. - */ - static public function dataCLIControllerArguments() - { - return array( - array( - array('doctrine', 'Core:task-mock', '--bool'), - array('bool' => true), - 'Bool option' - ), - array( - array('doctrine', 'Core:task-mock', '--option=value'), - array('option' => 'value'), - 'Option with string value' - ), - array( - array('doctrine', 'Core:task-mock', '--option=value, with additional, info'), - array('option' => 'value, with additional, info'), - 'Option with string value containing space and comma' - ), - array( - array('doctrine', 'Core:task-mock', '--option='), - array('option' => array()), - 'Empty option value' - ), - array( - array('doctrine', 'Core:task-mock', '--option=value1,value2,value3'), - array('option' => array('value1', 'value2', 'value3')), - 'Option with list of string values' - ), - ); - } - - /** - * Checks whether the arguments coming from the data provider are correctly - * parsed by the CLIController and passed to the task to be run. - * - * @dataProvider dataCLIControllerArguments - * @param array $rawArgs - * @param array $parsedArgs - * @param string $message - */ - public function testArgumentParsing($rawArgs, $parsedArgs, $message) - { - $this->cli->run($rawArgs); - - $this->assertEquals(count(TaskMock::$instances), 1); - - $task = TaskMock::$instances[0]; - - $this->assertEquals($task->getArguments(), $parsedArgs, $message); - } - - /** - * Checks whether multiple tasks in one command are correctly run with - * their respective options. - */ - public function testMultipleTaskExecution() - { - $this->cli->run(array( - 'doctrine', - 'Core:task-mock', - '--option=', - 'Core:task-mock', - '--bool' - )); - - $this->assertEquals(count(TaskMock::$instances), 2); - - $task0 = TaskMock::$instances[0]; - $task1 = TaskMock::$instances[1]; - - $this->assertEquals($task0->getRunCounter(), 1); - $this->assertEquals($task1->getRunCounter(), 1); - - $this->assertEquals($task0->getArguments(), array('option' => array())); - $this->assertEquals($task1->getArguments(), array('bool' => true)); - } -} diff --git a/tests/Doctrine/Tests/Common/CLI/ConfigurationTest.php b/tests/Doctrine/Tests/Common/CLI/ConfigurationTest.php deleted file mode 100644 index 0d9e9d9b2..000000000 --- a/tests/Doctrine/Tests/Common/CLI/ConfigurationTest.php +++ /dev/null @@ -1,23 +0,0 @@ -setAttribute('name', 'value'); - - $this->assertTrue($config->hasAttribute('name')); - $this->assertEquals('value', $config->hasAttribute('name')); - - $config->setAttribute('name'); - - $this->assertFalse($config->hasAttribute('name')); - } -} \ No newline at end of file diff --git a/tests/Doctrine/Tests/Common/CLI/OptionGroupTest.php b/tests/Doctrine/Tests/Common/CLI/OptionGroupTest.php deleted file mode 100644 index fcd55f9fe..000000000 --- a/tests/Doctrine/Tests/Common/CLI/OptionGroupTest.php +++ /dev/null @@ -1,123 +0,0 @@ -_printer = new NormalPrinter(); - - $this->_options[0] = new Option('name', null, 'First option description'); - $this->_options[1] = new Option('another-name', 'value', 'Second option description'); - $this->_options[2] = new Option('third-name', array('value1', 'value2'), 'Third option description'); - } - - public function testCommonFunctionality() - { - $optionGroup = new OptionGroup(OptionGroup::CARDINALITY_0_N, $this->_options); - - $this->assertEquals(3, count($optionGroup->getOptions())); - - $this->assertEquals( - '--name First option description' . PHP_EOL . PHP_EOL . - '--another-name=value Second option description' . PHP_EOL . PHP_EOL . - '--third-name=value1,value2 Third option description' . PHP_EOL . PHP_EOL, - $optionGroup->formatWithDescription($this->_printer) - ); - - $optionGroup->clear(); - - $this->assertEquals(0, count($optionGroup->getOptions())); - $this->assertEquals('', $optionGroup->formatPlain($this->_printer)); - $this->assertEquals( - 'No available options' . PHP_EOL . PHP_EOL, - $optionGroup->formatWithDescription($this->_printer) - ); - - $optionGroup->addOption($this->_options[0]); - $optionGroup->addOption($this->_options[1]); - - $this->assertEquals(2, count($optionGroup->getOptions())); - } - - public function testCardinality0toN() - { - $optionGroup = new OptionGroup(OptionGroup::CARDINALITY_0_N, $this->_options); - - $this->assertEquals(OptionGroup::CARDINALITY_0_N, $optionGroup->getCardinality()); - - $this->assertEquals( - '[--name] [--another-name=value] [--third-name=value1,value2]', - $optionGroup->formatPlain($this->_printer) - ); - } - - public function testCardinality0to1() - { - $optionGroup = new OptionGroup(OptionGroup::CARDINALITY_0_1, $this->_options); - - $this->assertEquals(OptionGroup::CARDINALITY_0_1, $optionGroup->getCardinality()); - - $this->assertEquals( - '[--name | --another-name=value | --third-name=value1,value2]', - $optionGroup->formatPlain($this->_printer) - ); - } - - public function testCardinality1to1() - { - $optionGroup = new OptionGroup(OptionGroup::CARDINALITY_1_1, $this->_options); - - $this->assertEquals(OptionGroup::CARDINALITY_1_1, $optionGroup->getCardinality()); - - $this->assertEquals( - '(--name | --another-name=value | --third-name=value1,value2)', - $optionGroup->formatPlain($this->_printer) - ); - } - - public function testCardinality1toN() - { - $optionGroup = new OptionGroup(OptionGroup::CARDINALITY_1_N, $this->_options); - - $this->assertEquals(OptionGroup::CARDINALITY_1_N, $optionGroup->getCardinality()); - - $this->assertEquals( - '(--name --another-name=value --third-name=value1,value2)', - $optionGroup->formatPlain($this->_printer) - ); - } - - public function testCardinalityNtoN() - { - $optionGroup = new OptionGroup(OptionGroup::CARDINALITY_N_N, $this->_options); - - $this->assertEquals(OptionGroup::CARDINALITY_N_N, $optionGroup->getCardinality()); - - $this->assertEquals( - '--name --another-name=value --third-name=value1,value2', - $optionGroup->formatPlain($this->_printer) - ); - } - - public function testCardinalityMtoN() - { - $optionGroup = new OptionGroup(OptionGroup::CARDINALITY_M_N, $this->_options); - - $this->assertEquals(OptionGroup::CARDINALITY_M_N, $optionGroup->getCardinality()); - - $this->assertEquals( - '--name --another-name=value --third-name=value1,value2', - $optionGroup->formatPlain($this->_printer) - ); - } -} \ No newline at end of file diff --git a/tests/Doctrine/Tests/Common/CLI/OptionTest.php b/tests/Doctrine/Tests/Common/CLI/OptionTest.php deleted file mode 100644 index d6f68a928..000000000 --- a/tests/Doctrine/Tests/Common/CLI/OptionTest.php +++ /dev/null @@ -1,40 +0,0 @@ -assertEquals('name', $option->getName()); - $this->assertEquals('value', $option->getDefaultValue()); - $this->assertEquals('Description', $option->getDescription()); - } - - public function testStringCastWithDefaultValue() - { - $option = new Option('name', 'value', 'Description'); - - $this->assertEquals('--name=value', (string) $option); - } - - public function testStringCastWithoutDefaultValue() - { - $option = new Option('name', null, 'Description'); - - $this->assertEquals('--name', (string) $option); - } - - public function testStringCastWithArrayDefaultValue() - { - $option = new Option('name', array('value1', 'value2'), 'Description'); - - $this->assertEquals('--name=value1,value2', (string) $option); - } -} \ No newline at end of file diff --git a/tests/Doctrine/Tests/Common/CLI/StyleTest.php b/tests/Doctrine/Tests/Common/CLI/StyleTest.php deleted file mode 100644 index cdc956b5a..000000000 --- a/tests/Doctrine/Tests/Common/CLI/StyleTest.php +++ /dev/null @@ -1,19 +0,0 @@ - true)); - - $this->assertEquals('BLACK', $style->getForeground()); - $this->assertEquals('WHITE', $style->getBackground()); - $this->assertEquals(array('BOLD' => true), $style->getOptions()); - } -} \ No newline at end of file diff --git a/tests/Doctrine/Tests/TestInit.php b/tests/Doctrine/Tests/TestInit.php index c6b0e29f8..1c7bea434 100644 --- a/tests/Doctrine/Tests/TestInit.php +++ b/tests/Doctrine/Tests/TestInit.php @@ -13,6 +13,9 @@ require_once __DIR__ . '/../../../lib/Doctrine/Common/ClassLoader.php'; $classLoader = new \Doctrine\Common\ClassLoader('Doctrine'); $classLoader->register(); +$classLoader = new \Doctrine\Common\ClassLoader('Symfony', __DIR__ . "/../../../lib/vendor"); +$classLoader->register(); + if (!file_exists(__DIR__."/Proxies")) { if (!mkdir(__DIR__."/Proxies")) { throw new Exception("Could not create " . __DIR__."/Proxies Folder."); @@ -24,15 +27,6 @@ if (!file_exists(__DIR__."/ORM/Proxy/generated")) { } } -spl_autoload_register(function($class) { - if (strpos($class, 'Symfony') === 0) { - $file = str_replace("\\", "/", $class); - if (@fopen($class, "r")) { - require_once ($file); - } - } -}); - set_include_path( __DIR__ . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . 'lib' . PATH_SEPARATOR . From 7cc56c45d334f6e9d2c21de3c8e90d8734d26285 Mon Sep 17 00:00:00 2001 From: "Roman S. Borschel" Date: Sat, 10 Apr 2010 00:00:36 +0200 Subject: [PATCH 09/86] [DDC-193] Fixed. --- UPGRADE_TO_2_0 | 2 +- doctrine-mapping.xsd | 9 ++- lib/Doctrine/Common/EventArgs.php | 2 +- lib/Doctrine/Common/EventSubscriber.php | 7 +-- .../ORM/Internal/Hydration/ObjectHydrator.php | 9 +-- lib/Doctrine/ORM/Mapping/ClassMetadata.php | 1 - .../ORM/Mapping/ClassMetadataInfo.php | 58 +------------------ .../ORM/Mapping/Driver/AbstractFileDriver.php | 12 ++-- .../ORM/Mapping/Driver/AnnotationDriver.php | 4 +- .../ORM/Mapping/Driver/DatabaseDriver.php | 4 +- .../Mapping/Driver/DoctrineAnnotations.php | 2 - .../ORM/Mapping/Driver/DriverChain.php | 6 +- lib/Doctrine/ORM/Mapping/Driver/PhpDriver.php | 1 - lib/Doctrine/ORM/Mapping/Driver/XmlDriver.php | 29 +++++++--- .../ORM/Mapping/Driver/YamlDriver.php | 14 ++++- .../ORM/Mapping/ManyToManyMapping.php | 12 ++-- lib/Doctrine/ORM/Mapping/OneToOneMapping.php | 14 ++--- lib/Doctrine/ORM/PersistentCollection.php | 17 +----- .../AbstractCollectionPersister.php | 2 +- .../Persisters/StandardEntityPersister.php | 4 +- lib/Doctrine/ORM/UnitOfWork.php | 8 +-- .../Doctrine/Tests/Models/CMS/CmsAddress.php | 12 ++-- .../Doctrine/Tests/Models/CMS/CmsArticle.php | 2 +- .../Doctrine/Tests/Models/CMS/CmsComment.php | 2 +- .../Doctrine/Tests/Models/CMS/CmsEmployee.php | 4 +- tests/Doctrine/Tests/Models/CMS/CmsGroup.php | 4 +- .../Tests/Models/CMS/CmsPhonenumber.php | 4 +- tests/Doctrine/Tests/Models/CMS/CmsUser.php | 2 +- .../Tests/Models/Company/CompanyEvent.php | 4 +- .../Tests/Models/Company/CompanyPerson.php | 4 +- .../Tests/Models/Company/CompanyRaffle.php | 2 +- .../Tests/Models/ECommerce/ECommerceCart.php | 6 +- .../Models/ECommerce/ECommerceCategory.php | 2 +- .../Models/ECommerce/ECommerceFeature.php | 6 +- .../Models/ECommerce/ECommerceProduct.php | 10 ++-- .../Models/ECommerce/ECommerceShipping.php | 2 +- .../Tests/Models/Forum/ForumBoard.php | 2 +- .../Doctrine/Tests/Models/Forum/ForumUser.php | 3 +- .../Tests/Models/Generic/DateTimeModel.php | 2 +- .../Tests/Models/Routing/RoutingLeg.php | 7 +-- .../Tests/Models/Routing/RoutingLocation.php | 3 +- .../Tests/Models/Routing/RoutingRoute.php | 2 +- .../Models/Routing/RoutingRouteBooking.php | 4 +- .../ORM/Functional/Ticket/DDC144Test.php | 8 +-- .../ORM/Functional/Ticket/DDC199Test.php | 8 +-- .../ORM/Functional/Ticket/DDC211Test.php | 2 +- .../ORM/Functional/Ticket/DDC237Test.php | 6 +- .../ORM/Functional/Ticket/DDC279Test.php | 8 +-- .../ORM/Functional/Ticket/DDC309Test.php | 4 +- .../ORM/Functional/Ticket/DDC345Test.php | 4 +- .../ORM/Functional/Ticket/DDC353Test.php | 3 +- .../ORM/Functional/Ticket/DDC371Test.php | 2 +- .../ORM/Functional/Ticket/DDC381Test.php | 2 +- .../Tests/ORM/Functional/Ticket/Ticket69.php | 4 +- .../ORM/Mapping/AbstractMappingDriverTest.php | 5 +- .../Tests/ORM/Mapping/ClassMetadataTest.php | 4 +- .../php/Doctrine.Tests.ORM.Mapping.User.php | 1 + .../Doctrine.Tests.ORM.Mapping.User.dcm.xml | 2 +- .../Doctrine.Tests.ORM.Mapping.User.dcm.yml | 1 + 59 files changed, 159 insertions(+), 211 deletions(-) diff --git a/UPGRADE_TO_2_0 b/UPGRADE_TO_2_0 index fb34f1f9a..379d364db 100644 --- a/UPGRADE_TO_2_0 +++ b/UPGRADE_TO_2_0 @@ -46,7 +46,7 @@ Prefer PHP default values, if possible. ## Partial Objects -xxx +[TBD: New syntax, results, etc.] ## XML Mapping Driver diff --git a/doctrine-mapping.xsd b/doctrine-mapping.xsd index 51dc089f9..f3bea4f8e 100644 --- a/doctrine-mapping.xsd +++ b/doctrine-mapping.xsd @@ -217,7 +217,7 @@ - + @@ -237,6 +237,7 @@ + @@ -246,7 +247,7 @@ - + @@ -264,6 +265,7 @@ + @@ -274,9 +276,10 @@ + - + diff --git a/lib/Doctrine/Common/EventArgs.php b/lib/Doctrine/Common/EventArgs.php index bfd05b4dc..6a3c0699a 100644 --- a/lib/Doctrine/Common/EventArgs.php +++ b/lib/Doctrine/Common/EventArgs.php @@ -26,7 +26,7 @@ namespace Doctrine\Common; * * 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 {@link getEmptyInstance()}. + * instance can be obtained through {@link getEmptyInstance}. * * @license http://www.opensource.org/licenses/lgpl-license.php LGPL * @link www.doctrine-project.org diff --git a/lib/Doctrine/Common/EventSubscriber.php b/lib/Doctrine/Common/EventSubscriber.php index d095af094..8e55973bd 100644 --- a/lib/Doctrine/Common/EventSubscriber.php +++ b/lib/Doctrine/Common/EventSubscriber.php @@ -16,7 +16,7 @@ * * This software consists of voluntary contributions made by many individuals * and is licensed under the LGPL. For more information, see - * . + * . */ namespace Doctrine\Common; @@ -24,13 +24,12 @@ namespace Doctrine\Common; /** * An EventSubscriber knows himself what events he is interested in. * If an EventSubscriber is added to an EventManager, the manager invokes - * getSubscribedEvents() and registers the subscriber as a listener for all + * {@link getSubscribedEvents} and registers the subscriber as a listener for all * returned events. * * @license http://www.opensource.org/licenses/lgpl-license.php LGPL * @link www.doctrine-project.org * @since 2.0 - * @version $Revision: 3938 $ * @author Guilherme Blanco * @author Jonathan Wage * @author Roman Borschel @@ -38,7 +37,7 @@ namespace Doctrine\Common; interface EventSubscriber { /** - * Returns an array of events that this subscriber listens + * Returns an array of events this subscriber wants to listen to. * * @return array */ diff --git a/lib/Doctrine/ORM/Internal/Hydration/ObjectHydrator.php b/lib/Doctrine/ORM/Internal/Hydration/ObjectHydrator.php index cc13676d6..ffab1a334 100644 --- a/lib/Doctrine/ORM/Internal/Hydration/ObjectHydrator.php +++ b/lib/Doctrine/ORM/Internal/Hydration/ObjectHydrator.php @@ -87,8 +87,8 @@ class ObjectHydrator extends AbstractHydrator if ($assoc->mappedBy) { $this->_hints['fetched'][$className][$assoc->mappedBy] = true; } else { - if (isset($class->inverseMappings[$sourceClassName][$assoc->sourceFieldName])) { - $inverseAssoc = $class->inverseMappings[$sourceClassName][$assoc->sourceFieldName]; + if ($assoc->inversedBy) { + $inverseAssoc = $class->associationMappings[$assoc->inversedBy]; if ($inverseAssoc->isOneToOne()) { $this->_hints['fetched'][$className][$inverseAssoc->sourceFieldName] = true; if ($class->subClasses) { @@ -346,9 +346,10 @@ class ObjectHydrator extends AbstractHydrator $this->_uow->setOriginalEntityProperty($oid, $relationField, $element); $targetClass = $this->_ce[$relation->targetEntityName]; if ($relation->isOwningSide) { + //TODO: Just check hints['fetched'] here? // If there is an inverse mapping on the target class its bidirectional - if (isset($targetClass->inverseMappings[$relation->sourceEntityName][$relationField])) { - $inverseAssoc = $targetClass->inverseMappings[$relation->sourceEntityName][$relationField]; + if ($relation->inversedBy) { + $inverseAssoc = $targetClass->associationMappings[$relation->inversedBy]; if ($inverseAssoc->isOneToOne()) { $targetClass->reflFields[$inverseAssoc->sourceFieldName]->setValue($element, $parentObject); $this->_uow->setOriginalEntityProperty(spl_object_hash($element), $inverseAssoc->sourceFieldName, $parentObject); diff --git a/lib/Doctrine/ORM/Mapping/ClassMetadata.php b/lib/Doctrine/ORM/Mapping/ClassMetadata.php index 92f403324..aa16d865d 100644 --- a/lib/Doctrine/ORM/Mapping/ClassMetadata.php +++ b/lib/Doctrine/ORM/Mapping/ClassMetadata.php @@ -315,7 +315,6 @@ class ClassMetadata extends ClassMetadataInfo 'idGenerator', //TODO: Does not really need to be serialized. Could be moved to runtime. 'inheritanceType', 'inheritedAssociationFields', - 'inverseMappings', //TODO: Remove! DDC-193 'isIdentifierComposite', 'isMappedSuperclass', 'isVersioned', diff --git a/lib/Doctrine/ORM/Mapping/ClassMetadataInfo.php b/lib/Doctrine/ORM/Mapping/ClassMetadataInfo.php index a38bb1b99..b3ed57d98 100644 --- a/lib/Doctrine/ORM/Mapping/ClassMetadataInfo.php +++ b/lib/Doctrine/ORM/Mapping/ClassMetadataInfo.php @@ -127,9 +127,9 @@ class ClassMetadataInfo public $namespace; /** - * READ-ONLY: The name of the entity class that is at the root of the entity inheritance - * hierarchy. If the entity is not part of an inheritance hierarchy this is the same - * as $_entityName. + * READ-ONLY: The name of the entity class that is at the root of the mapped entity inheritance + * hierarchy. If the entity is not part of a mapped inheritance hierarchy this is the same + * as {@link $entityName}. * * @var string */ @@ -312,14 +312,6 @@ class ClassMetadataInfo */ public $associationMappings = array(); - /** - * READ-ONLY: List of inverse association mappings, indexed by mappedBy field name. - * - * @var array - * @todo Remove! See http://www.doctrine-project.org/jira/browse/DDC-193 - */ - public $inverseMappings = array(); - /** * READ-ONLY: Flag indicating whether the identifier/primary key of the class is composite. * @@ -531,34 +523,6 @@ class ClassMetadataInfo return $this->associationMappings[$fieldName]; } - /** - * Gets the inverse association mapping for the given target class name and - * owning fieldname. - * - * @param string $mappedByFieldName The field on the - * @return Doctrine\ORM\Mapping\AssociationMapping The mapping or NULL if there is no such - * inverse association mapping. - */ - public function getInverseAssociationMapping($targetClassName, $mappedByFieldName) - { - return isset($this->inverseMappings[$targetClassName][$mappedByFieldName]) ? - $this->inverseMappings[$targetClassName][$mappedByFieldName] : null; - } - - /** - * Checks whether the class has an inverse association mapping that points to the - * specified class and ha the specified mappedBy field. - * - * @param string $targetClassName The name of the target class. - * @param string $mappedByFieldName The name of the mappedBy field that points to the field on - * the target class that owns the association. - * @return boolean - */ - public function hasInverseAssociationMapping($targetClassName, $mappedByFieldName) - { - return isset($this->inverseMappings[$targetClassName][$mappedByFieldName]); - } - /** * Gets all association mappings of the class. * @@ -1063,7 +1027,6 @@ class ClassMetadataInfo if ($owningClassName !== null) { $this->inheritedAssociationFields[$sourceFieldName] = $owningClassName; } - $this->_registerMappingIfInverse($mapping); } /** @@ -1093,20 +1056,6 @@ class ClassMetadataInfo $this->_storeAssociationMapping($oneToOneMapping); } - /** - * Registers the mapping as an inverse mapping, if it is a mapping on the - * inverse side of an association mapping. - * - * @param AssociationMapping The mapping to register as inverse if it is a mapping - * for the inverse side of an association. - */ - private function _registerMappingIfInverse(AssociationMapping $assoc) - { - if ( ! $assoc->isOwningSide) { - $this->inverseMappings[$assoc->targetEntityName][$assoc->mappedBy] = $assoc; - } - } - /** * Adds a one-to-many mapping. * @@ -1154,7 +1103,6 @@ class ClassMetadataInfo throw MappingException::duplicateFieldMapping($this->name, $sourceFieldName); } $this->associationMappings[$sourceFieldName] = $assocMapping; - $this->_registerMappingIfInverse($assocMapping); } /** diff --git a/lib/Doctrine/ORM/Mapping/Driver/AbstractFileDriver.php b/lib/Doctrine/ORM/Mapping/Driver/AbstractFileDriver.php index daab7b531..29dedf3e1 100644 --- a/lib/Doctrine/ORM/Mapping/Driver/AbstractFileDriver.php +++ b/lib/Doctrine/ORM/Mapping/Driver/AbstractFileDriver.php @@ -55,7 +55,7 @@ abstract class AbstractFileDriver implements Driver * @var string */ protected $_fileExtension; - + /** * Initializes a new FileDriver that looks in the given path(s) for mapping * documents and operates in the specified operating mode. @@ -76,7 +76,7 @@ abstract class AbstractFileDriver implements Driver { $this->_paths = array_unique(array_merge($this->_paths, $paths)); } - + /** * Retrieve the defined metadata lookup paths. * @@ -107,7 +107,7 @@ abstract class AbstractFileDriver implements Driver { $this->_fileExtension = $fileExtension; } - + /** * Get the element of schema meta data for the class from the mapping file. * This will lazily load the mapping file if it is not loaded yet @@ -132,7 +132,7 @@ abstract class AbstractFileDriver implements Driver public function isTransient($className) { $fileName = str_replace('\\', '.', $className) . $this->_fileExtension; - + // Check whether file exists foreach ((array) $this->_paths as $path) { if (file_exists($path . DIRECTORY_SEPARATOR . $fileName)) { @@ -142,7 +142,7 @@ abstract class AbstractFileDriver implements Driver return true; } - + /** * Gets the names of all mapped classes known to this driver. * @@ -151,7 +151,7 @@ abstract class AbstractFileDriver implements Driver public function getAllClassNames() { $classes = array(); - + if ($this->_paths) { foreach ((array) $this->_paths as $path) { if ( ! is_dir($path)) { diff --git a/lib/Doctrine/ORM/Mapping/Driver/AnnotationDriver.php b/lib/Doctrine/ORM/Mapping/Driver/AnnotationDriver.php index e0a53394c..8e01479f7 100644 --- a/lib/Doctrine/ORM/Mapping/Driver/AnnotationDriver.php +++ b/lib/Doctrine/ORM/Mapping/Driver/AnnotationDriver.php @@ -173,7 +173,7 @@ class AnnotationDriver implements Driver // Evaluate InheritanceType annotation if (isset($classAnnotations['Doctrine\ORM\Mapping\InheritanceType'])) { $inheritanceTypeAnnot = $classAnnotations['Doctrine\ORM\Mapping\InheritanceType']; - $metadata->setInheritanceType(constant('\Doctrine\ORM\Mapping\ClassMetadata::INHERITANCE_TYPE_' . $inheritanceTypeAnnot->value)); + $metadata->setInheritanceType(constant('Doctrine\ORM\Mapping\ClassMetadata::INHERITANCE_TYPE_' . $inheritanceTypeAnnot->value)); } // Evaluate DiscriminatorColumn annotation @@ -195,7 +195,7 @@ class AnnotationDriver implements Driver // Evaluate DoctrineChangeTrackingPolicy annotation if (isset($classAnnotations['Doctrine\ORM\Mapping\ChangeTrackingPolicy'])) { $changeTrackingAnnot = $classAnnotations['Doctrine\ORM\Mapping\ChangeTrackingPolicy']; - $metadata->setChangeTrackingPolicy(constant('\Doctrine\ORM\Mapping\ClassMetadata::CHANGETRACKING_' . $changeTrackingAnnot->value)); + $metadata->setChangeTrackingPolicy(constant('Doctrine\ORM\Mapping\ClassMetadata::CHANGETRACKING_' . $changeTrackingAnnot->value)); } // Evaluate annotations on properties/fields diff --git a/lib/Doctrine/ORM/Mapping/Driver/DatabaseDriver.php b/lib/Doctrine/ORM/Mapping/Driver/DatabaseDriver.php index ecfc71102..083583ac7 100644 --- a/lib/Doctrine/ORM/Mapping/Driver/DatabaseDriver.php +++ b/lib/Doctrine/ORM/Mapping/Driver/DatabaseDriver.php @@ -29,7 +29,7 @@ use Doctrine\Common\Cache\ArrayCache, Doctrine\Common\Util\Inflector; /** - * The DatabaseDriver reverse engineers the mapping metadata from a database + * The DatabaseDriver reverse engineers the mapping metadata from a database. * * @license http://www.opensource.org/licenses/lgpl-license.php LGPL * @link www.doctrine-project.org @@ -67,7 +67,7 @@ class DatabaseDriver implements Driver $columns = $this->_sm->listTableColumns($tableName); - if($this->_sm->getDatabasePlatform()->supportsForeignKeyConstraints()) { + if ($this->_sm->getDatabasePlatform()->supportsForeignKeyConstraints()) { $foreignKeys = $this->_sm->listTableForeignKeys($tableName); } else { $foreignKeys = array(); diff --git a/lib/Doctrine/ORM/Mapping/Driver/DoctrineAnnotations.php b/lib/Doctrine/ORM/Mapping/Driver/DoctrineAnnotations.php index 3c4e7415e..537aaf3a3 100644 --- a/lib/Doctrine/ORM/Mapping/Driver/DoctrineAnnotations.php +++ b/lib/Doctrine/ORM/Mapping/Driver/DoctrineAnnotations.php @@ -37,7 +37,6 @@ final class DiscriminatorColumn extends Annotation { public $length; } final class DiscriminatorMap extends Annotation {} -/*final class SubClasses extends Annotation {}*/ final class Id extends Annotation {} final class GeneratedValue extends Annotation { public $strategy = 'AUTO'; @@ -124,7 +123,6 @@ final class SequenceGenerator extends Annotation { public $initialValue = 1; } final class ChangeTrackingPolicy extends Annotation {} - final class OrderBy extends Annotation {} /* Annotations for lifecycle callbacks */ diff --git a/lib/Doctrine/ORM/Mapping/Driver/DriverChain.php b/lib/Doctrine/ORM/Mapping/Driver/DriverChain.php index dcc461840..cd2a727fe 100644 --- a/lib/Doctrine/ORM/Mapping/Driver/DriverChain.php +++ b/lib/Doctrine/ORM/Mapping/Driver/DriverChain.php @@ -46,7 +46,7 @@ class DriverChain implements Driver private $_drivers = array(); /** - * Add a nested driver + * Add a nested driver. * * @param Driver $nestedDriver * @param string $namespace @@ -57,7 +57,7 @@ class DriverChain implements Driver } /** - * Get the array of nested drivers + * Get the array of nested drivers. * * @return array $drivers */ @@ -74,7 +74,7 @@ class DriverChain implements Driver */ public function loadMetadataForClass($className, ClassMetadataInfo $metadata) { - foreach ($this->_drivers AS $namespace => $driver) { + foreach ($this->_drivers as $namespace => $driver) { if (strpos($className, $namespace) === 0) { $driver->loadMetadataForClass($className, $metadata); return; diff --git a/lib/Doctrine/ORM/Mapping/Driver/PhpDriver.php b/lib/Doctrine/ORM/Mapping/Driver/PhpDriver.php index 288637505..6b6954b83 100644 --- a/lib/Doctrine/ORM/Mapping/Driver/PhpDriver.php +++ b/lib/Doctrine/ORM/Mapping/Driver/PhpDriver.php @@ -49,7 +49,6 @@ class PhpDriver extends AbstractFileDriver * {@inheritdoc} */ protected $_fileExtension = '.php'; - protected $_metadata; /** diff --git a/lib/Doctrine/ORM/Mapping/Driver/XmlDriver.php b/lib/Doctrine/ORM/Mapping/Driver/XmlDriver.php index e02c3bdf5..40608d001 100644 --- a/lib/Doctrine/ORM/Mapping/Driver/XmlDriver.php +++ b/lib/Doctrine/ORM/Mapping/Driver/XmlDriver.php @@ -21,7 +21,8 @@ namespace Doctrine\ORM\Mapping\Driver; -use Doctrine\ORM\Mapping\ClassMetadataInfo, +use SimpleXMLElement, + Doctrine\ORM\Mapping\ClassMetadataInfo, Doctrine\ORM\Mapping\MappingException; /** @@ -226,6 +227,9 @@ class XmlDriver extends AbstractFileDriver if (isset($oneToOneElement['mapped-by'])) { $mapping['mappedBy'] = (string)$oneToOneElement['mapped-by']; } else { + if (isset($oneToOneElement['inversed-by'])) { + $mapping['inversedBy'] = (string)$oneToOneElement['inversed-by']; + } $joinColumns = array(); if (isset($oneToOneElement->{'join-column'})) { @@ -295,9 +299,13 @@ class XmlDriver extends AbstractFileDriver if (isset($manyToOneElement['fetch'])) { $mapping['fetch'] = constant('Doctrine\ORM\Mapping\AssociationMapping::FETCH_' . (string)$manyToOneElement['fetch']); } - + + if (isset($manyToOneElement['inversed-by'])) { + $mapping['inversedBy'] = (string)$manyToOneElement['inversed-by']; + } + $joinColumns = array(); - + if (isset($manyToOneElement->{'join-column'})) { $joinColumns[] = $this->_getJoinColumnMapping($manyToOneElement->{'join-column'}); } else if (isset($manyToOneElement->{'join-columns'})) { @@ -305,13 +313,12 @@ class XmlDriver extends AbstractFileDriver if (!isset($joinColumnElement['name'])) { $joinColumnElement['name'] = $name; } - $joinColumns[] = $this->_getJoinColumnMapping($joinColumnElement); } } - + $mapping['joinColumns'] = $joinColumns; - + if (isset($manyToOneElement->cascade)) { $mapping['cascade'] = $this->_getCascadeMappings($manyToOneElement->cascade); } @@ -339,11 +346,15 @@ class XmlDriver extends AbstractFileDriver if (isset($manyToManyElement['mapped-by'])) { $mapping['mappedBy'] = (string)$manyToManyElement['mapped-by']; } else if (isset($manyToManyElement->{'join-table'})) { + if (isset($manyToManyElement['inversed-by'])) { + $mapping['inversedBy'] = (string)$manyToManyElement['inversed-by']; + } + $joinTableElement = $manyToManyElement->{'join-table'}; $joinTable = array( 'name' => (string)$joinTableElement['name'] ); - + if (isset($joinTableElement['schema'])) { $joinTable['schema'] = (string)$joinTableElement['schema']; } @@ -382,7 +393,7 @@ class XmlDriver extends AbstractFileDriver // Evaluate if (isset($xmlRoot->{'lifecycle-callbacks'})) { foreach ($xmlRoot->{'lifecycle-callbacks'}->{'lifecycle-callback'} as $lifecycleCallback) { - $metadata->addLifecycleCallback((string)$lifecycleCallback['method'], constant('\Doctrine\ORM\Events::' . (string)$lifecycleCallback['type'])); + $metadata->addLifecycleCallback((string)$lifecycleCallback['method'], constant('Doctrine\ORM\Events::' . (string)$lifecycleCallback['type'])); } } } @@ -394,7 +405,7 @@ class XmlDriver extends AbstractFileDriver * @param $joinColumnElement The XML element. * @return array The mapping array. */ - private function _getJoinColumnMapping(\SimpleXMLElement $joinColumnElement) + private function _getJoinColumnMapping(SimpleXMLElement $joinColumnElement) { $joinColumn = array( 'name' => (string)$joinColumnElement['name'], diff --git a/lib/Doctrine/ORM/Mapping/Driver/YamlDriver.php b/lib/Doctrine/ORM/Mapping/Driver/YamlDriver.php index a1e9d8804..f5448ff1f 100644 --- a/lib/Doctrine/ORM/Mapping/Driver/YamlDriver.php +++ b/lib/Doctrine/ORM/Mapping/Driver/YamlDriver.php @@ -230,6 +230,10 @@ class YamlDriver extends AbstractFileDriver if (isset($oneToOneElement['mappedBy'])) { $mapping['mappedBy'] = $oneToOneElement['mappedBy']; } else { + if (isset($oneToOneElement['inversedBy'])) { + $mapping['inversedBy'] = $oneToOneElement['inversedBy']; + } + $joinColumns = array(); if (isset($oneToOneElement['joinColumn'])) { @@ -292,6 +296,10 @@ class YamlDriver extends AbstractFileDriver $mapping['fetch'] = constant('Doctrine\ORM\Mapping\AssociationMapping::FETCH_' . $manyToOneElement['fetch']); } + if (isset($manyToOneElement['inversedBy'])) { + $mapping['inversedBy'] = $manyToOneElement['inversedBy']; + } + $joinColumns = array(); if (isset($manyToOneElement['joinColumn'])) { @@ -331,6 +339,10 @@ class YamlDriver extends AbstractFileDriver if (isset($manyToManyElement['mappedBy'])) { $mapping['mappedBy'] = $manyToManyElement['mappedBy']; } else if (isset($manyToManyElement['joinTable'])) { + if (isset($manyToManyElement['inversedBy'])) { + $mapping['inversedBy'] = $manyToManyElement['inversedBy']; + } + $joinTableElement = $manyToManyElement['joinTable']; $joinTable = array( 'name' => $joinTableElement['name'] @@ -375,7 +387,7 @@ class YamlDriver extends AbstractFileDriver if (isset($element['lifecycleCallbacks'])) { foreach ($element['lifecycleCallbacks'] as $type => $methods) { foreach ($methods as $method) { - $metadata->addLifecycleCallback($method, constant('\Doctrine\ORM\Events::' . $type)); + $metadata->addLifecycleCallback($method, constant('Doctrine\ORM\Events::' . $type)); } } } diff --git a/lib/Doctrine/ORM/Mapping/ManyToManyMapping.php b/lib/Doctrine/ORM/Mapping/ManyToManyMapping.php index 3f92c63a7..95aad2b41 100644 --- a/lib/Doctrine/ORM/Mapping/ManyToManyMapping.php +++ b/lib/Doctrine/ORM/Mapping/ManyToManyMapping.php @@ -70,10 +70,7 @@ class ManyToManyMapping extends AssociationMapping public $orderBy; /** - * Validates and completes the mapping. - * - * @param array $mapping - * @override + * {@inheritdoc} */ protected function _validateAndCompleteMapping(array $mapping) { @@ -89,13 +86,15 @@ class ManyToManyMapping extends AssociationMapping 'joinColumns' => array( array( 'name' => $sourceShortName . '_id', - 'referencedColumnName' => 'id' + 'referencedColumnName' => 'id', + 'onDelete' => 'CASCADE' ) ), 'inverseJoinColumns' => array( array( 'name' => $targetShortName . '_id', - 'referencedColumnName' => 'id' + 'referencedColumnName' => 'id', + 'onDelete' => 'CASCADE' ) ) ); @@ -178,6 +177,7 @@ class ManyToManyMapping extends AssociationMapping $persister->loadManyToManyCollection($this, $joinTableConditions, $targetCollection); } + /** {@inheritdoc} */ public function isManyToMany() { return true; diff --git a/lib/Doctrine/ORM/Mapping/OneToOneMapping.php b/lib/Doctrine/ORM/Mapping/OneToOneMapping.php index 051d94324..c82558fb4 100644 --- a/lib/Doctrine/ORM/Mapping/OneToOneMapping.php +++ b/lib/Doctrine/ORM/Mapping/OneToOneMapping.php @@ -141,18 +141,14 @@ class OneToOneMapping extends AssociationMapping $targetClass = $em->getClassMetadata($this->targetEntityName); if ($this->isOwningSide) { - $inverseField = isset($targetClass->inverseMappings[$this->sourceEntityName][$this->sourceFieldName]) ? - $targetClass->inverseMappings[$this->sourceEntityName][$this->sourceFieldName]->sourceFieldName - : false; - // Mark inverse side as fetched in the hints, otherwise the UoW would // try to load it in a separate query (remember: to-one inverse sides can not be lazy). $hints = array(); - if ($inverseField) { - $hints['fetched'][$targetClass->name][$inverseField] = true; + if ($this->inversedBy) { + $hints['fetched'][$targetClass->name][$this->inversedBy] = true; if ($targetClass->subClasses) { foreach ($targetClass->subClasses as $targetSubclassName) { - $hints['fetched'][$targetSubclassName][$inverseField] = true; + $hints['fetched'][$targetSubclassName][$this->inversedBy] = true; } } } @@ -164,8 +160,8 @@ class OneToOneMapping extends AssociationMapping $targetEntity = $em->getUnitOfWork()->getEntityPersister($this->targetEntityName)->load($joinColumnValues, $targetEntity, $this, $hints); - if ($targetEntity !== null && $inverseField && ! $targetClass->isCollectionValuedAssociation($inverseField)) { - $targetClass->reflFields[$inverseField]->setValue($targetEntity, $sourceEntity); + if ($targetEntity !== null && $this->inversedBy && ! $targetClass->isCollectionValuedAssociation($this->inversedBy)) { + $targetClass->reflFields[$this->inversedBy]->setValue($targetEntity, $sourceEntity); } } else { $conditions = array(); diff --git a/lib/Doctrine/ORM/PersistentCollection.php b/lib/Doctrine/ORM/PersistentCollection.php index d19537c27..ef8e82dbf 100644 --- a/lib/Doctrine/ORM/PersistentCollection.php +++ b/lib/Doctrine/ORM/PersistentCollection.php @@ -134,18 +134,7 @@ final class PersistentCollection implements Collection { $this->_owner = $entity; $this->_association = $assoc; - - // Check for bidirectionality - //$this->_backRefFieldName = $assoc->inversedBy ?: $assoc->mappedBy; - if ( ! $assoc->isOwningSide) { - // For sure bi-directional - $this->_backRefFieldName = $assoc->mappedBy; - } else { - if (isset($this->_typeClass->inverseMappings[$assoc->sourceEntityName][$assoc->sourceFieldName])) { - // Bi-directional - $this->_backRefFieldName = $this->_typeClass->inverseMappings[$assoc->sourceEntityName][$assoc->sourceFieldName]->sourceFieldName; - } - } + $this->_backRefFieldName = $assoc->inversedBy ?: $assoc->mappedBy; } /** @@ -174,8 +163,8 @@ final class PersistentCollection implements Collection public function hydrateAdd($element) { $this->_coll->add($element); - // If _backRefFieldName is set, then the association is bidirectional - // and we need to set the back reference. + // If _backRefFieldName is set and its a one-to-many association, + // we need to set the back reference. if ($this->_backRefFieldName && $this->_association->isOneToMany()) { // Set back reference to owner $this->_typeClass->reflFields[$this->_backRefFieldName] diff --git a/lib/Doctrine/ORM/Persisters/AbstractCollectionPersister.php b/lib/Doctrine/ORM/Persisters/AbstractCollectionPersister.php index 9b40e6372..cf8c7ff8d 100644 --- a/lib/Doctrine/ORM/Persisters/AbstractCollectionPersister.php +++ b/lib/Doctrine/ORM/Persisters/AbstractCollectionPersister.php @@ -50,7 +50,7 @@ abstract class AbstractCollectionPersister protected $_uow; /** - * Initializes a new instance of a class derived from {@link AbstractCollectionPersister}. + * Initializes a new instance of a class derived from AbstractCollectionPersister. * * @param Doctrine\ORM\EntityManager $em */ diff --git a/lib/Doctrine/ORM/Persisters/StandardEntityPersister.php b/lib/Doctrine/ORM/Persisters/StandardEntityPersister.php index a02a9b191..cea3f37bd 100644 --- a/lib/Doctrine/ORM/Persisters/StandardEntityPersister.php +++ b/lib/Doctrine/ORM/Persisters/StandardEntityPersister.php @@ -492,8 +492,8 @@ class StandardEntityPersister if ($found = $this->_em->getUnitOfWork()->tryGetById($joinColumnValues, $targetClass->rootEntityName)) { $this->_class->reflFields[$field]->setValue($entity, $found); // Complete inverse side, if necessary. - if (isset($targetClass->inverseMappings[$this->_class->name][$field])) { - $inverseAssoc = $targetClass->inverseMappings[$this->_class->name][$field]; + if ($assoc->inversedBy) { + $inverseAssoc = $targetClass->associationMappings[$assoc->inversedBy]; $targetClass->reflFields[$inverseAssoc->sourceFieldName]->setValue($found, $entity); } $newData[$field] = $found; diff --git a/lib/Doctrine/ORM/UnitOfWork.php b/lib/Doctrine/ORM/UnitOfWork.php index d1a89bed4..46628c904 100644 --- a/lib/Doctrine/ORM/UnitOfWork.php +++ b/lib/Doctrine/ORM/UnitOfWork.php @@ -1336,12 +1336,12 @@ class UnitOfWork implements PropertyChangedListener // We need to fetch the managed copy in order to merge. $managedCopy = $this->_em->find($class->name, $id); } - + if ($managedCopy === null) { throw new \InvalidArgumentException('New entity detected during merge.' . ' Persist the new entity before merging.'); } - + if ($class->isVersioned) { $managedCopyVersion = $class->reflFields[$class->versionField]->getValue($managedCopy); $entityVersion = $class->reflFields[$class->versionField]->getValue($entity); @@ -1350,7 +1350,7 @@ class UnitOfWork implements PropertyChangedListener throw OptimisticLockException::lockFailed(); } } - + // Merge state of $entity into existing (managed) entity foreach ($class->reflFields as $name => $prop) { if ( ! isset($class->associationMappings[$name])) { @@ -1359,7 +1359,7 @@ class UnitOfWork implements PropertyChangedListener $assoc2 = $class->associationMappings[$name]; if ($assoc2->isOneToOne()) { if ( ! $assoc2->isCascadeMerge) { - $other = $class->reflFields[$name]->getValue($entity); + $other = $class->reflFields[$name]->getValue($entity); //TODO: Just $prop->getValue($entity)? if ($other !== null) { $targetClass = $this->_em->getClassMetadata($assoc2->targetEntityName); $id = $targetClass->getIdentifierValues($other); diff --git a/tests/Doctrine/Tests/Models/CMS/CmsAddress.php b/tests/Doctrine/Tests/Models/CMS/CmsAddress.php index 746697d32..32af0fd85 100644 --- a/tests/Doctrine/Tests/Models/CMS/CmsAddress.php +++ b/tests/Doctrine/Tests/Models/CMS/CmsAddress.php @@ -13,23 +13,22 @@ class CmsAddress { /** * @Column(type="integer") - * @Id - * @GeneratedValue(strategy="AUTO") + * @Id @GeneratedValue */ public $id; /** - * @Column(type="string", length=50) + * @Column(length=50) */ public $country; /** - * @Column(type="string", length=50) + * @Column(length=50) */ public $zip; /** - * @Column(type="string", length=50) + * @Column(length=50) */ public $city; @@ -39,8 +38,7 @@ class CmsAddress public $street; /** - * @OneToOne(targetEntity="CmsUser") -// * @JoinColumn(name="user_id", referencedColumnName="id") + * @OneToOne(targetEntity="CmsUser", inversedBy="address") */ public $user; diff --git a/tests/Doctrine/Tests/Models/CMS/CmsArticle.php b/tests/Doctrine/Tests/Models/CMS/CmsArticle.php index 53c49540c..1d7901557 100644 --- a/tests/Doctrine/Tests/Models/CMS/CmsArticle.php +++ b/tests/Doctrine/Tests/Models/CMS/CmsArticle.php @@ -23,7 +23,7 @@ class CmsArticle */ public $text; /** - * @ManyToOne(targetEntity="CmsUser") + * @ManyToOne(targetEntity="CmsUser", inversedBy="articles") * @JoinColumn(name="user_id", referencedColumnName="id") */ public $user; diff --git a/tests/Doctrine/Tests/Models/CMS/CmsComment.php b/tests/Doctrine/Tests/Models/CMS/CmsComment.php index c1991474f..a40940bca 100644 --- a/tests/Doctrine/Tests/Models/CMS/CmsComment.php +++ b/tests/Doctrine/Tests/Models/CMS/CmsComment.php @@ -23,7 +23,7 @@ class CmsComment */ public $text; /** - * @ManyToOne(targetEntity="CmsArticle") + * @ManyToOne(targetEntity="CmsArticle", inversedBy="comments") * @JoinColumn(name="article_id", referencedColumnName="id") */ public $article; diff --git a/tests/Doctrine/Tests/Models/CMS/CmsEmployee.php b/tests/Doctrine/Tests/Models/CMS/CmsEmployee.php index 9acdbc6f4..c1697150f 100644 --- a/tests/Doctrine/Tests/Models/CMS/CmsEmployee.php +++ b/tests/Doctrine/Tests/Models/CMS/CmsEmployee.php @@ -14,12 +14,12 @@ class CmsEmployee /** * @Id * @Column(type="integer") - * @GeneratedValue(strategy="AUTO") + * @GeneratedValue */ private $id; /** - * @Column(type="string") + * @Column */ private $name; diff --git a/tests/Doctrine/Tests/Models/CMS/CmsGroup.php b/tests/Doctrine/Tests/Models/CMS/CmsGroup.php index 3bdfcba1f..ad399ba18 100644 --- a/tests/Doctrine/Tests/Models/CMS/CmsGroup.php +++ b/tests/Doctrine/Tests/Models/CMS/CmsGroup.php @@ -18,11 +18,11 @@ class CmsGroup /** * @Id * @Column(type="integer") - * @GeneratedValue(strategy="AUTO") + * @GeneratedValue */ public $id; /** - * @Column(type="string", length=50) + * @Column(length=50) */ public $name; /** diff --git a/tests/Doctrine/Tests/Models/CMS/CmsPhonenumber.php b/tests/Doctrine/Tests/Models/CMS/CmsPhonenumber.php index 39fd7b8f3..431b8c8ae 100644 --- a/tests/Doctrine/Tests/Models/CMS/CmsPhonenumber.php +++ b/tests/Doctrine/Tests/Models/CMS/CmsPhonenumber.php @@ -9,11 +9,11 @@ namespace Doctrine\Tests\Models\CMS; class CmsPhonenumber { /** - * @Id @Column(type="string", length=50) + * @Id @Column(length=50) */ public $phonenumber; /** - * @ManyToOne(targetEntity="CmsUser") + * @ManyToOne(targetEntity="CmsUser", inversedBy="phonenumbers") * @JoinColumn(name="user_id", referencedColumnName="id") */ public $user; diff --git a/tests/Doctrine/Tests/Models/CMS/CmsUser.php b/tests/Doctrine/Tests/Models/CMS/CmsUser.php index 148fa6674..d7f0727c0 100644 --- a/tests/Doctrine/Tests/Models/CMS/CmsUser.php +++ b/tests/Doctrine/Tests/Models/CMS/CmsUser.php @@ -40,7 +40,7 @@ class CmsUser */ public $address; /** - * @ManyToMany(targetEntity="CmsGroup", cascade={"persist"}) + * @ManyToMany(targetEntity="CmsGroup", inversedBy="users", cascade={"persist"}) * @JoinTable(name="cms_users_groups", * joinColumns={@JoinColumn(name="user_id", referencedColumnName="id")}, * inverseJoinColumns={@JoinColumn(name="group_id", referencedColumnName="id")} diff --git a/tests/Doctrine/Tests/Models/Company/CompanyEvent.php b/tests/Doctrine/Tests/Models/Company/CompanyEvent.php index 12252a7d1..f0bb730cf 100644 --- a/tests/Doctrine/Tests/Models/Company/CompanyEvent.php +++ b/tests/Doctrine/Tests/Models/Company/CompanyEvent.php @@ -11,12 +11,12 @@ namespace Doctrine\Tests\Models\Company; class CompanyEvent { /** * @Id @Column(type="integer") - * @GeneratedValue(strategy="AUTO") + * @GeneratedValue */ private $id; /** - * @ManyToOne(targetEntity="CompanyOrganization",cascade={"persist"}) + * @ManyToOne(targetEntity="CompanyOrganization", inversedBy="events", cascade={"persist"}) * @JoinColumn(name="org_id", referencedColumnName="id") */ private $organization; diff --git a/tests/Doctrine/Tests/Models/Company/CompanyPerson.php b/tests/Doctrine/Tests/Models/Company/CompanyPerson.php index c38dc7428..740c323ef 100644 --- a/tests/Doctrine/Tests/Models/Company/CompanyPerson.php +++ b/tests/Doctrine/Tests/Models/Company/CompanyPerson.php @@ -20,11 +20,11 @@ class CompanyPerson /** * @Id * @Column(type="integer") - * @GeneratedValue(strategy="AUTO") + * @GeneratedValue */ private $id; /** - * @Column(type="string") + * @Column */ private $name; /** diff --git a/tests/Doctrine/Tests/Models/Company/CompanyRaffle.php b/tests/Doctrine/Tests/Models/Company/CompanyRaffle.php index a7d123c84..3d05996f2 100644 --- a/tests/Doctrine/Tests/Models/Company/CompanyRaffle.php +++ b/tests/Doctrine/Tests/Models/Company/CompanyRaffle.php @@ -4,7 +4,7 @@ namespace Doctrine\Tests\Models\Company; /** @Entity @Table(name="company_raffles") */ class CompanyRaffle extends CompanyEvent { - /** @Column(type="string") */ + /** @Column */ private $data; public function setData($data) { diff --git a/tests/Doctrine/Tests/Models/ECommerce/ECommerceCart.php b/tests/Doctrine/Tests/Models/ECommerce/ECommerceCart.php index 8fac69be0..d68b37056 100644 --- a/tests/Doctrine/Tests/Models/ECommerce/ECommerceCart.php +++ b/tests/Doctrine/Tests/Models/ECommerce/ECommerceCart.php @@ -17,17 +17,17 @@ class ECommerceCart /** * @Column(type="integer") * @Id - * @GeneratedValue(strategy="AUTO") + * @GeneratedValue */ private $id; /** - * @Column(type="string", length=50, nullable=true) + * @Column(length=50, nullable=true) */ private $payment; /** - * @OneToOne(targetEntity="ECommerceCustomer") + * @OneToOne(targetEntity="ECommerceCustomer", inversedBy="cart") * @JoinColumn(name="customer_id", referencedColumnName="id") */ private $customer; diff --git a/tests/Doctrine/Tests/Models/ECommerce/ECommerceCategory.php b/tests/Doctrine/Tests/Models/ECommerce/ECommerceCategory.php index d79c1a298..ea2ade09d 100644 --- a/tests/Doctrine/Tests/Models/ECommerce/ECommerceCategory.php +++ b/tests/Doctrine/Tests/Models/ECommerce/ECommerceCategory.php @@ -36,7 +36,7 @@ class ECommerceCategory private $children; /** - * @ManyToOne(targetEntity="ECommerceCategory") + * @ManyToOne(targetEntity="ECommerceCategory", inversedBy="children") * @JoinColumn(name="parent_id", referencedColumnName="id") */ private $parent; diff --git a/tests/Doctrine/Tests/Models/ECommerce/ECommerceFeature.php b/tests/Doctrine/Tests/Models/ECommerce/ECommerceFeature.php index 901e7c1e9..8f6cdd983 100644 --- a/tests/Doctrine/Tests/Models/ECommerce/ECommerceFeature.php +++ b/tests/Doctrine/Tests/Models/ECommerce/ECommerceFeature.php @@ -14,17 +14,17 @@ class ECommerceFeature /** * @Column(type="integer") * @Id - * @GeneratedValue(strategy="AUTO") + * @GeneratedValue */ private $id; /** - * @Column(type="string", length=50) + * @Column(length=50) */ private $description; /** - * @ManyToOne(targetEntity="ECommerceProduct") + * @ManyToOne(targetEntity="ECommerceProduct", inversedBy="features") * @JoinColumn(name="product_id", referencedColumnName="id") */ private $product; diff --git a/tests/Doctrine/Tests/Models/ECommerce/ECommerceProduct.php b/tests/Doctrine/Tests/Models/ECommerce/ECommerceProduct.php index 40fe67bd8..4851778e2 100644 --- a/tests/Doctrine/Tests/Models/ECommerce/ECommerceProduct.php +++ b/tests/Doctrine/Tests/Models/ECommerce/ECommerceProduct.php @@ -10,14 +10,14 @@ use Doctrine\Common\Collections\ArrayCollection; * * @author Giorgio Sironi * @Entity - * @Table(name="ecommerce_products",indexes={@index(name="name_idx", columns={"name"})}) + * @Table(name="ecommerce_products",indexes={@Index(name="name_idx", columns={"name"})}) */ class ECommerceProduct { /** * @Column(type="integer") * @Id - * @GeneratedValue(strategy="AUTO") + * @GeneratedValue */ private $id; @@ -38,7 +38,7 @@ class ECommerceProduct private $features; /** - * @ManyToMany(targetEntity="ECommerceCategory", cascade={"persist"}) + * @ManyToMany(targetEntity="ECommerceCategory", cascade={"persist"}, inversedBy="products") * @JoinTable(name="ecommerce_products_categories", * joinColumns={@JoinColumn(name="product_id", referencedColumnName="id")}, * inverseJoinColumns={@JoinColumn(name="category_id", referencedColumnName="id")}) @@ -50,8 +50,8 @@ class ECommerceProduct * simplicity. * @ManyToMany(targetEntity="ECommerceProduct", cascade={"persist"}) * @JoinTable(name="ecommerce_products_related", - joinColumns={@JoinColumn(name="product_id", referencedColumnName="id")}, - inverseJoinColumns={@JoinColumn(name="related_id", referencedColumnName="id")}) + * joinColumns={@JoinColumn(name="product_id", referencedColumnName="id")}, + * inverseJoinColumns={@JoinColumn(name="related_id", referencedColumnName="id")}) */ private $related; diff --git a/tests/Doctrine/Tests/Models/ECommerce/ECommerceShipping.php b/tests/Doctrine/Tests/Models/ECommerce/ECommerceShipping.php index b1ee90a53..a0f302cc2 100644 --- a/tests/Doctrine/Tests/Models/ECommerce/ECommerceShipping.php +++ b/tests/Doctrine/Tests/Models/ECommerce/ECommerceShipping.php @@ -14,7 +14,7 @@ class ECommerceShipping { /** * @Id @Column(type="integer") - * @GeneratedValue(strategy="AUTO") + * @GeneratedValue */ private $id; diff --git a/tests/Doctrine/Tests/Models/Forum/ForumBoard.php b/tests/Doctrine/Tests/Models/Forum/ForumBoard.php index 6496dd9a1..707d36309 100644 --- a/tests/Doctrine/Tests/Models/Forum/ForumBoard.php +++ b/tests/Doctrine/Tests/Models/Forum/ForumBoard.php @@ -21,7 +21,7 @@ class ForumBoard */ public $position; /** - * @ManyToOne(targetEntity="ForumCategory") + * @ManyToOne(targetEntity="ForumCategory", inversedBy="boards") * @JoinColumn(name="category_id", referencedColumnName="id") */ public $category; diff --git a/tests/Doctrine/Tests/Models/Forum/ForumUser.php b/tests/Doctrine/Tests/Models/Forum/ForumUser.php index fedf10955..e27623160 100644 --- a/tests/Doctrine/Tests/Models/Forum/ForumUser.php +++ b/tests/Doctrine/Tests/Models/Forum/ForumUser.php @@ -10,8 +10,7 @@ class ForumUser { /** * @Column(type="integer") - * @Id - * @GeneratedValue(strategy="AUTO") + * @Id @GeneratedValue */ public $id; /** diff --git a/tests/Doctrine/Tests/Models/Generic/DateTimeModel.php b/tests/Doctrine/Tests/Models/Generic/DateTimeModel.php index 365268a54..0733245ff 100644 --- a/tests/Doctrine/Tests/Models/Generic/DateTimeModel.php +++ b/tests/Doctrine/Tests/Models/Generic/DateTimeModel.php @@ -10,7 +10,7 @@ class DateTimeModel { /** * @Id @Column(type="integer") - * @GeneratedValue(strategy="AUTO") + * @GeneratedValue */ public $id; /** diff --git a/tests/Doctrine/Tests/Models/Routing/RoutingLeg.php b/tests/Doctrine/Tests/Models/Routing/RoutingLeg.php index 64564d3ef..a130e7b0c 100644 --- a/tests/Doctrine/Tests/Models/Routing/RoutingLeg.php +++ b/tests/Doctrine/Tests/Models/Routing/RoutingLeg.php @@ -8,20 +8,19 @@ namespace Doctrine\Tests\Models\Routing; class RoutingLeg { /** - * @Id - * @generatedValue(strategy="AUTO") + * @Id @generatedValue * @column(type="integer") */ public $id; /** - * @ManyToOne(targetEntity="Doctrine\Tests\Models\Routing\RoutingLocation") + * @ManyToOne(targetEntity="RoutingLocation") * @JoinColumn(name="from_id", referencedColumnName="id") */ public $fromLocation; /** - * @ManyToOne(targetEntity="Doctrine\Tests\Models\Routing\RoutingLocation") + * @ManyToOne(targetEntity="RoutingLocation") * @JoinColumn(name="to_id", referencedColumnName="id") */ public $toLocation; diff --git a/tests/Doctrine/Tests/Models/Routing/RoutingLocation.php b/tests/Doctrine/Tests/Models/Routing/RoutingLocation.php index 2a04275e8..ea1ba55f7 100644 --- a/tests/Doctrine/Tests/Models/Routing/RoutingLocation.php +++ b/tests/Doctrine/Tests/Models/Routing/RoutingLocation.php @@ -8,8 +8,7 @@ namespace Doctrine\Tests\Models\Routing; class RoutingLocation { /** - * @Id - * @generatedValue(strategy="AUTO") + * @Id @GeneratedValue * @Column(type="integer") */ public $id; diff --git a/tests/Doctrine/Tests/Models/Routing/RoutingRoute.php b/tests/Doctrine/Tests/Models/Routing/RoutingRoute.php index 0f0f671c1..9e5d5d02e 100644 --- a/tests/Doctrine/Tests/Models/Routing/RoutingRoute.php +++ b/tests/Doctrine/Tests/Models/Routing/RoutingRoute.php @@ -11,7 +11,7 @@ class RoutingRoute { /** * @Id - * @generatedValue(strategy="AUTO") + * @GeneratedValue * @column(type="integer") */ public $id; diff --git a/tests/Doctrine/Tests/Models/Routing/RoutingRouteBooking.php b/tests/Doctrine/Tests/Models/Routing/RoutingRouteBooking.php index ea2f31f60..9b862fc39 100644 --- a/tests/Doctrine/Tests/Models/Routing/RoutingRouteBooking.php +++ b/tests/Doctrine/Tests/Models/Routing/RoutingRouteBooking.php @@ -10,12 +10,12 @@ class RoutingRouteBooking /** * @Id * @Column(type="integer") - * @generatedValue(strategy="AUTO") + * @GeneratedValue */ public $id; /** - * @ManyToOne(targetEntity="RoutingRoute") + * @ManyToOne(targetEntity="RoutingRoute", inversedBy="bookings") * @JoinColumn(name="route_id", referencedColumnName="id") */ public $route; diff --git a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC144Test.php b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC144Test.php index 6c248676b..9b493e7da 100644 --- a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC144Test.php +++ b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC144Test.php @@ -43,21 +43,21 @@ class DDC144Test extends \Doctrine\Tests\OrmFunctionalTestCase */ class DDC144FlowElement { /** - * @Id @Column(type="integer") @GeneratedValue(strategy="AUTO") + * @Id @Column(type="integer") @GeneratedValue * @var integer */ public $id; - /** @Column(type="string") */ + /** @Column */ public $property; } -// /** @Entity @Table(name="ddc144_expressions") */ abstract class DDC144Expression extends DDC144FlowElement { abstract function method(); } + /** @Entity @Table(name="ddc144_operands") */ class DDC144Operand extends DDC144Expression { - /** @Column(type="string") */ + /** @Column */ public $operandProperty; function method() {} } diff --git a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC199Test.php b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC199Test.php index 08ed3ef94..e912c389f 100644 --- a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC199Test.php +++ b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC199Test.php @@ -79,7 +79,7 @@ class DDC199ParentClass class DDC199ChildClass extends DDC199ParentClass { /** - * @Column(type="string") + * @Column */ public $childData; } @@ -87,13 +87,13 @@ class DDC199ChildClass extends DDC199ParentClass /** @Entity @Table(name="ddc199_relatedclass") */ class DDC199RelatedClass { - /** @Id @Column(type="integer") @GeneratedValue(strategy="AUTO") */ + /** @Id @Column(type="integer") @GeneratedValue */ public $id; - /** @Column(type="string") */ + /** @Column */ public $relatedData; /** - * @ManyToOne(targetEntity="DDC199ParentClass") + * @ManyToOne(targetEntity="DDC199ParentClass", inversedBy="relatedEntities") * @JoinColumn(name="parent_id", referencedColumnName="id") */ public $parent; diff --git a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC211Test.php b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC211Test.php index 56a3ddcc8..27abee236 100644 --- a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC211Test.php +++ b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC211Test.php @@ -65,7 +65,7 @@ class DDC211User protected $name; /** - * @ManyToMany(targetEntity="DDC211Group") + * @ManyToMany(targetEntity="DDC211Group", inversedBy="users") * @JoinTable(name="user_groups", * joinColumns={@JoinColumn(name="user_id", referencedColumnName="id")}, * inverseJoinColumns={@JoinColumn(name="group_id", referencedColumnName="id")} diff --git a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC237Test.php b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC237Test.php index 877b3b861..6dc23c895 100644 --- a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC237Test.php +++ b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC237Test.php @@ -68,7 +68,7 @@ class DDC237Test extends \Doctrine\Tests\OrmFunctionalTestCase class DDC237EntityX { /** - * @Id @Column(type="integer") @GeneratedValue(strategy="AUTO") + * @Id @Column(type="integer") @GeneratedValue */ public $id; /** @@ -87,7 +87,7 @@ class DDC237EntityX class DDC237EntityY { /** - * @Id @Column(type="integer") @GeneratedValue(strategy="AUTO") + * @Id @Column(type="integer") @GeneratedValue */ public $id; /** @@ -99,7 +99,7 @@ class DDC237EntityY /** @Entity @Table(name="ddc237_z") */ class DDC237EntityZ { - /** @Id @Column(type="integer") @GeneratedValue(strategy="AUTO") */ + /** @Id @Column(type="integer") @GeneratedValue */ public $id; /** @Column(type="string") */ public $data; diff --git a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC279Test.php b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC279Test.php index e3d4d1949..50bc5ec1a 100644 --- a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC279Test.php +++ b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC279Test.php @@ -68,7 +68,7 @@ abstract class DDC279EntityXAbstract { /** * @Id - * @generatedValue(strategy="AUTO") + * @GeneratedValue * @Column(name="id", type="integer") */ public $id; @@ -98,8 +98,7 @@ class DDC279EntityX extends DDC279EntityXAbstract class DDC279EntityY { /** - * @Id - * @generatedValue(strategy="AUTO") + * @Id @GeneratedValue * @Column(name="id", type="integer") */ public $id; @@ -122,8 +121,7 @@ class DDC279EntityY class DDC279EntityZ { /** - * @Id - * @generatedValue(strategy="AUTO") + * @Id @GeneratedValue * @Column(name="id", type="integer") */ public $id; diff --git a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC309Test.php b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC309Test.php index 728e11d25..325ce8d75 100644 --- a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC309Test.php +++ b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC309Test.php @@ -54,7 +54,7 @@ class DDC309Country /** * @Id * @Column(name="id", type="integer") - * @GeneratedValue(strategy="AUTO") + * @GeneratedValue */ public $id; } @@ -67,7 +67,7 @@ class DDC309User /** * @Id * @Column(name="id", type="integer") - * @GeneratedValue(strategy="AUTO") + * @GeneratedValue */ public $id; } diff --git a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC345Test.php b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC345Test.php index 6ae373229..63a084c87 100644 --- a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC345Test.php +++ b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC345Test.php @@ -118,13 +118,13 @@ class DDC345Membership public $id; /** - * @OneToOne(targetEntity="DDC345User") + * @OneToOne(targetEntity="DDC345User", inversedBy="Memberships") * @JoinColumn(name="user_id", referencedColumnName="id", nullable=false) */ public $user; /** - * @OneToOne(targetEntity="DDC345Group") + * @OneToOne(targetEntity="DDC345Group", inversedBy="Memberships") * @JoinColumn(name="group_id", referencedColumnName="id", nullable=false) */ public $group; diff --git a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC353Test.php b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC353Test.php index 8d645121d..5091cd44c 100644 --- a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC353Test.php +++ b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC353Test.php @@ -78,8 +78,7 @@ class DDC353Picture { /** * @Column(name="picture_id", type="integer") - * @Id - * @GeneratedValue(strategy="AUTO") + * @Id @GeneratedValue */ private $pictureId; diff --git a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC371Test.php b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC371Test.php index 8f18a1fc6..399e35c34 100644 --- a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC371Test.php +++ b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC371Test.php @@ -53,7 +53,7 @@ class DDC371Child { private $id; /** @Column(type="string") */ public $data; - /** @ManyToOne(targetEntity="DDC371Parent") @JoinColumn(name="parentId") */ + /** @ManyToOne(targetEntity="DDC371Parent", inversedBy="children") @JoinColumn(name="parentId") */ public $parent; } diff --git a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC381Test.php b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC381Test.php index a088ba8cf..c25a8aa75 100644 --- a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC381Test.php +++ b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC381Test.php @@ -47,7 +47,7 @@ class DDC381Test extends \Doctrine\Tests\OrmFunctionalTestCase class DDC381Entity { /** - * @Id @Column(type="integer") @generatedValue + * @Id @Column(type="integer") @GeneratedValue */ protected $id; diff --git a/tests/Doctrine/Tests/ORM/Functional/Ticket/Ticket69.php b/tests/Doctrine/Tests/ORM/Functional/Ticket/Ticket69.php index 8b59b4bf3..f6ef6c3bf 100644 --- a/tests/Doctrine/Tests/ORM/Functional/Ticket/Ticket69.php +++ b/tests/Doctrine/Tests/ORM/Functional/Ticket/Ticket69.php @@ -212,7 +212,7 @@ class Relation { /** * @var Lemma - * @ManyToOne(targetEntity="Lemma") + * @ManyToOne(targetEntity="Lemma", inversedBy="relations") * @JoinColumn(name="relation_parent_id", referencedColumnName="lemma_id") */ private $parent; @@ -226,7 +226,7 @@ class Relation { /** * @var RelationType - * @ManyToOne(targetEntity="RelationType") + * @ManyToOne(targetEntity="RelationType", inversedBy="relations") * @JoinColumn(name="relation_type_id", referencedColumnName="relation_type_id") */ private $type; diff --git a/tests/Doctrine/Tests/ORM/Mapping/AbstractMappingDriverTest.php b/tests/Doctrine/Tests/ORM/Mapping/AbstractMappingDriverTest.php index 9e03211a6..8b29c6bad 100644 --- a/tests/Doctrine/Tests/ORM/Mapping/AbstractMappingDriverTest.php +++ b/tests/Doctrine/Tests/ORM/Mapping/AbstractMappingDriverTest.php @@ -73,7 +73,6 @@ abstract class AbstractMappingDriverTest extends \Doctrine\Tests\OrmTestCase public function testAssocations($class) { $this->assertEquals(3, count($class->associationMappings)); - $this->assertEquals(1, count($class->inverseMappings)); return $class; } @@ -87,6 +86,7 @@ abstract class AbstractMappingDriverTest extends \Doctrine\Tests\OrmTestCase $this->assertTrue($class->associationMappings['address'] instanceof \Doctrine\ORM\Mapping\OneToOneMapping); $this->assertTrue(isset($class->associationMappings['address'])); $this->assertTrue($class->associationMappings['address']->isOwningSide); + $this->assertEquals('user', $class->associationMappings['address']->inversedBy); // Check cascading $this->assertTrue($class->associationMappings['address']->isCascadeRemove); $this->assertFalse($class->associationMappings['address']->isCascadePersist); @@ -223,13 +223,12 @@ class User public $email; /** - * @OneToOne(targetEntity="Address", cascade={"remove"}) + * @OneToOne(targetEntity="Address", cascade={"remove"}, inversedBy="user") * @JoinColumn(onDelete="CASCADE", onUpdate="CASCADE") */ public $address; /** - * * @OneToMany(targetEntity="Phonenumber", mappedBy="user", cascade={"persist"}) * @OrderBy({"number"="ASC"}) */ diff --git a/tests/Doctrine/Tests/ORM/Mapping/ClassMetadataTest.php b/tests/Doctrine/Tests/ORM/Mapping/ClassMetadataTest.php index 11fb49948..dcc6b8210 100644 --- a/tests/Doctrine/Tests/ORM/Mapping/ClassMetadataTest.php +++ b/tests/Doctrine/Tests/ORM/Mapping/ClassMetadataTest.php @@ -100,8 +100,8 @@ class ClassMetadataTest extends \Doctrine\Tests\OrmTestCase $this->assertTrue($assoc instanceof \Doctrine\ORM\Mapping\ManyToManyMapping); $this->assertEquals(array( 'name' => 'CmsUser_CmsGroup', - 'joinColumns' => array(array('name' => 'CmsUser_id', 'referencedColumnName' => 'id')), - 'inverseJoinColumns' => array(array('name' => 'CmsGroup_id', 'referencedColumnName' => 'id')) + 'joinColumns' => array(array('name' => 'CmsUser_id', 'referencedColumnName' => 'id', 'onDelete' => 'CASCADE')), + 'inverseJoinColumns' => array(array('name' => 'CmsGroup_id', 'referencedColumnName' => 'id', 'onDelete' => 'CASCADE')) ), $assoc->joinTable); } diff --git a/tests/Doctrine/Tests/ORM/Mapping/php/Doctrine.Tests.ORM.Mapping.User.php b/tests/Doctrine/Tests/ORM/Mapping/php/Doctrine.Tests.ORM.Mapping.User.php index 7bd7fcaf4..e2a057f14 100644 --- a/tests/Doctrine/Tests/ORM/Mapping/php/Doctrine.Tests.ORM.Mapping.User.php +++ b/tests/Doctrine/Tests/ORM/Mapping/php/Doctrine.Tests.ORM.Mapping.User.php @@ -39,6 +39,7 @@ $metadata->mapOneToOne(array( 0 => 'remove', ), 'mappedBy' => NULL, + 'inversedBy' => 'user', 'joinColumns' => array( 0 => diff --git a/tests/Doctrine/Tests/ORM/Mapping/xml/Doctrine.Tests.ORM.Mapping.User.dcm.xml b/tests/Doctrine/Tests/ORM/Mapping/xml/Doctrine.Tests.ORM.Mapping.User.dcm.xml index 776185a28..65b71f04c 100644 --- a/tests/Doctrine/Tests/ORM/Mapping/xml/Doctrine.Tests.ORM.Mapping.User.dcm.xml +++ b/tests/Doctrine/Tests/ORM/Mapping/xml/Doctrine.Tests.ORM.Mapping.User.dcm.xml @@ -20,7 +20,7 @@ - + diff --git a/tests/Doctrine/Tests/ORM/Mapping/yaml/Doctrine.Tests.ORM.Mapping.User.dcm.yml b/tests/Doctrine/Tests/ORM/Mapping/yaml/Doctrine.Tests.ORM.Mapping.User.dcm.yml index 5e239da3f..3cf687169 100644 --- a/tests/Doctrine/Tests/ORM/Mapping/yaml/Doctrine.Tests.ORM.Mapping.User.dcm.yml +++ b/tests/Doctrine/Tests/ORM/Mapping/yaml/Doctrine.Tests.ORM.Mapping.User.dcm.yml @@ -19,6 +19,7 @@ Doctrine\Tests\ORM\Mapping\User: oneToOne: address: targetEntity: Address + inversedBy: user joinColumn: name: address_id referencedColumnName: id From a7d07fcdbab5804f6b817301eff3bd8c7d655693 Mon Sep 17 00:00:00 2001 From: Benjamin Eberlei Date: Sat, 10 Apr 2010 11:09:22 +0200 Subject: [PATCH 10/86] DDC-502, DDC-507 - Refactored SchemaTool Commands --- .../Command/SchemaTool/AbstractCommand.php | 88 +++++++++++++++++++ .../Command/SchemaTool/CreateCommand.php | 65 +++----------- .../Command/SchemaTool/DropCommand.php | 65 +++----------- .../Command/SchemaTool/UpdateCommand.php | 67 +++----------- .../Console/Helper/EntityManagerHelper.php | 18 +++- 5 files changed, 139 insertions(+), 164 deletions(-) create mode 100644 lib/Doctrine/ORM/Tools/Console/Command/SchemaTool/AbstractCommand.php diff --git a/lib/Doctrine/ORM/Tools/Console/Command/SchemaTool/AbstractCommand.php b/lib/Doctrine/ORM/Tools/Console/Command/SchemaTool/AbstractCommand.php new file mode 100644 index 000000000..a3333c8e0 --- /dev/null +++ b/lib/Doctrine/ORM/Tools/Console/Command/SchemaTool/AbstractCommand.php @@ -0,0 +1,88 @@ +. +*/ + +namespace Doctrine\ORM\Tools\Console\Command\SchemaTool; + +use Symfony\Components\Console\Input\InputArgument, + Symfony\Components\Console\Input\InputOption, + Symfony\Components\Console\Input\InputInterface, + Symfony\Components\Console\Output\OutputInterface, + Symfony\Components\Console\Command\Command, + Doctrine\ORM\Tools\Console\Helper\EntityManagerHelper, + Doctrine\ORM\Tools\SchemaTool; + +abstract class AbstractCommand extends Command +{ + /** + * @param InputInterface $input + * @param OutputInterface $output + * @param SchemaTool $schemaTool + * @param array $metadatas + */ + abstract protected function executeSchemaCommand(InputInterface $input, OutputInterface $output, SchemaTool $schemaTool, array $metadatas); + + /** + * @see Console\Command\Command + */ + protected function execute(InputInterface $input, OutputInterface $output) + { + $emHelper = $this->getHelper('em'); + + /* @var $em \Doctrine\ORM\EntityManager */ + $em = $emHelper->getEntityManager(); + + $reader = new \Doctrine\ORM\Tools\ClassMetadataReader(); + $reader->setEntityManager($em); + $reader->addMappingSource($em->getConfiguration()->getMetadataDriverImpl()); + + // Process source directories + if ($emHelper->hasAdditionalMappingPathInformation()) { + + foreach ($emHelper->getMappingPaths() as $dirName) { + $dirName = realpath($dirName); + + if ( ! file_exists($dirName)) { + throw new \InvalidArgumentException( + sprintf("Mapping directory '%s' does not exist.", $dirName) + ); + } else if ( ! is_readable($dirName)) { + throw new \InvalidArgumentException( + sprintf("Mapping directory '%s' does not have read permissions.", $dirName) + ); + } + + $reader->addMappingSource($dirName); + } + } + + // Retrieving ClassMetadatas + $metadatas = $reader->getMetadatas(); + + if ( ! empty($metadatas)) { + // Create SchemaTool + $tool = new \Doctrine\ORM\Tools\SchemaTool($em); + + $this->executeSchemaCommand($input, $output, $tool, $metadatas); + } else { + $output->write('No Metadata Classes to process.' . PHP_EOL); + } + } +} \ No newline at end of file diff --git a/lib/Doctrine/ORM/Tools/Console/Command/SchemaTool/CreateCommand.php b/lib/Doctrine/ORM/Tools/Console/Command/SchemaTool/CreateCommand.php index fd724c2df..06332a3eb 100644 --- a/lib/Doctrine/ORM/Tools/Console/Command/SchemaTool/CreateCommand.php +++ b/lib/Doctrine/ORM/Tools/Console/Command/SchemaTool/CreateCommand.php @@ -23,7 +23,9 @@ namespace Doctrine\ORM\Tools\Console\Command\SchemaTool; use Symfony\Components\Console\Input\InputArgument, Symfony\Components\Console\Input\InputOption, - Symfony\Components\Console; + Symfony\Components\Console\Input\InputInterface, + Symfony\Components\Console\Output\OutputInterface, + Doctrine\ORM\Tools\SchemaTool; /** * Command to create the database schema for a set of classes based on their mappings. @@ -37,7 +39,7 @@ use Symfony\Components\Console\Input\InputArgument, * @author Jonathan Wage * @author Roman Borschel */ -class CreateCommand extends Console\Command\Command +class CreateCommand extends AbstractCommand { /** * @see Console\Command\Command @@ -50,14 +52,6 @@ class CreateCommand extends Console\Command\Command 'Processes the schema and either create it directly on EntityManager Storage Connection or generate the SQL output.' ) ->setDefinition(array( - new InputArgument( - 'from-path', InputArgument::REQUIRED, 'The path of mapping information.' - ), - new InputOption( - 'from', null, InputOption::PARAMETER_REQUIRED | InputOption::PARAMETER_IS_ARRAY, - 'Optional paths of mapping information.', - array() - ), new InputOption( 'dump-sql', null, InputOption::PARAMETER_NONE, 'Instead of try to apply generated SQLs into EntityManager Storage Connection, output them.' @@ -69,52 +63,15 @@ EOT ); } - /** - * @see Console\Command\Command - */ - protected function execute(Console\Input\InputInterface $input, Console\Output\OutputInterface $output) + protected function executeSchemaCommand(InputInterface $input, OutputInterface $output, SchemaTool $schemaTool, array $metadatas) { - $em = $this->getHelper('em')->getEntityManager(); - - $reader = new \Doctrine\ORM\Tools\ClassMetadataReader(); - $reader->setEntityManager($em); - - // Process source directories - $fromPaths = array_merge(array($input->getArgument('from-path')), $input->getOption('from')); - - foreach ($fromPaths as $dirName) { - $dirName = realpath($dirName); - - if ( ! file_exists($dirName)) { - throw new \InvalidArgumentException( - sprintf("Mapping directory '%s' does not exist.", $dirName) - ); - } else if ( ! is_readable($dirName)) { - throw new \InvalidArgumentException( - sprintf("Mapping directory '%s' does not have read permissions.", $dirName) - ); - } - - $reader->addMappingSource($dirName); - } - - // Retrieving ClassMetadatas - $metadatas = $reader->getMetadatas(); - - if ( ! empty($metadatas)) { - // Create SchemaTool - $tool = new \Doctrine\ORM\Tools\SchemaTool($em); - - if ($input->getOption('dump-sql') === null) { - $sqls = $tool->getCreateSchemaSql($metadatas); - $output->write(implode(';' . PHP_EOL, $sqls)); - } else { - $output->write('Creating database schema...' . PHP_EOL); - $tool->createSchema($metadatas); - $output->write('Database schema created successfully!' . PHP_EOL); - } + if ($input->getOption('dump-sql') === true) { + $sqls = $schemaTool->getCreateSchemaSql($metadatas); + $output->write(implode(';' . PHP_EOL, $sqls) . PHP_EOL); } else { - $output->write('No Metadata Classes to process.' . PHP_EOL); + $output->write('Creating database schema...' . PHP_EOL); + $schemaTool->createSchema($metadatas); + $output->write('Database schema created successfully!' . PHP_EOL); } } } \ No newline at end of file diff --git a/lib/Doctrine/ORM/Tools/Console/Command/SchemaTool/DropCommand.php b/lib/Doctrine/ORM/Tools/Console/Command/SchemaTool/DropCommand.php index 9bcf280e7..1c6d0c57a 100644 --- a/lib/Doctrine/ORM/Tools/Console/Command/SchemaTool/DropCommand.php +++ b/lib/Doctrine/ORM/Tools/Console/Command/SchemaTool/DropCommand.php @@ -23,7 +23,9 @@ namespace Doctrine\ORM\Tools\Console\Command\SchemaTool; use Symfony\Components\Console\Input\InputArgument, Symfony\Components\Console\Input\InputOption, - Symfony\Components\Console; + Symfony\Components\Console\Input\InputInterface, + Symfony\Components\Console\Output\OutputInterface, + Doctrine\ORM\Tools\SchemaTool; /** * Command to drop the database schema for a set of classes based on their mappings. @@ -37,7 +39,7 @@ use Symfony\Components\Console\Input\InputArgument, * @author Jonathan Wage * @author Roman Borschel */ -class DropCommand extends Console\Command\Command +class DropCommand extends AbstractCommand { /** * @see Console\Command\Command @@ -50,14 +52,6 @@ class DropCommand extends Console\Command\Command 'Processes the schema and either drop the database schema of EntityManager Storage Connection or generate the SQL output.' ) ->setDefinition(array( - new InputArgument( - 'from-path', InputArgument::REQUIRED, 'The path of mapping information.' - ), - new InputOption( - 'from', null, InputOption::PARAMETER_REQUIRED | InputOption::PARAMETER_IS_ARRAY, - 'Optional paths of mapping information.', - array() - ), new InputOption( 'dump-sql', null, InputOption::PARAMETER_NONE, 'Instead of try to apply generated SQLs into EntityManager Storage Connection, output them.' @@ -70,52 +64,15 @@ EOT ); } - /** - * @see Console\Command\Command - */ - protected function execute(Console\Input\InputInterface $input, Console\Output\OutputInterface $output) + protected function executeSchemaCommand(InputInterface $input, OutputInterface $output, SchemaTool $schemaTool, array $metadatas) { - $em = $this->getHelper('em')->getEntityManager(); - - $reader = new \Doctrine\ORM\Tools\ClassMetadataReader(); - $reader->setEntityManager($em); - - // Process source directories - $fromPaths = array_merge(array($input->getArgument('from-path')), $input->getOption('from')); - - foreach ($fromPaths as $dirName) { - $dirName = realpath($dirName); - - if ( ! file_exists($dirName)) { - throw new \InvalidArgumentException( - sprintf("Mapping directory '%s' does not exist.", $dirName) - ); - } else if ( ! is_readable($dirName)) { - throw new \InvalidArgumentException( - sprintf("Mapping directory '%s' does not have read permissions.", $dirName) - ); - } - - $reader->addMappingSource($dirName); - } - - // Retrieving ClassMetadatas - $metadatas = $reader->getMetadatas(); - - if ( ! empty($metadatas)) { - // Create SchemaTool - $tool = new \Doctrine\ORM\Tools\SchemaTool($em); - - if ($input->getOption('dump-sql') === null) { - $sqls = $tool->getDropSchemaSql($metadatas); - $output->write(implode(';' . PHP_EOL, $sqls)); - } else { - $output->write('Dropping database schema...' . PHP_EOL); - $tool->dropSchema($metadatas); - $output->write('Database schema dropped successfully!' . PHP_EOL); - } + if ($input->getOption('dump-sql') === true) { + $sqls = $schemaTool->getDropSchemaSql($metadatas); + $output->write(implode(';' . PHP_EOL, $sqls) . PHP_EOL); } else { - $output->write('No Metadata Classes to process.' . PHP_EOL); + $output->write('Dropping database schema...' . PHP_EOL); + $schemaTool->dropSchema($metadatas); + $output->write('Database schema dropped successfully!' . PHP_EOL); } } } \ No newline at end of file diff --git a/lib/Doctrine/ORM/Tools/Console/Command/SchemaTool/UpdateCommand.php b/lib/Doctrine/ORM/Tools/Console/Command/SchemaTool/UpdateCommand.php index 7d85bb6a9..32d8fd0f7 100644 --- a/lib/Doctrine/ORM/Tools/Console/Command/SchemaTool/UpdateCommand.php +++ b/lib/Doctrine/ORM/Tools/Console/Command/SchemaTool/UpdateCommand.php @@ -23,7 +23,9 @@ namespace Doctrine\ORM\Tools\Console\Command\SchemaTool; use Symfony\Components\Console\Input\InputArgument, Symfony\Components\Console\Input\InputOption, - Symfony\Components\Console; + Symfony\Components\Console\Input\InputInterface, + Symfony\Components\Console\Output\OutputInterface, + Doctrine\ORM\Tools\SchemaTool; /** * Command to update the database schema for a set of classes based on their mappings. @@ -37,7 +39,7 @@ use Symfony\Components\Console\Input\InputArgument, * @author Jonathan Wage * @author Roman Borschel */ -class UpdateCommand extends Console\Command\Command +class UpdateCommand extends AbstractCommand { /** * @see Console\Command\Command @@ -50,14 +52,6 @@ class UpdateCommand extends Console\Command\Command 'Processes the schema and either update the database schema of EntityManager Storage Connection or generate the SQL output.' ) ->setDefinition(array( - new InputArgument( - 'from-path', InputArgument::REQUIRED, 'The path of mapping information.' - ), - new InputOption( - 'from', null, InputOption::PARAMETER_REQUIRED | InputOption::PARAMETER_IS_ARRAY, - 'Optional paths of mapping information.', - array() - ), new InputOption( 'complete', null, InputOption::PARAMETER_NONE, 'If defined, all assets of the database which are not relevant to the current metadata will be dropped.' @@ -75,55 +69,18 @@ EOT ); } - /** - * @see Console\Command\Command - */ - protected function execute(Console\Input\InputInterface $input, Console\Output\OutputInterface $output) + protected function executeSchemaCommand(InputInterface $input, OutputInterface $output, SchemaTool $schemaTool, array $metadatas) { - $em = $this->getHelper('em')->getEntityManager(); - - $reader = new \Doctrine\ORM\Tools\ClassMetadataReader(); - $reader->setEntityManager($em); - - // Process source directories - $fromPaths = array_merge(array($input->getArgument('from-path')), $input->getOption('from')); - - foreach ($fromPaths as $dirName) { - $dirName = realpath($dirName); - - if ( ! file_exists($dirName)) { - throw new \InvalidArgumentException( - sprintf("Mapping directory '%s' does not exist.", $dirName) - ); - } else if ( ! is_readable($dirName)) { - throw new \InvalidArgumentException( - sprintf("Mapping directory '%s' does not have read permissions.", $dirName) - ); - } - - $reader->addMappingSource($dirName); - } - // Defining if update is complete or not (--complete not defined means $saveMode = true) - $saveMode = ($input->getOption('complete') === null); + $saveMode = ($input->getOption('complete') === true); - // Retrieving ClassMetadatas - $metadatas = $reader->getMetadatas(); - - if ( ! empty($metadatas)) { - // Create SchemaTool - $tool = new \Doctrine\ORM\Tools\SchemaTool($em); - - if ($input->getOption('dump-sql') === null) { - $sqls = $tool->getUpdateSchemaSql($metadatas, $saveMode); - $output->write(implode(';' . PHP_EOL, $sqls)); - } else { - $output->write('Updating database schema...' . PHP_EOL); - $tool->updateSchema($metadatas, $saveMode); - $output->write('Database schema updated successfully!' . PHP_EOL); - } + if ($input->getOption('dump-sql') === true) { + $sqls = $schemaTool->getUpdateSchemaSql($metadatas, $saveMode); + $output->write(implode(';' . PHP_EOL, $sqls) . PHP_EOL); } else { - $output->write('No Metadata Classes to process.' . PHP_EOL); + $output->write('Updating database schema...' . PHP_EOL); + $schemaTool->updateSchema($metadatas, $saveMode); + $output->write('Database schema updated successfully!' . PHP_EOL); } } } \ No newline at end of file diff --git a/lib/Doctrine/ORM/Tools/Console/Helper/EntityManagerHelper.php b/lib/Doctrine/ORM/Tools/Console/Helper/EntityManagerHelper.php index 2636006e3..e706d69ac 100644 --- a/lib/Doctrine/ORM/Tools/Console/Helper/EntityManagerHelper.php +++ b/lib/Doctrine/ORM/Tools/Console/Helper/EntityManagerHelper.php @@ -44,14 +44,20 @@ class EntityManagerHelper extends Helper */ protected $_em; + /** + * @var array + */ + protected $_mappingPaths = array(); + /** * Constructor * * @param Connection $connection Doctrine Database Connection */ - public function __construct(EntityManager $em) + public function __construct(EntityManager $em, $mappingPaths = array()) { $this->_em = $em; + $this->_mappingPaths = $mappingPaths; } /** @@ -64,6 +70,16 @@ class EntityManagerHelper extends Helper return $this->_em; } + public function hasAdditionalMappingPathInformation() + { + return count($this->_mappingPaths); + } + + public function getMappingPaths() + { + return $this->_mappingPaths; + } + /** * @see Helper */ From 5d329d7e2c1d3bda2218ce6ab5eb046ef00284af Mon Sep 17 00:00:00 2001 From: Benjamin Eberlei Date: Sat, 10 Apr 2010 11:30:39 +0200 Subject: [PATCH 11/86] DDC-502, DDC-507 - Fix refactorings to work with Annotations Driver also --- .../ORM/Tools/Console/Command/SchemaTool/AbstractCommand.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/Doctrine/ORM/Tools/Console/Command/SchemaTool/AbstractCommand.php b/lib/Doctrine/ORM/Tools/Console/Command/SchemaTool/AbstractCommand.php index a3333c8e0..017d7b636 100644 --- a/lib/Doctrine/ORM/Tools/Console/Command/SchemaTool/AbstractCommand.php +++ b/lib/Doctrine/ORM/Tools/Console/Command/SchemaTool/AbstractCommand.php @@ -73,8 +73,8 @@ abstract class AbstractCommand extends Command } } - // Retrieving ClassMetadatas - $metadatas = $reader->getMetadatas(); + // Retrieving ClassMetadatas, autoloading required since we need access to the Reflection stuff. + $metadatas = $reader->getMetadatas(true); if ( ! empty($metadatas)) { // Create SchemaTool From b2fe3820fcda3496f91cf43218cc4e3e1049579f Mon Sep 17 00:00:00 2001 From: Benjamin Eberlei Date: Sat, 10 Apr 2010 12:31:48 +0200 Subject: [PATCH 12/86] DDC-502, DDC-507 - Changes to how Annotation Metadata Driver is handled in SchemaTool Command, Specifiying Mapping paths is now required for this to work. --- .../Tools/Console/Command/SchemaTool/AbstractCommand.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/lib/Doctrine/ORM/Tools/Console/Command/SchemaTool/AbstractCommand.php b/lib/Doctrine/ORM/Tools/Console/Command/SchemaTool/AbstractCommand.php index 017d7b636..12712383f 100644 --- a/lib/Doctrine/ORM/Tools/Console/Command/SchemaTool/AbstractCommand.php +++ b/lib/Doctrine/ORM/Tools/Console/Command/SchemaTool/AbstractCommand.php @@ -27,7 +27,8 @@ use Symfony\Components\Console\Input\InputArgument, Symfony\Components\Console\Output\OutputInterface, Symfony\Components\Console\Command\Command, Doctrine\ORM\Tools\Console\Helper\EntityManagerHelper, - Doctrine\ORM\Tools\SchemaTool; + Doctrine\ORM\Tools\SchemaTool, + Doctrine\ORM\Mapping\Driver\AbstractFileDriver; abstract class AbstractCommand extends Command { @@ -51,7 +52,11 @@ abstract class AbstractCommand extends Command $reader = new \Doctrine\ORM\Tools\ClassMetadataReader(); $reader->setEntityManager($em); - $reader->addMappingSource($em->getConfiguration()->getMetadataDriverImpl()); + + $metadataDriver = $em->getConfiguration()->getMetadataDriverImpl(); + if ($metadataDriver instanceof AbstractFileDriver) { + $reader->addMappingSource($metadataDriver); + } // Process source directories if ($emHelper->hasAdditionalMappingPathInformation()) { From 6e5b1bbe60a24dec888d99881aa4960d23dfaf9d Mon Sep 17 00:00:00 2001 From: Benjamin Eberlei Date: Sat, 10 Apr 2010 17:35:18 +0200 Subject: [PATCH 13/86] DDC-510 - Refactored Metadata Driver to be an required option, even for Annotations - allowing to use the specified paths in ORM Tooling Commands --- lib/Doctrine/ORM/Configuration.php | 32 +++++---- lib/Doctrine/ORM/EntityManager.php | 4 +- .../ORM/Mapping/Driver/AnnotationDriver.php | 72 +++++++++++-------- lib/Doctrine/ORM/Mapping/MappingException.php | 6 ++ lib/Doctrine/ORM/ORMException.php | 6 ++ .../Command/SchemaTool/AbstractCommand.php | 31 +------- .../Console/Helper/EntityManagerHelper.php | 18 +---- .../Tests/Mocks/EntityManagerMock.php | 1 + .../Tests/ORM/Functional/QueryCacheTest.php | 4 +- .../Tests/ORM/Functional/ResultCacheTest.php | 2 +- .../Doctrine/Tests/OrmFunctionalTestCase.php | 5 +- tests/Doctrine/Tests/OrmTestCase.php | 4 ++ 12 files changed, 89 insertions(+), 96 deletions(-) diff --git a/lib/Doctrine/ORM/Configuration.php b/lib/Doctrine/ORM/Configuration.php index 6d5964c8c..4f7de0b4e 100644 --- a/lib/Doctrine/ORM/Configuration.php +++ b/lib/Doctrine/ORM/Configuration.php @@ -21,6 +21,9 @@ namespace Doctrine\ORM; +use Doctrine\Common\Cache\Cache, + Doctrine\ORM\Mapping\Driver\Driver; + /** * Configuration container for all configuration options of Doctrine. * It combines all configuration options from DBAL & ORM. @@ -118,11 +121,11 @@ class Configuration extends \Doctrine\DBAL\Configuration /** * Sets the cache driver implementation that is used for metadata caching. * - * @param object $driverImpl + * @param Driver $driverImpl * @todo Force parameter to be a Closure to ensure lazy evaluation * (as soon as a metadata cache is in effect, the driver never needs to initialize). */ - public function setMetadataDriverImpl($driverImpl) + public function setMetadataDriverImpl(Driver $driverImpl) { $this->_attributes['metadataDriverImpl'] = $driverImpl; } @@ -168,14 +171,13 @@ class Configuration extends \Doctrine\DBAL\Configuration /** * Gets the cache driver implementation that is used for the mapping metadata. * - * @return object + * @throws ORMException + * @return Mapping\Driver\Driver */ public function getMetadataDriverImpl() { if ($this->_attributes['metadataDriverImpl'] == null) { - $reader = new \Doctrine\Common\Annotations\AnnotationReader(new \Doctrine\Common\Cache\ArrayCache); - $reader->setDefaultAnnotationNamespace('Doctrine\ORM\Mapping\\'); - $this->_attributes['metadataDriverImpl'] = new \Doctrine\ORM\Mapping\Driver\AnnotationDriver($reader); + throw ORMException::missingMappingDriverImpl(); } return $this->_attributes['metadataDriverImpl']; @@ -184,7 +186,7 @@ class Configuration extends \Doctrine\DBAL\Configuration /** * Gets the cache driver implementation that is used for query result caching. * - * @return object + * @return \Doctrine\Common\Cache\Cache */ public function getResultCacheImpl() { @@ -194,9 +196,9 @@ class Configuration extends \Doctrine\DBAL\Configuration /** * Sets the cache driver implementation that is used for query result caching. * - * @param object $cacheImpl + * @param \Doctrine\Common\Cache\Cache $cacheImpl */ - public function setResultCacheImpl($cacheImpl) + public function setResultCacheImpl(Cache $cacheImpl) { $this->_attributes['resultCacheImpl'] = $cacheImpl; } @@ -204,7 +206,7 @@ class Configuration extends \Doctrine\DBAL\Configuration /** * Gets the cache driver implementation that is used for the query cache (SQL cache). * - * @return object + * @return \Doctrine\Common\Cache\Cache */ public function getQueryCacheImpl() { @@ -214,9 +216,9 @@ class Configuration extends \Doctrine\DBAL\Configuration /** * Sets the cache driver implementation that is used for the query cache (SQL cache). * - * @param object $cacheImpl + * @param \Doctrine\Common\Cache\Cache $cacheImpl */ - public function setQueryCacheImpl($cacheImpl) + public function setQueryCacheImpl(Cache $cacheImpl) { $this->_attributes['queryCacheImpl'] = $cacheImpl; } @@ -224,7 +226,7 @@ class Configuration extends \Doctrine\DBAL\Configuration /** * Gets the cache driver implementation that is used for metadata caching. * - * @return object + * @return \Doctrine\Common\Cache\Cache */ public function getMetadataCacheImpl() { @@ -234,9 +236,9 @@ class Configuration extends \Doctrine\DBAL\Configuration /** * Sets the cache driver implementation that is used for metadata caching. * - * @param object $cacheImpl + * @param \Doctrine\Common\Cache\Cache $cacheImpl */ - public function setMetadataCacheImpl($cacheImpl) + public function setMetadataCacheImpl(Cache $cacheImpl) { $this->_attributes['metadataCacheImpl'] = $cacheImpl; } diff --git a/lib/Doctrine/ORM/EntityManager.php b/lib/Doctrine/ORM/EntityManager.php index 897569b8c..d915f1d63 100644 --- a/lib/Doctrine/ORM/EntityManager.php +++ b/lib/Doctrine/ORM/EntityManager.php @@ -593,9 +593,9 @@ class EntityManager * @param EventManager $eventManager The EventManager instance to use. * @return EntityManager The created EntityManager. */ - public static function create($conn, Configuration $config = null, EventManager $eventManager = null) + public static function create($conn, Configuration $config, EventManager $eventManager = null) { - $config = $config ?: new Configuration(); + $config->getMetadataDriverImpl(); // assert this is set if (is_array($conn)) { $conn = \Doctrine\DBAL\DriverManager::getConnection($conn, $config, ($eventManager ?: new EventManager())); diff --git a/lib/Doctrine/ORM/Mapping/Driver/AnnotationDriver.php b/lib/Doctrine/ORM/Mapping/Driver/AnnotationDriver.php index 8e01479f7..2f669cf07 100644 --- a/lib/Doctrine/ORM/Mapping/Driver/AnnotationDriver.php +++ b/lib/Doctrine/ORM/Mapping/Driver/AnnotationDriver.php @@ -428,40 +428,41 @@ class AnnotationDriver implements Driver return $this->_classNames; } + if (count($this->_paths) == 0) { + throw MappingException::pathRequired(); + } + $classes = array(); + $includedFiles = array(); - if ($this->_paths) { - $includedFiles = array(); - - foreach ((array) $this->_paths as $path) { - if ( ! is_dir($path)) { - throw MappingException::fileMappingDriversRequireConfiguredDirectoryPath(); - } - - $iterator = new \RecursiveIteratorIterator( - new \RecursiveDirectoryIterator($path), - \RecursiveIteratorIterator::LEAVES_ONLY - ); - - foreach ($iterator as $file) { - if (($fileName = $file->getBasename($this->_fileExtension)) == $file->getBasename()) { - continue; - } - - $sourceFile = realpath($file->getPathName()); - require_once $sourceFile; - $includedFiles[] = $sourceFile; - } + foreach ($this->_paths as $path) { + if ( ! is_dir($path)) { + throw MappingException::fileMappingDriversRequireConfiguredDirectoryPath(); } - $declared = get_declared_classes(); + $iterator = new \RecursiveIteratorIterator( + new \RecursiveDirectoryIterator($path), + \RecursiveIteratorIterator::LEAVES_ONLY + ); - foreach ($declared as $className) { - $rc = new \ReflectionClass($className); - $sourceFile = $rc->getFileName(); - if (in_array($sourceFile, $includedFiles) && ! $this->isTransient($className)) { - $classes[] = $className; + foreach ($iterator as $file) { + if (($fileName = $file->getBasename($this->_fileExtension)) == $file->getBasename()) { + continue; } + + $sourceFile = realpath($file->getPathName()); + require_once $sourceFile; + $includedFiles[] = $sourceFile; + } + } + + $declared = get_declared_classes(); + + foreach ($declared as $className) { + $rc = new \ReflectionClass($className); + $sourceFile = $rc->getFileName(); + if (in_array($sourceFile, $includedFiles) && ! $this->isTransient($className)) { + $classes[] = $className; } } @@ -470,4 +471,19 @@ class AnnotationDriver implements Driver return $classes; } + /** + * Factory method for the Annotation Driver + * + * @param array|string $paths + * @param AnnotationReader $reader + * @return AnnotationDriver + */ + static public function create($paths = array(), AnnotationReader $reader = null) + { + if ($reader == null) { + $reader = new AnnotationReader(); + $reader->setDefaultAnnotationNamespace('Doctrine\ORM\Mapping\\'); + } + return new self($reader, $paths); + } } diff --git a/lib/Doctrine/ORM/Mapping/MappingException.php b/lib/Doctrine/ORM/Mapping/MappingException.php index ae0907728..8881a3c71 100644 --- a/lib/Doctrine/ORM/Mapping/MappingException.php +++ b/lib/Doctrine/ORM/Mapping/MappingException.php @@ -28,6 +28,12 @@ namespace Doctrine\ORM\Mapping; */ class MappingException extends \Doctrine\ORM\ORMException { + public static function pathRequired() + { + return new self("Specifying the paths to your entities is required ". + "in the AnnotationDriver to retrieve all class names."); + } + public static function identifierRequired($entityName) { return new self("No identifier/primary key specified for Entity '$entityName'." diff --git a/lib/Doctrine/ORM/ORMException.php b/lib/Doctrine/ORM/ORMException.php index 82a8a877e..4d39d1e47 100644 --- a/lib/Doctrine/ORM/ORMException.php +++ b/lib/Doctrine/ORM/ORMException.php @@ -10,6 +10,12 @@ namespace Doctrine\ORM; */ class ORMException extends \Exception { + public static function missingMappingDriverImpl() + { + return new self("It's a requirement to specify a Metadata Driver and pass it ". + "to Doctrine\ORM\Configuration::setMetadataDriverImpl()."); + } + public static function entityMissingAssignedId($entity) { return new self("Entity of type " . get_class($entity) . " is missing an assigned ID."); diff --git a/lib/Doctrine/ORM/Tools/Console/Command/SchemaTool/AbstractCommand.php b/lib/Doctrine/ORM/Tools/Console/Command/SchemaTool/AbstractCommand.php index 12712383f..84267fbd7 100644 --- a/lib/Doctrine/ORM/Tools/Console/Command/SchemaTool/AbstractCommand.php +++ b/lib/Doctrine/ORM/Tools/Console/Command/SchemaTool/AbstractCommand.php @@ -50,36 +50,7 @@ abstract class AbstractCommand extends Command /* @var $em \Doctrine\ORM\EntityManager */ $em = $emHelper->getEntityManager(); - $reader = new \Doctrine\ORM\Tools\ClassMetadataReader(); - $reader->setEntityManager($em); - - $metadataDriver = $em->getConfiguration()->getMetadataDriverImpl(); - if ($metadataDriver instanceof AbstractFileDriver) { - $reader->addMappingSource($metadataDriver); - } - - // Process source directories - if ($emHelper->hasAdditionalMappingPathInformation()) { - - foreach ($emHelper->getMappingPaths() as $dirName) { - $dirName = realpath($dirName); - - if ( ! file_exists($dirName)) { - throw new \InvalidArgumentException( - sprintf("Mapping directory '%s' does not exist.", $dirName) - ); - } else if ( ! is_readable($dirName)) { - throw new \InvalidArgumentException( - sprintf("Mapping directory '%s' does not have read permissions.", $dirName) - ); - } - - $reader->addMappingSource($dirName); - } - } - - // Retrieving ClassMetadatas, autoloading required since we need access to the Reflection stuff. - $metadatas = $reader->getMetadatas(true); + $metadatas = $em->getMetadataFactory()->getAllMetadata(); if ( ! empty($metadatas)) { // Create SchemaTool diff --git a/lib/Doctrine/ORM/Tools/Console/Helper/EntityManagerHelper.php b/lib/Doctrine/ORM/Tools/Console/Helper/EntityManagerHelper.php index e706d69ac..2636006e3 100644 --- a/lib/Doctrine/ORM/Tools/Console/Helper/EntityManagerHelper.php +++ b/lib/Doctrine/ORM/Tools/Console/Helper/EntityManagerHelper.php @@ -44,20 +44,14 @@ class EntityManagerHelper extends Helper */ protected $_em; - /** - * @var array - */ - protected $_mappingPaths = array(); - /** * Constructor * * @param Connection $connection Doctrine Database Connection */ - public function __construct(EntityManager $em, $mappingPaths = array()) + public function __construct(EntityManager $em) { $this->_em = $em; - $this->_mappingPaths = $mappingPaths; } /** @@ -70,16 +64,6 @@ class EntityManagerHelper extends Helper return $this->_em; } - public function hasAdditionalMappingPathInformation() - { - return count($this->_mappingPaths); - } - - public function getMappingPaths() - { - return $this->_mappingPaths; - } - /** * @see Helper */ diff --git a/tests/Doctrine/Tests/Mocks/EntityManagerMock.php b/tests/Doctrine/Tests/Mocks/EntityManagerMock.php index dd4a36ca4..4006ebda7 100644 --- a/tests/Doctrine/Tests/Mocks/EntityManagerMock.php +++ b/tests/Doctrine/Tests/Mocks/EntityManagerMock.php @@ -78,6 +78,7 @@ class EntityManagerMock extends \Doctrine\ORM\EntityManager $config = new \Doctrine\ORM\Configuration(); $config->setProxyDir(__DIR__ . '/../Proxies'); $config->setProxyNamespace('Doctrine\Tests\Proxies'); + $config->setMetadataDriverImpl(\Doctrine\ORM\Mapping\Driver\AnnotationDriver::create()); } if (is_null($eventManager)) { $eventManager = new \Doctrine\Common\EventManager(); diff --git a/tests/Doctrine/Tests/ORM/Functional/QueryCacheTest.php b/tests/Doctrine/Tests/ORM/Functional/QueryCacheTest.php index 46681ac05..34d317d2b 100644 --- a/tests/Doctrine/Tests/ORM/Functional/QueryCacheTest.php +++ b/tests/Doctrine/Tests/ORM/Functional/QueryCacheTest.php @@ -83,7 +83,7 @@ class QueryCacheTest extends \Doctrine\Tests\OrmFunctionalTestCase public function testQueryCache_NoHitSaveParserResult() { - $this->_em->getConfiguration()->setQueryCacheImpl(null); + $this->_em->getConfiguration()->setQueryCacheImpl(new ArrayCache()); $query = $this->_em->createQuery('select ux from Doctrine\Tests\Models\CMS\CmsUser ux'); @@ -103,7 +103,7 @@ class QueryCacheTest extends \Doctrine\Tests\OrmFunctionalTestCase public function testQueryCache_HitDoesNotSaveParserResult() { - $this->_em->getConfiguration()->setQueryCacheImpl(null); + $this->_em->getConfiguration()->setQueryCacheImpl(new ArrayCache()); $query = $this->_em->createQuery('select ux from Doctrine\Tests\Models\CMS\CmsUser ux'); diff --git a/tests/Doctrine/Tests/ORM/Functional/ResultCacheTest.php b/tests/Doctrine/Tests/ORM/Functional/ResultCacheTest.php index 05bd8333d..3c5f00982 100644 --- a/tests/Doctrine/Tests/ORM/Functional/ResultCacheTest.php +++ b/tests/Doctrine/Tests/ORM/Functional/ResultCacheTest.php @@ -82,7 +82,7 @@ class ResultCacheTest extends \Doctrine\Tests\OrmFunctionalTestCase $this->assertTrue($cache->contains('testing_result_cache_id')); - $this->_em->getConfiguration()->setResultCacheImpl(null); + $this->_em->getConfiguration()->setResultCacheImpl(new ArrayCache()); } public function testNativeQueryResultCaching() diff --git a/tests/Doctrine/Tests/OrmFunctionalTestCase.php b/tests/Doctrine/Tests/OrmFunctionalTestCase.php index 9e02cb285..b4ca023aa 100644 --- a/tests/Doctrine/Tests/OrmFunctionalTestCase.php +++ b/tests/Doctrine/Tests/OrmFunctionalTestCase.php @@ -221,7 +221,7 @@ abstract class OrmFunctionalTestCase extends OrmTestCase } if (is_null(self::$_queryCacheImpl)) { - self::$_queryCacheImpl = new \Doctrine\Common\Cache\ArrayCache; + self::$_queryCacheImpl = new \Doctrine\Common\Cache\ArrayCache; } $this->_sqlLoggerStack = new \Doctrine\DBAL\Logging\DebugStack(); @@ -234,6 +234,9 @@ abstract class OrmFunctionalTestCase extends OrmTestCase $config->setQueryCacheImpl(self::$_queryCacheImpl); $config->setProxyDir(__DIR__ . '/Proxies'); $config->setProxyNamespace('Doctrine\Tests\Proxies'); + + $driverImpl = \Doctrine\ORM\Mapping\Driver\AnnotationDriver::create(); + $config->setMetadataDriverImpl($driverImpl); $conn = $this->sharedFixture['conn']; $conn->getConfiguration()->setSQLLogger($this->_sqlLoggerStack); diff --git a/tests/Doctrine/Tests/OrmTestCase.php b/tests/Doctrine/Tests/OrmTestCase.php index 5ddf146dc..1167ad0b8 100644 --- a/tests/Doctrine/Tests/OrmTestCase.php +++ b/tests/Doctrine/Tests/OrmTestCase.php @@ -30,6 +30,10 @@ abstract class OrmTestCase extends DoctrineTestCase } else { $config->setMetadataCacheImpl(new \Doctrine\Common\Cache\ArrayCache); } + + $driverImpl = \Doctrine\ORM\Mapping\Driver\AnnotationDriver::create(); + $config->setMetadataDriverImpl($driverImpl); + $config->setQueryCacheImpl(self::getSharedQueryCacheImpl()); $config->setProxyDir(__DIR__ . '/Proxies'); $config->setProxyNamespace('Doctrine\Tests\Proxies'); From 700060cfb27f3b44f8fce811be35d234fd42bc1c Mon Sep 17 00:00:00 2001 From: Benjamin Eberlei Date: Sun, 11 Apr 2010 09:30:01 +0200 Subject: [PATCH 14/86] DDC-510 Refactored all Command Tools to use ClassMetadataFactory instead of ClassMetadataReader --- .../Command/ConvertDoctrine1SchemaCommand.php | 4 +- .../Console/Command/ConvertMappingCommand.php | 49 ++++---------- .../Command/GenerateEntitiesCommand.php | 66 ++++++------------- .../Command/GenerateProxiesCommand.php | 43 +++--------- .../Command/GenerateRepositoriesCommand.php | 43 +++--------- 5 files changed, 56 insertions(+), 149 deletions(-) diff --git a/lib/Doctrine/ORM/Tools/Console/Command/ConvertDoctrine1SchemaCommand.php b/lib/Doctrine/ORM/Tools/Console/Command/ConvertDoctrine1SchemaCommand.php index 48ce45fb0..ae297c84f 100644 --- a/lib/Doctrine/ORM/Tools/Console/Command/ConvertDoctrine1SchemaCommand.php +++ b/lib/Doctrine/ORM/Tools/Console/Command/ConvertDoctrine1SchemaCommand.php @@ -23,7 +23,9 @@ namespace Doctrine\ORM\Tools\Console\Command; use Symfony\Components\Console\Input\InputArgument, Symfony\Components\Console\Input\InputOption, - Symfony\Components\Console; + Symfony\Components\Console, + Doctrine\ORM\Tools\Export\ClassMetadataExporter, + Doctrine\ORM\Tools\ConvertDoctrine1Schema; /** * Command to convert a Doctrine 1 schema to a Doctrine 2 mapping file. diff --git a/lib/Doctrine/ORM/Tools/Console/Command/ConvertMappingCommand.php b/lib/Doctrine/ORM/Tools/Console/Command/ConvertMappingCommand.php index 45bc79714..48e6f3eb2 100644 --- a/lib/Doctrine/ORM/Tools/Console/Command/ConvertMappingCommand.php +++ b/lib/Doctrine/ORM/Tools/Console/Command/ConvertMappingCommand.php @@ -23,7 +23,9 @@ namespace Doctrine\ORM\Tools\Console\Command; use Symfony\Components\Console\Input\InputArgument, Symfony\Components\Console\Input\InputOption, - Symfony\Components\Console; + Symfony\Components\Console, + Doctrine\ORM\Tools\Console\MetadataFilter, + Doctrine\ORM\Tools\Export\ClassMetadataExporter; /** * Command to convert your mapping information between the various formats. @@ -48,8 +50,9 @@ class ConvertMappingCommand extends Console\Command\Command ->setName('orm:convert-mapping') ->setDescription('Convert mapping information between supported formats.') ->setDefinition(array( - new InputArgument( - 'from-path', InputArgument::REQUIRED, 'The path of mapping information.' + new InputOption( + 'filter', null, InputOption::PARAMETER_REQUIRED | InputOption::PARAMETER_IS_ARRAY, + 'A string pattern used to match entities that should be processed.' ), new InputArgument( 'to-type', InputArgument::REQUIRED, 'The mapping type to be converted.' @@ -58,10 +61,8 @@ class ConvertMappingCommand extends Console\Command\Command 'dest-path', InputArgument::REQUIRED, 'The path to generate your entities classes.' ), - new InputOption( - 'from', null, InputOption::PARAMETER_REQUIRED | InputOption::PARAMETER_IS_ARRAY, - 'Optional paths of mapping information.', - array() + new InputArgument( + 'from-database', InputArgument::OPTIONAL, 'The path of mapping information.' ), new InputOption( 'extend', null, InputOption::PARAMETER_OPTIONAL, @@ -84,37 +85,16 @@ EOT protected function execute(Console\Input\InputInterface $input, Console\Output\OutputInterface $output) { $em = $this->getHelper('em')->getEntityManager(); - $cme = new ClassMetadataExporter(); - // Process source directories - $fromPath = $input->getArgument('from-path'); + $metadatas = $em->getMetadataFactory()->getAllMetadata(); + $metadatas = MetadataFilter::filter($metadatas, $input->getOption('filter')); - if (strtolower($fromPath) !== 'database') { - $fromPaths = array_merge(array($fromPath), $input->getOption('from')); - - foreach ($fromPaths as &$dirName) { - $dirName = realpath($dirName); - - if ( ! file_exists($dirName)) { - throw new \InvalidArgumentException( - sprintf("Mapping directory '%s' does not exist.", $dirName) - ); - } else if ( ! is_readable($dirName)) { - throw new \InvalidArgumentException( - sprintf("Mapping directory '%s' does not have read permissions.", $dirName) - ); - } - - $cme->addMappingSource($dirName); - } - } else { + if ($input->getArgument('from-database') === true) { $em->getConfiguration()->setMetadataDriverImpl( new \Doctrine\ORM\Mapping\Driver\DatabaseDriver( $em->getConnection()->getSchemaManager() ) ); - - $cme->addMappingSource($fromPath); } // Process destination directory @@ -132,6 +112,7 @@ EOT $toType = strtolower($input->getArgument('to-type')); + $cme = new ClassMetadataExporter(); $exporter = $cme->getExporter($toType, $destPath); if ($toType == 'annotation') { @@ -145,9 +126,7 @@ EOT } } - $metadatas = $cme->getMetadatas(); - - if ($metadatas) { + if (count($metadatas)) { foreach ($metadatas as $metadata) { $output->write(sprintf('Processing entity "%s"', $metadata->name) . PHP_EOL); } @@ -156,7 +135,7 @@ EOT $exporter->export(); $output->write(PHP_EOL . sprintf( - 'Exporting "%s" mapping information to "%s"', $toType, $destPath + 'Exporting "%s" mapping information to "%s"' . PHP_EOL, $toType, $destPath )); } else { $output->write('No Metadata Classes to process.' . PHP_EOL); diff --git a/lib/Doctrine/ORM/Tools/Console/Command/GenerateEntitiesCommand.php b/lib/Doctrine/ORM/Tools/Console/Command/GenerateEntitiesCommand.php index 0cf0230dd..119a08c1b 100644 --- a/lib/Doctrine/ORM/Tools/Console/Command/GenerateEntitiesCommand.php +++ b/lib/Doctrine/ORM/Tools/Console/Command/GenerateEntitiesCommand.php @@ -23,7 +23,9 @@ namespace Doctrine\ORM\Tools\Console\Command; use Symfony\Components\Console\Input\InputArgument, Symfony\Components\Console\Input\InputOption, - Symfony\Components\Console; + Symfony\Components\Console, + Doctrine\ORM\Tools\Console\MetadataFilter, + Doctrine\ORM\Tools\EntityGenerator; /** * Command to generate entity classes and method stubs from your mapping information. @@ -48,17 +50,13 @@ class GenerateEntitiesCommand extends Console\Command\Command ->setName('orm:generate-entities') ->setDescription('Generate entity classes and method stubs from your mapping information.') ->setDefinition(array( - new InputArgument( - 'from-path', InputArgument::REQUIRED, 'The path of mapping information.' + new InputOption( + 'filter', null, InputOption::PARAMETER_REQUIRED | InputOption::PARAMETER_IS_ARRAY, + 'A string pattern used to match entities that should be processed.' ), new InputArgument( 'dest-path', InputArgument::REQUIRED, 'The path to generate your entity classes.' ), - new InputOption( - 'from', null, InputOption::PARAMETER_REQUIRED | InputOption::PARAMETER_IS_ARRAY, - 'Optional paths of mapping information.', - array() - ), new InputOption( 'generate-annotations', null, InputOption::PARAMETER_OPTIONAL, 'Flag to define if generator should generate annotation metadata on entities.', false @@ -96,29 +94,10 @@ EOT protected function execute(Console\Input\InputInterface $input, Console\Output\OutputInterface $output) { $em = $this->getHelper('em')->getEntityManager(); - - $reader = new ClassMetadataReader(); - $reader->setEntityManager($em); - - // Process source directories - $fromPaths = array_merge(array($input->getArgument('from-path')), $input->getOption('from')); - - foreach ($fromPaths as $dirName) { - $dirName = realpath($dirName); - - if ( ! file_exists($dirName)) { - throw new \InvalidArgumentException( - sprintf("Mapping directory '%s' does not exist.", $dirName) - ); - } else if ( ! is_readable($dirName)) { - throw new \InvalidArgumentException( - sprintf("Mapping directory '%s' does not have read permissions.", $dirName) - ); - } - - $reader->addMappingSource($dirName); - } - + + $metadatas = $em->getMetadataFactory()->getAllMetadata(); + $metadatas = MetadataFilter::filter($metadatas, $input->getOption('filter')); + // Process destination directory $destPath = realpath($input->getArgument('dest-path')); @@ -132,23 +111,20 @@ EOT ); } - // Create EntityGenerator - $entityGenerator = new EntityGenerator(); + if ( count($metadatas)) { + // Create EntityGenerator + $entityGenerator = new EntityGenerator(); - $entityGenerator->setGenerateAnnotations($input->getOption('generate-annotations')); - $entityGenerator->setGenerateStubMethods($input->getOption('generate-methods')); - $entityGenerator->setRegenerateEntityIfExists($input->getOption('regenerate-entities')); - $entityGenerator->setUpdateEntityIfExists($input->getOption('update-entities')); - $entityGenerator->setNumSpaces($input->getOption('num-spaces')); + $entityGenerator->setGenerateAnnotations($input->getOption('generate-annotations')); + $entityGenerator->setGenerateStubMethods($input->getOption('generate-methods')); + $entityGenerator->setRegenerateEntityIfExists($input->getOption('regenerate-entities')); + $entityGenerator->setUpdateEntityIfExists($input->getOption('update-entities')); + $entityGenerator->setNumSpaces($input->getOption('num-spaces')); - if (($extend = $input->getOption('extend')) !== null) { - $entityGenerator->setClassToExtend($extend); - } + if (($extend = $input->getOption('extend')) !== null) { + $entityGenerator->setClassToExtend($extend); + } - // Retrieving ClassMetadatas - $metadatas = $reader->getMetadatas(); - - if ( ! empty($metadatas)) { foreach ($metadatas as $metadata) { $output->write( sprintf('Processing entity "%s"', $metadata->name) . PHP_EOL diff --git a/lib/Doctrine/ORM/Tools/Console/Command/GenerateProxiesCommand.php b/lib/Doctrine/ORM/Tools/Console/Command/GenerateProxiesCommand.php index 4b6333b6f..5f71125d0 100644 --- a/lib/Doctrine/ORM/Tools/Console/Command/GenerateProxiesCommand.php +++ b/lib/Doctrine/ORM/Tools/Console/Command/GenerateProxiesCommand.php @@ -23,7 +23,8 @@ namespace Doctrine\ORM\Tools\Console\Command; use Symfony\Components\Console\Input\InputArgument, Symfony\Components\Console\Input\InputOption, - Symfony\Components\Console; + Symfony\Components\Console, + Doctrine\ORM\Tools\Console\MetadataFilter; /** * Command to (re)generate the proxy classes used by doctrine. @@ -48,18 +49,14 @@ class GenerateProxiesCommand extends Console\Command\Command ->setName('orm:generate-proxies') ->setDescription('Generates proxy classes for entity classes.') ->setDefinition(array( - new InputArgument( - 'from-path', InputArgument::REQUIRED, 'The path of mapping information.' + new InputOption( + 'filter', null, InputOption::PARAMETER_REQUIRED | InputOption::PARAMETER_IS_ARRAY, + 'A string pattern used to match entities that should be processed.' ), new InputArgument( 'dest-path', InputArgument::OPTIONAL, 'The path to generate your proxy classes. If none is provided, it will attempt to grab from configuration.' ), - new InputOption( - 'from', null, InputOption::PARAMETER_REQUIRED | InputOption::PARAMETER_IS_ARRAY, - 'Optional paths of mapping information.', - array() - ) )) ->setHelp(<<getHelper('em')->getEntityManager(); - - $reader = new ClassMetadataReader(); - $reader->setEntityManager($em); - - // Process source directories - $fromPaths = array_merge(array($input->getArgument('from-path')), $input->getOption('from')); - - foreach ($fromPaths as $dirName) { - $dirName = realpath($dirName); - - if ( ! file_exists($dirName)) { - throw new \InvalidArgumentException( - sprintf("Mapping directory '%s' does not exist.", $dirName) - ); - } else if ( ! is_readable($dirName)) { - throw new \InvalidArgumentException( - sprintf("Mapping directory '%s' does not have read permissions.", $dirName) - ); - } - - $reader->addMappingSource($dirName); - } + + $metadatas = $em->getMetadataFactory()->getAllMetadata(); + $metadatas = MetadataFilter::filter($metadatas, $input->getOption('filter')); // Process destination directory if (($destPath = $input->getArgument('dest-path')) === null) { @@ -113,10 +91,7 @@ EOT ); } - // Retrieving ClassMetadatas - $metadatas = $reader->getMetadatas(); - - if ( ! empty($metadatas)) { + if ( count($metadatas)) { foreach ($metadatas as $metadata) { $output->write( sprintf('Processing entity "%s"', $metadata->name) . PHP_EOL diff --git a/lib/Doctrine/ORM/Tools/Console/Command/GenerateRepositoriesCommand.php b/lib/Doctrine/ORM/Tools/Console/Command/GenerateRepositoriesCommand.php index 1d24fccb3..9c1477fcd 100644 --- a/lib/Doctrine/ORM/Tools/Console/Command/GenerateRepositoriesCommand.php +++ b/lib/Doctrine/ORM/Tools/Console/Command/GenerateRepositoriesCommand.php @@ -23,7 +23,8 @@ namespace Doctrine\ORM\Tools\Console\Command; use Symfony\Components\Console\Input\InputArgument, Symfony\Components\Console\Input\InputOption, - Symfony\Components\Console; + Symfony\Components\Console, + Doctrine\ORM\Tools\Console\MetadataFilter; /** * Command to generate repository classes for mapping information. @@ -65,16 +66,12 @@ class extends EntityRepository ->setName('orm:generate-repositories') ->setDescription('Generate repository classes from your mapping information.') ->setDefinition(array( - new InputArgument( - 'from-path', InputArgument::REQUIRED, 'The path of mapping information.' + new InputOption( + 'filter', null, InputOption::PARAMETER_REQUIRED | InputOption::PARAMETER_IS_ARRAY, + 'A string pattern used to match entities that should be processed.' ), new InputArgument( 'dest-path', InputArgument::REQUIRED, 'The path to generate your repository classes.' - ), - new InputOption( - 'from', null, InputOption::PARAMETER_REQUIRED | InputOption::PARAMETER_IS_ARRAY, - 'Optional paths of mapping information.', - array() ) )) ->setHelp(<<getHelper('em')->getEntityManager(); - - $reader = new ClassMetadataReader(); - $reader->setEntityManager($em); - - // Process source directories - $fromPaths = array_merge(array($input->getArgument('from-path')), $input->getOption('from')); - - foreach ($fromPaths as $dirName) { - $dirName = realpath($dirName); - - if ( ! file_exists($dirName)) { - throw new \InvalidArgumentException( - sprintf("Mapping directory '%s' does not exist.", $dirName) - ); - } else if ( ! is_readable($dirName)) { - throw new \InvalidArgumentException( - sprintf("Mapping directory '%s' does not have read permissions.", $dirName) - ); - } - - $reader->addMappingSource($dirName); - } + + $metadatas = $em->getMetadataFactory()->getAllMetadata(); + $metadatas = MetadataFilter::filter($metadatas, $input->getOption('filter')); // Process destination directory $destPath = realpath($input->getArgument('dest-path')); @@ -125,10 +103,7 @@ EOT ); } - // Retrieving ClassMetadatas - $metadatas = $reader->getMetadatas(); - - if ( ! empty($metadatas)) { + if ( count($metadatas)) { $numRepositories = 0; foreach ($metadatas as $metadata) { From 4cf5b7afdcf9e6761076adcba38e3ddc262737f7 Mon Sep 17 00:00:00 2001 From: Benjamin Eberlei Date: Sun, 11 Apr 2010 10:51:31 +0200 Subject: [PATCH 15/86] DDC-510 Move Exception for no Metadata Driver from Configuration to EntityManager::create, commit missing MetadataFilter --- lib/Doctrine/ORM/Configuration.php | 4 - lib/Doctrine/ORM/EntityManager.php | 4 +- .../ORM/Tools/Console/MetadataFilter.php | 80 +++++++++++++++++++ 3 files changed, 83 insertions(+), 5 deletions(-) create mode 100644 lib/Doctrine/ORM/Tools/Console/MetadataFilter.php diff --git a/lib/Doctrine/ORM/Configuration.php b/lib/Doctrine/ORM/Configuration.php index 4f7de0b4e..1376a3aa2 100644 --- a/lib/Doctrine/ORM/Configuration.php +++ b/lib/Doctrine/ORM/Configuration.php @@ -176,10 +176,6 @@ class Configuration extends \Doctrine\DBAL\Configuration */ public function getMetadataDriverImpl() { - if ($this->_attributes['metadataDriverImpl'] == null) { - throw ORMException::missingMappingDriverImpl(); - } - return $this->_attributes['metadataDriverImpl']; } diff --git a/lib/Doctrine/ORM/EntityManager.php b/lib/Doctrine/ORM/EntityManager.php index d915f1d63..e2db2b0d0 100644 --- a/lib/Doctrine/ORM/EntityManager.php +++ b/lib/Doctrine/ORM/EntityManager.php @@ -595,7 +595,9 @@ class EntityManager */ public static function create($conn, Configuration $config, EventManager $eventManager = null) { - $config->getMetadataDriverImpl(); // assert this is set + if (!$config->getMetadataDriverImpl()) { + throw ORMException::missingMappingDriverImpl(); + } if (is_array($conn)) { $conn = \Doctrine\DBAL\DriverManager::getConnection($conn, $config, ($eventManager ?: new EventManager())); diff --git a/lib/Doctrine/ORM/Tools/Console/MetadataFilter.php b/lib/Doctrine/ORM/Tools/Console/MetadataFilter.php new file mode 100644 index 000000000..efd720802 --- /dev/null +++ b/lib/Doctrine/ORM/Tools/Console/MetadataFilter.php @@ -0,0 +1,80 @@ +. +*/ + +namespace Doctrine\ORM\Tools\Console; + +/** + * Used by CLI Tools to restrict entity-based commands to given patterns. + * + * @license http://www.opensource.org/licenses/lgpl-license.php LGPL + * @link www.doctrine-project.com + * @since 1.0 + * @version $Revision$ + * @author Benjamin Eberlei + * @author Guilherme Blanco + * @author Jonathan Wage + * @author Roman Borschel + */ +class MetadataFilter extends \FilterIterator implements \Countable +{ + /** + * Filter Metadatas by one or more filter options. + * + * @param array $metadatas + * @param array|string $filter + * @return array + */ + static public function filter(array $metadatas, $filter) + { + $metadatas = new MetadataFilter(new \ArrayIterator($metadatas), $filter); + return iterator_to_array($metadatas); + } + + private $_filter = array(); + + public function __construct(\ArrayIterator $metadata, $filter) + { + $this->_filter = (array)$filter; + parent::__construct($metadata); + } + + public function accept() + { + if (count($this->_filter) == 0) { + return true; + } + + $it = $this->getInnerIterator(); + $metadata = $it->current(); + + foreach ($this->_filter AS $filter) { + if (strpos($metadata->name, $filter) !== false) { + return true; + } + } + return false; + } + + public function count() + { + return count($this->getInnerIterator()); + } +} \ No newline at end of file From 45cd2afd27046f1e129d57d80510331b0ebd46c1 Mon Sep 17 00:00:00 2001 From: Benjamin Eberlei Date: Sun, 11 Apr 2010 10:52:53 +0200 Subject: [PATCH 16/86] DDC-510 - Simplified Condition to check if Paths are set in AnnotationDriver --- lib/Doctrine/ORM/Mapping/Driver/AnnotationDriver.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Doctrine/ORM/Mapping/Driver/AnnotationDriver.php b/lib/Doctrine/ORM/Mapping/Driver/AnnotationDriver.php index 2f669cf07..ec3d92f7b 100644 --- a/lib/Doctrine/ORM/Mapping/Driver/AnnotationDriver.php +++ b/lib/Doctrine/ORM/Mapping/Driver/AnnotationDriver.php @@ -428,7 +428,7 @@ class AnnotationDriver implements Driver return $this->_classNames; } - if (count($this->_paths) == 0) { + if (!$this->_paths) { throw MappingException::pathRequired(); } From 317e84d8d794c42575548f7e563560eb83246017 Mon Sep 17 00:00:00 2001 From: Benjamin Eberlei Date: Sun, 11 Apr 2010 11:06:54 +0200 Subject: [PATCH 17/86] DDC-510 - Moved AnnotationDriver Factory Method onto Configuration instance --- lib/Doctrine/ORM/Configuration.php | 14 ++++++++++++++ tests/Doctrine/Tests/OrmFunctionalTestCase.php | 3 +-- tests/Doctrine/Tests/OrmTestCase.php | 5 ++--- 3 files changed, 17 insertions(+), 5 deletions(-) diff --git a/lib/Doctrine/ORM/Configuration.php b/lib/Doctrine/ORM/Configuration.php index 1376a3aa2..35e4aa9a8 100644 --- a/lib/Doctrine/ORM/Configuration.php +++ b/lib/Doctrine/ORM/Configuration.php @@ -130,6 +130,20 @@ class Configuration extends \Doctrine\DBAL\Configuration $this->_attributes['metadataDriverImpl'] = $driverImpl; } + /** + * Add a new default annotation driver with a correctly configured annotation reader. + * + * @param array $paths + * @return Mapping\Driver\AnnotationDriver + */ + public function newDefaultAnnotationDriver($paths = array()) + { + $reader = new \Doctrine\Common\Annotations\AnnotationReader(); + $reader->setDefaultAnnotationNamespace('Doctrine\ORM\Mapping\\'); + + return new \Doctrine\ORM\Mapping\Driver\AnnotationDriver($reader, (array)$paths); + } + /** * Adds a namespace under a certain alias. * diff --git a/tests/Doctrine/Tests/OrmFunctionalTestCase.php b/tests/Doctrine/Tests/OrmFunctionalTestCase.php index b4ca023aa..6466b15dc 100644 --- a/tests/Doctrine/Tests/OrmFunctionalTestCase.php +++ b/tests/Doctrine/Tests/OrmFunctionalTestCase.php @@ -235,8 +235,7 @@ abstract class OrmFunctionalTestCase extends OrmTestCase $config->setProxyDir(__DIR__ . '/Proxies'); $config->setProxyNamespace('Doctrine\Tests\Proxies'); - $driverImpl = \Doctrine\ORM\Mapping\Driver\AnnotationDriver::create(); - $config->setMetadataDriverImpl($driverImpl); + $config->setMetadataDriverImpl($config->newDefaultAnnotationDriver()); $conn = $this->sharedFixture['conn']; $conn->getConfiguration()->setSQLLogger($this->_sqlLoggerStack); diff --git a/tests/Doctrine/Tests/OrmTestCase.php b/tests/Doctrine/Tests/OrmTestCase.php index 1167ad0b8..3991d5b6d 100644 --- a/tests/Doctrine/Tests/OrmTestCase.php +++ b/tests/Doctrine/Tests/OrmTestCase.php @@ -30,9 +30,8 @@ abstract class OrmTestCase extends DoctrineTestCase } else { $config->setMetadataCacheImpl(new \Doctrine\Common\Cache\ArrayCache); } - - $driverImpl = \Doctrine\ORM\Mapping\Driver\AnnotationDriver::create(); - $config->setMetadataDriverImpl($driverImpl); + + $config->setMetadataDriverImpl($config->newDefaultAnnotationDriver()); $config->setQueryCacheImpl(self::getSharedQueryCacheImpl()); $config->setProxyDir(__DIR__ . '/Proxies'); From 43dc7eb0652599b2a950c8b569683aee9a3c3de3 Mon Sep 17 00:00:00 2001 From: Benjamin Eberlei Date: Mon, 12 Apr 2010 21:56:55 +0200 Subject: [PATCH 18/86] DDC-510 - Fix sandbox to work with new annotations metadata changes --- tools/sandbox/cli-config.php | 3 +++ tools/sandbox/index.php | 3 +++ 2 files changed, 6 insertions(+) diff --git a/tools/sandbox/cli-config.php b/tools/sandbox/cli-config.php index dc2c9875e..5c69499b0 100644 --- a/tools/sandbox/cli-config.php +++ b/tools/sandbox/cli-config.php @@ -10,6 +10,9 @@ $classLoader->register(); $config = new \Doctrine\ORM\Configuration(); $config->setMetadataCacheImpl(new \Doctrine\Common\Cache\ArrayCache); +$driverImpl = $config->newDefaultAnnotationDriver(array(__DIR__."/Entities")); +$config->setMetadataDriverImpl($driverImpl); + $config->setProxyDir(__DIR__ . '/Proxies'); $config->setProxyNamespace('Proxies'); diff --git a/tools/sandbox/index.php b/tools/sandbox/index.php index ab1f78dd4..37879eef4 100644 --- a/tools/sandbox/index.php +++ b/tools/sandbox/index.php @@ -30,11 +30,14 @@ $proxiesClassLoader->register(); $config = new Configuration; $cache = new ApcCache; $config->setMetadataCacheImpl($cache); +$driverImpl = $config->newDefaultAnnotationDriver(array(__DIR__."/Entities")); +$config->setMetadataDriverImpl($driverImpl); $config->setQueryCacheImpl($cache); // Proxy configuration $config->setProxyDir(__DIR__ . '/Proxies'); $config->setProxyNamespace('Proxies'); +$config->setMetadataCacheImpl(new \Doctrine\Common\Cache\ArrayCache); // Database connection information $connectionOptions = array( From 3bb6184477f1ddf545c1ecd3d461d3b2ab804789 Mon Sep 17 00:00:00 2001 From: Benjamin Eberlei Date: Mon, 12 Apr 2010 23:55:41 +0200 Subject: [PATCH 19/86] Updated UPGRADE_TO_2_0 file with recent changes --- UPGRADE_TO_2_0 | 56 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) diff --git a/UPGRADE_TO_2_0 b/UPGRADE_TO_2_0 index 379d364db..edd11e965 100644 --- a/UPGRADE_TO_2_0 +++ b/UPGRADE_TO_2_0 @@ -1,6 +1,62 @@ # Upgrade from 2.0-ALPHA4 to 2.0-BETA1 +## Console migrated to Symfony Console + +The Doctrine Cli has been replaced by Symfony Console Configuration + +Instead of having to specifiy: + + [php] + $cliConfig = new CliConfiguration(); + $cliConfig->setAttribute('em', $entityManager); + +You now have to configure the script like: + + [php] + $helperSet = new \Symfony\Components\Console\Helper\HelperSet(array( + 'db' => new \Doctrine\DBAL\Tools\Console\Helper\ConnectionHelper($em->getConnection()), + 'em' => new \Doctrine\ORM\Tools\Console\Helper\EntityManagerHelper($em) + )); + +## Console: No need for Mapping Paths anymore + +In previous versions you had to specify the --from and --from-path options +to show where your mapping paths are from the console. However this information +is already known from the Mapping Driver configuration, so the requirement +for this options were dropped. + +Instead for each console command all the entities are loaded and to +restrict the operation to one or more sub-groups you can use the --filter flag. + +## AnnotationDriver is not a default mapping driver anymore + +In conjunction with the recent changes to Console we realized that the +annotations driver being a default metadata driver lead to lots of glue +code in the console components to detect where entities lie and how to load +them for batch updates like SchemaTool and other commands. However the +annotations driver being a default driver does not really help that much +anyways. + +Therefore we decided to break backwards compability in this issue and drop +the support for Annotations as Default Driver and require our users to +specify the driver explicitly (which allows us to ask for the path to all +entities). + +If you are using the annotations metadata driver as default driver, you +have to add the following lines to your bootstrap code: + + $driverImpl = $config->newDefaultAnnotationDriver(array(__DIR__."/Entities")); + $config->setMetadataDriverImpl($driverImpl); + +You have to specify the path to your entities as either string of a single +path or array of multiple paths +to your entities. This information will be used by all console commands to +access all entities. + +Xml and Yaml Drivers work as before! + + ## New inversedBy attribute It is now *mandatory* that the owning side of a bidirectional association specifies the From db603547a2a35d84c164454b9ae5addd5eb4858c Mon Sep 17 00:00:00 2001 From: "Roman S. Borschel" Date: Tue, 13 Apr 2010 00:49:19 +0200 Subject: [PATCH 20/86] Added failing test for DDC-388. Naming refactorings and comment cleanups. --- lib/Doctrine/ORM/Configuration.php | 2 - lib/Doctrine/ORM/Mapping/ClassMetadata.php | 10 +-- lib/Doctrine/ORM/NativeQuery.php | 4 -- lib/Doctrine/ORM/OptimisticLockException.php | 7 +-- .../AbstractCollectionPersister.php | 34 +++++----- .../AbstractEntityInheritancePersister.php | 2 - lib/Doctrine/ORM/Query.php | 26 ++++---- lib/Doctrine/ORM/Query/SqlWalker.php | 3 +- lib/Doctrine/ORM/QueryBuilder.php | 63 +++++++++---------- .../Mapping/BasicInheritanceMappingTest.php | 14 +++++ 10 files changed, 78 insertions(+), 87 deletions(-) diff --git a/lib/Doctrine/ORM/Configuration.php b/lib/Doctrine/ORM/Configuration.php index 6d5964c8c..4e7a37e5c 100644 --- a/lib/Doctrine/ORM/Configuration.php +++ b/lib/Doctrine/ORM/Configuration.php @@ -1,7 +1,5 @@ reflClass = new ReflectionClass($this->name); foreach ($this->fieldMappings as $field => $mapping) { - if (isset($mapping['inherited'])) { - $reflField = new ReflectionProperty($mapping['inherited'], $field); - } else { - $reflField = $this->reflClass->getProperty($field); - } + if (isset($mapping['inherited'])) { + $reflField = new ReflectionProperty($mapping['inherited'], $field); + } else { + $reflField = $this->reflClass->getProperty($field); + } $reflField->setAccessible(true); $this->reflFields[$field] = $reflField; } diff --git a/lib/Doctrine/ORM/NativeQuery.php b/lib/Doctrine/ORM/NativeQuery.php index c3e0b43bb..2c0a5ab28 100644 --- a/lib/Doctrine/ORM/NativeQuery.php +++ b/lib/Doctrine/ORM/NativeQuery.php @@ -1,7 +1,5 @@ - * @license http://www.opensource.org/licenses/lgpl-license.php LGPL - * @link www.doctrine-project.org - * @since 2.0 - * @version $Revision$ + * @author Roman Borschel + * @since 2.0 */ class OptimisticLockException extends ORMException { diff --git a/lib/Doctrine/ORM/Persisters/AbstractCollectionPersister.php b/lib/Doctrine/ORM/Persisters/AbstractCollectionPersister.php index cf8c7ff8d..b3195f13d 100644 --- a/lib/Doctrine/ORM/Persisters/AbstractCollectionPersister.php +++ b/lib/Doctrine/ORM/Persisters/AbstractCollectionPersister.php @@ -1,7 +1,5 @@ getMapping()->isOwningSide) { return; // ignore inverse side } - $sql = $this->_getDeleteSql($coll); - $this->_conn->executeUpdate($sql, $this->_getDeleteSqlParameters($coll)); + $sql = $this->_getDeleteSQL($coll); + $this->_conn->executeUpdate($sql, $this->_getDeleteSQLParameters($coll)); } /** @@ -80,7 +76,7 @@ abstract class AbstractCollectionPersister * * @param PersistentCollection $coll */ - abstract protected function _getDeleteSql(PersistentCollection $coll); + abstract protected function _getDeleteSQL(PersistentCollection $coll); /** * Gets the SQL parameters for the corresponding SQL statement to delete @@ -88,7 +84,7 @@ abstract class AbstractCollectionPersister * * @param PersistentCollection $coll */ - abstract protected function _getDeleteSqlParameters(PersistentCollection $coll); + abstract protected function _getDeleteSQLParameters(PersistentCollection $coll); /** * Updates the given collection, synchronizing it's state with the database @@ -109,9 +105,9 @@ abstract class AbstractCollectionPersister public function deleteRows(PersistentCollection $coll) { $deleteDiff = $coll->getDeleteDiff(); - $sql = $this->_getDeleteRowSql($coll); + $sql = $this->_getDeleteRowSQL($coll); foreach ($deleteDiff as $element) { - $this->_conn->executeUpdate($sql, $this->_getDeleteRowSqlParameters($coll, $element)); + $this->_conn->executeUpdate($sql, $this->_getDeleteRowSQLParameters($coll, $element)); } } @@ -121,9 +117,9 @@ abstract class AbstractCollectionPersister public function insertRows(PersistentCollection $coll) { $insertDiff = $coll->getInsertDiff(); - $sql = $this->_getInsertRowSql($coll); + $sql = $this->_getInsertRowSQL($coll); foreach ($insertDiff as $element) { - $this->_conn->executeUpdate($sql, $this->_getInsertRowSqlParameters($coll, $element)); + $this->_conn->executeUpdate($sql, $this->_getInsertRowSQLParameters($coll, $element)); } } @@ -132,7 +128,7 @@ abstract class AbstractCollectionPersister * * @param PersistentCollection $coll */ - abstract protected function _getDeleteRowSql(PersistentCollection $coll); + abstract protected function _getDeleteRowSQL(PersistentCollection $coll); /** * Gets the SQL parameters for the corresponding SQL statement to delete the given @@ -141,21 +137,21 @@ abstract class AbstractCollectionPersister * @param PersistentCollection $coll * @param mixed $element */ - abstract protected function _getDeleteRowSqlParameters(PersistentCollection $coll, $element); + abstract protected function _getDeleteRowSQLParameters(PersistentCollection $coll, $element); /** * Gets the SQL statement used for updating a row in the collection. * * @param PersistentCollection $coll */ - abstract protected function _getUpdateRowSql(PersistentCollection $coll); + abstract protected function _getUpdateRowSQL(PersistentCollection $coll); /** * Gets the SQL statement used for inserting a row in the collection. * * @param PersistentCollection $coll */ - abstract protected function _getInsertRowSql(PersistentCollection $coll); + abstract protected function _getInsertRowSQL(PersistentCollection $coll); /** * Gets the SQL parameters for the corresponding SQL statement to insert the given @@ -164,5 +160,5 @@ abstract class AbstractCollectionPersister * @param PersistentCollection $coll * @param mixed $element */ - abstract protected function _getInsertRowSqlParameters(PersistentCollection $coll, $element); + abstract protected function _getInsertRowSQLParameters(PersistentCollection $coll, $element); } \ No newline at end of file diff --git a/lib/Doctrine/ORM/Persisters/AbstractEntityInheritancePersister.php b/lib/Doctrine/ORM/Persisters/AbstractEntityInheritancePersister.php index f5469ceb5..cf37b771e 100644 --- a/lib/Doctrine/ORM/Persisters/AbstractEntityInheritancePersister.php +++ b/lib/Doctrine/ORM/Persisters/AbstractEntityInheritancePersister.php @@ -1,7 +1,5 @@ - * @author Konsta Vesterinen - * @author Roman Borschel + * @since 1.0 + * @author Guilherme Blanco + * @author Konsta Vesterinen + * @author Roman Borschel */ final class Query extends AbstractQuery { @@ -62,6 +57,7 @@ final class Query extends AbstractQuery * partial objects. * * @var string + * @todo Rename: HINT_OPTIMIZE */ const HINT_FORCE_PARTIAL_LOAD = 'doctrine.forcePartialLoad'; /** @@ -149,10 +145,10 @@ final class Query extends AbstractQuery * * @param Doctrine\ORM\EntityManager $entityManager */ - public function __construct(EntityManager $entityManager) + /*public function __construct(EntityManager $entityManager) { parent::__construct($entityManager); - } + }*/ /** * Gets the SQL query/queries that correspond to this DQL query. @@ -162,7 +158,7 @@ final class Query extends AbstractQuery */ public function getSQL() { - return $this->_parse()->getSqlExecutor()->getSqlStatements(); + return $this->_parse()->getSQLExecutor()->getSQLStatements(); } /** @@ -366,7 +362,7 @@ final class Query extends AbstractQuery * @param string $dqlQuery DQL Query * @return Doctrine\ORM\AbstractQuery */ - public function setDql($dqlQuery) + public function setDQL($dqlQuery) { if ($dqlQuery !== null) { $this->_dql = $dqlQuery; @@ -380,7 +376,7 @@ final class Query extends AbstractQuery * * @return string DQL query */ - public function getDql() + public function getDQL() { return $this->_dql; } @@ -408,7 +404,7 @@ final class Query extends AbstractQuery */ public function contains($dql) { - return stripos($this->getDql(), $dql) === false ? false : true; + return stripos($this->getDQL(), $dql) === false ? false : true; } /** diff --git a/lib/Doctrine/ORM/Query/SqlWalker.php b/lib/Doctrine/ORM/Query/SqlWalker.php index d16d9ff60..49d13d38d 100644 --- a/lib/Doctrine/ORM/Query/SqlWalker.php +++ b/lib/Doctrine/ORM/Query/SqlWalker.php @@ -432,7 +432,7 @@ class SqlWalker implements TreeWalker $class = $this->_em->getClassMetadata($class->fieldMappings[$fieldName]['inherited']); } - return $this->getSqlTableAlias($class->table['name'], $identificationVariable); + return $this->getSQLTableAlias($class->table['name'], $identificationVariable); } /** @@ -789,6 +789,7 @@ class SqlWalker implements TreeWalker $sql .= ' AND ' . $discrSql; } + //FIXME: these should either be nested or all forced to be left joins (DDC-XXX) if ($targetClass->isInheritanceTypeJoined()) { $sql .= $this->_generateClassTableInheritanceJoins($targetClass, $joinedDqlAlias); } diff --git a/lib/Doctrine/ORM/QueryBuilder.php b/lib/Doctrine/ORM/QueryBuilder.php index 8cdc0b354..fcfe873d8 100644 --- a/lib/Doctrine/ORM/QueryBuilder.php +++ b/lib/Doctrine/ORM/QueryBuilder.php @@ -168,7 +168,7 @@ class QueryBuilder * * @return string The DQL string */ - public function getDql() + public function getDQL() { if ($this->_dql !== null && $this->_state === self::STATE_CLEAN) { return $this->_dql; @@ -178,16 +178,16 @@ class QueryBuilder switch ($this->_type) { case self::DELETE: - $dql = $this->_getDqlForDelete(); + $dql = $this->_getDQLForDelete(); break; case self::UPDATE: - $dql = $this->_getDqlForUpdate(); + $dql = $this->_getDQLForUpdate(); break; case self::SELECT: default: - $dql = $this->_getDqlForSelect(); + $dql = $this->_getDQLForSelect(); break; } @@ -211,7 +211,7 @@ class QueryBuilder */ public function getQuery() { - return $this->_em->createQuery($this->getDql()) + return $this->_em->createQuery($this->getDQL()) ->setParameters($this->_params) ->setFirstResult($this->_firstResult) ->setMaxResults($this->_maxResults); @@ -613,7 +613,7 @@ class QueryBuilder */ public function andWhere($where) { - $where = $this->getDqlPart('where'); + $where = $this->getDQLPart('where'); $args = func_get_args(); if ($where instanceof Expr\Andx) { @@ -744,7 +744,7 @@ class QueryBuilder array_unshift($args, $having); $having = new Expr\Orx($args); } - + return $this->add('having', $having); } @@ -779,7 +779,7 @@ class QueryBuilder * @param string $queryPartName * @return mixed $queryPart */ - public function getDqlPart($queryPartName) + public function getDQLPart($queryPartName) { return $this->_dqlParts[$queryPartName]; } @@ -789,43 +789,43 @@ class QueryBuilder * * @return array $dqlParts */ - public function getDqlParts() + public function getDQLParts() { return $this->_dqlParts; } - private function _getDqlForDelete() + private function _getDQLForDelete() { return 'DELETE' - . $this->_getReducedDqlQueryPart('from', array('pre' => ' ', 'separator' => ', ')) - . $this->_getReducedDqlQueryPart('where', array('pre' => ' WHERE ')) - . $this->_getReducedDqlQueryPart('orderBy', array('pre' => ' ORDER BY ', 'separator' => ', ')); + . $this->_getReducedDQLQueryPart('from', array('pre' => ' ', 'separator' => ', ')) + . $this->_getReducedDQLQueryPart('where', array('pre' => ' WHERE ')) + . $this->_getReducedDQLQueryPart('orderBy', array('pre' => ' ORDER BY ', 'separator' => ', ')); } - private function _getDqlForUpdate() + private function _getDQLForUpdate() { return 'UPDATE' - . $this->_getReducedDqlQueryPart('from', array('pre' => ' ', 'separator' => ', ')) - . $this->_getReducedDqlQueryPart('set', array('pre' => ' SET ', 'separator' => ', ')) - . $this->_getReducedDqlQueryPart('where', array('pre' => ' WHERE ')) - . $this->_getReducedDqlQueryPart('orderBy', array('pre' => ' ORDER BY ', 'separator' => ', ')); + . $this->_getReducedDQLQueryPart('from', array('pre' => ' ', 'separator' => ', ')) + . $this->_getReducedDQLQueryPart('set', array('pre' => ' SET ', 'separator' => ', ')) + . $this->_getReducedDQLQueryPart('where', array('pre' => ' WHERE ')) + . $this->_getReducedDQLQueryPart('orderBy', array('pre' => ' ORDER BY ', 'separator' => ', ')); } - private function _getDqlForSelect() + private function _getDQLForSelect() { return 'SELECT' - . $this->_getReducedDqlQueryPart('select', array('pre' => ' ', 'separator' => ', ')) - . $this->_getReducedDqlQueryPart('from', array('pre' => ' FROM ', 'separator' => ', ')) - . $this->_getReducedDqlQueryPart('join', array('pre' => ' ', 'separator' => ' ')) - . $this->_getReducedDqlQueryPart('where', array('pre' => ' WHERE ')) - . $this->_getReducedDqlQueryPart('groupBy', array('pre' => ' GROUP BY ', 'separator' => ', ')) - . $this->_getReducedDqlQueryPart('having', array('pre' => ' HAVING ')) - . $this->_getReducedDqlQueryPart('orderBy', array('pre' => ' ORDER BY ', 'separator' => ', ')); + . $this->_getReducedDQLQueryPart('select', array('pre' => ' ', 'separator' => ', ')) + . $this->_getReducedDQLQueryPart('from', array('pre' => ' FROM ', 'separator' => ', ')) + . $this->_getReducedDQLQueryPart('join', array('pre' => ' ', 'separator' => ' ')) + . $this->_getReducedDQLQueryPart('where', array('pre' => ' WHERE ')) + . $this->_getReducedDQLQueryPart('groupBy', array('pre' => ' GROUP BY ', 'separator' => ', ')) + . $this->_getReducedDQLQueryPart('having', array('pre' => ' HAVING ')) + . $this->_getReducedDQLQueryPart('orderBy', array('pre' => ' ORDER BY ', 'separator' => ', ')); } - private function _getReducedDqlQueryPart($queryPartName, $options = array()) + private function _getReducedDQLQueryPart($queryPartName, $options = array()) { - $queryPart = $this->getDqlPart($queryPartName); + $queryPart = $this->getDQLPart($queryPartName); if (empty($queryPart)) { return (isset($options['empty']) ? $options['empty'] : ''); @@ -838,11 +838,6 @@ class QueryBuilder public function __toString() { - return $this->getDql(); + return $this->getDQL(); } - - /*public function __clone() - { - $this->_q = clone $this->_q; - }*/ } \ No newline at end of file diff --git a/tests/Doctrine/Tests/ORM/Mapping/BasicInheritanceMappingTest.php b/tests/Doctrine/Tests/ORM/Mapping/BasicInheritanceMappingTest.php index c123a556d..e7c3bbfb8 100644 --- a/tests/Doctrine/Tests/ORM/Mapping/BasicInheritanceMappingTest.php +++ b/tests/Doctrine/Tests/ORM/Mapping/BasicInheritanceMappingTest.php @@ -51,6 +51,20 @@ class BasicInheritanceMappingTest extends \Doctrine\Tests\OrmTestCase $this->assertTrue(empty($class->inheritedAssociationFields)); $this->assertTrue(isset($class->associationMappings['mappedRelated1'])); } + + /** + * @group DDC-388 + */ + public function testSerializationWithPrivateFieldsFromMappedSuperclass() + { + + $class = $this->_factory->getMetadataFor(__NAMESPACE__ . '\\EntitySubClass2'); + + $class2 = unserialize(serialize($class)); + + $this->assertTrue(isset($class2->reflFields['mapped1'])); + $this->assertTrue(isset($class2->reflFields['mapped2'])); + } } class TransientBaseClass { From b6f9cd0c074b22e567b43ea7f0bddfe9b106d598 Mon Sep 17 00:00:00 2001 From: Guilherme Blanco Date: Mon, 12 Apr 2010 21:54:43 -0300 Subject: [PATCH 21/86] [2.0][DDC-503] Added missing IdGeneratorType. --- lib/Doctrine/ORM/Tools/EntityGenerator.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/Doctrine/ORM/Tools/EntityGenerator.php b/lib/Doctrine/ORM/Tools/EntityGenerator.php index 9dcc27d4b..c8957041a 100644 --- a/lib/Doctrine/ORM/Tools/EntityGenerator.php +++ b/lib/Doctrine/ORM/Tools/EntityGenerator.php @@ -933,6 +933,9 @@ public function () case ClassMetadataInfo::GENERATOR_TYPE_IDENTITY: return 'IDENTITY'; + case ClassMetadataInfo::GENERATOR_TYPE_NONE: + return 'NONE'; + default: throw new \InvalidArgumentException('Invalid provided IdGeneratorType: ' . $type); } From 56a8f5cd5353908b815607a6e089201c95e01e6c Mon Sep 17 00:00:00 2001 From: Guilherme Blanco Date: Tue, 13 Apr 2010 00:29:29 -0300 Subject: [PATCH 22/86] [2.0][DDC-448][DDC-513] Fixed issue with Joined Inheritance Type and One To One Associations. --- lib/Doctrine/ORM/Query/SqlWalker.php | 31 ++++---- .../ORM/Functional/Ticket/DDC448Test.php | 71 +++++++++++++++++ .../ORM/Functional/Ticket/DDC513Test.php | 79 +++++++++++++++++++ 3 files changed, 164 insertions(+), 17 deletions(-) create mode 100644 tests/Doctrine/Tests/ORM/Functional/Ticket/DDC448Test.php create mode 100644 tests/Doctrine/Tests/ORM/Functional/Ticket/DDC513Test.php diff --git a/lib/Doctrine/ORM/Query/SqlWalker.php b/lib/Doctrine/ORM/Query/SqlWalker.php index d16d9ff60..be583c625 100644 --- a/lib/Doctrine/ORM/Query/SqlWalker.php +++ b/lib/Doctrine/ORM/Query/SqlWalker.php @@ -465,6 +465,11 @@ class SqlWalker implements TreeWalker $fieldName = array_pop($parts); $dqlAlias = $pathExpr->identificationVariable; $class = $this->_queryComponents[$dqlAlias]['metadata']; + + if (isset($class->inheritedAssociationFields[$fieldName])) { + $class = $this->_em->getClassMetadata($class->inheritedAssociationFields[$fieldName]); + } + $assoc = $class->associationMappings[$fieldName]; if ($assoc->isOwningSide) { @@ -472,8 +477,8 @@ class SqlWalker implements TreeWalker if (count($assoc->sourceToTargetKeyColumns) > 1) { throw QueryException::associationPathCompositeKeyNotSupported(); } - $sql .= $this->walkIdentificationVariable($dqlAlias) . '.' - . reset($assoc->targetToSourceKeyColumns); + $sql .= $this->getSqlTableAlias($class->table['name'], $dqlAlias) . '.' + . reset($assoc->targetToSourceKeyColumns); } else { // 2- Inverse side: NOT (YET?) SUPPORTED throw QueryException::associationPathInverseSideNotSupported(); @@ -683,23 +688,15 @@ class SqlWalker implements TreeWalker $joinAssocPathExpr = $join->joinAssociationPathExpression; $joinedDqlAlias = $join->aliasIdentificationVariable; - $targetQComp = $this->_queryComponents[$joinedDqlAlias]; - $targetClass = $targetQComp['metadata']; - $relation = $targetQComp['relation']; - $sourceClass = $this->_queryComponents[$joinAssocPathExpr->identificationVariable]['metadata']; - + $relation = $this->_queryComponents[$joinedDqlAlias]['relation']; + $targetClass = $this->_em->getClassMetadata($relation->targetEntityName); + $sourceClass = $this->_em->getClassMetadata($relation->sourceEntityName); $targetTableName = $targetClass->getQuotedTableName($this->_platform); - $targetTableAlias = $this->getSqlTableAlias($targetClass->getTableName(), $joinedDqlAlias); - $sourceTableAlias = $this->getSqlTableAlias( - $sourceClass->getTableName(), $joinAssocPathExpr->identificationVariable - ); + $targetTableAlias = $this->getSqlTableAlias($targetClass->table['name'], $joinedDqlAlias); + $sourceTableAlias = $this->getSqlTableAlias($sourceClass->table['name'], $joinAssocPathExpr->identificationVariable); // Ensure we got the owning side, since it has all mapping info - if ( ! $relation->isOwningSide) { - $assoc = $targetClass->associationMappings[$relation->mappedBy]; - } else { - $assoc = $relation; - } + $assoc = ( ! $relation->isOwningSide) ? $targetClass->associationMappings[$relation->mappedBy] : $relation; if ($this->_query->getHint(Query::HINT_INTERNAL_ITERATION) == true) { if ($relation->isOneToMany() || $relation->isManyToMany()) { @@ -713,7 +710,7 @@ class SqlWalker implements TreeWalker foreach ($assoc->sourceToTargetKeyColumns as $sourceColumn => $targetColumn) { if ( ! $first) $sql .= ' AND '; else $first = false; - + if ($relation->isOwningSide) { $quotedTargetColumn = $targetClass->getQuotedColumnName($targetClass->fieldNames[$targetColumn], $this->_platform); $sql .= $sourceTableAlias . '.' . $sourceColumn diff --git a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC448Test.php b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC448Test.php new file mode 100644 index 000000000..91c9e129e --- /dev/null +++ b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC448Test.php @@ -0,0 +1,71 @@ +_schemaTool->createSchema(array( + $this->_em->getClassMetadata(__NAMESPACE__ . '\DDC448MainTable'), + $this->_em->getClassMetadata(__NAMESPACE__ . '\DDC448ConnectedClass'), + $this->_em->getClassMetadata(__NAMESPACE__ . '\DDC448SubTable'), + )); + } + + public function testIssue() + { + $q = $this->_em->createQuery("select b from ".__NAMESPACE__."\\DDC448SubTable b where b.connectedClassId = ?1"); + $this->assertEquals('SELECT d0_.id AS id0, d0_.discr AS discr1, d0_.connectedClassId AS connectedClassId2 FROM SubTable s1_ INNER JOIN DDC448MainTable d0_ ON s1_.id = d0_.id WHERE d0_.connectedClassId = ?', $q->getSQL()); + } +} + +/** + * @Entity + * @InheritanceType("JOINED") + * @DiscriminatorColumn(name="discr", type="smallint") + * @DiscriminatorMap({ + * "0" = "DDC448MainTable", + * "1" = "DDC448SubTable" + * }) + */ +class DDC448MainTable +{ + /** + * @Id + * @Column(name="id", type="integer") + * @GeneratedValue(strategy="AUTO") + */ + private $id; + + /** + * @ManyToOne(targetEntity="DDC448ConnectedClass", cascade={"all"}, fetch="EAGER") + * @JoinColumn(name="connectedClassId", referencedColumnName="id", onDelete="CASCADE", onUpdate="CASCADE", nullable=true) + */ + private $connectedClassId; +} + +/** + * @Entity + * @Table(name="connectedClass") + * @HasLifecycleCallbacks + */ +class DDC448ConnectedClass +{ + /** + * @Id + * @Column(name="id", type="integer") + * @GeneratedValue(strategy="AUTO") + */ + protected $id; // connected with DDC448MainTable +} + +/** + * @Entity + * @Table(name="SubTable") + */ +class DDC448SubTable extends DDC448MainTable +{ +} diff --git a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC513Test.php b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC513Test.php new file mode 100644 index 000000000..b7cee97cf --- /dev/null +++ b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC513Test.php @@ -0,0 +1,79 @@ +_schemaTool->createSchema(array( + $this->_em->getClassMetadata(__NAMESPACE__ . '\DDC513OfferItem'), + $this->_em->getClassMetadata(__NAMESPACE__ . '\DDC513Item'), + $this->_em->getClassMetadata(__NAMESPACE__ . '\DDC513Price'), + )); + } + + public function testIssue() + { + $item = new DDC513OfferItem(); + $this->_em->persist($item); + $this->_em->flush(); + + //$q = $this->_em->createQuery("select u from ".__NAMESPACE__."\\DDC513Item u left join u.price p"); + //$this->assertEquals('SELECT d0_.id AS id0, d0_.discr AS discr1, d0_.price AS price2 FROM DDC513Item d0_ LEFT JOIN DDC513OfferItem d1_ ON d0_.id = d1_.id LEFT JOIN DDC513Price d2_ ON d0_.price = d2_.id', $q->getSQL()); + + /* THIS QUERY CAUSE EXCEPTION */ + $q = $this->_em->createQuery("select u from ".__NAMESPACE__."\\DDC513OfferItem u left join u.price p"); + $this->assertEquals('SELECT d0_.id AS id0, d0_.discr AS discr1, d0_.price AS price2 FROM DDC513OfferItem d1_ INNER JOIN DDC513Item d0_ ON d1_.id = d0_.id LEFT JOIN DDC513Price d2_ ON d0_.price = d2_.id', $q->getSQL()); + } +} + +/** + * @Entity + */ +class DDC513OfferItem extends DDC513Item +{ +} + +/** + * @Entity + * @InheritanceType("JOINED") + * @DiscriminatorColumn(name="discr", type="string") + * @DiscriminatorMap({"item" = "DDC513Item", "offerItem" = "DDC513OfferItem"}) + */ +class DDC513Item +{ + /** + * @Id + * @Column(type="integer") + * @GeneratedValue(strategy="AUTO") + */ + public $id; + + /** + * @OneToOne(targetEntity="DDC513Price", cascade={"remove","persist"}) + * @JoinColumn(name="price", referencedColumnName="id") + */ + public $price; +} + +/** + * @Entity + */ +class DDC513Price { + /** + * @Id + * @Column(type="integer") + * @GeneratedValue(strategy="AUTO") + */ + public $id; + + /** @Column(type="string") */ + public $data; +} + + + + From dd2dd80281e2f74b8a0e53dea5bd94a765e32621 Mon Sep 17 00:00:00 2001 From: Guilherme Blanco Date: Tue, 13 Apr 2010 00:40:45 -0300 Subject: [PATCH 23/86] [2.0][DDC-493] Added coverage to DDC-493 and optimized DDC-513 unit tests. Previous commit fixed the issue. --- .../ORM/Functional/Ticket/DDC493Test.php | 69 +++++++++++++++++++ .../ORM/Functional/Ticket/DDC513Test.php | 8 --- 2 files changed, 69 insertions(+), 8 deletions(-) create mode 100644 tests/Doctrine/Tests/ORM/Functional/Ticket/DDC493Test.php diff --git a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC493Test.php b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC493Test.php new file mode 100644 index 000000000..5503d033e --- /dev/null +++ b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC493Test.php @@ -0,0 +1,69 @@ +_schemaTool->createSchema(array( + $this->_em->getClassMetadata(__NAMESPACE__ . '\DDC493Customer'), + $this->_em->getClassMetadata(__NAMESPACE__ . '\DDC493Distributor'), + $this->_em->getClassMetadata(__NAMESPACE__ . '\DDC493Contact') + )); + } + + public function testIssue() + { + $q = $this->_em->createQuery("select u, u.contact.data from ".__NAMESPACE__."\\DDC493Distributor u"); + $this->assertEquals('SELECT d0_.id AS id0, d1_.data AS data1, d0_.discr AS discr2, d0_.contact AS contact3 FROM DDC493Distributor d2_ INNER JOIN DDC493Customer d0_ ON d2_.id = d0_.id INNER JOIN DDC493Contact d1_ ON d0_.contact = d1_.id', $q->getSQL()); + } +} + +/** + * @Entity + * @InheritanceType("JOINED") + * @DiscriminatorColumn(name="discr", type="string") + * @DiscriminatorMap({"distributor" = "DDC493Distributor", "customer" = "DDC493Customer"}) + */ +class DDC493Customer { + /** + * @Id + * @Column(type="integer") + * @GeneratedValue(strategy="AUTO") + */ + public $id; + /** + * @OneToOne(targetEntity="DDC493Contact", cascade={"remove","persist"}) + * @JoinColumn(name="contact", referencedColumnName="id") + */ + public $contact; + +} + +/** + * @Entity + */ +class DDC493Distributor extends DDC493Customer { +} + +/** + * @Entity + */ +class DDC493Contact +{ + /** + * @Id + * @Column(type="integer") + * @GeneratedValue(strategy="AUTO") + */ + public $id; + /** @Column(type="string") */ + public $data; +} + + + + diff --git a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC513Test.php b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC513Test.php index b7cee97cf..125f297db 100644 --- a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC513Test.php +++ b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC513Test.php @@ -17,14 +17,6 @@ class DDC513Test extends \Doctrine\Tests\OrmFunctionalTestCase public function testIssue() { - $item = new DDC513OfferItem(); - $this->_em->persist($item); - $this->_em->flush(); - - //$q = $this->_em->createQuery("select u from ".__NAMESPACE__."\\DDC513Item u left join u.price p"); - //$this->assertEquals('SELECT d0_.id AS id0, d0_.discr AS discr1, d0_.price AS price2 FROM DDC513Item d0_ LEFT JOIN DDC513OfferItem d1_ ON d0_.id = d1_.id LEFT JOIN DDC513Price d2_ ON d0_.price = d2_.id', $q->getSQL()); - - /* THIS QUERY CAUSE EXCEPTION */ $q = $this->_em->createQuery("select u from ".__NAMESPACE__."\\DDC513OfferItem u left join u.price p"); $this->assertEquals('SELECT d0_.id AS id0, d0_.discr AS discr1, d0_.price AS price2 FROM DDC513OfferItem d1_ INNER JOIN DDC513Item d0_ ON d1_.id = d0_.id LEFT JOIN DDC513Price d2_ ON d0_.price = d2_.id', $q->getSQL()); } From 071adf68cd816b564f011e56500272b945906bdd Mon Sep 17 00:00:00 2001 From: "Jonathan H. Wage" Date: Tue, 13 Apr 2010 14:09:11 -0400 Subject: [PATCH 24/86] Fixing tabs in ClassMetadata class --- lib/Doctrine/ORM/Mapping/ClassMetadata.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/Doctrine/ORM/Mapping/ClassMetadata.php b/lib/Doctrine/ORM/Mapping/ClassMetadata.php index aa16d865d..21bbffe7e 100644 --- a/lib/Doctrine/ORM/Mapping/ClassMetadata.php +++ b/lib/Doctrine/ORM/Mapping/ClassMetadata.php @@ -243,10 +243,10 @@ class ClassMetadata extends ClassMetadataInfo // Store ReflectionProperty of mapped field $sourceFieldName = $assocMapping->sourceFieldName; - - $refProp = $this->reflClass->getProperty($sourceFieldName); - $refProp->setAccessible(true); - $this->reflFields[$sourceFieldName] = $refProp; + + $refProp = $this->reflClass->getProperty($sourceFieldName); + $refProp->setAccessible(true); + $this->reflFields[$sourceFieldName] = $refProp; } /** From 5442a32db8534b509b7b67ab54094eef641cb127 Mon Sep 17 00:00:00 2001 From: "Jonathan H. Wage" Date: Tue, 13 Apr 2010 14:09:39 -0400 Subject: [PATCH 25/86] Fixing incorrect exception method used --- lib/Doctrine/ORM/Mapping/Driver/AbstractFileDriver.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Doctrine/ORM/Mapping/Driver/AbstractFileDriver.php b/lib/Doctrine/ORM/Mapping/Driver/AbstractFileDriver.php index 29dedf3e1..637971cb5 100644 --- a/lib/Doctrine/ORM/Mapping/Driver/AbstractFileDriver.php +++ b/lib/Doctrine/ORM/Mapping/Driver/AbstractFileDriver.php @@ -155,7 +155,7 @@ abstract class AbstractFileDriver implements Driver if ($this->_paths) { foreach ((array) $this->_paths as $path) { if ( ! is_dir($path)) { - throw MappingException::driverRequiresConfiguredDirectoryPath(); + throw MappingException::fileMappingDriversRequireConfiguredDirectoryPath(); } $iterator = new \RecursiveIteratorIterator( From c81b770a0d0f2e31aa6ba853d2f1f267f95a3e61 Mon Sep 17 00:00:00 2001 From: "Jonathan H. Wage" Date: Tue, 13 Apr 2010 14:10:12 -0400 Subject: [PATCH 26/86] Fixing issue with orm:clear-cache:result command after the migration to Symfony console --- .../Console/Command/ClearCache/ResultCommand.php | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/lib/Doctrine/ORM/Tools/Console/Command/ClearCache/ResultCommand.php b/lib/Doctrine/ORM/Tools/Console/Command/ClearCache/ResultCommand.php index 947cac9fb..9bd82c36c 100644 --- a/lib/Doctrine/ORM/Tools/Console/Command/ClearCache/ResultCommand.php +++ b/lib/Doctrine/ORM/Tools/Console/Command/ClearCache/ResultCommand.php @@ -95,9 +95,9 @@ EOT $deleted = $cacheDriver->delete($id); if (is_array($deleted)) { - $this->_printDeleted($deleted); + $this->_printDeleted($output, $deleted); } else if (is_bool($deleted) && $deleted) { - $this->_printDeleted(array($id)); + $this->_printDeleted($output, array($id)); } $outputed = true; @@ -105,12 +105,12 @@ EOT } // Removing based on --regex - if (($regex = $input->getOption('regex')) !== null && $regexps) { + if (($regexps = $input->getOption('regex')) !== null && $regexps) { foreach($regexps as $regex) { $output->write($outputed ? PHP_EOL : ''); $output->write(sprintf('Clearing Result cache entries that match the regular expression "%s"', $regex) . PHP_EOL); - $this->_printDeleted($cacheDriver->deleteByRegex('/' . $regex. '/')); + $this->_printDeleted($output, $cacheDriver->deleteByRegex('/' . $regex. '/')); $outputed = true; } @@ -122,7 +122,7 @@ EOT $output->write($outputed ? PHP_EOL : ''); $output->write(sprintf('Clearing Result cache entries that have the prefix "%s"', $prefix) . PHP_EOL); - $this->_printDeleted($cacheDriver->deleteByPrefix($prefix)); + $this->_printDeleted($output, $cacheDriver->deleteByPrefix($prefix)); $outputed = true; } @@ -134,7 +134,7 @@ EOT $output->write($outputed ? PHP_EOL : ''); $output->write(sprintf('Clearing Result cache entries that have the suffix "%s"', $suffix) . PHP_EOL); - $this->_printDeleted($cacheDriver->deleteBySuffix($suffix)); + $this->_printDeleted($output, $cacheDriver->deleteBySuffix($suffix)); $outputed = true; } @@ -143,9 +143,9 @@ EOT // Removing ALL entries if ( ! $ids && ! $regexps && ! $prefixes && ! $suffixes) { $output->write($outputed ? PHP_EOL : ''); - $output->write('Clearing ALL Result cache entries'); + $output->write('Clearing ALL Result cache entries' . PHP_EOL); - $this->_printDeleted($cacheDriver->deleteAll()); + $this->_printDeleted($output, $cacheDriver->deleteAll()); $outputed = true; } From 0f4ba3b8757c18a0365a6d9c54d773de6268ac44 Mon Sep 17 00:00:00 2001 From: "Jonathan H. Wage" Date: Tue, 13 Apr 2010 14:11:21 -0400 Subject: [PATCH 27/86] Fixing issue with orm:convert-mapping task and dest-path that does not exist yet as well when reverse engineering from-database --- .../Console/Command/ConvertMappingCommand.php | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/lib/Doctrine/ORM/Tools/Console/Command/ConvertMappingCommand.php b/lib/Doctrine/ORM/Tools/Console/Command/ConvertMappingCommand.php index 48e6f3eb2..89a6a55d5 100644 --- a/lib/Doctrine/ORM/Tools/Console/Command/ConvertMappingCommand.php +++ b/lib/Doctrine/ORM/Tools/Console/Command/ConvertMappingCommand.php @@ -61,8 +61,8 @@ class ConvertMappingCommand extends Console\Command\Command 'dest-path', InputArgument::REQUIRED, 'The path to generate your entities classes.' ), - new InputArgument( - 'from-database', InputArgument::OPTIONAL, 'The path of mapping information.' + new InputOption( + 'from-database', null, null, 'Whether or not to convert mapping information from existing database.' ), new InputOption( 'extend', null, InputOption::PARAMETER_OPTIONAL, @@ -86,10 +86,7 @@ EOT { $em = $this->getHelper('em')->getEntityManager(); - $metadatas = $em->getMetadataFactory()->getAllMetadata(); - $metadatas = MetadataFilter::filter($metadatas, $input->getOption('filter')); - - if ($input->getArgument('from-database') === true) { + if ($input->getOption('from-database') === true) { $em->getConfiguration()->setMetadataDriverImpl( new \Doctrine\ORM\Mapping\Driver\DatabaseDriver( $em->getConnection()->getSchemaManager() @@ -97,8 +94,14 @@ EOT ); } + $metadatas = $em->getMetadataFactory()->getAllMetadata(); + $metadatas = MetadataFilter::filter($metadatas, $input->getOption('filter')); + // Process destination directory - $destPath = realpath($input->getArgument('dest-path')); + if ( ! is_dir($destPath = $input->getArgument('dest-path'))) { + mkdir($destPath, 0777, true); + } + $destPath = realpath($destPath); if ( ! file_exists($destPath)) { throw new \InvalidArgumentException( From 10aaf93c4488466810da58fcc346360d3fa61eba Mon Sep 17 00:00:00 2001 From: "Jonathan H. Wage" Date: Tue, 13 Apr 2010 14:12:13 -0400 Subject: [PATCH 28/86] Fixing ensure-production-settings task to not throw an exception and instead use the Output object to output an error --- .../Command/EnsureProductionSettingsCommand.php | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/lib/Doctrine/ORM/Tools/Console/Command/EnsureProductionSettingsCommand.php b/lib/Doctrine/ORM/Tools/Console/Command/EnsureProductionSettingsCommand.php index 44cdd5688..7c33174f5 100644 --- a/lib/Doctrine/ORM/Tools/Console/Command/EnsureProductionSettingsCommand.php +++ b/lib/Doctrine/ORM/Tools/Console/Command/EnsureProductionSettingsCommand.php @@ -65,12 +65,21 @@ EOT protected function execute(Console\Input\InputInterface $input, Console\Output\OutputInterface $output) { $em = $this->getHelper('em')->getEntityManager(); - $em->getConfiguration()->ensureProductionSettings(); - if ($input->getOption('complete') !== null) { - $em->getConnection()->connect(); + $error = false; + try { + $em->getConfiguration()->ensureProductionSettings(); + + if ($input->getOption('complete') !== null) { + $em->getConnection()->connect(); + } + } catch (\Exception $e) { + $error = true; + $output->writeln('' . $e->getMessage() . ''); } - $output->write('Environment is correctly configured for production.'); + if ($error === false) { + $output->write('Environment is correctly configured for production.' . PHP_EOL); + } } } \ No newline at end of file From 97e29e00a7d822d4d2bc43634fed8797073b6fae Mon Sep 17 00:00:00 2001 From: "Jonathan H. Wage" Date: Tue, 13 Apr 2010 14:12:44 -0400 Subject: [PATCH 29/86] Fixing orm:generate-proxies command to create the destination direction if it does not exist yet --- .../ORM/Tools/Console/Command/GenerateProxiesCommand.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/Doctrine/ORM/Tools/Console/Command/GenerateProxiesCommand.php b/lib/Doctrine/ORM/Tools/Console/Command/GenerateProxiesCommand.php index 5f71125d0..412cf869b 100644 --- a/lib/Doctrine/ORM/Tools/Console/Command/GenerateProxiesCommand.php +++ b/lib/Doctrine/ORM/Tools/Console/Command/GenerateProxiesCommand.php @@ -79,6 +79,10 @@ EOT $destPath = $em->getConfiguration()->getProxyDir(); } + if ( ! is_dir($destPath)) { + mkdir($destPath, 0777, true); + } + $destPath = realpath($destPath); if ( ! file_exists($destPath)) { From afc4d82793b25d01963c356b0e5d3afc2400679c Mon Sep 17 00:00:00 2001 From: "Jonathan H. Wage" Date: Tue, 13 Apr 2010 14:13:15 -0400 Subject: [PATCH 30/86] Fixing typo in tests xml mapping file --- .../ORM/Mapping/xml/Doctrine.Tests.ORM.Mapping.CTI.dcm.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/Doctrine/Tests/ORM/Mapping/xml/Doctrine.Tests.ORM.Mapping.CTI.dcm.xml b/tests/Doctrine/Tests/ORM/Mapping/xml/Doctrine.Tests.ORM.Mapping.CTI.dcm.xml index 9c8c8f98e..472c16558 100644 --- a/tests/Doctrine/Tests/ORM/Mapping/xml/Doctrine.Tests.ORM.Mapping.CTI.dcm.xml +++ b/tests/Doctrine/Tests/ORM/Mapping/xml/Doctrine.Tests.ORM.Mapping.CTI.dcm.xml @@ -3,7 +3,7 @@ xsi="http://www.w3.org/2001/XMLSchema-instance" schemaLocation="http://doctrine-project.org/schemas/orm/doctrine-mapping.xsd"> - + From 5cfe9e1d94d567a8cfed542cadfe5a0bf6852494 Mon Sep 17 00:00:00 2001 From: "Jonathan H. Wage" Date: Tue, 13 Apr 2010 18:20:41 -0400 Subject: [PATCH 31/86] Introducing DisconnectedClassMetadataFactory that will replace the need for ClassMetadataReader --- .../ORM/Mapping/ClassMetadataFactory.php | 29 +++++---- .../Command/GenerateEntitiesCommand.php | 6 +- .../DisconnectedClassMetadataFactory.php | 59 +++++++++++++++++++ 3 files changed, 80 insertions(+), 14 deletions(-) create mode 100644 lib/Doctrine/ORM/Tools/DisconnectedClassMetadataFactory.php diff --git a/lib/Doctrine/ORM/Mapping/ClassMetadataFactory.php b/lib/Doctrine/ORM/Mapping/ClassMetadataFactory.php index 99df4ccfd..d7de28c05 100644 --- a/lib/Doctrine/ORM/Mapping/ClassMetadataFactory.php +++ b/lib/Doctrine/ORM/Mapping/ClassMetadataFactory.php @@ -191,6 +191,20 @@ class ClassMetadataFactory $this->_loadedMetadata[$className] = $class; } + protected function _getParentClasses($name) + { + // Collect parent classes, ignoring transient (not-mapped) classes. + //TODO: Evaluate whether we can use class_parents() here. + $parentClass = $name; + $parentClasses = array(); + while ($parentClass = get_parent_class($parentClass)) { + if ( ! $this->_driver->isTransient($parentClass)) { + $parentClasses[] = $parentClass; + } + } + return array_reverse($parentClasses); + } + /** * Loads the metadata of the class in question and all it's ancestors whose metadata * is still not loaded. @@ -205,17 +219,8 @@ class ClassMetadataFactory } $loaded = array(); - - // Collect parent classes, ignoring transient (not-mapped) classes. - //TODO: Evaluate whether we can use class_parents() here. - $parentClass = $name; - $parentClasses = array(); - while ($parentClass = get_parent_class($parentClass)) { - if ( ! $this->_driver->isTransient($parentClass)) { - $parentClasses[] = $parentClass; - } - } - $parentClasses = array_reverse($parentClasses); + + $parentClasses = $this->_getParentClasses($name); $parentClasses[] = $name; // Move down the hierarchy of parent classes, starting from the topmost class @@ -354,7 +359,7 @@ class ClassMetadataFactory * * @param Doctrine\ORM\Mapping\ClassMetadata $class */ - private function _completeIdGeneratorMapping(ClassMetadata $class) + private function _completeIdGeneratorMapping(ClassMetadataInfo $class) { $idGenType = $class->generatorType; if ($idGenType == ClassMetadata::GENERATOR_TYPE_AUTO) { diff --git a/lib/Doctrine/ORM/Tools/Console/Command/GenerateEntitiesCommand.php b/lib/Doctrine/ORM/Tools/Console/Command/GenerateEntitiesCommand.php index 119a08c1b..ccb29cf14 100644 --- a/lib/Doctrine/ORM/Tools/Console/Command/GenerateEntitiesCommand.php +++ b/lib/Doctrine/ORM/Tools/Console/Command/GenerateEntitiesCommand.php @@ -25,7 +25,8 @@ use Symfony\Components\Console\Input\InputArgument, Symfony\Components\Console\Input\InputOption, Symfony\Components\Console, Doctrine\ORM\Tools\Console\MetadataFilter, - Doctrine\ORM\Tools\EntityGenerator; + Doctrine\ORM\Tools\EntityGenerator, + Doctrine\ORM\Tools\DisconnectedClassMetadataFactory; /** * Command to generate entity classes and method stubs from your mapping information. @@ -95,7 +96,8 @@ EOT { $em = $this->getHelper('em')->getEntityManager(); - $metadatas = $em->getMetadataFactory()->getAllMetadata(); + $cmf = new DisconnectedClassMetadataFactory($em); + $metadatas = $cmf->getAllMetadata(); $metadatas = MetadataFilter::filter($metadatas, $input->getOption('filter')); // Process destination directory diff --git a/lib/Doctrine/ORM/Tools/DisconnectedClassMetadataFactory.php b/lib/Doctrine/ORM/Tools/DisconnectedClassMetadataFactory.php new file mode 100644 index 000000000..1bfb6de3a --- /dev/null +++ b/lib/Doctrine/ORM/Tools/DisconnectedClassMetadataFactory.php @@ -0,0 +1,59 @@ +. + */ + +namespace Doctrine\ORM\Tools; + +use Doctrine\ORM\Mapping\ClassMetadataFactory; +use Doctrine\ORM\Mapping\ClassMetadataInfo; + +/** + * The ClassMetadataFactory 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. + * + * @license http://www.opensource.org/licenses/lgpl-license.php LGPL + * @link www.doctrine-project.org + * @since 2.0 + * @version $Revision$ + * @author Benjamin Eberlei + * @author Guilherme Blanco + * @author Jonathan Wage + * @author Roman Borschel + */ +class DisconnectedClassMetadataFactory extends ClassMetadataFactory +{ + /** + * @override + */ + protected function _newClassMetadataInstance($className) + { + return new ClassMetadataInfo($className); + } + + /** + * @override + */ + protected function _getParentClasses($name) + { + return array(); + } +} \ No newline at end of file From 45969840f0db36da151d8e0796d9cf0a58c2561f Mon Sep 17 00:00:00 2001 From: "Jonathan H. Wage" Date: Tue, 13 Apr 2010 18:22:08 -0400 Subject: [PATCH 32/86] Fixing class description --- lib/Doctrine/ORM/Tools/DisconnectedClassMetadataFactory.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Doctrine/ORM/Tools/DisconnectedClassMetadataFactory.php b/lib/Doctrine/ORM/Tools/DisconnectedClassMetadataFactory.php index 1bfb6de3a..4957b2c94 100644 --- a/lib/Doctrine/ORM/Tools/DisconnectedClassMetadataFactory.php +++ b/lib/Doctrine/ORM/Tools/DisconnectedClassMetadataFactory.php @@ -25,7 +25,7 @@ use Doctrine\ORM\Mapping\ClassMetadataFactory; use Doctrine\ORM\Mapping\ClassMetadataInfo; /** - * The ClassMetadataFactory is used to create ClassMetadataInfo objects + * 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. From 44e656dc0affc28e400a13adcbdedd49587b0b3b Mon Sep 17 00:00:00 2001 From: "Jonathan H. Wage" Date: Tue, 13 Apr 2010 18:24:48 -0400 Subject: [PATCH 33/86] Adding description to _getParentClasses() --- lib/Doctrine/ORM/Mapping/ClassMetadataFactory.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lib/Doctrine/ORM/Mapping/ClassMetadataFactory.php b/lib/Doctrine/ORM/Mapping/ClassMetadataFactory.php index d7de28c05..ba71288c2 100644 --- a/lib/Doctrine/ORM/Mapping/ClassMetadataFactory.php +++ b/lib/Doctrine/ORM/Mapping/ClassMetadataFactory.php @@ -191,6 +191,12 @@ class ClassMetadataFactory $this->_loadedMetadata[$className] = $class; } + /** + * Get array of parent classes for the given entity class + * + * @param string $name + * @return array $parentClasses + */ protected function _getParentClasses($name) { // Collect parent classes, ignoring transient (not-mapped) classes. From bce7ebfcc30288bb56d6b961ea0e222ffcea082c Mon Sep 17 00:00:00 2001 From: "Jonathan H. Wage" Date: Tue, 13 Apr 2010 18:58:43 -0400 Subject: [PATCH 34/86] Fixing convert-mapping task to use the DisconnectedClassMetdataFactory --- .../ORM/Tools/Console/Command/ConvertMappingCommand.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/lib/Doctrine/ORM/Tools/Console/Command/ConvertMappingCommand.php b/lib/Doctrine/ORM/Tools/Console/Command/ConvertMappingCommand.php index 89a6a55d5..c350ca045 100644 --- a/lib/Doctrine/ORM/Tools/Console/Command/ConvertMappingCommand.php +++ b/lib/Doctrine/ORM/Tools/Console/Command/ConvertMappingCommand.php @@ -25,7 +25,9 @@ use Symfony\Components\Console\Input\InputArgument, Symfony\Components\Console\Input\InputOption, Symfony\Components\Console, Doctrine\ORM\Tools\Console\MetadataFilter, - Doctrine\ORM\Tools\Export\ClassMetadataExporter; + Doctrine\ORM\Tools\Export\ClassMetadataExporter, + Doctrine\ORM\Tools\EntityGenerator, + Doctrine\ORM\Tools\DisconnectedClassMetadataFactory; /** * Command to convert your mapping information between the various formats. @@ -94,7 +96,8 @@ EOT ); } - $metadatas = $em->getMetadataFactory()->getAllMetadata(); + $cmf = new DisconnectedClassMetadataFactory($em); + $metadatas = $cmf->getAllMetadata(); $metadatas = MetadataFilter::filter($metadatas, $input->getOption('filter')); // Process destination directory From f3d91b9ea98726ad27c351dd041fd89f0e86231c Mon Sep 17 00:00:00 2001 From: Guilherme Blanco Date: Tue, 13 Apr 2010 22:06:01 -0300 Subject: [PATCH 35/86] [2.0] Fixed E_NOTICE being throwing when ->getSingleScalarResult() is called and no result is found. Added coverage for this and also for multiple result (NonUniqueResultException). --- .../Hydration/SingleScalarHydrator.php | 6 ++- .../Tests/ORM/Functional/QueryTest.php | 42 ++++++++++++++++++- 2 files changed, 46 insertions(+), 2 deletions(-) diff --git a/lib/Doctrine/ORM/Internal/Hydration/SingleScalarHydrator.php b/lib/Doctrine/ORM/Internal/Hydration/SingleScalarHydrator.php index dbcc8c813..a095c2a7d 100644 --- a/lib/Doctrine/ORM/Internal/Hydration/SingleScalarHydrator.php +++ b/lib/Doctrine/ORM/Internal/Hydration/SingleScalarHydrator.php @@ -36,7 +36,11 @@ class SingleScalarHydrator extends AbstractHydrator { $cache = array(); $result = $this->_stmt->fetchAll(\PDO::FETCH_ASSOC); - if (count($result) > 1 || count($result[key($result)]) > 1) { + $num = count($result); + + if ($num == 0) { + throw new \Doctrine\ORM\NoResultException; + } else if ($num > 1 || count($result[key($result)]) > 1) { throw new \Doctrine\ORM\NonUniqueResultException; } $result = $this->_gatherScalarRowData($result[key($result)], $cache); diff --git a/tests/Doctrine/Tests/ORM/Functional/QueryTest.php b/tests/Doctrine/Tests/ORM/Functional/QueryTest.php index 4a13b0b7a..b1074cbc5 100644 --- a/tests/Doctrine/Tests/ORM/Functional/QueryTest.php +++ b/tests/Doctrine/Tests/ORM/Functional/QueryTest.php @@ -224,7 +224,47 @@ class QueryTest extends \Doctrine\Tests\OrmFunctionalTestCase public function testGetSingleResultThrowsExceptionOnNoResult() { $this->_em->createQuery("select a from Doctrine\Tests\Models\CMS\CmsArticle a") - ->getSingleResult(); + ->getSingleResult(); + } + + /** + * @expectedException Doctrine\ORM\NoResultException + */ + public function testGetSingleScalarResultThrowsExceptionOnNoResult() + { + $this->_em->createQuery("select a from Doctrine\Tests\Models\CMS\CmsArticle a") + ->getSingleScalarResult(); + } + + /** + * @expectedException Doctrine\ORM\NonUniqueResultException + */ + public function testGetSingleScalarResultThrowsExceptionOnNonUniqueResult() + { + $user = new CmsUser; + $user->name = 'Guilherme'; + $user->username = 'gblanco'; + $user->status = 'developer'; + + $article1 = new CmsArticle; + $article1->topic = "Doctrine 2"; + $article1->text = "This is an introduction to Doctrine 2."; + $user->addArticle($article1); + + $article2 = new CmsArticle; + $article2->topic = "Symfony 2"; + $article2->text = "This is an introduction to Symfony 2."; + $user->addArticle($article2); + + $this->_em->persist($user); + $this->_em->persist($article1); + $this->_em->persist($article2); + + $this->_em->flush(); + $this->_em->clear(); + + $this->_em->createQuery("select a from Doctrine\Tests\Models\CMS\CmsArticle a") + ->getSingleScalarResult(); } public function testSupportsQueriesWithEntityNamespaces() From 889094709e2df7d5a40dd09a7ef24211f97bb958 Mon Sep 17 00:00:00 2001 From: Guilherme Blanco Date: Wed, 14 Apr 2010 00:04:44 -0300 Subject: [PATCH 36/86] [2.0] Added support to IdentificationVariable that was missing in ArithmeticPrimary (it was not correctly handling it). Uncommented a unit test that added coverage to it. --- .../Hydration/SingleScalarHydrator.php | 1 + lib/Doctrine/ORM/Query/AST/PathExpression.php | 1 + lib/Doctrine/ORM/Query/Parser.php | 32 +++++++++++-------- lib/Doctrine/ORM/Query/SqlWalker.php | 13 ++++++++ .../ORM/Query/SelectSqlGenerationTest.php | 5 +-- 5 files changed, 37 insertions(+), 15 deletions(-) diff --git a/lib/Doctrine/ORM/Internal/Hydration/SingleScalarHydrator.php b/lib/Doctrine/ORM/Internal/Hydration/SingleScalarHydrator.php index a095c2a7d..21846b6dc 100644 --- a/lib/Doctrine/ORM/Internal/Hydration/SingleScalarHydrator.php +++ b/lib/Doctrine/ORM/Internal/Hydration/SingleScalarHydrator.php @@ -43,6 +43,7 @@ class SingleScalarHydrator extends AbstractHydrator } else if ($num > 1 || count($result[key($result)]) > 1) { throw new \Doctrine\ORM\NonUniqueResultException; } + $result = $this->_gatherScalarRowData($result[key($result)], $cache); return array_shift($result); diff --git a/lib/Doctrine/ORM/Query/AST/PathExpression.php b/lib/Doctrine/ORM/Query/AST/PathExpression.php index 4f8d0e277..996d35c27 100644 --- a/lib/Doctrine/ORM/Query/AST/PathExpression.php +++ b/lib/Doctrine/ORM/Query/AST/PathExpression.php @@ -41,6 +41,7 @@ namespace Doctrine\ORM\Query\AST; */ class PathExpression extends Node { + const TYPE_IDENTIFICATION_VARIABLE = 1; const TYPE_COLLECTION_VALUED_ASSOCIATION = 2; const TYPE_SINGLE_VALUED_ASSOCIATION = 4; const TYPE_STATE_FIELD = 8; diff --git a/lib/Doctrine/ORM/Query/Parser.php b/lib/Doctrine/ORM/Query/Parser.php index d3c7e3808..6f9e73c26 100644 --- a/lib/Doctrine/ORM/Query/Parser.php +++ b/lib/Doctrine/ORM/Query/Parser.php @@ -565,7 +565,8 @@ class Parser $aliasIdentificationVariable = $pathExpression->identificationVariable; $parentField = $pathExpression->identificationVariable; $class = $qComp['metadata']; - $fieldType = null; + $fieldType = ($pathExpression->expectedType == AST\PathExpression::TYPE_IDENTIFICATION_VARIABLE) + ? AST\PathExpression::TYPE_IDENTIFICATION_VARIABLE : null; $curIndex = 0; foreach ($parts as $field) { @@ -602,8 +603,8 @@ class Parser $class = $this->_em->getClassMetadata($assoc->targetEntityName); if ( - ($curIndex != $numParts - 1) && - ! isset($this->_queryComponents[$aliasIdentificationVariable . '.' . $field]) + ($curIndex != $numParts - 1) && + ! isset($this->_queryComponents[$aliasIdentificationVariable . '.' . $field]) ) { // Building queryComponent $joinQueryComponent = array( @@ -617,13 +618,13 @@ class Parser // Create AST node $joinVariableDeclaration = new AST\JoinVariableDeclaration( - new AST\Join( - AST\Join::JOIN_TYPE_INNER, - new AST\JoinAssociationPathExpression($aliasIdentificationVariable, $field), - $aliasIdentificationVariable . '.' . $field, - false - ), - null + new AST\Join( + AST\Join::JOIN_TYPE_INNER, + new AST\JoinAssociationPathExpression($aliasIdentificationVariable, $field), + $aliasIdentificationVariable . '.' . $field, + false + ), + null ); $AST->fromClause->identificationVariableDeclarations[0]->joinVariableDeclarations[] = $joinVariableDeclaration; @@ -649,6 +650,11 @@ class Parser // We need to recognize which was expected type(s) $expectedStringTypes = array(); + // Validate state field type + if ($expectedType & AST\PathExpression::TYPE_IDENTIFICATION_VARIABLE) { + $expectedStringTypes[] = 'IdentificationVariable'; + } + // Validate state field type if ($expectedType & AST\PathExpression::TYPE_STATE_FIELD) { $expectedStringTypes[] = 'StateFieldPathExpression'; @@ -915,12 +921,12 @@ class Parser $identVariable = $this->IdentificationVariable(); $parts = array(); - do { + while ($this->_lexer->isNextToken(Lexer::T_DOT)) { $this->match(Lexer::T_DOT); $this->match(Lexer::T_IDENTIFIER); $parts[] = $this->_lexer->token['value']; - } while ($this->_lexer->isNextToken(Lexer::T_DOT)); + } // Creating AST node $pathExpr = new AST\PathExpression($expectedTypes, $identVariable, $parts); @@ -2168,7 +2174,7 @@ class Parser return $this->SingleValuedPathExpression(); } - return $this->IdentificationVariable(); + return $this->PathExpression(AST\PathExpression::TYPE_IDENTIFICATION_VARIABLE); case Lexer::T_INPUT_PARAMETER: return $this->InputParameter(); diff --git a/lib/Doctrine/ORM/Query/SqlWalker.php b/lib/Doctrine/ORM/Query/SqlWalker.php index be583c625..7a0b362c1 100644 --- a/lib/Doctrine/ORM/Query/SqlWalker.php +++ b/lib/Doctrine/ORM/Query/SqlWalker.php @@ -446,6 +446,17 @@ class SqlWalker implements TreeWalker $sql = ''; switch ($pathExpr->type) { + case AST\PathExpression::TYPE_IDENTIFICATION_VARIABLE: + $dqlAlias = $pathExpr->identificationVariable; + $class = $this->_queryComponents[$dqlAlias]['metadata']; + + if ($this->_useSqlTableAliases) { + $sql .= $this->walkIdentificationVariable($dqlAlias) . '.'; + } + + $sql .= $class->getQuotedColumnName($class->identifier[0], $this->_platform); + break; + case AST\PathExpression::TYPE_STATE_FIELD: $parts = $pathExpr->parts; $fieldName = array_pop($parts); @@ -458,6 +469,7 @@ class SqlWalker implements TreeWalker $sql .= $class->getQuotedColumnName($fieldName, $this->_platform); break; + case AST\PathExpression::TYPE_SINGLE_VALUED_ASSOCIATION: // 1- the owning side: // Just use the foreign key, i.e. u.group_id @@ -484,6 +496,7 @@ class SqlWalker implements TreeWalker throw QueryException::associationPathInverseSideNotSupported(); } break; + default: throw QueryException::invalidPathExpression($pathExpr); } diff --git a/tests/Doctrine/Tests/ORM/Query/SelectSqlGenerationTest.php b/tests/Doctrine/Tests/ORM/Query/SelectSqlGenerationTest.php index 163bc594e..7ed9c6693 100644 --- a/tests/Doctrine/Tests/ORM/Query/SelectSqlGenerationTest.php +++ b/tests/Doctrine/Tests/ORM/Query/SelectSqlGenerationTest.php @@ -21,6 +21,7 @@ class SelectSqlGenerationTest extends \Doctrine\Tests\OrmTestCase $query = $this->_em->createQuery($dqlToBeTested); $query->setHint(Query::HINT_FORCE_PARTIAL_LOAD, true) ->useQueryCache(false); + parent::assertEquals($sqlToBeConfirmed, $query->getSql()); $query->free(); } catch (\Exception $e) { @@ -385,7 +386,7 @@ class SelectSqlGenerationTest extends \Doctrine\Tests\OrmTestCase $this->assertEquals('SELECT d0_.id AS id0 FROM date_time_model d0_ WHERE d0_.col_datetime > CURRENT_TIMESTAMP', $q->getSql()); } - /*public function testExistsExpressionInWhereCorrelatedSubqueryAssocCondition() + public function testExistsExpressionInWhereCorrelatedSubqueryAssocCondition() { $this->assertSqlGeneration( // DQL @@ -402,7 +403,7 @@ class SelectSqlGenerationTest extends \Doctrine\Tests\OrmTestCase . ')' ); - }*/ + } public function testLimitFromQueryClass() { From 4106002344d2878ce77915aa07c742bc29942887 Mon Sep 17 00:00:00 2001 From: "Roman S. Borschel" Date: Wed, 14 Apr 2010 10:46:35 +0200 Subject: [PATCH 37/86] Small refactorings. --- lib/Doctrine/ORM/AbstractQuery.php | 4 ++-- .../ORM/Mapping/ClassMetadataFactory.php | 23 ++++++++----------- 2 files changed, 12 insertions(+), 15 deletions(-) diff --git a/lib/Doctrine/ORM/AbstractQuery.php b/lib/Doctrine/ORM/AbstractQuery.php index b872e9845..5acf82d0b 100644 --- a/lib/Doctrine/ORM/AbstractQuery.php +++ b/lib/Doctrine/ORM/AbstractQuery.php @@ -410,12 +410,12 @@ abstract class AbstractQuery throw new NonUniqueResultException; } return array_shift($result); - } else if (is_object($result)) { + }/* else if (is_object($result)) { if (count($result) > 1) { throw new NonUniqueResultException; } return $result->first(); - } + }*/ return $result; } diff --git a/lib/Doctrine/ORM/Mapping/ClassMetadataFactory.php b/lib/Doctrine/ORM/Mapping/ClassMetadataFactory.php index 99df4ccfd..13ca40840 100644 --- a/lib/Doctrine/ORM/Mapping/ClassMetadataFactory.php +++ b/lib/Doctrine/ORM/Mapping/ClassMetadataFactory.php @@ -203,19 +203,16 @@ class ClassMetadataFactory if ( ! $this->_initialized) { $this->_initialize(); } - + $loaded = array(); // Collect parent classes, ignoring transient (not-mapped) classes. - //TODO: Evaluate whether we can use class_parents() here. - $parentClass = $name; $parentClasses = array(); - while ($parentClass = get_parent_class($parentClass)) { + foreach (array_reverse(class_parents($name)) as $parentClass) { if ( ! $this->_driver->isTransient($parentClass)) { $parentClasses[] = $parentClass; } } - $parentClasses = array_reverse($parentClasses); $parentClasses[] = $name; // Move down the hierarchy of parent classes, starting from the topmost class @@ -231,7 +228,7 @@ class ClassMetadataFactory } $class = $this->_newClassMetadataInstance($className); - + if ($parent) { $class->setInheritanceType($parent->inheritanceType); $class->setDiscriminatorColumn($parent->discriminatorColumn); @@ -262,8 +259,8 @@ class ClassMetadataFactory } else if ($parent->isIdGeneratorTable()) { $class->getTableGeneratorDefinition($parent->tableGeneratorDefinition); } - if ($generatorType = $parent->generatorType) { - $class->setIdGeneratorType($generatorType); + if ($parent->generatorType) { + $class->setIdGeneratorType($parent->generatorType); } if ($parent->idGenerator) { $class->setIdGenerator($parent->idGenerator); @@ -282,18 +279,18 @@ class ClassMetadataFactory $eventArgs = new \Doctrine\ORM\Event\LoadClassMetadataEventArgs($class); $this->_evm->dispatchEvent(Events::loadClassMetadata, $eventArgs); } - + $this->_loadedMetadata[$className] = $class; - + $parent = $class; - + if ( ! $class->isMappedSuperclass) { array_unshift($visited, $className); } - + $loaded[] = $className; } - + return $loaded; } From ceb05e85efa5105ec1ba30e86ce1bc27fe853ba4 Mon Sep 17 00:00:00 2001 From: "Jonathan H. Wage" Date: Wed, 14 Apr 2010 10:31:50 -0400 Subject: [PATCH 38/86] Removing ClassMetadataReader --- .../ORM/Tools/ClassMetadataReader.php | 287 ------------------ .../ORM/Tools/ConvertDoctrine1Schema.php | 2 +- .../Tools/Export/ClassMetadataExporter.php | 69 +---- .../Tools/Export/Driver/AbstractExporter.php | 14 +- .../ORM/Functional/DatabaseDriverTest.php | 18 +- .../ORM/Tools/ConvertDoctrine1SchemaTest.php | 59 ++-- .../AbstractClassMetadataExporterTest.php | 267 ++++++++-------- 7 files changed, 201 insertions(+), 515 deletions(-) delete mode 100644 lib/Doctrine/ORM/Tools/ClassMetadataReader.php diff --git a/lib/Doctrine/ORM/Tools/ClassMetadataReader.php b/lib/Doctrine/ORM/Tools/ClassMetadataReader.php deleted file mode 100644 index 5d8cd8e8b..000000000 --- a/lib/Doctrine/ORM/Tools/ClassMetadataReader.php +++ /dev/null @@ -1,287 +0,0 @@ -. - */ - -namespace Doctrine\ORM\Tools; - -use Doctrine\ORM\Mapping\ClassMetadataInfo, - Doctrine\ORM\Mapping\ClassMetadata, - Doctrine\ORM\Mapping\MappingException, - Doctrine\ORM\Mapping\Driver\Driver, - Doctrine\ORM\Mapping\Driver\AnnotationDriver, - Doctrine\ORM\EntityManager, - Doctrine\ORM\Tools\Export\ExportException; - -/** - * Class to read metadata mapping information from multiple sources into an array - * of ClassMetadataInfo instances. - * - * The difference between this class and the ClassMetadataFactory is that this - * is just a tool for reading in the mapping information from files without - * having it bound to the actual ORM and the mapping information referenced by - * the EntityManager. This allows us to read any source of mapping information - * and return a single array of aggregated ClassMetadataInfo instances. - * - * These arrays are used for exporting the mapping information to the supported - * mapping drivers, generating entities, generating repositories, etc. - * - * @license http://www.opensource.org/licenses/lgpl-license.php LGPL - * @link www.doctrine-project.org - * @since 2.0 - * @version $Revision$ - * @author Benjamin Eberlei - * @author Guilherme Blanco - * @author Jonathan Wage - * @author Roman Borschel - */ -class ClassMetadataReader -{ - private static $_mappingDrivers = array( - 'annotation' => 'Doctrine\ORM\Mapping\Driver\AnnotationDriver', - 'yaml' => 'Doctrine\ORM\Mapping\Driver\YamlDriver', - 'yml' => 'Doctrine\ORM\Mapping\Driver\YamlDriver', - 'xml' => 'Doctrine\ORM\Mapping\Driver\XmlDriver', - 'php' => 'Doctrine\ORM\Mapping\Driver\PhpDriver', - 'database' => 'Doctrine\ORM\Mapping\Driver\DatabaseDriver' - ); - - private $_mappingSources = array(); - private $_em; - - /** - * Register a new mapping driver class under a specified name - * - * @param string $name - * @param string $class - */ - public static function registerMappingDriver($name, $class) - { - self::$_mappingDrivers[$name] = $class; - } - - /** - * Optionally set the EntityManager instance to get the AnnotationDriver - * from instead of creating a new instance of the AnnotationDriver - * - * @param EntityManager $em - * @return void - */ - public function setEntityManager(EntityManager $em) - { - $this->_em = $em; - } - - /** - * Get an array of ClassMetadataInfo instances for all the configured mapping - * directories. Reads the mapping directories and populates ClassMetadataInfo - * instances. - * - * If you specify $autoload = true then this method will return ClassMetadata - * instances instead of ClassMetadataInfo instances. Keep in mind that if you - * specify it to autoload and it doesn't find the class your autoloader may - * throw an error. - * - * @param bool $autoload Whether or to try and autoload the classes - * @return array $classes - */ - public function getMetadatas($autoload = false) - { - $classes = array(); - - foreach ($this->_mappingSources as $d) { - list($source, $driver) = $d; - - $allClasses = $driver->getAllClassNames(); - - foreach ($allClasses as $className) { - if (class_exists($className, $autoload)) { - $metadata = new ClassMetadata($className); - } else { - $metadata = new ClassMetadataInfo($className); - } - - $driver->loadMetadataForClass($className, $metadata); - - if ( ! $metadata->isMappedSuperclass) { - $classes[$metadata->name] = $metadata; - } - } - } - - return $classes; - } - - /** - * Add a new mapping directory to the array of directories to convert and export - * to another format - * - * @param string $source The source for the mapping - * @param string $type The type of mapping files (yml, xml, etc.) - * @return void - */ - public function addMappingSource($source, $type = null) - { - if ($type === null) { - $type = $this->_determineSourceType($source); - } - - if ( ! isset(self::$_mappingDrivers[$type])) { - throw ExportException::invalidMappingDriverType($type); - } - - $source = $this->_getSourceByType($type, $source); - $driver = $this->_getMappingDriver($type, $source); - $this->_mappingSources[] = array($source, $driver); - } - - /** - * Get an instance of a mapping driver - * - * @param string $type The type of mapping driver (yaml, xml, annotation, etc.) - * @param string $source The source for the driver - * @return AbstractDriver $driver - */ - private function _getMappingDriver($type, $source = null) - { - if ($source instanceof \Doctrine\ORM\Mapping\Driver\Driver) { - return $source; - } - - if ( ! isset(self::$_mappingDrivers[$type])) { - return false; - } - - $class = self::$_mappingDrivers[$type]; - - if (is_subclass_of($class, 'Doctrine\ORM\Mapping\Driver\AbstractFileDriver')) { - if (is_null($source)) { - throw MappingException::fileMappingDriversRequireConfiguredDirectoryPath(); - } - - $driver = new $class($source); - } else if ($class == 'Doctrine\ORM\Mapping\Driver\AnnotationDriver') { - $reader = new \Doctrine\Common\Annotations\AnnotationReader(new \Doctrine\Common\Cache\ArrayCache); - $reader->setDefaultAnnotationNamespace('Doctrine\ORM\Mapping\\'); - - $driver = new \Doctrine\ORM\Mapping\Driver\AnnotationDriver($reader, $source); - } else { - $driver = new $class($source); - } - - return $driver; - } - - private function _determineSourceType($source) - { - if ($source instanceof \Doctrine\ORM\Mapping\Driver\Driver) { - $type = array_search(get_class($source), self::$_mappingDrivers); - return $type; - // If the --from= is a directory lets determine if it is - // annotations, yaml, xml, etc. - } else if (is_dir($source)) { - $source = realpath($source); - - // Find the files in the directory - $files = glob($source . '/*.*'); - - if ( ! $files) { - throw new \InvalidArgumentException( - sprintf('No mapping files found in "%s"', $source) - ); - } - - // Get the contents of the first file - $contents = file_get_contents($files[0]); - - // Check if it has a class definition in it for annotations - if (preg_match("/class (.*)/", $contents)) { - return 'annotation'; - // Otherwise lets determine the type based on the extension of the - // first file in the directory (yml, xml, etc) - } else { - $info = pathinfo($files[0]); - - return $info['extension']; - } - // Nothing special for database - } else if ($source == 'database') { - return 'database'; - } - } - - private function _getSourceByType($type, $source) - { - // If --from==database then the source is an instance of SchemaManager - // for the current EntityManager - if ($type == 'database') { - if ($source instanceof \Doctrine\ORM\Mapping\Driver\DatabaseDriver) { - return $source; - } else if ($this->_em) { - return $this->_em->getConnection()->getSchemaManager(); - } - // If source is annotation then lets try and find the existing annotation - // driver for the source instead of re-creating a new instance - } else if ($type == 'annotation') { - if ($this->_em) { - $metadataDriverImpl = $this->_em->getConfiguration()->getMetadataDriverImpl(); - // Find the annotation driver in the chain of drivers - if ($metadataDriverImpl instanceof DriverChain) { - foreach ($metadataDriverImpl->getDrivers() as $namespace => $driver) { - if ($this->_isAnnotationDriverForPath($driver, $source)) { - return $driver; - } - } - } else if ($this->_isAnnotationDriverForPath($metadataDriverImpl, $source)) { - return $metadataDriverImpl; - } else if ($metadataDriverImpl instanceof AnnotationDriver) { - $metadataDriverImpl->addPaths(array($source)); - return $metadataDriverImpl; - } else { - return $source; - } - } else { - return $source; - } - } else { - return $source; - } - } - - /** - * Check to see if the given metadata driver is the annotation driver for the - * given directory path - * - * @param Driver $driver - * @param string $path - * @return boolean - */ - private function _isAnnotationDriverForPath(Driver $driver, $path) - { - if ( ! $driver instanceof AnnotationDriver) { - return false; - } - - if (in_array(realpath($path), $driver->getPaths())) { - return true; - } else { - return false; - } - } -} \ No newline at end of file diff --git a/lib/Doctrine/ORM/Tools/ConvertDoctrine1Schema.php b/lib/Doctrine/ORM/Tools/ConvertDoctrine1Schema.php index b559913a4..a1fd97bb1 100644 --- a/lib/Doctrine/ORM/Tools/ConvertDoctrine1Schema.php +++ b/lib/Doctrine/ORM/Tools/ConvertDoctrine1Schema.php @@ -62,7 +62,7 @@ class ConvertDoctrine1Schema * * @return array $metadatas An array of ClassMetadataInfo instances */ - public function getMetadatas() + public function getMetadata() { $schema = array(); foreach ($this->_from as $path) { diff --git a/lib/Doctrine/ORM/Tools/Export/ClassMetadataExporter.php b/lib/Doctrine/ORM/Tools/Export/ClassMetadataExporter.php index e93f77e35..c86b9113e 100644 --- a/lib/Doctrine/ORM/Tools/Export/ClassMetadataExporter.php +++ b/lib/Doctrine/ORM/Tools/Export/ClassMetadataExporter.php @@ -22,29 +22,13 @@ namespace Doctrine\ORM\Tools\Export; -use Doctrine\ORM\Tools\ClassMetadataReader, - Doctrine\ORM\Tools\Export\ExportException, +use Doctrine\ORM\Tools\Export\ExportException, Doctrine\ORM\EntityManager; /** * Class used for converting your mapping information between the * supported formats: yaml, xml, and php/annotation. * - * [php] - * // Unify all your mapping information which is written in php, xml, yml - * // and convert it to a single set of yaml files. - * - * $cme = new Doctrine\ORM\Tools\Export\ClassMetadataExporter(); - * $cme->addMappingSource(__DIR__ . '/Entities'); - * $cme->addMappingSource(__DIR__ . '/xml'); - * $cme->addMappingSource(__DIR__ . '/yaml'); - * - * $exporter = $cme->getExporter('yaml'); - * $exporter->setOutputDir(__DIR__ . '/new_yaml'); - * - * $exporter->setMetadatas($cme->getMetadatas()); - * $exporter->export(); - * * @license http://www.opensource.org/licenses/lgpl-license.php LGPL * @link www.doctrine-project.org * @since 2.0 @@ -61,11 +45,6 @@ class ClassMetadataExporter 'annotation' => 'Doctrine\ORM\Tools\Export\Driver\AnnotationExporter' ); - public function __construct() - { - $this->_reader = new ClassMetadataReader(); - } - /** * Register a new exporter driver class under a specified name * @@ -77,18 +56,6 @@ class ClassMetadataExporter self::$_exporterDrivers[$name] = $class; } - /** - * Optionally set the EntityManager instance to get the AnnotationDriver - * from instead of creating a new instance of the AnnotationDriver - * - * @param EntityManager $em - * @return void - */ - public function setEntityManager(EntityManager $em) - { - $this->_reader->setEntityManager($em); - } - /** * Get a exporter driver instance * @@ -96,7 +63,7 @@ class ClassMetadataExporter * @param string $source The directory where the exporter will export to * @return AbstractExporter $exporter */ - public function getExporter($type, $source = null) + public function getExporter($type, $dest) { if ( ! isset(self::$_exporterDrivers[$type])) { throw ExportException::invalidExporterDriverType($type); @@ -104,36 +71,6 @@ class ClassMetadataExporter $class = self::$_exporterDrivers[$type]; - return new $class($source); - } - - /** - * Add a new mapping directory to the array of directories to convert and export - * to another format - * - * [php] - * $cme = new Doctrine\ORM\Tools\Export\ClassMetadataExporter(); - * $cme->addMappingSource(__DIR__ . '/yaml'); - * $cme->addMappingSource($schemaManager); - * - * @param string $source The source for the mapping files - * @param string $type The type of mapping files (yml, xml, etc.) - * @return void - */ - public function addMappingSource($source, $type = null) - { - $this->_reader->addMappingSource($source, $type); - } - - /** - * Get an array of ClassMetadataInfo instances for all the configured mapping - * directories. Reads the mapping directories and populates ClassMetadataInfo - * instances. - * - * @return array $classes - */ - public function getMetadatas() - { - return $this->_reader->getMetadatas(); + return new $class($dest); } } \ No newline at end of file diff --git a/lib/Doctrine/ORM/Tools/Export/Driver/AbstractExporter.php b/lib/Doctrine/ORM/Tools/Export/Driver/AbstractExporter.php index 70b70c557..983d0f69d 100644 --- a/lib/Doctrine/ORM/Tools/Export/Driver/AbstractExporter.php +++ b/lib/Doctrine/ORM/Tools/Export/Driver/AbstractExporter.php @@ -36,7 +36,7 @@ use Doctrine\ORM\Mapping\ClassMetadataInfo; */ abstract class AbstractExporter { - protected $_metadatas = array(); + protected $_metadata = array(); protected $_outputDir; protected $_extension; @@ -57,12 +57,12 @@ abstract class AbstractExporter /** * Set the array of ClassMetadataInfo instances to export * - * @param array $metadatas + * @param array $metadata * @return void */ - public function setMetadatas(array $metadatas) + public function setMetadata(array $metadata) { - $this->_metadatas = $metadatas; + $this->_metadata = $metadata; } /** @@ -79,7 +79,7 @@ abstract class AbstractExporter * Set the directory to output the mapping files to * * [php] - * $exporter = new YamlExporter($metadatas); + * $exporter = new YamlExporter($metadata); * $exporter->setOutputDir(__DIR__ . '/yaml'); * $exporter->export(); * @@ -103,7 +103,7 @@ abstract class AbstractExporter mkdir($this->_outputDir, 0777, true); } - foreach ($this->_metadatas as $metadata) { + foreach ($this->_metadata as $metadata) { $output = $this->exportClassMetadata($metadata); $path = $this->_generateOutputPath($metadata); $dir = dirname($path); @@ -129,7 +129,7 @@ abstract class AbstractExporter * Set the directory to output the mapping files to * * [php] - * $exporter = new YamlExporter($metadatas, __DIR__ . '/yaml'); + * $exporter = new YamlExporter($metadata, __DIR__ . '/yaml'); * $exporter->setExtension('.yml'); * $exporter->export(); * diff --git a/tests/Doctrine/Tests/ORM/Functional/DatabaseDriverTest.php b/tests/Doctrine/Tests/ORM/Functional/DatabaseDriverTest.php index 6b963c098..ccd59a7ed 100644 --- a/tests/Doctrine/Tests/ORM/Functional/DatabaseDriverTest.php +++ b/tests/Doctrine/Tests/ORM/Functional/DatabaseDriverTest.php @@ -4,7 +4,7 @@ namespace Doctrine\Tests\ORM\Functional; require_once __DIR__ . '/../../TestInit.php'; -use Doctrine\ORM\Tools\ClassMetadataReader; +use Doctrine\ORM\Mapping\ClassMetadataInfo; class DatabaseDriverTest extends \Doctrine\Tests\OrmFunctionalTestCase { @@ -80,7 +80,6 @@ class DatabaseDriverTest extends \Doctrine\Tests\OrmFunctionalTestCase $this->assertType('Doctrine\ORM\Mapping\OneToOneMapping', $metadata->associationMappings['bar']); } - /** * * @param string $className @@ -88,15 +87,12 @@ class DatabaseDriverTest extends \Doctrine\Tests\OrmFunctionalTestCase */ protected function extractClassMetadata($className) { - $cm = new ClassMetadataReader(); - $cm->addMappingSource(new \Doctrine\ORM\Mapping\Driver\DatabaseDriver($this->_sm)); - $metadatas = $cm->getMetadatas(); - - $output = false; - - foreach ($metadatas AS $metadata) { - if (strtolower($metadata->name) == strtolower($className)) { - return $metadata; + $driver = new \Doctrine\ORM\Mapping\Driver\DatabaseDriver($this->_sm); + foreach ($driver->getAllClassNames() as $dbClassName) { + $class = new ClassMetadataInfo($dbClassName); + $driver->loadMetadataForClass($dbClassName, $class); + if (strtolower($class->name) == strtolower($className)) { + return $class; } } diff --git a/tests/Doctrine/Tests/ORM/Tools/ConvertDoctrine1SchemaTest.php b/tests/Doctrine/Tests/ORM/Tools/ConvertDoctrine1SchemaTest.php index f76f7baa7..94856b831 100644 --- a/tests/Doctrine/Tests/ORM/Tools/ConvertDoctrine1SchemaTest.php +++ b/tests/Doctrine/Tests/ORM/Tools/ConvertDoctrine1SchemaTest.php @@ -21,8 +21,15 @@ namespace Doctrine\Tests\ORM\Tools; -use Doctrine\ORM\Tools\Export\ClassMetadataExporter, - Doctrine\ORM\Tools\ConvertDoctrine1Schema; +use Doctrine\ORM\Tools\Export\ClassMetadataExporter; +use Doctrine\ORM\Tools\ConvertDoctrine1Schema; +use Doctrine\Tests\Mocks\MetadataDriverMock; +use Doctrine\Tests\Mocks\DatabasePlatformMock; +use Doctrine\Tests\Mocks\EntityManagerMock; +use Doctrine\Tests\Mocks\ConnectionMock; +use Doctrine\Tests\Mocks\DriverMock; +use Doctrine\Common\EventManager; +use Doctrine\ORM\Tools\DisconnectedClassMetadataFactory; require_once __DIR__ . '/../../TestInit.php'; @@ -38,9 +45,23 @@ require_once __DIR__ . '/../../TestInit.php'; */ class ConvertDoctrine1SchemaTest extends \Doctrine\Tests\OrmTestCase { + protected function _createEntityManager($metadataDriver) + { + $driverMock = new DriverMock(); + $config = new \Doctrine\ORM\Configuration(); + $config->setProxyDir(__DIR__ . '/../../Proxies'); + $config->setProxyNamespace('Doctrine\Tests\Proxies'); + $eventManager = new EventManager(); + $conn = new ConnectionMock(array(), $driverMock, $config, $eventManager); + $mockDriver = new MetadataDriverMock(); + $config->setMetadataDriverImpl($metadataDriver); + + return EntityManagerMock::create($conn, $config, $eventManager); + } + public function testTest() { - if (!class_exists('Symfony\Components\Yaml\Yaml', true)) { + if ( ! class_exists('Symfony\Components\Yaml\Yaml', true)) { $this->markTestSkipped('Please install Symfony YAML Component into the include path of your PHP installation.'); } @@ -48,28 +69,32 @@ class ConvertDoctrine1SchemaTest extends \Doctrine\Tests\OrmTestCase $converter = new ConvertDoctrine1Schema(__DIR__ . '/doctrine1schema'); $exporter = $cme->getExporter('yml', __DIR__ . '/convert'); - $exporter->setMetadatas($converter->getMetadatas()); + $exporter->setMetadata($converter->getMetadata()); $exporter->export(); $this->assertTrue(file_exists(__DIR__ . '/convert/User.dcm.yml')); $this->assertTrue(file_exists(__DIR__ . '/convert/Profile.dcm.yml')); - $cme->addMappingSource(__DIR__ . '/convert'); - $metadatas = $cme->getMetadatas(); + $metadataDriver = new \Doctrine\ORM\Mapping\Driver\YamlDriver(__DIR__ . '/convert'); + $em = $this->_createEntityManager($metadataDriver); + $cmf = new DisconnectedClassMetadataFactory($em); + $metadata = $cmf->getAllMetadata(); + $profileClass = $metadata[0]; + $userClass = $metadata[1]; - $this->assertEquals(2, count($metadatas)); - $this->assertEquals('Profile', $metadatas['Profile']->name); - $this->assertEquals('User', $metadatas['User']->name); - $this->assertEquals(4, count($metadatas['Profile']->fieldMappings)); - $this->assertEquals(5, count($metadatas['User']->fieldMappings)); - $this->assertEquals('text', $metadatas['User']->fieldMappings['clob']['type']); - $this->assertEquals('test_alias', $metadatas['User']->fieldMappings['theAlias']['columnName']); - $this->assertEquals('theAlias', $metadatas['User']->fieldMappings['theAlias']['fieldName']); + $this->assertEquals(2, count($metadata)); + $this->assertEquals('Profile', $profileClass->name); + $this->assertEquals('User', $userClass->name); + $this->assertEquals(4, count($profileClass->fieldMappings)); + $this->assertEquals(5, count($userClass->fieldMappings)); + $this->assertEquals('text', $userClass->fieldMappings['clob']['type']); + $this->assertEquals('test_alias', $userClass->fieldMappings['theAlias']['columnName']); + $this->assertEquals('theAlias', $userClass->fieldMappings['theAlias']['fieldName']); - $this->assertEquals('Profile', $metadatas['Profile']->associationMappings['User']->sourceEntityName); - $this->assertEquals('User', $metadatas['Profile']->associationMappings['User']->targetEntityName); + $this->assertEquals('Profile', $profileClass->associationMappings['User']->sourceEntityName); + $this->assertEquals('User', $profileClass->associationMappings['User']->targetEntityName); - $this->assertEquals('username', $metadatas['User']->table['uniqueConstraints']['username']['columns'][0]); + $this->assertEquals('username', $userClass->table['uniqueConstraints']['username']['columns'][0]); unlink(__DIR__ . '/convert/User.dcm.yml'); unlink(__DIR__ . '/convert/Profile.dcm.yml'); diff --git a/tests/Doctrine/Tests/ORM/Tools/Export/AbstractClassMetadataExporterTest.php b/tests/Doctrine/Tests/ORM/Tools/Export/AbstractClassMetadataExporterTest.php index 41741dc4f..3e6d90df5 100644 --- a/tests/Doctrine/Tests/ORM/Tools/Export/AbstractClassMetadataExporterTest.php +++ b/tests/Doctrine/Tests/ORM/Tools/Export/AbstractClassMetadataExporterTest.php @@ -21,9 +21,17 @@ namespace Doctrine\Tests\ORM\Tools\Export; -use Doctrine\ORM\Tools\Export\ClassMetadataExporter, - Doctrine\ORM\Mapping\ClassMetadataInfo, - Doctrine\ORM\Tools\EntityGenerator; +use Doctrine\ORM\Tools\Export\ClassMetadataExporter; +use Doctrine\ORM\Mapping\ClassMetadataInfo; +use Doctrine\ORM\Tools\EntityGenerator; +use Doctrine\Tests\Mocks\MetadataDriverMock; +use Doctrine\Tests\Mocks\DatabasePlatformMock; +use Doctrine\Tests\Mocks\EntityManagerMock; +use Doctrine\Tests\Mocks\ConnectionMock; +use Doctrine\Tests\Mocks\DriverMock; +use Doctrine\Common\EventManager; +use Doctrine\ORM\Tools\DisconnectedClassMetadataFactory; +use Doctrine\ORM\Mapping\ClassMetadataFactory; require_once __DIR__ . '/../../../TestInit.php'; @@ -43,59 +51,64 @@ abstract class AbstractClassMetadataExporterTest extends \Doctrine\Tests\OrmTest abstract protected function _getType(); - protected function _getTestEntityName() + protected function _createEntityManager($metadataDriver) { - if ($this->_getType() == 'annotation') { - return 'Doctrine\Tests\ORM\Tools\Export\User2'; + $driverMock = new DriverMock(); + $config = new \Doctrine\ORM\Configuration(); + $config->setProxyDir(__DIR__ . '/../../Proxies'); + $config->setProxyNamespace('Doctrine\Tests\Proxies'); + $eventManager = new EventManager(); + $conn = new ConnectionMock(array(), $driverMock, $config, $eventManager); + $mockDriver = new MetadataDriverMock(); + $config->setMetadataDriverImpl($metadataDriver); + + return EntityManagerMock::create($conn, $config, $eventManager); + } + + protected function _createMetadataDriver($type, $path) + { + $class = 'Doctrine\ORM\Mapping\Driver\\' . ucfirst($type) . 'Driver'; + if ($type === 'annotation') { + $driver = $class::create($path); } else { - return 'Doctrine\Tests\ORM\Tools\Export\User'; + $driver = new $class($path); + } + return $driver; + } + + protected function _createClassMetadataFactory($em, $type) + { + if ($type === 'annotation') { + return new ClassMetadataFactory($em); + } else { + return new DisconnectedClassMetadataFactory($em); } } - protected function _loadClassMetadataExporter() + public function testExportDirectoryAndFilesAreCreated() { $type = $this->_getType(); + $metadataDriver = $this->_createMetadataDriver($type, __DIR__ . '/' . $type); + $em = $this->_createEntityManager($metadataDriver); + $cmf = $this->_createClassMetadataFactory($em, $type); + $metadata = $cmf->getAllMetadata(); + $this->assertEquals('Doctrine\Tests\ORM\Tools\Export\User', $metadata[0]->name); + + $type = $this->_getType(); $cme = new ClassMetadataExporter(); - $cme->addMappingSource(__DIR__ . '/' . $type, $type); - - return $cme; - } - - public function testGetMetadatasForMappingSources() - { - $type = $this->_getType(); - $cme = $this->_loadClassMetadataExporter(); - $metadataInstances = $cme->getMetadatas(); - - $this->assertEquals('Doctrine\Tests\ORM\Tools\Export\User', $metadataInstances['Doctrine\Tests\ORM\Tools\Export\User']->name); - - return $cme; - } - - /** - * @depends testGetMetadatasForMappingSources - * @param ClassMetadataExporter $cme - */ - public function testExportDirectoryAndFilesAreCreated($cme) - { - $type = $this->_getType(); $exporter = $cme->getExporter($type, __DIR__ . '/export/' . $type); if ($type === 'annotation') { $entityGenerator = new EntityGenerator(); $exporter->setEntityGenerator($entityGenerator); } $this->_extension = $exporter->getExtension(); - $metadatas = $cme->getMetadatas(); - if ($type == 'annotation') { - $metadatas['Doctrine\Tests\ORM\Tools\Export\User']->name = $this->_getTestEntityName(); - } - $exporter->setMetadatas($metadatas); + $exporter->setMetadata($metadata); $exporter->export(); if ($type == 'annotation') { - $this->assertTrue(file_exists(__DIR__ . '/export/' . $type . '/'.str_replace('\\', '/', $this->_getTestEntityName()).$this->_extension)); + $this->assertTrue(file_exists(__DIR__ . '/export/' . $type . '/'.str_replace('\\', '/', 'Doctrine\Tests\ORM\Tools\Export\User').$this->_extension)); } else { $this->assertTrue(file_exists(__DIR__ . '/export/' . $type . '/Doctrine.Tests.ORM.Tools.Export.User'.$this->_extension)); } @@ -107,163 +120,165 @@ abstract class AbstractClassMetadataExporterTest extends \Doctrine\Tests\OrmTest public function testExportedMetadataCanBeReadBackIn() { $type = $this->_getType(); - $cme = new ClassMetadataExporter(); - $cme->addMappingSource(__DIR__ . '/export/' . $type, $type); + + $metadataDriver = $this->_createMetadataDriver($type, __DIR__ . '/' . $type); + $em = $this->_createEntityManager($metadataDriver); + $cmf = $this->_createClassMetadataFactory($em, $type); + $metadata = $cmf->getAllMetadata(); - $metadataInstances = $cme->getMetadatas(); - $metadata = current($metadataInstances); + $class = current($metadata); - $this->assertEquals($this->_getTestEntityName(), $metadata->name); + $this->assertEquals('Doctrine\Tests\ORM\Tools\Export\User', $class->name); - return $metadata; + return $class; } /** * @depends testExportedMetadataCanBeReadBackIn - * @param ClassMetadataInfo $metadata + * @param ClassMetadataInfo $class */ - public function testTableIsExported($metadata) + public function testTableIsExported($class) { - $this->assertEquals('cms_users', $metadata->table['name']); + $this->assertEquals('cms_users', $class->table['name']); - return $metadata; + return $class; } /** * @depends testTableIsExported - * @param ClassMetadataInfo $metadata + * @param ClassMetadataInfo $class */ - public function testTypeIsExported($metadata) + public function testTypeIsExported($class) { - $this->assertFalse($metadata->isMappedSuperclass); + $this->assertFalse($class->isMappedSuperclass); - return $metadata; + return $class; } /** * @depends testTypeIsExported - * @param ClassMetadataInfo $metadata + * @param ClassMetadataInfo $class */ - public function testIdentifierIsExported($metadata) + public function testIdentifierIsExported($class) { - $this->assertEquals(ClassMetadataInfo::GENERATOR_TYPE_AUTO, $metadata->generatorType); - $this->assertEquals(array('id'), $metadata->identifier); - $this->assertTrue(isset($metadata->fieldMappings['id']['id']) && $metadata->fieldMappings['id']['id'] === true); + $this->assertEquals(ClassMetadataInfo::GENERATOR_TYPE_IDENTITY, $class->generatorType); + $this->assertEquals(array('id'), $class->identifier); + $this->assertTrue(isset($class->fieldMappings['id']['id']) && $class->fieldMappings['id']['id'] === true); - return $metadata; + return $class; } /** * @depends testIdentifierIsExported - * @param ClassMetadataInfo $metadata + * @param ClassMetadataInfo $class */ - public function testFieldsAreExpored($metadata) + public function testFieldsAreExpored($class) { - $this->assertTrue(isset($metadata->fieldMappings['id']['id']) && $metadata->fieldMappings['id']['id'] === true); - $this->assertEquals('id', $metadata->fieldMappings['id']['fieldName']); - $this->assertEquals('integer', $metadata->fieldMappings['id']['type']); - $this->assertEquals('id', $metadata->fieldMappings['id']['columnName']); + $this->assertTrue(isset($class->fieldMappings['id']['id']) && $class->fieldMappings['id']['id'] === true); + $this->assertEquals('id', $class->fieldMappings['id']['fieldName']); + $this->assertEquals('integer', $class->fieldMappings['id']['type']); + $this->assertEquals('id', $class->fieldMappings['id']['columnName']); - $this->assertEquals('name', $metadata->fieldMappings['name']['fieldName']); - $this->assertEquals('string', $metadata->fieldMappings['name']['type']); - $this->assertEquals(50, $metadata->fieldMappings['name']['length']); - $this->assertEquals('name', $metadata->fieldMappings['name']['columnName']); + $this->assertEquals('name', $class->fieldMappings['name']['fieldName']); + $this->assertEquals('string', $class->fieldMappings['name']['type']); + $this->assertEquals(50, $class->fieldMappings['name']['length']); + $this->assertEquals('name', $class->fieldMappings['name']['columnName']); - $this->assertEquals('email', $metadata->fieldMappings['email']['fieldName']); - $this->assertEquals('string', $metadata->fieldMappings['email']['type']); - $this->assertEquals('user_email', $metadata->fieldMappings['email']['columnName']); - $this->assertEquals('CHAR(32) NOT NULL', $metadata->fieldMappings['email']['columnDefinition']); + $this->assertEquals('email', $class->fieldMappings['email']['fieldName']); + $this->assertEquals('string', $class->fieldMappings['email']['type']); + $this->assertEquals('user_email', $class->fieldMappings['email']['columnName']); + $this->assertEquals('CHAR(32) NOT NULL', $class->fieldMappings['email']['columnDefinition']); - return $metadata; + return $class; } /** * @depends testFieldsAreExpored - * @param ClassMetadataInfo $metadata + * @param ClassMetadataInfo $class */ - public function testOneToOneAssociationsAreExported($metadata) + public function testOneToOneAssociationsAreExported($class) { - $this->assertTrue(isset($metadata->associationMappings['address'])); - $this->assertTrue($metadata->associationMappings['address'] instanceof \Doctrine\ORM\Mapping\OneToOneMapping); - $this->assertEquals('Doctrine\Tests\ORM\Tools\Export\Address', $metadata->associationMappings['address']->targetEntityName); - $this->assertEquals('address_id', $metadata->associationMappings['address']->joinColumns[0]['name']); - $this->assertEquals('id', $metadata->associationMappings['address']->joinColumns[0]['referencedColumnName']); - $this->assertEquals('CASCADE', $metadata->associationMappings['address']->joinColumns[0]['onDelete']); - $this->assertEquals('CASCADE', $metadata->associationMappings['address']->joinColumns[0]['onUpdate']); + $this->assertTrue(isset($class->associationMappings['address'])); + $this->assertTrue($class->associationMappings['address'] instanceof \Doctrine\ORM\Mapping\OneToOneMapping); + $this->assertEquals('Doctrine\Tests\ORM\Tools\Export\Address', $class->associationMappings['address']->targetEntityName); + $this->assertEquals('address_id', $class->associationMappings['address']->joinColumns[0]['name']); + $this->assertEquals('id', $class->associationMappings['address']->joinColumns[0]['referencedColumnName']); + $this->assertEquals('CASCADE', $class->associationMappings['address']->joinColumns[0]['onDelete']); + $this->assertEquals('CASCADE', $class->associationMappings['address']->joinColumns[0]['onUpdate']); - $this->assertTrue($metadata->associationMappings['address']->isCascadeRemove); - $this->assertFalse($metadata->associationMappings['address']->isCascadePersist); - $this->assertFalse($metadata->associationMappings['address']->isCascadeRefresh); - $this->assertFalse($metadata->associationMappings['address']->isCascadeMerge); - $this->assertFalse($metadata->associationMappings['address']->isCascadeDetach); + $this->assertTrue($class->associationMappings['address']->isCascadeRemove); + $this->assertFalse($class->associationMappings['address']->isCascadePersist); + $this->assertFalse($class->associationMappings['address']->isCascadeRefresh); + $this->assertFalse($class->associationMappings['address']->isCascadeMerge); + $this->assertFalse($class->associationMappings['address']->isCascadeDetach); - return $metadata; + return $class; } /** * @depends testOneToOneAssociationsAreExported - * @param ClassMetadataInfo $metadata + * @param ClassMetadataInfo $class */ - public function testOneToManyAssociationsAreExported($metadata) + public function testOneToManyAssociationsAreExported($class) { - $this->assertTrue(isset($metadata->associationMappings['phonenumbers'])); - $this->assertTrue($metadata->associationMappings['phonenumbers'] instanceof \Doctrine\ORM\Mapping\OneToManyMapping); - $this->assertEquals('Doctrine\Tests\ORM\Tools\Export\Phonenumber', $metadata->associationMappings['phonenumbers']->targetEntityName); - $this->assertEquals('user', $metadata->associationMappings['phonenumbers']->mappedBy); - $this->assertEquals(array('number' => 'ASC'), $metadata->associationMappings['phonenumbers']->orderBy); + $this->assertTrue(isset($class->associationMappings['phonenumbers'])); + $this->assertTrue($class->associationMappings['phonenumbers'] instanceof \Doctrine\ORM\Mapping\OneToManyMapping); + $this->assertEquals('Doctrine\Tests\ORM\Tools\Export\Phonenumber', $class->associationMappings['phonenumbers']->targetEntityName); + $this->assertEquals('user', $class->associationMappings['phonenumbers']->mappedBy); + $this->assertEquals(array('number' => 'ASC'), $class->associationMappings['phonenumbers']->orderBy); - $this->assertFalse($metadata->associationMappings['phonenumbers']->isCascadeRemove); - $this->assertTrue($metadata->associationMappings['phonenumbers']->isCascadePersist); - $this->assertFalse($metadata->associationMappings['phonenumbers']->isCascadeRefresh); - $this->assertFalse($metadata->associationMappings['phonenumbers']->isCascadeMerge); - $this->assertFalse($metadata->associationMappings['phonenumbers']->isCascadeDetach); + $this->assertFalse($class->associationMappings['phonenumbers']->isCascadeRemove); + $this->assertTrue($class->associationMappings['phonenumbers']->isCascadePersist); + $this->assertFalse($class->associationMappings['phonenumbers']->isCascadeRefresh); + $this->assertFalse($class->associationMappings['phonenumbers']->isCascadeMerge); + $this->assertFalse($class->associationMappings['phonenumbers']->isCascadeDetach); - return $metadata; + return $class; } /** * @depends testOneToManyAssociationsAreExported * @param ClassMetadataInfo $metadata */ - public function testManyToManyAssociationsAreExported($metadata) + public function testManyToManyAssociationsAreExported($class) { - $this->assertTrue(isset($metadata->associationMappings['groups'])); - $this->assertTrue($metadata->associationMappings['groups'] instanceof \Doctrine\ORM\Mapping\ManyToManyMapping); - $this->assertEquals('Doctrine\Tests\ORM\Tools\Export\Group', $metadata->associationMappings['groups']->targetEntityName); - $this->assertEquals('cms_users_groups', $metadata->associationMappings['groups']->joinTable['name']); + $this->assertTrue(isset($class->associationMappings['groups'])); + $this->assertTrue($class->associationMappings['groups'] instanceof \Doctrine\ORM\Mapping\ManyToManyMapping); + $this->assertEquals('Doctrine\Tests\ORM\Tools\Export\Group', $class->associationMappings['groups']->targetEntityName); + $this->assertEquals('cms_users_groups', $class->associationMappings['groups']->joinTable['name']); - $this->assertEquals('user_id', $metadata->associationMappings['groups']->joinTable['joinColumns'][0]['name']); - $this->assertEquals('id', $metadata->associationMappings['groups']->joinTable['joinColumns'][0]['referencedColumnName']); + $this->assertEquals('user_id', $class->associationMappings['groups']->joinTable['joinColumns'][0]['name']); + $this->assertEquals('id', $class->associationMappings['groups']->joinTable['joinColumns'][0]['referencedColumnName']); - $this->assertEquals('group_id', $metadata->associationMappings['groups']->joinTable['inverseJoinColumns'][0]['name']); - $this->assertEquals('id', $metadata->associationMappings['groups']->joinTable['inverseJoinColumns'][0]['referencedColumnName']); - $this->assertEquals('INT NULL', $metadata->associationMappings['groups']->joinTable['inverseJoinColumns'][0]['columnDefinition']); + $this->assertEquals('group_id', $class->associationMappings['groups']->joinTable['inverseJoinColumns'][0]['name']); + $this->assertEquals('id', $class->associationMappings['groups']->joinTable['inverseJoinColumns'][0]['referencedColumnName']); + $this->assertEquals('INT NULL', $class->associationMappings['groups']->joinTable['inverseJoinColumns'][0]['columnDefinition']); - $this->assertTrue($metadata->associationMappings['groups']->isCascadeRemove); - $this->assertTrue($metadata->associationMappings['groups']->isCascadePersist); - $this->assertTrue($metadata->associationMappings['groups']->isCascadeRefresh); - $this->assertTrue($metadata->associationMappings['groups']->isCascadeMerge); - $this->assertTrue($metadata->associationMappings['groups']->isCascadeDetach); + $this->assertTrue($class->associationMappings['groups']->isCascadeRemove); + $this->assertTrue($class->associationMappings['groups']->isCascadePersist); + $this->assertTrue($class->associationMappings['groups']->isCascadeRefresh); + $this->assertTrue($class->associationMappings['groups']->isCascadeMerge); + $this->assertTrue($class->associationMappings['groups']->isCascadeDetach); - return $metadata; + return $class; } /** * @depends testManyToManyAssociationsAreExported - * @param ClassMetadataInfo $metadata + * @param ClassMetadataInfo $class */ - public function testLifecycleCallbacksAreExported($metadata) + public function testLifecycleCallbacksAreExported($class) { - $this->assertTrue(isset($metadata->lifecycleCallbacks['prePersist'])); - $this->assertEquals(2, count($metadata->lifecycleCallbacks['prePersist'])); - $this->assertEquals('doStuffOnPrePersist', $metadata->lifecycleCallbacks['prePersist'][0]); - $this->assertEquals('doOtherStuffOnPrePersistToo', $metadata->lifecycleCallbacks['prePersist'][1]); + $this->assertTrue(isset($class->lifecycleCallbacks['prePersist'])); + $this->assertEquals(2, count($class->lifecycleCallbacks['prePersist'])); + $this->assertEquals('doStuffOnPrePersist', $class->lifecycleCallbacks['prePersist'][0]); + $this->assertEquals('doOtherStuffOnPrePersistToo', $class->lifecycleCallbacks['prePersist'][1]); - $this->assertTrue(isset($metadata->lifecycleCallbacks['postPersist'])); - $this->assertEquals(1, count($metadata->lifecycleCallbacks['postPersist'])); - $this->assertEquals('doStuffOnPostPersist', $metadata->lifecycleCallbacks['postPersist'][0]); + $this->assertTrue(isset($class->lifecycleCallbacks['postPersist'])); + $this->assertEquals(1, count($class->lifecycleCallbacks['postPersist'])); + $this->assertEquals('doStuffOnPostPersist', $class->lifecycleCallbacks['postPersist'][0]); - return $metadata; + return $class; } public function __destruct() From d4232d906e433b1fe4dd8aa85aa7a4aca3a2cf4c Mon Sep 17 00:00:00 2001 From: "Roman S. Borschel" Date: Wed, 14 Apr 2010 17:07:08 +0200 Subject: [PATCH 39/86] [DDC-388] Fixed. --- lib/Doctrine/ORM/AbstractQuery.php | 7 +- .../ORM/Mapping/AssociationMapping.php | 29 ++-- lib/Doctrine/ORM/Mapping/ClassMetadata.php | 44 ++---- .../ORM/Mapping/ClassMetadataFactory.php | 26 ++-- .../ORM/Mapping/ClassMetadataInfo.php | 116 +++------------- .../Persisters/JoinedSubclassPersister.php | 22 ++- .../ORM/Persisters/SingleTablePersister.php | 4 +- .../Persisters/StandardEntityPersister.php | 1 + .../Query/Exec/MultiTableUpdateExecutor.php | 9 +- lib/Doctrine/ORM/Query/SqlWalker.php | 10 +- lib/Doctrine/ORM/Tools/SchemaTool.php | 2 +- phpdoc.ini | 126 ++++++++++++++++++ .../Mapping/BasicInheritanceMappingTest.php | 2 +- .../Tests/ORM/Mapping/ClassMetadataTest.php | 4 +- 14 files changed, 211 insertions(+), 191 deletions(-) create mode 100644 phpdoc.ini diff --git a/lib/Doctrine/ORM/AbstractQuery.php b/lib/Doctrine/ORM/AbstractQuery.php index 5acf82d0b..9ad032bec 100644 --- a/lib/Doctrine/ORM/AbstractQuery.php +++ b/lib/Doctrine/ORM/AbstractQuery.php @@ -410,12 +410,7 @@ abstract class AbstractQuery throw new NonUniqueResultException; } return array_shift($result); - }/* else if (is_object($result)) { - if (count($result) > 1) { - throw new NonUniqueResultException; - } - return $result->first(); - }*/ + } return $result; } diff --git a/lib/Doctrine/ORM/Mapping/AssociationMapping.php b/lib/Doctrine/ORM/Mapping/AssociationMapping.php index 0e5daaff7..18915ba3c 100644 --- a/lib/Doctrine/ORM/Mapping/AssociationMapping.php +++ b/lib/Doctrine/ORM/Mapping/AssociationMapping.php @@ -1,7 +1,5 @@ _validateAndCompleteMapping($mapping); - } + $this->_validateAndCompleteMapping($mapping); } /** @@ -317,8 +329,9 @@ abstract class AssociationMapping abstract public function load($sourceEntity, $target, $em, array $joinColumnValues = array()); /** - * - * @param $platform + * Gets the (possibly quoted) name of the join table. + * + * @param AbstractPlatform $platform * @return string */ public function getQuotedJoinTableName($platform) diff --git a/lib/Doctrine/ORM/Mapping/ClassMetadata.php b/lib/Doctrine/ORM/Mapping/ClassMetadata.php index 6ac796adc..c358cc007 100644 --- a/lib/Doctrine/ORM/Mapping/ClassMetadata.php +++ b/lib/Doctrine/ORM/Mapping/ClassMetadata.php @@ -1,7 +1,5 @@ name = $entityName; - $this->reflClass = new \ReflectionClass($entityName); + parent::__construct($entityName); + $this->reflClass = new ReflectionClass($entityName); $this->namespace = $this->reflClass->getNamespaceName(); $this->table['name'] = $this->reflClass->getShortName(); - $this->rootEntityName = $entityName; } /** @@ -99,18 +96,6 @@ class ClassMetadata extends ClassMetadataInfo return $this->reflFields; } - /** - * INTERNAL: - * Adds a reflection property. Usually only used by the ClassMetadataFactory - * while processing inheritance mappings. - * - * @param array $props - */ - public function addReflectionProperty($propName, \ReflectionProperty $property) - { - $this->reflFields[$propName] = $property; - } - /** * Gets a ReflectionProperty for a specific field of the mapped class. * @@ -189,7 +174,7 @@ class ClassMetadata extends ClassMetadataInfo public function setIdentifierValues($entity, $id) { if ($this->isIdentifierComposite) { - foreach ((array)$id as $idField => $idValue) { + foreach ($id as $idField => $idValue) { $this->reflFields[$idField]->setValue($entity, $idValue); } } else { @@ -220,18 +205,6 @@ class ClassMetadata extends ClassMetadataInfo return $this->reflFields[$field]->getValue($entity); } - /** - * Sets the field mapped to the specified column to the specified value on the given entity. - * - * @param object $entity - * @param string $field - * @param mixed $value - */ - public function setColumnValue($entity, $column, $value) - { - $this->reflFields[$this->fieldNames[$column]]->setValue($entity, $value); - } - /** * Stores the association mapping. * @@ -314,7 +287,6 @@ class ClassMetadata extends ClassMetadataInfo 'identifier', 'idGenerator', //TODO: Does not really need to be serialized. Could be moved to runtime. 'inheritanceType', - 'inheritedAssociationFields', 'isIdentifierComposite', 'isMappedSuperclass', 'isVersioned', @@ -337,10 +309,10 @@ class ClassMetadata extends ClassMetadataInfo { // Restore ReflectionClass and properties $this->reflClass = new ReflectionClass($this->name); - + foreach ($this->fieldMappings as $field => $mapping) { - if (isset($mapping['inherited'])) { - $reflField = new ReflectionProperty($mapping['inherited'], $field); + if (isset($mapping['declared'])) { + $reflField = new ReflectionProperty($mapping['declared'], $field); } else { $reflField = $this->reflClass->getProperty($field); } @@ -349,8 +321,8 @@ class ClassMetadata extends ClassMetadataInfo } foreach ($this->associationMappings as $field => $mapping) { - if (isset($this->inheritedAssociationFields[$field])) { - $reflField = new ReflectionProperty($this->inheritedAssociationFields[$field], $field); + if ($mapping->declared) { + $reflField = new ReflectionProperty($mapping->declared, $field); } else { $reflField = $this->reflClass->getProperty($field); } diff --git a/lib/Doctrine/ORM/Mapping/ClassMetadataFactory.php b/lib/Doctrine/ORM/Mapping/ClassMetadataFactory.php index 13ca40840..69836e88a 100644 --- a/lib/Doctrine/ORM/Mapping/ClassMetadataFactory.php +++ b/lib/Doctrine/ORM/Mapping/ClassMetadataFactory.php @@ -317,31 +317,33 @@ class ClassMetadataFactory if ( ! isset($mapping['inherited']) && ! $parentClass->isMappedSuperclass) { $mapping['inherited'] = $parentClass->name; } - $subClass->addFieldMapping($mapping); + if ( ! isset($mapping['declared'])) { + $mapping['declared'] = $parentClass->name; + } + $subClass->addInheritedFieldMapping($mapping); } foreach ($parentClass->reflFields as $name => $field) { $subClass->reflFields[$name] = $field; } } - + /** - * Adds inherited associations to the subclass mapping. + * Adds inherited association mappings to the subclass mapping. * * @param Doctrine\ORM\Mapping\ClassMetadata $subClass * @param Doctrine\ORM\Mapping\ClassMetadata $parentClass */ private function _addInheritedRelations(ClassMetadata $subClass, ClassMetadata $parentClass) { - foreach ($parentClass->associationMappings as $mapping) { - if (isset($parentClass->inheritedAssociationFields[$mapping->sourceFieldName])) { - // parent class also inherited that one - $subClass->addAssociationMapping($mapping, $parentClass->inheritedAssociationFields[$mapping->sourceFieldName]); - } else if ( ! $parentClass->isMappedSuperclass) { - // parent class defined that one - $subClass->addAssociationMapping($mapping, $parentClass->name); - } else { - $subClass->addAssociationMapping($mapping); + foreach ($parentClass->associationMappings as $field => $mapping) { + $subclassMapping = clone $mapping; + if ( ! isset($mapping->inherited) && ! $parentClass->isMappedSuperclass) { + $subclassMapping->inherited = $parentClass->name; } + if ( ! isset($mapping->declared)) { + $subclassMapping->declared = $parentClass->name; + } + $subClass->addInheritedAssociationMapping($subclassMapping); } } diff --git a/lib/Doctrine/ORM/Mapping/ClassMetadataInfo.php b/lib/Doctrine/ORM/Mapping/ClassMetadataInfo.php index b3ed57d98..ac481c48f 100644 --- a/lib/Doctrine/ORM/Mapping/ClassMetadataInfo.php +++ b/lib/Doctrine/ORM/Mapping/ClassMetadataInfo.php @@ -1,7 +1,5 @@ fieldName (string) * The name of the field in the Entity. * - * - type (object Doctrine\DBAL\Types\* or custom type) - * The type of the column. Can be one of Doctrine's portable types - * or a custom type. + * - type (string) + * The type name of the mapped field. Can be one of Doctrine's mapping types + * or a custom mapping type. * * - columnName (string, optional) * The column name. Optional. Defaults to the field name. @@ -207,15 +205,9 @@ class ClassMetadataInfo * the type. * * - id (boolean, optional) - * Marks the field as the primary key of the Entity. Multiple fields of an + * Marks the field as the primary key of the entity. Multiple fields of an * entity can have the id attribute, forming a composite key. * - * - idGenerator (string, optional) - * Either: idGenerator => 'nameOfGenerator', usually only for TABLE/SEQUENCE generators - * Or: idGenerator => 'identity' or 'auto' or 'table' or 'sequence' - * Note that 'auto', 'table', 'sequence' and 'identity' are reserved names and - * therefore cant be used as a generator name! - * * - nullable (boolean, optional) * Whether the column is nullable. Defaults to FALSE. * @@ -306,7 +298,7 @@ class ClassMetadataInfo public $lifecycleCallbacks = array(); /** - * READ-ONLY: The association mappings. All mappings, inverse and owning side. + * READ-ONLY: The association mappings of this class. * * @var array */ @@ -323,6 +315,7 @@ class ClassMetadataInfo * READ-ONLY: The ID generator used for generating IDs for this class. * * @var AbstractIdGenerator + * @todo Remove */ public $idGenerator; @@ -358,15 +351,6 @@ class ClassMetadataInfo */ public $changeTrackingPolicy = self::CHANGETRACKING_DEFERRED_IMPLICIT; - /** - * READ-ONLY: A map of field names to class names, where the field names are association - * fields that have been inherited from another class and values are the names - * of the classes that define the association. - * - * @var array - */ - public $inheritedAssociationFields = array(); - /** * READ-ONLY: A flag for whether or not instances of this class are to be versioned * with optimistic locking. @@ -592,16 +576,6 @@ class ClassMetadataInfo } } - /** - * Maps an embedded value object. - * - * @todo Implementation. - */ - /*public function mapEmbeddedValue() - { - //... - }*/ - /** * Gets the identifier (primary key) field names of the class. * @@ -708,7 +682,7 @@ class ClassMetadataInfo /** * Checks whether the mapped class uses an Id generator. * - * @return boolean TRUE if the mapped class uses an Id generator, FALSE otherwise. + * @return boolean TRUE if the mapped class uses an Id generator, FALSE otherwise. */ public function usesIdGenerator() { @@ -716,7 +690,6 @@ class ClassMetadataInfo } /** - * * @return boolean */ public function isInheritanceTypeNone() @@ -856,16 +829,6 @@ class ClassMetadataInfo } } - /** - * Checks whether the class has any persistent subclasses. - * - * @return boolean TRUE if the class has one or more persistent subclasses, FALSE otherwise. - */ - public function hasSubclasses() - { - return ! $this->subClasses; - } - /** * Sets the parent class names. * Assumes that the class names in the passed array are in the order: @@ -879,16 +842,6 @@ class ClassMetadataInfo } } - /** - * Checks whether the class has any persistent parent classes. - * - * @return boolean TRUE if the class has one or more persistent parent classes, FALSE otherwise. - */ - public function hasParentClasses() - { - return ! $this->parentClasses; - } - /** * Sets the inheritance type used by the class and it's subclasses. * @@ -903,7 +856,7 @@ class ClassMetadataInfo } /** - * Checks whether a mapped field is inherited from a superclass. + * Checks whether a mapped field is inherited from an entity superclass. * * @return boolean TRUE if the field is inherited, FALSE otherwise. */ @@ -920,7 +873,7 @@ class ClassMetadataInfo */ public function isInheritedAssociation($fieldName) { - return isset($this->inheritedAssociationFields[$fieldName]); + return isset($this->associationMappings[$fieldName]->inherited); } /** @@ -963,21 +916,6 @@ class ClassMetadataInfo $type == self::INHERITANCE_TYPE_TABLE_PER_CLASS; } - /** - * Checks whether the given type identifies an id generator type. - * - * @param string $type - * @return boolean - */ - private function _isIdGeneratorType($type) - { - return $type == self::GENERATOR_TYPE_AUTO || - $type == self::GENERATOR_TYPE_IDENTITY || - $type == self::GENERATOR_TYPE_SEQUENCE || - $type == self::GENERATOR_TYPE_TABLE || - $type == self::GENERATOR_TYPE_NONE; - } - /** * Makes some automatic additions to the association mapping to make the life * easier for the user, and store join columns in the metadata. @@ -995,7 +933,7 @@ class ClassMetadataInfo } /** - * Adds a field mapping. + * Adds a mapped field to the class. * * @param array $mapping The field mapping. */ @@ -1015,18 +953,13 @@ class ClassMetadataInfo * * @param AssociationMapping $mapping * @param string $owningClassName The name of the class that defined this mapping. - * @todo Rename: addInheritedAssociationMapping */ - public function addAssociationMapping(AssociationMapping $mapping, $owningClassName = null) + public function addInheritedAssociationMapping(AssociationMapping $mapping/*, $owningClassName = null*/) { - $sourceFieldName = $mapping->sourceFieldName; - if (isset($this->associationMappings[$sourceFieldName])) { - throw MappingException::duplicateAssociationMapping($this->name, $sourceFieldName); - } - $this->associationMappings[$sourceFieldName] = $mapping; - if ($owningClassName !== null) { - $this->inheritedAssociationFields[$sourceFieldName] = $owningClassName; + if (isset($this->associationMappings[$mapping->sourceFieldName])) { + throw MappingException::duplicateAssociationMapping($this->name, $mapping->sourceFieldName); } + $this->associationMappings[$mapping->sourceFieldName] = $mapping; } /** @@ -1037,7 +970,7 @@ class ClassMetadataInfo * @param array $mapping * @todo Rename: addInheritedFieldMapping */ - public function addFieldMapping(array $fieldMapping) + public function addInheritedFieldMapping(array $fieldMapping) { $this->fieldMappings[$fieldMapping['fieldName']] = $fieldMapping; $this->columnNames[$fieldMapping['fieldName']] = $fieldMapping['columnName']; @@ -1119,8 +1052,8 @@ class ClassMetadataInfo * Dispatches the lifecycle event of the given entity to the registered * lifecycle callbacks and lifecycle listeners. * - * @param string $event The lifecycle event. - * @param Entity $entity The Entity on which the event occured. + * @param string $event The lifecycle event. + * @param Entity $entity The Entity on which the event occured. */ public function invokeLifecycleCallbacks($lifecycleEvent, $entity) { @@ -1225,17 +1158,6 @@ class ClassMetadataInfo } } - /** - * Checks whether the given column name is the discriminator column. - * - * @param string $columnName - * @return boolean - */ - public function isDiscriminatorColumn($columnName) - { - return $columnName === $this->discriminatorColumn['name']; - } - /** * Checks whether the class has a mapped association with the given field name. * @@ -1304,7 +1226,7 @@ class ClassMetadataInfo /** * Sets the version field mapping used for versioning. Sets the default - * value to use depending on the column type + * value to use depending on the column type. * * @param array $mapping The version field mapping array */ diff --git a/lib/Doctrine/ORM/Persisters/JoinedSubclassPersister.php b/lib/Doctrine/ORM/Persisters/JoinedSubclassPersister.php index c6e08abf4..9a68749b7 100644 --- a/lib/Doctrine/ORM/Persisters/JoinedSubclassPersister.php +++ b/lib/Doctrine/ORM/Persisters/JoinedSubclassPersister.php @@ -78,14 +78,10 @@ class JoinedSubclassPersister extends AbstractEntityInheritancePersister public function getOwningTable($fieldName) { if ( ! isset($this->_owningTableMap[$fieldName])) { - if (isset($this->_class->associationMappings[$fieldName])) { - if (isset($this->_class->inheritedAssociationFields[$fieldName])) { - $this->_owningTableMap[$fieldName] = $this->_em->getClassMetadata( - $this->_class->inheritedAssociationFields[$fieldName] - )->table['name']; - } else { - $this->_owningTableMap[$fieldName] = $this->_class->table['name']; - } + if (isset($this->_class->associationMappings[$fieldName]->inherited)) { + $this->_owningTableMap[$fieldName] = $this->_em->getClassMetadata( + $this->_class->associationMappings[$fieldName]->inherited + )->table['name']; } else if (isset($this->_class->fieldMappings[$fieldName]['inherited'])) { $this->_owningTableMap[$fieldName] = $this->_em->getClassMetadata( $this->_class->fieldMappings[$fieldName]['inherited'] @@ -252,9 +248,9 @@ class JoinedSubclassPersister extends AbstractEntityInheritancePersister // Add foreign key columns foreach ($this->_class->associationMappings as $assoc) { if ($assoc->isOwningSide && $assoc->isOneToOne()) { - $tableAlias = isset($this->_class->inheritedAssociationFields[$assoc->sourceFieldName]) ? - $this->_getSQLTableAlias($this->_em->getClassMetadata($this->_class->inheritedAssociationFields[$assoc->sourceFieldName])) - : $baseTableAlias; + $tableAlias = $assoc->inherited ? + $this->_getSQLTableAlias($this->_em->getClassMetadata($assoc->inherited)) + : $baseTableAlias; foreach ($assoc->targetToSourceKeyColumns as $srcColumn) { $columnAlias = $srcColumn . $this->_sqlAliasCounter++; $columnList .= ", $tableAlias.$srcColumn AS $columnAlias"; @@ -308,7 +304,7 @@ class JoinedSubclassPersister extends AbstractEntityInheritancePersister // Add join columns (foreign keys) foreach ($subClass->associationMappings as $assoc2) { - if ($assoc2->isOwningSide && $assoc2->isOneToOne() && ! isset($subClass->inheritedAssociationFields[$assoc2->sourceFieldName])) { + if ($assoc2->isOwningSide && $assoc2->isOneToOne() && ! $assoc2->inherited) { foreach ($assoc2->targetToSourceKeyColumns as $srcColumn) { $columnAlias = $srcColumn . $this->_sqlAliasCounter++; $columnList .= ', ' . $tableAlias . ".$srcColumn AS $columnAlias"; @@ -377,7 +373,7 @@ class JoinedSubclassPersister extends AbstractEntityInheritancePersister foreach ($this->_class->reflFields as $name => $field) { if (isset($this->_class->fieldMappings[$name]['inherited']) && ! isset($this->_class->fieldMappings[$name]['id']) - || isset($this->_class->inheritedAssociationFields[$name]) + || isset($this->_class->associationMappings[$name]->inherited) || ($this->_class->isVersioned && $this->_class->versionField == $name)) { continue; } diff --git a/lib/Doctrine/ORM/Persisters/SingleTablePersister.php b/lib/Doctrine/ORM/Persisters/SingleTablePersister.php index 81bf6a1f4..a0adbea67 100644 --- a/lib/Doctrine/ORM/Persisters/SingleTablePersister.php +++ b/lib/Doctrine/ORM/Persisters/SingleTablePersister.php @@ -1,7 +1,5 @@ associationMappings as $assoc) { - if ($assoc->isOwningSide && $assoc->isOneToOne() && ! isset($subClass->inheritedAssociationFields[$assoc->sourceFieldName])) { + if ($assoc->isOwningSide && $assoc->isOneToOne() && ! $assoc->inherited) { foreach ($assoc->targetToSourceKeyColumns as $srcColumn) { $columnAlias = $srcColumn . $this->_sqlAliasCounter++; $columnList .= ', ' . $tableAlias . ".$srcColumn AS $columnAlias"; diff --git a/lib/Doctrine/ORM/Persisters/StandardEntityPersister.php b/lib/Doctrine/ORM/Persisters/StandardEntityPersister.php index cea3f37bd..f599cc74b 100644 --- a/lib/Doctrine/ORM/Persisters/StandardEntityPersister.php +++ b/lib/Doctrine/ORM/Persisters/StandardEntityPersister.php @@ -695,6 +695,7 @@ class StandardEntityPersister $tableAlias = isset($this->_class->fieldMappings[$fieldName]['inherited']) ? $this->_getSQLTableAlias($this->_em->getClassMetadata($this->_class->fieldMappings[$fieldName]['inherited'])) : $baseTableAlias; + $columnName = $this->_class->getQuotedColumnName($fieldName, $this->_platform); if ($orderBySql != '') { $orderBySql .= ', '; diff --git a/lib/Doctrine/ORM/Query/Exec/MultiTableUpdateExecutor.php b/lib/Doctrine/ORM/Query/Exec/MultiTableUpdateExecutor.php index add39dc83..ee9b1b7f0 100644 --- a/lib/Doctrine/ORM/Query/Exec/MultiTableUpdateExecutor.php +++ b/lib/Doctrine/ORM/Query/Exec/MultiTableUpdateExecutor.php @@ -1,7 +1,5 @@ - * @license http://www.opensource.org/licenses/lgpl-license.php LGPL - * @link http://www.doctrine-project.org - * @since 2.0 - * @version $Revision$ + * @author Roman Borschel + * @since 2.0 */ class MultiTableUpdateExecutor extends AbstractSqlExecutor { diff --git a/lib/Doctrine/ORM/Query/SqlWalker.php b/lib/Doctrine/ORM/Query/SqlWalker.php index 15296395b..4bc6c2f6f 100644 --- a/lib/Doctrine/ORM/Query/SqlWalker.php +++ b/lib/Doctrine/ORM/Query/SqlWalker.php @@ -466,8 +466,8 @@ class SqlWalker implements TreeWalker $dqlAlias = $pathExpr->identificationVariable; $class = $this->_queryComponents[$dqlAlias]['metadata']; - if (isset($class->inheritedAssociationFields[$fieldName])) { - $class = $this->_em->getClassMetadata($class->inheritedAssociationFields[$fieldName]); + if (isset($class->associationMappings[$fieldName]->inherited)) { + $class = $this->_em->getClassMetadata($class->associationMappings[$fieldName]->inherited); } $assoc = $class->associationMappings[$fieldName]; @@ -538,8 +538,8 @@ class SqlWalker implements TreeWalker //FIXME: Include foreign key columns of child classes also!!?? foreach ($class->associationMappings as $assoc) { if ($assoc->isOwningSide && $assoc->isOneToOne()) { - if (isset($class->inheritedAssociationFields[$assoc->sourceFieldName])) { - $owningClass = $this->_em->getClassMetadata($class->inheritedAssociationFields[$assoc->sourceFieldName]); + if ($assoc->inherited) { + $owningClass = $this->_em->getClassMetadata($assoc->inherited); $sqlTableAlias = $this->getSqlTableAlias($owningClass->table['name'], $dqlAlias); } else { $sqlTableAlias = $this->getSqlTableAlias($class->table['name'], $dqlAlias); @@ -958,7 +958,7 @@ class SqlWalker implements TreeWalker // Add join columns (foreign keys) of the subclass //TODO: Probably better do this in walkSelectClause to honor the INCLUDE_META_COLUMNS hint foreach ($subClass->associationMappings as $fieldName => $assoc) { - if ($assoc->isOwningSide && $assoc->isOneToOne() && ! isset($subClass->inheritedAssociationFields[$fieldName])) { + if ($assoc->isOwningSide && $assoc->isOneToOne() && ! $assoc->inherited) { foreach ($assoc->targetToSourceKeyColumns as $srcColumn) { if ($beginning) $beginning = false; else $sql .= ', '; $columnAlias = $this->getSqlColumnAlias($srcColumn); diff --git a/lib/Doctrine/ORM/Tools/SchemaTool.php b/lib/Doctrine/ORM/Tools/SchemaTool.php index 5897e0a72..52942ead7 100644 --- a/lib/Doctrine/ORM/Tools/SchemaTool.php +++ b/lib/Doctrine/ORM/Tools/SchemaTool.php @@ -347,7 +347,7 @@ class SchemaTool private function _gatherRelationsSql($class, $table, $schema) { foreach ($class->associationMappings as $fieldName => $mapping) { - if (isset($class->inheritedAssociationFields[$fieldName])) { + if ($mapping->inherited) { continue; } diff --git a/phpdoc.ini b/phpdoc.ini new file mode 100644 index 000000000..2e2d320ce --- /dev/null +++ b/phpdoc.ini @@ -0,0 +1,126 @@ +; Default configuration file for PHPDoctor + +; This config file will cause PHPDoctor to generate API documentation of +; itself. + + +; PHPDoctor settings +; ----------------------------------------------------------------------------- + +; Names of files to parse. This can be a single filename, or a comma separated +; list of filenames. Wildcards are allowed. + +;files = "*.php" +files = *.php + +; Names of files or directories to ignore. This can be a single filename, or a +; comma separated list of filenames. Wildcards are NOT allowed. + +ignore = "CVS, .svn, .git, _compiled, vendor" + +; The directory to look for files in, if not used the PHPDoctor will look in +; the current directory (the directory it is run from). + +source_path = "./lib" + +; If you do not want PHPDoctor to look in each sub directory for files +; uncomment this line. + +;subdirs = off + +; Set how loud PHPDoctor is as it runs. Quiet mode suppresses all output other +; than warnings and errors. Verbose mode outputs additional messages during +; execution. + +;quiet = on +;verbose = on + +; Select the doclet to use for generating output. + +doclet = standard +;doclet = debug + +; The directory to find the doclet in. Doclets are expected to be in a +; directory named after themselves at the location given. + +;doclet_path = ./doclets + +; The directory to find taglets in. Taglets allow you to make PHPDoctor handle +; new tags and to alter the behavour of existing tags and their output. + +;taglet_path = ./taglets + +; If the code you are parsing does not use package tags or not all elements +; have package tags, use this setting to place unbound elements into a +; particular package. + +default_package = "Doctrine" + +; Specifies the name of a HTML file containing text for the overview +; documentation to be placed on the overview page. The path is relative to +; "source_path" unless an absolute path is given. + +overview = readme.html + +; Package comments will be looked for in a file named package.html in the same +; directory as the first source file parsed in that package or in the directory +; given below. If package comments are placed in the directory given below then +; they should be named ".html". + +package_comment_dir = ./ + +; Parse out global variables and/or global constants? + +;globals = off +;constants = off + +; Generate documentation for all class members + +;private = on + +; Generate documentation for public and protected class members + +protected = on + +; Generate documentation for only public class members + +;public = on + +; Use the PEAR compatible handling of the docblock first sentence + +;pear_compat = on + +; Standard doclet settings +; ----------------------------------------------------------------------------- + +; The directory to place generated documentation in. If the given path is +; relative to it will be relative to "source_path". + +d = "api" + +; Specifies the title to be placed in the HTML tag. + +windowtitle = "Doctrine" + +; Specifies the title to be placed near the top of the overview summary file. + +doctitle = "Doctrine: PHP Object-Relational Mapper" + +; Specifies the header text to be placed at the top of each output file. The +; header will be placed to the right of the upper navigation bar. + +header = "Doctrine" + +; Specifies the footer text to be placed at the bottom of each output file. The +; footer will be placed to the right of the lower navigation bar. + +footer = "Doctrine" + +; Specifies the text to be placed at the bottom of each output file. The text +; will be placed at the bottom of the page, below the lower navigation bar. + +;bottom = "This document was generated by <a href="http://phpdoctor.sourceforge.net/">PHPDoctor: The PHP Documentation Creator</a>" + +; Create a class tree? + +;tree = off diff --git a/tests/Doctrine/Tests/ORM/Mapping/BasicInheritanceMappingTest.php b/tests/Doctrine/Tests/ORM/Mapping/BasicInheritanceMappingTest.php index e7c3bbfb8..fdaf30f41 100644 --- a/tests/Doctrine/Tests/ORM/Mapping/BasicInheritanceMappingTest.php +++ b/tests/Doctrine/Tests/ORM/Mapping/BasicInheritanceMappingTest.php @@ -48,7 +48,6 @@ class BasicInheritanceMappingTest extends \Doctrine\Tests\OrmTestCase $this->assertFalse(isset($class->fieldMappings['mapped2']['inherited'])); $this->assertFalse(isset($class->fieldMappings['transient'])); - $this->assertTrue(empty($class->inheritedAssociationFields)); $this->assertTrue(isset($class->associationMappings['mappedRelated1'])); } @@ -64,6 +63,7 @@ class BasicInheritanceMappingTest extends \Doctrine\Tests\OrmTestCase $this->assertTrue(isset($class2->reflFields['mapped1'])); $this->assertTrue(isset($class2->reflFields['mapped2'])); + $this->assertTrue(isset($class2->reflFields['mappedRelated1'])); } } diff --git a/tests/Doctrine/Tests/ORM/Mapping/ClassMetadataTest.php b/tests/Doctrine/Tests/ORM/Mapping/ClassMetadataTest.php index dcc6b8210..b31f5077c 100644 --- a/tests/Doctrine/Tests/ORM/Mapping/ClassMetadataTest.php +++ b/tests/Doctrine/Tests/ORM/Mapping/ClassMetadataTest.php @@ -162,9 +162,9 @@ class ClassMetadataTest extends \Doctrine\Tests\OrmTestCase $a1 = new \Doctrine\ORM\Mapping\OneToOneMapping(array('fieldName' => 'foo', 'sourceEntity' => 'stdClass', 'targetEntity' => 'stdClass', 'mappedBy' => 'foo')); $a2 = new \Doctrine\ORM\Mapping\OneToOneMapping(array('fieldName' => 'foo', 'sourceEntity' => 'stdClass', 'targetEntity' => 'stdClass', 'mappedBy' => 'foo')); - $cm->addAssociationMapping($a1); + $cm->addInheritedAssociationMapping($a1); $this->setExpectedException('Doctrine\ORM\Mapping\MappingException'); - $cm->addAssociationMapping($a2); + $cm->addInheritedAssociationMapping($a2); } public function testDuplicateColumnName_ThrowsMappingException() From 10acab655d4a104fdecb22389d2499b4adc78a00 Mon Sep 17 00:00:00 2001 From: "Roman S. Borschel" <roman.borschel@googlemail.com> Date: Wed, 14 Apr 2010 17:13:14 +0200 Subject: [PATCH 40/86] Adding new API docs. --- lib/api/allitems-frame.html | 338 ++ lib/api/deprecated-list.html | 64 + .../common/annotations/annotation.html | 131 + .../annotations/annotationexception.html | 126 + .../common/annotations/annotationreader.html | 260 + .../doctrine/common/annotations/lexer.html | 317 ++ .../common/annotations/package-frame.html | 30 + .../common/annotations/package-functions.html | 69 + .../common/annotations/package-globals.html | 69 + .../common/annotations/package-summary.html | 68 + .../common/annotations/package-tree.html | 58 + .../doctrine/common/annotations/parser.html | 296 + .../doctrine/common/cache/abstractcache.html | 239 + lib/api/doctrine/common/cache/apccache.html | 126 + lib/api/doctrine/common/cache/arraycache.html | 124 + lib/api/doctrine/common/cache/cache.html | 174 + .../doctrine/common/cache/memcachecache.html | 148 + .../doctrine/common/cache/package-frame.html | 35 + .../common/cache/package-functions.html | 69 + .../common/cache/package-globals.html | 69 + .../common/cache/package-summary.html | 73 + .../doctrine/common/cache/package-tree.html | 62 + .../doctrine/common/cache/xcachecache.html | 124 + lib/api/doctrine/common/classloader.html | 235 + .../common/collections/arraycollection.html | 567 ++ .../common/collections/collection.html | 485 ++ .../common/collections/package-frame.html | 31 + .../common/collections/package-functions.html | 69 + .../common/collections/package-globals.html | 69 + .../common/collections/package-summary.html | 71 + .../common/collections/package-tree.html | 56 + lib/api/doctrine/common/commonexception.html | 87 + lib/api/doctrine/common/eventargs.html | 122 + lib/api/doctrine/common/eventmanager.html | 198 + lib/api/doctrine/common/eventsubscriber.html | 112 + lib/api/doctrine/common/lexer.html | 313 ++ .../common/notifypropertychanged.html | 112 + lib/api/doctrine/common/package-frame.html | 42 + .../doctrine/common/package-functions.html | 69 + lib/api/doctrine/common/package-globals.html | 69 + lib/api/doctrine/common/package-summary.html | 86 + lib/api/doctrine/common/package-tree.html | 60 + .../common/propertychangedlistener.html | 119 + lib/api/doctrine/common/util/debug.html | 147 + lib/api/doctrine/common/util/inflector.html | 152 + .../doctrine/common/util/package-frame.html | 27 + .../common/util/package-functions.html | 69 + .../doctrine/common/util/package-globals.html | 69 + .../doctrine/common/util/package-summary.html | 66 + .../doctrine/common/util/package-tree.html | 57 + lib/api/doctrine/common/version.html | 135 + lib/api/doctrine/dbal/configuration.html | 160 + lib/api/doctrine/dbal/connection.html | 996 ++++ .../doctrine/dbal/connectionexception.html | 129 + lib/api/doctrine/dbal/dbalexception.html | 242 + lib/api/doctrine/dbal/driver.html | 175 + lib/api/doctrine/dbal/driver/connection.html | 210 + lib/api/doctrine/dbal/driver/oci8/driver.html | 156 + .../dbal/driver/oci8/oci8connection.html | 230 + .../dbal/driver/oci8/oci8exception.html | 98 + .../dbal/driver/oci8/oci8statement.html | 253 + .../dbal/driver/oci8/package-frame.html | 33 + .../dbal/driver/oci8/package-functions.html | 69 + .../dbal/driver/oci8/package-globals.html | 69 + .../dbal/driver/oci8/package-summary.html | 71 + .../dbal/driver/oci8/package-tree.html | 58 + .../doctrine/dbal/driver/package-frame.html | 33 + .../dbal/driver/package-functions.html | 69 + .../doctrine/dbal/driver/package-globals.html | 69 + .../doctrine/dbal/driver/package-summary.html | 75 + .../doctrine/dbal/driver/package-tree.html | 56 + .../doctrine/dbal/driver/pdoconnection.html | 109 + .../dbal/driver/pdomssql/connection.html | 142 + .../doctrine/dbal/driver/pdomssql/driver.html | 154 + .../dbal/driver/pdomssql/package-frame.html | 27 + .../driver/pdomssql/package-functions.html | 69 + .../dbal/driver/pdomssql/package-globals.html | 69 + .../dbal/driver/pdomssql/package-summary.html | 65 + .../dbal/driver/pdomssql/package-tree.html | 56 + .../doctrine/dbal/driver/pdomysql/driver.html | 154 + .../dbal/driver/pdomysql/package-frame.html | 26 + .../driver/pdomysql/package-functions.html | 69 + .../dbal/driver/pdomysql/package-globals.html | 69 + .../dbal/driver/pdomysql/package-summary.html | 64 + .../dbal/driver/pdomysql/package-tree.html | 56 + .../dbal/driver/pdooracle/driver.html | 148 + .../dbal/driver/pdooracle/package-frame.html | 26 + .../driver/pdooracle/package-functions.html | 69 + .../driver/pdooracle/package-globals.html | 69 + .../driver/pdooracle/package-summary.html | 64 + .../dbal/driver/pdooracle/package-tree.html | 56 + .../doctrine/dbal/driver/pdopgsql/driver.html | 154 + .../dbal/driver/pdopgsql/package-frame.html | 26 + .../driver/pdopgsql/package-functions.html | 69 + .../dbal/driver/pdopgsql/package-globals.html | 69 + .../dbal/driver/pdopgsql/package-summary.html | 64 + .../dbal/driver/pdopgsql/package-tree.html | 56 + .../dbal/driver/pdosqlite/driver.html | 171 + .../dbal/driver/pdosqlite/package-frame.html | 26 + .../driver/pdosqlite/package-functions.html | 69 + .../driver/pdosqlite/package-globals.html | 69 + .../driver/pdosqlite/package-summary.html | 64 + .../dbal/driver/pdosqlite/package-tree.html | 56 + .../doctrine/dbal/driver/pdostatement.html | 106 + lib/api/doctrine/dbal/driver/statement.html | 331 ++ lib/api/doctrine/dbal/drivermanager.html | 142 + .../dbal/event/connectioneventargs.html | 168 + .../event/listeners/mysqlsessioninit.html | 142 + .../event/listeners/oraclesessioninit.html | 162 + .../dbal/event/listeners/package-frame.html | 27 + .../event/listeners/package-functions.html | 69 + .../dbal/event/listeners/package-globals.html | 69 + .../dbal/event/listeners/package-summary.html | 66 + .../dbal/event/listeners/package-tree.html | 57 + .../doctrine/dbal/event/package-frame.html | 26 + .../dbal/event/package-functions.html | 69 + .../doctrine/dbal/event/package-globals.html | 69 + .../doctrine/dbal/event/package-summary.html | 64 + lib/api/doctrine/dbal/event/package-tree.html | 59 + lib/api/doctrine/dbal/events.html | 167 + lib/api/doctrine/dbal/logging/debugstack.html | 141 + .../doctrine/dbal/logging/echosqllogger.html | 112 + .../doctrine/dbal/logging/package-frame.html | 32 + .../dbal/logging/package-functions.html | 69 + .../dbal/logging/package-globals.html | 69 + .../dbal/logging/package-summary.html | 70 + .../doctrine/dbal/logging/package-tree.html | 57 + lib/api/doctrine/dbal/logging/sqllogger.html | 117 + lib/api/doctrine/dbal/package-frame.html | 41 + lib/api/doctrine/dbal/package-functions.html | 69 + lib/api/doctrine/dbal/package-globals.html | 69 + lib/api/doctrine/dbal/package-summary.html | 84 + lib/api/doctrine/dbal/package-tree.html | 60 + .../dbal/platforms/abstractplatform.html | 1972 +++++++ .../dbal/platforms/mssqlplatform.html | 548 ++ .../dbal/platforms/mysqlplatform.html | 661 +++ .../dbal/platforms/oracleplatform.html | 743 +++ .../dbal/platforms/package-frame.html | 31 + .../dbal/platforms/package-functions.html | 69 + .../dbal/platforms/package-globals.html | 69 + .../dbal/platforms/package-summary.html | 72 + .../doctrine/dbal/platforms/package-tree.html | 63 + .../dbal/platforms/postgresqlplatform.html | 731 +++ .../dbal/platforms/sqliteplatform.html | 563 ++ .../doctrine/dbal/schema/abstractasset.html | 127 + .../dbal/schema/abstractschemamanager.html | 689 +++ lib/api/doctrine/dbal/schema/column.html | 561 ++ lib/api/doctrine/dbal/schema/columndiff.html | 166 + lib/api/doctrine/dbal/schema/comparator.html | 204 + lib/api/doctrine/dbal/schema/constraint.html | 121 + .../dbal/schema/foreignkeyconstraint.html | 327 ++ lib/api/doctrine/dbal/schema/index.html | 219 + .../dbal/schema/mssqlschemamanager.html | 301 + .../dbal/schema/mysqlschemamanager.html | 104 + .../dbal/schema/oracleschemamanager.html | 152 + .../doctrine/dbal/schema/package-frame.html | 50 + .../dbal/schema/package-functions.html | 69 + .../doctrine/dbal/schema/package-globals.html | 69 + .../doctrine/dbal/schema/package-summary.html | 91 + .../doctrine/dbal/schema/package-tree.html | 78 + .../dbal/schema/postgresqlschemamanager.html | 141 + lib/api/doctrine/dbal/schema/schema.html | 373 ++ .../doctrine/dbal/schema/schemaconfig.html | 174 + lib/api/doctrine/dbal/schema/schemadiff.html | 231 + .../doctrine/dbal/schema/schemaexception.html | 355 ++ lib/api/doctrine/dbal/schema/sequence.html | 189 + .../dbal/schema/sqliteschemamanager.html | 142 + lib/api/doctrine/dbal/schema/table.html | 621 +++ lib/api/doctrine/dbal/schema/tablediff.html | 260 + lib/api/doctrine/dbal/schema/view.html | 136 + .../visitor/createschemasqlcollector.html | 195 + .../visitor/dropschemasqlcollector.html | 209 + .../dbal/schema/visitor/fixschema.html | 171 + .../dbal/schema/visitor/package-frame.html | 33 + .../schema/visitor/package-functions.html | 69 + .../dbal/schema/visitor/package-globals.html | 69 + .../dbal/schema/visitor/package-summary.html | 71 + .../dbal/schema/visitor/package-tree.html | 58 + .../doctrine/dbal/schema/visitor/visitor.html | 169 + lib/api/doctrine/dbal/statement.html | 302 + .../tools/console/command/importcommand.html | 136 + .../tools/console/command/package-frame.html | 27 + .../console/command/package-functions.html | 69 + .../console/command/package-globals.html | 69 + .../console/command/package-summary.html | 67 + .../tools/console/command/package-tree.html | 53 + .../tools/console/command/runsqlcommand.html | 136 + .../console/helper/connectionhelper.html | 168 + .../tools/console/helper/package-frame.html | 26 + .../console/helper/package-functions.html | 69 + .../tools/console/helper/package-globals.html | 69 + .../tools/console/helper/package-summary.html | 64 + .../tools/console/helper/package-tree.html | 53 + lib/api/doctrine/dbal/types/arraytype.html | 177 + lib/api/doctrine/dbal/types/biginttype.html | 154 + lib/api/doctrine/dbal/types/booleantype.html | 196 + lib/api/doctrine/dbal/types/datetimetype.html | 177 + lib/api/doctrine/dbal/types/datetype.html | 177 + lib/api/doctrine/dbal/types/decimaltype.html | 156 + lib/api/doctrine/dbal/types/integertype.html | 175 + lib/api/doctrine/dbal/types/objecttype.html | 177 + .../doctrine/dbal/types/package-frame.html | 38 + .../dbal/types/package-functions.html | 69 + .../doctrine/dbal/types/package-globals.html | 69 + .../doctrine/dbal/types/package-summary.html | 77 + lib/api/doctrine/dbal/types/package-tree.html | 70 + lib/api/doctrine/dbal/types/smallinttype.html | 175 + lib/api/doctrine/dbal/types/stringtype.html | 151 + lib/api/doctrine/dbal/types/texttype.html | 135 + lib/api/doctrine/dbal/types/timetype.html | 173 + lib/api/doctrine/dbal/types/type.html | 457 ++ lib/api/doctrine/orm/abstractquery.html | 732 +++ lib/api/doctrine/orm/configuration.html | 554 ++ lib/api/doctrine/orm/entitymanager.html | 608 +++ .../doctrine/orm/entitynotfoundexception.html | 110 + lib/api/doctrine/orm/entityrepository.html | 251 + .../orm/event/lifecycleeventargs.html | 142 + .../orm/event/loadclassmetadataeventargs.html | 132 + .../doctrine/orm/event/onflusheventargs.html | 129 + lib/api/doctrine/orm/event/package-frame.html | 29 + .../doctrine/orm/event/package-functions.html | 69 + .../doctrine/orm/event/package-globals.html | 69 + .../doctrine/orm/event/package-summary.html | 68 + lib/api/doctrine/orm/event/package-tree.html | 59 + .../orm/event/preupdateeventargs.html | 176 + lib/api/doctrine/orm/events.html | 245 + .../doctrine/orm/id/abstractidgenerator.html | 113 + .../doctrine/orm/id/assignedgenerator.html | 122 + .../doctrine/orm/id/identitygenerator.html | 120 + lib/api/doctrine/orm/id/package-frame.html | 31 + .../doctrine/orm/id/package-functions.html | 69 + lib/api/doctrine/orm/id/package-globals.html | 69 + lib/api/doctrine/orm/id/package-summary.html | 69 + lib/api/doctrine/orm/id/package-tree.html | 65 + .../doctrine/orm/id/sequencegenerator.html | 185 + .../orm/id/sequenceidentitygenerator.html | 141 + lib/api/doctrine/orm/id/tablegenerator.html | 135 + .../orm/internal/commitordercalculator.html | 199 + .../internal/hydration/abstracthydrator.html | 246 + .../orm/internal/hydration/arrayhydrator.html | 104 + .../hydration/hydrationexception.html | 110 + .../internal/hydration/iterableresult.html | 168 + .../internal/hydration/objecthydrator.html | 105 + .../orm/internal/hydration/package-frame.html | 32 + .../internal/hydration/package-functions.html | 69 + .../internal/hydration/package-globals.html | 69 + .../internal/hydration/package-summary.html | 73 + .../orm/internal/hydration/package-tree.html | 63 + .../internal/hydration/scalarhydrator.html | 105 + .../hydration/singlescalarhydrator.html | 103 + .../doctrine/orm/internal/package-frame.html | 26 + .../orm/internal/package-functions.html | 69 + .../orm/internal/package-globals.html | 69 + .../orm/internal/package-summary.html | 65 + .../doctrine/orm/internal/package-tree.html | 56 + .../orm/mapping/associationmapping.html | 471 ++ .../orm/mapping/changetrackingpolicy.html | 101 + .../doctrine/orm/mapping/classmetadata.html | 309 ++ .../orm/mapping/classmetadatafactory.html | 221 + .../orm/mapping/classmetadatainfo.html | 1635 ++++++ lib/api/doctrine/orm/mapping/column.html | 214 + .../orm/mapping/discriminatorcolumn.html | 154 + .../orm/mapping/discriminatormap.html | 101 + .../mapping/driver/abstractfiledriver.html | 262 + .../orm/mapping/driver/annotationdriver.html | 277 + .../orm/mapping/driver/databasedriver.html | 161 + .../doctrine/orm/mapping/driver/driver.html | 142 + .../orm/mapping/driver/driverchain.html | 179 + .../orm/mapping/driver/package-frame.html | 37 + .../orm/mapping/driver/package-functions.html | 69 + .../orm/mapping/driver/package-globals.html | 69 + .../orm/mapping/driver/package-summary.html | 78 + .../orm/mapping/driver/package-tree.html | 64 + .../orm/mapping/driver/phpdriver.html | 157 + .../orm/mapping/driver/xmldriver.html | 142 + .../orm/mapping/driver/yamldriver.html | 142 + .../orm/mapping/elementcollection.html | 118 + lib/api/doctrine/orm/mapping/entity.html | 118 + .../doctrine/orm/mapping/generatedvalue.html | 118 + .../orm/mapping/haslifecyclecallbacks.html | 101 + lib/api/doctrine/orm/mapping/id.html | 101 + lib/api/doctrine/orm/mapping/index.html | 130 + .../doctrine/orm/mapping/inheritancetype.html | 101 + lib/api/doctrine/orm/mapping/joincolumn.html | 202 + lib/api/doctrine/orm/mapping/joincolumns.html | 101 + lib/api/doctrine/orm/mapping/jointable.html | 154 + lib/api/doctrine/orm/mapping/manytomany.html | 166 + .../orm/mapping/manytomanymapping.html | 196 + lib/api/doctrine/orm/mapping/manytoone.html | 154 + .../orm/mapping/mappedsuperclass.html | 101 + .../orm/mapping/mappingexception.html | 419 ++ lib/api/doctrine/orm/mapping/onetomany.html | 166 + .../orm/mapping/onetomanymapping.html | 190 + lib/api/doctrine/orm/mapping/onetoone.html | 178 + .../doctrine/orm/mapping/onetoonemapping.html | 216 + lib/api/doctrine/orm/mapping/orderby.html | 101 + .../doctrine/orm/mapping/package-frame.html | 64 + .../orm/mapping/package-functions.html | 69 + .../doctrine/orm/mapping/package-globals.html | 69 + .../doctrine/orm/mapping/package-summary.html | 114 + .../doctrine/orm/mapping/package-tree.html | 100 + lib/api/doctrine/orm/mapping/postload.html | 101 + lib/api/doctrine/orm/mapping/postpersist.html | 101 + lib/api/doctrine/orm/mapping/postremove.html | 101 + lib/api/doctrine/orm/mapping/postupdate.html | 101 + lib/api/doctrine/orm/mapping/prepersist.html | 101 + lib/api/doctrine/orm/mapping/preremove.html | 101 + lib/api/doctrine/orm/mapping/preupdate.html | 101 + .../orm/mapping/sequencegenerator.html | 142 + lib/api/doctrine/orm/mapping/table.html | 154 + .../orm/mapping/uniqueconstraint.html | 130 + lib/api/doctrine/orm/mapping/version.html | 101 + lib/api/doctrine/orm/nativequery.html | 141 + .../orm/nonuniqueresultexception.html | 94 + lib/api/doctrine/orm/noresultexception.html | 110 + .../doctrine/orm/optimisticlockexception.html | 111 + lib/api/doctrine/orm/ormexception.html | 310 ++ lib/api/doctrine/orm/package-frame.html | 44 + lib/api/doctrine/orm/package-functions.html | 69 + lib/api/doctrine/orm/package-globals.html | 69 + lib/api/doctrine/orm/package-summary.html | 90 + lib/api/doctrine/orm/package-tree.html | 66 + .../doctrine/orm/persistentcollection.html | 714 +++ .../abstractcollectionpersister.html | 198 + .../abstractentityinheritancepersister.html | 103 + .../elementcollectionpersister.html | 99 + .../persisters/joinedsubclasspersister.html | 167 + .../orm/persisters/manytomanypersister.html | 97 + .../orm/persisters/onetomanypersister.html | 101 + .../orm/persisters/package-frame.html | 34 + .../orm/persisters/package-functions.html | 69 + .../orm/persisters/package-globals.html | 69 + .../orm/persisters/package-summary.html | 78 + .../doctrine/orm/persisters/package-tree.html | 70 + .../orm/persisters/singletablepersister.html | 97 + .../persisters/standardentitypersister.html | 443 ++ .../persisters/unionsubclasspersister.html | 103 + lib/api/doctrine/orm/proxy/package-frame.html | 32 + .../doctrine/orm/proxy/package-functions.html | 69 + .../doctrine/orm/proxy/package-globals.html | 69 + .../doctrine/orm/proxy/package-summary.html | 70 + lib/api/doctrine/orm/proxy/package-tree.html | 56 + lib/api/doctrine/orm/proxy/proxy.html | 86 + .../doctrine/orm/proxy/proxyexception.html | 124 + lib/api/doctrine/orm/proxy/proxyfactory.html | 148 + lib/api/doctrine/orm/query.html | 582 ++ .../orm/query/ast/aggregateexpression.html | 176 + .../orm/query/ast/arithmeticexpression.html | 172 + .../orm/query/ast/arithmeticfactor.html | 188 + .../orm/query/ast/arithmeticterm.html | 152 + .../doctrine/orm/query/ast/astexception.html | 105 + .../orm/query/ast/betweenexpression.html | 188 + .../query/ast/collectionmemberexpression.html | 176 + .../orm/query/ast/comparisonexpression.html | 181 + .../orm/query/ast/conditionalexpression.html | 152 + .../orm/query/ast/conditionalfactor.html | 164 + .../orm/query/ast/conditionalprimary.html | 172 + .../orm/query/ast/conditionalterm.html | 152 + .../doctrine/orm/query/ast/deleteclause.html | 164 + .../orm/query/ast/deletestatement.html | 164 + .../emptycollectioncomparisonexpression.html | 164 + .../orm/query/ast/existsexpression.html | 164 + .../doctrine/orm/query/ast/fromclause.html | 152 + .../orm/query/ast/functions/absfunction.html | 162 + .../query/ast/functions/concatfunction.html | 174 + .../ast/functions/currentdatefunction.html | 145 + .../ast/functions/currenttimefunction.html | 145 + .../functions/currenttimestampfunction.html | 143 + .../orm/query/ast/functions/functionnode.html | 176 + .../query/ast/functions/lengthfunction.html | 162 + .../query/ast/functions/locatefunction.html | 186 + .../query/ast/functions/lowerfunction.html | 162 + .../orm/query/ast/functions/modfunction.html | 174 + .../query/ast/functions/package-frame.html | 40 + .../ast/functions/package-functions.html | 69 + .../query/ast/functions/package-globals.html | 69 + .../query/ast/functions/package-summary.html | 78 + .../orm/query/ast/functions/package-tree.html | 75 + .../orm/query/ast/functions/sizefunction.html | 165 + .../orm/query/ast/functions/sqrtfunction.html | 162 + .../ast/functions/substringfunction.html | 186 + .../orm/query/ast/functions/trimfunction.html | 210 + .../query/ast/functions/upperfunction.html | 162 + .../doctrine/orm/query/ast/groupbyclause.html | 152 + .../doctrine/orm/query/ast/havingclause.html | 152 + .../identificationvariabledeclaration.html | 176 + lib/api/doctrine/orm/query/ast/indexby.html | 152 + .../doctrine/orm/query/ast/inexpression.html | 188 + .../orm/query/ast/inputparameter.html | 164 + lib/api/doctrine/orm/query/ast/join.html | 225 + .../ast/joinassociationpathexpression.html | 164 + .../query/ast/joinvariabledeclaration.html | 164 + .../orm/query/ast/likeexpression.html | 188 + lib/api/doctrine/orm/query/ast/literal.html | 200 + lib/api/doctrine/orm/query/ast/node.html | 124 + .../query/ast/nullcomparisonexpression.html | 164 + .../doctrine/orm/query/ast/orderbyclause.html | 152 + .../doctrine/orm/query/ast/orderbyitem.html | 188 + .../doctrine/orm/query/ast/package-frame.html | 73 + .../orm/query/ast/package-functions.html | 69 + .../orm/query/ast/package-globals.html | 69 + .../orm/query/ast/package-summary.html | 128 + .../doctrine/orm/query/ast/package-tree.html | 104 + .../query/ast/partialobjectexpression.html | 146 + .../orm/query/ast/pathexpression.html | 231 + .../orm/query/ast/quantifiedexpression.html | 202 + .../query/ast/rangevariabledeclaration.html | 164 + .../doctrine/orm/query/ast/selectclause.html | 164 + .../orm/query/ast/selectexpression.html | 165 + .../orm/query/ast/selectstatement.html | 212 + .../query/ast/simplearithmeticexpression.html | 152 + .../orm/query/ast/simpleselectclause.html | 164 + .../orm/query/ast/simpleselectexpression.html | 165 + lib/api/doctrine/orm/query/ast/subselect.html | 212 + .../orm/query/ast/subselectfromclause.html | 152 + .../doctrine/orm/query/ast/updateclause.html | 176 + .../doctrine/orm/query/ast/updateitem.html | 178 + .../orm/query/ast/updatestatement.html | 164 + .../doctrine/orm/query/ast/whereclause.html | 152 + .../orm/query/exec/abstractsqlexecutor.html | 147 + .../query/exec/multitabledeleteexecutor.html | 152 + .../query/exec/multitableupdateexecutor.html | 150 + .../orm/query/exec/package-frame.html | 30 + .../orm/query/exec/package-functions.html | 69 + .../orm/query/exec/package-globals.html | 69 + .../orm/query/exec/package-summary.html | 71 + .../doctrine/orm/query/exec/package-tree.html | 62 + .../orm/query/exec/singleselectexecutor.html | 143 + .../exec/singletabledeleteupdateexecutor.html | 144 + lib/api/doctrine/orm/query/expr.html | 767 +++ lib/api/doctrine/orm/query/expr/andx.html | 134 + lib/api/doctrine/orm/query/expr/base.html | 204 + .../doctrine/orm/query/expr/comparison.html | 187 + lib/api/doctrine/orm/query/expr/from.html | 139 + lib/api/doctrine/orm/query/expr/func.html | 110 + lib/api/doctrine/orm/query/expr/groupby.html | 134 + lib/api/doctrine/orm/query/expr/join.html | 163 + lib/api/doctrine/orm/query/expr/literal.html | 134 + lib/api/doctrine/orm/query/expr/math.html | 110 + lib/api/doctrine/orm/query/expr/orderby.html | 192 + lib/api/doctrine/orm/query/expr/orx.html | 134 + .../orm/query/expr/package-frame.html | 37 + .../orm/query/expr/package-functions.html | 69 + .../orm/query/expr/package-globals.html | 69 + .../orm/query/expr/package-summary.html | 75 + .../doctrine/orm/query/expr/package-tree.html | 69 + lib/api/doctrine/orm/query/expr/select.html | 134 + lib/api/doctrine/orm/query/lexer.html | 1009 ++++ lib/api/doctrine/orm/query/package-frame.html | 40 + .../doctrine/orm/query/package-functions.html | 69 + .../doctrine/orm/query/package-globals.html | 69 + .../doctrine/orm/query/package-summary.html | 83 + lib/api/doctrine/orm/query/package-tree.html | 63 + lib/api/doctrine/orm/query/parser.html | 1315 +++++ lib/api/doctrine/orm/query/parserresult.html | 218 + lib/api/doctrine/orm/query/printer.html | 194 + .../doctrine/orm/query/queryexception.html | 271 + .../doctrine/orm/query/resultsetmapping.html | 607 ++ lib/api/doctrine/orm/query/sqlwalker.html | 919 ++++ lib/api/doctrine/orm/query/treewalker.html | 797 +++ .../doctrine/orm/query/treewalkeradapter.html | 797 +++ .../doctrine/orm/query/treewalkerchain.html | 817 +++ lib/api/doctrine/orm/querybuilder.html | 988 ++++ .../orm/tools/classmetadatareader.html | 175 + .../command/clearcache/metadatacommand.html | 135 + .../command/clearcache/package-frame.html | 28 + .../command/clearcache/package-functions.html | 69 + .../command/clearcache/package-globals.html | 69 + .../command/clearcache/package-summary.html | 66 + .../command/clearcache/package-tree.html | 53 + .../command/clearcache/querycommand.html | 135 + .../command/clearcache/resultcommand.html | 135 + .../convertdoctrine1schemacommand.html | 135 + .../command/convertmappingcommand.html | 135 + .../ensureproductionsettingscommand.html | 135 + .../command/generateentitiescommand.html | 135 + .../command/generateproxiescommand.html | 135 + .../command/generaterepositoriescommand.html | 135 + .../tools/console/command/package-frame.html | 32 + .../console/command/package-functions.html | 69 + .../console/command/package-globals.html | 69 + .../console/command/package-summary.html | 70 + .../tools/console/command/package-tree.html | 53 + .../tools/console/command/rundqlcommand.html | 135 + .../command/schematool/abstractcommand.html | 114 + .../command/schematool/createcommand.html | 136 + .../command/schematool/dropcommand.html | 136 + .../command/schematool/package-frame.html | 29 + .../command/schematool/package-functions.html | 69 + .../command/schematool/package-globals.html | 69 + .../command/schematool/package-summary.html | 67 + .../command/schematool/package-tree.html | 53 + .../command/schematool/updatecommand.html | 136 + .../console/helper/entitymanagerhelper.html | 168 + .../tools/console/helper/package-frame.html | 26 + .../console/helper/package-functions.html | 69 + .../tools/console/helper/package-globals.html | 69 + .../tools/console/helper/package-summary.html | 64 + .../tools/console/helper/package-tree.html | 53 + .../orm/tools/console/metadatafilter.html | 155 + .../orm/tools/console/package-frame.html | 26 + .../orm/tools/console/package-functions.html | 69 + .../orm/tools/console/package-globals.html | 69 + .../orm/tools/console/package-summary.html | 64 + .../orm/tools/console/package-tree.html | 53 + .../orm/tools/convertdoctrine1schema.html | 139 + .../doctrine/orm/tools/entitygenerator.html | 246 + .../tools/event/generateschemaeventargs.html | 140 + .../event/generateschematableeventargs.html | 152 + .../orm/tools/event/package-frame.html | 27 + .../orm/tools/event/package-functions.html | 69 + .../orm/tools/event/package-globals.html | 69 + .../orm/tools/event/package-summary.html | 65 + .../orm/tools/event/package-tree.html | 53 + .../tools/export/classmetadataexporter.html | 209 + .../tools/export/driver/abstractexporter.html | 248 + .../export/driver/annotationexporter.html | 155 + .../tools/export/driver/package-frame.html | 30 + .../export/driver/package-functions.html | 69 + .../tools/export/driver/package-globals.html | 69 + .../tools/export/driver/package-summary.html | 69 + .../orm/tools/export/driver/package-tree.html | 62 + .../orm/tools/export/driver/phpexporter.html | 143 + .../orm/tools/export/driver/xmlexporter.html | 143 + .../orm/tools/export/driver/yamlexporter.html | 143 + .../orm/tools/export/exportexception.html | 117 + .../orm/tools/export/package-frame.html | 27 + .../orm/tools/export/package-functions.html | 69 + .../orm/tools/export/package-globals.html | 69 + .../orm/tools/export/package-summary.html | 67 + .../orm/tools/export/package-tree.html | 56 + lib/api/doctrine/orm/tools/package-frame.html | 31 + .../doctrine/orm/tools/package-functions.html | 69 + .../doctrine/orm/tools/package-globals.html | 69 + .../doctrine/orm/tools/package-summary.html | 78 + lib/api/doctrine/orm/tools/package-tree.html | 60 + lib/api/doctrine/orm/tools/schematool.html | 221 + lib/api/doctrine/orm/tools/toolevents.html | 115 + .../doctrine/orm/tools/toolsexception.html | 105 + lib/api/doctrine/orm/unitofwork.html | 1012 ++++ lib/api/index-all.html | 4857 +++++++++++++++++ lib/api/index.html | 35 + lib/api/overview-frame.html | 75 + lib/api/overview-summary.html | 106 + lib/api/overview-tree.html | 340 ++ lib/api/stylesheet.css | 216 + 546 files changed, 90120 insertions(+) create mode 100644 lib/api/allitems-frame.html create mode 100644 lib/api/deprecated-list.html create mode 100644 lib/api/doctrine/common/annotations/annotation.html create mode 100644 lib/api/doctrine/common/annotations/annotationexception.html create mode 100644 lib/api/doctrine/common/annotations/annotationreader.html create mode 100644 lib/api/doctrine/common/annotations/lexer.html create mode 100644 lib/api/doctrine/common/annotations/package-frame.html create mode 100644 lib/api/doctrine/common/annotations/package-functions.html create mode 100644 lib/api/doctrine/common/annotations/package-globals.html create mode 100644 lib/api/doctrine/common/annotations/package-summary.html create mode 100644 lib/api/doctrine/common/annotations/package-tree.html create mode 100644 lib/api/doctrine/common/annotations/parser.html create mode 100644 lib/api/doctrine/common/cache/abstractcache.html create mode 100644 lib/api/doctrine/common/cache/apccache.html create mode 100644 lib/api/doctrine/common/cache/arraycache.html create mode 100644 lib/api/doctrine/common/cache/cache.html create mode 100644 lib/api/doctrine/common/cache/memcachecache.html create mode 100644 lib/api/doctrine/common/cache/package-frame.html create mode 100644 lib/api/doctrine/common/cache/package-functions.html create mode 100644 lib/api/doctrine/common/cache/package-globals.html create mode 100644 lib/api/doctrine/common/cache/package-summary.html create mode 100644 lib/api/doctrine/common/cache/package-tree.html create mode 100644 lib/api/doctrine/common/cache/xcachecache.html create mode 100644 lib/api/doctrine/common/classloader.html create mode 100644 lib/api/doctrine/common/collections/arraycollection.html create mode 100644 lib/api/doctrine/common/collections/collection.html create mode 100644 lib/api/doctrine/common/collections/package-frame.html create mode 100644 lib/api/doctrine/common/collections/package-functions.html create mode 100644 lib/api/doctrine/common/collections/package-globals.html create mode 100644 lib/api/doctrine/common/collections/package-summary.html create mode 100644 lib/api/doctrine/common/collections/package-tree.html create mode 100644 lib/api/doctrine/common/commonexception.html create mode 100644 lib/api/doctrine/common/eventargs.html create mode 100644 lib/api/doctrine/common/eventmanager.html create mode 100644 lib/api/doctrine/common/eventsubscriber.html create mode 100644 lib/api/doctrine/common/lexer.html create mode 100644 lib/api/doctrine/common/notifypropertychanged.html create mode 100644 lib/api/doctrine/common/package-frame.html create mode 100644 lib/api/doctrine/common/package-functions.html create mode 100644 lib/api/doctrine/common/package-globals.html create mode 100644 lib/api/doctrine/common/package-summary.html create mode 100644 lib/api/doctrine/common/package-tree.html create mode 100644 lib/api/doctrine/common/propertychangedlistener.html create mode 100644 lib/api/doctrine/common/util/debug.html create mode 100644 lib/api/doctrine/common/util/inflector.html create mode 100644 lib/api/doctrine/common/util/package-frame.html create mode 100644 lib/api/doctrine/common/util/package-functions.html create mode 100644 lib/api/doctrine/common/util/package-globals.html create mode 100644 lib/api/doctrine/common/util/package-summary.html create mode 100644 lib/api/doctrine/common/util/package-tree.html create mode 100644 lib/api/doctrine/common/version.html create mode 100644 lib/api/doctrine/dbal/configuration.html create mode 100644 lib/api/doctrine/dbal/connection.html create mode 100644 lib/api/doctrine/dbal/connectionexception.html create mode 100644 lib/api/doctrine/dbal/dbalexception.html create mode 100644 lib/api/doctrine/dbal/driver.html create mode 100644 lib/api/doctrine/dbal/driver/connection.html create mode 100644 lib/api/doctrine/dbal/driver/oci8/driver.html create mode 100644 lib/api/doctrine/dbal/driver/oci8/oci8connection.html create mode 100644 lib/api/doctrine/dbal/driver/oci8/oci8exception.html create mode 100644 lib/api/doctrine/dbal/driver/oci8/oci8statement.html create mode 100644 lib/api/doctrine/dbal/driver/oci8/package-frame.html create mode 100644 lib/api/doctrine/dbal/driver/oci8/package-functions.html create mode 100644 lib/api/doctrine/dbal/driver/oci8/package-globals.html create mode 100644 lib/api/doctrine/dbal/driver/oci8/package-summary.html create mode 100644 lib/api/doctrine/dbal/driver/oci8/package-tree.html create mode 100644 lib/api/doctrine/dbal/driver/package-frame.html create mode 100644 lib/api/doctrine/dbal/driver/package-functions.html create mode 100644 lib/api/doctrine/dbal/driver/package-globals.html create mode 100644 lib/api/doctrine/dbal/driver/package-summary.html create mode 100644 lib/api/doctrine/dbal/driver/package-tree.html create mode 100644 lib/api/doctrine/dbal/driver/pdoconnection.html create mode 100644 lib/api/doctrine/dbal/driver/pdomssql/connection.html create mode 100644 lib/api/doctrine/dbal/driver/pdomssql/driver.html create mode 100644 lib/api/doctrine/dbal/driver/pdomssql/package-frame.html create mode 100644 lib/api/doctrine/dbal/driver/pdomssql/package-functions.html create mode 100644 lib/api/doctrine/dbal/driver/pdomssql/package-globals.html create mode 100644 lib/api/doctrine/dbal/driver/pdomssql/package-summary.html create mode 100644 lib/api/doctrine/dbal/driver/pdomssql/package-tree.html create mode 100644 lib/api/doctrine/dbal/driver/pdomysql/driver.html create mode 100644 lib/api/doctrine/dbal/driver/pdomysql/package-frame.html create mode 100644 lib/api/doctrine/dbal/driver/pdomysql/package-functions.html create mode 100644 lib/api/doctrine/dbal/driver/pdomysql/package-globals.html create mode 100644 lib/api/doctrine/dbal/driver/pdomysql/package-summary.html create mode 100644 lib/api/doctrine/dbal/driver/pdomysql/package-tree.html create mode 100644 lib/api/doctrine/dbal/driver/pdooracle/driver.html create mode 100644 lib/api/doctrine/dbal/driver/pdooracle/package-frame.html create mode 100644 lib/api/doctrine/dbal/driver/pdooracle/package-functions.html create mode 100644 lib/api/doctrine/dbal/driver/pdooracle/package-globals.html create mode 100644 lib/api/doctrine/dbal/driver/pdooracle/package-summary.html create mode 100644 lib/api/doctrine/dbal/driver/pdooracle/package-tree.html create mode 100644 lib/api/doctrine/dbal/driver/pdopgsql/driver.html create mode 100644 lib/api/doctrine/dbal/driver/pdopgsql/package-frame.html create mode 100644 lib/api/doctrine/dbal/driver/pdopgsql/package-functions.html create mode 100644 lib/api/doctrine/dbal/driver/pdopgsql/package-globals.html create mode 100644 lib/api/doctrine/dbal/driver/pdopgsql/package-summary.html create mode 100644 lib/api/doctrine/dbal/driver/pdopgsql/package-tree.html create mode 100644 lib/api/doctrine/dbal/driver/pdosqlite/driver.html create mode 100644 lib/api/doctrine/dbal/driver/pdosqlite/package-frame.html create mode 100644 lib/api/doctrine/dbal/driver/pdosqlite/package-functions.html create mode 100644 lib/api/doctrine/dbal/driver/pdosqlite/package-globals.html create mode 100644 lib/api/doctrine/dbal/driver/pdosqlite/package-summary.html create mode 100644 lib/api/doctrine/dbal/driver/pdosqlite/package-tree.html create mode 100644 lib/api/doctrine/dbal/driver/pdostatement.html create mode 100644 lib/api/doctrine/dbal/driver/statement.html create mode 100644 lib/api/doctrine/dbal/drivermanager.html create mode 100644 lib/api/doctrine/dbal/event/connectioneventargs.html create mode 100644 lib/api/doctrine/dbal/event/listeners/mysqlsessioninit.html create mode 100644 lib/api/doctrine/dbal/event/listeners/oraclesessioninit.html create mode 100644 lib/api/doctrine/dbal/event/listeners/package-frame.html create mode 100644 lib/api/doctrine/dbal/event/listeners/package-functions.html create mode 100644 lib/api/doctrine/dbal/event/listeners/package-globals.html create mode 100644 lib/api/doctrine/dbal/event/listeners/package-summary.html create mode 100644 lib/api/doctrine/dbal/event/listeners/package-tree.html create mode 100644 lib/api/doctrine/dbal/event/package-frame.html create mode 100644 lib/api/doctrine/dbal/event/package-functions.html create mode 100644 lib/api/doctrine/dbal/event/package-globals.html create mode 100644 lib/api/doctrine/dbal/event/package-summary.html create mode 100644 lib/api/doctrine/dbal/event/package-tree.html create mode 100644 lib/api/doctrine/dbal/events.html create mode 100644 lib/api/doctrine/dbal/logging/debugstack.html create mode 100644 lib/api/doctrine/dbal/logging/echosqllogger.html create mode 100644 lib/api/doctrine/dbal/logging/package-frame.html create mode 100644 lib/api/doctrine/dbal/logging/package-functions.html create mode 100644 lib/api/doctrine/dbal/logging/package-globals.html create mode 100644 lib/api/doctrine/dbal/logging/package-summary.html create mode 100644 lib/api/doctrine/dbal/logging/package-tree.html create mode 100644 lib/api/doctrine/dbal/logging/sqllogger.html create mode 100644 lib/api/doctrine/dbal/package-frame.html create mode 100644 lib/api/doctrine/dbal/package-functions.html create mode 100644 lib/api/doctrine/dbal/package-globals.html create mode 100644 lib/api/doctrine/dbal/package-summary.html create mode 100644 lib/api/doctrine/dbal/package-tree.html create mode 100644 lib/api/doctrine/dbal/platforms/abstractplatform.html create mode 100644 lib/api/doctrine/dbal/platforms/mssqlplatform.html create mode 100644 lib/api/doctrine/dbal/platforms/mysqlplatform.html create mode 100644 lib/api/doctrine/dbal/platforms/oracleplatform.html create mode 100644 lib/api/doctrine/dbal/platforms/package-frame.html create mode 100644 lib/api/doctrine/dbal/platforms/package-functions.html create mode 100644 lib/api/doctrine/dbal/platforms/package-globals.html create mode 100644 lib/api/doctrine/dbal/platforms/package-summary.html create mode 100644 lib/api/doctrine/dbal/platforms/package-tree.html create mode 100644 lib/api/doctrine/dbal/platforms/postgresqlplatform.html create mode 100644 lib/api/doctrine/dbal/platforms/sqliteplatform.html create mode 100644 lib/api/doctrine/dbal/schema/abstractasset.html create mode 100644 lib/api/doctrine/dbal/schema/abstractschemamanager.html create mode 100644 lib/api/doctrine/dbal/schema/column.html create mode 100644 lib/api/doctrine/dbal/schema/columndiff.html create mode 100644 lib/api/doctrine/dbal/schema/comparator.html create mode 100644 lib/api/doctrine/dbal/schema/constraint.html create mode 100644 lib/api/doctrine/dbal/schema/foreignkeyconstraint.html create mode 100644 lib/api/doctrine/dbal/schema/index.html create mode 100644 lib/api/doctrine/dbal/schema/mssqlschemamanager.html create mode 100644 lib/api/doctrine/dbal/schema/mysqlschemamanager.html create mode 100644 lib/api/doctrine/dbal/schema/oracleschemamanager.html create mode 100644 lib/api/doctrine/dbal/schema/package-frame.html create mode 100644 lib/api/doctrine/dbal/schema/package-functions.html create mode 100644 lib/api/doctrine/dbal/schema/package-globals.html create mode 100644 lib/api/doctrine/dbal/schema/package-summary.html create mode 100644 lib/api/doctrine/dbal/schema/package-tree.html create mode 100644 lib/api/doctrine/dbal/schema/postgresqlschemamanager.html create mode 100644 lib/api/doctrine/dbal/schema/schema.html create mode 100644 lib/api/doctrine/dbal/schema/schemaconfig.html create mode 100644 lib/api/doctrine/dbal/schema/schemadiff.html create mode 100644 lib/api/doctrine/dbal/schema/schemaexception.html create mode 100644 lib/api/doctrine/dbal/schema/sequence.html create mode 100644 lib/api/doctrine/dbal/schema/sqliteschemamanager.html create mode 100644 lib/api/doctrine/dbal/schema/table.html create mode 100644 lib/api/doctrine/dbal/schema/tablediff.html create mode 100644 lib/api/doctrine/dbal/schema/view.html create mode 100644 lib/api/doctrine/dbal/schema/visitor/createschemasqlcollector.html create mode 100644 lib/api/doctrine/dbal/schema/visitor/dropschemasqlcollector.html create mode 100644 lib/api/doctrine/dbal/schema/visitor/fixschema.html create mode 100644 lib/api/doctrine/dbal/schema/visitor/package-frame.html create mode 100644 lib/api/doctrine/dbal/schema/visitor/package-functions.html create mode 100644 lib/api/doctrine/dbal/schema/visitor/package-globals.html create mode 100644 lib/api/doctrine/dbal/schema/visitor/package-summary.html create mode 100644 lib/api/doctrine/dbal/schema/visitor/package-tree.html create mode 100644 lib/api/doctrine/dbal/schema/visitor/visitor.html create mode 100644 lib/api/doctrine/dbal/statement.html create mode 100644 lib/api/doctrine/dbal/tools/console/command/importcommand.html create mode 100644 lib/api/doctrine/dbal/tools/console/command/package-frame.html create mode 100644 lib/api/doctrine/dbal/tools/console/command/package-functions.html create mode 100644 lib/api/doctrine/dbal/tools/console/command/package-globals.html create mode 100644 lib/api/doctrine/dbal/tools/console/command/package-summary.html create mode 100644 lib/api/doctrine/dbal/tools/console/command/package-tree.html create mode 100644 lib/api/doctrine/dbal/tools/console/command/runsqlcommand.html create mode 100644 lib/api/doctrine/dbal/tools/console/helper/connectionhelper.html create mode 100644 lib/api/doctrine/dbal/tools/console/helper/package-frame.html create mode 100644 lib/api/doctrine/dbal/tools/console/helper/package-functions.html create mode 100644 lib/api/doctrine/dbal/tools/console/helper/package-globals.html create mode 100644 lib/api/doctrine/dbal/tools/console/helper/package-summary.html create mode 100644 lib/api/doctrine/dbal/tools/console/helper/package-tree.html create mode 100644 lib/api/doctrine/dbal/types/arraytype.html create mode 100644 lib/api/doctrine/dbal/types/biginttype.html create mode 100644 lib/api/doctrine/dbal/types/booleantype.html create mode 100644 lib/api/doctrine/dbal/types/datetimetype.html create mode 100644 lib/api/doctrine/dbal/types/datetype.html create mode 100644 lib/api/doctrine/dbal/types/decimaltype.html create mode 100644 lib/api/doctrine/dbal/types/integertype.html create mode 100644 lib/api/doctrine/dbal/types/objecttype.html create mode 100644 lib/api/doctrine/dbal/types/package-frame.html create mode 100644 lib/api/doctrine/dbal/types/package-functions.html create mode 100644 lib/api/doctrine/dbal/types/package-globals.html create mode 100644 lib/api/doctrine/dbal/types/package-summary.html create mode 100644 lib/api/doctrine/dbal/types/package-tree.html create mode 100644 lib/api/doctrine/dbal/types/smallinttype.html create mode 100644 lib/api/doctrine/dbal/types/stringtype.html create mode 100644 lib/api/doctrine/dbal/types/texttype.html create mode 100644 lib/api/doctrine/dbal/types/timetype.html create mode 100644 lib/api/doctrine/dbal/types/type.html create mode 100644 lib/api/doctrine/orm/abstractquery.html create mode 100644 lib/api/doctrine/orm/configuration.html create mode 100644 lib/api/doctrine/orm/entitymanager.html create mode 100644 lib/api/doctrine/orm/entitynotfoundexception.html create mode 100644 lib/api/doctrine/orm/entityrepository.html create mode 100644 lib/api/doctrine/orm/event/lifecycleeventargs.html create mode 100644 lib/api/doctrine/orm/event/loadclassmetadataeventargs.html create mode 100644 lib/api/doctrine/orm/event/onflusheventargs.html create mode 100644 lib/api/doctrine/orm/event/package-frame.html create mode 100644 lib/api/doctrine/orm/event/package-functions.html create mode 100644 lib/api/doctrine/orm/event/package-globals.html create mode 100644 lib/api/doctrine/orm/event/package-summary.html create mode 100644 lib/api/doctrine/orm/event/package-tree.html create mode 100644 lib/api/doctrine/orm/event/preupdateeventargs.html create mode 100644 lib/api/doctrine/orm/events.html create mode 100644 lib/api/doctrine/orm/id/abstractidgenerator.html create mode 100644 lib/api/doctrine/orm/id/assignedgenerator.html create mode 100644 lib/api/doctrine/orm/id/identitygenerator.html create mode 100644 lib/api/doctrine/orm/id/package-frame.html create mode 100644 lib/api/doctrine/orm/id/package-functions.html create mode 100644 lib/api/doctrine/orm/id/package-globals.html create mode 100644 lib/api/doctrine/orm/id/package-summary.html create mode 100644 lib/api/doctrine/orm/id/package-tree.html create mode 100644 lib/api/doctrine/orm/id/sequencegenerator.html create mode 100644 lib/api/doctrine/orm/id/sequenceidentitygenerator.html create mode 100644 lib/api/doctrine/orm/id/tablegenerator.html create mode 100644 lib/api/doctrine/orm/internal/commitordercalculator.html create mode 100644 lib/api/doctrine/orm/internal/hydration/abstracthydrator.html create mode 100644 lib/api/doctrine/orm/internal/hydration/arrayhydrator.html create mode 100644 lib/api/doctrine/orm/internal/hydration/hydrationexception.html create mode 100644 lib/api/doctrine/orm/internal/hydration/iterableresult.html create mode 100644 lib/api/doctrine/orm/internal/hydration/objecthydrator.html create mode 100644 lib/api/doctrine/orm/internal/hydration/package-frame.html create mode 100644 lib/api/doctrine/orm/internal/hydration/package-functions.html create mode 100644 lib/api/doctrine/orm/internal/hydration/package-globals.html create mode 100644 lib/api/doctrine/orm/internal/hydration/package-summary.html create mode 100644 lib/api/doctrine/orm/internal/hydration/package-tree.html create mode 100644 lib/api/doctrine/orm/internal/hydration/scalarhydrator.html create mode 100644 lib/api/doctrine/orm/internal/hydration/singlescalarhydrator.html create mode 100644 lib/api/doctrine/orm/internal/package-frame.html create mode 100644 lib/api/doctrine/orm/internal/package-functions.html create mode 100644 lib/api/doctrine/orm/internal/package-globals.html create mode 100644 lib/api/doctrine/orm/internal/package-summary.html create mode 100644 lib/api/doctrine/orm/internal/package-tree.html create mode 100644 lib/api/doctrine/orm/mapping/associationmapping.html create mode 100644 lib/api/doctrine/orm/mapping/changetrackingpolicy.html create mode 100644 lib/api/doctrine/orm/mapping/classmetadata.html create mode 100644 lib/api/doctrine/orm/mapping/classmetadatafactory.html create mode 100644 lib/api/doctrine/orm/mapping/classmetadatainfo.html create mode 100644 lib/api/doctrine/orm/mapping/column.html create mode 100644 lib/api/doctrine/orm/mapping/discriminatorcolumn.html create mode 100644 lib/api/doctrine/orm/mapping/discriminatormap.html create mode 100644 lib/api/doctrine/orm/mapping/driver/abstractfiledriver.html create mode 100644 lib/api/doctrine/orm/mapping/driver/annotationdriver.html create mode 100644 lib/api/doctrine/orm/mapping/driver/databasedriver.html create mode 100644 lib/api/doctrine/orm/mapping/driver/driver.html create mode 100644 lib/api/doctrine/orm/mapping/driver/driverchain.html create mode 100644 lib/api/doctrine/orm/mapping/driver/package-frame.html create mode 100644 lib/api/doctrine/orm/mapping/driver/package-functions.html create mode 100644 lib/api/doctrine/orm/mapping/driver/package-globals.html create mode 100644 lib/api/doctrine/orm/mapping/driver/package-summary.html create mode 100644 lib/api/doctrine/orm/mapping/driver/package-tree.html create mode 100644 lib/api/doctrine/orm/mapping/driver/phpdriver.html create mode 100644 lib/api/doctrine/orm/mapping/driver/xmldriver.html create mode 100644 lib/api/doctrine/orm/mapping/driver/yamldriver.html create mode 100644 lib/api/doctrine/orm/mapping/elementcollection.html create mode 100644 lib/api/doctrine/orm/mapping/entity.html create mode 100644 lib/api/doctrine/orm/mapping/generatedvalue.html create mode 100644 lib/api/doctrine/orm/mapping/haslifecyclecallbacks.html create mode 100644 lib/api/doctrine/orm/mapping/id.html create mode 100644 lib/api/doctrine/orm/mapping/index.html create mode 100644 lib/api/doctrine/orm/mapping/inheritancetype.html create mode 100644 lib/api/doctrine/orm/mapping/joincolumn.html create mode 100644 lib/api/doctrine/orm/mapping/joincolumns.html create mode 100644 lib/api/doctrine/orm/mapping/jointable.html create mode 100644 lib/api/doctrine/orm/mapping/manytomany.html create mode 100644 lib/api/doctrine/orm/mapping/manytomanymapping.html create mode 100644 lib/api/doctrine/orm/mapping/manytoone.html create mode 100644 lib/api/doctrine/orm/mapping/mappedsuperclass.html create mode 100644 lib/api/doctrine/orm/mapping/mappingexception.html create mode 100644 lib/api/doctrine/orm/mapping/onetomany.html create mode 100644 lib/api/doctrine/orm/mapping/onetomanymapping.html create mode 100644 lib/api/doctrine/orm/mapping/onetoone.html create mode 100644 lib/api/doctrine/orm/mapping/onetoonemapping.html create mode 100644 lib/api/doctrine/orm/mapping/orderby.html create mode 100644 lib/api/doctrine/orm/mapping/package-frame.html create mode 100644 lib/api/doctrine/orm/mapping/package-functions.html create mode 100644 lib/api/doctrine/orm/mapping/package-globals.html create mode 100644 lib/api/doctrine/orm/mapping/package-summary.html create mode 100644 lib/api/doctrine/orm/mapping/package-tree.html create mode 100644 lib/api/doctrine/orm/mapping/postload.html create mode 100644 lib/api/doctrine/orm/mapping/postpersist.html create mode 100644 lib/api/doctrine/orm/mapping/postremove.html create mode 100644 lib/api/doctrine/orm/mapping/postupdate.html create mode 100644 lib/api/doctrine/orm/mapping/prepersist.html create mode 100644 lib/api/doctrine/orm/mapping/preremove.html create mode 100644 lib/api/doctrine/orm/mapping/preupdate.html create mode 100644 lib/api/doctrine/orm/mapping/sequencegenerator.html create mode 100644 lib/api/doctrine/orm/mapping/table.html create mode 100644 lib/api/doctrine/orm/mapping/uniqueconstraint.html create mode 100644 lib/api/doctrine/orm/mapping/version.html create mode 100644 lib/api/doctrine/orm/nativequery.html create mode 100644 lib/api/doctrine/orm/nonuniqueresultexception.html create mode 100644 lib/api/doctrine/orm/noresultexception.html create mode 100644 lib/api/doctrine/orm/optimisticlockexception.html create mode 100644 lib/api/doctrine/orm/ormexception.html create mode 100644 lib/api/doctrine/orm/package-frame.html create mode 100644 lib/api/doctrine/orm/package-functions.html create mode 100644 lib/api/doctrine/orm/package-globals.html create mode 100644 lib/api/doctrine/orm/package-summary.html create mode 100644 lib/api/doctrine/orm/package-tree.html create mode 100644 lib/api/doctrine/orm/persistentcollection.html create mode 100644 lib/api/doctrine/orm/persisters/abstractcollectionpersister.html create mode 100644 lib/api/doctrine/orm/persisters/abstractentityinheritancepersister.html create mode 100644 lib/api/doctrine/orm/persisters/elementcollectionpersister.html create mode 100644 lib/api/doctrine/orm/persisters/joinedsubclasspersister.html create mode 100644 lib/api/doctrine/orm/persisters/manytomanypersister.html create mode 100644 lib/api/doctrine/orm/persisters/onetomanypersister.html create mode 100644 lib/api/doctrine/orm/persisters/package-frame.html create mode 100644 lib/api/doctrine/orm/persisters/package-functions.html create mode 100644 lib/api/doctrine/orm/persisters/package-globals.html create mode 100644 lib/api/doctrine/orm/persisters/package-summary.html create mode 100644 lib/api/doctrine/orm/persisters/package-tree.html create mode 100644 lib/api/doctrine/orm/persisters/singletablepersister.html create mode 100644 lib/api/doctrine/orm/persisters/standardentitypersister.html create mode 100644 lib/api/doctrine/orm/persisters/unionsubclasspersister.html create mode 100644 lib/api/doctrine/orm/proxy/package-frame.html create mode 100644 lib/api/doctrine/orm/proxy/package-functions.html create mode 100644 lib/api/doctrine/orm/proxy/package-globals.html create mode 100644 lib/api/doctrine/orm/proxy/package-summary.html create mode 100644 lib/api/doctrine/orm/proxy/package-tree.html create mode 100644 lib/api/doctrine/orm/proxy/proxy.html create mode 100644 lib/api/doctrine/orm/proxy/proxyexception.html create mode 100644 lib/api/doctrine/orm/proxy/proxyfactory.html create mode 100644 lib/api/doctrine/orm/query.html create mode 100644 lib/api/doctrine/orm/query/ast/aggregateexpression.html create mode 100644 lib/api/doctrine/orm/query/ast/arithmeticexpression.html create mode 100644 lib/api/doctrine/orm/query/ast/arithmeticfactor.html create mode 100644 lib/api/doctrine/orm/query/ast/arithmeticterm.html create mode 100644 lib/api/doctrine/orm/query/ast/astexception.html create mode 100644 lib/api/doctrine/orm/query/ast/betweenexpression.html create mode 100644 lib/api/doctrine/orm/query/ast/collectionmemberexpression.html create mode 100644 lib/api/doctrine/orm/query/ast/comparisonexpression.html create mode 100644 lib/api/doctrine/orm/query/ast/conditionalexpression.html create mode 100644 lib/api/doctrine/orm/query/ast/conditionalfactor.html create mode 100644 lib/api/doctrine/orm/query/ast/conditionalprimary.html create mode 100644 lib/api/doctrine/orm/query/ast/conditionalterm.html create mode 100644 lib/api/doctrine/orm/query/ast/deleteclause.html create mode 100644 lib/api/doctrine/orm/query/ast/deletestatement.html create mode 100644 lib/api/doctrine/orm/query/ast/emptycollectioncomparisonexpression.html create mode 100644 lib/api/doctrine/orm/query/ast/existsexpression.html create mode 100644 lib/api/doctrine/orm/query/ast/fromclause.html create mode 100644 lib/api/doctrine/orm/query/ast/functions/absfunction.html create mode 100644 lib/api/doctrine/orm/query/ast/functions/concatfunction.html create mode 100644 lib/api/doctrine/orm/query/ast/functions/currentdatefunction.html create mode 100644 lib/api/doctrine/orm/query/ast/functions/currenttimefunction.html create mode 100644 lib/api/doctrine/orm/query/ast/functions/currenttimestampfunction.html create mode 100644 lib/api/doctrine/orm/query/ast/functions/functionnode.html create mode 100644 lib/api/doctrine/orm/query/ast/functions/lengthfunction.html create mode 100644 lib/api/doctrine/orm/query/ast/functions/locatefunction.html create mode 100644 lib/api/doctrine/orm/query/ast/functions/lowerfunction.html create mode 100644 lib/api/doctrine/orm/query/ast/functions/modfunction.html create mode 100644 lib/api/doctrine/orm/query/ast/functions/package-frame.html create mode 100644 lib/api/doctrine/orm/query/ast/functions/package-functions.html create mode 100644 lib/api/doctrine/orm/query/ast/functions/package-globals.html create mode 100644 lib/api/doctrine/orm/query/ast/functions/package-summary.html create mode 100644 lib/api/doctrine/orm/query/ast/functions/package-tree.html create mode 100644 lib/api/doctrine/orm/query/ast/functions/sizefunction.html create mode 100644 lib/api/doctrine/orm/query/ast/functions/sqrtfunction.html create mode 100644 lib/api/doctrine/orm/query/ast/functions/substringfunction.html create mode 100644 lib/api/doctrine/orm/query/ast/functions/trimfunction.html create mode 100644 lib/api/doctrine/orm/query/ast/functions/upperfunction.html create mode 100644 lib/api/doctrine/orm/query/ast/groupbyclause.html create mode 100644 lib/api/doctrine/orm/query/ast/havingclause.html create mode 100644 lib/api/doctrine/orm/query/ast/identificationvariabledeclaration.html create mode 100644 lib/api/doctrine/orm/query/ast/indexby.html create mode 100644 lib/api/doctrine/orm/query/ast/inexpression.html create mode 100644 lib/api/doctrine/orm/query/ast/inputparameter.html create mode 100644 lib/api/doctrine/orm/query/ast/join.html create mode 100644 lib/api/doctrine/orm/query/ast/joinassociationpathexpression.html create mode 100644 lib/api/doctrine/orm/query/ast/joinvariabledeclaration.html create mode 100644 lib/api/doctrine/orm/query/ast/likeexpression.html create mode 100644 lib/api/doctrine/orm/query/ast/literal.html create mode 100644 lib/api/doctrine/orm/query/ast/node.html create mode 100644 lib/api/doctrine/orm/query/ast/nullcomparisonexpression.html create mode 100644 lib/api/doctrine/orm/query/ast/orderbyclause.html create mode 100644 lib/api/doctrine/orm/query/ast/orderbyitem.html create mode 100644 lib/api/doctrine/orm/query/ast/package-frame.html create mode 100644 lib/api/doctrine/orm/query/ast/package-functions.html create mode 100644 lib/api/doctrine/orm/query/ast/package-globals.html create mode 100644 lib/api/doctrine/orm/query/ast/package-summary.html create mode 100644 lib/api/doctrine/orm/query/ast/package-tree.html create mode 100644 lib/api/doctrine/orm/query/ast/partialobjectexpression.html create mode 100644 lib/api/doctrine/orm/query/ast/pathexpression.html create mode 100644 lib/api/doctrine/orm/query/ast/quantifiedexpression.html create mode 100644 lib/api/doctrine/orm/query/ast/rangevariabledeclaration.html create mode 100644 lib/api/doctrine/orm/query/ast/selectclause.html create mode 100644 lib/api/doctrine/orm/query/ast/selectexpression.html create mode 100644 lib/api/doctrine/orm/query/ast/selectstatement.html create mode 100644 lib/api/doctrine/orm/query/ast/simplearithmeticexpression.html create mode 100644 lib/api/doctrine/orm/query/ast/simpleselectclause.html create mode 100644 lib/api/doctrine/orm/query/ast/simpleselectexpression.html create mode 100644 lib/api/doctrine/orm/query/ast/subselect.html create mode 100644 lib/api/doctrine/orm/query/ast/subselectfromclause.html create mode 100644 lib/api/doctrine/orm/query/ast/updateclause.html create mode 100644 lib/api/doctrine/orm/query/ast/updateitem.html create mode 100644 lib/api/doctrine/orm/query/ast/updatestatement.html create mode 100644 lib/api/doctrine/orm/query/ast/whereclause.html create mode 100644 lib/api/doctrine/orm/query/exec/abstractsqlexecutor.html create mode 100644 lib/api/doctrine/orm/query/exec/multitabledeleteexecutor.html create mode 100644 lib/api/doctrine/orm/query/exec/multitableupdateexecutor.html create mode 100644 lib/api/doctrine/orm/query/exec/package-frame.html create mode 100644 lib/api/doctrine/orm/query/exec/package-functions.html create mode 100644 lib/api/doctrine/orm/query/exec/package-globals.html create mode 100644 lib/api/doctrine/orm/query/exec/package-summary.html create mode 100644 lib/api/doctrine/orm/query/exec/package-tree.html create mode 100644 lib/api/doctrine/orm/query/exec/singleselectexecutor.html create mode 100644 lib/api/doctrine/orm/query/exec/singletabledeleteupdateexecutor.html create mode 100644 lib/api/doctrine/orm/query/expr.html create mode 100644 lib/api/doctrine/orm/query/expr/andx.html create mode 100644 lib/api/doctrine/orm/query/expr/base.html create mode 100644 lib/api/doctrine/orm/query/expr/comparison.html create mode 100644 lib/api/doctrine/orm/query/expr/from.html create mode 100644 lib/api/doctrine/orm/query/expr/func.html create mode 100644 lib/api/doctrine/orm/query/expr/groupby.html create mode 100644 lib/api/doctrine/orm/query/expr/join.html create mode 100644 lib/api/doctrine/orm/query/expr/literal.html create mode 100644 lib/api/doctrine/orm/query/expr/math.html create mode 100644 lib/api/doctrine/orm/query/expr/orderby.html create mode 100644 lib/api/doctrine/orm/query/expr/orx.html create mode 100644 lib/api/doctrine/orm/query/expr/package-frame.html create mode 100644 lib/api/doctrine/orm/query/expr/package-functions.html create mode 100644 lib/api/doctrine/orm/query/expr/package-globals.html create mode 100644 lib/api/doctrine/orm/query/expr/package-summary.html create mode 100644 lib/api/doctrine/orm/query/expr/package-tree.html create mode 100644 lib/api/doctrine/orm/query/expr/select.html create mode 100644 lib/api/doctrine/orm/query/lexer.html create mode 100644 lib/api/doctrine/orm/query/package-frame.html create mode 100644 lib/api/doctrine/orm/query/package-functions.html create mode 100644 lib/api/doctrine/orm/query/package-globals.html create mode 100644 lib/api/doctrine/orm/query/package-summary.html create mode 100644 lib/api/doctrine/orm/query/package-tree.html create mode 100644 lib/api/doctrine/orm/query/parser.html create mode 100644 lib/api/doctrine/orm/query/parserresult.html create mode 100644 lib/api/doctrine/orm/query/printer.html create mode 100644 lib/api/doctrine/orm/query/queryexception.html create mode 100644 lib/api/doctrine/orm/query/resultsetmapping.html create mode 100644 lib/api/doctrine/orm/query/sqlwalker.html create mode 100644 lib/api/doctrine/orm/query/treewalker.html create mode 100644 lib/api/doctrine/orm/query/treewalkeradapter.html create mode 100644 lib/api/doctrine/orm/query/treewalkerchain.html create mode 100644 lib/api/doctrine/orm/querybuilder.html create mode 100644 lib/api/doctrine/orm/tools/classmetadatareader.html create mode 100644 lib/api/doctrine/orm/tools/console/command/clearcache/metadatacommand.html create mode 100644 lib/api/doctrine/orm/tools/console/command/clearcache/package-frame.html create mode 100644 lib/api/doctrine/orm/tools/console/command/clearcache/package-functions.html create mode 100644 lib/api/doctrine/orm/tools/console/command/clearcache/package-globals.html create mode 100644 lib/api/doctrine/orm/tools/console/command/clearcache/package-summary.html create mode 100644 lib/api/doctrine/orm/tools/console/command/clearcache/package-tree.html create mode 100644 lib/api/doctrine/orm/tools/console/command/clearcache/querycommand.html create mode 100644 lib/api/doctrine/orm/tools/console/command/clearcache/resultcommand.html create mode 100644 lib/api/doctrine/orm/tools/console/command/convertdoctrine1schemacommand.html create mode 100644 lib/api/doctrine/orm/tools/console/command/convertmappingcommand.html create mode 100644 lib/api/doctrine/orm/tools/console/command/ensureproductionsettingscommand.html create mode 100644 lib/api/doctrine/orm/tools/console/command/generateentitiescommand.html create mode 100644 lib/api/doctrine/orm/tools/console/command/generateproxiescommand.html create mode 100644 lib/api/doctrine/orm/tools/console/command/generaterepositoriescommand.html create mode 100644 lib/api/doctrine/orm/tools/console/command/package-frame.html create mode 100644 lib/api/doctrine/orm/tools/console/command/package-functions.html create mode 100644 lib/api/doctrine/orm/tools/console/command/package-globals.html create mode 100644 lib/api/doctrine/orm/tools/console/command/package-summary.html create mode 100644 lib/api/doctrine/orm/tools/console/command/package-tree.html create mode 100644 lib/api/doctrine/orm/tools/console/command/rundqlcommand.html create mode 100644 lib/api/doctrine/orm/tools/console/command/schematool/abstractcommand.html create mode 100644 lib/api/doctrine/orm/tools/console/command/schematool/createcommand.html create mode 100644 lib/api/doctrine/orm/tools/console/command/schematool/dropcommand.html create mode 100644 lib/api/doctrine/orm/tools/console/command/schematool/package-frame.html create mode 100644 lib/api/doctrine/orm/tools/console/command/schematool/package-functions.html create mode 100644 lib/api/doctrine/orm/tools/console/command/schematool/package-globals.html create mode 100644 lib/api/doctrine/orm/tools/console/command/schematool/package-summary.html create mode 100644 lib/api/doctrine/orm/tools/console/command/schematool/package-tree.html create mode 100644 lib/api/doctrine/orm/tools/console/command/schematool/updatecommand.html create mode 100644 lib/api/doctrine/orm/tools/console/helper/entitymanagerhelper.html create mode 100644 lib/api/doctrine/orm/tools/console/helper/package-frame.html create mode 100644 lib/api/doctrine/orm/tools/console/helper/package-functions.html create mode 100644 lib/api/doctrine/orm/tools/console/helper/package-globals.html create mode 100644 lib/api/doctrine/orm/tools/console/helper/package-summary.html create mode 100644 lib/api/doctrine/orm/tools/console/helper/package-tree.html create mode 100644 lib/api/doctrine/orm/tools/console/metadatafilter.html create mode 100644 lib/api/doctrine/orm/tools/console/package-frame.html create mode 100644 lib/api/doctrine/orm/tools/console/package-functions.html create mode 100644 lib/api/doctrine/orm/tools/console/package-globals.html create mode 100644 lib/api/doctrine/orm/tools/console/package-summary.html create mode 100644 lib/api/doctrine/orm/tools/console/package-tree.html create mode 100644 lib/api/doctrine/orm/tools/convertdoctrine1schema.html create mode 100644 lib/api/doctrine/orm/tools/entitygenerator.html create mode 100644 lib/api/doctrine/orm/tools/event/generateschemaeventargs.html create mode 100644 lib/api/doctrine/orm/tools/event/generateschematableeventargs.html create mode 100644 lib/api/doctrine/orm/tools/event/package-frame.html create mode 100644 lib/api/doctrine/orm/tools/event/package-functions.html create mode 100644 lib/api/doctrine/orm/tools/event/package-globals.html create mode 100644 lib/api/doctrine/orm/tools/event/package-summary.html create mode 100644 lib/api/doctrine/orm/tools/event/package-tree.html create mode 100644 lib/api/doctrine/orm/tools/export/classmetadataexporter.html create mode 100644 lib/api/doctrine/orm/tools/export/driver/abstractexporter.html create mode 100644 lib/api/doctrine/orm/tools/export/driver/annotationexporter.html create mode 100644 lib/api/doctrine/orm/tools/export/driver/package-frame.html create mode 100644 lib/api/doctrine/orm/tools/export/driver/package-functions.html create mode 100644 lib/api/doctrine/orm/tools/export/driver/package-globals.html create mode 100644 lib/api/doctrine/orm/tools/export/driver/package-summary.html create mode 100644 lib/api/doctrine/orm/tools/export/driver/package-tree.html create mode 100644 lib/api/doctrine/orm/tools/export/driver/phpexporter.html create mode 100644 lib/api/doctrine/orm/tools/export/driver/xmlexporter.html create mode 100644 lib/api/doctrine/orm/tools/export/driver/yamlexporter.html create mode 100644 lib/api/doctrine/orm/tools/export/exportexception.html create mode 100644 lib/api/doctrine/orm/tools/export/package-frame.html create mode 100644 lib/api/doctrine/orm/tools/export/package-functions.html create mode 100644 lib/api/doctrine/orm/tools/export/package-globals.html create mode 100644 lib/api/doctrine/orm/tools/export/package-summary.html create mode 100644 lib/api/doctrine/orm/tools/export/package-tree.html create mode 100644 lib/api/doctrine/orm/tools/package-frame.html create mode 100644 lib/api/doctrine/orm/tools/package-functions.html create mode 100644 lib/api/doctrine/orm/tools/package-globals.html create mode 100644 lib/api/doctrine/orm/tools/package-summary.html create mode 100644 lib/api/doctrine/orm/tools/package-tree.html create mode 100644 lib/api/doctrine/orm/tools/schematool.html create mode 100644 lib/api/doctrine/orm/tools/toolevents.html create mode 100644 lib/api/doctrine/orm/tools/toolsexception.html create mode 100644 lib/api/doctrine/orm/unitofwork.html create mode 100644 lib/api/index-all.html create mode 100644 lib/api/index.html create mode 100644 lib/api/overview-frame.html create mode 100644 lib/api/overview-summary.html create mode 100644 lib/api/overview-tree.html create mode 100644 lib/api/stylesheet.css diff --git a/lib/api/allitems-frame.html b/lib/api/allitems-frame.html new file mode 100644 index 000000000..9cc52fed1 --- /dev/null +++ b/lib/api/allitems-frame.html @@ -0,0 +1,338 @@ +<!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>All Items (Doctrine) + + + + +

All Items

+ +

Classes

+ + + + + \ No newline at end of file diff --git a/lib/api/deprecated-list.html b/lib/api/deprecated-list.html new file mode 100644 index 000000000..179ee753d --- /dev/null +++ b/lib/api/deprecated-list.html @@ -0,0 +1,64 @@ + + + + + + + + + + + +Deprecated (Doctrine) + + + + +
+

Doctrine

+ +
+ + +

Deprecated API


+ +

Contents

+ + + + + + + +
Deprecated Methods
Doctrine\ORM\Mapping\ClassMetadataInfo\setTableNameSets the name of the primary table the class is mapped to.
+ +
+

Doctrine

+ +
+ + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/common/annotations/annotation.html b/lib/api/doctrine/common/annotations/annotation.html new file mode 100644 index 000000000..29ec3f736 --- /dev/null +++ b/lib/api/doctrine/common/annotations/annotation.html @@ -0,0 +1,131 @@ + + + + + + + + + + + +Annotation (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +
Doctrine\Common\Annotations\Annotation
+
/Doctrine/Common/Annotations/Annotation.php at line 35
+ +

Class Annotation

+ +
Annotation
+ +
+ +

public class Annotation

+ +

Annotations class

+ +
+
License:
+
http://www.opensource.org/licenses/lgpl-license.php LGPL
+
See Also:
+
www.doctrine-project.org
+
Since:
+
2.0
+
Version:
+
$Revision: 3938 $
+
Author:
+
Guilherme Blanco
+
Jonathan Wage
+
Roman Borschel
+
+
+ + + + + + + +
Field Summary
string

$value

Value property.

+ + + + + + +
Constructor Summary

Annotation(array data)

Constructor

+ +

Field Detail

+
/Doctrine/Common/Annotations/Annotation.php at line 42
+

value

+public string $value +
+

Value property. Common among all derived classes.

+ +
+ +

Constructor Detail

+
/Doctrine/Common/Annotations/Annotation.php at line 49
+

Annotation

+public Annotation(array data) +
+

Constructor

+
Parameters:
+
data - Key-value for properties to be defined in this class
+
+
+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/common/annotations/annotationexception.html b/lib/api/doctrine/common/annotations/annotationexception.html new file mode 100644 index 000000000..0302a0d4b --- /dev/null +++ b/lib/api/doctrine/common/annotations/annotationexception.html @@ -0,0 +1,126 @@ + + + + + + + + + + + +AnnotationException (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +
Doctrine\Common\Annotations\AnnotationException
+
/Doctrine/Common/Annotations/AnnotationException.php at line 35
+ +

Class AnnotationException

+ +
Class:AnnotationException - Superclass: Doctrine
+Doctrine
⌊ AnnotationException
+ +
+ +

public class AnnotationException
extends Doctrine + +

+ +

Description of AnnotationException

+ +
+
License:
+
http://www.opensource.org/licenses/lgpl-license.php LGPL
+
See Also:
+
www.doctrine-project.org
+
Since:
+
2.0
+
Version:
+
$Revision: 3938 $
+
Author:
+
Guilherme Blanco
+
Jonathan Wage
+
Roman Borschel
+
+
+ + + + + + + + + + + +
Method Summary
static void

semanticalError(mixed message)

static void

syntaxError(mixed message)

+ +

Method Detail

+
/Doctrine/Common/Annotations/AnnotationException.php at line 43
+

semanticalError

+public static void semanticalError(mixed message) +
+
+ +
+ +
/Doctrine/Common/Annotations/AnnotationException.php at line 37
+

syntaxError

+public static void syntaxError(mixed message) +
+
+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/common/annotations/annotationreader.html b/lib/api/doctrine/common/annotations/annotationreader.html new file mode 100644 index 000000000..0bbc7ca05 --- /dev/null +++ b/lib/api/doctrine/common/annotations/annotationreader.html @@ -0,0 +1,260 @@ + + + + + + + + + + + +AnnotationReader (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +
Doctrine\Common\Annotations\AnnotationReader
+
/Doctrine/Common/Annotations/AnnotationReader.php at line 41
+ +

Class AnnotationReader

+ +
AnnotationReader
+ +
+ +

public class AnnotationReader

+ +

A reader for docblock annotations.

+ +
+
License:
+
http://www.opensource.org/licenses/lgpl-license.php LGPL
+
See Also:
+
www.doctrine-project.org
+
Since:
+
2.0
+
Version:
+
$Revision: 3938 $
+
Author:
+
Benjamin Eberlei
+
Guilherme Blanco
+
Jonathan Wage
+
Roman Borschel
+
+
+ + + + + + +
Constructor Summary

AnnotationReader(Cache cache)

Constructor.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Method Summary
The

getClassAnnotation(mixed class, string annotation, $class )

Gets a class annotation.

array

getClassAnnotations(string|ReflectionClass class)

Gets the annotations applied to a class.

The

getMethodAnnotation(ReflectionMethod method, string annotation)

Gets a method annotation.

array

getMethodAnnotations(mixed method, string|ReflectionClass class, string|ReflectionMethod property)

Gets the annotations applied to a method.

The

getPropertyAnnotation(ReflectionProperty property, string annotation)

Gets a property annotation.

array

getPropertyAnnotations(string|ReflectionProperty property, string|ReflectionClass class)

Gets the annotations applied to a property.

void

setAnnotationNamespaceAlias(mixed namespace, mixed alias, $alias )

Sets an alias for an annotation namespace.

void

setDefaultAnnotationNamespace(string defaultNamespace)

Sets the default namespace that the AnnotationReader should assume for annotations +with not fully qualified names.

+ +

Constructor Detail

+
/Doctrine/Common/Annotations/AnnotationReader.php at line 71
+

AnnotationReader

+public AnnotationReader(Cache cache) +
+

Constructor. Initializes a new AnnotationReader that uses the given +Cache provider.

+
Parameters:
+
cache - The cache provider to use. If none is provided, ArrayCache is used.
+
+
+ +
+ +

Method Detail

+
/Doctrine/Common/Annotations/AnnotationReader.php at line 128
+

getClassAnnotation

+public The getClassAnnotation(mixed class, string annotation, $class ) +
+

Gets a class annotation.

+
Parameters:
+
+
annotation - The name of the annotation.
+
Returns:
+
Annotation or NULL, if the requested annotation does not exist.
+
+
+ +
+ +
/Doctrine/Common/Annotations/AnnotationReader.php at line 106
+

getClassAnnotations

+public array getClassAnnotations(string|ReflectionClass class) +
+

Gets the annotations applied to a class.

+
Parameters:
+
class - The name or ReflectionClass of the class from which the class annotations should be read.
+
Returns:
+
An array of Annotations.
+
+
+ +
+ +
/Doctrine/Common/Annotations/AnnotationReader.php at line 202
+

getMethodAnnotation

+public The getMethodAnnotation(ReflectionMethod method, string annotation) +
+

Gets a method annotation.

+
Parameters:
+
+
annotation - The name of the annotation.
+
Returns:
+
Annotation or NULL, if the requested annotation does not exist.
+
+
+ +
+ +
/Doctrine/Common/Annotations/AnnotationReader.php at line 179
+

getMethodAnnotations

+public array getMethodAnnotations(mixed method, string|ReflectionClass class, string|ReflectionMethod property) +
+

Gets the annotations applied to a method.

+
Parameters:
+
class - The name or ReflectionClass of the class that owns the method.
+
property - The name or ReflectionMethod of the method from which the annotations should be read.
+
Returns:
+
An array of Annotations.
+
+
+ +
+ +
/Doctrine/Common/Annotations/AnnotationReader.php at line 165
+

getPropertyAnnotation

+public The getPropertyAnnotation(ReflectionProperty property, string annotation) +
+

Gets a property annotation.

+
Parameters:
+
+
annotation - The name of the annotation.
+
Returns:
+
Annotation or NULL, if the requested annotation does not exist.
+
+
+ +
+ +
/Doctrine/Common/Annotations/AnnotationReader.php at line 142
+

getPropertyAnnotations

+public array getPropertyAnnotations(string|ReflectionProperty property, string|ReflectionClass class) +
+

Gets the annotations applied to a property.

+
Parameters:
+
class - The name or ReflectionClass of the class that owns the property.
+
property - The name or ReflectionProperty of the property from which the annotations should be read.
+
Returns:
+
An array of Annotations.
+
+
+ +
+ +
/Doctrine/Common/Annotations/AnnotationReader.php at line 94
+

setAnnotationNamespaceAlias

+public void setAnnotationNamespaceAlias(mixed namespace, mixed alias, $alias ) +
+

Sets an alias for an annotation namespace.

+ +
+ +
/Doctrine/Common/Annotations/AnnotationReader.php at line 83
+

setDefaultAnnotationNamespace

+public void setDefaultAnnotationNamespace(string defaultNamespace) +
+

Sets the default namespace that the AnnotationReader should assume for annotations +with not fully qualified names.

+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/common/annotations/lexer.html b/lib/api/doctrine/common/annotations/lexer.html new file mode 100644 index 000000000..4166df12a --- /dev/null +++ b/lib/api/doctrine/common/annotations/lexer.html @@ -0,0 +1,317 @@ + + + + + + + + + + + +Lexer (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +
Doctrine\Common\Annotations\Lexer
+
/Doctrine/Common/Annotations/Lexer.php at line 35
+ +

Class Lexer

+ +
Class:Lexer - Superclass: Doctrine
+Doctrine
⌊ Lexer
+ +
+ +

public class Lexer
extends Doctrine + +

+ +

Simple lexer for docblock annotations.

+ +
+
License:
+
http://www.opensource.org/licenses/lgpl-license.php LGPL
+
See Also:
+
www.doctrine-project.org
+
Since:
+
2.0
+
Version:
+
$Revision: 3938 $
+
Author:
+
Guilherme Blanco
+
Jonathan Wage
+
Roman Borschel
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Field Summary
final int

T_AT

final int

T_CLOSE_CURLY_BRACES

final int

T_CLOSE_PARENTHESIS

final int

T_COMMA

final int

T_EQUALS

final int

T_FALSE

final int

T_FLOAT

final int

T_IDENTIFIER

final int

T_INTEGER

final int

T_NAMESPACE_SEPARATOR

final int

T_NONE

final int

T_OPEN_CURLY_BRACES

final int

T_OPEN_PARENTHESIS

final int

T_STRING

final int

T_TRUE

+ + + + + + + + + + + +
Method Summary
protected void

getCatchablePatterns()

protected void

getNonCatchablePatterns()

+ +

Field Detail

+
/Doctrine/Common/Annotations/Lexer.php at line 43
+

T_AT

+public final int T_AT = 101 +
+
+ +
+ +
/Doctrine/Common/Annotations/Lexer.php at line 44
+

T_CLOSE_CURLY_BRACES

+public final int T_CLOSE_CURLY_BRACES = 102 +
+
+ +
+ +
/Doctrine/Common/Annotations/Lexer.php at line 45
+

T_CLOSE_PARENTHESIS

+public final int T_CLOSE_PARENTHESIS = 103 +
+
+ +
+ +
/Doctrine/Common/Annotations/Lexer.php at line 46
+

T_COMMA

+public final int T_COMMA = 104 +
+
+ +
+ +
/Doctrine/Common/Annotations/Lexer.php at line 47
+

T_EQUALS

+public final int T_EQUALS = 105 +
+
+ +
+ +
/Doctrine/Common/Annotations/Lexer.php at line 48
+

T_FALSE

+public final int T_FALSE = 106 +
+
+ +
+ +
/Doctrine/Common/Annotations/Lexer.php at line 41
+

T_FLOAT

+public final int T_FLOAT = 5 +
+
+ +
+ +
/Doctrine/Common/Annotations/Lexer.php at line 38
+

T_IDENTIFIER

+public final int T_IDENTIFIER = 2 +
+
+ +
+ +
/Doctrine/Common/Annotations/Lexer.php at line 39
+

T_INTEGER

+public final int T_INTEGER = 3 +
+
+ +
+ +
/Doctrine/Common/Annotations/Lexer.php at line 49
+

T_NAMESPACE_SEPARATOR

+public final int T_NAMESPACE_SEPARATOR = 107 +
+
+ +
+ +
/Doctrine/Common/Annotations/Lexer.php at line 37
+

T_NONE

+public final int T_NONE = 1 +
+
+ +
+ +
/Doctrine/Common/Annotations/Lexer.php at line 50
+

T_OPEN_CURLY_BRACES

+public final int T_OPEN_CURLY_BRACES = 108 +
+
+ +
+ +
/Doctrine/Common/Annotations/Lexer.php at line 51
+

T_OPEN_PARENTHESIS

+public final int T_OPEN_PARENTHESIS = 109 +
+
+ +
+ +
/Doctrine/Common/Annotations/Lexer.php at line 40
+

T_STRING

+public final int T_STRING = 4 +
+
+ +
+ +
/Doctrine/Common/Annotations/Lexer.php at line 52
+

T_TRUE

+public final int T_TRUE = 110 +
+
+ +
+ +

Method Detail

+
/Doctrine/Common/Annotations/Lexer.php at line 57
+

getCatchablePatterns

+protected void getCatchablePatterns() +
+

+
Inheritdoc.
+
+
+ +
+ +
/Doctrine/Common/Annotations/Lexer.php at line 69
+

getNonCatchablePatterns

+protected void getNonCatchablePatterns() +
+

+
Inheritdoc.
+
+
+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/common/annotations/package-frame.html b/lib/api/doctrine/common/annotations/package-frame.html new file mode 100644 index 000000000..b1a7b5b40 --- /dev/null +++ b/lib/api/doctrine/common/annotations/package-frame.html @@ -0,0 +1,30 @@ + + + + + + + + + + + +Doctrine\Common\Annotations (Doctrine) + + + + +

Doctrine\Common\Annotations

+ +

Classes

+ + + + + \ No newline at end of file diff --git a/lib/api/doctrine/common/annotations/package-functions.html b/lib/api/doctrine/common/annotations/package-functions.html new file mode 100644 index 000000000..1e5a2b808 --- /dev/null +++ b/lib/api/doctrine/common/annotations/package-functions.html @@ -0,0 +1,69 @@ + + + + + + + + + + + +Functions (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +

Functions

+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/common/annotations/package-globals.html b/lib/api/doctrine/common/annotations/package-globals.html new file mode 100644 index 000000000..38cc3176e --- /dev/null +++ b/lib/api/doctrine/common/annotations/package-globals.html @@ -0,0 +1,69 @@ + + + + + + + + + + + +Globals (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +

Globals

+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/common/annotations/package-summary.html b/lib/api/doctrine/common/annotations/package-summary.html new file mode 100644 index 000000000..48686a3a6 --- /dev/null +++ b/lib/api/doctrine/common/annotations/package-summary.html @@ -0,0 +1,68 @@ + + + + + + + + + + + +Doctrine\Common\Annotations (Doctrine) + + + + +
+

Doctrine

+ +
+ + +
+ +

Namespace Doctrine\Common\Annotations

+ + + + + + + + +
Class Summary
AnnotationAnnotations class
AnnotationExceptionDescription of AnnotationException
AnnotationReaderA reader for docblock annotations.
LexerSimple lexer for docblock annotations.
ParserA simple parser for docblock annotations.
+ +
+ +
+

Doctrine

+ +
+ + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/common/annotations/package-tree.html b/lib/api/doctrine/common/annotations/package-tree.html new file mode 100644 index 000000000..45b48cc2e --- /dev/null +++ b/lib/api/doctrine/common/annotations/package-tree.html @@ -0,0 +1,58 @@ + + + + + + + + + + + +Doctrine\Common\Annotations (Doctrine) + + + + +
+

Doctrine

+ +
+ + +

Class Hierarchy for Package Doctrine\Common\Annotations

+
+

Doctrine

+ +
+ + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/common/annotations/parser.html b/lib/api/doctrine/common/annotations/parser.html new file mode 100644 index 000000000..701509684 --- /dev/null +++ b/lib/api/doctrine/common/annotations/parser.html @@ -0,0 +1,296 @@ + + + + + + + + + + + +Parser (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +
Doctrine\Common\Annotations\Parser
+
/Doctrine/Common/Annotations/Parser.php at line 36
+ +

Class Parser

+ +
Parser
+ +
+ +

public class Parser

+ +

A simple parser for docblock annotations.

+ +
+
License:
+
http://www.opensource.org/licenses/lgpl-license.php LGPL
+
See Also:
+
www.doctrine-project.org
+
Since:
+
2.0
+
Version:
+
$Revision: 3938 $
+
Author:
+
Guilherme Blanco
+
Jonathan Wage
+
Roman Borschel
+
Benjamin Eberlei
+
+
+ + + + + + +
Constructor Summary

Parser()

Constructs a new AnnotationParser.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Method Summary
mixed

Annotation()

Annotation ::= "@" AnnotationName ["(" [Values] ")"] +AnnotationName ::= QualifiedName | SimpleName | AliasedName +QualifiedName ::= NameSpacePart "\" {NameSpacePart "\"}* SimpleName +AliasedName ::= Alias ":" SimpleName +NameSpacePart ::= identifier +SimpleName ::= identifier +Alias ::= identifier

array

Annotations()

Annotations ::= Annotation {[ "*" ]* [Annotation]}

array

ArrayEntry()

ArrayEntry ::= Value | KeyValuePair +KeyValuePair ::= Key "=" PlainValue +Key ::= string | integer

array

Arrayx()

Array ::= "{" ArrayEntry {"," ArrayEntry}* "}"

array

FieldAssignment()

FieldAssignment ::= FieldName "=" PlainValue +FieldName ::= identifier

mixed

PlainValue()

PlainValue ::= integer | string | float | boolean | Array | Annotation

mixed

Value()

Value ::= PlainValue | FieldAssignment

array

Values()

Values ::= Array | Value {"," Value}

bool

match(int|string token)

Attempts to match the given token with the current lookahead token. +

array

parse(string docBlockString, string context)

Parses the given docblock string for annotations.

void

setAnnotationNamespaceAlias(mixed namespace, mixed alias, $alias )

Sets an alias for an annotation namespace.

void

setDefaultAnnotationNamespace(mixed defaultNamespace, $defaultNamespace )

Sets the default namespace that is assumed for an annotation that does not +define a namespace prefix.

+ +

Constructor Detail

+
/Doctrine/Common/Annotations/Parser.php at line 85
+

Parser

+public Parser() +
+

Constructs a new AnnotationParser.

+ +
+ +

Method Detail

+
/Doctrine/Common/Annotations/Parser.php at line 224
+

Annotation

+public mixed Annotation() +
+

Annotation ::= "@" AnnotationName ["(" [Values] ")"] +AnnotationName ::= QualifiedName | SimpleName | AliasedName +QualifiedName ::= NameSpacePart "\" {NameSpacePart "\"}* SimpleName +AliasedName ::= Alias ":" SimpleName +NameSpacePart ::= identifier +SimpleName ::= identifier +Alias ::= identifier

+
Returns:
+
False if it is not a valid Annotation; instance of Annotation subclass otherwise.
+
+
+ +
+ +
/Doctrine/Common/Annotations/Parser.php at line 189
+

Annotations

+public array Annotations() +
+

Annotations ::= Annotation {[ "*" ]* [Annotation]}

+ +
+ +
/Doctrine/Common/Annotations/Parser.php at line 431
+

ArrayEntry

+public array ArrayEntry() +
+

ArrayEntry ::= Value | KeyValuePair +KeyValuePair ::= Key "=" PlainValue +Key ::= string | integer

+ +
+ +
/Doctrine/Common/Annotations/Parser.php at line 398
+

Arrayx

+public array Arrayx() +
+

Array ::= "{" ArrayEntry {"," ArrayEntry}* "}"

+ +
+ +
/Doctrine/Common/Annotations/Parser.php at line 384
+

FieldAssignment

+public array FieldAssignment() +
+

FieldAssignment ::= FieldName "=" PlainValue +FieldName ::= identifier

+ +
+ +
/Doctrine/Common/Annotations/Parser.php at line 342
+

PlainValue

+public mixed PlainValue() +
+

PlainValue ::= integer | string | float | boolean | Array | Annotation

+ +
+ +
/Doctrine/Common/Annotations/Parser.php at line 326
+

Value

+public mixed Value() +
+

Value ::= PlainValue | FieldAssignment

+ +
+ +
/Doctrine/Common/Annotations/Parser.php at line 284
+

Values

+public array Values() +
+

Values ::= Array | Value {"," Value}

+ +
+ +
/Doctrine/Common/Annotations/Parser.php at line 147
+

match

+public bool match(int|string token) +
+

Attempts to match the given token with the current lookahead token. +If they match, updates the lookahead token; otherwise raises a syntax error.

+
Parameters:
+
token - type or value
+
Returns:
+
True if tokens match; false otherwise.
+
+
+ +
+ +
/Doctrine/Common/Annotations/Parser.php at line 119
+

parse

+public array parse(string docBlockString, string context) +
+

Parses the given docblock string for annotations.

+
Returns:
+
Array of Annotations. If no annotations are found, an empty array is returned.
+
+
+ +
+ +
/Doctrine/Common/Annotations/Parser.php at line 107
+

setAnnotationNamespaceAlias

+public void setAnnotationNamespaceAlias(mixed namespace, mixed alias, $alias ) +
+

Sets an alias for an annotation namespace.

+ +
+ +
/Doctrine/Common/Annotations/Parser.php at line 96
+

setDefaultAnnotationNamespace

+public void setDefaultAnnotationNamespace(mixed defaultNamespace, $defaultNamespace ) +
+

Sets the default namespace that is assumed for an annotation that does not +define a namespace prefix.

+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/common/cache/abstractcache.html b/lib/api/doctrine/common/cache/abstractcache.html new file mode 100644 index 000000000..00098025b --- /dev/null +++ b/lib/api/doctrine/common/cache/abstractcache.html @@ -0,0 +1,239 @@ + + + + + + + + + + + +AbstractCache (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +
Doctrine\Common\Cache\AbstractCache
+
/Doctrine/Common/Cache/AbstractCache.php at line 35
+ +

Class AbstractCache

+ +
AbstractCache
+ +
+ +

public abstract class AbstractCache

+ +

Base class for cache driver implementations.

+ +
+
License:
+
http://www.opensource.org/licenses/lgpl-license.php LGPL
+
See Also:
+
www.doctrine-project.org
+
Since:
+
2.0
+
Version:
+
$Revision: 3938 $
+
Author:
+
Guilherme Blanco
+
Jonathan Wage
+
Roman Borschel
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Method Summary
void

contains(mixed id)

{@inheritdoc}

void

delete(mixed id)

{@inheritdoc}

array

deleteAll()

Delete all cache entries.

array

deleteByPrefix(string prefix)

Delete cache entries where the id has the passed prefix

array

deleteByRegex(string regex)

Delete cache entries where the id matches a PHP regular expressions

array

deleteBySuffix(string suffix)

Delete cache entries where the id has the passed suffix

void

fetch(mixed id)

{@inheritdoc}

abstract array

getIds()

Get an array of all the cache ids stored

void

save(mixed id, mixed data, mixed lifeTime)

{@inheritdoc}

void

setNamespace(string namespace)

Set the namespace to prefix all cache ids with.

+ +

Method Detail

+
/Doctrine/Common/Cache/AbstractCache.php at line 65
+

contains

+public void contains(mixed id) +
+

+ +
+ +
/Doctrine/Common/Cache/AbstractCache.php at line 82
+

delete

+public void delete(mixed id) +
+

+ +
+ +
/Doctrine/Common/Cache/AbstractCache.php at line 98
+

deleteAll

+public array deleteAll() +
+

Delete all cache entries.

+
Returns:
+
$deleted Array of the deleted cache ids
+
+
+ +
+ +
/Doctrine/Common/Cache/AbstractCache.php at line 132
+

deleteByPrefix

+public array deleteByPrefix(string prefix) +
+

Delete cache entries where the id has the passed prefix

+
Returns:
+
$deleted Array of the deleted cache ids
+
+
+ +
+ +
/Doctrine/Common/Cache/AbstractCache.php at line 113
+

deleteByRegex

+public array deleteByRegex(string regex) +
+

Delete cache entries where the id matches a PHP regular expressions

+
Returns:
+
$deleted Array of the deleted cache ids
+
+
+ +
+ +
/Doctrine/Common/Cache/AbstractCache.php at line 151
+

deleteBySuffix

+public array deleteBySuffix(string suffix) +
+

Delete cache entries where the id has the passed suffix

+
Returns:
+
$deleted Array of the deleted cache ids
+
+
+ +
+ +
/Doctrine/Common/Cache/AbstractCache.php at line 57
+

fetch

+public void fetch(mixed id) +
+

+ +
+ +
/Doctrine/Common/Cache/AbstractCache.php at line 218
+

getIds

+public abstract array getIds() +
+

Get an array of all the cache ids stored

+
Returns:
+
$ids
+
+
+ +
+ +
/Doctrine/Common/Cache/AbstractCache.php at line 73
+

save

+public void save(mixed id, mixed data, mixed lifeTime) +
+

+ +
+ +
/Doctrine/Common/Cache/AbstractCache.php at line 49
+

setNamespace

+public void setNamespace(string namespace) +
+

Set the namespace to prefix all cache ids with.

+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/common/cache/apccache.html b/lib/api/doctrine/common/cache/apccache.html new file mode 100644 index 000000000..d9fce06ae --- /dev/null +++ b/lib/api/doctrine/common/cache/apccache.html @@ -0,0 +1,126 @@ + + + + + + + + + + + +ApcCache (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +
Doctrine\Common\Cache\ApcCache
+
/Doctrine/Common/Cache/ApcCache.php at line 38
+ +

Class ApcCache

+ +
Class:ApcCache - Superclass: AbstractCache
+AbstractCache
⌊ ApcCache
+ +
+ +

public class ApcCache
extends AbstractCache + +

+ +

APC cache driver.

+ +
+
License:
+
http://www.opensource.org/licenses/lgpl-license.php LGPL
+
See Also:
+
www.doctrine-project.org
+
Since:
+
2.0
+
Version:
+
$Revision$
+
Author:
+
Benjamin Eberlei
+
Guilherme Blanco
+
Jonathan Wage
+
Roman Borschel
+
David Abdemoulaie
+
Todo:
+
Rename: APCCache
+
+
+ + + + + + + +
Method Summary
array

getIds()

{@inheritdoc}

+ + + +
Methods inherited from Doctrine\Common\Cache\AbstractCache
contains, delete, deleteAll, deleteByPrefix, deleteByRegex, deleteBySuffix, fetch, getIds, save, setNamespace
+ +

Method Detail

+
/Doctrine/Common/Cache/ApcCache.php at line 43
+

getIds

+public array getIds() +
+

+
Returns:
+
$ids
+
+
+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/common/cache/arraycache.html b/lib/api/doctrine/common/cache/arraycache.html new file mode 100644 index 000000000..305078bbb --- /dev/null +++ b/lib/api/doctrine/common/cache/arraycache.html @@ -0,0 +1,124 @@ + + + + + + + + + + + +ArrayCache (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +
Doctrine\Common\Cache\ArrayCache
+
/Doctrine/Common/Cache/ArrayCache.php at line 37
+ +

Class ArrayCache

+ +
Class:ArrayCache - Superclass: AbstractCache
+AbstractCache
⌊ ArrayCache
+ +
+ +

public class ArrayCache
extends AbstractCache + +

+ +

Array cache driver.

+ +
+
License:
+
http://www.opensource.org/licenses/lgpl-license.php LGPL
+
See Also:
+
www.doctrine-project.org
+
Since:
+
2.0
+
Version:
+
$Revision: 3938 $
+
Author:
+
Benjamin Eberlei
+
Guilherme Blanco
+
Jonathan Wage
+
Roman Borschel
+
David Abdemoulaie
+
+
+ + + + + + + +
Method Summary
array

getIds()

{@inheritdoc}

+ + + +
Methods inherited from Doctrine\Common\Cache\AbstractCache
contains, delete, deleteAll, deleteByPrefix, deleteByRegex, deleteBySuffix, fetch, getIds, save, setNamespace
+ +

Method Detail

+
/Doctrine/Common/Cache/ArrayCache.php at line 47
+

getIds

+public array getIds() +
+

+
Returns:
+
$ids
+
+
+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/common/cache/cache.html b/lib/api/doctrine/common/cache/cache.html new file mode 100644 index 000000000..43bda65d1 --- /dev/null +++ b/lib/api/doctrine/common/cache/cache.html @@ -0,0 +1,174 @@ + + + + + + + + + + + +Cache (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +
Doctrine\Common\Cache\Cache
+
/Doctrine/Common/Cache/Cache.php at line 36
+ +

Interface Cache

+ +
Cache
+ +
+ +

public interface Cache

+ +

Interface for cache drivers.

+ +
+
License:
+
http://www.opensource.org/licenses/lgpl-license.php LGPL
+
See Also:
+
www.doctrine-project.org
+
Since:
+
2.0
+
Version:
+
$Revision: 3938 $
+
Author:
+
Benjamin Eberlei
+
Guilherme Blanco
+
Jonathan Wage
+
Roman Borschel
+
+
+ + + + + + + + + + + + + + + + + + + +
Method Summary
boolean

contains(string id)

Test if an entry exists in the cache.

boolean

delete(string id)

Deletes a cache entry.

string

fetch(string id)

Fetches an entry from the cache.

boolean

save(string id, string data, int lifeTime)

Puts data into the cache.

+ +

Method Detail

+
/Doctrine/Common/Cache/Cache.php at line 52
+

contains

+public boolean contains(string id) +
+

Test if an entry exists in the cache.

+
Parameters:
+
id - cache id The cache id of the entry to check for.
+
Returns:
+
TRUE if a cache entry exists for the given cache id, FALSE otherwise.
+
+
+ +
+ +
/Doctrine/Common/Cache/Cache.php at line 70
+

delete

+public boolean delete(string id) +
+

Deletes a cache entry.

+
Parameters:
+
id - cache id
+
Returns:
+
TRUE if the cache entry was successfully deleted, FALSE otherwise.
+
+
+ +
+ +
/Doctrine/Common/Cache/Cache.php at line 44
+

fetch

+public string fetch(string id) +
+

Fetches an entry from the cache.

+
Parameters:
+
id - cache id The id of the cache entry to fetch.
+
Returns:
+
The cached data or FALSE, if no cache entry exists for the given id.
+
+
+ +
+ +
/Doctrine/Common/Cache/Cache.php at line 62
+

save

+public boolean save(string id, string data, int lifeTime) +
+

Puts data into the cache.

+
Parameters:
+
id - The cache id.
+
data - The cache entry/data.
+
lifeTime - The lifetime. If != 0, sets a specific lifetime for this cache entry (0 => infinite lifeTime).
+
Returns:
+
TRUE if the entry was successfully stored in the cache, FALSE otherwise.
+
+
+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/common/cache/memcachecache.html b/lib/api/doctrine/common/cache/memcachecache.html new file mode 100644 index 000000000..50d6fbe40 --- /dev/null +++ b/lib/api/doctrine/common/cache/memcachecache.html @@ -0,0 +1,148 @@ + + + + + + + + + + + +MemcacheCache (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +
Doctrine\Common\Cache\MemcacheCache
+
/Doctrine/Common/Cache/MemcacheCache.php at line 39
+ +

Class MemcacheCache

+ +
Class:MemcacheCache - Superclass: AbstractCache
+AbstractCache
⌊ MemcacheCache
+ +
+ +

public class MemcacheCache
extends AbstractCache + +

+ +

Memcache cache driver.

+ +
+
License:
+
http://www.opensource.org/licenses/lgpl-license.php LGPL
+
See Also:
+
www.doctrine-project.org
+
Since:
+
2.0
+
Version:
+
$Revision: 3938 $
+
Author:
+
Benjamin Eberlei
+
Guilherme Blanco
+
Jonathan Wage
+
Roman Borschel
+
David Abdemoulaie
+
+
+ + + + + + + + + + + + + + + +
Method Summary
array

getIds()

{@inheritdoc}

Memcache

getMemcache()

Gets the memcache instance used by the cache.

void

setMemcache(Memcache memcache)

Sets the memcache instance to use.

+ + + +
Methods inherited from Doctrine\Common\Cache\AbstractCache
contains, delete, deleteAll, deleteByPrefix, deleteByRegex, deleteBySuffix, fetch, getIds, save, setNamespace
+ +

Method Detail

+
/Doctrine/Common/Cache/MemcacheCache.php at line 69
+

getIds

+public array getIds() +
+

+
Returns:
+
$ids
+
+
+ +
+ +
/Doctrine/Common/Cache/MemcacheCache.php at line 61
+

getMemcache

+public Memcache getMemcache() +
+

Gets the memcache instance used by the cache.

+ +
+ +
/Doctrine/Common/Cache/MemcacheCache.php at line 51
+

setMemcache

+public void setMemcache(Memcache memcache) +
+

Sets the memcache instance to use.

+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/common/cache/package-frame.html b/lib/api/doctrine/common/cache/package-frame.html new file mode 100644 index 000000000..8efd939c0 --- /dev/null +++ b/lib/api/doctrine/common/cache/package-frame.html @@ -0,0 +1,35 @@ + + + + + + + + + + + +Doctrine\Common\Cache (Doctrine) + + + + +

Doctrine\Common\Cache

+ +

Classes

+ + +

Interfaces

+ + + + + \ No newline at end of file diff --git a/lib/api/doctrine/common/cache/package-functions.html b/lib/api/doctrine/common/cache/package-functions.html new file mode 100644 index 000000000..b8af993d6 --- /dev/null +++ b/lib/api/doctrine/common/cache/package-functions.html @@ -0,0 +1,69 @@ + + + + + + + + + + + +Functions (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +

Functions

+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/common/cache/package-globals.html b/lib/api/doctrine/common/cache/package-globals.html new file mode 100644 index 000000000..bfd2295d3 --- /dev/null +++ b/lib/api/doctrine/common/cache/package-globals.html @@ -0,0 +1,69 @@ + + + + + + + + + + + +Globals (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +

Globals

+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/common/cache/package-summary.html b/lib/api/doctrine/common/cache/package-summary.html new file mode 100644 index 000000000..911a520e8 --- /dev/null +++ b/lib/api/doctrine/common/cache/package-summary.html @@ -0,0 +1,73 @@ + + + + + + + + + + + +Doctrine\Common\Cache (Doctrine) + + + + +
+

Doctrine

+ +
+ + +
+ +

Namespace Doctrine\Common\Cache

+ + + + + + + + +
Class Summary
AbstractCacheBase class for cache driver implementations.
ApcCacheAPC cache driver.
ArrayCacheArray cache driver.
MemcacheCacheMemcache cache driver.
XcacheCacheXcache cache driver.
+ + + + +
Interface Summary
CacheInterface for cache drivers.
+ +
+ +
+

Doctrine

+ +
+ + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/common/cache/package-tree.html b/lib/api/doctrine/common/cache/package-tree.html new file mode 100644 index 000000000..93eeb25e9 --- /dev/null +++ b/lib/api/doctrine/common/cache/package-tree.html @@ -0,0 +1,62 @@ + + + + + + + + + + + +Doctrine\Common\Cache (Doctrine) + + + + +
+

Doctrine

+ +
+ + +

Class Hierarchy for Package Doctrine\Common\Cache

+
+

Doctrine

+ +
+ + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/common/cache/xcachecache.html b/lib/api/doctrine/common/cache/xcachecache.html new file mode 100644 index 000000000..0ef584649 --- /dev/null +++ b/lib/api/doctrine/common/cache/xcachecache.html @@ -0,0 +1,124 @@ + + + + + + + + + + + +XcacheCache (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +
Doctrine\Common\Cache\XcacheCache
+
/Doctrine/Common/Cache/XcacheCache.php at line 37
+ +

Class XcacheCache

+ +
Class:XcacheCache - Superclass: AbstractCache
+AbstractCache
⌊ XcacheCache
+ +
+ +

public class XcacheCache
extends AbstractCache + +

+ +

Xcache cache driver.

+ +
+
License:
+
http://www.opensource.org/licenses/lgpl-license.php LGPL
+
See Also:
+
www.doctrine-project.org
+
Since:
+
2.0
+
Version:
+
$Revision: 3938 $
+
Author:
+
Benjamin Eberlei
+
Guilherme Blanco
+
Jonathan Wage
+
Roman Borschel
+
David Abdemoulaie
+
+
+ + + + + + + +
Method Summary
array

getIds()

{@inheritdoc}

+ + + +
Methods inherited from Doctrine\Common\Cache\AbstractCache
contains, delete, deleteAll, deleteByPrefix, deleteByRegex, deleteBySuffix, fetch, getIds, save, setNamespace
+ +

Method Detail

+
/Doctrine/Common/Cache/XcacheCache.php at line 42
+

getIds

+public array getIds() +
+

+
Returns:
+
$ids
+
+
+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/common/classloader.html b/lib/api/doctrine/common/classloader.html new file mode 100644 index 000000000..e06a2a812 --- /dev/null +++ b/lib/api/doctrine/common/classloader.html @@ -0,0 +1,235 @@ + + + + + + + + + + + +ClassLoader (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +
Doctrine\Common\ClassLoader
+
/Doctrine/Common/ClassLoader.php at line 36
+ +

Class ClassLoader

+ +
ClassLoader
+ +
+ +

public class ClassLoader

+ +

A ClassLoader is an autoloader for class files that can be +installed on the SPL autoload stack. It is a class loader that loads only classes +of a specific namespace or all namespaces and is suitable for working together +with other autoloaders in the SPL autoload stack.

If no include path is configured through setIncludePath, a ClassLoader +relies on the PHP include_path.

+ +
+
Author:
+
Roman Borschel
+
Since:
+
2.0
+
+
+ + + + + + +
Constructor Summary

ClassLoader(string ns, mixed includePath)

Creates a new ClassLoader that loads classes of the +specified namespace.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Method Summary
string

getFileExtension()

Gets the file extension of class files in the namespace of this class loader.

string

getIncludePath()

Gets the base include path for all class files in the namespace of this class loader.

string

getNamespaceSeparator()

Gets the namespace separator used by classes in the namespace of this class loader.

boolean

loadClass(mixed className, string classname)

Loads the given class or interface.

void

register()

Installs this class loader on the SPL autoload stack.

void

setFileExtension(string fileExtension)

Sets the file extension of class files in the namespace of this class loader.

void

setIncludePath(string includePath)

Sets the base include path for all class files in the namespace of this class loader.

void

setNamespaceSeparator(string sep)

Sets the namespace separator used by classes in the namespace of this class loader.

void

unregister()

Uninstalls this class loader on the SPL autoload stack.

+ +

Constructor Detail

+
/Doctrine/Common/ClassLoader.php at line 49
+

ClassLoader

+public ClassLoader(string ns, mixed includePath) +
+

Creates a new ClassLoader that loads classes of the +specified namespace.

+
Parameters:
+
ns - The namespace to use.
+
+
+ +
+ +

Method Detail

+
/Doctrine/Common/ClassLoader.php at line 110
+

getFileExtension

+public string getFileExtension() +
+

Gets the file extension of class files in the namespace of this class loader.

+ +
+ +
/Doctrine/Common/ClassLoader.php at line 90
+

getIncludePath

+public string getIncludePath() +
+

Gets the base include path for all class files in the namespace of this class loader.

+ +
+ +
/Doctrine/Common/ClassLoader.php at line 70
+

getNamespaceSeparator

+public string getNamespaceSeparator() +
+

Gets the namespace separator used by classes in the namespace of this class loader.

+ +
+ +
/Doctrine/Common/ClassLoader.php at line 137
+

loadClass

+public boolean loadClass(mixed className, string classname) +
+

Loads the given class or interface.

+
Parameters:
+
classname - The name of the class to load.
+
Returns:
+
TRUE if the class has been successfully loaded, FALSE otherwise.
+
+
+ +
+ +
/Doctrine/Common/ClassLoader.php at line 118
+

register

+public void register() +
+

Installs this class loader on the SPL autoload stack.

+ +
+ +
/Doctrine/Common/ClassLoader.php at line 100
+

setFileExtension

+public void setFileExtension(string fileExtension) +
+

Sets the file extension of class files in the namespace of this class loader.

+ +
+ +
/Doctrine/Common/ClassLoader.php at line 80
+

setIncludePath

+public void setIncludePath(string includePath) +
+

Sets the base include path for all class files in the namespace of this class loader.

+ +
+ +
/Doctrine/Common/ClassLoader.php at line 60
+

setNamespaceSeparator

+public void setNamespaceSeparator(string sep) +
+

Sets the namespace separator used by classes in the namespace of this class loader.

+
Parameters:
+
sep - The separator to use.
+
+
+ +
+ +
/Doctrine/Common/ClassLoader.php at line 126
+

unregister

+public void unregister() +
+

Uninstalls this class loader on the SPL autoload stack.

+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/common/collections/arraycollection.html b/lib/api/doctrine/common/collections/arraycollection.html new file mode 100644 index 000000000..981438d8d --- /dev/null +++ b/lib/api/doctrine/common/collections/arraycollection.html @@ -0,0 +1,567 @@ + + + + + + + + + + + +ArrayCollection (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +
Doctrine\Common\Collections\ArrayCollection
+
/Doctrine/Common/Collections/ArrayCollection.php at line 38
+ +

Class ArrayCollection

+ +
ArrayCollection
+ +
+ +

public class ArrayCollection

+ +

An ArrayCollection is a Collection implementation that uses a regular PHP array +internally.

+ +
+
License:
+
http://www.opensource.org/licenses/lgpl-license.php LGPL
+
See Also:
+
www.doctrine-project.org
+
Since:
+
2.0
+
Version:
+
$Revision: 3938 $
+
Author:
+
Guilherme Blanco
+
Jonathan Wage
+
Roman Borschel
+
+
+ + + + + + +
Constructor Summary

ArrayCollection(array elements)

Initializes a new ArrayCollection.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Method Summary
boolean

add(mixed value)

Adds an element to the collection.

void

clear()

Clears the collection.

boolean

contains(mixed element)

Checks whether the given element is contained in the collection. +

boolean

containsKey(mixed key)

Checks whether the collection contains a specific key/index.

integer

count()

Returns the number of elements in the collection. +

mixed

current()

Gets the element of the collection at the current internal iterator position.

boolean

exists(Closure p)

Tests for the existance of an element that satisfies the given predicate.

Collection

filter(Closure p)

Returns all the elements of this collection that satisfy the predicate p. +

mixed

first()

Sets the internal iterator to the first element in the collection and +returns this element.

boolean

forAll(Closure p)

Applies the given predicate p to all elements of this collection, +returning true, if the predicate yields true for all elements.

mixed

get(mixed key)

Gets the element with the given key/index.

ArrayIterator

getIterator()

Gets an iterator for iterating over the elements in the collection.

array

getKeys()

Gets all keys/indexes of the collection elements.

array

getValues()

Gets all elements.

mixed

indexOf(mixed element)

Searches for a given element and, if found, returns the corresponding key/index +of that element.

boolean

isEmpty()

Checks whether the collection is empty. +

mixed

key()

Gets the current key/index at the current internal iterator position.

mixed

last()

Sets the internal iterator to the last element in the collection and +returns this element.

Collection

map(Closure func)

Applies the given function to each element in the collection and returns +a new collection with the elements returned by the function.

mixed

next()

Moves the internal iterator position to the next element.

void

offsetExists(mixed offset)

ArrayAccess implementation of offsetExists()

void

offsetGet(mixed offset)

ArrayAccess implementation of offsetGet()

void

offsetSet(mixed offset, mixed value)

ArrayAccess implementation of offsetGet()

void

offsetUnset(mixed offset)

ArrayAccess implementation of offsetUnset()

array

partition(Closure p)

Partitions this collection in two collections according to a predicate. +

mixed

remove(mixed key)

Removes an element with a specific key/index from the collection.

boolean

removeElement(mixed element)

Removes the specified element from the collection, if it is found.

void

set(mixed key, mixed value)

Adds/sets an element in the collection at the index / with the specified key. +

array

toArray()

Gets the PHP array representation of this collection.

+ +

Constructor Detail

+
/Doctrine/Common/Collections/ArrayCollection.php at line 53
+

ArrayCollection

+public ArrayCollection(array elements) +
+

Initializes a new ArrayCollection.

+ +
+ +

Method Detail

+
/Doctrine/Common/Collections/ArrayCollection.php at line 321
+

add

+public boolean add(mixed value) +
+

Adds an element to the collection.

+
Returns:
+
Always TRUE.
+
+
+ +
+ +
/Doctrine/Common/Collections/ArrayCollection.php at line 426
+

clear

+public void clear() +
+

Clears the collection.

+ +
+ +
/Doctrine/Common/Collections/ArrayCollection.php at line 223
+

contains

+public boolean contains(mixed element) +
+

Checks whether the given element is contained in the collection. +Only element values are compared, not keys. The comparison of two elements +is strict, that means not only the value but also the type must match. +For objects this means reference equality.

+
Returns:
+
TRUE if the given element is contained in the collection, FALSE otherwise.
+
+
+ +
+ +
/Doctrine/Common/Collections/ArrayCollection.php at line 208
+

containsKey

+public boolean containsKey(mixed key) +
+

Checks whether the collection contains a specific key/index.

+
Parameters:
+
key - The key to check for.
+
Returns:
+
TRUE if the given key/index exists, FALSE otherwise.
+
+
+ +
+ +
/Doctrine/Common/Collections/ArrayCollection.php at line 296
+

count

+public integer count() +
+

Returns the number of elements in the collection.

Implementation of the Countable interface.

+
Returns:
+
The number of elements in the collection.
+
+
+ +
+ +
/Doctrine/Common/Collections/ArrayCollection.php at line 115
+

current

+public mixed current() +
+

Gets the element of the collection at the current internal iterator position.

+ +
+ +
/Doctrine/Common/Collections/ArrayCollection.php at line 234
+

exists

+public boolean exists(Closure p) +
+

Tests for the existance of an element that satisfies the given predicate.

+
Parameters:
+
p - The predicate.
+
Returns:
+
TRUE if the predicate is TRUE for at least one element, FALSE otherwise.
+
+
+ +
+ +
/Doctrine/Common/Collections/ArrayCollection.php at line 368
+

filter

+public Collection filter(Closure p) +
+

Returns all the elements of this collection that satisfy the predicate p. +The order of the elements is preserved.

+
Parameters:
+
p - The predicate used for filtering.
+
Returns:
+
A collection with the results of the filter operation.
+
+
+ +
+ +
/Doctrine/Common/Collections/ArrayCollection.php at line 74
+

first

+public mixed first() +
+

Sets the internal iterator to the first element in the collection and +returns this element.

+ +
+ +
/Doctrine/Common/Collections/ArrayCollection.php at line 380
+

forAll

+public boolean forAll(Closure p) +
+

Applies the given predicate p to all elements of this collection, +returning true, if the predicate yields true for all elements.

+
Parameters:
+
p - The predicate.
+
Returns:
+
TRUE, if the predicate yields TRUE for all elements, FALSE otherwise.
+
+
+ +
+ +
/Doctrine/Common/Collections/ArrayCollection.php at line 261
+

get

+public mixed get(mixed key) +
+

Gets the element with the given key/index.

+
Parameters:
+
key - The key.
+
Returns:
+
The element or NULL, if no element exists for the given key.
+
+
+ +
+ +
/Doctrine/Common/Collections/ArrayCollection.php at line 344
+

getIterator

+public ArrayIterator getIterator() +
+

Gets an iterator for iterating over the elements in the collection.

+ +
+ +
/Doctrine/Common/Collections/ArrayCollection.php at line 274
+

getKeys

+public array getKeys() +
+

Gets all keys/indexes of the collection elements.

+ +
+ +
/Doctrine/Common/Collections/ArrayCollection.php at line 284
+

getValues

+public array getValues() +
+

Gets all elements.

+ +
+ +
/Doctrine/Common/Collections/ArrayCollection.php at line 250
+

indexOf

+public mixed indexOf(mixed element) +
+

Searches for a given element and, if found, returns the corresponding key/index +of that element. The comparison of two elements is strict, that means not +only the value but also the type must match. +For objects this means reference equality.

+
Parameters:
+
element - The element to search for.
+
Returns:
+
The key/index of the element or FALSE if the element was not found.
+
+
+ +
+ +
/Doctrine/Common/Collections/ArrayCollection.php at line 334
+

isEmpty

+public boolean isEmpty() +
+

Checks whether the collection is empty.

Note: This is preferrable over count() == 0.

+
Returns:
+
TRUE if the collection is empty, FALSE otherwise.
+
+
+ +
+ +
/Doctrine/Common/Collections/ArrayCollection.php at line 95
+

key

+public mixed key() +
+

Gets the current key/index at the current internal iterator position.

+ +
+ +
/Doctrine/Common/Collections/ArrayCollection.php at line 85
+

last

+public mixed last() +
+

Sets the internal iterator to the last element in the collection and +returns this element.

+ +
+ +
/Doctrine/Common/Collections/ArrayCollection.php at line 356
+

map

+public Collection map(Closure func) +
+

Applies the given function to each element in the collection and returns +a new collection with the elements returned by the function.

+ +
+ +
/Doctrine/Common/Collections/ArrayCollection.php at line 105
+

next

+public mixed next() +
+

Moves the internal iterator position to the next element.

+ +
+ +
/Doctrine/Common/Collections/ArrayCollection.php at line 163
+

offsetExists

+public void offsetExists(mixed offset) +
+

ArrayAccess implementation of offsetExists()

+
See Also:
+
containsKey()
+
+
+ +
+ +
/Doctrine/Common/Collections/ArrayCollection.php at line 173
+

offsetGet

+public void offsetGet(mixed offset) +
+

ArrayAccess implementation of offsetGet()

+
See Also:
+
get()
+
+
+ +
+ +
/Doctrine/Common/Collections/ArrayCollection.php at line 184
+

offsetSet

+public void offsetSet(mixed offset, mixed value) +
+

ArrayAccess implementation of offsetGet()

+
See Also:
+
add()
+
set()
+
+
+ +
+ +
/Doctrine/Common/Collections/ArrayCollection.php at line 197
+

offsetUnset

+public void offsetUnset(mixed offset) +
+

ArrayAccess implementation of offsetUnset()

+
See Also:
+
remove()
+
+
+ +
+ +
/Doctrine/Common/Collections/ArrayCollection.php at line 400
+

partition

+public array partition(Closure p) +
+

Partitions this collection in two collections according to a predicate. +Keys are preserved in the resulting collections.

+
Parameters:
+
p - The predicate on which to partition.
+
Returns:
+
An array with two elements. The first element contains the collection of elements where the predicate returned TRUE, the second element contains the collection of elements where the predicate returned FALSE.
+
+
+ +
+ +
/Doctrine/Common/Collections/ArrayCollection.php at line 126
+

remove

+public mixed remove(mixed key) +
+

Removes an element with a specific key/index from the collection.

+ +
+ +
/Doctrine/Common/Collections/ArrayCollection.php at line 144
+

removeElement

+public boolean removeElement(mixed element) +
+

Removes the specified element from the collection, if it is found.

+ +
+ +
/Doctrine/Common/Collections/ArrayCollection.php at line 310
+

set

+public void set(mixed key, mixed value) +
+

Adds/sets an element in the collection at the index / with the specified key.

When the collection is a Map this is like put(key,value)/add(key,value). +When the collection is a List this is like add(position,value).

+ +
+ +
/Doctrine/Common/Collections/ArrayCollection.php at line 63
+

toArray

+public array toArray() +
+

Gets the PHP array representation of this collection.

+
Returns:
+
The PHP array representation of this collection.
+
+
+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/common/collections/collection.html b/lib/api/doctrine/common/collections/collection.html new file mode 100644 index 000000000..2f1b2c91b --- /dev/null +++ b/lib/api/doctrine/common/collections/collection.html @@ -0,0 +1,485 @@ + + + + + + + + + + + +Collection (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +
Doctrine\Common\Collections\Collection
+
/Doctrine/Common/Collections/Collection.php at line 51
+ +

Interface Collection

+ +
Class:Collection - Superclass: Countable
+Countable
⌊ Collection
+ +
+ +

public interface Collection
extends Countable + +

+ +

The missing (SPL) Collection/Array/OrderedMap interface.

A Collection resembles the nature of a regular PHP array. That is, +it is essentially an ordered map that can also be used +like a list.

A Collection has an internal iterator just like a PHP array. In addition, +a Collection can be iterated with external iterators, which is preferrable. +To use an external iterator simply use the foreach language construct to +iterate over the collection (which calls getIterator() internally) or +explicitly retrieve an iterator though getIterator() which can then be +used to iterate over the collection. +You can not rely on the internal iterator of the collection being at a certain +position unless you explicitly positioned it before. Prefer iteration with +external iterators.

+ +
+
License:
+
http://www.opensource.org/licenses/lgpl-license.php LGPL
+
See Also:
+
www.doctrine-project.org
+
Since:
+
2.0
+
Version:
+
$Revision: 3938 $
+
Author:
+
Guilherme Blanco
+
Jonathan Wage
+
Roman Borschel
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Method Summary
boolean

add(mixed element)

Adds an element at the end of the collection.

void

clear()

Clears the collection, removing all elements.

boolean

contains(mixed element)

Checks whether an element is contained in the collection. +

boolean

containsKey(string|integer key)

Checks whether the collection contains an element with the specified key/index.

void

current()

Gets the element of the collection at the current iterator position.

boolean

exists(Closure p)

Tests for the existence of an element that satisfies the given predicate.

Collection

filter(Closure p)

Returns all the elements of this collection that satisfy the predicate p. +

mixed

first()

Sets the internal iterator to the first element in the collection and +returns this element.

boolean

forAll(Closure p)

Applies the given predicate p to all elements of this collection, +returning true, if the predicate yields true for all elements.

mixed

get(string|integer key)

Gets the element at the specified key/index.

array

getKeys()

Gets all keys/indices of the collection.

array

getValues()

Gets all values of the collection.

mixed

indexOf(mixed element)

Gets the index/key of a given element.

boolean

isEmpty()

Checks whether the collection is empty (contains no elements).

void

key()

Gets the key/index of the element at the current iterator position.

mixed

last()

Sets the internal iterator to the last element in the collection and +returns this element.

Collection

map(Closure func)

Applies the given function to each element in the collection and returns +a new collection with the elements returned by the function.

void

next()

Moves the internal iterator position to the next element.

array

partition(Closure p)

Partitions this collection in two collections according to a predicate. +

mixed

remove(string|integer key)

Removes the element at the specified index from the collection.

mixed

removeElement(mixed element)

Removes an element from the collection.

void

set(string|integer key, mixed value)

Sets an element in the collection at the specified key/index.

array

toArray()

Gets a native PHP array representation of the collection.

+ +

Method Detail

+
/Doctrine/Common/Collections/Collection.php at line 59
+

add

+public boolean add(mixed element) +
+

Adds an element at the end of the collection.

+
Parameters:
+
element - The element to add.
+
Returns:
+
Always TRUE.
+
+
+ +
+ +
/Doctrine/Common/Collections/Collection.php at line 64
+

clear

+public void clear() +
+

Clears the collection, removing all elements.

+ +
+ +
/Doctrine/Common/Collections/Collection.php at line 73
+

contains

+public boolean contains(mixed element) +
+

Checks whether an element is contained in the collection. +This is an O(n) operation, where n is the size of the collection.

+
Parameters:
+
element - The element to search for.
+
Returns:
+
TRUE if the collection contains the element, FALSE otherwise.
+
+
+ +
+ +
/Doctrine/Common/Collections/Collection.php at line 105
+

containsKey

+public boolean containsKey(string|integer key) +
+

Checks whether the collection contains an element with the specified key/index.

+
Parameters:
+
key - The key/index to check for.
+
Returns:
+
TRUE if the collection contains an element with the specified key/index, FALSE otherwise.
+
+
+ +
+ +
/Doctrine/Common/Collections/Collection.php at line 172
+

current

+public void current() +
+

Gets the element of the collection at the current iterator position.

+ +
+ +
/Doctrine/Common/Collections/Collection.php at line 186
+

exists

+public boolean exists(Closure p) +
+

Tests for the existence of an element that satisfies the given predicate.

+
Parameters:
+
p - The predicate.
+
Returns:
+
TRUE if the predicate is TRUE for at least one element, FALSE otherwise.
+
+
+ +
+ +
/Doctrine/Common/Collections/Collection.php at line 195
+

filter

+public Collection filter(Closure p) +
+

Returns all the elements of this collection that satisfy the predicate p. +The order of the elements is preserved.

+
Parameters:
+
p - The predicate used for filtering.
+
Returns:
+
A collection with the results of the filter operation.
+
+
+ +
+ +
/Doctrine/Common/Collections/Collection.php at line 152
+

first

+public mixed first() +
+

Sets the internal iterator to the first element in the collection and +returns this element.

+ +
+ +
/Doctrine/Common/Collections/Collection.php at line 204
+

forAll

+public boolean forAll(Closure p) +
+

Applies the given predicate p to all elements of this collection, +returning true, if the predicate yields true for all elements.

+
Parameters:
+
p - The predicate.
+
Returns:
+
TRUE, if the predicate yields TRUE for all elements, FALSE otherwise.
+
+
+ +
+ +
/Doctrine/Common/Collections/Collection.php at line 113
+

get

+public mixed get(string|integer key) +
+

Gets the element at the specified key/index.

+
Parameters:
+
key - The key/index of the element to retrieve.
+
+
+ +
+ +
/Doctrine/Common/Collections/Collection.php at line 121
+

getKeys

+public array getKeys() +
+

Gets all keys/indices of the collection.

+
Returns:
+
The keys/indices of the collection, in the order of the corresponding elements in the collection.
+
+
+ +
+ +
/Doctrine/Common/Collections/Collection.php at line 129
+

getValues

+public array getValues() +
+

Gets all values of the collection.

+
Returns:
+
The values of all elements in the collection, in the order they appear in the collection.
+
+
+ +
+ +
/Doctrine/Common/Collections/Collection.php at line 234
+

indexOf

+public mixed indexOf(mixed element) +
+

Gets the index/key of a given element. The comparison of two elements is strict, +that means not only the value but also the type must match. +For objects this means reference equality.

+
Parameters:
+
element - The element to search for.
+
Returns:
+
The key/index of the element or FALSE if the element was not found.
+
+
+ +
+ +
/Doctrine/Common/Collections/Collection.php at line 80
+

isEmpty

+public boolean isEmpty() +
+

Checks whether the collection is empty (contains no elements).

+
Returns:
+
TRUE if the collection is empty, FALSE otherwise.
+
+
+ +
+ +
/Doctrine/Common/Collections/Collection.php at line 166
+

key

+public void key() +
+

Gets the key/index of the element at the current iterator position.

+ +
+ +
/Doctrine/Common/Collections/Collection.php at line 160
+

last

+public mixed last() +
+

Sets the internal iterator to the last element in the collection and +returns this element.

+ +
+ +
/Doctrine/Common/Collections/Collection.php at line 213
+

map

+public Collection map(Closure func) +
+

Applies the given function to each element in the collection and returns +a new collection with the elements returned by the function.

+ +
+ +
/Doctrine/Common/Collections/Collection.php at line 178
+

next

+public void next() +
+

Moves the internal iterator position to the next element.

+ +
+ +
/Doctrine/Common/Collections/Collection.php at line 224
+

partition

+public array partition(Closure p) +
+

Partitions this collection in two collections according to a predicate. +Keys are preserved in the resulting collections.

+
Parameters:
+
p - The predicate on which to partition.
+
Returns:
+
An array with two elements. The first element contains the collection of elements where the predicate returned TRUE, the second element contains the collection of elements where the predicate returned FALSE.
+
+
+ +
+ +
/Doctrine/Common/Collections/Collection.php at line 88
+

remove

+public mixed remove(string|integer key) +
+

Removes the element at the specified index from the collection.

+
Parameters:
+
key - The kex/index of the element to remove.
+
Returns:
+
The removed element or NULL, if the collection did not contain the element.
+
+
+ +
+ +
/Doctrine/Common/Collections/Collection.php at line 96
+

removeElement

+public mixed removeElement(mixed element) +
+

Removes an element from the collection.

+
Parameters:
+
element - The element to remove.
+
Returns:
+
The removed element or NULL, if the collection did not contain the element.
+
+
+ +
+ +
/Doctrine/Common/Collections/Collection.php at line 137
+

set

+public void set(string|integer key, mixed value) +
+

Sets an element in the collection at the specified key/index.

+
Parameters:
+
key - The key/index of the element to set.
+
value - The element to set.
+
+
+ +
+ +
/Doctrine/Common/Collections/Collection.php at line 144
+

toArray

+public array toArray() +
+

Gets a native PHP array representation of the collection.

+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/common/collections/package-frame.html b/lib/api/doctrine/common/collections/package-frame.html new file mode 100644 index 000000000..31a75ca48 --- /dev/null +++ b/lib/api/doctrine/common/collections/package-frame.html @@ -0,0 +1,31 @@ + + + + + + + + + + + +Doctrine\Common\Collections (Doctrine) + + + + +

Doctrine\Common\Collections

+ +

Classes

+ + +

Interfaces

+ + + + + \ No newline at end of file diff --git a/lib/api/doctrine/common/collections/package-functions.html b/lib/api/doctrine/common/collections/package-functions.html new file mode 100644 index 000000000..735f5ea1a --- /dev/null +++ b/lib/api/doctrine/common/collections/package-functions.html @@ -0,0 +1,69 @@ + + + + + + + + + + + +Functions (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +

Functions

+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/common/collections/package-globals.html b/lib/api/doctrine/common/collections/package-globals.html new file mode 100644 index 000000000..243465f89 --- /dev/null +++ b/lib/api/doctrine/common/collections/package-globals.html @@ -0,0 +1,69 @@ + + + + + + + + + + + +Globals (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +

Globals

+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/common/collections/package-summary.html b/lib/api/doctrine/common/collections/package-summary.html new file mode 100644 index 000000000..3b47f23df --- /dev/null +++ b/lib/api/doctrine/common/collections/package-summary.html @@ -0,0 +1,71 @@ + + + + + + + + + + + +Doctrine\Common\Collections (Doctrine) + + + + +
+

Doctrine

+ +
+ + +
+ +

Namespace Doctrine\Common\Collections

+ + + + +
Class Summary
ArrayCollectionAn ArrayCollection is a Collection implementation that uses a regular PHP array +internally.
+ + + + +
Interface Summary
CollectionThe missing (SPL) Collection/Array/OrderedMap interface. +
+ +
+ +
+

Doctrine

+ +
+ + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/common/collections/package-tree.html b/lib/api/doctrine/common/collections/package-tree.html new file mode 100644 index 000000000..f10ab9cdb --- /dev/null +++ b/lib/api/doctrine/common/collections/package-tree.html @@ -0,0 +1,56 @@ + + + + + + + + + + + +Doctrine\Common\Collections (Doctrine) + + + + +
+

Doctrine

+ +
+ + +

Class Hierarchy for Package Doctrine\Common\Collections

+
+

Doctrine

+ +
+ + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/common/commonexception.html b/lib/api/doctrine/common/commonexception.html new file mode 100644 index 000000000..465f01f2d --- /dev/null +++ b/lib/api/doctrine/common/commonexception.html @@ -0,0 +1,87 @@ + + + + + + + + + + + +CommonException (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +
Doctrine\Common\CommonException
+
/Doctrine/Common/CommonException.php at line 10
+ +

Class CommonException

+ +
Class:CommonException - Superclass: Exception
+Exception
⌊ CommonException
+ +
+ +

public class CommonException
extends Exception + +

+ +

Base exception class for package Doctrine\Common

+ +
+
Author:
+
heinrich /
+
+
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/common/eventargs.html b/lib/api/doctrine/common/eventargs.html new file mode 100644 index 000000000..6e962977d --- /dev/null +++ b/lib/api/doctrine/common/eventargs.html @@ -0,0 +1,122 @@ + + + + + + + + + + + +EventArgs (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +
Doctrine\Common\EventArgs
+
/Doctrine/Common/EventArgs.php at line 39
+ +

Class EventArgs

+ +
EventArgs
+ +
+ +

public class EventArgs

+ +

EventArgs is the base class for classes containing event data.

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 getEmptyInstance.

+ +
+
License:
+
http://www.opensource.org/licenses/lgpl-license.php LGPL
+
See Also:
+
www.doctrine-project.org
+
Since:
+
2.0
+
Version:
+
$Revision: 3938 $
+
Author:
+
Guilherme Blanco
+
Jonathan Wage
+
Roman Borschel
+
+
+ + + + + + + +
Method Summary
static EventArgs

getEmptyInstance()

Gets the single, empty and immutable EventArgs instance. +

+ +

Method Detail

+
/Doctrine/Common/EventArgs.php at line 61
+

getEmptyInstance

+public static EventArgs getEmptyInstance() +
+

Gets the single, empty and immutable EventArgs instance.

This instance will be used when events are dispatched without any parameter, +like this: EventManager::dispatchEvent('eventname');

The benefit from this is that only one empty instance is instantiated and shared +(otherwise there would be instances for every dispatched in the abovementioned form)

+
See Also:
+
EventManager::dispatchEvent
+
See Also:
+
http://msdn.microsoft.com/en-us/library/system.eventargs.aspx
+
+
+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/common/eventmanager.html b/lib/api/doctrine/common/eventmanager.html new file mode 100644 index 000000000..87c6a48bf --- /dev/null +++ b/lib/api/doctrine/common/eventmanager.html @@ -0,0 +1,198 @@ + + + + + + + + + + + +EventManager (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +
Doctrine\Common\EventManager
+
/Doctrine/Common/EventManager.php at line 39
+ +

Class EventManager

+ +
EventManager
+ +
+ +

public class EventManager

+ +

The EventManager is the central point of Doctrine's event listener system. +Listeners are registered on the manager and events are dispatched through the +manager.

+ +
+
License:
+
http://www.opensource.org/licenses/lgpl-license.php LGPL
+
See Also:
+
www.doctrine-project.org
+
Since:
+
2.0
+
Version:
+
$Revision: 3938 $
+
Author:
+
Guilherme Blanco
+
Jonathan Wage
+
Roman Borschel
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
Method Summary
void

addEventListener(string|array events, object listener)

Adds an event listener that listens on the specified events.

void

addEventSubscriber(Doctrine\Common\EventSubscriber subscriber)

Adds an EventSubscriber.

boolean

dispatchEvent(string eventName, EventArgs eventArgs)

Dispatches an event to all registered listeners.

array

getListeners(string event)

Gets the listeners of a specific event or all listeners.

boolean

hasListeners(string event)

Checks whether an event has any registered listeners.

void

removeEventListener(string|array events, object listener)

Removes an event listener from the specified events.

+ +

Method Detail

+
/Doctrine/Common/EventManager.php at line 97
+

addEventListener

+public void addEventListener(string|array events, object listener) +
+

Adds an event listener that listens on the specified events.

+
Parameters:
+
events - The event(s) to listen on.
+
listener - The listener object.
+
+
+ +
+ +
/Doctrine/Common/EventManager.php at line 134
+

addEventSubscriber

+public void addEventSubscriber(Doctrine\Common\EventSubscriber subscriber) +
+

Adds an EventSubscriber. The subscriber is asked for all the events he is +interested in and added as a listener for these events.

+
Parameters:
+
subscriber - The subscriber.
+
+
+ +
+ +
/Doctrine/Common/EventManager.php at line 58
+

dispatchEvent

+public boolean dispatchEvent(string eventName, EventArgs eventArgs) +
+

Dispatches an event to all registered listeners.

+
Parameters:
+
eventName - The name of the event to dispatch. The name of the event is the name of the method that is invoked on listeners.
+
eventArgs - The event arguments to pass to the event handlers/listeners. If not supplied, the single empty EventArgs instance is used.
+
+
+ +
+ +
/Doctrine/Common/EventManager.php at line 75
+

getListeners

+public array getListeners(string event) +
+

Gets the listeners of a specific event or all listeners.

+
Parameters:
+
event - The name of the event.
+
Returns:
+
The event listeners for the specified event, or all event listeners.
+
+
+ +
+ +
/Doctrine/Common/EventManager.php at line 86
+

hasListeners

+public boolean hasListeners(string event) +
+

Checks whether an event has any registered listeners.

+
Returns:
+
TRUE if the specified event has any listeners, FALSE otherwise.
+
+
+ +
+ +
/Doctrine/Common/EventManager.php at line 115
+

removeEventListener

+public void removeEventListener(string|array events, object listener) +
+

Removes an event listener from the specified events.

+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/common/eventsubscriber.html b/lib/api/doctrine/common/eventsubscriber.html new file mode 100644 index 000000000..f7c767f1a --- /dev/null +++ b/lib/api/doctrine/common/eventsubscriber.html @@ -0,0 +1,112 @@ + + + + + + + + + + + +EventSubscriber (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +
Doctrine\Common\EventSubscriber
+
/Doctrine/Common/EventSubscriber.php at line 37
+ +

Interface EventSubscriber

+ +
EventSubscriber
+ +
+ +

public interface EventSubscriber

+ +

An EventSubscriber knows himself what events he is interested in. +If an EventSubscriber is added to an EventManager, the manager invokes +getSubscribedEvents and registers the subscriber as a listener for all +returned events.

+ +
+
License:
+
http://www.opensource.org/licenses/lgpl-license.php LGPL
+
See Also:
+
www.doctrine-project.org
+
Since:
+
2.0
+
Author:
+
Guilherme Blanco
+
Jonathan Wage
+
Roman Borschel
+
+
+ + + + + + + +
Method Summary
array

getSubscribedEvents()

Returns an array of events this subscriber wants to listen to.

+ +

Method Detail

+
/Doctrine/Common/EventSubscriber.php at line 44
+

getSubscribedEvents

+public array getSubscribedEvents() +
+

Returns an array of events this subscriber wants to listen to.

+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/common/lexer.html b/lib/api/doctrine/common/lexer.html new file mode 100644 index 000000000..1328d3f29 --- /dev/null +++ b/lib/api/doctrine/common/lexer.html @@ -0,0 +1,313 @@ + + + + + + + + + + + +Lexer (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +
Doctrine\Common\Lexer
+
/Doctrine/Common/Lexer.php at line 35
+ +

Class Lexer

+ +
Lexer
+ +
+ +

public abstract class Lexer

+ +

Simple generic lexical scanner.

+ +
+
License:
+
http://www.opensource.org/licenses/lgpl-license.php LGPL
+
See Also:
+
www.doctrine-project.org
+
Since:
+
2.0
+
Version:
+
$Revision: 3938 $
+
Author:
+
Guilherme Blanco
+
Jonathan Wage
+
Roman Borschel
+
+
+ + + + + + + + + + + +
Field Summary
array The next token in the query string.

$lookahead

array The last matched/seen token.

$token

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Method Summary
protected abstract array

getCatchablePatterns()

Lexical catchable patterns

string

getLiteral(integer token)

Gets the literal for a given token.

protected abstract array

getNonCatchablePatterns()

Lexical non-catchable patterns

array|null

glimpse()

Peeks at the next token, returns it and immediately resets the peek.

boolean

isA(mixed value, integer token)

Checks if given value is identical to the given token

boolean

isNextToken(integer|string token)

Checks whether a given token matches the current lookahead.

array|null

moveNext()

Moves to the next token in the input string. +

array

peek()

Moves the lookahead token forward.

void

reset()

Resets the scanner

void

resetPeek()

Resets the peek pointer to 0

void

resetPosition(integer position)

Resets the lexer position on the input to the given position

void

setInput(string input)

Inputs data to be tokenized

void

skipUntil(mixed type, $type The)

Tells the lexer to skip input tokens until it sees a token with the given value.

+ +

Field Detail

+
/Doctrine/Common/Lexer.php at line 55
+

lookahead

+public array The next token in the query string. $lookahead +
+

+ +
+ +
/Doctrine/Common/Lexer.php at line 60
+

token

+public array The last matched/seen token. $token +
+

+ +
+ +

Method Detail

+
/Doctrine/Common/Lexer.php at line 242
+

getCatchablePatterns

+protected abstract array getCatchablePatterns() +
+

Lexical catchable patterns

+ +
+ +
/Doctrine/Common/Lexer.php at line 222
+

getLiteral

+public string getLiteral(integer token) +
+

Gets the literal for a given token.

+ +
+ +
/Doctrine/Common/Lexer.php at line 249
+

getNonCatchablePatterns

+protected abstract array getNonCatchablePatterns() +
+

Lexical non-catchable patterns

+ +
+ +
/Doctrine/Common/Lexer.php at line 180
+

glimpse

+public array|null glimpse() +
+

Peeks at the next token, returns it and immediately resets the peek.

+
Returns:
+
The next token or NULL if there are no more tokens ahead.
+
+
+ +
+ +
/Doctrine/Common/Lexer.php at line 156
+

isA

+public boolean isA(mixed value, integer token) +
+

Checks if given value is identical to the given token

+ +
+ +
/Doctrine/Common/Lexer.php at line 111
+

isNextToken

+public boolean isNextToken(integer|string token) +
+

Checks whether a given token matches the current lookahead.

+ +
+ +
/Doctrine/Common/Lexer.php at line 127
+

moveNext

+public array|null moveNext() +
+

Moves to the next token in the input string.

A token is an associative array containing three items: +- 'value' : the string value of the token in the input string +- 'type' : the type of the token (identifier, numeric, string, input +parameter, none) +- 'position' : the position of the token in the input string

+
Returns:
+
the next token; null if there is no more tokens left
+
+
+ +
+ +
/Doctrine/Common/Lexer.php at line 166
+

peek

+public array peek() +
+

Moves the lookahead token forward.

+
Returns:
+
| null The next token or NULL if there are no more tokens ahead.
+
+
+ +
+ +
/Doctrine/Common/Lexer.php at line 78
+

reset

+public void reset() +
+

Resets the scanner

+ +
+ +
/Doctrine/Common/Lexer.php at line 90
+

resetPeek

+public void resetPeek() +
+

Resets the peek pointer to 0

+ +
+ +
/Doctrine/Common/Lexer.php at line 100
+

resetPosition

+public void resetPosition(integer position) +
+

Resets the lexer position on the input to the given position

+
Parameters:
+
position - Position to place the lexical scanner
+
+
+ +
+ +
/Doctrine/Common/Lexer.php at line 67
+

setInput

+public void setInput(string input) +
+

Inputs data to be tokenized

+
Parameters:
+
input - input to be tokenized
+
+
+ +
+ +
/Doctrine/Common/Lexer.php at line 142
+

skipUntil

+public void skipUntil(mixed type, $type The) +
+

Tells the lexer to skip input tokens until it sees a token with the given value.

+
Parameters:
+
The - token type to skip until.
+
+
+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/common/notifypropertychanged.html b/lib/api/doctrine/common/notifypropertychanged.html new file mode 100644 index 000000000..2bfca5e5c --- /dev/null +++ b/lib/api/doctrine/common/notifypropertychanged.html @@ -0,0 +1,112 @@ + + + + + + + + + + + +NotifyPropertyChanged (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +
Doctrine\Common\NotifyPropertyChanged
+
/Doctrine/Common/NotifyPropertyChanged.php at line 36
+ +

Interface NotifyPropertyChanged

+ +
NotifyPropertyChanged
+ +
+ +

public interface NotifyPropertyChanged

+ +

Contract for classes that provide the service of notifying listeners of +changes to their properties.

+ +
+
License:
+
http://www.opensource.org/licenses/lgpl-license.php LGPL
+
See Also:
+
www.doctrine-project.org
+
Since:
+
2.0
+
Version:
+
$Revision: 3938 $
+
Author:
+
Guilherme Blanco
+
Jonathan Wage
+
Roman Borschel
+
+
+ + + + + + + +
Method Summary
void

addPropertyChangedListener(PropertyChangedListener listener)

Adds a listener that wants to be notified about property changes.

+ +

Method Detail

+
/Doctrine/Common/NotifyPropertyChanged.php at line 43
+

addPropertyChangedListener

+public void addPropertyChangedListener(PropertyChangedListener listener) +
+

Adds a listener that wants to be notified about property changes.

+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/common/package-frame.html b/lib/api/doctrine/common/package-frame.html new file mode 100644 index 000000000..ef79b7961 --- /dev/null +++ b/lib/api/doctrine/common/package-frame.html @@ -0,0 +1,42 @@ + + + + + + + + + + + +Doctrine\Common (Doctrine) + + + + +

Doctrine\Common

+ +

Classes

+ + +

Interfaces

+ + +

Exceptions

+ + + + + \ No newline at end of file diff --git a/lib/api/doctrine/common/package-functions.html b/lib/api/doctrine/common/package-functions.html new file mode 100644 index 000000000..98e2f49b4 --- /dev/null +++ b/lib/api/doctrine/common/package-functions.html @@ -0,0 +1,69 @@ + + + + + + + + + + + +Functions (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +

Functions

+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/common/package-globals.html b/lib/api/doctrine/common/package-globals.html new file mode 100644 index 000000000..1724f2224 --- /dev/null +++ b/lib/api/doctrine/common/package-globals.html @@ -0,0 +1,69 @@ + + + + + + + + + + + +Globals (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +

Globals

+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/common/package-summary.html b/lib/api/doctrine/common/package-summary.html new file mode 100644 index 000000000..cffd09628 --- /dev/null +++ b/lib/api/doctrine/common/package-summary.html @@ -0,0 +1,86 @@ + + + + + + + + + + + +Doctrine\Common (Doctrine) + + + + +
+

Doctrine

+ +
+ + +
+ +

Namespace Doctrine\Common

+ + + + + + + + +
Class Summary
ClassLoaderA ClassLoader is an autoloader for class files that can be +installed on the SPL autoload stack.
EventArgsEventArgs is the base class for classes containing event data. +
EventManagerThe EventManager is the central point of Doctrine's event listener system. +
LexerSimple generic lexical scanner.
VersionClass to store and retrieve the version of Doctrine
+ + + + + + +
Interface Summary
EventSubscriberAn EventSubscriber knows himself what events he is interested in. +
NotifyPropertyChangedContract for classes that provide the service of notifying listeners of +changes to their properties.
PropertyChangedListenerContract for classes that are potential listeners of a NotifyPropertyChanged +implementor.
+ + + + +
Exception Summary
CommonExceptionBase exception class for package Doctrine\Common
+ +
+ +
+

Doctrine

+ +
+ + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/common/package-tree.html b/lib/api/doctrine/common/package-tree.html new file mode 100644 index 000000000..50724c0ce --- /dev/null +++ b/lib/api/doctrine/common/package-tree.html @@ -0,0 +1,60 @@ + + + + + + + + + + + +Doctrine\Common (Doctrine) + + + + +
+

Doctrine

+ +
+ + +

Class Hierarchy for Package Doctrine\Common

+
+

Doctrine

+ +
+ + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/common/propertychangedlistener.html b/lib/api/doctrine/common/propertychangedlistener.html new file mode 100644 index 000000000..ed777d0e6 --- /dev/null +++ b/lib/api/doctrine/common/propertychangedlistener.html @@ -0,0 +1,119 @@ + + + + + + + + + + + +PropertyChangedListener (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +
Doctrine\Common\PropertyChangedListener
+
/Doctrine/Common/PropertyChangedListener.php at line 36
+ +

Interface PropertyChangedListener

+ +
PropertyChangedListener
+ +
+ +

public interface PropertyChangedListener

+ +

Contract for classes that are potential listeners of a NotifyPropertyChanged +implementor.

+ +
+
License:
+
http://www.opensource.org/licenses/lgpl-license.php LGPL
+
See Also:
+
www.doctrine-project.org
+
Since:
+
2.0
+
Version:
+
$Revision: 3938 $
+
Author:
+
Guilherme Blanco
+
Jonathan Wage
+
Roman Borschel
+
+
+ + + + + + + +
Method Summary
void

propertyChanged(object sender, string propertyName, mixed oldValue, mixed newValue)

Notifies the listener of a property change.

+ +

Method Detail

+
/Doctrine/Common/PropertyChangedListener.php at line 46
+

propertyChanged

+public void propertyChanged(object sender, string propertyName, mixed oldValue, mixed newValue) +
+

Notifies the listener of a property change.

+
Parameters:
+
sender - The object on which the property changed.
+
propertyName - The name of the property that changed.
+
oldValue - The old value of the property that changed.
+
newValue - The new value of the property that changed.
+
+
+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/common/util/debug.html b/lib/api/doctrine/common/util/debug.html new file mode 100644 index 000000000..91b3ec18a --- /dev/null +++ b/lib/api/doctrine/common/util/debug.html @@ -0,0 +1,147 @@ + + + + + + + + + + + +Debug (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +
Doctrine\Common\Util\Debug
+
/Doctrine/Common/Util/Debug.php at line 36
+ +

Class Debug

+ +
Debug
+ +
+ +

public final class Debug

+ +

Static class containing most used debug methods.

+ +
+
License:
+
http://www.opensource.org/licenses/lgpl-license.php LGPL
+
See Also:
+
www.doctrine-project.org
+
Since:
+
2.0
+
Version:
+
$Revision: 3938 $
+
Author:
+
Guilherme Blanco
+
Jonathan Wage
+
Roman Borschel
+
Giorgio Sironi
+
+
+ + + + + + +
Constructor Summary

Debug()

Private constructor (prevents from instantiation)

+ + + + + + + + + + + +
Method Summary
static void

dump(mixed var, integer maxDepth)

Prints a dump of the public, protected and private properties of $var.

static void

export(mixed var, mixed maxDepth)

+ +

Constructor Detail

+
/Doctrine/Common/Util/Debug.php at line 42
+

Debug

+public Debug() +
+

Private constructor (prevents from instantiation)

+ +
+ +

Method Detail

+
/Doctrine/Common/Util/Debug.php at line 52
+

dump

+public static void dump(mixed var, integer maxDepth) +
+

Prints a dump of the public, protected and private properties of $var.

+
See Also:
+
http://xdebug.org/
+
Parameters:
+
+
maxDepth - Maximum nesting level for object properties
+
+
+ +
+ +
/Doctrine/Common/Util/Debug.php at line 72
+

export

+public static void export(mixed var, mixed maxDepth) +
+
+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/common/util/inflector.html b/lib/api/doctrine/common/util/inflector.html new file mode 100644 index 000000000..a97156dfc --- /dev/null +++ b/lib/api/doctrine/common/util/inflector.html @@ -0,0 +1,152 @@ + + + + + + + + + + + +Inflector (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +
Doctrine\Common\Util\Inflector
+
/Doctrine/Common/Util/Inflector.php at line 38
+ +

Class Inflector

+ +
Inflector
+ +
+ +

public class Inflector

+ +

Doctrine inflector has static methods for inflecting text

The methods in these classes are from several different sources collected +across several different php projects and several different authors. The +original author names and emails are not known

+ +
+
License:
+
http://www.opensource.org/licenses/lgpl-license.php LGPL
+
See Also:
+
www.doctrine-project.org
+
Since:
+
1.0
+
Version:
+
$Revision: 3189 $
+
Author:
+
Konsta Vesterinen
+
Jonathan H. Wage
+
+
+ + + + + + + + + + + + + + + +
Method Summary
static string

camelize(string word)

Camelize a word.

static string

classify(string word)

Convert a word in to the format for a Doctrine class name.

static string

tableize(string word)

Convert word in to the format for a Doctrine table name.

+ +

Method Detail

+
/Doctrine/Common/Util/Inflector.php at line 68
+

camelize

+public static string camelize(string word) +
+

Camelize a word. This uses the classify() method and turns the first character to lowercase

+
Returns:
+
$word
+
+
+ +
+ +
/Doctrine/Common/Util/Inflector.php at line 57
+

classify

+public static string classify(string word) +
+

Convert a word in to the format for a Doctrine class name. Converts 'table_name' to 'TableName'

+
Parameters:
+
word - Word to classify
+
Returns:
+
$word Classified word
+
+
+ +
+ +
/Doctrine/Common/Util/Inflector.php at line 46
+

tableize

+public static string tableize(string word) +
+

Convert word in to the format for a Doctrine table name. Converts 'ModelName' to 'model_name'

+
Parameters:
+
word - Word to tableize
+
Returns:
+
$word Tableized word
+
+
+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/common/util/package-frame.html b/lib/api/doctrine/common/util/package-frame.html new file mode 100644 index 000000000..a11fa2db9 --- /dev/null +++ b/lib/api/doctrine/common/util/package-frame.html @@ -0,0 +1,27 @@ + + + + + + + + + + + +Doctrine\Common\Util (Doctrine) + + + + +

Doctrine\Common\Util

+ +

Classes

+ + + + + \ No newline at end of file diff --git a/lib/api/doctrine/common/util/package-functions.html b/lib/api/doctrine/common/util/package-functions.html new file mode 100644 index 000000000..ccd6c2f13 --- /dev/null +++ b/lib/api/doctrine/common/util/package-functions.html @@ -0,0 +1,69 @@ + + + + + + + + + + + +Functions (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +

Functions

+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/common/util/package-globals.html b/lib/api/doctrine/common/util/package-globals.html new file mode 100644 index 000000000..86b6167f3 --- /dev/null +++ b/lib/api/doctrine/common/util/package-globals.html @@ -0,0 +1,69 @@ + + + + + + + + + + + +Globals (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +

Globals

+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/common/util/package-summary.html b/lib/api/doctrine/common/util/package-summary.html new file mode 100644 index 000000000..1f9e95fbf --- /dev/null +++ b/lib/api/doctrine/common/util/package-summary.html @@ -0,0 +1,66 @@ + + + + + + + + + + + +Doctrine\Common\Util (Doctrine) + + + + +
+

Doctrine

+ +
+ + +
+ +

Namespace Doctrine\Common\Util

+ + + + + +
Class Summary
DebugStatic class containing most used debug methods.
InflectorDoctrine inflector has static methods for inflecting textThe methods in these classes are from several different sources collected +across several different php projects and several different authors.
+ +
+ +
+

Doctrine

+ +
+ + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/common/util/package-tree.html b/lib/api/doctrine/common/util/package-tree.html new file mode 100644 index 000000000..49adc51dc --- /dev/null +++ b/lib/api/doctrine/common/util/package-tree.html @@ -0,0 +1,57 @@ + + + + + + + + + + + +Doctrine\Common\Util (Doctrine) + + + + +
+

Doctrine

+ +
+ + +

Class Hierarchy for Package Doctrine\Common\Util

+
+

Doctrine

+ +
+ + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/common/version.html b/lib/api/doctrine/common/version.html new file mode 100644 index 000000000..e745e1715 --- /dev/null +++ b/lib/api/doctrine/common/version.html @@ -0,0 +1,135 @@ + + + + + + + + + + + +Version (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +
Doctrine\Common\Version
+
/Doctrine/Common/Version.php at line 36
+ +

Class Version

+ +
Version
+ +
+ +

public class Version

+ +

Class to store and retrieve the version of Doctrine

+ +
+
License:
+
http://www.opensource.org/licenses/lgpl-license.php LGPL
+
See Also:
+
www.doctrine-project.org
+
Since:
+
2.0
+
Version:
+
$Revision$
+
Author:
+
Benjamin Eberlei
+
Guilherme Blanco
+
Jonathan Wage
+
Roman Borschel
+
+
+ + + + + + + +
Field Summary
final str

VERSION

Current Doctrine Version

+ + + + + + + +
Method Summary
static int

compare(string version)

Compares a Doctrine version with the current one.

+ +

Field Detail

+
/Doctrine/Common/Version.php at line 41
+

VERSION

+public final str VERSION = '2.0-DEV' +
+

Current Doctrine Version

+ +
+ +

Method Detail

+
/Doctrine/Common/Version.php at line 50
+

compare

+public static int compare(string version) +
+

Compares a Doctrine version with the current one.

+
Parameters:
+
version - Doctrine version to compare.
+
Returns:
+
Returns -1 if older, 0 if it is the same, 1 if version passed as argument is newer.
+
+
+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/dbal/configuration.html b/lib/api/doctrine/dbal/configuration.html new file mode 100644 index 000000000..19045128a --- /dev/null +++ b/lib/api/doctrine/dbal/configuration.html @@ -0,0 +1,160 @@ + + + + + + + + + + + +Configuration (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +
Doctrine\DBAL\Configuration
+
/Doctrine/DBAL/Configuration.php at line 39
+ +

Class Configuration

+ +
Configuration
+ +
+ +

public class Configuration

+ +

Configuration container for the Doctrine DBAL.

+ +
+
License:
+
http://www.opensource.org/licenses/lgpl-license.php LGPL
+
See Also:
+
www.doctrine-project.org
+
Since:
+
2.0
+
Version:
+
$Revision: 3938 $
+
Author:
+
Guilherme Blanco
+
Jonathan Wage
+
Roman Borschel
+
Internal:
+
When adding a new configuration option just write a getter/setter pair and add the option to the _attributes array with a proper default value.
+
+
+ + + + + + + +
Field Summary
protected array

$_attributes

The attributes that are contained in the configuration. +

+ + + + + + +
Constructor Summary

Configuration()

Creates a new DBAL configuration instance.

+ + + + + + + + + + + +
Method Summary
SQLLogger

getSQLLogger()

Gets the SQL logger that is used.

void

setSQLLogger(SQLLogger logger)

Sets the SQL logger to use.

+ +

Field Detail

+
/Doctrine/DBAL/Configuration.php at line 47
+

_attributes

+protected array $_attributes = array() +
+

The attributes that are contained in the configuration. +Values are default values.

+ +
+ +

Constructor Detail

+
/Doctrine/DBAL/Configuration.php at line 52
+

Configuration

+public Configuration() +
+

Creates a new DBAL configuration instance.

+ +
+ +

Method Detail

+
/Doctrine/DBAL/Configuration.php at line 74
+

getSQLLogger

+public SQLLogger getSQLLogger() +
+

Gets the SQL logger that is used.

+ +
+ +
/Doctrine/DBAL/Configuration.php at line 64
+

setSQLLogger

+public void setSQLLogger(SQLLogger logger) +
+

Sets the SQL logger to use. Defaults to NULL which means SQL logging is disabled.

+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/dbal/connection.html b/lib/api/doctrine/dbal/connection.html new file mode 100644 index 000000000..691f75834 --- /dev/null +++ b/lib/api/doctrine/dbal/connection.html @@ -0,0 +1,996 @@ + + + + + + + + + + + +Connection (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +
Doctrine\DBAL\Connection
+
/Doctrine/DBAL/Connection.php at line 45
+ +

Class Connection

+ +
Connection
+ +
+ +

public class Connection

+ +

A wrapper around a Doctrine\DBAL\Driver\Connection that adds features like +events, transaction isolation levels, configuration, emulated transaction nesting, +lazy connecting and more.

+ +
+
License:
+
http://www.opensource.org/licenses/lgpl-license.php LGPL
+
See Also:
+
www.doctrine-project.org
+
Since:
+
2.0
+
Version:
+
$Revision: 3938 $
+
Author:
+
Guilherme Blanco
+
Jonathan Wage
+
Roman Borschel
+
Konsta Vesterinen
+
Lukas Smith (MDB2 library)
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Field Summary
final int

TRANSACTION_READ_COMMITTED

Constant for transaction isolation level READ COMMITTED.

final int

TRANSACTION_READ_UNCOMMITTED

Constant for transaction isolation level READ UNCOMMITTED.

final int

TRANSACTION_REPEATABLE_READ

Constant for transaction isolation level REPEATABLE READ.

final int

TRANSACTION_SERIALIZABLE

Constant for transaction isolation level SERIALIZABLE.

protected Doctrine\DBAL\Configuration

$_config

protected Doctrine\DBAL\Driver\Connection

$_conn

The wrapped driver connection.

protected Doctrine\DBAL\Driver

$_driver

The used DBAL driver.

protected Doctrine\Common\EventManager

$_eventManager

protected Doctrine\DBAL\Platforms\AbstractPlatform

$_platform

The DatabasePlatform object that provides information about the +database platform used by the connection.

protected Doctrine\DBAL\Schema\SchemaManager

$_schemaManager

The schema manager.

+ + + + + + +
Constructor Summary

Connection(array params, Driver driver, Configuration config, EventManager eventManager)

Initializes a new instance of the Connection class.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Method Summary
void

beginTransaction()

Starts a transaction by suspending auto-commit mode.

void

close()

Closes the connection.

void

commit()

Commits the current transaction.

boolean

connect()

Establishes the connection with the database.

mixed

convertToDatabaseValue(mixed value, string type)

Converts a given value to its database representation according to the conversion +rules of a specific DBAL mapping type.

mixed

convertToPHPValue(mixed value, string type)

Converts a given value to its PHP representation according to the conversion +rules of a specific DBAL mapping type.

integer

delete(mixed tableName, array identifier, string table)

Executes an SQL DELETE statement on a table.

integer

errorCode()

Fetch the SQLSTATE associated with the last database operation.

array

errorInfo()

Fetch extended error information associated with the last database operation.

integer

exec(string statement)

Execute an SQL statement and return the number of affected rows.

Doctrine\DBAL\Driver\Statement

executeQuery(string query, array params)

Executes an, optionally parameterized, SQL query. +

integer

executeUpdate(string query, array params, array types)

Executes an SQL INSERT/UPDATE/DELETE query with the given parameters +and returns the number of affected rows. +

array

fetchAll(string sql, array params)

Prepares and executes an SQL query and returns the result as an associative array.

array

fetchArray(string statement, array params)

Prepares and executes an SQL query and returns the first row of the result +as a numerically indexed array.

mixed

fetchColumn(string statement, array params, int colnum)

Prepares and executes an SQL query and returns the value of a single column +of the first row of the result.

array

fetchRow(string statement, array params)

Prepares and executes an SQL query and returns the first row of the result +as an associative array.

Doctrine\DBAL\Configuration

getConfiguration()

Gets the Configuration used by the Connection.

string

getDatabase()

Gets the name of the database this Connection is connected to.

Doctrine\DBAL\Platforms\AbstractPlatform

getDatabasePlatform()

Gets the DatabasePlatform for the connection.

Doctrine\DBAL\Driver

getDriver()

Gets the DBAL driver instance.

Doctrine\Common\EventManager

getEventManager()

Gets the EventManager used by the Connection.

string

getHost()

Gets the hostname of the currently connected database.

array

getParams()

Gets the parameters used during instantiation.

string

getPassword()

Gets the password used by this connection.

mixed

getPort()

Gets the port of the currently connected database.

boolean

getRollbackOnly()

Check whether the current transaction is marked for rollback only.

Doctrine\DBAL\Schema\SchemaManager

getSchemaManager()

Gets the SchemaManager that can be used to inspect or change the +database schema through the connection.

integer

getTransactionIsolation()

Gets the currently active transaction isolation level.

integer

getTransactionNestingLevel()

Returns the current transaction nesting level.

string

getUsername()

Gets the username used by this connection.

Doctrine\DBAL\Driver\Connection

getWrappedConnection()

Gets the wrapped driver connection.

integer

insert(mixed tableName, array data, string table)

Inserts a table row with specified data.

boolean

isConnected()

Whether an actual connection to the database is established.

boolean

isTransactionActive()

Checks whether a transaction is currently active.

string

lastInsertId(string seqName)

Returns the ID of the last inserted row, or the last value from a sequence object, +depending on the underlying driver. +

Doctrine\DBAL\Driver\Statement

prepare(string statement)

Prepares an SQL statement.

mixed

project(string query, array params, mixed function, Closure mapper)

Executes an, optionally parameterized, SQL query and returns the result, +applying a given projection/transformation function on each row of the result.

Doctrine\DBAL\Driver\Statement

query(string statement, integer fetchType)

Executes an SQL statement, returning a result set as a Statement object.

string

quote(mixed input, string type)

Quotes a given input parameter.

string

quoteIdentifier(string str)

Quote a string so it can be safely used as a table or column name, even if +it is a reserved name. +

void

rollback()

Cancel any database changes done during the current transaction. +

void

setCharset(string charset)

Sets the given charset on the current connection.

void

setRollbackOnly()

Marks the current transaction so that the only possible +outcome for the transaction to be rolled back.

void

setTransactionIsolation(integer level)

Sets the transaction isolation level.

integer

update(mixed tableName, mixed data, array identifier, string table)

Executes an SQL UPDATE statement on a table.

+ +

Field Detail

+
/Doctrine/DBAL/Connection.php at line 55
+

TRANSACTION_READ_COMMITTED

+public final int TRANSACTION_READ_COMMITTED = 2 +
+

Constant for transaction isolation level READ COMMITTED.

+ +
+ +
/Doctrine/DBAL/Connection.php at line 50
+

TRANSACTION_READ_UNCOMMITTED

+public final int TRANSACTION_READ_UNCOMMITTED = 1 +
+

Constant for transaction isolation level READ UNCOMMITTED.

+ +
+ +
/Doctrine/DBAL/Connection.php at line 60
+

TRANSACTION_REPEATABLE_READ

+public final int TRANSACTION_REPEATABLE_READ = 3 +
+

Constant for transaction isolation level REPEATABLE READ.

+ +
+ +
/Doctrine/DBAL/Connection.php at line 65
+

TRANSACTION_SERIALIZABLE

+public final int TRANSACTION_SERIALIZABLE = 4 +
+

Constant for transaction isolation level SERIALIZABLE.

+ +
+ +
/Doctrine/DBAL/Connection.php at line 77
+

_config

+protected Doctrine\DBAL\Configuration $_config +
+

+ +
+ +
/Doctrine/DBAL/Connection.php at line 72
+

_conn

+protected Doctrine\DBAL\Driver\Connection $_conn +
+

The wrapped driver connection.

+ +
+ +
/Doctrine/DBAL/Connection.php at line 132
+

_driver

+protected Doctrine\DBAL\Driver $_driver +
+

The used DBAL driver.

+ +
+ +
/Doctrine/DBAL/Connection.php at line 82
+

_eventManager

+protected Doctrine\Common\EventManager $_eventManager +
+

+ +
+ +
/Doctrine/DBAL/Connection.php at line 118
+

_platform

+protected Doctrine\DBAL\Platforms\AbstractPlatform $_platform +
+

The DatabasePlatform object that provides information about the +database platform used by the connection.

+ +
+ +
/Doctrine/DBAL/Connection.php at line 125
+

_schemaManager

+protected Doctrine\DBAL\Schema\SchemaManager $_schemaManager +
+

The schema manager.

+ +
+ +

Constructor Detail

+
/Doctrine/DBAL/Connection.php at line 149
+

Connection

+public Connection(array params, Driver driver, Configuration config, EventManager eventManager) +
+

Initializes a new instance of the Connection class.

+
Parameters:
+
params - The connection parameters.
+
+
+
+
+
+ +
+ +

Method Detail

+
/Doctrine/DBAL/Connection.php at line 716
+

beginTransaction

+public void beginTransaction() +
+

Starts a transaction by suspending auto-commit mode.

+ +
+ +
/Doctrine/DBAL/Connection.php at line 396
+

close

+public void close() +
+

Closes the connection.

+ +
+ +
/Doctrine/DBAL/Connection.php at line 734
+

commit

+public void commit() + + +
+ +
/Doctrine/DBAL/Connection.php at line 287
+

connect

+public boolean connect() +
+

Establishes the connection with the database.

+
Returns:
+
TRUE if the connection was successfully established, FALSE if the connection is already open.
+
+
+ +
+ +
/Doctrine/DBAL/Connection.php at line 841
+

convertToDatabaseValue

+public mixed convertToDatabaseValue(mixed value, string type) +
+

Converts a given value to its database representation according to the conversion +rules of a specific DBAL mapping type.

+
Parameters:
+
value - The value to convert.
+
type - The name of the DBAL mapping type.
+
Returns:
+
The converted value.
+
+
+ +
+ +
/Doctrine/DBAL/Connection.php at line 854
+

convertToPHPValue

+public mixed convertToPHPValue(mixed value, string type) +
+

Converts a given value to its PHP representation according to the conversion +rules of a specific DBAL mapping type.

+
Parameters:
+
value - The value to convert.
+
type - The name of the DBAL mapping type.
+
Returns:
+
The converted type.
+
+
+ +
+ +
/Doctrine/DBAL/Connection.php at line 376
+

delete

+public integer delete(mixed tableName, array identifier, string table) +
+

Executes an SQL DELETE statement on a table.

+
Parameters:
+
table - The name of the table on which to delete.
+
identifier - The deletion criteria. An associateve array containing column-value pairs.
+
Returns:
+
The number of affected rows.
+
+
+ +
+ +
/Doctrine/DBAL/Connection.php at line 677
+

errorCode

+public integer errorCode() +
+

Fetch the SQLSTATE associated with the last database operation.

+
Returns:
+
The last error code.
+
+
+ +
+ +
/Doctrine/DBAL/Connection.php at line 688
+

errorInfo

+public array errorInfo() +
+

Fetch extended error information associated with the last database operation.

+
Returns:
+
The last error information.
+
+
+ +
+ +
/Doctrine/DBAL/Connection.php at line 656
+

exec

+public integer exec(string statement) +
+

Execute an SQL statement and return the number of affected rows.

+
Returns:
+
The number of affected rows.
+
+
+ +
+ +
/Doctrine/DBAL/Connection.php at line 554
+

executeQuery

+public Doctrine\DBAL\Driver\Statement executeQuery(string query, array params) +
+

Executes an, optionally parameterized, SQL query.

If the query is parameterized, a prepared statement is used. +If an SQLLogger is configured, the execution is logged.

+
Parameters:
+
query - The SQL query to execute.
+
params - The parameters to bind to the query, if any.
+
Returns:
+
The executed statement.
+
Internal:
+
PERF: Directly prepares a driver statement, not a wrapper.
+
+
+ +
+ +
/Doctrine/DBAL/Connection.php at line 626
+

executeUpdate

+public integer executeUpdate(string query, array params, array types) +
+

Executes an SQL INSERT/UPDATE/DELETE query with the given parameters +and returns the number of affected rows.

This method supports PDO binding types as well as DBAL mapping types.

+
Parameters:
+
query - The SQL query.
+
params - The query parameters.
+
types - The parameter types.
+
Returns:
+
The number of affected rows.
+
Internal:
+
PERF: Directly prepares a driver statement, not a wrapper.
+
+
+ +
+ +
/Doctrine/DBAL/Connection.php at line 525
+

fetchAll

+public array fetchAll(string sql, array params) +
+

Prepares and executes an SQL query and returns the result as an associative array.

+
Parameters:
+
sql - The SQL query.
+
params - The query parameters.
+
+
+ +
+ +
/Doctrine/DBAL/Connection.php at line 330
+

fetchArray

+public array fetchArray(string statement, array params) +
+

Prepares and executes an SQL query and returns the first row of the result +as a numerically indexed array.

+
Parameters:
+
statement - sql query to be executed
+
params - prepared statement params
+
+
+ +
+ +
/Doctrine/DBAL/Connection.php at line 344
+

fetchColumn

+public mixed fetchColumn(string statement, array params, int colnum) +
+

Prepares and executes an SQL query and returns the value of a single column +of the first row of the result.

+
Parameters:
+
statement - sql query to be executed
+
params - prepared statement params
+
colnum - 0-indexed column number to retrieve
+
+
+ +
+ +
/Doctrine/DBAL/Connection.php at line 317
+

fetchRow

+public array fetchRow(string statement, array params) +
+

Prepares and executes an SQL query and returns the first row of the result +as an associative array.

+
Parameters:
+
statement - The SQL query.
+
params - The query parameters.
+
Todo:
+
Rename: fetchAssoc
+
+
+ +
+ +
/Doctrine/DBAL/Connection.php at line 256
+

getConfiguration

+public Doctrine\DBAL\Configuration getConfiguration() +
+

Gets the Configuration used by the Connection.

+ +
+ +
/Doctrine/DBAL/Connection.php at line 196
+

getDatabase

+public string getDatabase() +
+

Gets the name of the database this Connection is connected to.

+
Returns:
+
$database
+
+
+ +
+ +
/Doctrine/DBAL/Connection.php at line 276
+

getDatabasePlatform

+public Doctrine\DBAL\Platforms\AbstractPlatform getDatabasePlatform() +
+

Gets the DatabasePlatform for the connection.

+ +
+ +
/Doctrine/DBAL/Connection.php at line 246
+

getDriver

+public Doctrine\DBAL\Driver getDriver() +
+

Gets the DBAL driver instance.

+ +
+ +
/Doctrine/DBAL/Connection.php at line 266
+

getEventManager

+public Doctrine\Common\EventManager getEventManager() +
+

Gets the EventManager used by the Connection.

+ +
+ +
/Doctrine/DBAL/Connection.php at line 206
+

getHost

+public string getHost() +
+

Gets the hostname of the currently connected database.

+ +
+ +
/Doctrine/DBAL/Connection.php at line 186
+

getParams

+public array getParams() +
+

Gets the parameters used during instantiation.

+
Returns:
+
$params
+
+
+ +
+ +
/Doctrine/DBAL/Connection.php at line 236
+

getPassword

+public string getPassword() +
+

Gets the password used by this connection.

+ +
+ +
/Doctrine/DBAL/Connection.php at line 216
+

getPort

+public mixed getPort() +
+

Gets the port of the currently connected database.

+ +
+ +
/Doctrine/DBAL/Connection.php at line 825
+

getRollbackOnly

+public boolean getRollbackOnly() +
+

Check whether the current transaction is marked for rollback only.

+
Throws:
+
If no transaction is active.
+
+
+ +
+ +
/Doctrine/DBAL/Connection.php at line 796
+

getSchemaManager

+public Doctrine\DBAL\Schema\SchemaManager getSchemaManager() +
+

Gets the SchemaManager that can be used to inspect or change the +database schema through the connection.

+ +
+ +
/Doctrine/DBAL/Connection.php at line 420
+

getTransactionIsolation

+public integer getTransactionIsolation() +
+

Gets the currently active transaction isolation level.

+
Returns:
+
The current transaction isolation level.
+
+
+ +
+ +
/Doctrine/DBAL/Connection.php at line 667
+

getTransactionNestingLevel

+public integer getTransactionNestingLevel() +
+

Returns the current transaction nesting level.

+
Returns:
+
The nesting level. A value of 0 means there's no active transaction.
+
+
+ +
+ +
/Doctrine/DBAL/Connection.php at line 226
+

getUsername

+public string getUsername() +
+

Gets the username used by this connection.

+ +
+ +
/Doctrine/DBAL/Connection.php at line 783
+

getWrappedConnection

+public Doctrine\DBAL\Driver\Connection getWrappedConnection() +
+

Gets the wrapped driver connection.

+ +
+ +
/Doctrine/DBAL/Connection.php at line 456
+

insert

+public integer insert(mixed tableName, array data, string table) +
+

Inserts a table row with specified data.

+
Parameters:
+
table - The name of the table to insert data into.
+
data - An associative array containing column-value pairs.
+
Returns:
+
The number of affected rows.
+
+
+ +
+ +
/Doctrine/DBAL/Connection.php at line 354
+

isConnected

+public boolean isConnected() +
+

Whether an actual connection to the database is established.

+ +
+ +
/Doctrine/DBAL/Connection.php at line 364
+

isTransactionActive

+public boolean isTransactionActive() +
+

Checks whether a transaction is currently active.

+
Returns:
+
TRUE if a transaction is currently active, FALSE otherwise.
+
+
+ +
+ +
/Doctrine/DBAL/Connection.php at line 705
+

lastInsertId

+public string lastInsertId(string seqName) +
+

Returns the ID of the last inserted row, or the last value from a sequence object, +depending on the underlying driver.

Note: This method may not return a meaningful or consistent result across different drivers, +because the underlying database may not even support the notion of AUTO_INCREMENT/IDENTITY +columns or sequences.

+
Parameters:
+
seqName - Name of the sequence object from which the ID should be returned.
+
Returns:
+
A string representation of the last inserted ID.
+
+
+ +
+ +
/Doctrine/DBAL/Connection.php at line 536
+

prepare

+public Doctrine\DBAL\Driver\Statement prepare(string statement) +
+

Prepares an SQL statement.

+
Parameters:
+
statement - The SQL statement to prepare.
+
Returns:
+
The prepared statement.
+
+
+ +
+ +
/Doctrine/DBAL/Connection.php at line 588
+

project

+public mixed project(string query, array params, mixed function, Closure mapper) +
+

Executes an, optionally parameterized, SQL query and returns the result, +applying a given projection/transformation function on each row of the result.

+
Parameters:
+
query - The SQL query to execute.
+
params - The parameters, if any.
+
mapper - The transformation function that is applied on each row. The function receives a single paramater, an array, that represents a row of the result set.
+
Returns:
+
The projected result of the query.
+
+
+ +
+ +
/Doctrine/DBAL/Connection.php at line 609
+

query

+public Doctrine\DBAL\Driver\Statement query(string statement, integer fetchType) +
+

Executes an SQL statement, returning a result set as a Statement object.

+ +
+ +
/Doctrine/DBAL/Connection.php at line 511
+

quote

+public string quote(mixed input, string type) +
+

Quotes a given input parameter.

+
Parameters:
+
input - Parameter to be quoted.
+
type - Type of the parameter.
+
Returns:
+
The quoted parameter.
+
+
+ +
+ +
/Doctrine/DBAL/Connection.php at line 499
+

quoteIdentifier

+public string quoteIdentifier(string str) +
+

Quote a string so it can be safely used as a table or column name, even if +it is a reserved name.

Delimiting style depends on the underlying database platform that is being used.

NOTE: Just because you CAN use quoted identifiers does not mean +you SHOULD use them. In general, they end up causing way more +problems than they solve.

+
Parameters:
+
str - The name to be quoted.
+
Returns:
+
The quoted name.
+
+
+ +
+ +
/Doctrine/DBAL/Connection.php at line 760
+

rollback

+public void rollback() +
+

Cancel any database changes done during the current transaction.

this method can be listened with onPreTransactionRollback and onTransactionRollback +eventlistener methods

+
Throws:
+
If the rollback operation failed.
+
+
+ +
+ +
/Doctrine/DBAL/Connection.php at line 481
+

setCharset

+public void setCharset(string charset) +
+

Sets the given charset on the current connection.

+
Parameters:
+
charset - The charset to set.
+
+
+ +
+ +
/Doctrine/DBAL/Connection.php at line 811
+

setRollbackOnly

+public void setRollbackOnly() +
+

Marks the current transaction so that the only possible +outcome for the transaction to be rolled back.

+
Throws:
+
If no transaction is active.
+
+
+ +
+ +
/Doctrine/DBAL/Connection.php at line 408
+

setTransactionIsolation

+public void setTransactionIsolation(integer level) +
+

Sets the transaction isolation level.

+
Parameters:
+
level - The level to set.
+
+
+ +
+ +
/Doctrine/DBAL/Connection.php at line 432
+

update

+public integer update(mixed tableName, mixed data, array identifier, string table) +
+

Executes an SQL UPDATE statement on a table.

+
Parameters:
+
table - The name of the table to update.
+
identifier - The update criteria. An associative array containing column-value pairs.
+
Returns:
+
The number of affected rows.
+
+
+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/dbal/connectionexception.html b/lib/api/doctrine/dbal/connectionexception.html new file mode 100644 index 000000000..e66f282b0 --- /dev/null +++ b/lib/api/doctrine/dbal/connectionexception.html @@ -0,0 +1,129 @@ + + + + + + + + + + + +ConnectionException (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +
Doctrine\DBAL\ConnectionException
+
/Doctrine/DBAL/ConnectionException.php at line 33
+ +

Class ConnectionException

+ +
Class:ConnectionException - Superclass: DBALException
+Class:DBALException - Superclass: Exception
+Exception
⌊ DBALException
⌊ ConnectionException
+ +
+ +

public class ConnectionException
extends DBALException + +

+ +

Doctrine\DBAL\ConnectionException

+ +
+
License:
+
http://www.opensource.org/licenses/lgpl-license.php LGPL
+
See Also:
+
www.doctrine-project.org
+
Since:
+
2.0
+
Version:
+
$Revision: 4628 $
+
Author:
+
Jonathan H. Wage +
+
+ + + + + + + + + + + +
Method Summary
static void

commitFailedRollbackOnly()

static void

noActiveTransaction()

+ + + +
Methods inherited from Doctrine\DBAL\DBALException
driverRequired, invalidDriverClass, invalidPdoInstance, invalidPlatformSpecified, invalidTableName, invalidWrapperClass, limitOffsetInvalid, noColumnsSpecifiedForTable, notSupported, typeExists, typeNotFound, unknownColumnType, unknownDriver
+ +

Method Detail

+
/Doctrine/DBAL/ConnectionException.php at line 35
+

commitFailedRollbackOnly

+public static void commitFailedRollbackOnly() +
+
+ +
+ +
/Doctrine/DBAL/ConnectionException.php at line 40
+

noActiveTransaction

+public static void noActiveTransaction() +
+
+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/dbal/dbalexception.html b/lib/api/doctrine/dbal/dbalexception.html new file mode 100644 index 000000000..8ee2ccc1f --- /dev/null +++ b/lib/api/doctrine/dbal/dbalexception.html @@ -0,0 +1,242 @@ + + + + + + + + + + + +DBALException (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +
Doctrine\DBAL\DBALException
+
/Doctrine/DBAL/DBALException.php at line 5
+ +

Class DBALException

+ +
Class:DBALException - Superclass: Exception
+Exception
⌊ DBALException
+ +
+ +

public class DBALException
extends Exception + +

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Method Summary
static void

driverRequired()

static void

invalidDriverClass(mixed driverClass)

static void

invalidPdoInstance()

static void

invalidPlatformSpecified()

static DBALException

invalidTableName(string tableName)

static void

invalidWrapperClass(mixed wrapperClass)

static void

limitOffsetInvalid()

static DBALException

noColumnsSpecifiedForTable(string tableName)

static void

notSupported(mixed method)

static void

typeExists(mixed name)

static void

typeNotFound(mixed name)

static void

unknownColumnType(mixed name)

static void

unknownDriver(mixed unknownDriverName, mixed knownDrivers)

+ +

Method Detail

+
/Doctrine/DBAL/DBALException.php at line 27
+

driverRequired

+public static void driverRequired() +
+
+ +
+ +
/Doctrine/DBAL/DBALException.php at line 45
+

invalidDriverClass

+public static void invalidDriverClass(mixed driverClass) +
+
+ +
+ +
/Doctrine/DBAL/DBALException.php at line 19
+

invalidPdoInstance

+public static void invalidPdoInstance() +
+
+ +
+ +
/Doctrine/DBAL/DBALException.php at line 12
+

invalidPlatformSpecified

+public static void invalidPlatformSpecified() +
+
+ +
+ +
/Doctrine/DBAL/DBALException.php at line 55
+

invalidTableName

+public static DBALException invalidTableName(string tableName) +
+

+ +
+ +
/Doctrine/DBAL/DBALException.php at line 39
+

invalidWrapperClass

+public static void invalidWrapperClass(mixed wrapperClass) +
+
+ +
+ +
/Doctrine/DBAL/DBALException.php at line 69
+

limitOffsetInvalid

+public static void limitOffsetInvalid() +
+
+ +
+ +
/Doctrine/DBAL/DBALException.php at line 64
+

noColumnsSpecifiedForTable

+public static DBALException noColumnsSpecifiedForTable(string tableName) +
+

+ +
+ +
/Doctrine/DBAL/DBALException.php at line 7
+

notSupported

+public static void notSupported(mixed method) +
+
+ +
+ +
/Doctrine/DBAL/DBALException.php at line 74
+

typeExists

+public static void typeExists(mixed name) +
+
+ +
+ +
/Doctrine/DBAL/DBALException.php at line 84
+

typeNotFound

+public static void typeNotFound(mixed name) +
+
+ +
+ +
/Doctrine/DBAL/DBALException.php at line 79
+

unknownColumnType

+public static void unknownColumnType(mixed name) +
+
+ +
+ +
/Doctrine/DBAL/DBALException.php at line 33
+

unknownDriver

+public static void unknownDriver(mixed unknownDriverName, mixed knownDrivers) +
+
+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/dbal/driver.html b/lib/api/doctrine/dbal/driver.html new file mode 100644 index 000000000..51a1ffe4e --- /dev/null +++ b/lib/api/doctrine/dbal/driver.html @@ -0,0 +1,175 @@ + + + + + + + + + + + +Driver (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +
Doctrine\DBAL\Driver
+
/Doctrine/DBAL/Driver.php at line 11
+ +

Interface Driver

+ +
Driver
+ +
+ +

public interface Driver

+ +

Driver interface. +Interface that all DBAL drivers must implement.

+ +
+
Since:
+
2.0
+
+
+ + + + + + + + + + + + + + + + + + + + + + + +
Method Summary
Doctrine\DBAL\Driver\Connection

connect(array params, string username, string password, array driverOptions)

Attempts to create a connection with the database.

string

getDatabase(Doctrine\DBAL\Connection conn)

Get the name of the database connected to for this driver.

Doctrine\DBAL\Platforms\AbstractPlatform

getDatabasePlatform()

Gets the DatabasePlatform instance that provides all the metadata about +the platform this driver connects to.

string

getName()

Gets the name of the driver.

Doctrine\DBAL\SchemaManager

getSchemaManager(Doctrine\DBAL\Connection conn)

Gets the SchemaManager that can be used to inspect and change the underlying +database schema of the platform this driver connects to.

+ +

Method Detail

+
/Doctrine/DBAL/Driver.php at line 22
+

connect

+public Doctrine\DBAL\Driver\Connection connect(array params, string username, string password, array driverOptions) +
+

Attempts to create a connection with the database.

+
Parameters:
+
params - All connection parameters passed by the user.
+
username - The username to use when connecting.
+
password - The password to use when connecting.
+
driverOptions - The driver options to use when connecting.
+
Returns:
+
The database connection.
+
+
+ +
+ +
/Doctrine/DBAL/Driver.php at line 54
+

getDatabase

+public string getDatabase(Doctrine\DBAL\Connection conn) +
+

Get the name of the database connected to for this driver.

+
Returns:
+
$database
+
+
+ +
+ +
/Doctrine/DBAL/Driver.php at line 30
+

getDatabasePlatform

+public Doctrine\DBAL\Platforms\AbstractPlatform getDatabasePlatform() +
+

Gets the DatabasePlatform instance that provides all the metadata about +the platform this driver connects to.

+
Returns:
+
The database platform.
+
+
+ +
+ +
/Doctrine/DBAL/Driver.php at line 46
+

getName

+public string getName() +
+

Gets the name of the driver.

+
Returns:
+
The name of the driver.
+
+
+ +
+ +
/Doctrine/DBAL/Driver.php at line 39
+

getSchemaManager

+public Doctrine\DBAL\SchemaManager getSchemaManager(Doctrine\DBAL\Connection conn) +
+

Gets the SchemaManager that can be used to inspect and change the underlying +database schema of the platform this driver connects to.

+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/dbal/driver/connection.html b/lib/api/doctrine/dbal/driver/connection.html new file mode 100644 index 000000000..45467003d --- /dev/null +++ b/lib/api/doctrine/dbal/driver/connection.html @@ -0,0 +1,210 @@ + + + + + + + + + + + +Connection (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +
Doctrine\DBAL\Driver\Connection
+
/Doctrine/DBAL/Driver/Connection.php at line 32
+ +

Interface Connection

+ +
Connection
+ +
+ +

public interface Connection

+ +

Connection interface. +Driver connections must implement this interface.

This resembles (a subset of) the PDO interface.

+ +
+
Since:
+
2.0
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Method Summary
void

beginTransaction()

void

commit()

void

errorCode()

void

errorInfo()

void

exec(mixed statement)

void

lastInsertId(mixed name)

void

prepare(mixed prepareString)

void

query()

void

quote(mixed input, mixed type)

void

rollBack()

+ +

Method Detail

+
/Doctrine/DBAL/Driver/Connection.php at line 39
+

beginTransaction

+public void beginTransaction() +
+
+ +
+ +
/Doctrine/DBAL/Driver/Connection.php at line 40
+

commit

+public void commit() +
+
+ +
+ +
/Doctrine/DBAL/Driver/Connection.php at line 42
+

errorCode

+public void errorCode() +
+
+ +
+ +
/Doctrine/DBAL/Driver/Connection.php at line 43
+

errorInfo

+public void errorInfo() +
+
+ +
+ +
/Doctrine/DBAL/Driver/Connection.php at line 37
+

exec

+public void exec(mixed statement) +
+
+ +
+ +
/Doctrine/DBAL/Driver/Connection.php at line 38
+

lastInsertId

+public void lastInsertId(mixed name) +
+
+ +
+ +
/Doctrine/DBAL/Driver/Connection.php at line 34
+

prepare

+public void prepare(mixed prepareString) +
+
+ +
+ +
/Doctrine/DBAL/Driver/Connection.php at line 35
+

query

+public void query() +
+
+ +
+ +
/Doctrine/DBAL/Driver/Connection.php at line 36
+

quote

+public void quote(mixed input, mixed type) +
+
+ +
+ +
/Doctrine/DBAL/Driver/Connection.php at line 41
+

rollBack

+public void rollBack() +
+
+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/dbal/driver/oci8/driver.html b/lib/api/doctrine/dbal/driver/oci8/driver.html new file mode 100644 index 000000000..3ec03ddc1 --- /dev/null +++ b/lib/api/doctrine/dbal/driver/oci8/driver.html @@ -0,0 +1,156 @@ + + + + + + + + + + + +Driver (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +
Doctrine\DBAL\Driver\OCI8\Driver
+
/Doctrine/DBAL/Driver/OCI8/Driver.php at line 32
+ +

Class Driver

+ +
Driver
+ +
+
All Implemented Interfaces:
+
Driver +
+ +
+ +

public class Driver

+ +

A Doctrine DBAL driver for the Oracle OCI8 PHP extensions.

+ +
+
Author:
+
Roman Borschel
+
Since:
+
2.0
+
+
+ + + + + + + + + + + + + + + + + + + + + + + +
Method Summary
void

connect(mixed params, mixed username, mixed password, mixed driverOptions)

void

getDatabase(mixed conn)

void

getDatabasePlatform()

void

getName()

void

getSchemaManager(mixed conn)

+ +

Method Detail

+
/Doctrine/DBAL/Driver/OCI8/Driver.php at line 34
+

connect

+public void connect(mixed params, mixed username, mixed password, mixed driverOptions) +
+
+ +
+ +
/Doctrine/DBAL/Driver/OCI8/Driver.php at line 88
+

getDatabase

+public void getDatabase(mixed conn) +
+
+ +
+ +
/Doctrine/DBAL/Driver/OCI8/Driver.php at line 73
+

getDatabasePlatform

+public void getDatabasePlatform() +
+
+ +
+ +
/Doctrine/DBAL/Driver/OCI8/Driver.php at line 83
+

getName

+public void getName() +
+
+ +
+ +
/Doctrine/DBAL/Driver/OCI8/Driver.php at line 78
+

getSchemaManager

+public void getSchemaManager(mixed conn) +
+
+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/dbal/driver/oci8/oci8connection.html b/lib/api/doctrine/dbal/driver/oci8/oci8connection.html new file mode 100644 index 000000000..79f6bb945 --- /dev/null +++ b/lib/api/doctrine/dbal/driver/oci8/oci8connection.html @@ -0,0 +1,230 @@ + + + + + + + + + + + +OCI8Connection (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +
Doctrine\DBAL\Driver\OCI8\OCI8Connection
+
/Doctrine/DBAL/Driver/OCI8/OCI8Connection.php at line 29
+ +

Class OCI8Connection

+ +
OCI8Connection
+ +
+
All Implemented Interfaces:
+
Driver Connection +
+ +
+ +

public class OCI8Connection

+ +

OCI8 implementation of the Connection interface.

+ +
+
Since:
+
2.0
+
+
+ + + + + + +
Constructor Summary

OCI8Connection(mixed username, mixed password, mixed db)

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Method Summary
void

beginTransaction()

void

commit()

void

errorCode()

void

errorInfo()

void

exec(mixed statement)

void

lastInsertId(mixed name)

void

prepare(mixed prepareString)

void

query()

void

quote(mixed input, mixed type)

void

rollBack()

+ +

Constructor Detail

+
/Doctrine/DBAL/Driver/OCI8/OCI8Connection.php at line 33
+

OCI8Connection

+public OCI8Connection(mixed username, mixed password, mixed db) +
+
+ +
+ +

Method Detail

+
/Doctrine/DBAL/Driver/OCI8/OCI8Connection.php at line 73
+

beginTransaction

+public void beginTransaction() +
+
+ +
+ +
/Doctrine/DBAL/Driver/OCI8/OCI8Connection.php at line 78
+

commit

+public void commit() +
+
+ +
+ +
/Doctrine/DBAL/Driver/OCI8/OCI8Connection.php at line 94
+

errorCode

+public void errorCode() +
+
+ +
+ +
/Doctrine/DBAL/Driver/OCI8/OCI8Connection.php at line 103
+

errorInfo

+public void errorInfo() +
+
+ +
+ +
/Doctrine/DBAL/Driver/OCI8/OCI8Connection.php at line 61
+

exec

+public void exec(mixed statement) +
+
+ +
+ +
/Doctrine/DBAL/Driver/OCI8/OCI8Connection.php at line 68
+

lastInsertId

+public void lastInsertId(mixed name) +
+
+ +
+ +
/Doctrine/DBAL/Driver/OCI8/OCI8Connection.php at line 41
+

prepare

+public void prepare(mixed prepareString) +
+
+ +
+ +
/Doctrine/DBAL/Driver/OCI8/OCI8Connection.php at line 46
+

query

+public void query() +
+
+ +
+ +
/Doctrine/DBAL/Driver/OCI8/OCI8Connection.php at line 56
+

quote

+public void quote(mixed input, mixed type) +
+
+ +
+ +
/Doctrine/DBAL/Driver/OCI8/OCI8Connection.php at line 86
+

rollBack

+public void rollBack() +
+
+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/dbal/driver/oci8/oci8exception.html b/lib/api/doctrine/dbal/driver/oci8/oci8exception.html new file mode 100644 index 000000000..e994fb17e --- /dev/null +++ b/lib/api/doctrine/dbal/driver/oci8/oci8exception.html @@ -0,0 +1,98 @@ + + + + + + + + + + + +OCI8Exception (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +
Doctrine\DBAL\Driver\OCI8\OCI8Exception
+
/Doctrine/DBAL/Driver/OCI8/OCI8Exception.php at line 24
+ +

Class OCI8Exception

+ +
Class:OCI8Exception - Superclass: Exception
+Exception
⌊ OCI8Exception
+ +
+ +

public class OCI8Exception
extends Exception + +

+ +
+ + + + + + + +
Method Summary
static void

fromErrorInfo(mixed error)

+ +

Method Detail

+
/Doctrine/DBAL/Driver/OCI8/OCI8Exception.php at line 26
+

fromErrorInfo

+public static void fromErrorInfo(mixed error) +
+
+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/dbal/driver/oci8/oci8statement.html b/lib/api/doctrine/dbal/driver/oci8/oci8statement.html new file mode 100644 index 000000000..996143509 --- /dev/null +++ b/lib/api/doctrine/dbal/driver/oci8/oci8statement.html @@ -0,0 +1,253 @@ + + + + + + + + + + + +OCI8Statement (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +
Doctrine\DBAL\Driver\OCI8\OCI8Statement
+
/Doctrine/DBAL/Driver/OCI8/OCI8Statement.php at line 32
+ +

Class OCI8Statement

+ +
OCI8Statement
+ +
+
All Implemented Interfaces:
+
Driver Statement +
+ +
+ +

public class OCI8Statement

+ +

The OCI8 implementation of the Statement interface.

+ +
+
Since:
+
2.0
+
Author:
+
Roman Borschel
+
+
+ + + + + + +
Constructor Summary

OCI8Statement(resource dbh, string statement)

Creates a new OCI8Statement that uses the given connection handle and SQL statement.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Method Summary
void

bindParam(mixed column, mixed variable, mixed type)

{@inheritdoc}

void

bindValue(mixed param, mixed value, mixed type)

{@inheritdoc}

boolean

closeCursor()

Closes the cursor, enabling the statement to be executed again.

void

columnCount()

{@inheritdoc}

void

errorCode()

{@inheritdoc}

void

errorInfo()

{@inheritdoc}

void

execute(mixed params)

{@inheritdoc}

void

fetch(mixed fetchStyle)

{@inheritdoc}

void

fetchAll(mixed fetchStyle)

{@inheritdoc}

void

fetchColumn(mixed columnIndex)

{@inheritdoc}

void

rowCount()

{@inheritdoc}

+ +

Constructor Detail

+
/Doctrine/DBAL/Driver/OCI8/OCI8Statement.php at line 51
+

OCI8Statement

+public OCI8Statement(resource dbh, string statement) +
+

Creates a new OCI8Statement that uses the given connection handle and SQL statement.

+
Parameters:
+
dbh - The connection handle.
+
statement - The SQL statement.
+
+
+ +
+ +

Method Detail

+
/Doctrine/DBAL/Driver/OCI8/OCI8Statement.php at line 87
+

bindParam

+public void bindParam(mixed column, mixed variable, mixed type) +
+

+ +
+ +
/Doctrine/DBAL/Driver/OCI8/OCI8Statement.php at line 79
+

bindValue

+public void bindValue(mixed param, mixed value, mixed type) +
+

+ +
+ +
/Doctrine/DBAL/Driver/OCI8/OCI8Statement.php at line 99
+

closeCursor

+public boolean closeCursor() +
+

Closes the cursor, enabling the statement to be executed again.

+
Returns:
+
Returns TRUE on success or FALSE on failure.
+
+
+ +
+ +
/Doctrine/DBAL/Driver/OCI8/OCI8Statement.php at line 107
+

columnCount

+public void columnCount() +
+

+ +
+ +
/Doctrine/DBAL/Driver/OCI8/OCI8Statement.php at line 115
+

errorCode

+public void errorCode() +
+

+ +
+ +
/Doctrine/DBAL/Driver/OCI8/OCI8Statement.php at line 127
+

errorInfo

+public void errorInfo() +
+

+ +
+ +
/Doctrine/DBAL/Driver/OCI8/OCI8Statement.php at line 135
+

execute

+public void execute(mixed params) +
+

+ +
+ +
/Doctrine/DBAL/Driver/OCI8/OCI8Statement.php at line 158
+

fetch

+public void fetch(mixed fetchStyle) +
+

+ +
+ +
/Doctrine/DBAL/Driver/OCI8/OCI8Statement.php at line 170
+

fetchAll

+public void fetchAll(mixed fetchStyle) +
+

+ +
+ +
/Doctrine/DBAL/Driver/OCI8/OCI8Statement.php at line 185
+

fetchColumn

+public void fetchColumn(mixed columnIndex) +
+

+ +
+ +
/Doctrine/DBAL/Driver/OCI8/OCI8Statement.php at line 194
+

rowCount

+public void rowCount() +
+

+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/dbal/driver/oci8/package-frame.html b/lib/api/doctrine/dbal/driver/oci8/package-frame.html new file mode 100644 index 000000000..7adf1ab27 --- /dev/null +++ b/lib/api/doctrine/dbal/driver/oci8/package-frame.html @@ -0,0 +1,33 @@ + + + + + + + + + + + +Doctrine\DBAL\Driver\OCI8 (Doctrine) + + + + +

Doctrine\DBAL\Driver\OCI8

+ +

Classes

+ + +

Exceptions

+ + + + + \ No newline at end of file diff --git a/lib/api/doctrine/dbal/driver/oci8/package-functions.html b/lib/api/doctrine/dbal/driver/oci8/package-functions.html new file mode 100644 index 000000000..80262c17d --- /dev/null +++ b/lib/api/doctrine/dbal/driver/oci8/package-functions.html @@ -0,0 +1,69 @@ + + + + + + + + + + + +Functions (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +

Functions

+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/dbal/driver/oci8/package-globals.html b/lib/api/doctrine/dbal/driver/oci8/package-globals.html new file mode 100644 index 000000000..b5b617d52 --- /dev/null +++ b/lib/api/doctrine/dbal/driver/oci8/package-globals.html @@ -0,0 +1,69 @@ + + + + + + + + + + + +Globals (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +

Globals

+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/dbal/driver/oci8/package-summary.html b/lib/api/doctrine/dbal/driver/oci8/package-summary.html new file mode 100644 index 000000000..4ccae1802 --- /dev/null +++ b/lib/api/doctrine/dbal/driver/oci8/package-summary.html @@ -0,0 +1,71 @@ + + + + + + + + + + + +Doctrine\DBAL\Driver\OCI8 (Doctrine) + + + + +
+

Doctrine

+ +
+ + +
+ +

Namespace Doctrine\DBAL\Driver\OCI8

+ + + + + + +
Class Summary
DriverA Doctrine DBAL driver for the Oracle OCI8 PHP extensions.
OCI8ConnectionOCI8 implementation of the Connection interface.
OCI8StatementThe OCI8 implementation of the Statement interface.
+ + + + +
Exception Summary
OCI8Exception
+ +
+ +
+

Doctrine

+ +
+ + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/dbal/driver/oci8/package-tree.html b/lib/api/doctrine/dbal/driver/oci8/package-tree.html new file mode 100644 index 000000000..c24efb5d0 --- /dev/null +++ b/lib/api/doctrine/dbal/driver/oci8/package-tree.html @@ -0,0 +1,58 @@ + + + + + + + + + + + +Doctrine\DBAL\Driver\OCI8 (Doctrine) + + + + +
+

Doctrine

+ +
+ + +

Class Hierarchy for Package Doctrine\DBAL\Driver\OCI8

+
+

Doctrine

+ +
+ + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/dbal/driver/package-frame.html b/lib/api/doctrine/dbal/driver/package-frame.html new file mode 100644 index 000000000..1d9105009 --- /dev/null +++ b/lib/api/doctrine/dbal/driver/package-frame.html @@ -0,0 +1,33 @@ + + + + + + + + + + + +Doctrine\DBAL\Driver (Doctrine) + + + + +

Doctrine\DBAL\Driver

+ +

Classes

+ + +

Interfaces

+ + + + + \ No newline at end of file diff --git a/lib/api/doctrine/dbal/driver/package-functions.html b/lib/api/doctrine/dbal/driver/package-functions.html new file mode 100644 index 000000000..386e6e2a1 --- /dev/null +++ b/lib/api/doctrine/dbal/driver/package-functions.html @@ -0,0 +1,69 @@ + + + + + + + + + + + +Functions (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +

Functions

+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/dbal/driver/package-globals.html b/lib/api/doctrine/dbal/driver/package-globals.html new file mode 100644 index 000000000..fa4d3ade5 --- /dev/null +++ b/lib/api/doctrine/dbal/driver/package-globals.html @@ -0,0 +1,69 @@ + + + + + + + + + + + +Globals (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +

Globals

+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/dbal/driver/package-summary.html b/lib/api/doctrine/dbal/driver/package-summary.html new file mode 100644 index 000000000..f10699e7c --- /dev/null +++ b/lib/api/doctrine/dbal/driver/package-summary.html @@ -0,0 +1,75 @@ + + + + + + + + + + + +Doctrine\DBAL\Driver (Doctrine) + + + + +
+

Doctrine

+ +
+ + +
+ +

Namespace Doctrine\DBAL\Driver

+ + + + + +
Class Summary
PDOConnectionPDO implementation of the Connection interface. +
PDOStatementThe PDO implementation of the Statement interface. +
+ + + + + +
Interface Summary
ConnectionConnection interface. +
StatementStatement interface. +
+ +
+ +
+

Doctrine

+ +
+ + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/dbal/driver/package-tree.html b/lib/api/doctrine/dbal/driver/package-tree.html new file mode 100644 index 000000000..3b6c341c8 --- /dev/null +++ b/lib/api/doctrine/dbal/driver/package-tree.html @@ -0,0 +1,56 @@ + + + + + + + + + + + +Doctrine\DBAL\Driver (Doctrine) + + + + +
+

Doctrine

+ +
+ + +

Class Hierarchy for Package Doctrine\DBAL\Driver

+
+

Doctrine

+ +
+ + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/dbal/driver/pdoconnection.html b/lib/api/doctrine/dbal/driver/pdoconnection.html new file mode 100644 index 000000000..f10754fd5 --- /dev/null +++ b/lib/api/doctrine/dbal/driver/pdoconnection.html @@ -0,0 +1,109 @@ + + + + + + + + + + + +PDOConnection (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +
Doctrine\DBAL\Driver\PDOConnection
+
/Doctrine/DBAL/Driver/PDOConnection.php at line 32
+ +

Class PDOConnection

+ +
Class:PDOConnection - Superclass: PDO
+PDO
⌊ PDOConnection
+ +
+
All Implemented Interfaces:
+
Connection +
+ +
+ +

public class PDOConnection
extends PDO + +

+ +

PDO implementation of the Connection interface. +Used by all PDO-based drivers.

+ +
+
Since:
+
2.0
+
+
+ + + + + + +
Constructor Summary

PDOConnection(mixed dsn, mixed user, mixed password, mixed options)

+ +

Constructor Detail

+
/Doctrine/DBAL/Driver/PDOConnection.php at line 34
+

PDOConnection

+public PDOConnection(mixed dsn, mixed user, mixed password, mixed options) +
+
+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/dbal/driver/pdomssql/connection.html b/lib/api/doctrine/dbal/driver/pdomssql/connection.html new file mode 100644 index 000000000..9aba1c993 --- /dev/null +++ b/lib/api/doctrine/dbal/driver/pdomssql/connection.html @@ -0,0 +1,142 @@ + + + + + + + + + + + +Connection (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +
Doctrine\DBAL\Driver\PDOMsSql\Connection
+
/Doctrine/DBAL/Driver/PDOMsSql/Connection.php at line 29
+ +

Class Connection

+ +
Class:Connection - Superclass: PDO
+PDO
⌊ Connection
+ +
+
All Implemented Interfaces:
+
Driver Connection +
+ +
+ +

public class Connection
extends PDO + +

+ +

MsSql Connection implementation.

+ +
+
Since:
+
2.0
+
+
+ + + + + + + + + + + + + + + +
Method Summary
void

beginTransaction()

Begins a database transaction.

void

commit()

Performs the commit.

void

rollback()

Performs the rollback.

+ +

Method Detail

+
/Doctrine/DBAL/Driver/PDOMsSql/Connection.php at line 56
+

beginTransaction

+public void beginTransaction() +
+

Begins a database transaction.

+
Override.
+
+
+ +
+ +
/Doctrine/DBAL/Driver/PDOMsSql/Connection.php at line 46
+

commit

+public void commit() +
+

Performs the commit.

+
Override.
+
+
+ +
+ +
/Doctrine/DBAL/Driver/PDOMsSql/Connection.php at line 36
+

rollback

+public void rollback() +
+

Performs the rollback.

+
Override.
+
+
+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/dbal/driver/pdomssql/driver.html b/lib/api/doctrine/dbal/driver/pdomssql/driver.html new file mode 100644 index 000000000..06dd46868 --- /dev/null +++ b/lib/api/doctrine/dbal/driver/pdomssql/driver.html @@ -0,0 +1,154 @@ + + + + + + + + + + + +Driver (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +
Doctrine\DBAL\Driver\PDOMsSql\Driver
+
/Doctrine/DBAL/Driver/PDOMsSql/Driver.php at line 29
+ +

Class Driver

+ +
Driver
+ +
+
All Implemented Interfaces:
+
Driver +
+ +
+ +

public class Driver

+ +

The PDO-based MsSql driver.

+ +
+
Since:
+
2.0
+
+
+ + + + + + + + + + + + + + + + + + + + + + + +
Method Summary
void

connect(mixed params, mixed username, mixed password, mixed driverOptions)

void

getDatabase(mixed conn)

void

getDatabasePlatform()

void

getName()

void

getSchemaManager(mixed conn)

+ +

Method Detail

+
/Doctrine/DBAL/Driver/PDOMsSql/Driver.php at line 31
+

connect

+public void connect(mixed params, mixed username, mixed password, mixed driverOptions) +
+
+ +
+ +
/Doctrine/DBAL/Driver/PDOMsSql/Driver.php at line 79
+

getDatabase

+public void getDatabase(mixed conn) +
+
+ +
+ +
/Doctrine/DBAL/Driver/PDOMsSql/Driver.php at line 64
+

getDatabasePlatform

+public void getDatabasePlatform() +
+
+ +
+ +
/Doctrine/DBAL/Driver/PDOMsSql/Driver.php at line 74
+

getName

+public void getName() +
+
+ +
+ +
/Doctrine/DBAL/Driver/PDOMsSql/Driver.php at line 69
+

getSchemaManager

+public void getSchemaManager(mixed conn) +
+
+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/dbal/driver/pdomssql/package-frame.html b/lib/api/doctrine/dbal/driver/pdomssql/package-frame.html new file mode 100644 index 000000000..de2b439c4 --- /dev/null +++ b/lib/api/doctrine/dbal/driver/pdomssql/package-frame.html @@ -0,0 +1,27 @@ + + + + + + + + + + + +Doctrine\DBAL\Driver\PDOMsSql (Doctrine) + + + + +

Doctrine\DBAL\Driver\PDOMsSql

+ +

Classes

+ + + + + \ No newline at end of file diff --git a/lib/api/doctrine/dbal/driver/pdomssql/package-functions.html b/lib/api/doctrine/dbal/driver/pdomssql/package-functions.html new file mode 100644 index 000000000..e2b78f37e --- /dev/null +++ b/lib/api/doctrine/dbal/driver/pdomssql/package-functions.html @@ -0,0 +1,69 @@ + + + + + + + + + + + +Functions (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +

Functions

+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/dbal/driver/pdomssql/package-globals.html b/lib/api/doctrine/dbal/driver/pdomssql/package-globals.html new file mode 100644 index 000000000..60ac3c8f9 --- /dev/null +++ b/lib/api/doctrine/dbal/driver/pdomssql/package-globals.html @@ -0,0 +1,69 @@ + + + + + + + + + + + +Globals (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +

Globals

+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/dbal/driver/pdomssql/package-summary.html b/lib/api/doctrine/dbal/driver/pdomssql/package-summary.html new file mode 100644 index 000000000..ff5315398 --- /dev/null +++ b/lib/api/doctrine/dbal/driver/pdomssql/package-summary.html @@ -0,0 +1,65 @@ + + + + + + + + + + + +Doctrine\DBAL\Driver\PDOMsSql (Doctrine) + + + + +
+

Doctrine

+ +
+ + +
+ +

Namespace Doctrine\DBAL\Driver\PDOMsSql

+ + + + + +
Class Summary
ConnectionMsSql Connection implementation.
DriverThe PDO-based MsSql driver.
+ +
+ +
+

Doctrine

+ +
+ + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/dbal/driver/pdomssql/package-tree.html b/lib/api/doctrine/dbal/driver/pdomssql/package-tree.html new file mode 100644 index 000000000..5945367b8 --- /dev/null +++ b/lib/api/doctrine/dbal/driver/pdomssql/package-tree.html @@ -0,0 +1,56 @@ + + + + + + + + + + + +Doctrine\DBAL\Driver\PDOMsSql (Doctrine) + + + + +
+

Doctrine

+ +
+ + +

Class Hierarchy for Package Doctrine\DBAL\Driver\PDOMsSql

+
+

Doctrine

+ +
+ + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/dbal/driver/pdomysql/driver.html b/lib/api/doctrine/dbal/driver/pdomysql/driver.html new file mode 100644 index 000000000..39f29b3ce --- /dev/null +++ b/lib/api/doctrine/dbal/driver/pdomysql/driver.html @@ -0,0 +1,154 @@ + + + + + + + + + + + +Driver (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +
Doctrine\DBAL\Driver\PDOMySql\Driver
+
/Doctrine/DBAL/Driver/PDOMySql/Driver.php at line 31
+ +

Class Driver

+ +
Driver
+ +
+
All Implemented Interfaces:
+
Driver +
+ +
+ +

public class Driver

+ +

PDO MySql driver.

+ +
+
Since:
+
2.0
+
+
+ + + + + + + + + + + + + + + + + + + + + + + +
Method Summary
Doctrine\DBAL\Driver\Connection

connect(array params, string username, string password, array driverOptions)

Attempts to establish a connection with the underlying driver.

void

getDatabase(mixed conn)

void

getDatabasePlatform()

void

getName()

void

getSchemaManager(mixed conn)

+ +

Method Detail

+
/Doctrine/DBAL/Driver/PDOMySql/Driver.php at line 42
+

connect

+public Doctrine\DBAL\Driver\Connection connect(array params, string username, string password, array driverOptions) +
+

Attempts to establish a connection with the underlying driver.

+ +
+ +
/Doctrine/DBAL/Driver/PDOMySql/Driver.php at line 92
+

getDatabase

+public void getDatabase(mixed conn) +
+
+ +
+ +
/Doctrine/DBAL/Driver/PDOMySql/Driver.php at line 77
+

getDatabasePlatform

+public void getDatabasePlatform() +
+
+ +
+ +
/Doctrine/DBAL/Driver/PDOMySql/Driver.php at line 87
+

getName

+public void getName() +
+
+ +
+ +
/Doctrine/DBAL/Driver/PDOMySql/Driver.php at line 82
+

getSchemaManager

+public void getSchemaManager(mixed conn) +
+
+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/dbal/driver/pdomysql/package-frame.html b/lib/api/doctrine/dbal/driver/pdomysql/package-frame.html new file mode 100644 index 000000000..9c2199df6 --- /dev/null +++ b/lib/api/doctrine/dbal/driver/pdomysql/package-frame.html @@ -0,0 +1,26 @@ + + + + + + + + + + + +Doctrine\DBAL\Driver\PDOMySql (Doctrine) + + + + +

Doctrine\DBAL\Driver\PDOMySql

+ +

Classes

+ + + + + \ No newline at end of file diff --git a/lib/api/doctrine/dbal/driver/pdomysql/package-functions.html b/lib/api/doctrine/dbal/driver/pdomysql/package-functions.html new file mode 100644 index 000000000..7982fffd8 --- /dev/null +++ b/lib/api/doctrine/dbal/driver/pdomysql/package-functions.html @@ -0,0 +1,69 @@ + + + + + + + + + + + +Functions (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +

Functions

+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/dbal/driver/pdomysql/package-globals.html b/lib/api/doctrine/dbal/driver/pdomysql/package-globals.html new file mode 100644 index 000000000..4a85d80b6 --- /dev/null +++ b/lib/api/doctrine/dbal/driver/pdomysql/package-globals.html @@ -0,0 +1,69 @@ + + + + + + + + + + + +Globals (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +

Globals

+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/dbal/driver/pdomysql/package-summary.html b/lib/api/doctrine/dbal/driver/pdomysql/package-summary.html new file mode 100644 index 000000000..07302730b --- /dev/null +++ b/lib/api/doctrine/dbal/driver/pdomysql/package-summary.html @@ -0,0 +1,64 @@ + + + + + + + + + + + +Doctrine\DBAL\Driver\PDOMySql (Doctrine) + + + + +
+

Doctrine

+ +
+ + +
+ +

Namespace Doctrine\DBAL\Driver\PDOMySql

+ + + + +
Class Summary
DriverPDO MySql driver.
+ +
+ +
+

Doctrine

+ +
+ + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/dbal/driver/pdomysql/package-tree.html b/lib/api/doctrine/dbal/driver/pdomysql/package-tree.html new file mode 100644 index 000000000..178b4f1a6 --- /dev/null +++ b/lib/api/doctrine/dbal/driver/pdomysql/package-tree.html @@ -0,0 +1,56 @@ + + + + + + + + + + + +Doctrine\DBAL\Driver\PDOMySql (Doctrine) + + + + +
+

Doctrine

+ +
+ + +

Class Hierarchy for Package Doctrine\DBAL\Driver\PDOMySql

+
+

Doctrine

+ +
+ + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/dbal/driver/pdooracle/driver.html b/lib/api/doctrine/dbal/driver/pdooracle/driver.html new file mode 100644 index 000000000..b4ccbfada --- /dev/null +++ b/lib/api/doctrine/dbal/driver/pdooracle/driver.html @@ -0,0 +1,148 @@ + + + + + + + + + + + +Driver (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +
Doctrine\DBAL\Driver\PDOOracle\Driver
+
/Doctrine/DBAL/Driver/PDOOracle/Driver.php at line 26
+ +

Class Driver

+ +
Driver
+ +
+
All Implemented Interfaces:
+
Driver +
+ +
+ +

public class Driver

+ +
+ + + + + + + + + + + + + + + + + + + + + + + +
Method Summary
void

connect(mixed params, mixed username, mixed password, mixed driverOptions)

void

getDatabase(mixed conn)

void

getDatabasePlatform()

void

getName()

void

getSchemaManager(mixed conn)

+ +

Method Detail

+
/Doctrine/DBAL/Driver/PDOOracle/Driver.php at line 28
+

connect

+public void connect(mixed params, mixed username, mixed password, mixed driverOptions) +
+
+ +
+ +
/Doctrine/DBAL/Driver/PDOOracle/Driver.php at line 83
+

getDatabase

+public void getDatabase(mixed conn) +
+
+ +
+ +
/Doctrine/DBAL/Driver/PDOOracle/Driver.php at line 68
+

getDatabasePlatform

+public void getDatabasePlatform() +
+
+ +
+ +
/Doctrine/DBAL/Driver/PDOOracle/Driver.php at line 78
+

getName

+public void getName() +
+
+ +
+ +
/Doctrine/DBAL/Driver/PDOOracle/Driver.php at line 73
+

getSchemaManager

+public void getSchemaManager(mixed conn) +
+
+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/dbal/driver/pdooracle/package-frame.html b/lib/api/doctrine/dbal/driver/pdooracle/package-frame.html new file mode 100644 index 000000000..a4c970a5c --- /dev/null +++ b/lib/api/doctrine/dbal/driver/pdooracle/package-frame.html @@ -0,0 +1,26 @@ + + + + + + + + + + + +Doctrine\DBAL\Driver\PDOOracle (Doctrine) + + + + +

Doctrine\DBAL\Driver\PDOOracle

+ +

Classes

+ + + + + \ No newline at end of file diff --git a/lib/api/doctrine/dbal/driver/pdooracle/package-functions.html b/lib/api/doctrine/dbal/driver/pdooracle/package-functions.html new file mode 100644 index 000000000..51b8cf55a --- /dev/null +++ b/lib/api/doctrine/dbal/driver/pdooracle/package-functions.html @@ -0,0 +1,69 @@ + + + + + + + + + + + +Functions (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +

Functions

+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/dbal/driver/pdooracle/package-globals.html b/lib/api/doctrine/dbal/driver/pdooracle/package-globals.html new file mode 100644 index 000000000..99dfdb4d1 --- /dev/null +++ b/lib/api/doctrine/dbal/driver/pdooracle/package-globals.html @@ -0,0 +1,69 @@ + + + + + + + + + + + +Globals (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +

Globals

+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/dbal/driver/pdooracle/package-summary.html b/lib/api/doctrine/dbal/driver/pdooracle/package-summary.html new file mode 100644 index 000000000..6d9697384 --- /dev/null +++ b/lib/api/doctrine/dbal/driver/pdooracle/package-summary.html @@ -0,0 +1,64 @@ + + + + + + + + + + + +Doctrine\DBAL\Driver\PDOOracle (Doctrine) + + + + +
+

Doctrine

+ +
+ + +
+ +

Namespace Doctrine\DBAL\Driver\PDOOracle

+ + + + +
Class Summary
Driver
+ +
+ +
+

Doctrine

+ +
+ + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/dbal/driver/pdooracle/package-tree.html b/lib/api/doctrine/dbal/driver/pdooracle/package-tree.html new file mode 100644 index 000000000..e490ece78 --- /dev/null +++ b/lib/api/doctrine/dbal/driver/pdooracle/package-tree.html @@ -0,0 +1,56 @@ + + + + + + + + + + + +Doctrine\DBAL\Driver\PDOOracle (Doctrine) + + + + +
+

Doctrine

+ +
+ + +

Class Hierarchy for Package Doctrine\DBAL\Driver\PDOOracle

+
+

Doctrine

+ +
+ + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/dbal/driver/pdopgsql/driver.html b/lib/api/doctrine/dbal/driver/pdopgsql/driver.html new file mode 100644 index 000000000..0ba8ad90d --- /dev/null +++ b/lib/api/doctrine/dbal/driver/pdopgsql/driver.html @@ -0,0 +1,154 @@ + + + + + + + + + + + +Driver (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +
Doctrine\DBAL\Driver\PDOPgSql\Driver
+
/Doctrine/DBAL/Driver/PDOPgSql/Driver.php at line 12
+ +

Class Driver

+ +
Driver
+ +
+
All Implemented Interfaces:
+
Driver +
+ +
+ +

public class Driver

+ +

Driver that connects through pdo_pgsql.

+ +
+
Since:
+
2.0
+
+
+ + + + + + + + + + + + + + + + + + + + + + + +
Method Summary
Doctrine\DBAL\Driver\Connection

connect(mixed params, mixed username, mixed password, mixed driverOptions)

Attempts to connect to the database and returns a driver connection on success.

void

getDatabase(mixed conn)

void

getDatabasePlatform()

void

getName()

void

getSchemaManager(mixed conn)

+ +

Method Detail

+
/Doctrine/DBAL/Driver/PDOPgSql/Driver.php at line 19
+

connect

+public Doctrine\DBAL\Driver\Connection connect(mixed params, mixed username, mixed password, mixed driverOptions) +
+

Attempts to connect to the database and returns a driver connection on success.

+ +
+ +
/Doctrine/DBAL/Driver/PDOPgSql/Driver.php at line 65
+

getDatabase

+public void getDatabase(mixed conn) +
+
+ +
+ +
/Doctrine/DBAL/Driver/PDOPgSql/Driver.php at line 50
+

getDatabasePlatform

+public void getDatabasePlatform() +
+
+ +
+ +
/Doctrine/DBAL/Driver/PDOPgSql/Driver.php at line 60
+

getName

+public void getName() +
+
+ +
+ +
/Doctrine/DBAL/Driver/PDOPgSql/Driver.php at line 55
+

getSchemaManager

+public void getSchemaManager(mixed conn) +
+
+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/dbal/driver/pdopgsql/package-frame.html b/lib/api/doctrine/dbal/driver/pdopgsql/package-frame.html new file mode 100644 index 000000000..39c31e726 --- /dev/null +++ b/lib/api/doctrine/dbal/driver/pdopgsql/package-frame.html @@ -0,0 +1,26 @@ + + + + + + + + + + + +Doctrine\DBAL\Driver\PDOPgSql (Doctrine) + + + + +

Doctrine\DBAL\Driver\PDOPgSql

+ +

Classes

+ + + + + \ No newline at end of file diff --git a/lib/api/doctrine/dbal/driver/pdopgsql/package-functions.html b/lib/api/doctrine/dbal/driver/pdopgsql/package-functions.html new file mode 100644 index 000000000..bc8e79117 --- /dev/null +++ b/lib/api/doctrine/dbal/driver/pdopgsql/package-functions.html @@ -0,0 +1,69 @@ + + + + + + + + + + + +Functions (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +

Functions

+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/dbal/driver/pdopgsql/package-globals.html b/lib/api/doctrine/dbal/driver/pdopgsql/package-globals.html new file mode 100644 index 000000000..afc62cabd --- /dev/null +++ b/lib/api/doctrine/dbal/driver/pdopgsql/package-globals.html @@ -0,0 +1,69 @@ + + + + + + + + + + + +Globals (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +

Globals

+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/dbal/driver/pdopgsql/package-summary.html b/lib/api/doctrine/dbal/driver/pdopgsql/package-summary.html new file mode 100644 index 000000000..d412f6fb3 --- /dev/null +++ b/lib/api/doctrine/dbal/driver/pdopgsql/package-summary.html @@ -0,0 +1,64 @@ + + + + + + + + + + + +Doctrine\DBAL\Driver\PDOPgSql (Doctrine) + + + + +
+

Doctrine

+ +
+ + +
+ +

Namespace Doctrine\DBAL\Driver\PDOPgSql

+ + + + +
Class Summary
DriverDriver that connects through pdo_pgsql.
+ +
+ +
+

Doctrine

+ +
+ + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/dbal/driver/pdopgsql/package-tree.html b/lib/api/doctrine/dbal/driver/pdopgsql/package-tree.html new file mode 100644 index 000000000..cfecdab56 --- /dev/null +++ b/lib/api/doctrine/dbal/driver/pdopgsql/package-tree.html @@ -0,0 +1,56 @@ + + + + + + + + + + + +Doctrine\DBAL\Driver\PDOPgSql (Doctrine) + + + + +
+

Doctrine

+ +
+ + +

Class Hierarchy for Package Doctrine\DBAL\Driver\PDOPgSql

+
+

Doctrine

+ +
+ + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/dbal/driver/pdosqlite/driver.html b/lib/api/doctrine/dbal/driver/pdosqlite/driver.html new file mode 100644 index 000000000..facad4d48 --- /dev/null +++ b/lib/api/doctrine/dbal/driver/pdosqlite/driver.html @@ -0,0 +1,171 @@ + + + + + + + + + + + +Driver (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +
Doctrine\DBAL\Driver\PDOSqlite\Driver
+
/Doctrine/DBAL/Driver/PDOSqlite/Driver.php at line 29
+ +

Class Driver

+ +
Driver
+ +
+
All Implemented Interfaces:
+
Driver +
+ +
+ +

public class Driver

+ +

The PDO Sqlite driver.

+ +
+
Since:
+
2.0
+
+
+ + + + + + + +
Field Summary
protected array

$_userDefinedFunctions

+ + + + + + + + + + + + + + + + + + + + + + + +
Method Summary
Connection

connect(array params, string username, string password, array driverOptions)

Tries to establish a database connection to SQLite.

void

getDatabase(mixed conn)

void

getDatabasePlatform()

Gets the database platform that is relevant for this driver.

void

getName()

Doctrine\DBAL\Schema\SqliteSchemaManager

getSchemaManager(Doctrine\DBAL\Connection conn)

Gets the schema manager that is relevant for this driver.

+ +

Field Detail

+
/Doctrine/DBAL/Driver/PDOSqlite/Driver.php at line 34
+

_userDefinedFunctions

+protected array $_userDefinedFunctions = array(...) +
+

+ +
+ +

Method Detail

+
/Doctrine/DBAL/Driver/PDOSqlite/Driver.php at line 49
+

connect

+public Connection connect(array params, string username, string password, array driverOptions) +
+

Tries to establish a database connection to SQLite.

+ +
+ +
/Doctrine/DBAL/Driver/PDOSqlite/Driver.php at line 113
+

getDatabase

+public void getDatabase(mixed conn) +
+
+ +
+ +
/Doctrine/DBAL/Driver/PDOSqlite/Driver.php at line 92
+

getDatabasePlatform

+public void getDatabasePlatform() +
+

Gets the database platform that is relevant for this driver.

+ +
+ +
/Doctrine/DBAL/Driver/PDOSqlite/Driver.php at line 108
+

getName

+public void getName() +
+
+ +
+ +
/Doctrine/DBAL/Driver/PDOSqlite/Driver.php at line 103
+

getSchemaManager

+public Doctrine\DBAL\Schema\SqliteSchemaManager getSchemaManager(Doctrine\DBAL\Connection conn) +
+

Gets the schema manager that is relevant for this driver.

+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/dbal/driver/pdosqlite/package-frame.html b/lib/api/doctrine/dbal/driver/pdosqlite/package-frame.html new file mode 100644 index 000000000..6dd88cce8 --- /dev/null +++ b/lib/api/doctrine/dbal/driver/pdosqlite/package-frame.html @@ -0,0 +1,26 @@ + + + + + + + + + + + +Doctrine\DBAL\Driver\PDOSqlite (Doctrine) + + + + +

Doctrine\DBAL\Driver\PDOSqlite

+ +

Classes

+ + + + + \ No newline at end of file diff --git a/lib/api/doctrine/dbal/driver/pdosqlite/package-functions.html b/lib/api/doctrine/dbal/driver/pdosqlite/package-functions.html new file mode 100644 index 000000000..f2fcee550 --- /dev/null +++ b/lib/api/doctrine/dbal/driver/pdosqlite/package-functions.html @@ -0,0 +1,69 @@ + + + + + + + + + + + +Functions (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +

Functions

+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/dbal/driver/pdosqlite/package-globals.html b/lib/api/doctrine/dbal/driver/pdosqlite/package-globals.html new file mode 100644 index 000000000..f46542803 --- /dev/null +++ b/lib/api/doctrine/dbal/driver/pdosqlite/package-globals.html @@ -0,0 +1,69 @@ + + + + + + + + + + + +Globals (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +

Globals

+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/dbal/driver/pdosqlite/package-summary.html b/lib/api/doctrine/dbal/driver/pdosqlite/package-summary.html new file mode 100644 index 000000000..c0a57ba80 --- /dev/null +++ b/lib/api/doctrine/dbal/driver/pdosqlite/package-summary.html @@ -0,0 +1,64 @@ + + + + + + + + + + + +Doctrine\DBAL\Driver\PDOSqlite (Doctrine) + + + + +
+

Doctrine

+ +
+ + +
+ +

Namespace Doctrine\DBAL\Driver\PDOSqlite

+ + + + +
Class Summary
DriverThe PDO Sqlite driver.
+ +
+ +
+

Doctrine

+ +
+ + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/dbal/driver/pdosqlite/package-tree.html b/lib/api/doctrine/dbal/driver/pdosqlite/package-tree.html new file mode 100644 index 000000000..cbb9c0c8f --- /dev/null +++ b/lib/api/doctrine/dbal/driver/pdosqlite/package-tree.html @@ -0,0 +1,56 @@ + + + + + + + + + + + +Doctrine\DBAL\Driver\PDOSqlite (Doctrine) + + + + +
+

Doctrine

+ +
+ + +

Class Hierarchy for Package Doctrine\DBAL\Driver\PDOSqlite

+
+

Doctrine

+ +
+ + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/dbal/driver/pdostatement.html b/lib/api/doctrine/dbal/driver/pdostatement.html new file mode 100644 index 000000000..dbd487c5c --- /dev/null +++ b/lib/api/doctrine/dbal/driver/pdostatement.html @@ -0,0 +1,106 @@ + + + + + + + + + + + +PDOStatement (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +
Doctrine\DBAL\Driver\PDOStatement
+
/Doctrine/DBAL/Driver/PDOStatement.php at line 30
+ +

Class PDOStatement

+ +
PDOStatement
+ +
+
All Implemented Interfaces:
+
Statement +
+ +
+ +

public class PDOStatement

+ +

The PDO implementation of the Statement interface. +Used by all PDO-based drivers.

+ +
+
Since:
+
2.0
+
+
+ + + + + + +
Constructor Summary

PDOStatement()

+ +

Constructor Detail

+
/Doctrine/DBAL/Driver/PDOStatement.php at line 32
+

PDOStatement

+public PDOStatement() +
+
+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/dbal/driver/statement.html b/lib/api/doctrine/dbal/driver/statement.html new file mode 100644 index 000000000..e897e332f --- /dev/null +++ b/lib/api/doctrine/dbal/driver/statement.html @@ -0,0 +1,331 @@ + + + + + + + + + + + +Statement (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +
Doctrine\DBAL\Driver\Statement
+
/Doctrine/DBAL/Driver/Statement.php at line 39
+ +

Interface Statement

+ +
Statement
+ +
+ +

public interface Statement

+ +

Statement interface. +Drivers must implement this interface.

This resembles (a subset of) the PDOStatement interface.

+ +
+
Author:
+
Konsta Vesterinen
+
Roman Borschel
+
License:
+
http://www.opensource.org/licenses/lgpl-license.php LGPL
+
See Also:
+
www.doctrine-project.org
+
Since:
+
2.0
+
Version:
+
$Revision$
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Method Summary
boolean

bindParam(mixed column, mixed variable, integer type, mixed param)

Binds a PHP variable to a corresponding named or question mark placeholder in the +SQL statement that was use to prepare the statement.

boolean

bindValue(mixed param, mixed value, integer type)

Binds a value to a corresponding named or positional +placeholder in the SQL statement that was used to prepare the statement.

boolean

closeCursor()

Closes the cursor, enabling the statement to be executed again.

integer

columnCount()

columnCount +Returns the number of columns in the result set

string

errorCode()

errorCode +Fetch the SQLSTATE associated with the last operation on the statement handle

array

errorInfo()

errorInfo +Fetch extended error information associated with the last operation on the statement handle

boolean

execute(array params)

Executes a prepared statementIf the prepared statement included parameter markers, you must either: +call PDOStatement->bindParam() to bind PHP variables to the parameter markers: +bound variables pass their value as input and receive the output value, +if any, of their associated parameter markers or pass an array of input-only +parameter values

mixed

fetch(integer fetchStyle, integer cursorOrientation, integer cursorOffset)

fetch

array

fetchAll(integer fetchStyle, integer columnIndex)

Returns an array containing all of the result set rows

string

fetchColumn(integer columnIndex)

fetchColumn +Returns a single column from the next row of a +result set or FALSE if there are no more rows.

integer

rowCount()

rowCount +rowCount() returns the number of rows affected by the last DELETE, INSERT, or UPDATE statement +executed by the corresponding object. +

+ +

Method Detail

+
/Doctrine/DBAL/Driver/Statement.php at line 78
+

bindParam

+public boolean bindParam(mixed column, mixed variable, integer type, mixed param) +
+

Binds a PHP variable to a corresponding named or question mark placeholder in the +SQL statement that was use to prepare the statement. Unlike PDOStatement->bindValue(), +the variable is bound as a reference and will only be evaluated at the time +that PDOStatement->execute() is called.

Most parameters are input parameters, that is, parameters that are +used in a read-only fashion to build up the query. Some drivers support the invocation +of stored procedures that return data as output parameters, and some also as input/output +parameters that both send in data and are updated to receive it.

+
Parameters:
+
param - Parameter identifier. For a prepared statement using named placeholders, this will be a parameter name of the form :name. For a prepared statement using question mark placeholders, this will be the 1-indexed position of the parameter
+
variable - Name of the PHP variable to bind to the SQL statement parameter.
+
type - Explicit data type for the parameter using the PDO::PARAM_* constants. To return an INOUT parameter from a stored procedure, use the bitwise OR operator to set the PDO::PARAM_INPUT_OUTPUT bits for the data_type parameter.
+
Returns:
+
Returns TRUE on success or FALSE on failure.
+
+
+ +
+ +
/Doctrine/DBAL/Driver/Statement.php at line 54
+

bindValue

+public boolean bindValue(mixed param, mixed value, integer type) +
+

Binds a value to a corresponding named or positional +placeholder in the SQL statement that was used to prepare the statement.

+
Parameters:
+
param - Parameter identifier. For a prepared statement using named placeholders, this will be a parameter name of the form :name. For a prepared statement using question mark placeholders, this will be the 1-indexed position of the parameter
+
value - The value to bind to the parameter.
+
type - Explicit data type for the parameter using the PDO::PARAM_* constants.
+
Returns:
+
Returns TRUE on success or FALSE on failure.
+
+
+ +
+ +
/Doctrine/DBAL/Driver/Statement.php at line 85
+

closeCursor

+public boolean closeCursor() +
+

Closes the cursor, enabling the statement to be executed again.

+
Returns:
+
Returns TRUE on success or FALSE on failure.
+
+
+ +
+ +
/Doctrine/DBAL/Driver/Statement.php at line 95
+

columnCount

+public integer columnCount() +
+

columnCount +Returns the number of columns in the result set

+
Returns:
+
Returns the number of columns in the result set represented by the PDOStatement object. If there is no result set, this method should return 0.
+
+
+ +
+ +
/Doctrine/DBAL/Driver/Statement.php at line 104
+

errorCode

+public string errorCode() +
+

errorCode +Fetch the SQLSTATE associated with the last operation on the statement handle

+
See Also:
+
Doctrine_Adapter_Interface::errorCode()
+
Returns:
+
error code string
+
+
+ +
+ +
/Doctrine/DBAL/Driver/Statement.php at line 113
+

errorInfo

+public array errorInfo() +
+

errorInfo +Fetch extended error information associated with the last operation on the statement handle

+
See Also:
+
Doctrine_Adapter_Interface::errorInfo()
+
Returns:
+
error info array
+
+
+ +
+ +
/Doctrine/DBAL/Driver/Statement.php at line 129
+

execute

+public boolean execute(array params) +
+

Executes a prepared statement

If the prepared statement included parameter markers, you must either: +call PDOStatement->bindParam() to bind PHP variables to the parameter markers: +bound variables pass their value as input and receive the output value, +if any, of their associated parameter markers or pass an array of input-only +parameter values

+
Parameters:
+
params - An array of values with as many elements as there are bound parameters in the SQL statement being executed.
+
Returns:
+
Returns TRUE on success or FALSE on failure.
+
+
+ +
+ +
/Doctrine/DBAL/Driver/Statement.php at line 158
+

fetch

+public mixed fetch(integer fetchStyle, integer cursorOrientation, integer cursorOffset) +
+

fetch

+
See Also:
+
constants
+
Parameters:
+
fetchStyle - Controls how the next row will be returned to the caller. This value must be one of the Query::HYDRATE_* constants, defaulting to Query::HYDRATE_BOTH
+
cursorOrientation - For a PDOStatement object representing a scrollable cursor, this value determines which row will be returned to the caller. This value must be one of the Query::HYDRATE_ORI_* constants, defaulting to Query::HYDRATE_ORI_NEXT. To request a scrollable cursor for your PDOStatement object, you must set the PDO::ATTR_CURSOR attribute to Doctrine::CURSOR_SCROLL when you prepare the SQL statement with Doctrine_Adapter_Interface->prepare().
+
cursorOffset - For a PDOStatement object representing a scrollable cursor for which the $cursorOrientation parameter is set to Query::HYDRATE_ORI_ABS, this value specifies the absolute number of the row in the result set that shall be fetched. For a PDOStatement object representing a scrollable cursor for which the $cursorOrientation parameter is set to Query::HYDRATE_ORI_REL, this value specifies the row to fetch relative to the cursor position before PDOStatement->fetch() was called.
+
+
+ +
+ +
/Doctrine/DBAL/Driver/Statement.php at line 172
+

fetchAll

+public array fetchAll(integer fetchStyle, integer columnIndex) +
+

Returns an array containing all of the result set rows

+
Parameters:
+
fetchStyle - Controls how the next row will be returned to the caller. This value must be one of the Query::HYDRATE_* constants, defaulting to Query::HYDRATE_BOTH
+
columnIndex - Returns the indicated 0-indexed column when the value of $fetchStyle is Query::HYDRATE_COLUMN. Defaults to 0.
+
+
+ +
+ +
/Doctrine/DBAL/Driver/Statement.php at line 185
+

fetchColumn

+public string fetchColumn(integer columnIndex) +
+

fetchColumn +Returns a single column from the next row of a +result set or FALSE if there are no more rows.

+
Parameters:
+
columnIndex - 0-indexed number of the column you wish to retrieve from the row. If no value is supplied, PDOStatement->fetchColumn() fetches the first column.
+
Returns:
+
returns a single column in the next row of a result set.
+
+
+ +
+ +
/Doctrine/DBAL/Driver/Statement.php at line 199
+

rowCount

+public integer rowCount() +
+

rowCount +rowCount() returns the number of rows affected by the last DELETE, INSERT, or UPDATE statement +executed by the corresponding object.

If the last SQL statement executed by the associated Statement object was a SELECT statement, +some databases may return the number of rows returned by that statement. However, +this behaviour is not guaranteed for all databases and should not be +relied on for portable applications.

+
Returns:
+
Returns the number of rows.
+
+
+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/dbal/drivermanager.html b/lib/api/doctrine/dbal/drivermanager.html new file mode 100644 index 000000000..c6b8aa625 --- /dev/null +++ b/lib/api/doctrine/dbal/drivermanager.html @@ -0,0 +1,142 @@ + + + + + + + + + + + +DriverManager (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +
Doctrine\DBAL\DriverManager
+
/Doctrine/DBAL/DriverManager.php at line 32
+ +

Class DriverManager

+ +
DriverManager
+ +
+ +

public final class DriverManager

+ +

Factory for creating Doctrine\DBAL\Connection instances.

+ +
+
Author:
+
Roman Borschel
+
Since:
+
2.0
+
+
+ + + + + + +
Constructor Summary

DriverManager()

Private constructor.

+ + + + + + + +
Method Summary
static Doctrine\DBAL\Connection

getConnection(array params, mixed config, mixed eventManager, Doctrine\Common\EventManager The)

Creates a connection object based on the specified parameters. +

+ +

Constructor Detail

+
/Doctrine/DBAL/DriverManager.php at line 50
+

DriverManager

+public DriverManager() +
+

Private constructor. This class cannot be instantiated.

+ +
+ +

Method Detail

+
/Doctrine/DBAL/DriverManager.php at line 94
+

getConnection

+public static Doctrine\DBAL\Connection getConnection(array params, mixed config, mixed eventManager, Doctrine\Common\EventManager The) +
+

Creates a connection object based on the specified parameters. +This method returns a Doctrine\DBAL\Connection which wraps the underlying +driver connection.

$params must contain at least one of the following.

Either 'driver' with one of the following values: +pdo_mysql +pdo_sqlite +pdo_pgsql +pdo_oracle +pdo_mssql

OR 'driverClass' that contains the full class name (with namespace) of the +driver class to instantiate.

Other (optional) parameters:

user (string): +The username to use when connecting.

password (string): +The password to use when connecting.

driverOptions (array): +Any additional driver-specific options for the driver. These are just passed +through to the driver.

pdo: +You can pass an existing PDO instance through this parameter. The PDO +instance will be wrapped in a Doctrine\DBAL\Connection.

wrapperClass: +You may specify a custom wrapper class through the 'wrapperClass' +parameter but this class MUST inherit from Doctrine\DBAL\Connection.

+
Parameters:
+
params - The parameters.
+
The - configuration to use.
+
The - event manager to use.
+
+
+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/dbal/event/connectioneventargs.html b/lib/api/doctrine/dbal/event/connectioneventargs.html new file mode 100644 index 000000000..112f7516e --- /dev/null +++ b/lib/api/doctrine/dbal/event/connectioneventargs.html @@ -0,0 +1,168 @@ + + + + + + + + + + + +ConnectionEventArgs (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +
Doctrine\DBAL\Event\ConnectionEventArgs
+
/Doctrine/DBAL/Event/ConnectionEventArgs.php at line 36
+ +

Class ConnectionEventArgs

+ +
Class:ConnectionEventArgs - Superclass: EventArgs
+EventArgs
⌊ ConnectionEventArgs
+ +
+ +

public class ConnectionEventArgs
extends EventArgs + +

+ +

Event Arguments used when a Driver connection is established inside Doctrine\DBAL\Connection.

+ +
+
License:
+
http://www.opensource.org/licenses/lgpl-license.php LGPL
+
See Also:
+
www.doctrine-project.com
+
Since:
+
1.0
+
Version:
+
$Revision$
+
Author:
+
Benjamin Eberlei
+
+
+ + + + + + +
Constructor Summary

ConnectionEventArgs(mixed connection)

+ + + + + + + + + + + + + + + + + + + +
Method Summary
Doctrine\DBAL\Connection

getConnection()

Doctrine\DBAL\Platforms\AbstractPlatform

getDatabasePlatform()

Doctrine\DBAL\Driver

getDriver()

Doctrine\DBAL\Schema\AbstractSchemaManager

getSchemaManager()

+ + + +
Methods inherited from Doctrine\Common\EventArgs
getEmptyInstance
+ +

Constructor Detail

+
/Doctrine/DBAL/Event/ConnectionEventArgs.php at line 43
+

ConnectionEventArgs

+public ConnectionEventArgs(mixed connection) +
+
+ +
+ +

Method Detail

+
/Doctrine/DBAL/Event/ConnectionEventArgs.php at line 51
+

getConnection

+public Doctrine\DBAL\Connection getConnection() +
+

+ +
+ +
/Doctrine/DBAL/Event/ConnectionEventArgs.php at line 67
+

getDatabasePlatform

+public Doctrine\DBAL\Platforms\AbstractPlatform getDatabasePlatform() +
+

+ +
+ +
/Doctrine/DBAL/Event/ConnectionEventArgs.php at line 59
+

getDriver

+public Doctrine\DBAL\Driver getDriver() +
+

+ +
+ +
/Doctrine/DBAL/Event/ConnectionEventArgs.php at line 75
+

getSchemaManager

+public Doctrine\DBAL\Schema\AbstractSchemaManager getSchemaManager() +
+

+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/dbal/event/listeners/mysqlsessioninit.html b/lib/api/doctrine/dbal/event/listeners/mysqlsessioninit.html new file mode 100644 index 000000000..c4932e7d0 --- /dev/null +++ b/lib/api/doctrine/dbal/event/listeners/mysqlsessioninit.html @@ -0,0 +1,142 @@ + + + + + + + + + + + +MysqlSessionInit (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +
Doctrine\DBAL\Event\Listeners\MysqlSessionInit
+
/Doctrine/DBAL/Event/Listeners/MysqlSessionInit.php at line 37
+ +

Class MysqlSessionInit

+ +
MysqlSessionInit
+ +
+
All Implemented Interfaces:
+
EventSubscriber +
+ +
+ +

public class MysqlSessionInit

+ +

MySQL Session Init Event Subscriber which allows to set the Client Encoding of the Connection

+ +
+
License:
+
http://www.opensource.org/licenses/lgpl-license.php LGPL
+
See Also:
+
www.doctrine-project.com
+
Since:
+
1.0
+
Version:
+
$Revision$
+
Author:
+
Benjamin Eberlei
+
+
+ + + + + + +
Constructor Summary

MysqlSessionInit(string charset, string collation)

Configure Charset and Collation options of MySQL Client for each Connection

+ + + + + + + + + + + +
Method Summary
void

getSubscribedEvents()

void

postConnect(ConnectionEventArgs args)

+ +

Constructor Detail

+
/Doctrine/DBAL/Event/Listeners/MysqlSessionInit.php at line 55
+

MysqlSessionInit

+public MysqlSessionInit(string charset, string collation) +
+

Configure Charset and Collation options of MySQL Client for each Connection

+ +
+ +

Method Detail

+
/Doctrine/DBAL/Event/Listeners/MysqlSessionInit.php at line 71
+

getSubscribedEvents

+public void getSubscribedEvents() +
+
+ +
+ +
/Doctrine/DBAL/Event/Listeners/MysqlSessionInit.php at line 65
+

postConnect

+public void postConnect(ConnectionEventArgs args) +
+

+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/dbal/event/listeners/oraclesessioninit.html b/lib/api/doctrine/dbal/event/listeners/oraclesessioninit.html new file mode 100644 index 000000000..142527ab5 --- /dev/null +++ b/lib/api/doctrine/dbal/event/listeners/oraclesessioninit.html @@ -0,0 +1,162 @@ + + + + + + + + + + + +OracleSessionInit (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +
Doctrine\DBAL\Event\Listeners\OracleSessionInit
+
/Doctrine/DBAL/Event/Listeners/OracleSessionInit.php at line 44
+ +

Class OracleSessionInit

+ +
OracleSessionInit
+ +
+
All Implemented Interfaces:
+
EventSubscriber +
+ +
+ +

public class OracleSessionInit

+ +

Should be used when Oracle Server default enviroment does not match the Doctrine requirements.

The following enviroment variables are required for the Doctrine default date format:

NLS_TIME_FORMAT="HH24:MI:SS" +NLS_DATE_FORMAT="YYYY-MM-DD" +NLS_TIMESTAMP_FORMAT="YYYY-MM-DD HH24:MI:SS" +NLS_TIMESTAMP_TZ_FORMAT="YYYY-MM-DD HH24:MI:SS TZH:TZM"

+ +
+
License:
+
http://www.opensource.org/licenses/lgpl-license.php LGPL
+
See Also:
+
www.doctrine-project.com
+
Since:
+
1.0
+
Version:
+
$Revision$
+
Author:
+
Benjamin Eberlei
+
+
+ + + + + + + +
Field Summary
protected mixed

$_defaultSessionVars

+ + + + + + +
Constructor Summary

OracleSessionInit(array oracleSessionVars)

+ + + + + + + + + + + +
Method Summary
void

getSubscribedEvents()

void

postConnect(ConnectionEventArgs args)

+ +

Field Detail

+
/Doctrine/DBAL/Event/Listeners/OracleSessionInit.php at line 46
+

_defaultSessionVars

+protected mixed $_defaultSessionVars = array(...) +
+
+ +
+ +

Constructor Detail

+
/Doctrine/DBAL/Event/Listeners/OracleSessionInit.php at line 56
+

OracleSessionInit

+public OracleSessionInit(array oracleSessionVars) +
+

+ +
+ +

Method Detail

+
/Doctrine/DBAL/Event/Listeners/OracleSessionInit.php at line 78
+

getSubscribedEvents

+public void getSubscribedEvents() +
+
+ +
+ +
/Doctrine/DBAL/Event/Listeners/OracleSessionInit.php at line 65
+

postConnect

+public void postConnect(ConnectionEventArgs args) +
+

+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/dbal/event/listeners/package-frame.html b/lib/api/doctrine/dbal/event/listeners/package-frame.html new file mode 100644 index 000000000..d18d3a841 --- /dev/null +++ b/lib/api/doctrine/dbal/event/listeners/package-frame.html @@ -0,0 +1,27 @@ + + + + + + + + + + + +Doctrine\DBAL\Event\Listeners (Doctrine) + + + + +

Doctrine\DBAL\Event\Listeners

+ +

Classes

+ + + + + \ No newline at end of file diff --git a/lib/api/doctrine/dbal/event/listeners/package-functions.html b/lib/api/doctrine/dbal/event/listeners/package-functions.html new file mode 100644 index 000000000..29a86a928 --- /dev/null +++ b/lib/api/doctrine/dbal/event/listeners/package-functions.html @@ -0,0 +1,69 @@ + + + + + + + + + + + +Functions (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +

Functions

+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/dbal/event/listeners/package-globals.html b/lib/api/doctrine/dbal/event/listeners/package-globals.html new file mode 100644 index 000000000..f0dcf7567 --- /dev/null +++ b/lib/api/doctrine/dbal/event/listeners/package-globals.html @@ -0,0 +1,69 @@ + + + + + + + + + + + +Globals (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +

Globals

+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/dbal/event/listeners/package-summary.html b/lib/api/doctrine/dbal/event/listeners/package-summary.html new file mode 100644 index 000000000..6fae84522 --- /dev/null +++ b/lib/api/doctrine/dbal/event/listeners/package-summary.html @@ -0,0 +1,66 @@ + + + + + + + + + + + +Doctrine\DBAL\Event\Listeners (Doctrine) + + + + +
+

Doctrine

+ +
+ + +
+ +

Namespace Doctrine\DBAL\Event\Listeners

+ + + + + +
Class Summary
MysqlSessionInitMySQL Session Init Event Subscriber which allows to set the Client Encoding of the Connection
OracleSessionInitShould be used when Oracle Server default enviroment does not match the Doctrine requirements. +
+ +
+ +
+

Doctrine

+ +
+ + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/dbal/event/listeners/package-tree.html b/lib/api/doctrine/dbal/event/listeners/package-tree.html new file mode 100644 index 000000000..56f407c91 --- /dev/null +++ b/lib/api/doctrine/dbal/event/listeners/package-tree.html @@ -0,0 +1,57 @@ + + + + + + + + + + + +Doctrine\DBAL\Event\Listeners (Doctrine) + + + + +
+

Doctrine

+ +
+ + +

Class Hierarchy for Package Doctrine\DBAL\Event\Listeners

+
+

Doctrine

+ +
+ + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/dbal/event/package-frame.html b/lib/api/doctrine/dbal/event/package-frame.html new file mode 100644 index 000000000..03e59628d --- /dev/null +++ b/lib/api/doctrine/dbal/event/package-frame.html @@ -0,0 +1,26 @@ + + + + + + + + + + + +Doctrine\DBAL\Event (Doctrine) + + + + +

Doctrine\DBAL\Event

+ +

Classes

+ + + + + \ No newline at end of file diff --git a/lib/api/doctrine/dbal/event/package-functions.html b/lib/api/doctrine/dbal/event/package-functions.html new file mode 100644 index 000000000..e427fe90e --- /dev/null +++ b/lib/api/doctrine/dbal/event/package-functions.html @@ -0,0 +1,69 @@ + + + + + + + + + + + +Functions (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +

Functions

+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/dbal/event/package-globals.html b/lib/api/doctrine/dbal/event/package-globals.html new file mode 100644 index 000000000..3158e8753 --- /dev/null +++ b/lib/api/doctrine/dbal/event/package-globals.html @@ -0,0 +1,69 @@ + + + + + + + + + + + +Globals (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +

Globals

+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/dbal/event/package-summary.html b/lib/api/doctrine/dbal/event/package-summary.html new file mode 100644 index 000000000..79ff93c49 --- /dev/null +++ b/lib/api/doctrine/dbal/event/package-summary.html @@ -0,0 +1,64 @@ + + + + + + + + + + + +Doctrine\DBAL\Event (Doctrine) + + + + +
+

Doctrine

+ +
+ + +
+ +

Namespace Doctrine\DBAL\Event

+ + + + +
Class Summary
ConnectionEventArgsEvent Arguments used when a Driver connection is established inside Doctrine\DBAL\Connection.
+ +
+ +
+

Doctrine

+ +
+ + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/dbal/event/package-tree.html b/lib/api/doctrine/dbal/event/package-tree.html new file mode 100644 index 000000000..39fc28512 --- /dev/null +++ b/lib/api/doctrine/dbal/event/package-tree.html @@ -0,0 +1,59 @@ + + + + + + + + + + + +Doctrine\DBAL\Event (Doctrine) + + + + +
+

Doctrine

+ +
+ + +

Class Hierarchy for Package Doctrine\DBAL\Event

+
+

Doctrine

+ +
+ + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/dbal/events.html b/lib/api/doctrine/dbal/events.html new file mode 100644 index 000000000..8f2655ad7 --- /dev/null +++ b/lib/api/doctrine/dbal/events.html @@ -0,0 +1,167 @@ + + + + + + + + + + + +Events (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +
Doctrine\DBAL\Events
+
/Doctrine/DBAL/Events.php at line 32
+ +

Class Events

+ +
Events
+ +
+ +

public final class Events

+ +

Container for all DBAL events.

This class cannot be instantiated.

+ +
+
Author:
+
Roman Borschel
+
Since:
+
2.0
+
+
+ + + + + + + + + + + + + + + + + + + + + + + +
Field Summary
final str

postConnect

final str

postExec

final str

postExecute

final str

preExec

final str

preExecute

+ + + + + + +
Constructor Summary

Events()

+ +

Field Detail

+
/Doctrine/DBAL/Events.php at line 41
+

postConnect

+public final str postConnect = 'postConnect' +
+
+ +
+ +
/Doctrine/DBAL/Events.php at line 37
+

postExec

+public final str postExec = 'postExec' +
+
+ +
+ +
/Doctrine/DBAL/Events.php at line 39
+

postExecute

+public final str postExecute = 'postExecute' +
+
+ +
+ +
/Doctrine/DBAL/Events.php at line 36
+

preExec

+public final str preExec = 'preExec' +
+
+ +
+ +
/Doctrine/DBAL/Events.php at line 38
+

preExecute

+public final str preExecute = 'preExecute' +
+
+ +
+ +

Constructor Detail

+
/Doctrine/DBAL/Events.php at line 34
+

Events

+public Events() +
+
+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/dbal/logging/debugstack.html b/lib/api/doctrine/dbal/logging/debugstack.html new file mode 100644 index 000000000..945d1c8e4 --- /dev/null +++ b/lib/api/doctrine/dbal/logging/debugstack.html @@ -0,0 +1,141 @@ + + + + + + + + + + + +DebugStack (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +
Doctrine\DBAL\Logging\DebugStack
+
/Doctrine/DBAL/Logging/DebugStack.php at line 36
+ +

Class DebugStack

+ +
DebugStack
+ +
+ +

public class DebugStack

+ +

Includes executed SQLs in a Debug Stack

+ +
+
License:
+
http://www.opensource.org/licenses/lgpl-license.php LGPL
+
See Also:
+
www.doctrine-project.org
+
Since:
+
2.0
+
Version:
+
$Revision$
+
Author:
+
Benjamin Eberlei
+
Guilherme Blanco
+
Jonathan Wage
+
Roman Borschel
+
+
+ + + + + + + + + + + +
Field Summary
mixed

$enabled

@var boolean $enabled If Debug Stack is enabled (log queries) or not.

mixed

$queries

@var array $queries Executed SQL queries.

+ + + + + + + +
Method Summary
void

logSQL(mixed sql, mixed params)

{@inheritdoc}

+ +

Field Detail

+
/Doctrine/DBAL/Logging/DebugStack.php at line 42
+

enabled

+public mixed $enabled = true +
+

boolean $enabled If Debug Stack is enabled (log queries) or not.

+ +
+ +
/Doctrine/DBAL/Logging/DebugStack.php at line 39
+

queries

+public mixed $queries = array() +
+

array $queries Executed SQL queries.

+ +
+ +

Method Detail

+
/Doctrine/DBAL/Logging/DebugStack.php at line 47
+

logSQL

+public void logSQL(mixed sql, mixed params) +
+

+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/dbal/logging/echosqllogger.html b/lib/api/doctrine/dbal/logging/echosqllogger.html new file mode 100644 index 000000000..2d5de8408 --- /dev/null +++ b/lib/api/doctrine/dbal/logging/echosqllogger.html @@ -0,0 +1,112 @@ + + + + + + + + + + + +EchoSQLLogger (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +
Doctrine\DBAL\Logging\EchoSQLLogger
+
/Doctrine/DBAL/Logging/EchoSQLLogger.php at line 36
+ +

Class EchoSQLLogger

+ +
EchoSQLLogger
+ +
+ +

public class EchoSQLLogger

+ +

A SQL logger that logs to the standard output using echo/var_dump.

+ +
+
License:
+
http://www.opensource.org/licenses/lgpl-license.php LGPL
+
See Also:
+
www.doctrine-project.org
+
Since:
+
2.0
+
Version:
+
$Revision$
+
Author:
+
Benjamin Eberlei
+
Guilherme Blanco
+
Jonathan Wage
+
Roman Borschel
+
+
+ + + + + + + +
Method Summary
void

logSQL(mixed sql, mixed params)

{@inheritdoc}

+ +

Method Detail

+
/Doctrine/DBAL/Logging/EchoSQLLogger.php at line 41
+

logSQL

+public void logSQL(mixed sql, mixed params) +
+

+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/dbal/logging/package-frame.html b/lib/api/doctrine/dbal/logging/package-frame.html new file mode 100644 index 000000000..b87e215cc --- /dev/null +++ b/lib/api/doctrine/dbal/logging/package-frame.html @@ -0,0 +1,32 @@ + + + + + + + + + + + +Doctrine\DBAL\Logging (Doctrine) + + + + +

Doctrine\DBAL\Logging

+ +

Classes

+ + +

Interfaces

+ + + + + \ No newline at end of file diff --git a/lib/api/doctrine/dbal/logging/package-functions.html b/lib/api/doctrine/dbal/logging/package-functions.html new file mode 100644 index 000000000..72dea60cb --- /dev/null +++ b/lib/api/doctrine/dbal/logging/package-functions.html @@ -0,0 +1,69 @@ + + + + + + + + + + + +Functions (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +

Functions

+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/dbal/logging/package-globals.html b/lib/api/doctrine/dbal/logging/package-globals.html new file mode 100644 index 000000000..c3815d9bf --- /dev/null +++ b/lib/api/doctrine/dbal/logging/package-globals.html @@ -0,0 +1,69 @@ + + + + + + + + + + + +Globals (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +

Globals

+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/dbal/logging/package-summary.html b/lib/api/doctrine/dbal/logging/package-summary.html new file mode 100644 index 000000000..2fa74e671 --- /dev/null +++ b/lib/api/doctrine/dbal/logging/package-summary.html @@ -0,0 +1,70 @@ + + + + + + + + + + + +Doctrine\DBAL\Logging (Doctrine) + + + + +
+

Doctrine

+ +
+ + +
+ +

Namespace Doctrine\DBAL\Logging

+ + + + + +
Class Summary
DebugStackIncludes executed SQLs in a Debug Stack
EchoSQLLoggerA SQL logger that logs to the standard output using echo/var_dump.
+ + + + +
Interface Summary
SQLLoggerInterface for SQL loggers.
+ +
+ +
+

Doctrine

+ +
+ + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/dbal/logging/package-tree.html b/lib/api/doctrine/dbal/logging/package-tree.html new file mode 100644 index 000000000..5b953f52c --- /dev/null +++ b/lib/api/doctrine/dbal/logging/package-tree.html @@ -0,0 +1,57 @@ + + + + + + + + + + + +Doctrine\DBAL\Logging (Doctrine) + + + + +
+

Doctrine

+ +
+ + +

Class Hierarchy for Package Doctrine\DBAL\Logging

+
+

Doctrine

+ +
+ + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/dbal/logging/sqllogger.html b/lib/api/doctrine/dbal/logging/sqllogger.html new file mode 100644 index 000000000..3e01039f0 --- /dev/null +++ b/lib/api/doctrine/dbal/logging/sqllogger.html @@ -0,0 +1,117 @@ + + + + + + + + + + + +SQLLogger (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +
Doctrine\DBAL\Logging\SQLLogger
+
/Doctrine/DBAL/Logging/SQLLogger.php at line 36
+ +

Interface SQLLogger

+ +
SQLLogger
+ +
+ +

public interface SQLLogger

+ +

Interface for SQL loggers.

+ +
+
License:
+
http://www.opensource.org/licenses/lgpl-license.php LGPL
+
See Also:
+
www.doctrine-project.org
+
Since:
+
2.0
+
Version:
+
$Revision$
+
Author:
+
Benjamin Eberlei
+
Guilherme Blanco
+
Jonathan Wage
+
Roman Borschel
+
+
+ + + + + + + +
Method Summary
void

logSQL(string sql, array params)

Logs a SQL statement somewhere.

+ +

Method Detail

+
/Doctrine/DBAL/Logging/SQLLogger.php at line 44
+

logSQL

+public void logSQL(string sql, array params) +
+

Logs a SQL statement somewhere.

+
Parameters:
+
sql - The SQL to be executed.
+
params - The SQL parameters.
+
+
+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/dbal/package-frame.html b/lib/api/doctrine/dbal/package-frame.html new file mode 100644 index 000000000..30708755e --- /dev/null +++ b/lib/api/doctrine/dbal/package-frame.html @@ -0,0 +1,41 @@ + + + + + + + + + + + +Doctrine\DBAL (Doctrine) + + + + +

Doctrine\DBAL

+ +

Classes

+ + +

Interfaces

+ + +

Exceptions

+ + + + + \ No newline at end of file diff --git a/lib/api/doctrine/dbal/package-functions.html b/lib/api/doctrine/dbal/package-functions.html new file mode 100644 index 000000000..1534894d5 --- /dev/null +++ b/lib/api/doctrine/dbal/package-functions.html @@ -0,0 +1,69 @@ + + + + + + + + + + + +Functions (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +

Functions

+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/dbal/package-globals.html b/lib/api/doctrine/dbal/package-globals.html new file mode 100644 index 000000000..ade0b8975 --- /dev/null +++ b/lib/api/doctrine/dbal/package-globals.html @@ -0,0 +1,69 @@ + + + + + + + + + + + +Globals (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +

Globals

+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/dbal/package-summary.html b/lib/api/doctrine/dbal/package-summary.html new file mode 100644 index 000000000..2519412d6 --- /dev/null +++ b/lib/api/doctrine/dbal/package-summary.html @@ -0,0 +1,84 @@ + + + + + + + + + + + +Doctrine\DBAL (Doctrine) + + + + +
+

Doctrine

+ +
+ + +
+ +

Namespace Doctrine\DBAL

+ + + + + + + + + +
Class Summary
ConfigurationConfiguration container for the Doctrine DBAL.
ConnectionA wrapper around a Doctrine\DBAL\Driver\Connection that adds features like +events, transaction isolation levels, configuration, emulated transaction nesting, +lazy connecting and more.
ConnectionExceptionDoctrine\DBAL\ConnectionException
DriverManagerFactory for creating Doctrine\DBAL\Connection instances.
EventsContainer for all DBAL events. +
StatementA thin wrapper around a Doctrine\DBAL\Driver\Statement that adds support +for logging, DBAL mapping types, etc.
+ + + + +
Interface Summary
DriverDriver interface. +
+ + + + +
Exception Summary
DBALException
+ +
+ +
+

Doctrine

+ +
+ + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/dbal/package-tree.html b/lib/api/doctrine/dbal/package-tree.html new file mode 100644 index 000000000..56affa477 --- /dev/null +++ b/lib/api/doctrine/dbal/package-tree.html @@ -0,0 +1,60 @@ + + + + + + + + + + + +Doctrine\DBAL (Doctrine) + + + + +
+

Doctrine

+ +
+ + +

Class Hierarchy for Package Doctrine\DBAL

+
+

Doctrine

+ +
+ + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/dbal/platforms/abstractplatform.html b/lib/api/doctrine/dbal/platforms/abstractplatform.html new file mode 100644 index 000000000..f1ea0600b --- /dev/null +++ b/lib/api/doctrine/dbal/platforms/abstractplatform.html @@ -0,0 +1,1972 @@ + + + + + + + + + + + +AbstractPlatform (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +
Doctrine\DBAL\Platforms\AbstractPlatform
+
/Doctrine/DBAL/Platforms/AbstractPlatform.php at line 47
+ +

Class AbstractPlatform

+ +
AbstractPlatform
+ +
+ +

public abstract class AbstractPlatform

+ +

Base class for all DatabasePlatforms. The DatabasePlatforms are the central +point of abstraction of platform-specific behaviors, features and SQL dialects. +They are a passive source of information.

+ +
+
License:
+
http://www.opensource.org/licenses/lgpl-license.php LGPL
+
See Also:
+
www.doctrine-project.org
+
Since:
+
2.0
+
Version:
+
$Revision: 3938 $
+
Author:
+
Guilherme Blanco
+
Jonathan Wage
+
Roman Borschel
+
Lukas Smith (PEAR MDB2 library)
+
Todo:
+
Remove any unnecessary methods.
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
Field Summary
final int

CREATE_FOREIGNKEYS

final int

CREATE_INDEXES

final int

TRIM_BOTH

final int

TRIM_LEADING

final int

TRIM_TRAILING

final int

$TRIM_UNSPECIFIED

+ + + + + + +
Constructor Summary

AbstractPlatform()

Constructor.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Method Summary
void

convertBooleans(mixed item)

Some platforms need the boolean values to be converted. +

bool

createsExplicitIndexForForeignKeys()

string

fixSchemaElementName(mixed schemaElementName, string schemaName)

Makes any fixes to a name of a schema element (table, sequence, ...) that are required +by restrictions of the platform, like a maximum length.

void

getAcosExpression(mixed value)

string

getAdvancedForeignKeyOptionsSQL(ForeignKeyConstraint foreignKey)

Return the FOREIGN KEY query section dealing with non-standard options +as MATCH, INITIALLY DEFERRED, ON UPDATE, ...

array

getAlterTableSQL(TableDiff diff)

Gets the sql statements for altering an existing table. +

string

getAvgExpression(string column)

Returns the average value of a column

string

getBetweenExpression(string expression, string value1, string value2)

Returns SQL that checks if an expression evaluates to a value between +two values. +

abstract string

getBigIntTypeDeclarationSQL(array columnDef)

Gets the SQL snippet that declares an 8 byte integer column.

abstract string

getBooleanTypeDeclarationSQL(array columnDef)

Gets the SQL snippet that declares a boolean column.

string

getCheckDeclarationSQL(array definition)

Obtain DBMS specific SQL code portion needed to set a CHECK constraint +declaration to be used in statements like CREATE TABLE.

abstract void

getClobTypeDeclarationSQL(array field)

Gets the SQL snippet used to declare a CLOB column type.

string

getColumnCharsetDeclarationSQL(string charset)

Obtain DBMS specific SQL code portion needed to set the CHARACTER SET +of a field declaration to be used in statements like CREATE TABLE.

string

getColumnCollationDeclarationSQL(string collation)

Obtain DBMS specific SQL code portion needed to set the COLLATION +of a field declaration to be used in statements like CREATE TABLE.

string

getColumnDeclarationListSQL(array fields)

Get declaration of a number of fields in bulk

string

getColumnDeclarationSQL(string name, array field)

Obtain DBMS specific SQL code portion needed to declare a generic type +field to be used in statements like CREATE TABLE.

string

getConcatExpression(string arg1,)

Returns a series of strings concatinatedconcat() accepts an arbitrary number of parameters.

void

getCosExpression(mixed value)

string

getCountExpression(string|integer column)

Returns the number of rows (without a NULL value) of a columnIf a '*' is used instead of a column the number of selected rows +is returned.

string

getCreateConstraintSQL(Constraint constraint, string|Table table)

Gets the SQL to create a constraint on a table on this platform.

void

getCreateDatabaseSQL(mixed database)

string

getCreateForeignKeySQL(ForeignKeyConstraint foreignKey, string|Table table)

Create a new foreign key

string

getCreateIndexSQL(Index index, string|Table table)

Gets the SQL to create an index on a table on this platform.

void

getCreateSequenceSQL(\Doctrine\DBAL\Schema\Sequence sequence)

Gets the SQL to create a sequence on this platform.

array

getCreateTableSQL(string table, int createFlags)

Gets the SQL statement(s) to create a table with the specified name, columns and constraints +on this platform.

void

getCreateTemporaryTableSnippetSQL()

void

getCreateViewSQL(mixed name, mixed sql)

string

getCurrentDateSQL()

Gets the SQL specific for the platform to get the current date.

string

getCurrentTimeSQL()

Gets the SQL specific for the platform to get the current time.

string

getCurrentTimestampSQL()

Gets the SQL specific for the platform to get the current timestamp

string

getCustomTypeDeclarationSQL(mixed columnDef)

getCustomTypeDeclarationSql +Obtail SQL code portion needed to create a custom column, +e.g.

string

getDateFormatString()

Gets the format string, as accepted by the date() function, that describes +the format of a stored date value of this platform.

string

getDateTimeFormatString()

Gets the format string, as accepted by the date() function, that describes +the format of a stored datetime value of this platform.

string

getDateTimeTypeDeclarationSQL(array fieldDeclaration)

Obtain DBMS specific SQL to be used to create datetime fields in +statements like CREATE TABLE

string

getDateTypeDeclarationSQL(array fieldDeclaration)

Obtain DBMS specific SQL to be used to create date fields in statements +like CREATE TABLE.

string

getDecimalTypeDeclarationSQL(array columnDef)

Gets the SQL snippet that declares a floating point column of arbitrary precision.

integer

getDefaultTransactionIsolationLevel()

Gets the default transaction isolation level of the platform.

string

getDefaultValueDeclarationSQL(array field)

Obtain DBMS specific SQL code portion needed to set a default value +declaration to be used in statements like CREATE TABLE.

string

getDropConstraintSQL(\Doctrine\DBAL\Schema\Constraint constraint, string|Table table)

Get drop constraint sql

void

getDropDatabaseSQL(mixed database)

string

getDropForeignKeySQL(ForeignKeyConstraint|string foreignKey, Table|string table)

string

getDropIndexSQL(mixed index, string|Table table, Index|string name)

Drop index from a table

void

getDropSequenceSQL(mixed sequence)

string

getDropTableSQL(Table|string table)

Drop a Table

void

getDropViewSQL(mixed name)

string

getEmptyIdentityInsertSQL(string tableName, string identifierColumnName)

Get the insert sql for an empty insert statement

void

getForUpdateSql()

string

getForeignKeyBaseDeclarationSQL(ForeignKeyConstraint foreignKey)

Obtain DBMS specific SQL code portion needed to set the FOREIGN KEY constraint +of a field declaration to be used in statements like CREATE TABLE.

string

getForeignKeyDeclarationSQL(mixed foreignKey, array definition)

Obtain DBMS specific SQL code portion needed to set the FOREIGN KEY constraint +of a field declaration to be used in statements like CREATE TABLE.

void

getForeignKeyReferentialActionSQL(string action, string foreign)

returns given referential action in uppercase if valid, otherwise throws +an exception

string

getIdentifierQuoteCharacter()

Gets the character used for identifier quoting.

void

getIdentityColumnNullInsertSQL()

string

getInExpression(string column, string|array(string) values)

Returns the SQL to check if a value is one in a set of +given values. +

string

getIndexDeclarationSQL(string name, Index index)

Obtain DBMS specific SQL code portion needed to set an index +declaration to be used in statements like CREATE TABLE.

string

getIndexFieldDeclarationListSQL(mixed fields)

getIndexFieldDeclarationList +Obtain DBMS specific SQL code portion needed to set an index +declaration to be used in statements like CREATE TABLE.

abstract string

getIntegerTypeDeclarationSQL(array columnDef)

Gets the SQL snippet that declares a 4 byte integer column.

string

getIsNotNullExpression(string expression)

Returns SQL that checks if a expression is not null.

string

getIsNullExpression(string expression)

Returns SQL that checks if a expression is null.

string

getLengthExpression(mixed column, string expression1, string expression2)

Returns the length of a text field.

void

getListDatabasesSQL()

void

getListSequencesSQL(mixed database)

void

getListTableColumnsSQL(mixed table)

void

getListTableConstraintsSQL(mixed table)

void

getListTableForeignKeysSQL(mixed table)

void

getListTableIndexesSQL(mixed table)

void

getListTablesSQL()

void

getListUsersSQL()

string

getListViewsSQL(string database)

Get the SQL to list all views of a database or user.

integer

getLocateExpression(string str, string substr, mixed startPos, int pos)

returns the position of the first occurrence of substring $substr in string $str

string

getLowerExpression(string str)

lower +Returns the string $str with all characters changed to +lowercase according to the current character set mapping.

string

getLtrimExpression(string str)

ltrim +returns the string $str with leading space characters removed

string

getMaxExpression(string column)

Returns the highest value of a column

int

getMaxIdentifierLength()

Maximum length of any given databse identifier, like tables or column names.

string

getMd5Expression(mixed column)

Returns the md5 sum of a field. +

string

getMinExpression(string column)

Returns the lowest value of a column

string

getModExpression(string expression1, string expression2)

Returns the remainder of the division operation +$expression1 / $expression2.

abstract string

getName()

Gets the name of the platform.

string

getNotExpression(mixed expression)

Returns the SQL for a logical not. +

string

getNowExpression()

Returns the current system date.

void

getPiExpression()

string

getRegexpExpression()

Returns the regular expression operator.

string

getRoundExpression(mixed column, mixed decimals, string expression1, string expression2)

Rounds a numeric field to the number of decimals specified.

string

getRtrimExpression(string str)

rtrim +returns the string $str with proceeding space characters removed

string

getSQLResultCasing(string column)

Gets the character casing of a column in an SQL result set of this platform.

void

getSequenceNextValSQL(mixed sequenceName)

string

getSetCharsetSQL(string charset)

Gets the SQL statement specific for the platform to set the charset. +

void

getSetTransactionIsolationSQL(integer level)

Get sql to set the transaction isolation level

string

getShowDatabasesSQL()

Get sql query to show a list of database.

void

getSinExpression(mixed value)

abstract string

getSmallIntTypeDeclarationSQL(array columnDef)

Gets the SQL snippet that declares a 2 byte integer column.

string

getSqlCommentEndString()

Gets the string portion that ends an SQL comment.

string

getSqlCommentStartString()

Gets the string portion that starts an SQL comment.

string

getSubstringExpression(string value, integer from, integer len)

return string to call a function to get a substring inside an SQL statementNote: Not SQL92, but common functionality. +

string

getSumExpression(string column)

Returns the total sum of a column

string

getTemporaryTableSQL()

A method to return the required SQL string that fits between CREATE ...

string

getTimeFormatString()

Gets the format string, as accepted by the date() function, that describes +the format of a stored time value of this platform.

string

getTimeTypeDeclarationSQL(array fieldDeclaration)

Obtain DBMS specific SQL to be used to create time fields in statements +like CREATE TABLE.

string

getTrimExpression(string str, int pos, string char)

Trim a string, leading/trailing/both and with a given char which defaults to space.

string

getTruncateTableSQL(string tableName, bool cascade)

Generate a Truncate Table SQL statement for a given table. +

string

getUniqueConstraintDeclarationSQL(string name, Index index)

Obtain DBMS specific SQL code portion needed to set a unique +constraint declaration to be used in statements like CREATE TABLE.

string

getUniqueFieldDeclarationSQL()

Obtain DBMS specific SQL code portion needed to set the UNIQUE constraint +of a field declaration to be used in statements like CREATE TABLE.

string

getUpperExpression(string str)

upper +Returns the string $str with all characters changed to +uppercase according to the current character set mapping.

integer

getVarcharMaxLength()

Gets the maximum length of a varchar field.

abstract void

getVarcharTypeDeclarationSQL(array field)

Gets the SQL snippet used to declare a VARCHAR column type.

array

getWildcards()

Gets all SQL wildcard characters of the platform.

void

modifyLimitQuery(mixed query, mixed limit, mixed offset)

boolean

prefersIdentityColumns()

Whether the platform prefers identity columns (eg.

boolean

prefersSequences()

Whether the platform prefers sequences for ID generation. +

string

quoteIdentifier(string str)

Quotes a string so that it can be safely used as a table or column name, +even if it is a reserved word of the platform. +

void

supportsAlterTable()

boolean

supportsForeignKeyConstraints()

Does the platform supports foreign key constraints?

bool

supportsForeignKeyOnUpdate()

Does this platform supports onUpdate in foreign key constraints?

boolean

supportsGettingAffectedRows()

Whether the platform supports getting the affected rows of a recent +update/delete type query.

boolean

supportsIdentityColumns()

Whether the platform supports identity columns. +

boolean

supportsIndexes()

Whether the platform supports indexes.

boolean

supportsPrimaryConstraints()

Whether the platform supports primary key constraints.

boolean

supportsSavepoints()

Whether the platform supports savepoints.

boolean

supportsSchemas()

Whether the platform supports database schemas.

boolean

supportsSequences()

Whether the platform supports sequences.

boolean

supportsTransactions()

Whether the platform supports transactions.

+ +

Field Detail

+
/Doctrine/DBAL/Platforms/AbstractPlatform.php at line 57
+

CREATE_FOREIGNKEYS

+public final int CREATE_FOREIGNKEYS = 2 +
+

+ +
+ +
/Doctrine/DBAL/Platforms/AbstractPlatform.php at line 52
+

CREATE_INDEXES

+public final int CREATE_INDEXES = 1 +
+

+ +
+ +
/Doctrine/DBAL/Platforms/AbstractPlatform.php at line 77
+

TRIM_BOTH

+public final int TRIM_BOTH = 3 +
+

+ +
+ +
/Doctrine/DBAL/Platforms/AbstractPlatform.php at line 67
+

TRIM_LEADING

+public final int TRIM_LEADING = 1 +
+

+ +
+ +
/Doctrine/DBAL/Platforms/AbstractPlatform.php at line 72
+

TRIM_TRAILING

+public final int TRIM_TRAILING = 2 +
+

+ +
+ +
/Doctrine/DBAL/Platforms/AbstractPlatform.php at line 62
+

TRIM_UNSPECIFIED

+public final int $TRIM_UNSPECIFIED +
+

+ +
+ +

Constructor Detail

+
/Doctrine/DBAL/Platforms/AbstractPlatform.php at line 82
+

AbstractPlatform

+public AbstractPlatform() +
+

Constructor.

+ +
+ +

Method Detail

+
/Doctrine/DBAL/Platforms/AbstractPlatform.php at line 1382
+

convertBooleans

+public void convertBooleans(mixed item) +
+

Some platforms need the boolean values to be converted.

The default conversion in this implementation converts to integers (false => 0, true => 1).

+ +
+ +
/Doctrine/DBAL/Platforms/AbstractPlatform.php at line 1696
+

createsExplicitIndexForForeignKeys

+public bool createsExplicitIndexForForeignKeys() +
+

+ +
+ +
/Doctrine/DBAL/Platforms/AbstractPlatform.php at line 1805
+

fixSchemaElementName

+public string fixSchemaElementName(mixed schemaElementName, string schemaName) +
+

Makes any fixes to a name of a schema element (table, sequence, ...) that are required +by restrictions of the platform, like a maximum length.

+ +
+ +
/Doctrine/DBAL/Platforms/AbstractPlatform.php at line 471
+

getAcosExpression

+public void getAcosExpression(mixed value) +
+
+ +
+ +
/Doctrine/DBAL/Platforms/AbstractPlatform.php at line 1246
+

getAdvancedForeignKeyOptionsSQL

+public string getAdvancedForeignKeyOptionsSQL(ForeignKeyConstraint foreignKey) +
+

Return the FOREIGN KEY query section dealing with non-standard options +as MATCH, INITIALLY DEFERRED, ON UPDATE, ...

+
Parameters:
+
foreignKey - foreign key definition
+
+
+ +
+ +
/Doctrine/DBAL/Platforms/AbstractPlatform.php at line 829
+

getAlterTableSQL

+public array getAlterTableSQL(TableDiff diff) +
+

Gets the sql statements for altering an existing table.

The method returns an array of sql statements, since some platforms need several statements.

+ +
+ +
/Doctrine/DBAL/Platforms/AbstractPlatform.php at line 150
+

getAvgExpression

+public string getAvgExpression(string column) +
+

Returns the average value of a column

+
Parameters:
+
column - the column to use
+
Returns:
+
generated sql including an AVG aggregate function
+
+
+ +
+ +
/Doctrine/DBAL/Platforms/AbstractPlatform.php at line 466
+

getBetweenExpression

+public string getBetweenExpression(string expression, string value1, string value2) +
+

Returns SQL that checks if an expression evaluates to a value between +two values.

The parameter $expression is checked if it is between $value1 and $value2.

Note: There is a slight difference in the way BETWEEN works on some databases. +http://www.w3schools.com/sql/sql_between.asp. If you want complete database +independence you should avoid using between().

+
Parameters:
+
expression - the value to compare to
+
value1 - the lower value to compare with
+
value2 - the higher value to compare with
+
Returns:
+
logical expression
+
+
+ +
+ +
/Doctrine/DBAL/Platforms/AbstractPlatform.php at line 1014
+

getBigIntTypeDeclarationSQL

+public abstract string getBigIntTypeDeclarationSQL(array columnDef) +
+

Gets the SQL snippet that declares an 8 byte integer column.

+ +
+ +
/Doctrine/DBAL/Platforms/AbstractPlatform.php at line 998
+

getBooleanTypeDeclarationSQL

+public abstract string getBooleanTypeDeclarationSQL(array columnDef) +
+

Gets the SQL snippet that declares a boolean column.

+ +
+ +
/Doctrine/DBAL/Platforms/AbstractPlatform.php at line 1063
+

getCheckDeclarationSQL

+public string getCheckDeclarationSQL(array definition) +
+

Obtain DBMS specific SQL code portion needed to set a CHECK constraint +declaration to be used in statements like CREATE TABLE.

+
Parameters:
+
definition - check definition
+
Returns:
+
DBMS specific SQL code portion needed to set a CHECK constraint
+
+
+ +
+ +
/Doctrine/DBAL/Platforms/AbstractPlatform.php at line 1778
+

getClobTypeDeclarationSQL

+public abstract void getClobTypeDeclarationSQL(array field) +
+

Gets the SQL snippet used to declare a CLOB column type.

+ +
+ +
/Doctrine/DBAL/Platforms/AbstractPlatform.php at line 1335
+

getColumnCharsetDeclarationSQL

+public string getColumnCharsetDeclarationSQL(string charset) +
+

Obtain DBMS specific SQL code portion needed to set the CHARACTER SET +of a field declaration to be used in statements like CREATE TABLE.

+
Parameters:
+
charset - name of the charset
+
Returns:
+
DBMS specific SQL code portion needed to set the CHARACTER SET of a field declaration.
+
+
+ +
+ +
/Doctrine/DBAL/Platforms/AbstractPlatform.php at line 1348
+

getColumnCollationDeclarationSQL

+public string getColumnCollationDeclarationSQL(string collation) +
+

Obtain DBMS specific SQL code portion needed to set the COLLATION +of a field declaration to be used in statements like CREATE TABLE.

+
Parameters:
+
collation - name of the collation
+
Returns:
+
DBMS specific SQL code portion needed to set the COLLATION of a field declaration.
+
+
+ +
+ +
/Doctrine/DBAL/Platforms/AbstractPlatform.php at line 905
+

getColumnDeclarationListSQL

+public string getColumnDeclarationListSQL(array fields) +
+

Get declaration of a number of fields in bulk

+
Parameters:
+
fields - a multidimensional associative array. The first dimension determines the field name, while the second dimension is keyed with the name of the properties of the field being declared as array indexes. Currently, the types of supported field properties are as follows: length Integer value that determines the maximum length of the text field. If this argument is missing the field should be declared to have the longest length allowed by the DBMS. default Text value to be used as default for this field. notnull Boolean flag that indicates whether this field is constrained to not be set to null. charset Text value with the default CHARACTER SET for this field. collation Text value with the default COLLATION for this field. unique unique constraint
+
+
+ +
+ +
/Doctrine/DBAL/Platforms/AbstractPlatform.php at line 948
+

getColumnDeclarationSQL

+public string getColumnDeclarationSQL(string name, array field) +
+

Obtain DBMS specific SQL code portion needed to declare a generic type +field to be used in statements like CREATE TABLE.

+
Parameters:
+
name - name the field to be declared.
+
field - associative array with the name of the properties of the field being declared as array indexes. Currently, the types of supported field properties are as follows: length Integer value that determines the maximum length of the text field. If this argument is missing the field should be declared to have the longest length allowed by the DBMS. default Text value to be used as default for this field. notnull Boolean flag that indicates whether this field is constrained to not be set to null. charset Text value with the default CHARACTER SET for this field. collation Text value with the default COLLATION for this field. unique unique constraint check column check constraint columnDefinition a string that defines the complete column
+
Returns:
+
DBMS specific SQL code portion that should be used to declare the column.
+
+
+ +
+ +
/Doctrine/DBAL/Platforms/AbstractPlatform.php at line 380
+

getConcatExpression

+public string getConcatExpression(string arg1,) +
+

Returns a series of strings concatinated

concat() accepts an arbitrary number of parameters. Each parameter +must contain an expression

+
Parameters:
+
arg1, - $arg2 ... $argN strings that will be concatinated.
+
+
+ +
+ +
/Doctrine/DBAL/Platforms/AbstractPlatform.php at line 486
+

getCosExpression

+public void getCosExpression(mixed value) +
+
+ +
+ +
/Doctrine/DBAL/Platforms/AbstractPlatform.php at line 164
+

getCountExpression

+public string getCountExpression(string|integer column) +
+

Returns the number of rows (without a NULL value) of a column

If a '*' is used instead of a column the number of selected rows +is returned.

+
Parameters:
+
column - the column to use
+
Returns:
+
generated sql including a COUNT aggregate function
+
+
+ +
+ +
/Doctrine/DBAL/Platforms/AbstractPlatform.php at line 714
+

getCreateConstraintSQL

+public string getCreateConstraintSQL(Constraint constraint, string|Table table) +
+

Gets the SQL to create a constraint on a table on this platform.

+ +
+ +
/Doctrine/DBAL/Platforms/AbstractPlatform.php at line 1532
+

getCreateDatabaseSQL

+public void getCreateDatabaseSQL(mixed database) +
+
+ +
+ +
/Doctrine/DBAL/Platforms/AbstractPlatform.php at line 810
+

getCreateForeignKeySQL

+public string getCreateForeignKeySQL(ForeignKeyConstraint foreignKey, string|Table table) +
+

Create a new foreign key

+
Parameters:
+
foreignKey - ForeignKey instance
+
table - name of the table on which the foreign key is to be created
+
+
+ +
+ +
/Doctrine/DBAL/Platforms/AbstractPlatform.php at line 761
+

getCreateIndexSQL

+public string getCreateIndexSQL(Index index, string|Table table) +
+

Gets the SQL to create an index on a table on this platform.

+
Parameters:
+
+
table - name of the table on which the index is to be created
+
+
+ +
+ +
/Doctrine/DBAL/Platforms/AbstractPlatform.php at line 702
+

getCreateSequenceSQL

+public void getCreateSequenceSQL(\Doctrine\DBAL\Schema\Sequence sequence) +
+

Gets the SQL to create a sequence on this platform.

+
Throws:
+
DBALException
+
+
+ +
+ +
/Doctrine/DBAL/Platforms/AbstractPlatform.php at line 580
+

getCreateTableSQL

+public array getCreateTableSQL(string table, int createFlags) +
+

Gets the SQL statement(s) to create a table with the specified name, columns and constraints +on this platform.

+
Parameters:
+
table - The name of the table.
+
+
Returns:
+
The sequence of SQL statements.
+
+
+ +
+ +
/Doctrine/DBAL/Platforms/AbstractPlatform.php at line 691
+

getCreateTemporaryTableSnippetSQL

+public void getCreateTemporaryTableSnippetSQL() +
+
+ +
+ +
/Doctrine/DBAL/Platforms/AbstractPlatform.php at line 1512
+

getCreateViewSQL

+public void getCreateViewSQL(mixed name, mixed sql) +
+
+ +
+ +
/Doctrine/DBAL/Platforms/AbstractPlatform.php at line 1415
+

getCurrentDateSQL

+public string getCurrentDateSQL() +
+

Gets the SQL specific for the platform to get the current date.

+ +
+ +
/Doctrine/DBAL/Platforms/AbstractPlatform.php at line 1425
+

getCurrentTimeSQL

+public string getCurrentTimeSQL() +
+

Gets the SQL specific for the platform to get the current time.

+ +
+ +
/Doctrine/DBAL/Platforms/AbstractPlatform.php at line 1435
+

getCurrentTimestampSQL

+public string getCurrentTimestampSQL() +
+

Gets the SQL specific for the platform to get the current timestamp

+ +
+ +
/Doctrine/DBAL/Platforms/AbstractPlatform.php at line 1136
+

getCustomTypeDeclarationSQL

+public string getCustomTypeDeclarationSQL(mixed columnDef) +
+

getCustomTypeDeclarationSql +Obtail SQL code portion needed to create a custom column, +e.g. when a field has the "columnDefinition" keyword. +Only "AUTOINCREMENT" and "PRIMARY KEY" are added if appropriate.

+ +
+ +
/Doctrine/DBAL/Platforms/AbstractPlatform.php at line 1737
+

getDateFormatString

+public string getDateFormatString() +
+

Gets the format string, as accepted by the date() function, that describes +the format of a stored date value of this platform.

+
Returns:
+
The format string.
+
+
+ +
+ +
/Doctrine/DBAL/Platforms/AbstractPlatform.php at line 1726
+

getDateTimeFormatString

+public string getDateTimeFormatString() +
+

Gets the format string, as accepted by the date() function, that describes +the format of a stored datetime value of this platform.

+
Returns:
+
The format string.
+
Todo:
+
We need to get the specific format for each dbms and override this function for each platform
+
+
+ +
+ +
/Doctrine/DBAL/Platforms/AbstractPlatform.php at line 1554
+

getDateTimeTypeDeclarationSQL

+public string getDateTimeTypeDeclarationSQL(array fieldDeclaration) +
+

Obtain DBMS specific SQL to be used to create datetime fields in +statements like CREATE TABLE

+ +
+ +
/Doctrine/DBAL/Platforms/AbstractPlatform.php at line 1566
+

getDateTypeDeclarationSQL

+public string getDateTypeDeclarationSQL(array fieldDeclaration) +
+

Obtain DBMS specific SQL to be used to create date fields in statements +like CREATE TABLE.

+ +
+ +
/Doctrine/DBAL/Platforms/AbstractPlatform.php at line 982
+

getDecimalTypeDeclarationSQL

+public string getDecimalTypeDeclarationSQL(array columnDef) +
+

Gets the SQL snippet that declares a floating point column of arbitrary precision.

+ +
+ +
/Doctrine/DBAL/Platforms/AbstractPlatform.php at line 1589
+

getDefaultTransactionIsolationLevel

+public integer getDefaultTransactionIsolationLevel() +
+

Gets the default transaction isolation level of the platform.

+
Returns:
+
The default isolation level.
+
See Also:
+
constants.
+
+
+ +
+ +
/Doctrine/DBAL/Platforms/AbstractPlatform.php at line 1039
+

getDefaultValueDeclarationSQL

+public string getDefaultValueDeclarationSQL(array field) +
+

Obtain DBMS specific SQL code portion needed to set a default value +declaration to be used in statements like CREATE TABLE.

+
Parameters:
+
field - field definition array
+
Returns:
+
DBMS specific SQL code portion needed to set a default value
+
+
+ +
+ +
/Doctrine/DBAL/Platforms/AbstractPlatform.php at line 541
+

getDropConstraintSQL

+public string getDropConstraintSQL(\Doctrine\DBAL\Schema\Constraint constraint, string|Table table) +
+

Get drop constraint sql

+ +
+ +
/Doctrine/DBAL/Platforms/AbstractPlatform.php at line 496
+

getDropDatabaseSQL

+public void getDropDatabaseSQL(mixed database) +
+
+ +
+ +
/Doctrine/DBAL/Platforms/AbstractPlatform.php at line 559
+

getDropForeignKeySQL

+public string getDropForeignKeySQL(ForeignKeyConstraint|string foreignKey, Table|string table) +
+

+ +
+ +
/Doctrine/DBAL/Platforms/AbstractPlatform.php at line 523
+

getDropIndexSQL

+public string getDropIndexSQL(mixed index, string|Table table, Index|string name) +
+

Drop index from a table

+ +
+ +
/Doctrine/DBAL/Platforms/AbstractPlatform.php at line 1522
+

getDropSequenceSQL

+public void getDropSequenceSQL(mixed sequence) +
+
+ +
+ +
/Doctrine/DBAL/Platforms/AbstractPlatform.php at line 507
+

getDropTableSQL

+public string getDropTableSQL(Table|string table) +
+

Drop a Table

+ +
+ +
/Doctrine/DBAL/Platforms/AbstractPlatform.php at line 1517
+

getDropViewSQL

+public void getDropViewSQL(mixed name) +
+
+ +
+ +
/Doctrine/DBAL/Platforms/AbstractPlatform.php at line 1827
+

getEmptyIdentityInsertSQL

+public string getEmptyIdentityInsertSQL(string tableName, string identifierColumnName) +
+

Get the insert sql for an empty insert statement

+
Returns:
+
$sql
+
+
+ +
+ +
/Doctrine/DBAL/Platforms/AbstractPlatform.php at line 491
+

getForUpdateSql

+public void getForUpdateSql() +
+
+ +
+ +
/Doctrine/DBAL/Platforms/AbstractPlatform.php at line 1289
+

getForeignKeyBaseDeclarationSQL

+public string getForeignKeyBaseDeclarationSQL(ForeignKeyConstraint foreignKey) +
+

Obtain DBMS specific SQL code portion needed to set the FOREIGN KEY constraint +of a field declaration to be used in statements like CREATE TABLE.

+ +
+ +
/Doctrine/DBAL/Platforms/AbstractPlatform.php at line 1231
+

getForeignKeyDeclarationSQL

+public string getForeignKeyDeclarationSQL(mixed foreignKey, array definition) +
+

Obtain DBMS specific SQL code portion needed to set the FOREIGN KEY constraint +of a field declaration to be used in statements like CREATE TABLE.

+
Parameters:
+
definition - an associative array with the following structure: name optional constraint name local the local field(s) foreign the foreign reference field(s) foreignTable the name of the foreign table onDelete referential delete action onUpdate referential update action deferred deferred constraint checking The onDelete and onUpdate keys accept the following values: CASCADE: Delete or update the row from the parent table and automatically delete or update the matching rows in the child table. Both ON DELETE CASCADE and ON UPDATE CASCADE are supported. Between two tables, you should not define several ON UPDATE CASCADE clauses that act on the same column in the parent table or in the child table. SET NULL: Delete or update the row from the parent table and set the foreign key column or columns in the child table to NULL. This is valid only if the foreign key columns do not have the NOT NULL qualifier specified. Both ON DELETE SET NULL and ON UPDATE SET NULL clauses are supported. NO ACTION: In standard SQL, NO ACTION means no action in the sense that an attempt to delete or update a primary key value is not allowed to proceed if there is a related foreign key value in the referenced table. RESTRICT: Rejects the delete or update operation for the parent table. NO ACTION and RESTRICT are the same as omitting the ON DELETE or ON UPDATE clause. SET DEFAULT
+
Returns:
+
DBMS specific SQL code portion needed to set the FOREIGN KEY constraint of a field declaration.
+
+
+ +
+ +
/Doctrine/DBAL/Platforms/AbstractPlatform.php at line 1266
+

getForeignKeyReferentialActionSQL

+public void getForeignKeyReferentialActionSQL(string action, string foreign) +
+

returns given referential action in uppercase if valid, otherwise throws +an exception

+
Throws:
+
if unknown referential action given
+
Parameters:
+
action - foreign key referential action
+
foreign - key referential action in uppercase
+
+
+ +
+ +
/Doctrine/DBAL/Platforms/AbstractPlatform.php at line 89
+

getIdentifierQuoteCharacter

+public string getIdentifierQuoteCharacter() +
+

Gets the character used for identifier quoting.

+ +
+ +
/Doctrine/DBAL/Platforms/AbstractPlatform.php at line 1712
+

getIdentityColumnNullInsertSQL

+public void getIdentityColumnNullInsertSQL() +
+
+ +
+ +
/Doctrine/DBAL/Platforms/AbstractPlatform.php at line 416
+

getInExpression

+public string getInExpression(string column, string|array(string) values) +
+

Returns the SQL to check if a value is one in a set of +given values.

in() accepts an arbitrary number of parameters. The first parameter +must always specify the value that should be matched against. Successive +must contain a logical expression or an array with logical expressions. +These expressions will be matched against the first parameter.

+
Parameters:
+
column - the value that should be matched against
+
values - that will be matched against $column
+
Returns:
+
logical expression
+
+
+ +
+ +
/Doctrine/DBAL/Platforms/AbstractPlatform.php at line 1111
+

getIndexDeclarationSQL

+public string getIndexDeclarationSQL(string name, Index index) +
+

Obtain DBMS specific SQL code portion needed to set an index +declaration to be used in statements like CREATE TABLE.

+
Parameters:
+
name - name of the index
+
index - index definition
+
Returns:
+
DBMS specific SQL code portion needed to set an index
+
+
+ +
+ +
/Doctrine/DBAL/Platforms/AbstractPlatform.php at line 1148
+

getIndexFieldDeclarationListSQL

+public string getIndexFieldDeclarationListSQL(mixed fields) +
+

getIndexFieldDeclarationList +Obtain DBMS specific SQL code portion needed to set an index +declaration to be used in statements like CREATE TABLE.

+ +
+ +
/Doctrine/DBAL/Platforms/AbstractPlatform.php at line 1006
+

getIntegerTypeDeclarationSQL

+public abstract string getIntegerTypeDeclarationSQL(array columnDef) +
+

Gets the SQL snippet that declares a 4 byte integer column.

+ +
+ +
/Doctrine/DBAL/Platforms/AbstractPlatform.php at line 446
+

getIsNotNullExpression

+public string getIsNotNullExpression(string expression) +
+

Returns SQL that checks if a expression is not null.

+
Parameters:
+
expression - the expression that should be compared to null
+
Returns:
+
logical expression
+
+
+ +
+ +
/Doctrine/DBAL/Platforms/AbstractPlatform.php at line 435
+

getIsNullExpression

+public string getIsNullExpression(string expression) +
+

Returns SQL that checks if a expression is null.

+
Parameters:
+
expression - the expression that should be compared to null
+
Returns:
+
logical expression
+
+
+ +
+ +
/Doctrine/DBAL/Platforms/AbstractPlatform.php at line 223
+

getLengthExpression

+public string getLengthExpression(mixed column, string expression1, string expression2) +
+

Returns the length of a text field.

+ +
+ +
/Doctrine/DBAL/Platforms/AbstractPlatform.php at line 1461
+

getListDatabasesSQL

+public void getListDatabasesSQL() +
+
+ +
+ +
/Doctrine/DBAL/Platforms/AbstractPlatform.php at line 1466
+

getListSequencesSQL

+public void getListSequencesSQL(mixed database) +
+
+ +
+ +
/Doctrine/DBAL/Platforms/AbstractPlatform.php at line 1476
+

getListTableColumnsSQL

+public void getListTableColumnsSQL(mixed table) +
+
+ +
+ +
/Doctrine/DBAL/Platforms/AbstractPlatform.php at line 1471
+

getListTableConstraintsSQL

+public void getListTableConstraintsSQL(mixed table) +
+
+ +
+ +
/Doctrine/DBAL/Platforms/AbstractPlatform.php at line 1507
+

getListTableForeignKeysSQL

+public void getListTableForeignKeysSQL(mixed table) +
+
+ +
+ +
/Doctrine/DBAL/Platforms/AbstractPlatform.php at line 1502
+

getListTableIndexesSQL

+public void getListTableIndexesSQL(mixed table) +
+
+ +
+ +
/Doctrine/DBAL/Platforms/AbstractPlatform.php at line 1481
+

getListTablesSQL

+public void getListTablesSQL() +
+
+ +
+ +
/Doctrine/DBAL/Platforms/AbstractPlatform.php at line 1486
+

getListUsersSQL

+public void getListUsersSQL() +
+
+ +
+ +
/Doctrine/DBAL/Platforms/AbstractPlatform.php at line 1497
+

getListViewsSQL

+public string getListViewsSQL(string database) +
+

Get the SQL to list all views of a database or user.

+ +
+ +
/Doctrine/DBAL/Platforms/AbstractPlatform.php at line 335
+

getLocateExpression

+public integer getLocateExpression(string str, string substr, mixed startPos, int pos) +
+

returns the position of the first occurrence of substring $substr in string $str

+
Parameters:
+
substr - literal string to find
+
str - literal string
+
pos - position to start at, beginning of string by default
+
+
+ +
+ +
/Doctrine/DBAL/Platforms/AbstractPlatform.php at line 322
+

getLowerExpression

+public string getLowerExpression(string str) +
+

lower +Returns the string $str with all characters changed to +lowercase according to the current character set mapping.

+
Parameters:
+
str - literal string or column name
+
+
+ +
+ +
/Doctrine/DBAL/Platforms/AbstractPlatform.php at line 296
+

getLtrimExpression

+public string getLtrimExpression(string str) +
+

ltrim +returns the string $str with leading space characters removed

+
Parameters:
+
str - literal string or column name
+
+
+ +
+ +
/Doctrine/DBAL/Platforms/AbstractPlatform.php at line 175
+

getMaxExpression

+public string getMaxExpression(string column) +
+

Returns the highest value of a column

+
Parameters:
+
column - the column to use
+
Returns:
+
generated sql including a MAX aggregate function
+
+
+ +
+ +
/Doctrine/DBAL/Platforms/AbstractPlatform.php at line 1815
+

getMaxIdentifierLength

+public int getMaxIdentifierLength() +
+

Maximum length of any given databse identifier, like tables or column names.

+ +
+ +
/Doctrine/DBAL/Platforms/AbstractPlatform.php at line 211
+

getMd5Expression

+public string getMd5Expression(mixed column) +
+

Returns the md5 sum of a field.

Note: Not SQL92, but common functionality

+ +
+ +
/Doctrine/DBAL/Platforms/AbstractPlatform.php at line 186
+

getMinExpression

+public string getMinExpression(string column) +
+

Returns the lowest value of a column

+
Parameters:
+
column - the column to use
+
+
+ +
+ +
/Doctrine/DBAL/Platforms/AbstractPlatform.php at line 248
+

getModExpression

+public string getModExpression(string expression1, string expression2) +
+

Returns the remainder of the division operation +$expression1 / $expression2.

+ +
+ +
/Doctrine/DBAL/Platforms/AbstractPlatform.php at line 1785
+

getName

+public abstract string getName() +
+

Gets the name of the platform.

+ +
+ +
/Doctrine/DBAL/Platforms/AbstractPlatform.php at line 398
+

getNotExpression

+public string getNotExpression(mixed expression) +
+

Returns the SQL for a logical not.

Example: + +$q = new Doctrine_Query(); +$e = $q->expr; +$q->select('*')->from('table') +->where($e->eq('id', $e->not('null')); +

+
Returns:
+
a logical expression
+
+
+ +
+ +
/Doctrine/DBAL/Platforms/AbstractPlatform.php at line 345
+

getNowExpression

+public string getNowExpression() +
+

Returns the current system date.

+ +
+ +
/Doctrine/DBAL/Platforms/AbstractPlatform.php at line 481
+

getPiExpression

+public void getPiExpression() +
+
+ +
+ +
/Doctrine/DBAL/Platforms/AbstractPlatform.php at line 139
+

getRegexpExpression

+public string getRegexpExpression() +
+

Returns the regular expression operator.

+ +
+ +
/Doctrine/DBAL/Platforms/AbstractPlatform.php at line 235
+

getRoundExpression

+public string getRoundExpression(mixed column, mixed decimals, string expression1, string expression2) +
+

Rounds a numeric field to the number of decimals specified.

+ +
+ +
/Doctrine/DBAL/Platforms/AbstractPlatform.php at line 284
+

getRtrimExpression

+public string getRtrimExpression(string str) +
+

rtrim +returns the string $str with proceeding space characters removed

+
Parameters:
+
str - literal string or column name
+
+
+ +
+ +
/Doctrine/DBAL/Platforms/AbstractPlatform.php at line 1793
+

getSQLResultCasing

+public string getSQLResultCasing(string column) +
+

Gets the character casing of a column in an SQL result set of this platform.

+
Parameters:
+
column - The column name for which to get the correct character casing.
+
Returns:
+
The column name in the character casing used in SQL result sets.
+
+
+ +
+ +
/Doctrine/DBAL/Platforms/AbstractPlatform.php at line 1527
+

getSequenceNextValSQL

+public void getSequenceNextValSQL(mixed sequenceName) +
+
+ +
+ +
/Doctrine/DBAL/Platforms/AbstractPlatform.php at line 1405
+

getSetCharsetSQL

+public string getSetCharsetSQL(string charset) +
+

Gets the SQL statement specific for the platform to set the charset.

This function is MySQL specific and required by +\Doctrine\DBAL\Connection::setCharset($charset)

+ +
+ +
/Doctrine/DBAL/Platforms/AbstractPlatform.php at line 1542
+

getSetTransactionIsolationSQL

+public void getSetTransactionIsolationSQL(integer level) +
+

Get sql to set the transaction isolation level

+ +
+ +
/Doctrine/DBAL/Platforms/AbstractPlatform.php at line 1185
+

getShowDatabasesSQL

+public string getShowDatabasesSQL() +
+

Get sql query to show a list of database.

+ +
+ +
/Doctrine/DBAL/Platforms/AbstractPlatform.php at line 476
+

getSinExpression

+public void getSinExpression(mixed value) +
+
+ +
+ +
/Doctrine/DBAL/Platforms/AbstractPlatform.php at line 1022
+

getSmallIntTypeDeclarationSQL

+public abstract string getSmallIntTypeDeclarationSQL(array columnDef) +
+

Gets the SQL snippet that declares a 2 byte integer column.

+ +
+ +
/Doctrine/DBAL/Platforms/AbstractPlatform.php at line 109
+

getSqlCommentEndString

+public string getSqlCommentEndString() +
+

Gets the string portion that ends an SQL comment.

+ +
+ +
/Doctrine/DBAL/Platforms/AbstractPlatform.php at line 99
+

getSqlCommentStartString

+public string getSqlCommentStartString() +
+

Gets the string portion that starts an SQL comment.

+ +
+ +
/Doctrine/DBAL/Platforms/AbstractPlatform.php at line 362
+

getSubstringExpression

+public string getSubstringExpression(string value, integer from, integer len) +
+

return string to call a function to get a substring inside an SQL statement

Note: Not SQL92, but common functionality.

SQLite only supports the 2 parameter variant of this function

+
Parameters:
+
value - an sql string literal or column name/alias
+
from - where to start the substring portion
+
len - the substring portion length
+
+
+ +
+ +
/Doctrine/DBAL/Platforms/AbstractPlatform.php at line 197
+

getSumExpression

+public string getSumExpression(string column) +
+

Returns the total sum of a column

+
Parameters:
+
column - the column to use
+
+
+ +
+ +
/Doctrine/DBAL/Platforms/AbstractPlatform.php at line 1175
+

getTemporaryTableSQL

+public string getTemporaryTableSQL() +
+

A method to return the required SQL string that fits between CREATE ... TABLE +to create the table as a temporary table.

Should be overridden in driver classes to return the correct string for the +specific database type.

The default is to return the string "TEMPORARY" - this will result in a +SQL error for any database that does not support temporary tables, or that +requires a different SQL command from "CREATE TEMPORARY TABLE".

+
Returns:
+
The string required to be placed between "CREATE" and "TABLE" to generate a temporary table, if possible.
+
+
+ +
+ +
/Doctrine/DBAL/Platforms/AbstractPlatform.php at line 1748
+

getTimeFormatString

+public string getTimeFormatString() +
+

Gets the format string, as accepted by the date() function, that describes +the format of a stored time value of this platform.

+
Returns:
+
The format string.
+
+
+ +
+ +
/Doctrine/DBAL/Platforms/AbstractPlatform.php at line 1578
+

getTimeTypeDeclarationSQL

+public string getTimeTypeDeclarationSQL(array fieldDeclaration) +
+

Obtain DBMS specific SQL to be used to create time fields in statements +like CREATE TABLE.

+ +
+ +
/Doctrine/DBAL/Platforms/AbstractPlatform.php at line 261
+

getTrimExpression

+public string getTrimExpression(string str, int pos, string char) +
+

Trim a string, leading/trailing/both and with a given char which defaults to space.

+
Parameters:
+
+
+
char - has to be quoted already
+
+
+ +
+ +
/Doctrine/DBAL/Platforms/AbstractPlatform.php at line 1842
+

getTruncateTableSQL

+public string getTruncateTableSQL(string tableName, bool cascade) +
+

Generate a Truncate Table SQL statement for a given table.

Cascade is not supported on many platforms but would optionally cascade the truncate by +following the foreign keys.

+ +
+ +
/Doctrine/DBAL/Platforms/AbstractPlatform.php at line 1092
+

getUniqueConstraintDeclarationSQL

+public string getUniqueConstraintDeclarationSQL(string name, Index index) +
+

Obtain DBMS specific SQL code portion needed to set a unique +constraint declaration to be used in statements like CREATE TABLE.

+
Parameters:
+
name - name of the unique constraint
+
index - index definition
+
Returns:
+
DBMS specific SQL code portion needed to set a constraint
+
+
+ +
+ +
/Doctrine/DBAL/Platforms/AbstractPlatform.php at line 1322
+

getUniqueFieldDeclarationSQL

+public string getUniqueFieldDeclarationSQL() +
+

Obtain DBMS specific SQL code portion needed to set the UNIQUE constraint +of a field declaration to be used in statements like CREATE TABLE.

+
Returns:
+
DBMS specific SQL code portion needed to set the UNIQUE constraint of a field declaration.
+
+
+ +
+ +
/Doctrine/DBAL/Platforms/AbstractPlatform.php at line 309
+

getUpperExpression

+public string getUpperExpression(string str) +
+

upper +Returns the string $str with all characters changed to +uppercase according to the current character set mapping.

+
Parameters:
+
str - literal string or column name
+
+
+ +
+ +
/Doctrine/DBAL/Platforms/AbstractPlatform.php at line 119
+

getVarcharMaxLength

+public integer getVarcharMaxLength() +
+

Gets the maximum length of a varchar field.

+ +
+ +
/Doctrine/DBAL/Platforms/AbstractPlatform.php at line 1771
+

getVarcharTypeDeclarationSQL

+public abstract void getVarcharTypeDeclarationSQL(array field) +
+

Gets the SQL snippet used to declare a VARCHAR column type.

+ +
+ +
/Doctrine/DBAL/Platforms/AbstractPlatform.php at line 129
+

getWildcards

+public array getWildcards() +
+

Gets all SQL wildcard characters of the platform.

+ +
+ +
/Doctrine/DBAL/Platforms/AbstractPlatform.php at line 1753
+

modifyLimitQuery

+public void modifyLimitQuery(mixed query, mixed limit, mixed offset) +
+
+ +
+ +
/Doctrine/DBAL/Platforms/AbstractPlatform.php at line 1370
+

prefersIdentityColumns

+public boolean prefersIdentityColumns() +
+

Whether the platform prefers identity columns (eg. autoincrement) for ID generation. +Subclasses should override this method to return TRUE if they prefer identity columns.

+ +
+ +
/Doctrine/DBAL/Platforms/AbstractPlatform.php at line 1359
+

prefersSequences

+public boolean prefersSequences() +
+

Whether the platform prefers sequences for ID generation. +Subclasses should override this method to return TRUE if they prefer sequences.

+ +
+ +
/Doctrine/DBAL/Platforms/AbstractPlatform.php at line 796
+

quoteIdentifier

+public string quoteIdentifier(string str) +
+

Quotes a string so that it can be safely used as a table or column name, +even if it is a reserved word of the platform.

NOTE: Just because you CAN use quoted identifiers doesn't mean +you SHOULD use them. In general, they end up causing way more +problems than they solve.

+
Parameters:
+
str - identifier name to be quoted
+
Returns:
+
quoted identifier string
+
+
+ +
+ +
/Doctrine/DBAL/Platforms/AbstractPlatform.php at line 1628
+

supportsAlterTable

+public void supportsAlterTable() +
+
+ +
+ +
/Doctrine/DBAL/Platforms/AbstractPlatform.php at line 1668
+

supportsForeignKeyConstraints

+public boolean supportsForeignKeyConstraints() +
+

Does the platform supports foreign key constraints?

+ +
+ +
/Doctrine/DBAL/Platforms/AbstractPlatform.php at line 1678
+

supportsForeignKeyOnUpdate

+public bool supportsForeignKeyOnUpdate() +
+

Does this platform supports onUpdate in foreign key constraints?

+ +
+ +
/Doctrine/DBAL/Platforms/AbstractPlatform.php at line 1707
+

supportsGettingAffectedRows

+public boolean supportsGettingAffectedRows() +
+

Whether the platform supports getting the affected rows of a recent +update/delete type query.

+ +
+ +
/Doctrine/DBAL/Platforms/AbstractPlatform.php at line 1613
+

supportsIdentityColumns

+public boolean supportsIdentityColumns() +
+

Whether the platform supports identity columns. +Identity columns are columns that recieve an auto-generated value from the +database on insert of a row.

+ +
+ +
/Doctrine/DBAL/Platforms/AbstractPlatform.php at line 1623
+

supportsIndexes

+public boolean supportsIndexes() +
+

Whether the platform supports indexes.

+ +
+ +
/Doctrine/DBAL/Platforms/AbstractPlatform.php at line 1658
+

supportsPrimaryConstraints

+public boolean supportsPrimaryConstraints() +
+

Whether the platform supports primary key constraints.

+ +
+ +
/Doctrine/DBAL/Platforms/AbstractPlatform.php at line 1648
+

supportsSavepoints

+public boolean supportsSavepoints() +
+

Whether the platform supports savepoints.

+ +
+ +
/Doctrine/DBAL/Platforms/AbstractPlatform.php at line 1688
+

supportsSchemas

+public boolean supportsSchemas() +
+

Whether the platform supports database schemas.

+ +
+ +
/Doctrine/DBAL/Platforms/AbstractPlatform.php at line 1601
+

supportsSequences

+public boolean supportsSequences() +
+

Whether the platform supports sequences.

+ +
+ +
/Doctrine/DBAL/Platforms/AbstractPlatform.php at line 1638
+

supportsTransactions

+public boolean supportsTransactions() +
+

Whether the platform supports transactions.

+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/dbal/platforms/mssqlplatform.html b/lib/api/doctrine/dbal/platforms/mssqlplatform.html new file mode 100644 index 000000000..ace136741 --- /dev/null +++ b/lib/api/doctrine/dbal/platforms/mssqlplatform.html @@ -0,0 +1,548 @@ + + + + + + + + + + + +MsSqlPlatform (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +
Doctrine\DBAL\Platforms\MsSqlPlatform
+
/Doctrine/DBAL/Platforms/MsSqlPlatform.php at line 37
+ +

Class MsSqlPlatform

+ +
Class:MsSqlPlatform - Superclass: AbstractPlatform
+AbstractPlatform
⌊ MsSqlPlatform
+ +
+ +

public class MsSqlPlatform
extends AbstractPlatform + +

+ +

The MsSqlPlatform provides the behavior, features and SQL dialect of the +MySQL database platform.

+ +
+
Since:
+
2.0
+
Author:
+
Roman Borschel
+
Jonathan H. Wage
+
Benjamin Eberlei
+
Todo:
+
Rename: MsSQLPlatform
+
License:
+
http://www.opensource.org/licenses/lgpl-license.php LGPL
+
See Also:
+
www.doctrine-project.org
+
Version:
+
$Revision: 3938 $
+
+
+ + + +
Fields inherited from Doctrine\DBAL\Platforms\AbstractPlatform
CREATE_FOREIGNKEYS, CREATE_INDEXES, TRIM_BOTH, TRIM_LEADING, TRIM_TRAILING, TRIM_UNSPECIFIED
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Method Summary
array

getAlterTableSQL(TableDiff diff)

Gets the sql statements for altering an existing table. +

string

getBigIntTypeDeclarationSQL(mixed field, array columnDef)

string

getBooleanTypeDeclarationSQL(mixed field, array columnDef)

void

getClobTypeDeclarationSQL(array field)

@override

string

getConcatExpression(string arg1, string arg2, string values..., string arg1,)

Returns string to concatenate two or more string parameters

string

getCreateDatabaseSQL(string name, mixed database)

create a new database

string

getDateTimeTypeDeclarationSQL(array fieldDeclaration)

string

getDateTypeDeclarationSQL(array fieldDeclaration)

string

getDropDatabaseSQL(string name, mixed database)

drop an existing database

string

getEmptyIdentityInsertSQL(mixed quotedTableName, mixed quotedIdentifierColumnName, string tableName, string identifierColumnName)

Get the insert sql for an empty insert statement

string

getGuidExpression()

Returns global unique identifier

string

getIntegerTypeDeclarationSQL(mixed field, array columnDef)

void

getListTablesSQL()

string

getName()

Get the platform name for this instance

string

getNowExpression(mixed type)

Return string to call a variable with the current timestamp inside an SQL statement +There are three special variables for current date and time: +- CURRENT_TIMESTAMP (date and time, TIMESTAMP type) +- CURRENT_DATE (date, DATE type) +- CURRENT_TIME (time, TIME type)

string

getRegexpExpression()

Returns the regular expression operator.

void

getSetTransactionIsolationSQL(integer level)

Get sql to set the transaction isolation level

string

getShowDatabasesSQL()

Get sql query to show a list of database.

string

getSmallIntTypeDeclarationSQL(mixed field, array columnDef)

string

getSubstringExpression(string value, mixed position, mixed length, integer from, integer len)

return string to call a function to get a substring inside an SQL statement

string

getTimeTypeDeclarationSQL(array fieldDeclaration)

string

getTruncateTableSQL(string tableName, bool cascade)

void

getVarcharTypeDeclarationSQL(array field)

Gets the SQL snippet used to declare a VARCHAR column type.

string

modifyLimitQuery(string query, mixed limit, mixed offset)

Adds an adapter-specific LIMIT clause to the SELECT statement.

boolean

prefersIdentityColumns()

Whether the platform prefers identity columns for ID generation. +

boolean

supportsIdentityColumns()

Whether the platform supports identity columns. +

boolean

supportsSavepoints()

Whether the platform supports savepoints.

string

writeLimitClause(string query, mixed limit, mixed offset)

Adds an adapter-specific LIMIT clause to the SELECT statement. +

+ + + +
Methods inherited from Doctrine\DBAL\Platforms\AbstractPlatform
convertBooleans, createsExplicitIndexForForeignKeys, fixSchemaElementName, getAcosExpression, getAdvancedForeignKeyOptionsSQL, getAlterTableSQL, getAvgExpression, getBetweenExpression, getBigIntTypeDeclarationSQL, getBooleanTypeDeclarationSQL, getCheckDeclarationSQL, getClobTypeDeclarationSQL, getColumnCharsetDeclarationSQL, getColumnCollationDeclarationSQL, getColumnDeclarationListSQL, getColumnDeclarationSQL, getConcatExpression, getCosExpression, getCountExpression, getCreateConstraintSQL, getCreateDatabaseSQL, getCreateForeignKeySQL, getCreateIndexSQL, getCreateSequenceSQL, getCreateTableSQL, getCreateTemporaryTableSnippetSQL, getCreateViewSQL, getCurrentDateSQL, getCurrentTimeSQL, getCurrentTimestampSQL, getCustomTypeDeclarationSQL, getDateFormatString, getDateTimeFormatString, getDateTimeTypeDeclarationSQL, getDateTypeDeclarationSQL, getDecimalTypeDeclarationSQL, getDefaultTransactionIsolationLevel, getDefaultValueDeclarationSQL, getDropConstraintSQL, getDropDatabaseSQL, getDropForeignKeySQL, getDropIndexSQL, getDropSequenceSQL, getDropTableSQL, getDropViewSQL, getEmptyIdentityInsertSQL, getForUpdateSql, getForeignKeyBaseDeclarationSQL, getForeignKeyDeclarationSQL, getForeignKeyReferentialActionSQL, getIdentifierQuoteCharacter, getIdentityColumnNullInsertSQL, getInExpression, getIndexDeclarationSQL, getIndexFieldDeclarationListSQL, getIntegerTypeDeclarationSQL, getIsNotNullExpression, getIsNullExpression, getLengthExpression, getListDatabasesSQL, getListSequencesSQL, getListTableColumnsSQL, getListTableConstraintsSQL, getListTableForeignKeysSQL, getListTableIndexesSQL, getListTablesSQL, getListUsersSQL, getListViewsSQL, getLocateExpression, getLowerExpression, getLtrimExpression, getMaxExpression, getMaxIdentifierLength, getMd5Expression, getMinExpression, getModExpression, getName, getNotExpression, getNowExpression, getPiExpression, getRegexpExpression, getRoundExpression, getRtrimExpression, getSQLResultCasing, getSequenceNextValSQL, getSetCharsetSQL, getSetTransactionIsolationSQL, getShowDatabasesSQL, getSinExpression, getSmallIntTypeDeclarationSQL, getSqlCommentEndString, getSqlCommentStartString, getSubstringExpression, getSumExpression, getTemporaryTableSQL, getTimeFormatString, getTimeTypeDeclarationSQL, getTrimExpression, getTruncateTableSQL, getUniqueConstraintDeclarationSQL, getUniqueFieldDeclarationSQL, getUpperExpression, getVarcharMaxLength, getVarcharTypeDeclarationSQL, getWildcards, modifyLimitQuery, prefersIdentityColumns, prefersSequences, quoteIdentifier, supportsAlterTable, supportsForeignKeyConstraints, supportsForeignKeyOnUpdate, supportsGettingAffectedRows, supportsIdentityColumns, supportsIndexes, supportsPrimaryConstraints, supportsSavepoints, supportsSchemas, supportsSequences, supportsTransactions
+ +

Method Detail

+
/Doctrine/DBAL/Platforms/MsSqlPlatform.php at line 94
+

getAlterTableSQL

+public array getAlterTableSQL(TableDiff diff) +
+

Gets the sql statements for altering an existing table.

The method returns an array of sql statements, since some platforms need several statements.

+ +
+ +
/Doctrine/DBAL/Platforms/MsSqlPlatform.php at line 287
+

getBigIntTypeDeclarationSQL

+public string getBigIntTypeDeclarationSQL(mixed field, array columnDef) +
+

+
Override.
+
+
+ +
+ +
/Doctrine/DBAL/Platforms/MsSqlPlatform.php at line 364
+

getBooleanTypeDeclarationSQL

+public string getBooleanTypeDeclarationSQL(mixed field, array columnDef) +
+

+
Override.
+
+
+ +
+ +
/Doctrine/DBAL/Platforms/MsSqlPlatform.php at line 318
+

getClobTypeDeclarationSQL

+public void getClobTypeDeclarationSQL(array field) +
+

+ +
+ +
/Doctrine/DBAL/Platforms/MsSqlPlatform.php at line 184
+

getConcatExpression

+public string getConcatExpression(string arg1, string arg2, string values..., string arg1,) +
+

Returns string to concatenate two or more string parameters

+
Returns:
+
to concatenate two strings
+
Override.
+
+
+ +
+ +
/Doctrine/DBAL/Platforms/MsSqlPlatform.php at line 254
+

getCreateDatabaseSQL

+public string getCreateDatabaseSQL(string name, mixed database) +
+

create a new database

+
Parameters:
+
name - name of the database that should be created
+
Override.
+
+
+ +
+ +
/Doctrine/DBAL/Platforms/MsSqlPlatform.php at line 340
+

getDateTimeTypeDeclarationSQL

+public string getDateTimeTypeDeclarationSQL(array fieldDeclaration) +
+

+
Override.
+
+
+ +
+ +
/Doctrine/DBAL/Platforms/MsSqlPlatform.php at line 348
+

getDateTypeDeclarationSQL

+public string getDateTypeDeclarationSQL(array fieldDeclaration) +
+

+
Override.
+
+
+ +
+ +
/Doctrine/DBAL/Platforms/MsSqlPlatform.php at line 266
+

getDropDatabaseSQL

+public string getDropDatabaseSQL(string name, mixed database) +
+

drop an existing database

+
Parameters:
+
name - name of the database that should be dropped
+
Override.
+
+
+ +
+ +
/Doctrine/DBAL/Platforms/MsSqlPlatform.php at line 474
+

getEmptyIdentityInsertSQL

+public string getEmptyIdentityInsertSQL(mixed quotedTableName, mixed quotedIdentifierColumnName, string tableName, string identifierColumnName) +
+

Get the insert sql for an empty insert statement

+
Returns:
+
$sql
+
+
+ +
+ +
/Doctrine/DBAL/Platforms/MsSqlPlatform.php at line 196
+

getGuidExpression

+public string getGuidExpression() +
+

Returns global unique identifier

+
Returns:
+
to get global unique identifier
+
Override.
+
+
+ +
+ +
/Doctrine/DBAL/Platforms/MsSqlPlatform.php at line 279
+

getIntegerTypeDeclarationSQL

+public string getIntegerTypeDeclarationSQL(mixed field, array columnDef) +
+

+
Override.
+
+
+ +
+ +
/Doctrine/DBAL/Platforms/MsSqlPlatform.php at line 242
+

getListTablesSQL

+public void getListTablesSQL() +
+
+ +
+ +
/Doctrine/DBAL/Platforms/MsSqlPlatform.php at line 374
+

getName

+public string getName() +
+

Get the platform name for this instance

+ +
+ +
/Doctrine/DBAL/Platforms/MsSqlPlatform.php at line 150
+

getNowExpression

+public string getNowExpression(mixed type) +
+

Return string to call a variable with the current timestamp inside an SQL statement +There are three special variables for current date and time: +- CURRENT_TIMESTAMP (date and time, TIMESTAMP type) +- CURRENT_DATE (date, DATE type) +- CURRENT_TIME (time, TIME type)

+
Returns:
+
to call a variable with the current timestamp
+
Override.
+
+
+ +
+ +
/Doctrine/DBAL/Platforms/MsSqlPlatform.php at line 135
+

getRegexpExpression

+public string getRegexpExpression() +
+

Returns the regular expression operator.

+
Override.
+
+
+ +
+ +
/Doctrine/DBAL/Platforms/MsSqlPlatform.php at line 271
+

getSetTransactionIsolationSQL

+public void getSetTransactionIsolationSQL(integer level) +
+

Get sql to set the transaction isolation level

+ +
+ +
/Doctrine/DBAL/Platforms/MsSqlPlatform.php at line 237
+

getShowDatabasesSQL

+public string getShowDatabasesSQL() +
+

Get sql query to show a list of database.

+ +
+ +
/Doctrine/DBAL/Platforms/MsSqlPlatform.php at line 295
+

getSmallIntTypeDeclarationSQL

+public string getSmallIntTypeDeclarationSQL(mixed field, array columnDef) +
+

+
Override.
+
+
+ +
+ +
/Doctrine/DBAL/Platforms/MsSqlPlatform.php at line 167
+

getSubstringExpression

+public string getSubstringExpression(string value, mixed position, mixed length, integer from, integer len) +
+

return string to call a function to get a substring inside an SQL statement

+
Returns:
+
to call a function to get a substring
+
Override.
+
Parameters:
+
value - an sql string literal or column name/alias
+
from - where to start the substring portion
+
len - the substring portion length
+
+
+ +
+ +
/Doctrine/DBAL/Platforms/MsSqlPlatform.php at line 356
+

getTimeTypeDeclarationSQL

+public string getTimeTypeDeclarationSQL(array fieldDeclaration) +
+

+
Override.
+
+
+ +
+ +
/Doctrine/DBAL/Platforms/MsSqlPlatform.php at line 482
+

getTruncateTableSQL

+public string getTruncateTableSQL(string tableName, bool cascade) +
+

+
Inheritdoc.
+
+
+ +
+ +
/Doctrine/DBAL/Platforms/MsSqlPlatform.php at line 300
+

getVarcharTypeDeclarationSQL

+public void getVarcharTypeDeclarationSQL(array field) +
+

Gets the SQL snippet used to declare a VARCHAR column type.

+ +
+ +
/Doctrine/DBAL/Platforms/MsSqlPlatform.php at line 388
+

modifyLimitQuery

+public string modifyLimitQuery(string query, mixed limit, mixed offset) +
+

Adds an adapter-specific LIMIT clause to the SELECT statement.

+
See Also:
+
http://lists.bestpractical.com/pipermail/rt-devel/2005-June/007339.html
+
+
+ +
+ +
/Doctrine/DBAL/Platforms/MsSqlPlatform.php at line 209
+

prefersIdentityColumns

+public boolean prefersIdentityColumns() +
+

Whether the platform prefers identity columns for ID generation. +MsSql prefers "autoincrement" identity columns since sequences can only +be emulated with a table.

+
Override.
+
+
+ +
+ +
/Doctrine/DBAL/Platforms/MsSqlPlatform.php at line 221
+

supportsIdentityColumns

+public boolean supportsIdentityColumns() +
+

Whether the platform supports identity columns. +MsSql supports this through AUTO_INCREMENT columns.

+
Override.
+
+
+ +
+ +
/Doctrine/DBAL/Platforms/MsSqlPlatform.php at line 232
+

supportsSavepoints

+public boolean supportsSavepoints() +
+

Whether the platform supports savepoints. MsSql does not.

+
Override.
+
+
+ +
+ +
/Doctrine/DBAL/Platforms/MsSqlPlatform.php at line 50
+

writeLimitClause

+public string writeLimitClause(string query, mixed limit, mixed offset) +
+

Adds an adapter-specific LIMIT clause to the SELECT statement. +[ borrowed from Zend Framework ]

+
See Also:
+
http://lists.bestpractical.com/pipermail/rt-devel/2005-June/007339.html
+
Override.
+
+
+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/dbal/platforms/mysqlplatform.html b/lib/api/doctrine/dbal/platforms/mysqlplatform.html new file mode 100644 index 000000000..fc21953c7 --- /dev/null +++ b/lib/api/doctrine/dbal/platforms/mysqlplatform.html @@ -0,0 +1,661 @@ + + + + + + + + + + + +MySqlPlatform (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +
Doctrine\DBAL\Platforms\MySqlPlatform
+
/Doctrine/DBAL/Platforms/MySqlPlatform.php at line 37
+ +

Class MySqlPlatform

+ +
Class:MySqlPlatform - Superclass: AbstractPlatform
+AbstractPlatform
⌊ MySqlPlatform
+ +
+ +

public class MySqlPlatform
extends AbstractPlatform + +

+ +

The MySqlPlatform provides the behavior, features and SQL dialect of the +MySQL database platform. This platform represents a MySQL 5.0 or greater platform that +uses the InnoDB storage engine.

+ +
+
Since:
+
2.0
+
Author:
+
Roman Borschel
+
Benjamin Eberlei
+
Todo:
+
Rename: MySQLPlatform
+
License:
+
http://www.opensource.org/licenses/lgpl-license.php LGPL
+
See Also:
+
www.doctrine-project.org
+
Version:
+
$Revision: 3938 $
+
+
+ + + +
Fields inherited from Doctrine\DBAL\Platforms\AbstractPlatform
CREATE_FOREIGNKEYS, CREATE_INDEXES, TRIM_BOTH, TRIM_LEADING, TRIM_TRAILING, TRIM_UNSPECIFIED
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Method Summary
bool

createsExplicitIndexForForeignKeys()

string

getAdvancedForeignKeyOptionsSQL(ForeignKeyConstraint foreignKey)

Return the FOREIGN KEY query section dealing with non-standard options +as MATCH, INITIALLY DEFERRED, ON UPDATE, ...

boolean

getAlterTableSQL(TableDiff diff, string name, array changes, boolean check)

Gets the SQL to alter an existing table.

string

getBigIntTypeDeclarationSQL(mixed field, array columnDef)

@override

string

getBooleanTypeDeclarationSQL(mixed field, array columnDef)

void

getClobTypeDeclarationSQL(array field)

@override

string

getCollationFieldDeclaration(string collation)

Obtain DBMS specific SQL code portion needed to set the COLLATION +of a field declaration to be used in statements like CREATE TABLE.

string

getConcatExpression(string|array(string) strings, string arg1,)

Returns a series of strings concatinatedconcat() accepts an arbitrary number of parameters.

string

getCreateDatabaseSQL(string name, mixed database)

create a new database

void

getCreateViewSQL(mixed name, mixed sql)

string

getDateTimeTypeDeclarationSQL(array fieldDeclaration)

string

getDateTypeDeclarationSQL(array fieldDeclaration)

string

getDropDatabaseSQL(string name, mixed database)

drop an existing database

string

getDropIndexSQL(Index index, string|Table table, Index|string name)

Gets the SQL to drop an index of a table.

string

getDropTableSQL(string table)

Gets the SQL to drop a table.

void

getDropViewSQL(mixed name)

string

getGuidExpression()

Returns global unique identifier

string

getIdentifierQuoteCharacter()

Gets the character used for identifier quoting.

string

getIntegerTypeDeclarationSQL(string field, string name, array columnDef)

Obtain DBMS specific SQL code portion needed to declare an integer type +field to be used in statements like CREATE TABLE.

void

getListDatabasesSQL()

void

getListTableColumnsSQL(mixed table)

void

getListTableConstraintsSQL(mixed table)

void

getListTableForeignKeysSQL(mixed table, mixed database)

void

getListTableIndexesSQL(mixed table)

void

getListTablesSQL()

string

getListViewsSQL(string database)

Get the SQL to list all views of a database or user.

integer

getLocateExpression(string str, string substr, mixed startPos, int pos)

returns the position of the first occurrence of substring $substr in string $str

string

getName()

Get the platform name for this instance.

string

getRegexpExpression()

Returns the regular expression operator.

void

getSetTransactionIsolationSQL(integer level)

Get sql to set the transaction isolation level

string

getShowDatabasesSQL()

Get sql query to show a list of database.

string

getSmallIntTypeDeclarationSQL(mixed field, array columnDef)

@override

string

getTimeTypeDeclarationSQL(array fieldDeclaration)

void

getVarcharTypeDeclarationSQL(array field)

Gets the SQL snippet used to declare a VARCHAR column on the MySql platform.

boolean

prefersIdentityColumns()

Whether the platform prefers identity columns for ID generation. +

boolean

supportsIdentityColumns()

Whether the platform supports identity columns. +

boolean

supportsSavepoints()

Whether the platform supports savepoints.

+ + + +
Methods inherited from Doctrine\DBAL\Platforms\AbstractPlatform
convertBooleans, createsExplicitIndexForForeignKeys, fixSchemaElementName, getAcosExpression, getAdvancedForeignKeyOptionsSQL, getAlterTableSQL, getAvgExpression, getBetweenExpression, getBigIntTypeDeclarationSQL, getBooleanTypeDeclarationSQL, getCheckDeclarationSQL, getClobTypeDeclarationSQL, getColumnCharsetDeclarationSQL, getColumnCollationDeclarationSQL, getColumnDeclarationListSQL, getColumnDeclarationSQL, getConcatExpression, getCosExpression, getCountExpression, getCreateConstraintSQL, getCreateDatabaseSQL, getCreateForeignKeySQL, getCreateIndexSQL, getCreateSequenceSQL, getCreateTableSQL, getCreateTemporaryTableSnippetSQL, getCreateViewSQL, getCurrentDateSQL, getCurrentTimeSQL, getCurrentTimestampSQL, getCustomTypeDeclarationSQL, getDateFormatString, getDateTimeFormatString, getDateTimeTypeDeclarationSQL, getDateTypeDeclarationSQL, getDecimalTypeDeclarationSQL, getDefaultTransactionIsolationLevel, getDefaultValueDeclarationSQL, getDropConstraintSQL, getDropDatabaseSQL, getDropForeignKeySQL, getDropIndexSQL, getDropSequenceSQL, getDropTableSQL, getDropViewSQL, getEmptyIdentityInsertSQL, getForUpdateSql, getForeignKeyBaseDeclarationSQL, getForeignKeyDeclarationSQL, getForeignKeyReferentialActionSQL, getIdentifierQuoteCharacter, getIdentityColumnNullInsertSQL, getInExpression, getIndexDeclarationSQL, getIndexFieldDeclarationListSQL, getIntegerTypeDeclarationSQL, getIsNotNullExpression, getIsNullExpression, getLengthExpression, getListDatabasesSQL, getListSequencesSQL, getListTableColumnsSQL, getListTableConstraintsSQL, getListTableForeignKeysSQL, getListTableIndexesSQL, getListTablesSQL, getListUsersSQL, getListViewsSQL, getLocateExpression, getLowerExpression, getLtrimExpression, getMaxExpression, getMaxIdentifierLength, getMd5Expression, getMinExpression, getModExpression, getName, getNotExpression, getNowExpression, getPiExpression, getRegexpExpression, getRoundExpression, getRtrimExpression, getSQLResultCasing, getSequenceNextValSQL, getSetCharsetSQL, getSetTransactionIsolationSQL, getShowDatabasesSQL, getSinExpression, getSmallIntTypeDeclarationSQL, getSqlCommentEndString, getSqlCommentStartString, getSubstringExpression, getSumExpression, getTemporaryTableSQL, getTimeFormatString, getTimeTypeDeclarationSQL, getTrimExpression, getTruncateTableSQL, getUniqueConstraintDeclarationSQL, getUniqueFieldDeclarationSQL, getUpperExpression, getVarcharMaxLength, getVarcharTypeDeclarationSQL, getWildcards, modifyLimitQuery, prefersIdentityColumns, prefersSequences, quoteIdentifier, supportsAlterTable, supportsForeignKeyConstraints, supportsForeignKeyOnUpdate, supportsGettingAffectedRows, supportsIdentityColumns, supportsIndexes, supportsPrimaryConstraints, supportsSavepoints, supportsSchemas, supportsSequences, supportsTransactions
+ +

Method Detail

+
/Doctrine/DBAL/Platforms/MySqlPlatform.php at line 665
+

createsExplicitIndexForForeignKeys

+public bool createsExplicitIndexForForeignKeys() +
+

+ +
+ +
/Doctrine/DBAL/Platforms/MySqlPlatform.php at line 599
+

getAdvancedForeignKeyOptionsSQL

+public string getAdvancedForeignKeyOptionsSQL(ForeignKeyConstraint foreignKey) +
+

Return the FOREIGN KEY query section dealing with non-standard options +as MATCH, INITIALLY DEFERRED, ON UPDATE, ...

+
Override.
+
+
+ +
+ +
/Doctrine/DBAL/Platforms/MySqlPlatform.php at line 501
+

getAlterTableSQL

+public boolean getAlterTableSQL(TableDiff diff, string name, array changes, boolean check) +
+

Gets the SQL to alter an existing table.

+
Parameters:
+
name - The name of the table that is intended to be changed.
+
changes - Associative array that contains the details of each type of change that is intended to be performed. The types of changes that are currently supported are defined as follows: name New name for the table. add Associative array with the names of fields to be added as indexes of the array. The value of each entry of the array should be set to another associative array with the properties of the fields to be added. The properties of the fields should be the same as defined by the Metabase parser. remove Associative array with the names of fields to be removed as indexes of the array. Currently the values assigned to each entry are ignored. An empty array should be used for future compatibility. rename Associative array with the names of fields to be renamed as indexes of the array. The value of each entry of the array should be set to another associative array with the entry named name with the new field name and the entry named Declaration that is expected to contain the portion of the field declaration already in DBMS specific SQL code as it is used in the CREATE TABLE statement. change Associative array with the names of the fields to be changed as indexes of the array. Keep in mind that if it is intended to change either the name of a field and any other properties, the change array entries should have the new names of the fields as array indexes. The value of each entry of the array should be set to another associative array with the properties of the fields to that are meant to be changed as array entries. These entries should be assigned to the new values of the respective properties. The properties of the fields should be the same as defined by the Metabase parser. Example array( 'name' => 'userlist', 'add' => array( 'quota' => array( 'type' => 'integer', 'unsigned' => 1 ) ), 'remove' => array( 'file_limit' => array(), 'time_limit' => array() ), 'change' => array( 'name' => array( 'length' => '20', 'definition' => array( 'type' => 'text', 'length' => 20, ), ) ), 'rename' => array( 'sex' => array( 'name' => 'gender', 'definition' => array( 'type' => 'text', 'length' => 1, 'default' => 'M', ), ) ) )
+
check - indicates whether the function should just check if the DBMS driver can perform the requested table alterations if the value is true or actually perform them otherwise.
+
Override.
+
+
+ +
+ +
/Doctrine/DBAL/Platforms/MySqlPlatform.php at line 568
+

getBigIntTypeDeclarationSQL

+public string getBigIntTypeDeclarationSQL(mixed field, array columnDef) +
+

+ +
+ +
/Doctrine/DBAL/Platforms/MySqlPlatform.php at line 221
+

getBooleanTypeDeclarationSQL

+public string getBooleanTypeDeclarationSQL(mixed field, array columnDef) +
+

+
Override.
+
+
+ +
+ +
/Doctrine/DBAL/Platforms/MySqlPlatform.php at line 175
+

getClobTypeDeclarationSQL

+public void getClobTypeDeclarationSQL(array field) +
+

+ +
+ +
/Doctrine/DBAL/Platforms/MySqlPlatform.php at line 234
+

getCollationFieldDeclaration

+public string getCollationFieldDeclaration(string collation) +
+

Obtain DBMS specific SQL code portion needed to set the COLLATION +of a field declaration to be used in statements like CREATE TABLE.

+
Parameters:
+
collation - name of the collation
+
Returns:
+
DBMS specific SQL code portion needed to set the COLLATION of a field declaration.
+
+
+ +
+ +
/Doctrine/DBAL/Platforms/MySqlPlatform.php at line 98
+

getConcatExpression

+public string getConcatExpression(string|array(string) strings, string arg1,) +
+

Returns a series of strings concatinated

concat() accepts an arbitrary number of parameters. Each parameter +must contain an expression or an array with expressions.

+
Parameters:
+
strings - that will be concatinated.
+
Override.
+
+
+ +
+ +
/Doctrine/DBAL/Platforms/MySqlPlatform.php at line 297
+

getCreateDatabaseSQL

+public string getCreateDatabaseSQL(string name, mixed database) +
+

create a new database

+
Parameters:
+
name - name of the database that should be created
+
Override.
+
+
+ +
+ +
/Doctrine/DBAL/Platforms/MySqlPlatform.php at line 142
+

getCreateViewSQL

+public void getCreateViewSQL(mixed name, mixed sql) +
+
+ +
+ +
/Doctrine/DBAL/Platforms/MySqlPlatform.php at line 193
+

getDateTimeTypeDeclarationSQL

+public string getDateTimeTypeDeclarationSQL(array fieldDeclaration) +
+

+
Override.
+
+
+ +
+ +
/Doctrine/DBAL/Platforms/MySqlPlatform.php at line 205
+

getDateTypeDeclarationSQL

+public string getDateTypeDeclarationSQL(array fieldDeclaration) +
+

+
Override.
+
+
+ +
+ +
/Doctrine/DBAL/Platforms/MySqlPlatform.php at line 309
+

getDropDatabaseSQL

+public string getDropDatabaseSQL(string name, mixed database) +
+

drop an existing database

+
Parameters:
+
name - name of the database that should be dropped
+
Override.
+
+
+ +
+ +
/Doctrine/DBAL/Platforms/MySqlPlatform.php at line 616
+

getDropIndexSQL

+public string getDropIndexSQL(Index index, string|Table table, Index|string name) +
+

Gets the SQL to drop an index of a table.

+
Parameters:
+
index - name of the index to be dropped
+
table - name of table that should be used in method
+
Override.
+
+
+ +
+ +
/Doctrine/DBAL/Platforms/MySqlPlatform.php at line 639
+

getDropTableSQL

+public string getDropTableSQL(string table) +
+

Gets the SQL to drop a table.

+
Parameters:
+
table - The name of table to drop.
+
Override.
+
+
+ +
+ +
/Doctrine/DBAL/Platforms/MySqlPlatform.php at line 147
+

getDropViewSQL

+public void getDropViewSQL(mixed name) +
+
+ +
+ +
/Doctrine/DBAL/Platforms/MySqlPlatform.php at line 67
+

getGuidExpression

+public string getGuidExpression() +
+

Returns global unique identifier

+
Returns:
+
to get global unique identifier
+
Override.
+
+
+ +
+ +
/Doctrine/DBAL/Platforms/MySqlPlatform.php at line 45
+

getIdentifierQuoteCharacter

+public string getIdentifierQuoteCharacter() +
+

Gets the character used for identifier quoting.

+
Override.
+
+
+ +
+ +
/Doctrine/DBAL/Platforms/MySqlPlatform.php at line 562
+

getIntegerTypeDeclarationSQL

+public string getIntegerTypeDeclarationSQL(string field, string name, array columnDef) +
+

Obtain DBMS specific SQL code portion needed to declare an integer type +field to be used in statements like CREATE TABLE.

+
Parameters:
+
name - name the field to be declared.
+
field - associative array with the name of the properties of the field being declared as array indexes. Currently, the types of supported field properties are as follows: unsigned Boolean flag that indicates whether the field should be declared as unsigned integer if possible. default Integer value to be used as default for this field. notnull Boolean flag that indicates whether this field is constrained to not be set to null.
+
Returns:
+
DBMS specific SQL code portion that should be used to declare the specified field.
+
Override.
+
+
+ +
+ +
/Doctrine/DBAL/Platforms/MySqlPlatform.php at line 104
+

getListDatabasesSQL

+public void getListDatabasesSQL() +
+
+ +
+ +
/Doctrine/DBAL/Platforms/MySqlPlatform.php at line 285
+

getListTableColumnsSQL

+public void getListTableColumnsSQL(mixed table) +
+
+ +
+ +
/Doctrine/DBAL/Platforms/MySqlPlatform.php at line 109
+

getListTableConstraintsSQL

+public void getListTableConstraintsSQL(mixed table) +
+
+ +
+ +
/Doctrine/DBAL/Platforms/MySqlPlatform.php at line 124
+

getListTableForeignKeysSQL

+public void getListTableForeignKeysSQL(mixed table, mixed database) +
+
+ +
+ +
/Doctrine/DBAL/Platforms/MySqlPlatform.php at line 114
+

getListTableIndexesSQL

+public void getListTableIndexesSQL(mixed table) +
+
+ +
+ +
/Doctrine/DBAL/Platforms/MySqlPlatform.php at line 280
+

getListTablesSQL

+public void getListTablesSQL() +
+
+ +
+ +
/Doctrine/DBAL/Platforms/MySqlPlatform.php at line 119
+

getListViewsSQL

+public string getListViewsSQL(string database) +
+

Get the SQL to list all views of a database or user.

+ +
+ +
/Doctrine/DBAL/Platforms/MySqlPlatform.php at line 80
+

getLocateExpression

+public integer getLocateExpression(string str, string substr, mixed startPos, int pos) +
+

returns the position of the first occurrence of substring $substr in string $str

+
Parameters:
+
substr - literal string to find
+
str - literal string
+
pos - position to start at, beginning of string by default
+
+
+ +
+ +
/Doctrine/DBAL/Platforms/MySqlPlatform.php at line 660
+

getName

+public string getName() +
+

Get the platform name for this instance.

+ +
+ +
/Doctrine/DBAL/Platforms/MySqlPlatform.php at line 56
+

getRegexpExpression

+public string getRegexpExpression() +
+

Returns the regular expression operator.

+
Override.
+
+
+ +
+ +
/Doctrine/DBAL/Platforms/MySqlPlatform.php at line 650
+

getSetTransactionIsolationSQL

+public void getSetTransactionIsolationSQL(integer level) +
+

Get sql to set the transaction isolation level

+ +
+ +
/Doctrine/DBAL/Platforms/MySqlPlatform.php at line 275
+

getShowDatabasesSQL

+public string getShowDatabasesSQL() +
+

Get sql query to show a list of database.

+ +
+ +
/Doctrine/DBAL/Platforms/MySqlPlatform.php at line 574
+

getSmallIntTypeDeclarationSQL

+public string getSmallIntTypeDeclarationSQL(mixed field, array columnDef) +
+

+ +
+ +
/Doctrine/DBAL/Platforms/MySqlPlatform.php at line 213
+

getTimeTypeDeclarationSQL

+public string getTimeTypeDeclarationSQL(array fieldDeclaration) +
+

+
Override.
+
+
+ +
+ +
/Doctrine/DBAL/Platforms/MySqlPlatform.php at line 157
+

getVarcharTypeDeclarationSQL

+public void getVarcharTypeDeclarationSQL(array field) +
+

Gets the SQL snippet used to declare a VARCHAR column on the MySql platform.

+
Params:
+
array $field
+
+
+ +
+ +
/Doctrine/DBAL/Platforms/MySqlPlatform.php at line 247
+

prefersIdentityColumns

+public boolean prefersIdentityColumns() +
+

Whether the platform prefers identity columns for ID generation. +MySql prefers "autoincrement" identity columns since sequences can only +be emulated with a table.

+
Override.
+
+
+ +
+ +
/Doctrine/DBAL/Platforms/MySqlPlatform.php at line 259
+

supportsIdentityColumns

+public boolean supportsIdentityColumns() +
+

Whether the platform supports identity columns. +MySql supports this through AUTO_INCREMENT columns.

+
Override.
+
+
+ +
+ +
/Doctrine/DBAL/Platforms/MySqlPlatform.php at line 270
+

supportsSavepoints

+public boolean supportsSavepoints() +
+

Whether the platform supports savepoints. MySql does not.

+
Override.
+
+
+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/dbal/platforms/oracleplatform.html b/lib/api/doctrine/dbal/platforms/oracleplatform.html new file mode 100644 index 000000000..c77d6e570 --- /dev/null +++ b/lib/api/doctrine/dbal/platforms/oracleplatform.html @@ -0,0 +1,743 @@ + + + + + + + + + + + +OraclePlatform (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +
Doctrine\DBAL\Platforms\OraclePlatform
+
/Doctrine/DBAL/Platforms/OraclePlatform.php at line 34
+ +

Class OraclePlatform

+ +
Class:OraclePlatform - Superclass: AbstractPlatform
+AbstractPlatform
⌊ OraclePlatform
+ +
+ +

public class OraclePlatform
extends AbstractPlatform + +

+ +

OraclePlatform.

+ +
+
Since:
+
2.0
+
Author:
+
Roman Borschel
+
Lukas Smith (PEAR MDB2 library)
+
Benjamin Eberlei
+
License:
+
http://www.opensource.org/licenses/lgpl-license.php LGPL
+
See Also:
+
www.doctrine-project.org
+
Version:
+
$Revision: 3938 $
+
Todo:
+
Remove any unnecessary methods.
+
+
+ + + +
Fields inherited from Doctrine\DBAL\Platforms\AbstractPlatform
CREATE_FOREIGNKEYS, CREATE_INDEXES, TRIM_BOTH, TRIM_LEADING, TRIM_TRAILING, TRIM_UNSPECIFIED
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Method Summary
string

fixSchemaElementName(mixed schemaElementName, string schemaName)

Makes any fixes to a name of a schema element (table, sequence, ...) that are required +by restrictions of the platform, like a maximum length.

array

getAlterTableSQL(TableDiff diff, string diff->name, array changes, boolean check)

Gets the sql statements for altering an existing table. +

string

getBigIntTypeDeclarationSQL(mixed field, array columnDef)

string

getBooleanTypeDeclarationSQL(mixed field, array columnDef)

void

getClobTypeDeclarationSQL(array field)

@override

void

getCreateAutoincrementSql(mixed name, mixed table, mixed start)

string

getCreateSequenceSQL(\Doctrine\DBAL\Schema\Sequence sequence)

Gets the SQL used to create a sequence that starts with a given value +and increments by the given allocation size. +

void

getCreateTemporaryTableSnippetSQL()

void

getCreateViewSQL(mixed name, mixed sql)

string

getDateTimeFormatString()

Gets the format string, as accepted by the date() function, that describes +the format of a stored datetime value of this platform.

string

getDateTimeTypeDeclarationSQL(array fieldDeclaration)

string

getDateTypeDeclarationSQL(array fieldDeclaration)

void

getDropAutoincrementSql(mixed table)

void

getDropDatabaseSQL(mixed database)

string

getDropForeignKeySQL(ForeignKeyConstraint|string foreignKey, Table|string table)

string

getDropSequenceSQL(\Doctrine\DBAL\Schema\Sequence sequence)

void

getDropViewSQL(mixed name)

string

getGuidExpression()

Returns global unique identifier

string

getIntegerTypeDeclarationSQL(mixed field, array columnDef)

void

getListDatabasesSQL()

void

getListSequencesSQL(mixed database)

void

getListTableColumnsSQL(mixed table)

void

getListTableConstraintsSQL(mixed table)

void

getListTableForeignKeysSQL(mixed table)

string

getListTableIndexesSQL(string table)

void

getListTablesSQL()

string

getListViewsSQL(string database)

Get the SQL to list all views of a database or user.

integer

getLocateExpression(string str, string substr, mixed startPos, int pos)

returns the position of the first occurrence of substring $substr in string $str

int

getMaxIdentifierLength()

Maximum length of any given databse identifier, like tables or column names.

string

getName()

Get the platform name for this instance

string

getNowExpression(mixed type)

Return string to call a variable with the current timestamp inside an SQL statement +There are three special variables for current date and time: +- CURRENT_TIMESTAMP (date and time, TIMESTAMP type) +- CURRENT_DATE (date, DATE type) +- CURRENT_TIME (time, TIME type)

string

getSQLResultCasing(string column)

Gets the character casing of a column in an SQL result set of this platform. +

void

getSequenceNextValSQL(string sequenceName)

{@inheritdoc}

void

getSetTransactionIsolationSQL(integer level)

{@inheritdoc}

string

getSmallIntTypeDeclarationSQL(mixed field, array columnDef)

string

getSubstringExpression(string value, integer position, integer length, integer from, integer len)

return string to call a function to get a substring inside an SQL statementNote: Not SQL92, but common functionality.

string

getTimeTypeDeclarationSQL(array fieldDeclaration)

string

getTruncateTableSQL(string tableName, bool cascade)

void

getVarcharTypeDeclarationSQL(array field)

Gets the SQL snippet used to declare a VARCHAR column on the Oracle platform.

string

modifyLimitQuery(string query, integer limit, integer offset)

Adds an driver-specific LIMIT clause to the query

boolean

prefersSequences()

Whether the platform prefers sequences for ID generation.

bool

supportsForeignKeyOnUpdate()

Does this platform supports onUpdate in foreign key constraints?

boolean

supportsSequences()

Whether the platform supports sequences.

+ + + +
Methods inherited from Doctrine\DBAL\Platforms\AbstractPlatform
convertBooleans, createsExplicitIndexForForeignKeys, fixSchemaElementName, getAcosExpression, getAdvancedForeignKeyOptionsSQL, getAlterTableSQL, getAvgExpression, getBetweenExpression, getBigIntTypeDeclarationSQL, getBooleanTypeDeclarationSQL, getCheckDeclarationSQL, getClobTypeDeclarationSQL, getColumnCharsetDeclarationSQL, getColumnCollationDeclarationSQL, getColumnDeclarationListSQL, getColumnDeclarationSQL, getConcatExpression, getCosExpression, getCountExpression, getCreateConstraintSQL, getCreateDatabaseSQL, getCreateForeignKeySQL, getCreateIndexSQL, getCreateSequenceSQL, getCreateTableSQL, getCreateTemporaryTableSnippetSQL, getCreateViewSQL, getCurrentDateSQL, getCurrentTimeSQL, getCurrentTimestampSQL, getCustomTypeDeclarationSQL, getDateFormatString, getDateTimeFormatString, getDateTimeTypeDeclarationSQL, getDateTypeDeclarationSQL, getDecimalTypeDeclarationSQL, getDefaultTransactionIsolationLevel, getDefaultValueDeclarationSQL, getDropConstraintSQL, getDropDatabaseSQL, getDropForeignKeySQL, getDropIndexSQL, getDropSequenceSQL, getDropTableSQL, getDropViewSQL, getEmptyIdentityInsertSQL, getForUpdateSql, getForeignKeyBaseDeclarationSQL, getForeignKeyDeclarationSQL, getForeignKeyReferentialActionSQL, getIdentifierQuoteCharacter, getIdentityColumnNullInsertSQL, getInExpression, getIndexDeclarationSQL, getIndexFieldDeclarationListSQL, getIntegerTypeDeclarationSQL, getIsNotNullExpression, getIsNullExpression, getLengthExpression, getListDatabasesSQL, getListSequencesSQL, getListTableColumnsSQL, getListTableConstraintsSQL, getListTableForeignKeysSQL, getListTableIndexesSQL, getListTablesSQL, getListUsersSQL, getListViewsSQL, getLocateExpression, getLowerExpression, getLtrimExpression, getMaxExpression, getMaxIdentifierLength, getMd5Expression, getMinExpression, getModExpression, getName, getNotExpression, getNowExpression, getPiExpression, getRegexpExpression, getRoundExpression, getRtrimExpression, getSQLResultCasing, getSequenceNextValSQL, getSetCharsetSQL, getSetTransactionIsolationSQL, getShowDatabasesSQL, getSinExpression, getSmallIntTypeDeclarationSQL, getSqlCommentEndString, getSqlCommentStartString, getSubstringExpression, getSumExpression, getTemporaryTableSQL, getTimeFormatString, getTimeTypeDeclarationSQL, getTrimExpression, getTruncateTableSQL, getUniqueConstraintDeclarationSQL, getUniqueFieldDeclarationSQL, getUpperExpression, getVarcharMaxLength, getVarcharTypeDeclarationSQL, getWildcards, modifyLimitQuery, prefersIdentityColumns, prefersSequences, quoteIdentifier, supportsAlterTable, supportsForeignKeyConstraints, supportsForeignKeyOnUpdate, supportsGettingAffectedRows, supportsIdentityColumns, supportsIndexes, supportsPrimaryConstraints, supportsSavepoints, supportsSchemas, supportsSequences, supportsTransactions
+ +

Method Detail

+
/Doctrine/DBAL/Platforms/OraclePlatform.php at line 612
+

fixSchemaElementName

+public string fixSchemaElementName(mixed schemaElementName, string schemaName) +
+

Makes any fixes to a name of a schema element (table, sequence, ...) that are required +by restrictions of the platform, like a maximum length.

+ +
+ +
/Doctrine/DBAL/Platforms/OraclePlatform.php at line 493
+

getAlterTableSQL

+public array getAlterTableSQL(TableDiff diff, string diff->name, array changes, boolean check) +
+

Gets the sql statements for altering an existing table.

The method returns an array of sql statements, since some platforms need several statements.

+
Parameters:
+
diff->name - name of the table that is intended to be changed.
+
changes - associative array that contains the details of each type *
+
check - indicates whether the function should just check if the DBMS driver can perform the requested table alterations if the value is true or actually perform them otherwise.
+
+
+ +
+ +
/Doctrine/DBAL/Platforms/OraclePlatform.php at line 180
+

getBigIntTypeDeclarationSQL

+public string getBigIntTypeDeclarationSQL(mixed field, array columnDef) +
+

+
Override.
+
+
+ +
+ +
/Doctrine/DBAL/Platforms/OraclePlatform.php at line 164
+

getBooleanTypeDeclarationSQL

+public string getBooleanTypeDeclarationSQL(mixed field, array columnDef) +
+

+
Override.
+
+
+ +
+ +
/Doctrine/DBAL/Platforms/OraclePlatform.php at line 249
+

getClobTypeDeclarationSQL

+public void getClobTypeDeclarationSQL(array field) +
+

+ +
+ +
/Doctrine/DBAL/Platforms/OraclePlatform.php at line 338
+

getCreateAutoincrementSql

+public void getCreateAutoincrementSql(mixed name, mixed table, mixed start) +
+
+ +
+ +
/Doctrine/DBAL/Platforms/OraclePlatform.php at line 116
+

getCreateSequenceSQL

+public string getCreateSequenceSQL(\Doctrine\DBAL\Schema\Sequence sequence) +
+

Gets the SQL used to create a sequence that starts with a given value +and increments by the given allocation size.

Need to specifiy minvalue, since start with is hidden in the system and MINVALUE <= START WITH. +Therefore we can use MINVALUE to be able to get a hint what START WITH was for later introspection +in listSequences()

+
Throws:
+
DBALException
+
+
+ +
+ +
/Doctrine/DBAL/Platforms/OraclePlatform.php at line 602
+

getCreateTemporaryTableSnippetSQL

+public void getCreateTemporaryTableSnippetSQL() +
+
+ +
+ +
/Doctrine/DBAL/Platforms/OraclePlatform.php at line 328
+

getCreateViewSQL

+public void getCreateViewSQL(mixed name, mixed sql) +
+
+ +
+ +
/Doctrine/DBAL/Platforms/OraclePlatform.php at line 607
+

getDateTimeFormatString

+public string getDateTimeFormatString() +
+

Gets the format string, as accepted by the date() function, that describes +the format of a stored datetime value of this platform.

+
Returns:
+
The format string.
+
Todo:
+
We need to get the specific format for each dbms and override this function for each platform
+
+
+ +
+ +
/Doctrine/DBAL/Platforms/OraclePlatform.php at line 196
+

getDateTimeTypeDeclarationSQL

+public string getDateTimeTypeDeclarationSQL(array fieldDeclaration) +
+

+
Override.
+
+
+ +
+ +
/Doctrine/DBAL/Platforms/OraclePlatform.php at line 204
+

getDateTypeDeclarationSQL

+public string getDateTypeDeclarationSQL(array fieldDeclaration) +
+

+
Override.
+
+
+ +
+ +
/Doctrine/DBAL/Platforms/OraclePlatform.php at line 389
+

getDropAutoincrementSql

+public void getDropAutoincrementSql(mixed table) +
+
+ +
+ +
/Doctrine/DBAL/Platforms/OraclePlatform.php at line 476
+

getDropDatabaseSQL

+public void getDropDatabaseSQL(mixed database) +
+
+ +
+ +
/Doctrine/DBAL/Platforms/OraclePlatform.php at line 463
+

getDropForeignKeySQL

+public string getDropForeignKeySQL(ForeignKeyConstraint|string foreignKey, Table|string table) +
+

+ +
+ +
/Doctrine/DBAL/Platforms/OraclePlatform.php at line 449
+

getDropSequenceSQL

+public string getDropSequenceSQL(\Doctrine\DBAL\Schema\Sequence sequence) +
+

+ +
+ +
/Doctrine/DBAL/Platforms/OraclePlatform.php at line 333
+

getDropViewSQL

+public void getDropViewSQL(mixed name) +
+
+ +
+ +
/Doctrine/DBAL/Platforms/OraclePlatform.php at line 100
+

getGuidExpression

+public string getGuidExpression() +
+

Returns global unique identifier

+
Returns:
+
to get global unique identifier
+
Override.
+
+
+ +
+ +
/Doctrine/DBAL/Platforms/OraclePlatform.php at line 172
+

getIntegerTypeDeclarationSQL

+public string getIntegerTypeDeclarationSQL(mixed field, array columnDef) +
+

+
Override.
+
+
+ +
+ +
/Doctrine/DBAL/Platforms/OraclePlatform.php at line 254
+

getListDatabasesSQL

+public void getListDatabasesSQL() +
+
+ +
+ +
/Doctrine/DBAL/Platforms/OraclePlatform.php at line 259
+

getListSequencesSQL

+public void getListSequencesSQL(mixed database) +
+
+ +
+ +
/Doctrine/DBAL/Platforms/OraclePlatform.php at line 438
+

getListTableColumnsSQL

+public void getListTableColumnsSQL(mixed table) +
+
+ +
+ +
/Doctrine/DBAL/Platforms/OraclePlatform.php at line 432
+

getListTableConstraintsSQL

+public void getListTableConstraintsSQL(mixed table) +
+
+ +
+ +
/Doctrine/DBAL/Platforms/OraclePlatform.php at line 405
+

getListTableForeignKeysSQL

+public void getListTableForeignKeysSQL(mixed table) +
+
+ +
+ +
/Doctrine/DBAL/Platforms/OraclePlatform.php at line 304
+

getListTableIndexesSQL

+public string getListTableIndexesSQL(string table) + + +
+ +
/Doctrine/DBAL/Platforms/OraclePlatform.php at line 318
+

getListTablesSQL

+public void getListTablesSQL() +
+
+ +
+ +
/Doctrine/DBAL/Platforms/OraclePlatform.php at line 323
+

getListViewsSQL

+public string getListViewsSQL(string database) +
+

Get the SQL to list all views of a database or user.

+ +
+ +
/Doctrine/DBAL/Platforms/OraclePlatform.php at line 85
+

getLocateExpression

+public integer getLocateExpression(string str, string substr, mixed startPos, int pos) +
+

returns the position of the first occurrence of substring $substr in string $str

+
Parameters:
+
substr - literal string to find
+
str - literal string
+
pos - position to start at, beginning of string by default
+
+
+ +
+ +
/Doctrine/DBAL/Platforms/OraclePlatform.php at line 626
+

getMaxIdentifierLength

+public int getMaxIdentifierLength() +
+

Maximum length of any given databse identifier, like tables or column names.

+ +
+ +
/Doctrine/DBAL/Platforms/OraclePlatform.php at line 550
+

getName

+public string getName() +
+

Get the platform name for this instance

+ +
+ +
/Doctrine/DBAL/Platforms/OraclePlatform.php at line 66
+

getNowExpression

+public string getNowExpression(mixed type) +
+

Return string to call a variable with the current timestamp inside an SQL statement +There are three special variables for current date and time: +- CURRENT_TIMESTAMP (date and time, TIMESTAMP type) +- CURRENT_DATE (date, DATE type) +- CURRENT_TIME (time, TIME type)

+
Returns:
+
to call a variable with the current timestamp
+
Override.
+
+
+ +
+ +
/Doctrine/DBAL/Platforms/OraclePlatform.php at line 597
+

getSQLResultCasing

+public string getSQLResultCasing(string column) +
+

Gets the character casing of a column in an SQL result set of this platform.

Oracle returns all column names in SQL result sets in uppercase.

+
Parameters:
+
column - The column name for which to get the correct character casing.
+
Returns:
+
The column name in the character casing used in SQL result sets.
+
+
+ +
+ +
/Doctrine/DBAL/Platforms/OraclePlatform.php at line 130
+

getSequenceNextValSQL

+public void getSequenceNextValSQL(string sequenceName) +
+

+
Override.
+
+
+ +
+ +
/Doctrine/DBAL/Platforms/OraclePlatform.php at line 141
+

getSetTransactionIsolationSQL

+public void getSetTransactionIsolationSQL(integer level) +
+

+
Override.
+
+
+ +
+ +
/Doctrine/DBAL/Platforms/OraclePlatform.php at line 188
+

getSmallIntTypeDeclarationSQL

+public string getSmallIntTypeDeclarationSQL(mixed field, array columnDef) +
+

+
Override.
+
+
+ +
+ +
/Doctrine/DBAL/Platforms/OraclePlatform.php at line 47
+

getSubstringExpression

+public string getSubstringExpression(string value, integer position, integer length, integer from, integer len) +
+

return string to call a function to get a substring inside an SQL statement

Note: Not SQL92, but common functionality.

+
Parameters:
+
value - an sql string literal or column name/alias
+
position - where to start the substring portion
+
length - the substring portion length
+
Returns:
+
SQL substring function with given parameters
+
Override.
+
+
+ +
+ +
/Doctrine/DBAL/Platforms/OraclePlatform.php at line 212
+

getTimeTypeDeclarationSQL

+public string getTimeTypeDeclarationSQL(array fieldDeclaration) +
+

+
Override.
+
+
+ +
+ +
/Doctrine/DBAL/Platforms/OraclePlatform.php at line 649
+

getTruncateTableSQL

+public string getTruncateTableSQL(string tableName, bool cascade) +
+

+
Inheritdoc.
+
+
+ +
+ +
/Doctrine/DBAL/Platforms/OraclePlatform.php at line 231
+

getVarcharTypeDeclarationSQL

+public void getVarcharTypeDeclarationSQL(array field) +
+

Gets the SQL snippet used to declare a VARCHAR column on the Oracle platform.

+
Params:
+
array $field
+
Override.
+
+
+ +
+ +
/Doctrine/DBAL/Platforms/OraclePlatform.php at line 563
+

modifyLimitQuery

+public string modifyLimitQuery(string query, integer limit, integer offset) +
+

Adds an driver-specific LIMIT clause to the query

+
Parameters:
+
query - query to modify
+
limit - limit the number of rows
+
offset - start reading from given offset
+
Returns:
+
the modified query
+
+
+ +
+ +
/Doctrine/DBAL/Platforms/OraclePlatform.php at line 540
+

prefersSequences

+public boolean prefersSequences() +
+

Whether the platform prefers sequences for ID generation.

+ +
+ +
/Doctrine/DBAL/Platforms/OraclePlatform.php at line 641
+

supportsForeignKeyOnUpdate

+public bool supportsForeignKeyOnUpdate() +
+

Does this platform supports onUpdate in foreign key constraints?

+ +
+ +
/Doctrine/DBAL/Platforms/OraclePlatform.php at line 636
+

supportsSequences

+public boolean supportsSequences() +
+

Whether the platform supports sequences.

+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/dbal/platforms/package-frame.html b/lib/api/doctrine/dbal/platforms/package-frame.html new file mode 100644 index 000000000..84fbb6083 --- /dev/null +++ b/lib/api/doctrine/dbal/platforms/package-frame.html @@ -0,0 +1,31 @@ + + + + + + + + + + + +Doctrine\DBAL\Platforms (Doctrine) + + + + +

Doctrine\DBAL\Platforms

+ +

Classes

+ + + + + \ No newline at end of file diff --git a/lib/api/doctrine/dbal/platforms/package-functions.html b/lib/api/doctrine/dbal/platforms/package-functions.html new file mode 100644 index 000000000..effc269c0 --- /dev/null +++ b/lib/api/doctrine/dbal/platforms/package-functions.html @@ -0,0 +1,69 @@ + + + + + + + + + + + +Functions (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +

Functions

+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/dbal/platforms/package-globals.html b/lib/api/doctrine/dbal/platforms/package-globals.html new file mode 100644 index 000000000..8cd9fac59 --- /dev/null +++ b/lib/api/doctrine/dbal/platforms/package-globals.html @@ -0,0 +1,69 @@ + + + + + + + + + + + +Globals (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +

Globals

+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/dbal/platforms/package-summary.html b/lib/api/doctrine/dbal/platforms/package-summary.html new file mode 100644 index 000000000..f54e11643 --- /dev/null +++ b/lib/api/doctrine/dbal/platforms/package-summary.html @@ -0,0 +1,72 @@ + + + + + + + + + + + +Doctrine\DBAL\Platforms (Doctrine) + + + + +
+

Doctrine

+ +
+ + +
+ +

Namespace Doctrine\DBAL\Platforms

+ + + + + + + + + +
Class Summary
AbstractPlatformBase class for all DatabasePlatforms.
MsSqlPlatformThe MsSqlPlatform provides the behavior, features and SQL dialect of the +MySQL database platform.
MySqlPlatformThe MySqlPlatform provides the behavior, features and SQL dialect of the +MySQL database platform.
OraclePlatformOraclePlatform.
PostgreSqlPlatformPostgreSqlPlatform.
SqlitePlatformThe SqlitePlatform class describes the specifics and dialects of the SQLite +database platform.
+ +
+ +
+

Doctrine

+ +
+ + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/dbal/platforms/package-tree.html b/lib/api/doctrine/dbal/platforms/package-tree.html new file mode 100644 index 000000000..cc469df84 --- /dev/null +++ b/lib/api/doctrine/dbal/platforms/package-tree.html @@ -0,0 +1,63 @@ + + + + + + + + + + + +Doctrine\DBAL\Platforms (Doctrine) + + + + +
+

Doctrine

+ +
+ + +

Class Hierarchy for Package Doctrine\DBAL\Platforms

+
+

Doctrine

+ +
+ + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/dbal/platforms/postgresqlplatform.html b/lib/api/doctrine/dbal/platforms/postgresqlplatform.html new file mode 100644 index 000000000..88ae59fa1 --- /dev/null +++ b/lib/api/doctrine/dbal/platforms/postgresqlplatform.html @@ -0,0 +1,731 @@ + + + + + + + + + + + +PostgreSqlPlatform (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +
Doctrine\DBAL\Platforms\PostgreSqlPlatform
+
/Doctrine/DBAL/Platforms/PostgreSqlPlatform.php at line 36
+ +

Class PostgreSqlPlatform

+ +
Class:PostgreSqlPlatform - Superclass: AbstractPlatform
+AbstractPlatform
⌊ PostgreSqlPlatform
+ +
+ +

public class PostgreSqlPlatform
extends AbstractPlatform + +

+ +

PostgreSqlPlatform.

+ +
+
Since:
+
2.0
+
Author:
+
Roman Borschel
+
Lukas Smith (PEAR MDB2 library)
+
Benjamin Eberlei
+
Todo:
+
Rename: PostgreSQLPlatform
+
License:
+
http://www.opensource.org/licenses/lgpl-license.php LGPL
+
See Also:
+
www.doctrine-project.org
+
Version:
+
$Revision: 3938 $
+
+
+ + + +
Fields inherited from Doctrine\DBAL\Platforms\AbstractPlatform
CREATE_FOREIGNKEYS, CREATE_INDEXES, TRIM_BOTH, TRIM_LEADING, TRIM_TRAILING, TRIM_UNSPECIFIED
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Method Summary
void

convertBooleans(array item)

Postgres wants boolean values converted to the strings 'true'/'false'.

string

getAdvancedForeignKeyOptionsSQL(\Doctrine\DBAL\Schema\ForeignKeyConstraint foreignKey)

Return the FOREIGN KEY query section dealing with non-standard options +as MATCH, INITIALLY DEFERRED, ON UPDATE, ...

array

getAlterTableSQL(TableDiff diff, string name, array changes, boolean check)

generates the sql for altering an existing table on postgresql

string

getBigIntTypeDeclarationSQL(mixed field, array columnDef)

string

getBooleanTypeDeclarationSQL(mixed field, array columnDef)

void

getClobTypeDeclarationSQL(array field)

@override

void

getCreateDatabaseSQL(string name, mixed database)

create a new database

string

getCreateSequenceSQL(\Doctrine\DBAL\Schema\Sequence sequence)

Gets the SQL to create a sequence on this platform.

void

getCreateViewSQL(mixed name, mixed sql)

string

getDateTimeFormatString()

Gets the format string, as accepted by the date() function, that describes +the format of a stored datetime value of this platform.

string

getDateTimeTypeDeclarationSQL(array fieldDeclaration)

string

getDateTypeDeclarationSQL(array fieldDeclaration)

void

getDropDatabaseSQL(string name, mixed database)

drop an existing database

string

getDropForeignKeySQL(ForeignKeyConstraint|string foreignKey, Table|string table)

string

getDropSequenceSQL(\Doctrine\DBAL\Schema\Sequence sequence)

Drop existing sequence

void

getDropViewSQL(mixed name)

string

getEmptyIdentityInsertSQL(mixed quotedTableName, mixed quotedIdentifierColumnName, string tableName, string identifierColumnName)

Get the insert sql for an empty insert statement

string

getIntegerTypeDeclarationSQL(mixed field, array columnDef)

void

getListDatabasesSQL()

void

getListSequencesSQL(mixed database)

void

getListTableColumnsSQL(mixed table)

void

getListTableConstraintsSQL(mixed table)

void

getListTableForeignKeysSQL(mixed table, mixed database)

string

getListTableIndexesSQL(string table)

void

getListTablesSQL()

string

getListViewsSQL(string database)

Get the SQL to list all views of a database or user.

integer

getLocateExpression(string str, string substr, mixed startPos, int pos)

returns the position of the first occurrence of substring $substr in string $str

string

getName()

Get the platform name for this instance

string

getNowExpression()

Returns the SQL string to return the current system date and time.

string

getRegexpExpression()

regexp

string

getSQLResultCasing(string column)

Gets the character casing of a column in an SQL result set. +

void

getSequenceNextValSQL(mixed sequenceName)

void

getSetTransactionIsolationSQL(integer level)

Get sql to set the transaction isolation level

string

getSmallIntTypeDeclarationSQL(mixed field, array columnDef)

string

getSubstringExpression(string value, int from, int len)

Returns part of a string. +

string

getTimeTypeDeclarationSQL(array fieldDeclaration)

string

getTruncateTableSQL(string tableName, bool cascade)

void

getVarcharTypeDeclarationSQL(array field)

Gets the SQL snippet used to declare a VARCHAR column on the MySql platform.

boolean

prefersSequences()

Whether the platform prefers sequences for ID generation.

boolean

supportsIdentityColumns()

Whether the platform supports identity columns. +

boolean

supportsSchemas()

Whether the platform supports database schemas.

boolean

supportsSequences()

Whether the platform supports sequences. +

+ + + +
Methods inherited from Doctrine\DBAL\Platforms\AbstractPlatform
convertBooleans, createsExplicitIndexForForeignKeys, fixSchemaElementName, getAcosExpression, getAdvancedForeignKeyOptionsSQL, getAlterTableSQL, getAvgExpression, getBetweenExpression, getBigIntTypeDeclarationSQL, getBooleanTypeDeclarationSQL, getCheckDeclarationSQL, getClobTypeDeclarationSQL, getColumnCharsetDeclarationSQL, getColumnCollationDeclarationSQL, getColumnDeclarationListSQL, getColumnDeclarationSQL, getConcatExpression, getCosExpression, getCountExpression, getCreateConstraintSQL, getCreateDatabaseSQL, getCreateForeignKeySQL, getCreateIndexSQL, getCreateSequenceSQL, getCreateTableSQL, getCreateTemporaryTableSnippetSQL, getCreateViewSQL, getCurrentDateSQL, getCurrentTimeSQL, getCurrentTimestampSQL, getCustomTypeDeclarationSQL, getDateFormatString, getDateTimeFormatString, getDateTimeTypeDeclarationSQL, getDateTypeDeclarationSQL, getDecimalTypeDeclarationSQL, getDefaultTransactionIsolationLevel, getDefaultValueDeclarationSQL, getDropConstraintSQL, getDropDatabaseSQL, getDropForeignKeySQL, getDropIndexSQL, getDropSequenceSQL, getDropTableSQL, getDropViewSQL, getEmptyIdentityInsertSQL, getForUpdateSql, getForeignKeyBaseDeclarationSQL, getForeignKeyDeclarationSQL, getForeignKeyReferentialActionSQL, getIdentifierQuoteCharacter, getIdentityColumnNullInsertSQL, getInExpression, getIndexDeclarationSQL, getIndexFieldDeclarationListSQL, getIntegerTypeDeclarationSQL, getIsNotNullExpression, getIsNullExpression, getLengthExpression, getListDatabasesSQL, getListSequencesSQL, getListTableColumnsSQL, getListTableConstraintsSQL, getListTableForeignKeysSQL, getListTableIndexesSQL, getListTablesSQL, getListUsersSQL, getListViewsSQL, getLocateExpression, getLowerExpression, getLtrimExpression, getMaxExpression, getMaxIdentifierLength, getMd5Expression, getMinExpression, getModExpression, getName, getNotExpression, getNowExpression, getPiExpression, getRegexpExpression, getRoundExpression, getRtrimExpression, getSQLResultCasing, getSequenceNextValSQL, getSetCharsetSQL, getSetTransactionIsolationSQL, getShowDatabasesSQL, getSinExpression, getSmallIntTypeDeclarationSQL, getSqlCommentEndString, getSqlCommentStartString, getSubstringExpression, getSumExpression, getTemporaryTableSQL, getTimeFormatString, getTimeTypeDeclarationSQL, getTrimExpression, getTruncateTableSQL, getUniqueConstraintDeclarationSQL, getUniqueFieldDeclarationSQL, getUpperExpression, getVarcharMaxLength, getVarcharTypeDeclarationSQL, getWildcards, modifyLimitQuery, prefersIdentityColumns, prefersSequences, quoteIdentifier, supportsAlterTable, supportsForeignKeyConstraints, supportsForeignKeyOnUpdate, supportsGettingAffectedRows, supportsIdentityColumns, supportsIndexes, supportsPrimaryConstraints, supportsSavepoints, supportsSchemas, supportsSequences, supportsTransactions
+ +

Method Detail

+
/Doctrine/DBAL/Platforms/PostgreSqlPlatform.php at line 427
+

convertBooleans

+public void convertBooleans(array item) +
+

Postgres wants boolean values converted to the strings 'true'/'false'.

+
Override.
+
+
+ +
+ +
/Doctrine/DBAL/Platforms/PostgreSqlPlatform.php at line 268
+

getAdvancedForeignKeyOptionsSQL

+public string getAdvancedForeignKeyOptionsSQL(\Doctrine\DBAL\Schema\ForeignKeyConstraint foreignKey) +
+

Return the FOREIGN KEY query section dealing with non-standard options +as MATCH, INITIALLY DEFERRED, ON UPDATE, ...

+
Parameters:
+
foreignKey - foreign key definition
+
Override.
+
+
+ +
+ +
/Doctrine/DBAL/Platforms/PostgreSqlPlatform.php at line 300
+

getAlterTableSQL

+public array getAlterTableSQL(TableDiff diff, string name, array changes, boolean check) +
+

generates the sql for altering an existing table on postgresql

+
Parameters:
+
name - name of the table that is intended to be changed.
+
changes - associative array that contains the details of each type *
+
check - indicates whether the function should just check if the DBMS driver can perform the requested table alterations if the value is true or actually perform them otherwise.
+
See Also:
+
Doctrine_Export::alterTable()
+
Override.
+
+
+ +
+ +
/Doctrine/DBAL/Platforms/PostgreSqlPlatform.php at line 477
+

getBigIntTypeDeclarationSQL

+public string getBigIntTypeDeclarationSQL(mixed field, array columnDef) +
+

+
Override.
+
+
+ +
+ +
/Doctrine/DBAL/Platforms/PostgreSqlPlatform.php at line 457
+

getBooleanTypeDeclarationSQL

+public string getBooleanTypeDeclarationSQL(mixed field, array columnDef) +
+

+
Override.
+
+
+ +
+ +
/Doctrine/DBAL/Platforms/PostgreSqlPlatform.php at line 549
+

getClobTypeDeclarationSQL

+public void getClobTypeDeclarationSQL(array field) +
+

+ +
+ +
/Doctrine/DBAL/Platforms/PostgreSqlPlatform.php at line 243
+

getCreateDatabaseSQL

+public void getCreateDatabaseSQL(string name, mixed database) +
+

create a new database

+
Parameters:
+
name - name of the database that should be created
+
Throws:
+
PDOException
+
Override.
+
+
+ +
+ +
/Doctrine/DBAL/Platforms/PostgreSqlPlatform.php at line 354
+

getCreateSequenceSQL

+public string getCreateSequenceSQL(\Doctrine\DBAL\Schema\Sequence sequence) +
+

Gets the SQL to create a sequence on this platform.

+
Throws:
+
DBALException
+
+
+ +
+ +
/Doctrine/DBAL/Platforms/PostgreSqlPlatform.php at line 204
+

getCreateViewSQL

+public void getCreateViewSQL(mixed name, mixed sql) +
+
+ +
+ +
/Doctrine/DBAL/Platforms/PostgreSqlPlatform.php at line 577
+

getDateTimeFormatString

+public string getDateTimeFormatString() +
+

Gets the format string, as accepted by the date() function, that describes +the format of a stored datetime value of this platform.

+
Returns:
+
The format string.
+
Todo:
+
We need to get the specific format for each dbms and override this function for each platform
+
+
+ +
+ +
/Doctrine/DBAL/Platforms/PostgreSqlPlatform.php at line 496
+

getDateTimeTypeDeclarationSQL

+public string getDateTimeTypeDeclarationSQL(array fieldDeclaration) +
+

+
Override.
+
+
+ +
+ +
/Doctrine/DBAL/Platforms/PostgreSqlPlatform.php at line 504
+

getDateTypeDeclarationSQL

+public string getDateTypeDeclarationSQL(array fieldDeclaration) +
+

+
Override.
+
+
+ +
+ +
/Doctrine/DBAL/Platforms/PostgreSqlPlatform.php at line 255
+

getDropDatabaseSQL

+public void getDropDatabaseSQL(string name, mixed database) +
+

drop an existing database

+
Parameters:
+
name - name of the database that should be dropped
+
Throws:
+
PDOException
+
+
+ +
+ +
/Doctrine/DBAL/Platforms/PostgreSqlPlatform.php at line 380
+

getDropForeignKeySQL

+public string getDropForeignKeySQL(ForeignKeyConstraint|string foreignKey, Table|string table) +
+

+ +
+ +
/Doctrine/DBAL/Platforms/PostgreSqlPlatform.php at line 367
+

getDropSequenceSQL

+public string getDropSequenceSQL(\Doctrine\DBAL\Schema\Sequence sequence) +
+

Drop existing sequence

+ +
+ +
/Doctrine/DBAL/Platforms/PostgreSqlPlatform.php at line 209
+

getDropViewSQL

+public void getDropViewSQL(mixed name) +
+
+ +
+ +
/Doctrine/DBAL/Platforms/PostgreSqlPlatform.php at line 589
+

getEmptyIdentityInsertSQL

+public string getEmptyIdentityInsertSQL(mixed quotedTableName, mixed quotedIdentifierColumnName, string tableName, string identifierColumnName) +
+

Get the insert sql for an empty insert statement

+
Returns:
+
$sql
+
+
+ +
+ +
/Doctrine/DBAL/Platforms/PostgreSqlPlatform.php at line 465
+

getIntegerTypeDeclarationSQL

+public string getIntegerTypeDeclarationSQL(mixed field, array columnDef) +
+

+
Override.
+
+
+ +
+ +
/Doctrine/DBAL/Platforms/PostgreSqlPlatform.php at line 151
+

getListDatabasesSQL

+public void getListDatabasesSQL() +
+
+ +
+ +
/Doctrine/DBAL/Platforms/PostgreSqlPlatform.php at line 156
+

getListSequencesSQL

+public void getListSequencesSQL(mixed database) +
+
+ +
+ +
/Doctrine/DBAL/Platforms/PostgreSqlPlatform.php at line 230
+

getListTableColumnsSQL

+public void getListTableColumnsSQL(mixed table) +
+
+ +
+ +
/Doctrine/DBAL/Platforms/PostgreSqlPlatform.php at line 214
+

getListTableConstraintsSQL

+public void getListTableConstraintsSQL(mixed table) +
+
+ +
+ +
/Doctrine/DBAL/Platforms/PostgreSqlPlatform.php at line 190
+

getListTableForeignKeysSQL

+public void getListTableForeignKeysSQL(mixed table, mixed database) +
+
+ +
+ +
/Doctrine/DBAL/Platforms/PostgreSqlPlatform.php at line 225
+

getListTableIndexesSQL

+public string getListTableIndexesSQL(string table) + + +
+ +
/Doctrine/DBAL/Platforms/PostgreSqlPlatform.php at line 167
+

getListTablesSQL

+public void getListTablesSQL() +
+
+ +
+ +
/Doctrine/DBAL/Platforms/PostgreSqlPlatform.php at line 185
+

getListViewsSQL

+public string getListViewsSQL(string database) +
+

Get the SQL to list all views of a database or user.

+ +
+ +
/Doctrine/DBAL/Platforms/PostgreSqlPlatform.php at line 87
+

getLocateExpression

+public integer getLocateExpression(string str, string substr, mixed startPos, int pos) +
+

returns the position of the first occurrence of substring $substr in string $str

+
Parameters:
+
substr - literal string to find
+
str - literal string
+
pos - position to start at, beginning of string by default
+
+
+ +
+ +
/Doctrine/DBAL/Platforms/PostgreSqlPlatform.php at line 559
+

getName

+public string getName() +
+

Get the platform name for this instance

+ +
+ +
/Doctrine/DBAL/Platforms/PostgreSqlPlatform.php at line 63
+

getNowExpression

+public string getNowExpression() +
+

Returns the SQL string to return the current system date and time.

+ +
+ +
/Doctrine/DBAL/Platforms/PostgreSqlPlatform.php at line 74
+

getRegexpExpression

+public string getRegexpExpression() +
+

regexp

+
Returns:
+
the regular expression operator
+
Override.
+
+
+ +
+ +
/Doctrine/DBAL/Platforms/PostgreSqlPlatform.php at line 572
+

getSQLResultCasing

+public string getSQLResultCasing(string column) +
+

Gets the character casing of a column in an SQL result set.

PostgreSQL returns all column names in SQL result sets in lowercase.

+
Parameters:
+
column - The column name for which to get the correct character casing.
+
Returns:
+
The column name in the character casing used in SQL result sets.
+
+
+ +
+ +
/Doctrine/DBAL/Platforms/PostgreSqlPlatform.php at line 443
+

getSequenceNextValSQL

+public void getSequenceNextValSQL(mixed sequenceName) +
+
+ +
+ +
/Doctrine/DBAL/Platforms/PostgreSqlPlatform.php at line 448
+

getSetTransactionIsolationSQL

+public void getSetTransactionIsolationSQL(integer level) +
+

Get sql to set the transaction isolation level

+ +
+ +
/Doctrine/DBAL/Platforms/PostgreSqlPlatform.php at line 488
+

getSmallIntTypeDeclarationSQL

+public string getSmallIntTypeDeclarationSQL(mixed field, array columnDef) +
+

+
Override.
+
+
+ +
+ +
/Doctrine/DBAL/Platforms/PostgreSqlPlatform.php at line 49
+

getSubstringExpression

+public string getSubstringExpression(string value, int from, int len) +
+

Returns part of a string.

Note: Not SQL92, but common functionality.

+
Parameters:
+
value - the target $value the string or the string column.
+
from - extract from this characeter.
+
len - extract this amount of characters.
+
Returns:
+
sql that extracts part of a string.
+
Override.
+
+
+ +
+ +
/Doctrine/DBAL/Platforms/PostgreSqlPlatform.php at line 512
+

getTimeTypeDeclarationSQL

+public string getTimeTypeDeclarationSQL(array fieldDeclaration) +
+

+
Override.
+
+
+ +
+ +
/Doctrine/DBAL/Platforms/PostgreSqlPlatform.php at line 597
+

getTruncateTableSQL

+public string getTruncateTableSQL(string tableName, bool cascade) +
+

+
Inheritdoc.
+
+
+ +
+ +
/Doctrine/DBAL/Platforms/PostgreSqlPlatform.php at line 531
+

getVarcharTypeDeclarationSQL

+public void getVarcharTypeDeclarationSQL(array field) +
+

Gets the SQL snippet used to declare a VARCHAR column on the MySql platform.

+
Params:
+
array $field
+
Override.
+
+
+ +
+ +
/Doctrine/DBAL/Platforms/PostgreSqlPlatform.php at line 146
+

prefersSequences

+public boolean prefersSequences() +
+

Whether the platform prefers sequences for ID generation.

+ +
+ +
/Doctrine/DBAL/Platforms/PostgreSqlPlatform.php at line 136
+

supportsIdentityColumns

+public boolean supportsIdentityColumns() +
+

Whether the platform supports identity columns. +Postgres supports these through the SERIAL keyword.

+ +
+ +
/Doctrine/DBAL/Platforms/PostgreSqlPlatform.php at line 125
+

supportsSchemas

+public boolean supportsSchemas() +
+

Whether the platform supports database schemas.

+ +
+ +
/Doctrine/DBAL/Platforms/PostgreSqlPlatform.php at line 115
+

supportsSequences

+public boolean supportsSequences() +
+

Whether the platform supports sequences. +Postgres has native support for sequences.

+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/dbal/platforms/sqliteplatform.html b/lib/api/doctrine/dbal/platforms/sqliteplatform.html new file mode 100644 index 000000000..911352c31 --- /dev/null +++ b/lib/api/doctrine/dbal/platforms/sqliteplatform.html @@ -0,0 +1,563 @@ + + + + + + + + + + + +SqlitePlatform (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +
Doctrine\DBAL\Platforms\SqlitePlatform
+
/Doctrine/DBAL/Platforms/SqlitePlatform.php at line 35
+ +

Class SqlitePlatform

+ +
Class:SqlitePlatform - Superclass: AbstractPlatform
+AbstractPlatform
⌊ SqlitePlatform
+ +
+ +

public class SqlitePlatform
extends AbstractPlatform + +

+ +

The SqlitePlatform class describes the specifics and dialects of the SQLite +database platform.

+ +
+
Since:
+
2.0
+
Author:
+
Roman Borschel
+
Benjamin Eberlei
+
Todo:
+
Rename: SQLitePlatform
+
License:
+
http://www.opensource.org/licenses/lgpl-license.php LGPL
+
See Also:
+
www.doctrine-project.org
+
Version:
+
$Revision: 3938 $
+
+
+ + + +
Fields inherited from Doctrine\DBAL\Platforms\AbstractPlatform
CREATE_FOREIGNKEYS, CREATE_INDEXES, TRIM_BOTH, TRIM_LEADING, TRIM_TRAILING, TRIM_UNSPECIFIED
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Method Summary
string

getBigIntTypeDeclarationSQL(mixed field, array columnDef)

string

getBooleanTypeDeclarationSQL(mixed field, array columnDef)

void

getClobTypeDeclarationSQL(array field)

Gets the SQL snippet used to declare a CLOB column type.

void

getCreateViewSQL(mixed name, mixed sql)

string

getDateTimeTypeDeclarationSQL(array fieldDeclaration)

string

getDateTypeDeclarationSQL(array fieldDeclaration)

void

getDropViewSQL(mixed name)

string

getIntegerTypeDeclarationSQL(mixed field, array columnDef)

void

getListTableColumnsSQL(mixed table)

void

getListTableConstraintsSQL(mixed table)

void

getListTableIndexesSQL(mixed table)

void

getListTablesSQL()

string

getListViewsSQL(string database)

Get the SQL to list all views of a database or user.

integer

getLocateExpression(string str, string substr, mixed startPos, int pos)

returns the position of the first occurrence of substring $substr in string $str

void

getMediumIntTypeDeclarationSql(mixed field)

string

getName()

Get the platform name for this instance

string

getNowExpression(mixed type)

Return string to call a variable with the current timestamp inside an SQL statement +There are three special variables for current date and time.

string

getRegexpExpression()

returns the regular expression operator

void

getSetTransactionIsolationSQL(integer level)

Get sql to set the transaction isolation level

string

getSmallIntTypeDeclarationSQL(mixed field, array columnDef)

string

getSubstringExpression(string value, integer position, integer length, integer from, integer len)

return string to call a function to get a substring inside an SQL statementNote: Not SQL92, but common functionality. +

string

getTimeTypeDeclarationSQL(array fieldDeclaration)

void

getTinyIntTypeDeclarationSql(mixed field)

string

getTrimExpression(string str, int pos, string char)

Trim a string, leading/trailing/both and with a given char which defaults to space.

string

getTruncateTableSQL(string tableName, bool cascade)

void

getVarcharTypeDeclarationSQL(array field)

{@inheritdoc}

boolean

prefersIdentityColumns()

void

supportsAlterTable()

boolean

supportsForeignKeyConstraints()

SQLite does support foreign key constraints, but only in CREATE TABLE statements... +

static void

udfLocate(string str, string substr, int offset)

static void

udfMod(mixed a, mixed b)

User-defined function for Sqlite that implements MOD(a, b)

static float

udfSqrt(int|float value)

User-defined function for Sqlite that is used with PDO::sqliteCreateFunction()

+ + + +
Methods inherited from Doctrine\DBAL\Platforms\AbstractPlatform
convertBooleans, createsExplicitIndexForForeignKeys, fixSchemaElementName, getAcosExpression, getAdvancedForeignKeyOptionsSQL, getAlterTableSQL, getAvgExpression, getBetweenExpression, getBigIntTypeDeclarationSQL, getBooleanTypeDeclarationSQL, getCheckDeclarationSQL, getClobTypeDeclarationSQL, getColumnCharsetDeclarationSQL, getColumnCollationDeclarationSQL, getColumnDeclarationListSQL, getColumnDeclarationSQL, getConcatExpression, getCosExpression, getCountExpression, getCreateConstraintSQL, getCreateDatabaseSQL, getCreateForeignKeySQL, getCreateIndexSQL, getCreateSequenceSQL, getCreateTableSQL, getCreateTemporaryTableSnippetSQL, getCreateViewSQL, getCurrentDateSQL, getCurrentTimeSQL, getCurrentTimestampSQL, getCustomTypeDeclarationSQL, getDateFormatString, getDateTimeFormatString, getDateTimeTypeDeclarationSQL, getDateTypeDeclarationSQL, getDecimalTypeDeclarationSQL, getDefaultTransactionIsolationLevel, getDefaultValueDeclarationSQL, getDropConstraintSQL, getDropDatabaseSQL, getDropForeignKeySQL, getDropIndexSQL, getDropSequenceSQL, getDropTableSQL, getDropViewSQL, getEmptyIdentityInsertSQL, getForUpdateSql, getForeignKeyBaseDeclarationSQL, getForeignKeyDeclarationSQL, getForeignKeyReferentialActionSQL, getIdentifierQuoteCharacter, getIdentityColumnNullInsertSQL, getInExpression, getIndexDeclarationSQL, getIndexFieldDeclarationListSQL, getIntegerTypeDeclarationSQL, getIsNotNullExpression, getIsNullExpression, getLengthExpression, getListDatabasesSQL, getListSequencesSQL, getListTableColumnsSQL, getListTableConstraintsSQL, getListTableForeignKeysSQL, getListTableIndexesSQL, getListTablesSQL, getListUsersSQL, getListViewsSQL, getLocateExpression, getLowerExpression, getLtrimExpression, getMaxExpression, getMaxIdentifierLength, getMd5Expression, getMinExpression, getModExpression, getName, getNotExpression, getNowExpression, getPiExpression, getRegexpExpression, getRoundExpression, getRtrimExpression, getSQLResultCasing, getSequenceNextValSQL, getSetCharsetSQL, getSetTransactionIsolationSQL, getShowDatabasesSQL, getSinExpression, getSmallIntTypeDeclarationSQL, getSqlCommentEndString, getSqlCommentStartString, getSubstringExpression, getSumExpression, getTemporaryTableSQL, getTimeFormatString, getTimeTypeDeclarationSQL, getTrimExpression, getTruncateTableSQL, getUniqueConstraintDeclarationSQL, getUniqueFieldDeclarationSQL, getUpperExpression, getVarcharMaxLength, getVarcharTypeDeclarationSQL, getWildcards, modifyLimitQuery, prefersIdentityColumns, prefersSequences, quoteIdentifier, supportsAlterTable, supportsForeignKeyConstraints, supportsForeignKeyOnUpdate, supportsGettingAffectedRows, supportsIdentityColumns, supportsIndexes, supportsPrimaryConstraints, supportsSavepoints, supportsSchemas, supportsSequences, supportsTransactions
+ +

Method Detail

+
/Doctrine/DBAL/Platforms/SqlitePlatform.php at line 176
+

getBigIntTypeDeclarationSQL

+public string getBigIntTypeDeclarationSQL(mixed field, array columnDef) +
+

+
Override.
+
+
+ +
+ +
/Doctrine/DBAL/Platforms/SqlitePlatform.php at line 160
+

getBooleanTypeDeclarationSQL

+public string getBooleanTypeDeclarationSQL(mixed field, array columnDef) +
+

+
Override.
+
+
+ +
+ +
/Doctrine/DBAL/Platforms/SqlitePlatform.php at line 321
+

getClobTypeDeclarationSQL

+public void getClobTypeDeclarationSQL(array field) +
+

Gets the SQL snippet used to declare a CLOB column type.

+ +
+ +
/Doctrine/DBAL/Platforms/SqlitePlatform.php at line 353
+

getCreateViewSQL

+public void getCreateViewSQL(mixed name, mixed sql) +
+
+ +
+ +
/Doctrine/DBAL/Platforms/SqlitePlatform.php at line 208
+

getDateTimeTypeDeclarationSQL

+public string getDateTimeTypeDeclarationSQL(array fieldDeclaration) +
+

+
Override.
+
+
+ +
+ +
/Doctrine/DBAL/Platforms/SqlitePlatform.php at line 216
+

getDateTypeDeclarationSQL

+public string getDateTypeDeclarationSQL(array fieldDeclaration) +
+

+
Override.
+
+
+ +
+ +
/Doctrine/DBAL/Platforms/SqlitePlatform.php at line 358
+

getDropViewSQL

+public void getDropViewSQL(mixed name) +
+
+ +
+ +
/Doctrine/DBAL/Platforms/SqlitePlatform.php at line 168
+

getIntegerTypeDeclarationSQL

+public string getIntegerTypeDeclarationSQL(mixed field, array columnDef) +
+

+
Override.
+
+
+ +
+ +
/Doctrine/DBAL/Platforms/SqlitePlatform.php at line 331
+

getListTableColumnsSQL

+public void getListTableColumnsSQL(mixed table) +
+
+ +
+ +
/Doctrine/DBAL/Platforms/SqlitePlatform.php at line 326
+

getListTableConstraintsSQL

+public void getListTableConstraintsSQL(mixed table) +
+
+ +
+ +
/Doctrine/DBAL/Platforms/SqlitePlatform.php at line 336
+

getListTableIndexesSQL

+public void getListTableIndexesSQL(mixed table) +
+
+ +
+ +
/Doctrine/DBAL/Platforms/SqlitePlatform.php at line 341
+

getListTablesSQL

+public void getListTablesSQL() +
+
+ +
+ +
/Doctrine/DBAL/Platforms/SqlitePlatform.php at line 348
+

getListViewsSQL

+public string getListViewsSQL(string database) +
+

Get the SQL to list all views of a database or user.

+ +
+ +
/Doctrine/DBAL/Platforms/SqlitePlatform.php at line 121
+

getLocateExpression

+public integer getLocateExpression(string str, string substr, mixed startPos, int pos) +
+

returns the position of the first occurrence of substring $substr in string $str

+
Parameters:
+
substr - literal string to find
+
str - literal string
+
pos - position to start at, beginning of string by default
+
+
+ +
+ +
/Doctrine/DBAL/Platforms/SqlitePlatform.php at line 200
+

getMediumIntTypeDeclarationSql

+public void getMediumIntTypeDeclarationSql(mixed field) +
+

+
Override.
+
+
+ +
+ +
/Doctrine/DBAL/Platforms/SqlitePlatform.php at line 386
+

getName

+public string getName() +
+

Get the platform name for this instance

+ +
+ +
/Doctrine/DBAL/Platforms/SqlitePlatform.php at line 55
+

getNowExpression

+public string getNowExpression(mixed type) +
+

Return string to call a variable with the current timestamp inside an SQL statement +There are three special variables for current date and time.

+
Returns:
+
sqlite function as string
+
Override.
+
+
+ +
+ +
/Doctrine/DBAL/Platforms/SqlitePlatform.php at line 43
+

getRegexpExpression

+public string getRegexpExpression() +
+

returns the regular expression operator

+
Override.
+
+
+ +
+ +
/Doctrine/DBAL/Platforms/SqlitePlatform.php at line 144
+

getSetTransactionIsolationSQL

+public void getSetTransactionIsolationSQL(integer level) +
+

Get sql to set the transaction isolation level

+ +
+ +
/Doctrine/DBAL/Platforms/SqlitePlatform.php at line 192
+

getSmallIntTypeDeclarationSQL

+public string getSmallIntTypeDeclarationSQL(mixed field, array columnDef) +
+

+
Override.
+
+
+ +
+ +
/Doctrine/DBAL/Platforms/SqlitePlatform.php at line 105
+

getSubstringExpression

+public string getSubstringExpression(string value, integer position, integer length, integer from, integer len) +
+

return string to call a function to get a substring inside an SQL statement

Note: Not SQL92, but common functionality.

SQLite only supports the 2 parameter variant of this function

+
Parameters:
+
value - an sql string literal or column name/alias
+
position - where to start the substring portion
+
length - the substring portion length
+
Returns:
+
SQL substring function with given parameters
+
Override.
+
+
+ +
+ +
/Doctrine/DBAL/Platforms/SqlitePlatform.php at line 224
+

getTimeTypeDeclarationSQL

+public string getTimeTypeDeclarationSQL(array fieldDeclaration) +
+

+
Override.
+
+
+ +
+ +
/Doctrine/DBAL/Platforms/SqlitePlatform.php at line 184
+

getTinyIntTypeDeclarationSql

+public void getTinyIntTypeDeclarationSql(mixed field) +
+

+
Override.
+
+
+ +
+ +
/Doctrine/DBAL/Platforms/SqlitePlatform.php at line 76
+

getTrimExpression

+public string getTrimExpression(string str, int pos, string char) +
+

Trim a string, leading/trailing/both and with a given char which defaults to space.

+ +
+ +
/Doctrine/DBAL/Platforms/SqlitePlatform.php at line 394
+

getTruncateTableSQL

+public string getTruncateTableSQL(string tableName, bool cascade) +
+

+
Inheritdoc.
+
+
+ +
+ +
/Doctrine/DBAL/Platforms/SqlitePlatform.php at line 305
+

getVarcharTypeDeclarationSQL

+public void getVarcharTypeDeclarationSQL(array field) +
+

+ +
+ +
/Doctrine/DBAL/Platforms/SqlitePlatform.php at line 152
+

prefersIdentityColumns

+public boolean prefersIdentityColumns() +
+

+
Override.
+
+
+ +
+ +
/Doctrine/DBAL/Platforms/SqlitePlatform.php at line 376
+

supportsAlterTable

+public void supportsAlterTable() +
+
+ +
+ +
/Doctrine/DBAL/Platforms/SqlitePlatform.php at line 371
+

supportsForeignKeyConstraints

+public boolean supportsForeignKeyConstraints() +
+

SQLite does support foreign key constraints, but only in CREATE TABLE statements... +This really limits their usefulness and requires SQLite specific handling, so +we simply say that SQLite does NOT support foreign keys for now...

+
Returns:
+
FALSE
+
Override.
+
+
+ +
+ +
/Doctrine/DBAL/Platforms/SqlitePlatform.php at line 423
+

udfLocate

+public static void udfLocate(string str, string substr, int offset) +
+

+ +
+ +
/Doctrine/DBAL/Platforms/SqlitePlatform.php at line 413
+

udfMod

+public static void udfMod(mixed a, mixed b) +
+

User-defined function for Sqlite that implements MOD(a, b)

+ +
+ +
/Doctrine/DBAL/Platforms/SqlitePlatform.php at line 405
+

udfSqrt

+public static float udfSqrt(int|float value) +
+

User-defined function for Sqlite that is used with PDO::sqliteCreateFunction()

+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/dbal/schema/abstractasset.html b/lib/api/doctrine/dbal/schema/abstractasset.html new file mode 100644 index 000000000..819f29ae7 --- /dev/null +++ b/lib/api/doctrine/dbal/schema/abstractasset.html @@ -0,0 +1,127 @@ + + + + + + + + + + + +AbstractAsset (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +
Doctrine\DBAL\Schema\AbstractAsset
+
/Doctrine/DBAL/Schema/AbstractAsset.php at line 36
+ +

Class AbstractAsset

+ +
AbstractAsset
+ +
+ +

public abstract class AbstractAsset

+ +

The abstract asset allows to reset the name of all assets without publishing this to the public userland.

This encapsulation hack is necessary to keep a consistent state of the database schema. Say we have a list of tables +array($tableName => Table($tableName)); if you want to rename the table, you have to make sure

+ +
+
License:
+
http://www.opensource.org/licenses/lgpl-license.php LGPL
+
See Also:
+
www.doctrine-project.org
+
Since:
+
2.0
+
Version:
+
$Revision$
+
Author:
+
Benjamin Eberlei
+
+
+ + + + + + + +
Field Summary
protected string

$_name

+ + + + + + + +
Method Summary
string

getName()

Return name of this schema asset.

+ +

Field Detail

+
/Doctrine/DBAL/Schema/AbstractAsset.php at line 41
+

_name

+protected string $_name +
+

+ +
+ +

Method Detail

+
/Doctrine/DBAL/Schema/AbstractAsset.php at line 58
+

getName

+public string getName() +
+

Return name of this schema asset.

+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/dbal/schema/abstractschemamanager.html b/lib/api/doctrine/dbal/schema/abstractschemamanager.html new file mode 100644 index 000000000..d344c84aa --- /dev/null +++ b/lib/api/doctrine/dbal/schema/abstractschemamanager.html @@ -0,0 +1,689 @@ + + + + + + + + + + + +AbstractSchemaManager (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +
Doctrine\DBAL\Schema\AbstractSchemaManager
+
/Doctrine/DBAL/Schema/AbstractSchemaManager.php at line 41
+ +

Class AbstractSchemaManager

+ +
AbstractSchemaManager
+ +
+ +

public abstract class AbstractSchemaManager

+ +

Base class for schema managers. Schema managers are used to inspect and/or +modify the database schema/structure.

+ +
+
License:
+
http://www.opensource.org/licenses/lgpl-license.php LGPL
+
Author:
+
Konsta Vesterinen
+
Lukas Smith (PEAR MDB2 library)
+
Roman Borschel
+
Jonathan H. Wage
+
Benjamin Eberlei
+
Version:
+
$Revision$
+
Since:
+
2.0
+
+
+ + + + + + + + + + + +
Field Summary
protected \Doctrine\DBAL\Connection

$_conn

Holds instance of the Doctrine connection for this schema manager

protected \Doctrine\DBAL\Platforms\AbstractPlatform

$_platform

Holds instance of the database platform used for this schema manager

+ + + + + + +
Constructor Summary

AbstractSchemaManager(\Doctrine\DBAL\Connection conn)

Constructor.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Method Summary
void

alterTable(TableDiff tableDiff)

Alter an existing tables schema

void

createConstraint(Constraint constraint, string|Table table)

Create a constraint on a table

void

createDatabase(string database)

Creates a new database.

void

createForeignKey(ForeignKeyConstraint foreignKey, string|Table table)

Create a new foreign key

void

createIndex(Index index, string table)

Create a new index on a table

Schema

createSchema()

Create a schema instance for the current database.

SchemaConfig

createSchemaConfig()

Create the configuration for this schema.

void

createSequence(Sequence sequence)

Create a new sequence

void

createTable(Table table, int createFlags)

Create a new table.

void

createView(View view)

Create a new view

void

dropAndCreateConstraint(Constraint constraint, string table)

Drop and create a constraint

void

dropAndCreateDatabase(string database)

Drop and creates a new database.

void

dropAndCreateForeignKey(ForeignKeyConstraint foreignKey, string|Table table)

Drop and create a new foreign key

void

dropAndCreateIndex(Index index, string|Table table)

Drop and create a new index on a table

void

dropAndCreateSequence(Sequence sequence)

Drop and create a new sequence

void

dropAndCreateTable(Table table)

Drop and create a new table.

void

dropAndCreateView(View view)

Drop and create a new view

void

dropConstraint(Constraint constraint, string table)

Drop the constraint from the given table

void

dropDatabase(string database)

Drops a database. +

boolean

dropForeignKey(mixed foreignKey, ForeignKeyConstraint|string table, Table|string name)

Drops a foreign key from a table.

void

dropIndex(Index|string index, string|Table table)

Drop the index from the given table

void

dropSequence(string name)

Drops a sequence with a given name.

void

dropTable(string table)

Drop the given table

boolean

dropView(string name)

Drop a view

\Doctrine\DBAL\Platform\AbstractPlatform

getDatabasePlatform()

Return associated platform.

array

listDatabases()

List the available databases for this connection

Sequence[]

listSequences(mixed database)

List the available sequences for this connection

Column[]

listTableColumns(string table)

List the columns for a given table. +

Table

listTableDetails(string tableName)

ForeignKeyConstraint[]

listTableForeignKeys(string table, mixed database)

List the foreign keys for the given table

Index[]

listTableIndexes(string table)

List the indexes for a given table returning an array of Index instances. +

array

listTableNames()

Return a list of all tables in the current database

Table[]

listTables()

List the tables for this connection

View[]

listViews()

List the views this connection has

void

renameTable(string name, string newName)

Rename a given table to another name

mixed

tryMethod()

Try any method on the schema manager.

+ +

Field Detail

+
/Doctrine/DBAL/Schema/AbstractSchemaManager.php at line 48
+

_conn

+protected \Doctrine\DBAL\Connection $_conn +
+

Holds instance of the Doctrine connection for this schema manager

+ +
+ +
/Doctrine/DBAL/Schema/AbstractSchemaManager.php at line 55
+

_platform

+protected \Doctrine\DBAL\Platforms\AbstractPlatform $_platform +
+

Holds instance of the database platform used for this schema manager

+ +
+ +

Constructor Detail

+
/Doctrine/DBAL/Schema/AbstractSchemaManager.php at line 62
+

AbstractSchemaManager

+public AbstractSchemaManager(\Doctrine\DBAL\Connection conn) +
+

Constructor. Accepts the Connection instance to manage the schema for

+ +
+ +

Method Detail

+
/Doctrine/DBAL/Schema/AbstractSchemaManager.php at line 512
+

alterTable

+public void alterTable(TableDiff tableDiff) +
+

Alter an existing tables schema

+ +
+ +
/Doctrine/DBAL/Schema/AbstractSchemaManager.php at line 383
+

createConstraint

+public void createConstraint(Constraint constraint, string|Table table) +
+

Create a constraint on a table

+ +
+ +
/Doctrine/DBAL/Schema/AbstractSchemaManager.php at line 349
+

createDatabase

+public void createDatabase(string database) +
+

Creates a new database.

+
Parameters:
+
database - The name of the database to create.
+
+
+ +
+ +
/Doctrine/DBAL/Schema/AbstractSchemaManager.php at line 405
+

createForeignKey

+public void createForeignKey(ForeignKeyConstraint foreignKey, string|Table table) +
+

Create a new foreign key

+
Parameters:
+
foreignKey - ForeignKey instance
+
table - name of the table on which the foreign key is to be created
+
+
+ +
+ +
/Doctrine/DBAL/Schema/AbstractSchemaManager.php at line 394
+

createIndex

+public void createIndex(Index index, string table) +
+

Create a new index on a table

+
Parameters:
+
+
table - name of the table on which the index is to be created
+
+
+ +
+ +
/Doctrine/DBAL/Schema/AbstractSchemaManager.php at line 750
+

createSchema

+public Schema createSchema() +
+

Create a schema instance for the current database.

+ +
+ +
/Doctrine/DBAL/Schema/AbstractSchemaManager.php at line 766
+

createSchemaConfig

+public SchemaConfig createSchemaConfig() +
+

Create the configuration for this schema.

+ +
+ +
/Doctrine/DBAL/Schema/AbstractSchemaManager.php at line 372
+

createSequence

+public void createSequence(Sequence sequence) +
+

Create a new sequence

+
Throws:
+
if something fails at database level
+
+
+ +
+ +
/Doctrine/DBAL/Schema/AbstractSchemaManager.php at line 360
+

createTable

+public void createTable(Table table, int createFlags) +
+

Create a new table.

+ +
+ +
/Doctrine/DBAL/Schema/AbstractSchemaManager.php at line 415
+

createView

+public void createView(View view) +
+

Create a new view

+ +
+ +
/Doctrine/DBAL/Schema/AbstractSchemaManager.php at line 430
+

dropAndCreateConstraint

+public void dropAndCreateConstraint(Constraint constraint, string table) +
+

Drop and create a constraint

+
See Also:
+
dropConstraint()
+
createConstraint()
+
+
+ +
+ +
/Doctrine/DBAL/Schema/AbstractSchemaManager.php at line 488
+

dropAndCreateDatabase

+public void dropAndCreateDatabase(string database) +
+

Drop and creates a new database.

+
Parameters:
+
database - The name of the database to create.
+
+
+ +
+ +
/Doctrine/DBAL/Schema/AbstractSchemaManager.php at line 454
+

dropAndCreateForeignKey

+public void dropAndCreateForeignKey(ForeignKeyConstraint foreignKey, string|Table table) +
+

Drop and create a new foreign key

+
Parameters:
+
foreignKey - associative array that defines properties of the foreign key to be created.
+
table - name of the table on which the foreign key is to be created
+
+
+ +
+ +
/Doctrine/DBAL/Schema/AbstractSchemaManager.php at line 442
+

dropAndCreateIndex

+public void dropAndCreateIndex(Index index, string|Table table) +
+

Drop and create a new index on a table

+
Parameters:
+
table - name of the table on which the index is to be created
+
+
+
+ +
+ +
/Doctrine/DBAL/Schema/AbstractSchemaManager.php at line 466
+

dropAndCreateSequence

+public void dropAndCreateSequence(Sequence sequence) +
+

Drop and create a new sequence

+
Throws:
+
if something fails at database level
+
+
+ +
+ +
/Doctrine/DBAL/Schema/AbstractSchemaManager.php at line 477
+

dropAndCreateTable

+public void dropAndCreateTable(Table table) +
+

Drop and create a new table.

+ +
+ +
/Doctrine/DBAL/Schema/AbstractSchemaManager.php at line 499
+

dropAndCreateView

+public void dropAndCreateView(View view) +
+

Drop and create a new view

+ +
+ +
/Doctrine/DBAL/Schema/AbstractSchemaManager.php at line 304
+

dropConstraint

+public void dropConstraint(Constraint constraint, string table) +
+

Drop the constraint from the given table

+
Parameters:
+
+
table - The name of the table
+
+
+ +
+ +
/Doctrine/DBAL/Schema/AbstractSchemaManager.php at line 268
+

dropDatabase

+public void dropDatabase(string database) +
+

Drops a database.

NOTE: You can not drop the database this SchemaManager is currently connected to.

+
Parameters:
+
database - The name of the database to drop
+
+
+ +
+ +
/Doctrine/DBAL/Schema/AbstractSchemaManager.php at line 316
+

dropForeignKey

+public boolean dropForeignKey(mixed foreignKey, ForeignKeyConstraint|string table, Table|string name) +
+

Drops a foreign key from a table.

+
Parameters:
+
table - The name of the table with the foreign key.
+
name - The name of the foreign key.
+
Returns:
+
$result
+
+
+ +
+ +
/Doctrine/DBAL/Schema/AbstractSchemaManager.php at line 289
+

dropIndex

+public void dropIndex(Index|string index, string|Table table) +
+

Drop the index from the given table

+
Parameters:
+
index - The name of the index
+
table - The name of the table
+
+
+ +
+ +
/Doctrine/DBAL/Schema/AbstractSchemaManager.php at line 326
+

dropSequence

+public void dropSequence(string name) +
+

Drops a sequence with a given name.

+
Parameters:
+
name - The name of the sequence to drop.
+
+
+ +
+ +
/Doctrine/DBAL/Schema/AbstractSchemaManager.php at line 278
+

dropTable

+public void dropTable(string table) +
+

Drop the given table

+
Parameters:
+
table - The name of the table to drop
+
+
+ +
+ +
/Doctrine/DBAL/Schema/AbstractSchemaManager.php at line 337
+

dropView

+public boolean dropView(string name) +
+

Drop a view

+
Parameters:
+
name - The name of the view
+
Returns:
+
$result
+
+
+ +
+ +
/Doctrine/DBAL/Schema/AbstractSchemaManager.php at line 73
+

getDatabasePlatform

+public \Doctrine\DBAL\Platform\AbstractPlatform getDatabasePlatform() +
+

Return associated platform.

+ +
+ +
/Doctrine/DBAL/Schema/AbstractSchemaManager.php at line 109
+

listDatabases

+public array listDatabases() +
+

List the available databases for this connection

+
Returns:
+
$databases
+
+
+ +
+ +
/Doctrine/DBAL/Schema/AbstractSchemaManager.php at line 123
+

listSequences

+public Sequence[] listSequences(mixed database) +
+

List the available sequences for this connection

+ +
+ +
/Doctrine/DBAL/Schema/AbstractSchemaManager.php at line 148
+

listTableColumns

+public Column[] listTableColumns(string table) +
+

List the columns for a given table.

In contrast to other libraries and to the old version of Doctrine, +this column definition does try to contain the 'primary' field for +the reason that it is not portable accross different RDBMS. Use +listTableIndexes($tableName) to retrieve the primary key +of a table. We're a RDBMS specifies more details these are held +in the platformDetails array.

+
Parameters:
+
table - The name of the table.
+
+
+ +
+ +
/Doctrine/DBAL/Schema/AbstractSchemaManager.php at line 209
+

listTableDetails

+public Table listTableDetails(string tableName) +
+

+ +
+ +
/Doctrine/DBAL/Schema/AbstractSchemaManager.php at line 248
+

listTableForeignKeys

+public ForeignKeyConstraint[] listTableForeignKeys(string table, mixed database) +
+

List the foreign keys for the given table

+
Parameters:
+
table - The name of the table
+
+
+ +
+ +
/Doctrine/DBAL/Schema/AbstractSchemaManager.php at line 165
+

listTableIndexes

+public Index[] listTableIndexes(string table) +
+

List the indexes for a given table returning an array of Index instances.

Keys of the portable indexes list are all lower-cased.

+
Parameters:
+
table - The name of the table
+
Returns:
+
$tableIndexes
+
+
+ +
+ +
/Doctrine/DBAL/Schema/AbstractSchemaManager.php at line 179
+

listTableNames

+public array listTableNames() +
+

Return a list of all tables in the current database

+ +
+ +
/Doctrine/DBAL/Schema/AbstractSchemaManager.php at line 193
+

listTables

+public Table[] listTables() +
+

List the tables for this connection

+ +
+ +
/Doctrine/DBAL/Schema/AbstractSchemaManager.php at line 233
+

listViews

+public View[] listViews() +
+

List the views this connection has

+ +
+ +
/Doctrine/DBAL/Schema/AbstractSchemaManager.php at line 528
+

renameTable

+public void renameTable(string name, string newName) +
+

Rename a given table to another name

+
Parameters:
+
name - The current name of the table
+
newName - The new name of the table
+
+
+ +
+ +
/Doctrine/DBAL/Schema/AbstractSchemaManager.php at line 90
+

tryMethod

+public mixed tryMethod() +
+

Try any method on the schema manager. Normally a method throws an +exception when your DBMS doesn't support it or if an error occurs. +This method allows you to try and method on your SchemaManager +instance and will return false if it does not work or is not supported.

+$result = $sm->tryMethod('dropView', 'view_name'); +

+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/dbal/schema/column.html b/lib/api/doctrine/dbal/schema/column.html new file mode 100644 index 000000000..8e4ea5e97 --- /dev/null +++ b/lib/api/doctrine/dbal/schema/column.html @@ -0,0 +1,561 @@ + + + + + + + + + + + +Column (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +
Doctrine\DBAL\Schema\Column
+
/Doctrine/DBAL/Schema/Column.php at line 36
+ +

Class Column

+ +
Class:Column - Superclass: AbstractAsset
+AbstractAsset
⌊ Column
+ +
+ +

public class Column
extends AbstractAsset + +

+ +

Object representation of a database column

+ +
+
License:
+
http://www.opensource.org/licenses/lgpl-license.php LGPL
+
See Also:
+
www.doctrine-project.org
+
Since:
+
2.0
+
Version:
+
$Revision$
+
Author:
+
Benjamin Eberlei
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Field Summary
protected string

$_columnDefinition

protected string

$_default

protected bool

$_fixed

protected int

$_length

protected bool

$_notnull

protected array

$_platformOptions

protected int

$_precision

protected int

$_scale

protected \Doctrine\DBAL\Types\Type

$_type

protected bool

$_unsigned

+ + + +
Fields inherited from Doctrine\DBAL\Schema\AbstractAsset
_name
+ + + + + + +
Constructor Summary

Column(string columnName, Doctrine\DBAL\Types\Type type, mixed options, int length, bool notNull, mixed default, bool unsigned, bool fixed, int precision, int scale, array platformOptions)

Create a new Column

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Method Summary
void

getColumnDefinition()

void

getDefault()

void

getFixed()

void

getLength()

void

getNotnull()

void

getPlatformOption(mixed name)

void

getPlatformOptions()

void

getPrecision()

void

getScale()

void

getType()

void

getUnsigned()

void

hasPlatformOption(mixed name)

Column

setColumnDefinition(mixed value, string )

Column

setDefault(mixed default)

Column

setFixed(bool fixed)

Column

setLength(int length)

Column

setNotnull(bool notnull)

Column

setOptions(array options)

Column

setPlatformOption(string name, mixed value)

Column

setPlatformOptions(array platformOptions)

Column

setPrecision(int precision)

Column

setScale(int scale)

Column

setType(Type type)

Column

setUnsigned(bool unsigned)

array

toArray()

void

visit(Visitor visitor)

+ + + +
Methods inherited from Doctrine\DBAL\Schema\AbstractAsset
getName
+ +

Field Detail

+
/Doctrine/DBAL/Schema/Column.php at line 86
+

_columnDefinition

+protected string $_columnDefinition = null +
+

+ +
+ +
/Doctrine/DBAL/Schema/Column.php at line 76
+

_default

+protected string $_default = null +
+

+ +
+ +
/Doctrine/DBAL/Schema/Column.php at line 66
+

_fixed

+protected bool $_fixed = false +
+

+ +
+ +
/Doctrine/DBAL/Schema/Column.php at line 46
+

_length

+protected int $_length = 255 +
+

+ +
+ +
/Doctrine/DBAL/Schema/Column.php at line 71
+

_notnull

+protected bool $_notnull = true +
+

+ +
+ +
/Doctrine/DBAL/Schema/Column.php at line 81
+

_platformOptions

+protected array $_platformOptions = array() +
+

+ +
+ +
/Doctrine/DBAL/Schema/Column.php at line 51
+

_precision

+protected int $_precision +
+

+ +
+ +
/Doctrine/DBAL/Schema/Column.php at line 56
+

_scale

+protected int $_scale +
+

+ +
+ +
/Doctrine/DBAL/Schema/Column.php at line 41
+

_type

+protected \Doctrine\DBAL\Types\Type $_type +
+

+ +
+ +
/Doctrine/DBAL/Schema/Column.php at line 61
+

_unsigned

+protected bool $_unsigned = false +
+

+ +
+ +

Constructor Detail

+
/Doctrine/DBAL/Schema/Column.php at line 102
+

Column

+public Column(string columnName, Doctrine\DBAL\Types\Type type, mixed options, int length, bool notNull, mixed default, bool unsigned, bool fixed, int precision, int scale, array platformOptions) +
+

Create a new Column

+ +
+ +

Method Detail

+
/Doctrine/DBAL/Schema/Column.php at line 300
+

getColumnDefinition

+public void getColumnDefinition() +
+
+ +
+ +
/Doctrine/DBAL/Schema/Column.php at line 280
+

getDefault

+public void getDefault() +
+
+ +
+ +
/Doctrine/DBAL/Schema/Column.php at line 270
+

getFixed

+public void getFixed() +
+
+ +
+ +
/Doctrine/DBAL/Schema/Column.php at line 250
+

getLength

+public void getLength() +
+
+ +
+ +
/Doctrine/DBAL/Schema/Column.php at line 275
+

getNotnull

+public void getNotnull() +
+
+ +
+ +
/Doctrine/DBAL/Schema/Column.php at line 295
+

getPlatformOption

+public void getPlatformOption(mixed name) +
+
+ +
+ +
/Doctrine/DBAL/Schema/Column.php at line 285
+

getPlatformOptions

+public void getPlatformOptions() +
+
+ +
+ +
/Doctrine/DBAL/Schema/Column.php at line 255
+

getPrecision

+public void getPrecision() +
+
+ +
+ +
/Doctrine/DBAL/Schema/Column.php at line 260
+

getScale

+public void getScale() +
+
+ +
+ +
/Doctrine/DBAL/Schema/Column.php at line 245
+

getType

+public void getType() +
+
+ +
+ +
/Doctrine/DBAL/Schema/Column.php at line 265
+

getUnsigned

+public void getUnsigned() +
+
+ +
+ +
/Doctrine/DBAL/Schema/Column.php at line 290
+

hasPlatformOption

+public void hasPlatformOption(mixed name) +
+
+ +
+ +
/Doctrine/DBAL/Schema/Column.php at line 239
+

setColumnDefinition

+public Column setColumnDefinition(mixed value, string ) +
+

+ +
+ +
/Doctrine/DBAL/Schema/Column.php at line 205
+

setDefault

+public Column setDefault(mixed default) +
+

+ +
+ +
/Doctrine/DBAL/Schema/Column.php at line 184
+

setFixed

+public Column setFixed(bool fixed) +
+

+ +
+ +
/Doctrine/DBAL/Schema/Column.php at line 138
+

setLength

+public Column setLength(int length) +
+

+ +
+ +
/Doctrine/DBAL/Schema/Column.php at line 194
+

setNotnull

+public Column setNotnull(bool notnull) +
+

+ +
+ +
/Doctrine/DBAL/Schema/Column.php at line 113
+

setOptions

+public Column setOptions(array options) +
+

+ +
+ +
/Doctrine/DBAL/Schema/Column.php at line 228
+

setPlatformOption

+public Column setPlatformOption(string name, mixed value) +
+

+ +
+ +
/Doctrine/DBAL/Schema/Column.php at line 216
+

setPlatformOptions

+public Column setPlatformOptions(array platformOptions) +
+

+ +
+ +
/Doctrine/DBAL/Schema/Column.php at line 152
+

setPrecision

+public Column setPrecision(int precision) +
+

+ +
+ +
/Doctrine/DBAL/Schema/Column.php at line 162
+

setScale

+public Column setScale(int scale) +
+

+ +
+ +
/Doctrine/DBAL/Schema/Column.php at line 128
+

setType

+public Column setType(Type type) +
+

+ +
+ +
/Doctrine/DBAL/Schema/Column.php at line 173
+

setUnsigned

+public Column setUnsigned(bool unsigned) +
+

+ +
+ +
/Doctrine/DBAL/Schema/Column.php at line 316
+

toArray

+public array toArray() +
+

+ +
+ +
/Doctrine/DBAL/Schema/Column.php at line 308
+

visit

+public void visit(Visitor visitor) +
+

+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/dbal/schema/columndiff.html b/lib/api/doctrine/dbal/schema/columndiff.html new file mode 100644 index 000000000..0dfa510bc --- /dev/null +++ b/lib/api/doctrine/dbal/schema/columndiff.html @@ -0,0 +1,166 @@ + + + + + + + + + + + +ColumnDiff (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +
Doctrine\DBAL\Schema\ColumnDiff
+
/Doctrine/DBAL/Schema/ColumnDiff.php at line 33
+ +

Class ColumnDiff

+ +
ColumnDiff
+ +
+ +

public class ColumnDiff

+ +

Represent the change of a column

+ +
+
License:
+
http://www.opensource.org/licenses/lgpl-license.php LGPL
+
See Also:
+
www.doctrine-project.org
+
Since:
+
2.0
+
Version:
+
$Revision$
+
Author:
+
Benjamin Eberlei
+
+
+ + + + + + + + + + + + + + + +
Field Summary
array

$changedProperties

Column

$column

mixed

$oldColumnName

+ + + + + + +
Constructor Summary

ColumnDiff(mixed oldColumnName, mixed column, mixed changedProperties)

+ + + + + + + +
Method Summary
void

hasChanged(mixed propertyName)

+ +

Field Detail

+
/Doctrine/DBAL/Schema/ColumnDiff.php at line 45
+

changedProperties

+public array $changedProperties = array() +
+

+ +
+ +
/Doctrine/DBAL/Schema/ColumnDiff.php at line 40
+

column

+public Column $column +
+

+ +
+ +
/Doctrine/DBAL/Schema/ColumnDiff.php at line 35
+

oldColumnName

+public mixed $oldColumnName +
+
+ +
+ +

Constructor Detail

+
/Doctrine/DBAL/Schema/ColumnDiff.php at line 47
+

ColumnDiff

+public ColumnDiff(mixed oldColumnName, mixed column, mixed changedProperties) +
+
+ +
+ +

Method Detail

+
/Doctrine/DBAL/Schema/ColumnDiff.php at line 54
+

hasChanged

+public void hasChanged(mixed propertyName) +
+
+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/dbal/schema/comparator.html b/lib/api/doctrine/dbal/schema/comparator.html new file mode 100644 index 000000000..1bc6ef204 --- /dev/null +++ b/lib/api/doctrine/dbal/schema/comparator.html @@ -0,0 +1,204 @@ + + + + + + + + + + + +Comparator (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +
Doctrine\DBAL\Schema\Comparator
+
/Doctrine/DBAL/Schema/Comparator.php at line 35
+ +

Class Comparator

+ +
Comparator
+ +
+ +

public class Comparator

+ +

Compare to Schemas and return an instance of SchemaDiff

+ +
+
Copyright:
+
Copyright (C) 2005-2009 eZ Systems AS. All rights reserved.
+
License:
+
http://ez.no/licenses/new_bsd New BSD License
+
http://www.opensource.org/licenses/lgpl-license.php LGPL
+
See Also:
+
www.doctrine-project.org
+
Since:
+
2.0
+
Version:
+
$Revision$
+
Author:
+
Benjamin Eberlei
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Method Summary
void

addColumnPlatformOptionCheck(string optionName)

SchemaDiff

compare(Schema fromSchema, Schema toSchema)

Returns a SchemaDiff object containing the differences between the schemas $fromSchema and $toSchema. +

static SchemaDiff

compareSchemas(Schema fromSchema, Schema toSchema)

array

diffColumn(Column column1, Column column2)

Returns the difference between the fields $field1 and $field2. +

bool

diffForeignKey(ForeignKeyConstraint key1, ForeignKeyConstraint key2)

bool

diffIndex(Index index1, Index index2)

Finds the difference between the indexes $index1 and $index2. +

void

diffSequence(Sequence sequence1, Sequence sequence2)

bool|TableDiff

diffTable(Table table1, Table table2)

Returns the difference between the tables $table1 and $table2. +

+ +

Method Detail

+
/Doctrine/DBAL/Schema/Comparator.php at line 45
+

addColumnPlatformOptionCheck

+public void addColumnPlatformOptionCheck(string optionName) +
+

+ +
+ +
/Doctrine/DBAL/Schema/Comparator.php at line 73
+

compare

+public SchemaDiff compare(Schema fromSchema, Schema toSchema) +
+

Returns a SchemaDiff object containing the differences between the schemas $fromSchema and $toSchema.

The returned diferences are returned in such a way that they contain the +operations to change the schema stored in $fromSchema to the schema that is +stored in $toSchema.

+ +
+ +
/Doctrine/DBAL/Schema/Comparator.php at line 55
+

compareSchemas

+public static SchemaDiff compareSchemas(Schema fromSchema, Schema toSchema) +
+

+ +
+ +
/Doctrine/DBAL/Schema/Comparator.php at line 305
+

diffColumn

+public array diffColumn(Column column1, Column column2) +
+

Returns the difference between the fields $field1 and $field2.

If there are differences this method returns $field2, otherwise the +boolean false.

+ +
+ +
/Doctrine/DBAL/Schema/Comparator.php at line 273
+

diffForeignKey

+public bool diffForeignKey(ForeignKeyConstraint key1, ForeignKeyConstraint key2) +
+

+ +
+ +
/Doctrine/DBAL/Schema/Comparator.php at line 366
+

diffIndex

+public bool diffIndex(Index index1, Index index2) +
+

Finds the difference between the indexes $index1 and $index2.

Compares $index1 with $index2 and returns $index2 if there are any +differences or false in case there are no differences.

+ +
+ +
/Doctrine/DBAL/Schema/Comparator.php at line 140
+

diffSequence

+public void diffSequence(Sequence sequence1, Sequence sequence2) +
+

+ +
+ +
/Doctrine/DBAL/Schema/Comparator.php at line 163
+

diffTable

+public bool|TableDiff diffTable(Table table1, Table table2) +
+

Returns the difference between the tables $table1 and $table2.

If there are no differences this method returns the boolean false.

+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/dbal/schema/constraint.html b/lib/api/doctrine/dbal/schema/constraint.html new file mode 100644 index 000000000..1ea5080de --- /dev/null +++ b/lib/api/doctrine/dbal/schema/constraint.html @@ -0,0 +1,121 @@ + + + + + + + + + + + +Constraint (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +
Doctrine\DBAL\Schema\Constraint
+
/Doctrine/DBAL/Schema/Constraint.php at line 33
+ +

Interface Constraint

+ +
Constraint
+ +
+ +

public interface Constraint

+ +

Marker interface for contraints

+ +
+
License:
+
http://www.opensource.org/licenses/lgpl-license.php LGPL
+
See Also:
+
www.doctrine-project.org
+
Since:
+
2.0
+
Version:
+
$Revision$
+
Author:
+
Benjamin Eberlei
+
+
+ + + + + + + + + + + +
Method Summary
void

getColumns()

void

getName()

+ +

Method Detail

+
/Doctrine/DBAL/Schema/Constraint.php at line 37
+

getColumns

+public void getColumns() +
+
+ +
+ +
/Doctrine/DBAL/Schema/Constraint.php at line 35
+

getName

+public void getName() +
+
+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/dbal/schema/foreignkeyconstraint.html b/lib/api/doctrine/dbal/schema/foreignkeyconstraint.html new file mode 100644 index 000000000..58ebb6d7d --- /dev/null +++ b/lib/api/doctrine/dbal/schema/foreignkeyconstraint.html @@ -0,0 +1,327 @@ + + + + + + + + + + + +ForeignKeyConstraint (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +
Doctrine\DBAL\Schema\ForeignKeyConstraint
+
/Doctrine/DBAL/Schema/ForeignKeyConstraint.php at line 26
+ +

Class ForeignKeyConstraint

+ +
Class:ForeignKeyConstraint - Superclass: AbstractAsset
+AbstractAsset
⌊ ForeignKeyConstraint
+ +
+
All Implemented Interfaces:
+
Constraint +
+ +
+ +

public class ForeignKeyConstraint
extends AbstractAsset + +

+ +

The abstract asset allows to reset the name of all assets without publishing this to the public userland.

This encapsulation hack is necessary to keep a consistent state of the database schema. Say we have a list of tables +array($tableName => Table($tableName)); if you want to rename the table, you have to make sure

+ +
+
License:
+
http://www.opensource.org/licenses/lgpl-license.php LGPL
+
See Also:
+
www.doctrine-project.org
+
Since:
+
2.0
+
Version:
+
$Revision$
+
Author:
+
Benjamin Eberlei
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
Field Summary
protected string

$_cascade

protected array

$_foreignColumnNames

protected string

$_foreignTableName

protected array

$_localColumnNames

protected Table

$_localTable

protected array

$_options

+ + + +
Fields inherited from Doctrine\DBAL\Schema\AbstractAsset
_name
+ + + + + + +
Constructor Summary

ForeignKeyConstraint(array localColumnNames, string foreignTableName, array foreignColumnNames, string|null name, mixed options, string cascade)

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Method Summary
void

getColumns()

array

getForeignColumns()

string

getForeignTableName()

array

getLocalColumns()

string

getLocalTableName()

void

getOption(mixed name)

void

hasOption(mixed name)

string|null

onDelete()

Foreign Key onDelete status

string|null

onUpdate()

Foreign Key onUpdate status

void

setLocalTable(Table table)

+ + + +
Methods inherited from Doctrine\DBAL\Schema\AbstractAsset
getName
+ +

Field Detail

+
/Doctrine/DBAL/Schema/ForeignKeyConstraint.php at line 51
+

_cascade

+protected string $_cascade = '' +
+

+ +
+ +
/Doctrine/DBAL/Schema/ForeignKeyConstraint.php at line 46
+

_foreignColumnNames

+protected array $_foreignColumnNames +
+

+ +
+ +
/Doctrine/DBAL/Schema/ForeignKeyConstraint.php at line 41
+

_foreignTableName

+protected string $_foreignTableName +
+

+ +
+ +
/Doctrine/DBAL/Schema/ForeignKeyConstraint.php at line 36
+

_localColumnNames

+protected array $_localColumnNames +
+

+ +
+ +
/Doctrine/DBAL/Schema/ForeignKeyConstraint.php at line 31
+

_localTable

+protected Table $_localTable +
+

+ +
+ +
/Doctrine/DBAL/Schema/ForeignKeyConstraint.php at line 56
+

_options

+protected array $_options +
+

+ +
+ +

Constructor Detail

+
/Doctrine/DBAL/Schema/ForeignKeyConstraint.php at line 66
+

ForeignKeyConstraint

+public ForeignKeyConstraint(array localColumnNames, string foreignTableName, array foreignColumnNames, string|null name, mixed options, string cascade) +
+

+ +
+ +

Method Detail

+
/Doctrine/DBAL/Schema/ForeignKeyConstraint.php at line 99
+

getColumns

+public void getColumns() +
+
+ +
+ +
/Doctrine/DBAL/Schema/ForeignKeyConstraint.php at line 115
+

getForeignColumns

+public array getForeignColumns() +
+

+ +
+ +
/Doctrine/DBAL/Schema/ForeignKeyConstraint.php at line 107
+

getForeignTableName

+public string getForeignTableName() +
+

+ +
+ +
/Doctrine/DBAL/Schema/ForeignKeyConstraint.php at line 94
+

getLocalColumns

+public array getLocalColumns() +
+

+ +
+ +
/Doctrine/DBAL/Schema/ForeignKeyConstraint.php at line 78
+

getLocalTableName

+public string getLocalTableName() +
+

+ +
+ +
/Doctrine/DBAL/Schema/ForeignKeyConstraint.php at line 125
+

getOption

+public void getOption(mixed name) +
+
+ +
+ +
/Doctrine/DBAL/Schema/ForeignKeyConstraint.php at line 120
+

hasOption

+public void hasOption(mixed name) +
+
+ +
+ +
/Doctrine/DBAL/Schema/ForeignKeyConstraint.php at line 145
+

onDelete

+public string|null onDelete() +
+

Foreign Key onDelete status

+ +
+ +
/Doctrine/DBAL/Schema/ForeignKeyConstraint.php at line 135
+

onUpdate

+public string|null onUpdate() +
+

Foreign Key onUpdate status

+ +
+ +
/Doctrine/DBAL/Schema/ForeignKeyConstraint.php at line 86
+

setLocalTable

+public void setLocalTable(Table table) +
+

+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/dbal/schema/index.html b/lib/api/doctrine/dbal/schema/index.html new file mode 100644 index 000000000..57c836381 --- /dev/null +++ b/lib/api/doctrine/dbal/schema/index.html @@ -0,0 +1,219 @@ + + + + + + + + + + + +Index (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +
Doctrine\DBAL\Schema\Index
+
/Doctrine/DBAL/Schema/Index.php at line 26
+ +

Class Index

+ +
Class:Index - Superclass: AbstractAsset
+AbstractAsset
⌊ Index
+ +
+
All Implemented Interfaces:
+
Constraint +
+ +
+ +

public class Index
extends AbstractAsset + +

+ +

The abstract asset allows to reset the name of all assets without publishing this to the public userland.

This encapsulation hack is necessary to keep a consistent state of the database schema. Say we have a list of tables +array($tableName => Table($tableName)); if you want to rename the table, you have to make sure

+ +
+
License:
+
http://www.opensource.org/licenses/lgpl-license.php LGPL
+
See Also:
+
www.doctrine-project.org
+
Since:
+
2.0
+
Version:
+
$Revision$
+
Author:
+
Benjamin Eberlei
+
+
+ + + + + + + + + + + + + + + +
Field Summary
protected array

$_columns

protected bool

$_isPrimary

protected bool

$_isUnique

+ + + +
Fields inherited from Doctrine\DBAL\Schema\AbstractAsset
_name
+ + + + + + +
Constructor Summary

Index(string indexName, mixed columns, bool isUnique, bool isPrimary, array column)

+ + + + + + + + + + + + + + + + + + + +
Method Summary
array

getColumns()

bool

hasColumnAtPosition(string columnName, int pos)

bool

isPrimary()

bool

isUnique()

+ + + +
Methods inherited from Doctrine\DBAL\Schema\AbstractAsset
getName
+ +

Field Detail

+
/Doctrine/DBAL/Schema/Index.php at line 31
+

_columns

+protected array $_columns +
+

+ +
+ +
/Doctrine/DBAL/Schema/Index.php at line 41
+

_isPrimary

+protected bool $_isPrimary = false +
+

+ +
+ +
/Doctrine/DBAL/Schema/Index.php at line 36
+

_isUnique

+protected bool $_isUnique = false +
+

+ +
+ +

Constructor Detail

+
/Doctrine/DBAL/Schema/Index.php at line 49
+

Index

+public Index(string indexName, mixed columns, bool isUnique, bool isPrimary, array column) +
+

+ +
+ +

Method Detail

+
/Doctrine/DBAL/Schema/Index.php at line 77
+

getColumns

+public array getColumns() +
+

+ +
+ +
/Doctrine/DBAL/Schema/Index.php at line 103
+

hasColumnAtPosition

+public bool hasColumnAtPosition(string columnName, int pos) +
+

+ +
+ +
/Doctrine/DBAL/Schema/Index.php at line 93
+

isPrimary

+public bool isPrimary() +
+

+ +
+ +
/Doctrine/DBAL/Schema/Index.php at line 85
+

isUnique

+public bool isUnique() +
+

+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/dbal/schema/mssqlschemamanager.html b/lib/api/doctrine/dbal/schema/mssqlschemamanager.html new file mode 100644 index 000000000..afc9ebdaa --- /dev/null +++ b/lib/api/doctrine/dbal/schema/mssqlschemamanager.html @@ -0,0 +1,301 @@ + + + + + + + + + + + +MsSqlSchemaManager (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +
Doctrine\DBAL\Schema\MsSqlSchemaManager
+
/Doctrine/DBAL/Schema/MsSqlSchemaManager.php at line 33
+ +

Class MsSqlSchemaManager

+ +
Class:MsSqlSchemaManager - Superclass: AbstractSchemaManager
+AbstractSchemaManager
⌊ MsSqlSchemaManager
+ +
+ +

public class MsSqlSchemaManager
extends AbstractSchemaManager + +

+ +

xxx

+ +
+
License:
+
http://www.opensource.org/licenses/lgpl-license.php LGPL
+
Author:
+
Konsta Vesterinen
+
Lukas Smith (PEAR MDB2 library)
+
Version:
+
$Revision$
+
Since:
+
2.0
+
+
+ + + +
Fields inherited from Doctrine\DBAL\Schema\AbstractSchemaManager
_conn, _platform
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Method Summary
void

alterTable(string name, array changes, boolean check, TableDiff tableDiff)

alter an existing table

void

createDatabase(string name, string database)

create a new database

void

createSequence(mixed seqName, mixed start, mixed allocationSize, Sequence sequence)

{@inheritdoc}

void

dropDatabase(string name, string database)

drop an existing database

void

dropSequenceSql(string seqName)

This function drops an existing sequence

array

listSequences(string|null database)

lists all database sequences

array

listTableColumns(string table)

lists table constraints

array

listTableIndexes(string table)

lists table constraints

array

listTableTriggers(string table)

lists table triggers

array

listTableViews(string table)

lists table views

array

listTables(string|null database)

lists tables

array

listTriggers(mixed database)

lists all triggers

array

listViews(string|null database)

lists database views

+ + + +
Methods inherited from Doctrine\DBAL\Schema\AbstractSchemaManager
alterTable, createConstraint, createDatabase, createForeignKey, createIndex, createSchema, createSchemaConfig, createSequence, createTable, createView, dropAndCreateConstraint, dropAndCreateDatabase, dropAndCreateForeignKey, dropAndCreateIndex, dropAndCreateSequence, dropAndCreateTable, dropAndCreateView, dropConstraint, dropDatabase, dropForeignKey, dropIndex, dropSequence, dropTable, dropView, getDatabasePlatform, listDatabases, listSequences, listTableColumns, listTableDetails, listTableForeignKeys, listTableIndexes, listTableNames, listTables, listViews, renameTable, tryMethod
+ +

Method Detail

+
/Doctrine/DBAL/Schema/MsSqlSchemaManager.php at line 151
+

alterTable

+public void alterTable(string name, array changes, boolean check, TableDiff tableDiff) +
+

alter an existing table

+
Parameters:
+
name - name of the table that is intended to be changed.
+
changes - associative array that contains the details of each type of change that is intended to be performed. The types of changes that are currently supported are defined as follows: name New name for the table. add Associative array with the names of fields to be added as indexes of the array. The value of each entry of the array should be set to another associative array with the properties of the fields to be added. The properties of the fields should be the same as defined by the Metabase parser. remove Associative array with the names of fields to be removed as indexes of the array. Currently the values assigned to each entry are ignored. An empty array should be used for future compatibility. rename Associative array with the names of fields to be renamed as indexes of the array. The value of each entry of the array should be set to another associative array with the entry named name with the new field name and the entry named Declaration that is expected to contain the portion of the field declaration already in DBMS specific SQL code as it is used in the CREATE TABLE statement. change Associative array with the names of the fields to be changed as indexes of the array. Keep in mind that if it is intended to change either the name of a field and any other properties, the change array entries should have the new names of the fields as array indexes. The value of each entry of the array should be set to another associative array with the properties of the fields to that are meant to be changed as array entries. These entries should be assigned to the new values of the respective properties. The properties of the fields should be the same as defined by the Metabase parser. Example array( 'name' => 'userlist', 'add' => array( 'quota' => array( 'type' => 'integer', 'unsigned' => 1 ) ), 'remove' => array( 'file_limit' => array(), 'time_limit' => array() ), 'change' => array( 'name' => array( 'length' => '20', 'definition' => array( 'type' => 'text', 'length' => 20, ), ) ), 'rename' => array( 'sex' => array( 'name' => 'gender', 'definition' => array( 'type' => 'text', 'length' => 1, 'default' => 'M', ), ) ) )
+
check - indicates whether the function should just check if the DBMS driver can perform the requested table alterations if the value is true or actually perform them otherwise.
+
+
+ +
+ +
/Doctrine/DBAL/Schema/MsSqlSchemaManager.php at line 41
+

createDatabase

+public void createDatabase(string name, string database) +
+

create a new database

+
Parameters:
+
name - name of the database that should be created
+
+
+ +
+ +
/Doctrine/DBAL/Schema/MsSqlSchemaManager.php at line 196
+

createSequence

+public void createSequence(mixed seqName, mixed start, mixed allocationSize, Sequence sequence) +
+

+
Throws:
+
if something fails at database level
+
+
+ +
+ +
/Doctrine/DBAL/Schema/MsSqlSchemaManager.php at line 58
+

dropDatabase

+public void dropDatabase(string name, string database) +
+

drop an existing database

+
Parameters:
+
name - name of the database that should be dropped
+
+
+ +
+ +
/Doctrine/DBAL/Schema/MsSqlSchemaManager.php at line 224
+

dropSequenceSql

+public void dropSequenceSql(string seqName) +
+

This function drops an existing sequence

+
Parameters:
+
seqName - name of the sequence to be dropped
+
+
+ +
+ +
/Doctrine/DBAL/Schema/MsSqlSchemaManager.php at line 235
+

listSequences

+public array listSequences(string|null database) +
+

lists all database sequences

+ +
+ +
/Doctrine/DBAL/Schema/MsSqlSchemaManager.php at line 249
+

listTableColumns

+public array listTableColumns(string table) +
+

lists table constraints

+
Parameters:
+
table - database table name
+
+
+ +
+ +
/Doctrine/DBAL/Schema/MsSqlSchemaManager.php at line 297
+

listTableIndexes

+public array listTableIndexes(string table) +
+

lists table constraints

+
Parameters:
+
table - database table name
+
+
+ +
+ +
/Doctrine/DBAL/Schema/MsSqlSchemaManager.php at line 335
+

listTableTriggers

+public array listTableTriggers(string table) +
+

lists table triggers

+
Parameters:
+
table - database table name
+
+
+ +
+ +
/Doctrine/DBAL/Schema/MsSqlSchemaManager.php at line 351
+

listTableViews

+public array listTableViews(string table) +
+

lists table views

+
Parameters:
+
table - database table name
+
+
+ +
+ +
/Doctrine/DBAL/Schema/MsSqlSchemaManager.php at line 308
+

listTables

+public array listTables(string|null database) +
+

lists tables

+ +
+ +
/Doctrine/DBAL/Schema/MsSqlSchemaManager.php at line 320
+

listTriggers

+public array listTriggers(mixed database) +
+

lists all triggers

+ +
+ +
/Doctrine/DBAL/Schema/MsSqlSchemaManager.php at line 388
+

listViews

+public array listViews(string|null database) +
+

lists database views

+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/dbal/schema/mysqlschemamanager.html b/lib/api/doctrine/dbal/schema/mysqlschemamanager.html new file mode 100644 index 000000000..45e24161a --- /dev/null +++ b/lib/api/doctrine/dbal/schema/mysqlschemamanager.html @@ -0,0 +1,104 @@ + + + + + + + + + + + +MySqlSchemaManager (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +
Doctrine\DBAL\Schema\MySqlSchemaManager
+
/Doctrine/DBAL/Schema/MySqlSchemaManager.php at line 35
+ +

Class MySqlSchemaManager

+ +
Class:MySqlSchemaManager - Superclass: AbstractSchemaManager
+AbstractSchemaManager
⌊ MySqlSchemaManager
+ +
+ +

public class MySqlSchemaManager
extends AbstractSchemaManager + +

+ +

Schema manager for the MySql RDBMS.

+ +
+
License:
+
http://www.opensource.org/licenses/lgpl-license.php LGPL
+
Author:
+
Konsta Vesterinen
+
Lukas Smith (PEAR MDB2 library)
+
Roman Borschel
+
Benjamin Eberlei
+
Version:
+
$Revision$
+
Since:
+
2.0
+
+
+ + + +
Fields inherited from Doctrine\DBAL\Schema\AbstractSchemaManager
_conn, _platform
+ + + +
Methods inherited from Doctrine\DBAL\Schema\AbstractSchemaManager
alterTable, createConstraint, createDatabase, createForeignKey, createIndex, createSchema, createSchemaConfig, createSequence, createTable, createView, dropAndCreateConstraint, dropAndCreateDatabase, dropAndCreateForeignKey, dropAndCreateIndex, dropAndCreateSequence, dropAndCreateTable, dropAndCreateView, dropConstraint, dropDatabase, dropForeignKey, dropIndex, dropSequence, dropTable, dropView, getDatabasePlatform, listDatabases, listSequences, listTableColumns, listTableDetails, listTableForeignKeys, listTableIndexes, listTableNames, listTables, listViews, renameTable, tryMethod
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/dbal/schema/oracleschemamanager.html b/lib/api/doctrine/dbal/schema/oracleschemamanager.html new file mode 100644 index 000000000..aca8d1f28 --- /dev/null +++ b/lib/api/doctrine/dbal/schema/oracleschemamanager.html @@ -0,0 +1,152 @@ + + + + + + + + + + + +OracleSchemaManager (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +
Doctrine\DBAL\Schema\OracleSchemaManager
+
/Doctrine/DBAL/Schema/OracleSchemaManager.php at line 34
+ +

Class OracleSchemaManager

+ +
Class:OracleSchemaManager - Superclass: AbstractSchemaManager
+AbstractSchemaManager
⌊ OracleSchemaManager
+ +
+ +

public class OracleSchemaManager
extends AbstractSchemaManager + +

+ +

Oracle Schema Manager

+ +
+
License:
+
http://www.opensource.org/licenses/lgpl-license.php LGPL
+
Author:
+
Konsta Vesterinen
+
Lukas Smith (PEAR MDB2 library)
+
Benjamin Eberlei
+
Version:
+
$Revision$
+
Since:
+
2.0
+
+
+ + + +
Fields inherited from Doctrine\DBAL\Schema\AbstractSchemaManager
_conn, _platform
+ + + + + + + + + + + + + + + +
Method Summary
void

createDatabase(string database)

Creates a new database.

void

dropAutoincrement(mixed table)

void

dropTable(mixed name, string table)

Drop the given table

+ + + +
Methods inherited from Doctrine\DBAL\Schema\AbstractSchemaManager
alterTable, createConstraint, createDatabase, createForeignKey, createIndex, createSchema, createSchemaConfig, createSequence, createTable, createView, dropAndCreateConstraint, dropAndCreateDatabase, dropAndCreateForeignKey, dropAndCreateIndex, dropAndCreateSequence, dropAndCreateTable, dropAndCreateView, dropConstraint, dropDatabase, dropForeignKey, dropIndex, dropSequence, dropTable, dropView, getDatabasePlatform, listDatabases, listSequences, listTableColumns, listTableDetails, listTableForeignKeys, listTableIndexes, listTableNames, listTables, listViews, renameTable, tryMethod
+ +

Method Detail

+
/Doctrine/DBAL/Schema/OracleSchemaManager.php at line 245
+

createDatabase

+public void createDatabase(string database) +
+

Creates a new database.

+
Parameters:
+
database - The name of the database to create.
+
+
+ +
+ +
/Doctrine/DBAL/Schema/OracleSchemaManager.php at line 264
+

dropAutoincrement

+public void dropAutoincrement(mixed table) +
+
+ +
+ +
/Doctrine/DBAL/Schema/OracleSchemaManager.php at line 274
+

dropTable

+public void dropTable(mixed name, string table) +
+

Drop the given table

+
Parameters:
+
table - The name of the table to drop
+
+
+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/dbal/schema/package-frame.html b/lib/api/doctrine/dbal/schema/package-frame.html new file mode 100644 index 000000000..15b048733 --- /dev/null +++ b/lib/api/doctrine/dbal/schema/package-frame.html @@ -0,0 +1,50 @@ + + + + + + + + + + + +Doctrine\DBAL\Schema (Doctrine) + + + + +

Doctrine\DBAL\Schema

+ +

Classes

+ + +

Interfaces

+ + + + + \ No newline at end of file diff --git a/lib/api/doctrine/dbal/schema/package-functions.html b/lib/api/doctrine/dbal/schema/package-functions.html new file mode 100644 index 000000000..276bd476e --- /dev/null +++ b/lib/api/doctrine/dbal/schema/package-functions.html @@ -0,0 +1,69 @@ + + + + + + + + + + + +Functions (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +

Functions

+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/dbal/schema/package-globals.html b/lib/api/doctrine/dbal/schema/package-globals.html new file mode 100644 index 000000000..e11ca8cc2 --- /dev/null +++ b/lib/api/doctrine/dbal/schema/package-globals.html @@ -0,0 +1,69 @@ + + + + + + + + + + + +Globals (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +

Globals

+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/dbal/schema/package-summary.html b/lib/api/doctrine/dbal/schema/package-summary.html new file mode 100644 index 000000000..1b78438d2 --- /dev/null +++ b/lib/api/doctrine/dbal/schema/package-summary.html @@ -0,0 +1,91 @@ + + + + + + + + + + + +Doctrine\DBAL\Schema (Doctrine) + + + + +
+

Doctrine

+ +
+ + +
+ +

Namespace Doctrine\DBAL\Schema

+ + + + + + + + + + + + + + + + + + + + + + + +
Class Summary
AbstractAssetThe abstract asset allows to reset the name of all assets without publishing this to the public userland. +
AbstractSchemaManagerBase class for schema managers.
ColumnObject representation of a database column
ColumnDiffRepresent the change of a column
ComparatorCompare to Schemas and return an instance of SchemaDiff
ForeignKeyConstraintThe abstract asset allows to reset the name of all assets without publishing this to the public userland. +
IndexThe abstract asset allows to reset the name of all assets without publishing this to the public userland. +
MsSqlSchemaManagerxxx
MySqlSchemaManagerSchema manager for the MySql RDBMS.
OracleSchemaManagerOracle Schema Manager
PostgreSqlSchemaManagerxxx
SchemaObject representation of a database schema
SchemaConfigConfiguration for a Schema
SchemaDiffSchema Diff
SchemaException
SequenceSequence Structure
SqliteSchemaManagerSqliteSchemaManager
TableObject Representation of a table
TableDiffTable Diff
ViewRepresentation of a Database View
+ + + + +
Interface Summary
ConstraintMarker interface for contraints
+ +
+ +
+

Doctrine

+ +
+ + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/dbal/schema/package-tree.html b/lib/api/doctrine/dbal/schema/package-tree.html new file mode 100644 index 000000000..33dd946b1 --- /dev/null +++ b/lib/api/doctrine/dbal/schema/package-tree.html @@ -0,0 +1,78 @@ + + + + + + + + + + + +Doctrine\DBAL\Schema (Doctrine) + + + + +
+

Doctrine

+ +
+ + +

Class Hierarchy for Package Doctrine\DBAL\Schema

+
+

Doctrine

+ +
+ + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/dbal/schema/postgresqlschemamanager.html b/lib/api/doctrine/dbal/schema/postgresqlschemamanager.html new file mode 100644 index 000000000..f2fee7ef4 --- /dev/null +++ b/lib/api/doctrine/dbal/schema/postgresqlschemamanager.html @@ -0,0 +1,141 @@ + + + + + + + + + + + +PostgreSqlSchemaManager (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +
Doctrine\DBAL\Schema\PostgreSqlSchemaManager
+
/Doctrine/DBAL/Schema/PostgreSqlSchemaManager.php at line 34
+ +

Class PostgreSqlSchemaManager

+ +
Class:PostgreSqlSchemaManager - Superclass: AbstractSchemaManager
+AbstractSchemaManager
⌊ PostgreSqlSchemaManager
+ +
+ +

public class PostgreSqlSchemaManager
extends AbstractSchemaManager + +

+ +

xxx

+ +
+
License:
+
http://www.opensource.org/licenses/lgpl-license.php LGPL
+
Author:
+
Konsta Vesterinen
+
Lukas Smith (PEAR MDB2 library)
+
Benjamin Eberlei
+
Version:
+
$Revision$
+
Since:
+
2.0
+
+
+ + + +
Fields inherited from Doctrine\DBAL\Schema\AbstractSchemaManager
_conn, _platform
+ + + + + + + + + + + +
Method Summary
void

createDatabase(string database)

Creates a new database.

void

dropDatabase(string database)

Drops a database. +

+ + + +
Methods inherited from Doctrine\DBAL\Schema\AbstractSchemaManager
alterTable, createConstraint, createDatabase, createForeignKey, createIndex, createSchema, createSchemaConfig, createSequence, createTable, createView, dropAndCreateConstraint, dropAndCreateDatabase, dropAndCreateForeignKey, dropAndCreateIndex, dropAndCreateSequence, dropAndCreateTable, dropAndCreateView, dropConstraint, dropDatabase, dropForeignKey, dropIndex, dropSequence, dropTable, dropView, getDatabasePlatform, listDatabases, listSequences, listTableColumns, listTableDetails, listTableForeignKeys, listTableIndexes, listTableNames, listTables, listViews, renameTable, tryMethod
+ +

Method Detail

+
/Doctrine/DBAL/Schema/PostgreSqlSchemaManager.php at line 76
+

createDatabase

+public void createDatabase(string database) +
+

Creates a new database.

+
Parameters:
+
database - The name of the database to create.
+
+
+ +
+ +
/Doctrine/DBAL/Schema/PostgreSqlSchemaManager.php at line 60
+

dropDatabase

+public void dropDatabase(string database) +
+

Drops a database.

NOTE: You can not drop the database this SchemaManager is currently connected to.

+
Parameters:
+
database - The name of the database to drop
+
+
+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/dbal/schema/schema.html b/lib/api/doctrine/dbal/schema/schema.html new file mode 100644 index 000000000..b9f425d5a --- /dev/null +++ b/lib/api/doctrine/dbal/schema/schema.html @@ -0,0 +1,373 @@ + + + + + + + + + + + +Schema (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +
Doctrine\DBAL\Schema\Schema
+
/Doctrine/DBAL/Schema/Schema.php at line 37
+ +

Class Schema

+ +
Class:Schema - Superclass: AbstractAsset
+AbstractAsset
⌊ Schema
+ +
+ +

public class Schema
extends AbstractAsset + +

+ +

Object representation of a database schema

+ +
+
License:
+
http://www.opensource.org/licenses/lgpl-license.php LGPL
+
See Also:
+
www.doctrine-project.org
+
Since:
+
2.0
+
Version:
+
$Revision$
+
Author:
+
Benjamin Eberlei
+
+
+ + + + + + + + + + + + + + + +
Field Summary
protected SchemaConfig

$_schemaConfig

protected array

$_sequences

protected array

$_tables

+ + + +
Fields inherited from Doctrine\DBAL\Schema\AbstractAsset
_name
+ + + + + + +
Constructor Summary

Schema(array tables, SchemaConfig schemaConfig, array sequences, array views, array triggers)

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Method Summary
Sequence

createSequence(string sequenceName, int allocationSize, int initialValue)

Create a new sequence

Table

createTable(string tableName)

Create a new table

Schema

dropSequence(string sequenceName)

Schema

dropTable(string tableName)

Drop a table from the schema.

void

getMigrateFromSql(Schema fromSchema, AbstractPlatform platform)

void

getMigrateToSql(Schema toSchema, AbstractPlatform platform)

Doctrine\DBAL\Schema\Sequence

getSequence(string sequenceName)

Doctrine\DBAL\Schema\Sequence[]

getSequences()

Table

getTable(string tableName)

array

getTables()

Get all tables of this schema.

bool

hasExplicitForeignKeyIndexes()

bool

hasSequence(string sequenceName)

Schema

hasTable(string tableName)

Does this schema have a table with the given name?

Schema

renameTable(string oldTableName, string newTableName)

Rename a table

array

toDropSql(AbstractPlatform platform)

Return an array of necessary sql queries to drop the schema on the given platform.

array

toSql(AbstractPlatform platform)

Return an array of necessary sql queries to create the schema on the given platform.

void

visit(Visitor visitor)

+ + + +
Methods inherited from Doctrine\DBAL\Schema\AbstractAsset
getName
+ +

Field Detail

+
/Doctrine/DBAL/Schema/Schema.php at line 52
+

_schemaConfig

+protected SchemaConfig $_schemaConfig = false +
+

+ +
+ +
/Doctrine/DBAL/Schema/Schema.php at line 47
+

_sequences

+protected array $_sequences = array() +
+

+ +
+ +
/Doctrine/DBAL/Schema/Schema.php at line 42
+

_tables

+protected array $_tables = array() +
+

+ +
+ +

Constructor Detail

+
/Doctrine/DBAL/Schema/Schema.php at line 61
+

Schema

+public Schema(array tables, SchemaConfig schemaConfig, array sequences, array views, array triggers) +
+

+ +
+ +

Method Detail

+
/Doctrine/DBAL/Schema/Schema.php at line 230
+

createSequence

+public Sequence createSequence(string sequenceName, int allocationSize, int initialValue) +
+

Create a new sequence

+ +
+ +
/Doctrine/DBAL/Schema/Schema.php at line 184
+

createTable

+public Table createTable(string tableName) +
+

Create a new table

+ +
+ +
/Doctrine/DBAL/Schema/Schema.php at line 241
+

dropSequence

+public Schema dropSequence(string sequenceName) +
+

+ +
+ +
/Doctrine/DBAL/Schema/Schema.php at line 214
+

dropTable

+public Schema dropTable(string tableName) +
+

Drop a table from the schema.

+ +
+ +
/Doctrine/DBAL/Schema/Schema.php at line 291
+

getMigrateFromSql

+public void getMigrateFromSql(Schema fromSchema, AbstractPlatform platform) +
+

+ +
+ +
/Doctrine/DBAL/Schema/Schema.php at line 280
+

getMigrateToSql

+public void getMigrateToSql(Schema toSchema, AbstractPlatform platform) +
+

+ +
+ +
/Doctrine/DBAL/Schema/Schema.php at line 161
+

getSequence

+public Doctrine\DBAL\Schema\Sequence getSequence(string sequenceName) +
+

+
Throws:
+
SchemaException
+
+
+ +
+ +
/Doctrine/DBAL/Schema/Schema.php at line 173
+

getSequences

+public Doctrine\DBAL\Schema\Sequence[] getSequences() +
+

+ +
+ +
/Doctrine/DBAL/Schema/Schema.php at line 124
+

getTable

+public Table getTable(string tableName) +
+

+ +
+ +
/Doctrine/DBAL/Schema/Schema.php at line 115
+

getTables

+public array getTables() +
+

Get all tables of this schema.

+ +
+ +
/Doctrine/DBAL/Schema/Schema.php at line 79
+

hasExplicitForeignKeyIndexes

+public bool hasExplicitForeignKeyIndexes() +
+

+ +
+ +
/Doctrine/DBAL/Schema/Schema.php at line 150
+

hasSequence

+public bool hasSequence(string sequenceName) +
+

+ +
+ +
/Doctrine/DBAL/Schema/Schema.php at line 140
+

hasTable

+public Schema hasTable(string tableName) +
+

Does this schema have a table with the given name?

+ +
+ +
/Doctrine/DBAL/Schema/Schema.php at line 198
+

renameTable

+public Schema renameTable(string oldTableName, string newTableName) +
+

Rename a table

+ +
+ +
/Doctrine/DBAL/Schema/Schema.php at line 268
+

toDropSql

+public array toDropSql(AbstractPlatform platform) +
+

Return an array of necessary sql queries to drop the schema on the given platform.

+ +
+ +
/Doctrine/DBAL/Schema/Schema.php at line 254
+

toSql

+public array toSql(AbstractPlatform platform) +
+

Return an array of necessary sql queries to create the schema on the given platform.

+ +
+ +
/Doctrine/DBAL/Schema/Schema.php at line 301
+

visit

+public void visit(Visitor visitor) +
+

+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/dbal/schema/schemaconfig.html b/lib/api/doctrine/dbal/schema/schemaconfig.html new file mode 100644 index 000000000..f4f5ca86d --- /dev/null +++ b/lib/api/doctrine/dbal/schema/schemaconfig.html @@ -0,0 +1,174 @@ + + + + + + + + + + + +SchemaConfig (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +
Doctrine\DBAL\Schema\SchemaConfig
+
/Doctrine/DBAL/Schema/SchemaConfig.php at line 33
+ +

Class SchemaConfig

+ +
SchemaConfig
+ +
+ +

public class SchemaConfig

+ +

Configuration for a Schema

+ +
+
License:
+
http://www.opensource.org/licenses/lgpl-license.php LGPL
+
See Also:
+
www.doctrine-project.org
+
Since:
+
2.0
+
Version:
+
$Revision$
+
Author:
+
Benjamin Eberlei
+
+
+ + + + + + + + + + + +
Field Summary
protected bool

$_hasExplicitForeignKeyIndexes

protected int

$_maxIdentifierLength

+ + + + + + + + + + + + + + + + + + + +
Method Summary
int

getMaxIdentifierLength()

bool

hasExplicitForeignKeyIndexes()

void

setExplicitForeignKeyIndexes(bool flag)

void

setMaxIdentifierLength(int length)

+ +

Field Detail

+
/Doctrine/DBAL/Schema/SchemaConfig.php at line 38
+

_hasExplicitForeignKeyIndexes

+protected bool $_hasExplicitForeignKeyIndexes = false +
+

+ +
+ +
/Doctrine/DBAL/Schema/SchemaConfig.php at line 43
+

_maxIdentifierLength

+protected int $_maxIdentifierLength = 63 +
+

+ +
+ +

Method Detail

+
/Doctrine/DBAL/Schema/SchemaConfig.php at line 72
+

getMaxIdentifierLength

+public int getMaxIdentifierLength() +
+

+ +
+ +
/Doctrine/DBAL/Schema/SchemaConfig.php at line 48
+

hasExplicitForeignKeyIndexes

+public bool hasExplicitForeignKeyIndexes() +
+

+ +
+ +
/Doctrine/DBAL/Schema/SchemaConfig.php at line 56
+

setExplicitForeignKeyIndexes

+public void setExplicitForeignKeyIndexes(bool flag) +
+

+ +
+ +
/Doctrine/DBAL/Schema/SchemaConfig.php at line 64
+

setMaxIdentifierLength

+public void setMaxIdentifierLength(int length) +
+

+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/dbal/schema/schemadiff.html b/lib/api/doctrine/dbal/schema/schemadiff.html new file mode 100644 index 000000000..752191e28 --- /dev/null +++ b/lib/api/doctrine/dbal/schema/schemadiff.html @@ -0,0 +1,231 @@ + + + + + + + + + + + +SchemaDiff (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +
Doctrine\DBAL\Schema\SchemaDiff
+
/Doctrine/DBAL/Schema/SchemaDiff.php at line 37
+ +

Class SchemaDiff

+ +
SchemaDiff
+ +
+ +

public class SchemaDiff

+ +

Schema Diff

+ +
+
License:
+
http://www.opensource.org/licenses/lgpl-license.php LGPL
+
http://ez.no/licenses/new_bsd New BSD License
+
See Also:
+
www.doctrine-project.org
+
Copyright:
+
Copyright (C) 2005-2009 eZ Systems AS. All rights reserved.
+
Since:
+
2.0
+
Version:
+
$Revision$
+
Author:
+
Benjamin Eberlei
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Field Summary
array

$changedSequences

array(string=>ezcDbSchemaTableDiff)

$changedTables

All changed tables

array

$newSequences

array(string=>ezcDbSchemaTable)

$newTables

All added tables

array

$orphanedForeignKeys

array

$removedSequences

array(string=>Table)

$removedTables

All removed tables

+ + + + + + +
Constructor Summary

SchemaDiff(array(string=>Table) newTables, array(string=>TableDiff) changedTables, array(string=>bool) removedTables)

Constructs an SchemaDiff object.

+ + + + + + + + + + + +
Method Summary
array

toSaveSql(AbstractPlatform platform)

The to save sql mode ensures that the following things don't happen:1.

array

toSql(AbstractPlatform platform)

+ +

Field Detail

+
/Doctrine/DBAL/Schema/SchemaDiff.php at line 68
+

changedSequences

+public array $changedSequences = array() +
+

+ +
+ +
/Doctrine/DBAL/Schema/SchemaDiff.php at line 51
+

changedTables

+public array(string=>ezcDbSchemaTableDiff) $changedTables = array() +
+

All changed tables

+ +
+ +
/Doctrine/DBAL/Schema/SchemaDiff.php at line 63
+

newSequences

+public array $newSequences = array() +
+

+ +
+ +
/Doctrine/DBAL/Schema/SchemaDiff.php at line 44
+

newTables

+public array(string=>ezcDbSchemaTable) $newTables = array() +
+

All added tables

+ +
+ +
/Doctrine/DBAL/Schema/SchemaDiff.php at line 78
+

orphanedForeignKeys

+public array $orphanedForeignKeys = array() +
+

+ +
+ +
/Doctrine/DBAL/Schema/SchemaDiff.php at line 73
+

removedSequences

+public array $removedSequences = array() +
+

+ +
+ +
/Doctrine/DBAL/Schema/SchemaDiff.php at line 58
+

removedTables

+public array(string=>Table) $removedTables = array() +
+

All removed tables

+ +
+ +

Constructor Detail

+
/Doctrine/DBAL/Schema/SchemaDiff.php at line 87
+

SchemaDiff

+public SchemaDiff(array(string=>Table) newTables, array(string=>TableDiff) changedTables, array(string=>bool) removedTables) +
+

Constructs an SchemaDiff object.

+ +
+ +

Method Detail

+
/Doctrine/DBAL/Schema/SchemaDiff.php at line 106
+

toSaveSql

+public array toSaveSql(AbstractPlatform platform) +
+

The to save sql mode ensures that the following things don't happen:

1. Tables are deleted +2. Sequences are deleted +3. Foreign Keys which reference tables that would otherwise be deleted.

This way it is ensured that assets are deleted which might not be relevant to the metadata schema at all.

+ +
+ +
/Doctrine/DBAL/Schema/SchemaDiff.php at line 115
+

toSql

+public array toSql(AbstractPlatform platform) +
+

+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/dbal/schema/schemaexception.html b/lib/api/doctrine/dbal/schema/schemaexception.html new file mode 100644 index 000000000..1e78540d0 --- /dev/null +++ b/lib/api/doctrine/dbal/schema/schemaexception.html @@ -0,0 +1,355 @@ + + + + + + + + + + + +SchemaException (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +
Doctrine\DBAL\Schema\SchemaException
+
/Doctrine/DBAL/Schema/SchemaException.php at line 5
+ +

Class SchemaException

+ +
Class:SchemaException - Superclass: Doctrine
+Doctrine
⌊ SchemaException
+ +
+ +

public class SchemaException
extends Doctrine + +

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Field Summary
final int

COLUMN_ALREADY_EXISTS

final int

COLUMN_DOESNT_EXIST

final int

FOREIGNKEY_DOESNT_EXIST

final int

INDEX_ALREADY_EXISTS

final int

INDEX_DOESNT_EXIST

final int

INDEX_INVALID_NAME

final int

SEQUENCE_ALREADY_EXISTS

final int

SEQUENCE_DOENST_EXIST

final int

TABLE_ALREADY_EXISTS

final int

TABLE_DOESNT_EXIST

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Method Summary
static void

alterTableChangeNotSupported(mixed changeName)

static SchemaException

columnAlreadyExists(string tableName, string columnName)

static SchemaException

columnDoesNotExist(string columnName)

static SchemaException

foreignKeyDoesNotExist(string fkName)

static SchemaException

indexAlreadyExists(string indexName)

static SchemaException

indexDoesNotExist(string indexName)

static SchemaException

indexNameInvalid(string indexName)

static void

namedForeignKeyRequired(mixed localTable, mixed foreignKey)

static SchemaException

sequenceAlreadyExists(string sequenceName)

static SchemaException

sequenceDoesNotExist(string sequenceName)

static SchemaException

tableAlreadyExists(string tableName)

static SchemaException

tableDoesNotExist(string tableName)

+ +

Field Detail

+
/Doctrine/DBAL/Schema/SchemaException.php at line 10
+

COLUMN_ALREADY_EXISTS

+public final int COLUMN_ALREADY_EXISTS = 40 +
+
+ +
+ +
/Doctrine/DBAL/Schema/SchemaException.php at line 9
+

COLUMN_DOESNT_EXIST

+public final int COLUMN_DOESNT_EXIST = 30 +
+
+ +
+ +
/Doctrine/DBAL/Schema/SchemaException.php at line 16
+

FOREIGNKEY_DOESNT_EXIST

+public final int FOREIGNKEY_DOESNT_EXIST = 100 +
+
+ +
+ +
/Doctrine/DBAL/Schema/SchemaException.php at line 12
+

INDEX_ALREADY_EXISTS

+public final int INDEX_ALREADY_EXISTS = 60 +
+
+ +
+ +
/Doctrine/DBAL/Schema/SchemaException.php at line 11
+

INDEX_DOESNT_EXIST

+public final int INDEX_DOESNT_EXIST = 50 +
+
+ +
+ +
/Doctrine/DBAL/Schema/SchemaException.php at line 15
+

INDEX_INVALID_NAME

+public final int INDEX_INVALID_NAME = 90 +
+
+ +
+ +
/Doctrine/DBAL/Schema/SchemaException.php at line 14
+

SEQUENCE_ALREADY_EXISTS

+public final int SEQUENCE_ALREADY_EXISTS = 80 +
+
+ +
+ +
/Doctrine/DBAL/Schema/SchemaException.php at line 13
+

SEQUENCE_DOENST_EXIST

+public final int SEQUENCE_DOENST_EXIST = 70 +
+
+ +
+ +
/Doctrine/DBAL/Schema/SchemaException.php at line 8
+

TABLE_ALREADY_EXISTS

+public final int TABLE_ALREADY_EXISTS = 20 +
+
+ +
+ +
/Doctrine/DBAL/Schema/SchemaException.php at line 7
+

TABLE_DOESNT_EXIST

+public final int TABLE_DOESNT_EXIST = 10 +
+
+ +
+ +

Method Detail

+
/Doctrine/DBAL/Schema/SchemaException.php at line 123
+

alterTableChangeNotSupported

+public static void alterTableChangeNotSupported(mixed changeName) +
+
+ +
+ +
/Doctrine/DBAL/Schema/SchemaException.php at line 79
+

columnAlreadyExists

+public static SchemaException columnAlreadyExists(string tableName, string columnName) +
+

+ +
+ +
/Doctrine/DBAL/Schema/SchemaException.php at line 58
+

columnDoesNotExist

+public static SchemaException columnDoesNotExist(string columnName) +
+

+ +
+ +
/Doctrine/DBAL/Schema/SchemaException.php at line 108
+

foreignKeyDoesNotExist

+public static SchemaException foreignKeyDoesNotExist(string fkName) +
+

+ +
+ +
/Doctrine/DBAL/Schema/SchemaException.php at line 49
+

indexAlreadyExists

+public static SchemaException indexAlreadyExists(string indexName) +
+

+ +
+ +
/Doctrine/DBAL/Schema/SchemaException.php at line 40
+

indexDoesNotExist

+public static SchemaException indexDoesNotExist(string indexName) +
+

+ +
+ +
/Doctrine/DBAL/Schema/SchemaException.php at line 31
+

indexNameInvalid

+public static SchemaException indexNameInvalid(string indexName) +
+

+ +
+ +
/Doctrine/DBAL/Schema/SchemaException.php at line 113
+

namedForeignKeyRequired

+public static void namedForeignKeyRequired(mixed localTable, mixed foreignKey) +
+
+ +
+ +
/Doctrine/DBAL/Schema/SchemaException.php at line 90
+

sequenceAlreadyExists

+public static SchemaException sequenceAlreadyExists(string sequenceName) +
+

+ +
+ +
/Doctrine/DBAL/Schema/SchemaException.php at line 99
+

sequenceDoesNotExist

+public static SchemaException sequenceDoesNotExist(string sequenceName) +
+

+ +
+ +
/Doctrine/DBAL/Schema/SchemaException.php at line 68
+

tableAlreadyExists

+public static SchemaException tableAlreadyExists(string tableName) +
+

+ +
+ +
/Doctrine/DBAL/Schema/SchemaException.php at line 22
+

tableDoesNotExist

+public static SchemaException tableDoesNotExist(string tableName) +
+

+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/dbal/schema/sequence.html b/lib/api/doctrine/dbal/schema/sequence.html new file mode 100644 index 000000000..d49a65437 --- /dev/null +++ b/lib/api/doctrine/dbal/schema/sequence.html @@ -0,0 +1,189 @@ + + + + + + + + + + + +Sequence (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +
Doctrine\DBAL\Schema\Sequence
+
/Doctrine/DBAL/Schema/Sequence.php at line 35
+ +

Class Sequence

+ +
Class:Sequence - Superclass: AbstractAsset
+AbstractAsset
⌊ Sequence
+ +
+ +

public class Sequence
extends AbstractAsset + +

+ +

Sequence Structure

+ +
+
License:
+
http://www.opensource.org/licenses/lgpl-license.php LGPL
+
See Also:
+
www.doctrine-project.org
+
Since:
+
2.0
+
Version:
+
$Revision$
+
Author:
+
Benjamin Eberlei
+
+
+ + + + + + + + + + + +
Field Summary
protected int

$_allocationSize

protected int

$_initialValue

+ + + +
Fields inherited from Doctrine\DBAL\Schema\AbstractAsset
_name
+ + + + + + +
Constructor Summary

Sequence(string name, int allocationSize, int initialValue)

+ + + + + + + + + + + + + + + +
Method Summary
void

getAllocationSize()

void

getInitialValue()

void

visit(Visitor visitor)

+ + + +
Methods inherited from Doctrine\DBAL\Schema\AbstractAsset
getName
+ +

Field Detail

+
/Doctrine/DBAL/Schema/Sequence.php at line 40
+

_allocationSize

+protected int $_allocationSize = 1 +
+

+ +
+ +
/Doctrine/DBAL/Schema/Sequence.php at line 45
+

_initialValue

+protected int $_initialValue = 1 +
+

+ +
+ +

Constructor Detail

+
/Doctrine/DBAL/Schema/Sequence.php at line 53
+

Sequence

+public Sequence(string name, int allocationSize, int initialValue) +
+

+ +
+ +

Method Detail

+
/Doctrine/DBAL/Schema/Sequence.php at line 60
+

getAllocationSize

+public void getAllocationSize() +
+
+ +
+ +
/Doctrine/DBAL/Schema/Sequence.php at line 65
+

getInitialValue

+public void getInitialValue() +
+
+ +
+ +
/Doctrine/DBAL/Schema/Sequence.php at line 73
+

visit

+public void visit(Visitor visitor) +
+

+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/dbal/schema/sqliteschemamanager.html b/lib/api/doctrine/dbal/schema/sqliteschemamanager.html new file mode 100644 index 000000000..eb542c51b --- /dev/null +++ b/lib/api/doctrine/dbal/schema/sqliteschemamanager.html @@ -0,0 +1,142 @@ + + + + + + + + + + + +SqliteSchemaManager (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +
Doctrine\DBAL\Schema\SqliteSchemaManager
+
/Doctrine/DBAL/Schema/SqliteSchemaManager.php at line 34
+ +

Class SqliteSchemaManager

+ +
Class:SqliteSchemaManager - Superclass: AbstractSchemaManager
+AbstractSchemaManager
⌊ SqliteSchemaManager
+ +
+ +

public class SqliteSchemaManager
extends AbstractSchemaManager + +

+ +

SqliteSchemaManager

+ +
+
License:
+
http://www.opensource.org/licenses/lgpl-license.php LGPL
+
Author:
+
Konsta Vesterinen
+
Lukas Smith (PEAR MDB2 library)
+
Jonathan H. Wage
+
Version:
+
$Revision$
+
Since:
+
2.0
+
+
+ + + +
Fields inherited from Doctrine\DBAL\Schema\AbstractSchemaManager
_conn, _platform
+ + + + + + + + + + + +
Method Summary
void

createDatabase(string database)

{@inheritdoc}

void

dropDatabase(string database)

{@inheritdoc}

+ + + +
Methods inherited from Doctrine\DBAL\Schema\AbstractSchemaManager
alterTable, createConstraint, createDatabase, createForeignKey, createIndex, createSchema, createSchemaConfig, createSequence, createTable, createView, dropAndCreateConstraint, dropAndCreateDatabase, dropAndCreateForeignKey, dropAndCreateIndex, dropAndCreateSequence, dropAndCreateTable, dropAndCreateView, dropConstraint, dropDatabase, dropForeignKey, dropIndex, dropSequence, dropTable, dropView, getDatabasePlatform, listDatabases, listSequences, listTableColumns, listTableDetails, listTableForeignKeys, listTableIndexes, listTableNames, listTables, listViews, renameTable, tryMethod
+ +

Method Detail

+
/Doctrine/DBAL/Schema/SqliteSchemaManager.php at line 53
+

createDatabase

+public void createDatabase(string database) +
+

+
Override.
+
Parameters:
+
database - The name of the database to create.
+
+
+ +
+ +
/Doctrine/DBAL/Schema/SqliteSchemaManager.php at line 41
+

dropDatabase

+public void dropDatabase(string database) +
+

+
Override.
+
Parameters:
+
database - The name of the database to drop
+
+
+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/dbal/schema/table.html b/lib/api/doctrine/dbal/schema/table.html new file mode 100644 index 000000000..5d36fe73e --- /dev/null +++ b/lib/api/doctrine/dbal/schema/table.html @@ -0,0 +1,621 @@ + + + + + + + + + + + +Table (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +
Doctrine\DBAL\Schema\Table
+
/Doctrine/DBAL/Schema/Table.php at line 37
+ +

Class Table

+ +
Class:Table - Superclass: AbstractAsset
+AbstractAsset
⌊ Table
+ +
+ +

public class Table
extends AbstractAsset + +

+ +

Object Representation of a table

+ +
+
License:
+
http://www.opensource.org/licenses/lgpl-license.php LGPL
+
See Also:
+
www.doctrine-project.org
+
Since:
+
2.0
+
Version:
+
$Revision$
+
Author:
+
Benjamin Eberlei
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Field Summary
final int

ID_IDENTITY

final int

$ID_NONE

final int

ID_SEQUENCE

protected array

$_columns

protected array

$_fkConstraints

protected bool

$_idGeneratorType

protected array

$_indexes

protected string

$_name

protected array

$_options

protected string

$_primaryKeyName

protected SchemaConfig

$_schemaConfig

+ + + +
Fields inherited from Doctrine\DBAL\Schema\AbstractAsset
_name
+ + + + + + +
Constructor Summary

Table(string tableName, array columns, array options, array indexes, array fkConstraints, int idGeneratorType)

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Method Summary
Column

addColumn(string columnName, mixed typeName, array options, string columnType)

Table

addForeignKeyConstraint(Table foreignTable, mixed localColumnNames, mixed foreignColumnNames, array options, array localColumns, array foreignColumns)

Add a foreign key constraintName is inferred from the local columns

Table

addIndex(array columnNames, string indexName)

Table

addNamedForeignKeyConstraint(string name, Table foreignTable, mixed localColumnNames, mixed foreignColumnNames, array options, array localColumns, array foreignColumns)

Add a foreign key constraint with a given name

Table

addOption(string name, string value)

Table

addUniqueIndex(array columnNames, string indexName)

Table

addUnnamedForeignKeyConstraint(Table foreignTable, mixed localColumnNames, mixed foreignColumnNames, array options, array localColumns, array foreignColumns)

Add a foreign key constraintName is to be generated by the database itsself.

Table

changeColumn(string columnName, array options)

Change Column Details

bool

columnsAreIndexed(array columnsNames)

Check if an index begins in the order of the given columns.

Table

dropColumn(string columnName)

Drop Column from Table

Column

getColumn(string columnName)

Get a column instance

Column[]

getColumns()

ForeignKeyConstraint

getForeignKey(string constraintName)

array

getForeignKeys()

Get Constraints

Index

getIndex(string indexName)

array

getIndexes()

void

getOption(mixed name)

void

getOptions()

Index

getPrimaryKey()

bool

hasColumn(string columnName)

Does this table have a column with the given name?

bool

hasForeignKey(string constraintName)

Does Table have a foreign key constraint with the given name?

bool

hasIndex(string indexName)

void

hasOption(mixed name)

bool

isIdGeneratorIdentity()

array

isIdGeneratorSequence()

Table

renameColumn(string oldColumnName, string newColumnName)

Rename Column

Table

setIdGeneratorType(string type)

Table

setPrimaryKey(array columns, string indexName)

Set Primary Key

void

setSchemaConfig(SchemaConfig schemaConfig)

void

visit(Visitor visitor)

+ + + +
Methods inherited from Doctrine\DBAL\Schema\AbstractAsset
getName
+ +

Field Detail

+
/Doctrine/DBAL/Schema/Table.php at line 52
+

ID_IDENTITY

+public final int ID_IDENTITY = 2 +
+

+ +
+ +
/Doctrine/DBAL/Schema/Table.php at line 42
+

ID_NONE

+public final int $ID_NONE +
+

+ +
+ +
/Doctrine/DBAL/Schema/Table.php at line 47
+

ID_SEQUENCE

+public final int ID_SEQUENCE = 1 +
+

+ +
+ +
/Doctrine/DBAL/Schema/Table.php at line 62
+

_columns

+protected array $_columns = array() +
+

+ +
+ +
/Doctrine/DBAL/Schema/Table.php at line 77
+

_fkConstraints

+protected array $_fkConstraints = array() +
+

+ +
+ +
/Doctrine/DBAL/Schema/Table.php at line 87
+

_idGeneratorType

+protected bool $_idGeneratorType = self::ID_NONE +
+

+ +
+ +
/Doctrine/DBAL/Schema/Table.php at line 67
+

_indexes

+protected array $_indexes = array() +
+

+ +
+ +
/Doctrine/DBAL/Schema/Table.php at line 57
+

_name

+protected string $_name = null +
+

+ +
+ +
/Doctrine/DBAL/Schema/Table.php at line 82
+

_options

+protected array $_options = array() +
+

+ +
+ +
/Doctrine/DBAL/Schema/Table.php at line 72
+

_primaryKeyName

+protected string $_primaryKeyName = false +
+

+ +
+ +
/Doctrine/DBAL/Schema/Table.php at line 92
+

_schemaConfig

+protected SchemaConfig $_schemaConfig = null +
+

+ +
+ +

Constructor Detail

+
/Doctrine/DBAL/Schema/Table.php at line 103
+

Table

+public Table(string tableName, array columns, array options, array indexes, array fkConstraints, int idGeneratorType) +
+

+ +
+ +

Method Detail

+
/Doctrine/DBAL/Schema/Table.php at line 266
+

addColumn

+public Column addColumn(string columnName, mixed typeName, array options, string columnType) +
+

+ +
+ +
/Doctrine/DBAL/Schema/Table.php at line 330
+

addForeignKeyConstraint

+public Table addForeignKeyConstraint(Table foreignTable, mixed localColumnNames, mixed foreignColumnNames, array options, array localColumns, array foreignColumns) +
+

Add a foreign key constraint

Name is inferred from the local columns

+ +
+ +
/Doctrine/DBAL/Schema/Table.php at line 181
+

addIndex

+public Table addIndex(array columnNames, string indexName) +
+

+ +
+ +
/Doctrine/DBAL/Schema/Table.php at line 362
+

addNamedForeignKeyConstraint

+public Table addNamedForeignKeyConstraint(string name, Table foreignTable, mixed localColumnNames, mixed foreignColumnNames, array options, array localColumns, array foreignColumns) +
+

Add a foreign key constraint with a given name

+ +
+ +
/Doctrine/DBAL/Schema/Table.php at line 395
+

addOption

+public Table addOption(string name, string value) +
+

+ +
+ +
/Doctrine/DBAL/Schema/Table.php at line 198
+

addUniqueIndex

+public Table addUniqueIndex(array columnNames, string indexName) +
+

+ +
+ +
/Doctrine/DBAL/Schema/Table.php at line 347
+

addUnnamedForeignKeyConstraint

+public Table addUnnamedForeignKeyConstraint(Table foreignTable, mixed localColumnNames, mixed foreignColumnNames, array options, array localColumns, array foreignColumns) +
+

Add a foreign key constraint

Name is to be generated by the database itsself.

+ +
+ +
/Doctrine/DBAL/Schema/Table.php at line 297
+

changeColumn

+public Table changeColumn(string columnName, array options) +
+

Change Column Details

+ +
+ +
/Doctrine/DBAL/Schema/Table.php at line 215
+

columnsAreIndexed

+public bool columnsAreIndexed(array columnsNames) +
+

Check if an index begins in the order of the given columns.

+ +
+ +
/Doctrine/DBAL/Schema/Table.php at line 310
+

dropColumn

+public Table dropColumn(string columnName) +
+

Drop Column from Table

+ +
+ +
/Doctrine/DBAL/Schema/Table.php at line 535
+

getColumn

+public Column getColumn(string columnName) +
+

Get a column instance

+ +
+ +
/Doctrine/DBAL/Schema/Table.php at line 511
+

getColumns

+public Column[] getColumns() +
+

+ +
+ +
/Doctrine/DBAL/Schema/Table.php at line 482
+

getForeignKey

+public ForeignKeyConstraint getForeignKey(string constraintName) +
+

+ +
+ +
/Doctrine/DBAL/Schema/Table.php at line 589
+

getForeignKeys

+public array getForeignKeys() +
+

Get Constraints

+ +
+ +
/Doctrine/DBAL/Schema/Table.php at line 567
+

getIndex

+public Index getIndex(string indexName) +
+

+ +
+ +
/Doctrine/DBAL/Schema/Table.php at line 579
+

getIndexes

+public array getIndexes() +
+

+ +
+ +
/Doctrine/DBAL/Schema/Table.php at line 599
+

getOption

+public void getOption(mixed name) +
+
+ +
+ +
/Doctrine/DBAL/Schema/Table.php at line 604
+

getOptions

+public void getOptions() +
+
+ +
+ +
/Doctrine/DBAL/Schema/Table.php at line 548
+

getPrimaryKey

+public Index getPrimaryKey() +
+

+ +
+ +
/Doctrine/DBAL/Schema/Table.php at line 523
+

hasColumn

+public bool hasColumn(string columnName) +
+

Does this table have a column with the given name?

+ +
+ +
/Doctrine/DBAL/Schema/Table.php at line 472
+

hasForeignKey

+public bool hasForeignKey(string constraintName) +
+

Does Table have a foreign key constraint with the given name?

+ +
+ +
/Doctrine/DBAL/Schema/Table.php at line 557
+

hasIndex

+public bool hasIndex(string indexName) +
+

+ +
+ +
/Doctrine/DBAL/Schema/Table.php at line 594
+

hasOption

+public void hasOption(mixed name) +
+
+ +
+ +
/Doctrine/DBAL/Schema/Table.php at line 495
+

isIdGeneratorIdentity

+public bool isIdGeneratorIdentity() +
+

+ +
+ +
/Doctrine/DBAL/Schema/Table.php at line 503
+

isIdGeneratorSequence

+public array isIdGeneratorSequence() +
+

+ +
+ +
/Doctrine/DBAL/Schema/Table.php at line 281
+

renameColumn

+public Table renameColumn(string oldColumnName, string newColumnName) +
+

Rename Column

+ +
+ +
/Doctrine/DBAL/Schema/Table.php at line 170
+

setIdGeneratorType

+public Table setIdGeneratorType(string type) +
+

+ +
+ +
/Doctrine/DBAL/Schema/Table.php at line 154
+

setPrimaryKey

+public Table setPrimaryKey(array columns, string indexName) +
+

Set Primary Key

+ +
+ +
/Doctrine/DBAL/Schema/Table.php at line 130
+

setSchemaConfig

+public void setSchemaConfig(SchemaConfig schemaConfig) +
+

+ +
+ +
/Doctrine/DBAL/Schema/Table.php at line 612
+

visit

+public void visit(Visitor visitor) +
+

+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/dbal/schema/tablediff.html b/lib/api/doctrine/dbal/schema/tablediff.html new file mode 100644 index 000000000..da0016724 --- /dev/null +++ b/lib/api/doctrine/dbal/schema/tablediff.html @@ -0,0 +1,260 @@ + + + + + + + + + + + +TableDiff (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +
Doctrine\DBAL\Schema\TableDiff
+
/Doctrine/DBAL/Schema/TableDiff.php at line 35
+ +

Class TableDiff

+ +
TableDiff
+ +
+ +

public class TableDiff

+ +

Table Diff

+ +
+
License:
+
http://www.opensource.org/licenses/lgpl-license.php LGPL
+
http://ez.no/licenses/new_bsd New BSD License
+
See Also:
+
www.doctrine-project.org
+
Copyright:
+
Copyright (C) 2005-2009 eZ Systems AS. All rights reserved.
+
Since:
+
2.0
+
Version:
+
$Revision$
+
Author:
+
Benjamin Eberlei
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Field Summary
array(string=>Column)

$addedColumns

All added fields

array

$addedForeignKeys

All added foreign key definitions

array(string=>Index)

$addedIndexes

All added indexes

array(string=>Column)

$changedColumns

All changed fields

array

$changedForeignKeys

All changed foreign keys

array(string=>Index)

$changedIndexes

All changed indexes

string

$name

string

$newName

array(string=>bool)

$removedColumns

All removed fields

array

$removedForeignKeys

All removed foreign keys

array(string=>bool)

$removedIndexes

All removed indexes

array(string=>Column)

$renamedColumns

Columns that are only renamed from key to column instance name.

+ + + + + + +
Constructor Summary

TableDiff(mixed tableName, array(string=>Column) addedColumns, array(string=>Column) changedColumns, array(string=>bool) removedColumns, array(string=>Index) addedIndexes, array(string=>Index) changedIndexes, array(string=>bool) removedIndexes)

Constructs an TableDiff object.

+ +

Field Detail

+
/Doctrine/DBAL/Schema/TableDiff.php at line 52
+

addedColumns

+public array(string=>Column) $addedColumns +
+

All added fields

+ +
+ +
/Doctrine/DBAL/Schema/TableDiff.php at line 101
+

addedForeignKeys

+public array $addedForeignKeys = array() +
+

All added foreign key definitions

+ +
+ +
/Doctrine/DBAL/Schema/TableDiff.php at line 80
+

addedIndexes

+public array(string=>Index) $addedIndexes = array() +
+

All added indexes

+ +
+ +
/Doctrine/DBAL/Schema/TableDiff.php at line 59
+

changedColumns

+public array(string=>Column) $changedColumns = array() +
+

All changed fields

+ +
+ +
/Doctrine/DBAL/Schema/TableDiff.php at line 108
+

changedForeignKeys

+public array $changedForeignKeys = array() +
+

All changed foreign keys

+ +
+ +
/Doctrine/DBAL/Schema/TableDiff.php at line 87
+

changedIndexes

+public array(string=>Index) $changedIndexes = array() +
+

All changed indexes

+ +
+ +
/Doctrine/DBAL/Schema/TableDiff.php at line 40
+

name

+public string $name = null +
+

+ +
+ +
/Doctrine/DBAL/Schema/TableDiff.php at line 45
+

newName

+public string $newName = false +
+

+ +
+ +
/Doctrine/DBAL/Schema/TableDiff.php at line 66
+

removedColumns

+public array(string=>bool) $removedColumns = array() +
+

All removed fields

+ +
+ +
/Doctrine/DBAL/Schema/TableDiff.php at line 115
+

removedForeignKeys

+public array $removedForeignKeys = array() +
+

All removed foreign keys

+ +
+ +
/Doctrine/DBAL/Schema/TableDiff.php at line 94
+

removedIndexes

+public array(string=>bool) $removedIndexes = array() +
+

All removed indexes

+ +
+ +
/Doctrine/DBAL/Schema/TableDiff.php at line 73
+

renamedColumns

+public array(string=>Column) $renamedColumns = array() +
+

Columns that are only renamed from key to column instance name.

+ +
+ +

Constructor Detail

+
/Doctrine/DBAL/Schema/TableDiff.php at line 127
+

TableDiff

+public TableDiff(mixed tableName, array(string=>Column) addedColumns, array(string=>Column) changedColumns, array(string=>bool) removedColumns, array(string=>Index) addedIndexes, array(string=>Index) changedIndexes, array(string=>bool) removedIndexes) +
+

Constructs an TableDiff object.

+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/dbal/schema/view.html b/lib/api/doctrine/dbal/schema/view.html new file mode 100644 index 000000000..0ffbbfdb9 --- /dev/null +++ b/lib/api/doctrine/dbal/schema/view.html @@ -0,0 +1,136 @@ + + + + + + + + + + + +View (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +
Doctrine\DBAL\Schema\View
+
/Doctrine/DBAL/Schema/View.php at line 33
+ +

Class View

+ +
Class:View - Superclass: AbstractAsset
+AbstractAsset
⌊ View
+ +
+ +

public class View
extends AbstractAsset + +

+ +

Representation of a Database View

+ +
+
License:
+
http://www.opensource.org/licenses/lgpl-license.php LGPL
+
See Also:
+
www.doctrine-project.com
+
Since:
+
1.0
+
Version:
+
$Revision$
+
Author:
+
Benjamin Eberlei
+
+
+ + + +
Fields inherited from Doctrine\DBAL\Schema\AbstractAsset
_name
+ + + + + + +
Constructor Summary

View(mixed name, mixed sql)

+ + + + + + + +
Method Summary
string

getSql()

+ + + +
Methods inherited from Doctrine\DBAL\Schema\AbstractAsset
getName
+ +

Constructor Detail

+
/Doctrine/DBAL/Schema/View.php at line 40
+

View

+public View(mixed name, mixed sql) +
+
+ +
+ +

Method Detail

+
/Doctrine/DBAL/Schema/View.php at line 49
+

getSql

+public string getSql() +
+

+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/dbal/schema/visitor/createschemasqlcollector.html b/lib/api/doctrine/dbal/schema/visitor/createschemasqlcollector.html new file mode 100644 index 000000000..c5b00b782 --- /dev/null +++ b/lib/api/doctrine/dbal/schema/visitor/createschemasqlcollector.html @@ -0,0 +1,195 @@ + + + + + + + + + + + +CreateSchemaSqlCollector (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +
Doctrine\DBAL\Schema\Visitor\CreateSchemaSqlCollector
+
/Doctrine/DBAL/Schema/Visitor/CreateSchemaSqlCollector.php at line 33
+ +

Class CreateSchemaSqlCollector

+ +
CreateSchemaSqlCollector
+ +
+ +

public class CreateSchemaSqlCollector

+ +
+ + + + + + +
Constructor Summary

CreateSchemaSqlCollector(AbstractPlatform platform)

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Method Summary
void

acceptColumn(mixed table, mixed column)

void

acceptForeignKey(Table localTable, ForeignKeyConstraint fkConstraint)

void

acceptIndex(Table table, Index index)

void

acceptSchema(Schema schema)

void

acceptSequence(Sequence sequence)

void

acceptTable(Table table)

Generate DDL Statements to create the accepted table with all its dependencies.

array

getQueries()

Get all queries collected so far.

array

resetQueries()

+ +

Constructor Detail

+
/Doctrine/DBAL/Schema/Visitor/CreateSchemaSqlCollector.php at line 59
+

CreateSchemaSqlCollector

+public CreateSchemaSqlCollector(AbstractPlatform platform) +
+

+ +
+ +

Method Detail

+
/Doctrine/DBAL/Schema/Visitor/CreateSchemaSqlCollector.php at line 84
+

acceptColumn

+public void acceptColumn(mixed table, mixed column) +
+
+ +
+ +
/Doctrine/DBAL/Schema/Visitor/CreateSchemaSqlCollector.php at line 93
+

acceptForeignKey

+public void acceptForeignKey(Table localTable, ForeignKeyConstraint fkConstraint) +
+

+ +
+ +
/Doctrine/DBAL/Schema/Visitor/CreateSchemaSqlCollector.php at line 107
+

acceptIndex

+public void acceptIndex(Table table, Index index) +
+

+ +
+ +
/Doctrine/DBAL/Schema/Visitor/CreateSchemaSqlCollector.php at line 67
+

acceptSchema

+public void acceptSchema(Schema schema) +
+

+ +
+ +
/Doctrine/DBAL/Schema/Visitor/CreateSchemaSqlCollector.php at line 115
+

acceptSequence

+public void acceptSequence(Sequence sequence) +
+

+ +
+ +
/Doctrine/DBAL/Schema/Visitor/CreateSchemaSqlCollector.php at line 77
+

acceptTable

+public void acceptTable(Table table) +
+

Generate DDL Statements to create the accepted table with all its dependencies.

+ +
+ +
/Doctrine/DBAL/Schema/Visitor/CreateSchemaSqlCollector.php at line 137
+

getQueries

+public array getQueries() +
+

Get all queries collected so far.

+ +
+ +
/Doctrine/DBAL/Schema/Visitor/CreateSchemaSqlCollector.php at line 125
+

resetQueries

+public array resetQueries() +
+

+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/dbal/schema/visitor/dropschemasqlcollector.html b/lib/api/doctrine/dbal/schema/visitor/dropschemasqlcollector.html new file mode 100644 index 000000000..bac338234 --- /dev/null +++ b/lib/api/doctrine/dbal/schema/visitor/dropschemasqlcollector.html @@ -0,0 +1,209 @@ + + + + + + + + + + + +DropSchemaSqlCollector (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +
Doctrine\DBAL\Schema\Visitor\DropSchemaSqlCollector
+
/Doctrine/DBAL/Schema/Visitor/DropSchemaSqlCollector.php at line 42
+ +

Class DropSchemaSqlCollector

+ +
DropSchemaSqlCollector
+ +
+ +

public class DropSchemaSqlCollector

+ +

Gather SQL statements that allow to completly drop the current schema.

+ +
+
License:
+
http://www.opensource.org/licenses/lgpl-license.php LGPL
+
See Also:
+
www.doctrine-project.org
+
Since:
+
2.0
+
Version:
+
$Revision$
+
Author:
+
Benjamin Eberlei
+
+
+ + + + + + +
Constructor Summary

DropSchemaSqlCollector(AbstractPlatform platform)

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Method Summary
void

acceptColumn(mixed table, Column column)

void

acceptForeignKey(Table localTable, ForeignKeyConstraint fkConstraint)

void

acceptIndex(Table table, Index index)

void

acceptSchema(Schema schema)

void

acceptSequence(Sequence sequence)

void

acceptTable(Table table)

array

clearQueries()

array

getQueries()

+ +

Constructor Detail

+
/Doctrine/DBAL/Schema/Visitor/DropSchemaSqlCollector.php at line 68
+

DropSchemaSqlCollector

+public DropSchemaSqlCollector(AbstractPlatform platform) +
+

+ +
+ +

Method Detail

+
/Doctrine/DBAL/Schema/Visitor/DropSchemaSqlCollector.php at line 92
+

acceptColumn

+public void acceptColumn(mixed table, Column column) +
+

+ +
+ +
/Doctrine/DBAL/Schema/Visitor/DropSchemaSqlCollector.php at line 101
+

acceptForeignKey

+public void acceptForeignKey(Table localTable, ForeignKeyConstraint fkConstraint) +
+

+ +
+ +
/Doctrine/DBAL/Schema/Visitor/DropSchemaSqlCollector.php at line 114
+

acceptIndex

+public void acceptIndex(Table table, Index index) +
+

+ +
+ +
/Doctrine/DBAL/Schema/Visitor/DropSchemaSqlCollector.php at line 76
+

acceptSchema

+public void acceptSchema(Schema schema) +
+

+ +
+ +
/Doctrine/DBAL/Schema/Visitor/DropSchemaSqlCollector.php at line 122
+

acceptSequence

+public void acceptSequence(Sequence sequence) +
+

+ +
+ +
/Doctrine/DBAL/Schema/Visitor/DropSchemaSqlCollector.php at line 84
+

acceptTable

+public void acceptTable(Table table) +
+

+ +
+ +
/Doctrine/DBAL/Schema/Visitor/DropSchemaSqlCollector.php at line 130
+

clearQueries

+public array clearQueries() +
+

+ +
+ +
/Doctrine/DBAL/Schema/Visitor/DropSchemaSqlCollector.php at line 138
+

getQueries

+public array getQueries() +
+

+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/dbal/schema/visitor/fixschema.html b/lib/api/doctrine/dbal/schema/visitor/fixschema.html new file mode 100644 index 000000000..66f8bc9b3 --- /dev/null +++ b/lib/api/doctrine/dbal/schema/visitor/fixschema.html @@ -0,0 +1,171 @@ + + + + + + + + + + + +FixSchema (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +
Doctrine\DBAL\Schema\Visitor\FixSchema
+
/Doctrine/DBAL/Schema/Visitor/FixSchema.php at line 14
+ +

Class FixSchema

+ +
FixSchema
+ +
+ +

public class FixSchema

+ +
+ + + + + + +
Constructor Summary

FixSchema(mixed addExplicitIndexForForeignKey)

+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
Method Summary
void

acceptColumn(mixed table, Column column)

void

acceptForeignKey(Table localTable, ForeignKeyConstraint fkConstraint)

void

acceptIndex(Table table, Index index)

void

acceptSchema(Schema schema)

void

acceptSequence(Sequence sequence)

void

acceptTable(Table table)

+ +

Constructor Detail

+
/Doctrine/DBAL/Schema/Visitor/FixSchema.php at line 21
+

FixSchema

+public FixSchema(mixed addExplicitIndexForForeignKey) +
+
+ +
+ +

Method Detail

+
/Doctrine/DBAL/Schema/Visitor/FixSchema.php at line 45
+

acceptColumn

+public void acceptColumn(mixed table, Column column) +
+

+ +
+ +
/Doctrine/DBAL/Schema/Visitor/FixSchema.php at line 54
+

acceptForeignKey

+public void acceptForeignKey(Table localTable, ForeignKeyConstraint fkConstraint) +
+

+ +
+ +
/Doctrine/DBAL/Schema/Visitor/FixSchema.php at line 70
+

acceptIndex

+public void acceptIndex(Table table, Index index) +
+

+ +
+ +
/Doctrine/DBAL/Schema/Visitor/FixSchema.php at line 29
+

acceptSchema

+public void acceptSchema(Schema schema) +
+

+ +
+ +
/Doctrine/DBAL/Schema/Visitor/FixSchema.php at line 78
+

acceptSequence

+public void acceptSequence(Sequence sequence) +
+

+ +
+ +
/Doctrine/DBAL/Schema/Visitor/FixSchema.php at line 37
+

acceptTable

+public void acceptTable(Table table) +
+

+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/dbal/schema/visitor/package-frame.html b/lib/api/doctrine/dbal/schema/visitor/package-frame.html new file mode 100644 index 000000000..64b3218d3 --- /dev/null +++ b/lib/api/doctrine/dbal/schema/visitor/package-frame.html @@ -0,0 +1,33 @@ + + + + + + + + + + + +Doctrine\DBAL\Schema\Visitor (Doctrine) + + + + +

Doctrine\DBAL\Schema\Visitor

+ +

Classes

+ + +

Interfaces

+ + + + + \ No newline at end of file diff --git a/lib/api/doctrine/dbal/schema/visitor/package-functions.html b/lib/api/doctrine/dbal/schema/visitor/package-functions.html new file mode 100644 index 000000000..31640f940 --- /dev/null +++ b/lib/api/doctrine/dbal/schema/visitor/package-functions.html @@ -0,0 +1,69 @@ + + + + + + + + + + + +Functions (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +

Functions

+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/dbal/schema/visitor/package-globals.html b/lib/api/doctrine/dbal/schema/visitor/package-globals.html new file mode 100644 index 000000000..e9c3e7ee3 --- /dev/null +++ b/lib/api/doctrine/dbal/schema/visitor/package-globals.html @@ -0,0 +1,69 @@ + + + + + + + + + + + +Globals (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +

Globals

+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/dbal/schema/visitor/package-summary.html b/lib/api/doctrine/dbal/schema/visitor/package-summary.html new file mode 100644 index 000000000..e24a8d237 --- /dev/null +++ b/lib/api/doctrine/dbal/schema/visitor/package-summary.html @@ -0,0 +1,71 @@ + + + + + + + + + + + +Doctrine\DBAL\Schema\Visitor (Doctrine) + + + + +
+

Doctrine

+ +
+ + +
+ +

Namespace Doctrine\DBAL\Schema\Visitor

+ + + + + + +
Class Summary
CreateSchemaSqlCollector
DropSchemaSqlCollectorGather SQL statements that allow to completly drop the current schema.
FixSchema
+ + + + +
Interface Summary
VisitorSchema Visitor used for Validation or Generation purposes.
+ +
+ +
+

Doctrine

+ +
+ + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/dbal/schema/visitor/package-tree.html b/lib/api/doctrine/dbal/schema/visitor/package-tree.html new file mode 100644 index 000000000..86001160c --- /dev/null +++ b/lib/api/doctrine/dbal/schema/visitor/package-tree.html @@ -0,0 +1,58 @@ + + + + + + + + + + + +Doctrine\DBAL\Schema\Visitor (Doctrine) + + + + +
+

Doctrine

+ +
+ + +

Class Hierarchy for Package Doctrine\DBAL\Schema\Visitor

+
+

Doctrine

+ +
+ + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/dbal/schema/visitor/visitor.html b/lib/api/doctrine/dbal/schema/visitor/visitor.html new file mode 100644 index 000000000..cbc2dfdd3 --- /dev/null +++ b/lib/api/doctrine/dbal/schema/visitor/visitor.html @@ -0,0 +1,169 @@ + + + + + + + + + + + +Visitor (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +
Doctrine\DBAL\Schema\Visitor\Visitor
+
/Doctrine/DBAL/Schema/Visitor/Visitor.php at line 42
+ +

Interface Visitor

+ +
Visitor
+ +
+ +

public interface Visitor

+ +

Schema Visitor used for Validation or Generation purposes.

+ +
+
License:
+
http://www.opensource.org/licenses/lgpl-license.php LGPL
+
See Also:
+
www.doctrine-project.org
+
Since:
+
2.0
+
Version:
+
$Revision$
+
Author:
+
Benjamin Eberlei
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
Method Summary
void

acceptColumn(mixed table, Column column)

void

acceptForeignKey(Table localTable, ForeignKeyConstraint fkConstraint)

void

acceptIndex(Table table, Index index)

void

acceptSchema(Schema schema)

void

acceptSequence(Sequence sequence)

void

acceptTable(Table table)

+ +

Method Detail

+
/Doctrine/DBAL/Schema/Visitor/Visitor.php at line 57
+

acceptColumn

+public void acceptColumn(mixed table, Column column) +
+

+ +
+ +
/Doctrine/DBAL/Schema/Visitor/Visitor.php at line 63
+

acceptForeignKey

+public void acceptForeignKey(Table localTable, ForeignKeyConstraint fkConstraint) +
+

+ +
+ +
/Doctrine/DBAL/Schema/Visitor/Visitor.php at line 69
+

acceptIndex

+public void acceptIndex(Table table, Index index) +
+

+ +
+ +
/Doctrine/DBAL/Schema/Visitor/Visitor.php at line 47
+

acceptSchema

+public void acceptSchema(Schema schema) +
+

+ +
+ +
/Doctrine/DBAL/Schema/Visitor/Visitor.php at line 74
+

acceptSequence

+public void acceptSequence(Sequence sequence) +
+

+ +
+ +
/Doctrine/DBAL/Schema/Visitor/Visitor.php at line 52
+

acceptTable

+public void acceptTable(Table table) +
+

+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/dbal/statement.html b/lib/api/doctrine/dbal/statement.html new file mode 100644 index 000000000..700110238 --- /dev/null +++ b/lib/api/doctrine/dbal/statement.html @@ -0,0 +1,302 @@ + + + + + + + + + + + +Statement (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +
Doctrine\DBAL\Statement
+
/Doctrine/DBAL/Statement.php at line 35
+ +

Class Statement

+ +
Statement
+ +
+ +

public class Statement

+ +

A thin wrapper around a Doctrine\DBAL\Driver\Statement that adds support +for logging, DBAL mapping types, etc.

+ +
+
Author:
+
Roman Borschel
+
Since:
+
2.0
+
+
+ + + + + + +
Constructor Summary

Statement(string sql, mixed conn, Doctrine\DBAL\Connection The)

Creates a new Statement for the given SQL and Connection.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Method Summary
boolean

bindParam(string name, mixed var, integer type, mixed value)

Binds a parameter to a value by reference. +

boolean

bindValue(mixed name, mixed value, mixed type, $value The)

Binds a parameter value to the statement. +

boolean

closeCursor()

Closes the cursor, freeing the database resources used by this statement.

integer

columnCount()

Returns the number of columns in the result set.

string

errorCode()

Fetches the SQLSTATE associated with the last operation on the statement.

array

errorInfo()

Fetches extended error information associated with the last operation on the statement.

boolean

execute(mixed params)

Executes the statement with the currently bound parameters.

mixed

fetch(integer fetchStyle)

Fetches the next row from a result set.

array

fetchAll(integer fetchStyle, integer columnIndex)

Returns an array containing all of the result set rows.

mixed

fetchColumn(integer columnIndex)

Returns a single column from the next row of a result set.

Doctrine\DBAL\Driver\Statement

getWrappedStatement()

Gets the wrapped driver statement.

integer

rowCount()

Returns the number of rows affected by the last execution of this statement.

+ +

Constructor Detail

+
/Doctrine/DBAL/Statement.php at line 64
+

Statement

+public Statement(string sql, mixed conn, Doctrine\DBAL\Connection The) +
+

Creates a new Statement for the given SQL and Connection.

+
Parameters:
+
sql - The SQL of the statement.
+
The - connection on which the statement should be executed.
+
+
+ +
+ +

Method Detail

+
/Doctrine/DBAL/Statement.php at line 114
+

bindParam

+public boolean bindParam(string name, mixed var, integer type, mixed value) +
+

Binds a parameter to a value by reference.

Binding a parameter by reference does not support DBAL mapping types.

+
Parameters:
+
name - The name or position of the parameter.
+
value - The reference to the variable to bind
+
type - The PDO binding type.
+
Returns:
+
TRUE on success, FALSE on failure.
+
+
+ +
+ +
/Doctrine/DBAL/Statement.php at line 85
+

bindValue

+public boolean bindValue(mixed name, mixed value, mixed type, $value The) +
+

Binds a parameter value to the statement.

The value can optionally be bound with a PDO binding type or a DBAL mapping type. +If bound with a DBAL mapping type, the binding type is derived from the mapping +type and the value undergoes the conversion routines of the mapping type before +being bound.

+
Parameters:
+
The - name or position of the parameter.
+
The - value of the parameter.
+
type - Either a PDO binding type or a DBAL mapping type name or instance.
+
Returns:
+
TRUE on success, FALSE on failure.
+
+
+ +
+ +
/Doctrine/DBAL/Statement.php at line 138
+

closeCursor

+public boolean closeCursor() +
+

Closes the cursor, freeing the database resources used by this statement.

+
Returns:
+
TRUE on success, FALSE on failure.
+
+
+ +
+ +
/Doctrine/DBAL/Statement.php at line 148
+

columnCount

+public integer columnCount() +
+

Returns the number of columns in the result set.

+ +
+ +
/Doctrine/DBAL/Statement.php at line 158
+

errorCode

+public string errorCode() +
+

Fetches the SQLSTATE associated with the last operation on the statement.

+ +
+ +
/Doctrine/DBAL/Statement.php at line 168
+

errorInfo

+public array errorInfo() +
+

Fetches extended error information associated with the last operation on the statement.

+ +
+ +
/Doctrine/DBAL/Statement.php at line 124
+

execute

+public boolean execute(mixed params) +
+

Executes the statement with the currently bound parameters.

+
Returns:
+
TRUE on success, FALSE on failure.
+
+
+ +
+ +
/Doctrine/DBAL/Statement.php at line 180
+

fetch

+public mixed fetch(integer fetchStyle) +
+

Fetches the next row from a result set.

+
Returns:
+
The return value of this function on success depends on the fetch type. In all cases, FALSE is returned on failure.
+
+
+ +
+ +
/Doctrine/DBAL/Statement.php at line 192
+

fetchAll

+public array fetchAll(integer fetchStyle, integer columnIndex) +
+

Returns an array containing all of the result set rows.

+
Returns:
+
An array containing all of the remaining rows in the result set.
+
+
+ +
+ +
/Doctrine/DBAL/Statement.php at line 206
+

fetchColumn

+public mixed fetchColumn(integer columnIndex) +
+

Returns a single column from the next row of a result set.

+
Returns:
+
A single column from the next row of a result set or FALSE if there are no more rows.
+
+
+ +
+ +
/Doctrine/DBAL/Statement.php at line 226
+

getWrappedStatement

+public Doctrine\DBAL\Driver\Statement getWrappedStatement() +
+

Gets the wrapped driver statement.

+ +
+ +
/Doctrine/DBAL/Statement.php at line 216
+

rowCount

+public integer rowCount() +
+

Returns the number of rows affected by the last execution of this statement.

+
Returns:
+
The number of affected rows.
+
+
+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/dbal/tools/console/command/importcommand.html b/lib/api/doctrine/dbal/tools/console/command/importcommand.html new file mode 100644 index 000000000..19c311e34 --- /dev/null +++ b/lib/api/doctrine/dbal/tools/console/command/importcommand.html @@ -0,0 +1,136 @@ + + + + + + + + + + + +ImportCommand (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +
Doctrine\DBAL\Tools\Console\Command\ImportCommand
+
/Doctrine/DBAL/Tools/Console/Command/ImportCommand.php at line 40
+ +

Class ImportCommand

+ +
Class:ImportCommand - Superclass: Console
+Console
⌊ ImportCommand
+ +
+ +

public class ImportCommand
extends Console + +

+ +

Task for executing arbitrary SQL that can come from a file or directly from +the command line.

+ +
+
License:
+
http://www.opensource.org/licenses/lgpl-license.php LGPL
+
See Also:
+
www.doctrine-project.org
+
Since:
+
2.0
+
Version:
+
$Revision$
+
Author:
+
Benjamin Eberlei
+
Guilherme Blanco
+
Jonathan Wage
+
Roman Borschel
+
+
+ + + + + + + + + + + +
Method Summary
protected void

configure()

protected void

execute(mixed input, mixed output)

+ +

Method Detail

+
/Doctrine/DBAL/Tools/Console/Command/ImportCommand.php at line 45
+

configure

+protected void configure() +
+

+
See Also:
+
Console\Command\Command
+
+
+ +
+ +
/Doctrine/DBAL/Tools/Console/Command/ImportCommand.php at line 64
+

execute

+protected void execute(mixed input, mixed output) +
+

+
See Also:
+
Console\Command\Command
+
+
+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/dbal/tools/console/command/package-frame.html b/lib/api/doctrine/dbal/tools/console/command/package-frame.html new file mode 100644 index 000000000..a77fb8022 --- /dev/null +++ b/lib/api/doctrine/dbal/tools/console/command/package-frame.html @@ -0,0 +1,27 @@ + + + + + + + + + + + +Doctrine\DBAL\Tools\Console\Command (Doctrine) + + + + +

Doctrine\DBAL\Tools\Console\Command

+ +

Classes

+ + + + + \ No newline at end of file diff --git a/lib/api/doctrine/dbal/tools/console/command/package-functions.html b/lib/api/doctrine/dbal/tools/console/command/package-functions.html new file mode 100644 index 000000000..50c3e7dc5 --- /dev/null +++ b/lib/api/doctrine/dbal/tools/console/command/package-functions.html @@ -0,0 +1,69 @@ + + + + + + + + + + + +Functions (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +

Functions

+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/dbal/tools/console/command/package-globals.html b/lib/api/doctrine/dbal/tools/console/command/package-globals.html new file mode 100644 index 000000000..bb7bef98a --- /dev/null +++ b/lib/api/doctrine/dbal/tools/console/command/package-globals.html @@ -0,0 +1,69 @@ + + + + + + + + + + + +Globals (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +

Globals

+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/dbal/tools/console/command/package-summary.html b/lib/api/doctrine/dbal/tools/console/command/package-summary.html new file mode 100644 index 000000000..145bce8ef --- /dev/null +++ b/lib/api/doctrine/dbal/tools/console/command/package-summary.html @@ -0,0 +1,67 @@ + + + + + + + + + + + +Doctrine\DBAL\Tools\Console\Command (Doctrine) + + + + +
+

Doctrine

+ +
+ + +
+ +

Namespace Doctrine\DBAL\Tools\Console\Command

+ + + + + +
Class Summary
ImportCommandTask for executing arbitrary SQL that can come from a file or directly from +the command line.
RunSqlCommandTask for executing arbitrary SQL that can come from a file or directly from +the command line.
+ +
+ +
+

Doctrine

+ +
+ + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/dbal/tools/console/command/package-tree.html b/lib/api/doctrine/dbal/tools/console/command/package-tree.html new file mode 100644 index 000000000..75c1b0d2e --- /dev/null +++ b/lib/api/doctrine/dbal/tools/console/command/package-tree.html @@ -0,0 +1,53 @@ + + + + + + + + + + + +Doctrine\DBAL\Tools\Console\Command (Doctrine) + + + + +
+

Doctrine

+ +
+ + +

Class Hierarchy for Package Doctrine\DBAL\Tools\Console\Command

+

Doctrine

+ +
+ + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/dbal/tools/console/command/runsqlcommand.html b/lib/api/doctrine/dbal/tools/console/command/runsqlcommand.html new file mode 100644 index 000000000..259f9c2b0 --- /dev/null +++ b/lib/api/doctrine/dbal/tools/console/command/runsqlcommand.html @@ -0,0 +1,136 @@ + + + + + + + + + + + +RunSqlCommand (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +
Doctrine\DBAL\Tools\Console\Command\RunSqlCommand
+
/Doctrine/DBAL/Tools/Console/Command/RunSqlCommand.php at line 41
+ +

Class RunSqlCommand

+ +
Class:RunSqlCommand - Superclass: Console
+Console
⌊ RunSqlCommand
+ +
+ +

public class RunSqlCommand
extends Console + +

+ +

Task for executing arbitrary SQL that can come from a file or directly from +the command line.

+ +
+
License:
+
http://www.opensource.org/licenses/lgpl-license.php LGPL
+
See Also:
+
www.doctrine-project.org
+
Since:
+
2.0
+
Version:
+
$Revision$
+
Author:
+
Benjamin Eberlei
+
Guilherme Blanco
+
Jonathan Wage
+
Roman Borschel
+
+
+ + + + + + + + + + + +
Method Summary
protected void

configure()

protected void

execute(mixed input, mixed output)

+ +

Method Detail

+
/Doctrine/DBAL/Tools/Console/Command/RunSqlCommand.php at line 46
+

configure

+protected void configure() +
+

+
See Also:
+
Console\Command\Command
+
+
+ +
+ +
/Doctrine/DBAL/Tools/Console/Command/RunSqlCommand.php at line 64
+

execute

+protected void execute(mixed input, mixed output) +
+

+
See Also:
+
Console\Command\Command
+
+
+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/dbal/tools/console/helper/connectionhelper.html b/lib/api/doctrine/dbal/tools/console/helper/connectionhelper.html new file mode 100644 index 000000000..166f79252 --- /dev/null +++ b/lib/api/doctrine/dbal/tools/console/helper/connectionhelper.html @@ -0,0 +1,168 @@ + + + + + + + + + + + +ConnectionHelper (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +
Doctrine\DBAL\Tools\Console\Helper\ConnectionHelper
+
/Doctrine/DBAL/Tools/Console/Helper/ConnectionHelper.php at line 39
+ +

Class ConnectionHelper

+ +
Class:ConnectionHelper - Superclass: Helper
+Helper
⌊ ConnectionHelper
+ +
+ +

public class ConnectionHelper
extends Helper + +

+ +

Doctrine CLI Connection Helper.

+ +
+
License:
+
http://www.opensource.org/licenses/lgpl-license.php LGPL
+
See Also:
+
www.doctrine-project.org
+
Since:
+
2.0
+
Version:
+
$Revision$
+
Author:
+
Benjamin Eberlei
+
Guilherme Blanco
+
Jonathan Wage
+
Roman Borschel
+
+
+ + + + + + + +
Field Summary
protected Connection

$_connection

Doctrine Database Connection

+ + + + + + +
Constructor Summary

ConnectionHelper(Connection connection)

Constructor

+ + + + + + + + + + + +
Method Summary
Connection

getConnection()

Retrieves Doctrine Database Connection

void

getName()

+ +

Field Detail

+
/Doctrine/DBAL/Tools/Console/Helper/ConnectionHelper.php at line 45
+

_connection

+protected Connection $_connection +
+

Doctrine Database Connection

+ +
+ +

Constructor Detail

+
/Doctrine/DBAL/Tools/Console/Helper/ConnectionHelper.php at line 52
+

ConnectionHelper

+public ConnectionHelper(Connection connection) +
+

Constructor

+
Parameters:
+
connection - Doctrine Database Connection
+
+
+ +
+ +

Method Detail

+
/Doctrine/DBAL/Tools/Console/Helper/ConnectionHelper.php at line 62
+

getConnection

+public Connection getConnection() +
+

Retrieves Doctrine Database Connection

+ +
+ +
/Doctrine/DBAL/Tools/Console/Helper/ConnectionHelper.php at line 70
+

getName

+public void getName() +
+

+
See Also:
+
Helper
+
+
+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/dbal/tools/console/helper/package-frame.html b/lib/api/doctrine/dbal/tools/console/helper/package-frame.html new file mode 100644 index 000000000..d2bfd107d --- /dev/null +++ b/lib/api/doctrine/dbal/tools/console/helper/package-frame.html @@ -0,0 +1,26 @@ + + + + + + + + + + + +Doctrine\DBAL\Tools\Console\Helper (Doctrine) + + + + +

Doctrine\DBAL\Tools\Console\Helper

+ +

Classes

+ + + + + \ No newline at end of file diff --git a/lib/api/doctrine/dbal/tools/console/helper/package-functions.html b/lib/api/doctrine/dbal/tools/console/helper/package-functions.html new file mode 100644 index 000000000..3de12f655 --- /dev/null +++ b/lib/api/doctrine/dbal/tools/console/helper/package-functions.html @@ -0,0 +1,69 @@ + + + + + + + + + + + +Functions (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +

Functions

+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/dbal/tools/console/helper/package-globals.html b/lib/api/doctrine/dbal/tools/console/helper/package-globals.html new file mode 100644 index 000000000..b4cef095a --- /dev/null +++ b/lib/api/doctrine/dbal/tools/console/helper/package-globals.html @@ -0,0 +1,69 @@ + + + + + + + + + + + +Globals (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +

Globals

+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/dbal/tools/console/helper/package-summary.html b/lib/api/doctrine/dbal/tools/console/helper/package-summary.html new file mode 100644 index 000000000..3fd55ac88 --- /dev/null +++ b/lib/api/doctrine/dbal/tools/console/helper/package-summary.html @@ -0,0 +1,64 @@ + + + + + + + + + + + +Doctrine\DBAL\Tools\Console\Helper (Doctrine) + + + + +
+

Doctrine

+ +
+ + +
+ +

Namespace Doctrine\DBAL\Tools\Console\Helper

+ + + + +
Class Summary
ConnectionHelperDoctrine CLI Connection Helper.
+ +
+ +
+

Doctrine

+ +
+ + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/dbal/tools/console/helper/package-tree.html b/lib/api/doctrine/dbal/tools/console/helper/package-tree.html new file mode 100644 index 000000000..7c08d59b0 --- /dev/null +++ b/lib/api/doctrine/dbal/tools/console/helper/package-tree.html @@ -0,0 +1,53 @@ + + + + + + + + + + + +Doctrine\DBAL\Tools\Console\Helper (Doctrine) + + + + +
+

Doctrine

+ +
+ + +

Class Hierarchy for Package Doctrine\DBAL\Tools\Console\Helper

+

Doctrine

+ +
+ + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/dbal/types/arraytype.html b/lib/api/doctrine/dbal/types/arraytype.html new file mode 100644 index 000000000..ab3544c80 --- /dev/null +++ b/lib/api/doctrine/dbal/types/arraytype.html @@ -0,0 +1,177 @@ + + + + + + + + + + + +ArrayType (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +
Doctrine\DBAL\Types\ArrayType
+
/Doctrine/DBAL/Types/ArrayType.php at line 29
+ +

Class ArrayType

+ +
Class:ArrayType - Superclass: Type
+Type
⌊ ArrayType
+ +
+ +

public class ArrayType
extends Type + +

+ +

Type that maps a PHP array to a clob SQL type.

+ +
+
Since:
+
2.0
+
Author:
+
Roman Borschel
+
+
+ + + +
Fields inherited from Doctrine\DBAL\Types\Type
BIGINT, BOOLEAN, DATE, DATETIME, DECIMAL, INTEGER, OBJECT, SMALLINT, STRING, TARRAY, TEXT, TIME
+ + + + + + + + + + + + + + + + + + + +
Method Summary
mixed

convertToDatabaseValue(mixed value, AbstractPlatform platform)

Converts a value from its PHP representation to its database representation +of this type.

mixed

convertToPHPValue(mixed value, AbstractPlatform platform)

Converts a value from its database representation to its PHP representation +of this type.

string

getName()

Gets the name of this type.

void

getSqlDeclaration(array fieldDeclaration, AbstractPlatform platform)

Gets the SQL declaration snippet for a field of this type.

+ + + +
Methods inherited from Doctrine\DBAL\Types\Type
addType, convertToDatabaseValue, convertToPHPValue, getBindingType, getDefaultLength, getName, getSqlDeclaration, getType, getTypesMap, hasType, overrideType
+ +

Method Detail

+
/Doctrine/DBAL/Types/ArrayType.php at line 36
+

convertToDatabaseValue

+public mixed convertToDatabaseValue(mixed value, AbstractPlatform platform) +
+

Converts a value from its PHP representation to its database representation +of this type.

+
Parameters:
+
value - The value to convert.
+
platform - The currently used database platform.
+
Returns:
+
The database representation of the value.
+
+
+ +
+ +
/Doctrine/DBAL/Types/ArrayType.php at line 41
+

convertToPHPValue

+public mixed convertToPHPValue(mixed value, AbstractPlatform platform) +
+

Converts a value from its database representation to its PHP representation +of this type.

+
Parameters:
+
value - The value to convert.
+
platform - The currently used database platform.
+
Returns:
+
The PHP representation of the value.
+
+
+ +
+ +
/Doctrine/DBAL/Types/ArrayType.php at line 46
+

getName

+public string getName() +
+

Gets the name of this type.

+
Todo:
+
Needed?
+
+
+ +
+ +
/Doctrine/DBAL/Types/ArrayType.php at line 31
+

getSqlDeclaration

+public void getSqlDeclaration(array fieldDeclaration, AbstractPlatform platform) +
+

Gets the SQL declaration snippet for a field of this type.

+
Parameters:
+
fieldDeclaration - The field declaration.
+
platform - The currently used database platform.
+
+
+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/dbal/types/biginttype.html b/lib/api/doctrine/dbal/types/biginttype.html new file mode 100644 index 000000000..040f1bd7f --- /dev/null +++ b/lib/api/doctrine/dbal/types/biginttype.html @@ -0,0 +1,154 @@ + + + + + + + + + + + +BigIntType (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +
Doctrine\DBAL\Types\BigIntType
+
/Doctrine/DBAL/Types/BigIntType.php at line 32
+ +

Class BigIntType

+ +
Class:BigIntType - Superclass: Type
+Type
⌊ BigIntType
+ +
+ +

public class BigIntType
extends Type + +

+ +

Type that maps a database BIGINT to a PHP string.

+ +
+
Author:
+
robo
+
Since:
+
2.0
+
+
+ + + +
Fields inherited from Doctrine\DBAL\Types\Type
BIGINT, BOOLEAN, DATE, DATETIME, DECIMAL, INTEGER, OBJECT, SMALLINT, STRING, TARRAY, TEXT, TIME
+ + + + + + + + + + + + + + + +
Method Summary
integer

getBindingType()

Gets the (preferred) binding type for values of this type that +can be used when binding parameters to prepared statements. +

string

getName()

Gets the name of this type.

void

getSqlDeclaration(array fieldDeclaration, AbstractPlatform platform)

Gets the SQL declaration snippet for a field of this type.

+ + + +
Methods inherited from Doctrine\DBAL\Types\Type
addType, convertToDatabaseValue, convertToPHPValue, getBindingType, getDefaultLength, getName, getSqlDeclaration, getType, getTypesMap, hasType, overrideType
+ +

Method Detail

+
/Doctrine/DBAL/Types/BigIntType.php at line 44
+

getBindingType

+public integer getBindingType() +
+

Gets the (preferred) binding type for values of this type that +can be used when binding parameters to prepared statements.

This method should return one of the PDO::PARAM_* constants, that is, one of:

PDO::PARAM_BOOL +PDO::PARAM_NULL +PDO::PARAM_INT +PDO::PARAM_STR +PDO::PARAM_LOB

+ +
+ +
/Doctrine/DBAL/Types/BigIntType.php at line 34
+

getName

+public string getName() +
+

Gets the name of this type.

+
Todo:
+
Needed?
+
+
+ +
+ +
/Doctrine/DBAL/Types/BigIntType.php at line 39
+

getSqlDeclaration

+public void getSqlDeclaration(array fieldDeclaration, AbstractPlatform platform) +
+

Gets the SQL declaration snippet for a field of this type.

+
Parameters:
+
fieldDeclaration - The field declaration.
+
platform - The currently used database platform.
+
+
+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/dbal/types/booleantype.html b/lib/api/doctrine/dbal/types/booleantype.html new file mode 100644 index 000000000..481d49a03 --- /dev/null +++ b/lib/api/doctrine/dbal/types/booleantype.html @@ -0,0 +1,196 @@ + + + + + + + + + + + +BooleanType (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +
Doctrine\DBAL\Types\BooleanType
+
/Doctrine/DBAL/Types/BooleanType.php at line 31
+ +

Class BooleanType

+ +
Class:BooleanType - Superclass: Type
+Type
⌊ BooleanType
+ +
+ +

public class BooleanType
extends Type + +

+ +

Type that maps an SQL boolean to a PHP boolean.

+ +
+
Since:
+
2.0
+
Author:
+
Roman Borschel
+
+
+ + + +
Fields inherited from Doctrine\DBAL\Types\Type
BIGINT, BOOLEAN, DATE, DATETIME, DECIMAL, INTEGER, OBJECT, SMALLINT, STRING, TARRAY, TEXT, TIME
+ + + + + + + + + + + + + + + + + + + + + + + +
Method Summary
mixed

convertToDatabaseValue(mixed value, AbstractPlatform platform)

Converts a value from its PHP representation to its database representation +of this type.

mixed

convertToPHPValue(mixed value, AbstractPlatform platform)

Converts a value from its database representation to its PHP representation +of this type.

integer

getBindingType()

Gets the (preferred) binding type for values of this type that +can be used when binding parameters to prepared statements. +

string

getName()

Gets the name of this type.

void

getSqlDeclaration(array fieldDeclaration, AbstractPlatform platform)

Gets the SQL declaration snippet for a field of this type.

+ + + +
Methods inherited from Doctrine\DBAL\Types\Type
addType, convertToDatabaseValue, convertToPHPValue, getBindingType, getDefaultLength, getName, getSqlDeclaration, getType, getTypesMap, hasType, overrideType
+ +

Method Detail

+
/Doctrine/DBAL/Types/BooleanType.php at line 38
+

convertToDatabaseValue

+public mixed convertToDatabaseValue(mixed value, AbstractPlatform platform) +
+

Converts a value from its PHP representation to its database representation +of this type.

+
Parameters:
+
value - The value to convert.
+
platform - The currently used database platform.
+
Returns:
+
The database representation of the value.
+
+
+ +
+ +
/Doctrine/DBAL/Types/BooleanType.php at line 43
+

convertToPHPValue

+public mixed convertToPHPValue(mixed value, AbstractPlatform platform) +
+

Converts a value from its database representation to its PHP representation +of this type.

+
Parameters:
+
value - The value to convert.
+
platform - The currently used database platform.
+
Returns:
+
The PHP representation of the value.
+
+
+ +
+ +
/Doctrine/DBAL/Types/BooleanType.php at line 53
+

getBindingType

+public integer getBindingType() +
+

Gets the (preferred) binding type for values of this type that +can be used when binding parameters to prepared statements.

This method should return one of the PDO::PARAM_* constants, that is, one of:

PDO::PARAM_BOOL +PDO::PARAM_NULL +PDO::PARAM_INT +PDO::PARAM_STR +PDO::PARAM_LOB

+ +
+ +
/Doctrine/DBAL/Types/BooleanType.php at line 48
+

getName

+public string getName() +
+

Gets the name of this type.

+
Todo:
+
Needed?
+
+
+ +
+ +
/Doctrine/DBAL/Types/BooleanType.php at line 33
+

getSqlDeclaration

+public void getSqlDeclaration(array fieldDeclaration, AbstractPlatform platform) +
+

Gets the SQL declaration snippet for a field of this type.

+
Parameters:
+
fieldDeclaration - The field declaration.
+
platform - The currently used database platform.
+
+
+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/dbal/types/datetimetype.html b/lib/api/doctrine/dbal/types/datetimetype.html new file mode 100644 index 000000000..5910b8bae --- /dev/null +++ b/lib/api/doctrine/dbal/types/datetimetype.html @@ -0,0 +1,177 @@ + + + + + + + + + + + +DateTimeType (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +
Doctrine\DBAL\Types\DateTimeType
+
/Doctrine/DBAL/Types/DateTimeType.php at line 31
+ +

Class DateTimeType

+ +
Class:DateTimeType - Superclass: Type
+Type
⌊ DateTimeType
+ +
+ +

public class DateTimeType
extends Type + +

+ +

Type that maps an SQL DATETIME/TIMESTAMP to a PHP DateTime object.

+ +
+
Since:
+
2.0
+
Author:
+
Roman Borschel
+
+
+ + + +
Fields inherited from Doctrine\DBAL\Types\Type
BIGINT, BOOLEAN, DATE, DATETIME, DECIMAL, INTEGER, OBJECT, SMALLINT, STRING, TARRAY, TEXT, TIME
+ + + + + + + + + + + + + + + + + + + +
Method Summary
mixed

convertToDatabaseValue(mixed value, AbstractPlatform platform)

Converts a value from its PHP representation to its database representation +of this type.

mixed

convertToPHPValue(mixed value, AbstractPlatform platform)

Converts a value from its database representation to its PHP representation +of this type.

string

getName()

Gets the name of this type.

void

getSqlDeclaration(array fieldDeclaration, AbstractPlatform platform)

Gets the SQL declaration snippet for a field of this type.

+ + + +
Methods inherited from Doctrine\DBAL\Types\Type
addType, convertToDatabaseValue, convertToPHPValue, getBindingType, getDefaultLength, getName, getSqlDeclaration, getType, getTypesMap, hasType, overrideType
+ +

Method Detail

+
/Doctrine/DBAL/Types/DateTimeType.php at line 43
+

convertToDatabaseValue

+public mixed convertToDatabaseValue(mixed value, AbstractPlatform platform) +
+

Converts a value from its PHP representation to its database representation +of this type.

+
Parameters:
+
value - The value to convert.
+
platform - The currently used database platform.
+
Returns:
+
The database representation of the value.
+
+
+ +
+ +
/Doctrine/DBAL/Types/DateTimeType.php at line 49
+

convertToPHPValue

+public mixed convertToPHPValue(mixed value, AbstractPlatform platform) +
+

Converts a value from its database representation to its PHP representation +of this type.

+
Parameters:
+
value - The value to convert.
+
platform - The currently used database platform.
+
Returns:
+
The PHP representation of the value.
+
+
+ +
+ +
/Doctrine/DBAL/Types/DateTimeType.php at line 33
+

getName

+public string getName() +
+

Gets the name of this type.

+
Todo:
+
Needed?
+
+
+ +
+ +
/Doctrine/DBAL/Types/DateTimeType.php at line 38
+

getSqlDeclaration

+public void getSqlDeclaration(array fieldDeclaration, AbstractPlatform platform) +
+

Gets the SQL declaration snippet for a field of this type.

+
Parameters:
+
fieldDeclaration - The field declaration.
+
platform - The currently used database platform.
+
+
+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/dbal/types/datetype.html b/lib/api/doctrine/dbal/types/datetype.html new file mode 100644 index 000000000..2b5cf4106 --- /dev/null +++ b/lib/api/doctrine/dbal/types/datetype.html @@ -0,0 +1,177 @@ + + + + + + + + + + + +DateType (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +
Doctrine\DBAL\Types\DateType
+
/Doctrine/DBAL/Types/DateType.php at line 31
+ +

Class DateType

+ +
Class:DateType - Superclass: Type
+Type
⌊ DateType
+ +
+ +

public class DateType
extends Type + +

+ +

Type that maps an SQL DATE to a PHP Date object.

+ +
+
Since:
+
2.0
+
Author:
+
Roman Borschel
+
+
+ + + +
Fields inherited from Doctrine\DBAL\Types\Type
BIGINT, BOOLEAN, DATE, DATETIME, DECIMAL, INTEGER, OBJECT, SMALLINT, STRING, TARRAY, TEXT, TIME
+ + + + + + + + + + + + + + + + + + + +
Method Summary
mixed

convertToDatabaseValue(mixed value, AbstractPlatform platform)

Converts a value from its PHP representation to its database representation +of this type.

mixed

convertToPHPValue(mixed value, AbstractPlatform platform)

Converts a value from its database representation to its PHP representation +of this type.

string

getName()

Gets the name of this type.

void

getSqlDeclaration(array fieldDeclaration, AbstractPlatform platform)

Gets the SQL declaration snippet for a field of this type.

+ + + +
Methods inherited from Doctrine\DBAL\Types\Type
addType, convertToDatabaseValue, convertToPHPValue, getBindingType, getDefaultLength, getName, getSqlDeclaration, getType, getTypesMap, hasType, overrideType
+ +

Method Detail

+
/Doctrine/DBAL/Types/DateType.php at line 43
+

convertToDatabaseValue

+public mixed convertToDatabaseValue(mixed value, AbstractPlatform platform) +
+

Converts a value from its PHP representation to its database representation +of this type.

+
Parameters:
+
value - The value to convert.
+
platform - The currently used database platform.
+
Returns:
+
The database representation of the value.
+
+
+ +
+ +
/Doctrine/DBAL/Types/DateType.php at line 49
+

convertToPHPValue

+public mixed convertToPHPValue(mixed value, AbstractPlatform platform) +
+

Converts a value from its database representation to its PHP representation +of this type.

+
Parameters:
+
value - The value to convert.
+
platform - The currently used database platform.
+
Returns:
+
The PHP representation of the value.
+
+
+ +
+ +
/Doctrine/DBAL/Types/DateType.php at line 33
+

getName

+public string getName() +
+

Gets the name of this type.

+
Todo:
+
Needed?
+
+
+ +
+ +
/Doctrine/DBAL/Types/DateType.php at line 38
+

getSqlDeclaration

+public void getSqlDeclaration(array fieldDeclaration, AbstractPlatform platform) +
+

Gets the SQL declaration snippet for a field of this type.

+
Parameters:
+
fieldDeclaration - The field declaration.
+
platform - The currently used database platform.
+
+
+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/dbal/types/decimaltype.html b/lib/api/doctrine/dbal/types/decimaltype.html new file mode 100644 index 000000000..a9faa3131 --- /dev/null +++ b/lib/api/doctrine/dbal/types/decimaltype.html @@ -0,0 +1,156 @@ + + + + + + + + + + + +DecimalType (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +
Doctrine\DBAL\Types\DecimalType
+
/Doctrine/DBAL/Types/DecimalType.php at line 31
+ +

Class DecimalType

+ +
Class:DecimalType - Superclass: Type
+Type
⌊ DecimalType
+ +
+ +

public class DecimalType
extends Type + +

+ +

Type that maps an SQL DECIMAL to a PHP double.

+ +
+
Since:
+
2.0
+
Author:
+
Roman Borschel
+
+
+ + + +
Fields inherited from Doctrine\DBAL\Types\Type
BIGINT, BOOLEAN, DATE, DATETIME, DECIMAL, INTEGER, OBJECT, SMALLINT, STRING, TARRAY, TEXT, TIME
+ + + + + + + + + + + + + + + +
Method Summary
mixed

convertToPHPValue(mixed value, AbstractPlatform platform)

Converts a value from its database representation to its PHP representation +of this type.

string

getName()

Gets the name of this type.

void

getSqlDeclaration(array fieldDeclaration, AbstractPlatform platform)

Gets the SQL declaration snippet for a field of this type.

+ + + +
Methods inherited from Doctrine\DBAL\Types\Type
addType, convertToDatabaseValue, convertToPHPValue, getBindingType, getDefaultLength, getName, getSqlDeclaration, getType, getTypesMap, hasType, overrideType
+ +

Method Detail

+
/Doctrine/DBAL/Types/DecimalType.php at line 43
+

convertToPHPValue

+public mixed convertToPHPValue(mixed value, AbstractPlatform platform) +
+

Converts a value from its database representation to its PHP representation +of this type.

+
Parameters:
+
value - The value to convert.
+
platform - The currently used database platform.
+
Returns:
+
The PHP representation of the value.
+
+
+ +
+ +
/Doctrine/DBAL/Types/DecimalType.php at line 33
+

getName

+public string getName() +
+

Gets the name of this type.

+
Todo:
+
Needed?
+
+
+ +
+ +
/Doctrine/DBAL/Types/DecimalType.php at line 38
+

getSqlDeclaration

+public void getSqlDeclaration(array fieldDeclaration, AbstractPlatform platform) +
+

Gets the SQL declaration snippet for a field of this type.

+
Parameters:
+
fieldDeclaration - The field declaration.
+
platform - The currently used database platform.
+
+
+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/dbal/types/integertype.html b/lib/api/doctrine/dbal/types/integertype.html new file mode 100644 index 000000000..322207fff --- /dev/null +++ b/lib/api/doctrine/dbal/types/integertype.html @@ -0,0 +1,175 @@ + + + + + + + + + + + +IntegerType (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +
Doctrine\DBAL\Types\IntegerType
+
/Doctrine/DBAL/Types/IntegerType.php at line 32
+ +

Class IntegerType

+ +
Class:IntegerType - Superclass: Type
+Type
⌊ IntegerType
+ +
+ +

public class IntegerType
extends Type + +

+ +

Type that maps an SQL INT to a PHP integer.

+ +
+
Author:
+
Roman Borschel
+
Since:
+
2.0
+
+
+ + + +
Fields inherited from Doctrine\DBAL\Types\Type
BIGINT, BOOLEAN, DATE, DATETIME, DECIMAL, INTEGER, OBJECT, SMALLINT, STRING, TARRAY, TEXT, TIME
+ + + + + + + + + + + + + + + + + + + +
Method Summary
mixed

convertToPHPValue(mixed value, AbstractPlatform platform)

Converts a value from its database representation to its PHP representation +of this type.

integer

getBindingType()

Gets the (preferred) binding type for values of this type that +can be used when binding parameters to prepared statements. +

string

getName()

Gets the name of this type.

void

getSqlDeclaration(array fieldDeclaration, AbstractPlatform platform)

Gets the SQL declaration snippet for a field of this type.

+ + + +
Methods inherited from Doctrine\DBAL\Types\Type
addType, convertToDatabaseValue, convertToPHPValue, getBindingType, getDefaultLength, getName, getSqlDeclaration, getType, getTypesMap, hasType, overrideType
+ +

Method Detail

+
/Doctrine/DBAL/Types/IntegerType.php at line 44
+

convertToPHPValue

+public mixed convertToPHPValue(mixed value, AbstractPlatform platform) +
+

Converts a value from its database representation to its PHP representation +of this type.

+
Parameters:
+
value - The value to convert.
+
platform - The currently used database platform.
+
Returns:
+
The PHP representation of the value.
+
+
+ +
+ +
/Doctrine/DBAL/Types/IntegerType.php at line 49
+

getBindingType

+public integer getBindingType() +
+

Gets the (preferred) binding type for values of this type that +can be used when binding parameters to prepared statements.

This method should return one of the PDO::PARAM_* constants, that is, one of:

PDO::PARAM_BOOL +PDO::PARAM_NULL +PDO::PARAM_INT +PDO::PARAM_STR +PDO::PARAM_LOB

+ +
+ +
/Doctrine/DBAL/Types/IntegerType.php at line 34
+

getName

+public string getName() +
+

Gets the name of this type.

+
Todo:
+
Needed?
+
+
+ +
+ +
/Doctrine/DBAL/Types/IntegerType.php at line 39
+

getSqlDeclaration

+public void getSqlDeclaration(array fieldDeclaration, AbstractPlatform platform) +
+

Gets the SQL declaration snippet for a field of this type.

+
Parameters:
+
fieldDeclaration - The field declaration.
+
platform - The currently used database platform.
+
+
+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/dbal/types/objecttype.html b/lib/api/doctrine/dbal/types/objecttype.html new file mode 100644 index 000000000..619543f5f --- /dev/null +++ b/lib/api/doctrine/dbal/types/objecttype.html @@ -0,0 +1,177 @@ + + + + + + + + + + + +ObjectType (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +
Doctrine\DBAL\Types\ObjectType
+
/Doctrine/DBAL/Types/ObjectType.php at line 10
+ +

Class ObjectType

+ +
Class:ObjectType - Superclass: Type
+Type
⌊ ObjectType
+ +
+ +

public class ObjectType
extends Type + +

+ +

Type that maps a PHP object to a clob SQL type.

+ +
+
Since:
+
2.0
+
Author:
+
Roman Borschel
+
+
+ + + +
Fields inherited from Doctrine\DBAL\Types\Type
BIGINT, BOOLEAN, DATE, DATETIME, DECIMAL, INTEGER, OBJECT, SMALLINT, STRING, TARRAY, TEXT, TIME
+ + + + + + + + + + + + + + + + + + + +
Method Summary
mixed

convertToDatabaseValue(mixed value, AbstractPlatform platform)

Converts a value from its PHP representation to its database representation +of this type.

mixed

convertToPHPValue(mixed value, AbstractPlatform platform)

Converts a value from its database representation to its PHP representation +of this type.

string

getName()

Gets the name of this type.

void

getSqlDeclaration(array fieldDeclaration, AbstractPlatform platform)

Gets the SQL declaration snippet for a field of this type.

+ + + +
Methods inherited from Doctrine\DBAL\Types\Type
addType, convertToDatabaseValue, convertToPHPValue, getBindingType, getDefaultLength, getName, getSqlDeclaration, getType, getTypesMap, hasType, overrideType
+ +

Method Detail

+
/Doctrine/DBAL/Types/ObjectType.php at line 17
+

convertToDatabaseValue

+public mixed convertToDatabaseValue(mixed value, AbstractPlatform platform) +
+

Converts a value from its PHP representation to its database representation +of this type.

+
Parameters:
+
value - The value to convert.
+
platform - The currently used database platform.
+
Returns:
+
The database representation of the value.
+
+
+ +
+ +
/Doctrine/DBAL/Types/ObjectType.php at line 22
+

convertToPHPValue

+public mixed convertToPHPValue(mixed value, AbstractPlatform platform) +
+

Converts a value from its database representation to its PHP representation +of this type.

+
Parameters:
+
value - The value to convert.
+
platform - The currently used database platform.
+
Returns:
+
The PHP representation of the value.
+
+
+ +
+ +
/Doctrine/DBAL/Types/ObjectType.php at line 27
+

getName

+public string getName() +
+

Gets the name of this type.

+
Todo:
+
Needed?
+
+
+ +
+ +
/Doctrine/DBAL/Types/ObjectType.php at line 12
+

getSqlDeclaration

+public void getSqlDeclaration(array fieldDeclaration, AbstractPlatform platform) +
+

Gets the SQL declaration snippet for a field of this type.

+
Parameters:
+
fieldDeclaration - The field declaration.
+
platform - The currently used database platform.
+
+
+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/dbal/types/package-frame.html b/lib/api/doctrine/dbal/types/package-frame.html new file mode 100644 index 000000000..eb80186d2 --- /dev/null +++ b/lib/api/doctrine/dbal/types/package-frame.html @@ -0,0 +1,38 @@ + + + + + + + + + + + +Doctrine\DBAL\Types (Doctrine) + + + + +

Doctrine\DBAL\Types

+ +

Classes

+ + + + + \ No newline at end of file diff --git a/lib/api/doctrine/dbal/types/package-functions.html b/lib/api/doctrine/dbal/types/package-functions.html new file mode 100644 index 000000000..7ccdbf2e6 --- /dev/null +++ b/lib/api/doctrine/dbal/types/package-functions.html @@ -0,0 +1,69 @@ + + + + + + + + + + + +Functions (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +

Functions

+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/dbal/types/package-globals.html b/lib/api/doctrine/dbal/types/package-globals.html new file mode 100644 index 000000000..3d8cbf04d --- /dev/null +++ b/lib/api/doctrine/dbal/types/package-globals.html @@ -0,0 +1,69 @@ + + + + + + + + + + + +Globals (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +

Globals

+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/dbal/types/package-summary.html b/lib/api/doctrine/dbal/types/package-summary.html new file mode 100644 index 000000000..bbd1df4e0 --- /dev/null +++ b/lib/api/doctrine/dbal/types/package-summary.html @@ -0,0 +1,77 @@ + + + + + + + + + + + +Doctrine\DBAL\Types (Doctrine) + + + + +
+

Doctrine

+ +
+ + +
+ +

Namespace Doctrine\DBAL\Types

+ + + + + + + + + + + + + + + + +
Class Summary
ArrayTypeType that maps a PHP array to a clob SQL type.
BigIntTypeType that maps a database BIGINT to a PHP string.
BooleanTypeType that maps an SQL boolean to a PHP boolean.
DateTimeTypeType that maps an SQL DATETIME/TIMESTAMP to a PHP DateTime object.
DateTypeType that maps an SQL DATE to a PHP Date object.
DecimalTypeType that maps an SQL DECIMAL to a PHP double.
IntegerTypeType that maps an SQL INT to a PHP integer.
ObjectTypeType that maps a PHP object to a clob SQL type.
SmallIntTypeType that maps a database SMALLINT to a PHP integer.
StringTypeType that maps an SQL VARCHAR to a PHP string.
TextTypeType that maps an SQL CLOB to a PHP string.
TimeTypeType that maps an SQL TIME to a PHP DateTime object.
TypeThe base class for so-called Doctrine mapping types. +
+ +
+ +
+

Doctrine

+ +
+ + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/dbal/types/package-tree.html b/lib/api/doctrine/dbal/types/package-tree.html new file mode 100644 index 000000000..bac9df90c --- /dev/null +++ b/lib/api/doctrine/dbal/types/package-tree.html @@ -0,0 +1,70 @@ + + + + + + + + + + + +Doctrine\DBAL\Types (Doctrine) + + + + +
+

Doctrine

+ +
+ + +

Class Hierarchy for Package Doctrine\DBAL\Types

+
+

Doctrine

+ +
+ + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/dbal/types/smallinttype.html b/lib/api/doctrine/dbal/types/smallinttype.html new file mode 100644 index 000000000..f8a1a2061 --- /dev/null +++ b/lib/api/doctrine/dbal/types/smallinttype.html @@ -0,0 +1,175 @@ + + + + + + + + + + + +SmallIntType (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +
Doctrine\DBAL\Types\SmallIntType
+
/Doctrine/DBAL/Types/SmallIntType.php at line 31
+ +

Class SmallIntType

+ +
Class:SmallIntType - Superclass: Type
+Type
⌊ SmallIntType
+ +
+ +

public class SmallIntType
extends Type + +

+ +

Type that maps a database SMALLINT to a PHP integer.

+ +
+
Author:
+
robo
+
Since:
+
2.0
+
+
+ + + +
Fields inherited from Doctrine\DBAL\Types\Type
BIGINT, BOOLEAN, DATE, DATETIME, DECIMAL, INTEGER, OBJECT, SMALLINT, STRING, TARRAY, TEXT, TIME
+ + + + + + + + + + + + + + + + + + + +
Method Summary
mixed

convertToPHPValue(mixed value, AbstractPlatform platform)

Converts a value from its database representation to its PHP representation +of this type.

integer

getBindingType()

Gets the (preferred) binding type for values of this type that +can be used when binding parameters to prepared statements. +

string

getName()

Gets the name of this type.

void

getSqlDeclaration(array fieldDeclaration, AbstractPlatform platform)

Gets the SQL declaration snippet for a field of this type.

+ + + +
Methods inherited from Doctrine\DBAL\Types\Type
addType, convertToDatabaseValue, convertToPHPValue, getBindingType, getDefaultLength, getName, getSqlDeclaration, getType, getTypesMap, hasType, overrideType
+ +

Method Detail

+
/Doctrine/DBAL/Types/SmallIntType.php at line 43
+

convertToPHPValue

+public mixed convertToPHPValue(mixed value, AbstractPlatform platform) +
+

Converts a value from its database representation to its PHP representation +of this type.

+
Parameters:
+
value - The value to convert.
+
platform - The currently used database platform.
+
Returns:
+
The PHP representation of the value.
+
+
+ +
+ +
/Doctrine/DBAL/Types/SmallIntType.php at line 48
+

getBindingType

+public integer getBindingType() +
+

Gets the (preferred) binding type for values of this type that +can be used when binding parameters to prepared statements.

This method should return one of the PDO::PARAM_* constants, that is, one of:

PDO::PARAM_BOOL +PDO::PARAM_NULL +PDO::PARAM_INT +PDO::PARAM_STR +PDO::PARAM_LOB

+ +
+ +
/Doctrine/DBAL/Types/SmallIntType.php at line 33
+

getName

+public string getName() +
+

Gets the name of this type.

+
Todo:
+
Needed?
+
+
+ +
+ +
/Doctrine/DBAL/Types/SmallIntType.php at line 38
+

getSqlDeclaration

+public void getSqlDeclaration(array fieldDeclaration, AbstractPlatform platform) +
+

Gets the SQL declaration snippet for a field of this type.

+
Parameters:
+
fieldDeclaration - The field declaration.
+
platform - The currently used database platform.
+
+
+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/dbal/types/stringtype.html b/lib/api/doctrine/dbal/types/stringtype.html new file mode 100644 index 000000000..83b49be62 --- /dev/null +++ b/lib/api/doctrine/dbal/types/stringtype.html @@ -0,0 +1,151 @@ + + + + + + + + + + + +StringType (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +
Doctrine\DBAL\Types\StringType
+
/Doctrine/DBAL/Types/StringType.php at line 31
+ +

Class StringType

+ +
Class:StringType - Superclass: Type
+Type
⌊ StringType
+ +
+ +

public class StringType
extends Type + +

+ +

Type that maps an SQL VARCHAR to a PHP string.

+ +
+
Since:
+
2.0
+
Author:
+
Roman Borschel
+
+
+ + + +
Fields inherited from Doctrine\DBAL\Types\Type
BIGINT, BOOLEAN, DATE, DATETIME, DECIMAL, INTEGER, OBJECT, SMALLINT, STRING, TARRAY, TEXT, TIME
+ + + + + + + + + + + + + + + +
Method Summary
void

getDefaultLength(mixed platform)

@override

string

getName()

@override

void

getSqlDeclaration(array fieldDeclaration, AbstractPlatform platform)

@override

+ + + +
Methods inherited from Doctrine\DBAL\Types\Type
addType, convertToDatabaseValue, convertToPHPValue, getBindingType, getDefaultLength, getName, getSqlDeclaration, getType, getTypesMap, hasType, overrideType
+ +

Method Detail

+
/Doctrine/DBAL/Types/StringType.php at line 40
+

getDefaultLength

+public void getDefaultLength(mixed platform) +
+

+
Todo:
+
Needed?
+
+
+ +
+ +
/Doctrine/DBAL/Types/StringType.php at line 46
+

getName

+public string getName() +
+

+
Todo:
+
Needed?
+
+
+ +
+ +
/Doctrine/DBAL/Types/StringType.php at line 34
+

getSqlDeclaration

+public void getSqlDeclaration(array fieldDeclaration, AbstractPlatform platform) +
+

+
Parameters:
+
fieldDeclaration - The field declaration.
+
platform - The currently used database platform.
+
+
+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/dbal/types/texttype.html b/lib/api/doctrine/dbal/types/texttype.html new file mode 100644 index 000000000..202a69b26 --- /dev/null +++ b/lib/api/doctrine/dbal/types/texttype.html @@ -0,0 +1,135 @@ + + + + + + + + + + + +TextType (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +
Doctrine\DBAL\Types\TextType
+
/Doctrine/DBAL/Types/TextType.php at line 31
+ +

Class TextType

+ +
Class:TextType - Superclass: Type
+Type
⌊ TextType
+ +
+ +

public class TextType
extends Type + +

+ +

Type that maps an SQL CLOB to a PHP string.

+ +
+
Since:
+
2.0
+
Author:
+
Roman Borschel
+
+
+ + + +
Fields inherited from Doctrine\DBAL\Types\Type
BIGINT, BOOLEAN, DATE, DATETIME, DECIMAL, INTEGER, OBJECT, SMALLINT, STRING, TARRAY, TEXT, TIME
+ + + + + + + + + + + +
Method Summary
string

getName()

Gets the name of this type.

void

getSqlDeclaration(array fieldDeclaration, AbstractPlatform platform)

@override

+ + + +
Methods inherited from Doctrine\DBAL\Types\Type
addType, convertToDatabaseValue, convertToPHPValue, getBindingType, getDefaultLength, getName, getSqlDeclaration, getType, getTypesMap, hasType, overrideType
+ +

Method Detail

+
/Doctrine/DBAL/Types/TextType.php at line 39
+

getName

+public string getName() +
+

Gets the name of this type.

+
Todo:
+
Needed?
+
+
+ +
+ +
/Doctrine/DBAL/Types/TextType.php at line 34
+

getSqlDeclaration

+public void getSqlDeclaration(array fieldDeclaration, AbstractPlatform platform) +
+

+
Parameters:
+
fieldDeclaration - The field declaration.
+
platform - The currently used database platform.
+
+
+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/dbal/types/timetype.html b/lib/api/doctrine/dbal/types/timetype.html new file mode 100644 index 000000000..8a1c4198c --- /dev/null +++ b/lib/api/doctrine/dbal/types/timetype.html @@ -0,0 +1,173 @@ + + + + + + + + + + + +TimeType (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +
Doctrine\DBAL\Types\TimeType
+
/Doctrine/DBAL/Types/TimeType.php at line 31
+ +

Class TimeType

+ +
Class:TimeType - Superclass: Type
+Type
⌊ TimeType
+ +
+ +

public class TimeType
extends Type + +

+ +

Type that maps an SQL TIME to a PHP DateTime object.

+ +
+
Since:
+
2.0
+
Author:
+
Roman Borschel
+
+
+ + + +
Fields inherited from Doctrine\DBAL\Types\Type
BIGINT, BOOLEAN, DATE, DATETIME, DECIMAL, INTEGER, OBJECT, SMALLINT, STRING, TARRAY, TEXT, TIME
+ + + + + + + + + + + + + + + + + + + +
Method Summary
mixed

convertToDatabaseValue(mixed value, AbstractPlatform platform)

{@inheritdoc}

mixed

convertToPHPValue(mixed value, AbstractPlatform platform)

{@inheritdoc}

string

getName()

Gets the name of this type.

void

getSqlDeclaration(array fieldDeclaration, AbstractPlatform platform)

{@inheritdoc}

+ + + +
Methods inherited from Doctrine\DBAL\Types\Type
addType, convertToDatabaseValue, convertToPHPValue, getBindingType, getDefaultLength, getName, getSqlDeclaration, getType, getTypesMap, hasType, overrideType
+ +

Method Detail

+
/Doctrine/DBAL/Types/TimeType.php at line 49
+

convertToDatabaseValue

+public mixed convertToDatabaseValue(mixed value, AbstractPlatform platform) +
+

+
Parameters:
+
value - The value to convert.
+
platform - The currently used database platform.
+
Returns:
+
The database representation of the value.
+
+
+ +
+ +
/Doctrine/DBAL/Types/TimeType.php at line 58
+

convertToPHPValue

+public mixed convertToPHPValue(mixed value, AbstractPlatform platform) +
+

+
Parameters:
+
value - The value to convert.
+
platform - The currently used database platform.
+
Returns:
+
The PHP representation of the value.
+
+
+ +
+ +
/Doctrine/DBAL/Types/TimeType.php at line 33
+

getName

+public string getName() +
+

Gets the name of this type.

+
Todo:
+
Needed?
+
+
+ +
+ +
/Doctrine/DBAL/Types/TimeType.php at line 41
+

getSqlDeclaration

+public void getSqlDeclaration(array fieldDeclaration, AbstractPlatform platform) +
+

+
Parameters:
+
fieldDeclaration - The field declaration.
+
platform - The currently used database platform.
+
+
+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/dbal/types/type.html b/lib/api/doctrine/dbal/types/type.html new file mode 100644 index 000000000..11e9a0729 --- /dev/null +++ b/lib/api/doctrine/dbal/types/type.html @@ -0,0 +1,457 @@ + + + + + + + + + + + +Type (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +
Doctrine\DBAL\Types\Type
+
/Doctrine/DBAL/Types/Type.php at line 35
+ +

Class Type

+ +
Type
+ +
+ +

public abstract class Type

+ +

The base class for so-called Doctrine mapping types.

A Type object is obtained by calling the static getType() method.

+ +
+
Author:
+
Roman Borschel
+
Since:
+
2.0
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Field Summary
final str

BIGINT

final str

BOOLEAN

final str

DATE

final str

DATETIME

final str

DECIMAL

final str

INTEGER

final str

OBJECT

final str

SMALLINT

final str

STRING

final str

TARRAY

final str

TEXT

final str

TIME

+ + + + + + +
Constructor Summary

Type()

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Method Summary
static void

addType(string name, string className)

Adds a custom type to the type map.

mixed

convertToDatabaseValue(mixed value, AbstractPlatform platform)

Converts a value from its PHP representation to its database representation +of this type.

mixed

convertToPHPValue(mixed value, AbstractPlatform platform)

Converts a value from its database representation to its PHP representation +of this type.

integer

getBindingType()

Gets the (preferred) binding type for values of this type that +can be used when binding parameters to prepared statements. +

void

getDefaultLength(mixed platform)

Gets the default length of this type.

abstract string

getName()

Gets the name of this type.

abstract void

getSqlDeclaration(array fieldDeclaration, AbstractPlatform platform)

Gets the SQL declaration snippet for a field of this type.

static Doctrine\DBAL\Types\Type

getType(string name)

Factory method to create type instances. +

static array

getTypesMap()

Get the types array map which holds all registered types and the corresponding +type class

static boolean

hasType(string name)

Checks if exists support for a type.

static void

overrideType(string name, string className)

Overrides an already defined type to use a different implementation.

+ +

Field Detail

+
/Doctrine/DBAL/Types/Type.php at line 38
+

BIGINT

+public final str BIGINT = 'bigint' +
+
+ +
+ +
/Doctrine/DBAL/Types/Type.php at line 39
+

BOOLEAN

+public final str BOOLEAN = 'boolean' +
+
+ +
+ +
/Doctrine/DBAL/Types/Type.php at line 41
+

DATE

+public final str DATE = 'date' +
+
+ +
+ +
/Doctrine/DBAL/Types/Type.php at line 40
+

DATETIME

+public final str DATETIME = 'datetime' +
+
+ +
+ +
/Doctrine/DBAL/Types/Type.php at line 43
+

DECIMAL

+public final str DECIMAL = 'decimal' +
+
+ +
+ +
/Doctrine/DBAL/Types/Type.php at line 44
+

INTEGER

+public final str INTEGER = 'integer' +
+
+ +
+ +
/Doctrine/DBAL/Types/Type.php at line 45
+

OBJECT

+public final str OBJECT = 'object' +
+
+ +
+ +
/Doctrine/DBAL/Types/Type.php at line 46
+

SMALLINT

+public final str SMALLINT = 'smallint' +
+
+ +
+ +
/Doctrine/DBAL/Types/Type.php at line 47
+

STRING

+public final str STRING = 'string' +
+
+ +
+ +
/Doctrine/DBAL/Types/Type.php at line 37
+

TARRAY

+public final str TARRAY = 'array' +
+
+ +
+ +
/Doctrine/DBAL/Types/Type.php at line 48
+

TEXT

+public final str TEXT = 'text' +
+
+ +
+ +
/Doctrine/DBAL/Types/Type.php at line 42
+

TIME

+public final str TIME = 'time' +
+
+ +
+ +

Constructor Detail

+
/Doctrine/DBAL/Types/Type.php at line 70
+

Type

+public Type() +
+
+ +
+ +

Method Detail

+
/Doctrine/DBAL/Types/Type.php at line 153
+

addType

+public static void addType(string name, string className) +
+

Adds a custom type to the type map.

+
Parameters:
+
name - Name of the type. This should correspond to what getName() returns.
+
className - The class name of the custom type.
+
Throws:
+
DBALException
+
+
+ +
+ +
/Doctrine/DBAL/Types/Type.php at line 80
+

convertToDatabaseValue

+public mixed convertToDatabaseValue(mixed value, AbstractPlatform platform) +
+

Converts a value from its PHP representation to its database representation +of this type.

+
Parameters:
+
value - The value to convert.
+
platform - The currently used database platform.
+
Returns:
+
The database representation of the value.
+
+
+ +
+ +
/Doctrine/DBAL/Types/Type.php at line 93
+

convertToPHPValue

+public mixed convertToPHPValue(mixed value, AbstractPlatform platform) +
+

Converts a value from its database representation to its PHP representation +of this type.

+
Parameters:
+
value - The value to convert.
+
platform - The currently used database platform.
+
Returns:
+
The PHP representation of the value.
+
+
+ +
+ +
/Doctrine/DBAL/Types/Type.php at line 205
+

getBindingType

+public integer getBindingType() +
+

Gets the (preferred) binding type for values of this type that +can be used when binding parameters to prepared statements.

This method should return one of the PDO::PARAM_* constants, that is, one of:

PDO::PARAM_BOOL +PDO::PARAM_NULL +PDO::PARAM_INT +PDO::PARAM_STR +PDO::PARAM_LOB

+ +
+ +
/Doctrine/DBAL/Types/Type.php at line 103
+

getDefaultLength

+public void getDefaultLength(mixed platform) +
+

Gets the default length of this type.

+
Todo:
+
Needed?
+
+
+ +
+ +
/Doctrine/DBAL/Types/Type.php at line 122
+

getName

+public abstract string getName() +
+

Gets the name of this type.

+
Todo:
+
Needed?
+
+
+ +
+ +
/Doctrine/DBAL/Types/Type.php at line 114
+

getSqlDeclaration

+public abstract void getSqlDeclaration(array fieldDeclaration, AbstractPlatform platform) +
+

Gets the SQL declaration snippet for a field of this type.

+
Parameters:
+
fieldDeclaration - The field declaration.
+
platform - The currently used database platform.
+
+
+ +
+ +
/Doctrine/DBAL/Types/Type.php at line 133
+

getType

+public static Doctrine\DBAL\Types\Type getType(string name) +
+

Factory method to create type instances. +Type instances are implemented as flyweights.

+
Throws:
+
DBALException
+
Parameters:
+
name - The name of the type (as returned by getName()).
+
+
+ +
+ +
/Doctrine/DBAL/Types/Type.php at line 216
+

getTypesMap

+public static array getTypesMap() +
+

Get the types array map which holds all registered types and the corresponding +type class

+
Returns:
+
$typesMap
+
+
+ +
+ +
/Doctrine/DBAL/Types/Type.php at line 169
+

hasType

+public static boolean hasType(string name) +
+

Checks if exists support for a type.

+
Parameters:
+
name - Name of the type
+
Returns:
+
TRUE if type is supported; FALSE otherwise
+
+
+ +
+ +
/Doctrine/DBAL/Types/Type.php at line 182
+

overrideType

+public static void overrideType(string name, string className) +
+

Overrides an already defined type to use a different implementation.

+
Throws:
+
DBALException
+
+
+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/orm/abstractquery.html b/lib/api/doctrine/orm/abstractquery.html new file mode 100644 index 000000000..ebaf2dbd4 --- /dev/null +++ b/lib/api/doctrine/orm/abstractquery.html @@ -0,0 +1,732 @@ + + + + + + + + + + + +AbstractQuery (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +
Doctrine\ORM\AbstractQuery
+
/Doctrine/ORM/AbstractQuery.php at line 40
+ +

Class AbstractQuery

+ +
AbstractQuery
+ +
+ +

public abstract class AbstractQuery

+ +

Base contract for ORM queries. Base class for Query and NativeQuery.

+ +
+
License:
+
http://www.opensource.org/licenses/lgpl-license.php LGPL
+
See Also:
+
www.doctrine-project.org
+
Since:
+
2.0
+
Version:
+
$Revision$
+
Author:
+
Benjamin Eberlei
+
Guilherme Blanco
+
Jonathan Wage
+
Roman Borschel
+
Konsta Vesterinen
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Field Summary
final int

HYDRATE_ARRAY

Hydrates an array graph.

final int

HYDRATE_OBJECT

Hydrates an object graph.

final int

HYDRATE_SCALAR

Hydrates a flat, rectangular result set with scalar values.

final int

HYDRATE_SINGLE_SCALAR

Hydrates a single scalar value.

protected Doctrine\ORM\EntityManager The entity manager used by this query object.

$_em

protected boolean Boolean value that indicates whether or not expire the result cache.

$_expireResultCache

protected array The map of query hints.

$_hints

protected integer The hydration mode.

$_hydrationMode

protected array The parameter type map of this query.

$_paramTypes

protected array The parameter map of this query.

$_params

protected CacheDriver

$_resultCacheDriver

The locally set cache driver used for caching result sets of this query.

protected string The id to store the result cache entry under.

$_resultCacheId

protected int Result Cache lifetime.

$_resultCacheTTL

protected ResultSetMapping The user-specified ResultSetMapping to use.

$_resultSetMapping

protected boolean

$_useResultCache

Boolean flag for whether or not to cache the results of this query.

+ + + + + + +
Constructor Summary

AbstractQuery(mixed em, Doctrine\ORM\EntityManager entityManager)

Initializes a new instance of a class derived from AbstractQuery.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Method Summary
mixed

execute(string params, integer hydrationMode)

Executes the query.

Doctrine\ORM\AbstractQuery

expireResultCache(boolean expire)

Defines if the result cache is active or not.

void

free()

Frees the resources used by the query object.

array

getArrayResult()

Gets the array of results for the query. +

Doctrine\ORM\EntityManager

getEntityManager()

Retrieves the associated EntityManager of this Query instance.

boolean

getExpireResultCache()

Retrieves if the resultset cache is active or not.

mixed

getHint(string name)

Gets the value of a query hint.

integer

getHydrationMode()

Gets the hydration mode currently used by the query.

mixed

getParameter(mixed key)

Gets a query parameter.

array

getParameters()

Get all defined parameters.

array

getResult(mixed hydrationMode)

Gets the list of results for the query. +

Doctrine\Common\Cache\Cache

getResultCacheDriver()

Returns the cache driver used for caching result sets.

integer

getResultCacheLifetime()

Retrieves the lifetime of resultset cache.

abstract string

getSQL()

Gets the SQL query that corresponds to this query object. +

array

getScalarResult()

Gets the scalar results for the query. +

mixed

getSingleResult(integer hydrationMode)

Gets the single result of the query. +

mixed

getSingleScalarResult()

Gets the single scalar result of the query. +

IterableResult

iterate(array params, integer hydrationMode)

Executes the query and returns an IterableResult that can be used to incrementally +iterate over the result.

Doctrine\ORM\AbstractQuery

setHint(string name, mixed value)

Sets a query hint.

Doctrine\ORM\AbstractQuery

setHydrationMode(integer hydrationMode)

Defines the processing mode to be used during hydration / result set transformation.

Doctrine\ORM\AbstractQuery

setParameter(string|integer key, mixed value, string type)

Sets a query parameter.

Doctrine\ORM\AbstractQuery

setParameters(array params, array types)

Sets a collection of query parameters.

Doctrine\ORM\AbstractQuery

setResultCacheDriver(mixed resultCacheDriver, Doctrine\Common\Cache\Cache driver)

Defines a cache driver to be used for caching result sets.

Doctrine\ORM\AbstractQuery

setResultCacheId(string id)

Set the result cache id to use to store the result set cache entry. +

Doctrine\ORM\AbstractQuery

setResultCacheLifetime(integer timeToLive)

Defines how long the result cache will be active before expire.

Doctrine\ORM\AbstractQuery

setResultSetMapping(ResultSetMapping rsm)

Sets the ResultSetMapping that should be used for hydration.

This

useResultCache(boolean bool, integer timeToLive, string resultCacheId)

Set whether or not to cache the results of this query and if so, for +how long and which ID to use for the cache entry.

+ +

Field Detail

+
/Doctrine/ORM/AbstractQuery.php at line 50
+

HYDRATE_ARRAY

+public final int HYDRATE_ARRAY = 2 +
+

Hydrates an array graph.

+ +
+ +
/Doctrine/ORM/AbstractQuery.php at line 46
+

HYDRATE_OBJECT

+public final int HYDRATE_OBJECT = 1 +
+

Hydrates an object graph. This is the default behavior.

+ +
+ +
/Doctrine/ORM/AbstractQuery.php at line 54
+

HYDRATE_SCALAR

+public final int HYDRATE_SCALAR = 3 +
+

Hydrates a flat, rectangular result set with scalar values.

+ +
+ +
/Doctrine/ORM/AbstractQuery.php at line 58
+

HYDRATE_SINGLE_SCALAR

+public final int HYDRATE_SINGLE_SCALAR = 4 +
+

Hydrates a single scalar value.

+ +
+ +
/Doctrine/ORM/AbstractQuery.php at line 78
+

_em

+protected Doctrine\ORM\EntityManager The entity manager used by this query object. $_em +
+

+ +
+ +
/Doctrine/ORM/AbstractQuery.php at line 112
+

_expireResultCache

+protected boolean Boolean value that indicates whether or not expire the result cache. $_expireResultCache = false +
+

+ +
+ +
/Doctrine/ORM/AbstractQuery.php at line 83
+

_hints

+protected array The map of query hints. $_hints = array() +
+

+ +
+ +
/Doctrine/ORM/AbstractQuery.php at line 88
+

_hydrationMode

+protected integer The hydration mode. $_hydrationMode = self::HYDRATE_OBJECT +
+

+ +
+ +
/Doctrine/ORM/AbstractQuery.php at line 68
+

_paramTypes

+protected array The parameter type map of this query. $_paramTypes = array() +
+

+ +
+ +
/Doctrine/ORM/AbstractQuery.php at line 63
+

_params

+protected array The parameter map of this query. $_params = array() +
+

+ +
+ +
/Doctrine/ORM/AbstractQuery.php at line 95
+

_resultCacheDriver

+protected CacheDriver $_resultCacheDriver +
+

The locally set cache driver used for caching result sets of this query.

+ +
+ +
/Doctrine/ORM/AbstractQuery.php at line 107
+

_resultCacheId

+protected string The id to store the result cache entry under. $_resultCacheId +
+

+ +
+ +
/Doctrine/ORM/AbstractQuery.php at line 117
+

_resultCacheTTL

+protected int Result Cache lifetime. $_resultCacheTTL +
+

+ +
+ +
/Doctrine/ORM/AbstractQuery.php at line 73
+

_resultSetMapping

+protected ResultSetMapping The user-specified ResultSetMapping to use. $_resultSetMapping +
+

+ +
+ +
/Doctrine/ORM/AbstractQuery.php at line 102
+

_useResultCache

+protected boolean $_useResultCache +
+

Boolean flag for whether or not to cache the results of this query.

+ +
+ +

Constructor Detail

+
/Doctrine/ORM/AbstractQuery.php at line 124
+

AbstractQuery

+public AbstractQuery(mixed em, Doctrine\ORM\EntityManager entityManager) +
+

Initializes a new instance of a class derived from AbstractQuery.

+ +
+ +

Method Detail

+
/Doctrine/ORM/AbstractQuery.php at line 477
+

execute

+public mixed execute(string params, integer hydrationMode) +
+

Executes the query.

+
Parameters:
+
params - Any additional query parameters.
+
hydrationMode - Processing mode to be used during the hydration process.
+
+
+ +
+ +
/Doctrine/ORM/AbstractQuery.php at line 312
+

expireResultCache

+public Doctrine\ORM\AbstractQuery expireResultCache(boolean expire) +
+

Defines if the result cache is active or not.

+
Parameters:
+
expire - Whether or not to force resultset cache expiration.
+
Returns:
+
This query instance.
+
+
+ +
+ +
/Doctrine/ORM/AbstractQuery.php at line 142
+

free

+public void free() +
+

Frees the resources used by the query object.

+ +
+ +
/Doctrine/ORM/AbstractQuery.php at line 370
+

getArrayResult

+public array getArrayResult() +
+

Gets the array of results for the query.

Alias for execute(array(), HYDRATE_ARRAY).

+ +
+ +
/Doctrine/ORM/AbstractQuery.php at line 134
+

getEntityManager

+public Doctrine\ORM\EntityManager getEntityManager() +
+

Retrieves the associated EntityManager of this Query instance.

+ +
+ +
/Doctrine/ORM/AbstractQuery.php at line 323
+

getExpireResultCache

+public boolean getExpireResultCache() +
+

Retrieves if the resultset cache is active or not.

+ +
+ +
/Doctrine/ORM/AbstractQuery.php at line 450
+

getHint

+public mixed getHint(string name) +
+

Gets the value of a query hint. If the hint name is not recognized, FALSE is returned.

+
Parameters:
+
name - The name of the hint.
+
Returns:
+
The value of the hint or FALSE, if the hint name is not recognized.
+
+
+ +
+ +
/Doctrine/ORM/AbstractQuery.php at line 346
+

getHydrationMode

+public integer getHydrationMode() +
+

Gets the hydration mode currently used by the query.

+ +
+ +
/Doctrine/ORM/AbstractQuery.php at line 163
+

getParameter

+public mixed getParameter(mixed key) +
+

Gets a query parameter.

+
Parameters:
+
key - The key (index or name) of the bound parameter.
+
Returns:
+
The value of the bound parameter.
+
+
+ +
+ +
/Doctrine/ORM/AbstractQuery.php at line 152
+

getParameters

+public array getParameters() +
+

Get all defined parameters.

+
Returns:
+
The defined query parameters.
+
+
+ +
+ +
/Doctrine/ORM/AbstractQuery.php at line 358
+

getResult

+public array getResult(mixed hydrationMode) +
+

Gets the list of results for the query.

Alias for execute(array(), $hydrationMode = HYDRATE_OBJECT).

+ +
+ +
/Doctrine/ORM/AbstractQuery.php at line 250
+

getResultCacheDriver

+public Doctrine\Common\Cache\Cache getResultCacheDriver() +
+

Returns the cache driver used for caching result sets.

+
Returns:
+
Cache driver
+
+
+ +
+ +
/Doctrine/ORM/AbstractQuery.php at line 301
+

getResultCacheLifetime

+public integer getResultCacheLifetime() +
+

Retrieves the lifetime of resultset cache.

+ +
+ +
/Doctrine/ORM/AbstractQuery.php at line 175
+

getSQL

+public abstract string getSQL() +
+

Gets the SQL query that corresponds to this query object. +The returned SQL syntax depends on the connection driver that is used +by this query object at the time of this method call.

+
Returns:
+
SQL query
+
+
+ +
+ +
/Doctrine/ORM/AbstractQuery.php at line 382
+

getScalarResult

+public array getScalarResult() +
+

Gets the scalar results for the query.

Alias for execute(array(), HYDRATE_SCALAR).

+ +
+ +
/Doctrine/ORM/AbstractQuery.php at line 400
+

getSingleResult

+public mixed getSingleResult(integer hydrationMode) +
+

Gets the single result of the query.

Enforces the presence as well as the uniqueness of the result.

If the result is not unique, a NonUniqueResultException is thrown. +If there is no result, a NoResultException is thrown.

+
Throws:
+
If the query result is not unique.
+
If the query returned no result.
+
+
+ +
+ +
/Doctrine/ORM/AbstractQuery.php at line 426
+

getSingleScalarResult

+public mixed getSingleScalarResult() +
+

Gets the single scalar result of the query.

Alias for getSingleResult(HYDRATE_SINGLE_SCALAR).

+
Throws:
+
If the query result is not unique.
+
+
+ +
+ +
/Doctrine/ORM/AbstractQuery.php at line 463
+

iterate

+public IterableResult iterate(array params, integer hydrationMode) +
+

Executes the query and returns an IterableResult that can be used to incrementally +iterate over the result.

+
Parameters:
+
params - The query parameters.
+
hydrationMode - The hydration mode to use.
+
+
+ +
+ +
/Doctrine/ORM/AbstractQuery.php at line 438
+

setHint

+public Doctrine\ORM\AbstractQuery setHint(string name, mixed value) +
+

Sets a query hint. If the hint name is not recognized, it is silently ignored.

+
Parameters:
+
name - The name of the hint.
+
value - The value of the hint.
+
+
+ +
+ +
/Doctrine/ORM/AbstractQuery.php at line 335
+

setHydrationMode

+public Doctrine\ORM\AbstractQuery setHydrationMode(integer hydrationMode) +
+

Defines the processing mode to be used during hydration / result set transformation.

+
Parameters:
+
hydrationMode - Doctrine processing mode to be used during hydration process. One of the Query::HYDRATE_* constants.
+
Returns:
+
This query instance.
+
+
+ +
+ +
/Doctrine/ORM/AbstractQuery.php at line 187
+

setParameter

+public Doctrine\ORM\AbstractQuery setParameter(string|integer key, mixed value, string type) +
+

Sets a query parameter.

+
Parameters:
+
key - The parameter position or name.
+
value - The parameter value.
+
type - The parameter type. If specified, the given value will be run through the type conversion of this type. This is usually not needed for strings and numeric types.
+
Returns:
+
This query instance.
+
+
+ +
+ +
/Doctrine/ORM/AbstractQuery.php at line 203
+

setParameters

+public Doctrine\ORM\AbstractQuery setParameters(array params, array types) +
+

Sets a collection of query parameters.

+
Returns:
+
This query instance.
+
+
+ +
+ +
/Doctrine/ORM/AbstractQuery.php at line 233
+

setResultCacheDriver

+public Doctrine\ORM\AbstractQuery setResultCacheDriver(mixed resultCacheDriver, Doctrine\Common\Cache\Cache driver) +
+

Defines a cache driver to be used for caching result sets.

+
Parameters:
+
driver - Cache driver
+
+
+ +
+ +
/Doctrine/ORM/AbstractQuery.php at line 541
+

setResultCacheId

+public Doctrine\ORM\AbstractQuery setResultCacheId(string id) +
+

Set the result cache id to use to store the result set cache entry. +If this is not explicitely set by the developer then a hash is automatically +generated for you.

+
Returns:
+
This query instance.
+
+
+ +
+ +
/Doctrine/ORM/AbstractQuery.php at line 286
+

setResultCacheLifetime

+public Doctrine\ORM\AbstractQuery setResultCacheLifetime(integer timeToLive) +
+

Defines how long the result cache will be active before expire.

+
Parameters:
+
timeToLive - How long the cache entry is valid.
+
Returns:
+
This query instance.
+
+
+ +
+ +
/Doctrine/ORM/AbstractQuery.php at line 221
+

setResultSetMapping

+public Doctrine\ORM\AbstractQuery setResultSetMapping(ResultSetMapping rsm) +
+

Sets the ResultSetMapping that should be used for hydration.

+ +
+ +
/Doctrine/ORM/AbstractQuery.php at line 268
+

useResultCache

+public This useResultCache(boolean bool, integer timeToLive, string resultCacheId) +
+

Set whether or not to cache the results of this query and if so, for +how long and which ID to use for the cache entry.

+
Returns:
+
query instance.
+
+
+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/orm/configuration.html b/lib/api/doctrine/orm/configuration.html new file mode 100644 index 000000000..8190e37bc --- /dev/null +++ b/lib/api/doctrine/orm/configuration.html @@ -0,0 +1,554 @@ + + + + + + + + + + + +Configuration (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +
Doctrine\ORM\Configuration
+
/Doctrine/ORM/Configuration.php at line 37
+ +

Class Configuration

+ +
Class:Configuration - Superclass: Doctrine
+Doctrine
⌊ Configuration
+ +
+ +

public class Configuration
extends Doctrine + +

+ +

Configuration container for all configuration options of Doctrine. +It combines all configuration options from DBAL & ORM.

+ +
+
Since:
+
2.0
+
Internal:
+
When adding a new configuration option just write a getter/setter pair and add the option to the _attributes array with a proper default value.
+
Author:
+
Benjamin Eberlei
+
Guilherme Blanco
+
Jonathan Wage
+
Roman Borschel
+
+
+ + + + + + +
Constructor Summary

Configuration()

Creates a new configuration that can be used for Doctrine.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Method Summary
void

addCustomDatetimeFunction(string name, string className)

Registers a custom DQL function that produces a date/time value. +

void

addCustomNumericFunction(string name, string className)

Registers a custom DQL function that produces a numeric value. +

void

addCustomStringFunction(string name, string className)

Registers a custom DQL function that produces a string value. +

void

addEntityNamespace(string alias, string namespace)

Adds a namespace under a certain alias.

void

addNamedNativeQuery(string name, string sql, ResultSetMapping rsm)

Adds a named native query to the configuration.

void

addNamedQuery(string name, string dql)

Adds a named DQL query to the configuration.

void

ensureProductionSettings()

Ensures that this Configuration instance contains settings that are +suitable for a production environment.

boolean

getAutoGenerateProxyClasses()

Gets a boolean flag that indicates whether proxy classes should always be regenerated +during each script execution.

string

getCustomDatetimeFunction(string name)

Gets the implementation class name of a registered custom date/time DQL function.

string

getCustomNumericFunction(string name)

Gets the implementation class name of a registered custom numeric DQL function.

string

getCustomStringFunction(string name)

Gets the implementation class name of a registered custom string DQL function.

string

getEntityNamespace(string entityNamespaceAlias)

Resolves a registered namespace alias to the full namespace.

\Doctrine\Common\Cache\Cache

getMetadataCacheImpl()

Gets the cache driver implementation that is used for metadata caching.

Mapping\Driver\Driver

getMetadataDriverImpl()

Gets the cache driver implementation that is used for the mapping metadata.

array

getNamedNativeQuery(string name)

Gets the components of a previously registered named native query.

string

getNamedQuery(string name)

Gets a previously registered named DQL query.

string

getProxyDir()

Gets the directory where Doctrine generates any necessary proxy class files.

string

getProxyNamespace()

Gets the namespace where proxy classes reside.

\Doctrine\Common\Cache\Cache

getQueryCacheImpl()

Gets the cache driver implementation that is used for the query cache (SQL cache).

\Doctrine\Common\Cache\Cache

getResultCacheImpl()

Gets the cache driver implementation that is used for query result caching.

boolean

getUseCExtension()

Gets a boolean flag that indicates whether Doctrine should make use of the +C extension.

Mapping\Driver\AnnotationDriver

newDefaultAnnotationDriver(array paths)

Add a new default annotation driver with a correctly configured annotation reader.

void

setAutoGenerateProxyClasses(boolean bool)

Sets a boolean flag that indicates whether proxy classes should always be regenerated +during each script execution.

void

setEntityNamespaces(mixed entityNamespaces, array entityAliasMap)

Set the entity alias map

void

setMetadataCacheImpl(\Doctrine\Common\Cache\Cache cacheImpl)

Sets the cache driver implementation that is used for metadata caching.

void

setMetadataDriverImpl(Driver driverImpl)

Sets the cache driver implementation that is used for metadata caching.

void

setProxyDir(string dir)

Sets the directory where Doctrine generates any necessary proxy class files.

void

setProxyNamespace(string ns)

Sets the namespace where proxy classes reside.

void

setQueryCacheImpl(\Doctrine\Common\Cache\Cache cacheImpl)

Sets the cache driver implementation that is used for the query cache (SQL cache).

void

setResultCacheImpl(\Doctrine\Common\Cache\Cache cacheImpl)

Sets the cache driver implementation that is used for query result caching.

void

setUseCExtension(boolean boolean)

Sets a boolean flag that indicates whether Doctrine should make use of the +C extension.

+ +

Constructor Detail

+
/Doctrine/ORM/Configuration.php at line 42
+

Configuration

+public Configuration() +
+

Creates a new configuration that can be used for Doctrine.

+ +
+ +

Method Detail

+
/Doctrine/ORM/Configuration.php at line 406
+

addCustomDatetimeFunction

+public void addCustomDatetimeFunction(string name, string className) +
+

Registers a custom DQL function that produces a date/time value. +Such a function can then be used in any DQL statement in any place where date/time +functions are allowed.

+ +
+ +
/Doctrine/ORM/Configuration.php at line 381
+

addCustomNumericFunction

+public void addCustomNumericFunction(string name, string className) +
+

Registers a custom DQL function that produces a numeric value. +Such a function can then be used in any DQL statement in any place where numeric +functions are allowed.

+ +
+ +
/Doctrine/ORM/Configuration.php at line 356
+

addCustomStringFunction

+public void addCustomStringFunction(string name, string className) +
+

Registers a custom DQL function that produces a string value. +Such a function can then be used in any DQL statement in any place where string +functions are allowed.

+ +
+ +
/Doctrine/ORM/Configuration.php at line 151
+

addEntityNamespace

+public void addEntityNamespace(string alias, string namespace) +
+

Adds a namespace under a certain alias.

+ +
+ +
/Doctrine/ORM/Configuration.php at line 308
+

addNamedNativeQuery

+public void addNamedNativeQuery(string name, string sql, ResultSetMapping rsm) +
+

Adds a named native query to the configuration.

+
Parameters:
+
name - The name of the query.
+
sql - The native SQL query string.
+
rsm - The ResultSetMapping used for the results of the SQL query.
+
+
+ +
+ +
/Doctrine/ORM/Configuration.php at line 282
+

addNamedQuery

+public void addNamedQuery(string name, string dql) +
+

Adds a named DQL query to the configuration.

+
Parameters:
+
name - The name of the query.
+
dql - The DQL query string.
+
+
+ +
+ +
/Doctrine/ORM/Configuration.php at line 335
+

ensureProductionSettings

+public void ensureProductionSettings() +
+

Ensures that this Configuration instance contains settings that are +suitable for a production environment.

+
Throws:
+
If a configuration setting has a value that is not suitable for a production environment.
+
+
+ +
+ +
/Doctrine/ORM/Configuration.php at line 83
+

getAutoGenerateProxyClasses

+public boolean getAutoGenerateProxyClasses() +
+

Gets a boolean flag that indicates whether proxy classes should always be regenerated +during each script execution.

+ +
+ +
/Doctrine/ORM/Configuration.php at line 417
+

getCustomDatetimeFunction

+public string getCustomDatetimeFunction(string name) +
+

Gets the implementation class name of a registered custom date/time DQL function.

+ +
+ +
/Doctrine/ORM/Configuration.php at line 392
+

getCustomNumericFunction

+public string getCustomNumericFunction(string name) +
+

Gets the implementation class name of a registered custom numeric DQL function.

+ +
+ +
/Doctrine/ORM/Configuration.php at line 367
+

getCustomStringFunction

+public string getCustomStringFunction(string name) +
+

Gets the implementation class name of a registered custom string DQL function.

+ +
+ +
/Doctrine/ORM/Configuration.php at line 163
+

getEntityNamespace

+public string getEntityNamespace(string entityNamespaceAlias) +
+

Resolves a registered namespace alias to the full namespace.

+
Throws:
+
MappingException
+
+
+ +
+ +
/Doctrine/ORM/Configuration.php at line 239
+

getMetadataCacheImpl

+public \Doctrine\Common\Cache\Cache getMetadataCacheImpl() +
+

Gets the cache driver implementation that is used for metadata caching.

+ +
+ +
/Doctrine/ORM/Configuration.php at line 189
+

getMetadataDriverImpl

+public Mapping\Driver\Driver getMetadataDriverImpl() +
+

Gets the cache driver implementation that is used for the mapping metadata.

+
Throws:
+
ORMException
+
+
+ +
+ +
/Doctrine/ORM/Configuration.php at line 320
+

getNamedNativeQuery

+public array getNamedNativeQuery(string name) +
+

Gets the components of a previously registered named native query.

+
Parameters:
+
name - The name of the query.
+
Returns:
+
A tuple with the first element being the SQL string and the second element being the ResultSetMapping.
+
+
+ +
+ +
/Doctrine/ORM/Configuration.php at line 293
+

getNamedQuery

+public string getNamedQuery(string name) +
+

Gets a previously registered named DQL query.

+
Parameters:
+
name - The name of the query.
+
Returns:
+
The DQL query.
+
+
+ +
+ +
/Doctrine/ORM/Configuration.php at line 72
+

getProxyDir

+public string getProxyDir() +
+

Gets the directory where Doctrine generates any necessary proxy class files.

+ +
+ +
/Doctrine/ORM/Configuration.php at line 104
+

getProxyNamespace

+public string getProxyNamespace() +
+

Gets the namespace where proxy classes reside.

+ +
+ +
/Doctrine/ORM/Configuration.php at line 219
+

getQueryCacheImpl

+public \Doctrine\Common\Cache\Cache getQueryCacheImpl() +
+

Gets the cache driver implementation that is used for the query cache (SQL cache).

+ +
+ +
/Doctrine/ORM/Configuration.php at line 199
+

getResultCacheImpl

+public \Doctrine\Common\Cache\Cache getResultCacheImpl() +
+

Gets the cache driver implementation that is used for query result caching.

+ +
+ +
/Doctrine/ORM/Configuration.php at line 260
+

getUseCExtension

+public boolean getUseCExtension() +
+

Gets a boolean flag that indicates whether Doctrine should make use of the +C extension.

+
Returns:
+
TRUE if Doctrine is configured to use the C extension, FALSE otherwise.
+
+
+ +
+ +
/Doctrine/ORM/Configuration.php at line 137
+

newDefaultAnnotationDriver

+public Mapping\Driver\AnnotationDriver newDefaultAnnotationDriver(array paths) +
+

Add a new default annotation driver with a correctly configured annotation reader.

+ +
+ +
/Doctrine/ORM/Configuration.php at line 94
+

setAutoGenerateProxyClasses

+public void setAutoGenerateProxyClasses(boolean bool) +
+

Sets a boolean flag that indicates whether proxy classes should always be regenerated +during each script execution.

+ +
+ +
/Doctrine/ORM/Configuration.php at line 178
+

setEntityNamespaces

+public void setEntityNamespaces(mixed entityNamespaces, array entityAliasMap) +
+

Set the entity alias map

+ +
+ +
/Doctrine/ORM/Configuration.php at line 249
+

setMetadataCacheImpl

+public void setMetadataCacheImpl(\Doctrine\Common\Cache\Cache cacheImpl) +
+

Sets the cache driver implementation that is used for metadata caching.

+ +
+ +
/Doctrine/ORM/Configuration.php at line 126
+

setMetadataDriverImpl

+public void setMetadataDriverImpl(Driver driverImpl) +
+

Sets the cache driver implementation that is used for metadata caching.

+
Todo:
+
Force parameter to be a Closure to ensure lazy evaluation (as soon as a metadata cache is in effect, the driver never needs to initialize).
+
+
+ +
+ +
/Doctrine/ORM/Configuration.php at line 62
+

setProxyDir

+public void setProxyDir(string dir) +
+

Sets the directory where Doctrine generates any necessary proxy class files.

+ +
+ +
/Doctrine/ORM/Configuration.php at line 114
+

setProxyNamespace

+public void setProxyNamespace(string ns) +
+

Sets the namespace where proxy classes reside.

+ +
+ +
/Doctrine/ORM/Configuration.php at line 229
+

setQueryCacheImpl

+public void setQueryCacheImpl(\Doctrine\Common\Cache\Cache cacheImpl) +
+

Sets the cache driver implementation that is used for the query cache (SQL cache).

+ +
+ +
/Doctrine/ORM/Configuration.php at line 209
+

setResultCacheImpl

+public void setResultCacheImpl(\Doctrine\Common\Cache\Cache cacheImpl) +
+

Sets the cache driver implementation that is used for query result caching.

+ +
+ +
/Doctrine/ORM/Configuration.php at line 271
+

setUseCExtension

+public void setUseCExtension(boolean boolean) +
+

Sets a boolean flag that indicates whether Doctrine should make use of the +C extension.

+
Parameters:
+
boolean - Whether to make use of the C extension or not.
+
+
+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/orm/entitymanager.html b/lib/api/doctrine/orm/entitymanager.html new file mode 100644 index 000000000..530f63fe8 --- /dev/null +++ b/lib/api/doctrine/orm/entitymanager.html @@ -0,0 +1,608 @@ + + + + + + + + + + + +EntityManager (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +
Doctrine\ORM\EntityManager
+
/Doctrine/ORM/EntityManager.php at line 42
+ +

Class EntityManager

+ +
EntityManager
+ +
+ +

public class EntityManager

+ +

The EntityManager is the central access point to ORM functionality.

+ +
+
License:
+
http://www.opensource.org/licenses/lgpl-license.php LGPL
+
See Also:
+
www.doctrine-project.org
+
Since:
+
2.0
+
Version:
+
$Revision$
+
Author:
+
Benjamin Eberlei
+
Guilherme Blanco
+
Jonathan Wage
+
Roman Borschel
+
+
+ + + + + + +
Constructor Summary

EntityManager(Doctrine\DBAL\Connection conn, Doctrine\ORM\Configuration config, Doctrine\Common\EventManager eventManager)

Creates a new EntityManager that operates on the given database connection +and uses the given Configuration and EventManager implementations.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Method Summary
void

beginTransaction()

Starts a transaction on the underlying database connection.

void

clear(string entityName)

Clears the EntityManager.

void

close()

Closes the EntityManager.

void

commit()

Commits a transaction on the underlying database connection.

boolean

contains(object entity)

Determines whether an entity instance is managed in this EntityManager.

object

copy(object entity, mixed deep)

Creates a copy of the given entity.

static EntityManager

create(mixed conn, Configuration config, EventManager eventManager)

Factory method to create EntityManager instances.

Doctrine\ORM\NativeQuery

createNamedNativeQuery(string name)

Creates a NativeQuery from a named native query.

Doctrine\ORM\Query

createNamedQuery(string name)

Creates a Query from a named query.

NativeQuery

createNativeQuery(string sql, ResultSetMapping rsm)

Creates a native SQL query.

Doctrine\ORM\Query

createQuery(mixed dql, string The)

Creates a new Query object.

QueryBuilder

createQueryBuilder()

Create a QueryBuilder instance

void

detach(object entity)

Detaches an entity from the EntityManager, causing a managed entity to +become detached.

object

find(string entityName, mixed identifier)

Finds an Entity by its identifier. +

void

flush()

Flushes all changes to objects that have been queued up to now to the database. +

Doctrine\ORM\Mapping\ClassMetadata

getClassMetadata(mixed className)

Returns the metadata for a class.

Doctrine\ORM\Configuration

getConfiguration()

Gets the Configuration used by the EntityManager.

Doctrine\DBAL\Connection

getConnection()

Gets the database connection object used by the EntityManager.

Doctrine\Common\EventManager

getEventManager()

Gets the EventManager used by the EntityManager.

ExpressionBuilder

getExpressionBuilder()

Gets an ExpressionBuilder used for object-oriented construction of query expressions. +

Doctrine\ORM\Internal\Hydration\AbstractHydrator

getHydrator(int hydrationMode)

Gets a hydrator for the given hydration mode. +

Doctrine\ORM\Mapping\ClassMetadataFactory

getMetadataFactory()

Gets the metadata factory used to gather the metadata of classes.

ProxyFactory

getProxyFactory()

Gets the proxy factory used by the EntityManager to create entity proxies.

object

getReference(mixed entityName, mixed identifier)

Gets a reference to the entity identified by the given type and identifier +without actually loading it. +

EntityRepository

getRepository(string entityName)

Gets the repository for an entity class.

Doctrine\ORM\UnitOfWork

getUnitOfWork()

Gets the UnitOfWork used by the EntityManager to coordinate operations.

object

merge(object entity)

Merges the state of a detached entity into the persistence context +of this EntityManager and returns the managed copy of the entity. +

Doctrine\ORM\Internal\Hydration\AbstractHydrator

newHydrator(int hydrationMode)

Create a new instance for the given hydration mode.

void

persist(mixed entity, object object)

Tells the EntityManager to make an instance managed and persistent. +

void

refresh(object entity)

Refreshes the persistent state of an entity from the database, +overriding any local changes that have not yet been persisted.

void

remove(object entity)

Removes an entity instance. +

void

rollback()

Performs a rollback on the underlying database connection and closes the +EntityManager as it may now be in a corrupted state.

+ +

Constructor Detail

+
/Doctrine/ORM/EntityManager.php at line 118
+

EntityManager

+public EntityManager(Doctrine\DBAL\Connection conn, Doctrine\ORM\Configuration config, Doctrine\Common\EventManager eventManager) +
+

Creates a new EntityManager that operates on the given database connection +and uses the given Configuration and EventManager implementations.

+ +
+ +

Method Detail

+
/Doctrine/ORM/EntityManager.php at line 176
+

beginTransaction

+public void beginTransaction() +
+

Starts a transaction on the underlying database connection.

+ +
+ +
/Doctrine/ORM/EntityManager.php at line 331
+

clear

+public void clear(string entityName) +
+

Clears the EntityManager. All entities that are currently managed +by this EntityManager become detached.

+ +
+ +
/Doctrine/ORM/EntityManager.php at line 346
+

close

+public void close() +
+

Closes the EntityManager. All entities that are currently managed +by this EntityManager become detached. The EntityManager may no longer +be used after it is closed.

+ +
+ +
/Doctrine/ORM/EntityManager.php at line 184
+

commit

+public void commit() +
+

Commits a transaction on the underlying database connection.

+ +
+ +
/Doctrine/ORM/EntityManager.php at line 482
+

contains

+public boolean contains(object entity) +
+

Determines whether an entity instance is managed in this EntityManager.

+
Returns:
+
TRUE if this EntityManager currently manages the given entity, FALSE otherwise.
+
+
+ +
+ +
/Doctrine/ORM/EntityManager.php at line 445
+

copy

+public object copy(object entity, mixed deep) +
+

Creates a copy of the given entity. Can create a shallow or a deep copy.

+
Parameters:
+
entity - The entity to copy.
+
Returns:
+
The new entity.
+
Todo:
+
Implementation or remove.
+
+
+ +
+ +
/Doctrine/ORM/EntityManager.php at line 596
+

create

+public static EntityManager create(mixed conn, Configuration config, EventManager eventManager) +
+

Factory method to create EntityManager instances.

+
Parameters:
+
conn - An array with the connection parameters or an existing Connection instance.
+
config - The Configuration instance to use.
+
eventManager - The EventManager instance to use.
+
Returns:
+
The created EntityManager.
+
+
+ +
+ +
/Doctrine/ORM/EntityManager.php at line 257
+

createNamedNativeQuery

+public Doctrine\ORM\NativeQuery createNamedNativeQuery(string name) +
+

Creates a NativeQuery from a named native query.

+ +
+ +
/Doctrine/ORM/EntityManager.php at line 231
+

createNamedQuery

+public Doctrine\ORM\Query createNamedQuery(string name) +
+

Creates a Query from a named query.

+ +
+ +
/Doctrine/ORM/EntityManager.php at line 243
+

createNativeQuery

+public NativeQuery createNativeQuery(string sql, ResultSetMapping rsm) +
+

Creates a native SQL query.

+
Parameters:
+
+
rsm - The ResultSetMapping to use.
+
+
+ +
+ +
/Doctrine/ORM/EntityManager.php at line 216
+

createQuery

+public Doctrine\ORM\Query createQuery(mixed dql, string The) +
+

Creates a new Query object.

+
Parameters:
+
The - DQL string.
+
+
+ +
+ +
/Doctrine/ORM/EntityManager.php at line 268
+

createQueryBuilder

+public QueryBuilder createQueryBuilder() +
+

Create a QueryBuilder instance

+
Returns:
+
$qb
+
+
+ +
+ +
/Doctrine/ORM/EntityManager.php at line 413
+

detach

+public void detach(object entity) +
+

Detaches an entity from the EntityManager, causing a managed entity to +become detached. Unflushed changes made to the entity if any +(including removal of the entity), will not be synchronized to the database. +Entities which previously referenced the detached entity will continue to +reference it.

+
Parameters:
+
entity - The entity to detach.
+
+
+ +
+ +
/Doctrine/ORM/EntityManager.php at line 293
+

find

+public object find(string entityName, mixed identifier) +
+

Finds an Entity by its identifier.

This is just a convenient shortcut for getRepository($entityName)->find($id).

+ +
+ +
/Doctrine/ORM/EntityManager.php at line 278
+

flush

+public void flush() +
+

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.

+ +
+ +
/Doctrine/ORM/EntityManager.php at line 205
+

getClassMetadata

+public Doctrine\ORM\Mapping\ClassMetadata getClassMetadata(mixed className) +
+

Returns the metadata for a class.

+
Internal:
+
Performance-sensitive method.
+
+
+ +
+ +
/Doctrine/ORM/EntityManager.php at line 504
+

getConfiguration

+public Doctrine\ORM\Configuration getConfiguration() +
+

Gets the Configuration used by the EntityManager.

+ +
+ +
/Doctrine/ORM/EntityManager.php at line 137
+

getConnection

+public Doctrine\DBAL\Connection getConnection() +
+

Gets the database connection object used by the EntityManager.

+ +
+ +
/Doctrine/ORM/EntityManager.php at line 494
+

getEventManager

+public Doctrine\Common\EventManager getEventManager() +
+

Gets the EventManager used by the EntityManager.

+ +
+ +
/Doctrine/ORM/EntityManager.php at line 165
+

getExpressionBuilder

+public ExpressionBuilder getExpressionBuilder() +
+

Gets an ExpressionBuilder used for object-oriented construction of query expressions.

Example:

[php] +$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)));

+ +
+ +
/Doctrine/ORM/EntityManager.php at line 540
+

getHydrator

+public Doctrine\ORM\Internal\Hydration\AbstractHydrator getHydrator(int hydrationMode) +
+

Gets a hydrator for the given hydration mode.

This method caches the hydrator instances which is used for all queries that don't +selectively iterate over the result.

+ +
+ +
/Doctrine/ORM/EntityManager.php at line 147
+

getMetadataFactory

+public Doctrine\ORM\Mapping\ClassMetadataFactory getMetadataFactory() +
+

Gets the metadata factory used to gather the metadata of classes.

+ +
+ +
/Doctrine/ORM/EntityManager.php at line 582
+

getProxyFactory

+public ProxyFactory getProxyFactory() +
+

Gets the proxy factory used by the EntityManager to create entity proxies.

+ +
+ +
/Doctrine/ORM/EntityManager.php at line 308
+

getReference

+public object getReference(mixed entityName, mixed identifier) +
+

Gets a reference to the entity identified by the given type and identifier +without actually loading it.

If partial objects are allowed, this method will return a partial object that only +has its identifier populated. Otherwise a proxy is returned that automatically +loads itself on first access.

+
Returns:
+
The entity reference.
+
+
+ +
+ +
/Doctrine/ORM/EntityManager.php at line 456
+

getRepository

+public EntityRepository getRepository(string entityName) +
+

Gets the repository for an entity class.

+
Parameters:
+
entityName - The name of the Entity.
+
Returns:
+
The repository.
+
+
+ +
+ +
/Doctrine/ORM/EntityManager.php at line 526
+

getUnitOfWork

+public Doctrine\ORM\UnitOfWork getUnitOfWork() +
+

Gets the UnitOfWork used by the EntityManager to coordinate operations.

+ +
+ +
/Doctrine/ORM/EntityManager.php at line 429
+

merge

+public object merge(object entity) +
+

Merges the state of a detached entity into the persistence context +of this EntityManager and returns the managed copy of the entity. +The entity passed to merge will not become associated/managed with this EntityManager.

+
Parameters:
+
entity - The detached entity to merge into the persistence context.
+
Returns:
+
The managed copy of the entity.
+
+
+ +
+ +
/Doctrine/ORM/EntityManager.php at line 555
+

newHydrator

+public Doctrine\ORM\Internal\Hydration\AbstractHydrator newHydrator(int hydrationMode) +
+

Create a new instance for the given hydration mode.

+ +
+ +
/Doctrine/ORM/EntityManager.php at line 363
+

persist

+public void persist(mixed entity, object object) +
+

Tells the EntityManager to make an instance managed and persistent.

The entity will be entered into the database at or before transaction +commit or as a result of the flush operation.

NOTE: The persist operation always considers entities that are not yet known to +this EntityManager as NEW. Do not pass detached entities to the persist operation.

+
Parameters:
+
object - The instance to make managed and persistent.
+
+
+ +
+ +
/Doctrine/ORM/EntityManager.php at line 395
+

refresh

+public void refresh(object entity) +
+

Refreshes the persistent state of an entity from the database, +overriding any local changes that have not yet been persisted.

+
Parameters:
+
entity - The entity to refresh.
+
+
+ +
+ +
/Doctrine/ORM/EntityManager.php at line 380
+

remove

+public void remove(object entity) +
+

Removes an entity instance.

A removed entity will be removed from the database at or before transaction commit +or as a result of the flush operation.

+
Parameters:
+
entity - The entity instance to remove.
+
+
+ +
+ +
/Doctrine/ORM/EntityManager.php at line 193
+

rollback

+public void rollback() +
+

Performs a rollback on the underlying database connection and closes the +EntityManager as it may now be in a corrupted state.

+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/orm/entitynotfoundexception.html b/lib/api/doctrine/orm/entitynotfoundexception.html new file mode 100644 index 000000000..138d0d6ac --- /dev/null +++ b/lib/api/doctrine/orm/entitynotfoundexception.html @@ -0,0 +1,110 @@ + + + + + + + + + + + +EntityNotFoundException (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +
Doctrine\ORM\EntityNotFoundException
+
/Doctrine/ORM/EntityNotFoundException.php at line 11
+ +

Class EntityNotFoundException

+ +
Class:EntityNotFoundException - Superclass: ORMException
+Class:ORMException - Superclass: Exception
+Exception
⌊ ORMException
⌊ EntityNotFoundException
+ +
+ +

public class EntityNotFoundException
extends ORMException + +

+ +

Exception thrown when a Proxy fails to retrieve an Entity result.

+ +
+
Author:
+
robo
+
Since:
+
2.0
+
+
+ + + + + + +
Constructor Summary

EntityNotFoundException()

+ + + +
Methods inherited from Doctrine\ORM\ORMException
detachedEntityCannotBeRemoved, entityManagerClosed, entityMissingAssignedId, findByRequiresParameter, invalidEntityState, invalidFindByCall, invalidFlushMode, invalidHydrationMode, invalidResultCacheDriver, metadataCacheNotConfigured, mismatchedEventManager, missingMappingDriverImpl, notSupported, proxyClassesAlwaysRegenerating, queryCacheNotConfigured, removedEntityInCollectionDetected, unknownEntityNamespace, unrecognizedField
+ +

Constructor Detail

+
/Doctrine/ORM/EntityNotFoundException.php at line 13
+

EntityNotFoundException

+public EntityNotFoundException() +
+
+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/orm/entityrepository.html b/lib/api/doctrine/orm/entityrepository.html new file mode 100644 index 000000000..923588f8d --- /dev/null +++ b/lib/api/doctrine/orm/entityrepository.html @@ -0,0 +1,251 @@ + + + + + + + + + + + +EntityRepository (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +
Doctrine\ORM\EntityRepository
+
/Doctrine/ORM/EntityRepository.php at line 40
+ +

Class EntityRepository

+ +
EntityRepository
+ +
+ +

public class EntityRepository

+ +

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.

+ +
+
License:
+
http://www.opensource.org/licenses/lgpl-license.php LGPL
+
See Also:
+
www.doctrine-project.org
+
Since:
+
2.0
+
Version:
+
$Revision$
+
Author:
+
Benjamin Eberlei
+
Guilherme Blanco
+
Jonathan Wage
+
Roman Borschel
+
+
+ + + + + + + + + + + + + + + +
Field Summary
protected Doctrine\ORM\Mapping\ClassMetadata

$_class

protected EntityManager

$_em

protected string

$_entityName

+ + + + + + +
Constructor Summary

EntityRepository(EntityManager em, mixed class, ClassMetadata classMetadata)

Initializes a new EntityRepository.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
Method Summary
void

clear()

Clears the repository, causing all managed entities to become detached.

QueryBuilder

createQueryBuilder(string alias)

Create a new QueryBuilder instance that is prepopulated for this entity name

object

find(mixed id, $id The, int hydrationMode)

Finds an entity by its primary key / identifier.

array

findAll(int hydrationMode)

Finds all entities in the repository.

array

findBy(mixed criteria, string column, string value)

Finds entities by a set of criteria.

object

findOneBy(mixed criteria, string column, string value)

Finds a single entity by a set of criteria.

+ +

Field Detail

+
/Doctrine/ORM/EntityRepository.php at line 55
+

_class

+protected Doctrine\ORM\Mapping\ClassMetadata $_class +
+

+ +
+ +
/Doctrine/ORM/EntityRepository.php at line 50
+

_em

+protected EntityManager $_em +
+

+ +
+ +
/Doctrine/ORM/EntityRepository.php at line 45
+

_entityName

+protected string $_entityName +
+

+ +
+ +

Constructor Detail

+
/Doctrine/ORM/EntityRepository.php at line 63
+

EntityRepository

+public EntityRepository(EntityManager em, mixed class, ClassMetadata classMetadata) +
+

Initializes a new EntityRepository.

+
Parameters:
+
em - The EntityManager to use.
+
classMetadata - The class descriptor.
+
+
+ +
+ +

Method Detail

+
/Doctrine/ORM/EntityRepository.php at line 86
+

clear

+public void clear() +
+

Clears the repository, causing all managed entities to become detached.

+ +
+ +
/Doctrine/ORM/EntityRepository.php at line 76
+

createQueryBuilder

+public QueryBuilder createQueryBuilder(string alias) +
+

Create a new QueryBuilder instance that is prepopulated for this entity name

+
Returns:
+
$qb
+
+
+ +
+ +
/Doctrine/ORM/EntityRepository.php at line 98
+

find

+public object find(mixed id, $id The, int hydrationMode) +
+

Finds an entity by its primary key / identifier.

+
Parameters:
+
The - identifier.
+
hydrationMode - The hydration mode to use.
+
Returns:
+
The entity.
+
+
+ +
+ +
/Doctrine/ORM/EntityRepository.php at line 120
+

findAll

+public array findAll(int hydrationMode) +
+

Finds all entities in the repository.

+
Returns:
+
The entities.
+
+
+ +
+ +
/Doctrine/ORM/EntityRepository.php at line 132
+

findBy

+public array findBy(mixed criteria, string column, string value) +
+

Finds entities by a set of criteria.

+ +
+ +
/Doctrine/ORM/EntityRepository.php at line 144
+

findOneBy

+public object findOneBy(mixed criteria, string column, string value) +
+

Finds a single entity by a set of criteria.

+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/orm/event/lifecycleeventargs.html b/lib/api/doctrine/orm/event/lifecycleeventargs.html new file mode 100644 index 000000000..66acce92a --- /dev/null +++ b/lib/api/doctrine/orm/event/lifecycleeventargs.html @@ -0,0 +1,142 @@ + + + + + + + + + + + +LifecycleEventArgs (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +
Doctrine\ORM\Event\LifecycleEventArgs
+
/Doctrine/ORM/Event/LifecycleEventArgs.php at line 35
+ +

Class LifecycleEventArgs

+ +
Class:LifecycleEventArgs - Superclass: Doctrine
+Doctrine
⌊ LifecycleEventArgs
+ +
+ +

public class LifecycleEventArgs
extends Doctrine + +

+ +

Lifecycle Events are triggered by the UnitOfWork during lifecycle transitions +of entities.

+ +
+
License:
+
http://www.opensource.org/licenses/lgpl-license.php LGPL
+
See Also:
+
www.doctrine-project.com
+
Since:
+
1.0
+
Version:
+
$Revision$
+
Author:
+
Roman Borschel
+
Benjamin Eberlei
+
+
+ + + + + + +
Constructor Summary

LifecycleEventArgs(mixed entity, mixed em)

+ + + + + + + + + + + +
Method Summary
void

getEntity()

EntityManager

getEntityManager()

+ +

Constructor Detail

+
/Doctrine/ORM/Event/LifecycleEventArgs.php at line 47
+

LifecycleEventArgs

+public LifecycleEventArgs(mixed entity, mixed em) +
+
+ +
+ +

Method Detail

+
/Doctrine/ORM/Event/LifecycleEventArgs.php at line 53
+

getEntity

+public void getEntity() +
+
+ +
+ +
/Doctrine/ORM/Event/LifecycleEventArgs.php at line 61
+

getEntityManager

+public EntityManager getEntityManager() +
+

+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/orm/event/loadclassmetadataeventargs.html b/lib/api/doctrine/orm/event/loadclassmetadataeventargs.html new file mode 100644 index 000000000..9e2593bcc --- /dev/null +++ b/lib/api/doctrine/orm/event/loadclassmetadataeventargs.html @@ -0,0 +1,132 @@ + + + + + + + + + + + +LoadClassMetadataEventArgs (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +
Doctrine\ORM\Event\LoadClassMetadataEventArgs
+
/Doctrine/ORM/Event/LoadClassMetadataEventArgs.php at line 13
+ +

Class LoadClassMetadataEventArgs

+ +
Class:LoadClassMetadataEventArgs - Superclass: EventArgs
+EventArgs
⌊ LoadClassMetadataEventArgs
+ +
+ +

public class LoadClassMetadataEventArgs
extends EventArgs + +

+ +

Class that holds event arguments for a loadMetadata event.

+ +
+
Author:
+
Jonathan H. Wage
+
Since:
+
2.0
+
License:
+
http://www.opensource.org/licenses/lgpl-license.php LGPL
+
See Also:
+
www.doctrine-project.org
+
Version:
+
$Revision: 3938 $
+
+
+ + + + + + +
Constructor Summary

LoadClassMetadataEventArgs(mixed classMetadata)

+ + + + + + + +
Method Summary
void

getClassMetadata()

+ + + +
Methods inherited from Doctrine\Common\EventArgs
getEmptyInstance
+ +

Constructor Detail

+
/Doctrine/ORM/Event/LoadClassMetadataEventArgs.php at line 17
+

LoadClassMetadataEventArgs

+public LoadClassMetadataEventArgs(mixed classMetadata) +
+
+ +
+ +

Method Detail

+
/Doctrine/ORM/Event/LoadClassMetadataEventArgs.php at line 22
+

getClassMetadata

+public void getClassMetadata() +
+
+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/orm/event/onflusheventargs.html b/lib/api/doctrine/orm/event/onflusheventargs.html new file mode 100644 index 000000000..a7f243992 --- /dev/null +++ b/lib/api/doctrine/orm/event/onflusheventargs.html @@ -0,0 +1,129 @@ + + + + + + + + + + + +OnFlushEventArgs (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +
Doctrine\ORM\Event\OnFlushEventArgs
+
/Doctrine/ORM/Event/OnFlushEventArgs.php at line 34
+ +

Class OnFlushEventArgs

+ +
Class:OnFlushEventArgs - Superclass: Doctrine
+Doctrine
⌊ OnFlushEventArgs
+ +
+ +

public class OnFlushEventArgs
extends Doctrine + +

+ +

Provides event arguments for the preFlush event.

+ +
+
License:
+
http://www.opensource.org/licenses/lgpl-license.php LGPL
+
See Also:
+
www.doctrine-project.com
+
Since:
+
2.0
+
Version:
+
$Revision$
+
Author:
+
Roman Borschel
+
Benjamin Eberlei
+
+
+ + + + + + +
Constructor Summary

OnFlushEventArgs(mixed em)

+ + + + + + + +
Method Summary
EntityManager

getEntityManager()

+ +

Constructor Detail

+
/Doctrine/ORM/Event/OnFlushEventArgs.php at line 44
+

OnFlushEventArgs

+public OnFlushEventArgs(mixed em) +
+
+ +
+ +

Method Detail

+
/Doctrine/ORM/Event/OnFlushEventArgs.php at line 52
+

getEntityManager

+public EntityManager getEntityManager() +
+

+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/orm/event/package-frame.html b/lib/api/doctrine/orm/event/package-frame.html new file mode 100644 index 000000000..616606e0a --- /dev/null +++ b/lib/api/doctrine/orm/event/package-frame.html @@ -0,0 +1,29 @@ + + + + + + + + + + + +Doctrine\ORM\Event (Doctrine) + + + + +

Doctrine\ORM\Event

+ +

Classes

+ + + + + \ No newline at end of file diff --git a/lib/api/doctrine/orm/event/package-functions.html b/lib/api/doctrine/orm/event/package-functions.html new file mode 100644 index 000000000..4ecc4ecb2 --- /dev/null +++ b/lib/api/doctrine/orm/event/package-functions.html @@ -0,0 +1,69 @@ + + + + + + + + + + + +Functions (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +

Functions

+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/orm/event/package-globals.html b/lib/api/doctrine/orm/event/package-globals.html new file mode 100644 index 000000000..490939261 --- /dev/null +++ b/lib/api/doctrine/orm/event/package-globals.html @@ -0,0 +1,69 @@ + + + + + + + + + + + +Globals (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +

Globals

+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/orm/event/package-summary.html b/lib/api/doctrine/orm/event/package-summary.html new file mode 100644 index 000000000..7f609a2a7 --- /dev/null +++ b/lib/api/doctrine/orm/event/package-summary.html @@ -0,0 +1,68 @@ + + + + + + + + + + + +Doctrine\ORM\Event (Doctrine) + + + + +
+

Doctrine

+ +
+ + +
+ +

Namespace Doctrine\ORM\Event

+ + + + + + + +
Class Summary
LifecycleEventArgsLifecycle Events are triggered by the UnitOfWork during lifecycle transitions +of entities.
LoadClassMetadataEventArgsClass that holds event arguments for a loadMetadata event.
OnFlushEventArgsProvides event arguments for the preFlush event.
PreUpdateEventArgsClass that holds event arguments for a preInsert/preUpdate event.
+ +
+ +
+

Doctrine

+ +
+ + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/orm/event/package-tree.html b/lib/api/doctrine/orm/event/package-tree.html new file mode 100644 index 000000000..b2d261c39 --- /dev/null +++ b/lib/api/doctrine/orm/event/package-tree.html @@ -0,0 +1,59 @@ + + + + + + + + + + + +Doctrine\ORM\Event (Doctrine) + + + + +
+

Doctrine

+ +
+ + +

Class Hierarchy for Package Doctrine\ORM\Event

+
+

Doctrine

+ +
+ + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/orm/event/preupdateeventargs.html b/lib/api/doctrine/orm/event/preupdateeventargs.html new file mode 100644 index 000000000..552da5aff --- /dev/null +++ b/lib/api/doctrine/orm/event/preupdateeventargs.html @@ -0,0 +1,176 @@ + + + + + + + + + + + +PreUpdateEventArgs (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +
Doctrine\ORM\Event\PreUpdateEventArgs
+
/Doctrine/ORM/Event/PreUpdateEventArgs.php at line 15
+ +

Class PreUpdateEventArgs

+ +
Class:PreUpdateEventArgs - Superclass: LifecycleEventArgs
+Class:LifecycleEventArgs - Superclass: Doctrine
+Doctrine
⌊ LifecycleEventArgs
⌊ PreUpdateEventArgs
+ +
+ +

public class PreUpdateEventArgs
extends LifecycleEventArgs + +

+ +

Class that holds event arguments for a preInsert/preUpdate event.

+ +
+
Author:
+
Roman Borschel
+
Benjamin Eberlei
+
Since:
+
2.0
+
+
+ + + + + + +
Constructor Summary

PreUpdateEventArgs(object entity, EntityManager em, array changeSet)

+ + + + + + + + + + + + + + + + + + + + + + + +
Method Summary
void

getEntityChangeSet()

mixed

getNewValue(string field)

Get the new value of the changeset of the changed field.

mixed

getOldValue(string field)

Get the old value of the changeset of the changed field.

bool

hasChangedField(mixed field)

Field has a changeset?

void

setNewValue(string field, mixed value)

Set the new value of this field.

+ + + +
Methods inherited from Doctrine\ORM\Event\LifecycleEventArgs
getEntity, getEntityManager
+ +

Constructor Detail

+
/Doctrine/ORM/Event/PreUpdateEventArgs.php at line 28
+

PreUpdateEventArgs

+public PreUpdateEventArgs(object entity, EntityManager em, array changeSet) +
+

+ +
+ +

Method Detail

+
/Doctrine/ORM/Event/PreUpdateEventArgs.php at line 34
+

getEntityChangeSet

+public void getEntityChangeSet() +
+
+ +
+ +
/Doctrine/ORM/Event/PreUpdateEventArgs.php at line 68
+

getNewValue

+public mixed getNewValue(string field) +
+

Get the new value of the changeset of the changed field.

+ +
+ +
/Doctrine/ORM/Event/PreUpdateEventArgs.php at line 55
+

getOldValue

+public mixed getOldValue(string field) +
+

Get the old value of the changeset of the changed field.

+ +
+ +
/Doctrine/ORM/Event/PreUpdateEventArgs.php at line 44
+

hasChangedField

+public bool hasChangedField(mixed field) +
+

Field has a changeset?

+ +
+ +
/Doctrine/ORM/Event/PreUpdateEventArgs.php at line 81
+

setNewValue

+public void setNewValue(string field, mixed value) +
+

Set the new value of this field.

+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/orm/events.html b/lib/api/doctrine/orm/events.html new file mode 100644 index 000000000..ac9c188fd --- /dev/null +++ b/lib/api/doctrine/orm/events.html @@ -0,0 +1,245 @@ + + + + + + + + + + + +Events (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +
Doctrine\ORM\Events
+
/Doctrine/ORM/Events.php at line 32
+ +

Class Events

+ +
Events
+ +
+ +

public final class Events

+ +

Container for all ORM events.

This class cannot be instantiated.

+ +
+
Author:
+
Roman Borschel
+
Since:
+
2.0
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Field Summary
final string

loadClassMetadata

The loadClassMetadata event occurs after the mapping metadata for a class +has been loaded from a mapping source (annotations/xml/yaml).

final string

onFlush

The onFlush event occurs when the EntityManager#flush() operation is invoked, +after any changes to managed entities have been determined but before any +actual database operations are executed.

final string

postLoad

The postLoad event occurs for an entity after the entity has been loaded +into the current EntityManager from the database or after the refresh operation +has been applied to it. +

final string

postPersist

The postPersist event occurs for an entity after the entity has +been made persistent.

final string

postRemove

The postRemove event occurs for an entity after the entity has +been deleted.

final string

postUpdate

The postUpdate event occurs after the database update operations to +entity data.

final string

prePersist

The prePersist event occurs for a given entity before the respective +EntityManager persist operation for that entity is executed. +

final string

preRemove

The preRemove event occurs for a given entity before the respective +EntityManager remove operation for that entity is executed. +

final string

preUpdate

The preUpdate event occurs before the database update operations to +entity data.

+ + + + + + +
Constructor Summary

Events()

+ +

Field Detail

+
/Doctrine/ORM/Events.php at line 110
+

loadClassMetadata

+public final string loadClassMetadata = 'loadClassMetadata' +
+

The loadClassMetadata event occurs after the mapping metadata for a class +has been loaded from a mapping source (annotations/xml/yaml).

+ +
+ +
/Doctrine/ORM/Events.php at line 121
+

onFlush

+public final string onFlush = 'onFlush' +
+

The onFlush event occurs when the EntityManager#flush() operation is invoked, +after any changes to managed entities have been determined but before any +actual database operations are executed. The event is only raised if there is +actually something to do for the underlying UnitOfWork. If nothing needs to be done, +the onFlush event is not raised.

+ +
+ +
/Doctrine/ORM/Events.php at line 103
+

postLoad

+public final string postLoad = 'postLoad' +
+

The postLoad event occurs for an entity after the entity has been loaded +into the current EntityManager from the database or after the refresh operation +has been applied to it.

Note that the postLoad event occurs for an entity before any associations have been +initialized. Therefore it is not safe to access associations in a postLoad callback +or event handler.

This is an entity lifecycle event.

+ +
+ +
/Doctrine/ORM/Events.php at line 71
+

postPersist

+public final string postPersist = 'postPersist' +
+

The postPersist event occurs for an entity after the entity has +been made persistent. It will be invoked after the database insert operations. +Generated primary key values are available in the postPersist event.

This is an entity lifecycle event.

+ +
+ +
/Doctrine/ORM/Events.php at line 52
+

postRemove

+public final string postRemove = 'postRemove' +
+

The postRemove event occurs for an entity after the entity has +been deleted. It will be invoked after the database delete operations.

This is an entity lifecycle event.

+ +
+ +
/Doctrine/ORM/Events.php at line 89
+

postUpdate

+public final string postUpdate = 'postUpdate' +
+

The postUpdate event occurs after the database update operations to +entity data.

This is an entity lifecycle event.

+ +
+ +
/Doctrine/ORM/Events.php at line 61
+

prePersist

+public final string prePersist = 'prePersist' +
+

The prePersist event occurs for a given entity before the respective +EntityManager persist operation for that entity is executed.

This is an entity lifecycle event.

+ +
+ +
/Doctrine/ORM/Events.php at line 43
+

preRemove

+public final string preRemove = 'preRemove' +
+

The preRemove event occurs for a given entity before the respective +EntityManager remove operation for that entity is executed.

This is an entity lifecycle event.

+ +
+ +
/Doctrine/ORM/Events.php at line 80
+

preUpdate

+public final string preUpdate = 'preUpdate' +
+

The preUpdate event occurs before the database update operations to +entity data.

This is an entity lifecycle event.

+ +
+ +

Constructor Detail

+
/Doctrine/ORM/Events.php at line 34
+

Events

+public Events() +
+
+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/orm/id/abstractidgenerator.html b/lib/api/doctrine/orm/id/abstractidgenerator.html new file mode 100644 index 000000000..18214ca7a --- /dev/null +++ b/lib/api/doctrine/orm/id/abstractidgenerator.html @@ -0,0 +1,113 @@ + + + + + + + + + + + +AbstractIdGenerator (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +
Doctrine\ORM\Id\AbstractIdGenerator
+
/Doctrine/ORM/Id/AbstractIdGenerator.php at line 7
+ +

Class AbstractIdGenerator

+ +
AbstractIdGenerator
+ +
+ +

public abstract class AbstractIdGenerator

+ +
+ + + + + + + + + + + +
Method Summary
abstract mixed

generate(mixed em, Doctrine\ORM\Entity entity)

Generates an identifier for an entity.

boolean

isPostInsertGenerator()

Gets whether this generator is a post-insert generator which means that +generate() must be called after the entity has been inserted +into the database. +

+ +

Method Detail

+
/Doctrine/ORM/Id/AbstractIdGenerator.php at line 15
+

generate

+public abstract mixed generate(mixed em, Doctrine\ORM\Entity entity) +
+

Generates an identifier for an entity.

+ +
+ +
/Doctrine/ORM/Id/AbstractIdGenerator.php at line 27
+

isPostInsertGenerator

+public boolean isPostInsertGenerator() +
+

Gets whether this generator is a post-insert generator which means that +generate() must be called after the entity has been inserted +into the database.

By default, this method returns FALSE. Generators that have this requirement +must override this method and return TRUE.

+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/orm/id/assignedgenerator.html b/lib/api/doctrine/orm/id/assignedgenerator.html new file mode 100644 index 000000000..7880de2fa --- /dev/null +++ b/lib/api/doctrine/orm/id/assignedgenerator.html @@ -0,0 +1,122 @@ + + + + + + + + + + + +AssignedGenerator (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +
Doctrine\ORM\Id\AssignedGenerator
+
/Doctrine/ORM/Id/AssignedGenerator.php at line 39
+ +

Class AssignedGenerator

+ +
Class:AssignedGenerator - Superclass: AbstractIdGenerator
+AbstractIdGenerator
⌊ AssignedGenerator
+ +
+ +

public class AssignedGenerator
extends AbstractIdGenerator + +

+ +

Special generator for application-assigned identifiers (doesnt really generate anything).

+ +
+
License:
+
http://www.opensource.org/licenses/lgpl-license.php LGPL
+
See Also:
+
www.doctrine-project.org
+
Since:
+
2.0
+
Version:
+
$Revision$
+
Author:
+
Benjamin Eberlei
+
Guilherme Blanco
+
Jonathan Wage
+
Roman Borschel
+
+
+ + + + + + + +
Method Summary
mixed

generate(mixed em, object entity)

Returns the identifier assigned to the given entity.

+ + + +
Methods inherited from Doctrine\ORM\Id\AbstractIdGenerator
generate, isPostInsertGenerator
+ +

Method Detail

+
/Doctrine/ORM/Id/AssignedGenerator.php at line 48
+

generate

+public mixed generate(mixed em, object entity) +
+

Returns the identifier assigned to the given entity.

+
Override.
+
+
+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/orm/id/identitygenerator.html b/lib/api/doctrine/orm/id/identitygenerator.html new file mode 100644 index 000000000..cadf907e9 --- /dev/null +++ b/lib/api/doctrine/orm/id/identitygenerator.html @@ -0,0 +1,120 @@ + + + + + + + + + + + +IdentityGenerator (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +
Doctrine\ORM\Id\IdentityGenerator
+
/Doctrine/ORM/Id/IdentityGenerator.php at line 7
+ +

Class IdentityGenerator

+ +
Class:IdentityGenerator - Superclass: AbstractIdGenerator
+AbstractIdGenerator
⌊ IdentityGenerator
+ +
+ +

public class IdentityGenerator
extends AbstractIdGenerator + +

+ +
+ + + + + + + + + + + +
Method Summary
integer|float

generate(mixed em, object entity)

Generates an ID for the given entity.

boolean

isPostInsertGenerator()

+ + + +
Methods inherited from Doctrine\ORM\Id\AbstractIdGenerator
generate, isPostInsertGenerator
+ +

Method Detail

+
/Doctrine/ORM/Id/IdentityGenerator.php at line 16
+

generate

+public integer|float generate(mixed em, object entity) +
+

Generates an ID for the given entity.

+
Override.
+
+
+ +
+ +
/Doctrine/ORM/Id/IdentityGenerator.php at line 25
+

isPostInsertGenerator

+public boolean isPostInsertGenerator() +
+

+
Override.
+
+
+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/orm/id/package-frame.html b/lib/api/doctrine/orm/id/package-frame.html new file mode 100644 index 000000000..5a2c72dab --- /dev/null +++ b/lib/api/doctrine/orm/id/package-frame.html @@ -0,0 +1,31 @@ + + + + + + + + + + + +Doctrine\ORM\Id (Doctrine) + + + + +

Doctrine\ORM\Id

+ +

Classes

+ + + + + \ No newline at end of file diff --git a/lib/api/doctrine/orm/id/package-functions.html b/lib/api/doctrine/orm/id/package-functions.html new file mode 100644 index 000000000..8433be7d0 --- /dev/null +++ b/lib/api/doctrine/orm/id/package-functions.html @@ -0,0 +1,69 @@ + + + + + + + + + + + +Functions (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +

Functions

+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/orm/id/package-globals.html b/lib/api/doctrine/orm/id/package-globals.html new file mode 100644 index 000000000..438003c3c --- /dev/null +++ b/lib/api/doctrine/orm/id/package-globals.html @@ -0,0 +1,69 @@ + + + + + + + + + + + +Globals (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +

Globals

+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/orm/id/package-summary.html b/lib/api/doctrine/orm/id/package-summary.html new file mode 100644 index 000000000..1125c6d01 --- /dev/null +++ b/lib/api/doctrine/orm/id/package-summary.html @@ -0,0 +1,69 @@ + + + + + + + + + + + +Doctrine\ORM\Id (Doctrine) + + + + +
+

Doctrine

+ +
+ + +
+ +

Namespace Doctrine\ORM\Id

+ + + + + + + + + +
Class Summary
AbstractIdGenerator
AssignedGeneratorSpecial generator for application-assigned identifiers (doesnt really generate anything).
IdentityGenerator
SequenceGeneratorRepresents an ID generator that uses a database sequence.
SequenceIdentityGenerator
TableGeneratorId generator that uses a single-row database table and a hi/lo algorithm.
+ +
+ +
+

Doctrine

+ +
+ + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/orm/id/package-tree.html b/lib/api/doctrine/orm/id/package-tree.html new file mode 100644 index 000000000..8f9cc9370 --- /dev/null +++ b/lib/api/doctrine/orm/id/package-tree.html @@ -0,0 +1,65 @@ + + + + + + + + + + + +Doctrine\ORM\Id (Doctrine) + + + + +
+

Doctrine

+ +
+ + +

Class Hierarchy for Package Doctrine\ORM\Id

+
+

Doctrine

+ +
+ + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/orm/id/sequencegenerator.html b/lib/api/doctrine/orm/id/sequencegenerator.html new file mode 100644 index 000000000..3b1c5c979 --- /dev/null +++ b/lib/api/doctrine/orm/id/sequencegenerator.html @@ -0,0 +1,185 @@ + + + + + + + + + + + +SequenceGenerator (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +
Doctrine\ORM\Id\SequenceGenerator
+
/Doctrine/ORM/Id/SequenceGenerator.php at line 32
+ +

Class SequenceGenerator

+ +
Class:SequenceGenerator - Superclass: AbstractIdGenerator
+AbstractIdGenerator
⌊ SequenceGenerator
+ +
+ +

public class SequenceGenerator
extends AbstractIdGenerator + +

+ +

Represents an ID generator that uses a database sequence.

+ +
+
Since:
+
2.0
+
Author:
+
Roman Borschel
+
+
+ + + + + + +
Constructor Summary

SequenceGenerator(string sequenceName, integer allocationSize, Doctrine\ORM\EntityManager em)

Initializes a new sequence generator.

+ + + + + + + + + + + + + + + + + + + + + + + +
Method Summary
integer|float

generate(mixed em, object entity)

Generates an ID for the given entity.

integer|float

getCurrentMaxValue()

Gets the maximum value of the currently allocated bag of values.

integer|float

getNextValue()

Gets the next value that will be returned by generate().

void

serialize()

void

unserialize(mixed serialized)

+ + + +
Methods inherited from Doctrine\ORM\Id\AbstractIdGenerator
generate, isPostInsertGenerator
+ +

Constructor Detail

+
/Doctrine/ORM/Id/SequenceGenerator.php at line 46
+

SequenceGenerator

+public SequenceGenerator(string sequenceName, integer allocationSize, Doctrine\ORM\EntityManager em) +
+

Initializes a new sequence generator.

+
Parameters:
+
em - The EntityManager to use.
+
sequenceName - The name of the sequence.
+
allocationSize - The allocation size of the sequence.
+
+
+ +
+ +

Method Detail

+
/Doctrine/ORM/Id/SequenceGenerator.php at line 59
+

generate

+public integer|float generate(mixed em, object entity) +
+

Generates an ID for the given entity.

+
Returns:
+
The generated value.
+
Override.
+
+
+ +
+ +
/Doctrine/ORM/Id/SequenceGenerator.php at line 76
+

getCurrentMaxValue

+public integer|float getCurrentMaxValue() +
+

Gets the maximum value of the currently allocated bag of values.

+ +
+ +
/Doctrine/ORM/Id/SequenceGenerator.php at line 86
+

getNextValue

+public integer|float getNextValue() +
+

Gets the next value that will be returned by generate().

+ +
+ +
/Doctrine/ORM/Id/SequenceGenerator.php at line 91
+

serialize

+public void serialize() +
+
+ +
+ +
/Doctrine/ORM/Id/SequenceGenerator.php at line 99
+

unserialize

+public void unserialize(mixed serialized) +
+
+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/orm/id/sequenceidentitygenerator.html b/lib/api/doctrine/orm/id/sequenceidentitygenerator.html new file mode 100644 index 000000000..f331063ea --- /dev/null +++ b/lib/api/doctrine/orm/id/sequenceidentitygenerator.html @@ -0,0 +1,141 @@ + + + + + + + + + + + +SequenceIdentityGenerator (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +
Doctrine\ORM\Id\SequenceIdentityGenerator
+
/Doctrine/ORM/Id/SequenceIdentityGenerator.php at line 7
+ +

Class SequenceIdentityGenerator

+ +
Class:SequenceIdentityGenerator - Superclass: IdentityGenerator
+Class:IdentityGenerator - Superclass: AbstractIdGenerator
+AbstractIdGenerator
⌊ IdentityGenerator
⌊ SequenceIdentityGenerator
+ +
+ +

public class SequenceIdentityGenerator
extends IdentityGenerator + +

+ +
+ + + + + + +
Constructor Summary

SequenceIdentityGenerator(mixed sequenceName)

+ + + + + + + + + + + +
Method Summary
mixed

generate(mixed em, Doctrine\ORM\Entity entity)

Generates an identifier for an entity.

boolean

isPostInsertGenerator()

+ + + +
Methods inherited from Doctrine\ORM\Id\IdentityGenerator
generate, isPostInsertGenerator
+ + + +
Methods inherited from Doctrine\ORM\Id\AbstractIdGenerator
generate, isPostInsertGenerator
+ +

Constructor Detail

+
/Doctrine/ORM/Id/SequenceIdentityGenerator.php at line 11
+

SequenceIdentityGenerator

+public SequenceIdentityGenerator(mixed sequenceName) +
+
+ +
+ +

Method Detail

+
/Doctrine/ORM/Id/SequenceIdentityGenerator.php at line 16
+

generate

+public mixed generate(mixed em, Doctrine\ORM\Entity entity) +
+

Generates an identifier for an entity.

+
Override.
+
+
+ +
+ +
/Doctrine/ORM/Id/SequenceIdentityGenerator.php at line 25
+

isPostInsertGenerator

+public boolean isPostInsertGenerator() +
+

+
Override.
+
+
+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/orm/id/tablegenerator.html b/lib/api/doctrine/orm/id/tablegenerator.html new file mode 100644 index 000000000..66576b331 --- /dev/null +++ b/lib/api/doctrine/orm/id/tablegenerator.html @@ -0,0 +1,135 @@ + + + + + + + + + + + +TableGenerator (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +
Doctrine\ORM\Id\TableGenerator
+
/Doctrine/ORM/Id/TableGenerator.php at line 19
+ +

Class TableGenerator

+ +
Class:TableGenerator - Superclass: AbstractIdGenerator
+AbstractIdGenerator
⌊ TableGenerator
+ +
+ +

public class TableGenerator
extends AbstractIdGenerator + +

+ +

Id generator that uses a single-row database table and a hi/lo algorithm.

+ +
+
License:
+
http://www.opensource.org/licenses/lgpl-license.php LGPL
+
See Also:
+
www.doctrine-project.org
+
Since:
+
2.0
+
Version:
+
$Revision$
+
Author:
+
Benjamin Eberlei
+
Guilherme Blanco
+
Jonathan Wage
+
Roman Borschel
+
+
+ + + + + + +
Constructor Summary

TableGenerator(mixed tableName, mixed sequenceName, mixed allocationSize)

+ + + + + + + +
Method Summary
mixed

generate(mixed em, Doctrine\ORM\Entity entity)

Generates an identifier for an entity.

+ + + +
Methods inherited from Doctrine\ORM\Id\AbstractIdGenerator
generate, isPostInsertGenerator
+ +

Constructor Detail

+
/Doctrine/ORM/Id/TableGenerator.php at line 27
+

TableGenerator

+public TableGenerator(mixed tableName, mixed sequenceName, mixed allocationSize) +
+
+ +
+ +

Method Detail

+
/Doctrine/ORM/Id/TableGenerator.php at line 34
+

generate

+public mixed generate(mixed em, Doctrine\ORM\Entity entity) +
+

Generates an identifier for an entity.

+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/orm/internal/commitordercalculator.html b/lib/api/doctrine/orm/internal/commitordercalculator.html new file mode 100644 index 000000000..54da5646b --- /dev/null +++ b/lib/api/doctrine/orm/internal/commitordercalculator.html @@ -0,0 +1,199 @@ + + + + + + + + + + + +CommitOrderCalculator (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +
Doctrine\ORM\Internal\CommitOrderCalculator
+
/Doctrine/ORM/Internal/CommitOrderCalculator.php at line 31
+ +

Class CommitOrderCalculator

+ +
CommitOrderCalculator
+ +
+ +

public class CommitOrderCalculator

+ +

The CommitOrderCalculator is used by the UnitOfWork to sort out the +correct order in which changes to entities need to be persisted.

+ +
+
Since:
+
2.0
+
Author:
+
Roman Borschel
+
+
+ + + + + + + + + + + + + + + +
Field Summary
final int

IN_PROGRESS

final int

NOT_VISITED

final int

VISITED

+ + + + + + + + + + + + + + + + + + + + + + + +
Method Summary
void

addClass(mixed class)

void

addDependency(mixed fromClass, mixed toClass)

void

clear()

Clears the current graph.

array

getCommitOrder()

Gets a valid commit order for all current nodes. +

void

hasClass(mixed className)

+ +

Field Detail

+
/Doctrine/ORM/Internal/CommitOrderCalculator.php at line 34
+

IN_PROGRESS

+public final int IN_PROGRESS = 2 +
+
+ +
+ +
/Doctrine/ORM/Internal/CommitOrderCalculator.php at line 33
+

NOT_VISITED

+public final int NOT_VISITED = 1 +
+
+ +
+ +
/Doctrine/ORM/Internal/CommitOrderCalculator.php at line 35
+

VISITED

+public final int VISITED = 3 +
+
+ +
+ +

Method Detail

+
/Doctrine/ORM/Internal/CommitOrderCalculator.php at line 116
+

addClass

+public void addClass(mixed class) +
+
+ +
+ +
/Doctrine/ORM/Internal/CommitOrderCalculator.php at line 106
+

addDependency

+public void addDependency(mixed fromClass, mixed toClass) +
+
+ +
+ +
/Doctrine/ORM/Internal/CommitOrderCalculator.php at line 47
+

clear

+public void clear() +
+

Clears the current graph.

+ +
+ +
/Doctrine/ORM/Internal/CommitOrderCalculator.php at line 61
+

getCommitOrder

+public array getCommitOrder() +
+

Gets a valid commit order for all current nodes.

Uses a depth-first search (DFS) to traverse the graph. +The desired topological sorting is the reverse postorder of these searches.

+
Returns:
+
The list of ordered classes.
+
+
+ +
+ +
/Doctrine/ORM/Internal/CommitOrderCalculator.php at line 111
+

hasClass

+public void hasClass(mixed className) +
+
+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/orm/internal/hydration/abstracthydrator.html b/lib/api/doctrine/orm/internal/hydration/abstracthydrator.html new file mode 100644 index 000000000..5b464f479 --- /dev/null +++ b/lib/api/doctrine/orm/internal/hydration/abstracthydrator.html @@ -0,0 +1,246 @@ + + + + + + + + + + + +AbstractHydrator (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +
Doctrine\ORM\Internal\Hydration\AbstractHydrator
+
/Doctrine/ORM/Internal/Hydration/AbstractHydrator.php at line 40
+ +

Class AbstractHydrator

+ +
AbstractHydrator
+ +
+ +

public abstract class AbstractHydrator

+ +

Base class for all hydrators. A hydrator is a class that provides some form +of transformation of an SQL result set into another structure.

+ +
+
License:
+
http://www.opensource.org/licenses/lgpl-license.php LGPL
+
See Also:
+
www.doctrine-project.org
+
Since:
+
2.0
+
Version:
+
$Revision: 3192 $
+
Author:
+
Konsta Vesterinen
+
Roman Borschel
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Field Summary
protected mixed

$_cache

@var array The cache used during row-by-row hydration.

protected mixed

$_em

@var EntityManager The EntityManager instance.

protected mixed

$_hints

@var array The query hints.

protected mixed

$_platform

@var AbstractPlatform The dbms Platform instance

protected mixed

$_rsm

@var ResultSetMapping The ResultSetMapping.

protected mixed

$_stmt

@var Statement The statement that provides the data to hydrate.

protected mixed

$_uow

@var UnitOfWork The UnitOfWork of the associated EntityManager.

+ + + + + + +
Constructor Summary

AbstractHydrator(Doctrine\ORM\EntityManager em)

Initializes a new instance of a class derived from AbstractHydrator.

+ + + + + + + + + + + + + + + +
Method Summary
mixed

hydrateAll(object stmt, object resultSetMapping, mixed hints)

Hydrates all rows returned by the passed statement instance at once.

mixed

hydrateRow()

Hydrates a single row returned by the current statement instance during +row-by-row hydration with {@link iterate()}.

IterableResult

iterate(object stmt, object resultSetMapping, mixed hints)

Initiates a row-by-row hydration.

+ +

Field Detail

+
/Doctrine/ORM/Internal/Hydration/AbstractHydrator.php at line 55
+

_cache

+protected mixed $_cache = array() +
+

array The cache used during row-by-row hydration.

+ +
+ +
/Doctrine/ORM/Internal/Hydration/AbstractHydrator.php at line 46
+

_em

+protected mixed $_em +
+

EntityManager The EntityManager instance.

+ +
+ +
/Doctrine/ORM/Internal/Hydration/AbstractHydrator.php at line 61
+

_hints

+protected mixed $_hints +
+

array The query hints.

+ +
+ +
/Doctrine/ORM/Internal/Hydration/AbstractHydrator.php at line 49
+

_platform

+protected mixed $_platform +
+

AbstractPlatform The dbms Platform instance

+ +
+ +
/Doctrine/ORM/Internal/Hydration/AbstractHydrator.php at line 43
+

_rsm

+protected mixed $_rsm +
+

ResultSetMapping The ResultSetMapping.

+ +
+ +
/Doctrine/ORM/Internal/Hydration/AbstractHydrator.php at line 58
+

_stmt

+protected mixed $_stmt +
+

Statement The statement that provides the data to hydrate.

+ +
+ +
/Doctrine/ORM/Internal/Hydration/AbstractHydrator.php at line 52
+

_uow

+protected mixed $_uow +
+

UnitOfWork The UnitOfWork of the associated EntityManager.

+ +
+ +

Constructor Detail

+
/Doctrine/ORM/Internal/Hydration/AbstractHydrator.php at line 68
+

AbstractHydrator

+public AbstractHydrator(Doctrine\ORM\EntityManager em) +
+

Initializes a new instance of a class derived from AbstractHydrator.

+
Parameters:
+
em - The EntityManager to use.
+
+
+ +
+ +

Method Detail

+
/Doctrine/ORM/Internal/Hydration/AbstractHydrator.php at line 98
+

hydrateAll

+public mixed hydrateAll(object stmt, object resultSetMapping, mixed hints) +
+

Hydrates all rows returned by the passed statement instance at once.

+ +
+ +
/Doctrine/ORM/Internal/Hydration/AbstractHydrator.php at line 115
+

hydrateRow

+public mixed hydrateRow() +
+

Hydrates a single row returned by the current statement instance during +row-by-row hydration with iterate().

+ +
+ +
/Doctrine/ORM/Internal/Hydration/AbstractHydrator.php at line 82
+

iterate

+public IterableResult iterate(object stmt, object resultSetMapping, mixed hints) +
+

Initiates a row-by-row hydration.

+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/orm/internal/hydration/arrayhydrator.html b/lib/api/doctrine/orm/internal/hydration/arrayhydrator.html new file mode 100644 index 000000000..d6e7d2c93 --- /dev/null +++ b/lib/api/doctrine/orm/internal/hydration/arrayhydrator.html @@ -0,0 +1,104 @@ + + + + + + + + + + + +ArrayHydrator (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +
Doctrine\ORM\Internal\Hydration\ArrayHydrator
+
/Doctrine/ORM/Internal/Hydration/ArrayHydrator.php at line 33
+ +

Class ArrayHydrator

+ +
Class:ArrayHydrator - Superclass: AbstractHydrator
+AbstractHydrator
⌊ ArrayHydrator
+ +
+ +

public class ArrayHydrator
extends AbstractHydrator + +

+ +

The ArrayHydrator produces a nested array "graph" that is often (not always) +interchangeable with the corresponding object graph for read-only access.

+ +
+
Author:
+
Roman Borschel
+
Since:
+
1.0
+
License:
+
http://www.opensource.org/licenses/lgpl-license.php LGPL
+
See Also:
+
www.doctrine-project.org
+
Version:
+
$Revision: 3192 $
+
+
+ + + +
Fields inherited from Doctrine\ORM\Internal\Hydration\AbstractHydrator
_cache, _em, _hints, _platform, _rsm, _stmt, _uow
+ + + +
Methods inherited from Doctrine\ORM\Internal\Hydration\AbstractHydrator
hydrateAll, hydrateRow, iterate
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/orm/internal/hydration/hydrationexception.html b/lib/api/doctrine/orm/internal/hydration/hydrationexception.html new file mode 100644 index 000000000..60a03e307 --- /dev/null +++ b/lib/api/doctrine/orm/internal/hydration/hydrationexception.html @@ -0,0 +1,110 @@ + + + + + + + + + + + +HydrationException (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +
Doctrine\ORM\Internal\Hydration\HydrationException
+
/Doctrine/ORM/Internal/Hydration/HydrationException.php at line 5
+ +

Class HydrationException

+ +
Class:HydrationException - Superclass: Doctrine
+Doctrine
⌊ HydrationException
+ +
+ +

public class HydrationException
extends Doctrine + +

+ +
+ + + + + + + + + + + +
Method Summary
static void

nonUniqueResult()

static void

parentObjectOfRelationNotFound(mixed alias, mixed parentAlias)

+ +

Method Detail

+
/Doctrine/ORM/Internal/Hydration/HydrationException.php at line 7
+

nonUniqueResult

+public static void nonUniqueResult() +
+
+ +
+ +
/Doctrine/ORM/Internal/Hydration/HydrationException.php at line 12
+

parentObjectOfRelationNotFound

+public static void parentObjectOfRelationNotFound(mixed alias, mixed parentAlias) +
+
+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/orm/internal/hydration/iterableresult.html b/lib/api/doctrine/orm/internal/hydration/iterableresult.html new file mode 100644 index 000000000..d035b72eb --- /dev/null +++ b/lib/api/doctrine/orm/internal/hydration/iterableresult.html @@ -0,0 +1,168 @@ + + + + + + + + + + + +IterableResult (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +
Doctrine\ORM\Internal\Hydration\IterableResult
+
/Doctrine/ORM/Internal/Hydration/IterableResult.php at line 31
+ +

Class IterableResult

+ +
IterableResult
+ +
+ +

public class IterableResult

+ +

Represents a result structure that can be iterated over, hydrating row-by-row +during the iteration. An IterableResult is obtained by AbstractHydrator#iterate().

+ +
+
Author:
+
robo
+
Since:
+
2.0
+
+
+ + + + + + +
Constructor Summary

IterableResult(Doctrine\ORM\Internal\Hydration\AbstractHydrator hydrator)

+ + + + + + + + + + + + + + + + + + + + + + + +
Method Summary
mixed

current()

int

key()

array

next()

Gets the next set of results.

void

rewind()

bool

valid()

+ +

Constructor Detail

+
/Doctrine/ORM/Internal/Hydration/IterableResult.php at line 56
+

IterableResult

+public IterableResult(Doctrine\ORM\Internal\Hydration\AbstractHydrator hydrator) +
+

+ +
+ +

Method Detail

+
/Doctrine/ORM/Internal/Hydration/IterableResult.php at line 86
+

current

+public mixed current() +
+

+ +
+ +
/Doctrine/ORM/Internal/Hydration/IterableResult.php at line 94
+

key

+public int key() +
+

+ +
+ +
/Doctrine/ORM/Internal/Hydration/IterableResult.php at line 76
+

next

+public array next() +
+

Gets the next set of results.

+ +
+ +
/Doctrine/ORM/Internal/Hydration/IterableResult.php at line 61
+

rewind

+public void rewind() +
+
+ +
+ +
/Doctrine/ORM/Internal/Hydration/IterableResult.php at line 102
+

valid

+public bool valid() +
+

+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/orm/internal/hydration/objecthydrator.html b/lib/api/doctrine/orm/internal/hydration/objecthydrator.html new file mode 100644 index 000000000..4bada0a5f --- /dev/null +++ b/lib/api/doctrine/orm/internal/hydration/objecthydrator.html @@ -0,0 +1,105 @@ + + + + + + + + + + + +ObjectHydrator (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +
Doctrine\ORM\Internal\Hydration\ObjectHydrator
+
/Doctrine/ORM/Internal/Hydration/ObjectHydrator.php at line 37
+ +

Class ObjectHydrator

+ +
Class:ObjectHydrator - Superclass: AbstractHydrator
+AbstractHydrator
⌊ ObjectHydrator
+ +
+ +

public class ObjectHydrator
extends AbstractHydrator + +

+ +

The ObjectHydrator constructs an object graph out of an SQL result set.

+ +
+
Author:
+
Roman Borschel
+
Since:
+
2.0
+
Internal:
+
Highly performance-sensitive code.
+
License:
+
http://www.opensource.org/licenses/lgpl-license.php LGPL
+
See Also:
+
www.doctrine-project.org
+
Version:
+
$Revision: 3192 $
+
+
+ + + +
Fields inherited from Doctrine\ORM\Internal\Hydration\AbstractHydrator
_cache, _em, _hints, _platform, _rsm, _stmt, _uow
+ + + +
Methods inherited from Doctrine\ORM\Internal\Hydration\AbstractHydrator
hydrateAll, hydrateRow, iterate
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/orm/internal/hydration/package-frame.html b/lib/api/doctrine/orm/internal/hydration/package-frame.html new file mode 100644 index 000000000..297760b53 --- /dev/null +++ b/lib/api/doctrine/orm/internal/hydration/package-frame.html @@ -0,0 +1,32 @@ + + + + + + + + + + + +Doctrine\ORM\Internal\Hydration (Doctrine) + + + + +

Doctrine\ORM\Internal\Hydration

+ +

Classes

+ + + + + \ No newline at end of file diff --git a/lib/api/doctrine/orm/internal/hydration/package-functions.html b/lib/api/doctrine/orm/internal/hydration/package-functions.html new file mode 100644 index 000000000..ad32d640b --- /dev/null +++ b/lib/api/doctrine/orm/internal/hydration/package-functions.html @@ -0,0 +1,69 @@ + + + + + + + + + + + +Functions (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +

Functions

+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/orm/internal/hydration/package-globals.html b/lib/api/doctrine/orm/internal/hydration/package-globals.html new file mode 100644 index 000000000..4160c2153 --- /dev/null +++ b/lib/api/doctrine/orm/internal/hydration/package-globals.html @@ -0,0 +1,69 @@ + + + + + + + + + + + +Globals (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +

Globals

+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/orm/internal/hydration/package-summary.html b/lib/api/doctrine/orm/internal/hydration/package-summary.html new file mode 100644 index 000000000..618960fa6 --- /dev/null +++ b/lib/api/doctrine/orm/internal/hydration/package-summary.html @@ -0,0 +1,73 @@ + + + + + + + + + + + +Doctrine\ORM\Internal\Hydration (Doctrine) + + + + +
+

Doctrine

+ +
+ + +
+ +

Namespace Doctrine\ORM\Internal\Hydration

+ + + + + + + + + + +
Class Summary
AbstractHydratorBase class for all hydrators.
ArrayHydratorThe ArrayHydrator produces a nested array "graph" that is often (not always) +interchangeable with the corresponding object graph for read-only access.
HydrationException
IterableResultRepresents a result structure that can be iterated over, hydrating row-by-row +during the iteration.
ObjectHydratorThe ObjectHydrator constructs an object graph out of an SQL result set.
ScalarHydratorHydrator that produces flat, rectangular results of scalar data. +
SingleScalarHydratorHydrator that hydrates a single scalar value from the result set.
+ +
+ +
+

Doctrine

+ +
+ + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/orm/internal/hydration/package-tree.html b/lib/api/doctrine/orm/internal/hydration/package-tree.html new file mode 100644 index 000000000..616cf465e --- /dev/null +++ b/lib/api/doctrine/orm/internal/hydration/package-tree.html @@ -0,0 +1,63 @@ + + + + + + + + + + + +Doctrine\ORM\Internal\Hydration (Doctrine) + + + + +
+

Doctrine

+ +
+ + +

Class Hierarchy for Package Doctrine\ORM\Internal\Hydration

+
+

Doctrine

+ +
+ + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/orm/internal/hydration/scalarhydrator.html b/lib/api/doctrine/orm/internal/hydration/scalarhydrator.html new file mode 100644 index 000000000..826860fd5 --- /dev/null +++ b/lib/api/doctrine/orm/internal/hydration/scalarhydrator.html @@ -0,0 +1,105 @@ + + + + + + + + + + + +ScalarHydrator (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +
Doctrine\ORM\Internal\Hydration\ScalarHydrator
+
/Doctrine/ORM/Internal/Hydration/ScalarHydrator.php at line 34
+ +

Class ScalarHydrator

+ +
Class:ScalarHydrator - Superclass: AbstractHydrator
+AbstractHydrator
⌊ ScalarHydrator
+ +
+ +

public class ScalarHydrator
extends AbstractHydrator + +

+ +

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.

+ +
+
Author:
+
Roman Borschel
+
Since:
+
2.0
+
License:
+
http://www.opensource.org/licenses/lgpl-license.php LGPL
+
See Also:
+
www.doctrine-project.org
+
Version:
+
$Revision: 3192 $
+
+
+ + + +
Fields inherited from Doctrine\ORM\Internal\Hydration\AbstractHydrator
_cache, _em, _hints, _platform, _rsm, _stmt, _uow
+ + + +
Methods inherited from Doctrine\ORM\Internal\Hydration\AbstractHydrator
hydrateAll, hydrateRow, iterate
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/orm/internal/hydration/singlescalarhydrator.html b/lib/api/doctrine/orm/internal/hydration/singlescalarhydrator.html new file mode 100644 index 000000000..a2d27c1d4 --- /dev/null +++ b/lib/api/doctrine/orm/internal/hydration/singlescalarhydrator.html @@ -0,0 +1,103 @@ + + + + + + + + + + + +SingleScalarHydrator (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +
Doctrine\ORM\Internal\Hydration\SingleScalarHydrator
+
/Doctrine/ORM/Internal/Hydration/SingleScalarHydrator.php at line 32
+ +

Class SingleScalarHydrator

+ +
Class:SingleScalarHydrator - Superclass: AbstractHydrator
+AbstractHydrator
⌊ SingleScalarHydrator
+ +
+ +

public class SingleScalarHydrator
extends AbstractHydrator + +

+ +

Hydrator that hydrates a single scalar value from the result set.

+ +
+
Author:
+
Roman Borschel
+
Since:
+
2.0
+
License:
+
http://www.opensource.org/licenses/lgpl-license.php LGPL
+
See Also:
+
www.doctrine-project.org
+
Version:
+
$Revision: 3192 $
+
+
+ + + +
Fields inherited from Doctrine\ORM\Internal\Hydration\AbstractHydrator
_cache, _em, _hints, _platform, _rsm, _stmt, _uow
+ + + +
Methods inherited from Doctrine\ORM\Internal\Hydration\AbstractHydrator
hydrateAll, hydrateRow, iterate
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/orm/internal/package-frame.html b/lib/api/doctrine/orm/internal/package-frame.html new file mode 100644 index 000000000..3130b159c --- /dev/null +++ b/lib/api/doctrine/orm/internal/package-frame.html @@ -0,0 +1,26 @@ + + + + + + + + + + + +Doctrine\ORM\Internal (Doctrine) + + + + +

Doctrine\ORM\Internal

+ +

Classes

+ + + + + \ No newline at end of file diff --git a/lib/api/doctrine/orm/internal/package-functions.html b/lib/api/doctrine/orm/internal/package-functions.html new file mode 100644 index 000000000..553ea031b --- /dev/null +++ b/lib/api/doctrine/orm/internal/package-functions.html @@ -0,0 +1,69 @@ + + + + + + + + + + + +Functions (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +

Functions

+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/orm/internal/package-globals.html b/lib/api/doctrine/orm/internal/package-globals.html new file mode 100644 index 000000000..23bfdb1b4 --- /dev/null +++ b/lib/api/doctrine/orm/internal/package-globals.html @@ -0,0 +1,69 @@ + + + + + + + + + + + +Globals (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +

Globals

+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/orm/internal/package-summary.html b/lib/api/doctrine/orm/internal/package-summary.html new file mode 100644 index 000000000..8e384345b --- /dev/null +++ b/lib/api/doctrine/orm/internal/package-summary.html @@ -0,0 +1,65 @@ + + + + + + + + + + + +Doctrine\ORM\Internal (Doctrine) + + + + +
+

Doctrine

+ +
+ + +
+ +

Namespace Doctrine\ORM\Internal

+ + + + +
Class Summary
CommitOrderCalculatorThe CommitOrderCalculator is used by the UnitOfWork to sort out the +correct order in which changes to entities need to be persisted.
+ +
+ +
+

Doctrine

+ +
+ + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/orm/internal/package-tree.html b/lib/api/doctrine/orm/internal/package-tree.html new file mode 100644 index 000000000..568d99cad --- /dev/null +++ b/lib/api/doctrine/orm/internal/package-tree.html @@ -0,0 +1,56 @@ + + + + + + + + + + + +Doctrine\ORM\Internal (Doctrine) + + + + +
+

Doctrine

+ +
+ + +

Class Hierarchy for Package Doctrine\ORM\Internal

+
+

Doctrine

+ +
+ + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/orm/mapping/associationmapping.html b/lib/api/doctrine/orm/mapping/associationmapping.html new file mode 100644 index 000000000..d6d09617f --- /dev/null +++ b/lib/api/doctrine/orm/mapping/associationmapping.html @@ -0,0 +1,471 @@ + + + + + + + + + + + +AssociationMapping (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +
Doctrine\ORM\Mapping\AssociationMapping
+
/Doctrine/ORM/Mapping/AssociationMapping.php at line 36
+ +

Class AssociationMapping

+ +
AssociationMapping
+ +
+ +

public abstract class AssociationMapping

+ +

Base class for association mappings.

IMPORTANT NOTE:

The fields of this class are only public for 2 reasons: +1) To allow fast, internal 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).

+ +
+
Author:
+
Roman Borschel
+
Since:
+
2.0
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Field Summary
final integer

FETCH_EAGER

Specifies that an association is to be fetched when the owner of the +association is fetched.

final integer

FETCH_LAZY

Specifies that an association is to be fetched when it is first accessed.

string

$declared

READ-ONLY: The name of the entity or mapped superclass that declares +the association field in an inheritance hierarchy.

integer

$fetchMode

READ-ONLY: The fetch mode used for the association.

string

$inherited

READ-ONLY: The name of the entity class from which the association was +inherited in an inheritance hierarchy.

string

$inversedBy

READ-ONLY: Identifies the field on the inverse side of a bidirectional association. +

boolean

$isCascadeDetach

READ-ONLY: Whether the association cascades detach() operations from the source entity +to the target entity/entities.

boolean

$isCascadeMerge

READ-ONLY: Whether the association cascades merge() operations from the source entity +to the target entity/entities.

boolean

$isCascadePersist

READ-ONLY: Whether the association cascades save() operations from the source entity +to the target entity/entities.

boolean

$isCascadeRefresh

READ-ONLY: Whether the association cascades refresh() operations from the source entity +to the target entity/entities.

boolean

$isCascadeRemove

READ-ONLY: Whether the association cascades delete() operations from the source entity +to the target entity/entities.

boolean

$isOwningSide

READ-ONLY: Flag that indicates whether the class that defines this mapping is +the owning side of the association.

array

$joinTable

READ-ONLY: The join table definition, if any.

string

$mappedBy

READ-ONLY: Identifies the field on the owning side of a bidirectional association that +controls the mapping for the association.

string

$sourceEntityName

READ-ONLY: The name of the source Entity (the Entity that defines this mapping).

string

$sourceFieldName

READ-ONLY: Identifies the field on the source class (the class this AssociationMapping +belongs to) that represents the association and stores the reference to the +other entity/entities.

string

$targetEntityName

READ-ONLY: The name of the target Entity (the Enitity that is the target of the +association).

+ + + + + + +
Constructor Summary

AssociationMapping(array mapping)

Initializes a new instance of a class derived from AssociationMapping.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Method Summary
string

getQuotedJoinTableName(AbstractPlatform platform)

Gets the (possibly quoted) name of the join table.

boolean

hasCascades()

Checks whether the association has any cascades configured.

boolean

isEagerlyFetched()

Whether the target entity/entities of the association are eagerly fetched.

boolean

isLazilyFetched()

Whether the target entity/entities of the association are lazily fetched.

boolean

isManyToMany()

Whether the association is a many-to-many association.

boolean

isOneToMany()

Whether the association is a one-to-many association.

boolean

isOneToOne()

Whether the association is a one-to-one association.

abstract void

load(object sourceEntity, object target, EntityManager em, array joinColumnValues)

Loads data in $target domain object using this association. +

boolean

usesJoinTable()

Whether the association uses a join table for the mapping.

+ +

Field Detail

+
/Doctrine/ORM/Mapping/AssociationMapping.php at line 50
+

FETCH_EAGER

+public final integer FETCH_EAGER = 3 +
+

Specifies that an association is to be fetched when the owner of the +association is fetched.

+ +
+ +
/Doctrine/ORM/Mapping/AssociationMapping.php at line 43
+

FETCH_LAZY

+public final integer FETCH_LAZY = 2 +
+

Specifies that an association is to be fetched when it is first accessed.

+ +
+ +
/Doctrine/ORM/Mapping/AssociationMapping.php at line 169
+

declared

+public string $declared +
+

READ-ONLY: The name of the entity or mapped superclass that declares +the association field in an inheritance hierarchy.

+ +
+ +
/Doctrine/ORM/Mapping/AssociationMapping.php at line 97
+

fetchMode

+public integer $fetchMode +
+

READ-ONLY: The fetch mode used for the association.

+ +
+ +
/Doctrine/ORM/Mapping/AssociationMapping.php at line 161
+

inherited

+public string $inherited +
+

READ-ONLY: The name of the entity class from which the association was +inherited in an inheritance hierarchy.

+ +
+ +
/Doctrine/ORM/Mapping/AssociationMapping.php at line 146
+

inversedBy

+public string $inversedBy +
+

READ-ONLY: Identifies the field on the inverse side of a bidirectional association. +This is only set on the owning side of an association.

+ +
+ +
/Doctrine/ORM/Mapping/AssociationMapping.php at line 90
+

isCascadeDetach

+public boolean $isCascadeDetach +
+

READ-ONLY: Whether the association cascades detach() operations from the source entity +to the target entity/entities.

+ +
+ +
/Doctrine/ORM/Mapping/AssociationMapping.php at line 82
+

isCascadeMerge

+public boolean $isCascadeMerge +
+

READ-ONLY: Whether the association cascades merge() operations from the source entity +to the target entity/entities.

+ +
+ +
/Doctrine/ORM/Mapping/AssociationMapping.php at line 66
+

isCascadePersist

+public boolean $isCascadePersist +
+

READ-ONLY: Whether the association cascades save() operations from the source entity +to the target entity/entities.

+ +
+ +
/Doctrine/ORM/Mapping/AssociationMapping.php at line 74
+

isCascadeRefresh

+public boolean $isCascadeRefresh +
+

READ-ONLY: Whether the association cascades refresh() operations from the source entity +to the target entity/entities.

+ +
+ +
/Doctrine/ORM/Mapping/AssociationMapping.php at line 58
+

isCascadeRemove

+public boolean $isCascadeRemove +
+

READ-ONLY: Whether the association cascades delete() operations from the source entity +to the target entity/entities.

+ +
+ +
/Doctrine/ORM/Mapping/AssociationMapping.php at line 105
+

isOwningSide

+public boolean $isOwningSide = true +
+

READ-ONLY: Flag that indicates whether the class that defines this mapping is +the owning side of the association.

+ +
+ +
/Doctrine/ORM/Mapping/AssociationMapping.php at line 153
+

joinTable

+public array $joinTable +
+

READ-ONLY: The join table definition, if any.

+ +
+ +
/Doctrine/ORM/Mapping/AssociationMapping.php at line 138
+

mappedBy

+public string $mappedBy +
+

READ-ONLY: Identifies the field on the owning side of a bidirectional association that +controls the mapping for the association. This is only set on the inverse side +of an association.

+ +
+ +
/Doctrine/ORM/Mapping/AssociationMapping.php at line 112
+

sourceEntityName

+public string $sourceEntityName +
+

READ-ONLY: The name of the source Entity (the Entity that defines this mapping).

+ +
+ +
/Doctrine/ORM/Mapping/AssociationMapping.php at line 129
+

sourceFieldName

+public string $sourceFieldName +
+

READ-ONLY: Identifies the field on the source class (the class this AssociationMapping +belongs to) that represents the association and stores the reference to the +other entity/entities.

+ +
+ +
/Doctrine/ORM/Mapping/AssociationMapping.php at line 120
+

targetEntityName

+public string $targetEntityName +
+

READ-ONLY: The name of the target Entity (the Enitity that is the target of the +association).

+ +
+ +

Constructor Detail

+
/Doctrine/ORM/Mapping/AssociationMapping.php at line 176
+

AssociationMapping

+public AssociationMapping(array mapping) +
+

Initializes a new instance of a class derived from AssociationMapping.

+
Parameters:
+
mapping - The mapping definition.
+
+
+ +
+ +

Method Detail

+
/Doctrine/ORM/Mapping/AssociationMapping.php at line 337
+

getQuotedJoinTableName

+public string getQuotedJoinTableName(AbstractPlatform platform) +
+

Gets the (possibly quoted) name of the join table.

+ +
+ +
/Doctrine/ORM/Mapping/AssociationMapping.php at line 309
+

hasCascades

+public boolean hasCascades() +
+

Checks whether the association has any cascades configured.

+ +
+ +
/Doctrine/ORM/Mapping/AssociationMapping.php at line 249
+

isEagerlyFetched

+public boolean isEagerlyFetched() +
+

Whether the target entity/entities of the association are eagerly fetched.

+ +
+ +
/Doctrine/ORM/Mapping/AssociationMapping.php at line 259
+

isLazilyFetched

+public boolean isLazilyFetched() +
+

Whether the target entity/entities of the association are lazily fetched.

+ +
+ +
/Doctrine/ORM/Mapping/AssociationMapping.php at line 289
+

isManyToMany

+public boolean isManyToMany() +
+

Whether the association is a many-to-many association.

+ +
+ +
/Doctrine/ORM/Mapping/AssociationMapping.php at line 279
+

isOneToMany

+public boolean isOneToMany() +
+

Whether the association is a one-to-many association.

+ +
+ +
/Doctrine/ORM/Mapping/AssociationMapping.php at line 269
+

isOneToOne

+public boolean isOneToOne() +
+

Whether the association is a one-to-one association.

+ +
+ +
/Doctrine/ORM/Mapping/AssociationMapping.php at line 329
+

load

+public abstract void load(object sourceEntity, object target, EntityManager em, array joinColumnValues) +
+

Loads data in $target domain object using this association. +The data comes from the association navigated from $sourceEntity +using $em.

+
Parameters:
+
+
target - an entity or a collection
+
+
joinColumnValues - foreign keys (significative for this association) of $sourceEntity, if needed
+
+
+ +
+ +
/Doctrine/ORM/Mapping/AssociationMapping.php at line 299
+

usesJoinTable

+public boolean usesJoinTable() +
+

Whether the association uses a join table for the mapping.

+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/orm/mapping/changetrackingpolicy.html b/lib/api/doctrine/orm/mapping/changetrackingpolicy.html new file mode 100644 index 000000000..a3616b9fb --- /dev/null +++ b/lib/api/doctrine/orm/mapping/changetrackingpolicy.html @@ -0,0 +1,101 @@ + + + + + + + + + + + +ChangeTrackingPolicy (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +
Doctrine\ORM\Mapping\ChangeTrackingPolicy
+
/Doctrine/ORM/Mapping/Driver/DoctrineAnnotations.php at line 125
+ +

Class ChangeTrackingPolicy

+ +
Class:ChangeTrackingPolicy - Superclass: Annotation
+Annotation
⌊ ChangeTrackingPolicy
+ +
+ +

public final class ChangeTrackingPolicy
extends Annotation + +

+ +

Annotations class

+ +
+
License:
+
http://www.opensource.org/licenses/lgpl-license.php LGPL
+
See Also:
+
www.doctrine-project.org
+
Since:
+
2.0
+
Version:
+
$Revision: 3938 $
+
Author:
+
Guilherme Blanco
+
Jonathan Wage
+
Roman Borschel
+
+
+ + + +
Fields inherited from Doctrine\Common\Annotations\Annotation
value
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/orm/mapping/classmetadata.html b/lib/api/doctrine/orm/mapping/classmetadata.html new file mode 100644 index 000000000..d8a9badb7 --- /dev/null +++ b/lib/api/doctrine/orm/mapping/classmetadata.html @@ -0,0 +1,309 @@ + + + + + + + + + + + +ClassMetadata (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +
Doctrine\ORM\Mapping\ClassMetadata
+
/Doctrine/ORM/Mapping/ClassMetadata.php at line 42
+ +

Class ClassMetadata

+ +
Class:ClassMetadata - Superclass: ClassMetadataInfo
+ClassMetadataInfo
⌊ ClassMetadata
+ +
+ +

public class ClassMetadata
extends ClassMetadataInfo + +

+ +

A ClassMetadata instance holds all the object-relational mapping metadata +of an entity and it's 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).

+ +
+
Author:
+
Roman Borschel
+
Jonathan H. Wage
+
Since:
+
2.0
+
+
+ + + + + + + + + + + +
Field Summary
ReflectionClass

$reflClass

The ReflectionClass instance of the mapped class.

array

$reflFields

The ReflectionProperty instances of the mapped class.

+ + + +
Fields inherited from Doctrine\ORM\Mapping\ClassMetadataInfo
CHANGETRACKING_DEFERRED_EXPLICIT, CHANGETRACKING_DEFERRED_IMPLICIT, CHANGETRACKING_NOTIFY, GENERATOR_TYPE_AUTO, GENERATOR_TYPE_IDENTITY, GENERATOR_TYPE_NONE, GENERATOR_TYPE_SEQUENCE, GENERATOR_TYPE_TABLE, INHERITANCE_TYPE_JOINED, INHERITANCE_TYPE_NONE, INHERITANCE_TYPE_SINGLE_TABLE, INHERITANCE_TYPE_TABLE_PER_CLASS, associationMappings, changeTrackingPolicy, columnNames, customRepositoryClassName, discriminatorColumn, discriminatorMap, discriminatorValue, fieldMappings, fieldNames, generatorType, idGenerator, identifier, inheritanceType, isIdentifierComposite, isMappedSuperclass, isVersioned, lifecycleCallbacks, name, namespace, parentClasses, rootEntityName, sequenceGeneratorDefinition, subClasses, table, tableGeneratorDefinition, versionField
+ + + + + + +
Constructor Summary

ClassMetadata(string entityName)

Initializes a new ClassMetadata instance that will hold the object-relational mapping +metadata of the class with the given name.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Method Summary
void

getFieldValue(object entity, string field)

Gets the specified field's value off the given entity.

array

getIdentifierValues(object entity)

Extracts the identifier values of an entity of this class. +

string

getQuotedColumnName(string field, AbstractPlatform platform)

Gets the (possibly quoted) column name of a mapped field for safe use +in an SQL statement.

string

getQuotedTableName(AbstractPlatform platform)

Gets the (possibly quoted) primary table name of this class for safe use +in an SQL statement.

ReflectionClass

getReflectionClass()

Gets the ReflectionClass instance of the mapped class.

array

getReflectionProperties()

Gets the ReflectionPropertys of the mapped class.

ReflectionProperty

getReflectionProperty(string name)

Gets a ReflectionProperty for a specific field of the mapped class.

ReflectionProperty

getSingleIdReflectionProperty()

Gets the ReflectionProperty for the single identifier field.

object

newInstance()

Creates a new instance of the mapped class, without invoking the constructor.

void

setFieldValue(object entity, string field, mixed value)

Sets the specified field to the specified value on the given entity.

void

setIdentifierValues(object entity, mixed id)

Populates the entity identifier of an entity.

+ + + +
Methods inherited from Doctrine\ORM\Mapping\ClassMetadataInfo
addInheritedAssociationMapping, addInheritedFieldMapping, addLifecycleCallback, getAssociationMapping, getAssociationMappings, getColumnName, getColumnNames, getFieldMapping, getFieldName, getIdentifierColumnNames, getIdentifierFieldNames, getLifecycleCallbacks, getSingleIdentifierColumnName, getSingleIdentifierFieldName, getTableName, getTemporaryIdTableName, getTypeOfColumn, getTypeOfField, hasAssociation, hasField, hasLifecycleCallbacks, invokeLifecycleCallbacks, isChangeTrackingDeferredExplicit, isChangeTrackingDeferredImplicit, isChangeTrackingNotify, isCollectionValuedAssociation, isIdGeneratorIdentity, isIdGeneratorSequence, isIdGeneratorTable, isIdentifier, isIdentifierNatural, isInheritanceTypeJoined, isInheritanceTypeNone, isInheritanceTypeSingleTable, isInheritanceTypeTablePerClass, isInheritedAssociation, isInheritedField, isNullable, isSingleValuedAssociation, isUniqueField, mapField, mapManyToMany, mapManyToOne, mapOneToMany, mapOneToOne, setChangeTrackingPolicy, setCustomRepositoryClass, setDiscriminatorColumn, setDiscriminatorMap, setIdGenerator, setIdGeneratorType, setIdentifier, setInheritanceType, setLifecycleCallbacks, setParentClasses, setPrimaryTable, setSequenceGeneratorDefinition, setSubclasses, setTableName, setVersionField, setVersionMapping, setVersioned, usesIdGenerator
+ +

Field Detail

+
/Doctrine/ORM/Mapping/ClassMetadata.php at line 49
+

reflClass

+public ReflectionClass $reflClass +
+

The ReflectionClass instance of the mapped class.

+ +
+ +
/Doctrine/ORM/Mapping/ClassMetadata.php at line 56
+

reflFields

+public array $reflFields = array() +
+

The ReflectionProperty instances of the mapped class.

+ +
+ +

Constructor Detail

+
/Doctrine/ORM/Mapping/ClassMetadata.php at line 71
+

ClassMetadata

+public ClassMetadata(string entityName) +
+

Initializes a new ClassMetadata instance that will hold the object-relational mapping +metadata of the class with the given name.

+
Parameters:
+
entityName - The name of the entity class the new instance is used for.
+
+
+ +
+ +

Method Detail

+
/Doctrine/ORM/Mapping/ClassMetadata.php at line 203
+

getFieldValue

+public void getFieldValue(object entity, string field) +
+

Gets the specified field's value off the given entity.

+ +
+ +
/Doctrine/ORM/Mapping/ClassMetadata.php at line 151
+

getIdentifierValues

+public array getIdentifierValues(object entity) +
+

Extracts the identifier values of an entity of this class.

For composite identifiers, the identifier values are returned as an array +with the same order as the field order in identifier.

+ +
+ +
/Doctrine/ORM/Mapping/ClassMetadata.php at line 233
+

getQuotedColumnName

+public string getQuotedColumnName(string field, AbstractPlatform platform) +
+

Gets the (possibly quoted) column name of a mapped field for safe use +in an SQL statement.

+ +
+ +
/Doctrine/ORM/Mapping/ClassMetadata.php at line 247
+

getQuotedTableName

+public string getQuotedTableName(AbstractPlatform platform) +
+

Gets the (possibly quoted) primary table name of this class for safe use +in an SQL statement.

+ +
+ +
/Doctrine/ORM/Mapping/ClassMetadata.php at line 84
+

getReflectionClass

+public ReflectionClass getReflectionClass() +
+

Gets the ReflectionClass instance of the mapped class.

+ +
+ +
/Doctrine/ORM/Mapping/ClassMetadata.php at line 94
+

getReflectionProperties

+public array getReflectionProperties() +
+

Gets the ReflectionPropertys of the mapped class.

+
Returns:
+
An array of ReflectionProperty instances.
+
+
+ +
+ +
/Doctrine/ORM/Mapping/ClassMetadata.php at line 105
+

getReflectionProperty

+public ReflectionProperty getReflectionProperty(string name) +
+

Gets a ReflectionProperty for a specific field of the mapped class.

+ +
+ +
/Doctrine/ORM/Mapping/ClassMetadata.php at line 116
+

getSingleIdReflectionProperty

+public ReflectionProperty getSingleIdReflectionProperty() +
+

Gets the ReflectionProperty for the single identifier field.

+
Throws:
+
If the class has a composite identifier.
+
+
+ +
+ +
/Doctrine/ORM/Mapping/ClassMetadata.php at line 340
+

newInstance

+public object newInstance() +
+

Creates a new instance of the mapped class, without invoking the constructor.

+ +
+ +
/Doctrine/ORM/Mapping/ClassMetadata.php at line 192
+

setFieldValue

+public void setFieldValue(object entity, string field, mixed value) +
+

Sets the specified field to the specified value on the given entity.

+ +
+ +
/Doctrine/ORM/Mapping/ClassMetadata.php at line 174
+

setIdentifierValues

+public void setIdentifierValues(object entity, mixed id) +
+

Populates the entity identifier of an entity.

+
Todo:
+
Rename to assignIdentifier()
+
+
+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/orm/mapping/classmetadatafactory.html b/lib/api/doctrine/orm/mapping/classmetadatafactory.html new file mode 100644 index 000000000..a513af02a --- /dev/null +++ b/lib/api/doctrine/orm/mapping/classmetadatafactory.html @@ -0,0 +1,221 @@ + + + + + + + + + + + +ClassMetadataFactory (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +
Doctrine\ORM\Mapping\ClassMetadataFactory
+
/Doctrine/ORM/Mapping/ClassMetadataFactory.php at line 42
+ +

Class ClassMetadataFactory

+ +
ClassMetadataFactory
+ +
+ +

public class ClassMetadataFactory

+ +

The ClassMetadataFactory is used to create ClassMetadata objects that contain all the +metadata mapping informations of a class which describes how a class should be mapped +to a relational database.

+ +
+
License:
+
http://www.opensource.org/licenses/lgpl-license.php LGPL
+
See Also:
+
www.doctrine-project.org
+
Since:
+
2.0
+
Version:
+
$Revision$
+
Author:
+
Benjamin Eberlei
+
Guilherme Blanco
+
Jonathan Wage
+
Roman Borschel
+
+
+ + + + + + +
Constructor Summary

ClassMetadataFactory(mixed em, $driver The)

Creates a new factory instance that uses the given metadata driver implementation.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Method Summary
array

getAllMetadata()

Forces the factory to load the metadata of all classes known to the underlying +mapping driver.

Doctrine\Common\Cache\Cache

getCacheDriver()

Gets the cache driver used by the factory to cache ClassMetadata instances.

void

getLoadedMetadata()

Doctrine\ORM\Mapping\ClassMetadata

getMetadataFor(string className)

Gets the class metadata descriptor for a class.

boolean

hasMetadataFor(string className)

Checks whether the factory has the metadata for a class loaded already.

void

setCacheDriver(Doctrine\Common\Cache\Cache cacheDriver)

Sets the cache driver used by the factory to cache ClassMetadata instances.

void

setMetadataFor(string className, ClassMetadata class)

Sets the metadata descriptor for a specific class. +

+ +

Constructor Detail

+
/Doctrine/ORM/Mapping/ClassMetadataFactory.php at line 61
+

ClassMetadataFactory

+public ClassMetadataFactory(mixed em, $driver The) +
+

Creates a new factory instance that uses the given metadata driver implementation.

+
Parameters:
+
The - metadata driver to use.
+
+
+ +
+ +

Method Detail

+
/Doctrine/ORM/Mapping/ClassMetadataFactory.php at line 97
+

getAllMetadata

+public array getAllMetadata() +
+

Forces the factory to load the metadata of all classes known to the underlying +mapping driver.

+
Returns:
+
The ClassMetadata instances of all mapped classes.
+
+
+ +
+ +
/Doctrine/ORM/Mapping/ClassMetadataFactory.php at line 81
+

getCacheDriver

+public Doctrine\Common\Cache\Cache getCacheDriver() +
+

Gets the cache driver used by the factory to cache ClassMetadata instances.

+ +
+ +
/Doctrine/ORM/Mapping/ClassMetadataFactory.php at line 86
+

getLoadedMetadata

+public void getLoadedMetadata() +
+
+ +
+ +
/Doctrine/ORM/Mapping/ClassMetadataFactory.php at line 129
+

getMetadataFor

+public Doctrine\ORM\Mapping\ClassMetadata getMetadataFor(string className) +
+

Gets the class metadata descriptor for a class.

+
Parameters:
+
className - The name of the class.
+
+
+ +
+ +
/Doctrine/ORM/Mapping/ClassMetadataFactory.php at line 176
+

hasMetadataFor

+public boolean hasMetadataFor(string className) +
+

Checks whether the factory has the metadata for a class loaded already.

+
Returns:
+
TRUE if the metadata of the class in question is already loaded, FALSE otherwise.
+
+
+ +
+ +
/Doctrine/ORM/Mapping/ClassMetadataFactory.php at line 71
+

setCacheDriver

+public void setCacheDriver(Doctrine\Common\Cache\Cache cacheDriver) +
+

Sets the cache driver used by the factory to cache ClassMetadata instances.

+ +
+ +
/Doctrine/ORM/Mapping/ClassMetadataFactory.php at line 189
+

setMetadataFor

+public void setMetadataFor(string className, ClassMetadata class) +
+

Sets the metadata descriptor for a specific class.

NOTE: This is only useful in very special cases, like when generating proxy classes.

+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/orm/mapping/classmetadatainfo.html b/lib/api/doctrine/orm/mapping/classmetadatainfo.html new file mode 100644 index 000000000..e9639e307 --- /dev/null +++ b/lib/api/doctrine/orm/mapping/classmetadatainfo.html @@ -0,0 +1,1635 @@ + + + + + + + + + + + +ClassMetadataInfo (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +
Doctrine\ORM\Mapping\ClassMetadataInfo
+
/Doctrine/ORM/Mapping/ClassMetadataInfo.php at line 40
+ +

Class ClassMetadataInfo

+ +
ClassMetadataInfo
+ +
+ +

public class ClassMetadataInfo

+ +

A ClassMetadata instance holds all the object-relational mapping metadata +of an entity and it's 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).

+ +
+
Author:
+
Roman Borschel
+
Jonathan H. Wage
+
Since:
+
2.0
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Field Summary
final int

CHANGETRACKING_DEFERRED_EXPLICIT

DEFERRED_EXPLICIT means that changes of entities are calculated at commit-time +by doing a property-by-property comparison with the original data.

final int

CHANGETRACKING_DEFERRED_IMPLICIT

DEFERRED_IMPLICIT means that changes of entities are calculated at commit-time +by doing a property-by-property comparison with the original data.

final int

CHANGETRACKING_NOTIFY

NOTIFY means that Doctrine relies on the entities sending out notifications +when their properties change.

final int

GENERATOR_TYPE_AUTO

AUTO means the generator type will depend on what the used platform prefers. +

final int

GENERATOR_TYPE_IDENTITY

IDENTITY means an identity column is used for id generation.

final int

GENERATOR_TYPE_NONE

NONE means the class does not have a generated id.

final int

GENERATOR_TYPE_SEQUENCE

SEQUENCE means a separate sequence object will be used.

final int

GENERATOR_TYPE_TABLE

TABLE means a separate table is used for id generation. +

final int

INHERITANCE_TYPE_JOINED

JOINED means the class will be persisted according to the rules of +Class Table Inheritance.

final int

INHERITANCE_TYPE_NONE

NONE means the class does not participate in an inheritance hierarchy +and therefore does not need an inheritance mapping type.

final int

INHERITANCE_TYPE_SINGLE_TABLE

SINGLE_TABLE means the class will be persisted according to the rules of +Single Table Inheritance.

final int

INHERITANCE_TYPE_TABLE_PER_CLASS

TABLE_PER_CLASS means the class will be persisted according to the rules +of Concrete Table Inheritance.

array

$associationMappings

READ-ONLY: The association mappings of this class.

integer

$changeTrackingPolicy

READ-ONLY: The policy used for change-tracking on entities of this class.

array

$columnNames

READ-ONLY: A map of field names to column names.

string

$customRepositoryClassName

The name of the custom repository class used for the entity class. +

array

$discriminatorColumn

READ-ONLY: The definition of the descriminator column used in JOINED and SINGLE_TABLE +inheritance mappings.

mixed

$discriminatorMap

READ-ONLY: The discriminator map of all mapped classes in the hierarchy. +

mixed

$discriminatorValue

READ-ONLY: The discriminator value of this class. +

array

$fieldMappings

READ-ONLY: The field mappings of the class. +

array

$fieldNames

READ-ONLY: An array of field names.

string

$generatorType

READ-ONLY: The Id generator type used by the class.

AbstractIdGenerator

$idGenerator

READ-ONLY: The ID generator used for generating IDs for this class.

array

$identifier

READ-ONLY: The field names of all fields that are part of the identifier/primary key +of the mapped entity class.

integer

$inheritanceType

READ-ONLY: The inheritance mapping type used by the class.

boolean

$isIdentifierComposite

READ-ONLY: Flag indicating whether the identifier/primary key of the class is composite.

boolean

$isMappedSuperclass

READ-ONLY: Whether this class describes the mapping of a mapped superclass.

boolean $isVersioned

$isVersioned

READ-ONLY: A flag for whether or not instances of this class are to be versioned +with optimistic locking.

array

$lifecycleCallbacks

READ-ONLY: The registered lifecycle callbacks for entities of this class.

mixed

$name

READ-ONLY: The name of the entity class.

string

$namespace

READ-ONLY: The namespace the entity class is contained in.

array

$parentClasses

READ-ONLY: The names of the parent classes (ancestors).

string

$rootEntityName

READ-ONLY: The name of the entity class that is at the root of the mapped entity inheritance +hierarchy.

array

$sequenceGeneratorDefinition

READ-ONLY: The definition of the sequence generator of this class.

array

$subClasses

READ-ONLY: The names of all subclasses (descendants).

array

$table

READ-ONLY: The primary table definition.

array

$tableGeneratorDefinition

READ-ONLY: The definition of the table generator of this class.

mixed $versionField

$versionField

READ-ONLY: The name of the field which is used for versioning in optimistic locking (if any).

+ + + + + + +
Constructor Summary

ClassMetadataInfo(string entityName)

Initializes a new ClassMetadata instance that will hold the object-relational mapping +metadata of the class with the given name.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Method Summary
void

addInheritedAssociationMapping(AssociationMapping mapping, string owningClassName)

INTERNAL: +Adds an association mapping without completing/validating it. +

void

addInheritedFieldMapping(mixed fieldMapping, array mapping)

INTERNAL: +Adds a field mapping without completing/validating it. +

void

addLifecycleCallback(string callback, string event)

Adds a lifecycle callback for entities of this class. +

Doctrine\ORM\Mapping\AssociationMapping

getAssociationMapping(string fieldName)

Gets the mapping of an association.

array

getAssociationMappings()

Gets all association mappings of the class.

string

getColumnName(string fieldName)

Gets a column name for a field name. +

array

getColumnNames(mixed fieldNames)

Gets an array containing all the column names.

array

getFieldMapping(string fieldName)

Gets the mapping of a (regular) field that holds some data but not a +reference to another object.

string

getFieldName(string columnName)

Gets the field name for a column name. +

array

getIdentifierColumnNames()

Returns an array with all the identifier column names.

mixed

getIdentifierFieldNames()

Gets the identifier (primary key) field names of the class.

array

getLifecycleCallbacks(string event)

Gets the registered lifecycle callbacks for an event.

string

getSingleIdentifierColumnName()

Gets the column name of the single id column.

string

getSingleIdentifierFieldName()

Gets the name of the single id field.

string

getTableName()

Gets the name of the primary table.

string

getTemporaryIdTableName()

Gets the table name to use for temporary identifier tables of this class.

Doctrine\DBAL\Types\Type

getTypeOfColumn(mixed columnName)

Gets the type of a column.

Doctrine\DBAL\Types\Type

getTypeOfField(string fieldName)

Gets the type of a field.

boolean

hasAssociation(string fieldName)

Checks whether the class has a mapped association with the given field name.

boolean

hasField(mixed fieldName)

Checks whether the class has a (mapped) field with a certain name.

boolean

hasLifecycleCallbacks(string lifecycleEvent)

Whether the class has any attached lifecycle listeners or callbacks for a lifecycle event.

void

invokeLifecycleCallbacks(mixed lifecycleEvent, Entity entity, string event)

Dispatches the lifecycle event of the given entity to the registered +lifecycle callbacks and lifecycle listeners.

boolean

isChangeTrackingDeferredExplicit()

Whether the change tracking policy of this class is "deferred explicit".

boolean

isChangeTrackingDeferredImplicit()

Whether the change tracking policy of this class is "deferred implicit".

boolean

isChangeTrackingNotify()

Whether the change tracking policy of this class is "notify".

boolean

isCollectionValuedAssociation(string fieldName)

Checks whether the class has a mapped association for the specified field +and if yes, checks whether it is a collection-valued association (to-many).

boolean

isIdGeneratorIdentity()

Checks whether the class uses an identity column for the Id generation.

boolean

isIdGeneratorSequence()

Checks whether the class uses a sequence for id generation.

boolean

isIdGeneratorTable()

Checks whether the class uses a table for id generation.

boolean

isIdentifier(string fieldName)

Checks whether a field is part of the identifier/primary key field(s).

boolean

isIdentifierNatural()

Checks whether the class has a natural identifier/pk (which means it does +not use any Id generator.

boolean

isInheritanceTypeJoined()

Checks whether the mapped class uses the JOINED inheritance mapping strategy.

boolean

isInheritanceTypeNone()

boolean

isInheritanceTypeSingleTable()

Checks whether the mapped class uses the SINGLE_TABLE inheritance mapping strategy.

boolean

isInheritanceTypeTablePerClass()

Checks whether the mapped class uses the TABLE_PER_CLASS inheritance mapping strategy.

boolean

isInheritedAssociation(string fieldName)

Checks whether a mapped association field is inherited from a superclass.

boolean

isInheritedField(mixed fieldName)

Checks whether a mapped field is inherited from an entity superclass.

boolean

isNullable(string fieldName)

Check if the field is not null.

boolean

isSingleValuedAssociation(string fieldName)

Checks whether the class has a mapped association for the specified field +and if yes, checks whether it is a single-valued association (to-one).

boolean

isUniqueField(string fieldName)

Check if the field is unique.

void

mapField(array mapping)

Adds a mapped field to the class.

void

mapManyToMany(array mapping)

Adds a many-to-many mapping.

void

mapManyToOne(array mapping)

Adds a many-to-one mapping.

void

mapOneToMany(array mapping)

Adds a one-to-many mapping.

void

mapOneToOne(array mapping)

Adds a one-to-one mapping.

void

setChangeTrackingPolicy(integer policy)

Sets the change tracking policy used by this class.

void

setCustomRepositoryClass(mixed repositoryClassName, string mapperClassName)

Registers a custom repository class for the entity class.

void

setDiscriminatorColumn(array columnDef)

Sets the discriminator column definition.

void

setDiscriminatorMap(array map)

Sets the discriminator values used by this class. +

void

setIdGenerator(AbstractIdGenerator generator)

Sets the ID generator used to generate IDs for instances of this class.

void

setIdGeneratorType(mixed generatorType)

Sets the type of Id generator to use for the mapped class.

void

setIdentifier(array identifier)

INTERNAL: +Sets the mapped identifier/primary key fields of this class. +

void

setInheritanceType(integer type)

Sets the inheritance type used by the class and it's subclasses.

void

setLifecycleCallbacks(array callbacks)

Sets the lifecycle callbacks for entities of this class. +

void

setParentClasses(mixed classNames)

Sets the parent class names. +

void

setPrimaryTable(array primaryTableDefinition)

Sets the primary table definition.

void

setSequenceGeneratorDefinition(array definition)

Sets the definition of the sequence ID generator for this class. +

void

setSubclasses(array subclasses)

Sets the mapped subclasses of this class.

void

setTableName(string tableName)

Sets the name of the primary table the class is mapped to.

void

setVersionField(string versionField)

Sets the name of the field that is to be used for versioning if this class is +versioned for optimistic locking.

void

setVersionMapping(array mapping)

Sets the version field mapping used for versioning.

void

setVersioned(boolean bool)

Sets whether this class is to be versioned for optimistic locking.

boolean

usesIdGenerator()

Checks whether the mapped class uses an Id generator.

+ +

Field Detail

+
/Doctrine/ORM/Mapping/ClassMetadataInfo.php at line 106
+

CHANGETRACKING_DEFERRED_EXPLICIT

+public final int CHANGETRACKING_DEFERRED_EXPLICIT = 2 +
+

DEFERRED_EXPLICIT means that changes of entities are calculated at commit-time +by doing a property-by-property comparison with the original data. This will +be done only for entities that were explicitly saved (through persist() or a cascade).

+ +
+ +
/Doctrine/ORM/Mapping/ClassMetadataInfo.php at line 100
+

CHANGETRACKING_DEFERRED_IMPLICIT

+public final int CHANGETRACKING_DEFERRED_IMPLICIT = 1 +
+

DEFERRED_IMPLICIT means that changes of entities are calculated at commit-time +by doing a property-by-property comparison with the original data. This will +be done for all entities that are in MANAGED state at commit-time.

This is the default change tracking policy.

+ +
+ +
/Doctrine/ORM/Mapping/ClassMetadataInfo.php at line 112
+

CHANGETRACKING_NOTIFY

+public final int CHANGETRACKING_NOTIFY = 3 +
+

NOTIFY means that Doctrine relies on the entities sending out notifications +when their properties change. Such entity classes must implement +the NotifyPropertyChanged interface.

+ +
+ +
/Doctrine/ORM/Mapping/ClassMetadataInfo.php at line 69
+

GENERATOR_TYPE_AUTO

+public final int GENERATOR_TYPE_AUTO = 1 +
+

AUTO means the generator type will depend on what the used platform prefers. +Offers full portability.

+ +
+ +
/Doctrine/ORM/Mapping/ClassMetadataInfo.php at line 87
+

GENERATOR_TYPE_IDENTITY

+public final int GENERATOR_TYPE_IDENTITY = 4 +
+

IDENTITY means an identity column is used for id generation. The database +will fill in the id column on insertion. Platforms that do not support +native identity columns may emulate them. Full portability is currently +not guaranteed.

+ +
+ +
/Doctrine/ORM/Mapping/ClassMetadataInfo.php at line 92
+

GENERATOR_TYPE_NONE

+public final int GENERATOR_TYPE_NONE = 5 +
+

NONE means the class does not have a generated id. That means the class +must have a natural, manually assigned id.

+ +
+ +
/Doctrine/ORM/Mapping/ClassMetadataInfo.php at line 75
+

GENERATOR_TYPE_SEQUENCE

+public final int GENERATOR_TYPE_SEQUENCE = 2 +
+

SEQUENCE means a separate sequence object will be used. Platforms that do +not have native sequence support may emulate it. Full portability is currently +not guaranteed.

+ +
+ +
/Doctrine/ORM/Mapping/ClassMetadataInfo.php at line 80
+

GENERATOR_TYPE_TABLE

+public final int GENERATOR_TYPE_TABLE = 3 +
+

TABLE means a separate table is used for id generation. +Offers full portability.

+ +
+ +
/Doctrine/ORM/Mapping/ClassMetadataInfo.php at line 52
+

INHERITANCE_TYPE_JOINED

+public final int INHERITANCE_TYPE_JOINED = 2 +
+

JOINED means the class will be persisted according to the rules of +Class Table Inheritance.

+ +
+ +
/Doctrine/ORM/Mapping/ClassMetadataInfo.php at line 47
+

INHERITANCE_TYPE_NONE

+public final int INHERITANCE_TYPE_NONE = 1 +
+

NONE means the class does not participate in an inheritance hierarchy +and therefore does not need an inheritance mapping type.

+ +
+ +
/Doctrine/ORM/Mapping/ClassMetadataInfo.php at line 57
+

INHERITANCE_TYPE_SINGLE_TABLE

+public final int INHERITANCE_TYPE_SINGLE_TABLE = 3 +
+

SINGLE_TABLE means the class will be persisted according to the rules of +Single Table Inheritance.

+ +
+ +
/Doctrine/ORM/Mapping/ClassMetadataInfo.php at line 62
+

INHERITANCE_TYPE_TABLE_PER_CLASS

+public final int INHERITANCE_TYPE_TABLE_PER_CLASS = 4 +
+

TABLE_PER_CLASS means the class will be persisted according to the rules +of Concrete Table Inheritance.

+ +
+ +
/Doctrine/ORM/Mapping/ClassMetadataInfo.php at line 305
+

associationMappings

+public array $associationMappings = array() +
+

READ-ONLY: The association mappings of this class.

+ +
+ +
/Doctrine/ORM/Mapping/ClassMetadataInfo.php at line 352
+

changeTrackingPolicy

+public integer $changeTrackingPolicy = self::CHANGETRACKING_DEFERRED_IMPLICIT +
+

READ-ONLY: The policy used for change-tracking on entities of this class.

+ +
+ +
/Doctrine/ORM/Mapping/ClassMetadataInfo.php at line 247
+

columnNames

+public array $columnNames = array() +
+

READ-ONLY: A map of field names to column names. Keys are field names and values column names. +Used to look up column names from field names. +This is the reverse lookup map of $_fieldNames.

+
Todo:
+
We could get rid of this array by just using $fieldMappings[$fieldName]['columnName'].
+
+
+ +
+ +
/Doctrine/ORM/Mapping/ClassMetadataInfo.php at line 142
+

customRepositoryClassName

+public string $customRepositoryClassName +
+

The name of the custom repository class used for the entity class. +(Optional).

+ +
+ +
/Doctrine/ORM/Mapping/ClassMetadataInfo.php at line 277
+

discriminatorColumn

+public array $discriminatorColumn +
+

READ-ONLY: The definition of the descriminator column used in JOINED and SINGLE_TABLE +inheritance mappings.

+ +
+ +
/Doctrine/ORM/Mapping/ClassMetadataInfo.php at line 269
+

discriminatorMap

+public mixed $discriminatorMap = array() +
+

READ-ONLY: The discriminator map of all mapped classes in the hierarchy.

This does only apply to the JOINED and SINGLE_TABLE inheritance mapping strategies +where a discriminator column is used.

+
See Also:
+
discriminatorColumn
+
+
+ +
+ +
/Doctrine/ORM/Mapping/ClassMetadataInfo.php at line 258
+

discriminatorValue

+public mixed $discriminatorValue +
+

READ-ONLY: The discriminator value of this class.

This does only apply to the JOINED and SINGLE_TABLE inheritance mapping strategies +where a discriminator column is used.

+
See Also:
+
discriminatorColumn
+
+
+ +
+ +
/Doctrine/ORM/Mapping/ClassMetadataInfo.php at line 228
+

fieldMappings

+public array $fieldMappings = array() +
+

READ-ONLY: The field mappings of the class. +Keys are field names and values are mapping definitions.

The mapping definition array has the following values:

- fieldName (string) +The name of the field in the Entity.

- type (string) +The type name of the mapped field. Can be one of Doctrine's mapping types +or a custom mapping type.

- columnName (string, optional) +The column name. Optional. Defaults to the field name.

- length (integer, optional) +The database length of the column. Optional. Default value taken from +the type.

- id (boolean, optional) +Marks the field as the primary key of the entity. Multiple fields of an +entity can have the id attribute, forming a composite key.

- nullable (boolean, optional) +Whether the column is nullable. Defaults to FALSE.

- columnDefinition (string, optional, schema-only) +The SQL fragment that is used when generating the DDL for the column.

- precision (integer, optional, schema-only) +The precision of a decimal column. Only valid if the column type is decimal.

- scale (integer, optional, schema-only) +The scale of a decimal column. Only valid if the column type is decimal.

- unique (string, optional, schema-only) +Whether a unique constraint should be generated for the column.

+ +
+ +
/Doctrine/ORM/Mapping/ClassMetadataInfo.php at line 237
+

fieldNames

+public array $fieldNames = array() +
+

READ-ONLY: An array of field names. Used to look up field names from column names. +Keys are column names and values are field names. +This is the reverse lookup map of $_columnNames.

+ +
+ +
/Doctrine/ORM/Mapping/ClassMetadataInfo.php at line 185
+

generatorType

+public string $generatorType = self::GENERATOR_TYPE_NONE +
+

READ-ONLY: The Id generator type used by the class.

+ +
+ +
/Doctrine/ORM/Mapping/ClassMetadataInfo.php at line 320
+

idGenerator

+public AbstractIdGenerator $idGenerator +
+

READ-ONLY: The ID generator used for generating IDs for this class.

+
Todo:
+
Remove
+
+
+ +
+ +
/Doctrine/ORM/Mapping/ClassMetadataInfo.php at line 171
+

identifier

+public array $identifier = array() +
+

READ-ONLY: The field names of all fields that are part of the identifier/primary key +of the mapped entity class.

+ +
+ +
/Doctrine/ORM/Mapping/ClassMetadataInfo.php at line 178
+

inheritanceType

+public integer $inheritanceType = self::INHERITANCE_TYPE_NONE +
+

READ-ONLY: The inheritance mapping type used by the class.

+ +
+ +
/Doctrine/ORM/Mapping/ClassMetadataInfo.php at line 312
+

isIdentifierComposite

+public boolean $isIdentifierComposite = false +
+

READ-ONLY: Flag indicating whether the identifier/primary key of the class is composite.

+ +
+ +
/Doctrine/ORM/Mapping/ClassMetadataInfo.php at line 149
+

isMappedSuperclass

+public boolean $isMappedSuperclass = false +
+

READ-ONLY: Whether this class describes the mapping of a mapped superclass.

+ +
+ +
/Doctrine/ORM/Mapping/ClassMetadataInfo.php at line 360
+

isVersioned

+public boolean $isVersioned $isVersioned +
+

READ-ONLY: A flag for whether or not instances of this class are to be versioned +with optimistic locking.

+ +
+ +
/Doctrine/ORM/Mapping/ClassMetadataInfo.php at line 298
+

lifecycleCallbacks

+public array $lifecycleCallbacks = array() +
+

READ-ONLY: The registered lifecycle callbacks for entities of this class.

+ +
+ +
/Doctrine/ORM/Mapping/ClassMetadataInfo.php at line 117
+

name

+public mixed $name +
+

READ-ONLY: The name of the entity class.

+ +
+ +
/Doctrine/ORM/Mapping/ClassMetadataInfo.php at line 125
+

namespace

+public string $namespace +
+

READ-ONLY: The namespace the entity class is contained in.

+
Todo:
+
Not really needed. Usage could be localized.
+
+
+ +
+ +
/Doctrine/ORM/Mapping/ClassMetadataInfo.php at line 156
+

parentClasses

+public array $parentClasses = array() +
+

READ-ONLY: The names of the parent classes (ancestors).

+ +
+ +
/Doctrine/ORM/Mapping/ClassMetadataInfo.php at line 134
+

rootEntityName

+public string $rootEntityName +
+

READ-ONLY: The name of the entity class that is at the root of the mapped entity inheritance +hierarchy. If the entity is not part of a mapped inheritance hierarchy this is the same +as $entityName.

+ +
+ +
/Doctrine/ORM/Mapping/ClassMetadataInfo.php at line 337
+

sequenceGeneratorDefinition

+public array $sequenceGeneratorDefinition +
+

READ-ONLY: The definition of the sequence generator of this class. Only used for the +SEQUENCE generation strategy.

The definition has the following structure: + +array( +'sequenceName' => 'name', +'allocationSize' => 20, +'initialValue' => 1 +) +

+ +
+ +
/Doctrine/ORM/Mapping/ClassMetadataInfo.php at line 163
+

subClasses

+public array $subClasses = array() +
+

READ-ONLY: The names of all subclasses (descendants).

+ +
+ +
/Doctrine/ORM/Mapping/ClassMetadataInfo.php at line 291
+

table

+public array $table +
+

READ-ONLY: The primary table definition. The definition is an array with the +following entries:

name => +schema => +indexes => array +uniqueConstraints => array

+
Todo:
+
Rename to just $table
+
+
+ +
+ +
/Doctrine/ORM/Mapping/ClassMetadataInfo.php at line 345
+

tableGeneratorDefinition

+public array $tableGeneratorDefinition +
+

READ-ONLY: The definition of the table generator of this class. Only used for the +TABLE generation strategy.

+ +
+ +
/Doctrine/ORM/Mapping/ClassMetadataInfo.php at line 367
+

versionField

+public mixed $versionField $versionField +
+

READ-ONLY: The name of the field which is used for versioning in optimistic locking (if any).

+ +
+ +

Constructor Detail

+
/Doctrine/ORM/Mapping/ClassMetadataInfo.php at line 375
+

ClassMetadataInfo

+public ClassMetadataInfo(string entityName) +
+

Initializes a new ClassMetadata instance that will hold the object-relational mapping +metadata of the class with the given name.

+
Parameters:
+
entityName - The name of the entity class the new instance is used for.
+
+
+ +
+ +

Method Detail

+
/Doctrine/ORM/Mapping/ClassMetadataInfo.php at line 957
+

addInheritedAssociationMapping

+public void addInheritedAssociationMapping(AssociationMapping mapping, string owningClassName) +
+

INTERNAL: +Adds an association mapping without completing/validating it. +This is mainly used to add inherited association mappings to derived classes.

+
Parameters:
+
+
owningClassName - The name of the class that defined this mapping.
+
+
+ +
+ +
/Doctrine/ORM/Mapping/ClassMetadataInfo.php at line 973
+

addInheritedFieldMapping

+public void addInheritedFieldMapping(mixed fieldMapping, array mapping) +
+

INTERNAL: +Adds a field mapping without completing/validating it. +This is mainly used to add inherited field mappings to derived classes.

+
Todo:
+
Rename: addInheritedFieldMapping
+
+
+ +
+ +
/Doctrine/ORM/Mapping/ClassMetadataInfo.php at line 1096
+

addLifecycleCallback

+public void addLifecycleCallback(string callback, string event) +
+

Adds a lifecycle callback for entities of this class.

Note: If the same callback is registered more than once, the old one +will be overridden.

+ +
+ +
/Doctrine/ORM/Mapping/ClassMetadataInfo.php at line 502
+

getAssociationMapping

+public Doctrine\ORM\Mapping\AssociationMapping getAssociationMapping(string fieldName) +
+

Gets the mapping of an association.

+
Parameters:
+
fieldName - The field name that represents the association in the object model.
+
Returns:
+
The mapping.
+
+
+ +
+ +
/Doctrine/ORM/Mapping/ClassMetadataInfo.php at line 515
+

getAssociationMappings

+public array getAssociationMappings() +
+

Gets all association mappings of the class.

+ +
+ +
/Doctrine/ORM/Mapping/ClassMetadataInfo.php at line 474
+

getColumnName

+public string getColumnName(string fieldName) +
+

Gets a column name for a field name. +If the column name for the field cannot be found, the given field name +is returned.

+
Parameters:
+
fieldName - The field name.
+
Returns:
+
The column name.
+
+
+ +
+ +
/Doctrine/ORM/Mapping/ClassMetadataInfo.php at line 643
+

getColumnNames

+public array getColumnNames(mixed fieldNames) +
+

Gets an array containing all the column names.

+ +
+ +
/Doctrine/ORM/Mapping/ClassMetadataInfo.php at line 487
+

getFieldMapping

+public array getFieldMapping(string fieldName) +
+

Gets the mapping of a (regular) field that holds some data but not a +reference to another object.

+
Parameters:
+
fieldName - The field name.
+
Returns:
+
The field mapping.
+
+
+ +
+ +
/Doctrine/ORM/Mapping/ClassMetadataInfo.php at line 527
+

getFieldName

+public string getFieldName(string columnName) +
+

Gets the field name for a column name. +If no field name can be found the column name is returned.

+
Parameters:
+
columnName - column name
+
Returns:
+
column alias
+
+
+ +
+ +
/Doctrine/ORM/Mapping/ClassMetadataInfo.php at line 661
+

getIdentifierColumnNames

+public array getIdentifierColumnNames() +
+

Returns an array with all the identifier column names.

+ +
+ +
/Doctrine/ORM/Mapping/ClassMetadataInfo.php at line 584
+

getIdentifierFieldNames

+public mixed getIdentifierFieldNames() +
+

Gets the identifier (primary key) field names of the class.

+ +
+ +
/Doctrine/ORM/Mapping/ClassMetadataInfo.php at line 1082
+

getLifecycleCallbacks

+public array getLifecycleCallbacks(string event) +
+

Gets the registered lifecycle callbacks for an event.

+ +
+ +
/Doctrine/ORM/Mapping/ClassMetadataInfo.php at line 611
+

getSingleIdentifierColumnName

+public string getSingleIdentifierColumnName() +
+

Gets the column name of the single id column. Note that this only works on +entity classes that have a single-field pk.

+
Throws:
+
If the class has a composite primary key.
+
+
+ +
+ +
/Doctrine/ORM/Mapping/ClassMetadataInfo.php at line 596
+

getSingleIdentifierFieldName

+public string getSingleIdentifierFieldName() +
+

Gets the name of the single id field. Note that this only works on +entity classes that have a single-field pk.

+
Throws:
+
If the class has a composite primary key.
+
+
+ +
+ +
/Doctrine/ORM/Mapping/ClassMetadataInfo.php at line 801
+

getTableName

+public string getTableName() +
+

Gets the name of the primary table.

+ +
+ +
/Doctrine/ORM/Mapping/ClassMetadataInfo.php at line 811
+

getTemporaryIdTableName

+public string getTemporaryIdTableName() +
+

Gets the table name to use for temporary identifier tables of this class.

+ +
+ +
/Doctrine/ORM/Mapping/ClassMetadataInfo.php at line 791
+

getTypeOfColumn

+public Doctrine\DBAL\Types\Type getTypeOfColumn(mixed columnName) +
+

Gets the type of a column.

+ +
+ +
/Doctrine/ORM/Mapping/ClassMetadataInfo.php at line 780
+

getTypeOfField

+public Doctrine\DBAL\Types\Type getTypeOfField(string fieldName) +
+

Gets the type of a field.

+ +
+ +
/Doctrine/ORM/Mapping/ClassMetadataInfo.php at line 1167
+

hasAssociation

+public boolean hasAssociation(string fieldName) +
+

Checks whether the class has a mapped association with the given field name.

+ +
+ +
/Doctrine/ORM/Mapping/ClassMetadataInfo.php at line 633
+

hasField

+public boolean hasField(mixed fieldName) +
+

Checks whether the class has a (mapped) field with a certain name.

+ +
+ +
/Doctrine/ORM/Mapping/ClassMetadataInfo.php at line 1071
+

hasLifecycleCallbacks

+public boolean hasLifecycleCallbacks(string lifecycleEvent) +
+

Whether the class has any attached lifecycle listeners or callbacks for a lifecycle event.

+ +
+ +
/Doctrine/ORM/Mapping/ClassMetadataInfo.php at line 1058
+

invokeLifecycleCallbacks

+public void invokeLifecycleCallbacks(mixed lifecycleEvent, Entity entity, string event) +
+

Dispatches the lifecycle event of the given entity to the registered +lifecycle callbacks and lifecycle listeners.

+
Parameters:
+
event - The lifecycle event.
+
entity - The Entity on which the event occured.
+
+
+ +
+ +
/Doctrine/ORM/Mapping/ClassMetadataInfo.php at line 396
+

isChangeTrackingDeferredExplicit

+public boolean isChangeTrackingDeferredExplicit() +
+

Whether the change tracking policy of this class is "deferred explicit".

+ +
+ +
/Doctrine/ORM/Mapping/ClassMetadataInfo.php at line 406
+

isChangeTrackingDeferredImplicit

+public boolean isChangeTrackingDeferredImplicit() +
+

Whether the change tracking policy of this class is "deferred implicit".

+ +
+ +
/Doctrine/ORM/Mapping/ClassMetadataInfo.php at line 416
+

isChangeTrackingNotify

+public boolean isChangeTrackingNotify() +
+

Whether the change tracking policy of this class is "notify".

+ +
+ +
/Doctrine/ORM/Mapping/ClassMetadataInfo.php at line 1192
+

isCollectionValuedAssociation

+public boolean isCollectionValuedAssociation(string fieldName) +
+

Checks whether the class has a mapped association for the specified field +and if yes, checks whether it is a collection-valued association (to-many).

+
Returns:
+
TRUE if the association exists and is collection-valued, FALSE otherwise.
+
+
+ +
+ +
/Doctrine/ORM/Mapping/ClassMetadataInfo.php at line 738
+

isIdGeneratorIdentity

+public boolean isIdGeneratorIdentity() +
+

Checks whether the class uses an identity column for the Id generation.

+
Returns:
+
TRUE if the class uses the IDENTITY generator, FALSE otherwise.
+
+
+ +
+ +
/Doctrine/ORM/Mapping/ClassMetadataInfo.php at line 748
+

isIdGeneratorSequence

+public boolean isIdGeneratorSequence() +
+

Checks whether the class uses a sequence for id generation.

+
Returns:
+
TRUE if the class uses the SEQUENCE generator, FALSE otherwise.
+
+
+ +
+ +
/Doctrine/ORM/Mapping/ClassMetadataInfo.php at line 758
+

isIdGeneratorTable

+public boolean isIdGeneratorTable() +
+

Checks whether the class uses a table for id generation.

+
Returns:
+
TRUE if the class uses the TABLE generator, FALSE otherwise.
+
+
+ +
+ +
/Doctrine/ORM/Mapping/ClassMetadataInfo.php at line 428
+

isIdentifier

+public boolean isIdentifier(string fieldName) +
+

Checks whether a field is part of the identifier/primary key field(s).

+
Parameters:
+
fieldName - The field name
+
Returns:
+
TRUE if the field is part of the table identifier/primary key field(s), FALSE otherwise.
+
+
+ +
+ +
/Doctrine/ORM/Mapping/ClassMetadataInfo.php at line 769
+

isIdentifierNatural

+public boolean isIdentifierNatural() +
+

Checks whether the class has a natural identifier/pk (which means it does +not use any Id generator.

+ +
+ +
/Doctrine/ORM/Mapping/ClassMetadataInfo.php at line 706
+

isInheritanceTypeJoined

+public boolean isInheritanceTypeJoined() +
+

Checks whether the mapped class uses the JOINED inheritance mapping strategy.

+
Returns:
+
TRUE if the class participates in a JOINED inheritance mapping, FALSE otherwise.
+
+
+ +
+ +
/Doctrine/ORM/Mapping/ClassMetadataInfo.php at line 695
+

isInheritanceTypeNone

+public boolean isInheritanceTypeNone() +
+

+ +
+ +
/Doctrine/ORM/Mapping/ClassMetadataInfo.php at line 717
+

isInheritanceTypeSingleTable

+public boolean isInheritanceTypeSingleTable() +
+

Checks whether the mapped class uses the SINGLE_TABLE inheritance mapping strategy.

+
Returns:
+
TRUE if the class participates in a SINGLE_TABLE inheritance mapping, FALSE otherwise.
+
+
+ +
+ +
/Doctrine/ORM/Mapping/ClassMetadataInfo.php at line 728
+

isInheritanceTypeTablePerClass

+public boolean isInheritanceTypeTablePerClass() +
+

Checks whether the mapped class uses the TABLE_PER_CLASS inheritance mapping strategy.

+
Returns:
+
TRUE if the class participates in a TABLE_PER_CLASS inheritance mapping, FALSE otherwise.
+
+
+ +
+ +
/Doctrine/ORM/Mapping/ClassMetadataInfo.php at line 874
+

isInheritedAssociation

+public boolean isInheritedAssociation(string fieldName) +
+

Checks whether a mapped association field is inherited from a superclass.

+
Returns:
+
TRUE if the field is inherited, FALSE otherwise.
+
+
+ +
+ +
/Doctrine/ORM/Mapping/ClassMetadataInfo.php at line 863
+

isInheritedField

+public boolean isInheritedField(mixed fieldName) +
+

Checks whether a mapped field is inherited from an entity superclass.

+
Returns:
+
TRUE if the field is inherited, FALSE otherwise.
+
+
+ +
+ +
/Doctrine/ORM/Mapping/ClassMetadataInfo.php at line 457
+

isNullable

+public boolean isNullable(string fieldName) +
+

Check if the field is not null.

+
Parameters:
+
fieldName - The field name
+
Returns:
+
TRUE if the field is not null, FALSE otherwise.
+
+
+ +
+ +
/Doctrine/ORM/Mapping/ClassMetadataInfo.php at line 1179
+

isSingleValuedAssociation

+public boolean isSingleValuedAssociation(string fieldName) +
+

Checks whether the class has a mapped association for the specified field +and if yes, checks whether it is a single-valued association (to-one).

+
Returns:
+
TRUE if the association exists and is single-valued, FALSE otherwise.
+
+
+ +
+ +
/Doctrine/ORM/Mapping/ClassMetadataInfo.php at line 442
+

isUniqueField

+public boolean isUniqueField(string fieldName) +
+

Check if the field is unique.

+
Parameters:
+
fieldName - The field name
+
Returns:
+
TRUE if the field is unique, FALSE otherwise.
+
+
+ +
+ +
/Doctrine/ORM/Mapping/ClassMetadataInfo.php at line 940
+

mapField

+public void mapField(array mapping) +
+

Adds a mapped field to the class.

+
Parameters:
+
mapping - The field mapping.
+
+
+ +
+ +
/Doctrine/ORM/Mapping/ClassMetadataInfo.php at line 1020
+

mapManyToMany

+public void mapManyToMany(array mapping) +
+

Adds a many-to-many mapping.

+
Parameters:
+
mapping - The mapping.
+
+
+ +
+ +
/Doctrine/ORM/Mapping/ClassMetadataInfo.php at line 1009
+

mapManyToOne

+public void mapManyToOne(array mapping) +
+

Adds a many-to-one mapping.

+
Parameters:
+
mapping - The mapping.
+
+
+ +
+ +
/Doctrine/ORM/Mapping/ClassMetadataInfo.php at line 997
+

mapOneToMany

+public void mapOneToMany(array mapping) +
+

Adds a one-to-many mapping.

+
Parameters:
+
mapping - The mapping.
+
+
+ +
+ +
/Doctrine/ORM/Mapping/ClassMetadataInfo.php at line 985
+

mapOneToOne

+public void mapOneToOne(array mapping) +
+

Adds a one-to-one mapping.

+
Parameters:
+
mapping - The mapping.
+
+
+ +
+ +
/Doctrine/ORM/Mapping/ClassMetadataInfo.php at line 386
+

setChangeTrackingPolicy

+public void setChangeTrackingPolicy(integer policy) +
+

Sets the change tracking policy used by this class.

+ +
+ +
/Doctrine/ORM/Mapping/ClassMetadataInfo.php at line 1046
+

setCustomRepositoryClass

+public void setCustomRepositoryClass(mixed repositoryClassName, string mapperClassName) +
+

Registers a custom repository class for the entity class.

+
Parameters:
+
mapperClassName - The class name of the custom mapper.
+
+
+ +
+ +
/Doctrine/ORM/Mapping/ClassMetadataInfo.php at line 1118
+

setDiscriminatorColumn

+public void setDiscriminatorColumn(array columnDef) +
+

Sets the discriminator column definition.

+
See Also:
+
getDiscriminatorColumn()
+
+
+ +
+ +
/Doctrine/ORM/Mapping/ClassMetadataInfo.php at line 1141
+

setDiscriminatorMap

+public void setDiscriminatorMap(array map) +
+

Sets the discriminator values used by this class. +Used for JOINED and SINGLE_TABLE inheritance mapping strategies.

+ +
+ +
/Doctrine/ORM/Mapping/ClassMetadataInfo.php at line 1203
+

setIdGenerator

+public void setIdGenerator(AbstractIdGenerator generator) +
+

Sets the ID generator used to generate IDs for instances of this class.

+ +
+ +
/Doctrine/ORM/Mapping/ClassMetadataInfo.php at line 677
+

setIdGeneratorType

+public void setIdGeneratorType(mixed generatorType) +
+

Sets the type of Id generator to use for the mapped class.

+ +
+ +
/Doctrine/ORM/Mapping/ClassMetadataInfo.php at line 623
+

setIdentifier

+public void setIdentifier(array identifier) +
+

INTERNAL: +Sets the mapped identifier/primary key fields of this class. +Mainly used by the ClassMetadataFactory to assign inherited identifiers.

+ +
+ +
/Doctrine/ORM/Mapping/ClassMetadataInfo.php at line 850
+

setInheritanceType

+public void setInheritanceType(integer type) +
+

Sets the inheritance type used by the class and it's subclasses.

+ +
+ +
/Doctrine/ORM/Mapping/ClassMetadataInfo.php at line 1107
+

setLifecycleCallbacks

+public void setLifecycleCallbacks(array callbacks) +
+

Sets the lifecycle callbacks for entities of this class. +Any previously registered callbacks are overwritten.

+ +
+ +
/Doctrine/ORM/Mapping/ClassMetadataInfo.php at line 837
+

setParentClasses

+public void setParentClasses(mixed classNames) +
+

Sets the parent class names. +Assumes that the class names in the passed array are in the order: +directParent -> directParentParent -> directParentParentParent ... -> root.

+ +
+ +
/Doctrine/ORM/Mapping/ClassMetadataInfo.php at line 900
+

setPrimaryTable

+public void setPrimaryTable(array primaryTableDefinition) +
+

Sets the primary table definition. The provided array must have the +following structure:

name => +schema => +catalog =>

+ +
+ +
/Doctrine/ORM/Mapping/ClassMetadataInfo.php at line 1222
+

setSequenceGeneratorDefinition

+public void setSequenceGeneratorDefinition(array definition) +
+

Sets the definition of the sequence ID generator for this class.

The definition must have the following structure: + +array( +'sequenceName' => 'name', +'allocationSize' => 20, +'initialValue' => 1 +) +

+ +
+ +
/Doctrine/ORM/Mapping/ClassMetadataInfo.php at line 821
+

setSubclasses

+public void setSubclasses(array subclasses) +
+

Sets the mapped subclasses of this class.

+
Parameters:
+
subclasses - The names of all mapped subclasses.
+
+
+ +
+ +
/Doctrine/ORM/Mapping/ClassMetadataInfo.php at line 885
+

setTableName

+public void setTableName(string tableName) +
+

Sets the name of the primary table the class is mapped to.

+
Parameters:
+
tableName - The table name.
+
Deprecated.
+
+
+ +
+ +
/Doctrine/ORM/Mapping/ClassMetadataInfo.php at line 1265
+

setVersionField

+public void setVersionField(string versionField) +
+

Sets the name of the field that is to be used for versioning if this class is +versioned for optimistic locking.

+ +
+ +
/Doctrine/ORM/Mapping/ClassMetadataInfo.php at line 1233
+

setVersionMapping

+public void setVersionMapping(array mapping) +
+

Sets the version field mapping used for versioning. Sets the default +value to use depending on the column type.

+
Parameters:
+
mapping - The version field mapping array
+
+
+ +
+ +
/Doctrine/ORM/Mapping/ClassMetadataInfo.php at line 1254
+

setVersioned

+public void setVersioned(boolean bool) +
+

Sets whether this class is to be versioned for optimistic locking.

+ +
+ +
/Doctrine/ORM/Mapping/ClassMetadataInfo.php at line 687
+

usesIdGenerator

+public boolean usesIdGenerator() +
+

Checks whether the mapped class uses an Id generator.

+
Returns:
+
TRUE if the mapped class uses an Id generator, FALSE otherwise.
+
+
+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/orm/mapping/column.html b/lib/api/doctrine/orm/mapping/column.html new file mode 100644 index 000000000..20c6d2913 --- /dev/null +++ b/lib/api/doctrine/orm/mapping/column.html @@ -0,0 +1,214 @@ + + + + + + + + + + + +Column (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +
Doctrine\ORM\Mapping\Column
+
/Doctrine/ORM/Mapping/Driver/DoctrineAnnotations.php at line 56
+ +

Class Column

+ +
Class:Column - Superclass: Annotation
+Annotation
⌊ Column
+ +
+ +

public final class Column
extends Annotation + +

+ +

Annotations class

+ +
+
License:
+
http://www.opensource.org/licenses/lgpl-license.php LGPL
+
See Also:
+
www.doctrine-project.org
+
Since:
+
2.0
+
Version:
+
$Revision: 3938 $
+
Author:
+
Guilherme Blanco
+
Jonathan Wage
+
Roman Borschel
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Field Summary
mixed

$columnDefinition

mixed

$length

mixed

$name

mixed

$nullable

mixed

$options

mixed

$precision

mixed

$scale

mixed

$type

mixed

$unique

+ + + +
Fields inherited from Doctrine\Common\Annotations\Annotation
value
+ +

Field Detail

+
/Doctrine/ORM/Mapping/Driver/DoctrineAnnotations.php at line 67
+

columnDefinition

+public mixed $columnDefinition +
+
+ +
+ +
/Doctrine/ORM/Mapping/Driver/DoctrineAnnotations.php at line 58
+

length

+public mixed $length +
+
+ +
+ +
/Doctrine/ORM/Mapping/Driver/DoctrineAnnotations.php at line 65
+

name

+public mixed $name +
+
+ +
+ +
/Doctrine/ORM/Mapping/Driver/DoctrineAnnotations.php at line 64
+

nullable

+public mixed $nullable = false +
+
+ +
+ +
/Doctrine/ORM/Mapping/Driver/DoctrineAnnotations.php at line 66
+

options

+public mixed $options = array() +
+
+ +
+ +
/Doctrine/ORM/Mapping/Driver/DoctrineAnnotations.php at line 60
+

precision

+public mixed $precision +
+
+ +
+ +
/Doctrine/ORM/Mapping/Driver/DoctrineAnnotations.php at line 62
+

scale

+public mixed $scale +
+
+ +
+ +
/Doctrine/ORM/Mapping/Driver/DoctrineAnnotations.php at line 57
+

type

+public mixed $type = 'string' +
+
+ +
+ +
/Doctrine/ORM/Mapping/Driver/DoctrineAnnotations.php at line 63
+

unique

+public mixed $unique = false +
+
+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/orm/mapping/discriminatorcolumn.html b/lib/api/doctrine/orm/mapping/discriminatorcolumn.html new file mode 100644 index 000000000..8f0d7ffbd --- /dev/null +++ b/lib/api/doctrine/orm/mapping/discriminatorcolumn.html @@ -0,0 +1,154 @@ + + + + + + + + + + + +DiscriminatorColumn (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +
Doctrine\ORM\Mapping\DiscriminatorColumn
+
/Doctrine/ORM/Mapping/Driver/DoctrineAnnotations.php at line 33
+ +

Class DiscriminatorColumn

+ +
Class:DiscriminatorColumn - Superclass: Annotation
+Annotation
⌊ DiscriminatorColumn
+ +
+ +

public final class DiscriminatorColumn
extends Annotation + +

+ +

Annotations class

+ +
+
License:
+
http://www.opensource.org/licenses/lgpl-license.php LGPL
+
See Also:
+
www.doctrine-project.org
+
Since:
+
2.0
+
Version:
+
$Revision: 3938 $
+
Author:
+
Guilherme Blanco
+
Jonathan Wage
+
Roman Borschel
+
+
+ + + + + + + + + + + + + + + + + + + +
Field Summary
mixed

$fieldName

mixed

$length

mixed

$name

mixed

$type

+ + + +
Fields inherited from Doctrine\Common\Annotations\Annotation
value
+ +

Field Detail

+
/Doctrine/ORM/Mapping/Driver/DoctrineAnnotations.php at line 35
+

fieldName

+public mixed $fieldName +
+
+ +
+ +
/Doctrine/ORM/Mapping/Driver/DoctrineAnnotations.php at line 37
+

length

+public mixed $length +
+
+ +
+ +
/Doctrine/ORM/Mapping/Driver/DoctrineAnnotations.php at line 34
+

name

+public mixed $name +
+
+ +
+ +
/Doctrine/ORM/Mapping/Driver/DoctrineAnnotations.php at line 36
+

type

+public mixed $type +
+
+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/orm/mapping/discriminatormap.html b/lib/api/doctrine/orm/mapping/discriminatormap.html new file mode 100644 index 000000000..a04d4b858 --- /dev/null +++ b/lib/api/doctrine/orm/mapping/discriminatormap.html @@ -0,0 +1,101 @@ + + + + + + + + + + + +DiscriminatorMap (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +
Doctrine\ORM\Mapping\DiscriminatorMap
+
/Doctrine/ORM/Mapping/Driver/DoctrineAnnotations.php at line 39
+ +

Class DiscriminatorMap

+ +
Class:DiscriminatorMap - Superclass: Annotation
+Annotation
⌊ DiscriminatorMap
+ +
+ +

public final class DiscriminatorMap
extends Annotation + +

+ +

Annotations class

+ +
+
License:
+
http://www.opensource.org/licenses/lgpl-license.php LGPL
+
See Also:
+
www.doctrine-project.org
+
Since:
+
2.0
+
Version:
+
$Revision: 3938 $
+
Author:
+
Guilherme Blanco
+
Jonathan Wage
+
Roman Borschel
+
+
+ + + +
Fields inherited from Doctrine\Common\Annotations\Annotation
value
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/orm/mapping/driver/abstractfiledriver.html b/lib/api/doctrine/orm/mapping/driver/abstractfiledriver.html new file mode 100644 index 000000000..31457b7ac --- /dev/null +++ b/lib/api/doctrine/orm/mapping/driver/abstractfiledriver.html @@ -0,0 +1,262 @@ + + + + + + + + + + + +AbstractFileDriver (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +
Doctrine\ORM\Mapping\Driver\AbstractFileDriver
+
/Doctrine/ORM/Mapping/Driver/AbstractFileDriver.php at line 43
+ +

Class AbstractFileDriver

+ +
AbstractFileDriver
+ +
+
All Implemented Interfaces:
+
Driver +
+ +
+ +

public abstract class AbstractFileDriver

+ +

Base driver for file-based metadata drivers.

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 '.'.

+ +
+
License:
+
http://www.opensource.org/licenses/lgpl-license.php LGPL
+
See Also:
+
www.doctrine-project.com
+
Since:
+
2.0
+
Version:
+
$Revision$
+
Author Benjamin:
+
Eberlei
+
Author Guilherme:
+
Blanco
+
Author:
+
Jonathan H. Wage
+
Roman Borschel
+
+
+ + + + + + + + + + + +
Field Summary
protected string

$_fileExtension

The file extension of mapping documents.

protected array

$_paths

The paths where to look for mapping files.

+ + + + + + +
Constructor Summary

AbstractFileDriver(string|array paths)

Initializes a new FileDriver that looks in the given path(s) for mapping +documents and operates in the specified operating mode.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Method Summary
void

addPaths(array paths)

Append lookup paths to metadata driver.

array

getAllClassNames()

Gets the names of all mapped classes known to this driver.

array

getElement(mixed className)

Get the element of schema meta data for the class from the mapping file. +

void

getFileExtension()

Get the file extension used to look for mapping files under

array

getPaths()

Retrieve the defined metadata lookup paths.

boolean

isTransient(string className)

Whether the class with the specified name should have its metadata loaded. +

void

setFileExtension(string fileExtension)

Set the file extension used to look for mapping files under

+ +

Field Detail

+
/Doctrine/ORM/Mapping/Driver/AbstractFileDriver.php at line 57
+

_fileExtension

+protected string $_fileExtension +
+

The file extension of mapping documents.

+ +
+ +
/Doctrine/ORM/Mapping/Driver/AbstractFileDriver.php at line 50
+

_paths

+protected array $_paths = array() +
+

The paths where to look for mapping files.

+ +
+ +

Constructor Detail

+
/Doctrine/ORM/Mapping/Driver/AbstractFileDriver.php at line 65
+

AbstractFileDriver

+public AbstractFileDriver(string|array paths) +
+

Initializes a new FileDriver that looks in the given path(s) for mapping +documents and operates in the specified operating mode.

+
Parameters:
+
paths - One or multiple paths where mapping documents can be found.
+
+
+ +
+ +

Method Detail

+
/Doctrine/ORM/Mapping/Driver/AbstractFileDriver.php at line 75
+

addPaths

+public void addPaths(array paths) +
+

Append lookup paths to metadata driver.

+ +
+ +
/Doctrine/ORM/Mapping/Driver/AbstractFileDriver.php at line 151
+

getAllClassNames

+public array getAllClassNames() +
+

Gets the names of all mapped classes known to this driver.

+
Returns:
+
The names of all mapped classes known to this driver.
+
+
+ +
+ +
/Doctrine/ORM/Mapping/Driver/AbstractFileDriver.php at line 117
+

getElement

+public array getElement(mixed className) +
+

Get the element of schema meta data for the class from the mapping file. +This will lazily load the mapping file if it is not loaded yet

+
Returns:
+
$element The element of schema meta data
+
+
+ +
+ +
/Doctrine/ORM/Mapping/Driver/AbstractFileDriver.php at line 95
+

getFileExtension

+public void getFileExtension() +
+

Get the file extension used to look for mapping files under

+ +
+ +
/Doctrine/ORM/Mapping/Driver/AbstractFileDriver.php at line 85
+

getPaths

+public array getPaths() +
+

Retrieve the defined metadata lookup paths.

+ +
+ +
/Doctrine/ORM/Mapping/Driver/AbstractFileDriver.php at line 132
+

isTransient

+public boolean isTransient(string className) +
+

Whether the class with the specified name should have its metadata loaded. +This is only the case if it is either mapped as an Entity or a +MappedSuperclass.

+ +
+ +
/Doctrine/ORM/Mapping/Driver/AbstractFileDriver.php at line 106
+

setFileExtension

+public void setFileExtension(string fileExtension) +
+

Set the file extension used to look for mapping files under

+
Parameters:
+
fileExtension - The file extension to set
+
+
+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/orm/mapping/driver/annotationdriver.html b/lib/api/doctrine/orm/mapping/driver/annotationdriver.html new file mode 100644 index 000000000..7c537ed58 --- /dev/null +++ b/lib/api/doctrine/orm/mapping/driver/annotationdriver.html @@ -0,0 +1,277 @@ + + + + + + + + + + + +AnnotationDriver (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +
Doctrine\ORM\Mapping\Driver\AnnotationDriver
+
/Doctrine/ORM/Mapping/Driver/AnnotationDriver.php at line 43
+ +

Class AnnotationDriver

+ +
AnnotationDriver
+ +
+
All Implemented Interfaces:
+
Driver +
+ +
+ +

public class AnnotationDriver

+ +

The AnnotationDriver reads the mapping metadata from docblock annotations.

+ +
+
License:
+
http://www.opensource.org/licenses/lgpl-license.php LGPL
+
See Also:
+
www.doctrine-project.org
+
Since:
+
2.0
+
Version:
+
$Revision$
+
Author Benjamin:
+
Eberlei
+
Author Guilherme:
+
Blanco
+
Author:
+
Jonathan H. Wage
+
Roman Borschel
+
+
+ + + + + + + + + + + + + + + +
Field Summary
protected mixed

$_classNames

protected string

$_fileExtension

The file extension of mapping documents.

protected array

$_paths

The paths where to look for mapping files.

+ + + + + + +
Constructor Summary

AnnotationDriver(mixed reader, string|array paths, $reader The)

Initializes a new AnnotationDriver that uses the given AnnotationReader for reading +docblock annotations.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Method Summary
void

addPaths(array paths)

Append lookup paths to metadata driver.

static AnnotationDriver

create(array|string paths, AnnotationReader reader)

Factory method for the Annotation Driver

void

getAllClassNames()

{@inheritDoc}

void

getFileExtension()

Get the file extension used to look for mapping files under

array

getPaths()

Retrieve the defined metadata lookup paths.

boolean

isTransient(string className)

Whether the class with the specified name is transient.

void

loadMetadataForClass(mixed className, mixed metadata)

{@inheritdoc}

void

setFileExtension(string fileExtension)

Set the file extension used to look for mapping files under

+ +

Field Detail

+
/Doctrine/ORM/Mapping/Driver/AnnotationDriver.php at line 69
+

_classNames

+protected mixed $_classNames +
+

+ +
+ +
/Doctrine/ORM/Mapping/Driver/AnnotationDriver.php at line 64
+

_fileExtension

+protected string $_fileExtension = '.php' +
+

The file extension of mapping documents.

+ +
+ +
/Doctrine/ORM/Mapping/Driver/AnnotationDriver.php at line 57
+

_paths

+protected array $_paths = array() +
+

The paths where to look for mapping files.

+ +
+ +

Constructor Detail

+
/Doctrine/ORM/Mapping/Driver/AnnotationDriver.php at line 78
+

AnnotationDriver

+public AnnotationDriver(mixed reader, string|array paths, $reader The) +
+

Initializes a new AnnotationDriver that uses the given AnnotationReader for reading +docblock annotations.

+
Parameters:
+
The - AnnotationReader to use.
+
paths - One or multiple paths where mapping classes can be found.
+
+
+ +
+ +

Method Detail

+
/Doctrine/ORM/Mapping/Driver/AnnotationDriver.php at line 91
+

addPaths

+public void addPaths(array paths) +
+

Append lookup paths to metadata driver.

+ +
+ +
/Doctrine/ORM/Mapping/Driver/AnnotationDriver.php at line 481
+

create

+public static AnnotationDriver create(array|string paths, AnnotationReader reader) +
+

Factory method for the Annotation Driver

+ +
+ +
/Doctrine/ORM/Mapping/Driver/AnnotationDriver.php at line 425
+

getAllClassNames

+public void getAllClassNames() +
+

+ +
+ +
/Doctrine/ORM/Mapping/Driver/AnnotationDriver.php at line 111
+

getFileExtension

+public void getFileExtension() +
+

Get the file extension used to look for mapping files under

+ +
+ +
/Doctrine/ORM/Mapping/Driver/AnnotationDriver.php at line 101
+

getPaths

+public array getPaths() +
+

Retrieve the defined metadata lookup paths.

+ +
+ +
/Doctrine/ORM/Mapping/Driver/AnnotationDriver.php at line 414
+

isTransient

+public boolean isTransient(string className) +
+

Whether the class with the specified name is transient. Only non-transient +classes, that is entities and mapped superclasses, should have their metadata loaded. +A class is non-transient if it is annotated with either @Entity or

+
MappedSuperclass:
+
in the class doc block.
+
+
+ +
+ +
/Doctrine/ORM/Mapping/Driver/AnnotationDriver.php at line 130
+

loadMetadataForClass

+public void loadMetadataForClass(mixed className, mixed metadata) +
+

+ +
+ +
/Doctrine/ORM/Mapping/Driver/AnnotationDriver.php at line 122
+

setFileExtension

+public void setFileExtension(string fileExtension) +
+

Set the file extension used to look for mapping files under

+
Parameters:
+
fileExtension - The file extension to set
+
+
+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/orm/mapping/driver/databasedriver.html b/lib/api/doctrine/orm/mapping/driver/databasedriver.html new file mode 100644 index 000000000..9f6e8c6b2 --- /dev/null +++ b/lib/api/doctrine/orm/mapping/driver/databasedriver.html @@ -0,0 +1,161 @@ + + + + + + + + + + + +DatabaseDriver (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +
Doctrine\ORM\Mapping\Driver\DatabaseDriver
+
/Doctrine/ORM/Mapping/Driver/DatabaseDriver.php at line 41
+ +

Class DatabaseDriver

+ +
DatabaseDriver
+ +
+
All Implemented Interfaces:
+
Driver +
+ +
+ +

public class DatabaseDriver

+ +

The DatabaseDriver reverse engineers the mapping metadata from a database.

+ +
+
License:
+
http://www.opensource.org/licenses/lgpl-license.php LGPL
+
See Also:
+
www.doctrine-project.org
+
Since:
+
2.0
+
Version:
+
$Revision$
+
Author:
+
Guilherme Blanco
+
Jonathan Wage
+
+
+ + + + + + +
Constructor Summary

DatabaseDriver(mixed schemaManager, AnnotationReader reader)

Initializes a new AnnotationDriver that uses the given AnnotationReader for reading +docblock annotations.

+ + + + + + + + + + + + + + + +
Method Summary
void

getAllClassNames()

{@inheritDoc}

void

isTransient(mixed className)

{@inheritdoc}

void

loadMetadataForClass(mixed className, mixed metadata)

{@inheritdoc}

+ +

Constructor Detail

+
/Doctrine/ORM/Mapping/Driver/DatabaseDriver.php at line 52
+

DatabaseDriver

+public DatabaseDriver(mixed schemaManager, AnnotationReader reader) +
+

Initializes a new AnnotationDriver that uses the given AnnotationReader for reading +docblock annotations.

+
Parameters:
+
reader - The AnnotationReader to use.
+
+
+ +
+ +

Method Detail

+
/Doctrine/ORM/Mapping/Driver/DatabaseDriver.php at line 158
+

getAllClassNames

+public void getAllClassNames() +
+

+ +
+ +
/Doctrine/ORM/Mapping/Driver/DatabaseDriver.php at line 150
+

isTransient

+public void isTransient(mixed className) +
+

+ +
+ +
/Doctrine/ORM/Mapping/Driver/DatabaseDriver.php at line 60
+

loadMetadataForClass

+public void loadMetadataForClass(mixed className, mixed metadata) +
+

+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/orm/mapping/driver/driver.html b/lib/api/doctrine/orm/mapping/driver/driver.html new file mode 100644 index 000000000..9af81ce02 --- /dev/null +++ b/lib/api/doctrine/orm/mapping/driver/driver.html @@ -0,0 +1,142 @@ + + + + + + + + + + + +Driver (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +
Doctrine\ORM\Mapping\Driver\Driver
+
/Doctrine/ORM/Mapping/Driver/Driver.php at line 36
+ +

Interface Driver

+ +
Driver
+ +
+ +

public interface Driver

+ +

Contract for metadata drivers.

+ +
+
License:
+
http://www.opensource.org/licenses/lgpl-license.php LGPL
+
See Also:
+
www.doctrine-project.com
+
Since:
+
2.0
+
Version:
+
$Revision: 1393 $
+
Author:
+
Jonathan H. Wage
+
Todo:
+
Rename: MetadataDriver
+
+
+ + + + + + + + + + + + + + + +
Method Summary
array

getAllClassNames()

Gets the names of all mapped classes known to this driver.

boolean

isTransient(string className)

Whether the class with the specified name should have its metadata loaded. +

void

loadMetadataForClass(string className, ClassMetadataInfo metadata)

Loads the metadata for the specified class into the provided container.

+ +

Method Detail

+
/Doctrine/ORM/Mapping/Driver/Driver.php at line 51
+

getAllClassNames

+public array getAllClassNames() +
+

Gets the names of all mapped classes known to this driver.

+
Returns:
+
The names of all mapped classes known to this driver.
+
+
+ +
+ +
/Doctrine/ORM/Mapping/Driver/Driver.php at line 61
+

isTransient

+public boolean isTransient(string className) +
+

Whether the class with the specified name should have its metadata loaded. +This is only the case if it is either mapped as an Entity or a +MappedSuperclass.

+ +
+ +
/Doctrine/ORM/Mapping/Driver/Driver.php at line 44
+

loadMetadataForClass

+public void loadMetadataForClass(string className, ClassMetadataInfo metadata) +
+

Loads the metadata for the specified class into the provided container.

+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/orm/mapping/driver/driverchain.html b/lib/api/doctrine/orm/mapping/driver/driverchain.html new file mode 100644 index 000000000..d234089e7 --- /dev/null +++ b/lib/api/doctrine/orm/mapping/driver/driverchain.html @@ -0,0 +1,179 @@ + + + + + + + + + + + +DriverChain (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +
Doctrine\ORM\Mapping\Driver\DriverChain
+
/Doctrine/ORM/Mapping/Driver/DriverChain.php at line 41
+ +

Class DriverChain

+ +
DriverChain
+ +
+
All Implemented Interfaces:
+
Driver +
+ +
+ +

public class DriverChain

+ +

The DriverChain allows you to add multiple other mapping drivers for +certain namespaces

+ +
+
License:
+
http://www.opensource.org/licenses/lgpl-license.php LGPL
+
See Also:
+
www.doctrine-project.org
+
Since:
+
2.0
+
Version:
+
$Revision$
+
Author Benjamin:
+
Eberlei
+
Author Guilherme:
+
Blanco
+
Author:
+
Jonathan H. Wage
+
Roman Borschel
+
+
+ + + + + + + + + + + + + + + + + + + + + + + +
Method Summary
void

addDriver(Driver nestedDriver, string namespace)

Add a nested driver.

array

getAllClassNames()

Gets the names of all mapped classes known to this driver.

array

getDrivers()

Get the array of nested drivers.

boolean

isTransient(string className)

Whether the class with the specified name should have its metadata loaded. +

void

loadMetadataForClass(string className, ClassMetadataInfo metadata)

Loads the metadata for the specified class into the provided container.

+ +

Method Detail

+
/Doctrine/ORM/Mapping/Driver/DriverChain.php at line 54
+

addDriver

+public void addDriver(Driver nestedDriver, string namespace) +
+

Add a nested driver.

+ +
+ +
/Doctrine/ORM/Mapping/Driver/DriverChain.php at line 92
+

getAllClassNames

+public array getAllClassNames() +
+

Gets the names of all mapped classes known to this driver.

+
Returns:
+
The names of all mapped classes known to this driver.
+
+
+ +
+ +
/Doctrine/ORM/Mapping/Driver/DriverChain.php at line 64
+

getDrivers

+public array getDrivers() +
+

Get the array of nested drivers.

+
Returns:
+
$drivers
+
+
+ +
+ +
/Doctrine/ORM/Mapping/Driver/DriverChain.php at line 109
+

isTransient

+public boolean isTransient(string className) +
+

Whether the class with the specified name should have its metadata loaded. +This is only the case if it is either mapped as an Entity or a +MappedSuperclass.

+ +
+ +
/Doctrine/ORM/Mapping/Driver/DriverChain.php at line 75
+

loadMetadataForClass

+public void loadMetadataForClass(string className, ClassMetadataInfo metadata) +
+

Loads the metadata for the specified class into the provided container.

+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/orm/mapping/driver/package-frame.html b/lib/api/doctrine/orm/mapping/driver/package-frame.html new file mode 100644 index 000000000..739ea7891 --- /dev/null +++ b/lib/api/doctrine/orm/mapping/driver/package-frame.html @@ -0,0 +1,37 @@ + + + + + + + + + + + +Doctrine\ORM\Mapping\Driver (Doctrine) + + + + +

Doctrine\ORM\Mapping\Driver

+ +

Classes

+ + +

Interfaces

+ + + + + \ No newline at end of file diff --git a/lib/api/doctrine/orm/mapping/driver/package-functions.html b/lib/api/doctrine/orm/mapping/driver/package-functions.html new file mode 100644 index 000000000..65198ab77 --- /dev/null +++ b/lib/api/doctrine/orm/mapping/driver/package-functions.html @@ -0,0 +1,69 @@ + + + + + + + + + + + +Functions (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +

Functions

+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/orm/mapping/driver/package-globals.html b/lib/api/doctrine/orm/mapping/driver/package-globals.html new file mode 100644 index 000000000..d868b741d --- /dev/null +++ b/lib/api/doctrine/orm/mapping/driver/package-globals.html @@ -0,0 +1,69 @@ + + + + + + + + + + + +Globals (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +

Globals

+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/orm/mapping/driver/package-summary.html b/lib/api/doctrine/orm/mapping/driver/package-summary.html new file mode 100644 index 000000000..a546bef43 --- /dev/null +++ b/lib/api/doctrine/orm/mapping/driver/package-summary.html @@ -0,0 +1,78 @@ + + + + + + + + + + + +Doctrine\ORM\Mapping\Driver (Doctrine) + + + + +
+

Doctrine

+ +
+ + +
+ +

Namespace Doctrine\ORM\Mapping\Driver

+ + + + + + + + + + +
Class Summary
AbstractFileDriverBase driver for file-based metadata drivers. +
AnnotationDriverThe AnnotationDriver reads the mapping metadata from docblock annotations.
DatabaseDriverThe DatabaseDriver reverse engineers the mapping metadata from a database.
DriverChainThe DriverChain allows you to add multiple other mapping drivers for +certain namespaces
PhpDriverThe PhpDriver includes php files which just populate ClassMetadataInfo +instances with plain php code
XmlDriverXmlDriver is a metadata driver that enables mapping through XML files.
YamlDriverThe YamlDriver reads the mapping metadata from yaml schema files.
+ + + + +
Interface Summary
DriverContract for metadata drivers.
+ +
+ +
+

Doctrine

+ +
+ + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/orm/mapping/driver/package-tree.html b/lib/api/doctrine/orm/mapping/driver/package-tree.html new file mode 100644 index 000000000..7a3b35e88 --- /dev/null +++ b/lib/api/doctrine/orm/mapping/driver/package-tree.html @@ -0,0 +1,64 @@ + + + + + + + + + + + +Doctrine\ORM\Mapping\Driver (Doctrine) + + + + +
+

Doctrine

+ +
+ + +

Class Hierarchy for Package Doctrine\ORM\Mapping\Driver

+
+

Doctrine

+ +
+ + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/orm/mapping/driver/phpdriver.html b/lib/api/doctrine/orm/mapping/driver/phpdriver.html new file mode 100644 index 000000000..d779a7993 --- /dev/null +++ b/lib/api/doctrine/orm/mapping/driver/phpdriver.html @@ -0,0 +1,157 @@ + + + + + + + + + + + +PhpDriver (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +
Doctrine\ORM\Mapping\Driver\PhpDriver
+
/Doctrine/ORM/Mapping/Driver/PhpDriver.php at line 46
+ +

Class PhpDriver

+ +
Class:PhpDriver - Superclass: AbstractFileDriver
+AbstractFileDriver
⌊ PhpDriver
+ +
+ +

public class PhpDriver
extends AbstractFileDriver + +

+ +

The PhpDriver includes php files which just populate ClassMetadataInfo +instances with plain php code

+ +
+
License:
+
http://www.opensource.org/licenses/lgpl-license.php LGPL
+
See Also:
+
www.doctrine-project.org
+
Since:
+
2.0
+
Version:
+
$Revision$
+
Author Benjamin:
+
Eberlei
+
Author Guilherme:
+
Blanco
+
Author:
+
Jonathan H. Wage
+
Roman Borschel
+
Todo:
+
Rename: PHPDriver
+
+
+ + + + + + + + + + + +
Field Summary
protected mixed

$_fileExtension

{@inheritdoc}

protected mixed

$_metadata

+ + + +
Fields inherited from Doctrine\ORM\Mapping\Driver\AbstractFileDriver
_fileExtension, _paths
+ + + + + + + +
Method Summary
void

loadMetadataForClass(mixed className, mixed metadata)

{@inheritdoc}

+ + + +
Methods inherited from Doctrine\ORM\Mapping\Driver\AbstractFileDriver
addPaths, getAllClassNames, getElement, getFileExtension, getPaths, isTransient, setFileExtension
+ +

Field Detail

+
/Doctrine/ORM/Mapping/Driver/PhpDriver.php at line 51
+

_fileExtension

+protected mixed $_fileExtension = '.php' +
+

+ +
+ +
/Doctrine/ORM/Mapping/Driver/PhpDriver.php at line 52
+

_metadata

+protected mixed $_metadata +
+
+ +
+ +

Method Detail

+
/Doctrine/ORM/Mapping/Driver/PhpDriver.php at line 57
+

loadMetadataForClass

+public void loadMetadataForClass(mixed className, mixed metadata) +
+

+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/orm/mapping/driver/xmldriver.html b/lib/api/doctrine/orm/mapping/driver/xmldriver.html new file mode 100644 index 000000000..c2747834e --- /dev/null +++ b/lib/api/doctrine/orm/mapping/driver/xmldriver.html @@ -0,0 +1,142 @@ + + + + + + + + + + + +XmlDriver (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +
Doctrine\ORM\Mapping\Driver\XmlDriver
+
/Doctrine/ORM/Mapping/Driver/XmlDriver.php at line 40
+ +

Class XmlDriver

+ +
Class:XmlDriver - Superclass: AbstractFileDriver
+AbstractFileDriver
⌊ XmlDriver
+ +
+ +

public class XmlDriver
extends AbstractFileDriver + +

+ +

XmlDriver is a metadata driver that enables mapping through XML files.

+ +
+
License:
+
http://www.opensource.org/licenses/lgpl-license.php LGPL
+
See Also:
+
www.doctrine-project.org
+
Since:
+
2.0
+
Version:
+
$Revision$
+
Author Benjamin:
+
Eberlei
+
Author Guilherme:
+
Blanco
+
Author:
+
Jonathan H. Wage
+
Roman Borschel
+
+
+ + + + + + + +
Field Summary
protected mixed

$_fileExtension

{@inheritdoc}

+ + + +
Fields inherited from Doctrine\ORM\Mapping\Driver\AbstractFileDriver
_fileExtension, _paths
+ + + + + + + +
Method Summary
void

loadMetadataForClass(mixed className, mixed metadata)

{@inheritdoc}

+ + + +
Methods inherited from Doctrine\ORM\Mapping\Driver\AbstractFileDriver
addPaths, getAllClassNames, getElement, getFileExtension, getPaths, isTransient, setFileExtension
+ +

Field Detail

+
/Doctrine/ORM/Mapping/Driver/XmlDriver.php at line 45
+

_fileExtension

+protected mixed $_fileExtension = '.dcm.xml' +
+

+ +
+ +

Method Detail

+
/Doctrine/ORM/Mapping/Driver/XmlDriver.php at line 50
+

loadMetadataForClass

+public void loadMetadataForClass(mixed className, mixed metadata) +
+

+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/orm/mapping/driver/yamldriver.html b/lib/api/doctrine/orm/mapping/driver/yamldriver.html new file mode 100644 index 000000000..769ad9f15 --- /dev/null +++ b/lib/api/doctrine/orm/mapping/driver/yamldriver.html @@ -0,0 +1,142 @@ + + + + + + + + + + + +YamlDriver (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +
Doctrine\ORM\Mapping\Driver\YamlDriver
+
/Doctrine/ORM/Mapping/Driver/YamlDriver.php at line 39
+ +

Class YamlDriver

+ +
Class:YamlDriver - Superclass: AbstractFileDriver
+AbstractFileDriver
⌊ YamlDriver
+ +
+ +

public class YamlDriver
extends AbstractFileDriver + +

+ +

The YamlDriver reads the mapping metadata from yaml schema files.

+ +
+
License:
+
http://www.opensource.org/licenses/lgpl-license.php LGPL
+
See Also:
+
www.doctrine-project.org
+
Since:
+
2.0
+
Version:
+
$Revision$
+
Author Benjamin:
+
Eberlei
+
Author Guilherme:
+
Blanco
+
Author:
+
Jonathan H. Wage
+
Roman Borschel
+
+
+ + + + + + + +
Field Summary
protected mixed

$_fileExtension

{@inheritdoc}

+ + + +
Fields inherited from Doctrine\ORM\Mapping\Driver\AbstractFileDriver
_fileExtension, _paths
+ + + + + + + +
Method Summary
void

loadMetadataForClass(mixed className, mixed metadata)

{@inheritdoc}

+ + + +
Methods inherited from Doctrine\ORM\Mapping\Driver\AbstractFileDriver
addPaths, getAllClassNames, getElement, getFileExtension, getPaths, isTransient, setFileExtension
+ +

Field Detail

+
/Doctrine/ORM/Mapping/Driver/YamlDriver.php at line 44
+

_fileExtension

+protected mixed $_fileExtension = '.dcm.yml' +
+

+ +
+ +

Method Detail

+
/Doctrine/ORM/Mapping/Driver/YamlDriver.php at line 49
+

loadMetadataForClass

+public void loadMetadataForClass(mixed className, mixed metadata) +
+

+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/orm/mapping/elementcollection.html b/lib/api/doctrine/orm/mapping/elementcollection.html new file mode 100644 index 000000000..9c7624d86 --- /dev/null +++ b/lib/api/doctrine/orm/mapping/elementcollection.html @@ -0,0 +1,118 @@ + + + + + + + + + + + +ElementCollection (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +
Doctrine\ORM\Mapping\ElementCollection
+
/Doctrine/ORM/Mapping/Driver/DoctrineAnnotations.php at line 97
+ +

Class ElementCollection

+ +
Class:ElementCollection - Superclass: Annotation
+Annotation
⌊ ElementCollection
+ +
+ +

public final class ElementCollection
extends Annotation + +

+ +

Annotations class

+ +
+
License:
+
http://www.opensource.org/licenses/lgpl-license.php LGPL
+
See Also:
+
www.doctrine-project.org
+
Since:
+
2.0
+
Version:
+
$Revision: 3938 $
+
Author:
+
Guilherme Blanco
+
Jonathan Wage
+
Roman Borschel
+
+
+ + + + + + + +
Field Summary
mixed

$tableName

+ + + +
Fields inherited from Doctrine\Common\Annotations\Annotation
value
+ +

Field Detail

+
/Doctrine/ORM/Mapping/Driver/DoctrineAnnotations.php at line 98
+

tableName

+public mixed $tableName +
+
+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/orm/mapping/entity.html b/lib/api/doctrine/orm/mapping/entity.html new file mode 100644 index 000000000..b923a39b2 --- /dev/null +++ b/lib/api/doctrine/orm/mapping/entity.html @@ -0,0 +1,118 @@ + + + + + + + + + + + +Entity (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +
Doctrine\ORM\Mapping\Entity
+
/Doctrine/ORM/Mapping/Driver/DoctrineAnnotations.php at line 28
+ +

Class Entity

+ +
Class:Entity - Superclass: Annotation
+Annotation
⌊ Entity
+ +
+ +

public final class Entity
extends Annotation + +

+ +

Annotations class

+ +
+
License:
+
http://www.opensource.org/licenses/lgpl-license.php LGPL
+
See Also:
+
www.doctrine-project.org
+
Since:
+
2.0
+
Version:
+
$Revision: 3938 $
+
Author:
+
Guilherme Blanco
+
Jonathan Wage
+
Roman Borschel
+
+
+ + + + + + + +
Field Summary
mixed

$repositoryClass

+ + + +
Fields inherited from Doctrine\Common\Annotations\Annotation
value
+ +

Field Detail

+
/Doctrine/ORM/Mapping/Driver/DoctrineAnnotations.php at line 29
+

repositoryClass

+public mixed $repositoryClass +
+
+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/orm/mapping/generatedvalue.html b/lib/api/doctrine/orm/mapping/generatedvalue.html new file mode 100644 index 000000000..cf1ca5bcd --- /dev/null +++ b/lib/api/doctrine/orm/mapping/generatedvalue.html @@ -0,0 +1,118 @@ + + + + + + + + + + + +GeneratedValue (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +
Doctrine\ORM\Mapping\GeneratedValue
+
/Doctrine/ORM/Mapping/Driver/DoctrineAnnotations.php at line 41
+ +

Class GeneratedValue

+ +
Class:GeneratedValue - Superclass: Annotation
+Annotation
⌊ GeneratedValue
+ +
+ +

public final class GeneratedValue
extends Annotation + +

+ +

Annotations class

+ +
+
License:
+
http://www.opensource.org/licenses/lgpl-license.php LGPL
+
See Also:
+
www.doctrine-project.org
+
Since:
+
2.0
+
Version:
+
$Revision: 3938 $
+
Author:
+
Guilherme Blanco
+
Jonathan Wage
+
Roman Borschel
+
+
+ + + + + + + +
Field Summary
mixed

$strategy

+ + + +
Fields inherited from Doctrine\Common\Annotations\Annotation
value
+ +

Field Detail

+
/Doctrine/ORM/Mapping/Driver/DoctrineAnnotations.php at line 42
+

strategy

+public mixed $strategy = 'AUTO' +
+
+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/orm/mapping/haslifecyclecallbacks.html b/lib/api/doctrine/orm/mapping/haslifecyclecallbacks.html new file mode 100644 index 000000000..c5ebfbb91 --- /dev/null +++ b/lib/api/doctrine/orm/mapping/haslifecyclecallbacks.html @@ -0,0 +1,101 @@ + + + + + + + + + + + +HasLifecycleCallbacks (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +
Doctrine\ORM\Mapping\HasLifecycleCallbacks
+
/Doctrine/ORM/Mapping/Driver/DoctrineAnnotations.php at line 129
+ +

Class HasLifecycleCallbacks

+ +
Class:HasLifecycleCallbacks - Superclass: Annotation
+Annotation
⌊ HasLifecycleCallbacks
+ +
+ +

public final class HasLifecycleCallbacks
extends Annotation + +

+ +

Annotations class

+ +
+
License:
+
http://www.opensource.org/licenses/lgpl-license.php LGPL
+
See Also:
+
www.doctrine-project.org
+
Since:
+
2.0
+
Version:
+
$Revision: 3938 $
+
Author:
+
Guilherme Blanco
+
Jonathan Wage
+
Roman Borschel
+
+
+ + + +
Fields inherited from Doctrine\Common\Annotations\Annotation
value
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/orm/mapping/id.html b/lib/api/doctrine/orm/mapping/id.html new file mode 100644 index 000000000..2b7d45a91 --- /dev/null +++ b/lib/api/doctrine/orm/mapping/id.html @@ -0,0 +1,101 @@ + + + + + + + + + + + +Id (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +
Doctrine\ORM\Mapping\Id
+
/Doctrine/ORM/Mapping/Driver/DoctrineAnnotations.php at line 40
+ +

Class Id

+ +
Class:Id - Superclass: Annotation
+Annotation
⌊ Id
+ +
+ +

public final class Id
extends Annotation + +

+ +

Annotations class

+ +
+
License:
+
http://www.opensource.org/licenses/lgpl-license.php LGPL
+
See Also:
+
www.doctrine-project.org
+
Since:
+
2.0
+
Version:
+
$Revision: 3938 $
+
Author:
+
Guilherme Blanco
+
Jonathan Wage
+
Roman Borschel
+
+
+ + + +
Fields inherited from Doctrine\Common\Annotations\Annotation
value
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/orm/mapping/index.html b/lib/api/doctrine/orm/mapping/index.html new file mode 100644 index 000000000..3413a6c01 --- /dev/null +++ b/lib/api/doctrine/orm/mapping/index.html @@ -0,0 +1,130 @@ + + + + + + + + + + + +Index (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +
Doctrine\ORM\Mapping\Index
+
/Doctrine/ORM/Mapping/Driver/DoctrineAnnotations.php at line 110
+ +

Class Index

+ +
Class:Index - Superclass: Annotation
+Annotation
⌊ Index
+ +
+ +

public final class Index
extends Annotation + +

+ +

Annotations class

+ +
+
License:
+
http://www.opensource.org/licenses/lgpl-license.php LGPL
+
See Also:
+
www.doctrine-project.org
+
Since:
+
2.0
+
Version:
+
$Revision: 3938 $
+
Author:
+
Guilherme Blanco
+
Jonathan Wage
+
Roman Borschel
+
+
+ + + + + + + + + + + +
Field Summary
mixed

$columns

mixed

$name

+ + + +
Fields inherited from Doctrine\Common\Annotations\Annotation
value
+ +

Field Detail

+
/Doctrine/ORM/Mapping/Driver/DoctrineAnnotations.php at line 112
+

columns

+public mixed $columns +
+
+ +
+ +
/Doctrine/ORM/Mapping/Driver/DoctrineAnnotations.php at line 111
+

name

+public mixed $name +
+
+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/orm/mapping/inheritancetype.html b/lib/api/doctrine/orm/mapping/inheritancetype.html new file mode 100644 index 000000000..f8950559a --- /dev/null +++ b/lib/api/doctrine/orm/mapping/inheritancetype.html @@ -0,0 +1,101 @@ + + + + + + + + + + + +InheritanceType (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +
Doctrine\ORM\Mapping\InheritanceType
+
/Doctrine/ORM/Mapping/Driver/DoctrineAnnotations.php at line 32
+ +

Class InheritanceType

+ +
Class:InheritanceType - Superclass: Annotation
+Annotation
⌊ InheritanceType
+ +
+ +

public final class InheritanceType
extends Annotation + +

+ +

Annotations class

+ +
+
License:
+
http://www.opensource.org/licenses/lgpl-license.php LGPL
+
See Also:
+
www.doctrine-project.org
+
Since:
+
2.0
+
Version:
+
$Revision: 3938 $
+
Author:
+
Guilherme Blanco
+
Jonathan Wage
+
Roman Borschel
+
+
+ + + +
Fields inherited from Doctrine\Common\Annotations\Annotation
value
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/orm/mapping/joincolumn.html b/lib/api/doctrine/orm/mapping/joincolumn.html new file mode 100644 index 000000000..aed27607a --- /dev/null +++ b/lib/api/doctrine/orm/mapping/joincolumn.html @@ -0,0 +1,202 @@ + + + + + + + + + + + +JoinColumn (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +
Doctrine\ORM\Mapping\JoinColumn
+
/Doctrine/ORM/Mapping/Driver/DoctrineAnnotations.php at line 45
+ +

Class JoinColumn

+ +
Class:JoinColumn - Superclass: Annotation
+Annotation
⌊ JoinColumn
+ +
+ +

public final class JoinColumn
extends Annotation + +

+ +

Annotations class

+ +
+
License:
+
http://www.opensource.org/licenses/lgpl-license.php LGPL
+
See Also:
+
www.doctrine-project.org
+
Since:
+
2.0
+
Version:
+
$Revision: 3938 $
+
Author:
+
Guilherme Blanco
+
Jonathan Wage
+
Roman Borschel
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Field Summary
mixed

$columnDefinition

mixed

$fieldName

mixed

$name

mixed

$nullable

mixed

$onDelete

mixed

$onUpdate

mixed

$referencedColumnName

mixed

$unique

+ + + +
Fields inherited from Doctrine\Common\Annotations\Annotation
value
+ +

Field Detail

+
/Doctrine/ORM/Mapping/Driver/DoctrineAnnotations.php at line 53
+

columnDefinition

+public mixed $columnDefinition +
+
+ +
+ +
/Doctrine/ORM/Mapping/Driver/DoctrineAnnotations.php at line 47
+

fieldName

+public mixed $fieldName +
+
+ +
+ +
/Doctrine/ORM/Mapping/Driver/DoctrineAnnotations.php at line 46
+

name

+public mixed $name +
+
+ +
+ +
/Doctrine/ORM/Mapping/Driver/DoctrineAnnotations.php at line 50
+

nullable

+public mixed $nullable = true +
+
+ +
+ +
/Doctrine/ORM/Mapping/Driver/DoctrineAnnotations.php at line 51
+

onDelete

+public mixed $onDelete +
+
+ +
+ +
/Doctrine/ORM/Mapping/Driver/DoctrineAnnotations.php at line 52
+

onUpdate

+public mixed $onUpdate +
+
+ +
+ +
/Doctrine/ORM/Mapping/Driver/DoctrineAnnotations.php at line 48
+

referencedColumnName

+public mixed $referencedColumnName = 'id' +
+
+ +
+ +
/Doctrine/ORM/Mapping/Driver/DoctrineAnnotations.php at line 49
+

unique

+public mixed $unique = false +
+
+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/orm/mapping/joincolumns.html b/lib/api/doctrine/orm/mapping/joincolumns.html new file mode 100644 index 000000000..400f5839c --- /dev/null +++ b/lib/api/doctrine/orm/mapping/joincolumns.html @@ -0,0 +1,101 @@ + + + + + + + + + + + +JoinColumns (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +
Doctrine\ORM\Mapping\JoinColumns
+
/Doctrine/ORM/Mapping/Driver/DoctrineAnnotations.php at line 55
+ +

Class JoinColumns

+ +
Class:JoinColumns - Superclass: Annotation
+Annotation
⌊ JoinColumns
+ +
+ +

public final class JoinColumns
extends Annotation + +

+ +

Annotations class

+ +
+
License:
+
http://www.opensource.org/licenses/lgpl-license.php LGPL
+
See Also:
+
www.doctrine-project.org
+
Since:
+
2.0
+
Version:
+
$Revision: 3938 $
+
Author:
+
Guilherme Blanco
+
Jonathan Wage
+
Roman Borschel
+
+
+ + + +
Fields inherited from Doctrine\Common\Annotations\Annotation
value
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/orm/mapping/jointable.html b/lib/api/doctrine/orm/mapping/jointable.html new file mode 100644 index 000000000..3380fd99e --- /dev/null +++ b/lib/api/doctrine/orm/mapping/jointable.html @@ -0,0 +1,154 @@ + + + + + + + + + + + +JoinTable (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +
Doctrine\ORM\Mapping\JoinTable
+
/Doctrine/ORM/Mapping/Driver/DoctrineAnnotations.php at line 114
+ +

Class JoinTable

+ +
Class:JoinTable - Superclass: Annotation
+Annotation
⌊ JoinTable
+ +
+ +

public final class JoinTable
extends Annotation + +

+ +

Annotations class

+ +
+
License:
+
http://www.opensource.org/licenses/lgpl-license.php LGPL
+
See Also:
+
www.doctrine-project.org
+
Since:
+
2.0
+
Version:
+
$Revision: 3938 $
+
Author:
+
Guilherme Blanco
+
Jonathan Wage
+
Roman Borschel
+
+
+ + + + + + + + + + + + + + + + + + + +
Field Summary
mixed

$inverseJoinColumns

mixed

$joinColumns

mixed

$name

mixed

$schema

+ + + +
Fields inherited from Doctrine\Common\Annotations\Annotation
value
+ +

Field Detail

+
/Doctrine/ORM/Mapping/Driver/DoctrineAnnotations.php at line 118
+

inverseJoinColumns

+public mixed $inverseJoinColumns +
+
+ +
+ +
/Doctrine/ORM/Mapping/Driver/DoctrineAnnotations.php at line 117
+

joinColumns

+public mixed $joinColumns +
+
+ +
+ +
/Doctrine/ORM/Mapping/Driver/DoctrineAnnotations.php at line 115
+

name

+public mixed $name +
+
+ +
+ +
/Doctrine/ORM/Mapping/Driver/DoctrineAnnotations.php at line 116
+

schema

+public mixed $schema +
+
+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/orm/mapping/manytomany.html b/lib/api/doctrine/orm/mapping/manytomany.html new file mode 100644 index 000000000..f26b9636d --- /dev/null +++ b/lib/api/doctrine/orm/mapping/manytomany.html @@ -0,0 +1,166 @@ + + + + + + + + + + + +ManyToMany (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +
Doctrine\ORM\Mapping\ManyToMany
+
/Doctrine/ORM/Mapping/Driver/DoctrineAnnotations.php at line 90
+ +

Class ManyToMany

+ +
Class:ManyToMany - Superclass: Annotation
+Annotation
⌊ ManyToMany
+ +
+ +

public final class ManyToMany
extends Annotation + +

+ +

Annotations class

+ +
+
License:
+
http://www.opensource.org/licenses/lgpl-license.php LGPL
+
See Also:
+
www.doctrine-project.org
+
Since:
+
2.0
+
Version:
+
$Revision: 3938 $
+
Author:
+
Guilherme Blanco
+
Jonathan Wage
+
Roman Borschel
+
+
+ + + + + + + + + + + + + + + + + + + + + + + +
Field Summary
mixed

$cascade

mixed

$fetch

mixed

$inversedBy

mixed

$mappedBy

mixed

$targetEntity

+ + + +
Fields inherited from Doctrine\Common\Annotations\Annotation
value
+ +

Field Detail

+
/Doctrine/ORM/Mapping/Driver/DoctrineAnnotations.php at line 94
+

cascade

+public mixed $cascade +
+
+ +
+ +
/Doctrine/ORM/Mapping/Driver/DoctrineAnnotations.php at line 95
+

fetch

+public mixed $fetch = 'LAZY' +
+
+ +
+ +
/Doctrine/ORM/Mapping/Driver/DoctrineAnnotations.php at line 93
+

inversedBy

+public mixed $inversedBy +
+
+ +
+ +
/Doctrine/ORM/Mapping/Driver/DoctrineAnnotations.php at line 92
+

mappedBy

+public mixed $mappedBy +
+
+ +
+ +
/Doctrine/ORM/Mapping/Driver/DoctrineAnnotations.php at line 91
+

targetEntity

+public mixed $targetEntity +
+
+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/orm/mapping/manytomanymapping.html b/lib/api/doctrine/orm/mapping/manytomanymapping.html new file mode 100644 index 000000000..af9f17953 --- /dev/null +++ b/lib/api/doctrine/orm/mapping/manytomanymapping.html @@ -0,0 +1,196 @@ + + + + + + + + + + + +ManyToManyMapping (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +
Doctrine\ORM\Mapping\ManyToManyMapping
+
/Doctrine/ORM/Mapping/ManyToManyMapping.php at line 43
+ +

Class ManyToManyMapping

+ +
Class:ManyToManyMapping - Superclass: AssociationMapping
+AssociationMapping
⌊ ManyToManyMapping
+ +
+ +

public class ManyToManyMapping
extends AssociationMapping + +

+ +

A many-to-many mapping describes the mapping between two collections of +entities.

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).

Instances of this class are stored serialized in the metadata cache together with the +owning ClassMetadata instance.

+ +
+
Since:
+
2.0
+
Author:
+
Roman Borschel
+
Giorgio Sironi
+
+
+ + + + + + + + + + + + + + + + + + + +
Field Summary
mixed

$joinTableColumns

READ-ONLY: List of aggregated column names on the join table.

array

$orderBy

READ-ONLY: Order this collection by the given DQL snippet. +

mixed

$relationToSourceKeyColumns

READ-ONLY: Maps the columns in the relational table to the columns in the source table.

mixed

$relationToTargetKeyColumns

READ-ONLY: Maps the columns in the relation table to the columns in the target table.

+ + + +
Fields inherited from Doctrine\ORM\Mapping\AssociationMapping
FETCH_EAGER, FETCH_LAZY, declared, fetchMode, inherited, inversedBy, isCascadeDetach, isCascadeMerge, isCascadePersist, isCascadeRefresh, isCascadeRemove, isOwningSide, joinTable, mappedBy, sourceEntityName, sourceFieldName, targetEntityName
+ + + + + + + + + + + +
Method Summary
boolean

isManyToMany()

{@inheritdoc}

void

load(object sourceEntity, mixed targetCollection, EntityManager em, array joinColumnValues, object The, array , object target)

Loads entities in $targetCollection using $em. +

+ + + +
Methods inherited from Doctrine\ORM\Mapping\AssociationMapping
getQuotedJoinTableName, hasCascades, isEagerlyFetched, isLazilyFetched, isManyToMany, isOneToMany, isOneToOne, load, usesJoinTable
+ +

Field Detail

+
/Doctrine/ORM/Mapping/ManyToManyMapping.php at line 58
+

joinTableColumns

+public mixed $joinTableColumns = array() +
+

READ-ONLY: List of aggregated column names on the join table.

+ +
+ +
/Doctrine/ORM/Mapping/ManyToManyMapping.php at line 70
+

orderBy

+public array $orderBy +
+

READ-ONLY: Order this collection by the given DQL snippet.

Only simple unqualified field names and ASC|DESC are allowed

+ +
+ +
/Doctrine/ORM/Mapping/ManyToManyMapping.php at line 48
+

relationToSourceKeyColumns

+public mixed $relationToSourceKeyColumns = array() +
+

READ-ONLY: Maps the columns in the relational table to the columns in the source table.

+ +
+ +
/Doctrine/ORM/Mapping/ManyToManyMapping.php at line 53
+

relationToTargetKeyColumns

+public mixed $relationToTargetKeyColumns = array() +
+

READ-ONLY: Maps the columns in the relation table to the columns in the target table.

+ +
+ +

Method Detail

+
/Doctrine/ORM/Mapping/ManyToManyMapping.php at line 181
+

isManyToMany

+public boolean isManyToMany() +
+

+ +
+ +
/Doctrine/ORM/Mapping/ManyToManyMapping.php at line 146
+

load

+public void load(object sourceEntity, mixed targetCollection, EntityManager em, array joinColumnValues, object The, array , object target) +
+

Loads entities in $targetCollection using $em. +The data of $sourceEntity are used to restrict the collection +via the join table.

+
Parameters:
+
The - owner of the collection.
+
The - collection to populate.
+
+
+
+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/orm/mapping/manytoone.html b/lib/api/doctrine/orm/mapping/manytoone.html new file mode 100644 index 000000000..f5607ec84 --- /dev/null +++ b/lib/api/doctrine/orm/mapping/manytoone.html @@ -0,0 +1,154 @@ + + + + + + + + + + + +ManyToOne (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +
Doctrine\ORM\Mapping\ManyToOne
+
/Doctrine/ORM/Mapping/Driver/DoctrineAnnotations.php at line 84
+ +

Class ManyToOne

+ +
Class:ManyToOne - Superclass: Annotation
+Annotation
⌊ ManyToOne
+ +
+ +

public final class ManyToOne
extends Annotation + +

+ +

Annotations class

+ +
+
License:
+
http://www.opensource.org/licenses/lgpl-license.php LGPL
+
See Also:
+
www.doctrine-project.org
+
Since:
+
2.0
+
Version:
+
$Revision: 3938 $
+
Author:
+
Guilherme Blanco
+
Jonathan Wage
+
Roman Borschel
+
+
+ + + + + + + + + + + + + + + + + + + +
Field Summary
mixed

$cascade

mixed

$fetch

mixed

$inversedBy

mixed

$targetEntity

+ + + +
Fields inherited from Doctrine\Common\Annotations\Annotation
value
+ +

Field Detail

+
/Doctrine/ORM/Mapping/Driver/DoctrineAnnotations.php at line 86
+

cascade

+public mixed $cascade +
+
+ +
+ +
/Doctrine/ORM/Mapping/Driver/DoctrineAnnotations.php at line 87
+

fetch

+public mixed $fetch = 'LAZY' +
+
+ +
+ +
/Doctrine/ORM/Mapping/Driver/DoctrineAnnotations.php at line 88
+

inversedBy

+public mixed $inversedBy +
+
+ +
+ +
/Doctrine/ORM/Mapping/Driver/DoctrineAnnotations.php at line 85
+

targetEntity

+public mixed $targetEntity +
+
+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/orm/mapping/mappedsuperclass.html b/lib/api/doctrine/orm/mapping/mappedsuperclass.html new file mode 100644 index 000000000..add75dbde --- /dev/null +++ b/lib/api/doctrine/orm/mapping/mappedsuperclass.html @@ -0,0 +1,101 @@ + + + + + + + + + + + +MappedSuperclass (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +
Doctrine\ORM\Mapping\MappedSuperclass
+
/Doctrine/ORM/Mapping/Driver/DoctrineAnnotations.php at line 31
+ +

Class MappedSuperclass

+ +
Class:MappedSuperclass - Superclass: Annotation
+Annotation
⌊ MappedSuperclass
+ +
+ +

public final class MappedSuperclass
extends Annotation + +

+ +

Annotations class

+ +
+
License:
+
http://www.opensource.org/licenses/lgpl-license.php LGPL
+
See Also:
+
www.doctrine-project.org
+
Since:
+
2.0
+
Version:
+
$Revision: 3938 $
+
Author:
+
Guilherme Blanco
+
Jonathan Wage
+
Roman Borschel
+
+
+ + + +
Fields inherited from Doctrine\Common\Annotations\Annotation
value
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/orm/mapping/mappingexception.html b/lib/api/doctrine/orm/mapping/mappingexception.html new file mode 100644 index 000000000..ddbb5efbf --- /dev/null +++ b/lib/api/doctrine/orm/mapping/mappingexception.html @@ -0,0 +1,419 @@ + + + + + + + + + + + +MappingException (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +
Doctrine\ORM\Mapping\MappingException
+
/Doctrine/ORM/Mapping/MappingException.php at line 29
+ +

Class MappingException

+ +
Class:MappingException - Superclass: Doctrine
+Doctrine
⌊ MappingException
+ +
+ +

public class MappingException
extends Doctrine + +

+ +

A MappingException indicates that something is wrong with the mapping setup.

+ +
+
Since:
+
2.0
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Method Summary
static void

classIsNotAValidEntityOrMappedSuperClass(mixed className)

static void

duplicateAssociationMapping(mixed entity, mixed fieldName)

static self

duplicateColumnName(string className, string columnName)

static void

duplicateFieldMapping(string entity, string fieldName)

static void

fileMappingDriversRequireConfiguredDirectoryPath()

static void

generatorNotAllowedWithCompositeId()

static void

identifierRequired(mixed entityName)

static self

invalidClassInDiscriminatorMap(string className, string owningClass)

Throws an exception that indicates that a class used in a discriminator map does not exist. +

static void

invalidInheritanceType(mixed entityName, mixed type)

static void

invalidMapping(string fieldName)

Generic exception for invalid mappings.

static void

joinColumnMustPointToMappedField(mixed className, mixed joinColumn)

static void

joinTableRequired(mixed fieldName)

static void

mappingFileNotFound(mixed entityName, mixed fileName)

static void

mappingNotFound(mixed fieldName)

static void

missingFieldName()

static MappingException

missingRequiredOption(string field, string expectedOption, string hint)

Called if a required option was not found but is required

static void

missingSourceEntity(mixed fieldName)

static void

missingTargetEntity(mixed fieldName)

static void

oneToManyRequiresMappedBy(mixed fieldName)

static void

pathRequired()

static void

propertyTypeIsRequired(mixed className, mixed propertyName)

static void

reflectionFailure(string entity, \ReflectionException previousException)

Exception for reflection exceptions - adds the entity name, +because there might be long classnames that will be shortened +within the stacktrace

static void

singleIdNotAllowedOnCompositePrimaryKey(mixed entity)

static void

tableIdGeneratorNotImplemented(mixed className)

static void

unsupportedOptimisticLockingType(mixed entity, mixed fieldName, mixed unsupportedType)

+ +

Method Detail

+
/Doctrine/ORM/Mapping/MappingException.php at line 137
+

classIsNotAValidEntityOrMappedSuperClass

+public static void classIsNotAValidEntityOrMappedSuperClass(mixed className) +
+
+ +
+ +
/Doctrine/ORM/Mapping/MappingException.php at line 161
+

duplicateAssociationMapping

+public static void duplicateAssociationMapping(mixed entity, mixed fieldName) +
+
+ +
+ +
/Doctrine/ORM/Mapping/MappingException.php at line 200
+

duplicateColumnName

+public static self duplicateColumnName(string className, string columnName) +
+

+ +
+ +
/Doctrine/ORM/Mapping/MappingException.php at line 157
+

duplicateFieldMapping

+public static void duplicateFieldMapping(string entity, string fieldName) +
+

+
Parameters:
+
entity - The entity's name
+
fieldName - The name of the field that was already declared
+
+
+ +
+ +
/Doctrine/ORM/Mapping/MappingException.php at line 175
+

fileMappingDriversRequireConfiguredDirectoryPath

+public static void fileMappingDriversRequireConfiguredDirectoryPath() +
+
+ +
+ +
/Doctrine/ORM/Mapping/MappingException.php at line 48
+

generatorNotAllowedWithCompositeId

+public static void generatorNotAllowedWithCompositeId() +
+
+ +
+ +
/Doctrine/ORM/Mapping/MappingException.php at line 37
+

identifierRequired

+public static void identifierRequired(mixed entityName) +
+
+ +
+ +
/Doctrine/ORM/Mapping/MappingException.php at line 188
+

invalidClassInDiscriminatorMap

+public static self invalidClassInDiscriminatorMap(string className, string owningClass) +
+

Throws an exception that indicates that a class used in a discriminator map does not exist. +An example would be an outdated (maybe renamed) classname.

+
Parameters:
+
className - The class that could not be found
+
owningClass - The class that declares the discriminator map.
+
+
+ +
+ +
/Doctrine/ORM/Mapping/MappingException.php at line 43
+

invalidInheritanceType

+public static void invalidInheritanceType(mixed entityName, mixed type) +
+
+ +
+ +
/Doctrine/ORM/Mapping/MappingException.php at line 113
+

invalidMapping

+public static void invalidMapping(string fieldName) +
+

Generic exception for invalid mappings.

+ +
+ +
/Doctrine/ORM/Mapping/MappingException.php at line 131
+

joinColumnMustPointToMappedField

+public static void joinColumnMustPointToMappedField(mixed className, mixed joinColumn) +
+
+ +
+ +
/Doctrine/ORM/Mapping/MappingException.php at line 83
+

joinTableRequired

+public static void joinTableRequired(mixed fieldName) +
+
+ +
+ +
/Doctrine/ORM/Mapping/MappingException.php at line 68
+

mappingFileNotFound

+public static void mappingFileNotFound(mixed entityName, mixed fileName) +
+
+ +
+ +
/Doctrine/ORM/Mapping/MappingException.php at line 73
+

mappingNotFound

+public static void mappingNotFound(mixed fieldName) +
+
+ +
+ +
/Doctrine/ORM/Mapping/MappingException.php at line 53
+

missingFieldName

+public static void missingFieldName() +
+
+ +
+ +
/Doctrine/ORM/Mapping/MappingException.php at line 97
+

missingRequiredOption

+public static MappingException missingRequiredOption(string field, string expectedOption, string hint) +
+

Called if a required option was not found but is required

+
Parameters:
+
field - which field cannot be processed?
+
expectedOption - which option is required
+
hint - Can optionally be used to supply a tip for common mistakes, e.g. "Did you think of the plural s?"
+
+
+ +
+ +
/Doctrine/ORM/Mapping/MappingException.php at line 63
+

missingSourceEntity

+public static void missingSourceEntity(mixed fieldName) +
+
+ +
+ +
/Doctrine/ORM/Mapping/MappingException.php at line 58
+

missingTargetEntity

+public static void missingTargetEntity(mixed fieldName) +
+
+ +
+ +
/Doctrine/ORM/Mapping/MappingException.php at line 78
+

oneToManyRequiresMappedBy

+public static void oneToManyRequiresMappedBy(mixed fieldName) +
+
+ +
+ +
/Doctrine/ORM/Mapping/MappingException.php at line 31
+

pathRequired

+public static void pathRequired() +
+
+ +
+ +
/Doctrine/ORM/Mapping/MappingException.php at line 142
+

propertyTypeIsRequired

+public static void propertyTypeIsRequired(mixed className, mixed propertyName) +
+
+ +
+ +
/Doctrine/ORM/Mapping/MappingException.php at line 126
+

reflectionFailure

+public static void reflectionFailure(string entity, \ReflectionException previousException) +
+

Exception for reflection exceptions - adds the entity name, +because there might be long classnames that will be shortened +within the stacktrace

+
Parameters:
+
entity - The entity's name
+
+
+
+ +
+ +
/Doctrine/ORM/Mapping/MappingException.php at line 165
+

singleIdNotAllowedOnCompositePrimaryKey

+public static void singleIdNotAllowedOnCompositePrimaryKey(mixed entity) +
+
+ +
+ +
/Doctrine/ORM/Mapping/MappingException.php at line 147
+

tableIdGeneratorNotImplemented

+public static void tableIdGeneratorNotImplemented(mixed className) +
+
+ +
+ +
/Doctrine/ORM/Mapping/MappingException.php at line 169
+

unsupportedOptimisticLockingType

+public static void unsupportedOptimisticLockingType(mixed entity, mixed fieldName, mixed unsupportedType) +
+
+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/orm/mapping/onetomany.html b/lib/api/doctrine/orm/mapping/onetomany.html new file mode 100644 index 000000000..0ef7a17a5 --- /dev/null +++ b/lib/api/doctrine/orm/mapping/onetomany.html @@ -0,0 +1,166 @@ + + + + + + + + + + + +OneToMany (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +
Doctrine\ORM\Mapping\OneToMany
+
/Doctrine/ORM/Mapping/Driver/DoctrineAnnotations.php at line 77
+ +

Class OneToMany

+ +
Class:OneToMany - Superclass: Annotation
+Annotation
⌊ OneToMany
+ +
+ +

public final class OneToMany
extends Annotation + +

+ +

Annotations class

+ +
+
License:
+
http://www.opensource.org/licenses/lgpl-license.php LGPL
+
See Also:
+
www.doctrine-project.org
+
Since:
+
2.0
+
Version:
+
$Revision: 3938 $
+
Author:
+
Guilherme Blanco
+
Jonathan Wage
+
Roman Borschel
+
+
+ + + + + + + + + + + + + + + + + + + + + + + +
Field Summary
mixed

$cascade

mixed

$fetch

mixed

$mappedBy

mixed

$orphanRemoval

mixed

$targetEntity

+ + + +
Fields inherited from Doctrine\Common\Annotations\Annotation
value
+ +

Field Detail

+
/Doctrine/ORM/Mapping/Driver/DoctrineAnnotations.php at line 80
+

cascade

+public mixed $cascade +
+
+ +
+ +
/Doctrine/ORM/Mapping/Driver/DoctrineAnnotations.php at line 81
+

fetch

+public mixed $fetch = 'LAZY' +
+
+ +
+ +
/Doctrine/ORM/Mapping/Driver/DoctrineAnnotations.php at line 78
+

mappedBy

+public mixed $mappedBy +
+
+ +
+ +
/Doctrine/ORM/Mapping/Driver/DoctrineAnnotations.php at line 82
+

orphanRemoval

+public mixed $orphanRemoval = false +
+
+ +
+ +
/Doctrine/ORM/Mapping/Driver/DoctrineAnnotations.php at line 79
+

targetEntity

+public mixed $targetEntity +
+
+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/orm/mapping/onetomanymapping.html b/lib/api/doctrine/orm/mapping/onetomanymapping.html new file mode 100644 index 000000000..247f821cc --- /dev/null +++ b/lib/api/doctrine/orm/mapping/onetomanymapping.html @@ -0,0 +1,190 @@ + + + + + + + + + + + +OneToManyMapping (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +
Doctrine\ORM\Mapping\OneToManyMapping
+
/Doctrine/ORM/Mapping/OneToManyMapping.php at line 47
+ +

Class OneToManyMapping

+ +
Class:OneToManyMapping - Superclass: AssociationMapping
+AssociationMapping
⌊ OneToManyMapping
+ +
+ +

public class OneToManyMapping
extends AssociationMapping + +

+ +

Represents a one-to-many mapping.

NOTE: One-to-many mappings can currently not be uni-directional (one -> many). +They must either be bidirectional (one <-> many) or unidirectional (many -> one). +In other words, the many-side MUST be the owning side and the one-side MUST be +the inverse side.

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).

Instances of this class are stored serialized in the metadata cache together with the +owning ClassMetadata instance.

+ +
+
Author:
+
Roman Borschel
+
Giorgio Sironi
+
Since:
+
2.0
+
+
+ + + + + + + + + + + +
Field Summary
mixed

$orderBy

READ-ONLY: Order this collection by the given SQL snippet.

boolean

$orphanRemoval

READ-ONLY: Whether to delete orphaned elements (removed from the collection)

+ + + +
Fields inherited from Doctrine\ORM\Mapping\AssociationMapping
FETCH_EAGER, FETCH_LAZY, declared, fetchMode, inherited, inversedBy, isCascadeDetach, isCascadeMerge, isCascadePersist, isCascadeRefresh, isCascadeRemove, isOwningSide, joinTable, mappedBy, sourceEntityName, sourceFieldName, targetEntityName
+ + + + + + + + + + + + + + + +
Method Summary
boolean

isOneToMany()

{@inheritdoc}

void

load(object sourceEntity, mixed targetCollection, EntityManager em, array joinColumnValues, $em The, $joinColumnValues , object target)

Loads a one-to-many collection.

boolean

shouldDeleteOrphans()

Whether orphaned elements (removed from the collection) should be deleted.

+ + + +
Methods inherited from Doctrine\ORM\Mapping\AssociationMapping
getQuotedJoinTableName, hasCascades, isEagerlyFetched, isLazilyFetched, isManyToMany, isOneToMany, isOneToOne, load, usesJoinTable
+ +

Field Detail

+
/Doctrine/ORM/Mapping/OneToManyMapping.php at line 62
+

orderBy

+public mixed $orderBy +
+

READ-ONLY: Order this collection by the given SQL snippet.

+ +
+ +
/Doctrine/ORM/Mapping/OneToManyMapping.php at line 54
+

orphanRemoval

+public boolean $orphanRemoval = false +
+

READ-ONLY: Whether to delete orphaned elements (removed from the collection)

+ +
+ +

Method Detail

+
/Doctrine/ORM/Mapping/OneToManyMapping.php at line 107
+

isOneToMany

+public boolean isOneToMany() +
+

+
Override.
+
+
+ +
+ +
/Doctrine/ORM/Mapping/OneToManyMapping.php at line 121
+

load

+public void load(object sourceEntity, mixed targetCollection, EntityManager em, array joinColumnValues, $em The, $joinColumnValues , object target) +
+

Loads a one-to-many collection.

+
Parameters:
+
The - entity that owns the collection.
+
The - collection to load/fill.
+
The - EntityManager to use.
+
+
+
+ +
+ +
/Doctrine/ORM/Mapping/OneToManyMapping.php at line 97
+

shouldDeleteOrphans

+public boolean shouldDeleteOrphans() +
+

Whether orphaned elements (removed from the collection) should be deleted.

+
Returns:
+
TRUE if orphaned elements should be deleted, FALSE otherwise.
+
+
+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/orm/mapping/onetoone.html b/lib/api/doctrine/orm/mapping/onetoone.html new file mode 100644 index 000000000..7a3772531 --- /dev/null +++ b/lib/api/doctrine/orm/mapping/onetoone.html @@ -0,0 +1,178 @@ + + + + + + + + + + + +OneToOne (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +
Doctrine\ORM\Mapping\OneToOne
+
/Doctrine/ORM/Mapping/Driver/DoctrineAnnotations.php at line 69
+ +

Class OneToOne

+ +
Class:OneToOne - Superclass: Annotation
+Annotation
⌊ OneToOne
+ +
+ +

public final class OneToOne
extends Annotation + +

+ +

Annotations class

+ +
+
License:
+
http://www.opensource.org/licenses/lgpl-license.php LGPL
+
See Also:
+
www.doctrine-project.org
+
Since:
+
2.0
+
Version:
+
$Revision: 3938 $
+
Author:
+
Guilherme Blanco
+
Jonathan Wage
+
Roman Borschel
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
Field Summary
mixed

$cascade

mixed

$fetch

mixed

$inversedBy

mixed

$mappedBy

mixed

$orphanRemoval

mixed

$targetEntity

+ + + +
Fields inherited from Doctrine\Common\Annotations\Annotation
value
+ +

Field Detail

+
/Doctrine/ORM/Mapping/Driver/DoctrineAnnotations.php at line 73
+

cascade

+public mixed $cascade +
+
+ +
+ +
/Doctrine/ORM/Mapping/Driver/DoctrineAnnotations.php at line 74
+

fetch

+public mixed $fetch = 'LAZY' +
+
+ +
+ +
/Doctrine/ORM/Mapping/Driver/DoctrineAnnotations.php at line 72
+

inversedBy

+public mixed $inversedBy +
+
+ +
+ +
/Doctrine/ORM/Mapping/Driver/DoctrineAnnotations.php at line 71
+

mappedBy

+public mixed $mappedBy +
+
+ +
+ +
/Doctrine/ORM/Mapping/Driver/DoctrineAnnotations.php at line 75
+

orphanRemoval

+public mixed $orphanRemoval = false +
+
+ +
+ +
/Doctrine/ORM/Mapping/Driver/DoctrineAnnotations.php at line 70
+

targetEntity

+public mixed $targetEntity +
+
+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/orm/mapping/onetoonemapping.html b/lib/api/doctrine/orm/mapping/onetoonemapping.html new file mode 100644 index 000000000..19fa49a9a --- /dev/null +++ b/lib/api/doctrine/orm/mapping/onetoonemapping.html @@ -0,0 +1,216 @@ + + + + + + + + + + + +OneToOneMapping (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +
Doctrine\ORM\Mapping\OneToOneMapping
+
/Doctrine/ORM/Mapping/OneToOneMapping.php at line 43
+ +

Class OneToOneMapping

+ +
Class:OneToOneMapping - Superclass: AssociationMapping
+AssociationMapping
⌊ OneToOneMapping
+ +
+ +

public class OneToOneMapping
extends AssociationMapping + +

+ +

A one-to-one mapping describes a uni-directional mapping from one entity +to another entity.

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).

Instances of this class are stored serialized in the metadata cache together with the +owning ClassMetadata instance.

+ +
+
Since:
+
2.0
+
Author:
+
Roman Borschel
+
Giorgio Sironi
+
+
+ + + + + + + + + + + + + + + + + + + + + + + +
Field Summary
array

$joinColumnFieldNames

READ-ONLY: A map of join column names to field names that are used in cases +when the join columns are fetched as part of the query result.

array

$joinColumns

READ-ONLY: The join column definitions.

boolean

$orphanRemoval

READ-ONLY: Whether to delete orphaned elements (when nulled out, i.e.

mixed

$sourceToTargetKeyColumns

READ-ONLY: Maps the source foreign/primary key columns to the target primary/foreign key columns. +

mixed

$targetToSourceKeyColumns

READ-ONLY: Maps the target primary/foreign key columns to the source foreign/primary key columns. +

+ + + +
Fields inherited from Doctrine\ORM\Mapping\AssociationMapping
FETCH_EAGER, FETCH_LAZY, declared, fetchMode, inherited, inversedBy, isCascadeDetach, isCascadeMerge, isCascadePersist, isCascadeRefresh, isCascadeRemove, isOwningSide, joinTable, mappedBy, sourceEntityName, sourceFieldName, targetEntityName
+ + + + + + + + + + + +
Method Summary
boolean

isOneToOne()

{@inheritdoc}

void

load(object sourceEntity, object targetEntity, EntityManager em, array joinColumnValues, object target)

{@inheritdoc}

+ + + +
Methods inherited from Doctrine\ORM\Mapping\AssociationMapping
getQuotedJoinTableName, hasCascades, isEagerlyFetched, isLazilyFetched, isManyToMany, isOneToMany, isOneToOne, load, usesJoinTable
+ +

Field Detail

+
/Doctrine/ORM/Mapping/OneToOneMapping.php at line 79
+

joinColumnFieldNames

+public array $joinColumnFieldNames = array() +
+

READ-ONLY: A map of join column names to field names that are used in cases +when the join columns are fetched as part of the query result.

+ +
+ +
/Doctrine/ORM/Mapping/OneToOneMapping.php at line 71
+

joinColumns

+public array $joinColumns = array() +
+

READ-ONLY: The join column definitions. Only present on the owning side.

+ +
+ +
/Doctrine/ORM/Mapping/OneToOneMapping.php at line 64
+

orphanRemoval

+public boolean $orphanRemoval = false +
+

READ-ONLY: Whether to delete orphaned elements (when nulled out, i.e. $foo->other = null)

+ +
+ +
/Doctrine/ORM/Mapping/OneToOneMapping.php at line 50
+

sourceToTargetKeyColumns

+public mixed $sourceToTargetKeyColumns = array() +
+

READ-ONLY: Maps the source foreign/primary key columns to the target primary/foreign key columns. +i.e. source.id (pk) => target.user_id (fk). +Reverse mapping of _targetToSourceKeyColumns.

+ +
+ +
/Doctrine/ORM/Mapping/OneToOneMapping.php at line 57
+

targetToSourceKeyColumns

+public mixed $targetToSourceKeyColumns = array() +
+

READ-ONLY: Maps the target primary/foreign key columns to the source foreign/primary key columns. +i.e. target.user_id (fk) => source.id (pk). +Reverse mapping of _sourceToTargetKeyColumns.

+ +
+ +

Method Detail

+
/Doctrine/ORM/Mapping/OneToOneMapping.php at line 126
+

isOneToOne

+public boolean isOneToOne() +
+

+
Override.
+
+
+ +
+ +
/Doctrine/ORM/Mapping/OneToOneMapping.php at line 139
+

load

+public void load(object sourceEntity, object targetEntity, EntityManager em, array joinColumnValues, object target) +
+

+
Parameters:
+
sourceEntity - the entity source of this association
+
targetEntity - the entity to load data in
+
+
joinColumnValues - Values of the join columns of $sourceEntity.
+
+
+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/orm/mapping/orderby.html b/lib/api/doctrine/orm/mapping/orderby.html new file mode 100644 index 000000000..1844b8cc8 --- /dev/null +++ b/lib/api/doctrine/orm/mapping/orderby.html @@ -0,0 +1,101 @@ + + + + + + + + + + + +OrderBy (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +
Doctrine\ORM\Mapping\OrderBy
+
/Doctrine/ORM/Mapping/Driver/DoctrineAnnotations.php at line 126
+ +

Class OrderBy

+ +
Class:OrderBy - Superclass: Annotation
+Annotation
⌊ OrderBy
+ +
+ +

public final class OrderBy
extends Annotation + +

+ +

Annotations class

+ +
+
License:
+
http://www.opensource.org/licenses/lgpl-license.php LGPL
+
See Also:
+
www.doctrine-project.org
+
Since:
+
2.0
+
Version:
+
$Revision: 3938 $
+
Author:
+
Guilherme Blanco
+
Jonathan Wage
+
Roman Borschel
+
+
+ + + +
Fields inherited from Doctrine\Common\Annotations\Annotation
value
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/orm/mapping/package-frame.html b/lib/api/doctrine/orm/mapping/package-frame.html new file mode 100644 index 000000000..23f8a7727 --- /dev/null +++ b/lib/api/doctrine/orm/mapping/package-frame.html @@ -0,0 +1,64 @@ + + + + + + + + + + + +Doctrine\ORM\Mapping (Doctrine) + + + + +

Doctrine\ORM\Mapping

+ +

Classes

+ + + + + \ No newline at end of file diff --git a/lib/api/doctrine/orm/mapping/package-functions.html b/lib/api/doctrine/orm/mapping/package-functions.html new file mode 100644 index 000000000..6fed08ae0 --- /dev/null +++ b/lib/api/doctrine/orm/mapping/package-functions.html @@ -0,0 +1,69 @@ + + + + + + + + + + + +Functions (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +

Functions

+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/orm/mapping/package-globals.html b/lib/api/doctrine/orm/mapping/package-globals.html new file mode 100644 index 000000000..4821c732e --- /dev/null +++ b/lib/api/doctrine/orm/mapping/package-globals.html @@ -0,0 +1,69 @@ + + + + + + + + + + + +Globals (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +

Globals

+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/orm/mapping/package-summary.html b/lib/api/doctrine/orm/mapping/package-summary.html new file mode 100644 index 000000000..bfe18394f --- /dev/null +++ b/lib/api/doctrine/orm/mapping/package-summary.html @@ -0,0 +1,114 @@ + + + + + + + + + + + +Doctrine\ORM\Mapping (Doctrine) + + + + +
+

Doctrine

+ +
+ + +
+ +

Namespace Doctrine\ORM\Mapping

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Class Summary
AssociationMappingBase class for association mappings. +
ChangeTrackingPolicyAnnotations class
ClassMetadataA ClassMetadata instance holds all the object-relational mapping metadata +of an entity and it's associations. +
ClassMetadataFactoryThe ClassMetadataFactory is used to create ClassMetadata objects that contain all the +metadata mapping informations of a class which describes how a class should be mapped +to a relational database.
ClassMetadataInfoA ClassMetadata instance holds all the object-relational mapping metadata +of an entity and it's associations. +
ColumnAnnotations class
DiscriminatorColumnAnnotations class
DiscriminatorMapAnnotations class
ElementCollectionAnnotations class
EntityAnnotations class
GeneratedValueAnnotations class
HasLifecycleCallbacksAnnotations class
IdAnnotations class
IndexAnnotations class
InheritanceTypeAnnotations class
JoinColumnAnnotations class
JoinColumnsAnnotations class
JoinTableAnnotations class
ManyToManyAnnotations class
ManyToManyMappingA many-to-many mapping describes the mapping between two collections of +entities. +
ManyToOneAnnotations class
MappedSuperclassAnnotations class
MappingExceptionA MappingException indicates that something is wrong with the mapping setup.
OneToManyAnnotations class
OneToManyMappingRepresents a one-to-many mapping. +
OneToOneAnnotations class
OneToOneMappingA one-to-one mapping describes a uni-directional mapping from one entity +to another entity. +
OrderByAnnotations class
PostLoadAnnotations class
PostPersistAnnotations class
PostRemoveAnnotations class
PostUpdateAnnotations class
PrePersistAnnotations class
PreRemoveAnnotations class
PreUpdateAnnotations class
SequenceGeneratorAnnotations class
TableAnnotations class
UniqueConstraintAnnotations class
VersionAnnotations class
+ +
+ +
+

Doctrine

+ +
+ + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/orm/mapping/package-tree.html b/lib/api/doctrine/orm/mapping/package-tree.html new file mode 100644 index 000000000..b99e95b6a --- /dev/null +++ b/lib/api/doctrine/orm/mapping/package-tree.html @@ -0,0 +1,100 @@ + + + + + + + + + + + +Doctrine\ORM\Mapping (Doctrine) + + + + +
+

Doctrine

+ +
+ + +

Class Hierarchy for Package Doctrine\ORM\Mapping

+
+

Doctrine

+ +
+ + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/orm/mapping/postload.html b/lib/api/doctrine/orm/mapping/postload.html new file mode 100644 index 000000000..938eab40e --- /dev/null +++ b/lib/api/doctrine/orm/mapping/postload.html @@ -0,0 +1,101 @@ + + + + + + + + + + + +PostLoad (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +
Doctrine\ORM\Mapping\PostLoad
+
/Doctrine/ORM/Mapping/Driver/DoctrineAnnotations.php at line 136
+ +

Class PostLoad

+ +
Class:PostLoad - Superclass: Annotation
+Annotation
⌊ PostLoad
+ +
+ +

public final class PostLoad
extends Annotation + +

+ +

Annotations class

+ +
+
License:
+
http://www.opensource.org/licenses/lgpl-license.php LGPL
+
See Also:
+
www.doctrine-project.org
+
Since:
+
2.0
+
Version:
+
$Revision: 3938 $
+
Author:
+
Guilherme Blanco
+
Jonathan Wage
+
Roman Borschel
+
+
+ + + +
Fields inherited from Doctrine\Common\Annotations\Annotation
value
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/orm/mapping/postpersist.html b/lib/api/doctrine/orm/mapping/postpersist.html new file mode 100644 index 000000000..b4c96adb6 --- /dev/null +++ b/lib/api/doctrine/orm/mapping/postpersist.html @@ -0,0 +1,101 @@ + + + + + + + + + + + +PostPersist (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +
Doctrine\ORM\Mapping\PostPersist
+
/Doctrine/ORM/Mapping/Driver/DoctrineAnnotations.php at line 131
+ +

Class PostPersist

+ +
Class:PostPersist - Superclass: Annotation
+Annotation
⌊ PostPersist
+ +
+ +

public final class PostPersist
extends Annotation + +

+ +

Annotations class

+ +
+
License:
+
http://www.opensource.org/licenses/lgpl-license.php LGPL
+
See Also:
+
www.doctrine-project.org
+
Since:
+
2.0
+
Version:
+
$Revision: 3938 $
+
Author:
+
Guilherme Blanco
+
Jonathan Wage
+
Roman Borschel
+
+
+ + + +
Fields inherited from Doctrine\Common\Annotations\Annotation
value
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/orm/mapping/postremove.html b/lib/api/doctrine/orm/mapping/postremove.html new file mode 100644 index 000000000..70363d044 --- /dev/null +++ b/lib/api/doctrine/orm/mapping/postremove.html @@ -0,0 +1,101 @@ + + + + + + + + + + + +PostRemove (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +
Doctrine\ORM\Mapping\PostRemove
+
/Doctrine/ORM/Mapping/Driver/DoctrineAnnotations.php at line 135
+ +

Class PostRemove

+ +
Class:PostRemove - Superclass: Annotation
+Annotation
⌊ PostRemove
+ +
+ +

public final class PostRemove
extends Annotation + +

+ +

Annotations class

+ +
+
License:
+
http://www.opensource.org/licenses/lgpl-license.php LGPL
+
See Also:
+
www.doctrine-project.org
+
Since:
+
2.0
+
Version:
+
$Revision: 3938 $
+
Author:
+
Guilherme Blanco
+
Jonathan Wage
+
Roman Borschel
+
+
+ + + +
Fields inherited from Doctrine\Common\Annotations\Annotation
value
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/orm/mapping/postupdate.html b/lib/api/doctrine/orm/mapping/postupdate.html new file mode 100644 index 000000000..d0e13fee4 --- /dev/null +++ b/lib/api/doctrine/orm/mapping/postupdate.html @@ -0,0 +1,101 @@ + + + + + + + + + + + +PostUpdate (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +
Doctrine\ORM\Mapping\PostUpdate
+
/Doctrine/ORM/Mapping/Driver/DoctrineAnnotations.php at line 133
+ +

Class PostUpdate

+ +
Class:PostUpdate - Superclass: Annotation
+Annotation
⌊ PostUpdate
+ +
+ +

public final class PostUpdate
extends Annotation + +

+ +

Annotations class

+ +
+
License:
+
http://www.opensource.org/licenses/lgpl-license.php LGPL
+
See Also:
+
www.doctrine-project.org
+
Since:
+
2.0
+
Version:
+
$Revision: 3938 $
+
Author:
+
Guilherme Blanco
+
Jonathan Wage
+
Roman Borschel
+
+
+ + + +
Fields inherited from Doctrine\Common\Annotations\Annotation
value
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/orm/mapping/prepersist.html b/lib/api/doctrine/orm/mapping/prepersist.html new file mode 100644 index 000000000..a50d0d43c --- /dev/null +++ b/lib/api/doctrine/orm/mapping/prepersist.html @@ -0,0 +1,101 @@ + + + + + + + + + + + +PrePersist (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +
Doctrine\ORM\Mapping\PrePersist
+
/Doctrine/ORM/Mapping/Driver/DoctrineAnnotations.php at line 130
+ +

Class PrePersist

+ +
Class:PrePersist - Superclass: Annotation
+Annotation
⌊ PrePersist
+ +
+ +

public final class PrePersist
extends Annotation + +

+ +

Annotations class

+ +
+
License:
+
http://www.opensource.org/licenses/lgpl-license.php LGPL
+
See Also:
+
www.doctrine-project.org
+
Since:
+
2.0
+
Version:
+
$Revision: 3938 $
+
Author:
+
Guilherme Blanco
+
Jonathan Wage
+
Roman Borschel
+
+
+ + + +
Fields inherited from Doctrine\Common\Annotations\Annotation
value
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/orm/mapping/preremove.html b/lib/api/doctrine/orm/mapping/preremove.html new file mode 100644 index 000000000..2b9ae0330 --- /dev/null +++ b/lib/api/doctrine/orm/mapping/preremove.html @@ -0,0 +1,101 @@ + + + + + + + + + + + +PreRemove (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +
Doctrine\ORM\Mapping\PreRemove
+
/Doctrine/ORM/Mapping/Driver/DoctrineAnnotations.php at line 134
+ +

Class PreRemove

+ +
Class:PreRemove - Superclass: Annotation
+Annotation
⌊ PreRemove
+ +
+ +

public final class PreRemove
extends Annotation + +

+ +

Annotations class

+ +
+
License:
+
http://www.opensource.org/licenses/lgpl-license.php LGPL
+
See Also:
+
www.doctrine-project.org
+
Since:
+
2.0
+
Version:
+
$Revision: 3938 $
+
Author:
+
Guilherme Blanco
+
Jonathan Wage
+
Roman Borschel
+
+
+ + + +
Fields inherited from Doctrine\Common\Annotations\Annotation
value
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/orm/mapping/preupdate.html b/lib/api/doctrine/orm/mapping/preupdate.html new file mode 100644 index 000000000..6d1cdf223 --- /dev/null +++ b/lib/api/doctrine/orm/mapping/preupdate.html @@ -0,0 +1,101 @@ + + + + + + + + + + + +PreUpdate (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +
Doctrine\ORM\Mapping\PreUpdate
+
/Doctrine/ORM/Mapping/Driver/DoctrineAnnotations.php at line 132
+ +

Class PreUpdate

+ +
Class:PreUpdate - Superclass: Annotation
+Annotation
⌊ PreUpdate
+ +
+ +

public final class PreUpdate
extends Annotation + +

+ +

Annotations class

+ +
+
License:
+
http://www.opensource.org/licenses/lgpl-license.php LGPL
+
See Also:
+
www.doctrine-project.org
+
Since:
+
2.0
+
Version:
+
$Revision: 3938 $
+
Author:
+
Guilherme Blanco
+
Jonathan Wage
+
Roman Borschel
+
+
+ + + +
Fields inherited from Doctrine\Common\Annotations\Annotation
value
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/orm/mapping/sequencegenerator.html b/lib/api/doctrine/orm/mapping/sequencegenerator.html new file mode 100644 index 000000000..d11b3f453 --- /dev/null +++ b/lib/api/doctrine/orm/mapping/sequencegenerator.html @@ -0,0 +1,142 @@ + + + + + + + + + + + +SequenceGenerator (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +
Doctrine\ORM\Mapping\SequenceGenerator
+
/Doctrine/ORM/Mapping/Driver/DoctrineAnnotations.php at line 120
+ +

Class SequenceGenerator

+ +
Class:SequenceGenerator - Superclass: Annotation
+Annotation
⌊ SequenceGenerator
+ +
+ +

public final class SequenceGenerator
extends Annotation + +

+ +

Annotations class

+ +
+
License:
+
http://www.opensource.org/licenses/lgpl-license.php LGPL
+
See Also:
+
www.doctrine-project.org
+
Since:
+
2.0
+
Version:
+
$Revision: 3938 $
+
Author:
+
Guilherme Blanco
+
Jonathan Wage
+
Roman Borschel
+
+
+ + + + + + + + + + + + + + + +
Field Summary
mixed

$allocationSize

mixed

$initialValue

mixed

$sequenceName

+ + + +
Fields inherited from Doctrine\Common\Annotations\Annotation
value
+ +

Field Detail

+
/Doctrine/ORM/Mapping/Driver/DoctrineAnnotations.php at line 122
+

allocationSize

+public mixed $allocationSize = 10 +
+
+ +
+ +
/Doctrine/ORM/Mapping/Driver/DoctrineAnnotations.php at line 123
+

initialValue

+public mixed $initialValue = 1 +
+
+ +
+ +
/Doctrine/ORM/Mapping/Driver/DoctrineAnnotations.php at line 121
+

sequenceName

+public mixed $sequenceName +
+
+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/orm/mapping/table.html b/lib/api/doctrine/orm/mapping/table.html new file mode 100644 index 000000000..885288f99 --- /dev/null +++ b/lib/api/doctrine/orm/mapping/table.html @@ -0,0 +1,154 @@ + + + + + + + + + + + +Table (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +
Doctrine\ORM\Mapping\Table
+
/Doctrine/ORM/Mapping/Driver/DoctrineAnnotations.php at line 100
+ +

Class Table

+ +
Class:Table - Superclass: Annotation
+Annotation
⌊ Table
+ +
+ +

public final class Table
extends Annotation + +

+ +

Annotations class

+ +
+
License:
+
http://www.opensource.org/licenses/lgpl-license.php LGPL
+
See Also:
+
www.doctrine-project.org
+
Since:
+
2.0
+
Version:
+
$Revision: 3938 $
+
Author:
+
Guilherme Blanco
+
Jonathan Wage
+
Roman Borschel
+
+
+ + + + + + + + + + + + + + + + + + + +
Field Summary
mixed

$indexes

mixed

$name

mixed

$schema

mixed

$uniqueConstraints

+ + + +
Fields inherited from Doctrine\Common\Annotations\Annotation
value
+ +

Field Detail

+
/Doctrine/ORM/Mapping/Driver/DoctrineAnnotations.php at line 103
+

indexes

+public mixed $indexes +
+
+ +
+ +
/Doctrine/ORM/Mapping/Driver/DoctrineAnnotations.php at line 101
+

name

+public mixed $name +
+
+ +
+ +
/Doctrine/ORM/Mapping/Driver/DoctrineAnnotations.php at line 102
+

schema

+public mixed $schema +
+
+ +
+ +
/Doctrine/ORM/Mapping/Driver/DoctrineAnnotations.php at line 104
+

uniqueConstraints

+public mixed $uniqueConstraints +
+
+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/orm/mapping/uniqueconstraint.html b/lib/api/doctrine/orm/mapping/uniqueconstraint.html new file mode 100644 index 000000000..f192771a4 --- /dev/null +++ b/lib/api/doctrine/orm/mapping/uniqueconstraint.html @@ -0,0 +1,130 @@ + + + + + + + + + + + +UniqueConstraint (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +
Doctrine\ORM\Mapping\UniqueConstraint
+
/Doctrine/ORM/Mapping/Driver/DoctrineAnnotations.php at line 106
+ +

Class UniqueConstraint

+ +
Class:UniqueConstraint - Superclass: Annotation
+Annotation
⌊ UniqueConstraint
+ +
+ +

public final class UniqueConstraint
extends Annotation + +

+ +

Annotations class

+ +
+
License:
+
http://www.opensource.org/licenses/lgpl-license.php LGPL
+
See Also:
+
www.doctrine-project.org
+
Since:
+
2.0
+
Version:
+
$Revision: 3938 $
+
Author:
+
Guilherme Blanco
+
Jonathan Wage
+
Roman Borschel
+
+
+ + + + + + + + + + + +
Field Summary
mixed

$columns

mixed

$name

+ + + +
Fields inherited from Doctrine\Common\Annotations\Annotation
value
+ +

Field Detail

+
/Doctrine/ORM/Mapping/Driver/DoctrineAnnotations.php at line 108
+

columns

+public mixed $columns +
+
+ +
+ +
/Doctrine/ORM/Mapping/Driver/DoctrineAnnotations.php at line 107
+

name

+public mixed $name +
+
+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/orm/mapping/version.html b/lib/api/doctrine/orm/mapping/version.html new file mode 100644 index 000000000..61a8123f7 --- /dev/null +++ b/lib/api/doctrine/orm/mapping/version.html @@ -0,0 +1,101 @@ + + + + + + + + + + + +Version (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +
Doctrine\ORM\Mapping\Version
+
/Doctrine/ORM/Mapping/Driver/DoctrineAnnotations.php at line 44
+ +

Class Version

+ +
Class:Version - Superclass: Annotation
+Annotation
⌊ Version
+ +
+ +

public final class Version
extends Annotation + +

+ +

Annotations class

+ +
+
License:
+
http://www.opensource.org/licenses/lgpl-license.php LGPL
+
See Also:
+
www.doctrine-project.org
+
Since:
+
2.0
+
Version:
+
$Revision: 3938 $
+
Author:
+
Guilherme Blanco
+
Jonathan Wage
+
Roman Borschel
+
+
+ + + +
Fields inherited from Doctrine\Common\Annotations\Annotation
value
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/orm/nativequery.html b/lib/api/doctrine/orm/nativequery.html new file mode 100644 index 000000000..1f7387e06 --- /dev/null +++ b/lib/api/doctrine/orm/nativequery.html @@ -0,0 +1,141 @@ + + + + + + + + + + + +NativeQuery (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +
Doctrine\ORM\NativeQuery
+
/Doctrine/ORM/NativeQuery.php at line 28
+ +

Class NativeQuery

+ +
Class:NativeQuery - Superclass: AbstractQuery
+AbstractQuery
⌊ NativeQuery
+ +
+ +

public final class NativeQuery
extends AbstractQuery + +

+ +

Represents a native SQL query.

+ +
+
Author:
+
Roman Borschel
+
Since:
+
2.0
+
License:
+
http://www.opensource.org/licenses/lgpl-license.php LGPL
+
See Also:
+
www.doctrine-project.org
+
Version:
+
$Revision$
+
+
+ + + +
Fields inherited from Doctrine\ORM\AbstractQuery
HYDRATE_ARRAY, HYDRATE_OBJECT, HYDRATE_SCALAR, HYDRATE_SINGLE_SCALAR, _em, _expireResultCache, _hints, _hydrationMode, _paramTypes, _params, _resultCacheDriver, _resultCacheId, _resultCacheTTL, _resultSetMapping, _useResultCache
+ + + + + + + + + + + +
Method Summary
mixed

getSQL()

Gets the SQL query.

NativeQuery

setSQL(string sql)

Sets the SQL of the query.

+ + + +
Methods inherited from Doctrine\ORM\AbstractQuery
execute, expireResultCache, free, getArrayResult, getEntityManager, getExpireResultCache, getHint, getHydrationMode, getParameter, getParameters, getResult, getResultCacheDriver, getResultCacheLifetime, getSQL, getScalarResult, getSingleResult, getSingleScalarResult, iterate, setHint, setHydrationMode, setParameter, setParameters, setResultCacheDriver, setResultCacheId, setResultCacheLifetime, setResultSetMapping, useResultCache
+ +

Method Detail

+
/Doctrine/ORM/NativeQuery.php at line 50
+

getSQL

+public mixed getSQL() +
+

Gets the SQL query.

+
Returns:
+
The built SQL query or an array of all SQL queries.
+
Override.
+
+
+ +
+ +
/Doctrine/ORM/NativeQuery.php at line 38
+

setSQL

+public NativeQuery setSQL(string sql) +
+

Sets the SQL of the query.

+
Returns:
+
This query instance.
+
+
+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/orm/nonuniqueresultexception.html b/lib/api/doctrine/orm/nonuniqueresultexception.html new file mode 100644 index 000000000..d9fccbd8c --- /dev/null +++ b/lib/api/doctrine/orm/nonuniqueresultexception.html @@ -0,0 +1,94 @@ + + + + + + + + + + + +NonUniqueResultException (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +
Doctrine\ORM\NonUniqueResultException
+
/Doctrine/ORM/NonUniqueResultException.php at line 11
+ +

Class NonUniqueResultException

+ +
Class:NonUniqueResultException - Superclass: ORMException
+Class:ORMException - Superclass: Exception
+Exception
⌊ ORMException
⌊ NonUniqueResultException
+ +
+ +

public class NonUniqueResultException
extends ORMException + +

+ +

Exception thrown when an ORM query unexpectedly returns more than one result.

+ +
+
Author:
+
robo
+
Since:
+
2.0
+
+
+ + + +
Methods inherited from Doctrine\ORM\ORMException
detachedEntityCannotBeRemoved, entityManagerClosed, entityMissingAssignedId, findByRequiresParameter, invalidEntityState, invalidFindByCall, invalidFlushMode, invalidHydrationMode, invalidResultCacheDriver, metadataCacheNotConfigured, mismatchedEventManager, missingMappingDriverImpl, notSupported, proxyClassesAlwaysRegenerating, queryCacheNotConfigured, removedEntityInCollectionDetected, unknownEntityNamespace, unrecognizedField
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/orm/noresultexception.html b/lib/api/doctrine/orm/noresultexception.html new file mode 100644 index 000000000..88e73a440 --- /dev/null +++ b/lib/api/doctrine/orm/noresultexception.html @@ -0,0 +1,110 @@ + + + + + + + + + + + +NoResultException (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +
Doctrine\ORM\NoResultException
+
/Doctrine/ORM/NoResultException.php at line 11
+ +

Class NoResultException

+ +
Class:NoResultException - Superclass: ORMException
+Class:ORMException - Superclass: Exception
+Exception
⌊ ORMException
⌊ NoResultException
+ +
+ +

public class NoResultException
extends ORMException + +

+ +

Exception thrown when an ORM query unexpectedly does not return any results.

+ +
+
Author:
+
robo
+
Since:
+
2.0
+
+
+ + + + + + +
Constructor Summary

NoResultException()

+ + + +
Methods inherited from Doctrine\ORM\ORMException
detachedEntityCannotBeRemoved, entityManagerClosed, entityMissingAssignedId, findByRequiresParameter, invalidEntityState, invalidFindByCall, invalidFlushMode, invalidHydrationMode, invalidResultCacheDriver, metadataCacheNotConfigured, mismatchedEventManager, missingMappingDriverImpl, notSupported, proxyClassesAlwaysRegenerating, queryCacheNotConfigured, removedEntityInCollectionDetected, unknownEntityNamespace, unrecognizedField
+ +

Constructor Detail

+
/Doctrine/ORM/NoResultException.php at line 13
+

NoResultException

+public NoResultException() +
+
+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/orm/optimisticlockexception.html b/lib/api/doctrine/orm/optimisticlockexception.html new file mode 100644 index 000000000..9694f41e7 --- /dev/null +++ b/lib/api/doctrine/orm/optimisticlockexception.html @@ -0,0 +1,111 @@ + + + + + + + + + + + +OptimisticLockException (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +
Doctrine\ORM\OptimisticLockException
+
/Doctrine/ORM/OptimisticLockException.php at line 30
+ +

Class OptimisticLockException

+ +
Class:OptimisticLockException - Superclass: ORMException
+Class:ORMException - Superclass: Exception
+Exception
⌊ ORMException
⌊ OptimisticLockException
+ +
+ +

public class OptimisticLockException
extends ORMException + +

+ +

OptimisticLockException

+ +
+
Author:
+
Roman Borschel
+
Since:
+
2.0
+
+
+ + + + + + + +
Method Summary
static void

lockFailed()

+ + + +
Methods inherited from Doctrine\ORM\ORMException
detachedEntityCannotBeRemoved, entityManagerClosed, entityMissingAssignedId, findByRequiresParameter, invalidEntityState, invalidFindByCall, invalidFlushMode, invalidHydrationMode, invalidResultCacheDriver, metadataCacheNotConfigured, mismatchedEventManager, missingMappingDriverImpl, notSupported, proxyClassesAlwaysRegenerating, queryCacheNotConfigured, removedEntityInCollectionDetected, unknownEntityNamespace, unrecognizedField
+ +

Method Detail

+
/Doctrine/ORM/OptimisticLockException.php at line 32
+

lockFailed

+public static void lockFailed() +
+
+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/orm/ormexception.html b/lib/api/doctrine/orm/ormexception.html new file mode 100644 index 000000000..cfa163bf4 --- /dev/null +++ b/lib/api/doctrine/orm/ormexception.html @@ -0,0 +1,310 @@ + + + + + + + + + + + +ORMException (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +
Doctrine\ORM\ORMException
+
/Doctrine/ORM/ORMException.php at line 11
+ +

Class ORMException

+ +
Class:ORMException - Superclass: Exception
+Exception
⌊ ORMException
+ +
+ +

public class ORMException
extends Exception + +

+ +

Base exception class for all ORM exceptions.

+ +
+
Author:
+
Roman Borschel
+
Since:
+
2.0
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Method Summary
static void

detachedEntityCannotBeRemoved()

static void

entityManagerClosed()

static void

entityMissingAssignedId(mixed entity)

static void

findByRequiresParameter(mixed methodName)

static void

invalidEntityState(mixed state)

static void

invalidFindByCall(mixed entityName, mixed fieldName, mixed method)

static void

invalidFlushMode(mixed mode)

static void

invalidHydrationMode(mixed mode)

static void

invalidResultCacheDriver()

static void

metadataCacheNotConfigured()

static void

mismatchedEventManager()

static void

missingMappingDriverImpl()

static void

notSupported()

static void

proxyClassesAlwaysRegenerating()

static void

queryCacheNotConfigured()

static void

removedEntityInCollectionDetected(mixed entity, mixed assoc)

static void

unknownEntityNamespace(mixed entityNamespaceAlias)

static void

unrecognizedField(mixed field)

+ +

Method Detail

+
/Doctrine/ORM/ORMException.php at line 41
+

detachedEntityCannotBeRemoved

+public static void detachedEntityCannotBeRemoved() +
+
+ +
+ +
/Doctrine/ORM/ORMException.php at line 51
+

entityManagerClosed

+public static void entityManagerClosed() +
+
+ +
+ +
/Doctrine/ORM/ORMException.php at line 19
+

entityMissingAssignedId

+public static void entityMissingAssignedId(mixed entity) +
+
+ +
+ +
/Doctrine/ORM/ORMException.php at line 66
+

findByRequiresParameter

+public static void findByRequiresParameter(mixed methodName) +
+
+ +
+ +
/Doctrine/ORM/ORMException.php at line 36
+

invalidEntityState

+public static void invalidEntityState(mixed state) +
+
+ +
+ +
/Doctrine/ORM/ORMException.php at line 71
+

invalidFindByCall

+public static void invalidFindByCall(mixed entityName, mixed fieldName, mixed method) +
+
+ +
+ +
/Doctrine/ORM/ORMException.php at line 46
+

invalidFlushMode

+public static void invalidFlushMode(mixed mode) +
+
+ +
+ +
/Doctrine/ORM/ORMException.php at line 56
+

invalidHydrationMode

+public static void invalidHydrationMode(mixed mode) +
+
+ +
+ +
/Doctrine/ORM/ORMException.php at line 79
+

invalidResultCacheDriver

+public static void invalidResultCacheDriver() +
+
+ +
+ +
/Doctrine/ORM/ORMException.php at line 92
+

metadataCacheNotConfigured

+public static void metadataCacheNotConfigured() +
+
+ +
+ +
/Doctrine/ORM/ORMException.php at line 61
+

mismatchedEventManager

+public static void mismatchedEventManager() +
+
+ +
+ +
/Doctrine/ORM/ORMException.php at line 13
+

missingMappingDriverImpl

+public static void missingMappingDriverImpl() +
+
+ +
+ +
/Doctrine/ORM/ORMException.php at line 83
+

notSupported

+public static void notSupported() +
+
+ +
+ +
/Doctrine/ORM/ORMException.php at line 97
+

proxyClassesAlwaysRegenerating

+public static void proxyClassesAlwaysRegenerating() +
+
+ +
+ +
/Doctrine/ORM/ORMException.php at line 87
+

queryCacheNotConfigured

+public static void queryCacheNotConfigured() +
+
+ +
+ +
/Doctrine/ORM/ORMException.php at line 29
+

removedEntityInCollectionDetected

+public static void removedEntityInCollectionDetected(mixed entity, mixed assoc) +
+
+ +
+ +
/Doctrine/ORM/ORMException.php at line 102
+

unknownEntityNamespace

+public static void unknownEntityNamespace(mixed entityNamespaceAlias) +
+
+ +
+ +
/Doctrine/ORM/ORMException.php at line 24
+

unrecognizedField

+public static void unrecognizedField(mixed field) +
+
+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/orm/package-frame.html b/lib/api/doctrine/orm/package-frame.html new file mode 100644 index 000000000..291be6ac6 --- /dev/null +++ b/lib/api/doctrine/orm/package-frame.html @@ -0,0 +1,44 @@ + + + + + + + + + + + +Doctrine\ORM (Doctrine) + + + + +

Doctrine\ORM

+ +

Classes

+ + +

Exceptions

+ + + + + \ No newline at end of file diff --git a/lib/api/doctrine/orm/package-functions.html b/lib/api/doctrine/orm/package-functions.html new file mode 100644 index 000000000..0552ca072 --- /dev/null +++ b/lib/api/doctrine/orm/package-functions.html @@ -0,0 +1,69 @@ + + + + + + + + + + + +Functions (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +

Functions

+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/orm/package-globals.html b/lib/api/doctrine/orm/package-globals.html new file mode 100644 index 000000000..cfd9697a7 --- /dev/null +++ b/lib/api/doctrine/orm/package-globals.html @@ -0,0 +1,69 @@ + + + + + + + + + + + +Globals (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +

Globals

+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/orm/package-summary.html b/lib/api/doctrine/orm/package-summary.html new file mode 100644 index 000000000..792d53636 --- /dev/null +++ b/lib/api/doctrine/orm/package-summary.html @@ -0,0 +1,90 @@ + + + + + + + + + + + +Doctrine\ORM (Doctrine) + + + + +
+

Doctrine

+ +
+ + +
+ +

Namespace Doctrine\ORM

+ + + + + + + + + + + + + + + + + +
Class Summary
AbstractQueryBase contract for ORM queries.
ConfigurationConfiguration container for all configuration options of Doctrine. +
EntityManagerThe EntityManager is the central access point to ORM functionality.
EntityNotFoundExceptionException thrown when a Proxy fails to retrieve an Entity result.
EntityRepositoryAn EntityRepository serves as a repository for entities with generic as well as +business specific methods for retrieving entities. +
EventsContainer for all ORM events. +
NativeQueryRepresents a native SQL query.
NoResultExceptionException thrown when an ORM query unexpectedly does not return any results.
NonUniqueResultExceptionException thrown when an ORM query unexpectedly returns more than one result.
OptimisticLockExceptionOptimisticLockException
PersistentCollectionA PersistentCollection represents a collection of elements that have persistent state. +
QueryA Query object represents a DQL query.
QueryBuilderThis class is responsible for building DQL query strings via an object oriented +PHP interface.
UnitOfWorkThe UnitOfWork is responsible for tracking changes to objects during an +"object-level" transaction and for writing out changes to the database +in the correct order.
+ + + + +
Exception Summary
ORMExceptionBase exception class for all ORM exceptions.
+ +
+ +
+

Doctrine

+ +
+ + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/orm/package-tree.html b/lib/api/doctrine/orm/package-tree.html new file mode 100644 index 000000000..ba30a24b6 --- /dev/null +++ b/lib/api/doctrine/orm/package-tree.html @@ -0,0 +1,66 @@ + + + + + + + + + + + +Doctrine\ORM (Doctrine) + + + + +
+

Doctrine

+ +
+ + +

Class Hierarchy for Package Doctrine\ORM

+
+

Doctrine

+ +
+ + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/orm/persistentcollection.html b/lib/api/doctrine/orm/persistentcollection.html new file mode 100644 index 000000000..609b9471d --- /dev/null +++ b/lib/api/doctrine/orm/persistentcollection.html @@ -0,0 +1,714 @@ + + + + + + + + + + + +PersistentCollection (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +
Doctrine\ORM\PersistentCollection
+
/Doctrine/ORM/PersistentCollection.php at line 44
+ +

Class PersistentCollection

+ +
PersistentCollection
+ +
+
All Implemented Interfaces:
+
Collection +
+ +
+ +

public final class PersistentCollection

+ +

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.

+ +
+
License:
+
http://www.opensource.org/licenses/lgpl-license.php LGPL
+
Since:
+
2.0
+
Version:
+
$Revision: 4930 $
+
Author:
+
Konsta Vesterinen
+
Roman Borschel
+
Giorgio Sironi
+
+
+ + + + + + +
Constructor Summary

PersistentCollection(EntityManager em, ClassMetadata class, mixed coll, array The)

Creates a new persistent collection.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Method Summary
void

add(mixed value)

{@inheritdoc}

void

clear()

{@inheritdoc}

void

contains(mixed element)

{@inheritdoc}

void

containsKey(mixed key)

{@inheritdoc}

void

count()

{@inheritdoc}

void

current()

Gets the element of the collection at the current iterator position.

void

exists(mixed p)

{@inheritdoc}

void

filter(mixed p)

{@inheritdoc}

void

first()

{@inheritdoc}

void

forAll(mixed p)

{@inheritdoc}

void

get(mixed key)

{@inheritdoc}

array

getDeleteDiff()

INTERNAL: +getDeleteDiff

array

getInsertDiff()

INTERNAL: +getInsertDiff

void

getIterator()

{@inheritdoc}

void

getKeys()

{@inheritdoc}

Doctrine\ORM\Mapping\AssociationMapping

getMapping()

INTERNAL: Gets the association mapping of the collection.

object

getOwner()

INTERNAL: +Gets the collection owner.

array

getSnapshot()

INTERNAL: +Returns the last snapshot of the elements in the collection.

void

getTypeClass()

void

getValues()

{@inheritdoc}

void

hydrateAdd(mixed element)

INTERNAL: +Adds an element to a collection during hydration.

void

hydrateSet(mixed key, mixed element)

INTERNAL: +Sets a keyed element in the collection during hydration.

void

indexOf(mixed element)

{@inheritdoc}

boolean

isDirty()

Gets a boolean flag indicating whether this colleciton is dirty which means +its state needs to be synchronized with the database.

void

isEmpty()

{@inheritdoc}

boolean

isInitialized()

Checks whether this collection has been initialized.

void

key()

void

last()

{@inheritdoc}

void

map(mixed func)

{@inheritdoc}

void

next()

Moves the internal iterator position to the next element.

void

offsetExists(mixed offset)

void

offsetGet(mixed offset)

void

offsetSet(mixed offset, mixed value)

void

offsetUnset(mixed offset)

void

partition(mixed p)

{@inheritdoc}

void

remove(mixed key)

{@inheritdoc}

void

removeElement(mixed element)

{@inheritdoc}

void

set(mixed key, mixed value)

{@inheritdoc}

void

setDirty(boolean dirty)

Sets a boolean flag, indicating whether this collection is dirty.

void

setInitialized(boolean bool)

Sets the initialized flag of the collection, forcing it into that state.

void

setOwner(object entity, AssociationMapping assoc)

INTERNAL: +Sets the collection's owning entity together with the AssociationMapping that +describes the association between the owner and the elements of the collection.

void

takeSnapshot()

INTERNAL: +Tells this collection to take a snapshot of its current state.

void

toArray()

{@inheritdoc}

void

unwrap()

Retrieves the wrapped Collection instance.

+ +

Constructor Detail

+
/Doctrine/ORM/PersistentCollection.php at line 118
+

PersistentCollection

+public PersistentCollection(EntityManager em, ClassMetadata class, mixed coll, array The) +
+

Creates a new persistent collection.

+
Parameters:
+
em - The EntityManager the collection will be associated with.
+
class - The class descriptor of the entity type of this collection.
+
The - collection elements.
+
+
+ +
+ +

Method Detail

+
/Doctrine/ORM/PersistentCollection.php at line 491
+

add

+public void add(mixed value) +
+

+ +
+ +
/Doctrine/ORM/PersistentCollection.php at line 564
+

clear

+public void clear() +
+

+ +
+ +
/Doctrine/ORM/PersistentCollection.php at line 401
+

contains

+public void contains(mixed element) +
+

+ +
+ +
/Doctrine/ORM/PersistentCollection.php at line 392
+

containsKey

+public void containsKey(mixed key) +
+

+ +
+ +
/Doctrine/ORM/PersistentCollection.php at line 472
+

count

+public void count() +
+

+ +
+ +
/Doctrine/ORM/PersistentCollection.php at line 634
+

current

+public void current() +
+

Gets the element of the collection at the current iterator position.

+ +
+ +
/Doctrine/ORM/PersistentCollection.php at line 427
+

exists

+public void exists(mixed p) +
+

+ +
+ +
/Doctrine/ORM/PersistentCollection.php at line 528
+

filter

+public void filter(mixed p) +
+

+ +
+ +
/Doctrine/ORM/PersistentCollection.php at line 333
+

first

+public void first() +
+

+ +
+ +
/Doctrine/ORM/PersistentCollection.php at line 537
+

forAll

+public void forAll(mixed p) +
+

+ +
+ +
/Doctrine/ORM/PersistentCollection.php at line 445
+

get

+public void get(mixed key) +
+

+ +
+ +
/Doctrine/ORM/PersistentCollection.php at line 250
+

getDeleteDiff

+public array getDeleteDiff() +
+

INTERNAL: +getDeleteDiff

+ +
+ +
/Doctrine/ORM/PersistentCollection.php at line 262
+

getInsertDiff

+public array getInsertDiff() +
+

INTERNAL: +getInsertDiff

+ +
+ +
/Doctrine/ORM/PersistentCollection.php at line 510
+

getIterator

+public void getIterator() +
+

+ +
+ +
/Doctrine/ORM/PersistentCollection.php at line 454
+

getKeys

+public void getKeys() +
+

+ +
+ +
/Doctrine/ORM/PersistentCollection.php at line 273
+

getMapping

+public Doctrine\ORM\Mapping\AssociationMapping getMapping() +
+

INTERNAL: Gets the association mapping of the collection.

+ +
+ +
/Doctrine/ORM/PersistentCollection.php at line 146
+

getOwner

+public object getOwner() +
+

INTERNAL: +Gets the collection owner.

+ +
+ +
/Doctrine/ORM/PersistentCollection.php at line 239
+

getSnapshot

+public array getSnapshot() +
+

INTERNAL: +Returns the last snapshot of the elements in the collection.

+
Returns:
+
The last snapshot of the elements.
+
+
+ +
+ +
/Doctrine/ORM/PersistentCollection.php at line 151
+

getTypeClass

+public void getTypeClass() +
+
+ +
+ +
/Doctrine/ORM/PersistentCollection.php at line 463
+

getValues

+public void getValues() +
+

+ +
+ +
/Doctrine/ORM/PersistentCollection.php at line 163
+

hydrateAdd

+public void hydrateAdd(mixed element) +
+

INTERNAL: +Adds an element to a collection during hydration. This will automatically +complete bidirectional associations in the case of a one-to-many association.

+
Parameters:
+
element - The element to add.
+
+
+ +
+ +
/Doctrine/ORM/PersistentCollection.php at line 186
+

hydrateSet

+public void hydrateSet(mixed key, mixed element) +
+

INTERNAL: +Sets a keyed element in the collection during hydration.

+
Parameters:
+
key - The key to set. $param mixed $value The element to set.
+
+
+ +
+ +
/Doctrine/ORM/PersistentCollection.php at line 436
+

indexOf

+public void indexOf(mixed element) +
+

+ +
+ +
/Doctrine/ORM/PersistentCollection.php at line 297
+

isDirty

+public boolean isDirty() +
+

Gets a boolean flag indicating whether this colleciton is dirty which means +its state needs to be synchronized with the database.

+
Returns:
+
TRUE if the collection is dirty, FALSE otherwise.
+
+
+ +
+ +
/Doctrine/ORM/PersistentCollection.php at line 501
+

isEmpty

+public void isEmpty() +
+

+ +
+ +
/Doctrine/ORM/PersistentCollection.php at line 327
+

isInitialized

+public boolean isInitialized() +
+

Checks whether this collection has been initialized.

+ +
+ +
/Doctrine/ORM/PersistentCollection.php at line 626
+

key

+public void key() +
+
+ +
+ +
/Doctrine/ORM/PersistentCollection.php at line 340
+

last

+public void last() +
+

+ +
+ +
/Doctrine/ORM/PersistentCollection.php at line 519
+

map

+public void map(mixed func) +
+

+ +
+ +
/Doctrine/ORM/PersistentCollection.php at line 642
+

next

+public void next() +
+

Moves the internal iterator position to the next element.

+ +
+ +
/Doctrine/ORM/PersistentCollection.php at line 593
+

offsetExists

+public void offsetExists(mixed offset) +
+

+
See Also:
+
containsKey()
+
+
+ +
+ +
/Doctrine/ORM/PersistentCollection.php at line 601
+

offsetGet

+public void offsetGet(mixed offset) +
+

+
See Also:
+
get()
+
+
+ +
+ +
/Doctrine/ORM/PersistentCollection.php at line 610
+

offsetSet

+public void offsetSet(mixed offset, mixed value) +
+

+
See Also:
+
add()
+
set()
+
+
+ +
+ +
/Doctrine/ORM/PersistentCollection.php at line 621
+

offsetUnset

+public void offsetUnset(mixed offset) +
+

+
See Also:
+
remove()
+
+
+ +
+ +
/Doctrine/ORM/PersistentCollection.php at line 546
+

partition

+public void partition(mixed p) +
+

+ +
+ +
/Doctrine/ORM/PersistentCollection.php at line 349
+

remove

+public void remove(mixed key) +
+

+ +
+ +
/Doctrine/ORM/PersistentCollection.php at line 371
+

removeElement

+public void removeElement(mixed element) +
+

+ +
+ +
/Doctrine/ORM/PersistentCollection.php at line 481
+

set

+public void set(mixed key, mixed value) +
+

+ +
+ +
/Doctrine/ORM/PersistentCollection.php at line 307
+

setDirty

+public void setDirty(boolean dirty) +
+

Sets a boolean flag, indicating whether this collection is dirty.

+
Parameters:
+
dirty - Whether the collection should be marked dirty or not.
+
+
+ +
+ +
/Doctrine/ORM/PersistentCollection.php at line 317
+

setInitialized

+public void setInitialized(boolean bool) +
+

Sets the initialized flag of the collection, forcing it into that state.

+ +
+ +
/Doctrine/ORM/PersistentCollection.php at line 133
+

setOwner

+public void setOwner(object entity, AssociationMapping assoc) +
+

INTERNAL: +Sets the collection's owning entity together with the AssociationMapping that +describes the association between the owner and the elements of the collection.

+ +
+ +
/Doctrine/ORM/PersistentCollection.php at line 227
+

takeSnapshot

+public void takeSnapshot() +
+

INTERNAL: +Tells this collection to take a snapshot of its current state.

+ +
+ +
/Doctrine/ORM/PersistentCollection.php at line 555
+

toArray

+public void toArray() +
+

+ +
+ +
/Doctrine/ORM/PersistentCollection.php at line 650
+

unwrap

+public void unwrap() +
+

Retrieves the wrapped Collection instance.

+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/orm/persisters/abstractcollectionpersister.html b/lib/api/doctrine/orm/persisters/abstractcollectionpersister.html new file mode 100644 index 000000000..fc8333dc0 --- /dev/null +++ b/lib/api/doctrine/orm/persisters/abstractcollectionpersister.html @@ -0,0 +1,198 @@ + + + + + + + + + + + +AbstractCollectionPersister (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +
Doctrine\ORM\Persisters\AbstractCollectionPersister
+
/Doctrine/ORM/Persisters/AbstractCollectionPersister.php at line 31
+ +

Class AbstractCollectionPersister

+ +
AbstractCollectionPersister
+ +
+ +

public abstract class AbstractCollectionPersister

+ +

Base class for all collection persisters.

+ +
+
Since:
+
2.0
+
Author:
+
Roman Borschel
+
+
+ + + + + + + + + + + + + + + +
Field Summary
protected Doctrine\DBAL\Connection

$_conn

protected EntityManager

$_em

protected Doctrine\ORM\UnitOfWork

$_uow

+ + + + + + +
Constructor Summary

AbstractCollectionPersister(Doctrine\ORM\EntityManager em)

Initializes a new instance of a class derived from AbstractCollectionPersister.

+ + + + + + + + + + + + + + + + + + + +
Method Summary
void

delete(PersistentCollection coll)

Deletes the persistent state represented by the given collection.

void

deleteRows(mixed coll)

void

insertRows(mixed coll)

void

update(PersistentCollection coll)

Updates the given collection, synchronizing it's state with the database +by inserting, updating and deleting individual elements.

+ +

Field Detail

+
/Doctrine/ORM/Persisters/AbstractCollectionPersister.php at line 41
+

_conn

+protected Doctrine\DBAL\Connection $_conn +
+

+ +
+ +
/Doctrine/ORM/Persisters/AbstractCollectionPersister.php at line 36
+

_em

+protected EntityManager $_em +
+

+ +
+ +
/Doctrine/ORM/Persisters/AbstractCollectionPersister.php at line 46
+

_uow

+protected Doctrine\ORM\UnitOfWork $_uow +
+

+ +
+ +

Constructor Detail

+
/Doctrine/ORM/Persisters/AbstractCollectionPersister.php at line 53
+

AbstractCollectionPersister

+public AbstractCollectionPersister(Doctrine\ORM\EntityManager em) +
+

Initializes a new instance of a class derived from AbstractCollectionPersister.

+ +
+ +

Method Detail

+
/Doctrine/ORM/Persisters/AbstractCollectionPersister.php at line 65
+

delete

+public void delete(PersistentCollection coll) +
+

Deletes the persistent state represented by the given collection.

+ +
+ +
/Doctrine/ORM/Persisters/AbstractCollectionPersister.php at line 105
+

deleteRows

+public void deleteRows(mixed coll) +
+
+ +
+ +
/Doctrine/ORM/Persisters/AbstractCollectionPersister.php at line 117
+

insertRows

+public void insertRows(mixed coll) +
+
+ +
+ +
/Doctrine/ORM/Persisters/AbstractCollectionPersister.php at line 95
+

update

+public void update(PersistentCollection coll) +
+

Updates the given collection, synchronizing it's state with the database +by inserting, updating and deleting individual elements.

+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/orm/persisters/abstractentityinheritancepersister.html b/lib/api/doctrine/orm/persisters/abstractentityinheritancepersister.html new file mode 100644 index 000000000..f628ed200 --- /dev/null +++ b/lib/api/doctrine/orm/persisters/abstractentityinheritancepersister.html @@ -0,0 +1,103 @@ + + + + + + + + + + + +AbstractEntityInheritancePersister (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +
Doctrine\ORM\Persisters\AbstractEntityInheritancePersister
+
/Doctrine/ORM/Persisters/AbstractEntityInheritancePersister.php at line 33
+ +

Class AbstractEntityInheritancePersister

+ +
Class:AbstractEntityInheritancePersister - Superclass: StandardEntityPersister
+StandardEntityPersister
⌊ AbstractEntityInheritancePersister
+ +
+ +

public abstract class AbstractEntityInheritancePersister
extends StandardEntityPersister + +

+ +

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.

+ +
+
Author:
+
Roman Borschel
+
Since:
+
2.0
+
License:
+
http://www.opensource.org/licenses/lgpl-license.php LGPL
+
Todo:
+
Rename: BasicEntityPersister
+
+
+ + + +
Fields inherited from Doctrine\ORM\Persisters\StandardEntityPersister
_class, _columnTypes, _conn, _em, _platform, _queuedInserts, _resultColumnNames, _selectColumnListSql, _sqlAliasCounter, _sqlTableAliases
+ + + +
Methods inherited from Doctrine\ORM\Persisters\StandardEntityPersister
addInsert, delete, executeInserts, getClassMetadata, getInsertSQL, getOwningTable, load, loadAll, loadManyToManyCollection, loadOneToManyCollection, refresh, update
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/orm/persisters/elementcollectionpersister.html b/lib/api/doctrine/orm/persisters/elementcollectionpersister.html new file mode 100644 index 000000000..29fb8a3bb --- /dev/null +++ b/lib/api/doctrine/orm/persisters/elementcollectionpersister.html @@ -0,0 +1,99 @@ + + + + + + + + + + + +ElementCollectionPersister (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +
Doctrine\ORM\Persisters\ElementCollectionPersister
+
/Doctrine/ORM/Persisters/ElementCollectionPersister.php at line 30
+ +

Class ElementCollectionPersister

+ +
Class:ElementCollectionPersister - Superclass: AbstractCollectionPersister
+AbstractCollectionPersister
⌊ ElementCollectionPersister
+ +
+ +

public abstract class ElementCollectionPersister
extends AbstractCollectionPersister + +

+ +

Persister for collections of basic elements / value types.

+ +
+
Author:
+
robo
+
Todo:
+
Implementation once support for collections of basic elements (i.e. strings) is added.
+
Since:
+
2.0
+
+
+ + + +
Fields inherited from Doctrine\ORM\Persisters\AbstractCollectionPersister
_conn, _em, _uow
+ + + +
Methods inherited from Doctrine\ORM\Persisters\AbstractCollectionPersister
delete, deleteRows, insertRows, update
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/orm/persisters/joinedsubclasspersister.html b/lib/api/doctrine/orm/persisters/joinedsubclasspersister.html new file mode 100644 index 000000000..f6c11d29e --- /dev/null +++ b/lib/api/doctrine/orm/persisters/joinedsubclasspersister.html @@ -0,0 +1,167 @@ + + + + + + + + + + + +JoinedSubclassPersister (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +
Doctrine\ORM\Persisters\JoinedSubclassPersister
+
/Doctrine/ORM/Persisters/JoinedSubclassPersister.php at line 36
+ +

Class JoinedSubclassPersister

+ +
Class:JoinedSubclassPersister - Superclass: AbstractEntityInheritancePersister
+Class:AbstractEntityInheritancePersister - Superclass: StandardEntityPersister
+StandardEntityPersister
⌊ AbstractEntityInheritancePersister
⌊ JoinedSubclassPersister
+ +
+ +

public class JoinedSubclassPersister
extends AbstractEntityInheritancePersister + +

+ +

The joined subclass persister maps a single entity instance to several tables in the +database as it is defined by the Class Table Inheritance strategy.

+ +
+
Author:
+
Roman Borschel
+
License:
+
http://www.opensource.org/licenses/lgpl-license.php LGPL
+
See Also:
+
www.doctrine-project.org
+
Since:
+
2.0
+
See Also:
+
http://martinfowler.com/eaaCatalog/classTableInheritance.html
+
Todo:
+
Rename: BasicEntityPersister
+
+
+ + + + + + + + + + + + + + + + + + + +
Method Summary
void

delete(object entity)

{@inheritdoc}

array

executeInserts()

{@inheritdoc}

string

getOwningTable(string fieldName)

Gets the name of the table that owns the column the given field is mapped to.

void

update(object entity)

{@inheritdoc}

+ +

Method Detail

+
/Doctrine/ORM/Persisters/JoinedSubclassPersister.php at line 210
+

delete

+public void delete(object entity) +
+

+
Parameters:
+
entity - The entity to delete.
+
+
+ +
+ +
/Doctrine/ORM/Persisters/JoinedSubclassPersister.php at line 100
+

executeInserts

+public array executeInserts() +
+

+
Returns:
+
An array of any generated post-insert IDs. This will be an empty array if the entity class does not use the IDENTITY generation strategy.
+
+
+ +
+ +
/Doctrine/ORM/Persisters/JoinedSubclassPersister.php at line 78
+

getOwningTable

+public string getOwningTable(string fieldName) +
+

Gets the name of the table that owns the column the given field is mapped to.

+
Override.
+
+
+ +
+ +
/Doctrine/ORM/Persisters/JoinedSubclassPersister.php at line 187
+

update

+public void update(object entity) +
+

+
Parameters:
+
entity - The entity to update.
+
+
+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/orm/persisters/manytomanypersister.html b/lib/api/doctrine/orm/persisters/manytomanypersister.html new file mode 100644 index 000000000..7c3d6da67 --- /dev/null +++ b/lib/api/doctrine/orm/persisters/manytomanypersister.html @@ -0,0 +1,97 @@ + + + + + + + + + + + +ManyToManyPersister (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +
Doctrine\ORM\Persisters\ManyToManyPersister
+
/Doctrine/ORM/Persisters/ManyToManyPersister.php at line 32
+ +

Class ManyToManyPersister

+ +
Class:ManyToManyPersister - Superclass: AbstractCollectionPersister
+AbstractCollectionPersister
⌊ ManyToManyPersister
+ +
+ +

public class ManyToManyPersister
extends AbstractCollectionPersister + +

+ +

Persister for many-to-many collections.

+ +
+
Author:
+
Roman Borschel
+
Since:
+
2.0
+
+
+ + + +
Fields inherited from Doctrine\ORM\Persisters\AbstractCollectionPersister
_conn, _em, _uow
+ + + +
Methods inherited from Doctrine\ORM\Persisters\AbstractCollectionPersister
delete, deleteRows, insertRows, update
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/orm/persisters/onetomanypersister.html b/lib/api/doctrine/orm/persisters/onetomanypersister.html new file mode 100644 index 000000000..7d8c9b648 --- /dev/null +++ b/lib/api/doctrine/orm/persisters/onetomanypersister.html @@ -0,0 +1,101 @@ + + + + + + + + + + + +OneToManyPersister (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +
Doctrine\ORM\Persisters\OneToManyPersister
+
/Doctrine/ORM/Persisters/OneToManyPersister.php at line 37
+ +

Class OneToManyPersister

+ +
Class:OneToManyPersister - Superclass: AbstractCollectionPersister
+AbstractCollectionPersister
⌊ OneToManyPersister
+ +
+ +

public class OneToManyPersister
extends AbstractCollectionPersister + +

+ +

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.

+ +
+
Since:
+
2.0
+
Author:
+
Roman Borschel
+
Todo:
+
Remove
+
+
+ + + +
Fields inherited from Doctrine\ORM\Persisters\AbstractCollectionPersister
_conn, _em, _uow
+ + + +
Methods inherited from Doctrine\ORM\Persisters\AbstractCollectionPersister
delete, deleteRows, insertRows, update
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/orm/persisters/package-frame.html b/lib/api/doctrine/orm/persisters/package-frame.html new file mode 100644 index 000000000..b4a584f48 --- /dev/null +++ b/lib/api/doctrine/orm/persisters/package-frame.html @@ -0,0 +1,34 @@ + + + + + + + + + + + +Doctrine\ORM\Persisters (Doctrine) + + + + +

Doctrine\ORM\Persisters

+ +

Classes

+ + + + + \ No newline at end of file diff --git a/lib/api/doctrine/orm/persisters/package-functions.html b/lib/api/doctrine/orm/persisters/package-functions.html new file mode 100644 index 000000000..3ad316cb0 --- /dev/null +++ b/lib/api/doctrine/orm/persisters/package-functions.html @@ -0,0 +1,69 @@ + + + + + + + + + + + +Functions (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +

Functions

+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/orm/persisters/package-globals.html b/lib/api/doctrine/orm/persisters/package-globals.html new file mode 100644 index 000000000..b1442b18a --- /dev/null +++ b/lib/api/doctrine/orm/persisters/package-globals.html @@ -0,0 +1,69 @@ + + + + + + + + + + + +Globals (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +

Globals

+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/orm/persisters/package-summary.html b/lib/api/doctrine/orm/persisters/package-summary.html new file mode 100644 index 000000000..1a222edcf --- /dev/null +++ b/lib/api/doctrine/orm/persisters/package-summary.html @@ -0,0 +1,78 @@ + + + + + + + + + + + +Doctrine\ORM\Persisters (Doctrine) + + + + +
+

Doctrine

+ +
+ + +
+ +

Namespace Doctrine\ORM\Persisters

+ + + + + + + + + + + + +
Class Summary
AbstractCollectionPersisterBase class for all collection persisters.
AbstractEntityInheritancePersisterBase class for entity persisters that implement a certain inheritance mapping strategy. +
ElementCollectionPersisterPersister for collections of basic elements / value types.
JoinedSubclassPersisterThe joined subclass persister maps a single entity instance to several tables in the +database as it is defined by the Class Table Inheritance strategy.
ManyToManyPersisterPersister for many-to-many collections.
OneToManyPersisterPersister for one-to-many collections. +
SingleTablePersisterPersister for entities that participate in a hierarchy mapped with the +SINGLE_TABLE strategy.
StandardEntityPersisterA basic entity persister that maps an entity with no (mapped) inheritance to a single table +in the relational database.
UnionSubclassPersisterA basic entity persister that maps an entity with no (mapped) inheritance to a single table +in the relational database.
+ +
+ +
+

Doctrine

+ +
+ + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/orm/persisters/package-tree.html b/lib/api/doctrine/orm/persisters/package-tree.html new file mode 100644 index 000000000..f5714073f --- /dev/null +++ b/lib/api/doctrine/orm/persisters/package-tree.html @@ -0,0 +1,70 @@ + + + + + + + + + + + +Doctrine\ORM\Persisters (Doctrine) + + + + +
+

Doctrine

+ +
+ + +

Class Hierarchy for Package Doctrine\ORM\Persisters

+
+

Doctrine

+ +
+ + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/orm/persisters/singletablepersister.html b/lib/api/doctrine/orm/persisters/singletablepersister.html new file mode 100644 index 000000000..9d9b828fa --- /dev/null +++ b/lib/api/doctrine/orm/persisters/singletablepersister.html @@ -0,0 +1,97 @@ + + + + + + + + + + + +SingleTablePersister (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +
Doctrine\ORM\Persisters\SingleTablePersister
+
/Doctrine/ORM/Persisters/SingleTablePersister.php at line 33
+ +

Class SingleTablePersister

+ +
Class:SingleTablePersister - Superclass: AbstractEntityInheritancePersister
+Class:AbstractEntityInheritancePersister - Superclass: StandardEntityPersister
+StandardEntityPersister
⌊ AbstractEntityInheritancePersister
⌊ SingleTablePersister
+ +
+ +

public class SingleTablePersister
extends AbstractEntityInheritancePersister + +

+ +

Persister for entities that participate in a hierarchy mapped with the +SINGLE_TABLE strategy.

+ +
+
Author:
+
Roman Borschel
+
License:
+
http://www.opensource.org/licenses/lgpl-license.php LGPL
+
Since:
+
2.0
+
See Also:
+
http://martinfowler.com/eaaCatalog/singleTableInheritance.html
+
Todo:
+
Rename: BasicEntityPersister
+
+
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/orm/persisters/standardentitypersister.html b/lib/api/doctrine/orm/persisters/standardentitypersister.html new file mode 100644 index 000000000..781db0d84 --- /dev/null +++ b/lib/api/doctrine/orm/persisters/standardentitypersister.html @@ -0,0 +1,443 @@ + + + + + + + + + + + +StandardEntityPersister (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +
Doctrine\ORM\Persisters\StandardEntityPersister
+
/Doctrine/ORM/Persisters/StandardEntityPersister.php at line 43
+ +

Class StandardEntityPersister

+ +
StandardEntityPersister
+ +
+ +

public class StandardEntityPersister

+ +

A basic entity persister that maps an entity with no (mapped) inheritance to a single table +in the relational database.

+ +
+
Author:
+
Roman Borschel
+
Giorgio Sironi
+
License:
+
http://www.opensource.org/licenses/lgpl-license.php LGPL
+
Since:
+
2.0
+
Todo:
+
Rename: BasicEntityPersister
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Field Summary
protected Doctrine\ORM\Mapping\ClassMetadata

$_class

Metadata object that describes the mapping of the mapped entity class.

protected array

$_columnTypes

The map of column names to DBAL mapping types of all prepared columns used when INSERTing +or UPDATEing an entity.

protected Doctrine\DBAL\Connection $conn

$_conn

The underlying Connection of the used EntityManager.

protected Doctrine\ORM\EntityManager

$_em

The EntityManager instance.

protected AbstractPlatform

$_platform

The database platform.

protected array

$_queuedInserts

Queued inserts.

protected array

$_resultColumnNames

Case-sensitive mappings of column names as they appear in an SQL result set +to column names as they are defined in the mapping.

protected string

$_selectColumnListSql

The SELECT column list SQL fragment used for querying entities by this persister. +

protected integer

$_sqlAliasCounter

Counter for creating unique SQL table and column aliases.

protected array

$_sqlTableAliases

Map from class names (FQCN) to the corresponding generated SQL table aliases.

+ + + + + + +
Constructor Summary

StandardEntityPersister(Doctrine\ORM\EntityManager em, Doctrine\ORM\Mapping\ClassMetadata class)

Initializes a new StandardEntityPersister that uses the given EntityManager +and persists instances of the class described by the given ClassMetadata descriptor.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Method Summary
void

addInsert(object entity)

Adds an entity to the queued insertions. +

void

delete(object entity)

Deletes an entity.

array

executeInserts()

Executes all queued entity insertions and returns any generated post-insert +identifiers that were created as a result of the insertions. +

Doctrine\ORM\Mapping\ClassMetadata

getClassMetadata()

Gets the ClassMetadata instance of the entity class this persister is used for.

string

getInsertSQL()

Gets the INSERT SQL used by the persister to persist a new entity.

string

getOwningTable(string fieldName)

Gets the name of the table that owns the column the given field is mapped to.

The

load(array criteria, object entity, mixed assoc, array hints, $assoc The)

Loads an entity by a list of field criteria.

array

loadAll(array criteria)

Loads a list of entities by a list of field criteria.

void

loadManyToManyCollection(ManyToManyMapping assoc, array criteria, PersistentCollection coll)

Loads a collection of entities of a many-to-many association.

void

loadOneToManyCollection(OneToManyMapping assoc, array criteria, mixed coll, PersistentCollection The)

Loads a collection of entities in a one-to-many association.

void

refresh(array id, object entity)

Refreshes an entity.

void

update(object entity)

Updates an entity.

+ +

Field Detail

+
/Doctrine/ORM/Persisters/StandardEntityPersister.php at line 50
+

_class

+protected Doctrine\ORM\Mapping\ClassMetadata $_class +
+

Metadata object that describes the mapping of the mapped entity class.

+ +
+ +
/Doctrine/ORM/Persisters/StandardEntityPersister.php at line 97
+

_columnTypes

+protected array $_columnTypes = array() +
+

The map of column names to DBAL mapping types of all prepared columns used when INSERTing +or UPDATEing an entity.

+
See Also:
+
_prepareInsertData($entity)
+
_prepareUpdateData($entity)
+
+
+ +
+ +
/Doctrine/ORM/Persisters/StandardEntityPersister.php at line 57
+

_conn

+protected Doctrine\DBAL\Connection $conn $_conn +
+

The underlying Connection of the used EntityManager.

+ +
+ +
/Doctrine/ORM/Persisters/StandardEntityPersister.php at line 71
+

_em

+protected Doctrine\ORM\EntityManager $_em +
+

The EntityManager instance.

+ +
+ +
/Doctrine/ORM/Persisters/StandardEntityPersister.php at line 64
+

_platform

+protected AbstractPlatform $_platform +
+

The database platform.

+ +
+ +
/Doctrine/ORM/Persisters/StandardEntityPersister.php at line 78
+

_queuedInserts

+protected array $_queuedInserts = array() +
+

Queued inserts.

+ +
+ +
/Doctrine/ORM/Persisters/StandardEntityPersister.php at line 87
+

_resultColumnNames

+protected array $_resultColumnNames = array() +
+

Case-sensitive mappings of column names as they appear in an SQL result set +to column names as they are defined in the mapping. This is necessary because different +RDBMS vendors return column names in result sets in different casings.

+ +
+ +
/Doctrine/ORM/Persisters/StandardEntityPersister.php at line 113
+

_selectColumnListSql

+protected string $_selectColumnListSql +
+

The SELECT column list SQL fragment used for querying entities by this persister. +This SQL fragment is only generated once per request, if at all.

+ +
+ +
/Doctrine/ORM/Persisters/StandardEntityPersister.php at line 120
+

_sqlAliasCounter

+protected integer $_sqlAliasCounter +
+

Counter for creating unique SQL table and column aliases.

+ +
+ +
/Doctrine/ORM/Persisters/StandardEntityPersister.php at line 127
+

_sqlTableAliases

+protected array $_sqlTableAliases = array() +
+

Map from class names (FQCN) to the corresponding generated SQL table aliases.

+ +
+ +

Constructor Detail

+
/Doctrine/ORM/Persisters/StandardEntityPersister.php at line 136
+

StandardEntityPersister

+public StandardEntityPersister(Doctrine\ORM\EntityManager em, Doctrine\ORM\Mapping\ClassMetadata class) +
+

Initializes a new StandardEntityPersister that uses the given EntityManager +and persists instances of the class described by the given ClassMetadata descriptor.

+ +
+ +

Method Detail

+
/Doctrine/ORM/Persisters/StandardEntityPersister.php at line 150
+

addInsert

+public void addInsert(object entity) +
+

Adds an entity to the queued insertions. +The entity remains queued until executeInserts() is invoked.

+
Parameters:
+
entity - The entitiy to queue for insertion.
+
+
+ +
+ +
/Doctrine/ORM/Persisters/StandardEntityPersister.php at line 302
+

delete

+public void delete(object entity) +
+

Deletes an entity.

+
Parameters:
+
entity - The entity to delete.
+
+
+ +
+ +
/Doctrine/ORM/Persisters/StandardEntityPersister.php at line 164
+

executeInserts

+public array executeInserts() +
+

Executes all queued entity insertions and returns any generated post-insert +identifiers that were created as a result of the insertions.

If no inserts are queued, invoking this method is a NOOP.

+
Returns:
+
An array of any generated post-insert IDs. This will be an empty array if the entity class does not use the IDENTITY generation strategy.
+
+
+ +
+ +
/Doctrine/ORM/Persisters/StandardEntityPersister.php at line 316
+

getClassMetadata

+public Doctrine\ORM\Mapping\ClassMetadata getClassMetadata() +
+

Gets the ClassMetadata instance of the entity class this persister is used for.

+ +
+ +
/Doctrine/ORM/Persisters/StandardEntityPersister.php at line 792
+

getInsertSQL

+public string getInsertSQL() +
+

Gets the INSERT SQL used by the persister to persist a new entity.

+ +
+ +
/Doctrine/ORM/Persisters/StandardEntityPersister.php at line 413
+

getOwningTable

+public string getOwningTable(string fieldName) +
+

Gets the name of the table that owns the column the given field is mapped to.

+ +
+ +
/Doctrine/ORM/Persisters/StandardEntityPersister.php at line 428
+

load

+public The load(array criteria, object entity, mixed assoc, array hints, $assoc The) +
+

Loads an entity by a list of field criteria.

+
Parameters:
+
criteria - The criteria by which to load the entity.
+
entity - The entity to load the data into. If not specified, a new entity is created.
+
The - association that connects the entity to load to another entity, if any.
+
hints - Hints for entity creation.
+
Returns:
+
loaded entity instance or NULL if the entity/the data can not be found.
+
+
+ +
+ +
/Doctrine/ORM/Persisters/StandardEntityPersister.php at line 527
+

loadAll

+public array loadAll(array criteria) +
+

Loads a list of entities by a list of field criteria.

+ +
+ +
/Doctrine/ORM/Persisters/StandardEntityPersister.php at line 570
+

loadManyToManyCollection

+public void loadManyToManyCollection(ManyToManyMapping assoc, array criteria, PersistentCollection coll) +
+

Loads a collection of entities of a many-to-many association.

+
Parameters:
+
+
+
coll - The collection to fill.
+
+
+ +
+ +
/Doctrine/ORM/Persisters/StandardEntityPersister.php at line 551
+

loadOneToManyCollection

+public void loadOneToManyCollection(OneToManyMapping assoc, array criteria, mixed coll, PersistentCollection The) +
+

Loads a collection of entities in a one-to-many association.

+
Parameters:
+
+
criteria - The criteria by which to select the entities.
+
The - collection to fill.
+
+
+ +
+ +
/Doctrine/ORM/Persisters/StandardEntityPersister.php at line 445
+

refresh

+public void refresh(array id, object entity) +
+

Refreshes an entity.

+
Parameters:
+
id - The identifier of the entity as an associative array from column names to values.
+
entity - The entity to refresh.
+
+
+ +
+ +
/Doctrine/ORM/Persisters/StandardEntityPersister.php at line 233
+

update

+public void update(object entity) +
+

Updates an entity.

+
Parameters:
+
entity - The entity to update.
+
+
+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/orm/persisters/unionsubclasspersister.html b/lib/api/doctrine/orm/persisters/unionsubclasspersister.html new file mode 100644 index 000000000..cafe5cd26 --- /dev/null +++ b/lib/api/doctrine/orm/persisters/unionsubclasspersister.html @@ -0,0 +1,103 @@ + + + + + + + + + + + +UnionSubclassPersister (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +
Doctrine\ORM\Persisters\UnionSubclassPersister
+
/Doctrine/ORM/Persisters/UnionSubclassPersister.php at line 5
+ +

Class UnionSubclassPersister

+ +
Class:UnionSubclassPersister - Superclass: StandardEntityPersister
+StandardEntityPersister
⌊ UnionSubclassPersister
+ +
+ +

public class UnionSubclassPersister
extends StandardEntityPersister + +

+ +

A basic entity persister that maps an entity with no (mapped) inheritance to a single table +in the relational database.

+ +
+
Author:
+
Roman Borschel
+
Giorgio Sironi
+
License:
+
http://www.opensource.org/licenses/lgpl-license.php LGPL
+
Since:
+
2.0
+
Todo:
+
Rename: BasicEntityPersister
+
+
+ + + +
Fields inherited from Doctrine\ORM\Persisters\StandardEntityPersister
_class, _columnTypes, _conn, _em, _platform, _queuedInserts, _resultColumnNames, _selectColumnListSql, _sqlAliasCounter, _sqlTableAliases
+ + + +
Methods inherited from Doctrine\ORM\Persisters\StandardEntityPersister
addInsert, delete, executeInserts, getClassMetadata, getInsertSQL, getOwningTable, load, loadAll, loadManyToManyCollection, loadOneToManyCollection, refresh, update
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/orm/proxy/package-frame.html b/lib/api/doctrine/orm/proxy/package-frame.html new file mode 100644 index 000000000..242c5cecd --- /dev/null +++ b/lib/api/doctrine/orm/proxy/package-frame.html @@ -0,0 +1,32 @@ + + + + + + + + + + + +Doctrine\ORM\Proxy (Doctrine) + + + + +

Doctrine\ORM\Proxy

+ +

Classes

+ + +

Interfaces

+ + + + + \ No newline at end of file diff --git a/lib/api/doctrine/orm/proxy/package-functions.html b/lib/api/doctrine/orm/proxy/package-functions.html new file mode 100644 index 000000000..d113a2f8c --- /dev/null +++ b/lib/api/doctrine/orm/proxy/package-functions.html @@ -0,0 +1,69 @@ + + + + + + + + + + + +Functions (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +

Functions

+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/orm/proxy/package-globals.html b/lib/api/doctrine/orm/proxy/package-globals.html new file mode 100644 index 000000000..01c8bf59c --- /dev/null +++ b/lib/api/doctrine/orm/proxy/package-globals.html @@ -0,0 +1,69 @@ + + + + + + + + + + + +Globals (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +

Globals

+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/orm/proxy/package-summary.html b/lib/api/doctrine/orm/proxy/package-summary.html new file mode 100644 index 000000000..9971bdd6d --- /dev/null +++ b/lib/api/doctrine/orm/proxy/package-summary.html @@ -0,0 +1,70 @@ + + + + + + + + + + + +Doctrine\ORM\Proxy (Doctrine) + + + + +
+

Doctrine

+ +
+ + +
+ +

Namespace Doctrine\ORM\Proxy

+ + + + + +
Class Summary
ProxyExceptionORM Proxy Exception
ProxyFactoryThis factory is used to create proxy objects for entities at runtime.
+ + + + +
Interface Summary
ProxyInterface for proxy classes.
+ +
+ +
+

Doctrine

+ +
+ + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/orm/proxy/package-tree.html b/lib/api/doctrine/orm/proxy/package-tree.html new file mode 100644 index 000000000..5ad7611c3 --- /dev/null +++ b/lib/api/doctrine/orm/proxy/package-tree.html @@ -0,0 +1,56 @@ + + + + + + + + + + + +Doctrine\ORM\Proxy (Doctrine) + + + + +
+

Doctrine

+ +
+ + +

Class Hierarchy for Package Doctrine\ORM\Proxy

+
+

Doctrine

+ +
+ + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/orm/proxy/proxy.html b/lib/api/doctrine/orm/proxy/proxy.html new file mode 100644 index 000000000..914087d6b --- /dev/null +++ b/lib/api/doctrine/orm/proxy/proxy.html @@ -0,0 +1,86 @@ + + + + + + + + + + + +Proxy (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +
Doctrine\ORM\Proxy\Proxy
+
/Doctrine/ORM/Proxy/Proxy.php at line 30
+ +

Interface Proxy

+ +
Proxy
+ +
+ +

public interface Proxy

+ +

Interface for proxy classes.

+ +
+
Author:
+
Roman Borschel
+
Since:
+
2.0
+
+
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/orm/proxy/proxyexception.html b/lib/api/doctrine/orm/proxy/proxyexception.html new file mode 100644 index 000000000..5e10a2c35 --- /dev/null +++ b/lib/api/doctrine/orm/proxy/proxyexception.html @@ -0,0 +1,124 @@ + + + + + + + + + + + +ProxyException (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +
Doctrine\ORM\Proxy\ProxyException
+
/Doctrine/ORM/Proxy/ProxyException.php at line 33
+ +

Class ProxyException

+ +
Class:ProxyException - Superclass: Doctrine
+Doctrine
⌊ ProxyException
+ +
+ +

public class ProxyException
extends Doctrine + +

+ +

ORM Proxy Exception

+ +
+
License:
+
http://www.opensource.org/licenses/lgpl-license.php LGPL
+
See Also:
+
www.doctrine-project.com
+
Since:
+
1.0
+
Version:
+
$Revision$
+
Author:
+
Benjamin Eberlei
+
+
+ + + + + + + + + + + +
Method Summary
static void

proxyDirectoryRequired()

static void

proxyNamespaceRequired()

+ +

Method Detail

+
/Doctrine/ORM/Proxy/ProxyException.php at line 35
+

proxyDirectoryRequired

+public static void proxyDirectoryRequired() +
+
+ +
+ +
/Doctrine/ORM/Proxy/ProxyException.php at line 39
+

proxyNamespaceRequired

+public static void proxyNamespaceRequired() +
+
+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/orm/proxy/proxyfactory.html b/lib/api/doctrine/orm/proxy/proxyfactory.html new file mode 100644 index 000000000..6d4316eae --- /dev/null +++ b/lib/api/doctrine/orm/proxy/proxyfactory.html @@ -0,0 +1,148 @@ + + + + + + + + + + + +ProxyFactory (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +
Doctrine\ORM\Proxy\ProxyFactory
+
/Doctrine/ORM/Proxy/ProxyFactory.php at line 35
+ +

Class ProxyFactory

+ +
ProxyFactory
+ +
+ +

public class ProxyFactory

+ +

This factory is used to create proxy objects for entities at runtime.

+ +
+
Author:
+
Roman Borschel
+
Giorgio Sironi
+
Since:
+
2.0
+
+
+ + + + + + +
Constructor Summary

ProxyFactory(EntityManager em, string proxyDir, string proxyNs, boolean autoGenerate)

Initializes a new instance of the ProxyFactory class that is +connected to the given EntityManager.

+ + + + + + + + + + + +
Method Summary
void

generateProxyClasses(array classes, string toDir)

Generates proxy classes for all given classes.

object

getProxy(string className, mixed identifier)

Gets a reference proxy instance for the entity of the given type and identified by +the given identifier.

+ +

Constructor Detail

+
/Doctrine/ORM/Proxy/ProxyFactory.php at line 55
+

ProxyFactory

+public ProxyFactory(EntityManager em, string proxyDir, string proxyNs, boolean autoGenerate) +
+

Initializes a new instance of the ProxyFactory class that is +connected to the given EntityManager.

+
Parameters:
+
em - The EntityManager the new factory works for.
+
proxyDir - The directory to use for the proxy classes. It must exist.
+
proxyNs - The namespace to use for the proxy classes.
+
autoGenerate - Whether to automatically generate proxy classes.
+
+
+ +
+ +

Method Detail

+
/Doctrine/ORM/Proxy/ProxyFactory.php at line 105
+

generateProxyClasses

+public void generateProxyClasses(array classes, string toDir) +
+

Generates proxy classes for all given classes.

+
Parameters:
+
classes - The classes (ClassMetadata instances) for which to generate proxies.
+
toDir - The target directory of the proxy classes. If not specified, the directory configured on the Configuration of the EntityManager used by this factory is used.
+
+
+ +
+ +
/Doctrine/ORM/Proxy/ProxyFactory.php at line 77
+

getProxy

+public object getProxy(string className, mixed identifier) +
+

Gets a reference proxy instance for the entity of the given type and identified by +the given identifier.

+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/orm/query.html b/lib/api/doctrine/orm/query.html new file mode 100644 index 000000000..2e3f6a054 --- /dev/null +++ b/lib/api/doctrine/orm/query.html @@ -0,0 +1,582 @@ + + + + + + + + + + + +Query (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +
Doctrine\ORM\Query
+
/Doctrine/ORM/Query.php at line 33
+ +

Class Query

+ +
Class:Query - Superclass: AbstractQuery
+AbstractQuery
⌊ Query
+ +
+ +

public final class Query
extends AbstractQuery + +

+ +

A Query object represents a DQL query.

+ +
+
Since:
+
1.0
+
Author:
+
Guilherme Blanco
+
Konsta Vesterinen
+
Roman Borschel
+
License:
+
http://www.opensource.org/licenses/lgpl-license.php LGPL
+
See Also:
+
www.doctrine-project.org
+
Version:
+
$Revision$
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Field Summary
final string

HINT_CUSTOM_OUTPUT_WALKER

A string with a class name that implements Doctrine\ORM\Query\TreeWalker +and is used for generating the target SQL from any DQL AST tree.

final string

HINT_CUSTOM_TREE_WALKERS

An array of class names that implement Doctrine\ORM\Query\TreeWalker and +are iterated and executed after the DQL has been parsed into an AST.

final string

HINT_FORCE_PARTIAL_LOAD

The forcePartialLoad query hint forces a particular query to return +partial objects.

final string

HINT_INCLUDE_META_COLUMNS

The includeMetaColumns query hint causes meta columns like foreign keys and +discriminator columns to be selected and returned as part of the query result. +

final string

HINT_INTERNAL_ITERATION

final string

HINT_REFRESH

The refresh hint turns any query into a refresh query with the result that +any local changes in entities are overridden with the fetched values.

final int

STATE_CLEAN

A query object is in CLEAN state when it has NO unparsed/unprocessed DQL parts.

final int

STATE_DIRTY

A query object is in state DIRTY when it has DQL parts that have not yet been +parsed/processed.

+ + + +
Fields inherited from Doctrine\ORM\AbstractQuery
HYDRATE_ARRAY, HYDRATE_OBJECT, HYDRATE_SCALAR, HYDRATE_SINGLE_SCALAR, _em, _expireResultCache, _hints, _hydrationMode, _paramTypes, _params, _resultCacheDriver, _resultCacheId, _resultCacheTTL, _resultSetMapping, _useResultCache
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Method Summary
boolean

contains(string dql)

Method to check if an arbitrary piece of DQL exists

Query

expireQueryCache(boolean expire)

Defines if the query cache is active or not.

void

free()

Doctrine\ORM\Query\AST\SelectStatement

getAST()

Returns the corresponding AST for this DQL query.

string

getDQL()

Returns the DQL query that is represented by this query object.

bool

getExpireQueryCache()

Retrieves if the query cache is active or not.

integer

getFirstResult()

Gets the position of the first result the query object was set to retrieve (the "offset"). +

integer

getMaxResults()

Gets the maximum number of results the query object was set to retrieve (the "limit"). +

CacheDriver

getQueryCacheDriver()

Returns the cache driver used for query caching.

int

getQueryCacheLifetime()

Retrieves the lifetime of resultset cache.

mixed

getSQL()

Gets the SQL query/queries that correspond to this DQL query.

integer

getState()

Returns the state of this query object +By default the type is Doctrine_ORM_Query_Abstract::STATE_CLEAN but if it appears any unprocessed DQL +part, it is switched to Doctrine_ORM_Query_Abstract::STATE_DIRTY.

IterableResult

iterate(array params, integer hydrationMode)

Executes the query and returns an IterableResult that can be used to incrementally +iterated over the result.

Doctrine\ORM\AbstractQuery

setDQL(string dqlQuery)

Sets a DQL query string.

Query

setFirstResult(integer firstResult)

Sets the position of the first result to retrieve (the "offset").

Doctrine\ORM\AbstractQuery

setHint(string name, mixed value)

{@inheritdoc}

Doctrine\ORM\AbstractQuery

setHydrationMode(integer hydrationMode)

{@inheritdoc}

Query

setMaxResults(integer maxResults)

Sets the maximum number of results to retrieve (the "limit").

Query

setQueryCacheDriver(mixed queryCache, Doctrine_Cache_Interface|null driver)

Defines a cache driver to be used for caching queries.

Query

setQueryCacheLifetime(integer timeToLive)

Defines how long the query cache will be active before expire.

@return

useQueryCache(boolean bool)

Defines whether the query should make use of a query cache, if available.

+ + + +
Methods inherited from Doctrine\ORM\AbstractQuery
execute, expireResultCache, free, getArrayResult, getEntityManager, getExpireResultCache, getHint, getHydrationMode, getParameter, getParameters, getResult, getResultCacheDriver, getResultCacheLifetime, getSQL, getScalarResult, getSingleResult, getSingleScalarResult, iterate, setHint, setHydrationMode, setParameter, setParameters, setResultCacheDriver, setResultCacheId, setResultCacheLifetime, setResultSetMapping, useResultCache
+ +

Field Detail

+
/Doctrine/ORM/Query.php at line 87
+

HINT_CUSTOM_OUTPUT_WALKER

+public final string HINT_CUSTOM_OUTPUT_WALKER = 'doctrine.customOutputWalker' +
+

A string with a class name that implements Doctrine\ORM\Query\TreeWalker +and is used for generating the target SQL from any DQL AST tree.

+ +
+ +
/Doctrine/ORM/Query.php at line 79
+

HINT_CUSTOM_TREE_WALKERS

+public final string HINT_CUSTOM_TREE_WALKERS = 'doctrine.customTreeWalkers' +
+

An array of class names that implement Doctrine\ORM\Query\TreeWalker and +are iterated and executed after the DQL has been parsed into an AST.

+ +
+ +
/Doctrine/ORM/Query.php at line 62
+

HINT_FORCE_PARTIAL_LOAD

+public final string HINT_FORCE_PARTIAL_LOAD = 'doctrine.forcePartialLoad' +
+

The forcePartialLoad query hint forces a particular query to return +partial objects.

+
Todo:
+
Rename: HINT_OPTIMIZE
+
+
+ +
+ +
/Doctrine/ORM/Query.php at line 71
+

HINT_INCLUDE_META_COLUMNS

+public final string HINT_INCLUDE_META_COLUMNS = 'doctrine.includeMetaColumns' +
+

The includeMetaColumns query hint causes meta columns like foreign keys and +discriminator columns to be selected and returned as part of the query result.

This hint does only apply to non-object queries.

+ +
+ +
/Doctrine/ORM/Query.php at line 94
+

HINT_INTERNAL_ITERATION

+public final string HINT_INTERNAL_ITERATION = 'doctrine.internal.iteration' +
+

+ +
+ +
/Doctrine/ORM/Query.php at line 54
+

HINT_REFRESH

+public final string HINT_REFRESH = 'doctrine.refresh' +
+

The refresh hint turns any query into a refresh query with the result that +any local changes in entities are overridden with the fetched values.

+ +
+ +
/Doctrine/ORM/Query.php at line 39
+

STATE_CLEAN

+public final int STATE_CLEAN = 1 +
+

A query object is in CLEAN state when it has NO unparsed/unprocessed DQL parts.

+ +
+ +
/Doctrine/ORM/Query.php at line 45
+

STATE_DIRTY

+public final int STATE_DIRTY = 2 +
+

A query object is in state DIRTY when it has DQL parts that have not yet been +parsed/processed. This is automatically defined as DIRTY when addDqlQueryPart +is called.

+ +
+ +

Method Detail

+
/Doctrine/ORM/Query.php at line 405
+

contains

+public boolean contains(string dql) +
+

Method to check if an arbitrary piece of DQL exists

+
Parameters:
+
dql - Arbitrary piece of DQL to check for
+
+
+ +
+ +
/Doctrine/ORM/Query.php at line 332
+

expireQueryCache

+public Query expireQueryCache(boolean expire) +
+

Defines if the query cache is active or not.

+
Parameters:
+
expire - Whether or not to force query cache expiration.
+
Returns:
+
This query instance.
+
+
+ +
+ +
/Doctrine/ORM/Query.php at line 352
+

free

+public void free() +
+

+
Override.
+
+
+ +
+ +
/Doctrine/ORM/Query.php at line 171
+

getAST

+public Doctrine\ORM\Query\AST\SelectStatement getAST() +
+

Returns the corresponding AST for this DQL query.

+
Returns:
+
| Doctrine\ORM\Query\AST\UpdateStatement | Doctrine\ORM\Query\AST\DeleteStatement
+
+
+ +
+ +
/Doctrine/ORM/Query.php at line 379
+

getDQL

+public string getDQL() +
+

Returns the DQL query that is represented by this query object.

+
Returns:
+
DQL query
+
+
+ +
+ +
/Doctrine/ORM/Query.php at line 344
+

getExpireQueryCache

+public bool getExpireQueryCache() +
+

Retrieves if the query cache is active or not.

+ +
+ +
/Doctrine/ORM/Query.php at line 429
+

getFirstResult

+public integer getFirstResult() +
+

Gets the position of the first result the query object was set to retrieve (the "offset"). +Returns NULL if setFirstResult was not applied to this query.

+
Returns:
+
The position of the first result.
+
+
+ +
+ +
/Doctrine/ORM/Query.php at line 453
+

getMaxResults

+public integer getMaxResults() +
+

Gets the maximum number of results the query object was set to retrieve (the "limit"). +Returns NULL if setMaxResults was not applied to this query.

+
Returns:
+
Maximum number of results.
+
+
+ +
+ +
/Doctrine/ORM/Query.php at line 291
+

getQueryCacheDriver

+public CacheDriver getQueryCacheDriver() +
+

Returns the cache driver used for query caching.

+
Returns:
+
The cache driver used for query caching or NULL, if this Query does not use query caching.
+
+
+ +
+ +
/Doctrine/ORM/Query.php at line 321
+

getQueryCacheLifetime

+public int getQueryCacheLifetime() +
+

Retrieves the lifetime of resultset cache.

+ +
+ +
/Doctrine/ORM/Query.php at line 159
+

getSQL

+public mixed getSQL() +
+

Gets the SQL query/queries that correspond to this DQL query.

+
Returns:
+
The built sql query or an array of all sql queries.
+
Override.
+
+
+ +
+ +
/Doctrine/ORM/Query.php at line 394
+

getState

+public integer getState() +
+

Returns the state of this query object +By default the type is Doctrine_ORM_Query_Abstract::STATE_CLEAN but if it appears any unprocessed DQL +part, it is switched to Doctrine_ORM_Query_Abstract::STATE_DIRTY.

+
See Also:
+
AbstractQuery::STATE_CLEAN
+
AbstractQuery::STATE_DIRTY
+
Returns:
+
Return the query state
+
+
+ +
+ +
/Doctrine/ORM/Query.php at line 466
+

iterate

+public IterableResult iterate(array params, integer hydrationMode) +
+

Executes the query and returns an IterableResult that can be used to incrementally +iterated over the result.

+
Parameters:
+
params - The query parameters.
+
hydrationMode - The hydration mode to use.
+
+
+ +
+ +
/Doctrine/ORM/Query.php at line 365
+

setDQL

+public Doctrine\ORM\AbstractQuery setDQL(string dqlQuery) +
+

Sets a DQL query string.

+
Parameters:
+
dqlQuery - DQL Query
+
+
+ +
+ +
/Doctrine/ORM/Query.php at line 416
+

setFirstResult

+public Query setFirstResult(integer firstResult) +
+

Sets the position of the first result to retrieve (the "offset").

+
Parameters:
+
firstResult - The first result to return.
+
Returns:
+
This query object.
+
+
+ +
+ +
/Doctrine/ORM/Query.php at line 475
+

setHint

+public Doctrine\ORM\AbstractQuery setHint(string name, mixed value) +
+

+
Parameters:
+
name - The name of the hint.
+
value - The value of the hint.
+
+
+ +
+ +
/Doctrine/ORM/Query.php at line 484
+

setHydrationMode

+public Doctrine\ORM\AbstractQuery setHydrationMode(integer hydrationMode) +
+

+
Parameters:
+
hydrationMode - Doctrine processing mode to be used during hydration process. One of the Query::HYDRATE_* constants.
+
Returns:
+
This query instance.
+
+
+ +
+ +
/Doctrine/ORM/Query.php at line 440
+

setMaxResults

+public Query setMaxResults(integer maxResults) +
+

Sets the maximum number of results to retrieve (the "limit").

+
Returns:
+
This query object.
+
+
+ +
+ +
/Doctrine/ORM/Query.php at line 267
+

setQueryCacheDriver

+public Query setQueryCacheDriver(mixed queryCache, Doctrine_Cache_Interface|null driver) +
+

Defines a cache driver to be used for caching queries.

+
Parameters:
+
driver - Cache driver
+
Returns:
+
This query instance.
+
+
+ +
+ +
/Doctrine/ORM/Query.php at line 306
+

setQueryCacheLifetime

+public Query setQueryCacheLifetime(integer timeToLive) +
+

Defines how long the query cache will be active before expire.

+
Parameters:
+
timeToLive - How long the cache entry is valid
+
Returns:
+
This query instance.
+
+
+ +
+ +
/Doctrine/ORM/Query.php at line 279
+

useQueryCache

+public @return useQueryCache(boolean bool) +
+

Defines whether the query should make use of a query cache, if available.

+
Returns:
+
Query This query instance.
+
+
+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/orm/query/ast/aggregateexpression.html b/lib/api/doctrine/orm/query/ast/aggregateexpression.html new file mode 100644 index 000000000..5d99c6015 --- /dev/null +++ b/lib/api/doctrine/orm/query/ast/aggregateexpression.html @@ -0,0 +1,176 @@ + + + + + + + + + + + +AggregateExpression (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +
Doctrine\ORM\Query\AST\AggregateExpression
+
/Doctrine/ORM/Query/AST/AggregateExpression.php at line 35
+ +

Class AggregateExpression

+ +
Class:AggregateExpression - Superclass: Node
+Node
⌊ AggregateExpression
+ +
+ +

public class AggregateExpression
extends Node + +

+ +

Description of AggregateExpression

+ +
+
License:
+
http://www.opensource.org/licenses/lgpl-license.php LGPL
+
See Also:
+
www.doctrine-project.org
+
Since:
+
2.0
+
Version:
+
$Revision: 3938 $
+
Author:
+
Guilherme Blanco
+
Jonathan Wage
+
Roman Borschel
+
+
+ + + + + + + + + + + + + + + +
Field Summary
mixed

$functionName

mixed

$isDistinct

mixed

$pathExpression

+ + + + + + +
Constructor Summary

AggregateExpression(mixed functionName, mixed pathExpression, mixed isDistinct)

+ + + + + + + +
Method Summary
void

dispatch(mixed walker, $walker )

Double-dispatch method, supposed to dispatch back to the walker. +

+ + + +
Methods inherited from Doctrine\ORM\Query\AST\Node
dispatch, dump
+ +

Field Detail

+
/Doctrine/ORM/Query/AST/AggregateExpression.php at line 37
+

functionName

+public mixed $functionName +
+
+ +
+ +
/Doctrine/ORM/Query/AST/AggregateExpression.php at line 39
+

isDistinct

+public mixed $isDistinct = false +
+
+ +
+ +
/Doctrine/ORM/Query/AST/AggregateExpression.php at line 38
+

pathExpression

+public mixed $pathExpression +
+
+ +
+ +

Constructor Detail

+
/Doctrine/ORM/Query/AST/AggregateExpression.php at line 41
+

AggregateExpression

+public AggregateExpression(mixed functionName, mixed pathExpression, mixed isDistinct) +
+
+ +
+ +

Method Detail

+
/Doctrine/ORM/Query/AST/AggregateExpression.php at line 48
+

dispatch

+public void dispatch(mixed walker, $walker ) +
+

Double-dispatch method, supposed to dispatch back to the walker.

Implementation is not mandatory for all nodes.

+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/orm/query/ast/arithmeticexpression.html b/lib/api/doctrine/orm/query/ast/arithmeticexpression.html new file mode 100644 index 000000000..f6480aaa0 --- /dev/null +++ b/lib/api/doctrine/orm/query/ast/arithmeticexpression.html @@ -0,0 +1,172 @@ + + + + + + + + + + + +ArithmeticExpression (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +
Doctrine\ORM\Query\AST\ArithmeticExpression
+
/Doctrine/ORM/Query/AST/ArithmeticExpression.php at line 35
+ +

Class ArithmeticExpression

+ +
Class:ArithmeticExpression - Superclass: Node
+Node
⌊ ArithmeticExpression
+ +
+ +

public class ArithmeticExpression
extends Node + +

+ +

ArithmeticExpression ::= SimpleArithmeticExpression | "(" Subselect ")"

+ +
+
License:
+
http://www.opensource.org/licenses/lgpl-license.php LGPL
+
See Also:
+
www.doctrine-project.org
+
Since:
+
2.0
+
Version:
+
$Revision: 3938 $
+
Author:
+
Guilherme Blanco
+
Jonathan Wage
+
Roman Borschel
+
+
+ + + + + + + + + + + +
Field Summary
mixed

$simpleArithmeticExpression

mixed

$subselect

+ + + + + + + + + + + + + + + +
Method Summary
void

dispatch(mixed walker, $walker )

Double-dispatch method, supposed to dispatch back to the walker. +

void

isSimpleArithmeticExpression()

void

isSubselect()

+ + + +
Methods inherited from Doctrine\ORM\Query\AST\Node
dispatch, dump
+ +

Field Detail

+
/Doctrine/ORM/Query/AST/ArithmeticExpression.php at line 37
+

simpleArithmeticExpression

+public mixed $simpleArithmeticExpression +
+
+ +
+ +
/Doctrine/ORM/Query/AST/ArithmeticExpression.php at line 38
+

subselect

+public mixed $subselect +
+
+ +
+ +

Method Detail

+
/Doctrine/ORM/Query/AST/ArithmeticExpression.php at line 50
+

dispatch

+public void dispatch(mixed walker, $walker ) +
+

Double-dispatch method, supposed to dispatch back to the walker.

Implementation is not mandatory for all nodes.

+ +
+ +
/Doctrine/ORM/Query/AST/ArithmeticExpression.php at line 40
+

isSimpleArithmeticExpression

+public void isSimpleArithmeticExpression() +
+
+ +
+ +
/Doctrine/ORM/Query/AST/ArithmeticExpression.php at line 45
+

isSubselect

+public void isSubselect() +
+
+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/orm/query/ast/arithmeticfactor.html b/lib/api/doctrine/orm/query/ast/arithmeticfactor.html new file mode 100644 index 000000000..01b0e5849 --- /dev/null +++ b/lib/api/doctrine/orm/query/ast/arithmeticfactor.html @@ -0,0 +1,188 @@ + + + + + + + + + + + +ArithmeticFactor (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +
Doctrine\ORM\Query\AST\ArithmeticFactor
+
/Doctrine/ORM/Query/AST/ArithmeticFactor.php at line 35
+ +

Class ArithmeticFactor

+ +
Class:ArithmeticFactor - Superclass: Node
+Node
⌊ ArithmeticFactor
+ +
+ +

public class ArithmeticFactor
extends Node + +

+ +

ArithmeticFactor ::= [("+" | "-")] ArithmeticPrimary

+ +
+
License:
+
http://www.opensource.org/licenses/lgpl-license.php LGPL
+
See Also:
+
www.doctrine-project.org
+
Since:
+
2.0
+
Version:
+
$Revision: 3938 $
+
Author:
+
Guilherme Blanco
+
Jonathan Wage
+
Roman Borschel
+
+
+ + + + + + + + + + + +
Field Summary
ArithmeticPrimary

$arithmeticPrimary

null|boolean NULL represents no sign, TRUE means positive and FALSE means negative sign

$sign

+ + + + + + +
Constructor Summary

ArithmeticFactor(mixed arithmeticPrimary, mixed sign)

+ + + + + + + + + + + + + + + +
Method Summary
void

dispatch(mixed sqlWalker, mixed walker, $walker )

Double-dispatch method, supposed to dispatch back to the walker. +

void

isNegativeSigned()

void

isPositiveSigned()

+ + + +
Methods inherited from Doctrine\ORM\Query\AST\Node
dispatch, dump
+ +

Field Detail

+
/Doctrine/ORM/Query/AST/ArithmeticFactor.php at line 40
+

arithmeticPrimary

+public ArithmeticPrimary $arithmeticPrimary +
+

+ +
+ +
/Doctrine/ORM/Query/AST/ArithmeticFactor.php at line 45
+

sign

+public null|boolean NULL represents no sign, TRUE means positive and FALSE means negative sign $sign +
+

+ +
+ +

Constructor Detail

+
/Doctrine/ORM/Query/AST/ArithmeticFactor.php at line 47
+

ArithmeticFactor

+public ArithmeticFactor(mixed arithmeticPrimary, mixed sign) +
+
+ +
+ +

Method Detail

+
/Doctrine/ORM/Query/AST/ArithmeticFactor.php at line 63
+

dispatch

+public void dispatch(mixed sqlWalker, mixed walker, $walker ) +
+

Double-dispatch method, supposed to dispatch back to the walker.

Implementation is not mandatory for all nodes.

+ +
+ +
/Doctrine/ORM/Query/AST/ArithmeticFactor.php at line 58
+

isNegativeSigned

+public void isNegativeSigned() +
+
+ +
+ +
/Doctrine/ORM/Query/AST/ArithmeticFactor.php at line 53
+

isPositiveSigned

+public void isPositiveSigned() +
+
+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/orm/query/ast/arithmeticterm.html b/lib/api/doctrine/orm/query/ast/arithmeticterm.html new file mode 100644 index 000000000..ddc044e4b --- /dev/null +++ b/lib/api/doctrine/orm/query/ast/arithmeticterm.html @@ -0,0 +1,152 @@ + + + + + + + + + + + +ArithmeticTerm (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +
Doctrine\ORM\Query\AST\ArithmeticTerm
+
/Doctrine/ORM/Query/AST/ArithmeticTerm.php at line 35
+ +

Class ArithmeticTerm

+ +
Class:ArithmeticTerm - Superclass: Node
+Node
⌊ ArithmeticTerm
+ +
+ +

public class ArithmeticTerm
extends Node + +

+ +

ArithmeticTerm ::= ArithmeticFactor {("*" | "/") ArithmeticFactor}

+ +
+
License:
+
http://www.opensource.org/licenses/lgpl-license.php LGPL
+
See Also:
+
www.doctrine-project.org
+
Since:
+
2.0
+
Version:
+
$Revision: 3938 $
+
Author:
+
Guilherme Blanco
+
Jonathan Wage
+
Roman Borschel
+
+
+ + + + + + + +
Field Summary
mixed

$arithmeticFactors

+ + + + + + +
Constructor Summary

ArithmeticTerm(mixed arithmeticFactors)

+ + + + + + + +
Method Summary
void

dispatch(mixed sqlWalker, mixed walker, $walker )

Double-dispatch method, supposed to dispatch back to the walker. +

+ + + +
Methods inherited from Doctrine\ORM\Query\AST\Node
dispatch, dump
+ +

Field Detail

+
/Doctrine/ORM/Query/AST/ArithmeticTerm.php at line 37
+

arithmeticFactors

+public mixed $arithmeticFactors +
+
+ +
+ +

Constructor Detail

+
/Doctrine/ORM/Query/AST/ArithmeticTerm.php at line 39
+

ArithmeticTerm

+public ArithmeticTerm(mixed arithmeticFactors) +
+
+ +
+ +

Method Detail

+
/Doctrine/ORM/Query/AST/ArithmeticTerm.php at line 44
+

dispatch

+public void dispatch(mixed sqlWalker, mixed walker, $walker ) +
+

Double-dispatch method, supposed to dispatch back to the walker.

Implementation is not mandatory for all nodes.

+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/orm/query/ast/astexception.html b/lib/api/doctrine/orm/query/ast/astexception.html new file mode 100644 index 000000000..d0d3aaf06 --- /dev/null +++ b/lib/api/doctrine/orm/query/ast/astexception.html @@ -0,0 +1,105 @@ + + + + + + + + + + + +ASTException (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +
Doctrine\ORM\Query\AST\ASTException
+
/Doctrine/ORM/Query/AST/ASTException.php at line 7
+ +

Class ASTException

+ +
Class:ASTException - Superclass: QueryException
+Class:QueryException - Superclass: Doctrine
+Doctrine
⌊ QueryException
⌊ ASTException
+ +
+ +

public class ASTException
extends QueryException + +

+ +

Description of QueryException

+ +
+ + + + + + + +
Method Summary
static void

noDispatchForNode(mixed node)

+ + + +
Methods inherited from Doctrine\ORM\Query\QueryException
associationPathCompositeKeyNotSupported, associationPathInverseSideNotSupported, invalidLiteral, invalidParameterFormat, invalidParameterNumber, invalidParameterPosition, invalidPathExpression, iterateWithFetchJoinCollectionNotAllowed, iterateWithFetchJoinNotAllowed, overwritingJoinConditionsNotYetSupported, partialObjectsAreDangerous, semanticalError, syntaxError, unknownParameter
+ +

Method Detail

+
/Doctrine/ORM/Query/AST/ASTException.php at line 9
+

noDispatchForNode

+public static void noDispatchForNode(mixed node) +
+
+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/orm/query/ast/betweenexpression.html b/lib/api/doctrine/orm/query/ast/betweenexpression.html new file mode 100644 index 000000000..87233dcb6 --- /dev/null +++ b/lib/api/doctrine/orm/query/ast/betweenexpression.html @@ -0,0 +1,188 @@ + + + + + + + + + + + +BetweenExpression (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +
Doctrine\ORM\Query\AST\BetweenExpression
+
/Doctrine/ORM/Query/AST/BetweenExpression.php at line 35
+ +

Class BetweenExpression

+ +
Class:BetweenExpression - Superclass: Node
+Node
⌊ BetweenExpression
+ +
+ +

public class BetweenExpression
extends Node + +

+ +

Description of BetweenExpression

@license http://www.opensource.org/licenses/lgpl-license.php LGPL

+ +
+
See Also:
+
www.doctrine-project.org
+
Since:
+
2.0
+
Version:
+
$Revision: 3938 $
+
Author:
+
Guilherme Blanco
+
Jonathan Wage
+
Roman Borschel
+
License:
+
http://www.opensource.org/licenses/lgpl-license.php LGPL
+
+
+ + + + + + + + + + + + + + + + + + + +
Field Summary
mixed

$expression

mixed

$leftBetweenExpression

mixed

$not

mixed

$rightBetweenExpression

+ + + + + + +
Constructor Summary

BetweenExpression(mixed expr, mixed leftExpr, mixed rightExpr)

+ + + + + + + +
Method Summary
void

dispatch(mixed sqlWalker, mixed walker, $walker )

Double-dispatch method, supposed to dispatch back to the walker. +

+ + + +
Methods inherited from Doctrine\ORM\Query\AST\Node
dispatch, dump
+ +

Field Detail

+
/Doctrine/ORM/Query/AST/BetweenExpression.php at line 37
+

expression

+public mixed $expression +
+
+ +
+ +
/Doctrine/ORM/Query/AST/BetweenExpression.php at line 38
+

leftBetweenExpression

+public mixed $leftBetweenExpression +
+
+ +
+ +
/Doctrine/ORM/Query/AST/BetweenExpression.php at line 40
+

not

+public mixed $not +
+
+ +
+ +
/Doctrine/ORM/Query/AST/BetweenExpression.php at line 39
+

rightBetweenExpression

+public mixed $rightBetweenExpression +
+
+ +
+ +

Constructor Detail

+
/Doctrine/ORM/Query/AST/BetweenExpression.php at line 42
+

BetweenExpression

+public BetweenExpression(mixed expr, mixed leftExpr, mixed rightExpr) +
+
+ +
+ +

Method Detail

+
/Doctrine/ORM/Query/AST/BetweenExpression.php at line 49
+

dispatch

+public void dispatch(mixed sqlWalker, mixed walker, $walker ) +
+

Double-dispatch method, supposed to dispatch back to the walker.

Implementation is not mandatory for all nodes.

+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/orm/query/ast/collectionmemberexpression.html b/lib/api/doctrine/orm/query/ast/collectionmemberexpression.html new file mode 100644 index 000000000..fa0d2c668 --- /dev/null +++ b/lib/api/doctrine/orm/query/ast/collectionmemberexpression.html @@ -0,0 +1,176 @@ + + + + + + + + + + + +CollectionMemberExpression (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +
Doctrine\ORM\Query\AST\CollectionMemberExpression
+
/Doctrine/ORM/Query/AST/CollectionMemberExpression.php at line 35
+ +

Class CollectionMemberExpression

+ +
Class:CollectionMemberExpression - Superclass: Node
+Node
⌊ CollectionMemberExpression
+ +
+ +

public class CollectionMemberExpression
extends Node + +

+ +

CollectionMemberExpression ::= EntityExpression ["NOT"] "MEMBER" ["OF"] CollectionValuedPathExpression

+ +
+
License:
+
http://www.opensource.org/licenses/lgpl-license.php LGPL
+
See Also:
+
www.doctrine-project.org
+
Since:
+
2.0
+
Version:
+
$Revision: 3938 $
+
Author:
+
Guilherme Blanco
+
Jonathan Wage
+
Roman Borschel
+
+
+ + + + + + + + + + + + + + + +
Field Summary
mixed

$collectionValuedPathExpression

mixed

$entityExpression

mixed

$not

+ + + + + + +
Constructor Summary

CollectionMemberExpression(mixed entityExpr, mixed collValuedPathExpr)

+ + + + + + + +
Method Summary
void

dispatch(mixed walker, $walker )

Double-dispatch method, supposed to dispatch back to the walker. +

+ + + +
Methods inherited from Doctrine\ORM\Query\AST\Node
dispatch, dump
+ +

Field Detail

+
/Doctrine/ORM/Query/AST/CollectionMemberExpression.php at line 38
+

collectionValuedPathExpression

+public mixed $collectionValuedPathExpression +
+
+ +
+ +
/Doctrine/ORM/Query/AST/CollectionMemberExpression.php at line 37
+

entityExpression

+public mixed $entityExpression +
+
+ +
+ +
/Doctrine/ORM/Query/AST/CollectionMemberExpression.php at line 39
+

not

+public mixed $not +
+
+ +
+ +

Constructor Detail

+
/Doctrine/ORM/Query/AST/CollectionMemberExpression.php at line 41
+

CollectionMemberExpression

+public CollectionMemberExpression(mixed entityExpr, mixed collValuedPathExpr) +
+
+ +
+ +

Method Detail

+
/Doctrine/ORM/Query/AST/CollectionMemberExpression.php at line 47
+

dispatch

+public void dispatch(mixed walker, $walker ) +
+

Double-dispatch method, supposed to dispatch back to the walker.

Implementation is not mandatory for all nodes.

+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/orm/query/ast/comparisonexpression.html b/lib/api/doctrine/orm/query/ast/comparisonexpression.html new file mode 100644 index 000000000..22a8c0694 --- /dev/null +++ b/lib/api/doctrine/orm/query/ast/comparisonexpression.html @@ -0,0 +1,181 @@ + + + + + + + + + + + +ComparisonExpression (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +
Doctrine\ORM\Query\AST\ComparisonExpression
+
/Doctrine/ORM/Query/AST/ComparisonExpression.php at line 40
+ +

Class ComparisonExpression

+ +
Class:ComparisonExpression - Superclass: Node
+Node
⌊ ComparisonExpression
+ +
+ +

public class ComparisonExpression
extends Node + +

+ +

ComparisonExpression ::= ArithmeticExpression ComparisonOperator ( QuantifiedExpression | ArithmeticExpression ) | +StringExpression ComparisonOperator (StringExpression | QuantifiedExpression) | +BooleanExpression ("=" | "<>" | "!=") (BooleanExpression | QuantifiedExpression) | +EnumExpression ("=" | "<>" | "!=") (EnumExpression | QuantifiedExpression) | +DatetimeExpression ComparisonOperator (DatetimeExpression | QuantifiedExpression) | +EntityExpression ("=" | "<>") (EntityExpression | QuantifiedExpression)

+ +
+
License:
+
http://www.opensource.org/licenses/lgpl-license.php LGPL
+
See Also:
+
www.doctrine-project.org
+
Since:
+
2.0
+
Version:
+
$Revision: 3938 $
+
Author:
+
Guilherme Blanco
+
Jonathan Wage
+
Roman Borschel
+
+
+ + + + + + + + + + + + + + + +
Field Summary
mixed

$leftExpression

mixed

$operator

mixed

$rightExpression

+ + + + + + +
Constructor Summary

ComparisonExpression(mixed leftExpr, mixed operator, mixed rightExpr)

+ + + + + + + +
Method Summary
void

dispatch(mixed sqlWalker, mixed walker, $walker )

Double-dispatch method, supposed to dispatch back to the walker. +

+ + + +
Methods inherited from Doctrine\ORM\Query\AST\Node
dispatch, dump
+ +

Field Detail

+
/Doctrine/ORM/Query/AST/ComparisonExpression.php at line 42
+

leftExpression

+public mixed $leftExpression +
+
+ +
+ +
/Doctrine/ORM/Query/AST/ComparisonExpression.php at line 44
+

operator

+public mixed $operator +
+
+ +
+ +
/Doctrine/ORM/Query/AST/ComparisonExpression.php at line 43
+

rightExpression

+public mixed $rightExpression +
+
+ +
+ +

Constructor Detail

+
/Doctrine/ORM/Query/AST/ComparisonExpression.php at line 46
+

ComparisonExpression

+public ComparisonExpression(mixed leftExpr, mixed operator, mixed rightExpr) +
+
+ +
+ +

Method Detail

+
/Doctrine/ORM/Query/AST/ComparisonExpression.php at line 53
+

dispatch

+public void dispatch(mixed sqlWalker, mixed walker, $walker ) +
+

Double-dispatch method, supposed to dispatch back to the walker.

Implementation is not mandatory for all nodes.

+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/orm/query/ast/conditionalexpression.html b/lib/api/doctrine/orm/query/ast/conditionalexpression.html new file mode 100644 index 000000000..1f4c258f9 --- /dev/null +++ b/lib/api/doctrine/orm/query/ast/conditionalexpression.html @@ -0,0 +1,152 @@ + + + + + + + + + + + +ConditionalExpression (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +
Doctrine\ORM\Query\AST\ConditionalExpression
+
/Doctrine/ORM/Query/AST/ConditionalExpression.php at line 35
+ +

Class ConditionalExpression

+ +
Class:ConditionalExpression - Superclass: Node
+Node
⌊ ConditionalExpression
+ +
+ +

public class ConditionalExpression
extends Node + +

+ +

ConditionalExpression ::= ConditionalTerm {"OR" ConditionalTerm}

+ +
+
License:
+
http://www.opensource.org/licenses/lgpl-license.php LGPL
+
See Also:
+
www.doctrine-project.org
+
Since:
+
2.0
+
Version:
+
$Revision: 3938 $
+
Author:
+
Guilherme Blanco
+
Jonathan Wage
+
Roman Borschel
+
+
+ + + + + + + +
Field Summary
mixed

$conditionalTerms

+ + + + + + +
Constructor Summary

ConditionalExpression(mixed conditionalTerms)

+ + + + + + + +
Method Summary
void

dispatch(mixed sqlWalker, mixed walker, $walker )

Double-dispatch method, supposed to dispatch back to the walker. +

+ + + +
Methods inherited from Doctrine\ORM\Query\AST\Node
dispatch, dump
+ +

Field Detail

+
/Doctrine/ORM/Query/AST/ConditionalExpression.php at line 37
+

conditionalTerms

+public mixed $conditionalTerms = array() +
+
+ +
+ +

Constructor Detail

+
/Doctrine/ORM/Query/AST/ConditionalExpression.php at line 39
+

ConditionalExpression

+public ConditionalExpression(mixed conditionalTerms) +
+
+ +
+ +

Method Detail

+
/Doctrine/ORM/Query/AST/ConditionalExpression.php at line 44
+

dispatch

+public void dispatch(mixed sqlWalker, mixed walker, $walker ) +
+

Double-dispatch method, supposed to dispatch back to the walker.

Implementation is not mandatory for all nodes.

+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/orm/query/ast/conditionalfactor.html b/lib/api/doctrine/orm/query/ast/conditionalfactor.html new file mode 100644 index 000000000..6deaca434 --- /dev/null +++ b/lib/api/doctrine/orm/query/ast/conditionalfactor.html @@ -0,0 +1,164 @@ + + + + + + + + + + + +ConditionalFactor (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +
Doctrine\ORM\Query\AST\ConditionalFactor
+
/Doctrine/ORM/Query/AST/ConditionalFactor.php at line 35
+ +

Class ConditionalFactor

+ +
Class:ConditionalFactor - Superclass: Node
+Node
⌊ ConditionalFactor
+ +
+ +

public class ConditionalFactor
extends Node + +

+ +

ConditionalFactor ::= ["NOT"] ConditionalPrimary

+ +
+
License:
+
http://www.opensource.org/licenses/lgpl-license.php LGPL
+
See Also:
+
www.doctrine-project.org
+
Since:
+
2.0
+
Version:
+
$Revision: 3938 $
+
Author:
+
Guilherme Blanco
+
Jonathan Wage
+
Roman Borschel
+
+
+ + + + + + + + + + + +
Field Summary
mixed

$conditionalPrimary

mixed

$not

+ + + + + + +
Constructor Summary

ConditionalFactor(mixed conditionalPrimary)

+ + + + + + + +
Method Summary
void

dispatch(mixed sqlWalker, mixed walker, $walker )

Double-dispatch method, supposed to dispatch back to the walker. +

+ + + +
Methods inherited from Doctrine\ORM\Query\AST\Node
dispatch, dump
+ +

Field Detail

+
/Doctrine/ORM/Query/AST/ConditionalFactor.php at line 38
+

conditionalPrimary

+public mixed $conditionalPrimary +
+
+ +
+ +
/Doctrine/ORM/Query/AST/ConditionalFactor.php at line 37
+

not

+public mixed $not = false +
+
+ +
+ +

Constructor Detail

+
/Doctrine/ORM/Query/AST/ConditionalFactor.php at line 40
+

ConditionalFactor

+public ConditionalFactor(mixed conditionalPrimary) +
+
+ +
+ +

Method Detail

+
/Doctrine/ORM/Query/AST/ConditionalFactor.php at line 45
+

dispatch

+public void dispatch(mixed sqlWalker, mixed walker, $walker ) +
+

Double-dispatch method, supposed to dispatch back to the walker.

Implementation is not mandatory for all nodes.

+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/orm/query/ast/conditionalprimary.html b/lib/api/doctrine/orm/query/ast/conditionalprimary.html new file mode 100644 index 000000000..4a7f07e5f --- /dev/null +++ b/lib/api/doctrine/orm/query/ast/conditionalprimary.html @@ -0,0 +1,172 @@ + + + + + + + + + + + +ConditionalPrimary (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +
Doctrine\ORM\Query\AST\ConditionalPrimary
+
/Doctrine/ORM/Query/AST/ConditionalPrimary.php at line 35
+ +

Class ConditionalPrimary

+ +
Class:ConditionalPrimary - Superclass: Node
+Node
⌊ ConditionalPrimary
+ +
+ +

public class ConditionalPrimary
extends Node + +

+ +

ConditionalPrimary ::= SimpleConditionalExpression | "(" ConditionalExpression ")"

+ +
+
License:
+
http://www.opensource.org/licenses/lgpl-license.php LGPL
+
See Also:
+
www.doctrine-project.org
+
Since:
+
2.0
+
Version:
+
$Revision: 3938 $
+
Author:
+
Guilherme Blanco
+
Jonathan Wage
+
Roman Borschel
+
+
+ + + + + + + + + + + +
Field Summary
mixed

$conditionalExpression

mixed

$simpleConditionalExpression

+ + + + + + + + + + + + + + + +
Method Summary
void

dispatch(mixed sqlWalker, mixed walker, $walker )

Double-dispatch method, supposed to dispatch back to the walker. +

void

isConditionalExpression()

void

isSimpleConditionalExpression()

+ + + +
Methods inherited from Doctrine\ORM\Query\AST\Node
dispatch, dump
+ +

Field Detail

+
/Doctrine/ORM/Query/AST/ConditionalPrimary.php at line 38
+

conditionalExpression

+public mixed $conditionalExpression +
+
+ +
+ +
/Doctrine/ORM/Query/AST/ConditionalPrimary.php at line 37
+

simpleConditionalExpression

+public mixed $simpleConditionalExpression +
+
+ +
+ +

Method Detail

+
/Doctrine/ORM/Query/AST/ConditionalPrimary.php at line 50
+

dispatch

+public void dispatch(mixed sqlWalker, mixed walker, $walker ) +
+

Double-dispatch method, supposed to dispatch back to the walker.

Implementation is not mandatory for all nodes.

+ +
+ +
/Doctrine/ORM/Query/AST/ConditionalPrimary.php at line 45
+

isConditionalExpression

+public void isConditionalExpression() +
+
+ +
+ +
/Doctrine/ORM/Query/AST/ConditionalPrimary.php at line 40
+

isSimpleConditionalExpression

+public void isSimpleConditionalExpression() +
+
+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/orm/query/ast/conditionalterm.html b/lib/api/doctrine/orm/query/ast/conditionalterm.html new file mode 100644 index 000000000..42ba8ae37 --- /dev/null +++ b/lib/api/doctrine/orm/query/ast/conditionalterm.html @@ -0,0 +1,152 @@ + + + + + + + + + + + +ConditionalTerm (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +
Doctrine\ORM\Query\AST\ConditionalTerm
+
/Doctrine/ORM/Query/AST/ConditionalTerm.php at line 35
+ +

Class ConditionalTerm

+ +
Class:ConditionalTerm - Superclass: Node
+Node
⌊ ConditionalTerm
+ +
+ +

public class ConditionalTerm
extends Node + +

+ +

ConditionalTerm ::= ConditionalFactor {"AND" ConditionalFactor}

+ +
+
License:
+
http://www.opensource.org/licenses/lgpl-license.php LGPL
+
See Also:
+
www.doctrine-project.org
+
Since:
+
2.0
+
Version:
+
$Revision: 3938 $
+
Author:
+
Guilherme Blanco
+
Jonathan Wage
+
Roman Borschel
+
+
+ + + + + + + +
Field Summary
mixed

$conditionalFactors

+ + + + + + +
Constructor Summary

ConditionalTerm(mixed conditionalFactors)

+ + + + + + + +
Method Summary
void

dispatch(mixed sqlWalker, mixed walker, $walker )

Double-dispatch method, supposed to dispatch back to the walker. +

+ + + +
Methods inherited from Doctrine\ORM\Query\AST\Node
dispatch, dump
+ +

Field Detail

+
/Doctrine/ORM/Query/AST/ConditionalTerm.php at line 37
+

conditionalFactors

+public mixed $conditionalFactors = array() +
+
+ +
+ +

Constructor Detail

+
/Doctrine/ORM/Query/AST/ConditionalTerm.php at line 39
+

ConditionalTerm

+public ConditionalTerm(mixed conditionalFactors) +
+
+ +
+ +

Method Detail

+
/Doctrine/ORM/Query/AST/ConditionalTerm.php at line 44
+

dispatch

+public void dispatch(mixed sqlWalker, mixed walker, $walker ) +
+

Double-dispatch method, supposed to dispatch back to the walker.

Implementation is not mandatory for all nodes.

+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/orm/query/ast/deleteclause.html b/lib/api/doctrine/orm/query/ast/deleteclause.html new file mode 100644 index 000000000..681ea9242 --- /dev/null +++ b/lib/api/doctrine/orm/query/ast/deleteclause.html @@ -0,0 +1,164 @@ + + + + + + + + + + + +DeleteClause (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +
Doctrine\ORM\Query\AST\DeleteClause
+
/Doctrine/ORM/Query/AST/DeleteClause.php at line 35
+ +

Class DeleteClause

+ +
Class:DeleteClause - Superclass: Node
+Node
⌊ DeleteClause
+ +
+ +

public class DeleteClause
extends Node + +

+ +

DeleteClause ::= "DELETE" ["FROM"] AbstractSchemaName [["AS"] AliasIdentificationVariable]

+ +
+
License:
+
http://www.opensource.org/licenses/lgpl-license.php LGPL
+
See Also:
+
www.doctrine-project.org
+
Since:
+
2.0
+
Version:
+
$Revision: 3938 $
+
Author:
+
Guilherme Blanco
+
Jonathan Wage
+
Roman Borschel
+
+
+ + + + + + + + + + + +
Field Summary
mixed

$abstractSchemaName

mixed

$aliasIdentificationVariable

+ + + + + + +
Constructor Summary

DeleteClause(mixed abstractSchemaName)

+ + + + + + + +
Method Summary
void

dispatch(mixed sqlWalker, mixed walker, $walker )

Double-dispatch method, supposed to dispatch back to the walker. +

+ + + +
Methods inherited from Doctrine\ORM\Query\AST\Node
dispatch, dump
+ +

Field Detail

+
/Doctrine/ORM/Query/AST/DeleteClause.php at line 37
+

abstractSchemaName

+public mixed $abstractSchemaName +
+
+ +
+ +
/Doctrine/ORM/Query/AST/DeleteClause.php at line 38
+

aliasIdentificationVariable

+public mixed $aliasIdentificationVariable +
+
+ +
+ +

Constructor Detail

+
/Doctrine/ORM/Query/AST/DeleteClause.php at line 40
+

DeleteClause

+public DeleteClause(mixed abstractSchemaName) +
+
+ +
+ +

Method Detail

+
/Doctrine/ORM/Query/AST/DeleteClause.php at line 45
+

dispatch

+public void dispatch(mixed sqlWalker, mixed walker, $walker ) +
+

Double-dispatch method, supposed to dispatch back to the walker.

Implementation is not mandatory for all nodes.

+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/orm/query/ast/deletestatement.html b/lib/api/doctrine/orm/query/ast/deletestatement.html new file mode 100644 index 000000000..dd8eb0980 --- /dev/null +++ b/lib/api/doctrine/orm/query/ast/deletestatement.html @@ -0,0 +1,164 @@ + + + + + + + + + + + +DeleteStatement (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +
Doctrine\ORM\Query\AST\DeleteStatement
+
/Doctrine/ORM/Query/AST/DeleteStatement.php at line 35
+ +

Class DeleteStatement

+ +
Class:DeleteStatement - Superclass: Node
+Node
⌊ DeleteStatement
+ +
+ +

public class DeleteStatement
extends Node + +

+ +

DeleteStatement = DeleteClause [WhereClause]

+ +
+
License:
+
http://www.opensource.org/licenses/lgpl-license.php LGPL
+
See Also:
+
www.doctrine-project.org
+
Since:
+
2.0
+
Version:
+
$Revision: 3938 $
+
Author:
+
Guilherme Blanco
+
Jonathan Wage
+
Roman Borschel
+
+
+ + + + + + + + + + + +
Field Summary
mixed

$deleteClause

mixed

$whereClause

+ + + + + + +
Constructor Summary

DeleteStatement(mixed deleteClause)

+ + + + + + + +
Method Summary
void

dispatch(mixed sqlWalker, mixed walker, $walker )

Double-dispatch method, supposed to dispatch back to the walker. +

+ + + +
Methods inherited from Doctrine\ORM\Query\AST\Node
dispatch, dump
+ +

Field Detail

+
/Doctrine/ORM/Query/AST/DeleteStatement.php at line 37
+

deleteClause

+public mixed $deleteClause +
+
+ +
+ +
/Doctrine/ORM/Query/AST/DeleteStatement.php at line 38
+

whereClause

+public mixed $whereClause +
+
+ +
+ +

Constructor Detail

+
/Doctrine/ORM/Query/AST/DeleteStatement.php at line 40
+

DeleteStatement

+public DeleteStatement(mixed deleteClause) +
+
+ +
+ +

Method Detail

+
/Doctrine/ORM/Query/AST/DeleteStatement.php at line 45
+

dispatch

+public void dispatch(mixed sqlWalker, mixed walker, $walker ) +
+

Double-dispatch method, supposed to dispatch back to the walker.

Implementation is not mandatory for all nodes.

+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/orm/query/ast/emptycollectioncomparisonexpression.html b/lib/api/doctrine/orm/query/ast/emptycollectioncomparisonexpression.html new file mode 100644 index 000000000..37cb2b18f --- /dev/null +++ b/lib/api/doctrine/orm/query/ast/emptycollectioncomparisonexpression.html @@ -0,0 +1,164 @@ + + + + + + + + + + + +EmptyCollectionComparisonExpression (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +
Doctrine\ORM\Query\AST\EmptyCollectionComparisonExpression
+
/Doctrine/ORM/Query/AST/EmptyCollectionComparisonExpression.php at line 35
+ +

Class EmptyCollectionComparisonExpression

+ +
Class:EmptyCollectionComparisonExpression - Superclass: Node
+Node
⌊ EmptyCollectionComparisonExpression
+ +
+ +

public class EmptyCollectionComparisonExpression
extends Node + +

+ +

EmptyCollectionComparisonExpression ::= CollectionValuedPathExpression "IS" ["NOT"] "EMPTY"

+ +
+
License:
+
http://www.opensource.org/licenses/lgpl-license.php LGPL
+
See Also:
+
www.doctrine-project.org
+
Since:
+
2.0
+
Version:
+
$Revision: 3938 $
+
Author:
+
Guilherme Blanco
+
Jonathan Wage
+
Roman Borschel
+
+
+ + + + + + + + + + + +
Field Summary
mixed

$expression

mixed

$not

+ + + + + + +
Constructor Summary

EmptyCollectionComparisonExpression(mixed expression)

+ + + + + + + +
Method Summary
void

dispatch(mixed sqlWalker, mixed walker, $walker )

Double-dispatch method, supposed to dispatch back to the walker. +

+ + + +
Methods inherited from Doctrine\ORM\Query\AST\Node
dispatch, dump
+ +

Field Detail

+
/Doctrine/ORM/Query/AST/EmptyCollectionComparisonExpression.php at line 37
+

expression

+public mixed $expression +
+
+ +
+ +
/Doctrine/ORM/Query/AST/EmptyCollectionComparisonExpression.php at line 38
+

not

+public mixed $not +
+
+ +
+ +

Constructor Detail

+
/Doctrine/ORM/Query/AST/EmptyCollectionComparisonExpression.php at line 40
+

EmptyCollectionComparisonExpression

+public EmptyCollectionComparisonExpression(mixed expression) +
+
+ +
+ +

Method Detail

+
/Doctrine/ORM/Query/AST/EmptyCollectionComparisonExpression.php at line 45
+

dispatch

+public void dispatch(mixed sqlWalker, mixed walker, $walker ) +
+

Double-dispatch method, supposed to dispatch back to the walker.

Implementation is not mandatory for all nodes.

+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/orm/query/ast/existsexpression.html b/lib/api/doctrine/orm/query/ast/existsexpression.html new file mode 100644 index 000000000..2e66ea5ee --- /dev/null +++ b/lib/api/doctrine/orm/query/ast/existsexpression.html @@ -0,0 +1,164 @@ + + + + + + + + + + + +ExistsExpression (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +
Doctrine\ORM\Query\AST\ExistsExpression
+
/Doctrine/ORM/Query/AST/ExistsExpression.php at line 35
+ +

Class ExistsExpression

+ +
Class:ExistsExpression - Superclass: Node
+Node
⌊ ExistsExpression
+ +
+ +

public class ExistsExpression
extends Node + +

+ +

ExistsExpression ::= ["NOT"] "EXISTS" "(" Subselect ")"

+ +
+
License:
+
http://www.opensource.org/licenses/lgpl-license.php LGPL
+
See Also:
+
www.doctrine-project.org
+
Since:
+
2.0
+
Version:
+
$Revision: 3938 $
+
Author:
+
Guilherme Blanco
+
Jonathan Wage
+
Roman Borschel
+
+
+ + + + + + + + + + + +
Field Summary
mixed

$not

mixed

$subselect

+ + + + + + +
Constructor Summary

ExistsExpression(mixed subselect)

+ + + + + + + +
Method Summary
void

dispatch(mixed sqlWalker, mixed walker, $walker )

Double-dispatch method, supposed to dispatch back to the walker. +

+ + + +
Methods inherited from Doctrine\ORM\Query\AST\Node
dispatch, dump
+ +

Field Detail

+
/Doctrine/ORM/Query/AST/ExistsExpression.php at line 37
+

not

+public mixed $not +
+
+ +
+ +
/Doctrine/ORM/Query/AST/ExistsExpression.php at line 38
+

subselect

+public mixed $subselect +
+
+ +
+ +

Constructor Detail

+
/Doctrine/ORM/Query/AST/ExistsExpression.php at line 40
+

ExistsExpression

+public ExistsExpression(mixed subselect) +
+
+ +
+ +

Method Detail

+
/Doctrine/ORM/Query/AST/ExistsExpression.php at line 45
+

dispatch

+public void dispatch(mixed sqlWalker, mixed walker, $walker ) +
+

Double-dispatch method, supposed to dispatch back to the walker.

Implementation is not mandatory for all nodes.

+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/orm/query/ast/fromclause.html b/lib/api/doctrine/orm/query/ast/fromclause.html new file mode 100644 index 000000000..250892a95 --- /dev/null +++ b/lib/api/doctrine/orm/query/ast/fromclause.html @@ -0,0 +1,152 @@ + + + + + + + + + + + +FromClause (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +
Doctrine\ORM\Query\AST\FromClause
+
/Doctrine/ORM/Query/AST/FromClause.php at line 35
+ +

Class FromClause

+ +
Class:FromClause - Superclass: Node
+Node
⌊ FromClause
+ +
+ +

public class FromClause
extends Node + +

+ +

FromClause ::= "FROM" IdentificationVariableDeclaration {"," IdentificationVariableDeclaration}

+ +
+
License:
+
http://www.opensource.org/licenses/lgpl-license.php LGPL
+
See Also:
+
www.doctrine-project.org
+
Since:
+
2.0
+
Version:
+
$Revision: 3938 $
+
Author:
+
Guilherme Blanco
+
Jonathan Wage
+
Roman Borschel
+
+
+ + + + + + + +
Field Summary
mixed

$identificationVariableDeclarations

+ + + + + + +
Constructor Summary

FromClause(mixed identificationVariableDeclarations)

+ + + + + + + +
Method Summary
void

dispatch(mixed sqlWalker, mixed walker, $walker )

Double-dispatch method, supposed to dispatch back to the walker. +

+ + + +
Methods inherited from Doctrine\ORM\Query\AST\Node
dispatch, dump
+ +

Field Detail

+
/Doctrine/ORM/Query/AST/FromClause.php at line 37
+

identificationVariableDeclarations

+public mixed $identificationVariableDeclarations = array() +
+
+ +
+ +

Constructor Detail

+
/Doctrine/ORM/Query/AST/FromClause.php at line 39
+

FromClause

+public FromClause(mixed identificationVariableDeclarations) +
+
+ +
+ +

Method Detail

+
/Doctrine/ORM/Query/AST/FromClause.php at line 44
+

dispatch

+public void dispatch(mixed sqlWalker, mixed walker, $walker ) +
+

Double-dispatch method, supposed to dispatch back to the walker.

Implementation is not mandatory for all nodes.

+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/orm/query/ast/functions/absfunction.html b/lib/api/doctrine/orm/query/ast/functions/absfunction.html new file mode 100644 index 000000000..5c8346cdd --- /dev/null +++ b/lib/api/doctrine/orm/query/ast/functions/absfunction.html @@ -0,0 +1,162 @@ + + + + + + + + + + + +AbsFunction (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +
Doctrine\ORM\Query\AST\Functions\AbsFunction
+
/Doctrine/ORM/Query/AST/Functions/AbsFunction.php at line 37
+ +

Class AbsFunction

+ +
Class:AbsFunction - Superclass: FunctionNode
+Class:FunctionNode - Superclass: Node
+Node
⌊ FunctionNode
⌊ AbsFunction
+ +
+ +

public class AbsFunction
extends FunctionNode + +

+ +

"ABS" "(" SimpleArithmeticExpression ")"

+ +
+
License:
+
http://www.opensource.org/licenses/lgpl-license.php LGPL
+
See Also:
+
www.doctrine-project.org
+
Since:
+
2.0
+
Version:
+
$Revision: 3938 $
+
Author:
+
Guilherme Blanco
+
Jonathan Wage
+
Roman Borschel
+
+
+ + + + + + + +
Field Summary
mixed

$simpleArithmeticExpression

+ + + +
Fields inherited from Doctrine\ORM\Query\AST\Functions\FunctionNode
name
+ + + + + + + + + + + +
Method Summary
void

getSql(mixed sqlWalker)

void

parse(mixed parser)

+ + + +
Methods inherited from Doctrine\ORM\Query\AST\Functions\FunctionNode
dispatch, getSql, parse
+ + + +
Methods inherited from Doctrine\ORM\Query\AST\Node
dispatch, dump
+ +

Field Detail

+
/Doctrine/ORM/Query/AST/Functions/AbsFunction.php at line 39
+

simpleArithmeticExpression

+public mixed $simpleArithmeticExpression +
+
+ +
+ +

Method Detail

+
/Doctrine/ORM/Query/AST/Functions/AbsFunction.php at line 44
+

getSql

+public void getSql(mixed sqlWalker) +
+

+
Override.
+
+
+ +
+ +
/Doctrine/ORM/Query/AST/Functions/AbsFunction.php at line 54
+

parse

+public void parse(mixed parser) +
+

+
Override.
+
+
+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/orm/query/ast/functions/concatfunction.html b/lib/api/doctrine/orm/query/ast/functions/concatfunction.html new file mode 100644 index 000000000..d75ee175a --- /dev/null +++ b/lib/api/doctrine/orm/query/ast/functions/concatfunction.html @@ -0,0 +1,174 @@ + + + + + + + + + + + +ConcatFunction (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +
Doctrine\ORM\Query\AST\Functions\ConcatFunction
+
/Doctrine/ORM/Query/AST/Functions/ConcatFunction.php at line 37
+ +

Class ConcatFunction

+ +
Class:ConcatFunction - Superclass: FunctionNode
+Class:FunctionNode - Superclass: Node
+Node
⌊ FunctionNode
⌊ ConcatFunction
+ +
+ +

public class ConcatFunction
extends FunctionNode + +

+ +

"CONCAT" "(" StringPrimary "," StringPrimary ")"

+ +
+
License:
+
http://www.opensource.org/licenses/lgpl-license.php LGPL
+
See Also:
+
www.doctrine-project.org
+
Since:
+
2.0
+
Version:
+
$Revision: 3938 $
+
Author:
+
Guilherme Blanco
+
Jonathan Wage
+
Roman Borschel
+
+
+ + + + + + + + + + + +
Field Summary
mixed

$firstStringPrimary

mixed

$secondStringPriamry

+ + + +
Fields inherited from Doctrine\ORM\Query\AST\Functions\FunctionNode
name
+ + + + + + + + + + + +
Method Summary
void

getSql(mixed sqlWalker)

void

parse(mixed parser)

+ + + +
Methods inherited from Doctrine\ORM\Query\AST\Functions\FunctionNode
dispatch, getSql, parse
+ + + +
Methods inherited from Doctrine\ORM\Query\AST\Node
dispatch, dump
+ +

Field Detail

+
/Doctrine/ORM/Query/AST/Functions/ConcatFunction.php at line 39
+

firstStringPrimary

+public mixed $firstStringPrimary +
+
+ +
+ +
/Doctrine/ORM/Query/AST/Functions/ConcatFunction.php at line 40
+

secondStringPriamry

+public mixed $secondStringPriamry +
+
+ +
+ +

Method Detail

+
/Doctrine/ORM/Query/AST/Functions/ConcatFunction.php at line 45
+

getSql

+public void getSql(mixed sqlWalker) +
+

+
Override.
+
+
+ +
+ +
/Doctrine/ORM/Query/AST/Functions/ConcatFunction.php at line 57
+

parse

+public void parse(mixed parser) +
+

+
Override.
+
+
+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/orm/query/ast/functions/currentdatefunction.html b/lib/api/doctrine/orm/query/ast/functions/currentdatefunction.html new file mode 100644 index 000000000..e7a39f4ac --- /dev/null +++ b/lib/api/doctrine/orm/query/ast/functions/currentdatefunction.html @@ -0,0 +1,145 @@ + + + + + + + + + + + +CurrentDateFunction (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +
Doctrine\ORM\Query\AST\Functions\CurrentDateFunction
+
/Doctrine/ORM/Query/AST/Functions/CurrentDateFunction.php at line 37
+ +

Class CurrentDateFunction

+ +
Class:CurrentDateFunction - Superclass: FunctionNode
+Class:FunctionNode - Superclass: Node
+Node
⌊ FunctionNode
⌊ CurrentDateFunction
+ +
+ +

public class CurrentDateFunction
extends FunctionNode + +

+ +

"CURRENT_DATE"

+ +
+
License:
+
http://www.opensource.org/licenses/lgpl-license.php LGPL
+
See Also:
+
www.doctrine-project.org
+
Since:
+
2.0
+
Version:
+
$Revision: 3938 $
+
Author:
+
Guilherme Blanco
+
Jonathan Wage
+
Roman Borschel
+
+
+ + + +
Fields inherited from Doctrine\ORM\Query\AST\Functions\FunctionNode
name
+ + + + + + + + + + + +
Method Summary
void

getSql(mixed sqlWalker)

void

parse(mixed parser)

+ + + +
Methods inherited from Doctrine\ORM\Query\AST\Functions\FunctionNode
dispatch, getSql, parse
+ + + +
Methods inherited from Doctrine\ORM\Query\AST\Node
dispatch, dump
+ +

Method Detail

+
/Doctrine/ORM/Query/AST/Functions/CurrentDateFunction.php at line 42
+

getSql

+public void getSql(mixed sqlWalker) +
+

+
Override.
+
+
+ +
+ +
/Doctrine/ORM/Query/AST/Functions/CurrentDateFunction.php at line 50
+

parse

+public void parse(mixed parser) +
+

+
Override.
+
+
+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/orm/query/ast/functions/currenttimefunction.html b/lib/api/doctrine/orm/query/ast/functions/currenttimefunction.html new file mode 100644 index 000000000..6622d990d --- /dev/null +++ b/lib/api/doctrine/orm/query/ast/functions/currenttimefunction.html @@ -0,0 +1,145 @@ + + + + + + + + + + + +CurrentTimeFunction (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +
Doctrine\ORM\Query\AST\Functions\CurrentTimeFunction
+
/Doctrine/ORM/Query/AST/Functions/CurrentTimeFunction.php at line 37
+ +

Class CurrentTimeFunction

+ +
Class:CurrentTimeFunction - Superclass: FunctionNode
+Class:FunctionNode - Superclass: Node
+Node
⌊ FunctionNode
⌊ CurrentTimeFunction
+ +
+ +

public class CurrentTimeFunction
extends FunctionNode + +

+ +

"CURRENT_TIME"

+ +
+
License:
+
http://www.opensource.org/licenses/lgpl-license.php LGPL
+
See Also:
+
www.doctrine-project.org
+
Since:
+
2.0
+
Version:
+
$Revision: 3938 $
+
Author:
+
Guilherme Blanco
+
Jonathan Wage
+
Roman Borschel
+
+
+ + + +
Fields inherited from Doctrine\ORM\Query\AST\Functions\FunctionNode
name
+ + + + + + + + + + + +
Method Summary
void

getSql(mixed sqlWalker)

void

parse(mixed parser)

+ + + +
Methods inherited from Doctrine\ORM\Query\AST\Functions\FunctionNode
dispatch, getSql, parse
+ + + +
Methods inherited from Doctrine\ORM\Query\AST\Node
dispatch, dump
+ +

Method Detail

+
/Doctrine/ORM/Query/AST/Functions/CurrentTimeFunction.php at line 42
+

getSql

+public void getSql(mixed sqlWalker) +
+

+
Override.
+
+
+ +
+ +
/Doctrine/ORM/Query/AST/Functions/CurrentTimeFunction.php at line 50
+

parse

+public void parse(mixed parser) +
+

+
Override.
+
+
+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/orm/query/ast/functions/currenttimestampfunction.html b/lib/api/doctrine/orm/query/ast/functions/currenttimestampfunction.html new file mode 100644 index 000000000..98ec3a730 --- /dev/null +++ b/lib/api/doctrine/orm/query/ast/functions/currenttimestampfunction.html @@ -0,0 +1,143 @@ + + + + + + + + + + + +CurrentTimestampFunction (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +
Doctrine\ORM\Query\AST\Functions\CurrentTimestampFunction
+
/Doctrine/ORM/Query/AST/Functions/CurrentTimestampFunction.php at line 16
+ +

Class CurrentTimestampFunction

+ +
Class:CurrentTimestampFunction - Superclass: FunctionNode
+Class:FunctionNode - Superclass: Node
+Node
⌊ FunctionNode
⌊ CurrentTimestampFunction
+ +
+ +

public class CurrentTimestampFunction
extends FunctionNode + +

+ +

"CURRENT_TIMESTAMP"

+ +
+
Author:
+
robo
+
License:
+
http://www.opensource.org/licenses/lgpl-license.php LGPL
+
See Also:
+
www.doctrine-project.org
+
Since:
+
2.0
+
Version:
+
$Revision: 3938 $
+
+
+ + + +
Fields inherited from Doctrine\ORM\Query\AST\Functions\FunctionNode
name
+ + + + + + + + + + + +
Method Summary
void

getSql(mixed sqlWalker)

void

parse(mixed parser)

+ + + +
Methods inherited from Doctrine\ORM\Query\AST\Functions\FunctionNode
dispatch, getSql, parse
+ + + +
Methods inherited from Doctrine\ORM\Query\AST\Node
dispatch, dump
+ +

Method Detail

+
/Doctrine/ORM/Query/AST/Functions/CurrentTimestampFunction.php at line 21
+

getSql

+public void getSql(mixed sqlWalker) +
+

+
Override.
+
+
+ +
+ +
/Doctrine/ORM/Query/AST/Functions/CurrentTimestampFunction.php at line 29
+

parse

+public void parse(mixed parser) +
+

+
Override.
+
+
+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/orm/query/ast/functions/functionnode.html b/lib/api/doctrine/orm/query/ast/functions/functionnode.html new file mode 100644 index 000000000..d8afef84a --- /dev/null +++ b/lib/api/doctrine/orm/query/ast/functions/functionnode.html @@ -0,0 +1,176 @@ + + + + + + + + + + + +FunctionNode (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +
Doctrine\ORM\Query\AST\Functions\FunctionNode
+
/Doctrine/ORM/Query/AST/Functions/FunctionNode.php at line 37
+ +

Class FunctionNode

+ +
Class:FunctionNode - Superclass: Node
+Node
⌊ FunctionNode
+ +
+ +

public abstract class FunctionNode
extends Node + +

+ +

Abtract Function Node.

+ +
+
License:
+
http://www.opensource.org/licenses/lgpl-license.php LGPL
+
See Also:
+
www.doctrine-project.org
+
Since:
+
2.0
+
Version:
+
$Revision: 3938 $
+
Author:
+
Guilherme Blanco
+
Jonathan Wage
+
Roman Borschel
+
+
+ + + + + + + +
Field Summary
mixed

$name

+ + + + + + +
Constructor Summary

FunctionNode(mixed name)

+ + + + + + + + + + + + + + + +
Method Summary
void

dispatch(mixed sqlWalker, mixed walker, $walker )

Double-dispatch method, supposed to dispatch back to the walker. +

abstract void

getSql(mixed sqlWalker)

abstract void

parse(mixed parser)

+ + + +
Methods inherited from Doctrine\ORM\Query\AST\Node
dispatch, dump
+ +

Field Detail

+
/Doctrine/ORM/Query/AST/Functions/FunctionNode.php at line 39
+

name

+public mixed $name +
+
+ +
+ +

Constructor Detail

+
/Doctrine/ORM/Query/AST/Functions/FunctionNode.php at line 41
+

FunctionNode

+public FunctionNode(mixed name) +
+
+ +
+ +

Method Detail

+
/Doctrine/ORM/Query/AST/Functions/FunctionNode.php at line 48
+

dispatch

+public void dispatch(mixed sqlWalker, mixed walker, $walker ) +
+

Double-dispatch method, supposed to dispatch back to the walker.

Implementation is not mandatory for all nodes.

+ +
+ +
/Doctrine/ORM/Query/AST/Functions/FunctionNode.php at line 46
+

getSql

+public abstract void getSql(mixed sqlWalker) +
+
+ +
+ +
/Doctrine/ORM/Query/AST/Functions/FunctionNode.php at line 53
+

parse

+public abstract void parse(mixed parser) +
+
+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/orm/query/ast/functions/lengthfunction.html b/lib/api/doctrine/orm/query/ast/functions/lengthfunction.html new file mode 100644 index 000000000..90b63e899 --- /dev/null +++ b/lib/api/doctrine/orm/query/ast/functions/lengthfunction.html @@ -0,0 +1,162 @@ + + + + + + + + + + + +LengthFunction (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +
Doctrine\ORM\Query\AST\Functions\LengthFunction
+
/Doctrine/ORM/Query/AST/Functions/LengthFunction.php at line 37
+ +

Class LengthFunction

+ +
Class:LengthFunction - Superclass: FunctionNode
+Class:FunctionNode - Superclass: Node
+Node
⌊ FunctionNode
⌊ LengthFunction
+ +
+ +

public class LengthFunction
extends FunctionNode + +

+ +

"LENGTH" "(" StringPrimary ")"

+ +
+
License:
+
http://www.opensource.org/licenses/lgpl-license.php LGPL
+
See Also:
+
www.doctrine-project.org
+
Since:
+
2.0
+
Version:
+
$Revision: 3938 $
+
Author:
+
Guilherme Blanco
+
Jonathan Wage
+
Roman Borschel
+
+
+ + + + + + + +
Field Summary
mixed

$stringPrimary

+ + + +
Fields inherited from Doctrine\ORM\Query\AST\Functions\FunctionNode
name
+ + + + + + + + + + + +
Method Summary
void

getSql(mixed sqlWalker)

void

parse(mixed parser)

+ + + +
Methods inherited from Doctrine\ORM\Query\AST\Functions\FunctionNode
dispatch, getSql, parse
+ + + +
Methods inherited from Doctrine\ORM\Query\AST\Node
dispatch, dump
+ +

Field Detail

+
/Doctrine/ORM/Query/AST/Functions/LengthFunction.php at line 39
+

stringPrimary

+public mixed $stringPrimary +
+
+ +
+ +

Method Detail

+
/Doctrine/ORM/Query/AST/Functions/LengthFunction.php at line 44
+

getSql

+public void getSql(mixed sqlWalker) +
+

+
Override.
+
+
+ +
+ +
/Doctrine/ORM/Query/AST/Functions/LengthFunction.php at line 53
+

parse

+public void parse(mixed parser) +
+

+
Override.
+
+
+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/orm/query/ast/functions/locatefunction.html b/lib/api/doctrine/orm/query/ast/functions/locatefunction.html new file mode 100644 index 000000000..3e7613c65 --- /dev/null +++ b/lib/api/doctrine/orm/query/ast/functions/locatefunction.html @@ -0,0 +1,186 @@ + + + + + + + + + + + +LocateFunction (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +
Doctrine\ORM\Query\AST\Functions\LocateFunction
+
/Doctrine/ORM/Query/AST/Functions/LocateFunction.php at line 37
+ +

Class LocateFunction

+ +
Class:LocateFunction - Superclass: FunctionNode
+Class:FunctionNode - Superclass: Node
+Node
⌊ FunctionNode
⌊ LocateFunction
+ +
+ +

public class LocateFunction
extends FunctionNode + +

+ +

"LOCATE" "(" StringPrimary "," StringPrimary ["," SimpleArithmeticExpression]")"

+ +
+
License:
+
http://www.opensource.org/licenses/lgpl-license.php LGPL
+
See Also:
+
www.doctrine-project.org
+
Since:
+
2.0
+
Version:
+
$Revision: 3938 $
+
Author:
+
Guilherme Blanco
+
Jonathan Wage
+
Roman Borschel
+
+
+ + + + + + + + + + + + + + + +
Field Summary
mixed

$firstStringPrimary

mixed

$secondStringPrimary

mixed

$simpleArithmeticExpression

+ + + +
Fields inherited from Doctrine\ORM\Query\AST\Functions\FunctionNode
name
+ + + + + + + + + + + +
Method Summary
void

getSql(mixed sqlWalker)

void

parse(mixed parser)

+ + + +
Methods inherited from Doctrine\ORM\Query\AST\Functions\FunctionNode
dispatch, getSql, parse
+ + + +
Methods inherited from Doctrine\ORM\Query\AST\Node
dispatch, dump
+ +

Field Detail

+
/Doctrine/ORM/Query/AST/Functions/LocateFunction.php at line 39
+

firstStringPrimary

+public mixed $firstStringPrimary +
+
+ +
+ +
/Doctrine/ORM/Query/AST/Functions/LocateFunction.php at line 40
+

secondStringPrimary

+public mixed $secondStringPrimary +
+
+ +
+ +
/Doctrine/ORM/Query/AST/Functions/LocateFunction.php at line 41
+

simpleArithmeticExpression

+public mixed $simpleArithmeticExpression = false +
+
+ +
+ +

Method Detail

+
/Doctrine/ORM/Query/AST/Functions/LocateFunction.php at line 46
+

getSql

+public void getSql(mixed sqlWalker) +
+

+
Override.
+
+
+ +
+ +
/Doctrine/ORM/Query/AST/Functions/LocateFunction.php at line 62
+

parse

+public void parse(mixed parser) +
+

+
Override.
+
+
+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/orm/query/ast/functions/lowerfunction.html b/lib/api/doctrine/orm/query/ast/functions/lowerfunction.html new file mode 100644 index 000000000..4bdc023a4 --- /dev/null +++ b/lib/api/doctrine/orm/query/ast/functions/lowerfunction.html @@ -0,0 +1,162 @@ + + + + + + + + + + + +LowerFunction (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +
Doctrine\ORM\Query\AST\Functions\LowerFunction
+
/Doctrine/ORM/Query/AST/Functions/LowerFunction.php at line 37
+ +

Class LowerFunction

+ +
Class:LowerFunction - Superclass: FunctionNode
+Class:FunctionNode - Superclass: Node
+Node
⌊ FunctionNode
⌊ LowerFunction
+ +
+ +

public class LowerFunction
extends FunctionNode + +

+ +

"LOWER" "(" StringPrimary ")"

+ +
+
License:
+
http://www.opensource.org/licenses/lgpl-license.php LGPL
+
See Also:
+
www.doctrine-project.org
+
Since:
+
2.0
+
Version:
+
$Revision: 3938 $
+
Author:
+
Guilherme Blanco
+
Jonathan Wage
+
Roman Borschel
+
+
+ + + + + + + +
Field Summary
mixed

$stringPrimary

+ + + +
Fields inherited from Doctrine\ORM\Query\AST\Functions\FunctionNode
name
+ + + + + + + + + + + +
Method Summary
void

getSql(mixed sqlWalker)

void

parse(mixed parser)

+ + + +
Methods inherited from Doctrine\ORM\Query\AST\Functions\FunctionNode
dispatch, getSql, parse
+ + + +
Methods inherited from Doctrine\ORM\Query\AST\Node
dispatch, dump
+ +

Field Detail

+
/Doctrine/ORM/Query/AST/Functions/LowerFunction.php at line 39
+

stringPrimary

+public mixed $stringPrimary +
+
+ +
+ +

Method Detail

+
/Doctrine/ORM/Query/AST/Functions/LowerFunction.php at line 44
+

getSql

+public void getSql(mixed sqlWalker) +
+

+
Override.
+
+
+ +
+ +
/Doctrine/ORM/Query/AST/Functions/LowerFunction.php at line 53
+

parse

+public void parse(mixed parser) +
+

+
Override.
+
+
+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/orm/query/ast/functions/modfunction.html b/lib/api/doctrine/orm/query/ast/functions/modfunction.html new file mode 100644 index 000000000..d969d6254 --- /dev/null +++ b/lib/api/doctrine/orm/query/ast/functions/modfunction.html @@ -0,0 +1,174 @@ + + + + + + + + + + + +ModFunction (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +
Doctrine\ORM\Query\AST\Functions\ModFunction
+
/Doctrine/ORM/Query/AST/Functions/ModFunction.php at line 37
+ +

Class ModFunction

+ +
Class:ModFunction - Superclass: FunctionNode
+Class:FunctionNode - Superclass: Node
+Node
⌊ FunctionNode
⌊ ModFunction
+ +
+ +

public class ModFunction
extends FunctionNode + +

+ +

"MOD" "(" SimpleArithmeticExpression "," SimpleArithmeticExpression ")"

+ +
+
License:
+
http://www.opensource.org/licenses/lgpl-license.php LGPL
+
See Also:
+
www.doctrine-project.org
+
Since:
+
2.0
+
Version:
+
$Revision: 3938 $
+
Author:
+
Guilherme Blanco
+
Jonathan Wage
+
Roman Borschel
+
+
+ + + + + + + + + + + +
Field Summary
mixed

$firstSimpleArithmeticExpression

mixed

$secondSimpleArithmeticExpression

+ + + +
Fields inherited from Doctrine\ORM\Query\AST\Functions\FunctionNode
name
+ + + + + + + + + + + +
Method Summary
void

getSql(mixed sqlWalker)

void

parse(mixed parser)

+ + + +
Methods inherited from Doctrine\ORM\Query\AST\Functions\FunctionNode
dispatch, getSql, parse
+ + + +
Methods inherited from Doctrine\ORM\Query\AST\Node
dispatch, dump
+ +

Field Detail

+
/Doctrine/ORM/Query/AST/Functions/ModFunction.php at line 39
+

firstSimpleArithmeticExpression

+public mixed $firstSimpleArithmeticExpression +
+
+ +
+ +
/Doctrine/ORM/Query/AST/Functions/ModFunction.php at line 40
+

secondSimpleArithmeticExpression

+public mixed $secondSimpleArithmeticExpression +
+
+ +
+ +

Method Detail

+
/Doctrine/ORM/Query/AST/Functions/ModFunction.php at line 45
+

getSql

+public void getSql(mixed sqlWalker) +
+

+
Override.
+
+
+ +
+ +
/Doctrine/ORM/Query/AST/Functions/ModFunction.php at line 58
+

parse

+public void parse(mixed parser) +
+

+
Override.
+
+
+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/orm/query/ast/functions/package-frame.html b/lib/api/doctrine/orm/query/ast/functions/package-frame.html new file mode 100644 index 000000000..d9ab6c3be --- /dev/null +++ b/lib/api/doctrine/orm/query/ast/functions/package-frame.html @@ -0,0 +1,40 @@ + + + + + + + + + + + +Doctrine\ORM\Query\AST\Functions (Doctrine) + + + + +

Doctrine\ORM\Query\AST\Functions

+ +

Classes

+ + + + + \ No newline at end of file diff --git a/lib/api/doctrine/orm/query/ast/functions/package-functions.html b/lib/api/doctrine/orm/query/ast/functions/package-functions.html new file mode 100644 index 000000000..3bea90935 --- /dev/null +++ b/lib/api/doctrine/orm/query/ast/functions/package-functions.html @@ -0,0 +1,69 @@ + + + + + + + + + + + +Functions (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +

Functions

+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/orm/query/ast/functions/package-globals.html b/lib/api/doctrine/orm/query/ast/functions/package-globals.html new file mode 100644 index 000000000..2e6bd8e42 --- /dev/null +++ b/lib/api/doctrine/orm/query/ast/functions/package-globals.html @@ -0,0 +1,69 @@ + + + + + + + + + + + +Globals (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +

Globals

+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/orm/query/ast/functions/package-summary.html b/lib/api/doctrine/orm/query/ast/functions/package-summary.html new file mode 100644 index 000000000..63626937b --- /dev/null +++ b/lib/api/doctrine/orm/query/ast/functions/package-summary.html @@ -0,0 +1,78 @@ + + + + + + + + + + + +Doctrine\ORM\Query\AST\Functions (Doctrine) + + + + +
+

Doctrine

+ +
+ + +
+ +

Namespace Doctrine\ORM\Query\AST\Functions

+ + + + + + + + + + + + + + + + + + +
Class Summary
AbsFunction"ABS" "(" SimpleArithmeticExpression ")"
ConcatFunction"CONCAT" "(" StringPrimary "," StringPrimary ")"
CurrentDateFunction"CURRENT_DATE"
CurrentTimeFunction"CURRENT_TIME"
CurrentTimestampFunction"CURRENT_TIMESTAMP"
FunctionNodeAbtract Function Node.
LengthFunction"LENGTH" "(" StringPrimary ")"
LocateFunction"LOCATE" "(" StringPrimary "," StringPrimary ["," SimpleArithmeticExpression]")"
LowerFunction"LOWER" "(" StringPrimary ")"
ModFunction"MOD" "(" SimpleArithmeticExpression "," SimpleArithmeticExpression ")"
SizeFunction"SIZE" "(" CollectionValuedPathExpression ")"
SqrtFunction"SQRT" "(" SimpleArithmeticExpression ")"
SubstringFunction"SUBSTRING" "(" StringPrimary "," SimpleArithmeticExpression "," SimpleArithmeticExpression ")"
TrimFunction"TRIM" "(" [["LEADING" | "TRAILING" | "BOTH"] [char] "FROM"] StringPrimary ")"
UpperFunction"UPPER" "(" StringPrimary ")"
+ +
+ +
+

Doctrine

+ +
+ + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/orm/query/ast/functions/package-tree.html b/lib/api/doctrine/orm/query/ast/functions/package-tree.html new file mode 100644 index 000000000..2bf66f683 --- /dev/null +++ b/lib/api/doctrine/orm/query/ast/functions/package-tree.html @@ -0,0 +1,75 @@ + + + + + + + + + + + +Doctrine\ORM\Query\AST\Functions (Doctrine) + + + + +
+

Doctrine

+ +
+ + +

Class Hierarchy for Package Doctrine\ORM\Query\AST\Functions

+
+

Doctrine

+ +
+ + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/orm/query/ast/functions/sizefunction.html b/lib/api/doctrine/orm/query/ast/functions/sizefunction.html new file mode 100644 index 000000000..da0ea571f --- /dev/null +++ b/lib/api/doctrine/orm/query/ast/functions/sizefunction.html @@ -0,0 +1,165 @@ + + + + + + + + + + + +SizeFunction (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +
Doctrine\ORM\Query\AST\Functions\SizeFunction
+
/Doctrine/ORM/Query/AST/Functions/SizeFunction.php at line 38
+ +

Class SizeFunction

+ +
Class:SizeFunction - Superclass: FunctionNode
+Class:FunctionNode - Superclass: Node
+Node
⌊ FunctionNode
⌊ SizeFunction
+ +
+ +

public class SizeFunction
extends FunctionNode + +

+ +

"SIZE" "(" CollectionValuedPathExpression ")"

+ +
+
License:
+
http://www.opensource.org/licenses/lgpl-license.php LGPL
+
See Also:
+
www.doctrine-project.org
+
Since:
+
2.0
+
Version:
+
$Revision: 3938 $
+
Author:
+
Guilherme Blanco
+
Jonathan Wage
+
Roman Borschel
+
Benjamin Eberlei
+
+
+ + + + + + + +
Field Summary
mixed

$collectionPathExpression

+ + + +
Fields inherited from Doctrine\ORM\Query\AST\Functions\FunctionNode
name
+ + + + + + + + + + + +
Method Summary
void

getSql(mixed sqlWalker)

void

parse(mixed parser)

+ + + +
Methods inherited from Doctrine\ORM\Query\AST\Functions\FunctionNode
dispatch, getSql, parse
+ + + +
Methods inherited from Doctrine\ORM\Query\AST\Node
dispatch, dump
+ +

Field Detail

+
/Doctrine/ORM/Query/AST/Functions/SizeFunction.php at line 40
+

collectionPathExpression

+public mixed $collectionPathExpression +
+
+ +
+ +

Method Detail

+
/Doctrine/ORM/Query/AST/Functions/SizeFunction.php at line 46
+

getSql

+public void getSql(mixed sqlWalker) +
+

+
Override.
+
Todo:
+
If the collection being counted is already joined, the SQL can be simpler (more efficient).
+
+
+ +
+ +
/Doctrine/ORM/Query/AST/Functions/SizeFunction.php at line 93
+

parse

+public void parse(mixed parser) +
+

+
Override.
+
+
+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/orm/query/ast/functions/sqrtfunction.html b/lib/api/doctrine/orm/query/ast/functions/sqrtfunction.html new file mode 100644 index 000000000..715fa7182 --- /dev/null +++ b/lib/api/doctrine/orm/query/ast/functions/sqrtfunction.html @@ -0,0 +1,162 @@ + + + + + + + + + + + +SqrtFunction (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +
Doctrine\ORM\Query\AST\Functions\SqrtFunction
+
/Doctrine/ORM/Query/AST/Functions/SqrtFunction.php at line 37
+ +

Class SqrtFunction

+ +
Class:SqrtFunction - Superclass: FunctionNode
+Class:FunctionNode - Superclass: Node
+Node
⌊ FunctionNode
⌊ SqrtFunction
+ +
+ +

public class SqrtFunction
extends FunctionNode + +

+ +

"SQRT" "(" SimpleArithmeticExpression ")"

+ +
+
License:
+
http://www.opensource.org/licenses/lgpl-license.php LGPL
+
See Also:
+
www.doctrine-project.org
+
Since:
+
2.0
+
Version:
+
$Revision: 3938 $
+
Author:
+
Guilherme Blanco
+
Jonathan Wage
+
Roman Borschel
+
+
+ + + + + + + +
Field Summary
mixed

$simpleArithmeticExpression

+ + + +
Fields inherited from Doctrine\ORM\Query\AST\Functions\FunctionNode
name
+ + + + + + + + + + + +
Method Summary
void

getSql(mixed sqlWalker)

void

parse(mixed parser)

+ + + +
Methods inherited from Doctrine\ORM\Query\AST\Functions\FunctionNode
dispatch, getSql, parse
+ + + +
Methods inherited from Doctrine\ORM\Query\AST\Node
dispatch, dump
+ +

Field Detail

+
/Doctrine/ORM/Query/AST/Functions/SqrtFunction.php at line 39
+

simpleArithmeticExpression

+public mixed $simpleArithmeticExpression +
+
+ +
+ +

Method Detail

+
/Doctrine/ORM/Query/AST/Functions/SqrtFunction.php at line 44
+

getSql

+public void getSql(mixed sqlWalker) +
+

+
Override.
+
+
+ +
+ +
/Doctrine/ORM/Query/AST/Functions/SqrtFunction.php at line 53
+

parse

+public void parse(mixed parser) +
+

+
Override.
+
+
+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/orm/query/ast/functions/substringfunction.html b/lib/api/doctrine/orm/query/ast/functions/substringfunction.html new file mode 100644 index 000000000..534513793 --- /dev/null +++ b/lib/api/doctrine/orm/query/ast/functions/substringfunction.html @@ -0,0 +1,186 @@ + + + + + + + + + + + +SubstringFunction (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +
Doctrine\ORM\Query\AST\Functions\SubstringFunction
+
/Doctrine/ORM/Query/AST/Functions/SubstringFunction.php at line 37
+ +

Class SubstringFunction

+ +
Class:SubstringFunction - Superclass: FunctionNode
+Class:FunctionNode - Superclass: Node
+Node
⌊ FunctionNode
⌊ SubstringFunction
+ +
+ +

public class SubstringFunction
extends FunctionNode + +

+ +

"SUBSTRING" "(" StringPrimary "," SimpleArithmeticExpression "," SimpleArithmeticExpression ")"

+ +
+
License:
+
http://www.opensource.org/licenses/lgpl-license.php LGPL
+
See Also:
+
www.doctrine-project.org
+
Since:
+
2.0
+
Version:
+
$Revision: 3938 $
+
Author:
+
Guilherme Blanco
+
Jonathan Wage
+
Roman Borschel
+
+
+ + + + + + + + + + + + + + + +
Field Summary
mixed

$firstSimpleArithmeticExpression

mixed

$secondSimpleArithmeticExpression

mixed

$stringPrimary

+ + + +
Fields inherited from Doctrine\ORM\Query\AST\Functions\FunctionNode
name
+ + + + + + + + + + + +
Method Summary
void

getSql(mixed sqlWalker)

void

parse(mixed parser)

+ + + +
Methods inherited from Doctrine\ORM\Query\AST\Functions\FunctionNode
dispatch, getSql, parse
+ + + +
Methods inherited from Doctrine\ORM\Query\AST\Node
dispatch, dump
+ +

Field Detail

+
/Doctrine/ORM/Query/AST/Functions/SubstringFunction.php at line 40
+

firstSimpleArithmeticExpression

+public mixed $firstSimpleArithmeticExpression +
+
+ +
+ +
/Doctrine/ORM/Query/AST/Functions/SubstringFunction.php at line 41
+

secondSimpleArithmeticExpression

+public mixed $secondSimpleArithmeticExpression = null +
+
+ +
+ +
/Doctrine/ORM/Query/AST/Functions/SubstringFunction.php at line 39
+

stringPrimary

+public mixed $stringPrimary +
+
+ +
+ +

Method Detail

+
/Doctrine/ORM/Query/AST/Functions/SubstringFunction.php at line 46
+

getSql

+public void getSql(mixed sqlWalker) +
+

+
Override.
+
+
+ +
+ +
/Doctrine/ORM/Query/AST/Functions/SubstringFunction.php at line 63
+

parse

+public void parse(mixed parser) +
+

+
Override.
+
+
+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/orm/query/ast/functions/trimfunction.html b/lib/api/doctrine/orm/query/ast/functions/trimfunction.html new file mode 100644 index 000000000..41b553981 --- /dev/null +++ b/lib/api/doctrine/orm/query/ast/functions/trimfunction.html @@ -0,0 +1,210 @@ + + + + + + + + + + + +TrimFunction (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +
Doctrine\ORM\Query\AST\Functions\TrimFunction
+
/Doctrine/ORM/Query/AST/Functions/TrimFunction.php at line 38
+ +

Class TrimFunction

+ +
Class:TrimFunction - Superclass: FunctionNode
+Class:FunctionNode - Superclass: Node
+Node
⌊ FunctionNode
⌊ TrimFunction
+ +
+ +

public class TrimFunction
extends FunctionNode + +

+ +

"TRIM" "(" [["LEADING" | "TRAILING" | "BOTH"] [char] "FROM"] StringPrimary ")"

+ +
+
License:
+
http://www.opensource.org/licenses/lgpl-license.php LGPL
+
See Also:
+
www.doctrine-project.org
+
Since:
+
2.0
+
Version:
+
$Revision: 3938 $
+
Author:
+
Guilherme Blanco
+
Jonathan Wage
+
Roman Borschel
+
+
+ + + + + + + + + + + + + + + + + + + + + + + +
Field Summary
mixed

$both

mixed

$leading

mixed

$stringPrimary

mixed

$trailing

mixed

$trimChar

+ + + +
Fields inherited from Doctrine\ORM\Query\AST\Functions\FunctionNode
name
+ + + + + + + + + + + +
Method Summary
void

getSql(mixed sqlWalker)

void

parse(mixed parser)

+ + + +
Methods inherited from Doctrine\ORM\Query\AST\Functions\FunctionNode
dispatch, getSql, parse
+ + + +
Methods inherited from Doctrine\ORM\Query\AST\Node
dispatch, dump
+ +

Field Detail

+
/Doctrine/ORM/Query/AST/Functions/TrimFunction.php at line 42
+

both

+public mixed $both +
+
+ +
+ +
/Doctrine/ORM/Query/AST/Functions/TrimFunction.php at line 40
+

leading

+public mixed $leading +
+
+ +
+ +
/Doctrine/ORM/Query/AST/Functions/TrimFunction.php at line 44
+

stringPrimary

+public mixed $stringPrimary +
+
+ +
+ +
/Doctrine/ORM/Query/AST/Functions/TrimFunction.php at line 41
+

trailing

+public mixed $trailing +
+
+ +
+ +
/Doctrine/ORM/Query/AST/Functions/TrimFunction.php at line 43
+

trimChar

+public mixed $trimChar = false +
+
+ +
+ +

Method Detail

+
/Doctrine/ORM/Query/AST/Functions/TrimFunction.php at line 49
+

getSql

+public void getSql(mixed sqlWalker) +
+

+
Override.
+
+
+ +
+ +
/Doctrine/ORM/Query/AST/Functions/TrimFunction.php at line 70
+

parse

+public void parse(mixed parser) +
+

+
Override.
+
+
+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/orm/query/ast/functions/upperfunction.html b/lib/api/doctrine/orm/query/ast/functions/upperfunction.html new file mode 100644 index 000000000..68c3a9fc3 --- /dev/null +++ b/lib/api/doctrine/orm/query/ast/functions/upperfunction.html @@ -0,0 +1,162 @@ + + + + + + + + + + + +UpperFunction (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +
Doctrine\ORM\Query\AST\Functions\UpperFunction
+
/Doctrine/ORM/Query/AST/Functions/UpperFunction.php at line 37
+ +

Class UpperFunction

+ +
Class:UpperFunction - Superclass: FunctionNode
+Class:FunctionNode - Superclass: Node
+Node
⌊ FunctionNode
⌊ UpperFunction
+ +
+ +

public class UpperFunction
extends FunctionNode + +

+ +

"UPPER" "(" StringPrimary ")"

+ +
+
License:
+
http://www.opensource.org/licenses/lgpl-license.php LGPL
+
See Also:
+
www.doctrine-project.org
+
Since:
+
2.0
+
Version:
+
$Revision: 3938 $
+
Author:
+
Guilherme Blanco
+
Jonathan Wage
+
Roman Borschel
+
+
+ + + + + + + +
Field Summary
mixed

$stringPrimary

+ + + +
Fields inherited from Doctrine\ORM\Query\AST\Functions\FunctionNode
name
+ + + + + + + + + + + +
Method Summary
void

getSql(mixed sqlWalker)

void

parse(mixed parser)

+ + + +
Methods inherited from Doctrine\ORM\Query\AST\Functions\FunctionNode
dispatch, getSql, parse
+ + + +
Methods inherited from Doctrine\ORM\Query\AST\Node
dispatch, dump
+ +

Field Detail

+
/Doctrine/ORM/Query/AST/Functions/UpperFunction.php at line 39
+

stringPrimary

+public mixed $stringPrimary +
+
+ +
+ +

Method Detail

+
/Doctrine/ORM/Query/AST/Functions/UpperFunction.php at line 44
+

getSql

+public void getSql(mixed sqlWalker) +
+

+
Override.
+
+
+ +
+ +
/Doctrine/ORM/Query/AST/Functions/UpperFunction.php at line 53
+

parse

+public void parse(mixed parser) +
+

+
Override.
+
+
+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/orm/query/ast/groupbyclause.html b/lib/api/doctrine/orm/query/ast/groupbyclause.html new file mode 100644 index 000000000..ee2b0a90b --- /dev/null +++ b/lib/api/doctrine/orm/query/ast/groupbyclause.html @@ -0,0 +1,152 @@ + + + + + + + + + + + +GroupByClause (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +
Doctrine\ORM\Query\AST\GroupByClause
+
/Doctrine/ORM/Query/AST/GroupByClause.php at line 35
+ +

Class GroupByClause

+ +
Class:GroupByClause - Superclass: Node
+Node
⌊ GroupByClause
+ +
+ +

public class GroupByClause
extends Node + +

+ +

Description of GroupByClause

+ +
+
License:
+
http://www.opensource.org/licenses/lgpl-license.php LGPL
+
See Also:
+
www.doctrine-project.org
+
Since:
+
2.0
+
Version:
+
$Revision: 3938 $
+
Author:
+
Guilherme Blanco
+
Jonathan Wage
+
Roman Borschel
+
+
+ + + + + + + +
Field Summary
mixed

$groupByItems

+ + + + + + +
Constructor Summary

GroupByClause(mixed groupByItems)

+ + + + + + + +
Method Summary
void

dispatch(mixed sqlWalker, mixed walker, $walker )

Double-dispatch method, supposed to dispatch back to the walker. +

+ + + +
Methods inherited from Doctrine\ORM\Query\AST\Node
dispatch, dump
+ +

Field Detail

+
/Doctrine/ORM/Query/AST/GroupByClause.php at line 37
+

groupByItems

+public mixed $groupByItems = array() +
+
+ +
+ +

Constructor Detail

+
/Doctrine/ORM/Query/AST/GroupByClause.php at line 39
+

GroupByClause

+public GroupByClause(mixed groupByItems) +
+
+ +
+ +

Method Detail

+
/Doctrine/ORM/Query/AST/GroupByClause.php at line 44
+

dispatch

+public void dispatch(mixed sqlWalker, mixed walker, $walker ) +
+

Double-dispatch method, supposed to dispatch back to the walker.

Implementation is not mandatory for all nodes.

+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/orm/query/ast/havingclause.html b/lib/api/doctrine/orm/query/ast/havingclause.html new file mode 100644 index 000000000..42f455007 --- /dev/null +++ b/lib/api/doctrine/orm/query/ast/havingclause.html @@ -0,0 +1,152 @@ + + + + + + + + + + + +HavingClause (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +
Doctrine\ORM\Query\AST\HavingClause
+
/Doctrine/ORM/Query/AST/HavingClause.php at line 35
+ +

Class HavingClause

+ +
Class:HavingClause - Superclass: Node
+Node
⌊ HavingClause
+ +
+ +

public class HavingClause
extends Node + +

+ +

Description of HavingClause

+ +
+
License:
+
http://www.opensource.org/licenses/lgpl-license.php LGPL
+
See Also:
+
www.doctrine-project.org
+
Since:
+
2.0
+
Version:
+
$Revision: 3938 $
+
Author:
+
Guilherme Blanco
+
Jonathan Wage
+
Roman Borschel
+
+
+ + + + + + + +
Field Summary
mixed

$conditionalExpression

+ + + + + + +
Constructor Summary

HavingClause(mixed conditionalExpression)

+ + + + + + + +
Method Summary
void

dispatch(mixed sqlWalker, mixed walker, $walker )

Double-dispatch method, supposed to dispatch back to the walker. +

+ + + +
Methods inherited from Doctrine\ORM\Query\AST\Node
dispatch, dump
+ +

Field Detail

+
/Doctrine/ORM/Query/AST/HavingClause.php at line 37
+

conditionalExpression

+public mixed $conditionalExpression +
+
+ +
+ +

Constructor Detail

+
/Doctrine/ORM/Query/AST/HavingClause.php at line 39
+

HavingClause

+public HavingClause(mixed conditionalExpression) +
+
+ +
+ +

Method Detail

+
/Doctrine/ORM/Query/AST/HavingClause.php at line 44
+

dispatch

+public void dispatch(mixed sqlWalker, mixed walker, $walker ) +
+

Double-dispatch method, supposed to dispatch back to the walker.

Implementation is not mandatory for all nodes.

+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/orm/query/ast/identificationvariabledeclaration.html b/lib/api/doctrine/orm/query/ast/identificationvariabledeclaration.html new file mode 100644 index 000000000..b3aab93b1 --- /dev/null +++ b/lib/api/doctrine/orm/query/ast/identificationvariabledeclaration.html @@ -0,0 +1,176 @@ + + + + + + + + + + + +IdentificationVariableDeclaration (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +
Doctrine\ORM\Query\AST\IdentificationVariableDeclaration
+
/Doctrine/ORM/Query/AST/IdentificationVariableDeclaration.php at line 35
+ +

Class IdentificationVariableDeclaration

+ +
Class:IdentificationVariableDeclaration - Superclass: Node
+Node
⌊ IdentificationVariableDeclaration
+ +
+ +

public class IdentificationVariableDeclaration
extends Node + +

+ +

IdentificationVariableDeclaration ::= RangeVariableDeclaration [IndexBy] {JoinVariableDeclaration}

+ +
+
License:
+
http://www.opensource.org/licenses/lgpl-license.php LGPL
+
See Also:
+
www.doctrine-project.org
+
Since:
+
2.0
+
Version:
+
$Revision: 3938 $
+
Author:
+
Guilherme Blanco
+
Jonathan Wage
+
Roman Borschel
+
+
+ + + + + + + + + + + + + + + +
Field Summary
mixed

$indexBy

mixed

$joinVariableDeclarations

mixed

$rangeVariableDeclaration

+ + + + + + +
Constructor Summary

IdentificationVariableDeclaration(mixed rangeVariableDecl, mixed indexBy, mixed joinVariableDecls)

+ + + + + + + +
Method Summary
void

dispatch(mixed sqlWalker, mixed walker, $walker )

Double-dispatch method, supposed to dispatch back to the walker. +

+ + + +
Methods inherited from Doctrine\ORM\Query\AST\Node
dispatch, dump
+ +

Field Detail

+
/Doctrine/ORM/Query/AST/IdentificationVariableDeclaration.php at line 38
+

indexBy

+public mixed $indexBy = null +
+
+ +
+ +
/Doctrine/ORM/Query/AST/IdentificationVariableDeclaration.php at line 39
+

joinVariableDeclarations

+public mixed $joinVariableDeclarations = array() +
+
+ +
+ +
/Doctrine/ORM/Query/AST/IdentificationVariableDeclaration.php at line 37
+

rangeVariableDeclaration

+public mixed $rangeVariableDeclaration = null +
+
+ +
+ +

Constructor Detail

+
/Doctrine/ORM/Query/AST/IdentificationVariableDeclaration.php at line 41
+

IdentificationVariableDeclaration

+public IdentificationVariableDeclaration(mixed rangeVariableDecl, mixed indexBy, mixed joinVariableDecls) +
+
+ +
+ +

Method Detail

+
/Doctrine/ORM/Query/AST/IdentificationVariableDeclaration.php at line 48
+

dispatch

+public void dispatch(mixed sqlWalker, mixed walker, $walker ) +
+

Double-dispatch method, supposed to dispatch back to the walker.

Implementation is not mandatory for all nodes.

+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/orm/query/ast/indexby.html b/lib/api/doctrine/orm/query/ast/indexby.html new file mode 100644 index 000000000..7ca02ebf2 --- /dev/null +++ b/lib/api/doctrine/orm/query/ast/indexby.html @@ -0,0 +1,152 @@ + + + + + + + + + + + +IndexBy (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +
Doctrine\ORM\Query\AST\IndexBy
+
/Doctrine/ORM/Query/AST/IndexBy.php at line 35
+ +

Class IndexBy

+ +
Class:IndexBy - Superclass: Node
+Node
⌊ IndexBy
+ +
+ +

public class IndexBy
extends Node + +

+ +

IndexBy ::= "INDEX" "BY" SimpleStateFieldPathExpression

+ +
+
License:
+
http://www.opensource.org/licenses/lgpl-license.php LGPL
+
See Also:
+
www.doctrine-project.org
+
Since:
+
2.0
+
Version:
+
$Revision: 3938 $
+
Author:
+
Guilherme Blanco
+
Jonathan Wage
+
Roman Borschel
+
+
+ + + + + + + +
Field Summary
mixed

$simpleStateFieldPathExpression

+ + + + + + +
Constructor Summary

IndexBy(mixed simpleStateFieldPathExpression)

+ + + + + + + +
Method Summary
void

dispatch(mixed sqlWalker, mixed walker, $walker )

Double-dispatch method, supposed to dispatch back to the walker. +

+ + + +
Methods inherited from Doctrine\ORM\Query\AST\Node
dispatch, dump
+ +

Field Detail

+
/Doctrine/ORM/Query/AST/IndexBy.php at line 37
+

simpleStateFieldPathExpression

+public mixed $simpleStateFieldPathExpression = null +
+
+ +
+ +

Constructor Detail

+
/Doctrine/ORM/Query/AST/IndexBy.php at line 39
+

IndexBy

+public IndexBy(mixed simpleStateFieldPathExpression) +
+
+ +
+ +

Method Detail

+
/Doctrine/ORM/Query/AST/IndexBy.php at line 44
+

dispatch

+public void dispatch(mixed sqlWalker, mixed walker, $walker ) +
+

Double-dispatch method, supposed to dispatch back to the walker.

Implementation is not mandatory for all nodes.

+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/orm/query/ast/inexpression.html b/lib/api/doctrine/orm/query/ast/inexpression.html new file mode 100644 index 000000000..0d4ee2661 --- /dev/null +++ b/lib/api/doctrine/orm/query/ast/inexpression.html @@ -0,0 +1,188 @@ + + + + + + + + + + + +InExpression (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +
Doctrine\ORM\Query\AST\InExpression
+
/Doctrine/ORM/Query/AST/InExpression.php at line 35
+ +

Class InExpression

+ +
Class:InExpression - Superclass: Node
+Node
⌊ InExpression
+ +
+ +

public class InExpression
extends Node + +

+ +

InExpression ::= StateFieldPathExpression ["NOT"] "IN" "(" (Literal {"," Literal}* | Subselect) ")"

+ +
+
License:
+
http://www.opensource.org/licenses/lgpl-license.php LGPL
+
See Also:
+
www.doctrine-project.org
+
Since:
+
2.0
+
Version:
+
$Revision: 3938 $
+
Author:
+
Guilherme Blanco
+
Jonathan Wage
+
Roman Borschel
+
+
+ + + + + + + + + + + + + + + + + + + +
Field Summary
mixed

$literals

mixed

$not

mixed

$pathExpression

mixed

$subselect

+ + + + + + +
Constructor Summary

InExpression(mixed pathExpression)

+ + + + + + + +
Method Summary
void

dispatch(mixed sqlWalker, mixed walker, $walker )

Double-dispatch method, supposed to dispatch back to the walker. +

+ + + +
Methods inherited from Doctrine\ORM\Query\AST\Node
dispatch, dump
+ +

Field Detail

+
/Doctrine/ORM/Query/AST/InExpression.php at line 39
+

literals

+public mixed $literals = array() +
+
+ +
+ +
/Doctrine/ORM/Query/AST/InExpression.php at line 37
+

not

+public mixed $not +
+
+ +
+ +
/Doctrine/ORM/Query/AST/InExpression.php at line 38
+

pathExpression

+public mixed $pathExpression +
+
+ +
+ +
/Doctrine/ORM/Query/AST/InExpression.php at line 40
+

subselect

+public mixed $subselect +
+
+ +
+ +

Constructor Detail

+
/Doctrine/ORM/Query/AST/InExpression.php at line 42
+

InExpression

+public InExpression(mixed pathExpression) +
+
+ +
+ +

Method Detail

+
/Doctrine/ORM/Query/AST/InExpression.php at line 47
+

dispatch

+public void dispatch(mixed sqlWalker, mixed walker, $walker ) +
+

Double-dispatch method, supposed to dispatch back to the walker.

Implementation is not mandatory for all nodes.

+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/orm/query/ast/inputparameter.html b/lib/api/doctrine/orm/query/ast/inputparameter.html new file mode 100644 index 000000000..328908d1f --- /dev/null +++ b/lib/api/doctrine/orm/query/ast/inputparameter.html @@ -0,0 +1,164 @@ + + + + + + + + + + + +InputParameter (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +
Doctrine\ORM\Query\AST\InputParameter
+
/Doctrine/ORM/Query/AST/InputParameter.php at line 35
+ +

Class InputParameter

+ +
Class:InputParameter - Superclass: Node
+Node
⌊ InputParameter
+ +
+ +

public class InputParameter
extends Node + +

+ +

Description of InputParameter

+ +
+
License:
+
http://www.opensource.org/licenses/lgpl-license.php LGPL
+
See Also:
+
www.doctrine-project.org
+
Since:
+
2.0
+
Version:
+
$Revision: 3938 $
+
Author:
+
Guilherme Blanco
+
Jonathan Wage
+
Roman Borschel
+
+
+ + + + + + + + + + + +
Field Summary
mixed

$isNamed

mixed

$name

+ + + + + + +
Constructor Summary

InputParameter(string value)

+ + + + + + + +
Method Summary
void

dispatch(mixed walker, $walker )

Double-dispatch method, supposed to dispatch back to the walker. +

+ + + +
Methods inherited from Doctrine\ORM\Query\AST\Node
dispatch, dump
+ +

Field Detail

+
/Doctrine/ORM/Query/AST/InputParameter.php at line 37
+

isNamed

+public mixed $isNamed +
+
+ +
+ +
/Doctrine/ORM/Query/AST/InputParameter.php at line 38
+

name

+public mixed $name +
+
+ +
+ +

Constructor Detail

+
/Doctrine/ORM/Query/AST/InputParameter.php at line 43
+

InputParameter

+public InputParameter(string value) +
+

+ +
+ +

Method Detail

+
/Doctrine/ORM/Query/AST/InputParameter.php at line 54
+

dispatch

+public void dispatch(mixed walker, $walker ) +
+

Double-dispatch method, supposed to dispatch back to the walker.

Implementation is not mandatory for all nodes.

+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/orm/query/ast/join.html b/lib/api/doctrine/orm/query/ast/join.html new file mode 100644 index 000000000..3e705eb7c --- /dev/null +++ b/lib/api/doctrine/orm/query/ast/join.html @@ -0,0 +1,225 @@ + + + + + + + + + + + +Join (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +
Doctrine\ORM\Query\AST\Join
+
/Doctrine/ORM/Query/AST/Join.php at line 36
+ +

Class Join

+ +
Class:Join - Superclass: Node
+Node
⌊ Join
+ +
+ +

public class Join
extends Node + +

+ +

Join ::= ["LEFT" ["OUTER"] | "INNER"] "JOIN" JoinAssociationPathExpression +["AS"] AliasIdentificationVariable [("ON" | "WITH") ConditionalExpression]

+ +
+
License:
+
http://www.opensource.org/licenses/lgpl-license.php LGPL
+
See Also:
+
www.doctrine-project.org
+
Since:
+
2.0
+
Version:
+
$Revision: 3938 $
+
Author:
+
Guilherme Blanco
+
Jonathan Wage
+
Roman Borschel
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Field Summary
final int

JOIN_TYPE_INNER

final int

JOIN_TYPE_LEFT

final int

JOIN_TYPE_LEFTOUTER

mixed

$aliasIdentificationVariable

mixed

$conditionalExpression

mixed

$joinAssociationPathExpression

mixed

$joinType

+ + + + + + +
Constructor Summary

Join(mixed joinType, mixed joinAssocPathExpr, mixed aliasIdentVar)

+ + + + + + + +
Method Summary
void

dispatch(mixed sqlWalker, mixed walker, $walker )

Double-dispatch method, supposed to dispatch back to the walker. +

+ + + +
Methods inherited from Doctrine\ORM\Query\AST\Node
dispatch, dump
+ +

Field Detail

+
/Doctrine/ORM/Query/AST/Join.php at line 40
+

JOIN_TYPE_INNER

+public final int JOIN_TYPE_INNER = 3 +
+
+ +
+ +
/Doctrine/ORM/Query/AST/Join.php at line 38
+

JOIN_TYPE_LEFT

+public final int JOIN_TYPE_LEFT = 1 +
+
+ +
+ +
/Doctrine/ORM/Query/AST/Join.php at line 39
+

JOIN_TYPE_LEFTOUTER

+public final int JOIN_TYPE_LEFTOUTER = 2 +
+
+ +
+ +
/Doctrine/ORM/Query/AST/Join.php at line 44
+

aliasIdentificationVariable

+public mixed $aliasIdentificationVariable = null +
+
+ +
+ +
/Doctrine/ORM/Query/AST/Join.php at line 45
+

conditionalExpression

+public mixed $conditionalExpression = null +
+
+ +
+ +
/Doctrine/ORM/Query/AST/Join.php at line 43
+

joinAssociationPathExpression

+public mixed $joinAssociationPathExpression = null +
+
+ +
+ +
/Doctrine/ORM/Query/AST/Join.php at line 42
+

joinType

+public mixed $joinType = self::JOIN_TYPE_INNER +
+
+ +
+ +

Constructor Detail

+
/Doctrine/ORM/Query/AST/Join.php at line 47
+

Join

+public Join(mixed joinType, mixed joinAssocPathExpr, mixed aliasIdentVar) +
+
+ +
+ +

Method Detail

+
/Doctrine/ORM/Query/AST/Join.php at line 54
+

dispatch

+public void dispatch(mixed sqlWalker, mixed walker, $walker ) +
+

Double-dispatch method, supposed to dispatch back to the walker.

Implementation is not mandatory for all nodes.

+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/orm/query/ast/joinassociationpathexpression.html b/lib/api/doctrine/orm/query/ast/joinassociationpathexpression.html new file mode 100644 index 000000000..a72a3b4fb --- /dev/null +++ b/lib/api/doctrine/orm/query/ast/joinassociationpathexpression.html @@ -0,0 +1,164 @@ + + + + + + + + + + + +JoinAssociationPathExpression (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +
Doctrine\ORM\Query\AST\JoinAssociationPathExpression
+
/Doctrine/ORM/Query/AST/JoinAssociationPathExpression.php at line 35
+ +

Class JoinAssociationPathExpression

+ +
Class:JoinAssociationPathExpression - Superclass: Node
+Node
⌊ JoinAssociationPathExpression
+ +
+ +

public class JoinAssociationPathExpression
extends Node + +

+ +

JoinAssociationPathExpression ::= IdentificationVariable "." (SingleValuedAssociationField | CollectionValuedAssociationField)

+ +
+
License:
+
http://www.opensource.org/licenses/lgpl-license.php LGPL
+
See Also:
+
www.doctrine-project.org
+
Since:
+
2.0
+
Version:
+
$Revision: 3938 $
+
Author:
+
Guilherme Blanco
+
Jonathan Wage
+
Roman Borschel
+
+
+ + + + + + + + + + + +
Field Summary
mixed

$associationField

mixed

$identificationVariable

+ + + + + + +
Constructor Summary

JoinAssociationPathExpression(mixed identificationVariable, mixed associationField)

+ + + + + + + +
Method Summary
void

dispatch(mixed sqlWalker, mixed walker, $walker )

Double-dispatch method, supposed to dispatch back to the walker. +

+ + + +
Methods inherited from Doctrine\ORM\Query\AST\Node
dispatch, dump
+ +

Field Detail

+
/Doctrine/ORM/Query/AST/JoinAssociationPathExpression.php at line 38
+

associationField

+public mixed $associationField +
+
+ +
+ +
/Doctrine/ORM/Query/AST/JoinAssociationPathExpression.php at line 37
+

identificationVariable

+public mixed $identificationVariable +
+
+ +
+ +

Constructor Detail

+
/Doctrine/ORM/Query/AST/JoinAssociationPathExpression.php at line 40
+

JoinAssociationPathExpression

+public JoinAssociationPathExpression(mixed identificationVariable, mixed associationField) +
+
+ +
+ +

Method Detail

+
/Doctrine/ORM/Query/AST/JoinAssociationPathExpression.php at line 46
+

dispatch

+public void dispatch(mixed sqlWalker, mixed walker, $walker ) +
+

Double-dispatch method, supposed to dispatch back to the walker.

Implementation is not mandatory for all nodes.

+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/orm/query/ast/joinvariabledeclaration.html b/lib/api/doctrine/orm/query/ast/joinvariabledeclaration.html new file mode 100644 index 000000000..e35e87eb6 --- /dev/null +++ b/lib/api/doctrine/orm/query/ast/joinvariabledeclaration.html @@ -0,0 +1,164 @@ + + + + + + + + + + + +JoinVariableDeclaration (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +
Doctrine\ORM\Query\AST\JoinVariableDeclaration
+
/Doctrine/ORM/Query/AST/JoinVariableDeclaration.php at line 35
+ +

Class JoinVariableDeclaration

+ +
Class:JoinVariableDeclaration - Superclass: Node
+Node
⌊ JoinVariableDeclaration
+ +
+ +

public class JoinVariableDeclaration
extends Node + +

+ +

JoinVariableDeclaration ::= Join [IndexBy]

+ +
+
License:
+
http://www.opensource.org/licenses/lgpl-license.php LGPL
+
See Also:
+
www.doctrine-project.org
+
Since:
+
2.0
+
Version:
+
$Revision: 3938 $
+
Author:
+
Guilherme Blanco
+
Jonathan Wage
+
Roman Borschel
+
+
+ + + + + + + + + + + +
Field Summary
mixed

$indexBy

mixed

$join

+ + + + + + +
Constructor Summary

JoinVariableDeclaration(mixed join, mixed indexBy)

+ + + + + + + +
Method Summary
void

dispatch(mixed sqlWalker, mixed walker, $walker )

Double-dispatch method, supposed to dispatch back to the walker. +

+ + + +
Methods inherited from Doctrine\ORM\Query\AST\Node
dispatch, dump
+ +

Field Detail

+
/Doctrine/ORM/Query/AST/JoinVariableDeclaration.php at line 38
+

indexBy

+public mixed $indexBy = null +
+
+ +
+ +
/Doctrine/ORM/Query/AST/JoinVariableDeclaration.php at line 37
+

join

+public mixed $join = null +
+
+ +
+ +

Constructor Detail

+
/Doctrine/ORM/Query/AST/JoinVariableDeclaration.php at line 40
+

JoinVariableDeclaration

+public JoinVariableDeclaration(mixed join, mixed indexBy) +
+
+ +
+ +

Method Detail

+
/Doctrine/ORM/Query/AST/JoinVariableDeclaration.php at line 46
+

dispatch

+public void dispatch(mixed sqlWalker, mixed walker, $walker ) +
+

Double-dispatch method, supposed to dispatch back to the walker.

Implementation is not mandatory for all nodes.

+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/orm/query/ast/likeexpression.html b/lib/api/doctrine/orm/query/ast/likeexpression.html new file mode 100644 index 000000000..409f1bbc9 --- /dev/null +++ b/lib/api/doctrine/orm/query/ast/likeexpression.html @@ -0,0 +1,188 @@ + + + + + + + + + + + +LikeExpression (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +
Doctrine\ORM\Query\AST\LikeExpression
+
/Doctrine/ORM/Query/AST/LikeExpression.php at line 35
+ +

Class LikeExpression

+ +
Class:LikeExpression - Superclass: Node
+Node
⌊ LikeExpression
+ +
+ +

public class LikeExpression
extends Node + +

+ +

LikeExpression ::= StringExpression ["NOT"] "LIKE" string ["ESCAPE" char]

+ +
+
License:
+
http://www.opensource.org/licenses/lgpl-license.php LGPL
+
See Also:
+
www.doctrine-project.org
+
Since:
+
2.0
+
Version:
+
$Revision: 3938 $
+
Author:
+
Guilherme Blanco
+
Jonathan Wage
+
Roman Borschel
+
+
+ + + + + + + + + + + + + + + + + + + +
Field Summary
mixed

$escapeChar

mixed

$not

mixed

$stringExpression

mixed

$stringPattern

+ + + + + + +
Constructor Summary

LikeExpression(mixed stringExpression, mixed stringPattern, mixed escapeChar)

+ + + + + + + +
Method Summary
void

dispatch(mixed sqlWalker, mixed walker, $walker )

Double-dispatch method, supposed to dispatch back to the walker. +

+ + + +
Methods inherited from Doctrine\ORM\Query\AST\Node
dispatch, dump
+ +

Field Detail

+
/Doctrine/ORM/Query/AST/LikeExpression.php at line 40
+

escapeChar

+public mixed $escapeChar +
+
+ +
+ +
/Doctrine/ORM/Query/AST/LikeExpression.php at line 37
+

not

+public mixed $not +
+
+ +
+ +
/Doctrine/ORM/Query/AST/LikeExpression.php at line 38
+

stringExpression

+public mixed $stringExpression +
+
+ +
+ +
/Doctrine/ORM/Query/AST/LikeExpression.php at line 39
+

stringPattern

+public mixed $stringPattern +
+
+ +
+ +

Constructor Detail

+
/Doctrine/ORM/Query/AST/LikeExpression.php at line 42
+

LikeExpression

+public LikeExpression(mixed stringExpression, mixed stringPattern, mixed escapeChar) +
+
+ +
+ +

Method Detail

+
/Doctrine/ORM/Query/AST/LikeExpression.php at line 49
+

dispatch

+public void dispatch(mixed sqlWalker, mixed walker, $walker ) +
+

Double-dispatch method, supposed to dispatch back to the walker.

Implementation is not mandatory for all nodes.

+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/orm/query/ast/literal.html b/lib/api/doctrine/orm/query/ast/literal.html new file mode 100644 index 000000000..e8b43973e --- /dev/null +++ b/lib/api/doctrine/orm/query/ast/literal.html @@ -0,0 +1,200 @@ + + + + + + + + + + + +Literal (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +
Doctrine\ORM\Query\AST\Literal
+
/Doctrine/ORM/Query/AST/Literal.php at line 5
+ +

Class Literal

+ +
Class:Literal - Superclass: Node
+Node
⌊ Literal
+ +
+ +

public class Literal
extends Node + +

+ +

Abstract class of an AST node

+ +
+
License:
+
http://www.opensource.org/licenses/lgpl-license.php LGPL
+
See Also:
+
www.doctrine-project.org
+
Since:
+
2.0
+
Version:
+
$Revision: 3938 $
+
Author:
+
Guilherme Blanco
+
Jonathan Wage
+
Roman Borschel
+
+
+ + + + + + + + + + + + + + + + + + + + + + + +
Field Summary
final int

BOOLEAN

final int

NUMERIC

final int

STRING

mixed

$type

mixed

$value

+ + + + + + +
Constructor Summary

Literal(mixed type, mixed value)

+ + + + + + + +
Method Summary
void

dispatch(mixed walker, $walker )

Double-dispatch method, supposed to dispatch back to the walker. +

+ + + +
Methods inherited from Doctrine\ORM\Query\AST\Node
dispatch, dump
+ +

Field Detail

+
/Doctrine/ORM/Query/AST/Literal.php at line 8
+

BOOLEAN

+public final int BOOLEAN = 2 +
+
+ +
+ +
/Doctrine/ORM/Query/AST/Literal.php at line 9
+

NUMERIC

+public final int NUMERIC = 3 +
+
+ +
+ +
/Doctrine/ORM/Query/AST/Literal.php at line 7
+

STRING

+public final int STRING = 1 +
+
+ +
+ +
/Doctrine/ORM/Query/AST/Literal.php at line 11
+

type

+public mixed $type +
+
+ +
+ +
/Doctrine/ORM/Query/AST/Literal.php at line 12
+

value

+public mixed $value +
+
+ +
+ +

Constructor Detail

+
/Doctrine/ORM/Query/AST/Literal.php at line 14
+

Literal

+public Literal(mixed type, mixed value) +
+
+ +
+ +

Method Detail

+
/Doctrine/ORM/Query/AST/Literal.php at line 20
+

dispatch

+public void dispatch(mixed walker, $walker ) +
+

Double-dispatch method, supposed to dispatch back to the walker.

Implementation is not mandatory for all nodes.

+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/orm/query/ast/node.html b/lib/api/doctrine/orm/query/ast/node.html new file mode 100644 index 000000000..a94c536ea --- /dev/null +++ b/lib/api/doctrine/orm/query/ast/node.html @@ -0,0 +1,124 @@ + + + + + + + + + + + +Node (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +
Doctrine\ORM\Query\AST\Node
+
/Doctrine/ORM/Query/AST/Node.php at line 35
+ +

Class Node

+ +
Node
+ +
+ +

public abstract class Node

+ +

Abstract class of an AST node

+ +
+
License:
+
http://www.opensource.org/licenses/lgpl-license.php LGPL
+
See Also:
+
www.doctrine-project.org
+
Since:
+
2.0
+
Version:
+
$Revision: 3938 $
+
Author:
+
Guilherme Blanco
+
Jonathan Wage
+
Roman Borschel
+
+
+ + + + + + + + + + + +
Method Summary
void

dispatch(mixed walker, $walker )

Double-dispatch method, supposed to dispatch back to the walker. +

void

dump(mixed obj)

+ +

Method Detail

+
/Doctrine/ORM/Query/AST/Node.php at line 44
+

dispatch

+public void dispatch(mixed walker, $walker ) +
+

Double-dispatch method, supposed to dispatch back to the walker.

Implementation is not mandatory for all nodes.

+ +
+ +
/Doctrine/ORM/Query/AST/Node.php at line 59
+

dump

+public void dump(mixed obj) +
+
+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/orm/query/ast/nullcomparisonexpression.html b/lib/api/doctrine/orm/query/ast/nullcomparisonexpression.html new file mode 100644 index 000000000..8ef125e94 --- /dev/null +++ b/lib/api/doctrine/orm/query/ast/nullcomparisonexpression.html @@ -0,0 +1,164 @@ + + + + + + + + + + + +NullComparisonExpression (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +
Doctrine\ORM\Query\AST\NullComparisonExpression
+
/Doctrine/ORM/Query/AST/NullComparisonExpression.php at line 35
+ +

Class NullComparisonExpression

+ +
Class:NullComparisonExpression - Superclass: Node
+Node
⌊ NullComparisonExpression
+ +
+ +

public class NullComparisonExpression
extends Node + +

+ +

NullComparisonExpression ::= (SingleValuedPathExpression | InputParameter) "IS" ["NOT"] "NULL"

+ +
+
License:
+
http://www.opensource.org/licenses/lgpl-license.php LGPL
+
See Also:
+
www.doctrine-project.org
+
Since:
+
2.0
+
Version:
+
$Revision: 3938 $
+
Author:
+
Guilherme Blanco
+
Jonathan Wage
+
Roman Borschel
+
+
+ + + + + + + + + + + +
Field Summary
mixed

$expression

mixed

$not

+ + + + + + +
Constructor Summary

NullComparisonExpression(mixed expression)

+ + + + + + + +
Method Summary
void

dispatch(mixed sqlWalker, mixed walker, $walker )

Double-dispatch method, supposed to dispatch back to the walker. +

+ + + +
Methods inherited from Doctrine\ORM\Query\AST\Node
dispatch, dump
+ +

Field Detail

+
/Doctrine/ORM/Query/AST/NullComparisonExpression.php at line 38
+

expression

+public mixed $expression +
+
+ +
+ +
/Doctrine/ORM/Query/AST/NullComparisonExpression.php at line 37
+

not

+public mixed $not +
+
+ +
+ +

Constructor Detail

+
/Doctrine/ORM/Query/AST/NullComparisonExpression.php at line 40
+

NullComparisonExpression

+public NullComparisonExpression(mixed expression) +
+
+ +
+ +

Method Detail

+
/Doctrine/ORM/Query/AST/NullComparisonExpression.php at line 45
+

dispatch

+public void dispatch(mixed sqlWalker, mixed walker, $walker ) +
+

Double-dispatch method, supposed to dispatch back to the walker.

Implementation is not mandatory for all nodes.

+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/orm/query/ast/orderbyclause.html b/lib/api/doctrine/orm/query/ast/orderbyclause.html new file mode 100644 index 000000000..1ee34bdd0 --- /dev/null +++ b/lib/api/doctrine/orm/query/ast/orderbyclause.html @@ -0,0 +1,152 @@ + + + + + + + + + + + +OrderByClause (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +
Doctrine\ORM\Query\AST\OrderByClause
+
/Doctrine/ORM/Query/AST/OrderByClause.php at line 35
+ +

Class OrderByClause

+ +
Class:OrderByClause - Superclass: Node
+Node
⌊ OrderByClause
+ +
+ +

public class OrderByClause
extends Node + +

+ +

OrderByClause ::= "ORDER" "BY" OrderByItem {"," OrderByItem}

+ +
+
License:
+
http://www.opensource.org/licenses/lgpl-license.php LGPL
+
See Also:
+
www.doctrine-project.org
+
Since:
+
2.0
+
Version:
+
$Revision: 3938 $
+
Author:
+
Guilherme Blanco
+
Jonathan Wage
+
Roman Borschel
+
+
+ + + + + + + +
Field Summary
mixed

$orderByItems

+ + + + + + +
Constructor Summary

OrderByClause(mixed orderByItems)

+ + + + + + + +
Method Summary
void

dispatch(mixed sqlWalker, mixed walker, $walker )

Double-dispatch method, supposed to dispatch back to the walker. +

+ + + +
Methods inherited from Doctrine\ORM\Query\AST\Node
dispatch, dump
+ +

Field Detail

+
/Doctrine/ORM/Query/AST/OrderByClause.php at line 37
+

orderByItems

+public mixed $orderByItems = array() +
+
+ +
+ +

Constructor Detail

+
/Doctrine/ORM/Query/AST/OrderByClause.php at line 39
+

OrderByClause

+public OrderByClause(mixed orderByItems) +
+
+ +
+ +

Method Detail

+
/Doctrine/ORM/Query/AST/OrderByClause.php at line 44
+

dispatch

+public void dispatch(mixed sqlWalker, mixed walker, $walker ) +
+

Double-dispatch method, supposed to dispatch back to the walker.

Implementation is not mandatory for all nodes.

+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/orm/query/ast/orderbyitem.html b/lib/api/doctrine/orm/query/ast/orderbyitem.html new file mode 100644 index 000000000..e2b7ab637 --- /dev/null +++ b/lib/api/doctrine/orm/query/ast/orderbyitem.html @@ -0,0 +1,188 @@ + + + + + + + + + + + +OrderByItem (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +
Doctrine\ORM\Query\AST\OrderByItem
+
/Doctrine/ORM/Query/AST/OrderByItem.php at line 35
+ +

Class OrderByItem

+ +
Class:OrderByItem - Superclass: Node
+Node
⌊ OrderByItem
+ +
+ +

public class OrderByItem
extends Node + +

+ +

OrderByItem ::= (ResultVariable | StateFieldPathExpression) ["ASC" | "DESC"]

+ +
+
License:
+
http://www.opensource.org/licenses/lgpl-license.php LGPL
+
See Also:
+
www.doctrine-project.org
+
Since:
+
2.0
+
Version:
+
$Revision: 3938 $
+
Author:
+
Guilherme Blanco
+
Jonathan Wage
+
Roman Borschel
+
+
+ + + + + + + + + + + +
Field Summary
mixed

$expression

mixed

$type

+ + + + + + +
Constructor Summary

OrderByItem(mixed expression)

+ + + + + + + + + + + + + + + +
Method Summary
void

dispatch(mixed sqlWalker, mixed walker, $walker )

Double-dispatch method, supposed to dispatch back to the walker. +

void

isAsc()

void

isDesc()

+ + + +
Methods inherited from Doctrine\ORM\Query\AST\Node
dispatch, dump
+ +

Field Detail

+
/Doctrine/ORM/Query/AST/OrderByItem.php at line 37
+

expression

+public mixed $expression +
+
+ +
+ +
/Doctrine/ORM/Query/AST/OrderByItem.php at line 38
+

type

+public mixed $type +
+
+ +
+ +

Constructor Detail

+
/Doctrine/ORM/Query/AST/OrderByItem.php at line 40
+

OrderByItem

+public OrderByItem(mixed expression) +
+
+ +
+ +

Method Detail

+
/Doctrine/ORM/Query/AST/OrderByItem.php at line 55
+

dispatch

+public void dispatch(mixed sqlWalker, mixed walker, $walker ) +
+

Double-dispatch method, supposed to dispatch back to the walker.

Implementation is not mandatory for all nodes.

+ +
+ +
/Doctrine/ORM/Query/AST/OrderByItem.php at line 45
+

isAsc

+public void isAsc() +
+
+ +
+ +
/Doctrine/ORM/Query/AST/OrderByItem.php at line 50
+

isDesc

+public void isDesc() +
+
+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/orm/query/ast/package-frame.html b/lib/api/doctrine/orm/query/ast/package-frame.html new file mode 100644 index 000000000..5797f217a --- /dev/null +++ b/lib/api/doctrine/orm/query/ast/package-frame.html @@ -0,0 +1,73 @@ + + + + + + + + + + + +Doctrine\ORM\Query\AST (Doctrine) + + + + +

Doctrine\ORM\Query\AST

+ +

Classes

+ + + + + \ No newline at end of file diff --git a/lib/api/doctrine/orm/query/ast/package-functions.html b/lib/api/doctrine/orm/query/ast/package-functions.html new file mode 100644 index 000000000..6d16374cd --- /dev/null +++ b/lib/api/doctrine/orm/query/ast/package-functions.html @@ -0,0 +1,69 @@ + + + + + + + + + + + +Functions (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +

Functions

+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/orm/query/ast/package-globals.html b/lib/api/doctrine/orm/query/ast/package-globals.html new file mode 100644 index 000000000..1d3015657 --- /dev/null +++ b/lib/api/doctrine/orm/query/ast/package-globals.html @@ -0,0 +1,69 @@ + + + + + + + + + + + +Globals (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +

Globals

+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/orm/query/ast/package-summary.html b/lib/api/doctrine/orm/query/ast/package-summary.html new file mode 100644 index 000000000..d2e1f5e37 --- /dev/null +++ b/lib/api/doctrine/orm/query/ast/package-summary.html @@ -0,0 +1,128 @@ + + + + + + + + + + + +Doctrine\ORM\Query\AST (Doctrine) + + + + +
+

Doctrine

+ +
+ + +
+ +

Namespace Doctrine\ORM\Query\AST

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Class Summary
ASTExceptionDescription of QueryException
AggregateExpressionDescription of AggregateExpression
ArithmeticExpressionArithmeticExpression ::= SimpleArithmeticExpression | "(" Subselect ")"
ArithmeticFactorArithmeticFactor ::= [("+" | "-")] ArithmeticPrimary
ArithmeticTermArithmeticTerm ::= ArithmeticFactor {("*" | "/") ArithmeticFactor}
BetweenExpressionDescription of BetweenExpression@license http://www.opensource.org/licenses/lgpl-license.php LGPL
CollectionMemberExpressionCollectionMemberExpression ::= EntityExpression ["NOT"] "MEMBER" ["OF"] CollectionValuedPathExpression
ComparisonExpressionComparisonExpression ::= ArithmeticExpression ComparisonOperator ( QuantifiedExpression | ArithmeticExpression ) | +StringExpression ComparisonOperator (StringExpression | QuantifiedExpression) | +BooleanExpression ("=" | "" | "!=") (BooleanExpression | QuantifiedExpression) | +EnumExpression ("=" | "" | "!=") (EnumExpression | QuantifiedExpression) | +DatetimeExpression ComparisonOperator (DatetimeExpression | QuantifiedExpression) | +EntityExpression ("=" | "") (EntityExpression | QuantifiedExpression)
ConditionalExpressionConditionalExpression ::= ConditionalTerm {"OR" ConditionalTerm}
ConditionalFactorConditionalFactor ::= ["NOT"] ConditionalPrimary
ConditionalPrimaryConditionalPrimary ::= SimpleConditionalExpression | "(" ConditionalExpression ")"
ConditionalTermConditionalTerm ::= ConditionalFactor {"AND" ConditionalFactor}
DeleteClauseDeleteClause ::= "DELETE" ["FROM"] AbstractSchemaName [["AS"] AliasIdentificationVariable]
DeleteStatementDeleteStatement = DeleteClause [WhereClause]
EmptyCollectionComparisonExpressionEmptyCollectionComparisonExpression ::= CollectionValuedPathExpression "IS" ["NOT"] "EMPTY"
ExistsExpressionExistsExpression ::= ["NOT"] "EXISTS" "(" Subselect ")"
FromClauseFromClause ::= "FROM" IdentificationVariableDeclaration {"," IdentificationVariableDeclaration}
GroupByClauseDescription of GroupByClause
HavingClauseDescription of HavingClause
IdentificationVariableDeclarationIdentificationVariableDeclaration ::= RangeVariableDeclaration [IndexBy] {JoinVariableDeclaration}
InExpressionInExpression ::= StateFieldPathExpression ["NOT"] "IN" "(" (Literal {"," Literal}* | Subselect) ")"
IndexByIndexBy ::= "INDEX" "BY" SimpleStateFieldPathExpression
InputParameterDescription of InputParameter
JoinJoin ::= ["LEFT" ["OUTER"] | "INNER"] "JOIN" JoinAssociationPathExpression +["AS"] AliasIdentificationVariable [("ON" | "WITH") ConditionalExpression]
JoinAssociationPathExpressionJoinAssociationPathExpression ::= IdentificationVariable "." (SingleValuedAssociationField | CollectionValuedAssociationField)
JoinVariableDeclarationJoinVariableDeclaration ::= Join [IndexBy]
LikeExpressionLikeExpression ::= StringExpression ["NOT"] "LIKE" string ["ESCAPE" char]
LiteralAbstract class of an AST node
NodeAbstract class of an AST node
NullComparisonExpressionNullComparisonExpression ::= (SingleValuedPathExpression | InputParameter) "IS" ["NOT"] "NULL"
OrderByClauseOrderByClause ::= "ORDER" "BY" OrderByItem {"," OrderByItem}
OrderByItemOrderByItem ::= (ResultVariable | StateFieldPathExpression) ["ASC" | "DESC"]
PartialObjectExpressionAbstract class of an AST node
PathExpressionAssociationPathExpression ::= CollectionValuedPathExpression | SingleValuedAssociationPathExpression +SingleValuedPathExpression ::= StateFieldPathExpression | SingleValuedAssociationPathExpression +StateFieldPathExpression ::= SimpleStateFieldPathExpression | SimpleStateFieldAssociationPathExpression +SingleValuedAssociationPathExpression ::= IdentificationVariable "." {SingleValuedAssociationField "."}* SingleValuedAssociationField +CollectionValuedPathExpression ::= IdentificationVariable "." {SingleValuedAssociationField "."}* CollectionValuedAssociationField +StateField ::= {EmbeddedClassStateField "."}* SimpleStateField +SimpleStateFieldPathExpression ::= IdentificationVariable "." StateField +SimpleStateFieldAssociationPathExpression ::= SingleValuedAssociationPathExpression "." StateField
QuantifiedExpressionQuantifiedExpression ::= ("ALL" | "ANY" | "SOME") "(" Subselect ")"
RangeVariableDeclarationRangeVariableDeclaration ::= AbstractSchemaName ["AS"] AliasIdentificationVariable
SelectClauseSelectClause = "SELECT" ["DISTINCT"] SelectExpression {"," SelectExpression}
SelectExpressionSelectExpression ::= IdentificationVariable ["." "*"] | StateFieldPathExpression | +(AggregateExpression | "(" Subselect ")") [["AS"] FieldAliasIdentificationVariable]
SelectStatementSelectStatement = SelectClause FromClause [WhereClause] [GroupByClause] [HavingClause] [OrderByClause]
SimpleArithmeticExpressionSimpleArithmeticExpression ::= ArithmeticTerm {("+" | "-") ArithmeticTerm}
SimpleSelectClauseSimpleSelectClause ::= "SELECT" ["DISTINCT"] SimpleSelectExpression
SimpleSelectExpressionSimpleSelectExpression ::= StateFieldPathExpression | IdentificationVariable +| (AggregateExpression [["AS"] FieldAliasIdentificationVariable])
SubselectSubselect ::= SimpleSelectClause SubselectFromClause [WhereClause] [GroupByClause] [HavingClause] [OrderByClause]
SubselectFromClauseSubselectFromClause ::= "FROM" SubselectIdentificationVariableDeclaration {"," SubselectIdentificationVariableDeclaration}
UpdateClauseUpdateClause ::= "UPDATE" AbstractSchemaName [["AS"] AliasIdentificationVariable] "SET" UpdateItem {"," UpdateItem}
UpdateItemUpdateItem ::= [IdentificationVariable "."] {StateField | SingleValuedAssociationField} "=" NewValue +NewValue ::= SimpleArithmeticExpression | StringPrimary | DatetimePrimary | BooleanPrimary | +EnumPrimary | SimpleEntityExpression | "NULL"
UpdateStatementUpdateStatement = UpdateClause [WhereClause]
WhereClauseWhereClause ::= "WHERE" ConditionalExpression
+ +
+ +
+

Doctrine

+ +
+ + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/orm/query/ast/package-tree.html b/lib/api/doctrine/orm/query/ast/package-tree.html new file mode 100644 index 000000000..d9ff44506 --- /dev/null +++ b/lib/api/doctrine/orm/query/ast/package-tree.html @@ -0,0 +1,104 @@ + + + + + + + + + + + +Doctrine\ORM\Query\AST (Doctrine) + + + + +
+

Doctrine

+ +
+ + +

Class Hierarchy for Package Doctrine\ORM\Query\AST

+
+

Doctrine

+ +
+ + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/orm/query/ast/partialobjectexpression.html b/lib/api/doctrine/orm/query/ast/partialobjectexpression.html new file mode 100644 index 000000000..d036f3fb5 --- /dev/null +++ b/lib/api/doctrine/orm/query/ast/partialobjectexpression.html @@ -0,0 +1,146 @@ + + + + + + + + + + + +PartialObjectExpression (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +
Doctrine\ORM\Query\AST\PartialObjectExpression
+
/Doctrine/ORM/Query/AST/PartialObjectExpression.php at line 5
+ +

Class PartialObjectExpression

+ +
Class:PartialObjectExpression - Superclass: Node
+Node
⌊ PartialObjectExpression
+ +
+ +

public class PartialObjectExpression
extends Node + +

+ +

Abstract class of an AST node

+ +
+
License:
+
http://www.opensource.org/licenses/lgpl-license.php LGPL
+
See Also:
+
www.doctrine-project.org
+
Since:
+
2.0
+
Version:
+
$Revision: 3938 $
+
Author:
+
Guilherme Blanco
+
Jonathan Wage
+
Roman Borschel
+
+
+ + + + + + + + + + + +
Field Summary
mixed

$identificationVariable

mixed

$partialFieldSet

+ + + + + + +
Constructor Summary

PartialObjectExpression(mixed identificationVariable, mixed partialFieldSet)

+ + + +
Methods inherited from Doctrine\ORM\Query\AST\Node
dispatch, dump
+ +

Field Detail

+
/Doctrine/ORM/Query/AST/PartialObjectExpression.php at line 7
+

identificationVariable

+public mixed $identificationVariable +
+
+ +
+ +
/Doctrine/ORM/Query/AST/PartialObjectExpression.php at line 8
+

partialFieldSet

+public mixed $partialFieldSet +
+
+ +
+ +

Constructor Detail

+
/Doctrine/ORM/Query/AST/PartialObjectExpression.php at line 10
+

PartialObjectExpression

+public PartialObjectExpression(mixed identificationVariable, mixed partialFieldSet) +
+
+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/orm/query/ast/pathexpression.html b/lib/api/doctrine/orm/query/ast/pathexpression.html new file mode 100644 index 000000000..f85bd9e01 --- /dev/null +++ b/lib/api/doctrine/orm/query/ast/pathexpression.html @@ -0,0 +1,231 @@ + + + + + + + + + + + +PathExpression (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +
Doctrine\ORM\Query\AST\PathExpression
+
/Doctrine/ORM/Query/AST/PathExpression.php at line 42
+ +

Class PathExpression

+ +
Class:PathExpression - Superclass: Node
+Node
⌊ PathExpression
+ +
+ +

public class PathExpression
extends Node + +

+ +

AssociationPathExpression ::= CollectionValuedPathExpression | SingleValuedAssociationPathExpression +SingleValuedPathExpression ::= StateFieldPathExpression | SingleValuedAssociationPathExpression +StateFieldPathExpression ::= SimpleStateFieldPathExpression | SimpleStateFieldAssociationPathExpression +SingleValuedAssociationPathExpression ::= IdentificationVariable "." {SingleValuedAssociationField "."}* SingleValuedAssociationField +CollectionValuedPathExpression ::= IdentificationVariable "." {SingleValuedAssociationField "."}* CollectionValuedAssociationField +StateField ::= {EmbeddedClassStateField "."}* SimpleStateField +SimpleStateFieldPathExpression ::= IdentificationVariable "." StateField +SimpleStateFieldAssociationPathExpression ::= SingleValuedAssociationPathExpression "." StateField

+ +
+
License:
+
http://www.opensource.org/licenses/lgpl-license.php LGPL
+
See Also:
+
www.doctrine-project.org
+
Since:
+
2.0
+
Version:
+
$Revision: 3938 $
+
Author:
+
Guilherme Blanco
+
Jonathan Wage
+
Roman Borschel
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Field Summary
final int

TYPE_COLLECTION_VALUED_ASSOCIATION

final int

TYPE_SINGLE_VALUED_ASSOCIATION

final int

TYPE_STATE_FIELD

mixed

$expectedType

mixed

$identificationVariable

mixed

$parts

mixed

$type

+ + + + + + +
Constructor Summary

PathExpression(mixed expectedType, mixed identificationVariable, mixed parts)

+ + + + + + + +
Method Summary
void

dispatch(mixed walker, $walker )

Double-dispatch method, supposed to dispatch back to the walker. +

+ + + +
Methods inherited from Doctrine\ORM\Query\AST\Node
dispatch, dump
+ +

Field Detail

+
/Doctrine/ORM/Query/AST/PathExpression.php at line 44
+

TYPE_COLLECTION_VALUED_ASSOCIATION

+public final int TYPE_COLLECTION_VALUED_ASSOCIATION = 2 +
+
+ +
+ +
/Doctrine/ORM/Query/AST/PathExpression.php at line 45
+

TYPE_SINGLE_VALUED_ASSOCIATION

+public final int TYPE_SINGLE_VALUED_ASSOCIATION = 4 +
+
+ +
+ +
/Doctrine/ORM/Query/AST/PathExpression.php at line 46
+

TYPE_STATE_FIELD

+public final int TYPE_STATE_FIELD = 8 +
+
+ +
+ +
/Doctrine/ORM/Query/AST/PathExpression.php at line 49
+

expectedType

+public mixed $expectedType +
+
+ +
+ +
/Doctrine/ORM/Query/AST/PathExpression.php at line 50
+

identificationVariable

+public mixed $identificationVariable +
+
+ +
+ +
/Doctrine/ORM/Query/AST/PathExpression.php at line 51
+

parts

+public mixed $parts +
+
+ +
+ +
/Doctrine/ORM/Query/AST/PathExpression.php at line 48
+

type

+public mixed $type +
+
+ +
+ +

Constructor Detail

+
/Doctrine/ORM/Query/AST/PathExpression.php at line 53
+

PathExpression

+public PathExpression(mixed expectedType, mixed identificationVariable, mixed parts) +
+
+ +
+ +

Method Detail

+
/Doctrine/ORM/Query/AST/PathExpression.php at line 60
+

dispatch

+public void dispatch(mixed walker, $walker ) +
+

Double-dispatch method, supposed to dispatch back to the walker.

Implementation is not mandatory for all nodes.

+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/orm/query/ast/quantifiedexpression.html b/lib/api/doctrine/orm/query/ast/quantifiedexpression.html new file mode 100644 index 000000000..18073a883 --- /dev/null +++ b/lib/api/doctrine/orm/query/ast/quantifiedexpression.html @@ -0,0 +1,202 @@ + + + + + + + + + + + +QuantifiedExpression (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +
Doctrine\ORM\Query\AST\QuantifiedExpression
+
/Doctrine/ORM/Query/AST/QuantifiedExpression.php at line 35
+ +

Class QuantifiedExpression

+ +
Class:QuantifiedExpression - Superclass: Node
+Node
⌊ QuantifiedExpression
+ +
+ +

public class QuantifiedExpression
extends Node + +

+ +

QuantifiedExpression ::= ("ALL" | "ANY" | "SOME") "(" Subselect ")"

+ +
+
License:
+
http://www.opensource.org/licenses/lgpl-license.php LGPL
+
See Also:
+
www.doctrine-project.org
+
Since:
+
2.0
+
Version:
+
$Revision: 3938 $
+
Author:
+
Guilherme Blanco
+
Jonathan Wage
+
Roman Borschel
+
+
+ + + + + + + + + + + +
Field Summary
mixed

$subselect

mixed

$type

+ + + + + + +
Constructor Summary

QuantifiedExpression(mixed subselect)

+ + + + + + + + + + + + + + + + + + + +
Method Summary
void

dispatch(mixed sqlWalker, mixed walker, $walker )

void

isAll()

void

isAny()

void

isSome()

+ + + +
Methods inherited from Doctrine\ORM\Query\AST\Node
dispatch, dump
+ +

Field Detail

+
/Doctrine/ORM/Query/AST/QuantifiedExpression.php at line 38
+

subselect

+public mixed $subselect +
+
+ +
+ +
/Doctrine/ORM/Query/AST/QuantifiedExpression.php at line 37
+

type

+public mixed $type +
+
+ +
+ +

Constructor Detail

+
/Doctrine/ORM/Query/AST/QuantifiedExpression.php at line 40
+

QuantifiedExpression

+public QuantifiedExpression(mixed subselect) +
+
+ +
+ +

Method Detail

+
/Doctrine/ORM/Query/AST/QuantifiedExpression.php at line 63
+

dispatch

+public void dispatch(mixed sqlWalker, mixed walker, $walker ) +
+

+
Override.
+
+
+ +
+ +
/Doctrine/ORM/Query/AST/QuantifiedExpression.php at line 45
+

isAll

+public void isAll() +
+
+ +
+ +
/Doctrine/ORM/Query/AST/QuantifiedExpression.php at line 50
+

isAny

+public void isAny() +
+
+ +
+ +
/Doctrine/ORM/Query/AST/QuantifiedExpression.php at line 55
+

isSome

+public void isSome() +
+
+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/orm/query/ast/rangevariabledeclaration.html b/lib/api/doctrine/orm/query/ast/rangevariabledeclaration.html new file mode 100644 index 000000000..09e307900 --- /dev/null +++ b/lib/api/doctrine/orm/query/ast/rangevariabledeclaration.html @@ -0,0 +1,164 @@ + + + + + + + + + + + +RangeVariableDeclaration (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +
Doctrine\ORM\Query\AST\RangeVariableDeclaration
+
/Doctrine/ORM/Query/AST/RangeVariableDeclaration.php at line 35
+ +

Class RangeVariableDeclaration

+ +
Class:RangeVariableDeclaration - Superclass: Node
+Node
⌊ RangeVariableDeclaration
+ +
+ +

public class RangeVariableDeclaration
extends Node + +

+ +

RangeVariableDeclaration ::= AbstractSchemaName ["AS"] AliasIdentificationVariable

+ +
+
License:
+
http://www.opensource.org/licenses/lgpl-license.php LGPL
+
See Also:
+
www.doctrine-project.org
+
Since:
+
2.0
+
Version:
+
$Revision: 3938 $
+
Author:
+
Guilherme Blanco
+
Jonathan Wage
+
Roman Borschel
+
+
+ + + + + + + + + + + +
Field Summary
mixed

$abstractSchemaName

mixed

$aliasIdentificationVariable

+ + + + + + +
Constructor Summary

RangeVariableDeclaration(mixed abstractSchemaName, mixed aliasIdentificationVar)

+ + + + + + + +
Method Summary
void

dispatch(mixed walker, $walker )

Double-dispatch method, supposed to dispatch back to the walker. +

+ + + +
Methods inherited from Doctrine\ORM\Query\AST\Node
dispatch, dump
+ +

Field Detail

+
/Doctrine/ORM/Query/AST/RangeVariableDeclaration.php at line 37
+

abstractSchemaName

+public mixed $abstractSchemaName +
+
+ +
+ +
/Doctrine/ORM/Query/AST/RangeVariableDeclaration.php at line 38
+

aliasIdentificationVariable

+public mixed $aliasIdentificationVariable +
+
+ +
+ +

Constructor Detail

+
/Doctrine/ORM/Query/AST/RangeVariableDeclaration.php at line 40
+

RangeVariableDeclaration

+public RangeVariableDeclaration(mixed abstractSchemaName, mixed aliasIdentificationVar) +
+
+ +
+ +

Method Detail

+
/Doctrine/ORM/Query/AST/RangeVariableDeclaration.php at line 46
+

dispatch

+public void dispatch(mixed walker, $walker ) +
+

Double-dispatch method, supposed to dispatch back to the walker.

Implementation is not mandatory for all nodes.

+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/orm/query/ast/selectclause.html b/lib/api/doctrine/orm/query/ast/selectclause.html new file mode 100644 index 000000000..f16c90c3d --- /dev/null +++ b/lib/api/doctrine/orm/query/ast/selectclause.html @@ -0,0 +1,164 @@ + + + + + + + + + + + +SelectClause (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +
Doctrine\ORM\Query\AST\SelectClause
+
/Doctrine/ORM/Query/AST/SelectClause.php at line 35
+ +

Class SelectClause

+ +
Class:SelectClause - Superclass: Node
+Node
⌊ SelectClause
+ +
+ +

public class SelectClause
extends Node + +

+ +

SelectClause = "SELECT" ["DISTINCT"] SelectExpression {"," SelectExpression}

+ +
+
License:
+
http://www.opensource.org/licenses/lgpl-license.php LGPL
+
See Also:
+
www.doctrine-project.org
+
Since:
+
2.0
+
Version:
+
$Revision: 3938 $
+
Author:
+
Guilherme Blanco
+
Jonathan Wage
+
Roman Borschel
+
+
+ + + + + + + + + + + +
Field Summary
mixed

$isDistinct

mixed

$selectExpressions

+ + + + + + +
Constructor Summary

SelectClause(mixed selectExpressions, mixed isDistinct)

+ + + + + + + +
Method Summary
void

dispatch(mixed sqlWalker, mixed walker, $walker )

Double-dispatch method, supposed to dispatch back to the walker. +

+ + + +
Methods inherited from Doctrine\ORM\Query\AST\Node
dispatch, dump
+ +

Field Detail

+
/Doctrine/ORM/Query/AST/SelectClause.php at line 37
+

isDistinct

+public mixed $isDistinct +
+
+ +
+ +
/Doctrine/ORM/Query/AST/SelectClause.php at line 38
+

selectExpressions

+public mixed $selectExpressions = array() +
+
+ +
+ +

Constructor Detail

+
/Doctrine/ORM/Query/AST/SelectClause.php at line 40
+

SelectClause

+public SelectClause(mixed selectExpressions, mixed isDistinct) +
+
+ +
+ +

Method Detail

+
/Doctrine/ORM/Query/AST/SelectClause.php at line 46
+

dispatch

+public void dispatch(mixed sqlWalker, mixed walker, $walker ) +
+

Double-dispatch method, supposed to dispatch back to the walker.

Implementation is not mandatory for all nodes.

+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/orm/query/ast/selectexpression.html b/lib/api/doctrine/orm/query/ast/selectexpression.html new file mode 100644 index 000000000..1d02fbbc2 --- /dev/null +++ b/lib/api/doctrine/orm/query/ast/selectexpression.html @@ -0,0 +1,165 @@ + + + + + + + + + + + +SelectExpression (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +
Doctrine\ORM\Query\AST\SelectExpression
+
/Doctrine/ORM/Query/AST/SelectExpression.php at line 36
+ +

Class SelectExpression

+ +
Class:SelectExpression - Superclass: Node
+Node
⌊ SelectExpression
+ +
+ +

public class SelectExpression
extends Node + +

+ +

SelectExpression ::= IdentificationVariable ["." "*"] | StateFieldPathExpression | +(AggregateExpression | "(" Subselect ")") [["AS"] FieldAliasIdentificationVariable]

+ +
+
License:
+
http://www.opensource.org/licenses/lgpl-license.php LGPL
+
See Also:
+
www.doctrine-project.org
+
Since:
+
2.0
+
Version:
+
$Revision: 3938 $
+
Author:
+
Guilherme Blanco
+
Jonathan Wage
+
Roman Borschel
+
+
+ + + + + + + + + + + +
Field Summary
mixed

$expression

mixed

$fieldIdentificationVariable

+ + + + + + +
Constructor Summary

SelectExpression(mixed expression, mixed fieldIdentificationVariable)

+ + + + + + + +
Method Summary
void

dispatch(mixed sqlWalker, mixed walker, $walker )

Double-dispatch method, supposed to dispatch back to the walker. +

+ + + +
Methods inherited from Doctrine\ORM\Query\AST\Node
dispatch, dump
+ +

Field Detail

+
/Doctrine/ORM/Query/AST/SelectExpression.php at line 38
+

expression

+public mixed $expression +
+
+ +
+ +
/Doctrine/ORM/Query/AST/SelectExpression.php at line 39
+

fieldIdentificationVariable

+public mixed $fieldIdentificationVariable +
+
+ +
+ +

Constructor Detail

+
/Doctrine/ORM/Query/AST/SelectExpression.php at line 41
+

SelectExpression

+public SelectExpression(mixed expression, mixed fieldIdentificationVariable) +
+
+ +
+ +

Method Detail

+
/Doctrine/ORM/Query/AST/SelectExpression.php at line 47
+

dispatch

+public void dispatch(mixed sqlWalker, mixed walker, $walker ) +
+

Double-dispatch method, supposed to dispatch back to the walker.

Implementation is not mandatory for all nodes.

+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/orm/query/ast/selectstatement.html b/lib/api/doctrine/orm/query/ast/selectstatement.html new file mode 100644 index 000000000..30c5b9c97 --- /dev/null +++ b/lib/api/doctrine/orm/query/ast/selectstatement.html @@ -0,0 +1,212 @@ + + + + + + + + + + + +SelectStatement (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +
Doctrine\ORM\Query\AST\SelectStatement
+
/Doctrine/ORM/Query/AST/SelectStatement.php at line 35
+ +

Class SelectStatement

+ +
Class:SelectStatement - Superclass: Node
+Node
⌊ SelectStatement
+ +
+ +

public class SelectStatement
extends Node + +

+ +

SelectStatement = SelectClause FromClause [WhereClause] [GroupByClause] [HavingClause] [OrderByClause]

+ +
+
License:
+
http://www.opensource.org/licenses/lgpl-license.php LGPL
+
See Also:
+
www.doctrine-project.org
+
Since:
+
2.0
+
Version:
+
$Revision: 3938 $
+
Author:
+
Guilherme Blanco
+
Jonathan Wage
+
Roman Borschel
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
Field Summary
mixed

$fromClause

mixed

$groupByClause

mixed

$havingClause

mixed

$orderByClause

mixed

$selectClause

mixed

$whereClause

+ + + + + + +
Constructor Summary

SelectStatement(mixed selectClause, mixed fromClause)

+ + + + + + + +
Method Summary
void

dispatch(mixed sqlWalker, mixed walker, $walker )

Double-dispatch method, supposed to dispatch back to the walker. +

+ + + +
Methods inherited from Doctrine\ORM\Query\AST\Node
dispatch, dump
+ +

Field Detail

+
/Doctrine/ORM/Query/AST/SelectStatement.php at line 38
+

fromClause

+public mixed $fromClause +
+
+ +
+ +
/Doctrine/ORM/Query/AST/SelectStatement.php at line 40
+

groupByClause

+public mixed $groupByClause +
+
+ +
+ +
/Doctrine/ORM/Query/AST/SelectStatement.php at line 41
+

havingClause

+public mixed $havingClause +
+
+ +
+ +
/Doctrine/ORM/Query/AST/SelectStatement.php at line 42
+

orderByClause

+public mixed $orderByClause +
+
+ +
+ +
/Doctrine/ORM/Query/AST/SelectStatement.php at line 37
+

selectClause

+public mixed $selectClause +
+
+ +
+ +
/Doctrine/ORM/Query/AST/SelectStatement.php at line 39
+

whereClause

+public mixed $whereClause +
+
+ +
+ +

Constructor Detail

+
/Doctrine/ORM/Query/AST/SelectStatement.php at line 44
+

SelectStatement

+public SelectStatement(mixed selectClause, mixed fromClause) +
+
+ +
+ +

Method Detail

+
/Doctrine/ORM/Query/AST/SelectStatement.php at line 49
+

dispatch

+public void dispatch(mixed sqlWalker, mixed walker, $walker ) +
+

Double-dispatch method, supposed to dispatch back to the walker.

Implementation is not mandatory for all nodes.

+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/orm/query/ast/simplearithmeticexpression.html b/lib/api/doctrine/orm/query/ast/simplearithmeticexpression.html new file mode 100644 index 000000000..50cfacbdc --- /dev/null +++ b/lib/api/doctrine/orm/query/ast/simplearithmeticexpression.html @@ -0,0 +1,152 @@ + + + + + + + + + + + +SimpleArithmeticExpression (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +
Doctrine\ORM\Query\AST\SimpleArithmeticExpression
+
/Doctrine/ORM/Query/AST/SimpleArithmeticExpression.php at line 35
+ +

Class SimpleArithmeticExpression

+ +
Class:SimpleArithmeticExpression - Superclass: Node
+Node
⌊ SimpleArithmeticExpression
+ +
+ +

public class SimpleArithmeticExpression
extends Node + +

+ +

SimpleArithmeticExpression ::= ArithmeticTerm {("+" | "-") ArithmeticTerm}

+ +
+
License:
+
http://www.opensource.org/licenses/lgpl-license.php LGPL
+
See Also:
+
www.doctrine-project.org
+
Since:
+
2.0
+
Version:
+
$Revision: 3938 $
+
Author:
+
Guilherme Blanco
+
Jonathan Wage
+
Roman Borschel
+
+
+ + + + + + + +
Field Summary
mixed

$arithmeticTerms

+ + + + + + +
Constructor Summary

SimpleArithmeticExpression(mixed arithmeticTerms)

+ + + + + + + +
Method Summary
void

dispatch(mixed sqlWalker, mixed walker, $walker )

Double-dispatch method, supposed to dispatch back to the walker. +

+ + + +
Methods inherited from Doctrine\ORM\Query\AST\Node
dispatch, dump
+ +

Field Detail

+
/Doctrine/ORM/Query/AST/SimpleArithmeticExpression.php at line 37
+

arithmeticTerms

+public mixed $arithmeticTerms = array() +
+
+ +
+ +

Constructor Detail

+
/Doctrine/ORM/Query/AST/SimpleArithmeticExpression.php at line 39
+

SimpleArithmeticExpression

+public SimpleArithmeticExpression(mixed arithmeticTerms) +
+
+ +
+ +

Method Detail

+
/Doctrine/ORM/Query/AST/SimpleArithmeticExpression.php at line 44
+

dispatch

+public void dispatch(mixed sqlWalker, mixed walker, $walker ) +
+

Double-dispatch method, supposed to dispatch back to the walker.

Implementation is not mandatory for all nodes.

+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/orm/query/ast/simpleselectclause.html b/lib/api/doctrine/orm/query/ast/simpleselectclause.html new file mode 100644 index 000000000..76c53efba --- /dev/null +++ b/lib/api/doctrine/orm/query/ast/simpleselectclause.html @@ -0,0 +1,164 @@ + + + + + + + + + + + +SimpleSelectClause (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +
Doctrine\ORM\Query\AST\SimpleSelectClause
+
/Doctrine/ORM/Query/AST/SimpleSelectClause.php at line 35
+ +

Class SimpleSelectClause

+ +
Class:SimpleSelectClause - Superclass: Node
+Node
⌊ SimpleSelectClause
+ +
+ +

public class SimpleSelectClause
extends Node + +

+ +

SimpleSelectClause ::= "SELECT" ["DISTINCT"] SimpleSelectExpression

+ +
+
License:
+
http://www.opensource.org/licenses/lgpl-license.php LGPL
+
See Also:
+
www.doctrine-project.org
+
Since:
+
2.0
+
Version:
+
$Revision: 3938 $
+
Author:
+
Guilherme Blanco
+
Jonathan Wage
+
Roman Borschel
+
+
+ + + + + + + + + + + +
Field Summary
mixed

$isDistinct

mixed

$simpleSelectExpression

+ + + + + + +
Constructor Summary

SimpleSelectClause(mixed simpleSelectExpression, mixed isDistinct)

+ + + + + + + +
Method Summary
void

dispatch(mixed sqlWalker, mixed walker, $walker )

Double-dispatch method, supposed to dispatch back to the walker. +

+ + + +
Methods inherited from Doctrine\ORM\Query\AST\Node
dispatch, dump
+ +

Field Detail

+
/Doctrine/ORM/Query/AST/SimpleSelectClause.php at line 37
+

isDistinct

+public mixed $isDistinct = false +
+
+ +
+ +
/Doctrine/ORM/Query/AST/SimpleSelectClause.php at line 38
+

simpleSelectExpression

+public mixed $simpleSelectExpression +
+
+ +
+ +

Constructor Detail

+
/Doctrine/ORM/Query/AST/SimpleSelectClause.php at line 40
+

SimpleSelectClause

+public SimpleSelectClause(mixed simpleSelectExpression, mixed isDistinct) +
+
+ +
+ +

Method Detail

+
/Doctrine/ORM/Query/AST/SimpleSelectClause.php at line 46
+

dispatch

+public void dispatch(mixed sqlWalker, mixed walker, $walker ) +
+

Double-dispatch method, supposed to dispatch back to the walker.

Implementation is not mandatory for all nodes.

+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/orm/query/ast/simpleselectexpression.html b/lib/api/doctrine/orm/query/ast/simpleselectexpression.html new file mode 100644 index 000000000..1e80f455d --- /dev/null +++ b/lib/api/doctrine/orm/query/ast/simpleselectexpression.html @@ -0,0 +1,165 @@ + + + + + + + + + + + +SimpleSelectExpression (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +
Doctrine\ORM\Query\AST\SimpleSelectExpression
+
/Doctrine/ORM/Query/AST/SimpleSelectExpression.php at line 36
+ +

Class SimpleSelectExpression

+ +
Class:SimpleSelectExpression - Superclass: Node
+Node
⌊ SimpleSelectExpression
+ +
+ +

public class SimpleSelectExpression
extends Node + +

+ +

SimpleSelectExpression ::= StateFieldPathExpression | IdentificationVariable +| (AggregateExpression [["AS"] FieldAliasIdentificationVariable])

+ +
+
License:
+
http://www.opensource.org/licenses/lgpl-license.php LGPL
+
See Also:
+
www.doctrine-project.org
+
Since:
+
2.0
+
Version:
+
$Revision: 3938 $
+
Author:
+
Guilherme Blanco
+
Jonathan Wage
+
Roman Borschel
+
+
+ + + + + + + + + + + +
Field Summary
mixed

$expression

mixed

$fieldIdentificationVariable

+ + + + + + +
Constructor Summary

SimpleSelectExpression(mixed expression)

+ + + + + + + +
Method Summary
void

dispatch(mixed sqlWalker, mixed walker, $walker )

Double-dispatch method, supposed to dispatch back to the walker. +

+ + + +
Methods inherited from Doctrine\ORM\Query\AST\Node
dispatch, dump
+ +

Field Detail

+
/Doctrine/ORM/Query/AST/SimpleSelectExpression.php at line 38
+

expression

+public mixed $expression +
+
+ +
+ +
/Doctrine/ORM/Query/AST/SimpleSelectExpression.php at line 39
+

fieldIdentificationVariable

+public mixed $fieldIdentificationVariable +
+
+ +
+ +

Constructor Detail

+
/Doctrine/ORM/Query/AST/SimpleSelectExpression.php at line 41
+

SimpleSelectExpression

+public SimpleSelectExpression(mixed expression) +
+
+ +
+ +

Method Detail

+
/Doctrine/ORM/Query/AST/SimpleSelectExpression.php at line 46
+

dispatch

+public void dispatch(mixed sqlWalker, mixed walker, $walker ) +
+

Double-dispatch method, supposed to dispatch back to the walker.

Implementation is not mandatory for all nodes.

+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/orm/query/ast/subselect.html b/lib/api/doctrine/orm/query/ast/subselect.html new file mode 100644 index 000000000..0ba24fb3e --- /dev/null +++ b/lib/api/doctrine/orm/query/ast/subselect.html @@ -0,0 +1,212 @@ + + + + + + + + + + + +Subselect (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +
Doctrine\ORM\Query\AST\Subselect
+
/Doctrine/ORM/Query/AST/Subselect.php at line 35
+ +

Class Subselect

+ +
Class:Subselect - Superclass: Node
+Node
⌊ Subselect
+ +
+ +

public class Subselect
extends Node + +

+ +

Subselect ::= SimpleSelectClause SubselectFromClause [WhereClause] [GroupByClause] [HavingClause] [OrderByClause]

+ +
+
License:
+
http://www.opensource.org/licenses/lgpl-license.php LGPL
+
See Also:
+
www.doctrine-project.org
+
Since:
+
2.0
+
Version:
+
$Revision: 3938 $
+
Author:
+
Guilherme Blanco
+
Jonathan Wage
+
Roman Borschel
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
Field Summary
mixed

$groupByClause

mixed

$havingClause

mixed

$orderByClause

mixed

$simpleSelectClause

mixed

$subselectFromClause

mixed

$whereClause

+ + + + + + +
Constructor Summary

Subselect(mixed simpleSelectClause, mixed subselectFromClause)

+ + + + + + + +
Method Summary
void

dispatch(mixed sqlWalker, mixed walker, $walker )

Double-dispatch method, supposed to dispatch back to the walker. +

+ + + +
Methods inherited from Doctrine\ORM\Query\AST\Node
dispatch, dump
+ +

Field Detail

+
/Doctrine/ORM/Query/AST/Subselect.php at line 40
+

groupByClause

+public mixed $groupByClause +
+
+ +
+ +
/Doctrine/ORM/Query/AST/Subselect.php at line 41
+

havingClause

+public mixed $havingClause +
+
+ +
+ +
/Doctrine/ORM/Query/AST/Subselect.php at line 42
+

orderByClause

+public mixed $orderByClause +
+
+ +
+ +
/Doctrine/ORM/Query/AST/Subselect.php at line 37
+

simpleSelectClause

+public mixed $simpleSelectClause +
+
+ +
+ +
/Doctrine/ORM/Query/AST/Subselect.php at line 38
+

subselectFromClause

+public mixed $subselectFromClause +
+
+ +
+ +
/Doctrine/ORM/Query/AST/Subselect.php at line 39
+

whereClause

+public mixed $whereClause +
+
+ +
+ +

Constructor Detail

+
/Doctrine/ORM/Query/AST/Subselect.php at line 44
+

Subselect

+public Subselect(mixed simpleSelectClause, mixed subselectFromClause) +
+
+ +
+ +

Method Detail

+
/Doctrine/ORM/Query/AST/Subselect.php at line 50
+

dispatch

+public void dispatch(mixed sqlWalker, mixed walker, $walker ) +
+

Double-dispatch method, supposed to dispatch back to the walker.

Implementation is not mandatory for all nodes.

+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/orm/query/ast/subselectfromclause.html b/lib/api/doctrine/orm/query/ast/subselectfromclause.html new file mode 100644 index 000000000..277c89b52 --- /dev/null +++ b/lib/api/doctrine/orm/query/ast/subselectfromclause.html @@ -0,0 +1,152 @@ + + + + + + + + + + + +SubselectFromClause (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +
Doctrine\ORM\Query\AST\SubselectFromClause
+
/Doctrine/ORM/Query/AST/SubselectFromClause.php at line 35
+ +

Class SubselectFromClause

+ +
Class:SubselectFromClause - Superclass: Node
+Node
⌊ SubselectFromClause
+ +
+ +

public class SubselectFromClause
extends Node + +

+ +

SubselectFromClause ::= "FROM" SubselectIdentificationVariableDeclaration {"," SubselectIdentificationVariableDeclaration}

+ +
+
License:
+
http://www.opensource.org/licenses/lgpl-license.php LGPL
+
See Also:
+
www.doctrine-project.org
+
Since:
+
2.0
+
Version:
+
$Revision: 3938 $
+
Author:
+
Guilherme Blanco
+
Jonathan Wage
+
Roman Borschel
+
+
+ + + + + + + +
Field Summary
mixed

$identificationVariableDeclarations

+ + + + + + +
Constructor Summary

SubselectFromClause(mixed identificationVariableDeclarations)

+ + + + + + + +
Method Summary
void

dispatch(mixed sqlWalker, mixed walker, $walker )

Double-dispatch method, supposed to dispatch back to the walker. +

+ + + +
Methods inherited from Doctrine\ORM\Query\AST\Node
dispatch, dump
+ +

Field Detail

+
/Doctrine/ORM/Query/AST/SubselectFromClause.php at line 37
+

identificationVariableDeclarations

+public mixed $identificationVariableDeclarations = array() +
+
+ +
+ +

Constructor Detail

+
/Doctrine/ORM/Query/AST/SubselectFromClause.php at line 39
+

SubselectFromClause

+public SubselectFromClause(mixed identificationVariableDeclarations) +
+
+ +
+ +

Method Detail

+
/Doctrine/ORM/Query/AST/SubselectFromClause.php at line 44
+

dispatch

+public void dispatch(mixed sqlWalker, mixed walker, $walker ) +
+

Double-dispatch method, supposed to dispatch back to the walker.

Implementation is not mandatory for all nodes.

+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/orm/query/ast/updateclause.html b/lib/api/doctrine/orm/query/ast/updateclause.html new file mode 100644 index 000000000..1dfa0dad9 --- /dev/null +++ b/lib/api/doctrine/orm/query/ast/updateclause.html @@ -0,0 +1,176 @@ + + + + + + + + + + + +UpdateClause (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +
Doctrine\ORM\Query\AST\UpdateClause
+
/Doctrine/ORM/Query/AST/UpdateClause.php at line 35
+ +

Class UpdateClause

+ +
Class:UpdateClause - Superclass: Node
+Node
⌊ UpdateClause
+ +
+ +

public class UpdateClause
extends Node + +

+ +

UpdateClause ::= "UPDATE" AbstractSchemaName [["AS"] AliasIdentificationVariable] "SET" UpdateItem {"," UpdateItem}

+ +
+
License:
+
http://www.opensource.org/licenses/lgpl-license.php LGPL
+
See Also:
+
www.doctrine-project.org
+
Since:
+
2.0
+
Version:
+
$Revision: 3938 $
+
Author:
+
Guilherme Blanco
+
Jonathan Wage
+
Roman Borschel
+
+
+ + + + + + + + + + + + + + + +
Field Summary
mixed

$abstractSchemaName

mixed

$aliasIdentificationVariable

mixed

$updateItems

+ + + + + + +
Constructor Summary

UpdateClause(mixed abstractSchemaName, mixed updateItems)

+ + + + + + + +
Method Summary
void

dispatch(mixed sqlWalker, mixed walker, $walker )

Double-dispatch method, supposed to dispatch back to the walker. +

+ + + +
Methods inherited from Doctrine\ORM\Query\AST\Node
dispatch, dump
+ +

Field Detail

+
/Doctrine/ORM/Query/AST/UpdateClause.php at line 37
+

abstractSchemaName

+public mixed $abstractSchemaName +
+
+ +
+ +
/Doctrine/ORM/Query/AST/UpdateClause.php at line 38
+

aliasIdentificationVariable

+public mixed $aliasIdentificationVariable +
+
+ +
+ +
/Doctrine/ORM/Query/AST/UpdateClause.php at line 39
+

updateItems

+public mixed $updateItems = array() +
+
+ +
+ +

Constructor Detail

+
/Doctrine/ORM/Query/AST/UpdateClause.php at line 41
+

UpdateClause

+public UpdateClause(mixed abstractSchemaName, mixed updateItems) +
+
+ +
+ +

Method Detail

+
/Doctrine/ORM/Query/AST/UpdateClause.php at line 47
+

dispatch

+public void dispatch(mixed sqlWalker, mixed walker, $walker ) +
+

Double-dispatch method, supposed to dispatch back to the walker.

Implementation is not mandatory for all nodes.

+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/orm/query/ast/updateitem.html b/lib/api/doctrine/orm/query/ast/updateitem.html new file mode 100644 index 000000000..352ac0479 --- /dev/null +++ b/lib/api/doctrine/orm/query/ast/updateitem.html @@ -0,0 +1,178 @@ + + + + + + + + + + + +UpdateItem (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +
Doctrine\ORM\Query\AST\UpdateItem
+
/Doctrine/ORM/Query/AST/UpdateItem.php at line 37
+ +

Class UpdateItem

+ +
Class:UpdateItem - Superclass: Node
+Node
⌊ UpdateItem
+ +
+ +

public class UpdateItem
extends Node + +

+ +

UpdateItem ::= [IdentificationVariable "."] {StateField | SingleValuedAssociationField} "=" NewValue +NewValue ::= SimpleArithmeticExpression | StringPrimary | DatetimePrimary | BooleanPrimary | +EnumPrimary | SimpleEntityExpression | "NULL"

+ +
+
License:
+
http://www.opensource.org/licenses/lgpl-license.php LGPL
+
See Also:
+
www.doctrine-project.org
+
Since:
+
2.0
+
Version:
+
$Revision: 3938 $
+
Author:
+
Guilherme Blanco
+
Jonathan Wage
+
Roman Borschel
+
+
+ + + + + + + + + + + + + + + +
Field Summary
mixed

$field

mixed

$identificationVariable

mixed

$newValue

+ + + + + + +
Constructor Summary

UpdateItem(mixed field, mixed newValue)

+ + + + + + + +
Method Summary
void

dispatch(mixed sqlWalker, mixed walker, $walker )

Double-dispatch method, supposed to dispatch back to the walker. +

+ + + +
Methods inherited from Doctrine\ORM\Query\AST\Node
dispatch, dump
+ +

Field Detail

+
/Doctrine/ORM/Query/AST/UpdateItem.php at line 40
+

field

+public mixed $field +
+
+ +
+ +
/Doctrine/ORM/Query/AST/UpdateItem.php at line 39
+

identificationVariable

+public mixed $identificationVariable +
+
+ +
+ +
/Doctrine/ORM/Query/AST/UpdateItem.php at line 41
+

newValue

+public mixed $newValue +
+
+ +
+ +

Constructor Detail

+
/Doctrine/ORM/Query/AST/UpdateItem.php at line 43
+

UpdateItem

+public UpdateItem(mixed field, mixed newValue) +
+
+ +
+ +

Method Detail

+
/Doctrine/ORM/Query/AST/UpdateItem.php at line 49
+

dispatch

+public void dispatch(mixed sqlWalker, mixed walker, $walker ) +
+

Double-dispatch method, supposed to dispatch back to the walker.

Implementation is not mandatory for all nodes.

+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/orm/query/ast/updatestatement.html b/lib/api/doctrine/orm/query/ast/updatestatement.html new file mode 100644 index 000000000..565bfc959 --- /dev/null +++ b/lib/api/doctrine/orm/query/ast/updatestatement.html @@ -0,0 +1,164 @@ + + + + + + + + + + + +UpdateStatement (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +
Doctrine\ORM\Query\AST\UpdateStatement
+
/Doctrine/ORM/Query/AST/UpdateStatement.php at line 35
+ +

Class UpdateStatement

+ +
Class:UpdateStatement - Superclass: Node
+Node
⌊ UpdateStatement
+ +
+ +

public class UpdateStatement
extends Node + +

+ +

UpdateStatement = UpdateClause [WhereClause]

+ +
+
License:
+
http://www.opensource.org/licenses/lgpl-license.php LGPL
+
See Also:
+
www.doctrine-project.org
+
Since:
+
2.0
+
Version:
+
$Revision: 3938 $
+
Author:
+
Guilherme Blanco
+
Jonathan Wage
+
Roman Borschel
+
+
+ + + + + + + + + + + +
Field Summary
mixed

$updateClause

mixed

$whereClause

+ + + + + + +
Constructor Summary

UpdateStatement(mixed updateClause)

+ + + + + + + +
Method Summary
void

dispatch(mixed sqlWalker, mixed walker, $walker )

Double-dispatch method, supposed to dispatch back to the walker. +

+ + + +
Methods inherited from Doctrine\ORM\Query\AST\Node
dispatch, dump
+ +

Field Detail

+
/Doctrine/ORM/Query/AST/UpdateStatement.php at line 37
+

updateClause

+public mixed $updateClause +
+
+ +
+ +
/Doctrine/ORM/Query/AST/UpdateStatement.php at line 38
+

whereClause

+public mixed $whereClause +
+
+ +
+ +

Constructor Detail

+
/Doctrine/ORM/Query/AST/UpdateStatement.php at line 40
+

UpdateStatement

+public UpdateStatement(mixed updateClause) +
+
+ +
+ +

Method Detail

+
/Doctrine/ORM/Query/AST/UpdateStatement.php at line 45
+

dispatch

+public void dispatch(mixed sqlWalker, mixed walker, $walker ) +
+

Double-dispatch method, supposed to dispatch back to the walker.

Implementation is not mandatory for all nodes.

+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/orm/query/ast/whereclause.html b/lib/api/doctrine/orm/query/ast/whereclause.html new file mode 100644 index 000000000..f29d135ad --- /dev/null +++ b/lib/api/doctrine/orm/query/ast/whereclause.html @@ -0,0 +1,152 @@ + + + + + + + + + + + +WhereClause (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +
Doctrine\ORM\Query\AST\WhereClause
+
/Doctrine/ORM/Query/AST/WhereClause.php at line 35
+ +

Class WhereClause

+ +
Class:WhereClause - Superclass: Node
+Node
⌊ WhereClause
+ +
+ +

public class WhereClause
extends Node + +

+ +

WhereClause ::= "WHERE" ConditionalExpression

+ +
+
License:
+
http://www.opensource.org/licenses/lgpl-license.php LGPL
+
See Also:
+
www.doctrine-project.org
+
Since:
+
2.0
+
Version:
+
$Revision: 3938 $
+
Author:
+
Guilherme Blanco
+
Jonathan Wage
+
Roman Borschel
+
+
+ + + + + + + +
Field Summary
mixed

$conditionalExpression

+ + + + + + +
Constructor Summary

WhereClause(mixed conditionalExpression)

+ + + + + + + +
Method Summary
void

dispatch(mixed sqlWalker, mixed walker, $walker )

Double-dispatch method, supposed to dispatch back to the walker. +

+ + + +
Methods inherited from Doctrine\ORM\Query\AST\Node
dispatch, dump
+ +

Field Detail

+
/Doctrine/ORM/Query/AST/WhereClause.php at line 37
+

conditionalExpression

+public mixed $conditionalExpression +
+
+ +
+ +

Constructor Detail

+
/Doctrine/ORM/Query/AST/WhereClause.php at line 39
+

WhereClause

+public WhereClause(mixed conditionalExpression) +
+
+ +
+ +

Method Detail

+
/Doctrine/ORM/Query/AST/WhereClause.php at line 44
+

dispatch

+public void dispatch(mixed sqlWalker, mixed walker, $walker ) +
+

Double-dispatch method, supposed to dispatch back to the walker.

Implementation is not mandatory for all nodes.

+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/orm/query/exec/abstractsqlexecutor.html b/lib/api/doctrine/orm/query/exec/abstractsqlexecutor.html new file mode 100644 index 000000000..65834251a --- /dev/null +++ b/lib/api/doctrine/orm/query/exec/abstractsqlexecutor.html @@ -0,0 +1,147 @@ + + + + + + + + + + + +AbstractSqlExecutor (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +
Doctrine\ORM\Query\Exec\AbstractSqlExecutor
+
/Doctrine/ORM/Query/Exec/AbstractSqlExecutor.php at line 35
+ +

Class AbstractSqlExecutor

+ +
AbstractSqlExecutor
+ +
+ +

public abstract class AbstractSqlExecutor

+ +

Base class for SQL statement executors.

+ +
+
Author:
+
Roman Borschel
+
License:
+
http://www.opensource.org/licenses/lgpl-license.php LGPL
+
See Also:
+
http://www.doctrine-project.org
+
Since:
+
2.0
+
Todo:
+
Rename: AbstractSQLExecutor
+
+
+ + + + + + + +
Field Summary
protected mixed

$_sqlStatements

+ + + + + + + + + + + +
Method Summary
abstract Doctrine\DBAL\Driver\Statement

execute(Doctrine\DBAL\Connection conn, array params, mixed types)

Executes all sql statements.

array

getSqlStatements()

Gets the SQL statements that are executed by the executor.

+ +

Field Detail

+
/Doctrine/ORM/Query/Exec/AbstractSqlExecutor.php at line 37
+

_sqlStatements

+protected mixed $_sqlStatements +
+
+ +
+ +

Method Detail

+
/Doctrine/ORM/Query/Exec/AbstractSqlExecutor.php at line 56
+

execute

+public abstract Doctrine\DBAL\Driver\Statement execute(Doctrine\DBAL\Connection conn, array params, mixed types) +
+

Executes all sql statements.

+
Parameters:
+
conn - The database connection that is used to execute the queries.
+
params - The parameters.
+
+
+ +
+ +
/Doctrine/ORM/Query/Exec/AbstractSqlExecutor.php at line 44
+

getSqlStatements

+public array getSqlStatements() +
+

Gets the SQL statements that are executed by the executor.

+
Returns:
+
All the SQL update statements.
+
+
+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/orm/query/exec/multitabledeleteexecutor.html b/lib/api/doctrine/orm/query/exec/multitabledeleteexecutor.html new file mode 100644 index 000000000..ad7b7c052 --- /dev/null +++ b/lib/api/doctrine/orm/query/exec/multitabledeleteexecutor.html @@ -0,0 +1,152 @@ + + + + + + + + + + + +MultiTableDeleteExecutor (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +
Doctrine\ORM\Query\Exec\MultiTableDeleteExecutor
+
/Doctrine/ORM/Query/Exec/MultiTableDeleteExecutor.php at line 37
+ +

Class MultiTableDeleteExecutor

+ +
Class:MultiTableDeleteExecutor - Superclass: AbstractSqlExecutor
+AbstractSqlExecutor
⌊ MultiTableDeleteExecutor
+ +
+ +

public class MultiTableDeleteExecutor
extends AbstractSqlExecutor + +

+ +

Executes the SQL statements for bulk DQL DELETE statements on classes in +Class Table Inheritance (JOINED).

+ +
+
Author:
+
Roman Borschel
+
License:
+
http://www.opensource.org/licenses/lgpl-license.php LGPL
+
See Also:
+
http://www.doctrine-project.org
+
Since:
+
2.0
+
Version:
+
$Revision$
+
Todo:
+
Rename: AbstractSQLExecutor
+
+
+ + + +
Fields inherited from Doctrine\ORM\Query\Exec\AbstractSqlExecutor
_sqlStatements
+ + + + + + +
Constructor Summary

MultiTableDeleteExecutor(Node AST, SqlWalker sqlWalker)

Initializes a new MultiTableDeleteExecutor.

+ + + + + + + +
Method Summary
Doctrine\DBAL\Driver\Statement

execute(Doctrine\DBAL\Connection conn, array params, mixed types)

Executes all SQL statements.

+ + + +
Methods inherited from Doctrine\ORM\Query\Exec\AbstractSqlExecutor
execute, getSqlStatements
+ +

Constructor Detail

+
/Doctrine/ORM/Query/Exec/MultiTableDeleteExecutor.php at line 51
+

MultiTableDeleteExecutor

+public MultiTableDeleteExecutor(Node AST, SqlWalker sqlWalker) +
+

Initializes a new MultiTableDeleteExecutor.

+
Parameters:
+
AST - The root AST node of the DQL query.
+
sqlWalker - The walker used for SQL generation from the AST.
+
Internal:
+
Any SQL construction and preparation takes place in the constructor for best performance. With a query cache the executor will be cached.
+
+
+ +
+ +

Method Detail

+
/Doctrine/ORM/Query/Exec/MultiTableDeleteExecutor.php at line 110
+

execute

+public Doctrine\DBAL\Driver\Statement execute(Doctrine\DBAL\Connection conn, array params, mixed types) +
+

Executes all SQL statements.

+
Parameters:
+
conn - The database connection that is used to execute the queries.
+
params - The parameters.
+
Override.
+
+
+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/orm/query/exec/multitableupdateexecutor.html b/lib/api/doctrine/orm/query/exec/multitableupdateexecutor.html new file mode 100644 index 000000000..fb09b3d01 --- /dev/null +++ b/lib/api/doctrine/orm/query/exec/multitableupdateexecutor.html @@ -0,0 +1,150 @@ + + + + + + + + + + + +MultiTableUpdateExecutor (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +
Doctrine\ORM\Query\Exec\MultiTableUpdateExecutor
+
/Doctrine/ORM/Query/Exec/MultiTableUpdateExecutor.php at line 33
+ +

Class MultiTableUpdateExecutor

+ +
Class:MultiTableUpdateExecutor - Superclass: AbstractSqlExecutor
+AbstractSqlExecutor
⌊ MultiTableUpdateExecutor
+ +
+ +

public class MultiTableUpdateExecutor
extends AbstractSqlExecutor + +

+ +

Executes the SQL statements for bulk DQL UPDATE statements on classes in +Class Table Inheritance (JOINED).

+ +
+
Author:
+
Roman Borschel
+
Since:
+
2.0
+
License:
+
http://www.opensource.org/licenses/lgpl-license.php LGPL
+
See Also:
+
http://www.doctrine-project.org
+
Todo:
+
Rename: AbstractSQLExecutor
+
+
+ + + +
Fields inherited from Doctrine\ORM\Query\Exec\AbstractSqlExecutor
_sqlStatements
+ + + + + + +
Constructor Summary

MultiTableUpdateExecutor(Node AST, SqlWalker sqlWalker)

Initializes a new MultiTableUpdateExecutor.

+ + + + + + + +
Method Summary
Doctrine\DBAL\Driver\Statement

execute(Connection conn, array params, mixed types)

Executes all SQL statements.

+ + + +
Methods inherited from Doctrine\ORM\Query\Exec\AbstractSqlExecutor
execute, getSqlStatements
+ +

Constructor Detail

+
/Doctrine/ORM/Query/Exec/MultiTableUpdateExecutor.php at line 49
+

MultiTableUpdateExecutor

+public MultiTableUpdateExecutor(Node AST, SqlWalker sqlWalker) +
+

Initializes a new MultiTableUpdateExecutor.

+
Parameters:
+
AST - The root AST node of the DQL query.
+
sqlWalker - The walker used for SQL generation from the AST.
+
Internal:
+
Any SQL construction and preparation takes place in the constructor for best performance. With a query cache the executor will be cached.
+
+
+ +
+ +

Method Detail

+
/Doctrine/ORM/Query/Exec/MultiTableUpdateExecutor.php at line 141
+

execute

+public Doctrine\DBAL\Driver\Statement execute(Connection conn, array params, mixed types) +
+

Executes all SQL statements.

+
Parameters:
+
conn - The database connection that is used to execute the queries.
+
params - The parameters.
+
Override.
+
+
+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/orm/query/exec/package-frame.html b/lib/api/doctrine/orm/query/exec/package-frame.html new file mode 100644 index 000000000..4c3060f54 --- /dev/null +++ b/lib/api/doctrine/orm/query/exec/package-frame.html @@ -0,0 +1,30 @@ + + + + + + + + + + + +Doctrine\ORM\Query\Exec (Doctrine) + + + + +

Doctrine\ORM\Query\Exec

+ +

Classes

+ + + + + \ No newline at end of file diff --git a/lib/api/doctrine/orm/query/exec/package-functions.html b/lib/api/doctrine/orm/query/exec/package-functions.html new file mode 100644 index 000000000..1dfc0c9b1 --- /dev/null +++ b/lib/api/doctrine/orm/query/exec/package-functions.html @@ -0,0 +1,69 @@ + + + + + + + + + + + +Functions (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +

Functions

+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/orm/query/exec/package-globals.html b/lib/api/doctrine/orm/query/exec/package-globals.html new file mode 100644 index 000000000..f7864605f --- /dev/null +++ b/lib/api/doctrine/orm/query/exec/package-globals.html @@ -0,0 +1,69 @@ + + + + + + + + + + + +Globals (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +

Globals

+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/orm/query/exec/package-summary.html b/lib/api/doctrine/orm/query/exec/package-summary.html new file mode 100644 index 000000000..75e528493 --- /dev/null +++ b/lib/api/doctrine/orm/query/exec/package-summary.html @@ -0,0 +1,71 @@ + + + + + + + + + + + +Doctrine\ORM\Query\Exec (Doctrine) + + + + +
+

Doctrine

+ +
+ + +
+ +

Namespace Doctrine\ORM\Query\Exec

+ + + + + + + + +
Class Summary
AbstractSqlExecutorBase class for SQL statement executors.
MultiTableDeleteExecutorExecutes the SQL statements for bulk DQL DELETE statements on classes in +Class Table Inheritance (JOINED).
MultiTableUpdateExecutorExecutes the SQL statements for bulk DQL UPDATE statements on classes in +Class Table Inheritance (JOINED).
SingleSelectExecutorExecutor that executes the SQL statement for simple DQL SELECT statements.
SingleTableDeleteUpdateExecutorExecutor that executes the SQL statements for DQL DELETE/UPDATE statements on classes +that are mapped to a single table.
+ +
+ +
+

Doctrine

+ +
+ + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/orm/query/exec/package-tree.html b/lib/api/doctrine/orm/query/exec/package-tree.html new file mode 100644 index 000000000..0667525fa --- /dev/null +++ b/lib/api/doctrine/orm/query/exec/package-tree.html @@ -0,0 +1,62 @@ + + + + + + + + + + + +Doctrine\ORM\Query\Exec (Doctrine) + + + + +
+

Doctrine

+ +
+ + +

Class Hierarchy for Package Doctrine\ORM\Query\Exec

+
+

Doctrine

+ +
+ + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/orm/query/exec/singleselectexecutor.html b/lib/api/doctrine/orm/query/exec/singleselectexecutor.html new file mode 100644 index 000000000..9d97fbe5c --- /dev/null +++ b/lib/api/doctrine/orm/query/exec/singleselectexecutor.html @@ -0,0 +1,143 @@ + + + + + + + + + + + +SingleSelectExecutor (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +
Doctrine\ORM\Query\Exec\SingleSelectExecutor
+
/Doctrine/ORM/Query/Exec/SingleSelectExecutor.php at line 37
+ +

Class SingleSelectExecutor

+ +
Class:SingleSelectExecutor - Superclass: AbstractSqlExecutor
+AbstractSqlExecutor
⌊ SingleSelectExecutor
+ +
+ +

public class SingleSelectExecutor
extends AbstractSqlExecutor + +

+ +

Executor that executes the SQL statement for simple DQL SELECT statements.

+ +
+
License:
+
http://www.opensource.org/licenses/lgpl-license.php LGPL
+
Author:
+
Roman Borschel
+
Version:
+
$Revision$
+
See Also:
+
www.doctrine-project.org
+
Since:
+
2.0
+
Todo:
+
Rename: AbstractSQLExecutor
+
+
+ + + +
Fields inherited from Doctrine\ORM\Query\Exec\AbstractSqlExecutor
_sqlStatements
+ + + + + + +
Constructor Summary

SingleSelectExecutor(mixed AST, mixed sqlWalker)

+ + + + + + + +
Method Summary
Doctrine\DBAL\Driver\Statement

execute(Doctrine\DBAL\Connection conn, array params, mixed types)

Executes all sql statements.

+ + + +
Methods inherited from Doctrine\ORM\Query\Exec\AbstractSqlExecutor
execute, getSqlStatements
+ +

Constructor Detail

+
/Doctrine/ORM/Query/Exec/SingleSelectExecutor.php at line 39
+

SingleSelectExecutor

+public SingleSelectExecutor(mixed AST, mixed sqlWalker) +
+
+ +
+ +

Method Detail

+
/Doctrine/ORM/Query/Exec/SingleSelectExecutor.php at line 44
+

execute

+public Doctrine\DBAL\Driver\Statement execute(Doctrine\DBAL\Connection conn, array params, mixed types) +
+

Executes all sql statements.

+
Parameters:
+
conn - The database connection that is used to execute the queries.
+
params - The parameters.
+
+
+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/orm/query/exec/singletabledeleteupdateexecutor.html b/lib/api/doctrine/orm/query/exec/singletabledeleteupdateexecutor.html new file mode 100644 index 000000000..57de34ba3 --- /dev/null +++ b/lib/api/doctrine/orm/query/exec/singletabledeleteupdateexecutor.html @@ -0,0 +1,144 @@ + + + + + + + + + + + +SingleTableDeleteUpdateExecutor (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +
Doctrine\ORM\Query\Exec\SingleTableDeleteUpdateExecutor
+
/Doctrine/ORM/Query/Exec/SingleTableDeleteUpdateExecutor.php at line 38
+ +

Class SingleTableDeleteUpdateExecutor

+ +
Class:SingleTableDeleteUpdateExecutor - Superclass: AbstractSqlExecutor
+AbstractSqlExecutor
⌊ SingleTableDeleteUpdateExecutor
+ +
+ +

public class SingleTableDeleteUpdateExecutor
extends AbstractSqlExecutor + +

+ +

Executor that executes the SQL statements for DQL DELETE/UPDATE statements on classes +that are mapped to a single table.

+ +
+
License:
+
http://www.opensource.org/licenses/lgpl-license.php LGPL
+
Author:
+
Roman Borschel
+
Version:
+
$Revision$
+
See Also:
+
www.doctrine-project.org
+
Since:
+
2.0
+
Todo:
+
This is exactly the same as SingleSelectExecutor. Unify in SingleStatementExecutor.
+
+
+ + + +
Fields inherited from Doctrine\ORM\Query\Exec\AbstractSqlExecutor
_sqlStatements
+ + + + + + +
Constructor Summary

SingleTableDeleteUpdateExecutor(mixed AST, mixed sqlWalker)

+ + + + + + + +
Method Summary
Doctrine\DBAL\Driver\Statement

execute(Doctrine\DBAL\Connection conn, array params, mixed types)

Executes all sql statements.

+ + + +
Methods inherited from Doctrine\ORM\Query\Exec\AbstractSqlExecutor
execute, getSqlStatements
+ +

Constructor Detail

+
/Doctrine/ORM/Query/Exec/SingleTableDeleteUpdateExecutor.php at line 40
+

SingleTableDeleteUpdateExecutor

+public SingleTableDeleteUpdateExecutor(mixed AST, mixed sqlWalker) +
+
+ +
+ +

Method Detail

+
/Doctrine/ORM/Query/Exec/SingleTableDeleteUpdateExecutor.php at line 49
+

execute

+public Doctrine\DBAL\Driver\Statement execute(Doctrine\DBAL\Connection conn, array params, mixed types) +
+

Executes all sql statements.

+
Parameters:
+
conn - The database connection that is used to execute the queries.
+
params - The parameters.
+
+
+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/orm/query/expr.html b/lib/api/doctrine/orm/query/expr.html new file mode 100644 index 000000000..1e16562a8 --- /dev/null +++ b/lib/api/doctrine/orm/query/expr.html @@ -0,0 +1,767 @@ + + + + + + + + + + + +Expr (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +
Doctrine\ORM\Query\Expr
+
/Doctrine/ORM/Query/Expr.php at line 36
+ +

Class Expr

+ +
Expr
+ +
+ +

public class Expr

+ +

This class is used to generate DQL expressions via a set of PHP static functions

+ +
+
License:
+
http://www.opensource.org/licenses/lgpl-license.php LGPL
+
See Also:
+
www.doctrine-project.org
+
Since:
+
2.0
+
Version:
+
$Revision$
+
Author:
+
Guilherme Blanco
+
Jonathan Wage
+
Roman Borschel
+
Todo:
+
Rename: ExpressionBuilder
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Method Summary
Expr\Func

abs(mixed x)

Creates an ABS() function expression with the given argument.

Expr\Func

all(mixed subquery)

Creates an instance of ALL() function, with the given DQL Subquery.

Expr\Andx

andX(mixed x)

Creates a conjunction of the given boolean expressions. +

Expr\Func

any(mixed subquery)

Creates an ANY() function expression with the given DQL subquery.

OrderBy

asc(mixed expr, $sort )

Creates an ASCending order expression.

Expr\Func

avg(mixed x)

Creates an instance of AVG() function, with the given argument.

Expr\Func

between(mixed val, integer x, integer y)

Creates an instance of BETWEEN() function, with the given argument.

Expr\Func

concat(mixed x, mixed y)

Creates a CONCAT() function expression with the given arguments.

Expr\Func

count(mixed x)

Creates an instance of COUNT() function, with the given argument.

string

countDistinct(mixed x)

Creates an instance of COUNT(DISTINCT) function, with the given argument.

OrderBy

desc(mixed expr, $sort )

Creates a DESCending order expression.

Expr\Math

diff(mixed x, mixed y)

Creates a difference mathematical expression with the given arguments. +

Expr\Comparison

eq(mixed x, mixed y)

Creates an equality comparison expression with the given arguments. +

Expr\Func

exists(mixed subquery)

Creates an instance of EXISTS() function, with the given DQL Subquery.

Expr\Comparison

gt(mixed x, mixed y)

Creates an instance of Expr\Comparison, with the given arguments. +

Expr\Comparison

gte(mixed x, mixed y)

Creates an instance of Expr\Comparison, with the given arguments. +

Expr\Func

in(string x, mixed y)

Creates an IN() expression with the given arguments.

Expr\Func

length(mixed x)

Creates a LENGTH() function expression with the given argument.

Expr\Comparison

like(string x, mixed y)

Creates a LIKE() comparison expression with the given arguments.

Expr\Literal

literal(mixed literal)

Creates a literal expression of the given argument.

Expr\Func

lower(mixed x)

Creates a LOWER() function expression with the given argument.

Expr\Comparison

lt(mixed x, mixed y)

Creates an instance of Expr\Comparison, with the given arguments. +

Expr\Comparison

lte(mixed x, mixed y)

Creates an instance of Expr\Comparison, with the given arguments. +

Expr\Func

max(mixed x)

Creates an instance of MAX() function, with the given argument.

Expr\Func

min(mixed x)

Creates an instance of MIN() function, with the given argument.

Expr\Comparison

neq(mixed x, mixed y)

Creates an instance of Expr\Comparison, with the given arguments. +

Expr\Func

not(mixed restriction)

Creates a negation expression of the given restriction.

Expr\Func

notIn(string x, mixed y)

Creates a NOT IN() expression with the given arguments.

Expr\Orx

orX(mixed x)

Creates a disjunction of the given boolean expressions. +

Expr\Math

prod(mixed x, mixed y)

Creates a product mathematical expression with the given arguments. +

Expr\Math

quot(mixed x, mixed y)

Creates a quotient mathematical expression with the given arguments. +

Expr\Func

some(mixed subquery)

Creates a SOME() function expression with the given DQL subquery.

Expr\Func

sqrt(mixed x)

Creates a SQRT() function expression with the given argument.

Expr\Func

substring(mixed x, integer from, integer len)

Creates a SUBSTRING() function expression with the given arguments.

Expr\Math

sum(mixed x, mixed y)

Creates a sum mathematical expression with the given arguments. +

Expr\Func

trim(mixed x)

Creates an instance of TRIM() function, with the given argument.

Expr\Func

upper(mixed x)

Creates an UPPER() function expression with the given argument.

+ +

Method Detail

+
/Doctrine/ORM/Query/Expr.php at line 321
+

abs

+public Expr\Func abs(mixed x) +
+

Creates an ABS() function expression with the given argument.

+
Parameters:
+
x - Argument to be used in ABS() function.
+
+
+ +
+ +
/Doctrine/ORM/Query/Expr.php at line 277
+

all

+public Expr\Func all(mixed subquery) +
+

Creates an instance of ALL() function, with the given DQL Subquery.

+
Parameters:
+
subquery - DQL Subquery to be used in ALL() function.
+
+
+ +
+ +
/Doctrine/ORM/Query/Expr.php at line 51
+

andX

+public Expr\Andx andX(mixed x) +
+

Creates a conjunction of the given boolean expressions.

Example:

[php] +(u.type = ?1) AND (u.role = ?2) +$expr->andX('u.type = ?1', 'u.role = ?2'));

+
Parameters:
+
x - Optional clause. Defaults = null, but requires at least one defined when converting to string.
+
+
+ +
+ +
/Doctrine/ORM/Query/Expr.php at line 299
+

any

+public Expr\Func any(mixed subquery) +
+

Creates an ANY() function expression with the given DQL subquery.

+
Parameters:
+
subquery - DQL Subquery to be used in ANY() function.
+
+
+ +
+ +
/Doctrine/ORM/Query/Expr.php at line 80
+

asc

+public OrderBy asc(mixed expr, $sort ) +
+

Creates an ASCending order expression.

+ +
+ +
/Doctrine/ORM/Query/Expr.php at line 211
+

avg

+public Expr\Func avg(mixed x) +
+

Creates an instance of AVG() function, with the given argument.

+
Parameters:
+
x - Argument to be used in AVG() function.
+
+
+ +
+ +
/Doctrine/ORM/Query/Expr.php at line 545
+

between

+public Expr\Func between(mixed val, integer x, integer y) +
+

Creates an instance of BETWEEN() function, with the given argument.

+
Parameters:
+
val - Valued to be inspected by range values.
+
x - Starting range value to be used in BETWEEN() function.
+
y - End point value to be used in BETWEEN() function.
+
Returns:
+
A BETWEEN expression.
+
+
+ +
+ +
/Doctrine/ORM/Query/Expr.php at line 460
+

concat

+public Expr\Func concat(mixed x, mixed y) +
+

Creates a CONCAT() function expression with the given arguments.

+
Parameters:
+
x - First argument to be used in CONCAT() function.
+
x - Second argument to be used in CONCAT() function.
+
+
+ +
+ +
/Doctrine/ORM/Query/Expr.php at line 244
+

count

+public Expr\Func count(mixed x) +
+

Creates an instance of COUNT() function, with the given argument.

+
Parameters:
+
x - Argument to be used in COUNT() function.
+
+
+ +
+ +
/Doctrine/ORM/Query/Expr.php at line 255
+

countDistinct

+public string countDistinct(mixed x) +
+

Creates an instance of COUNT(DISTINCT) function, with the given argument.

+
Parameters:
+
x - Argument to be used in COUNT(DISTINCT) function.
+
+
+ +
+ +
/Doctrine/ORM/Query/Expr.php at line 91
+

desc

+public OrderBy desc(mixed expr, $sort ) +
+

Creates a DESCending order expression.

+ +
+ +
/Doctrine/ORM/Query/Expr.php at line 358
+

diff

+public Expr\Math diff(mixed x, mixed y) +
+

Creates a difference mathematical expression with the given arguments. +First argument is considered the left expression and the second is the right expression. +When converted to string, it will generated a - . Example:

[php] +u.monthlySubscriptionCount - 1 +$q->expr()->diff('u.monthlySubscriptionCount', '1')

+
Parameters:
+
x - Left expression
+
y - Right expression
+
+
+ +
+ +
/Doctrine/ORM/Query/Expr.php at line 110
+

eq

+public Expr\Comparison eq(mixed x, mixed y) +
+

Creates an equality comparison expression with the given arguments.

First argument is considered the left expression and the second is the right expression. +When converted to string, it will generated a = . Example:

[php] +u.id = ?1 +$expr->eq('u.id', '?1');

+
Parameters:
+
x - Left expression
+
y - Right expression
+
+
+ +
+ +
/Doctrine/ORM/Query/Expr.php at line 266
+

exists

+public Expr\Func exists(mixed subquery) +
+

Creates an instance of EXISTS() function, with the given DQL Subquery.

+
Parameters:
+
subquery - DQL Subquery to be used in EXISTS() function.
+
+
+ +
+ +
/Doctrine/ORM/Query/Expr.php at line 182
+

gt

+public Expr\Comparison gt(mixed x, mixed y) +
+

Creates an instance of Expr\Comparison, with the given arguments. +First argument is considered the left expression and the second is the right expression. +When converted to string, it will generated a > . Example:

[php] +u.id > ?1 +$q->where($q->expr()->gt('u.id', '?1'));

+
Parameters:
+
x - Left expression
+
y - Right expression
+
+
+ +
+ +
/Doctrine/ORM/Query/Expr.php at line 200
+

gte

+public Expr\Comparison gte(mixed x, mixed y) +
+

Creates an instance of Expr\Comparison, with the given arguments. +First argument is considered the left expression and the second is the right expression. +When converted to string, it will generated a >= . Example:

[php] +u.id >= ?1 +$q->where($q->expr()->gte('u.id', '?1'));

+
Parameters:
+
x - Left expression
+
y - Right expression
+
+
+ +
+ +
/Doctrine/ORM/Query/Expr.php at line 417
+

in

+public Expr\Func in(string x, mixed y) +
+

Creates an IN() expression with the given arguments.

+
Parameters:
+
x - Field in string format to be restricted by IN() function
+
y - Argument to be used in IN() function.
+
+
+ +
+ +
/Doctrine/ORM/Query/Expr.php at line 506
+

length

+public Expr\Func length(mixed x) +
+

Creates a LENGTH() function expression with the given argument.

+
Parameters:
+
x - Argument to be used as argument of LENGTH() function.
+
Returns:
+
A LENGTH function expression.
+
+
+ +
+ +
/Doctrine/ORM/Query/Expr.php at line 448
+

like

+public Expr\Comparison like(string x, mixed y) +
+

Creates a LIKE() comparison expression with the given arguments.

+
Parameters:
+
x - Field in string format to be inspected by LIKE() comparison.
+
y - Argument to be used in LIKE() comparison.
+
+
+ +
+ +
/Doctrine/ORM/Query/Expr.php at line 517
+

literal

+public Expr\Literal literal(mixed literal) +
+

Creates a literal expression of the given argument.

+
Parameters:
+
literal - Argument to be converted to literal.
+
+
+ +
+ +
/Doctrine/ORM/Query/Expr.php at line 484
+

lower

+public Expr\Func lower(mixed x) +
+

Creates a LOWER() function expression with the given argument.

+
Parameters:
+
x - Argument to be used in LOWER() function.
+
Returns:
+
A LOWER function expression.
+
+
+ +
+ +
/Doctrine/ORM/Query/Expr.php at line 146
+

lt

+public Expr\Comparison lt(mixed x, mixed y) +
+

Creates an instance of Expr\Comparison, with the given arguments. +First argument is considered the left expression and the second is the right expression. +When converted to string, it will generated a < . Example:

[php] +u.id < ?1 +$q->where($q->expr()->lt('u.id', '?1'));

+
Parameters:
+
x - Left expression
+
y - Right expression
+
+
+ +
+ +
/Doctrine/ORM/Query/Expr.php at line 164
+

lte

+public Expr\Comparison lte(mixed x, mixed y) +
+

Creates an instance of Expr\Comparison, with the given arguments. +First argument is considered the left expression and the second is the right expression. +When converted to string, it will generated a <= . Example:

[php] +u.id <= ?1 +$q->where($q->expr()->lte('u.id', '?1'));

+
Parameters:
+
x - Left expression
+
y - Right expression
+
+
+ +
+ +
/Doctrine/ORM/Query/Expr.php at line 222
+

max

+public Expr\Func max(mixed x) +
+

Creates an instance of MAX() function, with the given argument.

+
Parameters:
+
x - Argument to be used in MAX() function.
+
+
+ +
+ +
/Doctrine/ORM/Query/Expr.php at line 233
+

min

+public Expr\Func min(mixed x) +
+

Creates an instance of MIN() function, with the given argument.

+
Parameters:
+
x - Argument to be used in MIN() function.
+
+
+ +
+ +
/Doctrine/ORM/Query/Expr.php at line 128
+

neq

+public Expr\Comparison neq(mixed x, mixed y) +
+

Creates an instance of Expr\Comparison, with the given arguments. +First argument is considered the left expression and the second is the right expression. +When converted to string, it will generated a <> . Example:

[php] +u.id <> ?1 +$q->where($q->expr()->neq('u.id', '?1'));

+
Parameters:
+
x - Left expression
+
y - Right expression
+
+
+ +
+ +
/Doctrine/ORM/Query/Expr.php at line 310
+

not

+public Expr\Func not(mixed restriction) +
+

Creates a negation expression of the given restriction.

+
Parameters:
+
restriction - Restriction to be used in NOT() function.
+
+
+ +
+ +
/Doctrine/ORM/Query/Expr.php at line 436
+

notIn

+public Expr\Func notIn(string x, mixed y) +
+

Creates a NOT IN() expression with the given arguments.

+
Parameters:
+
x - Field in string format to be restricted by NOT IN() function
+
y - Argument to be used in NOT IN() function.
+
+
+ +
+ +
/Doctrine/ORM/Query/Expr.php at line 69
+

orX

+public Expr\Orx orX(mixed x) +
+

Creates a disjunction of the given boolean expressions.

Example:

[php] +(u.type = ?1) OR (u.role = ?2) +$q->where($q->expr()->orX('u.type = ?1', 'u.role = ?2'));

+
Parameters:
+
x - Optional clause. Defaults = null, but requires at least one defined when converting to string.
+
+
+ +
+ +
/Doctrine/ORM/Query/Expr.php at line 340
+

prod

+public Expr\Math prod(mixed x, mixed y) +
+

Creates a product mathematical expression with the given arguments.

First argument is considered the left expression and the second is the right expression. +When converted to string, it will generated a * . Example:

[php] +u.salary * u.percentAnualSalaryIncrease +$q->expr()->prod('u.salary', 'u.percentAnualSalaryIncrease')

+
Parameters:
+
x - Left expression
+
y - Right expression
+
+
+ +
+ +
/Doctrine/ORM/Query/Expr.php at line 394
+

quot

+public Expr\Math quot(mixed x, mixed y) +
+

Creates a quotient mathematical expression with the given arguments. +First argument is considered the left expression and the second is the right expression. +When converted to string, it will generated a / . Example:

[php] +u.total / u.period +$expr->quot('u.total', 'u.period')

+
Parameters:
+
x - Left expression
+
y - Right expression
+
+
+ +
+ +
/Doctrine/ORM/Query/Expr.php at line 288
+

some

+public Expr\Func some(mixed subquery) +
+

Creates a SOME() function expression with the given DQL subquery.

+
Parameters:
+
subquery - DQL Subquery to be used in SOME() function.
+
+
+ +
+ +
/Doctrine/ORM/Query/Expr.php at line 405
+

sqrt

+public Expr\Func sqrt(mixed x) +
+

Creates a SQRT() function expression with the given argument.

+
Parameters:
+
x - Argument to be used in SQRT() function.
+
+
+ +
+ +
/Doctrine/ORM/Query/Expr.php at line 473
+

substring

+public Expr\Func substring(mixed x, integer from, integer len) +
+

Creates a SUBSTRING() function expression with the given arguments.

+
Parameters:
+
x - Argument to be used as string to be cropped by SUBSTRING() function.
+
from - Initial offset to start cropping string. May accept negative values.
+
len - Length of crop. May accept negative values.
+
+
+ +
+ +
/Doctrine/ORM/Query/Expr.php at line 376
+

sum

+public Expr\Math sum(mixed x, mixed y) +
+

Creates a sum mathematical expression with the given arguments. +First argument is considered the left expression and the second is the right expression. +When converted to string, it will generated a + . Example:

[php] +u.numChildren + 1 +$q->expr()->diff('u.numChildren', '1')

+
Parameters:
+
x - Left expression
+
y - Right expression
+
+
+ +
+ +
/Doctrine/ORM/Query/Expr.php at line 556
+

trim

+public Expr\Func trim(mixed x) +
+

Creates an instance of TRIM() function, with the given argument.

+
Parameters:
+
x - Argument to be used as argument of TRIM() function.
+
Returns:
+
a TRIM expression.
+
+
+ +
+ +
/Doctrine/ORM/Query/Expr.php at line 495
+

upper

+public Expr\Func upper(mixed x) +
+

Creates an UPPER() function expression with the given argument.

+
Parameters:
+
x - Argument to be used in UPPER() function.
+
Returns:
+
An UPPER function expression.
+
+
+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/orm/query/expr/andx.html b/lib/api/doctrine/orm/query/expr/andx.html new file mode 100644 index 000000000..fe7b96cc7 --- /dev/null +++ b/lib/api/doctrine/orm/query/expr/andx.html @@ -0,0 +1,134 @@ + + + + + + + + + + + +Andx (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +
Doctrine\ORM\Query\Expr\Andx
+
/Doctrine/ORM/Query/Expr/Andx.php at line 35
+ +

Class Andx

+ +
Class:Andx - Superclass: Base
+Base
⌊ Andx
+ +
+ +

public class Andx
extends Base + +

+ +

Expression class for building DQL and parts

+ +
+
License:
+
http://www.opensource.org/licenses/lgpl-license.php LGPL
+
See Also:
+
www.doctrine-project.org
+
Since:
+
2.0
+
Version:
+
$Revision$
+
Author:
+
Guilherme Blanco
+
Jonathan Wage
+
Roman Borschel
+
+
+ + + + + + + + + + + +
Field Summary
protected mixed

$_allowedClasses

protected mixed

$_separator

+ + + +
Fields inherited from Doctrine\ORM\Query\Expr\Base
_allowedClasses, _postSeparator, _preSeparator, _separator
+ + + +
Methods inherited from Doctrine\ORM\Query\Expr\Base
add, addMultiple, count
+ +

Field Detail

+
/Doctrine/ORM/Query/Expr/Andx.php at line 38
+

_allowedClasses

+protected mixed $_allowedClasses = array(...) +
+
+ +
+ +
/Doctrine/ORM/Query/Expr/Andx.php at line 37
+

_separator

+protected mixed $_separator = ') AND (' +
+
+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/orm/query/expr/base.html b/lib/api/doctrine/orm/query/expr/base.html new file mode 100644 index 000000000..b91a71418 --- /dev/null +++ b/lib/api/doctrine/orm/query/expr/base.html @@ -0,0 +1,204 @@ + + + + + + + + + + + +Base (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +
Doctrine\ORM\Query\Expr\Base
+
/Doctrine/ORM/Query/Expr/Base.php at line 35
+ +

Class Base

+ +
Base
+ +
+ +

public abstract class Base

+ +

Abstract base Expr class for building DQL parts

+ +
+
License:
+
http://www.opensource.org/licenses/lgpl-license.php LGPL
+
See Also:
+
www.doctrine-project.org
+
Since:
+
2.0
+
Version:
+
$Revision$
+
Author:
+
Guilherme Blanco
+
Jonathan Wage
+
Roman Borschel
+
+
+ + + + + + + + + + + + + + + + + + + +
Field Summary
protected mixed

$_allowedClasses

protected mixed

$_postSeparator

protected mixed

$_preSeparator

protected mixed

$_separator

+ + + + + + +
Constructor Summary

Base(mixed args)

+ + + + + + + + + + + + + + + +
Method Summary
void

add(mixed arg)

void

addMultiple(mixed args)

void

count()

+ +

Field Detail

+
/Doctrine/ORM/Query/Expr/Base.php at line 40
+

_allowedClasses

+protected mixed $_allowedClasses = array() +
+
+ +
+ +
/Doctrine/ORM/Query/Expr/Base.php at line 39
+

_postSeparator

+protected mixed $_postSeparator = ')' +
+
+ +
+ +
/Doctrine/ORM/Query/Expr/Base.php at line 37
+

_preSeparator

+protected mixed $_preSeparator = '(' +
+
+ +
+ +
/Doctrine/ORM/Query/Expr/Base.php at line 38
+

_separator

+protected mixed $_separator = ', ' +
+
+ +
+ +

Constructor Detail

+
/Doctrine/ORM/Query/Expr/Base.php at line 44
+

Base

+public Base(mixed args) +
+
+ +
+ +

Method Detail

+
/Doctrine/ORM/Query/Expr/Base.php at line 56
+

add

+public void add(mixed arg) +
+
+ +
+ +
/Doctrine/ORM/Query/Expr/Base.php at line 49
+

addMultiple

+public void addMultiple(mixed args) +
+
+ +
+ +
/Doctrine/ORM/Query/Expr/Base.php at line 72
+

count

+public void count() +
+
+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/orm/query/expr/comparison.html b/lib/api/doctrine/orm/query/expr/comparison.html new file mode 100644 index 000000000..573a47ffc --- /dev/null +++ b/lib/api/doctrine/orm/query/expr/comparison.html @@ -0,0 +1,187 @@ + + + + + + + + + + + +Comparison (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +
Doctrine\ORM\Query\Expr\Comparison
+
/Doctrine/ORM/Query/Expr/Comparison.php at line 35
+ +

Class Comparison

+ +
Comparison
+ +
+ +

public class Comparison

+ +

Expression class for DQL comparison expressions

+ +
+
License:
+
http://www.opensource.org/licenses/lgpl-license.php LGPL
+
See Also:
+
www.doctrine-project.org
+
Since:
+
2.0
+
Version:
+
$Revision$
+
Author:
+
Guilherme Blanco
+
Jonathan Wage
+
Roman Borschel
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
Field Summary
final str

EQ

final str

GT

final str

GTE

final str

LT

final str

LTE

final str

NEQ

+ + + + + + +
Constructor Summary

Comparison(mixed leftExpr, mixed operator, mixed rightExpr)

+ +

Field Detail

+
/Doctrine/ORM/Query/Expr/Comparison.php at line 37
+

EQ

+public final str EQ = '=' +
+
+ +
+ +
/Doctrine/ORM/Query/Expr/Comparison.php at line 41
+

GT

+public final str GT = '>' +
+
+ +
+ +
/Doctrine/ORM/Query/Expr/Comparison.php at line 42
+

GTE

+public final str GTE = '>=' +
+
+ +
+ +
/Doctrine/ORM/Query/Expr/Comparison.php at line 39
+

LT

+public final str LT = '<' +
+
+ +
+ +
/Doctrine/ORM/Query/Expr/Comparison.php at line 40
+

LTE

+public final str LTE = '<=' +
+
+ +
+ +
/Doctrine/ORM/Query/Expr/Comparison.php at line 38
+

NEQ

+public final str NEQ = '<>' +
+
+ +
+ +

Constructor Detail

+
/Doctrine/ORM/Query/Expr/Comparison.php at line 48
+

Comparison

+public Comparison(mixed leftExpr, mixed operator, mixed rightExpr) +
+
+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/orm/query/expr/from.html b/lib/api/doctrine/orm/query/expr/from.html new file mode 100644 index 000000000..52b2de005 --- /dev/null +++ b/lib/api/doctrine/orm/query/expr/from.html @@ -0,0 +1,139 @@ + + + + + + + + + + + +From (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +
Doctrine\ORM\Query\Expr\From
+
/Doctrine/ORM/Query/Expr/From.php at line 35
+ +

Class From

+ +
From
+ +
+ +

public class From

+ +

Expression class for DQL from

+ +
+
License:
+
http://www.opensource.org/licenses/lgpl-license.php LGPL
+
See Also:
+
www.doctrine-project.org
+
Since:
+
2.0
+
Version:
+
$Revision$
+
Author:
+
Guilherme Blanco
+
Jonathan Wage
+
Roman Borschel
+
+
+ + + + + + +
Constructor Summary

From(mixed from, mixed alias)

+ + + + + + + + + + + +
Method Summary
void

getAlias()

void

getFrom()

+ +

Constructor Detail

+
/Doctrine/ORM/Query/Expr/From.php at line 40
+

From

+public From(mixed from, mixed alias) +
+
+ +
+ +

Method Detail

+
/Doctrine/ORM/Query/Expr/From.php at line 51
+

getAlias

+public void getAlias() +
+
+ +
+ +
/Doctrine/ORM/Query/Expr/From.php at line 46
+

getFrom

+public void getFrom() +
+
+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/orm/query/expr/func.html b/lib/api/doctrine/orm/query/expr/func.html new file mode 100644 index 000000000..f4dcdf860 --- /dev/null +++ b/lib/api/doctrine/orm/query/expr/func.html @@ -0,0 +1,110 @@ + + + + + + + + + + + +Func (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +
Doctrine\ORM\Query\Expr\Func
+
/Doctrine/ORM/Query/Expr/Func.php at line 35
+ +

Class Func

+ +
Func
+ +
+ +

public class Func

+ +

Expression class for generating DQL functions

+ +
+
License:
+
http://www.opensource.org/licenses/lgpl-license.php LGPL
+
See Also:
+
www.doctrine-project.org
+
Since:
+
2.0
+
Version:
+
$Revision$
+
Author:
+
Guilherme Blanco
+
Jonathan Wage
+
Roman Borschel
+
+
+ + + + + + +
Constructor Summary

Func(mixed name, mixed arguments)

+ +

Constructor Detail

+
/Doctrine/ORM/Query/Expr/Func.php at line 40
+

Func

+public Func(mixed name, mixed arguments) +
+
+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/orm/query/expr/groupby.html b/lib/api/doctrine/orm/query/expr/groupby.html new file mode 100644 index 000000000..f27f3ff1d --- /dev/null +++ b/lib/api/doctrine/orm/query/expr/groupby.html @@ -0,0 +1,134 @@ + + + + + + + + + + + +GroupBy (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +
Doctrine\ORM\Query\Expr\GroupBy
+
/Doctrine/ORM/Query/Expr/GroupBy.php at line 35
+ +

Class GroupBy

+ +
Class:GroupBy - Superclass: Base
+Base
⌊ GroupBy
+ +
+ +

public class GroupBy
extends Base + +

+ +

Expression class for building DQL Group By parts

+ +
+
License:
+
http://www.opensource.org/licenses/lgpl-license.php LGPL
+
See Also:
+
www.doctrine-project.org
+
Since:
+
2.0
+
Version:
+
$Revision$
+
Author:
+
Guilherme Blanco
+
Jonathan Wage
+
Roman Borschel
+
+
+ + + + + + + + + + + +
Field Summary
protected mixed

$_postSeparator

protected mixed

$_preSeparator

+ + + +
Fields inherited from Doctrine\ORM\Query\Expr\Base
_allowedClasses, _postSeparator, _preSeparator, _separator
+ + + +
Methods inherited from Doctrine\ORM\Query\Expr\Base
add, addMultiple, count
+ +

Field Detail

+
/Doctrine/ORM/Query/Expr/GroupBy.php at line 38
+

_postSeparator

+protected mixed $_postSeparator = '' +
+
+ +
+ +
/Doctrine/ORM/Query/Expr/GroupBy.php at line 37
+

_preSeparator

+protected mixed $_preSeparator = '' +
+
+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/orm/query/expr/join.html b/lib/api/doctrine/orm/query/expr/join.html new file mode 100644 index 000000000..4437b8cef --- /dev/null +++ b/lib/api/doctrine/orm/query/expr/join.html @@ -0,0 +1,163 @@ + + + + + + + + + + + +Join (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +
Doctrine\ORM\Query\Expr\Join
+
/Doctrine/ORM/Query/Expr/Join.php at line 35
+ +

Class Join

+ +
Join
+ +
+ +

public class Join

+ +

Expression class for DQL from

+ +
+
License:
+
http://www.opensource.org/licenses/lgpl-license.php LGPL
+
See Also:
+
www.doctrine-project.org
+
Since:
+
2.0
+
Version:
+
$Revision$
+
Author:
+
Guilherme Blanco
+
Jonathan Wage
+
Roman Borschel
+
+
+ + + + + + + + + + + + + + + + + + + +
Field Summary
final str

INNER_JOIN

final str

LEFT_JOIN

final str

ON

final str

WITH

+ + + + + + +
Constructor Summary

Join(mixed joinType, mixed join, mixed alias, mixed conditionType, mixed condition)

+ +

Field Detail

+
/Doctrine/ORM/Query/Expr/Join.php at line 37
+

INNER_JOIN

+public final str INNER_JOIN = 'INNER' +
+
+ +
+ +
/Doctrine/ORM/Query/Expr/Join.php at line 38
+

LEFT_JOIN

+public final str LEFT_JOIN = 'LEFT' +
+
+ +
+ +
/Doctrine/ORM/Query/Expr/Join.php at line 40
+

ON

+public final str ON = 'ON' +
+
+ +
+ +
/Doctrine/ORM/Query/Expr/Join.php at line 41
+

WITH

+public final str WITH = 'WITH' +
+
+ +
+ +

Constructor Detail

+
/Doctrine/ORM/Query/Expr/Join.php at line 49
+

Join

+public Join(mixed joinType, mixed join, mixed alias, mixed conditionType, mixed condition) +
+
+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/orm/query/expr/literal.html b/lib/api/doctrine/orm/query/expr/literal.html new file mode 100644 index 000000000..25fc60b89 --- /dev/null +++ b/lib/api/doctrine/orm/query/expr/literal.html @@ -0,0 +1,134 @@ + + + + + + + + + + + +Literal (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +
Doctrine\ORM\Query\Expr\Literal
+
/Doctrine/ORM/Query/Expr/Literal.php at line 5
+ +

Class Literal

+ +
Class:Literal - Superclass: Base
+Base
⌊ Literal
+ +
+ +

public class Literal
extends Base + +

+ +

Abstract base Expr class for building DQL parts

+ +
+
License:
+
http://www.opensource.org/licenses/lgpl-license.php LGPL
+
See Also:
+
www.doctrine-project.org
+
Since:
+
2.0
+
Version:
+
$Revision$
+
Author:
+
Guilherme Blanco
+
Jonathan Wage
+
Roman Borschel
+
+
+ + + + + + + + + + + +
Field Summary
protected mixed

$_postSeparator

protected mixed

$_preSeparator

+ + + +
Fields inherited from Doctrine\ORM\Query\Expr\Base
_allowedClasses, _postSeparator, _preSeparator, _separator
+ + + +
Methods inherited from Doctrine\ORM\Query\Expr\Base
add, addMultiple, count
+ +

Field Detail

+
/Doctrine/ORM/Query/Expr/Literal.php at line 8
+

_postSeparator

+protected mixed $_postSeparator = '' +
+
+ +
+ +
/Doctrine/ORM/Query/Expr/Literal.php at line 7
+

_preSeparator

+protected mixed $_preSeparator = '' +
+
+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/orm/query/expr/math.html b/lib/api/doctrine/orm/query/expr/math.html new file mode 100644 index 000000000..af5b56c8d --- /dev/null +++ b/lib/api/doctrine/orm/query/expr/math.html @@ -0,0 +1,110 @@ + + + + + + + + + + + +Math (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +
Doctrine\ORM\Query\Expr\Math
+
/Doctrine/ORM/Query/Expr/Math.php at line 35
+ +

Class Math

+ +
Math
+ +
+ +

public class Math

+ +

Expression class for DQL math statements

+ +
+
License:
+
http://www.opensource.org/licenses/lgpl-license.php LGPL
+
See Also:
+
www.doctrine-project.org
+
Since:
+
2.0
+
Version:
+
$Revision$
+
Author:
+
Guilherme Blanco
+
Jonathan Wage
+
Roman Borschel
+
+
+ + + + + + +
Constructor Summary

Math(mixed leftExpr, mixed operator, mixed rightExpr)

+ +

Constructor Detail

+
/Doctrine/ORM/Query/Expr/Math.php at line 41
+

Math

+public Math(mixed leftExpr, mixed operator, mixed rightExpr) +
+
+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/orm/query/expr/orderby.html b/lib/api/doctrine/orm/query/expr/orderby.html new file mode 100644 index 000000000..7cd310af6 --- /dev/null +++ b/lib/api/doctrine/orm/query/expr/orderby.html @@ -0,0 +1,192 @@ + + + + + + + + + + + +OrderBy (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +
Doctrine\ORM\Query\Expr\OrderBy
+
/Doctrine/ORM/Query/Expr/OrderBy.php at line 35
+ +

Class OrderBy

+ +
OrderBy
+ +
+ +

public class OrderBy

+ +

Expression class for building DQL Order By parts

+ +
+
License:
+
http://www.opensource.org/licenses/lgpl-license.php LGPL
+
See Also:
+
www.doctrine-project.org
+
Since:
+
2.0
+
Version:
+
$Revision$
+
Author:
+
Guilherme Blanco
+
Jonathan Wage
+
Roman Borschel
+
+
+ + + + + + + + + + + + + + + + + + + +
Field Summary
protected mixed

$_allowedClasses

protected mixed

$_postSeparator

protected mixed

$_preSeparator

protected mixed

$_separator

+ + + + + + +
Constructor Summary

OrderBy(mixed sort, mixed order)

+ + + + + + + + + + + +
Method Summary
void

add(mixed sort, mixed order)

void

count()

+ +

Field Detail

+
/Doctrine/ORM/Query/Expr/OrderBy.php at line 40
+

_allowedClasses

+protected mixed $_allowedClasses = array() +
+
+ +
+ +
/Doctrine/ORM/Query/Expr/OrderBy.php at line 39
+

_postSeparator

+protected mixed $_postSeparator = '' +
+
+ +
+ +
/Doctrine/ORM/Query/Expr/OrderBy.php at line 37
+

_preSeparator

+protected mixed $_preSeparator = '' +
+
+ +
+ +
/Doctrine/ORM/Query/Expr/OrderBy.php at line 38
+

_separator

+protected mixed $_separator = ', ' +
+
+ +
+ +

Constructor Detail

+
/Doctrine/ORM/Query/Expr/OrderBy.php at line 44
+

OrderBy

+public OrderBy(mixed sort, mixed order) +
+
+ +
+ +

Method Detail

+
/Doctrine/ORM/Query/Expr/OrderBy.php at line 51
+

add

+public void add(mixed sort, mixed order) +
+
+ +
+ +
/Doctrine/ORM/Query/Expr/OrderBy.php at line 57
+

count

+public void count() +
+
+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/orm/query/expr/orx.html b/lib/api/doctrine/orm/query/expr/orx.html new file mode 100644 index 000000000..e81445ead --- /dev/null +++ b/lib/api/doctrine/orm/query/expr/orx.html @@ -0,0 +1,134 @@ + + + + + + + + + + + +Orx (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +
Doctrine\ORM\Query\Expr\Orx
+
/Doctrine/ORM/Query/Expr/Orx.php at line 35
+ +

Class Orx

+ +
Class:Orx - Superclass: Base
+Base
⌊ Orx
+ +
+ +

public class Orx
extends Base + +

+ +

Expression class for building DQL OR clauses

+ +
+
License:
+
http://www.opensource.org/licenses/lgpl-license.php LGPL
+
See Also:
+
www.doctrine-project.org
+
Since:
+
2.0
+
Version:
+
$Revision$
+
Author:
+
Guilherme Blanco
+
Jonathan Wage
+
Roman Borschel
+
+
+ + + + + + + + + + + +
Field Summary
protected mixed

$_allowedClasses

protected mixed

$_separator

+ + + +
Fields inherited from Doctrine\ORM\Query\Expr\Base
_allowedClasses, _postSeparator, _preSeparator, _separator
+ + + +
Methods inherited from Doctrine\ORM\Query\Expr\Base
add, addMultiple, count
+ +

Field Detail

+
/Doctrine/ORM/Query/Expr/Orx.php at line 38
+

_allowedClasses

+protected mixed $_allowedClasses = array(...) +
+
+ +
+ +
/Doctrine/ORM/Query/Expr/Orx.php at line 37
+

_separator

+protected mixed $_separator = ') OR (' +
+
+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/orm/query/expr/package-frame.html b/lib/api/doctrine/orm/query/expr/package-frame.html new file mode 100644 index 000000000..94a6b43e2 --- /dev/null +++ b/lib/api/doctrine/orm/query/expr/package-frame.html @@ -0,0 +1,37 @@ + + + + + + + + + + + +Doctrine\ORM\Query\Expr (Doctrine) + + + + +

Doctrine\ORM\Query\Expr

+ +

Classes

+ + + + + \ No newline at end of file diff --git a/lib/api/doctrine/orm/query/expr/package-functions.html b/lib/api/doctrine/orm/query/expr/package-functions.html new file mode 100644 index 000000000..af97091f8 --- /dev/null +++ b/lib/api/doctrine/orm/query/expr/package-functions.html @@ -0,0 +1,69 @@ + + + + + + + + + + + +Functions (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +

Functions

+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/orm/query/expr/package-globals.html b/lib/api/doctrine/orm/query/expr/package-globals.html new file mode 100644 index 000000000..8945cee27 --- /dev/null +++ b/lib/api/doctrine/orm/query/expr/package-globals.html @@ -0,0 +1,69 @@ + + + + + + + + + + + +Globals (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +

Globals

+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/orm/query/expr/package-summary.html b/lib/api/doctrine/orm/query/expr/package-summary.html new file mode 100644 index 000000000..6f3dad182 --- /dev/null +++ b/lib/api/doctrine/orm/query/expr/package-summary.html @@ -0,0 +1,75 @@ + + + + + + + + + + + +Doctrine\ORM\Query\Expr (Doctrine) + + + + +
+

Doctrine

+ +
+ + +
+ +

Namespace Doctrine\ORM\Query\Expr

+ + + + + + + + + + + + + + + +
Class Summary
AndxExpression class for building DQL and parts
BaseAbstract base Expr class for building DQL parts
ComparisonExpression class for DQL comparison expressions
FromExpression class for DQL from
FuncExpression class for generating DQL functions
GroupByExpression class for building DQL Group By parts
JoinExpression class for DQL from
LiteralAbstract base Expr class for building DQL parts
MathExpression class for DQL math statements
OrderByExpression class for building DQL Order By parts
OrxExpression class for building DQL OR clauses
SelectExpression class for building DQL select statements
+ +
+ +
+

Doctrine

+ +
+ + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/orm/query/expr/package-tree.html b/lib/api/doctrine/orm/query/expr/package-tree.html new file mode 100644 index 000000000..bad896662 --- /dev/null +++ b/lib/api/doctrine/orm/query/expr/package-tree.html @@ -0,0 +1,69 @@ + + + + + + + + + + + +Doctrine\ORM\Query\Expr (Doctrine) + + + + +
+

Doctrine

+ +
+ + +

Class Hierarchy for Package Doctrine\ORM\Query\Expr

+
+

Doctrine

+ +
+ + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/orm/query/expr/select.html b/lib/api/doctrine/orm/query/expr/select.html new file mode 100644 index 000000000..1dee6e984 --- /dev/null +++ b/lib/api/doctrine/orm/query/expr/select.html @@ -0,0 +1,134 @@ + + + + + + + + + + + +Select (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +
Doctrine\ORM\Query\Expr\Select
+
/Doctrine/ORM/Query/Expr/Select.php at line 35
+ +

Class Select

+ +
Class:Select - Superclass: Base
+Base
⌊ Select
+ +
+ +

public class Select
extends Base + +

+ +

Expression class for building DQL select statements

+ +
+
License:
+
http://www.opensource.org/licenses/lgpl-license.php LGPL
+
See Also:
+
www.doctrine-project.org
+
Since:
+
2.0
+
Version:
+
$Revision$
+
Author:
+
Guilherme Blanco
+
Jonathan Wage
+
Roman Borschel
+
+
+ + + + + + + + + + + +
Field Summary
protected mixed

$_postSeparator

protected mixed

$_preSeparator

+ + + +
Fields inherited from Doctrine\ORM\Query\Expr\Base
_allowedClasses, _postSeparator, _preSeparator, _separator
+ + + +
Methods inherited from Doctrine\ORM\Query\Expr\Base
add, addMultiple, count
+ +

Field Detail

+
/Doctrine/ORM/Query/Expr/Select.php at line 38
+

_postSeparator

+protected mixed $_postSeparator = '' +
+
+ +
+ +
/Doctrine/ORM/Query/Expr/Select.php at line 37
+

_preSeparator

+protected mixed $_preSeparator = '' +
+
+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/orm/query/lexer.html b/lib/api/doctrine/orm/query/lexer.html new file mode 100644 index 000000000..cdb4d18cb --- /dev/null +++ b/lib/api/doctrine/orm/query/lexer.html @@ -0,0 +1,1009 @@ + + + + + + + + + + + +Lexer (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +
Doctrine\ORM\Query\Lexer
+
/Doctrine/ORM/Query/Lexer.php at line 35
+ +

Class Lexer

+ +
Class:Lexer - Superclass: Doctrine
+Doctrine
⌊ Lexer
+ +
+ +

public class Lexer
extends Doctrine + +

+ +

Scans a DQL query for tokens.

+ +
+
Author:
+
Guilherme Blanco
+
Janne Vanhala
+
Roman Borschel
+
License:
+
http://www.opensource.org/licenses/lgpl-license.php LGPL
+
See Also:
+
www.doctrine-project.org
+
Since:
+
2.0
+
Version:
+
$Revision$
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Field Summary
final int

T_ALL

final int

T_AND

final int

T_ANY

final int

T_AS

final int

T_ASC

final int

T_AVG

final int

T_BETWEEN

final int

T_BOTH

final int

T_BY

final int

T_CLOSE_CURLY_BRACE

final int

T_CLOSE_PARENTHESIS

final int

T_COMMA

final int

T_COUNT

final int

T_DELETE

final int

T_DESC

final int

T_DISTINCT

final int

T_DIVIDE

final int

T_DOT

final int

T_EMPTY

final int

T_EQUALS

final int

T_ESCAPE

final int

T_EXISTS

final int

T_FALSE

final int

T_FLOAT

final int

T_FROM

final int

T_GREATER_THAN

final int

T_GROUP

final int

T_HAVING

final int

T_IDENTIFIER

final int

T_IN

final int

T_INDEX

final int

T_INNER

final int

T_INPUT_PARAMETER

final int

T_INTEGER

final int

T_IS

final int

T_JOIN

final int

T_LEADING

final int

T_LEFT

final int

T_LIKE

final int

T_LIMIT

final int

T_LOWER_THAN

final int

T_MAX

final int

T_MEMBER

final int

T_MIN

final int

T_MINUS

final int

T_MOD

final int

T_MULTIPLY

final int

T_NEGATE

final int

T_NONE

final int

T_NOT

final int

T_NULL

final int

T_OF

final int

T_OFFSET

final int

T_OPEN_CURLY_BRACE

final int

T_OPEN_PARENTHESIS

final int

T_OR

final int

T_ORDER

final int

T_OUTER

final int

T_PARTIAL

final int

T_PLUS

final int

T_SELECT

final int

T_SET

final int

T_SIZE

final int

T_SOME

final int

T_STRING

final int

T_SUM

final int

T_TRAILING

final int

T_TRUE

final int

T_UPDATE

final int

T_WHERE

final int

T_WITH

+ + + + + + +
Constructor Summary

Lexer(string input)

Creates a new query scanner object.

+ + + + + + + + + + + +
Method Summary
protected void

getCatchablePatterns()

protected void

getNonCatchablePatterns()

+ +

Field Detail

+
/Doctrine/ORM/Query/Lexer.php at line 44
+

T_ALL

+public final int T_ALL = 101 +
+
+ +
+ +
/Doctrine/ORM/Query/Lexer.php at line 45
+

T_AND

+public final int T_AND = 102 +
+
+ +
+ +
/Doctrine/ORM/Query/Lexer.php at line 46
+

T_ANY

+public final int T_ANY = 103 +
+
+ +
+ +
/Doctrine/ORM/Query/Lexer.php at line 47
+

T_AS

+public final int T_AS = 104 +
+
+ +
+ +
/Doctrine/ORM/Query/Lexer.php at line 48
+

T_ASC

+public final int T_ASC = 105 +
+
+ +
+ +
/Doctrine/ORM/Query/Lexer.php at line 49
+

T_AVG

+public final int T_AVG = 106 +
+
+ +
+ +
/Doctrine/ORM/Query/Lexer.php at line 50
+

T_BETWEEN

+public final int T_BETWEEN = 107 +
+
+ +
+ +
/Doctrine/ORM/Query/Lexer.php at line 51
+

T_BOTH

+public final int T_BOTH = 108 +
+
+ +
+ +
/Doctrine/ORM/Query/Lexer.php at line 52
+

T_BY

+public final int T_BY = 109 +
+
+ +
+ +
/Doctrine/ORM/Query/Lexer.php at line 108
+

T_CLOSE_CURLY_BRACE

+public final int T_CLOSE_CURLY_BRACE = 166 +
+
+ +
+ +
/Doctrine/ORM/Query/Lexer.php at line 53
+

T_CLOSE_PARENTHESIS

+public final int T_CLOSE_PARENTHESIS = 110 +
+
+ +
+ +
/Doctrine/ORM/Query/Lexer.php at line 54
+

T_COMMA

+public final int T_COMMA = 111 +
+
+ +
+ +
/Doctrine/ORM/Query/Lexer.php at line 55
+

T_COUNT

+public final int T_COUNT = 112 +
+
+ +
+ +
/Doctrine/ORM/Query/Lexer.php at line 56
+

T_DELETE

+public final int T_DELETE = 113 +
+
+ +
+ +
/Doctrine/ORM/Query/Lexer.php at line 57
+

T_DESC

+public final int T_DESC = 114 +
+
+ +
+ +
/Doctrine/ORM/Query/Lexer.php at line 58
+

T_DISTINCT

+public final int T_DISTINCT = 115 +
+
+ +
+ +
/Doctrine/ORM/Query/Lexer.php at line 59
+

T_DIVIDE

+public final int T_DIVIDE = 116 +
+
+ +
+ +
/Doctrine/ORM/Query/Lexer.php at line 60
+

T_DOT

+public final int T_DOT = 117 +
+
+ +
+ +
/Doctrine/ORM/Query/Lexer.php at line 61
+

T_EMPTY

+public final int T_EMPTY = 118 +
+
+ +
+ +
/Doctrine/ORM/Query/Lexer.php at line 62
+

T_EQUALS

+public final int T_EQUALS = 119 +
+
+ +
+ +
/Doctrine/ORM/Query/Lexer.php at line 63
+

T_ESCAPE

+public final int T_ESCAPE = 120 +
+
+ +
+ +
/Doctrine/ORM/Query/Lexer.php at line 64
+

T_EXISTS

+public final int T_EXISTS = 121 +
+
+ +
+ +
/Doctrine/ORM/Query/Lexer.php at line 65
+

T_FALSE

+public final int T_FALSE = 122 +
+
+ +
+ +
/Doctrine/ORM/Query/Lexer.php at line 42
+

T_FLOAT

+public final int T_FLOAT = 6 +
+
+ +
+ +
/Doctrine/ORM/Query/Lexer.php at line 66
+

T_FROM

+public final int T_FROM = 123 +
+
+ +
+ +
/Doctrine/ORM/Query/Lexer.php at line 67
+

T_GREATER_THAN

+public final int T_GREATER_THAN = 124 +
+
+ +
+ +
/Doctrine/ORM/Query/Lexer.php at line 68
+

T_GROUP

+public final int T_GROUP = 125 +
+
+ +
+ +
/Doctrine/ORM/Query/Lexer.php at line 69
+

T_HAVING

+public final int T_HAVING = 126 +
+
+ +
+ +
/Doctrine/ORM/Query/Lexer.php at line 38
+

T_IDENTIFIER

+public final int T_IDENTIFIER = 2 +
+
+ +
+ +
/Doctrine/ORM/Query/Lexer.php at line 70
+

T_IN

+public final int T_IN = 127 +
+
+ +
+ +
/Doctrine/ORM/Query/Lexer.php at line 71
+

T_INDEX

+public final int T_INDEX = 128 +
+
+ +
+ +
/Doctrine/ORM/Query/Lexer.php at line 72
+

T_INNER

+public final int T_INNER = 129 +
+
+ +
+ +
/Doctrine/ORM/Query/Lexer.php at line 41
+

T_INPUT_PARAMETER

+public final int T_INPUT_PARAMETER = 5 +
+
+ +
+ +
/Doctrine/ORM/Query/Lexer.php at line 39
+

T_INTEGER

+public final int T_INTEGER = 3 +
+
+ +
+ +
/Doctrine/ORM/Query/Lexer.php at line 73
+

T_IS

+public final int T_IS = 130 +
+
+ +
+ +
/Doctrine/ORM/Query/Lexer.php at line 74
+

T_JOIN

+public final int T_JOIN = 131 +
+
+ +
+ +
/Doctrine/ORM/Query/Lexer.php at line 75
+

T_LEADING

+public final int T_LEADING = 132 +
+
+ +
+ +
/Doctrine/ORM/Query/Lexer.php at line 76
+

T_LEFT

+public final int T_LEFT = 133 +
+
+ +
+ +
/Doctrine/ORM/Query/Lexer.php at line 77
+

T_LIKE

+public final int T_LIKE = 134 +
+
+ +
+ +
/Doctrine/ORM/Query/Lexer.php at line 78
+

T_LIMIT

+public final int T_LIMIT = 135 +
+
+ +
+ +
/Doctrine/ORM/Query/Lexer.php at line 79
+

T_LOWER_THAN

+public final int T_LOWER_THAN = 136 +
+
+ +
+ +
/Doctrine/ORM/Query/Lexer.php at line 80
+

T_MAX

+public final int T_MAX = 137 +
+
+ +
+ +
/Doctrine/ORM/Query/Lexer.php at line 81
+

T_MEMBER

+public final int T_MEMBER = 138 +
+
+ +
+ +
/Doctrine/ORM/Query/Lexer.php at line 82
+

T_MIN

+public final int T_MIN = 139 +
+
+ +
+ +
/Doctrine/ORM/Query/Lexer.php at line 83
+

T_MINUS

+public final int T_MINUS = 140 +
+
+ +
+ +
/Doctrine/ORM/Query/Lexer.php at line 84
+

T_MOD

+public final int T_MOD = 141 +
+
+ +
+ +
/Doctrine/ORM/Query/Lexer.php at line 85
+

T_MULTIPLY

+public final int T_MULTIPLY = 142 +
+
+ +
+ +
/Doctrine/ORM/Query/Lexer.php at line 86
+

T_NEGATE

+public final int T_NEGATE = 143 +
+
+ +
+ +
/Doctrine/ORM/Query/Lexer.php at line 37
+

T_NONE

+public final int T_NONE = 1 +
+
+ +
+ +
/Doctrine/ORM/Query/Lexer.php at line 87
+

T_NOT

+public final int T_NOT = 144 +
+
+ +
+ +
/Doctrine/ORM/Query/Lexer.php at line 88
+

T_NULL

+public final int T_NULL = 145 +
+
+ +
+ +
/Doctrine/ORM/Query/Lexer.php at line 89
+

T_OF

+public final int T_OF = 146 +
+
+ +
+ +
/Doctrine/ORM/Query/Lexer.php at line 90
+

T_OFFSET

+public final int T_OFFSET = 147 +
+
+ +
+ +
/Doctrine/ORM/Query/Lexer.php at line 107
+

T_OPEN_CURLY_BRACE

+public final int T_OPEN_CURLY_BRACE = 165 +
+
+ +
+ +
/Doctrine/ORM/Query/Lexer.php at line 91
+

T_OPEN_PARENTHESIS

+public final int T_OPEN_PARENTHESIS = 149 +
+
+ +
+ +
/Doctrine/ORM/Query/Lexer.php at line 92
+

T_OR

+public final int T_OR = 150 +
+
+ +
+ +
/Doctrine/ORM/Query/Lexer.php at line 93
+

T_ORDER

+public final int T_ORDER = 151 +
+
+ +
+ +
/Doctrine/ORM/Query/Lexer.php at line 94
+

T_OUTER

+public final int T_OUTER = 152 +
+
+ +
+ +
/Doctrine/ORM/Query/Lexer.php at line 106
+

T_PARTIAL

+public final int T_PARTIAL = 164 +
+
+ +
+ +
/Doctrine/ORM/Query/Lexer.php at line 95
+

T_PLUS

+public final int T_PLUS = 153 +
+
+ +
+ +
/Doctrine/ORM/Query/Lexer.php at line 96
+

T_SELECT

+public final int T_SELECT = 154 +
+
+ +
+ +
/Doctrine/ORM/Query/Lexer.php at line 97
+

T_SET

+public final int T_SET = 155 +
+
+ +
+ +
/Doctrine/ORM/Query/Lexer.php at line 98
+

T_SIZE

+public final int T_SIZE = 156 +
+
+ +
+ +
/Doctrine/ORM/Query/Lexer.php at line 99
+

T_SOME

+public final int T_SOME = 157 +
+
+ +
+ +
/Doctrine/ORM/Query/Lexer.php at line 40
+

T_STRING

+public final int T_STRING = 4 +
+
+ +
+ +
/Doctrine/ORM/Query/Lexer.php at line 100
+

T_SUM

+public final int T_SUM = 158 +
+
+ +
+ +
/Doctrine/ORM/Query/Lexer.php at line 101
+

T_TRAILING

+public final int T_TRAILING = 159 +
+
+ +
+ +
/Doctrine/ORM/Query/Lexer.php at line 102
+

T_TRUE

+public final int T_TRUE = 160 +
+
+ +
+ +
/Doctrine/ORM/Query/Lexer.php at line 103
+

T_UPDATE

+public final int T_UPDATE = 161 +
+
+ +
+ +
/Doctrine/ORM/Query/Lexer.php at line 104
+

T_WHERE

+public final int T_WHERE = 162 +
+
+ +
+ +
/Doctrine/ORM/Query/Lexer.php at line 105
+

T_WITH

+public final int T_WITH = 163 +
+
+ +
+ +

Constructor Detail

+
/Doctrine/ORM/Query/Lexer.php at line 115
+

Lexer

+public Lexer(string input) +
+

Creates a new query scanner object.

+
Parameters:
+
input - a query string
+
+
+ +
+ +

Method Detail

+
/Doctrine/ORM/Query/Lexer.php at line 123
+

getCatchablePatterns

+protected void getCatchablePatterns() +
+

+
Inheritdoc.
+
+
+ +
+ +
/Doctrine/ORM/Query/Lexer.php at line 136
+

getNonCatchablePatterns

+protected void getNonCatchablePatterns() +
+

+
Inheritdoc.
+
+
+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/orm/query/package-frame.html b/lib/api/doctrine/orm/query/package-frame.html new file mode 100644 index 000000000..3857bf3cc --- /dev/null +++ b/lib/api/doctrine/orm/query/package-frame.html @@ -0,0 +1,40 @@ + + + + + + + + + + + +Doctrine\ORM\Query (Doctrine) + + + + +

Doctrine\ORM\Query

+ +

Classes

+ + +

Interfaces

+ + + + + \ No newline at end of file diff --git a/lib/api/doctrine/orm/query/package-functions.html b/lib/api/doctrine/orm/query/package-functions.html new file mode 100644 index 000000000..cabf97263 --- /dev/null +++ b/lib/api/doctrine/orm/query/package-functions.html @@ -0,0 +1,69 @@ + + + + + + + + + + + +Functions (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +

Functions

+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/orm/query/package-globals.html b/lib/api/doctrine/orm/query/package-globals.html new file mode 100644 index 000000000..e69ba1696 --- /dev/null +++ b/lib/api/doctrine/orm/query/package-globals.html @@ -0,0 +1,69 @@ + + + + + + + + + + + +Globals (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +

Globals

+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/orm/query/package-summary.html b/lib/api/doctrine/orm/query/package-summary.html new file mode 100644 index 000000000..8221be3db --- /dev/null +++ b/lib/api/doctrine/orm/query/package-summary.html @@ -0,0 +1,83 @@ + + + + + + + + + + + +Doctrine\ORM\Query (Doctrine) + + + + +
+

Doctrine

+ +
+ + +
+ +

Namespace Doctrine\ORM\Query

+ + + + + + + + + + + + + +
Class Summary
ExprThis class is used to generate DQL expressions via a set of PHP static functions
LexerScans a DQL query for tokens.
ParserAn LL(*) recursive-descent parser for the context-free grammar of the Doctrine Query Language. +
ParserResultEncapsulates the resulting components from a DQL query parsing process that +can be serialized.
PrinterA parse tree printer for Doctrine Query Language parser.
QueryExceptionDescription of QueryException
ResultSetMappingA ResultSetMapping describes how a result set of an SQL query maps to a Doctrine result. +
SqlWalkerThe SqlWalker is a TreeWalker that walks over a DQL AST and constructs +the corresponding SQL.
TreeWalkerAdapterAn adapter implementation of the TreeWalker interface.
TreeWalkerChainRepresents a chain of tree walkers that modify an AST and finally emit output. +
+ + + + +
Interface Summary
TreeWalkerInterface for walkers of DQL ASTs (abstract syntax trees).
+ +
+ +
+

Doctrine

+ +
+ + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/orm/query/package-tree.html b/lib/api/doctrine/orm/query/package-tree.html new file mode 100644 index 000000000..76eb1b1ce --- /dev/null +++ b/lib/api/doctrine/orm/query/package-tree.html @@ -0,0 +1,63 @@ + + + + + + + + + + + +Doctrine\ORM\Query (Doctrine) + + + + +
+

Doctrine

+ +
+ + +

Class Hierarchy for Package Doctrine\ORM\Query

+
+

Doctrine

+ +
+ + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/orm/query/parser.html b/lib/api/doctrine/orm/query/parser.html new file mode 100644 index 000000000..387d3cdbe --- /dev/null +++ b/lib/api/doctrine/orm/query/parser.html @@ -0,0 +1,1315 @@ + + + + + + + + + + + +Parser (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +
Doctrine\ORM\Query\Parser
+
/Doctrine/ORM/Query/Parser.php at line 39
+ +

Class Parser

+ +
Parser
+ +
+ +

public class Parser

+ +

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.

+ +
+
License:
+
http://www.opensource.org/licenses/lgpl-license.php LGPL
+
See Also:
+
www.doctrine-project.org
+
Since:
+
2.0
+
Version:
+
$Revision: 3938 $
+
Author:
+
Guilherme Blanco
+
Jonathan Wage
+
Roman Borschel
+
Janne Vanhala
+
+
+ + + + + + +
Constructor Summary

Parser(Query query)

Creates a new query parser object.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Method Summary
string

AbstractSchemaName()

AbstractSchemaName ::= identifier

\Doctrine\ORM\Query\AST\AggregateExpression

AggregateExpression()

AggregateExpression ::= +("AVG" | "MAX" | "MIN" | "SUM") "(" ["DISTINCT"] StateFieldPathExpression ")" | +"COUNT" "(" ["DISTINCT"] (IdentificationVariable | SingleValuedPathExpression) ")"

string

AliasIdentificationVariable()

AliasIdentificationVariable = identifier

string

AliasResultVariable()

AliasResultVariable ::= identifier

\Doctrine\ORM\Query\AST\ArithmeticExpression

ArithmeticExpression()

ArithmeticExpression ::= SimpleArithmeticExpression | "(" Subselect ")"

\Doctrine\ORM\Query\AST\ArithmeticFactor

ArithmeticFactor()

ArithmeticFactor ::= [("+" | "-")] ArithmeticPrimary

void

ArithmeticPrimary()

ArithmeticPrimary ::= SingleValuedPathExpression | Literal | "(" SimpleArithmeticExpression ")" +| FunctionsReturningNumerics | AggregateExpression | FunctionsReturningStrings +| FunctionsReturningDatetime | IdentificationVariable

\Doctrine\ORM\Query\AST\ArithmeticTerm

ArithmeticTerm()

ArithmeticTerm ::= ArithmeticFactor {("*" | "/") ArithmeticFactor}

\Doctrine\ORM\Query\AST\PathExpression

AssociationPathExpression()

AssociationPathExpression ::= CollectionValuedPathExpression | SingleValuedAssociationPathExpression

\Doctrine\ORM\Query\AST\BetweenExpression

BetweenExpression()

BetweenExpression ::= ArithmeticExpression ["NOT"] "BETWEEN" ArithmeticExpression "AND" ArithmeticExpression

void

CaseExpression()

\Doctrine\ORM\Query\AST\CollectionMemberExpression

CollectionMemberExpression()

CollectionMemberExpression ::= EntityExpression ["NOT"] "MEMBER" ["OF"] CollectionValuedPathExpressionEntityExpression ::= SingleValuedAssociationPathExpression | SimpleEntityExpression +SimpleEntityExpression ::= IdentificationVariable | InputParameter

\Doctrine\ORM\Query\AST\PathExpression

CollectionValuedPathExpression()

CollectionValuedPathExpression ::= IdentificationVariable "." {SingleValuedAssociationField "."}* CollectionValuedAssociationField

\Doctrine\ORM\Query\AST\ComparisonExpression

ComparisonExpression()

ComparisonExpression ::= ArithmeticExpression ComparisonOperator ( QuantifiedExpression | ArithmeticExpression )

string

ComparisonOperator()

ComparisonOperator ::= "=" | "=" | "!="

\Doctrine\ORM\Query\AST\ConditionalExpression

ConditionalExpression()

ConditionalExpression ::= ConditionalTerm {"OR" ConditionalTerm}

\Doctrine\ORM\Query\AST\ConditionalFactor

ConditionalFactor()

ConditionalFactor ::= ["NOT"] ConditionalPrimary

Doctrine\ORM\Query\AST\ConditionalPrimary

ConditionalPrimary()

ConditionalPrimary ::= SimpleConditionalExpression | "(" ConditionalExpression ")"

\Doctrine\ORM\Query\AST\ConditionalTerm

ConditionalTerm()

ConditionalTerm ::= ConditionalFactor {"AND" ConditionalFactor}

void

CustomFunctionsReturningDatetime()

void

CustomFunctionsReturningNumerics()

void

CustomFunctionsReturningStrings()

\Doctrine\ORM\Query\AST\DeleteClause

DeleteClause()

DeleteClause ::= "DELETE" ["FROM"] AbstractSchemaName ["AS"] AliasIdentificationVariable

\Doctrine\ORM\Query\AST\DeleteStatement

DeleteStatement()

DeleteStatement ::= DeleteClause [WhereClause]

\Doctrine\ORM\Query\AST\EmptyCollectionComparisonExpression

EmptyCollectionComparisonExpression()

EmptyCollectionComparisonExpression ::= CollectionValuedPathExpression "IS" ["NOT"] "EMPTY"

\Doctrine\ORM\Query\AST\SingleValuedAssociationPathExpression

EntityExpression()

EntityExpression ::= SingleValuedAssociationPathExpression | SimpleEntityExpression

\Doctrine\ORM\Query\AST\ExistsExpression

ExistsExpression()

ExistsExpression ::= ["NOT"] "EXISTS" "(" Subselect ")"

\Doctrine\ORM\Query\AST\FromClause

FromClause()

FromClause ::= "FROM" IdentificationVariableDeclaration {"," IdentificationVariableDeclaration}

void

FunctionDeclaration()

FunctionDeclaration ::= FunctionsReturningStrings | FunctionsReturningNumerics | FunctionsReturningDatetime

void

FunctionsReturningDatetime()

FunctionsReturningDateTime ::= "CURRENT_DATE" | "CURRENT_TIME" | "CURRENT_TIMESTAMP"

void

FunctionsReturningNumerics()

FunctionsReturningNumerics ::= +"LENGTH" "(" StringPrimary ")" | +"LOCATE" "(" StringPrimary "," StringPrimary ["," SimpleArithmeticExpression]")" | +"ABS" "(" SimpleArithmeticExpression ")" | +"SQRT" "(" SimpleArithmeticExpression ")" | +"MOD" "(" SimpleArithmeticExpression "," SimpleArithmeticExpression ")" | +"SIZE" "(" CollectionValuedPathExpression ")"

void

FunctionsReturningStrings()

FunctionsReturningStrings ::= +"CONCAT" "(" StringPrimary "," StringPrimary ")" | +"SUBSTRING" "(" StringPrimary "," SimpleArithmeticExpression "," SimpleArithmeticExpression ")" | +"TRIM" "(" [["LEADING" | "TRAILING" | "BOTH"] [char] "FROM"] StringPrimary ")" | +"LOWER" "(" StringPrimary ")" | +"UPPER" "(" StringPrimary ")"

\Doctrine\ORM\Query\AST\GroupByClause

GroupByClause()

GroupByClause ::= "GROUP" "BY" GroupByItem {"," GroupByItem}

string

GroupByItem()

GroupByItem ::= IdentificationVariable | SingleValuedPathExpression

\Doctrine\ORM\Query\AST\HavingClause

HavingClause()

HavingClause ::= "HAVING" ConditionalExpression

string

IdentificationVariable()

IdentificationVariable ::= identifier

\Doctrine\ORM\Query\AST\IdentificationVariableDeclaration

IdentificationVariableDeclaration()

IdentificationVariableDeclaration ::= RangeVariableDeclaration [IndexBy] {JoinVariableDeclaration}

\Doctrine\ORM\Query\AST\InExpression

InExpression()

InExpression ::= StateFieldPathExpression ["NOT"] "IN" "(" (InParameter {"," InParameter}* | Subselect) ")"

string

InParameter()

InParameter ::= Literal | InputParameter

Doctrine\ORM\Query\AST\IndexBy

IndexBy()

IndexBy ::= "INDEX" "BY" SimpleStateFieldPathExpression

\Doctrine\ORM\Query\AST\InputParameter

InputParameter()

InputParameter ::= PositionalParameter | NamedParameter

Doctrine\ORM\Query\AST\Join

Join()

Join ::= ["LEFT" ["OUTER"] | "INNER"] "JOIN" JoinAssociationPathExpression +["AS"] AliasIdentificationVariable ["WITH" ConditionalExpression]

\Doctrine\ORM\Query\AST\JoinAssociationPathExpression

JoinAssociationPathExpression()

JoinAssociationPathExpression ::= IdentificationVariable "." (CollectionValuedAssociationField | SingleValuedAssociationField)

\Doctrine\ORM\Query\AST\JoinVariableDeclaration

JoinVariableDeclaration()

JoinVariableDeclaration ::= Join [IndexBy]

\Doctrine\ORM\Query\AST\LikeExpression

LikeExpression()

LikeExpression ::= StringExpression ["NOT"] "LIKE" (string | input_parameter) ["ESCAPE" char]

string

Literal()

Literal ::= string | char | integer | float | boolean

void

NewValue()

NewValue ::= SimpleArithmeticExpression | StringPrimary | DatetimePrimary | BooleanPrimary | +EnumPrimary | SimpleEntityExpression | "NULL"NOTE: Since it is not possible to correctly recognize individual types, here is the full +grammar that needs to be supported:NewValue ::= SimpleArithmeticExpression | "NULL"SimpleArithmeticExpression covers all *Primary grammar rules and also SimplEntityExpression

\Doctrine\ORM\Query\AST\NullComparisonExpression

NullComparisonExpression()

NullComparisonExpression ::= (SingleValuedPathExpression | InputParameter) "IS" ["NOT"] "NULL"

\Doctrine\ORM\Query\AST\OrderByClause

OrderByClause()

OrderByClause ::= "ORDER" "BY" OrderByItem {"," OrderByItem}

\Doctrine\ORM\Query\AST\OrderByItem

OrderByItem()

OrderByItem ::= (ResultVariable | StateFieldPathExpression) ["ASC" | "DESC"]

array

PartialObjectExpression()

PartialObjectExpression ::= "PARTIAL" IdentificationVariable "." PartialFieldSet +PartialFieldSet ::= "{" SimpleStateField {"," SimpleStateField}* "}"

\Doctrine\ORM\Query\AST\PathExpression

PathExpression(integer expectedTypes)

Parses an arbitrary path expression and defers semantical validation +based on expected types. +

\Doctrine\ORM\Query\AST\QuantifiedExpression

QuantifiedExpression()

QuantifiedExpression ::= ("ALL" | "ANY" | "SOME") "(" Subselect ")"

\Doctrine\ORM\Query\AST\SelectStatement

QueryLanguage()

QueryLanguage ::= SelectStatement | UpdateStatement | DeleteStatement

Doctrine\ORM\Query\AST\RangeVariableDeclaration

RangeVariableDeclaration()

RangeVariableDeclaration ::= AbstractSchemaName ["AS"] AliasIdentificationVariable

string

ResultVariable()

ResultVariable ::= identifier

mixed

ScalarExpression()

ScalarExpression ::= SimpleArithmeticExpression | StringPrimary | DateTimePrimary | +StateFieldPathExpression | BooleanPrimary | CaseExpression | +EntityTypeExpression

\Doctrine\ORM\Query\AST\SelectClause

SelectClause()

SelectClause ::= "SELECT" ["DISTINCT"] SelectExpression {"," SelectExpression}

Doctrine\ORM\Query\AST\SelectExpression

SelectExpression()

SelectExpression ::= +IdentificationVariable | StateFieldPathExpression | +(AggregateExpression | "(" Subselect ")" | ScalarExpression) [["AS"] AliasResultVariable]

\Doctrine\ORM\Query\AST\SelectStatement

SelectStatement()

SelectStatement ::= SelectClause FromClause [WhereClause] [GroupByClause] [HavingClause] [OrderByClause]

\Doctrine\ORM\Query\AST\SimpleArithmeticExpression

SimpleArithmeticExpression()

SimpleArithmeticExpression ::= ArithmeticTerm {("+" | "-") ArithmeticTerm}

void

SimpleConditionalExpression()

SimpleConditionalExpression ::= +ComparisonExpression | BetweenExpression | LikeExpression | +InExpression | NullComparisonExpression | ExistsExpression | +EmptyCollectionComparisonExpression | CollectionMemberExpression

string

SimpleEntityExpression()

SimpleEntityExpression ::= IdentificationVariable | InputParameter

\Doctrine\ORM\Query\AST\SimpleSelectClause

SimpleSelectClause()

SimpleSelectClause ::= "SELECT" ["DISTINCT"] SimpleSelectExpression

\Doctrine\ORM\Query\AST\SimpleSelectExpression

SimpleSelectExpression()

SimpleSelectExpression ::= StateFieldPathExpression | IdentificationVariable | (AggregateExpression [["AS"] AliasResultVariable])

\Doctrine\ORM\Query\AST\PathExpression

SimpleStateFieldPathExpression()

SimpleStateFieldPathExpression ::= IdentificationVariable "." StateField

\Doctrine\ORM\Query\AST\PathExpression

SingleValuedAssociationPathExpression()

SingleValuedAssociationPathExpression ::= IdentificationVariable "." {SingleValuedAssociationField "."}* SingleValuedAssociationField

\Doctrine\ORM\Query\AST\PathExpression

SingleValuedPathExpression()

SingleValuedPathExpression ::= StateFieldPathExpression | SingleValuedAssociationPathExpression

\Doctrine\ORM\Query\AST\PathExpression

StateFieldPathExpression()

StateFieldPathExpression ::= SimpleStateFieldPathExpression | SimpleStateFieldAssociationPathExpression

\Doctrine\ORM\Query\AST\StringPrimary

StringExpression()

StringExpression ::= StringPrimary | "(" Subselect ")"

void

StringPrimary()

StringPrimary ::= StateFieldPathExpression | string | InputParameter | FunctionsReturningStrings | AggregateExpression

\Doctrine\ORM\Query\AST\Subselect

Subselect()

Subselect ::= SimpleSelectClause SubselectFromClause [WhereClause] [GroupByClause] [HavingClause] [OrderByClause]

\Doctrine\ORM\Query\AST\SubselectFromClause

SubselectFromClause()

SubselectFromClause ::= "FROM" SubselectIdentificationVariableDeclaration {"," SubselectIdentificationVariableDeclaration}

\Doctrine\ORM\Query\AST\SubselectIdentificationVariableDeclaration

SubselectIdentificationVariableDeclaration()

SubselectIdentificationVariableDeclaration ::= IdentificationVariableDeclaration | (AssociationPathExpression ["AS"] AliasIdentificationVariable)

\Doctrine\ORM\Query\AST\UpdateClause

UpdateClause()

UpdateClause ::= "UPDATE" AbstractSchemaName ["AS"] AliasIdentificationVariable "SET" UpdateItem {"," UpdateItem}

\Doctrine\ORM\Query\AST\UpdateItem

UpdateItem()

UpdateItem ::= IdentificationVariable "." {StateField | SingleValuedAssociationField} "=" NewValue

\Doctrine\ORM\Query\AST\UpdateStatement

UpdateStatement()

UpdateStatement ::= UpdateClause [WhereClause]

\Doctrine\ORM\Query\AST\WhereClause

WhereClause()

WhereClause ::= "WHERE" ConditionalExpression

void

addCustomTreeWalker(string className)

Adds a custom tree walker for modifying the AST.

void

free(boolean deep, integer position)

Free this parser enabling it to be reused

\Doctrine\ORM\Query\AST\SelectStatement

getAST()

Parse and build AST for the given Query.

EntityManager

getEntityManager()

Gets the EntityManager used by the parser.

Doctrine\ORM\Query\Lexer

getLexer()

Gets the lexer used by the parser.

Doctrine\ORM\Query\ParserResult

getParserResult()

Gets the ParserResult that is being filled with information during parsing.

void

match(int|string token)

Attempts to match the given token with the current lookahead token. +

ParserResult

parse()

Parses a query string.

void

semanticalError(string message, array token)

Generates a new semantical error.

void

setCustomOutputTreeWalker(string className)

Sets a custom tree walker that produces output. +

void

syntaxError(string expected, array token)

Generates a new syntax error.

+ +

Constructor Detail

+
/Doctrine/ORM/Query/Parser.php at line 137
+

Parser

+public Parser(Query query) +
+

Creates a new query parser object.

+
Parameters:
+
query - The Query to parse.
+
+
+ +
+ +

Method Detail

+
/Doctrine/ORM/Query/Parser.php at line 816
+

AbstractSchemaName

+public string AbstractSchemaName() +
+

AbstractSchemaName ::= identifier

+ +
+ +
/Doctrine/ORM/Query/Parser.php at line 2280
+

AggregateExpression

+public \Doctrine\ORM\Query\AST\AggregateExpression AggregateExpression() +
+

AggregateExpression ::= +("AVG" | "MAX" | "MIN" | "SUM") "(" ["DISTINCT"] StateFieldPathExpression ")" | +"COUNT" "(" ["DISTINCT"] (IdentificationVariable | SingleValuedPathExpression) ")"

+ +
+ +
/Doctrine/ORM/Query/Parser.php at line 795
+

AliasIdentificationVariable

+public string AliasIdentificationVariable() +
+

AliasIdentificationVariable = identifier

+ +
+ +
/Doctrine/ORM/Query/Parser.php at line 841
+

AliasResultVariable

+public string AliasResultVariable() +
+

AliasResultVariable ::= identifier

+ +
+ +
/Doctrine/ORM/Query/Parser.php at line 2065
+

ArithmeticExpression

+public \Doctrine\ORM\Query\AST\ArithmeticExpression ArithmeticExpression() +
+

ArithmeticExpression ::= SimpleArithmeticExpression | "(" Subselect ")"

+ +
+ +
/Doctrine/ORM/Query/Parser.php at line 2131
+

ArithmeticFactor

+public \Doctrine\ORM\Query\AST\ArithmeticFactor ArithmeticFactor() +
+

ArithmeticFactor ::= [("+" | "-")] ArithmeticPrimary

+ +
+ +
/Doctrine/ORM/Query/Parser.php at line 2148
+

ArithmeticPrimary

+public void ArithmeticPrimary() +
+

ArithmeticPrimary ::= SingleValuedPathExpression | Literal | "(" SimpleArithmeticExpression ")" +| FunctionsReturningNumerics | AggregateExpression | FunctionsReturningStrings +| FunctionsReturningDatetime | IdentificationVariable

+ +
+ +
/Doctrine/ORM/Query/Parser.php at line 2111
+

ArithmeticTerm

+public \Doctrine\ORM\Query\AST\ArithmeticTerm ArithmeticTerm() +
+

ArithmeticTerm ::= ArithmeticFactor {("*" | "/") ArithmeticFactor}

+ +
+ +
/Doctrine/ORM/Query/Parser.php at line 943
+

AssociationPathExpression

+public \Doctrine\ORM\Query\AST\PathExpression AssociationPathExpression() +
+

AssociationPathExpression ::= CollectionValuedPathExpression | SingleValuedAssociationPathExpression

+ +
+ +
/Doctrine/ORM/Query/Parser.php at line 2354
+

BetweenExpression

+public \Doctrine\ORM\Query\AST\BetweenExpression BetweenExpression() +
+

BetweenExpression ::= ArithmeticExpression ["NOT"] "BETWEEN" ArithmeticExpression "AND" ArithmeticExpression

+ +
+ +
/Doctrine/ORM/Query/Parser.php at line 1646
+

CaseExpression

+public void CaseExpression() +
+
+ +
+ +
/Doctrine/ORM/Query/Parser.php at line 1978
+

CollectionMemberExpression

+public \Doctrine\ORM\Query\AST\CollectionMemberExpression CollectionMemberExpression() +
+

CollectionMemberExpression ::= EntityExpression ["NOT"] "MEMBER" ["OF"] CollectionValuedPathExpression

EntityExpression ::= SingleValuedAssociationPathExpression | SimpleEntityExpression +SimpleEntityExpression ::= IdentificationVariable | InputParameter

+ +
+ +
/Doctrine/ORM/Query/Parser.php at line 989
+

CollectionValuedPathExpression

+public \Doctrine\ORM\Query\AST\PathExpression CollectionValuedPathExpression() +
+

CollectionValuedPathExpression ::= IdentificationVariable "." {SingleValuedAssociationField "."}* CollectionValuedAssociationField

+ +
+ +
/Doctrine/ORM/Query/Parser.php at line 2380
+

ComparisonExpression

+public \Doctrine\ORM\Query\AST\ComparisonExpression ComparisonExpression() +
+

ComparisonExpression ::= ArithmeticExpression ComparisonOperator ( QuantifiedExpression | ArithmeticExpression )

+ +
+ +
/Doctrine/ORM/Query/Parser.php at line 2526
+

ComparisonOperator

+public string ComparisonOperator() +
+

ComparisonOperator ::= "=" | "<" | "<=" | "<>" | ">" | ">=" | "!="

+ +
+ +
/Doctrine/ORM/Query/Parser.php at line 1775
+

ConditionalExpression

+public \Doctrine\ORM\Query\AST\ConditionalExpression ConditionalExpression() +
+

ConditionalExpression ::= ConditionalTerm {"OR" ConditionalTerm}

+ +
+ +
/Doctrine/ORM/Query/Parser.php at line 1811
+

ConditionalFactor

+public \Doctrine\ORM\Query\AST\ConditionalFactor ConditionalFactor() +
+

ConditionalFactor ::= ["NOT"] ConditionalPrimary

+ +
+ +
/Doctrine/ORM/Query/Parser.php at line 1831
+

ConditionalPrimary

+public Doctrine\ORM\Query\AST\ConditionalPrimary ConditionalPrimary() +
+

ConditionalPrimary ::= SimpleConditionalExpression | "(" ConditionalExpression ")"

+ +
+ +
/Doctrine/ORM/Query/Parser.php at line 1793
+

ConditionalTerm

+public \Doctrine\ORM\Query\AST\ConditionalTerm ConditionalTerm() +
+

ConditionalTerm ::= ConditionalFactor {"AND" ConditionalFactor}

+ +
+ +
/Doctrine/ORM/Query/Parser.php at line 2643
+

CustomFunctionsReturningDatetime

+public void CustomFunctionsReturningDatetime() +
+
+ +
+ +
/Doctrine/ORM/Query/Parser.php at line 2620
+

CustomFunctionsReturningNumerics

+public void CustomFunctionsReturningNumerics() +
+
+ +
+ +
/Doctrine/ORM/Query/Parser.php at line 2671
+

CustomFunctionsReturningStrings

+public void CustomFunctionsReturningStrings() +
+
+ +
+ +
/Doctrine/ORM/Query/Parser.php at line 1111
+

DeleteClause

+public \Doctrine\ORM\Query\AST\DeleteClause DeleteClause() +
+

DeleteClause ::= "DELETE" ["FROM"] AbstractSchemaName ["AS"] AliasIdentificationVariable

+ +
+ +
/Doctrine/ORM/Query/Parser.php at line 761
+

DeleteStatement

+public \Doctrine\ORM\Query\AST\DeleteStatement DeleteStatement() +
+

DeleteStatement ::= DeleteClause [WhereClause]

+ +
+ +
/Doctrine/ORM/Query/Parser.php at line 1953
+

EmptyCollectionComparisonExpression

+public \Doctrine\ORM\Query\AST\EmptyCollectionComparisonExpression EmptyCollectionComparisonExpression() +
+

EmptyCollectionComparisonExpression ::= CollectionValuedPathExpression "IS" ["NOT"] "EMPTY"

+ +
+ +
/Doctrine/ORM/Query/Parser.php at line 2248
+

EntityExpression

+public \Doctrine\ORM\Query\AST\SingleValuedAssociationPathExpression EntityExpression() +
+

EntityExpression ::= SingleValuedAssociationPathExpression | SimpleEntityExpression

+
Returns:
+
| \Doctrine\ORM\Query\AST\SimpleEntityExpression
+
+
+ +
+ +
/Doctrine/ORM/Query/Parser.php at line 2503
+

ExistsExpression

+public \Doctrine\ORM\Query\AST\ExistsExpression ExistsExpression() +
+

ExistsExpression ::= ["NOT"] "EXISTS" "(" Subselect ")"

+ +
+ +
/Doctrine/ORM/Query/Parser.php at line 1150
+

FromClause

+public \Doctrine\ORM\Query\AST\FromClause FromClause() +
+

FromClause ::= "FROM" IdentificationVariableDeclaration {"," IdentificationVariableDeclaration}

+ +
+ +
/Doctrine/ORM/Query/Parser.php at line 2573
+

FunctionDeclaration

+public void FunctionDeclaration() +
+

FunctionDeclaration ::= FunctionsReturningStrings | FunctionsReturningNumerics | FunctionsReturningDatetime

+ +
+ +
/Doctrine/ORM/Query/Parser.php at line 2633
+

FunctionsReturningDatetime

+public void FunctionsReturningDatetime() +
+

FunctionsReturningDateTime ::= "CURRENT_DATE" | "CURRENT_TIME" | "CURRENT_TIMESTAMP"

+ +
+ +
/Doctrine/ORM/Query/Parser.php at line 2610
+

FunctionsReturningNumerics

+public void FunctionsReturningNumerics() +
+

FunctionsReturningNumerics ::= +"LENGTH" "(" StringPrimary ")" | +"LOCATE" "(" StringPrimary "," StringPrimary ["," SimpleArithmeticExpression]")" | +"ABS" "(" SimpleArithmeticExpression ")" | +"SQRT" "(" SimpleArithmeticExpression ")" | +"MOD" "(" SimpleArithmeticExpression "," SimpleArithmeticExpression ")" | +"SIZE" "(" CollectionValuedPathExpression ")"

+ +
+ +
/Doctrine/ORM/Query/Parser.php at line 2661
+

FunctionsReturningStrings

+public void FunctionsReturningStrings() +
+

FunctionsReturningStrings ::= +"CONCAT" "(" StringPrimary "," StringPrimary ")" | +"SUBSTRING" "(" StringPrimary "," SimpleArithmeticExpression "," SimpleArithmeticExpression ")" | +"TRIM" "(" [["LEADING" | "TRAILING" | "BOTH"] [char] "FROM"] StringPrimary ")" | +"LOWER" "(" StringPrimary ")" | +"UPPER" "(" StringPrimary ")"

+ +
+ +
/Doctrine/ORM/Query/Parser.php at line 1212
+

GroupByClause

+public \Doctrine\ORM\Query\AST\GroupByClause GroupByClause() +
+

GroupByClause ::= "GROUP" "BY" GroupByItem {"," GroupByItem}

+ +
+ +
/Doctrine/ORM/Query/Parser.php at line 1316
+

GroupByItem

+public string GroupByItem() +
+

GroupByItem ::= IdentificationVariable | SingleValuedPathExpression

+
Returns:
+
| \Doctrine\ORM\Query\AST\PathExpression
+
+
+ +
+ +
/Doctrine/ORM/Query/Parser.php at line 1200
+

HavingClause

+public \Doctrine\ORM\Query\AST\HavingClause HavingClause() +
+

HavingClause ::= "HAVING" ConditionalExpression

+ +
+ +
/Doctrine/ORM/Query/Parser.php at line 775
+

IdentificationVariable

+public string IdentificationVariable() +
+

IdentificationVariable ::= identifier

+ +
+ +
/Doctrine/ORM/Query/Parser.php at line 1395
+

IdentificationVariableDeclaration

+public \Doctrine\ORM\Query\AST\IdentificationVariableDeclaration IdentificationVariableDeclaration() +
+

IdentificationVariableDeclaration ::= RangeVariableDeclaration [IndexBy] {JoinVariableDeclaration}

+ +
+ +
/Doctrine/ORM/Query/Parser.php at line 2401
+

InExpression

+public \Doctrine\ORM\Query\AST\InExpression InExpression() +
+

InExpression ::= StateFieldPathExpression ["NOT"] "IN" "(" (InParameter {"," InParameter}* | Subselect) ")"

+ +
+ +
/Doctrine/ORM/Query/Parser.php at line 2039
+

InParameter

+public string InParameter() +
+

InParameter ::= Literal | InputParameter

+
Returns:
+
| \Doctrine\ORM\Query\AST\InputParameter
+
+
+ +
+ +
/Doctrine/ORM/Query/Parser.php at line 1594
+

IndexBy

+public Doctrine\ORM\Query\AST\IndexBy IndexBy() +
+

IndexBy ::= "INDEX" "BY" SimpleStateFieldPathExpression

+ +
+ +
/Doctrine/ORM/Query/Parser.php at line 2053
+

InputParameter

+public \Doctrine\ORM\Query\AST\InputParameter InputParameter() +
+

InputParameter ::= PositionalParameter | NamedParameter

+ +
+ +
/Doctrine/ORM/Query/Parser.php at line 1524
+

Join

+public Doctrine\ORM\Query\AST\Join Join() +
+

Join ::= ["LEFT" ["OUTER"] | "INNER"] "JOIN" JoinAssociationPathExpression +["AS"] AliasIdentificationVariable ["WITH" ConditionalExpression]

+ +
+ +
/Doctrine/ORM/Query/Parser.php at line 883
+

JoinAssociationPathExpression

+public \Doctrine\ORM\Query\AST\JoinAssociationPathExpression JoinAssociationPathExpression() +
+

JoinAssociationPathExpression ::= IdentificationVariable "." (CollectionValuedAssociationField | SingleValuedAssociationField)

+ +
+ +
/Doctrine/ORM/Query/Parser.php at line 1441
+

JoinVariableDeclaration

+public \Doctrine\ORM\Query\AST\JoinVariableDeclaration JoinVariableDeclaration() +
+

JoinVariableDeclaration ::= Join [IndexBy]

+ +
+ +
/Doctrine/ORM/Query/Parser.php at line 2437
+

LikeExpression

+public \Doctrine\ORM\Query\AST\LikeExpression LikeExpression() +
+

LikeExpression ::= StringExpression ["NOT"] "LIKE" (string | input_parameter) ["ESCAPE" char]

+ +
+ +
/Doctrine/ORM/Query/Parser.php at line 2008
+

Literal

+public string Literal() +
+

Literal ::= string | char | integer | float | boolean

+ +
+ +
/Doctrine/ORM/Query/Parser.php at line 1377
+

NewValue

+public void NewValue() +
+

NewValue ::= SimpleArithmeticExpression | StringPrimary | DatetimePrimary | BooleanPrimary | +EnumPrimary | SimpleEntityExpression | "NULL"

NOTE: Since it is not possible to correctly recognize individual types, here is the full +grammar that needs to be supported:

NewValue ::= SimpleArithmeticExpression | "NULL"

SimpleArithmeticExpression covers all *Primary grammar rules and also SimplEntityExpression

+ +
+ +
/Doctrine/ORM/Query/Parser.php at line 2476
+

NullComparisonExpression

+public \Doctrine\ORM\Query\AST\NullComparisonExpression NullComparisonExpression() +
+

NullComparisonExpression ::= (SingleValuedPathExpression | InputParameter) "IS" ["NOT"] "NULL"

+ +
+ +
/Doctrine/ORM/Query/Parser.php at line 1232
+

OrderByClause

+public \Doctrine\ORM\Query\AST\OrderByClause OrderByClause() +
+

OrderByClause ::= "ORDER" "BY" OrderByItem {"," OrderByItem}

+ +
+ +
/Doctrine/ORM/Query/Parser.php at line 1339
+

OrderByItem

+public \Doctrine\ORM\Query\AST\OrderByItem OrderByItem() +
+

OrderByItem ::= (ResultVariable | StateFieldPathExpression) ["ASC" | "DESC"]

+
Todo:
+
Post 2.0 release. Support general SingleValuedPathExpression instead of only StateFieldPathExpression.
+
+
+ +
+ +
/Doctrine/ORM/Query/Parser.php at line 1487
+

PartialObjectExpression

+public array PartialObjectExpression() +
+

PartialObjectExpression ::= "PARTIAL" IdentificationVariable "." PartialFieldSet +PartialFieldSet ::= "{" SimpleStateField {"," SimpleStateField}* "}"

+ +
+ +
/Doctrine/ORM/Query/Parser.php at line 912
+

PathExpression

+public \Doctrine\ORM\Query\AST\PathExpression PathExpression(integer expectedTypes) +
+

Parses an arbitrary path expression and defers semantical validation +based on expected types.

PathExpression ::= IdentificationVariable {"." identifier}* "." identifier

+ +
+ +
/Doctrine/ORM/Query/Parser.php at line 2324
+

QuantifiedExpression

+public \Doctrine\ORM\Query\AST\QuantifiedExpression QuantifiedExpression() +
+

QuantifiedExpression ::= ("ALL" | "ANY" | "SOME") "(" Subselect ")"

+ +
+ +
/Doctrine/ORM/Query/Parser.php at line 691
+

QueryLanguage

+public \Doctrine\ORM\Query\AST\SelectStatement QueryLanguage() +
+

QueryLanguage ::= SelectStatement | UpdateStatement | DeleteStatement

+
Returns:
+
| \Doctrine\ORM\Query\AST\UpdateStatement | \Doctrine\ORM\Query\AST\DeleteStatement
+
+
+ +
+ +
/Doctrine/ORM/Query/Parser.php at line 1455
+

RangeVariableDeclaration

+public Doctrine\ORM\Query\AST\RangeVariableDeclaration RangeVariableDeclaration() +
+

RangeVariableDeclaration ::= AbstractSchemaName ["AS"] AliasIdentificationVariable

+ +
+ +
/Doctrine/ORM/Query/Parser.php at line 862
+

ResultVariable

+public string ResultVariable() +
+

ResultVariable ::= identifier

+ +
+ +
/Doctrine/ORM/Query/Parser.php at line 1614
+

ScalarExpression

+public mixed ScalarExpression() +
+

ScalarExpression ::= SimpleArithmeticExpression | StringPrimary | DateTimePrimary | +StateFieldPathExpression | BooleanPrimary | CaseExpression | +EntityTypeExpression

+
Returns:
+
One of the possible expressions or subexpressions.
+
+
+ +
+ +
/Doctrine/ORM/Query/Parser.php at line 1019
+

SelectClause

+public \Doctrine\ORM\Query\AST\SelectClause SelectClause() +
+

SelectClause ::= "SELECT" ["DISTINCT"] SelectExpression {"," SelectExpression}

+ +
+ +
/Doctrine/ORM/Query/Parser.php at line 1662
+

SelectExpression

+public Doctrine\ORM\Query\AST\SelectExpression SelectExpression() +
+

SelectExpression ::= +IdentificationVariable | StateFieldPathExpression | +(AggregateExpression | "(" Subselect ")" | ScalarExpression) [["AS"] AliasResultVariable]

+ +
+ +
/Doctrine/ORM/Query/Parser.php at line 723
+

SelectStatement

+public \Doctrine\ORM\Query\AST\SelectStatement SelectStatement() +
+

SelectStatement ::= SelectClause FromClause [WhereClause] [GroupByClause] [HavingClause] [OrderByClause]

+ +
+ +
/Doctrine/ORM/Query/Parser.php at line 2091
+

SimpleArithmeticExpression

+public \Doctrine\ORM\Query\AST\SimpleArithmeticExpression SimpleArithmeticExpression() +
+

SimpleArithmeticExpression ::= ArithmeticTerm {("+" | "-") ArithmeticTerm}

+ +
+ +
/Doctrine/ORM/Query/Parser.php at line 1865
+

SimpleConditionalExpression

+public void SimpleConditionalExpression() +
+

SimpleConditionalExpression ::= +ComparisonExpression | BetweenExpression | LikeExpression | +InExpression | NullComparisonExpression | ExistsExpression | +EmptyCollectionComparisonExpression | CollectionMemberExpression

+ +
+ +
/Doctrine/ORM/Query/Parser.php at line 2264
+

SimpleEntityExpression

+public string SimpleEntityExpression() +
+

SimpleEntityExpression ::= IdentificationVariable | InputParameter

+
Returns:
+
| \Doctrine\ORM\Query\AST\InputParameter
+
+
+ +
+ +
/Doctrine/ORM/Query/Parser.php at line 1047
+

SimpleSelectClause

+public \Doctrine\ORM\Query\AST\SimpleSelectClause SimpleSelectClause() +
+

SimpleSelectClause ::= "SELECT" ["DISTINCT"] SimpleSelectExpression

+ +
+ +
/Doctrine/ORM/Query/Parser.php at line 1733
+

SimpleSelectExpression

+public \Doctrine\ORM\Query\AST\SimpleSelectExpression SimpleSelectExpression() +
+

SimpleSelectExpression ::= StateFieldPathExpression | IdentificationVariable | (AggregateExpression [["AS"] AliasResultVariable])

+ +
+ +
/Doctrine/ORM/Query/Parser.php at line 999
+

SimpleStateFieldPathExpression

+public \Doctrine\ORM\Query\AST\PathExpression SimpleStateFieldPathExpression() +
+

SimpleStateFieldPathExpression ::= IdentificationVariable "." StateField

+ +
+ +
/Doctrine/ORM/Query/Parser.php at line 979
+

SingleValuedAssociationPathExpression

+public \Doctrine\ORM\Query\AST\PathExpression SingleValuedAssociationPathExpression() +
+

SingleValuedAssociationPathExpression ::= IdentificationVariable "." {SingleValuedAssociationField "."}* SingleValuedAssociationField

+ +
+ +
/Doctrine/ORM/Query/Parser.php at line 956
+

SingleValuedPathExpression

+public \Doctrine\ORM\Query\AST\PathExpression SingleValuedPathExpression() +
+

SingleValuedPathExpression ::= StateFieldPathExpression | SingleValuedAssociationPathExpression

+ +
+ +
/Doctrine/ORM/Query/Parser.php at line 969
+

StateFieldPathExpression

+public \Doctrine\ORM\Query\AST\PathExpression StateFieldPathExpression() +
+

StateFieldPathExpression ::= SimpleStateFieldPathExpression | SimpleStateFieldAssociationPathExpression

+ +
+ +
/Doctrine/ORM/Query/Parser.php at line 2197
+

StringExpression

+public \Doctrine\ORM\Query\AST\StringPrimary StringExpression() +
+

StringExpression ::= StringPrimary | "(" Subselect ")"

+
Returns:
+
| \Doctrine]ORM\Query\AST\Subselect
+
+
+ +
+ +
/Doctrine/ORM/Query/Parser.php at line 2217
+

StringPrimary

+public void StringPrimary() +
+

StringPrimary ::= StateFieldPathExpression | string | InputParameter | FunctionsReturningStrings | AggregateExpression

+ +
+ +
/Doctrine/ORM/Query/Parser.php at line 1253
+

Subselect

+public \Doctrine\ORM\Query\AST\Subselect Subselect() +
+

Subselect ::= SimpleSelectClause SubselectFromClause [WhereClause] [GroupByClause] [HavingClause] [OrderByClause]

+ +
+ +
/Doctrine/ORM/Query/Parser.php at line 1169
+

SubselectFromClause

+public \Doctrine\ORM\Query\AST\SubselectFromClause SubselectFromClause() +
+

SubselectFromClause ::= "FROM" SubselectIdentificationVariableDeclaration {"," SubselectIdentificationVariableDeclaration}

+ +
+ +
/Doctrine/ORM/Query/Parser.php at line 1420
+

SubselectIdentificationVariableDeclaration

+public \Doctrine\ORM\Query\AST\SubselectIdentificationVariableDeclaration SubselectIdentificationVariableDeclaration() +
+

SubselectIdentificationVariableDeclaration ::= IdentificationVariableDeclaration | (AssociationPathExpression ["AS"] AliasIdentificationVariable)

+
Returns:
+
| \Doctrine\ORM\Query\AST\IdentificationVariableDeclaration
+
+
+ +
+ +
/Doctrine/ORM/Query/Parser.php at line 1065
+

UpdateClause

+public \Doctrine\ORM\Query\AST\UpdateClause UpdateClause() +
+

UpdateClause ::= "UPDATE" AbstractSchemaName ["AS"] AliasIdentificationVariable "SET" UpdateItem {"," UpdateItem}

+ +
+ +
/Doctrine/ORM/Query/Parser.php at line 1283
+

UpdateItem

+public \Doctrine\ORM\Query\AST\UpdateItem UpdateItem() +
+

UpdateItem ::= IdentificationVariable "." {StateField | SingleValuedAssociationField} "=" NewValue

+ +
+ +
/Doctrine/ORM/Query/Parser.php at line 747
+

UpdateStatement

+public \Doctrine\ORM\Query\AST\UpdateStatement UpdateStatement() +
+

UpdateStatement ::= UpdateClause [WhereClause]

+ +
+ +
/Doctrine/ORM/Query/Parser.php at line 1188
+

WhereClause

+public \Doctrine\ORM\Query\AST\WhereClause WhereClause() +
+

WhereClause ::= "WHERE" ConditionalExpression

+ +
+ +
/Doctrine/ORM/Query/Parser.php at line 161
+

addCustomTreeWalker

+public void addCustomTreeWalker(string className) +
+

Adds a custom tree walker for modifying the AST.

+ +
+ +
/Doctrine/ORM/Query/Parser.php at line 249
+

free

+public void free(boolean deep, integer position) +
+

Free this parser enabling it to be reused

+
Parameters:
+
deep - Whether to clean peek and reset errors
+
position - Position to reset
+
+
+ +
+ +
/Doctrine/ORM/Query/Parser.php at line 203
+

getAST

+public \Doctrine\ORM\Query\AST\SelectStatement getAST() +
+

Parse and build AST for the given Query.

+
Returns:
+
| \Doctrine\ORM\Query\AST\UpdateStatement | \Doctrine\ORM\Query\AST\DeleteStatement
+
+
+ +
+ +
/Doctrine/ORM/Query/Parser.php at line 191
+

getEntityManager

+public EntityManager getEntityManager() +
+

Gets the EntityManager used by the parser.

+ +
+ +
/Doctrine/ORM/Query/Parser.php at line 171
+

getLexer

+public Doctrine\ORM\Query\Lexer getLexer() +
+

Gets the lexer used by the parser.

+ +
+ +
/Doctrine/ORM/Query/Parser.php at line 181
+

getParserResult

+public Doctrine\ORM\Query\ParserResult getParserResult() +
+

Gets the ParserResult that is being filled with information during parsing.

+ +
+ +
/Doctrine/ORM/Query/Parser.php at line 234
+

match

+public void match(int|string token) +
+

Attempts to match the given token with the current lookahead token.

If they match, updates the lookahead token; otherwise raises a syntax +error.

+
Parameters:
+
token - type or value
+
Throws:
+
If the tokens dont match.
+
+
+ +
+ +
/Doctrine/ORM/Query/Parser.php at line 268
+

parse

+public ParserResult parse() +
+

Parses a query string.

+ +
+ +
/Doctrine/ORM/Query/Parser.php at line 353
+

semanticalError

+public void semanticalError(string message, array token) +
+

Generates a new semantical error.

+
Parameters:
+
message - Optional message.
+
token - Optional token.
+
Throws:
+
\Doctrine\ORM\Query\QueryException
+
+
+ +
+ +
/Doctrine/ORM/Query/Parser.php at line 151
+

setCustomOutputTreeWalker

+public void setCustomOutputTreeWalker(string className) +
+

Sets a custom tree walker that produces output. +This tree walker will be run last over the AST, after any other walkers.

+ +
+ +
/Doctrine/ORM/Query/Parser.php at line 321
+

syntaxError

+public void syntaxError(string expected, array token) +
+

Generates a new syntax error.

+
Parameters:
+
expected - Expected string.
+
token - Got token.
+
Throws:
+
\Doctrine\ORM\Query\QueryException
+
+
+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/orm/query/parserresult.html b/lib/api/doctrine/orm/query/parserresult.html new file mode 100644 index 000000000..aa6112a77 --- /dev/null +++ b/lib/api/doctrine/orm/query/parserresult.html @@ -0,0 +1,218 @@ + + + + + + + + + + + +ParserResult (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +
Doctrine\ORM\Query\ParserResult
+
/Doctrine/ORM/Query/ParserResult.php at line 36
+ +

Class ParserResult

+ +
ParserResult
+ +
+ +

public class ParserResult

+ +

Encapsulates the resulting components from a DQL query parsing process that +can be serialized.

+ +
+
Author:
+
Guilherme Blanco
+
Janne Vanhala
+
Author Roman:
+
Borschel
+
License:
+
http://www.opensource.org/licenses/lgpl-license.php LGPL
+
See Also:
+
http://www.doctrine-project.org
+
Since:
+
2.0
+
Version:
+
$Revision$
+
+
+ + + + + + +
Constructor Summary

ParserResult()

Initializes a new instance of the ParserResult class. +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Method Summary
void

addParameterMapping(string|integer dqlPosition, integer sqlPosition)

Adds a DQL to SQL parameter mapping.

array

getParameterMappings()

Gets all DQL to SQL parameter mappings.

ResultSetMapping

getResultSetMapping()

Gets the ResultSetMapping for the parsed query.

\Doctrine\ORM\Query\Exec\AbstractSqlExecutor

getSqlExecutor()

Gets the SQL executor used by this ParserResult.

array

getSqlParameterPositions(string|integer dqlPosition)

Gets the SQL parameter positions for a DQL parameter name/position.

void

setResultSetMapping(ResultSetMapping rsm)

Sets the ResultSetMapping of the parsed query.

void

setSqlExecutor(\Doctrine\ORM\Query\Exec\AbstractSqlExecutor executor)

Sets the SQL executor that should be used for this ParserResult.

+ +

Constructor Detail

+
/Doctrine/ORM/Query/ParserResult.php at line 63
+

ParserResult

+public ParserResult() +
+

Initializes a new instance of the ParserResult class. +The new instance is initialized with an empty ResultSetMapping.

+ +
+ +

Method Detail

+
/Doctrine/ORM/Query/ParserResult.php at line 116
+

addParameterMapping

+public void addParameterMapping(string|integer dqlPosition, integer sqlPosition) +
+

Adds a DQL to SQL parameter mapping. One DQL parameter name/position can map to +several SQL parameter positions.

+ +
+ +
/Doctrine/ORM/Query/ParserResult.php at line 126
+

getParameterMappings

+public array getParameterMappings() +
+

Gets all DQL to SQL parameter mappings.

+
Returns:
+
The parameter mappings.
+
+
+ +
+ +
/Doctrine/ORM/Query/ParserResult.php at line 74
+

getResultSetMapping

+public ResultSetMapping getResultSetMapping() +
+

Gets the ResultSetMapping for the parsed query.

+
Returns:
+
The result set mapping of the parsed query or NULL if the query is not a SELECT query.
+
+
+ +
+ +
/Doctrine/ORM/Query/ParserResult.php at line 104
+

getSqlExecutor

+public \Doctrine\ORM\Query\Exec\AbstractSqlExecutor getSqlExecutor() +
+

Gets the SQL executor used by this ParserResult.

+ +
+ +
/Doctrine/ORM/Query/ParserResult.php at line 137
+

getSqlParameterPositions

+public array getSqlParameterPositions(string|integer dqlPosition) +
+

Gets the SQL parameter positions for a DQL parameter name/position.

+
Parameters:
+
dqlPosition - The name or position of the DQL parameter.
+
Returns:
+
The positions of the corresponding SQL parameters.
+
+
+ +
+ +
/Doctrine/ORM/Query/ParserResult.php at line 84
+

setResultSetMapping

+public void setResultSetMapping(ResultSetMapping rsm) +
+

Sets the ResultSetMapping of the parsed query.

+ +
+ +
/Doctrine/ORM/Query/ParserResult.php at line 94
+

setSqlExecutor

+public void setSqlExecutor(\Doctrine\ORM\Query\Exec\AbstractSqlExecutor executor) +
+

Sets the SQL executor that should be used for this ParserResult.

+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/orm/query/printer.html b/lib/api/doctrine/orm/query/printer.html new file mode 100644 index 000000000..e97801781 --- /dev/null +++ b/lib/api/doctrine/orm/query/printer.html @@ -0,0 +1,194 @@ + + + + + + + + + + + +Printer (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +
Doctrine\ORM\Query\Printer
+
/Doctrine/ORM/Query/Printer.php at line 33
+ +

Class Printer

+ +
Printer
+ +
+ +

public class Printer

+ +

A parse tree printer for Doctrine Query Language parser.

+ +
+
Author:
+
Janne Vanhala
+
License:
+
http://www.opensource.org/licenses/lgpl-license.php LGPL
+
See Also:
+
http://www.phpdoctrine.org
+
Since:
+
2.0
+
Version:
+
$Revision$
+
+
+ + + + + + + + + + + +
Field Summary
protected int

$_indent

Current indentation level

protected bool

$_silent

Defines whether parse tree is printed (default, false) or not (true).

+ + + + + + +
Constructor Summary

Printer(bool silent)

Constructs a new parse tree printer.

+ + + + + + + + + + + + + + + +
Method Summary
void

endProduction()

Decreases indentation level by one and prints a closing parenthesis. +

void

println(string str)

Prints text indented with spaces depending on current indentation level.

void

startProduction(string name)

Prints an opening parenthesis followed by production name and increases +indentation level by one. +

+ +

Field Detail

+
/Doctrine/ORM/Query/Printer.php at line 40
+

_indent

+protected int $_indent +
+

Current indentation level

+ +
+ +
/Doctrine/ORM/Query/Printer.php at line 47
+

_silent

+protected bool $_silent +
+

Defines whether parse tree is printed (default, false) or not (true).

+ +
+ +

Constructor Detail

+
/Doctrine/ORM/Query/Printer.php at line 54
+

Printer

+public Printer(bool silent) +
+

Constructs a new parse tree printer.

+
Parameters:
+
silent - Parse tree will not be printed if true.
+
+
+ +
+ +

Method Detail

+
/Doctrine/ORM/Query/Printer.php at line 78
+

endProduction

+public void endProduction() +
+

Decreases indentation level by one and prints a closing parenthesis.

This method is called after executing a production.

+ +
+ +
/Doctrine/ORM/Query/Printer.php at line 89
+

println

+public void println(string str) +
+

Prints text indented with spaces depending on current indentation level.

+
Parameters:
+
str - text
+
+
+ +
+ +
/Doctrine/ORM/Query/Printer.php at line 67
+

startProduction

+public void startProduction(string name) +
+

Prints an opening parenthesis followed by production name and increases +indentation level by one.

This method is called before executing a production.

+
Parameters:
+
name - production name
+
+
+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/orm/query/queryexception.html b/lib/api/doctrine/orm/query/queryexception.html new file mode 100644 index 000000000..d19dafc97 --- /dev/null +++ b/lib/api/doctrine/orm/query/queryexception.html @@ -0,0 +1,271 @@ + + + + + + + + + + + +QueryException (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +
Doctrine\ORM\Query\QueryException
+
/Doctrine/ORM/Query/QueryException.php at line 38
+ +

Class QueryException

+ +
Class:QueryException - Superclass: Doctrine
+Doctrine
⌊ QueryException
+ +
+ +

public class QueryException
extends Doctrine + +

+ +

Description of QueryException

+ +
+
License:
+
http://www.opensource.org/licenses/lgpl-license.php LGPL
+
See Also:
+
www.doctrine-project.org
+
Since:
+
2.0
+
Version:
+
$Revision: 3938 $
+
Author:
+
Guilherme Blanco
+
Jonathan Wage
+
Roman Borschel
+
Benjamin Eberlei
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Method Summary
static void

associationPathCompositeKeyNotSupported()

static void

associationPathInverseSideNotSupported()

static void

invalidLiteral(mixed literal)

static void

invalidParameterFormat(mixed value)

static void

invalidParameterNumber()

static void

invalidParameterPosition(mixed pos)

static void

invalidPathExpression(mixed pathExpr)

static void

iterateWithFetchJoinCollectionNotAllowed(Doctrine\ORM\Mapping\AssociationMapping assoc)

static void

iterateWithFetchJoinNotAllowed(mixed assoc)

static void

overwritingJoinConditionsNotYetSupported(mixed assoc)

static void

partialObjectsAreDangerous()

static void

semanticalError(mixed message)

static void

syntaxError(mixed message)

static void

unknownParameter(mixed key)

+ +

Method Detail

+
/Doctrine/ORM/Query/QueryException.php at line 126
+

associationPathCompositeKeyNotSupported

+public static void associationPathCompositeKeyNotSupported() +
+
+ +
+ +
/Doctrine/ORM/Query/QueryException.php at line 111
+

associationPathInverseSideNotSupported

+public static void associationPathInverseSideNotSupported() +
+
+ +
+ +
/Doctrine/ORM/Query/QueryException.php at line 78
+

invalidLiteral

+public static void invalidLiteral(mixed literal) +
+
+ +
+ +
/Doctrine/ORM/Query/QueryException.php at line 60
+

invalidParameterFormat

+public static void invalidParameterFormat(mixed value) +
+
+ +
+ +
/Doctrine/ORM/Query/QueryException.php at line 55
+

invalidParameterNumber

+public static void invalidParameterNumber() +
+
+ +
+ +
/Doctrine/ORM/Query/QueryException.php at line 50
+

invalidParameterPosition

+public static void invalidParameterPosition(mixed pos) +
+
+ +
+ +
/Doctrine/ORM/Query/QueryException.php at line 70
+

invalidPathExpression

+public static void invalidPathExpression(mixed pathExpr) +
+
+ +
+ +
/Doctrine/ORM/Query/QueryException.php at line 85
+

iterateWithFetchJoinCollectionNotAllowed

+public static void iterateWithFetchJoinCollectionNotAllowed(Doctrine\ORM\Mapping\AssociationMapping assoc) +
+

+ +
+ +
/Doctrine/ORM/Query/QueryException.php at line 119
+

iterateWithFetchJoinNotAllowed

+public static void iterateWithFetchJoinNotAllowed(mixed assoc) +
+
+ +
+ +
/Doctrine/ORM/Query/QueryException.php at line 102
+

overwritingJoinConditionsNotYetSupported

+public static void overwritingJoinConditionsNotYetSupported(mixed assoc) +
+
+ +
+ +
/Doctrine/ORM/Query/QueryException.php at line 93
+

partialObjectsAreDangerous

+public static void partialObjectsAreDangerous() +
+
+ +
+ +
/Doctrine/ORM/Query/QueryException.php at line 45
+

semanticalError

+public static void semanticalError(mixed message) +
+
+ +
+ +
/Doctrine/ORM/Query/QueryException.php at line 40
+

syntaxError

+public static void syntaxError(mixed message) +
+
+ +
+ +
/Doctrine/ORM/Query/QueryException.php at line 65
+

unknownParameter

+public static void unknownParameter(mixed key) +
+
+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/orm/query/resultsetmapping.html b/lib/api/doctrine/orm/query/resultsetmapping.html new file mode 100644 index 000000000..ac5e76f2c --- /dev/null +++ b/lib/api/doctrine/orm/query/resultsetmapping.html @@ -0,0 +1,607 @@ + + + + + + + + + + + +ResultSetMapping (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +
Doctrine\ORM\Query\ResultSetMapping
+
/Doctrine/ORM/Query/ResultSetMapping.php at line 38
+ +

Class ResultSetMapping

+ +
ResultSetMapping
+ +
+ +

public class ResultSetMapping

+ +

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.

+ +
+
Author:
+
Roman Borschel
+
Since:
+
2.0
+
Todo:
+
Think about whether the number of lookup maps can be reduced.
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Field Summary
array

$aliasMap

Maps alias names to class names.

array

$columnOwnerMap

Maps column names in the result set to the alias they belong to.

array

$declaringClasses

Map from column names to class names that declare the field the column is mapped to.

array

$discriminatorColumns

List of columns in the result set that are used as discriminator columns.

array

$fieldMappings

Maps column names in the result set to field names for each class.

array

$indexByMap

Maps alias names to field names that should be used for indexing.

boolean

$isMixed

Whether the result is mixed (contains scalar values together with field values).

array

$metaMappings

Maps column names of meta columns (foreign keys, discriminator columns, ...) to field names.

array

$parentAliasMap

Maps alias names to parent alias names.

array

$relationMap

Maps alias names to related association field names.

array

$scalarMappings

Maps column names in the result set to the alias/field name to use in the mapped result.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Method Summary
void

addEntityResult(string class, string alias)

Adds an entity result to this ResultSetMapping.

void

addFieldResult(string alias, string columnName, string fieldName, string declaringClass)

Adds a field to the result that belongs to an entity or joined entity.

void

addIndexBy(string alias, string fieldName)

Sets a field to use for indexing an entity result or joined entity result.

void

addJoinedEntityResult(string class, string alias, string parentAlias, object relation)

Adds a joined entity result.

void

addMetaResult(mixed alias, mixed columnName, mixed fieldName, $fieldName )

Adds a meta column (foreign key or discriminator column) to the result set.

void

addScalarResult(string columnName, string alias)

Adds a scalar result mapping.

array

getAliasMap()

string

getClassName(string alias)

Gets the name of the class of an entity result or joined entity result, +identified by the given unique alias.

string

getDeclaringClass(string columnName)

Gets the name of the class that owns a field mapping for the specified column.

string

getEntityAlias(string columnName)

Gets the alias of the class that owns a field mapping for the specified column.

integer

getEntityResultCount()

Gets the number of different entities that appear in the mapped result.

string

getFieldName(string columnName)

Gets the field name for a column name.

string

getParentAlias(string alias)

Gets the parent alias of the given alias.

AssociationMapping

getRelation(string alias)

string

getScalarAlias(string columnName)

Gets the field alias for a column that is mapped as a scalar value.

boolean

hasIndexBy(string alias)

Checks whether an entity result or joined entity result with a given alias has +a field set for indexing.

boolean

hasParentAlias(string alias)

Checks whether the given alias has a parent alias.

boolean

isFieldResult(string columnName)

Checks whether the column with the given name is mapped as a field result +as part of an entity result or joined entity result.

boolean

isMixedResult()

Checks whether this ResultSetMapping defines a mixed result. +

boolean

isRelation(string alias)

boolean

isScalarResult(mixed columnName, string columName)

Checks whether a column with a given name is mapped as a scalar result.

void

setDiscriminatorColumn(string alias, string discrColumn)

Sets a discriminator column for an entity result or joined entity result. +

+ +

Field Detail

+
/Doctrine/ORM/Query/ResultSetMapping.php at line 53
+

aliasMap

+public array $aliasMap = array() +
+

Maps alias names to class names.

+
Ignore.
+
+
+ +
+ +
/Doctrine/ORM/Query/ResultSetMapping.php at line 95
+

columnOwnerMap

+public array $columnOwnerMap = array() +
+

Maps column names in the result set to the alias they belong to.

+
Ignore.
+
+
+ +
+ +
/Doctrine/ORM/Query/ResultSetMapping.php at line 116
+

declaringClasses

+public array $declaringClasses = array() +
+

Map from column names to class names that declare the field the column is mapped to.

+
Ignore.
+
+
+ +
+ +
/Doctrine/ORM/Query/ResultSetMapping.php at line 102
+

discriminatorColumns

+public array $discriminatorColumns = array() +
+

List of columns in the result set that are used as discriminator columns.

+
Ignore.
+
+
+ +
+ +
/Doctrine/ORM/Query/ResultSetMapping.php at line 74
+

fieldMappings

+public array $fieldMappings = array() +
+

Maps column names in the result set to field names for each class.

+
Ignore.
+
+
+ +
+ +
/Doctrine/ORM/Query/ResultSetMapping.php at line 109
+

indexByMap

+public array $indexByMap = array() +
+

Maps alias names to field names that should be used for indexing.

+
Ignore.
+
+
+ +
+ +
/Doctrine/ORM/Query/ResultSetMapping.php at line 46
+

isMixed

+public boolean $isMixed = false +
+

Whether the result is mixed (contains scalar values together with field values).

+
Ignore.
+
+
+ +
+ +
/Doctrine/ORM/Query/ResultSetMapping.php at line 88
+

metaMappings

+public array $metaMappings = array() +
+

Maps column names of meta columns (foreign keys, discriminator columns, ...) to field names.

+
Ignore.
+
+
+ +
+ +
/Doctrine/ORM/Query/ResultSetMapping.php at line 67
+

parentAliasMap

+public array $parentAliasMap = array() +
+

Maps alias names to parent alias names.

+
Ignore.
+
+
+ +
+ +
/Doctrine/ORM/Query/ResultSetMapping.php at line 60
+

relationMap

+public array $relationMap = array() +
+

Maps alias names to related association field names.

+
Ignore.
+
+
+ +
+ +
/Doctrine/ORM/Query/ResultSetMapping.php at line 81
+

scalarMappings

+public array $scalarMappings = array() +
+

Maps column names in the result set to the alias/field name to use in the mapped result.

+
Ignore.
+
+
+ +
+ +

Method Detail

+
/Doctrine/ORM/Query/ResultSetMapping.php at line 126
+

addEntityResult

+public void addEntityResult(string class, string alias) +
+

Adds an entity result to this ResultSetMapping.

+
Parameters:
+
class - The class name of the entity.
+
alias - The alias for the class. The alias must be unique among all entity results or joined entity results within this ResultSetMapping.
+
Todo:
+
Rename: addRootEntity
+
+
+ +
+ +
/Doctrine/ORM/Query/ResultSetMapping.php at line 197
+

addFieldResult

+public void addFieldResult(string alias, string columnName, string fieldName, string declaringClass) +
+

Adds a field to the result that belongs to an entity or joined entity.

+
Parameters:
+
alias - The alias of the root entity or joined entity to which the field belongs.
+
columnName - The name of the column in the SQL result set.
+
fieldName - The name of the field on the declaring class.
+
declaringClass - The name of the class that declares/owns the specified field. When $alias refers to a superclass in a mapped hierarchy but the field $fieldName is defined on a subclass, specify that here. If not specified, the field is assumed to belong to the class designated by $alias.
+
Todo:
+
Rename: addField
+
+
+ +
+ +
/Doctrine/ORM/Query/ResultSetMapping.php at line 153
+

addIndexBy

+public void addIndexBy(string alias, string fieldName) +
+

Sets a field to use for indexing an entity result or joined entity result.

+
Parameters:
+
alias - The alias of an entity result or joined entity result.
+
fieldName - The name of the field to use for indexing.
+
+
+ +
+ +
/Doctrine/ORM/Query/ResultSetMapping.php at line 219
+

addJoinedEntityResult

+public void addJoinedEntityResult(string class, string alias, string parentAlias, object relation) +
+

Adds a joined entity result.

+
Parameters:
+
class - The class name of the joined entity.
+
alias - The unique alias to use for the joined entity.
+
parentAlias - The alias of the entity result that is the parent of this joined result.
+
relation - The association field that connects the parent entity result with the joined entity result.
+
Todo:
+
Rename: addJoinedEntity
+
+
+ +
+ +
/Doctrine/ORM/Query/ResultSetMapping.php at line 390
+

addMetaResult

+public void addMetaResult(mixed alias, mixed columnName, mixed fieldName, $fieldName ) +
+

Adds a meta column (foreign key or discriminator column) to the result set.

+ +
+ +
/Doctrine/ORM/Query/ResultSetMapping.php at line 233
+

addScalarResult

+public void addScalarResult(string columnName, string alias) +
+

Adds a scalar result mapping.

+
Parameters:
+
columnName - The name of the column in the SQL result set.
+
alias - The result alias with which the scalar result should be placed in the result structure.
+
Todo:
+
Rename: addScalar
+
+
+ +
+ +
/Doctrine/ORM/Query/ResultSetMapping.php at line 355
+

getAliasMap

+public array getAliasMap() +
+

+ +
+ +
/Doctrine/ORM/Query/ResultSetMapping.php at line 260
+

getClassName

+public string getClassName(string alias) +
+

Gets the name of the class of an entity result or joined entity result, +identified by the given unique alias.

+ +
+ +
/Doctrine/ORM/Query/ResultSetMapping.php at line 282
+

getDeclaringClass

+public string getDeclaringClass(string columnName) +
+

Gets the name of the class that owns a field mapping for the specified column.

+ +
+ +
/Doctrine/ORM/Query/ResultSetMapping.php at line 313
+

getEntityAlias

+public string getEntityAlias(string columnName) +
+

Gets the alias of the class that owns a field mapping for the specified column.

+ +
+ +
/Doctrine/ORM/Query/ResultSetMapping.php at line 365
+

getEntityResultCount

+public integer getEntityResultCount() +
+

Gets the number of different entities that appear in the mapped result.

+ +
+ +
/Doctrine/ORM/Query/ResultSetMapping.php at line 346
+

getFieldName

+public string getFieldName(string columnName) +
+

Gets the field name for a column name.

+ +
+ +
/Doctrine/ORM/Query/ResultSetMapping.php at line 324
+

getParentAlias

+public string getParentAlias(string alias) +
+

Gets the parent alias of the given alias.

+ +
+ +
/Doctrine/ORM/Query/ResultSetMapping.php at line 292
+

getRelation

+public AssociationMapping getRelation(string alias) +
+

+ +
+ +
/Doctrine/ORM/Query/ResultSetMapping.php at line 271
+

getScalarAlias

+public string getScalarAlias(string columnName) +
+

Gets the field alias for a column that is mapped as a scalar value.

+
Parameters:
+
columnName - The name of the column in the SQL result set.
+
+
+ +
+ +
/Doctrine/ORM/Query/ResultSetMapping.php at line 166
+

hasIndexBy

+public boolean hasIndexBy(string alias) +
+

Checks whether an entity result or joined entity result with a given alias has +a field set for indexing.

+
Todo:
+
Rename: isIndexed($alias)
+
+
+ +
+ +
/Doctrine/ORM/Query/ResultSetMapping.php at line 335
+

hasParentAlias

+public boolean hasParentAlias(string alias) +
+

Checks whether the given alias has a parent alias.

+ +
+ +
/Doctrine/ORM/Query/ResultSetMapping.php at line 179
+

isFieldResult

+public boolean isFieldResult(string columnName) +
+

Checks whether the column with the given name is mapped as a field result +as part of an entity result or joined entity result.

+
Parameters:
+
columnName - The name of the column in the SQL result set.
+
Todo:
+
Rename: isField
+
+
+ +
+ +
/Doctrine/ORM/Query/ResultSetMapping.php at line 378
+

isMixedResult

+public boolean isMixedResult() +
+

Checks whether this ResultSetMapping defines a mixed result. +Mixed results can only occur in object and array (graph) hydration. In such a +case a mixed result means that scalar values are mixed with objects/array in +the result.

+ +
+ +
/Doctrine/ORM/Query/ResultSetMapping.php at line 302
+

isRelation

+public boolean isRelation(string alias) +
+

+ +
+ +
/Doctrine/ORM/Query/ResultSetMapping.php at line 248
+

isScalarResult

+public boolean isScalarResult(mixed columnName, string columName) +
+

Checks whether a column with a given name is mapped as a scalar result.

+
Parameters:
+
columName - The name of the column in the SQL result set.
+
Todo:
+
Rename: isScalar
+
+
+ +
+ +
/Doctrine/ORM/Query/ResultSetMapping.php at line 141
+

setDiscriminatorColumn

+public void setDiscriminatorColumn(string alias, string discrColumn) +
+

Sets a discriminator column for an entity result or joined entity result. +The discriminator column will be used to determine the concrete class name to +instantiate.

+
Parameters:
+
alias - The alias of the entity result or joined entity result the discriminator column should be used for.
+
discrColumn - The name of the discriminator column in the SQL result set.
+
Todo:
+
Rename: addDiscriminatorColumn
+
+
+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/orm/query/sqlwalker.html b/lib/api/doctrine/orm/query/sqlwalker.html new file mode 100644 index 000000000..0ee0f549f --- /dev/null +++ b/lib/api/doctrine/orm/query/sqlwalker.html @@ -0,0 +1,919 @@ + + + + + + + + + + + +SqlWalker (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +
Doctrine\ORM\Query\SqlWalker
+
/Doctrine/ORM/Query/SqlWalker.php at line 36
+ +

Class SqlWalker

+ +
SqlWalker
+ +
+ +

public class SqlWalker

+ +

The SqlWalker is a TreeWalker that walks over a DQL AST and constructs +the corresponding SQL.

+ +
+
Author:
+
Roman Borschel
+
Benjamin Eberlei
+
Since:
+
2.0
+
Todo:
+
Rename: SQLWalker
+
+
+ + + + + + +
Constructor Summary

SqlWalker(mixed query, mixed parserResult, mixed queryComponents)

{@inheritDoc}

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Method Summary
Connection

getConnection()

Gets the Connection used by the walker.

EntityManager

getEntityManager()

Gets the EntityManager used by the walker.

AbstractExecutor

getExecutor(mixed AST)

Gets an executor that can be used to execute the result of this walker.

Query.

getQuery()

Gets the Query instance used by the walker.

array

getQueryComponent(string dqlAlias)

Gets the information about a single query component.

string

getSqlColumnAlias(string columnName)

Gets an SQL column alias for a column name.

string

getSqlTableAlias(mixed tableName, string dqlAlias)

Generates a unique, short SQL table alias.

void

setSqlTableAlias(string tableName, string alias)

Forces the SqlWalker to use a specific alias for a table name, rather than +generating an alias on its own.

string

walkAggregateExpression(mixed aggExpression, AggregateExpression )

Walks down an AggregateExpression AST node, thereby generating the appropriate SQL.

string

walkArithmeticExpression(mixed arithmeticExpr, ArithmeticExpression )

Walks down an ArithmeticExpression AST node, thereby generating the appropriate SQL.

string

walkArithmeticFactor(mixed factor, mixed )

Walks down an ArithmeticFactor that represents an AST node, thereby generating the appropriate SQL.

string

walkArithmeticTerm(mixed term, mixed )

Walks down an ArithmeticTerm AST node, thereby generating the appropriate SQL.

string

walkBetweenExpression(mixed betweenExpr, BetweenExpression )

Walks down a BetweenExpression AST node, thereby generating the appropriate SQL.

string

walkCollectionMemberExpression(mixed collMemberExpr, CollectionMemberExpression )

Walks down a CollectionMemberExpression AST node, thereby generating the appropriate SQL.

string

walkComparisonExpression(mixed compExpr, ComparisonExpression )

Walks down a ComparisonExpression AST node, thereby generating the appropriate SQL.

string

walkConditionalFactor(mixed factor, ConditionalFactor )

Walks down a ConditionalFactor AST node, thereby generating the appropriate SQL.

string

walkConditionalTerm(mixed condTerm, ConditionalTerm )

Walks down a ConditionalTerm AST node, thereby generating the appropriate SQL.

string

walkDeleteClause(mixed deleteClause, DeleteClause )

Walks down a DeleteClause AST node, thereby generating the appropriate SQL.

string

walkDeleteStatement(mixed AST, DeleteStatement )

Walks down a DeleteStatement AST node, thereby generating the appropriate SQL.

string

walkEmptyCollectionComparisonExpression(mixed emptyCollCompExpr, EmptyCollectionComparisonExpression )

Walks down an EmptyCollectionComparisonExpression AST node, thereby generating the appropriate SQL.

string

walkExistsExpression(mixed existsExpr, ExistsExpression )

Walks down an ExistsExpression AST node, thereby generating the appropriate SQL.

string

walkFromClause(mixed fromClause)

Walks down a FromClause AST node, thereby generating the appropriate SQL.

string

walkFunction(mixed function)

Walks down a FunctionNode AST node, thereby generating the appropriate SQL.

string

walkGroupByClause(mixed groupByClause, GroupByClause )

Walks down a GroupByClause AST node, thereby generating the appropriate SQL.

string

walkGroupByItem(mixed pathExpr, GroupByItem )

Walks down a GroupByItem AST node, thereby generating the appropriate SQL.

string

walkHavingClause(mixed havingClause, HavingClause )

Walks down a HavingClause AST node, thereby generating the appropriate SQL.

string

walkIdentificationVariable(string identificationVariable, mixed fieldName)

Walks down an IdentificationVariable (no AST node associated), thereby generating the SQL.

string

walkInExpression(mixed inExpr, InExpression )

Walks down an InExpression AST node, thereby generating the appropriate SQL.

void

walkInParameter(mixed inParam)

string

walkInputParameter(mixed inputParam, InputParameter )

Walks down an InputParameter AST node, thereby generating the appropriate SQL.

string

walkJoinVariableDeclaration(JoinVariableDeclaration joinVarDecl)

Walks down a JoinVariableDeclaration AST node and creates the corresponding SQL.

string

walkLikeExpression(mixed likeExpr, LikeExpression )

Walks down a LikeExpression AST node, thereby generating the appropriate SQL.

string

walkLiteral(mixed literal, mixed )

Walks down a literal that represents an AST node, thereby generating the appropriate SQL.

string

walkNullComparisonExpression(mixed nullCompExpr, NullComparisonExpression )

Walks down a NullComparisonExpression AST node, thereby generating the appropriate SQL.

string

walkOrderByClause(mixed orderByClause, OrderByClause )

Walks down an OrderByClause AST node, thereby generating the appropriate SQL.

string

walkOrderByItem(mixed orderByItem, OrderByItem )

Walks down an OrderByItem AST node, thereby generating the appropriate SQL.

string

walkPathExpression(mixed pathExpr, mixed )

Walks down a PathExpression AST node, thereby generating the appropriate SQL.

string

walkQuantifiedExpression(mixed qExpr, QuantifiedExpression )

Walks down a QuantifiedExpression AST node, thereby generating the appropriate SQL.

string

walkSelectClause(mixed selectClause, $selectClause )

Walks down a SelectClause AST node, thereby generating the appropriate SQL.

string

walkSelectExpression(SelectExpression selectExpression)

Walks down a SelectExpression AST node and generates the corresponding SQL.

string

walkSelectStatement(mixed AST)

Walks down a SelectStatement AST node, thereby generating the appropriate SQL.

string

walkSimpleArithmeticExpression(mixed simpleArithmeticExpr, SimpleArithmeticExpression )

Walks down an SimpleArithmeticExpression AST node, thereby generating the appropriate SQL.

string

walkSimpleSelectClause(mixed simpleSelectClause, SimpleSelectClause )

Walks down a SimpleSelectClause AST node, thereby generating the appropriate SQL.

string

walkSimpleSelectExpression(mixed simpleSelectExpression, SimpleSelectExpression )

Walks down a SimpleSelectExpression AST node, thereby generating the appropriate SQL.

string

walkStateFieldPathExpression(mixed stateFieldPathExpression, StateFieldPathExpression )

Walks down a StateFieldPathExpression AST node, thereby generating the appropriate SQL.

string

walkStringPrimary(mixed stringPrimary, mixed )

Walks down a StringPrimary that represents an AST node, thereby generating the appropriate SQL.

string

walkSubselect(mixed subselect, Subselect )

Walks down a Subselect AST node, thereby generating the appropriate SQL.

string

walkSubselectFromClause(mixed subselectFromClause, SubselectFromClause )

Walks down a SubselectFromClause AST node, thereby generating the appropriate SQL.

string

walkUpdateClause(mixed updateClause, UpdateClause )

Walks down an UpdateClause AST node, thereby generating the appropriate SQL.

string

walkUpdateItem(mixed updateItem, UpdateItem )

Walks down an UpdateItem AST node, thereby generating the appropriate SQL.

string

walkUpdateStatement(mixed AST, UpdateStatement )

Walks down an UpdateStatement AST node, thereby generating the appropriate SQL.

string

walkWhereClause(mixed whereClause, WhereClause )

Walks down a WhereClause AST node, thereby generating the appropriate SQL.

+ +

Constructor Detail

+
/Doctrine/ORM/Query/SqlWalker.php at line 102
+

SqlWalker

+public SqlWalker(mixed query, mixed parserResult, mixed queryComponents) +
+

+ +
+ +

Method Detail

+
/Doctrine/ORM/Query/SqlWalker.php at line 128
+

getConnection

+public Connection getConnection() +
+

Gets the Connection used by the walker.

+ +
+ +
/Doctrine/ORM/Query/SqlWalker.php at line 138
+

getEntityManager

+public EntityManager getEntityManager() +
+

Gets the EntityManager used by the walker.

+ +
+ +
/Doctrine/ORM/Query/SqlWalker.php at line 159
+

getExecutor

+public AbstractExecutor getExecutor(mixed AST) +
+

Gets an executor that can be used to execute the result of this walker.

+ +
+ +
/Doctrine/ORM/Query/SqlWalker.php at line 118
+

getQuery

+public Query. getQuery() +
+

Gets the Query instance used by the walker.

+ +
+ +
/Doctrine/ORM/Query/SqlWalker.php at line 149
+

getQueryComponent

+public array getQueryComponent(string dqlAlias) +
+

Gets the information about a single query component.

+
Parameters:
+
dqlAlias - The DQL alias.
+
+
+ +
+ +
/Doctrine/ORM/Query/SqlWalker.php at line 226
+

getSqlColumnAlias

+public string getSqlColumnAlias(string columnName) +
+

Gets an SQL column alias for a column name.

+ +
+ +
/Doctrine/ORM/Query/SqlWalker.php at line 195
+

getSqlTableAlias

+public string getSqlTableAlias(mixed tableName, string dqlAlias) +
+

Generates a unique, short SQL table alias.

+
Parameters:
+
dqlAlias - The DQL alias.
+
Returns:
+
Generated table alias.
+
+
+ +
+ +
/Doctrine/ORM/Query/SqlWalker.php at line 213
+

setSqlTableAlias

+public void setSqlTableAlias(string tableName, string alias) +
+

Forces the SqlWalker to use a specific alias for a table name, rather than +generating an alias on its own.

+ +
+ +
/Doctrine/ORM/Query/SqlWalker.php at line 1091
+

walkAggregateExpression

+public string walkAggregateExpression(mixed aggExpression, AggregateExpression ) +
+

Walks down an AggregateExpression AST node, thereby generating the appropriate SQL.

+
Returns:
+
The SQL.
+
+
+ +
+ +
/Doctrine/ORM/Query/SqlWalker.php at line 1597
+

walkArithmeticExpression

+public string walkArithmeticExpression(mixed arithmeticExpr, ArithmeticExpression ) +
+

Walks down an ArithmeticExpression AST node, thereby generating the appropriate SQL.

+
Returns:
+
The SQL.
+
+
+ +
+ +
/Doctrine/ORM/Query/SqlWalker.php at line 1638
+

walkArithmeticFactor

+public string walkArithmeticFactor(mixed factor, mixed ) +
+

Walks down an ArithmeticFactor that represents an AST node, thereby generating the appropriate SQL.

+
Returns:
+
The SQL.
+
+
+ +
+ +
/Doctrine/ORM/Query/SqlWalker.php at line 1610
+

walkArithmeticTerm

+public string walkArithmeticTerm(mixed term, mixed ) +
+

Walks down an ArithmeticTerm AST node, thereby generating the appropriate SQL.

+
Returns:
+
The SQL.
+
+
+ +
+ +
/Doctrine/ORM/Query/SqlWalker.php at line 1499
+

walkBetweenExpression

+public string walkBetweenExpression(mixed betweenExpr, BetweenExpression ) +
+

Walks down a BetweenExpression AST node, thereby generating the appropriate SQL.

+
Returns:
+
The SQL.
+
+
+ +
+ +
/Doctrine/ORM/Query/SqlWalker.php at line 1288
+

walkCollectionMemberExpression

+public string walkCollectionMemberExpression(mixed collMemberExpr, CollectionMemberExpression ) +
+

Walks down a CollectionMemberExpression AST node, thereby generating the appropriate SQL.

+
Returns:
+
The SQL.
+
+
+ +
+ +
/Doctrine/ORM/Query/SqlWalker.php at line 1555
+

walkComparisonExpression

+public string walkComparisonExpression(mixed compExpr, ComparisonExpression ) +
+

Walks down a ComparisonExpression AST node, thereby generating the appropriate SQL.

+
Returns:
+
The SQL.
+
+
+ +
+ +
/Doctrine/ORM/Query/SqlWalker.php at line 1248
+

walkConditionalFactor

+public string walkConditionalFactor(mixed factor, ConditionalFactor ) +
+

Walks down a ConditionalFactor AST node, thereby generating the appropriate SQL.

+
Returns:
+
The SQL.
+
+
+ +
+ +
/Doctrine/ORM/Query/SqlWalker.php at line 1235
+

walkConditionalTerm

+public string walkConditionalTerm(mixed condTerm, ConditionalTerm ) +
+

Walks down a ConditionalTerm AST node, thereby generating the appropriate SQL.

+
Returns:
+
The SQL.
+
+
+ +
+ +
/Doctrine/ORM/Query/SqlWalker.php at line 1127
+

walkDeleteClause

+public string walkDeleteClause(mixed deleteClause, DeleteClause ) +
+

Walks down a DeleteClause AST node, thereby generating the appropriate SQL.

+
Returns:
+
The SQL.
+
+
+ +
+ +
/Doctrine/ORM/Query/SqlWalker.php at line 403
+

walkDeleteStatement

+public string walkDeleteStatement(mixed AST, DeleteStatement ) +
+

Walks down a DeleteStatement AST node, thereby generating the appropriate SQL.

+
Returns:
+
The SQL.
+
+
+ +
+ +
/Doctrine/ORM/Query/SqlWalker.php at line 1410
+

walkEmptyCollectionComparisonExpression

+public string walkEmptyCollectionComparisonExpression(mixed emptyCollCompExpr, EmptyCollectionComparisonExpression ) +
+

Walks down an EmptyCollectionComparisonExpression AST node, thereby generating the appropriate SQL.

+
Returns:
+
The SQL.
+
+
+ +
+ +
/Doctrine/ORM/Query/SqlWalker.php at line 1273
+

walkExistsExpression

+public string walkExistsExpression(mixed existsExpr, ExistsExpression ) +
+

Walks down an ExistsExpression AST node, thereby generating the appropriate SQL.

+
Returns:
+
The SQL.
+
+
+ +
+ +
/Doctrine/ORM/Query/SqlWalker.php at line 583
+

walkFromClause

+public string walkFromClause(mixed fromClause) +
+

Walks down a FromClause AST node, thereby generating the appropriate SQL.

+
Returns:
+
The SQL.
+
+
+ +
+ +
/Doctrine/ORM/Query/SqlWalker.php at line 613
+

walkFunction

+public string walkFunction(mixed function) +
+

Walks down a FunctionNode AST node, thereby generating the appropriate SQL.

+
Returns:
+
The SQL.
+
+
+ +
+ +
/Doctrine/ORM/Query/SqlWalker.php at line 1103
+

walkGroupByClause

+public string walkGroupByClause(mixed groupByClause, GroupByClause ) +
+

Walks down a GroupByClause AST node, thereby generating the appropriate SQL.

+
Returns:
+
The SQL.
+
+
+ +
+ +
/Doctrine/ORM/Query/SqlWalker.php at line 1116
+

walkGroupByItem

+public string walkGroupByItem(mixed pathExpr, GroupByItem ) +
+

Walks down a GroupByItem AST node, thereby generating the appropriate SQL.

+
Returns:
+
The SQL.
+
+
+ +
+ +
/Doctrine/ORM/Query/SqlWalker.php at line 665
+

walkHavingClause

+public string walkHavingClause(mixed havingClause, HavingClause ) +
+

Walks down a HavingClause AST node, thereby generating the appropriate SQL.

+
Returns:
+
The SQL.
+
+
+ +
+ +
/Doctrine/ORM/Query/SqlWalker.php at line 424
+

walkIdentificationVariable

+public string walkIdentificationVariable(string identificationVariable, mixed fieldName) +
+

Walks down an IdentificationVariable (no AST node associated), thereby generating the SQL.

+
Returns:
+
The SQL.
+
+
+ +
+ +
/Doctrine/ORM/Query/SqlWalker.php at line 1448
+

walkInExpression

+public string walkInExpression(mixed inExpr, InExpression ) +
+

Walks down an InExpression AST node, thereby generating the appropriate SQL.

+
Returns:
+
The SQL.
+
+
+ +
+ +
/Doctrine/ORM/Query/SqlWalker.php at line 1464
+

walkInParameter

+public void walkInParameter(mixed inParam) +
+
+ +
+ +
/Doctrine/ORM/Query/SqlWalker.php at line 1584
+

walkInputParameter

+public string walkInputParameter(mixed inputParam, InputParameter ) +
+

Walks down an InputParameter AST node, thereby generating the appropriate SQL.

+
Returns:
+
The SQL.
+
+
+ +
+ +
/Doctrine/ORM/Query/SqlWalker.php at line 678
+

walkJoinVariableDeclaration

+public string walkJoinVariableDeclaration(JoinVariableDeclaration joinVarDecl) +
+

Walks down a JoinVariableDeclaration AST node and creates the corresponding SQL.

+
Returns:
+
The SQL.
+
+
+ +
+ +
/Doctrine/ORM/Query/SqlWalker.php at line 1517
+

walkLikeExpression

+public string walkLikeExpression(mixed likeExpr, LikeExpression ) +
+

Walks down a LikeExpression AST node, thereby generating the appropriate SQL.

+
Returns:
+
The SQL.
+
+
+ +
+ +
/Doctrine/ORM/Query/SqlWalker.php at line 1477
+

walkLiteral

+public string walkLiteral(mixed literal, mixed ) +
+

Walks down a literal that represents an AST node, thereby generating the appropriate SQL.

+
Returns:
+
The SQL.
+
+
+ +
+ +
/Doctrine/ORM/Query/SqlWalker.php at line 1424
+

walkNullComparisonExpression

+public string walkNullComparisonExpression(mixed nullCompExpr, NullComparisonExpression ) +
+

Walks down a NullComparisonExpression AST node, thereby generating the appropriate SQL.

+
Returns:
+
The SQL.
+
+
+ +
+ +
/Doctrine/ORM/Query/SqlWalker.php at line 624
+

walkOrderByClause

+public string walkOrderByClause(mixed orderByClause, OrderByClause ) +
+

Walks down an OrderByClause AST node, thereby generating the appropriate SQL.

+
Returns:
+
The SQL.
+
+
+ +
+ +
/Doctrine/ORM/Query/SqlWalker.php at line 643
+

walkOrderByItem

+public string walkOrderByItem(mixed orderByItem, OrderByItem ) +
+

Walks down an OrderByItem AST node, thereby generating the appropriate SQL.

+
Returns:
+
The SQL.
+
+
+ +
+ +
/Doctrine/ORM/Query/SqlWalker.php at line 444
+

walkPathExpression

+public string walkPathExpression(mixed pathExpr, mixed ) +
+

Walks down a PathExpression AST node, thereby generating the appropriate SQL.

+
Returns:
+
The SQL.
+
+
+ +
+ +
/Doctrine/ORM/Query/SqlWalker.php at line 983
+

walkQuantifiedExpression

+public string walkQuantifiedExpression(mixed qExpr, QuantifiedExpression ) +
+

Walks down a QuantifiedExpression AST node, thereby generating the appropriate SQL.

+
Returns:
+
The SQL.
+
+
+ +
+ +
/Doctrine/ORM/Query/SqlWalker.php at line 500
+

walkSelectClause

+public string walkSelectClause(mixed selectClause, $selectClause ) +
+

Walks down a SelectClause AST node, thereby generating the appropriate SQL.

+
Returns:
+
The SQL.
+
+
+ +
+ +
/Doctrine/ORM/Query/SqlWalker.php at line 803
+

walkSelectExpression

+public string walkSelectExpression(SelectExpression selectExpression) +
+

Walks down a SelectExpression AST node and generates the corresponding SQL.

+
Returns:
+
The SQL.
+
+
+ +
+ +
/Doctrine/ORM/Query/SqlWalker.php at line 349
+

walkSelectStatement

+public string walkSelectStatement(mixed AST) +
+

Walks down a SelectStatement AST node, thereby generating the appropriate SQL.

+
Returns:
+
The SQL.
+
+
+ +
+ +
/Doctrine/ORM/Query/SqlWalker.php at line 1662
+

walkSimpleArithmeticExpression

+public string walkSimpleArithmeticExpression(mixed simpleArithmeticExpr, SimpleArithmeticExpression ) +
+

Walks down an SimpleArithmeticExpression AST node, thereby generating the appropriate SQL.

+
Returns:
+
The SQL.
+
+
+ +
+ +
/Doctrine/ORM/Query/SqlWalker.php at line 1046
+

walkSimpleSelectClause

+public string walkSimpleSelectClause(mixed simpleSelectClause, SimpleSelectClause ) +
+

Walks down a SimpleSelectClause AST node, thereby generating the appropriate SQL.

+
Returns:
+
The SQL.
+
+
+ +
+ +
/Doctrine/ORM/Query/SqlWalker.php at line 1058
+

walkSimpleSelectExpression

+public string walkSimpleSelectExpression(mixed simpleSelectExpression, SimpleSelectExpression ) +
+

Walks down a SimpleSelectExpression AST node, thereby generating the appropriate SQL.

+
Returns:
+
The SQL.
+
+
+ +
+ +
/Doctrine/ORM/Query/SqlWalker.php at line 1544
+

walkStateFieldPathExpression

+public string walkStateFieldPathExpression(mixed stateFieldPathExpression, StateFieldPathExpression ) +
+

Walks down a StateFieldPathExpression AST node, thereby generating the appropriate SQL.

+
Returns:
+
The SQL.
+
+
+ +
+ +
/Doctrine/ORM/Query/SqlWalker.php at line 1625
+

walkStringPrimary

+public string walkStringPrimary(mixed stringPrimary, mixed ) +
+

Walks down a StringPrimary that represents an AST node, thereby generating the appropriate SQL.

+
Returns:
+
The SQL.
+
+
+ +
+ +
/Doctrine/ORM/Query/SqlWalker.php at line 995
+

walkSubselect

+public string walkSubselect(mixed subselect, Subselect ) +
+

Walks down a Subselect AST node, thereby generating the appropriate SQL.

+
Returns:
+
The SQL.
+
+
+ +
+ +
/Doctrine/ORM/Query/SqlWalker.php at line 1018
+

walkSubselectFromClause

+public string walkSubselectFromClause(mixed subselectFromClause, SubselectFromClause ) +
+

Walks down a SubselectFromClause AST node, thereby generating the appropriate SQL.

+
Returns:
+
The SQL.
+
+
+ +
+ +
/Doctrine/ORM/Query/SqlWalker.php at line 1148
+

walkUpdateClause

+public string walkUpdateClause(mixed updateClause, UpdateClause ) +
+

Walks down an UpdateClause AST node, thereby generating the appropriate SQL.

+
Returns:
+
The SQL.
+
+
+ +
+ +
/Doctrine/ORM/Query/SqlWalker.php at line 1173
+

walkUpdateItem

+public string walkUpdateItem(mixed updateItem, UpdateItem ) +
+

Walks down an UpdateItem AST node, thereby generating the appropriate SQL.

+
Returns:
+
The SQL.
+
+
+ +
+ +
/Doctrine/ORM/Query/SqlWalker.php at line 383
+

walkUpdateStatement

+public string walkUpdateStatement(mixed AST, UpdateStatement ) +
+

Walks down an UpdateStatement AST node, thereby generating the appropriate SQL.

+
Returns:
+
The SQL.
+
+
+ +
+ +
/Doctrine/ORM/Query/SqlWalker.php at line 1211
+

walkWhereClause

+public string walkWhereClause(mixed whereClause, WhereClause ) +
+

Walks down a WhereClause AST node, thereby generating the appropriate SQL.

+
Returns:
+
The SQL.
+
+
+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/orm/query/treewalker.html b/lib/api/doctrine/orm/query/treewalker.html new file mode 100644 index 000000000..fa4621ea1 --- /dev/null +++ b/lib/api/doctrine/orm/query/treewalker.html @@ -0,0 +1,797 @@ + + + + + + + + + + + +TreeWalker (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +
Doctrine\ORM\Query\TreeWalker
+
/Doctrine/ORM/Query/TreeWalker.php at line 30
+ +

Interface TreeWalker

+ +
TreeWalker
+ +
+ +

public interface TreeWalker

+ +

Interface for walkers of DQL ASTs (abstract syntax trees).

+ +
+
Author:
+
Roman Borschel
+
Since:
+
2.0
+
+
+ + + + + + +
Constructor Summary

TreeWalker(Query query, ParserResult parserResult, array queryComponents)

Initializes TreeWalker with important information about the ASTs to be walked

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Method Summary
AbstractExecutor

getExecutor(mixed AST)

Gets an executor that can be used to execute the result of this walker.

string

walkAggregateExpression(mixed aggExpression, AggregateExpression )

Walks down an AggregateExpression AST node, thereby generating the appropriate SQL.

string

walkArithmeticExpression(mixed arithmeticExpr, ArithmeticExpression )

Walks down an ArithmeticExpression AST node, thereby generating the appropriate SQL.

string

walkArithmeticFactor(mixed factor, mixed )

Walks down an ArithmeticFactor that represents an AST node, thereby generating the appropriate SQL.

string

walkArithmeticTerm(mixed term, mixed )

Walks down an ArithmeticTerm AST node, thereby generating the appropriate SQL.

string

walkBetweenExpression(mixed betweenExpr, BetweenExpression )

Walks down a BetweenExpression AST node, thereby generating the appropriate SQL.

string

walkCollectionMemberExpression(mixed collMemberExpr, CollectionMemberExpression )

Walks down a CollectionMemberExpression AST node, thereby generating the appropriate SQL.

string

walkComparisonExpression(mixed compExpr, ComparisonExpression )

Walks down a ComparisonExpression AST node, thereby generating the appropriate SQL.

string

walkConditionalFactor(mixed factor, ConditionalFactor )

Walks down a ConditionalFactor AST node, thereby generating the appropriate SQL.

string

walkConditionalTerm(mixed condTerm, ConditionalTerm )

Walks down a ConditionalTerm AST node, thereby generating the appropriate SQL.

string

walkDeleteClause(mixed deleteClause, DeleteClause )

Walks down a DeleteClause AST node, thereby generating the appropriate SQL.

string

walkDeleteStatement(mixed AST, DeleteStatement )

Walks down a DeleteStatement AST node, thereby generating the appropriate SQL.

string

walkEmptyCollectionComparisonExpression(mixed emptyCollCompExpr, EmptyCollectionComparisonExpression )

Walks down an EmptyCollectionComparisonExpression AST node, thereby generating the appropriate SQL.

string

walkExistsExpression(mixed existsExpr, ExistsExpression )

Walks down an ExistsExpression AST node, thereby generating the appropriate SQL.

string

walkFromClause(mixed fromClause)

Walks down a FromClause AST node, thereby generating the appropriate SQL.

string

walkFunction(mixed function)

Walks down a FunctionNode AST node, thereby generating the appropriate SQL.

string

walkGroupByClause(mixed groupByClause, GroupByClause )

Walks down a GroupByClause AST node, thereby generating the appropriate SQL.

string

walkGroupByItem(mixed pathExpr, GroupByItem )

Walks down a GroupByItem AST node, thereby generating the appropriate SQL.

string

walkHavingClause(mixed havingClause, HavingClause )

Walks down a HavingClause AST node, thereby generating the appropriate SQL.

string

walkInExpression(mixed inExpr, InExpression )

Walks down an InExpression AST node, thereby generating the appropriate SQL.

string

walkInputParameter(mixed inputParam, InputParameter )

Walks down an InputParameter AST node, thereby generating the appropriate SQL.

string

walkJoinVariableDeclaration(JoinVariableDeclaration joinVarDecl)

Walks down a JoinVariableDeclaration AST node and creates the corresponding SQL.

string

walkLikeExpression(mixed likeExpr, LikeExpression )

Walks down a LikeExpression AST node, thereby generating the appropriate SQL.

string

walkLiteral(mixed literal, mixed )

Walks down a literal that represents an AST node, thereby generating the appropriate SQL.

string

walkNullComparisonExpression(mixed nullCompExpr, NullComparisonExpression )

Walks down a NullComparisonExpression AST node, thereby generating the appropriate SQL.

string

walkOrderByClause(mixed orderByClause, OrderByClause )

Walks down an OrderByClause AST node, thereby generating the appropriate SQL.

string

walkOrderByItem(mixed orderByItem, OrderByItem )

Walks down an OrderByItem AST node, thereby generating the appropriate SQL.

string

walkPathExpression(mixed pathExpr, mixed )

Walks down an PathExpression AST node, thereby generating the appropriate SQL.

string

walkQuantifiedExpression(mixed qExpr, QuantifiedExpression )

Walks down a QuantifiedExpression AST node, thereby generating the appropriate SQL.

string

walkSelectClause(mixed selectClause)

Walks down a SelectClause AST node, thereby generating the appropriate SQL.

string

walkSelectExpression(SelectExpression selectExpression)

Walks down a SelectExpression AST node and generates the corresponding SQL.

string

walkSelectStatement(mixed AST)

Walks down a SelectStatement AST node, thereby generating the appropriate SQL.

string

walkSimpleArithmeticExpression(mixed simpleArithmeticExpr, SimpleArithmeticExpression )

Walks down an SimpleArithmeticExpression AST node, thereby generating the appropriate SQL.

string

walkSimpleSelectClause(mixed simpleSelectClause, SimpleSelectClause )

Walks down a SimpleSelectClause AST node, thereby generating the appropriate SQL.

string

walkSimpleSelectExpression(mixed simpleSelectExpression, SimpleSelectExpression )

Walks down a SimpleSelectExpression AST node, thereby generating the appropriate SQL.

string

walkStateFieldPathExpression(mixed stateFieldPathExpression, StateFieldPathExpression )

Walks down a StateFieldPathExpression AST node, thereby generating the appropriate SQL.

string

walkStringPrimary(mixed stringPrimary, mixed )

Walks down a StringPrimary that represents an AST node, thereby generating the appropriate SQL.

string

walkSubselect(mixed subselect, Subselect )

Walks down a Subselect AST node, thereby generating the appropriate SQL.

string

walkSubselectFromClause(mixed subselectFromClause, SubselectFromClause )

Walks down a SubselectFromClause AST node, thereby generating the appropriate SQL.

string

walkUpdateClause(mixed updateClause, UpdateClause )

Walks down an UpdateClause AST node, thereby generating the appropriate SQL.

string

walkUpdateItem(mixed updateItem, UpdateItem )

Walks down an UpdateItem AST node, thereby generating the appropriate SQL.

string

walkUpdateStatement(mixed AST, UpdateStatement )

Walks down an UpdateStatement AST node, thereby generating the appropriate SQL.

string

walkWhereClause(mixed whereClause, WhereClause )

Walks down a WhereClause AST node, thereby generating the appropriate SQL.

+ +

Constructor Detail

+
/Doctrine/ORM/Query/TreeWalker.php at line 39
+

TreeWalker

+public TreeWalker(Query query, ParserResult parserResult, array queryComponents) +
+

Initializes TreeWalker with important information about the ASTs to be walked

+
Parameters:
+
query - The parsed Query.
+
parserResult - The result of the parsing process.
+
queryComponents - Query components (symbol table)
+
+
+ +
+ +

Method Detail

+
/Doctrine/ORM/Query/TreeWalker.php at line 378
+

getExecutor

+public AbstractExecutor getExecutor(mixed AST) +
+

Gets an executor that can be used to execute the result of this walker.

+ +
+ +
/Doctrine/ORM/Query/TreeWalker.php at line 155
+

walkAggregateExpression

+public string walkAggregateExpression(mixed aggExpression, AggregateExpression ) +
+

Walks down an AggregateExpression AST node, thereby generating the appropriate SQL.

+
Returns:
+
The SQL.
+
+
+ +
+ +
/Doctrine/ORM/Query/TreeWalker.php at line 331
+

walkArithmeticExpression

+public string walkArithmeticExpression(mixed arithmeticExpr, ArithmeticExpression ) +
+

Walks down an ArithmeticExpression AST node, thereby generating the appropriate SQL.

+
Returns:
+
The SQL.
+
+
+ +
+ +
/Doctrine/ORM/Query/TreeWalker.php at line 355
+

walkArithmeticFactor

+public string walkArithmeticFactor(mixed factor, mixed ) +
+

Walks down an ArithmeticFactor that represents an AST node, thereby generating the appropriate SQL.

+
Returns:
+
The SQL.
+
+
+ +
+ +
/Doctrine/ORM/Query/TreeWalker.php at line 339
+

walkArithmeticTerm

+public string walkArithmeticTerm(mixed term, mixed ) +
+

Walks down an ArithmeticTerm AST node, thereby generating the appropriate SQL.

+
Returns:
+
The SQL.
+
+
+ +
+ +
/Doctrine/ORM/Query/TreeWalker.php at line 291
+

walkBetweenExpression

+public string walkBetweenExpression(mixed betweenExpr, BetweenExpression ) +
+

Walks down a BetweenExpression AST node, thereby generating the appropriate SQL.

+
Returns:
+
The SQL.
+
+
+ +
+ +
/Doctrine/ORM/Query/TreeWalker.php at line 251
+

walkCollectionMemberExpression

+public string walkCollectionMemberExpression(mixed collMemberExpr, CollectionMemberExpression ) +
+

Walks down a CollectionMemberExpression AST node, thereby generating the appropriate SQL.

+
Returns:
+
The SQL.
+
+
+ +
+ +
/Doctrine/ORM/Query/TreeWalker.php at line 315
+

walkComparisonExpression

+public string walkComparisonExpression(mixed compExpr, ComparisonExpression ) +
+

Walks down a ComparisonExpression AST node, thereby generating the appropriate SQL.

+
Returns:
+
The SQL.
+
+
+ +
+ +
/Doctrine/ORM/Query/TreeWalker.php at line 235
+

walkConditionalFactor

+public string walkConditionalFactor(mixed factor, ConditionalFactor ) +
+

Walks down a ConditionalFactor AST node, thereby generating the appropriate SQL.

+
Returns:
+
The SQL.
+
+
+ +
+ +
/Doctrine/ORM/Query/TreeWalker.php at line 227
+

walkConditionalTerm

+public string walkConditionalTerm(mixed condTerm, ConditionalTerm ) +
+

Walks down a ConditionalTerm AST node, thereby generating the appropriate SQL.

+
Returns:
+
The SQL.
+
+
+ +
+ +
/Doctrine/ORM/Query/TreeWalker.php at line 195
+

walkDeleteClause

+public string walkDeleteClause(mixed deleteClause, DeleteClause ) +
+

Walks down a DeleteClause AST node, thereby generating the appropriate SQL.

+
Returns:
+
The SQL.
+
+
+ +
+ +
/Doctrine/ORM/Query/TreeWalker.php at line 187
+

walkDeleteStatement

+public string walkDeleteStatement(mixed AST, DeleteStatement ) +
+

Walks down a DeleteStatement AST node, thereby generating the appropriate SQL.

+
Returns:
+
The SQL.
+
+
+ +
+ +
/Doctrine/ORM/Query/TreeWalker.php at line 259
+

walkEmptyCollectionComparisonExpression

+public string walkEmptyCollectionComparisonExpression(mixed emptyCollCompExpr, EmptyCollectionComparisonExpression ) +
+

Walks down an EmptyCollectionComparisonExpression AST node, thereby generating the appropriate SQL.

+
Returns:
+
The SQL.
+
+
+ +
+ +
/Doctrine/ORM/Query/TreeWalker.php at line 243
+

walkExistsExpression

+public string walkExistsExpression(mixed existsExpr, ExistsExpression ) +
+

Walks down an ExistsExpression AST node, thereby generating the appropriate SQL.

+
Returns:
+
The SQL.
+
+
+ +
+ +
/Doctrine/ORM/Query/TreeWalker.php at line 60
+

walkFromClause

+public string walkFromClause(mixed fromClause) +
+

Walks down a FromClause AST node, thereby generating the appropriate SQL.

+
Returns:
+
The SQL.
+
+
+ +
+ +
/Doctrine/ORM/Query/TreeWalker.php at line 67
+

walkFunction

+public string walkFunction(mixed function) +
+

Walks down a FunctionNode AST node, thereby generating the appropriate SQL.

+
Returns:
+
The SQL.
+
+
+ +
+ +
/Doctrine/ORM/Query/TreeWalker.php at line 163
+

walkGroupByClause

+public string walkGroupByClause(mixed groupByClause, GroupByClause ) +
+

Walks down a GroupByClause AST node, thereby generating the appropriate SQL.

+
Returns:
+
The SQL.
+
+
+ +
+ +
/Doctrine/ORM/Query/TreeWalker.php at line 171
+

walkGroupByItem

+public string walkGroupByItem(mixed pathExpr, GroupByItem ) +
+

Walks down a GroupByItem AST node, thereby generating the appropriate SQL.

+
Returns:
+
The SQL.
+
+
+ +
+ +
/Doctrine/ORM/Query/TreeWalker.php at line 91
+

walkHavingClause

+public string walkHavingClause(mixed havingClause, HavingClause ) +
+

Walks down a HavingClause AST node, thereby generating the appropriate SQL.

+
Returns:
+
The SQL.
+
+
+ +
+ +
/Doctrine/ORM/Query/TreeWalker.php at line 275
+

walkInExpression

+public string walkInExpression(mixed inExpr, InExpression ) +
+

Walks down an InExpression AST node, thereby generating the appropriate SQL.

+
Returns:
+
The SQL.
+
+
+ +
+ +
/Doctrine/ORM/Query/TreeWalker.php at line 323
+

walkInputParameter

+public string walkInputParameter(mixed inputParam, InputParameter ) +
+

Walks down an InputParameter AST node, thereby generating the appropriate SQL.

+
Returns:
+
The SQL.
+
+
+ +
+ +
/Doctrine/ORM/Query/TreeWalker.php at line 99
+

walkJoinVariableDeclaration

+public string walkJoinVariableDeclaration(JoinVariableDeclaration joinVarDecl) +
+

Walks down a JoinVariableDeclaration AST node and creates the corresponding SQL.

+
Returns:
+
The SQL.
+
+
+ +
+ +
/Doctrine/ORM/Query/TreeWalker.php at line 299
+

walkLikeExpression

+public string walkLikeExpression(mixed likeExpr, LikeExpression ) +
+

Walks down a LikeExpression AST node, thereby generating the appropriate SQL.

+
Returns:
+
The SQL.
+
+
+ +
+ +
/Doctrine/ORM/Query/TreeWalker.php at line 283
+

walkLiteral

+public string walkLiteral(mixed literal, mixed ) +
+

Walks down a literal that represents an AST node, thereby generating the appropriate SQL.

+
Returns:
+
The SQL.
+
+
+ +
+ +
/Doctrine/ORM/Query/TreeWalker.php at line 267
+

walkNullComparisonExpression

+public string walkNullComparisonExpression(mixed nullCompExpr, NullComparisonExpression ) +
+

Walks down a NullComparisonExpression AST node, thereby generating the appropriate SQL.

+
Returns:
+
The SQL.
+
+
+ +
+ +
/Doctrine/ORM/Query/TreeWalker.php at line 75
+

walkOrderByClause

+public string walkOrderByClause(mixed orderByClause, OrderByClause ) +
+

Walks down an OrderByClause AST node, thereby generating the appropriate SQL.

+
Returns:
+
The SQL.
+
+
+ +
+ +
/Doctrine/ORM/Query/TreeWalker.php at line 83
+

walkOrderByItem

+public string walkOrderByItem(mixed orderByItem, OrderByItem ) +
+

Walks down an OrderByItem AST node, thereby generating the appropriate SQL.

+
Returns:
+
The SQL.
+
+
+ +
+ +
/Doctrine/ORM/Query/TreeWalker.php at line 371
+

walkPathExpression

+public string walkPathExpression(mixed pathExpr, mixed ) +
+

Walks down an PathExpression AST node, thereby generating the appropriate SQL.

+
Returns:
+
The SQL.
+
+
+ +
+ +
/Doctrine/ORM/Query/TreeWalker.php at line 115
+

walkQuantifiedExpression

+public string walkQuantifiedExpression(mixed qExpr, QuantifiedExpression ) +
+

Walks down a QuantifiedExpression AST node, thereby generating the appropriate SQL.

+
Returns:
+
The SQL.
+
+
+ +
+ +
/Doctrine/ORM/Query/TreeWalker.php at line 53
+

walkSelectClause

+public string walkSelectClause(mixed selectClause) +
+

Walks down a SelectClause AST node, thereby generating the appropriate SQL.

+
Returns:
+
The SQL.
+
+
+ +
+ +
/Doctrine/ORM/Query/TreeWalker.php at line 107
+

walkSelectExpression

+public string walkSelectExpression(SelectExpression selectExpression) +
+

Walks down a SelectExpression AST node and generates the corresponding SQL.

+
Returns:
+
The SQL.
+
+
+ +
+ +
/Doctrine/ORM/Query/TreeWalker.php at line 46
+

walkSelectStatement

+public string walkSelectStatement(mixed AST) +
+

Walks down a SelectStatement AST node, thereby generating the appropriate SQL.

+
Returns:
+
The SQL.
+
+
+ +
+ +
/Doctrine/ORM/Query/TreeWalker.php at line 363
+

walkSimpleArithmeticExpression

+public string walkSimpleArithmeticExpression(mixed simpleArithmeticExpr, SimpleArithmeticExpression ) +
+

Walks down an SimpleArithmeticExpression AST node, thereby generating the appropriate SQL.

+
Returns:
+
The SQL.
+
+
+ +
+ +
/Doctrine/ORM/Query/TreeWalker.php at line 139
+

walkSimpleSelectClause

+public string walkSimpleSelectClause(mixed simpleSelectClause, SimpleSelectClause ) +
+

Walks down a SimpleSelectClause AST node, thereby generating the appropriate SQL.

+
Returns:
+
The SQL.
+
+
+ +
+ +
/Doctrine/ORM/Query/TreeWalker.php at line 147
+

walkSimpleSelectExpression

+public string walkSimpleSelectExpression(mixed simpleSelectExpression, SimpleSelectExpression ) +
+

Walks down a SimpleSelectExpression AST node, thereby generating the appropriate SQL.

+
Returns:
+
The SQL.
+
+
+ +
+ +
/Doctrine/ORM/Query/TreeWalker.php at line 307
+

walkStateFieldPathExpression

+public string walkStateFieldPathExpression(mixed stateFieldPathExpression, StateFieldPathExpression ) +
+

Walks down a StateFieldPathExpression AST node, thereby generating the appropriate SQL.

+
Returns:
+
The SQL.
+
+
+ +
+ +
/Doctrine/ORM/Query/TreeWalker.php at line 347
+

walkStringPrimary

+public string walkStringPrimary(mixed stringPrimary, mixed ) +
+

Walks down a StringPrimary that represents an AST node, thereby generating the appropriate SQL.

+
Returns:
+
The SQL.
+
+
+ +
+ +
/Doctrine/ORM/Query/TreeWalker.php at line 123
+

walkSubselect

+public string walkSubselect(mixed subselect, Subselect ) +
+

Walks down a Subselect AST node, thereby generating the appropriate SQL.

+
Returns:
+
The SQL.
+
+
+ +
+ +
/Doctrine/ORM/Query/TreeWalker.php at line 131
+

walkSubselectFromClause

+public string walkSubselectFromClause(mixed subselectFromClause, SubselectFromClause ) +
+

Walks down a SubselectFromClause AST node, thereby generating the appropriate SQL.

+
Returns:
+
The SQL.
+
+
+ +
+ +
/Doctrine/ORM/Query/TreeWalker.php at line 203
+

walkUpdateClause

+public string walkUpdateClause(mixed updateClause, UpdateClause ) +
+

Walks down an UpdateClause AST node, thereby generating the appropriate SQL.

+
Returns:
+
The SQL.
+
+
+ +
+ +
/Doctrine/ORM/Query/TreeWalker.php at line 211
+

walkUpdateItem

+public string walkUpdateItem(mixed updateItem, UpdateItem ) +
+

Walks down an UpdateItem AST node, thereby generating the appropriate SQL.

+
Returns:
+
The SQL.
+
+
+ +
+ +
/Doctrine/ORM/Query/TreeWalker.php at line 179
+

walkUpdateStatement

+public string walkUpdateStatement(mixed AST, UpdateStatement ) +
+

Walks down an UpdateStatement AST node, thereby generating the appropriate SQL.

+
Returns:
+
The SQL.
+
+
+ +
+ +
/Doctrine/ORM/Query/TreeWalker.php at line 219
+

walkWhereClause

+public string walkWhereClause(mixed whereClause, WhereClause ) +
+

Walks down a WhereClause AST node, thereby generating the appropriate SQL.

+
Returns:
+
The SQL.
+
+
+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/orm/query/treewalkeradapter.html b/lib/api/doctrine/orm/query/treewalkeradapter.html new file mode 100644 index 000000000..97948963e --- /dev/null +++ b/lib/api/doctrine/orm/query/treewalkeradapter.html @@ -0,0 +1,797 @@ + + + + + + + + + + + +TreeWalkerAdapter (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +
Doctrine\ORM\Query\TreeWalkerAdapter
+
/Doctrine/ORM/Query/TreeWalkerAdapter.php at line 31
+ +

Class TreeWalkerAdapter

+ +
TreeWalkerAdapter
+ +
+
All Implemented Interfaces:
+
TreeWalker +
+ +
+ +

public abstract class TreeWalkerAdapter

+ +

An adapter implementation of the TreeWalker interface. The methods in this class +are empty. This class exists as convenience for creating tree walkers.

+ +
+
Author:
+
Roman Borschel
+
Since:
+
2.0
+
+
+ + + + + + +
Constructor Summary

TreeWalkerAdapter(mixed query, mixed parserResult, mixed queryComponents)

{@inheritdoc}

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Method Summary
AbstractExecutor

getExecutor(mixed AST)

Gets an executor that can be used to execute the result of this walker.

string

walkAggregateExpression(mixed aggExpression, AggregateExpression )

Walks down an AggregateExpression AST node, thereby generating the appropriate SQL.

string

walkArithmeticExpression(mixed arithmeticExpr, ArithmeticExpression )

Walks down an ArithmeticExpression AST node, thereby generating the appropriate SQL.

string

walkArithmeticFactor(mixed factor, mixed )

Walks down an ArithmeticFactor that represents an AST node, thereby generating the appropriate SQL.

string

walkArithmeticTerm(mixed term, mixed )

Walks down an ArithmeticTerm AST node, thereby generating the appropriate SQL.

string

walkBetweenExpression(mixed betweenExpr, BetweenExpression )

Walks down a BetweenExpression AST node, thereby generating the appropriate SQL.

string

walkCollectionMemberExpression(mixed collMemberExpr, CollectionMemberExpression )

Walks down a CollectionMemberExpression AST node, thereby generating the appropriate SQL.

string

walkComparisonExpression(mixed compExpr, ComparisonExpression )

Walks down a ComparisonExpression AST node, thereby generating the appropriate SQL.

string

walkConditionalFactor(mixed factor, ConditionalFactor )

Walks down a ConditionalFactor AST node, thereby generating the appropriate SQL.

string

walkConditionalTerm(mixed condTerm, ConditionalTerm )

Walks down a ConditionalTerm AST node, thereby generating the appropriate SQL.

string

walkDeleteClause(mixed deleteClause, DeleteClause )

Walks down a DeleteClause AST node, thereby generating the appropriate SQL.

string

walkDeleteStatement(mixed AST, DeleteStatement )

Walks down a DeleteStatement AST node, thereby generating the appropriate SQL.

string

walkEmptyCollectionComparisonExpression(mixed emptyCollCompExpr, EmptyCollectionComparisonExpression )

Walks down an EmptyCollectionComparisonExpression AST node, thereby generating the appropriate SQL.

string

walkExistsExpression(mixed existsExpr, ExistsExpression )

Walks down an ExistsExpression AST node, thereby generating the appropriate SQL.

string

walkFromClause(mixed fromClause)

Walks down a FromClause AST node, thereby generating the appropriate SQL.

string

walkFunction(mixed function)

Walks down a FunctionNode AST node, thereby generating the appropriate SQL.

string

walkGroupByClause(mixed groupByClause, GroupByClause )

Walks down a GroupByClause AST node, thereby generating the appropriate SQL.

string

walkGroupByItem(mixed pathExpr, GroupByItem )

Walks down a GroupByItem AST node, thereby generating the appropriate SQL.

string

walkHavingClause(mixed havingClause, HavingClause )

Walks down a HavingClause AST node, thereby generating the appropriate SQL.

string

walkInExpression(mixed inExpr, InExpression )

Walks down an InExpression AST node, thereby generating the appropriate SQL.

string

walkInputParameter(mixed inputParam, InputParameter )

Walks down an InputParameter AST node, thereby generating the appropriate SQL.

string

walkJoinVariableDeclaration(JoinVariableDeclaration joinVarDecl)

Walks down a JoinVariableDeclaration AST node and creates the corresponding SQL.

string

walkLikeExpression(mixed likeExpr, LikeExpression )

Walks down a LikeExpression AST node, thereby generating the appropriate SQL.

string

walkLiteral(mixed literal, mixed )

Walks down a literal that represents an AST node, thereby generating the appropriate SQL.

string

walkNullComparisonExpression(mixed nullCompExpr, NullComparisonExpression )

Walks down a NullComparisonExpression AST node, thereby generating the appropriate SQL.

string

walkOrderByClause(mixed orderByClause, OrderByClause )

Walks down an OrderByClause AST node, thereby generating the appropriate SQL.

string

walkOrderByItem(mixed orderByItem, OrderByItem )

Walks down an OrderByItem AST node, thereby generating the appropriate SQL.

string

walkPathExpression(mixed pathExpr, mixed )

Walks down an PathExpression AST node, thereby generating the appropriate SQL.

string

walkQuantifiedExpression(mixed qExpr, QuantifiedExpression )

Walks down a QuantifiedExpression AST node, thereby generating the appropriate SQL.

string

walkSelectClause(mixed selectClause)

Walks down a SelectClause AST node, thereby generating the appropriate SQL.

string

walkSelectExpression(SelectExpression selectExpression)

Walks down a SelectExpression AST node and generates the corresponding SQL.

string

walkSelectStatement(mixed AST)

Walks down a SelectStatement AST node, thereby generating the appropriate SQL.

string

walkSimpleArithmeticExpression(mixed simpleArithmeticExpr, SimpleArithmeticExpression )

Walks down an SimpleArithmeticExpression AST node, thereby generating the appropriate SQL.

string

walkSimpleSelectClause(mixed simpleSelectClause, SimpleSelectClause )

Walks down a SimpleSelectClause AST node, thereby generating the appropriate SQL.

string

walkSimpleSelectExpression(mixed simpleSelectExpression, SimpleSelectExpression )

Walks down a SimpleSelectExpression AST node, thereby generating the appropriate SQL.

string

walkStateFieldPathExpression(mixed stateFieldPathExpression, StateFieldPathExpression )

Walks down a StateFieldPathExpression AST node, thereby generating the appropriate SQL.

string

walkStringPrimary(mixed stringPrimary, mixed )

Walks down a StringPrimary that represents an AST node, thereby generating the appropriate SQL.

string

walkSubselect(mixed subselect, Subselect )

Walks down a Subselect AST node, thereby generating the appropriate SQL.

string

walkSubselectFromClause(mixed subselectFromClause, SubselectFromClause )

Walks down a SubselectFromClause AST node, thereby generating the appropriate SQL.

string

walkUpdateClause(mixed updateClause, UpdateClause )

Walks down an UpdateClause AST node, thereby generating the appropriate SQL.

string

walkUpdateItem(mixed updateItem, UpdateItem )

Walks down an UpdateItem AST node, thereby generating the appropriate SQL.

string

walkUpdateStatement(mixed AST, UpdateStatement )

Walks down an UpdateStatement AST node, thereby generating the appropriate SQL.

string

walkWhereClause(mixed whereClause, WhereClause )

Walks down a WhereClause AST node, thereby generating the appropriate SQL.

+ +

Constructor Detail

+
/Doctrine/ORM/Query/TreeWalkerAdapter.php at line 40
+

TreeWalkerAdapter

+public TreeWalkerAdapter(mixed query, mixed parserResult, mixed queryComponents) +
+

+ +
+ +

Method Detail

+
/Doctrine/ORM/Query/TreeWalkerAdapter.php at line 412
+

getExecutor

+public AbstractExecutor getExecutor(mixed AST) +
+

Gets an executor that can be used to execute the result of this walker.

+ +
+ +
/Doctrine/ORM/Query/TreeWalkerAdapter.php at line 189
+

walkAggregateExpression

+public string walkAggregateExpression(mixed aggExpression, AggregateExpression ) +
+

Walks down an AggregateExpression AST node, thereby generating the appropriate SQL.

+
Returns:
+
The SQL.
+
+
+ +
+ +
/Doctrine/ORM/Query/TreeWalkerAdapter.php at line 365
+

walkArithmeticExpression

+public string walkArithmeticExpression(mixed arithmeticExpr, ArithmeticExpression ) +
+

Walks down an ArithmeticExpression AST node, thereby generating the appropriate SQL.

+
Returns:
+
The SQL.
+
+
+ +
+ +
/Doctrine/ORM/Query/TreeWalkerAdapter.php at line 389
+

walkArithmeticFactor

+public string walkArithmeticFactor(mixed factor, mixed ) +
+

Walks down an ArithmeticFactor that represents an AST node, thereby generating the appropriate SQL.

+
Returns:
+
The SQL.
+
+
+ +
+ +
/Doctrine/ORM/Query/TreeWalkerAdapter.php at line 373
+

walkArithmeticTerm

+public string walkArithmeticTerm(mixed term, mixed ) +
+

Walks down an ArithmeticTerm AST node, thereby generating the appropriate SQL.

+
Returns:
+
The SQL.
+
+
+ +
+ +
/Doctrine/ORM/Query/TreeWalkerAdapter.php at line 325
+

walkBetweenExpression

+public string walkBetweenExpression(mixed betweenExpr, BetweenExpression ) +
+

Walks down a BetweenExpression AST node, thereby generating the appropriate SQL.

+
Returns:
+
The SQL.
+
+
+ +
+ +
/Doctrine/ORM/Query/TreeWalkerAdapter.php at line 285
+

walkCollectionMemberExpression

+public string walkCollectionMemberExpression(mixed collMemberExpr, CollectionMemberExpression ) +
+

Walks down a CollectionMemberExpression AST node, thereby generating the appropriate SQL.

+
Returns:
+
The SQL.
+
+
+ +
+ +
/Doctrine/ORM/Query/TreeWalkerAdapter.php at line 349
+

walkComparisonExpression

+public string walkComparisonExpression(mixed compExpr, ComparisonExpression ) +
+

Walks down a ComparisonExpression AST node, thereby generating the appropriate SQL.

+
Returns:
+
The SQL.
+
+
+ +
+ +
/Doctrine/ORM/Query/TreeWalkerAdapter.php at line 269
+

walkConditionalFactor

+public string walkConditionalFactor(mixed factor, ConditionalFactor ) +
+

Walks down a ConditionalFactor AST node, thereby generating the appropriate SQL.

+
Returns:
+
The SQL.
+
+
+ +
+ +
/Doctrine/ORM/Query/TreeWalkerAdapter.php at line 261
+

walkConditionalTerm

+public string walkConditionalTerm(mixed condTerm, ConditionalTerm ) +
+

Walks down a ConditionalTerm AST node, thereby generating the appropriate SQL.

+
Returns:
+
The SQL.
+
+
+ +
+ +
/Doctrine/ORM/Query/TreeWalkerAdapter.php at line 229
+

walkDeleteClause

+public string walkDeleteClause(mixed deleteClause, DeleteClause ) +
+

Walks down a DeleteClause AST node, thereby generating the appropriate SQL.

+
Returns:
+
The SQL.
+
+
+ +
+ +
/Doctrine/ORM/Query/TreeWalkerAdapter.php at line 221
+

walkDeleteStatement

+public string walkDeleteStatement(mixed AST, DeleteStatement ) +
+

Walks down a DeleteStatement AST node, thereby generating the appropriate SQL.

+
Returns:
+
The SQL.
+
+
+ +
+ +
/Doctrine/ORM/Query/TreeWalkerAdapter.php at line 293
+

walkEmptyCollectionComparisonExpression

+public string walkEmptyCollectionComparisonExpression(mixed emptyCollCompExpr, EmptyCollectionComparisonExpression ) +
+

Walks down an EmptyCollectionComparisonExpression AST node, thereby generating the appropriate SQL.

+
Returns:
+
The SQL.
+
+
+ +
+ +
/Doctrine/ORM/Query/TreeWalkerAdapter.php at line 277
+

walkExistsExpression

+public string walkExistsExpression(mixed existsExpr, ExistsExpression ) +
+

Walks down an ExistsExpression AST node, thereby generating the appropriate SQL.

+
Returns:
+
The SQL.
+
+
+ +
+ +
/Doctrine/ORM/Query/TreeWalkerAdapter.php at line 94
+

walkFromClause

+public string walkFromClause(mixed fromClause) +
+

Walks down a FromClause AST node, thereby generating the appropriate SQL.

+
Returns:
+
The SQL.
+
+
+ +
+ +
/Doctrine/ORM/Query/TreeWalkerAdapter.php at line 101
+

walkFunction

+public string walkFunction(mixed function) +
+

Walks down a FunctionNode AST node, thereby generating the appropriate SQL.

+
Returns:
+
The SQL.
+
+
+ +
+ +
/Doctrine/ORM/Query/TreeWalkerAdapter.php at line 197
+

walkGroupByClause

+public string walkGroupByClause(mixed groupByClause, GroupByClause ) +
+

Walks down a GroupByClause AST node, thereby generating the appropriate SQL.

+
Returns:
+
The SQL.
+
+
+ +
+ +
/Doctrine/ORM/Query/TreeWalkerAdapter.php at line 205
+

walkGroupByItem

+public string walkGroupByItem(mixed pathExpr, GroupByItem ) +
+

Walks down a GroupByItem AST node, thereby generating the appropriate SQL.

+
Returns:
+
The SQL.
+
+
+ +
+ +
/Doctrine/ORM/Query/TreeWalkerAdapter.php at line 125
+

walkHavingClause

+public string walkHavingClause(mixed havingClause, HavingClause ) +
+

Walks down a HavingClause AST node, thereby generating the appropriate SQL.

+
Returns:
+
The SQL.
+
+
+ +
+ +
/Doctrine/ORM/Query/TreeWalkerAdapter.php at line 309
+

walkInExpression

+public string walkInExpression(mixed inExpr, InExpression ) +
+

Walks down an InExpression AST node, thereby generating the appropriate SQL.

+
Returns:
+
The SQL.
+
+
+ +
+ +
/Doctrine/ORM/Query/TreeWalkerAdapter.php at line 357
+

walkInputParameter

+public string walkInputParameter(mixed inputParam, InputParameter ) +
+

Walks down an InputParameter AST node, thereby generating the appropriate SQL.

+
Returns:
+
The SQL.
+
+
+ +
+ +
/Doctrine/ORM/Query/TreeWalkerAdapter.php at line 133
+

walkJoinVariableDeclaration

+public string walkJoinVariableDeclaration(JoinVariableDeclaration joinVarDecl) +
+

Walks down a JoinVariableDeclaration AST node and creates the corresponding SQL.

+
Returns:
+
The SQL.
+
+
+ +
+ +
/Doctrine/ORM/Query/TreeWalkerAdapter.php at line 333
+

walkLikeExpression

+public string walkLikeExpression(mixed likeExpr, LikeExpression ) +
+

Walks down a LikeExpression AST node, thereby generating the appropriate SQL.

+
Returns:
+
The SQL.
+
+
+ +
+ +
/Doctrine/ORM/Query/TreeWalkerAdapter.php at line 317
+

walkLiteral

+public string walkLiteral(mixed literal, mixed ) +
+

Walks down a literal that represents an AST node, thereby generating the appropriate SQL.

+
Returns:
+
The SQL.
+
+
+ +
+ +
/Doctrine/ORM/Query/TreeWalkerAdapter.php at line 301
+

walkNullComparisonExpression

+public string walkNullComparisonExpression(mixed nullCompExpr, NullComparisonExpression ) +
+

Walks down a NullComparisonExpression AST node, thereby generating the appropriate SQL.

+
Returns:
+
The SQL.
+
+
+ +
+ +
/Doctrine/ORM/Query/TreeWalkerAdapter.php at line 109
+

walkOrderByClause

+public string walkOrderByClause(mixed orderByClause, OrderByClause ) +
+

Walks down an OrderByClause AST node, thereby generating the appropriate SQL.

+
Returns:
+
The SQL.
+
+
+ +
+ +
/Doctrine/ORM/Query/TreeWalkerAdapter.php at line 117
+

walkOrderByItem

+public string walkOrderByItem(mixed orderByItem, OrderByItem ) +
+

Walks down an OrderByItem AST node, thereby generating the appropriate SQL.

+
Returns:
+
The SQL.
+
+
+ +
+ +
/Doctrine/ORM/Query/TreeWalkerAdapter.php at line 405
+

walkPathExpression

+public string walkPathExpression(mixed pathExpr, mixed ) +
+

Walks down an PathExpression AST node, thereby generating the appropriate SQL.

+
Returns:
+
The SQL.
+
+
+ +
+ +
/Doctrine/ORM/Query/TreeWalkerAdapter.php at line 149
+

walkQuantifiedExpression

+public string walkQuantifiedExpression(mixed qExpr, QuantifiedExpression ) +
+

Walks down a QuantifiedExpression AST node, thereby generating the appropriate SQL.

+
Returns:
+
The SQL.
+
+
+ +
+ +
/Doctrine/ORM/Query/TreeWalkerAdapter.php at line 87
+

walkSelectClause

+public string walkSelectClause(mixed selectClause) +
+

Walks down a SelectClause AST node, thereby generating the appropriate SQL.

+
Returns:
+
The SQL.
+
+
+ +
+ +
/Doctrine/ORM/Query/TreeWalkerAdapter.php at line 141
+

walkSelectExpression

+public string walkSelectExpression(SelectExpression selectExpression) +
+

Walks down a SelectExpression AST node and generates the corresponding SQL.

+
Returns:
+
The SQL.
+
+
+ +
+ +
/Doctrine/ORM/Query/TreeWalkerAdapter.php at line 80
+

walkSelectStatement

+public string walkSelectStatement(mixed AST) +
+

Walks down a SelectStatement AST node, thereby generating the appropriate SQL.

+
Returns:
+
The SQL.
+
+
+ +
+ +
/Doctrine/ORM/Query/TreeWalkerAdapter.php at line 397
+

walkSimpleArithmeticExpression

+public string walkSimpleArithmeticExpression(mixed simpleArithmeticExpr, SimpleArithmeticExpression ) +
+

Walks down an SimpleArithmeticExpression AST node, thereby generating the appropriate SQL.

+
Returns:
+
The SQL.
+
+
+ +
+ +
/Doctrine/ORM/Query/TreeWalkerAdapter.php at line 173
+

walkSimpleSelectClause

+public string walkSimpleSelectClause(mixed simpleSelectClause, SimpleSelectClause ) +
+

Walks down a SimpleSelectClause AST node, thereby generating the appropriate SQL.

+
Returns:
+
The SQL.
+
+
+ +
+ +
/Doctrine/ORM/Query/TreeWalkerAdapter.php at line 181
+

walkSimpleSelectExpression

+public string walkSimpleSelectExpression(mixed simpleSelectExpression, SimpleSelectExpression ) +
+

Walks down a SimpleSelectExpression AST node, thereby generating the appropriate SQL.

+
Returns:
+
The SQL.
+
+
+ +
+ +
/Doctrine/ORM/Query/TreeWalkerAdapter.php at line 341
+

walkStateFieldPathExpression

+public string walkStateFieldPathExpression(mixed stateFieldPathExpression, StateFieldPathExpression ) +
+

Walks down a StateFieldPathExpression AST node, thereby generating the appropriate SQL.

+
Returns:
+
The SQL.
+
+
+ +
+ +
/Doctrine/ORM/Query/TreeWalkerAdapter.php at line 381
+

walkStringPrimary

+public string walkStringPrimary(mixed stringPrimary, mixed ) +
+

Walks down a StringPrimary that represents an AST node, thereby generating the appropriate SQL.

+
Returns:
+
The SQL.
+
+
+ +
+ +
/Doctrine/ORM/Query/TreeWalkerAdapter.php at line 157
+

walkSubselect

+public string walkSubselect(mixed subselect, Subselect ) +
+

Walks down a Subselect AST node, thereby generating the appropriate SQL.

+
Returns:
+
The SQL.
+
+
+ +
+ +
/Doctrine/ORM/Query/TreeWalkerAdapter.php at line 165
+

walkSubselectFromClause

+public string walkSubselectFromClause(mixed subselectFromClause, SubselectFromClause ) +
+

Walks down a SubselectFromClause AST node, thereby generating the appropriate SQL.

+
Returns:
+
The SQL.
+
+
+ +
+ +
/Doctrine/ORM/Query/TreeWalkerAdapter.php at line 237
+

walkUpdateClause

+public string walkUpdateClause(mixed updateClause, UpdateClause ) +
+

Walks down an UpdateClause AST node, thereby generating the appropriate SQL.

+
Returns:
+
The SQL.
+
+
+ +
+ +
/Doctrine/ORM/Query/TreeWalkerAdapter.php at line 245
+

walkUpdateItem

+public string walkUpdateItem(mixed updateItem, UpdateItem ) +
+

Walks down an UpdateItem AST node, thereby generating the appropriate SQL.

+
Returns:
+
The SQL.
+
+
+ +
+ +
/Doctrine/ORM/Query/TreeWalkerAdapter.php at line 213
+

walkUpdateStatement

+public string walkUpdateStatement(mixed AST, UpdateStatement ) +
+

Walks down an UpdateStatement AST node, thereby generating the appropriate SQL.

+
Returns:
+
The SQL.
+
+
+ +
+ +
/Doctrine/ORM/Query/TreeWalkerAdapter.php at line 253
+

walkWhereClause

+public string walkWhereClause(mixed whereClause, WhereClause ) +
+

Walks down a WhereClause AST node, thereby generating the appropriate SQL.

+
Returns:
+
The SQL.
+
+
+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/orm/query/treewalkerchain.html b/lib/api/doctrine/orm/query/treewalkerchain.html new file mode 100644 index 000000000..d269ecd42 --- /dev/null +++ b/lib/api/doctrine/orm/query/treewalkerchain.html @@ -0,0 +1,817 @@ + + + + + + + + + + + +TreeWalkerChain (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +
Doctrine\ORM\Query\TreeWalkerChain
+
/Doctrine/ORM/Query/TreeWalkerChain.php at line 32
+ +

Class TreeWalkerChain

+ +
TreeWalkerChain
+ +
+
All Implemented Interfaces:
+
TreeWalker +
+ +
+ +

public class TreeWalkerChain

+ +

Represents a chain of tree walkers that modify an AST and finally emit output. +Only the last walker in the chain can emit output. Any previous walkers can modify +the AST to influence the final output produced by the last walker.

+ +
+
Author:
+
Roman Borschel
+
Since:
+
2.0
+
+
+ + + + + + +
Constructor Summary

TreeWalkerChain(mixed query, mixed parserResult, mixed queryComponents)

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Method Summary
void

addTreeWalker(string walkerClass)

Adds a tree walker to the chain.

AbstractExecutor

getExecutor(mixed AST)

Gets an executor that can be used to execute the result of this walker.

string

walkAggregateExpression(mixed aggExpression, AggregateExpression )

Walks down an AggregateExpression AST node, thereby generating the appropriate SQL.

string

walkArithmeticExpression(mixed arithmeticExpr, ArithmeticExpression )

Walks down an ArithmeticExpression AST node, thereby generating the appropriate SQL.

string

walkArithmeticFactor(mixed factor, mixed )

Walks down an ArithmeticFactor that represents an AST node, thereby generating the appropriate SQL.

string

walkArithmeticTerm(mixed term, mixed )

Walks down an ArithmeticTerm AST node, thereby generating the appropriate SQL.

string

walkBetweenExpression(mixed betweenExpr, BetweenExpression )

Walks down a BetweenExpression AST node, thereby generating the appropriate SQL.

string

walkCollectionMemberExpression(mixed collMemberExpr, CollectionMemberExpression )

Walks down a CollectionMemberExpression AST node, thereby generating the appropriate SQL.

string

walkComparisonExpression(mixed compExpr, ComparisonExpression )

Walks down a ComparisonExpression AST node, thereby generating the appropriate SQL.

string

walkConditionalFactor(mixed factor, ConditionalFactor )

Walks down a ConditionalFactor AST node, thereby generating the appropriate SQL.

string

walkConditionalTerm(mixed condTerm, ConditionalTerm )

Walks down a ConditionalTerm AST node, thereby generating the appropriate SQL.

string

walkDeleteClause(mixed deleteClause, DeleteClause )

Walks down a DeleteClause AST node, thereby generating the appropriate SQL.

string

walkDeleteStatement(mixed AST, DeleteStatement )

Walks down a DeleteStatement AST node, thereby generating the appropriate SQL.

string

walkEmptyCollectionComparisonExpression(mixed emptyCollCompExpr, EmptyCollectionComparisonExpression )

Walks down an EmptyCollectionComparisonExpression AST node, thereby generating the appropriate SQL.

string

walkExistsExpression(mixed existsExpr, ExistsExpression )

Walks down an ExistsExpression AST node, thereby generating the appropriate SQL.

string

walkFromClause(mixed fromClause)

Walks down a FromClause AST node, thereby generating the appropriate SQL.

string

walkFunction(mixed function)

Walks down a FunctionNode AST node, thereby generating the appropriate SQL.

string

walkGroupByClause(mixed groupByClause, GroupByClause )

Walks down a GroupByClause AST node, thereby generating the appropriate SQL.

string

walkGroupByItem(mixed pathExpr, GroupByItem )

Walks down a GroupByItem AST node, thereby generating the appropriate SQL.

string

walkHavingClause(mixed havingClause, HavingClause )

Walks down a HavingClause AST node, thereby generating the appropriate SQL.

string

walkInExpression(mixed inExpr, InExpression )

Walks down an InExpression AST node, thereby generating the appropriate SQL.

string

walkInputParameter(mixed inputParam, InputParameter )

Walks down an InputParameter AST node, thereby generating the appropriate SQL.

string

walkJoinVariableDeclaration(JoinVariableDeclaration joinVarDecl)

Walks down a JoinVariableDeclaration AST node and creates the corresponding SQL.

string

walkLikeExpression(mixed likeExpr, LikeExpression )

Walks down a LikeExpression AST node, thereby generating the appropriate SQL.

string

walkLiteral(mixed literal, mixed )

Walks down a literal that represents an AST node, thereby generating the appropriate SQL.

string

walkNullComparisonExpression(mixed nullCompExpr, NullComparisonExpression )

Walks down a NullComparisonExpression AST node, thereby generating the appropriate SQL.

string

walkOrderByClause(mixed orderByClause, OrderByClause )

Walks down an OrderByClause AST node, thereby generating the appropriate SQL.

string

walkOrderByItem(mixed orderByItem, OrderByItem )

Walks down an OrderByItem AST node, thereby generating the appropriate SQL.

string

walkPathExpression(mixed pathExpr, mixed )

Walks down an PathExpression AST node, thereby generating the appropriate SQL.

string

walkQuantifiedExpression(mixed qExpr, QuantifiedExpression )

Walks down a QuantifiedExpression AST node, thereby generating the appropriate SQL.

string

walkSelectClause(mixed selectClause)

Walks down a SelectClause AST node, thereby generating the appropriate SQL.

string

walkSelectExpression(SelectExpression selectExpression)

Walks down a SelectExpression AST node and generates the corresponding SQL.

string

walkSelectStatement(mixed AST)

Walks down a SelectStatement AST node, thereby generating the appropriate SQL.

string

walkSimpleArithmeticExpression(mixed simpleArithmeticExpr, SimpleArithmeticExpression )

Walks down an SimpleArithmeticExpression AST node, thereby generating the appropriate SQL.

string

walkSimpleSelectClause(mixed simpleSelectClause, SimpleSelectClause )

Walks down a SimpleSelectClause AST node, thereby generating the appropriate SQL.

string

walkSimpleSelectExpression(mixed simpleSelectExpression, SimpleSelectExpression )

Walks down a SimpleSelectExpression AST node, thereby generating the appropriate SQL.

string

walkStateFieldPathExpression(mixed stateFieldPathExpression, StateFieldPathExpression )

Walks down a StateFieldPathExpression AST node, thereby generating the appropriate SQL.

string

walkStringPrimary(mixed stringPrimary, mixed )

Walks down a StringPrimary that represents an AST node, thereby generating the appropriate SQL.

string

walkSubselect(mixed subselect, Subselect )

Walks down a Subselect AST node, thereby generating the appropriate SQL.

string

walkSubselectFromClause(mixed subselectFromClause, SubselectFromClause )

Walks down a SubselectFromClause AST node, thereby generating the appropriate SQL.

string

walkUpdateClause(mixed updateClause, UpdateClause )

Walks down an UpdateClause AST node, thereby generating the appropriate SQL.

string

walkUpdateItem(mixed updateItem, UpdateItem )

Walks down an UpdateItem AST node, thereby generating the appropriate SQL.

string

walkUpdateStatement(mixed AST, UpdateStatement )

Walks down an UpdateStatement AST node, thereby generating the appropriate SQL.

string

walkWhereClause(mixed whereClause, WhereClause )

Walks down a WhereClause AST node, thereby generating the appropriate SQL.

+ +

Constructor Detail

+
/Doctrine/ORM/Query/TreeWalkerChain.php at line 46
+

TreeWalkerChain

+public TreeWalkerChain(mixed query, mixed parserResult, mixed queryComponents) +
+

+
Inheritdoc.
+
+
+ +
+ +

Method Detail

+
/Doctrine/ORM/Query/TreeWalkerChain.php at line 58
+

addTreeWalker

+public void addTreeWalker(string walkerClass) +
+

Adds a tree walker to the chain.

+
Parameters:
+
walkerClass - The class of the walker to instantiate.
+
+
+ +
+ +
/Doctrine/ORM/Query/TreeWalkerChain.php at line 610
+

getExecutor

+public AbstractExecutor getExecutor(mixed AST) +
+

Gets an executor that can be used to execute the result of this walker.

+ +
+ +
/Doctrine/ORM/Query/TreeWalkerChain.php at line 247
+

walkAggregateExpression

+public string walkAggregateExpression(mixed aggExpression, AggregateExpression ) +
+

Walks down an AggregateExpression AST node, thereby generating the appropriate SQL.

+
Returns:
+
The SQL.
+
+
+ +
+ +
/Doctrine/ORM/Query/TreeWalkerChain.php at line 533
+

walkArithmeticExpression

+public string walkArithmeticExpression(mixed arithmeticExpr, ArithmeticExpression ) +
+

Walks down an ArithmeticExpression AST node, thereby generating the appropriate SQL.

+
Returns:
+
The SQL.
+
+
+ +
+ +
/Doctrine/ORM/Query/TreeWalkerChain.php at line 572
+

walkArithmeticFactor

+public string walkArithmeticFactor(mixed factor, mixed ) +
+

Walks down an ArithmeticFactor that represents an AST node, thereby generating the appropriate SQL.

+
Returns:
+
The SQL.
+
+
+ +
+ +
/Doctrine/ORM/Query/TreeWalkerChain.php at line 546
+

walkArithmeticTerm

+public string walkArithmeticTerm(mixed term, mixed ) +
+

Walks down an ArithmeticTerm AST node, thereby generating the appropriate SQL.

+
Returns:
+
The SQL.
+
+
+ +
+ +
/Doctrine/ORM/Query/TreeWalkerChain.php at line 468
+

walkBetweenExpression

+public string walkBetweenExpression(mixed betweenExpr, BetweenExpression ) +
+

Walks down a BetweenExpression AST node, thereby generating the appropriate SQL.

+
Returns:
+
The SQL.
+
+
+ +
+ +
/Doctrine/ORM/Query/TreeWalkerChain.php at line 403
+

walkCollectionMemberExpression

+public string walkCollectionMemberExpression(mixed collMemberExpr, CollectionMemberExpression ) +
+

Walks down a CollectionMemberExpression AST node, thereby generating the appropriate SQL.

+
Returns:
+
The SQL.
+
+
+ +
+ +
/Doctrine/ORM/Query/TreeWalkerChain.php at line 507
+

walkComparisonExpression

+public string walkComparisonExpression(mixed compExpr, ComparisonExpression ) +
+

Walks down a ComparisonExpression AST node, thereby generating the appropriate SQL.

+
Returns:
+
The SQL.
+
+
+ +
+ +
/Doctrine/ORM/Query/TreeWalkerChain.php at line 377
+

walkConditionalFactor

+public string walkConditionalFactor(mixed factor, ConditionalFactor ) +
+

Walks down a ConditionalFactor AST node, thereby generating the appropriate SQL.

+
Returns:
+
The SQL.
+
+
+ +
+ +
/Doctrine/ORM/Query/TreeWalkerChain.php at line 364
+

walkConditionalTerm

+public string walkConditionalTerm(mixed condTerm, ConditionalTerm ) +
+

Walks down a ConditionalTerm AST node, thereby generating the appropriate SQL.

+
Returns:
+
The SQL.
+
+
+ +
+ +
/Doctrine/ORM/Query/TreeWalkerChain.php at line 312
+

walkDeleteClause

+public string walkDeleteClause(mixed deleteClause, DeleteClause ) +
+

Walks down a DeleteClause AST node, thereby generating the appropriate SQL.

+
Returns:
+
The SQL.
+
+
+ +
+ +
/Doctrine/ORM/Query/TreeWalkerChain.php at line 299
+

walkDeleteStatement

+public string walkDeleteStatement(mixed AST, DeleteStatement ) +
+

Walks down a DeleteStatement AST node, thereby generating the appropriate SQL.

+
Returns:
+
The SQL.
+
+
+ +
+ +
/Doctrine/ORM/Query/TreeWalkerChain.php at line 416
+

walkEmptyCollectionComparisonExpression

+public string walkEmptyCollectionComparisonExpression(mixed emptyCollCompExpr, EmptyCollectionComparisonExpression ) +
+

Walks down an EmptyCollectionComparisonExpression AST node, thereby generating the appropriate SQL.

+
Returns:
+
The SQL.
+
+
+ +
+ +
/Doctrine/ORM/Query/TreeWalkerChain.php at line 390
+

walkExistsExpression

+public string walkExistsExpression(mixed existsExpr, ExistsExpression ) +
+

Walks down an ExistsExpression AST node, thereby generating the appropriate SQL.

+
Returns:
+
The SQL.
+
+
+ +
+ +
/Doctrine/ORM/Query/TreeWalkerChain.php at line 92
+

walkFromClause

+public string walkFromClause(mixed fromClause) +
+

Walks down a FromClause AST node, thereby generating the appropriate SQL.

+
Returns:
+
The SQL.
+
+
+ +
+ +
/Doctrine/ORM/Query/TreeWalkerChain.php at line 104
+

walkFunction

+public string walkFunction(mixed function) +
+

Walks down a FunctionNode AST node, thereby generating the appropriate SQL.

+
Returns:
+
The SQL.
+
+
+ +
+ +
/Doctrine/ORM/Query/TreeWalkerChain.php at line 260
+

walkGroupByClause

+public string walkGroupByClause(mixed groupByClause, GroupByClause ) +
+

Walks down a GroupByClause AST node, thereby generating the appropriate SQL.

+
Returns:
+
The SQL.
+
+
+ +
+ +
/Doctrine/ORM/Query/TreeWalkerChain.php at line 273
+

walkGroupByItem

+public string walkGroupByItem(mixed pathExpr, GroupByItem ) +
+

Walks down a GroupByItem AST node, thereby generating the appropriate SQL.

+
Returns:
+
The SQL.
+
+
+ +
+ +
/Doctrine/ORM/Query/TreeWalkerChain.php at line 143
+

walkHavingClause

+public string walkHavingClause(mixed havingClause, HavingClause ) +
+

Walks down a HavingClause AST node, thereby generating the appropriate SQL.

+
Returns:
+
The SQL.
+
+
+ +
+ +
/Doctrine/ORM/Query/TreeWalkerChain.php at line 442
+

walkInExpression

+public string walkInExpression(mixed inExpr, InExpression ) +
+

Walks down an InExpression AST node, thereby generating the appropriate SQL.

+
Returns:
+
The SQL.
+
+
+ +
+ +
/Doctrine/ORM/Query/TreeWalkerChain.php at line 520
+

walkInputParameter

+public string walkInputParameter(mixed inputParam, InputParameter ) +
+

Walks down an InputParameter AST node, thereby generating the appropriate SQL.

+
Returns:
+
The SQL.
+
+
+ +
+ +
/Doctrine/ORM/Query/TreeWalkerChain.php at line 156
+

walkJoinVariableDeclaration

+public string walkJoinVariableDeclaration(JoinVariableDeclaration joinVarDecl) +
+

Walks down a JoinVariableDeclaration AST node and creates the corresponding SQL.

+
Returns:
+
The SQL.
+
+
+ +
+ +
/Doctrine/ORM/Query/TreeWalkerChain.php at line 481
+

walkLikeExpression

+public string walkLikeExpression(mixed likeExpr, LikeExpression ) +
+

Walks down a LikeExpression AST node, thereby generating the appropriate SQL.

+
Returns:
+
The SQL.
+
+
+ +
+ +
/Doctrine/ORM/Query/TreeWalkerChain.php at line 455
+

walkLiteral

+public string walkLiteral(mixed literal, mixed ) +
+

Walks down a literal that represents an AST node, thereby generating the appropriate SQL.

+
Returns:
+
The SQL.
+
+
+ +
+ +
/Doctrine/ORM/Query/TreeWalkerChain.php at line 429
+

walkNullComparisonExpression

+public string walkNullComparisonExpression(mixed nullCompExpr, NullComparisonExpression ) +
+

Walks down a NullComparisonExpression AST node, thereby generating the appropriate SQL.

+
Returns:
+
The SQL.
+
+
+ +
+ +
/Doctrine/ORM/Query/TreeWalkerChain.php at line 117
+

walkOrderByClause

+public string walkOrderByClause(mixed orderByClause, OrderByClause ) +
+

Walks down an OrderByClause AST node, thereby generating the appropriate SQL.

+
Returns:
+
The SQL.
+
+
+ +
+ +
/Doctrine/ORM/Query/TreeWalkerChain.php at line 130
+

walkOrderByItem

+public string walkOrderByItem(mixed orderByItem, OrderByItem ) +
+

Walks down an OrderByItem AST node, thereby generating the appropriate SQL.

+
Returns:
+
The SQL.
+
+
+ +
+ +
/Doctrine/ORM/Query/TreeWalkerChain.php at line 598
+

walkPathExpression

+public string walkPathExpression(mixed pathExpr, mixed ) +
+

Walks down an PathExpression AST node, thereby generating the appropriate SQL.

+
Returns:
+
The SQL.
+
+
+ +
+ +
/Doctrine/ORM/Query/TreeWalkerChain.php at line 182
+

walkQuantifiedExpression

+public string walkQuantifiedExpression(mixed qExpr, QuantifiedExpression ) +
+

Walks down a QuantifiedExpression AST node, thereby generating the appropriate SQL.

+
Returns:
+
The SQL.
+
+
+ +
+ +
/Doctrine/ORM/Query/TreeWalkerChain.php at line 80
+

walkSelectClause

+public string walkSelectClause(mixed selectClause) +
+

Walks down a SelectClause AST node, thereby generating the appropriate SQL.

+
Returns:
+
The SQL.
+
+
+ +
+ +
/Doctrine/ORM/Query/TreeWalkerChain.php at line 169
+

walkSelectExpression

+public string walkSelectExpression(SelectExpression selectExpression) +
+

Walks down a SelectExpression AST node and generates the corresponding SQL.

+
Returns:
+
The SQL.
+
+
+ +
+ +
/Doctrine/ORM/Query/TreeWalkerChain.php at line 68
+

walkSelectStatement

+public string walkSelectStatement(mixed AST) +
+

Walks down a SelectStatement AST node, thereby generating the appropriate SQL.

+
Returns:
+
The SQL.
+
+
+ +
+ +
/Doctrine/ORM/Query/TreeWalkerChain.php at line 585
+

walkSimpleArithmeticExpression

+public string walkSimpleArithmeticExpression(mixed simpleArithmeticExpr, SimpleArithmeticExpression ) +
+

Walks down an SimpleArithmeticExpression AST node, thereby generating the appropriate SQL.

+
Returns:
+
The SQL.
+
+
+ +
+ +
/Doctrine/ORM/Query/TreeWalkerChain.php at line 221
+

walkSimpleSelectClause

+public string walkSimpleSelectClause(mixed simpleSelectClause, SimpleSelectClause ) +
+

Walks down a SimpleSelectClause AST node, thereby generating the appropriate SQL.

+
Returns:
+
The SQL.
+
+
+ +
+ +
/Doctrine/ORM/Query/TreeWalkerChain.php at line 234
+

walkSimpleSelectExpression

+public string walkSimpleSelectExpression(mixed simpleSelectExpression, SimpleSelectExpression ) +
+

Walks down a SimpleSelectExpression AST node, thereby generating the appropriate SQL.

+
Returns:
+
The SQL.
+
+
+ +
+ +
/Doctrine/ORM/Query/TreeWalkerChain.php at line 494
+

walkStateFieldPathExpression

+public string walkStateFieldPathExpression(mixed stateFieldPathExpression, StateFieldPathExpression ) +
+

Walks down a StateFieldPathExpression AST node, thereby generating the appropriate SQL.

+
Returns:
+
The SQL.
+
+
+ +
+ +
/Doctrine/ORM/Query/TreeWalkerChain.php at line 559
+

walkStringPrimary

+public string walkStringPrimary(mixed stringPrimary, mixed ) +
+

Walks down a StringPrimary that represents an AST node, thereby generating the appropriate SQL.

+
Returns:
+
The SQL.
+
+
+ +
+ +
/Doctrine/ORM/Query/TreeWalkerChain.php at line 195
+

walkSubselect

+public string walkSubselect(mixed subselect, Subselect ) +
+

Walks down a Subselect AST node, thereby generating the appropriate SQL.

+
Returns:
+
The SQL.
+
+
+ +
+ +
/Doctrine/ORM/Query/TreeWalkerChain.php at line 208
+

walkSubselectFromClause

+public string walkSubselectFromClause(mixed subselectFromClause, SubselectFromClause ) +
+

Walks down a SubselectFromClause AST node, thereby generating the appropriate SQL.

+
Returns:
+
The SQL.
+
+
+ +
+ +
/Doctrine/ORM/Query/TreeWalkerChain.php at line 325
+

walkUpdateClause

+public string walkUpdateClause(mixed updateClause, UpdateClause ) +
+

Walks down an UpdateClause AST node, thereby generating the appropriate SQL.

+
Returns:
+
The SQL.
+
+
+ +
+ +
/Doctrine/ORM/Query/TreeWalkerChain.php at line 338
+

walkUpdateItem

+public string walkUpdateItem(mixed updateItem, UpdateItem ) +
+

Walks down an UpdateItem AST node, thereby generating the appropriate SQL.

+
Returns:
+
The SQL.
+
+
+ +
+ +
/Doctrine/ORM/Query/TreeWalkerChain.php at line 286
+

walkUpdateStatement

+public string walkUpdateStatement(mixed AST, UpdateStatement ) +
+

Walks down an UpdateStatement AST node, thereby generating the appropriate SQL.

+
Returns:
+
The SQL.
+
+
+ +
+ +
/Doctrine/ORM/Query/TreeWalkerChain.php at line 351
+

walkWhereClause

+public string walkWhereClause(mixed whereClause, WhereClause ) +
+

Walks down a WhereClause AST node, thereby generating the appropriate SQL.

+
Returns:
+
The SQL.
+
+
+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/orm/querybuilder.html b/lib/api/doctrine/orm/querybuilder.html new file mode 100644 index 000000000..8aa04c93c --- /dev/null +++ b/lib/api/doctrine/orm/querybuilder.html @@ -0,0 +1,988 @@ + + + + + + + + + + + +QueryBuilder (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +
Doctrine\ORM\QueryBuilder
+
/Doctrine/ORM/QueryBuilder.php at line 38
+ +

Class QueryBuilder

+ +
QueryBuilder
+ +
+ +

public class QueryBuilder

+ +

This class is responsible for building DQL query strings via an object oriented +PHP interface.

+ +
+
License:
+
http://www.opensource.org/licenses/lgpl-license.php LGPL
+
See Also:
+
www.doctrine-project.org
+
Since:
+
2.0
+
Version:
+
$Revision$
+
Author:
+
Guilherme Blanco
+
Jonathan Wage
+
Roman Borschel
+
+
+ + + + + + + + + + + + + + + + + + + + + + + +
Field Summary
final int

DELETE

final int

$SELECT

final int

STATE_CLEAN

final int

$STATE_DIRTY

final int

UPDATE

+ + + + + + +
Constructor Summary

QueryBuilder(EntityManager em)

Initializes a new QueryBuilder that uses the given EntityManager.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Method Summary
QueryBuilder

add(string dqlPartName, string dqlPart, string append)

Add a single DQL query part to the array of parts

QueryBuilder

addGroupBy(string groupBy)

Add to the existing GROUP BY clause[php] +$qb = $em->createQueryBuilder() +->select('u') +->from('User', 'u') +->groupBy('u.last_login'); +->addGroupBy('u.created_at')

QueryBuilder

addOrderBy(string sort, string order)

Add to the existing ORDER BY clause

QueryBuilder

addSelect(mixed select)

Add to the SELECT statement[php] +$qb = $em->createQueryBuilder() +->select('u') +->addSelect('p') +->from('User', 'u') +->leftJoin('u.Phonenumbers', 'p');

QueryBuilder

andHaving(mixed having)

Add to the existing HAVING clause with an AND

QueryBuilder

andWhere(mixed where)

Add a new WHERE statement with an AND[php] +$qb = $em->createQueryBuilder() +->select('u') +->from('User', 'u') +->where('u.username LIKE ?') +->andWhere('u.is_active = 1');

QueryBuilder

delete(string delete, string alias)

Construct a DQL DELETE query[php] +$qb = $em->createQueryBuilder() +->delete('User', 'u') +->where('u.id = :user_id'); +->setParameter(':user_id', 1);

Expr

expr()

Gets an ExpressionBuilder used for object-oriented construction of query expressions. +

QueryBuilder

from(string from, string alias)

Specify the FROM part when constructing a SELECT DQL query[php] +$qb = $em->createQueryBuilder() +->select('u') +->from('User', 'u')

string

getDQL()

Get the complete DQL string for this query builder instance[php] +$qb = $em->createQueryBuilder() +->select('u') +->from('User', 'u') +echo $qb->getDql(); // SELECT u FROM User u

mixed

getDQLPart(string queryPartName)

Get a DQL part or parts by the part name

array

getDQLParts()

Get the full DQL parts array

EntityManager

getEntityManager()

Get the associated EntityManager for this query builder.

integer

getFirstResult()

Gets the position of the first result the query object was set to retrieve (the "offset"). +

integer

getMaxResults()

Gets the maximum number of results the query object was set to retrieve (the "limit"). +

mixed

getParameter(mixed key)

Gets a query parameter.

array

getParameters(mixed params)

Get all defined parameters

Query

getQuery()

Constructs a Query instance from the current configuration of the builder. +

string

getRootAlias()

Get the root alias for the query.

integer

getState()

Get the state of this query builder instance[php] +if ($qb->getState() == QueryBuilder::STATE_DIRTY) { +echo 'Query builder is dirty'; +} else { +echo 'Query builder is clean'; +}

integer

getType()

Get the type of the currently built query.

QueryBuilder

groupBy(string groupBy)

Set the GROUP BY clause[php] +$qb = $em->createQueryBuilder() +->select('u') +->from('User', 'u') +->groupBy('u.id');

QueryBuilder

having(mixed having)

Set the HAVING clause

QueryBuilder

innerJoin(string join, string alias, string conditionType, string condition)

Add an INNER JOIN to an associated class. +

QueryBuilder

join(string join, string alias, string conditionType, string condition)

Add a INNER JOIN to an associated class. +

QueryBuilder

leftJoin(string join, string alias, string conditionType, string condition)

Add a LEFT JOIN[php] +$qb = $em->createQueryBuilder() +->select('u') +->from('User', 'u') +->leftJoin('u.Phonenumbers', 'p', Expr\Join::WITH, 'p.is_primary = 1');

QueryBuilder

orHaving(mixed having)

Add to the existing HAVING clause with an OR

QueryBuilder

orWhere(mixed where)

Add a new WHERE statement with an OR[php] +$qb = $em->createQueryBuilder() +->select('u') +->from('User', 'u') +->where('u.id = 1') +->orWhere('u.id = 2');

QueryBuilder

orderBy(string sort, string order)

Set the ORDER BY clause

QueryBuilder

select(mixed select)

Set the SELECT statement[php] +$qb = $em->createQueryBuilder() +->select('u', 'p') +->from('User', 'u') +->leftJoin('u.Phonenumbers', 'p');

QueryBuilder

set(string key, string value)

Add a SET statement for a DQL UPDATE query[php] +$qb = $em->createQueryBuilder() +->update('User', 'u') +->set('u.password', md5('password')) +->where('u.id = ?');

QueryBuilder

setFirstResult(integer firstResult)

Sets the position of the first result to retrieve (the "offset").

QueryBuilder

setMaxResults(integer maxResults)

Sets the maximum number of results to retrieve (the "limit").

QueryBuilder

setParameter(string|integer key, mixed value)

Sets a query parameter. +

QueryBuilder

setParameters(array params)

Sets a collection of query parameters. +

QueryBuilder

update(string update, string alias)

Construct a DQL UPDATE query[php] +$qb = $em->createQueryBuilder() +->update('User', 'u') +->set('u.password', md5('password')) +->where('u.id = ?');

QueryBuilder

where(mixed predicates)

Set and override any existing WHERE statements[php] +$qb = $em->createQueryBuilder() +->select('u') +->from('User', 'u') +->where('u.id = ?');You can optionally programatically build and/or expressions +$qb = $em->createQueryBuilder();$or = $qb->expr()->orx(); +$or->add($qb->expr()->eq('u.id', 1)); +$or->add($qb->expr()->eq('u.id', 2));$qb->update('User', 'u') +->set('u.password', md5('password')) +->where($or);

+ +

Field Detail

+
/Doctrine/ORM/QueryBuilder.php at line 41
+

DELETE

+public final int DELETE = 1 +
+
+ +
+ +
/Doctrine/ORM/QueryBuilder.php at line 40
+

SELECT

+public final int $SELECT +
+
+ +
+ +
/Doctrine/ORM/QueryBuilder.php at line 45
+

STATE_CLEAN

+public final int STATE_CLEAN = 1 +
+
+ +
+ +
/Doctrine/ORM/QueryBuilder.php at line 44
+

STATE_DIRTY

+public final int $STATE_DIRTY +
+
+ +
+ +
/Doctrine/ORM/QueryBuilder.php at line 42
+

UPDATE

+public final int UPDATE = 2 +
+
+ +
+ +

Constructor Detail

+
/Doctrine/ORM/QueryBuilder.php at line 101
+

QueryBuilder

+public QueryBuilder(EntityManager em) +
+

Initializes a new QueryBuilder that uses the given EntityManager.

+
Parameters:
+
em - The EntityManager to use.
+
+
+ +
+ +

Method Detail

+
/Doctrine/ORM/QueryBuilder.php at line 355
+

add

+public QueryBuilder add(string dqlPartName, string dqlPart, string append) +
+

Add a single DQL query part to the array of parts

+
Returns:
+
This QueryBuilder instance.
+
+
+ +
+ +
/Doctrine/ORM/QueryBuilder.php at line 689
+

addGroupBy

+public QueryBuilder addGroupBy(string groupBy) +
+

Add to the existing GROUP BY clause

[php] +$qb = $em->createQueryBuilder() +->select('u') +->from('User', 'u') +->groupBy('u.last_login'); +->addGroupBy('u.created_at')

+
Parameters:
+
groupBy - The GROUP BY clause
+
Returns:
+
$qb
+
+
+ +
+ +
/Doctrine/ORM/QueryBuilder.php at line 771
+

addOrderBy

+public QueryBuilder addOrderBy(string sort, string order) +
+

Add to the existing ORDER BY clause

+
Parameters:
+
sort - What to sort on
+
order - Optional: The order to sort the results.
+
Returns:
+
$qb
+
+
+ +
+ +
/Doctrine/ORM/QueryBuilder.php at line 408
+

addSelect

+public QueryBuilder addSelect(mixed select) +
+

Add to the SELECT statement

[php] +$qb = $em->createQueryBuilder() +->select('u') +->addSelect('p') +->from('User', 'u') +->leftJoin('u.Phonenumbers', 'p');

+
Parameters:
+
select - String SELECT statement or SELECT Expr instance
+
Returns:
+
This QueryBuilder instance.
+
+
+ +
+ +
/Doctrine/ORM/QueryBuilder.php at line 715
+

andHaving

+public QueryBuilder andHaving(mixed having) +
+

Add to the existing HAVING clause with an AND

+
Returns:
+
$qb
+
+
+ +
+ +
/Doctrine/ORM/QueryBuilder.php at line 614
+

andWhere

+public QueryBuilder andWhere(mixed where) +
+

Add a new WHERE statement with an AND

[php] +$qb = $em->createQueryBuilder() +->select('u') +->from('User', 'u') +->where('u.username LIKE ?') +->andWhere('u.is_active = 1');

+
Parameters:
+
where - The WHERE statement
+
Returns:
+
$qb
+
See Also:
+
where()
+
+
+ +
+ +
/Doctrine/ORM/QueryBuilder.php at line 434
+

delete

+public QueryBuilder delete(string delete, string alias) +
+

Construct a DQL DELETE query

[php] +$qb = $em->createQueryBuilder() +->delete('User', 'u') +->where('u.id = :user_id'); +->setParameter(':user_id', 1);

+
Parameters:
+
delete - The model to delete
+
alias - The alias of the model
+
Returns:
+
This QueryBuilder instance.
+
+
+ +
+ +
/Doctrine/ORM/QueryBuilder.php at line 118
+

expr

+public Expr expr() +
+

Gets an ExpressionBuilder used for object-oriented construction of query expressions. +Intended for convenient inline usage. Example:

[php] +$qb = $em->createQueryBuilder() +->select('u') +->from('User', 'u') +->where($qb->expr()->eq('u.id', 1));

+ +
+ +
/Doctrine/ORM/QueryBuilder.php at line 481
+

from

+public QueryBuilder from(string from, string alias) +
+

Specify the FROM part when constructing a SELECT DQL query

[php] +$qb = $em->createQueryBuilder() +->select('u') +->from('User', 'u')

+
Parameters:
+
from - The class name.
+
alias - The alias of the class.
+
Returns:
+
This QueryBuilder instance.
+
+
+ +
+ +
/Doctrine/ORM/QueryBuilder.php at line 171
+

getDQL

+public string getDQL() +
+

Get the complete DQL string for this query builder instance

[php] +$qb = $em->createQueryBuilder() +->select('u') +->from('User', 'u') +echo $qb->getDql(); // SELECT u FROM User u

+
Returns:
+
The DQL string
+
+
+ +
+ +
/Doctrine/ORM/QueryBuilder.php at line 782
+

getDQLPart

+public mixed getDQLPart(string queryPartName) +
+

Get a DQL part or parts by the part name

+
Returns:
+
$queryPart
+
+
+ +
+ +
/Doctrine/ORM/QueryBuilder.php at line 792
+

getDQLParts

+public array getDQLParts() +
+

Get the full DQL parts array

+
Returns:
+
$dqlParts
+
+
+ +
+ +
/Doctrine/ORM/QueryBuilder.php at line 138
+

getEntityManager

+public EntityManager getEntityManager() +
+

Get the associated EntityManager for this query builder.

+ +
+ +
/Doctrine/ORM/QueryBuilder.php at line 319
+

getFirstResult

+public integer getFirstResult() +
+

Gets the position of the first result the query object was set to retrieve (the "offset"). +Returns NULL if setFirstResult was not applied to this query builder.

+
Returns:
+
The position of the first result.
+
+
+ +
+ +
/Doctrine/ORM/QueryBuilder.php at line 342
+

getMaxResults

+public integer getMaxResults() +
+

Gets the maximum number of results the query object was set to retrieve (the "limit"). +Returns NULL if setMaxResults was not applied to this query builder.

+
Returns:
+
Maximum number of results.
+
+
+ +
+ +
/Doctrine/ORM/QueryBuilder.php at line 296
+

getParameter

+public mixed getParameter(mixed key) +
+

Gets a query parameter.

+
Parameters:
+
key - The key (index or name) of the bound parameter.
+
Returns:
+
The value of the bound parameter.
+
+
+ +
+ +
/Doctrine/ORM/QueryBuilder.php at line 285
+

getParameters

+public array getParameters(mixed params) +
+

Get all defined parameters

+
Returns:
+
Defined parameters
+
+
+ +
+ +
/Doctrine/ORM/QueryBuilder.php at line 212
+

getQuery

+public Query getQuery() +
+

Constructs a Query instance from the current configuration of the builder.

[php] +$qb = $em->createQueryBuilder() +->select('u') +->from('User', 'u'); +$q = $qb->getQuery(); +$results = $q->execute();

+ +
+ +
/Doctrine/ORM/QueryBuilder.php at line 233
+

getRootAlias

+public string getRootAlias() +
+

Get the root alias for the query. This is the first entity alias involved +in the construction of the query

[php] +$qb = $em->createQueryBuilder() +->select('u') +->from('User', 'u');

echo $qb->getRootAlias(); // u

+
Returns:
+
$rootAlias
+
+
+ +
+ +
/Doctrine/ORM/QueryBuilder.php at line 155
+

getState

+public integer getState() +
+

Get the state of this query builder instance

[php] +if ($qb->getState() == QueryBuilder::STATE_DIRTY) { +echo 'Query builder is dirty'; +} else { +echo 'Query builder is clean'; +}

+ +
+ +
/Doctrine/ORM/QueryBuilder.php at line 128
+

getType

+public integer getType() +
+

Get the type of the currently built query.

+ +
+ +
/Doctrine/ORM/QueryBuilder.php at line 670
+

groupBy

+public QueryBuilder groupBy(string groupBy) +
+

Set the GROUP BY clause

[php] +$qb = $em->createQueryBuilder() +->select('u') +->from('User', 'u') +->groupBy('u.id');

+
Parameters:
+
groupBy - The GROUP BY clause
+
Returns:
+
$qb
+
+
+ +
+ +
/Doctrine/ORM/QueryBuilder.php at line 700
+

having

+public QueryBuilder having(mixed having) +
+

Set the HAVING clause

+
Returns:
+
$qb
+
+
+ +
+ +
/Doctrine/ORM/QueryBuilder.php at line 521
+

innerJoin

+public QueryBuilder innerJoin(string join, string alias, string conditionType, string condition) +
+

Add an INNER JOIN to an associated class.

[php] +$qb = $em->createQueryBuilder() +->select('u') +->from('User', 'u') +->innerJoin('u.Phonenumbers', 'p', Expr\Join::WITH, 'p.is_primary = 1');

+
Parameters:
+
join - The relationship to join
+
alias - The alias of the join
+
conditionType - The condition type constant. Either ON or WITH.
+
condition - The condition for the join
+
Returns:
+
This QueryBuilder instance.
+
+
+ +
+ +
/Doctrine/ORM/QueryBuilder.php at line 501
+

join

+public QueryBuilder join(string join, string alias, string conditionType, string condition) +
+

Add a INNER JOIN to an associated class.

[php] +$qb = $em->createQueryBuilder() +->select('u') +->from('User', 'u') +->innerJoin('u.Phonenumbers', 'p', Expr\Join::WITH, 'p.is_primary = 1');

+
Parameters:
+
join - The relationship to join
+
alias - The alias of the join
+
conditionType - The condition type constant. Either ON or WITH.
+
condition - The condition for the join
+
Returns:
+
This QueryBuilder instance.
+
+
+ +
+ +
/Doctrine/ORM/QueryBuilder.php at line 543
+

leftJoin

+public QueryBuilder leftJoin(string join, string alias, string conditionType, string condition) +
+

Add a LEFT JOIN

[php] +$qb = $em->createQueryBuilder() +->select('u') +->from('User', 'u') +->leftJoin('u.Phonenumbers', 'p', Expr\Join::WITH, 'p.is_primary = 1');

+
Parameters:
+
join - The relationship to join
+
alias - The alias of the join
+
conditionType - The condition type constant. Either ON or WITH.
+
condition - The condition for the join
+
Returns:
+
$qb
+
+
+ +
+ +
/Doctrine/ORM/QueryBuilder.php at line 736
+

orHaving

+public QueryBuilder orHaving(mixed having) +
+

Add to the existing HAVING clause with an OR

+
Returns:
+
$qb
+
+
+ +
+ +
/Doctrine/ORM/QueryBuilder.php at line 643
+

orWhere

+public QueryBuilder orWhere(mixed where) +
+

Add a new WHERE statement with an OR

[php] +$qb = $em->createQueryBuilder() +->select('u') +->from('User', 'u') +->where('u.id = 1') +->orWhere('u.id = 2');

+
Parameters:
+
where - The WHERE statement
+
Returns:
+
$qb
+
See Also:
+
where()
+
+
+ +
+ +
/Doctrine/ORM/QueryBuilder.php at line 758
+

orderBy

+public QueryBuilder orderBy(string sort, string order) +
+

Set the ORDER BY clause

+
Parameters:
+
sort - What to sort on
+
order - Optional: The order to sort the results.
+
Returns:
+
$qb
+
+
+ +
+ +
/Doctrine/ORM/QueryBuilder.php at line 382
+

select

+public QueryBuilder select(mixed select) +
+

Set the SELECT statement

[php] +$qb = $em->createQueryBuilder() +->select('u', 'p') +->from('User', 'u') +->leftJoin('u.Phonenumbers', 'p');

+
Parameters:
+
select - String SELECT statement or SELECT Expr instance
+
Returns:
+
This QueryBuilder instance.
+
+
+ +
+ +
/Doctrine/ORM/QueryBuilder.php at line 563
+

set

+public QueryBuilder set(string key, string value) +
+

Add a SET statement for a DQL UPDATE query

[php] +$qb = $em->createQueryBuilder() +->update('User', 'u') +->set('u.password', md5('password')) +->where('u.id = ?');

+
Parameters:
+
key - The key/field to set
+
value - The value, expression, placeholder, etc. to use in the SET
+
Returns:
+
$qb
+
+
+ +
+ +
/Doctrine/ORM/QueryBuilder.php at line 307
+

setFirstResult

+public QueryBuilder setFirstResult(integer firstResult) +
+

Sets the position of the first result to retrieve (the "offset").

+
Parameters:
+
firstResult - The first result to return.
+
Returns:
+
This QueryBuilder instance.
+
+
+ +
+ +
/Doctrine/ORM/QueryBuilder.php at line 330
+

setMaxResults

+public QueryBuilder setMaxResults(integer maxResults) +
+

Sets the maximum number of results to retrieve (the "limit").

+
Returns:
+
This QueryBuilder instance.
+
+
+ +
+ +
/Doctrine/ORM/QueryBuilder.php at line 252
+

setParameter

+public QueryBuilder setParameter(string|integer key, mixed value) +
+

Sets a query parameter.

[php] +$qb = $em->createQueryBuilder() +->select('u') +->from('User', 'u') +->where('u.id = :user_id') +->setParameter(':user_id', 1);

+
Parameters:
+
key - The parameter position or name.
+
value - The parameter value.
+
Returns:
+
This QueryBuilder instance.
+
+
+ +
+ +
/Doctrine/ORM/QueryBuilder.php at line 274
+

setParameters

+public QueryBuilder setParameters(array params) +
+

Sets a collection of query parameters.

[php] +$qb = $em->createQueryBuilder() +->select('u') +->from('User', 'u') +->where('u.id = :user_id1 OR u.id = :user_id2') +->setParameters(array( +':user_id1' => 1, +':user_id2' => 2 +));

+
Returns:
+
This QueryBuilder instance.
+
+
+ +
+ +
/Doctrine/ORM/QueryBuilder.php at line 458
+

update

+public QueryBuilder update(string update, string alias) +
+

Construct a DQL UPDATE query

[php] +$qb = $em->createQueryBuilder() +->update('User', 'u') +->set('u.password', md5('password')) +->where('u.id = ?');

+
Parameters:
+
update - The model to update
+
alias - The alias of the model
+
Returns:
+
This QueryBuilder instance.
+
+
+ +
+ +
/Doctrine/ORM/QueryBuilder.php at line 591
+

where

+public QueryBuilder where(mixed predicates) +
+

Set and override any existing WHERE statements

[php] +$qb = $em->createQueryBuilder() +->select('u') +->from('User', 'u') +->where('u.id = ?');

You can optionally programatically build and/or expressions +$qb = $em->createQueryBuilder();

$or = $qb->expr()->orx(); +$or->add($qb->expr()->eq('u.id', 1)); +$or->add($qb->expr()->eq('u.id', 2));

$qb->update('User', 'u') +->set('u.password', md5('password')) +->where($or);

+
Parameters:
+
predicates - The predicates.
+
+
+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/orm/tools/classmetadatareader.html b/lib/api/doctrine/orm/tools/classmetadatareader.html new file mode 100644 index 000000000..91e1109aa --- /dev/null +++ b/lib/api/doctrine/orm/tools/classmetadatareader.html @@ -0,0 +1,175 @@ + + + + + + + + + + + +ClassMetadataReader (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +
Doctrine\ORM\Tools\ClassMetadataReader
+
/Doctrine/ORM/Tools/ClassMetadataReader.php at line 54
+ +

Class ClassMetadataReader

+ +
ClassMetadataReader
+ +
+ +

public class ClassMetadataReader

+ +

Class to read metadata mapping information from multiple sources into an array +of ClassMetadataInfo instances.

The difference between this class and the ClassMetadataFactory is that this +is just a tool for reading in the mapping information from files without +having it bound to the actual ORM and the mapping information referenced by +the EntityManager. This allows us to read any source of mapping information +and return a single array of aggregated ClassMetadataInfo instances.

These arrays are used for exporting the mapping information to the supported +mapping drivers, generating entities, generating repositories, etc.

+ +
+
License:
+
http://www.opensource.org/licenses/lgpl-license.php LGPL
+
See Also:
+
www.doctrine-project.org
+
Since:
+
2.0
+
Version:
+
$Revision$
+
Author:
+
Benjamin Eberlei
+
Guilherme Blanco
+
Jonathan Wage
+
Roman Borschel
+
+
+ + + + + + + + + + + + + + + + + + + +
Method Summary
void

addMappingSource(string source, string type)

Add a new mapping directory to the array of directories to convert and export +to another format

array

getMetadatas(bool autoload)

Get an array of ClassMetadataInfo instances for all the configured mapping +directories.

static void

registerMappingDriver(string name, string class)

Register a new mapping driver class under a specified name

void

setEntityManager(EntityManager em)

Optionally set the EntityManager instance to get the AnnotationDriver +from instead of creating a new instance of the AnnotationDriver

+ +

Method Detail

+
/Doctrine/ORM/Tools/ClassMetadataReader.php at line 139
+

addMappingSource

+public void addMappingSource(string source, string type) +
+

Add a new mapping directory to the array of directories to convert and export +to another format

+
Parameters:
+
source - The source for the mapping
+
type - The type of mapping files (yml, xml, etc.)
+
+
+ +
+ +
/Doctrine/ORM/Tools/ClassMetadataReader.php at line 104
+

getMetadatas

+public array getMetadatas(bool autoload) +
+

Get an array of ClassMetadataInfo instances for all the configured mapping +directories. Reads the mapping directories and populates ClassMetadataInfo +instances.

If you specify $autoload = true then this method will return ClassMetadata +instances instead of ClassMetadataInfo instances. Keep in mind that if you +specify it to autoload and it doesn't find the class your autoloader may +throw an error.

+
Parameters:
+
autoload - Whether or to try and autoload the classes
+
Returns:
+
$classes
+
+
+ +
+ +
/Doctrine/ORM/Tools/ClassMetadataReader.php at line 74
+

registerMappingDriver

+public static void registerMappingDriver(string name, string class) +
+

Register a new mapping driver class under a specified name

+ +
+ +
/Doctrine/ORM/Tools/ClassMetadataReader.php at line 86
+

setEntityManager

+public void setEntityManager(EntityManager em) +
+

Optionally set the EntityManager instance to get the AnnotationDriver +from instead of creating a new instance of the AnnotationDriver

+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/orm/tools/console/command/clearcache/metadatacommand.html b/lib/api/doctrine/orm/tools/console/command/clearcache/metadatacommand.html new file mode 100644 index 000000000..8243395bd --- /dev/null +++ b/lib/api/doctrine/orm/tools/console/command/clearcache/metadatacommand.html @@ -0,0 +1,135 @@ + + + + + + + + + + + +MetadataCommand (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +
Doctrine\ORM\Tools\Console\Command\ClearCache\MetadataCommand
+
/Doctrine/ORM/Tools/Console/Command/ClearCache/MetadataCommand.php at line 40
+ +

Class MetadataCommand

+ +
Class:MetadataCommand - Superclass: Console
+Console
⌊ MetadataCommand
+ +
+ +

public class MetadataCommand
extends Console + +

+ +

Command to clear the metadata cache of the various cache drivers.

+ +
+
License:
+
http://www.opensource.org/licenses/lgpl-license.php LGPL
+
See Also:
+
www.doctrine-project.org
+
Since:
+
2.0
+
Version:
+
$Revision$
+
Author:
+
Benjamin Eberlei
+
Guilherme Blanco
+
Jonathan Wage
+
Roman Borschel
+
+
+ + + + + + + + + + + +
Method Summary
protected void

configure()

protected void

execute(mixed input, mixed output)

+ +

Method Detail

+
/Doctrine/ORM/Tools/Console/Command/ClearCache/MetadataCommand.php at line 45
+

configure

+protected void configure() +
+

+
See Also:
+
Console\Command\Command
+
+
+ +
+ +
/Doctrine/ORM/Tools/Console/Command/ClearCache/MetadataCommand.php at line 60
+

execute

+protected void execute(mixed input, mixed output) +
+

+
See Also:
+
Console\Command\Command
+
+
+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/orm/tools/console/command/clearcache/package-frame.html b/lib/api/doctrine/orm/tools/console/command/clearcache/package-frame.html new file mode 100644 index 000000000..5de004747 --- /dev/null +++ b/lib/api/doctrine/orm/tools/console/command/clearcache/package-frame.html @@ -0,0 +1,28 @@ + + + + + + + + + + + +Doctrine\ORM\Tools\Console\Command\ClearCache (Doctrine) + + + + +

Doctrine\ORM\Tools\Console\Command\ClearCache

+ +

Classes

+ + + + + \ No newline at end of file diff --git a/lib/api/doctrine/orm/tools/console/command/clearcache/package-functions.html b/lib/api/doctrine/orm/tools/console/command/clearcache/package-functions.html new file mode 100644 index 000000000..a0cc5ae81 --- /dev/null +++ b/lib/api/doctrine/orm/tools/console/command/clearcache/package-functions.html @@ -0,0 +1,69 @@ + + + + + + + + + + + +Functions (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +

Functions

+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/orm/tools/console/command/clearcache/package-globals.html b/lib/api/doctrine/orm/tools/console/command/clearcache/package-globals.html new file mode 100644 index 000000000..a9a6b0f89 --- /dev/null +++ b/lib/api/doctrine/orm/tools/console/command/clearcache/package-globals.html @@ -0,0 +1,69 @@ + + + + + + + + + + + +Globals (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +

Globals

+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/orm/tools/console/command/clearcache/package-summary.html b/lib/api/doctrine/orm/tools/console/command/clearcache/package-summary.html new file mode 100644 index 000000000..f14cce2c9 --- /dev/null +++ b/lib/api/doctrine/orm/tools/console/command/clearcache/package-summary.html @@ -0,0 +1,66 @@ + + + + + + + + + + + +Doctrine\ORM\Tools\Console\Command\ClearCache (Doctrine) + + + + +
+

Doctrine

+ +
+ + +
+ +

Namespace Doctrine\ORM\Tools\Console\Command\ClearCache

+ + + + + + +
Class Summary
MetadataCommandCommand to clear the metadata cache of the various cache drivers.
QueryCommandCommand to clear the query cache of the various cache drivers.
ResultCommandCommand to clear the result cache of the various cache drivers.
+ +
+ +
+

Doctrine

+ +
+ + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/orm/tools/console/command/clearcache/package-tree.html b/lib/api/doctrine/orm/tools/console/command/clearcache/package-tree.html new file mode 100644 index 000000000..ec149d345 --- /dev/null +++ b/lib/api/doctrine/orm/tools/console/command/clearcache/package-tree.html @@ -0,0 +1,53 @@ + + + + + + + + + + + +Doctrine\ORM\Tools\Console\Command\ClearCache (Doctrine) + + + + +
+

Doctrine

+ +
+ + +

Class Hierarchy for Package Doctrine\ORM\Tools\Console\Command\ClearCache

+

Doctrine

+ +
+ + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/orm/tools/console/command/clearcache/querycommand.html b/lib/api/doctrine/orm/tools/console/command/clearcache/querycommand.html new file mode 100644 index 000000000..3b3d9b3ec --- /dev/null +++ b/lib/api/doctrine/orm/tools/console/command/clearcache/querycommand.html @@ -0,0 +1,135 @@ + + + + + + + + + + + +QueryCommand (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +
Doctrine\ORM\Tools\Console\Command\ClearCache\QueryCommand
+
/Doctrine/ORM/Tools/Console/Command/ClearCache/QueryCommand.php at line 40
+ +

Class QueryCommand

+ +
Class:QueryCommand - Superclass: Console
+Console
⌊ QueryCommand
+ +
+ +

public class QueryCommand
extends Console + +

+ +

Command to clear the query cache of the various cache drivers.

+ +
+
License:
+
http://www.opensource.org/licenses/lgpl-license.php LGPL
+
See Also:
+
www.doctrine-project.org
+
Since:
+
2.0
+
Version:
+
$Revision$
+
Author:
+
Benjamin Eberlei
+
Guilherme Blanco
+
Jonathan Wage
+
Roman Borschel
+
+
+ + + + + + + + + + + +
Method Summary
protected void

configure()

protected void

execute(mixed input, mixed output)

+ +

Method Detail

+
/Doctrine/ORM/Tools/Console/Command/ClearCache/QueryCommand.php at line 45
+

configure

+protected void configure() +
+

+
See Also:
+
Console\Command\Command
+
+
+ +
+ +
/Doctrine/ORM/Tools/Console/Command/ClearCache/QueryCommand.php at line 60
+

execute

+protected void execute(mixed input, mixed output) +
+

+
See Also:
+
Console\Command\Command
+
+
+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/orm/tools/console/command/clearcache/resultcommand.html b/lib/api/doctrine/orm/tools/console/command/clearcache/resultcommand.html new file mode 100644 index 000000000..e75373f9c --- /dev/null +++ b/lib/api/doctrine/orm/tools/console/command/clearcache/resultcommand.html @@ -0,0 +1,135 @@ + + + + + + + + + + + +ResultCommand (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +
Doctrine\ORM\Tools\Console\Command\ClearCache\ResultCommand
+
/Doctrine/ORM/Tools/Console/Command/ClearCache/ResultCommand.php at line 40
+ +

Class ResultCommand

+ +
Class:ResultCommand - Superclass: Console
+Console
⌊ ResultCommand
+ +
+ +

public class ResultCommand
extends Console + +

+ +

Command to clear the result cache of the various cache drivers.

+ +
+
License:
+
http://www.opensource.org/licenses/lgpl-license.php LGPL
+
See Also:
+
www.doctrine-project.org
+
Since:
+
2.0
+
Version:
+
$Revision$
+
Author:
+
Benjamin Eberlei
+
Guilherme Blanco
+
Jonathan Wage
+
Roman Borschel
+
+
+ + + + + + + + + + + +
Method Summary
protected void

configure()

protected void

execute(mixed input, mixed output)

+ +

Method Detail

+
/Doctrine/ORM/Tools/Console/Command/ClearCache/ResultCommand.php at line 45
+

configure

+protected void configure() +
+

+
See Also:
+
Console\Command\Command
+
+
+ +
+ +
/Doctrine/ORM/Tools/Console/Command/ClearCache/ResultCommand.php at line 78
+

execute

+protected void execute(mixed input, mixed output) +
+

+
See Also:
+
Console\Command\Command
+
+
+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/orm/tools/console/command/convertdoctrine1schemacommand.html b/lib/api/doctrine/orm/tools/console/command/convertdoctrine1schemacommand.html new file mode 100644 index 000000000..faf8f535b --- /dev/null +++ b/lib/api/doctrine/orm/tools/console/command/convertdoctrine1schemacommand.html @@ -0,0 +1,135 @@ + + + + + + + + + + + +ConvertDoctrine1SchemaCommand (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +
Doctrine\ORM\Tools\Console\Command\ConvertDoctrine1SchemaCommand
+
/Doctrine/ORM/Tools/Console/Command/ConvertDoctrine1SchemaCommand.php at line 42
+ +

Class ConvertDoctrine1SchemaCommand

+ +
Class:ConvertDoctrine1SchemaCommand - Superclass: Console
+Console
⌊ ConvertDoctrine1SchemaCommand
+ +
+ +

public class ConvertDoctrine1SchemaCommand
extends Console + +

+ +

Command to convert a Doctrine 1 schema to a Doctrine 2 mapping file.

+ +
+
License:
+
http://www.opensource.org/licenses/lgpl-license.php LGPL
+
See Also:
+
www.doctrine-project.org
+
Since:
+
2.0
+
Version:
+
$Revision$
+
Author:
+
Benjamin Eberlei
+
Guilherme Blanco
+
Jonathan Wage
+
Roman Borschel
+
+
+ + + + + + + + + + + +
Method Summary
protected void

configure()

protected void

execute(mixed input, mixed output)

+ +

Method Detail

+
/Doctrine/ORM/Tools/Console/Command/ConvertDoctrine1SchemaCommand.php at line 47
+

configure

+protected void configure() +
+

+
See Also:
+
Console\Command\Command
+
+
+ +
+ +
/Doctrine/ORM/Tools/Console/Command/ConvertDoctrine1SchemaCommand.php at line 86
+

execute

+protected void execute(mixed input, mixed output) +
+

+
See Also:
+
Console\Command\Command
+
+
+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/orm/tools/console/command/convertmappingcommand.html b/lib/api/doctrine/orm/tools/console/command/convertmappingcommand.html new file mode 100644 index 000000000..955a61fe3 --- /dev/null +++ b/lib/api/doctrine/orm/tools/console/command/convertmappingcommand.html @@ -0,0 +1,135 @@ + + + + + + + + + + + +ConvertMappingCommand (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +
Doctrine\ORM\Tools\Console\Command\ConvertMappingCommand
+
/Doctrine/ORM/Tools/Console/Command/ConvertMappingCommand.php at line 42
+ +

Class ConvertMappingCommand

+ +
Class:ConvertMappingCommand - Superclass: Console
+Console
⌊ ConvertMappingCommand
+ +
+ +

public class ConvertMappingCommand
extends Console + +

+ +

Command to convert your mapping information between the various formats.

+ +
+
License:
+
http://www.opensource.org/licenses/lgpl-license.php LGPL
+
See Also:
+
www.doctrine-project.org
+
Since:
+
2.0
+
Version:
+
$Revision$
+
Author:
+
Benjamin Eberlei
+
Guilherme Blanco
+
Jonathan Wage
+
Roman Borschel
+
+
+ + + + + + + + + + + +
Method Summary
protected void

configure()

protected void

execute(mixed input, mixed output)

+ +

Method Detail

+
/Doctrine/ORM/Tools/Console/Command/ConvertMappingCommand.php at line 47
+

configure

+protected void configure() +
+

+
See Also:
+
Console\Command\Command
+
+
+ +
+ +
/Doctrine/ORM/Tools/Console/Command/ConvertMappingCommand.php at line 85
+

execute

+protected void execute(mixed input, mixed output) +
+

+
See Also:
+
Console\Command\Command
+
+
+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/orm/tools/console/command/ensureproductionsettingscommand.html b/lib/api/doctrine/orm/tools/console/command/ensureproductionsettingscommand.html new file mode 100644 index 000000000..1dd324b2e --- /dev/null +++ b/lib/api/doctrine/orm/tools/console/command/ensureproductionsettingscommand.html @@ -0,0 +1,135 @@ + + + + + + + + + + + +EnsureProductionSettingsCommand (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +
Doctrine\ORM\Tools\Console\Command\EnsureProductionSettingsCommand
+
/Doctrine/ORM/Tools/Console/Command/EnsureProductionSettingsCommand.php at line 40
+ +

Class EnsureProductionSettingsCommand

+ +
Class:EnsureProductionSettingsCommand - Superclass: Console
+Console
⌊ EnsureProductionSettingsCommand
+ +
+ +

public class EnsureProductionSettingsCommand
extends Console + +

+ +

Command to ensure that Doctrine is properly configured for a production environment.

+ +
+
License:
+
http://www.opensource.org/licenses/lgpl-license.php LGPL
+
See Also:
+
www.doctrine-project.org
+
Since:
+
2.0
+
Version:
+
$Revision$
+
Author:
+
Benjamin Eberlei
+
Guilherme Blanco
+
Jonathan Wage
+
Roman Borschel
+
+
+ + + + + + + + + + + +
Method Summary
protected void

configure()

protected void

execute(mixed input, mixed output)

+ +

Method Detail

+
/Doctrine/ORM/Tools/Console/Command/EnsureProductionSettingsCommand.php at line 45
+

configure

+protected void configure() +
+

+
See Also:
+
Console\Command\Command
+
+
+ +
+ +
/Doctrine/ORM/Tools/Console/Command/EnsureProductionSettingsCommand.php at line 65
+

execute

+protected void execute(mixed input, mixed output) +
+

+
See Also:
+
Console\Command\Command
+
+
+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/orm/tools/console/command/generateentitiescommand.html b/lib/api/doctrine/orm/tools/console/command/generateentitiescommand.html new file mode 100644 index 000000000..c78ffacac --- /dev/null +++ b/lib/api/doctrine/orm/tools/console/command/generateentitiescommand.html @@ -0,0 +1,135 @@ + + + + + + + + + + + +GenerateEntitiesCommand (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +
Doctrine\ORM\Tools\Console\Command\GenerateEntitiesCommand
+
/Doctrine/ORM/Tools/Console/Command/GenerateEntitiesCommand.php at line 42
+ +

Class GenerateEntitiesCommand

+ +
Class:GenerateEntitiesCommand - Superclass: Console
+Console
⌊ GenerateEntitiesCommand
+ +
+ +

public class GenerateEntitiesCommand
extends Console + +

+ +

Command to generate entity classes and method stubs from your mapping information.

+ +
+
License:
+
http://www.opensource.org/licenses/lgpl-license.php LGPL
+
See Also:
+
www.doctrine-project.org
+
Since:
+
2.0
+
Version:
+
$Revision$
+
Author:
+
Benjamin Eberlei
+
Guilherme Blanco
+
Jonathan Wage
+
Roman Borschel
+
+
+ + + + + + + + + + + +
Method Summary
protected void

configure()

protected void

execute(mixed input, mixed output)

+ +

Method Detail

+
/Doctrine/ORM/Tools/Console/Command/GenerateEntitiesCommand.php at line 47
+

configure

+protected void configure() +
+

+
See Also:
+
Console\Command\Command
+
+
+ +
+ +
/Doctrine/ORM/Tools/Console/Command/GenerateEntitiesCommand.php at line 94
+

execute

+protected void execute(mixed input, mixed output) +
+

+
See Also:
+
Console\Command\Command
+
+
+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/orm/tools/console/command/generateproxiescommand.html b/lib/api/doctrine/orm/tools/console/command/generateproxiescommand.html new file mode 100644 index 000000000..24ede87c1 --- /dev/null +++ b/lib/api/doctrine/orm/tools/console/command/generateproxiescommand.html @@ -0,0 +1,135 @@ + + + + + + + + + + + +GenerateProxiesCommand (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +
Doctrine\ORM\Tools\Console\Command\GenerateProxiesCommand
+
/Doctrine/ORM/Tools/Console/Command/GenerateProxiesCommand.php at line 41
+ +

Class GenerateProxiesCommand

+ +
Class:GenerateProxiesCommand - Superclass: Console
+Console
⌊ GenerateProxiesCommand
+ +
+ +

public class GenerateProxiesCommand
extends Console + +

+ +

Command to (re)generate the proxy classes used by doctrine.

+ +
+
License:
+
http://www.opensource.org/licenses/lgpl-license.php LGPL
+
See Also:
+
www.doctrine-project.org
+
Since:
+
2.0
+
Version:
+
$Revision$
+
Author:
+
Benjamin Eberlei
+
Guilherme Blanco
+
Jonathan Wage
+
Roman Borschel
+
+
+ + + + + + + + + + + +
Method Summary
protected void

configure()

protected void

execute(mixed input, mixed output)

+ +

Method Detail

+
/Doctrine/ORM/Tools/Console/Command/GenerateProxiesCommand.php at line 46
+

configure

+protected void configure() +
+

+
See Also:
+
Console\Command\Command
+
+
+ +
+ +
/Doctrine/ORM/Tools/Console/Command/GenerateProxiesCommand.php at line 70
+

execute

+protected void execute(mixed input, mixed output) +
+

+
See Also:
+
Console\Command\Command
+
+
+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/orm/tools/console/command/generaterepositoriescommand.html b/lib/api/doctrine/orm/tools/console/command/generaterepositoriescommand.html new file mode 100644 index 000000000..3ad79123f --- /dev/null +++ b/lib/api/doctrine/orm/tools/console/command/generaterepositoriescommand.html @@ -0,0 +1,135 @@ + + + + + + + + + + + +GenerateRepositoriesCommand (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +
Doctrine\ORM\Tools\Console\Command\GenerateRepositoriesCommand
+
/Doctrine/ORM/Tools/Console/Command/GenerateRepositoriesCommand.php at line 41
+ +

Class GenerateRepositoriesCommand

+ +
Class:GenerateRepositoriesCommand - Superclass: Console
+Console
⌊ GenerateRepositoriesCommand
+ +
+ +

public class GenerateRepositoriesCommand
extends Console + +

+ +

Command to generate repository classes for mapping information.

+ +
+
License:
+
http://www.opensource.org/licenses/lgpl-license.php LGPL
+
See Also:
+
www.doctrine-project.org
+
Since:
+
2.0
+
Version:
+
$Revision$
+
Author:
+
Benjamin Eberlei
+
Guilherme Blanco
+
Jonathan Wage
+
Roman Borschel
+
+
+ + + + + + + + + + + +
Method Summary
protected void

configure()

protected void

execute(mixed input, mixed output)

+ +

Method Detail

+
/Doctrine/ORM/Tools/Console/Command/GenerateRepositoriesCommand.php at line 63
+

configure

+protected void configure() +
+

+
See Also:
+
Console\Command\Command
+
+
+ +
+ +
/Doctrine/ORM/Tools/Console/Command/GenerateRepositoriesCommand.php at line 86
+

execute

+protected void execute(mixed input, mixed output) +
+

+
See Also:
+
Console\Command\Command
+
+
+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/orm/tools/console/command/package-frame.html b/lib/api/doctrine/orm/tools/console/command/package-frame.html new file mode 100644 index 000000000..9afb44962 --- /dev/null +++ b/lib/api/doctrine/orm/tools/console/command/package-frame.html @@ -0,0 +1,32 @@ + + + + + + + + + + + +Doctrine\ORM\Tools\Console\Command (Doctrine) + + + + +

Doctrine\ORM\Tools\Console\Command

+ +

Classes

+ + + + + \ No newline at end of file diff --git a/lib/api/doctrine/orm/tools/console/command/package-functions.html b/lib/api/doctrine/orm/tools/console/command/package-functions.html new file mode 100644 index 000000000..a44031213 --- /dev/null +++ b/lib/api/doctrine/orm/tools/console/command/package-functions.html @@ -0,0 +1,69 @@ + + + + + + + + + + + +Functions (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +

Functions

+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/orm/tools/console/command/package-globals.html b/lib/api/doctrine/orm/tools/console/command/package-globals.html new file mode 100644 index 000000000..8639c6cfc --- /dev/null +++ b/lib/api/doctrine/orm/tools/console/command/package-globals.html @@ -0,0 +1,69 @@ + + + + + + + + + + + +Globals (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +

Globals

+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/orm/tools/console/command/package-summary.html b/lib/api/doctrine/orm/tools/console/command/package-summary.html new file mode 100644 index 000000000..e95708f8b --- /dev/null +++ b/lib/api/doctrine/orm/tools/console/command/package-summary.html @@ -0,0 +1,70 @@ + + + + + + + + + + + +Doctrine\ORM\Tools\Console\Command (Doctrine) + + + + +
+

Doctrine

+ +
+ + +
+ +

Namespace Doctrine\ORM\Tools\Console\Command

+ + + + + + + + + + +
Class Summary
ConvertDoctrine1SchemaCommandCommand to convert a Doctrine 1 schema to a Doctrine 2 mapping file.
ConvertMappingCommandCommand to convert your mapping information between the various formats.
EnsureProductionSettingsCommandCommand to ensure that Doctrine is properly configured for a production environment.
GenerateEntitiesCommandCommand to generate entity classes and method stubs from your mapping information.
GenerateProxiesCommandCommand to (re)generate the proxy classes used by doctrine.
GenerateRepositoriesCommandCommand to generate repository classes for mapping information.
RunDqlCommandCommand to execute DQL queries in a given EntityManager.
+ +
+ +
+

Doctrine

+ +
+ + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/orm/tools/console/command/package-tree.html b/lib/api/doctrine/orm/tools/console/command/package-tree.html new file mode 100644 index 000000000..cb6985d8a --- /dev/null +++ b/lib/api/doctrine/orm/tools/console/command/package-tree.html @@ -0,0 +1,53 @@ + + + + + + + + + + + +Doctrine\ORM\Tools\Console\Command (Doctrine) + + + + +
+

Doctrine

+ +
+ + +

Class Hierarchy for Package Doctrine\ORM\Tools\Console\Command

+

Doctrine

+ +
+ + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/orm/tools/console/command/rundqlcommand.html b/lib/api/doctrine/orm/tools/console/command/rundqlcommand.html new file mode 100644 index 000000000..dda9d8cf9 --- /dev/null +++ b/lib/api/doctrine/orm/tools/console/command/rundqlcommand.html @@ -0,0 +1,135 @@ + + + + + + + + + + + +RunDqlCommand (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +
Doctrine\ORM\Tools\Console\Command\RunDqlCommand
+
/Doctrine/ORM/Tools/Console/Command/RunDqlCommand.php at line 40
+ +

Class RunDqlCommand

+ +
Class:RunDqlCommand - Superclass: Console
+Console
⌊ RunDqlCommand
+ +
+ +

public class RunDqlCommand
extends Console + +

+ +

Command to execute DQL queries in a given EntityManager.

+ +
+
License:
+
http://www.opensource.org/licenses/lgpl-license.php LGPL
+
See Also:
+
www.doctrine-project.org
+
Since:
+
2.0
+
Version:
+
$Revision$
+
Author:
+
Benjamin Eberlei
+
Guilherme Blanco
+
Jonathan Wage
+
Roman Borschel
+
+
+ + + + + + + + + + + +
Method Summary
protected void

configure()

protected void

execute(mixed input, mixed output)

+ +

Method Detail

+
/Doctrine/ORM/Tools/Console/Command/RunDqlCommand.php at line 45
+

configure

+protected void configure() +
+

+
See Also:
+
Console\Command\Command
+
+
+ +
+ +
/Doctrine/ORM/Tools/Console/Command/RunDqlCommand.php at line 79
+

execute

+protected void execute(mixed input, mixed output) +
+

+
See Also:
+
Console\Command\Command
+
+
+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/orm/tools/console/command/schematool/abstractcommand.html b/lib/api/doctrine/orm/tools/console/command/schematool/abstractcommand.html new file mode 100644 index 000000000..a53cf72ac --- /dev/null +++ b/lib/api/doctrine/orm/tools/console/command/schematool/abstractcommand.html @@ -0,0 +1,114 @@ + + + + + + + + + + + +AbstractCommand (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +
Doctrine\ORM\Tools\Console\Command\SchemaTool\AbstractCommand
+
/Doctrine/ORM/Tools/Console/Command/SchemaTool/AbstractCommand.php at line 33
+ +

Class AbstractCommand

+ +
Class:AbstractCommand - Superclass: Command
+Command
⌊ AbstractCommand
+ +
+ +

public abstract class AbstractCommand
extends Command + +

+ +
+ + + + + + + + + + + +
Method Summary
protected void

execute(mixed input, mixed output)

protected abstract void

executeSchemaCommand(InputInterface input, OutputInterface output, SchemaTool schemaTool, array metadatas)

+ +

Method Detail

+
/Doctrine/ORM/Tools/Console/Command/SchemaTool/AbstractCommand.php at line 46
+

execute

+protected void execute(mixed input, mixed output) +
+

+
See Also:
+
Console\Command\Command
+
+
+ +
+ +
/Doctrine/ORM/Tools/Console/Command/SchemaTool/AbstractCommand.php at line 41
+

executeSchemaCommand

+protected abstract void executeSchemaCommand(InputInterface input, OutputInterface output, SchemaTool schemaTool, array metadatas) +
+

+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/orm/tools/console/command/schematool/createcommand.html b/lib/api/doctrine/orm/tools/console/command/schematool/createcommand.html new file mode 100644 index 000000000..ad295dc03 --- /dev/null +++ b/lib/api/doctrine/orm/tools/console/command/schematool/createcommand.html @@ -0,0 +1,136 @@ + + + + + + + + + + + +CreateCommand (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +
Doctrine\ORM\Tools\Console\Command\SchemaTool\CreateCommand
+
/Doctrine/ORM/Tools/Console/Command/SchemaTool/CreateCommand.php at line 42
+ +

Class CreateCommand

+ +
Class:CreateCommand - Superclass: AbstractCommand
+Class:AbstractCommand - Superclass: Command
+Command
⌊ AbstractCommand
⌊ CreateCommand
+ +
+ +

public class CreateCommand
extends AbstractCommand + +

+ +

Command to create the database schema for a set of classes based on their mappings.

+ +
+
License:
+
http://www.opensource.org/licenses/lgpl-license.php LGPL
+
See Also:
+
www.doctrine-project.org
+
Since:
+
2.0
+
Version:
+
$Revision$
+
Author:
+
Benjamin Eberlei
+
Guilherme Blanco
+
Jonathan Wage
+
Roman Borschel
+
+
+ + + + + + + + + + + +
Method Summary
protected void

configure()

protected void

executeSchemaCommand(mixed input, mixed output, mixed schemaTool, mixed metadatas)

+ + + +
Methods inherited from Doctrine\ORM\Tools\Console\Command\SchemaTool\AbstractCommand
execute, executeSchemaCommand
+ +

Method Detail

+
/Doctrine/ORM/Tools/Console/Command/SchemaTool/CreateCommand.php at line 47
+

configure

+protected void configure() +
+

+
See Also:
+
Console\Command\Command
+
+
+ +
+ +
/Doctrine/ORM/Tools/Console/Command/SchemaTool/CreateCommand.php at line 66
+

executeSchemaCommand

+protected void executeSchemaCommand(mixed input, mixed output, mixed schemaTool, mixed metadatas) +
+
+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/orm/tools/console/command/schematool/dropcommand.html b/lib/api/doctrine/orm/tools/console/command/schematool/dropcommand.html new file mode 100644 index 000000000..75af21e92 --- /dev/null +++ b/lib/api/doctrine/orm/tools/console/command/schematool/dropcommand.html @@ -0,0 +1,136 @@ + + + + + + + + + + + +DropCommand (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +
Doctrine\ORM\Tools\Console\Command\SchemaTool\DropCommand
+
/Doctrine/ORM/Tools/Console/Command/SchemaTool/DropCommand.php at line 42
+ +

Class DropCommand

+ +
Class:DropCommand - Superclass: AbstractCommand
+Class:AbstractCommand - Superclass: Command
+Command
⌊ AbstractCommand
⌊ DropCommand
+ +
+ +

public class DropCommand
extends AbstractCommand + +

+ +

Command to drop the database schema for a set of classes based on their mappings.

+ +
+
License:
+
http://www.opensource.org/licenses/lgpl-license.php LGPL
+
See Also:
+
www.doctrine-project.org
+
Since:
+
2.0
+
Version:
+
$Revision$
+
Author:
+
Benjamin Eberlei
+
Guilherme Blanco
+
Jonathan Wage
+
Roman Borschel
+
+
+ + + + + + + + + + + +
Method Summary
protected void

configure()

protected void

executeSchemaCommand(mixed input, mixed output, mixed schemaTool, mixed metadatas)

+ + + +
Methods inherited from Doctrine\ORM\Tools\Console\Command\SchemaTool\AbstractCommand
execute, executeSchemaCommand
+ +

Method Detail

+
/Doctrine/ORM/Tools/Console/Command/SchemaTool/DropCommand.php at line 47
+

configure

+protected void configure() +
+

+
See Also:
+
Console\Command\Command
+
+
+ +
+ +
/Doctrine/ORM/Tools/Console/Command/SchemaTool/DropCommand.php at line 67
+

executeSchemaCommand

+protected void executeSchemaCommand(mixed input, mixed output, mixed schemaTool, mixed metadatas) +
+
+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/orm/tools/console/command/schematool/package-frame.html b/lib/api/doctrine/orm/tools/console/command/schematool/package-frame.html new file mode 100644 index 000000000..759d917da --- /dev/null +++ b/lib/api/doctrine/orm/tools/console/command/schematool/package-frame.html @@ -0,0 +1,29 @@ + + + + + + + + + + + +Doctrine\ORM\Tools\Console\Command\SchemaTool (Doctrine) + + + + +

Doctrine\ORM\Tools\Console\Command\SchemaTool

+ +

Classes

+ + + + + \ No newline at end of file diff --git a/lib/api/doctrine/orm/tools/console/command/schematool/package-functions.html b/lib/api/doctrine/orm/tools/console/command/schematool/package-functions.html new file mode 100644 index 000000000..60c7a97ed --- /dev/null +++ b/lib/api/doctrine/orm/tools/console/command/schematool/package-functions.html @@ -0,0 +1,69 @@ + + + + + + + + + + + +Functions (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +

Functions

+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/orm/tools/console/command/schematool/package-globals.html b/lib/api/doctrine/orm/tools/console/command/schematool/package-globals.html new file mode 100644 index 000000000..292bd3dfc --- /dev/null +++ b/lib/api/doctrine/orm/tools/console/command/schematool/package-globals.html @@ -0,0 +1,69 @@ + + + + + + + + + + + +Globals (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +

Globals

+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/orm/tools/console/command/schematool/package-summary.html b/lib/api/doctrine/orm/tools/console/command/schematool/package-summary.html new file mode 100644 index 000000000..65879393f --- /dev/null +++ b/lib/api/doctrine/orm/tools/console/command/schematool/package-summary.html @@ -0,0 +1,67 @@ + + + + + + + + + + + +Doctrine\ORM\Tools\Console\Command\SchemaTool (Doctrine) + + + + +
+

Doctrine

+ +
+ + +
+ +

Namespace Doctrine\ORM\Tools\Console\Command\SchemaTool

+ + + + + + + +
Class Summary
AbstractCommand
CreateCommandCommand to create the database schema for a set of classes based on their mappings.
DropCommandCommand to drop the database schema for a set of classes based on their mappings.
UpdateCommandCommand to update the database schema for a set of classes based on their mappings.
+ +
+ +
+

Doctrine

+ +
+ + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/orm/tools/console/command/schematool/package-tree.html b/lib/api/doctrine/orm/tools/console/command/schematool/package-tree.html new file mode 100644 index 000000000..2012e4935 --- /dev/null +++ b/lib/api/doctrine/orm/tools/console/command/schematool/package-tree.html @@ -0,0 +1,53 @@ + + + + + + + + + + + +Doctrine\ORM\Tools\Console\Command\SchemaTool (Doctrine) + + + + +
+

Doctrine

+ +
+ + +

Class Hierarchy for Package Doctrine\ORM\Tools\Console\Command\SchemaTool

+

Doctrine

+ +
+ + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/orm/tools/console/command/schematool/updatecommand.html b/lib/api/doctrine/orm/tools/console/command/schematool/updatecommand.html new file mode 100644 index 000000000..a96827726 --- /dev/null +++ b/lib/api/doctrine/orm/tools/console/command/schematool/updatecommand.html @@ -0,0 +1,136 @@ + + + + + + + + + + + +UpdateCommand (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +
Doctrine\ORM\Tools\Console\Command\SchemaTool\UpdateCommand
+
/Doctrine/ORM/Tools/Console/Command/SchemaTool/UpdateCommand.php at line 42
+ +

Class UpdateCommand

+ +
Class:UpdateCommand - Superclass: AbstractCommand
+Class:AbstractCommand - Superclass: Command
+Command
⌊ AbstractCommand
⌊ UpdateCommand
+ +
+ +

public class UpdateCommand
extends AbstractCommand + +

+ +

Command to update the database schema for a set of classes based on their mappings.

+ +
+
License:
+
http://www.opensource.org/licenses/lgpl-license.php LGPL
+
See Also:
+
www.doctrine-project.org
+
Since:
+
2.0
+
Version:
+
$Revision$
+
Author:
+
Benjamin Eberlei
+
Guilherme Blanco
+
Jonathan Wage
+
Roman Borschel
+
+
+ + + + + + + + + + + +
Method Summary
protected void

configure()

protected void

executeSchemaCommand(mixed input, mixed output, mixed schemaTool, mixed metadatas)

+ + + +
Methods inherited from Doctrine\ORM\Tools\Console\Command\SchemaTool\AbstractCommand
execute, executeSchemaCommand
+ +

Method Detail

+
/Doctrine/ORM/Tools/Console/Command/SchemaTool/UpdateCommand.php at line 47
+

configure

+protected void configure() +
+

+
See Also:
+
Console\Command\Command
+
+
+ +
+ +
/Doctrine/ORM/Tools/Console/Command/SchemaTool/UpdateCommand.php at line 72
+

executeSchemaCommand

+protected void executeSchemaCommand(mixed input, mixed output, mixed schemaTool, mixed metadatas) +
+
+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/orm/tools/console/helper/entitymanagerhelper.html b/lib/api/doctrine/orm/tools/console/helper/entitymanagerhelper.html new file mode 100644 index 000000000..ba80e531d --- /dev/null +++ b/lib/api/doctrine/orm/tools/console/helper/entitymanagerhelper.html @@ -0,0 +1,168 @@ + + + + + + + + + + + +EntityManagerHelper (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +
Doctrine\ORM\Tools\Console\Helper\EntityManagerHelper
+
/Doctrine/ORM/Tools/Console/Helper/EntityManagerHelper.php at line 39
+ +

Class EntityManagerHelper

+ +
Class:EntityManagerHelper - Superclass: Helper
+Helper
⌊ EntityManagerHelper
+ +
+ +

public class EntityManagerHelper
extends Helper + +

+ +

Doctrine CLI Connection Helper.

+ +
+
License:
+
http://www.opensource.org/licenses/lgpl-license.php LGPL
+
See Also:
+
www.doctrine-project.org
+
Since:
+
2.0
+
Version:
+
$Revision$
+
Author:
+
Benjamin Eberlei
+
Guilherme Blanco
+
Jonathan Wage
+
Roman Borschel
+
+
+ + + + + + + +
Field Summary
protected EntityManager

$_em

Doctrine ORM EntityManager

+ + + + + + +
Constructor Summary

EntityManagerHelper(mixed em, Connection connection)

Constructor

+ + + + + + + + + + + +
Method Summary
EntityManager

getEntityManager()

Retrieves Doctrine ORM EntityManager

void

getName()

+ +

Field Detail

+
/Doctrine/ORM/Tools/Console/Helper/EntityManagerHelper.php at line 45
+

_em

+protected EntityManager $_em +
+

Doctrine ORM EntityManager

+ +
+ +

Constructor Detail

+
/Doctrine/ORM/Tools/Console/Helper/EntityManagerHelper.php at line 52
+

EntityManagerHelper

+public EntityManagerHelper(mixed em, Connection connection) +
+

Constructor

+
Parameters:
+
connection - Doctrine Database Connection
+
+
+ +
+ +

Method Detail

+
/Doctrine/ORM/Tools/Console/Helper/EntityManagerHelper.php at line 62
+

getEntityManager

+public EntityManager getEntityManager() +
+

Retrieves Doctrine ORM EntityManager

+ +
+ +
/Doctrine/ORM/Tools/Console/Helper/EntityManagerHelper.php at line 70
+

getName

+public void getName() +
+

+
See Also:
+
Helper
+
+
+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/orm/tools/console/helper/package-frame.html b/lib/api/doctrine/orm/tools/console/helper/package-frame.html new file mode 100644 index 000000000..7242bcfad --- /dev/null +++ b/lib/api/doctrine/orm/tools/console/helper/package-frame.html @@ -0,0 +1,26 @@ + + + + + + + + + + + +Doctrine\ORM\Tools\Console\Helper (Doctrine) + + + + +

Doctrine\ORM\Tools\Console\Helper

+ +

Classes

+ + + + + \ No newline at end of file diff --git a/lib/api/doctrine/orm/tools/console/helper/package-functions.html b/lib/api/doctrine/orm/tools/console/helper/package-functions.html new file mode 100644 index 000000000..108aa13d2 --- /dev/null +++ b/lib/api/doctrine/orm/tools/console/helper/package-functions.html @@ -0,0 +1,69 @@ + + + + + + + + + + + +Functions (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +

Functions

+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/orm/tools/console/helper/package-globals.html b/lib/api/doctrine/orm/tools/console/helper/package-globals.html new file mode 100644 index 000000000..7a9dd2a61 --- /dev/null +++ b/lib/api/doctrine/orm/tools/console/helper/package-globals.html @@ -0,0 +1,69 @@ + + + + + + + + + + + +Globals (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +

Globals

+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/orm/tools/console/helper/package-summary.html b/lib/api/doctrine/orm/tools/console/helper/package-summary.html new file mode 100644 index 000000000..2ce0426bc --- /dev/null +++ b/lib/api/doctrine/orm/tools/console/helper/package-summary.html @@ -0,0 +1,64 @@ + + + + + + + + + + + +Doctrine\ORM\Tools\Console\Helper (Doctrine) + + + + +
+

Doctrine

+ +
+ + +
+ +

Namespace Doctrine\ORM\Tools\Console\Helper

+ + + + +
Class Summary
EntityManagerHelperDoctrine CLI Connection Helper.
+ +
+ +
+

Doctrine

+ +
+ + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/orm/tools/console/helper/package-tree.html b/lib/api/doctrine/orm/tools/console/helper/package-tree.html new file mode 100644 index 000000000..a7adf455f --- /dev/null +++ b/lib/api/doctrine/orm/tools/console/helper/package-tree.html @@ -0,0 +1,53 @@ + + + + + + + + + + + +Doctrine\ORM\Tools\Console\Helper (Doctrine) + + + + +
+

Doctrine

+ +
+ + +

Class Hierarchy for Package Doctrine\ORM\Tools\Console\Helper

+

Doctrine

+ +
+ + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/orm/tools/console/metadatafilter.html b/lib/api/doctrine/orm/tools/console/metadatafilter.html new file mode 100644 index 000000000..734448192 --- /dev/null +++ b/lib/api/doctrine/orm/tools/console/metadatafilter.html @@ -0,0 +1,155 @@ + + + + + + + + + + + +MetadataFilter (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +
Doctrine\ORM\Tools\Console\MetadataFilter
+
/Doctrine/ORM/Tools/Console/MetadataFilter.php at line 36
+ +

Class MetadataFilter

+ +
Class:MetadataFilter - Superclass: FilterIterator
+FilterIterator
⌊ MetadataFilter
+ +
+ +

public class MetadataFilter
extends FilterIterator + +

+ +

Used by CLI Tools to restrict entity-based commands to given patterns.

+ +
+
License:
+
http://www.opensource.org/licenses/lgpl-license.php LGPL
+
See Also:
+
www.doctrine-project.com
+
Since:
+
1.0
+
Version:
+
$Revision$
+
Author:
+
Benjamin Eberlei
+
Guilherme Blanco
+
Jonathan Wage
+
Roman Borschel
+
+
+ + + + + + +
Constructor Summary

MetadataFilter(mixed metadata, mixed filter)

+ + + + + + + + + + + + + + + +
Method Summary
void

accept()

void

count()

static array

filter(array metadatas, array|string filter)

Filter Metadatas by one or more filter options.

+ +

Constructor Detail

+
/Doctrine/ORM/Tools/Console/MetadataFilter.php at line 53
+

MetadataFilter

+public MetadataFilter(mixed metadata, mixed filter) +
+
+ +
+ +

Method Detail

+
/Doctrine/ORM/Tools/Console/MetadataFilter.php at line 59
+

accept

+public void accept() +
+
+ +
+ +
/Doctrine/ORM/Tools/Console/MetadataFilter.php at line 76
+

count

+public void count() +
+
+ +
+ +
/Doctrine/ORM/Tools/Console/MetadataFilter.php at line 45
+

filter

+public static array filter(array metadatas, array|string filter) +
+

Filter Metadatas by one or more filter options.

+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/orm/tools/console/package-frame.html b/lib/api/doctrine/orm/tools/console/package-frame.html new file mode 100644 index 000000000..03b914e07 --- /dev/null +++ b/lib/api/doctrine/orm/tools/console/package-frame.html @@ -0,0 +1,26 @@ + + + + + + + + + + + +Doctrine\ORM\Tools\Console (Doctrine) + + + + +

Doctrine\ORM\Tools\Console

+ +

Classes

+ + + + + \ No newline at end of file diff --git a/lib/api/doctrine/orm/tools/console/package-functions.html b/lib/api/doctrine/orm/tools/console/package-functions.html new file mode 100644 index 000000000..e6fd6538b --- /dev/null +++ b/lib/api/doctrine/orm/tools/console/package-functions.html @@ -0,0 +1,69 @@ + + + + + + + + + + + +Functions (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +

Functions

+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/orm/tools/console/package-globals.html b/lib/api/doctrine/orm/tools/console/package-globals.html new file mode 100644 index 000000000..aa4ca7d61 --- /dev/null +++ b/lib/api/doctrine/orm/tools/console/package-globals.html @@ -0,0 +1,69 @@ + + + + + + + + + + + +Globals (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +

Globals

+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/orm/tools/console/package-summary.html b/lib/api/doctrine/orm/tools/console/package-summary.html new file mode 100644 index 000000000..ed295f30b --- /dev/null +++ b/lib/api/doctrine/orm/tools/console/package-summary.html @@ -0,0 +1,64 @@ + + + + + + + + + + + +Doctrine\ORM\Tools\Console (Doctrine) + + + + +
+

Doctrine

+ +
+ + +
+ +

Namespace Doctrine\ORM\Tools\Console

+ + + + +
Class Summary
MetadataFilterUsed by CLI Tools to restrict entity-based commands to given patterns.
+ +
+ +
+

Doctrine

+ +
+ + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/orm/tools/console/package-tree.html b/lib/api/doctrine/orm/tools/console/package-tree.html new file mode 100644 index 000000000..c4d628559 --- /dev/null +++ b/lib/api/doctrine/orm/tools/console/package-tree.html @@ -0,0 +1,53 @@ + + + + + + + + + + + +Doctrine\ORM\Tools\Console (Doctrine) + + + + +
+

Doctrine

+ +
+ + +

Class Hierarchy for Package Doctrine\ORM\Tools\Console

+

Doctrine

+ +
+ + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/orm/tools/convertdoctrine1schema.html b/lib/api/doctrine/orm/tools/convertdoctrine1schema.html new file mode 100644 index 000000000..2dcacc7c1 --- /dev/null +++ b/lib/api/doctrine/orm/tools/convertdoctrine1schema.html @@ -0,0 +1,139 @@ + + + + + + + + + + + +ConvertDoctrine1Schema (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +
Doctrine\ORM\Tools\ConvertDoctrine1Schema
+
/Doctrine/ORM/Tools/ConvertDoctrine1Schema.php at line 39
+ +

Class ConvertDoctrine1Schema

+ +
ConvertDoctrine1Schema
+ +
+ +

public class ConvertDoctrine1Schema

+ +

Class to help with converting Doctrine 1 schema files to Doctrine 2 mapping files

+ +
+
License:
+
http://www.opensource.org/licenses/lgpl-license.php LGPL
+
See Also:
+
www.doctrine-project.org
+
Since:
+
2.0
+
Version:
+
$Revision$
+
Author:
+
Guilherme Blanco
+
Jonathan Wage
+
Roman Borschel
+
+
+ + + + + + +
Constructor Summary

ConvertDoctrine1Schema(array from)

Constructor passes the directory or array of directories +to convert the Doctrine 1 schema files from

+ + + + + + + +
Method Summary
array

getMetadatas()

Get an array of ClassMetadataInfo instances from the passed +Doctrine 1 schema

+ +

Constructor Detail

+
/Doctrine/ORM/Tools/ConvertDoctrine1Schema.php at line 54
+

ConvertDoctrine1Schema

+public ConvertDoctrine1Schema(array from) +
+

Constructor passes the directory or array of directories +to convert the Doctrine 1 schema files from

+
Author:
+
Jonathan Wage
+
+
+ +
+ +

Method Detail

+
/Doctrine/ORM/Tools/ConvertDoctrine1Schema.php at line 65
+

getMetadatas

+public array getMetadatas() +
+

Get an array of ClassMetadataInfo instances from the passed +Doctrine 1 schema

+
Returns:
+
$metadatas An array of ClassMetadataInfo instances
+
+
+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/orm/tools/entitygenerator.html b/lib/api/doctrine/orm/tools/entitygenerator.html new file mode 100644 index 000000000..16c0fd118 --- /dev/null +++ b/lib/api/doctrine/orm/tools/entitygenerator.html @@ -0,0 +1,246 @@ + + + + + + + + + + + +EntityGenerator (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +
Doctrine\ORM\Tools\EntityGenerator
+
/Doctrine/ORM/Tools/EntityGenerator.php at line 50
+ +

Class EntityGenerator

+ +
EntityGenerator
+ +
+ +

public class EntityGenerator

+ +

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');

+ +
+
License:
+
http://www.opensource.org/licenses/lgpl-license.php LGPL
+
See Also:
+
www.doctrine-project.org
+
Since:
+
2.0
+
Version:
+
$Revision$
+
Author:
+
Benjamin Eberlei
+
Guilherme Blanco
+
Jonathan Wage
+
Roman Borschel
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Method Summary
void

generate(array metadatas, string outputDirectory)

Generate and write entity classes for the given array of ClassMetadataInfo instances

string

generateEntityClass(ClassMetadataInfo metadata)

Generate a PHP5 Doctrine 2 entity class from the given ClassMetadataInfo instance

string

generateUpdatedEntityClass(ClassMetadataInfo metadata, string path)

Generate the updated code for the given ClassMetadataInfo and entity at path

void

setClassToExtend(mixed classToExtend)

Set the name of the class the generated classes should extend from

void

setExtension(string extension)

Set the extension to use when writing php files to disk

void

setGenerateAnnotations(bool bool)

Set whether or not to generate annotations for the entity

void

setGenerateStubMethods(bool bool)

Set whether or not to generate stub methods for the entity

void

setNumSpaces(integer numSpaces)

Set the number of spaces the exported class should have

void

setRegenerateEntityIfExists(bool bool)

Set whether or not to regenerate the entity if it exists

void

setUpdateEntityIfExists(bool bool)

Set whether or not to try and update the entity if it already exists

void

writeEntityClass(ClassMetadataInfo metadata, string outputDirectory)

Generated and write entity class to disk for the given ClassMetadataInfo instance

+ +

Method Detail

+
/Doctrine/ORM/Tools/EntityGenerator.php at line 142
+

generate

+public void generate(array metadatas, string outputDirectory) +
+

Generate and write entity classes for the given array of ClassMetadataInfo instances

+ +
+ +
/Doctrine/ORM/Tools/EntityGenerator.php at line 188
+

generateEntityClass

+public string generateEntityClass(ClassMetadataInfo metadata) +
+

Generate a PHP5 Doctrine 2 entity class from the given ClassMetadataInfo instance

+
Returns:
+
$code
+
+
+ +
+ +
/Doctrine/ORM/Tools/EntityGenerator.php at line 216
+

generateUpdatedEntityClass

+public string generateUpdatedEntityClass(ClassMetadataInfo metadata, string path) +
+

Generate the updated code for the given ClassMetadataInfo and entity at path

+
Returns:
+
$code;
+
+
+ +
+ +
/Doctrine/ORM/Tools/EntityGenerator.php at line 254
+

setClassToExtend

+public void setClassToExtend(mixed classToExtend) +
+

Set the name of the class the generated classes should extend from

+ +
+ +
/Doctrine/ORM/Tools/EntityGenerator.php at line 244
+

setExtension

+public void setExtension(string extension) +
+

Set the extension to use when writing php files to disk

+ +
+ +
/Doctrine/ORM/Tools/EntityGenerator.php at line 265
+

setGenerateAnnotations

+public void setGenerateAnnotations(bool bool) +
+

Set whether or not to generate annotations for the entity

+ +
+ +
/Doctrine/ORM/Tools/EntityGenerator.php at line 298
+

setGenerateStubMethods

+public void setGenerateStubMethods(bool bool) +
+

Set whether or not to generate stub methods for the entity

+ +
+ +
/Doctrine/ORM/Tools/EntityGenerator.php at line 232
+

setNumSpaces

+public void setNumSpaces(integer numSpaces) +
+

Set the number of spaces the exported class should have

+ +
+ +
/Doctrine/ORM/Tools/EntityGenerator.php at line 287
+

setRegenerateEntityIfExists

+public void setRegenerateEntityIfExists(bool bool) +
+

Set whether or not to regenerate the entity if it exists

+ +
+ +
/Doctrine/ORM/Tools/EntityGenerator.php at line 276
+

setUpdateEntityIfExists

+public void setUpdateEntityIfExists(bool bool) +
+

Set whether or not to try and update the entity if it already exists

+ +
+ +
/Doctrine/ORM/Tools/EntityGenerator.php at line 156
+

writeEntityClass

+public void writeEntityClass(ClassMetadataInfo metadata, string outputDirectory) +
+

Generated and write entity class to disk for the given ClassMetadataInfo instance

+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/orm/tools/event/generateschemaeventargs.html b/lib/api/doctrine/orm/tools/event/generateschemaeventargs.html new file mode 100644 index 000000000..ac49c6b37 --- /dev/null +++ b/lib/api/doctrine/orm/tools/event/generateschemaeventargs.html @@ -0,0 +1,140 @@ + + + + + + + + + + + +GenerateSchemaEventArgs (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +
Doctrine\ORM\Tools\Event\GenerateSchemaEventArgs
+
/Doctrine/ORM/Tools/Event/GenerateSchemaEventArgs.php at line 36
+ +

Class GenerateSchemaEventArgs

+ +
Class:GenerateSchemaEventArgs - Superclass: Doctrine
+Doctrine
⌊ GenerateSchemaEventArgs
+ +
+ +

public class GenerateSchemaEventArgs
extends Doctrine + +

+ +

Event Args used for the Events::postGenerateSchema event.

+ +
+
License:
+
http://www.opensource.org/licenses/lgpl-license.php LGPL
+
See Also:
+
www.doctrine-project.com
+
Since:
+
1.0
+
Version:
+
$Revision$
+
Author:
+
Benjamin Eberlei
+
+
+ + + + + + +
Constructor Summary

GenerateSchemaEventArgs(mixed em, Schema schema, ClassMetadata classMetadata, Table classTable)

+ + + + + + + + + + + +
Method Summary
EntityManager

getEntityManager()

Schema

getSchema()

+ +

Constructor Detail

+
/Doctrine/ORM/Tools/Event/GenerateSchemaEventArgs.php at line 46
+

GenerateSchemaEventArgs

+public GenerateSchemaEventArgs(mixed em, Schema schema, ClassMetadata classMetadata, Table classTable) +
+

+ +
+ +

Method Detail

+
/Doctrine/ORM/Tools/Event/GenerateSchemaEventArgs.php at line 55
+

getEntityManager

+public EntityManager getEntityManager() +
+

+ +
+ +
/Doctrine/ORM/Tools/Event/GenerateSchemaEventArgs.php at line 62
+

getSchema

+public Schema getSchema() +
+

+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/orm/tools/event/generateschematableeventargs.html b/lib/api/doctrine/orm/tools/event/generateschematableeventargs.html new file mode 100644 index 000000000..0481fa212 --- /dev/null +++ b/lib/api/doctrine/orm/tools/event/generateschematableeventargs.html @@ -0,0 +1,152 @@ + + + + + + + + + + + +GenerateSchemaTableEventArgs (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +
Doctrine\ORM\Tools\Event\GenerateSchemaTableEventArgs
+
/Doctrine/ORM/Tools/Event/GenerateSchemaTableEventArgs.php at line 37
+ +

Class GenerateSchemaTableEventArgs

+ +
Class:GenerateSchemaTableEventArgs - Superclass: Doctrine
+Doctrine
⌊ GenerateSchemaTableEventArgs
+ +
+ +

public class GenerateSchemaTableEventArgs
extends Doctrine + +

+ +

Event Args used for the Events::postGenerateSchemaTable event.

+ +
+
License:
+
http://www.opensource.org/licenses/lgpl-license.php LGPL
+
See Also:
+
www.doctrine-project.com
+
Since:
+
1.0
+
Version:
+
$Revision$
+
Author:
+
Benjamin Eberlei
+
+
+ + + + + + +
Constructor Summary

GenerateSchemaTableEventArgs(ClassMetadata classMetadata, Schema schema, Table classTable)

+ + + + + + + + + + + + + + + +
Method Summary
ClassMetadata

getClassMetadata()

Table

getClassTable()

Schema

getSchema()

+ +

Constructor Detail

+
/Doctrine/ORM/Tools/Event/GenerateSchemaTableEventArgs.php at line 48
+

GenerateSchemaTableEventArgs

+public GenerateSchemaTableEventArgs(ClassMetadata classMetadata, Schema schema, Table classTable) +
+

+ +
+ +

Method Detail

+
/Doctrine/ORM/Tools/Event/GenerateSchemaTableEventArgs.php at line 58
+

getClassMetadata

+public ClassMetadata getClassMetadata() +
+

+ +
+ +
/Doctrine/ORM/Tools/Event/GenerateSchemaTableEventArgs.php at line 72
+

getClassTable

+public Table getClassTable() +
+

+ +
+ +
/Doctrine/ORM/Tools/Event/GenerateSchemaTableEventArgs.php at line 65
+

getSchema

+public Schema getSchema() +
+

+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/orm/tools/event/package-frame.html b/lib/api/doctrine/orm/tools/event/package-frame.html new file mode 100644 index 000000000..3307308f9 --- /dev/null +++ b/lib/api/doctrine/orm/tools/event/package-frame.html @@ -0,0 +1,27 @@ + + + + + + + + + + + +Doctrine\ORM\Tools\Event (Doctrine) + + + + +

Doctrine\ORM\Tools\Event

+ +

Classes

+ + + + + \ No newline at end of file diff --git a/lib/api/doctrine/orm/tools/event/package-functions.html b/lib/api/doctrine/orm/tools/event/package-functions.html new file mode 100644 index 000000000..6d449ca99 --- /dev/null +++ b/lib/api/doctrine/orm/tools/event/package-functions.html @@ -0,0 +1,69 @@ + + + + + + + + + + + +Functions (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +

Functions

+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/orm/tools/event/package-globals.html b/lib/api/doctrine/orm/tools/event/package-globals.html new file mode 100644 index 000000000..9d9c8eec9 --- /dev/null +++ b/lib/api/doctrine/orm/tools/event/package-globals.html @@ -0,0 +1,69 @@ + + + + + + + + + + + +Globals (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +

Globals

+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/orm/tools/event/package-summary.html b/lib/api/doctrine/orm/tools/event/package-summary.html new file mode 100644 index 000000000..715b9a2de --- /dev/null +++ b/lib/api/doctrine/orm/tools/event/package-summary.html @@ -0,0 +1,65 @@ + + + + + + + + + + + +Doctrine\ORM\Tools\Event (Doctrine) + + + + +
+

Doctrine

+ +
+ + +
+ +

Namespace Doctrine\ORM\Tools\Event

+ + + + + +
Class Summary
GenerateSchemaEventArgsEvent Args used for the Events::postGenerateSchema event.
GenerateSchemaTableEventArgsEvent Args used for the Events::postGenerateSchemaTable event.
+ +
+ +
+

Doctrine

+ +
+ + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/orm/tools/event/package-tree.html b/lib/api/doctrine/orm/tools/event/package-tree.html new file mode 100644 index 000000000..a00f0eb9b --- /dev/null +++ b/lib/api/doctrine/orm/tools/event/package-tree.html @@ -0,0 +1,53 @@ + + + + + + + + + + + +Doctrine\ORM\Tools\Event (Doctrine) + + + + +
+

Doctrine

+ +
+ + +

Class Hierarchy for Package Doctrine\ORM\Tools\Event

+

Doctrine

+ +
+ + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/orm/tools/export/classmetadataexporter.html b/lib/api/doctrine/orm/tools/export/classmetadataexporter.html new file mode 100644 index 000000000..54f26f2f6 --- /dev/null +++ b/lib/api/doctrine/orm/tools/export/classmetadataexporter.html @@ -0,0 +1,209 @@ + + + + + + + + + + + +ClassMetadataExporter (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +
Doctrine\ORM\Tools\Export\ClassMetadataExporter
+
/Doctrine/ORM/Tools/Export/ClassMetadataExporter.php at line 54
+ +

Class ClassMetadataExporter

+ +
ClassMetadataExporter
+ +
+ +

public class ClassMetadataExporter

+ +

Class used for converting your mapping information between the +supported formats: yaml, xml, and php/annotation.

[php] +Unify all your mapping information which is written in php, xml, yml +and convert it to a single set of yaml files.

$cme = new Doctrine\ORM\Tools\Export\ClassMetadataExporter(); +$cme->addMappingSource(__DIR__ . '/Entities'); +$cme->addMappingSource(__DIR__ . '/xml'); +$cme->addMappingSource(__DIR__ . '/yaml');

$exporter = $cme->getExporter('yaml'); +$exporter->setOutputDir(__DIR__ . '/new_yaml');

$exporter->setMetadatas($cme->getMetadatas()); +$exporter->export();

+ +
+
License:
+
http://www.opensource.org/licenses/lgpl-license.php LGPL
+
See Also:
+
www.doctrine-project.org
+
Since:
+
2.0
+
Version:
+
$Revision$
+
Author:
+
Jonathan Wage
+
+
+ + + + + + +
Constructor Summary

ClassMetadataExporter()

+ + + + + + + + + + + + + + + + + + + + + + + +
Method Summary
void

addMappingSource(string source, string type)

Add a new mapping directory to the array of directories to convert and export +to another format[php] +$cme = new Doctrine\ORM\Tools\Export\ClassMetadataExporter(); +$cme->addMappingSource(__DIR__ .

AbstractExporter

getExporter(string type, string source)

Get a exporter driver instance

array

getMetadatas()

Get an array of ClassMetadataInfo instances for all the configured mapping +directories.

static void

registerExportDriver(string name, string class)

Register a new exporter driver class under a specified name

void

setEntityManager(EntityManager em)

Optionally set the EntityManager instance to get the AnnotationDriver +from instead of creating a new instance of the AnnotationDriver

+ +

Constructor Detail

+
/Doctrine/ORM/Tools/Export/ClassMetadataExporter.php at line 64
+

ClassMetadataExporter

+public ClassMetadataExporter() +
+
+ +
+ +

Method Detail

+
/Doctrine/ORM/Tools/Export/ClassMetadataExporter.php at line 123
+

addMappingSource

+public void addMappingSource(string source, string type) +
+

Add a new mapping directory to the array of directories to convert and export +to another format

[php] +$cme = new Doctrine\ORM\Tools\Export\ClassMetadataExporter(); +$cme->addMappingSource(__DIR__ . '/yaml'); +$cme->addMappingSource($schemaManager);

+
Parameters:
+
source - The source for the mapping files
+
type - The type of mapping files (yml, xml, etc.)
+
+
+ +
+ +
/Doctrine/ORM/Tools/Export/ClassMetadataExporter.php at line 99
+

getExporter

+public AbstractExporter getExporter(string type, string source) +
+

Get a exporter driver instance

+
Parameters:
+
type - The type to get (yml, xml, etc.)
+
source - The directory where the exporter will export to
+
Returns:
+
$exporter
+
+
+ +
+ +
/Doctrine/ORM/Tools/Export/ClassMetadataExporter.php at line 135
+

getMetadatas

+public array getMetadatas() +
+

Get an array of ClassMetadataInfo instances for all the configured mapping +directories. Reads the mapping directories and populates ClassMetadataInfo +instances.

+
Returns:
+
$classes
+
+
+ +
+ +
/Doctrine/ORM/Tools/Export/ClassMetadataExporter.php at line 75
+

registerExportDriver

+public static void registerExportDriver(string name, string class) +
+

Register a new exporter driver class under a specified name

+ +
+ +
/Doctrine/ORM/Tools/Export/ClassMetadataExporter.php at line 87
+

setEntityManager

+public void setEntityManager(EntityManager em) +
+

Optionally set the EntityManager instance to get the AnnotationDriver +from instead of creating a new instance of the AnnotationDriver

+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/orm/tools/export/driver/abstractexporter.html b/lib/api/doctrine/orm/tools/export/driver/abstractexporter.html new file mode 100644 index 000000000..076d46d65 --- /dev/null +++ b/lib/api/doctrine/orm/tools/export/driver/abstractexporter.html @@ -0,0 +1,248 @@ + + + + + + + + + + + +AbstractExporter (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +
Doctrine\ORM\Tools\Export\Driver\AbstractExporter
+
/Doctrine/ORM/Tools/Export/Driver/AbstractExporter.php at line 37
+ +

Class AbstractExporter

+ +
AbstractExporter
+ +
+ +

public abstract class AbstractExporter

+ +

Abstract base class which is to be used for the Exporter drivers +which can be found in Doctrine\ORM\Tools\Export\Driver

+ +
+
License:
+
http://www.opensource.org/licenses/lgpl-license.php LGPL
+
See Also:
+
www.doctrine-project.org
+
Since:
+
2.0
+
Version:
+
$Revision$
+
Author:
+
Jonathan Wage
+
+
+ + + + + + + + + + + + + + + +
Field Summary
protected mixed

$_extension

protected mixed

$_metadatas

protected mixed

$_outputDir

+ + + + + + +
Constructor Summary

AbstractExporter(mixed dir)

+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
Method Summary
void

export()

Export each ClassMetadata instance to a single Doctrine Mapping file +named after the entity

abstract mixed

exportClassMetadata(ClassMetadataInfo metadata)

Converts a single ClassMetadata instance to the exported format +and returns it

string

getExtension()

Get the extension used to generated the path to a class

void

setExtension(string extension)

Set the directory to output the mapping files to[php] +$exporter = new YamlExporter($metadatas, __DIR__ .

void

setMetadatas(array metadatas)

Set the array of ClassMetadataInfo instances to export

void

setOutputDir(string dir)

Set the directory to output the mapping files to[php] +$exporter = new YamlExporter($metadatas); +$exporter->setOutputDir(__DIR__ .

+ +

Field Detail

+
/Doctrine/ORM/Tools/Export/Driver/AbstractExporter.php at line 41
+

_extension

+protected mixed $_extension +
+
+ +
+ +
/Doctrine/ORM/Tools/Export/Driver/AbstractExporter.php at line 39
+

_metadatas

+protected mixed $_metadatas = array() +
+
+ +
+ +
/Doctrine/ORM/Tools/Export/Driver/AbstractExporter.php at line 40
+

_outputDir

+protected mixed $_outputDir +
+
+ +
+ +

Constructor Detail

+
/Doctrine/ORM/Tools/Export/Driver/AbstractExporter.php at line 43
+

AbstractExporter

+public AbstractExporter(mixed dir) +
+
+ +
+ +

Method Detail

+
/Doctrine/ORM/Tools/Export/Driver/AbstractExporter.php at line 100
+

export

+public void export() +
+

Export each ClassMetadata instance to a single Doctrine Mapping file +named after the entity

+ +
+ +
/Doctrine/ORM/Tools/Export/Driver/AbstractExporter.php at line 55
+

exportClassMetadata

+public abstract mixed exportClassMetadata(ClassMetadataInfo metadata) +
+

Converts a single ClassMetadata instance to the exported format +and returns it

+
Returns:
+
$exported
+
+
+ +
+ +
/Doctrine/ORM/Tools/Export/Driver/AbstractExporter.php at line 73
+

getExtension

+public string getExtension() +
+

Get the extension used to generated the path to a class

+
Returns:
+
$extension
+
+
+ +
+ +
/Doctrine/ORM/Tools/Export/Driver/AbstractExporter.php at line 139
+

setExtension

+public void setExtension(string extension) +
+

Set the directory to output the mapping files to

[php] +$exporter = new YamlExporter($metadatas, __DIR__ . '/yaml'); +$exporter->setExtension('.yml'); +$exporter->export();

+ +
+ +
/Doctrine/ORM/Tools/Export/Driver/AbstractExporter.php at line 63
+

setMetadatas

+public void setMetadatas(array metadatas) +
+

Set the array of ClassMetadataInfo instances to export

+ +
+ +
/Doctrine/ORM/Tools/Export/Driver/AbstractExporter.php at line 89
+

setOutputDir

+public void setOutputDir(string dir) +
+

Set the directory to output the mapping files to

[php] +$exporter = new YamlExporter($metadatas); +$exporter->setOutputDir(__DIR__ . '/yaml'); +$exporter->export();

+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/orm/tools/export/driver/annotationexporter.html b/lib/api/doctrine/orm/tools/export/driver/annotationexporter.html new file mode 100644 index 000000000..88a42057e --- /dev/null +++ b/lib/api/doctrine/orm/tools/export/driver/annotationexporter.html @@ -0,0 +1,155 @@ + + + + + + + + + + + +AnnotationExporter (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +
Doctrine\ORM\Tools\Export\Driver\AnnotationExporter
+
/Doctrine/ORM/Tools/Export/Driver/AnnotationExporter.php at line 38
+ +

Class AnnotationExporter

+ +
Class:AnnotationExporter - Superclass: AbstractExporter
+AbstractExporter
⌊ AnnotationExporter
+ +
+ +

public class AnnotationExporter
extends AbstractExporter + +

+ +

ClassMetadata exporter for PHP classes with annotations

+ +
+
License:
+
http://www.opensource.org/licenses/lgpl-license.php LGPL
+
See Also:
+
www.doctrine-project.org
+
Since:
+
2.0
+
Version:
+
$Revision$
+
Author:
+
Jonathan Wage
+
+
+ + + + + + + +
Field Summary
protected mixed

$_extension

+ + + +
Fields inherited from Doctrine\ORM\Tools\Export\Driver\AbstractExporter
_extension, _metadatas, _outputDir
+ + + + + + + + + + + +
Method Summary
string

exportClassMetadata(ClassMetadataInfo metadata)

Converts a single ClassMetadata instance to the exported format +and returns it

void

setEntityGenerator(mixed entityGenerator)

+ + + +
Methods inherited from Doctrine\ORM\Tools\Export\Driver\AbstractExporter
export, exportClassMetadata, getExtension, setExtension, setMetadatas, setOutputDir
+ +

Field Detail

+
/Doctrine/ORM/Tools/Export/Driver/AnnotationExporter.php at line 40
+

_extension

+protected mixed $_extension = '.php' +
+
+ +
+ +

Method Detail

+
/Doctrine/ORM/Tools/Export/Driver/AnnotationExporter.php at line 50
+

exportClassMetadata

+public string exportClassMetadata(ClassMetadataInfo metadata) +
+

Converts a single ClassMetadata instance to the exported format +and returns it

+
Returns:
+
$exported
+
+
+ +
+ +
/Doctrine/ORM/Tools/Export/Driver/AnnotationExporter.php at line 65
+

setEntityGenerator

+public void setEntityGenerator(mixed entityGenerator) +
+
+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/orm/tools/export/driver/package-frame.html b/lib/api/doctrine/orm/tools/export/driver/package-frame.html new file mode 100644 index 000000000..443e2b2df --- /dev/null +++ b/lib/api/doctrine/orm/tools/export/driver/package-frame.html @@ -0,0 +1,30 @@ + + + + + + + + + + + +Doctrine\ORM\Tools\Export\Driver (Doctrine) + + + + +

Doctrine\ORM\Tools\Export\Driver

+ +

Classes

+ + + + + \ No newline at end of file diff --git a/lib/api/doctrine/orm/tools/export/driver/package-functions.html b/lib/api/doctrine/orm/tools/export/driver/package-functions.html new file mode 100644 index 000000000..9f90900b6 --- /dev/null +++ b/lib/api/doctrine/orm/tools/export/driver/package-functions.html @@ -0,0 +1,69 @@ + + + + + + + + + + + +Functions (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +

Functions

+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/orm/tools/export/driver/package-globals.html b/lib/api/doctrine/orm/tools/export/driver/package-globals.html new file mode 100644 index 000000000..845332ca7 --- /dev/null +++ b/lib/api/doctrine/orm/tools/export/driver/package-globals.html @@ -0,0 +1,69 @@ + + + + + + + + + + + +Globals (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +

Globals

+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/orm/tools/export/driver/package-summary.html b/lib/api/doctrine/orm/tools/export/driver/package-summary.html new file mode 100644 index 000000000..fe71cb1c3 --- /dev/null +++ b/lib/api/doctrine/orm/tools/export/driver/package-summary.html @@ -0,0 +1,69 @@ + + + + + + + + + + + +Doctrine\ORM\Tools\Export\Driver (Doctrine) + + + + +
+

Doctrine

+ +
+ + +
+ +

Namespace Doctrine\ORM\Tools\Export\Driver

+ + + + + + + + +
Class Summary
AbstractExporterAbstract base class which is to be used for the Exporter drivers +which can be found in Doctrine\ORM\Tools\Export\Driver
AnnotationExporterClassMetadata exporter for PHP classes with annotations
PhpExporterClassMetadata exporter for PHP code
XmlExporterClassMetadata exporter for Doctrine XML mapping files
YamlExporterClassMetadata exporter for Doctrine YAML mapping files
+ +
+ +
+

Doctrine

+ +
+ + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/orm/tools/export/driver/package-tree.html b/lib/api/doctrine/orm/tools/export/driver/package-tree.html new file mode 100644 index 000000000..28d6fed70 --- /dev/null +++ b/lib/api/doctrine/orm/tools/export/driver/package-tree.html @@ -0,0 +1,62 @@ + + + + + + + + + + + +Doctrine\ORM\Tools\Export\Driver (Doctrine) + + + + +
+

Doctrine

+ +
+ + +

Class Hierarchy for Package Doctrine\ORM\Tools\Export\Driver

+
+

Doctrine

+ +
+ + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/orm/tools/export/driver/phpexporter.html b/lib/api/doctrine/orm/tools/export/driver/phpexporter.html new file mode 100644 index 000000000..22aa8411a --- /dev/null +++ b/lib/api/doctrine/orm/tools/export/driver/phpexporter.html @@ -0,0 +1,143 @@ + + + + + + + + + + + +PhpExporter (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +
Doctrine\ORM\Tools\Export\Driver\PhpExporter
+
/Doctrine/ORM/Tools/Export/Driver/PhpExporter.php at line 36
+ +

Class PhpExporter

+ +
Class:PhpExporter - Superclass: AbstractExporter
+AbstractExporter
⌊ PhpExporter
+ +
+ +

public class PhpExporter
extends AbstractExporter + +

+ +

ClassMetadata exporter for PHP code

+ +
+
License:
+
http://www.opensource.org/licenses/lgpl-license.php LGPL
+
See Also:
+
www.doctrine-project.org
+
Since:
+
2.0
+
Version:
+
$Revision$
+
Author:
+
Jonathan Wage
+
+
+ + + + + + + +
Field Summary
protected mixed

$_extension

+ + + +
Fields inherited from Doctrine\ORM\Tools\Export\Driver\AbstractExporter
_extension, _metadatas, _outputDir
+ + + + + + + +
Method Summary
mixed

exportClassMetadata(ClassMetadataInfo metadata)

Converts a single ClassMetadata instance to the exported format +and returns it

+ + + +
Methods inherited from Doctrine\ORM\Tools\Export\Driver\AbstractExporter
export, exportClassMetadata, getExtension, setExtension, setMetadatas, setOutputDir
+ +

Field Detail

+
/Doctrine/ORM/Tools/Export/Driver/PhpExporter.php at line 38
+

_extension

+protected mixed $_extension = '.php' +
+
+ +
+ +

Method Detail

+
/Doctrine/ORM/Tools/Export/Driver/PhpExporter.php at line 47
+

exportClassMetadata

+public mixed exportClassMetadata(ClassMetadataInfo metadata) +
+

Converts a single ClassMetadata instance to the exported format +and returns it

+
Returns:
+
$exported
+
+
+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/orm/tools/export/driver/xmlexporter.html b/lib/api/doctrine/orm/tools/export/driver/xmlexporter.html new file mode 100644 index 000000000..905c4223b --- /dev/null +++ b/lib/api/doctrine/orm/tools/export/driver/xmlexporter.html @@ -0,0 +1,143 @@ + + + + + + + + + + + +XmlExporter (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +
Doctrine\ORM\Tools\Export\Driver\XmlExporter
+
/Doctrine/ORM/Tools/Export/Driver/XmlExporter.php at line 39
+ +

Class XmlExporter

+ +
Class:XmlExporter - Superclass: AbstractExporter
+AbstractExporter
⌊ XmlExporter
+ +
+ +

public class XmlExporter
extends AbstractExporter + +

+ +

ClassMetadata exporter for Doctrine XML mapping files

+ +
+
License:
+
http://www.opensource.org/licenses/lgpl-license.php LGPL
+
See Also:
+
www.doctrine-project.org
+
Since:
+
2.0
+
Version:
+
$Revision$
+
Author:
+
Jonathan Wage
+
+
+ + + + + + + +
Field Summary
protected mixed

$_extension

+ + + +
Fields inherited from Doctrine\ORM\Tools\Export\Driver\AbstractExporter
_extension, _metadatas, _outputDir
+ + + + + + + +
Method Summary
mixed

exportClassMetadata(ClassMetadataInfo metadata)

Converts a single ClassMetadata instance to the exported format +and returns it

+ + + +
Methods inherited from Doctrine\ORM\Tools\Export\Driver\AbstractExporter
export, exportClassMetadata, getExtension, setExtension, setMetadatas, setOutputDir
+ +

Field Detail

+
/Doctrine/ORM/Tools/Export/Driver/XmlExporter.php at line 41
+

_extension

+protected mixed $_extension = '.dcm.xml' +
+
+ +
+ +

Method Detail

+
/Doctrine/ORM/Tools/Export/Driver/XmlExporter.php at line 50
+

exportClassMetadata

+public mixed exportClassMetadata(ClassMetadataInfo metadata) +
+

Converts a single ClassMetadata instance to the exported format +and returns it

+
Returns:
+
$exported
+
+
+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/orm/tools/export/driver/yamlexporter.html b/lib/api/doctrine/orm/tools/export/driver/yamlexporter.html new file mode 100644 index 000000000..d20d34f07 --- /dev/null +++ b/lib/api/doctrine/orm/tools/export/driver/yamlexporter.html @@ -0,0 +1,143 @@ + + + + + + + + + + + +YamlExporter (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +
Doctrine\ORM\Tools\Export\Driver\YamlExporter
+
/Doctrine/ORM/Tools/Export/Driver/YamlExporter.php at line 39
+ +

Class YamlExporter

+ +
Class:YamlExporter - Superclass: AbstractExporter
+AbstractExporter
⌊ YamlExporter
+ +
+ +

public class YamlExporter
extends AbstractExporter + +

+ +

ClassMetadata exporter for Doctrine YAML mapping files

+ +
+
License:
+
http://www.opensource.org/licenses/lgpl-license.php LGPL
+
See Also:
+
www.doctrine-project.org
+
Since:
+
2.0
+
Version:
+
$Revision$
+
Author:
+
Jonathan Wage
+
+
+ + + + + + + +
Field Summary
protected mixed

$_extension

+ + + +
Fields inherited from Doctrine\ORM\Tools\Export\Driver\AbstractExporter
_extension, _metadatas, _outputDir
+ + + + + + + +
Method Summary
mixed

exportClassMetadata(ClassMetadataInfo metadata)

Converts a single ClassMetadata instance to the exported format +and returns itTODO: Should this code be pulled out in to a toArray() method in ClassMetadata

+ + + +
Methods inherited from Doctrine\ORM\Tools\Export\Driver\AbstractExporter
export, exportClassMetadata, getExtension, setExtension, setMetadatas, setOutputDir
+ +

Field Detail

+
/Doctrine/ORM/Tools/Export/Driver/YamlExporter.php at line 41
+

_extension

+protected mixed $_extension = '.dcm.yml' +
+
+ +
+ +

Method Detail

+
/Doctrine/ORM/Tools/Export/Driver/YamlExporter.php at line 52
+

exportClassMetadata

+public mixed exportClassMetadata(ClassMetadataInfo metadata) +
+

Converts a single ClassMetadata instance to the exported format +and returns it

TODO: Should this code be pulled out in to a toArray() method in ClassMetadata

+
Returns:
+
$exported
+
+
+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/orm/tools/export/exportexception.html b/lib/api/doctrine/orm/tools/export/exportexception.html new file mode 100644 index 000000000..18123e814 --- /dev/null +++ b/lib/api/doctrine/orm/tools/export/exportexception.html @@ -0,0 +1,117 @@ + + + + + + + + + + + +ExportException (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +
Doctrine\ORM\Tools\Export\ExportException
+
/Doctrine/ORM/Tools/Export/ExportException.php at line 7
+ +

Class ExportException

+ +
Class:ExportException - Superclass: ORMException
+Class:ORMException - Superclass: Exception
+Exception
⌊ ORMException
⌊ ExportException
+ +
+ +

public class ExportException
extends ORMException + +

+ +

Base exception class for all ORM exceptions.

+ +
+ + + + + + + + + + + +
Method Summary
static void

invalidExporterDriverType(mixed type)

static void

invalidMappingDriverType(mixed type)

+ + + +
Methods inherited from Doctrine\ORM\ORMException
detachedEntityCannotBeRemoved, entityManagerClosed, entityMissingAssignedId, findByRequiresParameter, invalidEntityState, invalidFindByCall, invalidFlushMode, invalidHydrationMode, invalidResultCacheDriver, metadataCacheNotConfigured, mismatchedEventManager, missingMappingDriverImpl, notSupported, proxyClassesAlwaysRegenerating, queryCacheNotConfigured, removedEntityInCollectionDetected, unknownEntityNamespace, unrecognizedField
+ +

Method Detail

+
/Doctrine/ORM/Tools/Export/ExportException.php at line 9
+

invalidExporterDriverType

+public static void invalidExporterDriverType(mixed type) +
+
+ +
+ +
/Doctrine/ORM/Tools/Export/ExportException.php at line 14
+

invalidMappingDriverType

+public static void invalidMappingDriverType(mixed type) +
+
+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/orm/tools/export/package-frame.html b/lib/api/doctrine/orm/tools/export/package-frame.html new file mode 100644 index 000000000..8ee098e5b --- /dev/null +++ b/lib/api/doctrine/orm/tools/export/package-frame.html @@ -0,0 +1,27 @@ + + + + + + + + + + + +Doctrine\ORM\Tools\Export (Doctrine) + + + + +

Doctrine\ORM\Tools\Export

+ +

Classes

+ + + + + \ No newline at end of file diff --git a/lib/api/doctrine/orm/tools/export/package-functions.html b/lib/api/doctrine/orm/tools/export/package-functions.html new file mode 100644 index 000000000..164a54626 --- /dev/null +++ b/lib/api/doctrine/orm/tools/export/package-functions.html @@ -0,0 +1,69 @@ + + + + + + + + + + + +Functions (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +

Functions

+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/orm/tools/export/package-globals.html b/lib/api/doctrine/orm/tools/export/package-globals.html new file mode 100644 index 000000000..27523de4e --- /dev/null +++ b/lib/api/doctrine/orm/tools/export/package-globals.html @@ -0,0 +1,69 @@ + + + + + + + + + + + +Globals (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +

Globals

+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/orm/tools/export/package-summary.html b/lib/api/doctrine/orm/tools/export/package-summary.html new file mode 100644 index 000000000..b10bba711 --- /dev/null +++ b/lib/api/doctrine/orm/tools/export/package-summary.html @@ -0,0 +1,67 @@ + + + + + + + + + + + +Doctrine\ORM\Tools\Export (Doctrine) + + + + +
+

Doctrine

+ +
+ + +
+ +

Namespace Doctrine\ORM\Tools\Export

+ + + + + +
Class Summary
ClassMetadataExporterClass used for converting your mapping information between the +supported formats: yaml, xml, and php/annotation. +
ExportExceptionBase exception class for all ORM exceptions.
+ +
+ +
+

Doctrine

+ +
+ + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/orm/tools/export/package-tree.html b/lib/api/doctrine/orm/tools/export/package-tree.html new file mode 100644 index 000000000..e3fb4fa1f --- /dev/null +++ b/lib/api/doctrine/orm/tools/export/package-tree.html @@ -0,0 +1,56 @@ + + + + + + + + + + + +Doctrine\ORM\Tools\Export (Doctrine) + + + + +
+

Doctrine

+ +
+ + +

Class Hierarchy for Package Doctrine\ORM\Tools\Export

+
+

Doctrine

+ +
+ + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/orm/tools/package-frame.html b/lib/api/doctrine/orm/tools/package-frame.html new file mode 100644 index 000000000..81f9ad7fc --- /dev/null +++ b/lib/api/doctrine/orm/tools/package-frame.html @@ -0,0 +1,31 @@ + + + + + + + + + + + +Doctrine\ORM\Tools (Doctrine) + + + + +

Doctrine\ORM\Tools

+ +

Classes

+ + + + + \ No newline at end of file diff --git a/lib/api/doctrine/orm/tools/package-functions.html b/lib/api/doctrine/orm/tools/package-functions.html new file mode 100644 index 000000000..18170416d --- /dev/null +++ b/lib/api/doctrine/orm/tools/package-functions.html @@ -0,0 +1,69 @@ + + + + + + + + + + + +Functions (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +

Functions

+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/orm/tools/package-globals.html b/lib/api/doctrine/orm/tools/package-globals.html new file mode 100644 index 000000000..ae7d3e28d --- /dev/null +++ b/lib/api/doctrine/orm/tools/package-globals.html @@ -0,0 +1,69 @@ + + + + + + + + + + + +Globals (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +

Globals

+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/orm/tools/package-summary.html b/lib/api/doctrine/orm/tools/package-summary.html new file mode 100644 index 000000000..3edd710bf --- /dev/null +++ b/lib/api/doctrine/orm/tools/package-summary.html @@ -0,0 +1,78 @@ + + + + + + + + + + + +Doctrine\ORM\Tools (Doctrine) + + + + +
+

Doctrine

+ +
+ + +
+ +

Namespace Doctrine\ORM\Tools

+ + + + + + + + + +
Class Summary
ClassMetadataReaderClass to read metadata mapping information from multiple sources into an array +of ClassMetadataInfo instances. +
ConvertDoctrine1SchemaClass to help with converting Doctrine 1 schema files to Doctrine 2 mapping files
EntityGeneratorGeneric 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');
SchemaToolThe SchemaTool is a tool to create/drop/update database schemas based on +ClassMetadata class descriptors.
ToolEvents
ToolsExceptionBase exception class for all ORM exceptions.
+ +
+ +
+

Doctrine

+ +
+ + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/orm/tools/package-tree.html b/lib/api/doctrine/orm/tools/package-tree.html new file mode 100644 index 000000000..a7283f82d --- /dev/null +++ b/lib/api/doctrine/orm/tools/package-tree.html @@ -0,0 +1,60 @@ + + + + + + + + + + + +Doctrine\ORM\Tools (Doctrine) + + + + +
+

Doctrine

+ +
+ + +

Class Hierarchy for Package Doctrine\ORM\Tools

+
+

Doctrine

+ +
+ + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/orm/tools/schematool.html b/lib/api/doctrine/orm/tools/schematool.html new file mode 100644 index 000000000..51e5e9888 --- /dev/null +++ b/lib/api/doctrine/orm/tools/schematool.html @@ -0,0 +1,221 @@ + + + + + + + + + + + +SchemaTool (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +
Doctrine\ORM\Tools\SchemaTool
+
/Doctrine/ORM/Tools/SchemaTool.php at line 44
+ +

Class SchemaTool

+ +
SchemaTool
+ +
+ +

public class SchemaTool

+ +

The SchemaTool is a tool to create/drop/update database schemas based on +ClassMetadata class descriptors.

+ +
+
License:
+
http://www.opensource.org/licenses/lgpl-license.php LGPL
+
See Also:
+
www.doctrine-project.org
+
Since:
+
2.0
+
Version:
+
$Revision$
+
Author:
+
Guilherme Blanco
+
Jonathan Wage
+
Roman Borschel
+
Benjamin Eberlei
+
+
+ + + + + + +
Constructor Summary

SchemaTool(Doctrine\ORM\EntityManager em)

Initializes a new SchemaTool instance that uses the connection of the +provided EntityManager.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Method Summary
void

createSchema(array classes)

Creates the database schema for the given array of ClassMetadata instances.

void

dropSchema(array classes)

Drops the database schema for the given classes. +

array

getCreateSchemaSql(array classes)

Gets the list of DDL statements that are required to create the database schema for +the given list of ClassMetadata instances.

array

getDropSchemaSql(array classes)

Gets the SQL needed to drop the database schema for the given classes.

Schema

getSchemaFromMetadata(array classes)

From a given set of metadata classes this method creates a Schema instance.

array

getUpdateSchemaSql(array classes, mixed saveMode)

Gets the sequence of SQL statements that need to be performed in order +to bring the given class mappings in-synch with the relational schema.

void

updateSchema(array classes, mixed saveMode)

Updates the database schema of the given classes by comparing the ClassMetadata +instances to the current database schema that is inspected.

+ +

Constructor Detail

+
/Doctrine/ORM/Tools/SchemaTool.php at line 62
+

SchemaTool

+public SchemaTool(Doctrine\ORM\EntityManager em) +
+

Initializes a new SchemaTool instance that uses the connection of the +provided EntityManager.

+ +
+ +

Method Detail

+
/Doctrine/ORM/Tools/SchemaTool.php at line 73
+

createSchema

+public void createSchema(array classes) +
+

Creates the database schema for the given array of ClassMetadata instances.

+ +
+ +
/Doctrine/ORM/Tools/SchemaTool.php at line 469
+

dropSchema

+public void dropSchema(array classes) +
+

Drops the database schema for the given classes.

In any way when an exception is thrown it is supressed since drop was +issued for all classes of the schema and some probably just don't exist.

+ +
+ +
/Doctrine/ORM/Tools/SchemaTool.php at line 90
+

getCreateSchemaSql

+public array getCreateSchemaSql(array classes) +
+

Gets the list of DDL statements that are required to create the database schema for +the given list of ClassMetadata instances.

+
Returns:
+
$sql The SQL statements needed to create the schema for the classes.
+
+
+ +
+ +
/Doctrine/ORM/Tools/SchemaTool.php at line 485
+

getDropSchemaSql

+public array getDropSchemaSql(array classes) +
+

Gets the SQL needed to drop the database schema for the given classes.

+ +
+ +
/Doctrine/ORM/Tools/SchemaTool.php at line 102
+

getSchemaFromMetadata

+public Schema getSchemaFromMetadata(array classes) +
+

From a given set of metadata classes this method creates a Schema instance.

+ +
+ +
/Doctrine/ORM/Tools/SchemaTool.php at line 573
+

getUpdateSchemaSql

+public array getUpdateSchemaSql(array classes, mixed saveMode) +
+

Gets the sequence of SQL statements that need to be performed in order +to bring the given class mappings in-synch with the relational schema.

+
Parameters:
+
classes - The classes to consider.
+
Returns:
+
The sequence of SQL statements.
+
+
+ +
+ +
/Doctrine/ORM/Tools/SchemaTool.php at line 556
+

updateSchema

+public void updateSchema(array classes, mixed saveMode) +
+

Updates the database schema of the given classes by comparing the ClassMetadata +instances to the current database schema that is inspected.

+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/orm/tools/toolevents.html b/lib/api/doctrine/orm/tools/toolevents.html new file mode 100644 index 000000000..0222b9888 --- /dev/null +++ b/lib/api/doctrine/orm/tools/toolevents.html @@ -0,0 +1,115 @@ + + + + + + + + + + + +ToolEvents (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +
Doctrine\ORM\Tools\ToolEvents
+
/Doctrine/ORM/Tools/ToolEvents.php at line 24
+ +

Class ToolEvents

+ +
ToolEvents
+ +
+ +

public class ToolEvents

+ +
+ + + + + + + + + + + +
Field Summary
final string

postGenerateSchema

The postGenerateSchema event is triggered in SchemaTool#getSchemaFromMetadata() +after all entity classes have been transformed into the related Schema structure. +

final string

postGenerateSchemaTable

The postGenerateSchemaTable event occurs in SchemaTool#getSchemaFromMetadata() +whenever an entity class is transformed into its table representation.

+ +

Field Detail

+
/Doctrine/ORM/Tools/ToolEvents.php at line 43
+

postGenerateSchema

+public final string postGenerateSchema = 'postGenerateSchema' +
+

The postGenerateSchema event is triggered in SchemaTool#getSchemaFromMetadata() +after all entity classes have been transformed into the related Schema structure. +The EventArgs contain the EntityManager and the created Schema instance.

+ +
+ +
/Doctrine/ORM/Tools/ToolEvents.php at line 34
+

postGenerateSchemaTable

+public final string postGenerateSchemaTable = 'postGenerateSchemaTable' +
+

The postGenerateSchemaTable event occurs in SchemaTool#getSchemaFromMetadata() +whenever an entity class is transformed into its table representation. It recieves +the current non-complete Schema instance, the Entity Metadata Class instance and +the Schema Table instance of this entity.

+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/orm/tools/toolsexception.html b/lib/api/doctrine/orm/tools/toolsexception.html new file mode 100644 index 000000000..97c48e651 --- /dev/null +++ b/lib/api/doctrine/orm/tools/toolsexception.html @@ -0,0 +1,105 @@ + + + + + + + + + + + +ToolsException (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +
Doctrine\ORM\Tools\ToolsException
+
/Doctrine/ORM/Tools/ToolsException.php at line 5
+ +

Class ToolsException

+ +
Class:ToolsException - Superclass: ORMException
+Class:ORMException - Superclass: Exception
+Exception
⌊ ORMException
⌊ ToolsException
+ +
+ +

public class ToolsException
extends ORMException + +

+ +

Base exception class for all ORM exceptions.

+ +
+ + + + + + + +
Method Summary
static void

couldNotMapDoctrine1Type(mixed type)

+ + + +
Methods inherited from Doctrine\ORM\ORMException
detachedEntityCannotBeRemoved, entityManagerClosed, entityMissingAssignedId, findByRequiresParameter, invalidEntityState, invalidFindByCall, invalidFlushMode, invalidHydrationMode, invalidResultCacheDriver, metadataCacheNotConfigured, mismatchedEventManager, missingMappingDriverImpl, notSupported, proxyClassesAlwaysRegenerating, queryCacheNotConfigured, removedEntityInCollectionDetected, unknownEntityNamespace, unrecognizedField
+ +

Method Detail

+
/Doctrine/ORM/Tools/ToolsException.php at line 6
+

couldNotMapDoctrine1Type

+public static void couldNotMapDoctrine1Type(mixed type) +
+
+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/doctrine/orm/unitofwork.html b/lib/api/doctrine/orm/unitofwork.html new file mode 100644 index 000000000..153a1fec0 --- /dev/null +++ b/lib/api/doctrine/orm/unitofwork.html @@ -0,0 +1,1012 @@ + + + + + + + + + + + +UnitOfWork (Doctrine) + + + + +
+

Doctrine

+ +
+ + + +
+ +
Doctrine\ORM\UnitOfWork
+
/Doctrine/ORM/UnitOfWork.php at line 46
+ +

Class UnitOfWork

+ +
UnitOfWork
+ +
+
All Implemented Interfaces:
+
PropertyChangedListener +
+ +
+ +

public class UnitOfWork

+ +

The UnitOfWork is responsible for tracking changes to objects during an +"object-level" transaction and for writing out changes to the database +in the correct order.

+ +
+
License:
+
http://www.opensource.org/licenses/lgpl-license.php LGPL
+
See Also:
+
www.doctrine-project.org
+
Since:
+
2.0
+
Version:
+
$Revision$
+
Author:
+
Benjamin Eberlei
+
Guilherme Blanco
+
Jonathan Wage
+
Roman Borschel
+
Internal:
+
This class contains performance-critical code.
+
+
+ + + + + + + + + + + + + + + + + + + +
Field Summary
final int

STATE_DETACHED

A detached entity is an instance with a persistent identity that is not +(or no longer) associated with an EntityManager (and a UnitOfWork).

final int

STATE_MANAGED

An entity is in MANAGED state when its persistence is managed by an EntityManager.

final int

STATE_NEW

An entity is new if it has just been instantiated (i.e.

final int

STATE_REMOVED

A removed entity instance is an instance with a persistent identity, +associated with an EntityManager, whose persistent state has been +deleted (or is scheduled for deletion).

+ + + + + + +
Constructor Summary

UnitOfWork(Doctrine\ORM\EntityManager em)

Initializes a new UnitOfWork instance, bound to the given EntityManager.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Method Summary
boolean

addToIdentityMap(object entity)

INTERNAL: +Registers an entity in the identity map. +

void

clear()

Clears the UnitOfWork.

void

clearEntityChangeSet(string oid)

INTERNAL: +Clears the property changeset of the entity with the given OID.

void

commit()

Commits the UnitOfWork, executing all operations that have been postponed +up to this point.

void

computeChangeSet(ClassMetadata class, object entity)

Computes the changes that happened to a single entity. +

void

computeChangeSets()

Computes all the changes that have been done to entities and collections +since the last commit and stores these changes in the _entityChangeSet map +temporarily for access by the persisters, until the UoW commit is finished.

boolean

containsIdHash(string idHash, string rootClassName)

INTERNAL: +Checks whether an identifier hash exists in the identity map.

object

createEntity(string className, array data, array hints)

INTERNAL: +Creates an entity.

void

detach(object entity)

Detaches an entity from the persistence management.

object

getByIdHash(string idHash, string rootClassName)

INTERNAL: +Gets an entity in the identity map by its identifier hash.

AbstractCollectionPersister

getCollectionPersister(AssociationMapping association)

Gets a collection persister for a collection-valued association.

Doctrine\ORM\Internal\CommitOrderCalculator

getCommitOrderCalculator()

Gets the CommitOrderCalculator used by the UnitOfWork to order commits.

array

getEntityChangeSet(mixed entity)

Gets the changeset for an entity.

array

getEntityIdentifier(object entity)

Gets the identifier of an entity. +

Doctrine\ORM\Persister\AbstractEntityPersister

getEntityPersister(string entityName)

Gets the EntityPersister for an Entity.

int

getEntityState(object entity, integer assume)

Gets the state of an entity within the current unit of work. +

array

getIdentityMap()

Gets the identity map of the UnitOfWork.

array

getOriginalEntityData(object entity)

Gets the original data of an entity.

array

getScheduledCollectionDeletions()

Get the currently scheduled complete collection deletions

array

getScheduledCollectionUpdates()

Gets the currently scheduled collection inserts, updates and deletes.

array

getScheduledEntityDeletions()

Gets the currently scheduled entity deletions in this UnitOfWork.

array

getScheduledEntityInsertions()

Gets the currently scheduled entity insertions in this UnitOfWork.

array

getScheduledEntityUpdates()

Gets the currently scheduled entity updates in this UnitOfWork.

boolean

hasPendingInsertions()

Checks whether the UnitOfWork has any pending insertions.

void

isCollectionScheduledForDeletion(mixed coll)

boolean

isEntityScheduled(mixed entity, $entity )

Checks whether an entity is scheduled for insertion, update or deletion.

boolean

isInIdentityMap(object entity)

Checks whether an entity is registered in the identity map of this UnitOfWork.

boolean

isScheduledForDelete(object entity)

Checks whether an entity is registered as removed/deleted with the unit +of work.

boolean

isScheduledForInsert(object entity)

Checks whether an entity is scheduled for insertion.

boolean

isScheduledForUpdate(object entity)

Checks whether an entity is registered as dirty in the unit of work. +

object

merge(object entity)

Merges the state of the given detached entity into this UnitOfWork.

void

persist(object entity)

Persists an entity as part of the current unit of work.

void

propertyChanged(object entity, string propertyName, mixed oldValue, mixed newValue)

Notifies this UnitOfWork of a property change in an entity.

void

recomputeSingleEntityChangeSet(ClassMetadata class, object entity)

INTERNAL: +Computes the changeset of an individual entity, independently of the +computeChangeSets() routine that is used at the beginning of a UnitOfWork#commit(). +

void

refresh(object entity)

Refreshes the state of the given entity from the database, overwriting +any local, unpersisted changes.

void

registerManaged(object entity, array id, array data)

INTERNAL: +Registers an entity as managed.

void

remove(object entity)

Deletes an entity as part of the current unit of work.

boolean

removeFromIdentityMap(object entity)

INTERNAL: +Removes an entity from the identity map.

void

scheduleCollectionDeletion(PersistentCollection coll)

INTERNAL: +Schedules a complete collection for removal when this UnitOfWork commits.

void

scheduleExtraUpdate(object entity, array changeset)

INTERNAL: +Schedules an extra update that will be executed immediately after the +regular entity updates within the currently running commit cycle. +

void

scheduleForDelete(object entity)

INTERNAL: +Schedules an entity for deletion.

void

scheduleForDirtyCheck(object entity)

Schedules an entity for dirty-checking at commit-time.

void

scheduleForInsert(object entity)

Schedules an entity for insertion into the database. +

void

scheduleForUpdate(object entity)

Schedules an entity for being updated.

void

scheduleOrphanRemoval(object entity)

INTERNAL: +Schedules an orphaned entity for removal.

void

setOriginalEntityData(mixed entity, mixed data)

void

setOriginalEntityProperty(string oid, string property, mixed value)

INTERNAL: +Sets a property value of the original data array of an entity.

integer

size()

Calculates the size of the UnitOfWork.

mixed

tryGetById(mixed id, string rootClassName)

Tries to find an entity with the given identifier in the identity map of +this UnitOfWork.

mixed

tryGetByIdHash(string idHash, string rootClassName)

INTERNAL: +Tries to get an entity by its identifier hash.

+ +

Field Detail

+
/Doctrine/ORM/UnitOfWork.php at line 63
+

STATE_DETACHED

+public final int STATE_DETACHED = 3 +
+

A detached entity is an instance with a persistent identity that is not +(or no longer) associated with an EntityManager (and a UnitOfWork).

+ +
+ +
/Doctrine/ORM/UnitOfWork.php at line 51
+

STATE_MANAGED

+public final int STATE_MANAGED = 1 +
+

An entity is in MANAGED state when its persistence is managed by an EntityManager.

+ +
+ +
/Doctrine/ORM/UnitOfWork.php at line 57
+

STATE_NEW

+public final int STATE_NEW = 2 +
+

An entity is new if it has just been instantiated (i.e. using the "new" operator) +and is not (yet) managed by an EntityManager.

+ +
+ +
/Doctrine/ORM/UnitOfWork.php at line 70
+

STATE_REMOVED

+public final int STATE_REMOVED = 4 +
+

A removed entity instance is an instance with a persistent identity, +associated with an EntityManager, whose persistent state has been +deleted (or is scheduled for deletion).

+ +
+ +

Constructor Detail

+
/Doctrine/ORM/UnitOfWork.php at line 236
+

UnitOfWork

+public UnitOfWork(Doctrine\ORM\EntityManager em) +
+

Initializes a new UnitOfWork instance, bound to the given EntityManager.

+ +
+ +

Method Detail

+
/Doctrine/ORM/UnitOfWork.php at line 1009
+

addToIdentityMap

+public boolean addToIdentityMap(object entity) +
+

INTERNAL: +Registers an entity in the identity map. +Note that entities in a hierarchy are registered with the class name of +the root entity.

+
Ignore.
+
Parameters:
+
entity - The entity to register.
+
Returns:
+
TRUE if the registration was successful, FALSE if the identity of the entity in question is already managed.
+
+
+ +
+ +
/Doctrine/ORM/UnitOfWork.php at line 1650
+

clear

+public void clear() +
+

Clears the UnitOfWork.

+ +
+ +
/Doctrine/ORM/UnitOfWork.php at line 2030
+

clearEntityChangeSet

+public void clearEntityChangeSet(string oid) +
+

INTERNAL: +Clears the property changeset of the entity with the given OID.

+
Parameters:
+
oid - The entity's OID.
+
+
+ +
+ +
/Doctrine/ORM/UnitOfWork.php at line 257
+

commit

+public void commit() +
+

Commits the UnitOfWork, executing all operations that have been postponed +up to this point. The state of all managed entities will be synchronized with +the database.

The operations are executed in the following order:

1) All entity insertions +2) All entity updates +3) All collection deletions +4) All collection updates +5) All entity deletions

+ +
+ +
/Doctrine/ORM/UnitOfWork.php at line 404
+

computeChangeSet

+public void computeChangeSet(ClassMetadata class, object entity) +
+

Computes the changes that happened to a single entity.

Modifies/populates the following properties:

_originalEntityData +If the entity is NEW or MANAGED but not yet fully persisted (only has an id) +then it was not fetched from the database and therefore we have no original +entity data yet. All of the current entity data is stored as the original entity data.

_entityChangeSets +The changes detected on all properties of the entity are stored there. +A change is a tuple array where the first entry is the old value and the second +entry is the new value of the property. Changesets are used by persisters +to INSERT/UPDATE the persistent entity state.

_entityUpdates +If the entity is already fully MANAGED (has been fetched from the database before) +and any changes to its properties are detected, then a reference to the entity is stored +there to mark it for an update.

_collectionDeletions +If a PersistentCollection has been de-referenced in a fully MANAGED entity, +then this collection is marked for deletion.

+
Parameters:
+
class - The class descriptor of the entity.
+
entity - The entity for which to compute the changes.
+
+
+ +
+ +
/Doctrine/ORM/UnitOfWork.php at line 508
+

computeChangeSets

+public void computeChangeSets() +
+

Computes all the changes that have been done to entities and collections +since the last commit and stores these changes in the _entityChangeSet map +temporarily for access by the persisters, until the UoW commit is finished.

+ +
+ +
/Doctrine/ORM/UnitOfWork.php at line 1149
+

containsIdHash

+public boolean containsIdHash(string idHash, string rootClassName) +
+

INTERNAL: +Checks whether an identifier hash exists in the identity map.

+
Ignore.
+
+
+ +
+ +
/Doctrine/ORM/UnitOfWork.php at line 1715
+

createEntity

+public object createEntity(string className, array data, array hints) +
+

INTERNAL: +Creates an entity. Used for reconstitution of entities during hydration.

+
Ignore.
+
Parameters:
+
className - The name of the entity class.
+
data - The data for the entity.
+
hints - Any hints to account for during reconstitution/lookup of the entity.
+
Returns:
+
The entity instance.
+
Internal:
+
Highly performance-sensitive method.
+
Todo:
+
Rename: getOrCreateEntity
+
+
+ +
+ +
/Doctrine/ORM/UnitOfWork.php at line 1415
+

detach

+public void detach(object entity) +
+

Detaches an entity from the persistence management. It's persistence will +no longer be managed by Doctrine.

+
Parameters:
+
entity - The entity to detach.
+
+
+ +
+ +
/Doctrine/ORM/UnitOfWork.php at line 1098
+

getByIdHash

+public object getByIdHash(string idHash, string rootClassName) +
+

INTERNAL: +Gets an entity in the identity map by its identifier hash.

+
Ignore.
+
+
+ +
+ +
/Doctrine/ORM/UnitOfWork.php at line 1993
+

getCollectionPersister

+public AbstractCollectionPersister getCollectionPersister(AssociationMapping association) +
+

Gets a collection persister for a collection-valued association.

+ +
+ +
/Doctrine/ORM/UnitOfWork.php at line 1639
+

getCommitOrderCalculator

+public Doctrine\ORM\Internal\CommitOrderCalculator getCommitOrderCalculator() +
+

Gets the CommitOrderCalculator used by the UnitOfWork to order commits.

+ +
+ +
/Doctrine/ORM/UnitOfWork.php at line 367
+

getEntityChangeSet

+public array getEntityChangeSet(mixed entity) +
+

Gets the changeset for an entity.

+ +
+ +
/Doctrine/ORM/UnitOfWork.php at line 1904
+

getEntityIdentifier

+public array getEntityIdentifier(object entity) +
+

Gets the identifier of an entity. +The returned value is always an array of identifier values. If the entity +has a composite identifier then the identifier values are in the same +order as the identifier field names as returned by ClassMetadata#getIdentifierFieldNames().

+
Returns:
+
The identifier values.
+
+
+ +
+ +
/Doctrine/ORM/UnitOfWork.php at line 1969
+

getEntityPersister

+public Doctrine\ORM\Persister\AbstractEntityPersister getEntityPersister(string entityName) +
+

Gets the EntityPersister for an Entity.

+
Parameters:
+
entityName - The name of the Entity.
+
+
+ +
+ +
/Doctrine/ORM/UnitOfWork.php at line 1040
+

getEntityState

+public int getEntityState(object entity, integer assume) +
+

Gets the state of an entity within the current unit of work.

NOTE: This method sees entities that are not MANAGED or REMOVED and have a +populated identifier, whether it is generated or manually assigned, as +DETACHED. This can be incorrect for manually assigned identifiers.

+
Parameters:
+
+
assume - The state to assume if the state is not yet known. This is usually used to avoid costly state lookups, in the worst case with a database lookup.
+
Returns:
+
The entity state.
+
+
+ +
+ +
/Doctrine/ORM/UnitOfWork.php at line 1852
+

getIdentityMap

+public array getIdentityMap() +
+

Gets the identity map of the UnitOfWork.

+ +
+ +
/Doctrine/ORM/UnitOfWork.php at line 1864
+

getOriginalEntityData

+public array getOriginalEntityData(object entity) +
+

Gets the original data of an entity. The original data is the data that was +present at the time the entity was reconstituted from the database.

+ +
+ +
/Doctrine/ORM/UnitOfWork.php at line 2102
+

getScheduledCollectionDeletions

+public array getScheduledCollectionDeletions() +
+

Get the currently scheduled complete collection deletions

+ +
+ +
/Doctrine/ORM/UnitOfWork.php at line 2112
+

getScheduledCollectionUpdates

+public array getScheduledCollectionUpdates() +
+

Gets the currently scheduled collection inserts, updates and deletes.

+ +
+ +
/Doctrine/ORM/UnitOfWork.php at line 2092
+

getScheduledEntityDeletions

+public array getScheduledEntityDeletions() +
+

Gets the currently scheduled entity deletions in this UnitOfWork.

+ +
+ +
/Doctrine/ORM/UnitOfWork.php at line 2072
+

getScheduledEntityInsertions

+public array getScheduledEntityInsertions() +
+

Gets the currently scheduled entity insertions in this UnitOfWork.

+ +
+ +
/Doctrine/ORM/UnitOfWork.php at line 2082
+

getScheduledEntityUpdates

+public array getScheduledEntityUpdates() +
+

Gets the currently scheduled entity updates in this UnitOfWork.

+ +
+ +
/Doctrine/ORM/UnitOfWork.php at line 1943
+

hasPendingInsertions

+public boolean hasPendingInsertions() +
+

Checks whether the UnitOfWork has any pending insertions.

+
Returns:
+
TRUE if this UnitOfWork has pending insertions, FALSE otherwise.
+
+
+ +
+ +
/Doctrine/ORM/UnitOfWork.php at line 1697
+

isCollectionScheduledForDeletion

+public void isCollectionScheduledForDeletion(mixed coll) +
+
+ +
+ +
/Doctrine/ORM/UnitOfWork.php at line 990
+

isEntityScheduled

+public boolean isEntityScheduled(mixed entity, $entity ) +
+

Checks whether an entity is scheduled for insertion, update or deletion.

+ +
+ +
/Doctrine/ORM/UnitOfWork.php at line 1125
+

isInIdentityMap

+public boolean isInIdentityMap(object entity) +
+

Checks whether an entity is registered in the identity map of this UnitOfWork.

+ +
+ +
/Doctrine/ORM/UnitOfWork.php at line 979
+

isScheduledForDelete

+public boolean isScheduledForDelete(object entity) +
+

Checks whether an entity is registered as removed/deleted with the unit +of work.

+ +
+ +
/Doctrine/ORM/UnitOfWork.php at line 880
+

isScheduledForInsert

+public boolean isScheduledForInsert(object entity) +
+

Checks whether an entity is scheduled for insertion.

+ +
+ +
/Doctrine/ORM/UnitOfWork.php at line 935
+

isScheduledForUpdate

+public boolean isScheduledForUpdate(object entity) +
+

Checks whether an entity is registered as dirty in the unit of work. +Note: Is not very useful currently as dirty entities are only registered +at commit time.

+ +
+ +
/Doctrine/ORM/UnitOfWork.php at line 1297
+

merge

+public object merge(object entity) +
+

Merges the state of the given detached entity into this UnitOfWork.

+
Returns:
+
The managed copy of the entity.
+
+
+ +
+ +
/Doctrine/ORM/UnitOfWork.php at line 1159
+

persist

+public void persist(object entity) +
+

Persists an entity as part of the current unit of work.

+
Parameters:
+
entity - The entity to persist.
+
+
+ +
+ +
/Doctrine/ORM/UnitOfWork.php at line 2045
+

propertyChanged

+public void propertyChanged(object entity, string propertyName, mixed oldValue, mixed newValue) +
+

Notifies this UnitOfWork of a property change in an entity.

+
Parameters:
+
entity - The entity that owns the property.
+
propertyName - The name of the property that changed.
+
oldValue - The old value of the property.
+
newValue - The new value of the property.
+
+
+ +
+ +
/Doctrine/ORM/UnitOfWork.php at line 628
+

recomputeSingleEntityChangeSet

+public void recomputeSingleEntityChangeSet(ClassMetadata class, object entity) +
+

INTERNAL: +Computes the changeset of an individual entity, independently of the +computeChangeSets() routine that is used at the beginning of a UnitOfWork#commit().

The passed entity must be a managed entity. If the entity already has a change set +because this method is invoked during a commit cycle then the change sets are added. +whereby changes detected in this method prevail.

+
Ignore.
+
Parameters:
+
class - The class descriptor of the entity.
+
entity - The entity for which to (re)calculate the change set.
+
Throws:
+
If the passed entity is not MANAGED.
+
+
+ +
+ +
/Doctrine/ORM/UnitOfWork.php at line 1459
+

refresh

+public void refresh(object entity) +
+

Refreshes the state of the given entity from the database, overwriting +any local, unpersisted changes.

+
Parameters:
+
entity - The entity to refresh.
+
Throws:
+
If the entity is not MANAGED.
+
+
+ +
+ +
/Doctrine/ORM/UnitOfWork.php at line 2015
+

registerManaged

+public void registerManaged(object entity, array id, array data) +
+

INTERNAL: +Registers an entity as managed.

+
Parameters:
+
entity - The entity.
+
id - The identifier values.
+
data - The original entity data.
+
+
+ +
+ +
/Doctrine/ORM/UnitOfWork.php at line 1241
+

remove

+public void remove(object entity) +
+

Deletes an entity as part of the current unit of work.

+
Parameters:
+
entity - The entity to remove.
+
+
+ +
+ +
/Doctrine/ORM/UnitOfWork.php at line 1071
+

removeFromIdentityMap

+public boolean removeFromIdentityMap(object entity) +
+

INTERNAL: +Removes an entity from the identity map. This effectively detaches the +entity from the persistence management of Doctrine.

+
Ignore.
+
+
+ +
+ +
/Doctrine/ORM/UnitOfWork.php at line 1690
+

scheduleCollectionDeletion

+public void scheduleCollectionDeletion(PersistentCollection coll) +
+

INTERNAL: +Schedules a complete collection for removal when this UnitOfWork commits.

+ +
+ +
/Doctrine/ORM/UnitOfWork.php at line 916
+

scheduleExtraUpdate

+public void scheduleExtraUpdate(object entity, array changeset) +
+

INTERNAL: +Schedules an extra update that will be executed immediately after the +regular entity updates within the currently running commit cycle.

Extra updates for entities are stored as (entity, changeset) tuples.

+
Ignore.
+
Parameters:
+
entity - The entity for which to schedule an extra update.
+
changeset - The changeset of the entity (what to update).
+
+
+ +
+ +
/Doctrine/ORM/UnitOfWork.php at line 946
+

scheduleForDelete

+public void scheduleForDelete(object entity) +
+

INTERNAL: +Schedules an entity for deletion.

+ +
+ +
/Doctrine/ORM/UnitOfWork.php at line 1932
+

scheduleForDirtyCheck

+public void scheduleForDirtyCheck(object entity) +
+

Schedules an entity for dirty-checking at commit-time.

+
Parameters:
+
entity - The entity to schedule for dirty-checking.
+
+
+ +
+ +
/Doctrine/ORM/UnitOfWork.php at line 853
+

scheduleForInsert

+public void scheduleForInsert(object entity) +
+

Schedules an entity for insertion into the database. +If the entity already has an identifier, it will be added to the identity map.

+
Parameters:
+
entity - The entity to schedule for insertion.
+
+
+ +
+ +
/Doctrine/ORM/UnitOfWork.php at line 890
+

scheduleForUpdate

+public void scheduleForUpdate(object entity) +
+

Schedules an entity for being updated.

+
Parameters:
+
entity - The entity to schedule for being updated.
+
+
+ +
+ +
/Doctrine/ORM/UnitOfWork.php at line 1679
+

scheduleOrphanRemoval

+public void scheduleOrphanRemoval(object entity) +
+

INTERNAL: +Schedules an orphaned entity for removal. The remove() operation will be +invoked on that entity at the beginning of the next commit of this +UnitOfWork.

+
Ignore.
+
+
+ +
+ +
/Doctrine/ORM/UnitOfWork.php at line 1876
+

setOriginalEntityData

+public void setOriginalEntityData(mixed entity, mixed data) +
+

+
Ignore.
+
+
+ +
+ +
/Doctrine/ORM/UnitOfWork.php at line 1890
+

setOriginalEntityProperty

+public void setOriginalEntityProperty(string oid, string property, mixed value) +
+

INTERNAL: +Sets a property value of the original data array of an entity.

+
Ignore.
+
+
+ +
+ +
/Doctrine/ORM/UnitOfWork.php at line 1954
+

size

+public integer size() +
+

Calculates the size of the UnitOfWork. The size of the UnitOfWork is the +number of entities in the identity map.

+ +
+ +
/Doctrine/ORM/UnitOfWork.php at line 1918
+

tryGetById

+public mixed tryGetById(mixed id, string rootClassName) +
+

Tries to find an entity with the given identifier in the identity map of +this UnitOfWork.

+
Parameters:
+
id - The entity identifier to look for.
+
rootClassName - The name of the root class of the mapped entity hierarchy.
+
Returns:
+
Returns the entity with the specified identifier if it exists in this UnitOfWork, FALSE otherwise.
+
+
+ +
+ +
/Doctrine/ORM/UnitOfWork.php at line 1113
+

tryGetByIdHash

+public mixed tryGetByIdHash(string idHash, string rootClassName) +
+

INTERNAL: +Tries to get an entity by its identifier hash. If no entity is found for +the given hash, FALSE is returned.

+
Ignore.
+
Returns:
+
The found entity or FALSE.
+
+
+ +
+ +
+

Doctrine

+ +
+ + + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/index-all.html b/lib/api/index-all.html new file mode 100644 index 000000000..ae07dfadd --- /dev/null +++ b/lib/api/index-all.html @@ -0,0 +1,4857 @@ + + + + + + + + + + + +Index (Doctrine) + + + + +
+

Doctrine

+ +
+ + +A +B +C +D +E +F +G +H +I +J +K +L +M +N +O +P +Q +R +S +T +U +V +W +X +Y +
+ +

A

+
+
abs() - Method in class Doctrine\ORM\Query\Expr
+
Creates an ABS() function expression with the given argument.
+
AbsFunction() - Class in package Doctrine\ORM\Query\AST\Functions
+
"ABS" "(" SimpleArithmeticExpression ")"
+
AbstractAsset() - Class in package Doctrine\DBAL\Schema
+
The abstract asset allows to reset the name of all assets without publishing this to the public userland. +
+
AbstractCache() - Class in package Doctrine\Common\Cache
+
Base class for cache driver implementations.
+
AbstractCollectionPersister() - Class in package Doctrine\ORM\Persisters
+
Base class for all collection persisters.
+
AbstractCommand() - Class in package Doctrine\ORM\Tools\Console\Command\SchemaTool
+
AbstractEntityInheritancePersister() - Class in package Doctrine\ORM\Persisters
+
Base class for entity persisters that implement a certain inheritance mapping strategy. +
+
AbstractExporter() - Class in package Doctrine\ORM\Tools\Export\Driver
+
Abstract base class which is to be used for the Exporter drivers +which can be found in Doctrine\ORM\Tools\Export\Driver
+
AbstractFileDriver() - Class in package Doctrine\ORM\Mapping\Driver
+
Base driver for file-based metadata drivers. +
+
AbstractHydrator() - Class in package Doctrine\ORM\Internal\Hydration
+
Base class for all hydrators.
+
AbstractIdGenerator() - Class in package Doctrine\ORM\Id
+
AbstractPlatform() - Class in package Doctrine\DBAL\Platforms
+
Base class for all DatabasePlatforms.
+
AbstractQuery() - Class in package Doctrine\ORM
+
Base contract for ORM queries.
+
AbstractSchemaManager() - Class in package Doctrine\DBAL\Schema
+
Base class for schema managers.
+
AbstractSchemaName() - Method in class Doctrine\ORM\Query\Parser
+
AbstractSchemaName ::= identifier
+
AbstractSqlExecutor() - Class in package Doctrine\ORM\Query\Exec
+
Base class for SQL statement executors.
+
accept() - Method in class Doctrine\ORM\Tools\Console\MetadataFilter
+
acceptColumn() - Method in class Doctrine\DBAL\Schema\Visitor\Visitor
+
+
acceptColumn() - Method in class Doctrine\DBAL\Schema\Visitor\FixSchema
+
+
acceptColumn() - Method in class Doctrine\DBAL\Schema\Visitor\DropSchemaSqlCollector
+
+
acceptColumn() - Method in class Doctrine\DBAL\Schema\Visitor\CreateSchemaSqlCollector
+
acceptForeignKey() - Method in class Doctrine\DBAL\Schema\Visitor\Visitor
+
+
acceptForeignKey() - Method in class Doctrine\DBAL\Schema\Visitor\FixSchema
+
+
acceptForeignKey() - Method in class Doctrine\DBAL\Schema\Visitor\DropSchemaSqlCollector
+
+
acceptForeignKey() - Method in class Doctrine\DBAL\Schema\Visitor\CreateSchemaSqlCollector
+
+
acceptIndex() - Method in class Doctrine\DBAL\Schema\Visitor\DropSchemaSqlCollector
+
+
acceptIndex() - Method in class Doctrine\DBAL\Schema\Visitor\CreateSchemaSqlCollector
+
+
acceptIndex() - Method in class Doctrine\DBAL\Schema\Visitor\FixSchema
+
+
acceptIndex() - Method in class Doctrine\DBAL\Schema\Visitor\Visitor
+
+
acceptSchema() - Method in class Doctrine\DBAL\Schema\Visitor\FixSchema
+
+
acceptSchema() - Method in class Doctrine\DBAL\Schema\Visitor\CreateSchemaSqlCollector
+
+
acceptSchema() - Method in class Doctrine\DBAL\Schema\Visitor\DropSchemaSqlCollector
+
+
acceptSchema() - Method in class Doctrine\DBAL\Schema\Visitor\Visitor
+
+
acceptSequence() - Method in class Doctrine\DBAL\Schema\Visitor\Visitor
+
+
acceptSequence() - Method in class Doctrine\DBAL\Schema\Visitor\CreateSchemaSqlCollector
+
+
acceptSequence() - Method in class Doctrine\DBAL\Schema\Visitor\DropSchemaSqlCollector
+
+
acceptSequence() - Method in class Doctrine\DBAL\Schema\Visitor\FixSchema
+
+
acceptTable() - Method in class Doctrine\DBAL\Schema\Visitor\Visitor
+
+
acceptTable() - Method in class Doctrine\DBAL\Schema\Visitor\FixSchema
+
+
acceptTable() - Method in class Doctrine\DBAL\Schema\Visitor\DropSchemaSqlCollector
+
+
acceptTable() - Method in class Doctrine\DBAL\Schema\Visitor\CreateSchemaSqlCollector
+
Generate DDL Statements to create the accepted table with all its dependencies.
+
add() - Method in class Doctrine\ORM\QueryBuilder
+
Add a single DQL query part to the array of parts
+
add() - Method in class Doctrine\ORM\Query\Expr\OrderBy
+
add() - Method in class Doctrine\Common\Collections\Collection
+
Adds an element at the end of the collection.
+
add() - Method in class Doctrine\ORM\Query\Expr\Base
+
add() - Method in class Doctrine\ORM\PersistentCollection
+
{@inheritdoc}
+
add() - Method in class Doctrine\Common\Collections\ArrayCollection
+
Adds an element to the collection.
+
addClass() - Method in class Doctrine\ORM\Internal\CommitOrderCalculator
+
addColumn() - Method in class Doctrine\DBAL\Schema\Table
+
+
addColumnPlatformOptionCheck() - Method in class Doctrine\DBAL\Schema\Comparator
+
+
addCustomDatetimeFunction() - Method in class Doctrine\ORM\Configuration
+
Registers a custom DQL function that produces a date/time value. +
+
addCustomNumericFunction() - Method in class Doctrine\ORM\Configuration
+
Registers a custom DQL function that produces a numeric value. +
+
addCustomStringFunction() - Method in class Doctrine\ORM\Configuration
+
Registers a custom DQL function that produces a string value. +
+
addCustomTreeWalker() - Method in class Doctrine\ORM\Query\Parser
+
Adds a custom tree walker for modifying the AST.
+
addDependency() - Method in class Doctrine\ORM\Internal\CommitOrderCalculator
+
addDriver() - Method in class Doctrine\ORM\Mapping\Driver\DriverChain
+
Add a nested driver.
+
addEntityNamespace() - Method in class Doctrine\ORM\Configuration
+
Adds a namespace under a certain alias.
+
addEntityResult() - Method in class Doctrine\ORM\Query\ResultSetMapping
+
Adds an entity result to this ResultSetMapping.
+
addEventListener() - Method in class Doctrine\Common\EventManager
+
Adds an event listener that listens on the specified events.
+
addEventSubscriber() - Method in class Doctrine\Common\EventManager
+
Adds an EventSubscriber.
+
addFieldResult() - Method in class Doctrine\ORM\Query\ResultSetMapping
+
Adds a field to the result that belongs to an entity or joined entity.
+
addForeignKeyConstraint() - Method in class Doctrine\DBAL\Schema\Table
+
Add a foreign key constraint + +Name is inferred from the local columns
+
addGroupBy() - Method in class Doctrine\ORM\QueryBuilder
+
Add to the existing GROUP BY clause + +[php] +$qb = $em->createQueryBuilder() +->select('u') +->from('User', 'u') +->groupBy('u.last_login'); +->addGroupBy('u.created_at')
+
addIndex() - Method in class Doctrine\DBAL\Schema\Table
+
+
addIndexBy() - Method in class Doctrine\ORM\Query\ResultSetMapping
+
Sets a field to use for indexing an entity result or joined entity result.
+
addInheritedAssociationMapping() - Method in class Doctrine\ORM\Mapping\ClassMetadataInfo
+
INTERNAL: +Adds an association mapping without completing/validating it. +
+
addInheritedFieldMapping() - Method in class Doctrine\ORM\Mapping\ClassMetadataInfo
+
INTERNAL: +Adds a field mapping without completing/validating it. +
+
addInsert() - Method in class Doctrine\ORM\Persisters\StandardEntityPersister
+
Adds an entity to the queued insertions. +
+
addJoinedEntityResult() - Method in class Doctrine\ORM\Query\ResultSetMapping
+
Adds a joined entity result.
+
addLifecycleCallback() - Method in class Doctrine\ORM\Mapping\ClassMetadataInfo
+
Adds a lifecycle callback for entities of this class. +
+
addMappingSource() - Method in class Doctrine\ORM\Tools\Export\ClassMetadataExporter
+
Add a new mapping directory to the array of directories to convert and export +to another format + +[php] +$cme = new Doctrine\ORM\Tools\Export\ClassMetadataExporter(); +$cme->addMappingSource(__DIR__ .
+
addMappingSource() - Method in class Doctrine\ORM\Tools\ClassMetadataReader
+
Add a new mapping directory to the array of directories to convert and export +to another format
+
addMetaResult() - Method in class Doctrine\ORM\Query\ResultSetMapping
+
Adds a meta column (foreign key or discriminator column) to the result set.
+
addMultiple() - Method in class Doctrine\ORM\Query\Expr\Base
+
addNamedForeignKeyConstraint() - Method in class Doctrine\DBAL\Schema\Table
+
Add a foreign key constraint with a given name
+
addNamedNativeQuery() - Method in class Doctrine\ORM\Configuration
+
Adds a named native query to the configuration.
+
addNamedQuery() - Method in class Doctrine\ORM\Configuration
+
Adds a named DQL query to the configuration.
+
addOption() - Method in class Doctrine\DBAL\Schema\Table
+
+
addOrderBy() - Method in class Doctrine\ORM\QueryBuilder
+
Add to the existing ORDER BY clause
+
addParameterMapping() - Method in class Doctrine\ORM\Query\ParserResult
+
Adds a DQL to SQL parameter mapping.
+
addPaths() - Method in class Doctrine\ORM\Mapping\Driver\AnnotationDriver
+
Append lookup paths to metadata driver.
+
addPaths() - Method in class Doctrine\ORM\Mapping\Driver\AbstractFileDriver
+
Append lookup paths to metadata driver.
+
addPropertyChangedListener() - Method in class Doctrine\Common\NotifyPropertyChanged
+
Adds a listener that wants to be notified about property changes.
+
addScalarResult() - Method in class Doctrine\ORM\Query\ResultSetMapping
+
Adds a scalar result mapping.
+
addSelect() - Method in class Doctrine\ORM\QueryBuilder
+
Add to the SELECT statement + +[php] +$qb = $em->createQueryBuilder() +->select('u') +->addSelect('p') +->from('User', 'u') +->leftJoin('u.Phonenumbers', 'p');
+
addToIdentityMap() - Method in class Doctrine\ORM\UnitOfWork
+
INTERNAL: +Registers an entity in the identity map. +
+
addTreeWalker() - Method in class Doctrine\ORM\Query\TreeWalkerChain
+
Adds a tree walker to the chain.
+
addType() - Method in class Doctrine\DBAL\Types\Type
+
Adds a custom type to the type map.
+
addUniqueIndex() - Method in class Doctrine\DBAL\Schema\Table
+
+
addUnnamedForeignKeyConstraint() - Method in class Doctrine\DBAL\Schema\Table
+
Add a foreign key constraint + +Name is to be generated by the database itsself.
+
AggregateExpression() - Class in package Doctrine\ORM\Query\AST
+
Description of AggregateExpression
+
AggregateExpression() - Method in class Doctrine\ORM\Query\Parser
+
AggregateExpression ::= +("AVG" | "MAX" | "MIN" | "SUM") "(" ["DISTINCT"] StateFieldPathExpression ")" | +"COUNT" "(" ["DISTINCT"] (IdentificationVariable | SingleValuedPathExpression) ")"
+
AliasIdentificationVariable() - Method in class Doctrine\ORM\Query\Parser
+
AliasIdentificationVariable = identifier
+
AliasResultVariable() - Method in class Doctrine\ORM\Query\Parser
+
AliasResultVariable ::= identifier
+
all() - Method in class Doctrine\ORM\Query\Expr
+
Creates an instance of ALL() function, with the given DQL Subquery.
+
alterTable() - Method in class Doctrine\DBAL\Schema\AbstractSchemaManager
+
Alter an existing tables schema
+
alterTable() - Method in class Doctrine\DBAL\Schema\MsSqlSchemaManager
+
alter an existing table
+
alterTableChangeNotSupported() - Method in class Doctrine\DBAL\Schema\SchemaException
+
andHaving() - Method in class Doctrine\ORM\QueryBuilder
+
Add to the existing HAVING clause with an AND
+
andWhere() - Method in class Doctrine\ORM\QueryBuilder
+
Add a new WHERE statement with an AND + +[php] +$qb = $em->createQueryBuilder() +->select('u') +->from('User', 'u') +->where('u.username LIKE ?') +->andWhere('u.is_active = 1');
+
Andx() - Class in package Doctrine\ORM\Query\Expr
+
Expression class for building DQL and parts
+
andX() - Method in class Doctrine\ORM\Query\Expr
+
Creates a conjunction of the given boolean expressions. +
+
Annotation() - Class in package Doctrine\Common\Annotations
+
Annotations class
+
Annotation() - Method in class Doctrine\Common\Annotations\Parser
+
Annotation ::= "@" AnnotationName ["(" [Values] ")"] +AnnotationName ::= QualifiedName | SimpleName | AliasedName +QualifiedName ::= NameSpacePart "\" {NameSpacePart "\"}* SimpleName +AliasedName ::= Alias ":" SimpleName +NameSpacePart ::= identifier +SimpleName ::= identifier +Alias ::= identifier
+
AnnotationDriver() - Class in package Doctrine\ORM\Mapping\Driver
+
The AnnotationDriver reads the mapping metadata from docblock annotations.
+
AnnotationException() - Class in package Doctrine\Common\Annotations
+
Description of AnnotationException
+
AnnotationExporter() - Class in package Doctrine\ORM\Tools\Export\Driver
+
ClassMetadata exporter for PHP classes with annotations
+
AnnotationReader() - Class in package Doctrine\Common\Annotations
+
A reader for docblock annotations.
+
Annotations() - Method in class Doctrine\Common\Annotations\Parser
+
Annotations ::= Annotation {[ "*" ]* [Annotation]}
+
any() - Method in class Doctrine\ORM\Query\Expr
+
Creates an ANY() function expression with the given DQL subquery.
+
ApcCache() - Class in package Doctrine\Common\Cache
+
APC cache driver.
+
ArithmeticExpression() - Class in package Doctrine\ORM\Query\AST
+
ArithmeticExpression ::= SimpleArithmeticExpression | "(" Subselect ")"
+
ArithmeticExpression() - Method in class Doctrine\ORM\Query\Parser
+
ArithmeticExpression ::= SimpleArithmeticExpression | "(" Subselect ")"
+
ArithmeticFactor() - Method in class Doctrine\ORM\Query\Parser
+
ArithmeticFactor ::= [("+" | "-")] ArithmeticPrimary
+
ArithmeticFactor() - Class in package Doctrine\ORM\Query\AST
+
ArithmeticFactor ::= [("+" | "-")] ArithmeticPrimary
+
ArithmeticPrimary() - Method in class Doctrine\ORM\Query\Parser
+
ArithmeticPrimary ::= SingleValuedPathExpression | Literal | "(" SimpleArithmeticExpression ")" +| FunctionsReturningNumerics | AggregateExpression | FunctionsReturningStrings +| FunctionsReturningDatetime | IdentificationVariable
+
ArithmeticTerm() - Class in package Doctrine\ORM\Query\AST
+
ArithmeticTerm ::= ArithmeticFactor {("*" | "/") ArithmeticFactor}
+
ArithmeticTerm() - Method in class Doctrine\ORM\Query\Parser
+
ArithmeticTerm ::= ArithmeticFactor {("*" | "/") ArithmeticFactor}
+
ArrayCache() - Class in package Doctrine\Common\Cache
+
Array cache driver.
+
ArrayCollection() - Class in package Doctrine\Common\Collections
+
An ArrayCollection is a Collection implementation that uses a regular PHP array +internally.
+
ArrayEntry() - Method in class Doctrine\Common\Annotations\Parser
+
ArrayEntry ::= Value | KeyValuePair +KeyValuePair ::= Key "=" PlainValue +Key ::= string | integer
+
ArrayHydrator() - Class in package Doctrine\ORM\Internal\Hydration
+
The ArrayHydrator produces a nested array "graph" that is often (not always) +interchangeable with the corresponding object graph for read-only access.
+
ArrayType() - Class in package Doctrine\DBAL\Types
+
Type that maps a PHP array to a clob SQL type.
+
Arrayx() - Method in class Doctrine\Common\Annotations\Parser
+
Array ::= "{" ArrayEntry {"," ArrayEntry}* "}"
+
asc() - Method in class Doctrine\ORM\Query\Expr
+
Creates an ASCending order expression.
+
AssignedGenerator() - Class in package Doctrine\ORM\Id
+
Special generator for application-assigned identifiers (doesnt really generate anything).
+
AssociationMapping() - Class in package Doctrine\ORM\Mapping
+
Base class for association mappings. +
+
associationPathCompositeKeyNotSupported() - Method in class Doctrine\ORM\Query\QueryException
+
AssociationPathExpression() - Method in class Doctrine\ORM\Query\Parser
+
AssociationPathExpression ::= CollectionValuedPathExpression | SingleValuedAssociationPathExpression
+
associationPathInverseSideNotSupported() - Method in class Doctrine\ORM\Query\QueryException
+
ASTException() - Class in package Doctrine\ORM\Query\AST
+
Description of QueryException
+
avg() - Method in class Doctrine\ORM\Query\Expr
+
Creates an instance of AVG() function, with the given argument.
+
+

B

+
+
Base() - Class in package Doctrine\ORM\Query\Expr
+
Abstract base Expr class for building DQL parts
+
beginTransaction() - Method in class Doctrine\DBAL\Driver\OCI8\OCI8Connection
+
beginTransaction() - Method in class Doctrine\ORM\EntityManager
+
Starts a transaction on the underlying database connection.
+
beginTransaction() - Method in class Doctrine\DBAL\Driver\PDOMsSql\Connection
+
Begins a database transaction.
+
between() - Method in class Doctrine\ORM\Query\Expr
+
Creates an instance of BETWEEN() function, with the given argument.
+
BetweenExpression() - Method in class Doctrine\ORM\Query\Parser
+
BetweenExpression ::= ArithmeticExpression ["NOT"] "BETWEEN" ArithmeticExpression "AND" ArithmeticExpression
+
BetweenExpression() - Class in package Doctrine\ORM\Query\AST
+
Description of BetweenExpression + +@license http://www.opensource.org/licenses/lgpl-license.php LGPL
+
BigIntType() - Class in package Doctrine\DBAL\Types
+
Type that maps a database BIGINT to a PHP string.
+
bindParam() - Method in class Doctrine\DBAL\Driver\Statement
+
Binds a PHP variable to a corresponding named or question mark placeholder in the +SQL statement that was use to prepare the statement.
+
bindParam() - Method in class Doctrine\DBAL\Driver\OCI8\OCI8Statement
+
{@inheritdoc}
+
bindValue() - Method in class Doctrine\DBAL\Driver\Statement
+
Binds a value to a corresponding named or positional +placeholder in the SQL statement that was used to prepare the statement.
+
bindValue() - Method in class Doctrine\DBAL\Driver\OCI8\OCI8Statement
+
{@inheritdoc}
+
BooleanType() - Class in package Doctrine\DBAL\Types
+
Type that maps an SQL boolean to a PHP boolean.
+
+

C

+
+
Cache() - Interface in package Doctrine\Common\Cache
+
Interface for cache drivers.
+
camelize() - Method in class Doctrine\Common\Util\Inflector
+
Camelize a word.
+
CaseExpression() - Method in class Doctrine\ORM\Query\Parser
+
changeColumn() - Method in class Doctrine\DBAL\Schema\Table
+
Change Column Details
+
ChangeTrackingPolicy() - Class in package Doctrine\ORM\Mapping
+
Annotations class
+
classify() - Method in class Doctrine\Common\Util\Inflector
+
Convert a word in to the format for a Doctrine class name.
+
classIsNotAValidEntityOrMappedSuperClass() - Method in class Doctrine\ORM\Mapping\MappingException
+
ClassLoader() - Class in package Doctrine\Common
+
A ClassLoader is an autoloader for class files that can be +installed on the SPL autoload stack.
+
ClassMetadata() - Class in package Doctrine\ORM\Mapping
+
A ClassMetadata instance holds all the object-relational mapping metadata +of an entity and it's associations. +
+
ClassMetadataExporter() - Class in package Doctrine\ORM\Tools\Export
+
Class used for converting your mapping information between the +supported formats: yaml, xml, and php/annotation. +
+
ClassMetadataFactory() - Class in package Doctrine\ORM\Mapping
+
The ClassMetadataFactory is used to create ClassMetadata objects that contain all the +metadata mapping informations of a class which describes how a class should be mapped +to a relational database.
+
ClassMetadataInfo() - Class in package Doctrine\ORM\Mapping
+
A ClassMetadata instance holds all the object-relational mapping metadata +of an entity and it's associations. +
+
ClassMetadataReader() - Class in package Doctrine\ORM\Tools
+
Class to read metadata mapping information from multiple sources into an array +of ClassMetadataInfo instances. +
+
clear() - Method in class Doctrine\ORM\Internal\CommitOrderCalculator
+
Clears the current graph.
+
clear() - Method in class Doctrine\Common\Collections\Collection
+
Clears the collection, removing all elements.
+
clear() - Method in class Doctrine\ORM\EntityManager
+
Clears the EntityManager.
+
clear() - Method in class Doctrine\ORM\EntityRepository
+
Clears the repository, causing all managed entities to become detached.
+
clear() - Method in class Doctrine\ORM\PersistentCollection
+
{@inheritdoc}
+
clear() - Method in class Doctrine\ORM\UnitOfWork
+
Clears the UnitOfWork.
+
clear() - Method in class Doctrine\Common\Collections\ArrayCollection
+
Clears the collection.
+
clearEntityChangeSet() - Method in class Doctrine\ORM\UnitOfWork
+
INTERNAL: +Clears the property changeset of the entity with the given OID.
+
clearQueries() - Method in class Doctrine\DBAL\Schema\Visitor\DropSchemaSqlCollector
+
+
close() - Method in class Doctrine\ORM\EntityManager
+
Closes the EntityManager.
+
close() - Method in class Doctrine\DBAL\Connection
+
Closes the connection.
+
closeCursor() - Method in class Doctrine\DBAL\Driver\OCI8\OCI8Statement
+
Closes the cursor, enabling the statement to be executed again.
+
closeCursor() - Method in class Doctrine\DBAL\Driver\Statement
+
Closes the cursor, enabling the statement to be executed again.
+
Collection() - Interface in package Doctrine\Common\Collections
+
The missing (SPL) Collection/Array/OrderedMap interface. +
+
CollectionMemberExpression() - Class in package Doctrine\ORM\Query\AST
+
CollectionMemberExpression ::= EntityExpression ["NOT"] "MEMBER" ["OF"] CollectionValuedPathExpression
+
CollectionMemberExpression() - Method in class Doctrine\ORM\Query\Parser
+
CollectionMemberExpression ::= EntityExpression ["NOT"] "MEMBER" ["OF"] CollectionValuedPathExpression + +EntityExpression ::= SingleValuedAssociationPathExpression | SimpleEntityExpression +SimpleEntityExpression ::= IdentificationVariable | InputParameter
+
CollectionValuedPathExpression() - Method in class Doctrine\ORM\Query\Parser
+
CollectionValuedPathExpression ::= IdentificationVariable "." {SingleValuedAssociationField "."}* CollectionValuedAssociationField
+
Column() - Class in package Doctrine\DBAL\Schema
+
Object representation of a database column
+
Column() - Class in package Doctrine\ORM\Mapping
+
Annotations class
+
columnAlreadyExists() - Method in class Doctrine\DBAL\Schema\SchemaException
+
+
columnCount() - Method in class Doctrine\DBAL\Driver\OCI8\OCI8Statement
+
{@inheritdoc}
+
columnCount() - Method in class Doctrine\DBAL\Driver\Statement
+
columnCount +Returns the number of columns in the result set
+
ColumnDiff() - Class in package Doctrine\DBAL\Schema
+
Represent the change of a column
+
columnDoesNotExist() - Method in class Doctrine\DBAL\Schema\SchemaException
+
+
columnsAreIndexed() - Method in class Doctrine\DBAL\Schema\Table
+
Check if an index begins in the order of the given columns.
+
commit() - Method in class Doctrine\ORM\UnitOfWork
+
Commits the UnitOfWork, executing all operations that have been postponed +up to this point.
+
commit() - Method in class Doctrine\DBAL\Driver\PDOMsSql\Connection
+
Performs the commit.
+
commit() - Method in class Doctrine\DBAL\Driver\OCI8\OCI8Connection
+
commit() - Method in class Doctrine\ORM\EntityManager
+
Commits a transaction on the underlying database connection.
+
commitFailedRollbackOnly() - Method in class Doctrine\DBAL\ConnectionException
+
CommitOrderCalculator() - Class in package Doctrine\ORM\Internal
+
The CommitOrderCalculator is used by the UnitOfWork to sort out the +correct order in which changes to entities need to be persisted.
+
CommonException() - Exception in package Doctrine\Common
+
Base exception class for package Doctrine\Common
+
Comparator() - Class in package Doctrine\DBAL\Schema
+
Compare to Schemas and return an instance of SchemaDiff
+
compare() - Method in class Doctrine\Common\Version
+
Compares a Doctrine version with the current one.
+
compare() - Method in class Doctrine\DBAL\Schema\Comparator
+
Returns a SchemaDiff object containing the differences between the schemas $fromSchema and $toSchema. +
+
compareSchemas() - Method in class Doctrine\DBAL\Schema\Comparator
+
+
Comparison() - Class in package Doctrine\ORM\Query\Expr
+
Expression class for DQL comparison expressions
+
ComparisonExpression() - Method in class Doctrine\ORM\Query\Parser
+
ComparisonExpression ::= ArithmeticExpression ComparisonOperator ( QuantifiedExpression | ArithmeticExpression )
+
ComparisonExpression() - Class in package Doctrine\ORM\Query\AST
+
ComparisonExpression ::= ArithmeticExpression ComparisonOperator ( QuantifiedExpression | ArithmeticExpression ) | +StringExpression ComparisonOperator (StringExpression | QuantifiedExpression) | +BooleanExpression ("=" | "<>" | "!=") (BooleanExpression | QuantifiedExpression) | +EnumExpression ("=" | "<>" | "!=") (EnumExpression | QuantifiedExpression) | +DatetimeExpression ComparisonOperator (DatetimeExpression | QuantifiedExpression) | +EntityExpression ("=" | "<>") (EntityExpression | QuantifiedExpression)
+
ComparisonOperator() - Method in class Doctrine\ORM\Query\Parser
+
ComparisonOperator ::= "=" | "<" | "<=" | "<>" | ">" | ">=" | "!="
+
computeChangeSet() - Method in class Doctrine\ORM\UnitOfWork
+
Computes the changes that happened to a single entity. +
+
computeChangeSets() - Method in class Doctrine\ORM\UnitOfWork
+
Computes all the changes that have been done to entities and collections +since the last commit and stores these changes in the _entityChangeSet map +temporarily for access by the persisters, until the UoW commit is finished.
+
concat() - Method in class Doctrine\ORM\Query\Expr
+
Creates a CONCAT() function expression with the given arguments.
+
ConcatFunction() - Class in package Doctrine\ORM\Query\AST\Functions
+
"CONCAT" "(" StringPrimary "," StringPrimary ")"
+
ConditionalExpression() - Method in class Doctrine\ORM\Query\Parser
+
ConditionalExpression ::= ConditionalTerm {"OR" ConditionalTerm}
+
ConditionalExpression() - Class in package Doctrine\ORM\Query\AST
+
ConditionalExpression ::= ConditionalTerm {"OR" ConditionalTerm}
+
ConditionalFactor() - Method in class Doctrine\ORM\Query\Parser
+
ConditionalFactor ::= ["NOT"] ConditionalPrimary
+
ConditionalFactor() - Class in package Doctrine\ORM\Query\AST
+
ConditionalFactor ::= ["NOT"] ConditionalPrimary
+
ConditionalPrimary() - Method in class Doctrine\ORM\Query\Parser
+
ConditionalPrimary ::= SimpleConditionalExpression | "(" ConditionalExpression ")"
+
ConditionalPrimary() - Class in package Doctrine\ORM\Query\AST
+
ConditionalPrimary ::= SimpleConditionalExpression | "(" ConditionalExpression ")"
+
ConditionalTerm() - Method in class Doctrine\ORM\Query\Parser
+
ConditionalTerm ::= ConditionalFactor {"AND" ConditionalFactor}
+
ConditionalTerm() - Class in package Doctrine\ORM\Query\AST
+
ConditionalTerm ::= ConditionalFactor {"AND" ConditionalFactor}
+
Configuration() - Class in package Doctrine\DBAL
+
Configuration container for the Doctrine DBAL.
+
Configuration() - Class in package Doctrine\ORM
+
Configuration container for all configuration options of Doctrine. +
+
configure() - Method in class Doctrine\ORM\Tools\Console\Command\GenerateRepositoriesCommand
+
+
configure() - Method in class Doctrine\DBAL\Tools\Console\Command\ImportCommand
+
+
configure() - Method in class Doctrine\ORM\Tools\Console\Command\RunDqlCommand
+
+
configure() - Method in class Doctrine\ORM\Tools\Console\Command\ClearCache\QueryCommand
+
+
configure() - Method in class Doctrine\ORM\Tools\Console\Command\SchemaTool\UpdateCommand
+
+
configure() - Method in class Doctrine\ORM\Tools\Console\Command\ConvertMappingCommand
+
+
configure() - Method in class Doctrine\ORM\Tools\Console\Command\EnsureProductionSettingsCommand
+
+
configure() - Method in class Doctrine\ORM\Tools\Console\Command\GenerateEntitiesCommand
+
+
configure() - Method in class Doctrine\ORM\Tools\Console\Command\ClearCache\ResultCommand
+
+
configure() - Method in class Doctrine\ORM\Tools\Console\Command\GenerateProxiesCommand
+
+
configure() - Method in class Doctrine\ORM\Tools\Console\Command\ClearCache\MetadataCommand
+
+
configure() - Method in class Doctrine\ORM\Tools\Console\Command\SchemaTool\CreateCommand
+
+
configure() - Method in class Doctrine\ORM\Tools\Console\Command\ConvertDoctrine1SchemaCommand
+
+
configure() - Method in class Doctrine\DBAL\Tools\Console\Command\RunSqlCommand
+
+
configure() - Method in class Doctrine\ORM\Tools\Console\Command\SchemaTool\DropCommand
+
+
connect() - Method in class Doctrine\DBAL\Driver\PDOSqlite\Driver
+
Tries to establish a database connection to SQLite.
+
connect() - Method in class Doctrine\DBAL\Connection
+
Establishes the connection with the database.
+
Connection() - Class in package Doctrine\DBAL\Driver\PDOMsSql
+
MsSql Connection implementation.
+
Connection() - Interface in package Doctrine\DBAL\Driver
+
Connection interface. +
+
Connection() - Class in package Doctrine\DBAL
+
A wrapper around a Doctrine\DBAL\Driver\Connection that adds features like +events, transaction isolation levels, configuration, emulated transaction nesting, +lazy connecting and more.
+
ConnectionEventArgs() - Class in package Doctrine\DBAL\Event
+
Event Arguments used when a Driver connection is established inside Doctrine\DBAL\Connection.
+
ConnectionException() - Class in package Doctrine\DBAL
+
Doctrine\DBAL\ConnectionException
+
ConnectionHelper() - Class in package Doctrine\DBAL\Tools\Console\Helper
+
Doctrine CLI Connection Helper.
+
Constraint() - Interface in package Doctrine\DBAL\Schema
+
Marker interface for contraints
+
contains() - Method in class Doctrine\Common\Collections\ArrayCollection
+
Checks whether the given element is contained in the collection. +
+
contains() - Method in class Doctrine\ORM\PersistentCollection
+
{@inheritdoc}
+
contains() - Method in class Doctrine\Common\Cache\AbstractCache
+
{@inheritdoc}
+
contains() - Method in class Doctrine\ORM\EntityManager
+
Determines whether an entity instance is managed in this EntityManager.
+
contains() - Method in class Doctrine\Common\Collections\Collection
+
Checks whether an element is contained in the collection. +
+
contains() - Method in class Doctrine\ORM\Query
+
Method to check if an arbitrary piece of DQL exists
+
contains() - Method in class Doctrine\Common\Cache\Cache
+
Test if an entry exists in the cache.
+
containsIdHash() - Method in class Doctrine\ORM\UnitOfWork
+
INTERNAL: +Checks whether an identifier hash exists in the identity map.
+
containsKey() - Method in class Doctrine\Common\Collections\Collection
+
Checks whether the collection contains an element with the specified key/index.
+
containsKey() - Method in class Doctrine\ORM\PersistentCollection
+
{@inheritdoc}
+
containsKey() - Method in class Doctrine\Common\Collections\ArrayCollection
+
Checks whether the collection contains a specific key/index.
+
convertBooleans() - Method in class Doctrine\DBAL\Platforms\AbstractPlatform
+
Some platforms need the boolean values to be converted. +
+
convertBooleans() - Method in class Doctrine\DBAL\Platforms\PostgreSqlPlatform
+
Postgres wants boolean values converted to the strings 'true'/'false'.
+
ConvertDoctrine1Schema() - Class in package Doctrine\ORM\Tools
+
Class to help with converting Doctrine 1 schema files to Doctrine 2 mapping files
+
ConvertDoctrine1SchemaCommand() - Class in package Doctrine\ORM\Tools\Console\Command
+
Command to convert a Doctrine 1 schema to a Doctrine 2 mapping file.
+
ConvertMappingCommand() - Class in package Doctrine\ORM\Tools\Console\Command
+
Command to convert your mapping information between the various formats.
+
convertToDatabaseValue() - Method in class Doctrine\DBAL\Types\ObjectType
+
Converts a value from its PHP representation to its database representation +of this type.
+
convertToDatabaseValue() - Method in class Doctrine\DBAL\Types\Type
+
Converts a value from its PHP representation to its database representation +of this type.
+
convertToDatabaseValue() - Method in class Doctrine\DBAL\Types\DateType
+
Converts a value from its PHP representation to its database representation +of this type.
+
convertToDatabaseValue() - Method in class Doctrine\DBAL\Types\DateTimeType
+
Converts a value from its PHP representation to its database representation +of this type.
+
convertToDatabaseValue() - Method in class Doctrine\DBAL\Types\BooleanType
+
Converts a value from its PHP representation to its database representation +of this type.
+
convertToDatabaseValue() - Method in class Doctrine\DBAL\Types\TimeType
+
{@inheritdoc}
+
convertToDatabaseValue() - Method in class Doctrine\DBAL\Types\ArrayType
+
Converts a value from its PHP representation to its database representation +of this type.
+
convertToDatabaseValue() - Method in class Doctrine\DBAL\Connection
+
Converts a given value to its database representation according to the conversion +rules of a specific DBAL mapping type.
+
convertToPHPValue() - Method in class Doctrine\DBAL\Types\ArrayType
+
Converts a value from its database representation to its PHP representation +of this type.
+
convertToPHPValue() - Method in class Doctrine\DBAL\Types\TimeType
+
{@inheritdoc}
+
convertToPHPValue() - Method in class Doctrine\DBAL\Types\DecimalType
+
Converts a value from its database representation to its PHP representation +of this type.
+
convertToPHPValue() - Method in class Doctrine\DBAL\Types\BooleanType
+
Converts a value from its database representation to its PHP representation +of this type.
+
convertToPHPValue() - Method in class Doctrine\DBAL\Types\Type
+
Converts a value from its database representation to its PHP representation +of this type.
+
convertToPHPValue() - Method in class Doctrine\DBAL\Types\DateType
+
Converts a value from its database representation to its PHP representation +of this type.
+
convertToPHPValue() - Method in class Doctrine\DBAL\Connection
+
Converts a given value to its PHP representation according to the conversion +rules of a specific DBAL mapping type.
+
convertToPHPValue() - Method in class Doctrine\DBAL\Types\IntegerType
+
Converts a value from its database representation to its PHP representation +of this type.
+
convertToPHPValue() - Method in class Doctrine\DBAL\Types\ObjectType
+
Converts a value from its database representation to its PHP representation +of this type.
+
convertToPHPValue() - Method in class Doctrine\DBAL\Types\SmallIntType
+
Converts a value from its database representation to its PHP representation +of this type.
+
convertToPHPValue() - Method in class Doctrine\DBAL\Types\DateTimeType
+
Converts a value from its database representation to its PHP representation +of this type.
+
copy() - Method in class Doctrine\ORM\EntityManager
+
Creates a copy of the given entity.
+
couldNotMapDoctrine1Type() - Method in class Doctrine\ORM\Tools\ToolsException
+
count() - Method in class Doctrine\ORM\Tools\Console\MetadataFilter
+
count() - Method in class Doctrine\ORM\Query\Expr\OrderBy
+
count() - Method in class Doctrine\ORM\Query\Expr\Base
+
count() - Method in class Doctrine\ORM\PersistentCollection
+
{@inheritdoc}
+
count() - Method in class Doctrine\ORM\Query\Expr
+
Creates an instance of COUNT() function, with the given argument.
+
count() - Method in class Doctrine\Common\Collections\ArrayCollection
+
Returns the number of elements in the collection. +
+
countDistinct() - Method in class Doctrine\ORM\Query\Expr
+
Creates an instance of COUNT(DISTINCT) function, with the given argument.
+
create() - Method in class Doctrine\ORM\EntityManager
+
Factory method to create EntityManager instances.
+
create() - Method in class Doctrine\ORM\Mapping\Driver\AnnotationDriver
+
Factory method for the Annotation Driver
+
CreateCommand() - Class in package Doctrine\ORM\Tools\Console\Command\SchemaTool
+
Command to create the database schema for a set of classes based on their mappings.
+
createConstraint() - Method in class Doctrine\DBAL\Schema\AbstractSchemaManager
+
Create a constraint on a table
+
createDatabase() - Method in class Doctrine\DBAL\Schema\PostgreSqlSchemaManager
+
Creates a new database.
+
createDatabase() - Method in class Doctrine\DBAL\Schema\SqliteSchemaManager
+
{@inheritdoc}
+
createDatabase() - Method in class Doctrine\DBAL\Schema\MsSqlSchemaManager
+
create a new database
+
createDatabase() - Method in class Doctrine\DBAL\Schema\AbstractSchemaManager
+
Creates a new database.
+
createDatabase() - Method in class Doctrine\DBAL\Schema\OracleSchemaManager
+
Creates a new database.
+
createEntity() - Method in class Doctrine\ORM\UnitOfWork
+
INTERNAL: +Creates an entity.
+
createForeignKey() - Method in class Doctrine\DBAL\Schema\AbstractSchemaManager
+
Create a new foreign key
+
createIndex() - Method in class Doctrine\DBAL\Schema\AbstractSchemaManager
+
Create a new index on a table
+
createNamedNativeQuery() - Method in class Doctrine\ORM\EntityManager
+
Creates a NativeQuery from a named native query.
+
createNamedQuery() - Method in class Doctrine\ORM\EntityManager
+
Creates a Query from a named query.
+
createNativeQuery() - Method in class Doctrine\ORM\EntityManager
+
Creates a native SQL query.
+
createQuery() - Method in class Doctrine\ORM\EntityManager
+
Creates a new Query object.
+
createQueryBuilder() - Method in class Doctrine\ORM\EntityManager
+
Create a QueryBuilder instance
+
createQueryBuilder() - Method in class Doctrine\ORM\EntityRepository
+
Create a new QueryBuilder instance that is prepopulated for this entity name
+
createSchema() - Method in class Doctrine\ORM\Tools\SchemaTool
+
Creates the database schema for the given array of ClassMetadata instances.
+
createSchema() - Method in class Doctrine\DBAL\Schema\AbstractSchemaManager
+
Create a schema instance for the current database.
+
createSchemaConfig() - Method in class Doctrine\DBAL\Schema\AbstractSchemaManager
+
Create the configuration for this schema.
+
CreateSchemaSqlCollector() - Class in package Doctrine\DBAL\Schema\Visitor
+
createSequence() - Method in class Doctrine\DBAL\Schema\Schema
+
Create a new sequence
+
createSequence() - Method in class Doctrine\DBAL\Schema\MsSqlSchemaManager
+
{@inheritdoc}
+
createSequence() - Method in class Doctrine\DBAL\Schema\AbstractSchemaManager
+
Create a new sequence
+
createsExplicitIndexForForeignKeys() - Method in class Doctrine\DBAL\Platforms\AbstractPlatform
+
+
createsExplicitIndexForForeignKeys() - Method in class Doctrine\DBAL\Platforms\MySqlPlatform
+
+
createTable() - Method in class Doctrine\DBAL\Schema\Schema
+
Create a new table
+
createTable() - Method in class Doctrine\DBAL\Schema\AbstractSchemaManager
+
Create a new table.
+
createView() - Method in class Doctrine\DBAL\Schema\AbstractSchemaManager
+
Create a new view
+
current() - Method in class Doctrine\ORM\Internal\Hydration\IterableResult
+
+
current() - Method in class Doctrine\Common\Collections\Collection
+
Gets the element of the collection at the current iterator position.
+
current() - Method in class Doctrine\Common\Collections\ArrayCollection
+
Gets the element of the collection at the current internal iterator position.
+
current() - Method in class Doctrine\ORM\PersistentCollection
+
Gets the element of the collection at the current iterator position.
+
CurrentDateFunction() - Class in package Doctrine\ORM\Query\AST\Functions
+
"CURRENT_DATE"
+
CurrentTimeFunction() - Class in package Doctrine\ORM\Query\AST\Functions
+
"CURRENT_TIME"
+
CurrentTimestampFunction() - Class in package Doctrine\ORM\Query\AST\Functions
+
"CURRENT_TIMESTAMP"
+
CustomFunctionsReturningDatetime() - Method in class Doctrine\ORM\Query\Parser
+
CustomFunctionsReturningNumerics() - Method in class Doctrine\ORM\Query\Parser
+
CustomFunctionsReturningStrings() - Method in class Doctrine\ORM\Query\Parser
+
+

D

+
+
DatabaseDriver() - Class in package Doctrine\ORM\Mapping\Driver
+
The DatabaseDriver reverse engineers the mapping metadata from a database.
+
DateTimeType() - Class in package Doctrine\DBAL\Types
+
Type that maps an SQL DATETIME/TIMESTAMP to a PHP DateTime object.
+
DateType() - Class in package Doctrine\DBAL\Types
+
Type that maps an SQL DATE to a PHP Date object.
+
DBALException() - Exception in package Doctrine\DBAL
+
Debug() - Class in package Doctrine\Common\Util
+
Static class containing most used debug methods.
+
DebugStack() - Class in package Doctrine\DBAL\Logging
+
Includes executed SQLs in a Debug Stack
+
DecimalType() - Class in package Doctrine\DBAL\Types
+
Type that maps an SQL DECIMAL to a PHP double.
+
delete() - Method in class Doctrine\ORM\Persisters\StandardEntityPersister
+
Deletes an entity.
+
delete() - Method in class Doctrine\ORM\Persisters\AbstractCollectionPersister
+
Deletes the persistent state represented by the given collection.
+
delete() - Method in class Doctrine\DBAL\Connection
+
Executes an SQL DELETE statement on a table.
+
delete() - Method in class Doctrine\ORM\Persisters\JoinedSubclassPersister
+
{@inheritdoc}
+
delete() - Method in class Doctrine\ORM\QueryBuilder
+
Construct a DQL DELETE query + +[php] +$qb = $em->createQueryBuilder() +->delete('User', 'u') +->where('u.id = :user_id'); +->setParameter(':user_id', 1);
+
delete() - Method in class Doctrine\Common\Cache\AbstractCache
+
{@inheritdoc}
+
delete() - Method in class Doctrine\Common\Cache\Cache
+
Deletes a cache entry.
+
deleteAll() - Method in class Doctrine\Common\Cache\AbstractCache
+
Delete all cache entries.
+
deleteByPrefix() - Method in class Doctrine\Common\Cache\AbstractCache
+
Delete cache entries where the id has the passed prefix
+
deleteByRegex() - Method in class Doctrine\Common\Cache\AbstractCache
+
Delete cache entries where the id matches a PHP regular expressions
+
deleteBySuffix() - Method in class Doctrine\Common\Cache\AbstractCache
+
Delete cache entries where the id has the passed suffix
+
DeleteClause() - Method in class Doctrine\ORM\Query\Parser
+
DeleteClause ::= "DELETE" ["FROM"] AbstractSchemaName ["AS"] AliasIdentificationVariable
+
DeleteClause() - Class in package Doctrine\ORM\Query\AST
+
DeleteClause ::= "DELETE" ["FROM"] AbstractSchemaName [["AS"] AliasIdentificationVariable]
+
deleteRows() - Method in class Doctrine\ORM\Persisters\AbstractCollectionPersister
+
DeleteStatement() - Method in class Doctrine\ORM\Query\Parser
+
DeleteStatement ::= DeleteClause [WhereClause]
+
DeleteStatement() - Class in package Doctrine\ORM\Query\AST
+
DeleteStatement = DeleteClause [WhereClause]
+
desc() - Method in class Doctrine\ORM\Query\Expr
+
Creates a DESCending order expression.
+
detach() - Method in class Doctrine\ORM\EntityManager
+
Detaches an entity from the EntityManager, causing a managed entity to +become detached.
+
detach() - Method in class Doctrine\ORM\UnitOfWork
+
Detaches an entity from the persistence management.
+
detachedEntityCannotBeRemoved() - Method in class Doctrine\ORM\ORMException
+
diff() - Method in class Doctrine\ORM\Query\Expr
+
Creates a difference mathematical expression with the given arguments. +
+
diffColumn() - Method in class Doctrine\DBAL\Schema\Comparator
+
Returns the difference between the fields $field1 and $field2. +
+
diffForeignKey() - Method in class Doctrine\DBAL\Schema\Comparator
+
+
diffIndex() - Method in class Doctrine\DBAL\Schema\Comparator
+
Finds the difference between the indexes $index1 and $index2. +
+
diffSequence() - Method in class Doctrine\DBAL\Schema\Comparator
+
+
diffTable() - Method in class Doctrine\DBAL\Schema\Comparator
+
Returns the difference between the tables $table1 and $table2. +
+
DiscriminatorColumn() - Class in package Doctrine\ORM\Mapping
+
Annotations class
+
DiscriminatorMap() - Class in package Doctrine\ORM\Mapping
+
Annotations class
+
dispatch() - Method in class Doctrine\ORM\Query\AST\JoinVariableDeclaration
+
Double-dispatch method, supposed to dispatch back to the walker. +
+
dispatch() - Method in class Doctrine\ORM\Query\AST\Literal
+
Double-dispatch method, supposed to dispatch back to the walker. +
+
dispatch() - Method in class Doctrine\ORM\Query\AST\Node
+
Double-dispatch method, supposed to dispatch back to the walker. +
+
dispatch() - Method in class Doctrine\ORM\Query\AST\HavingClause
+
Double-dispatch method, supposed to dispatch back to the walker. +
+
dispatch() - Method in class Doctrine\ORM\Query\AST\JoinAssociationPathExpression
+
Double-dispatch method, supposed to dispatch back to the walker. +
+
dispatch() - Method in class Doctrine\ORM\Query\AST\Join
+
Double-dispatch method, supposed to dispatch back to the walker. +
+
dispatch() - Method in class Doctrine\ORM\Query\AST\InExpression
+
Double-dispatch method, supposed to dispatch back to the walker. +
+
dispatch() - Method in class Doctrine\ORM\Query\AST\IndexBy
+
Double-dispatch method, supposed to dispatch back to the walker. +
+
dispatch() - Method in class Doctrine\ORM\Query\AST\InputParameter
+
Double-dispatch method, supposed to dispatch back to the walker. +
+
dispatch() - Method in class Doctrine\ORM\Query\AST\IdentificationVariableDeclaration
+
Double-dispatch method, supposed to dispatch back to the walker. +
+
dispatch() - Method in class Doctrine\ORM\Query\AST\ExistsExpression
+
Double-dispatch method, supposed to dispatch back to the walker. +
+
dispatch() - Method in class Doctrine\ORM\Query\AST\AggregateExpression
+
Double-dispatch method, supposed to dispatch back to the walker. +
+
dispatch() - Method in class Doctrine\ORM\Query\AST\ComparisonExpression
+
Double-dispatch method, supposed to dispatch back to the walker. +
+
dispatch() - Method in class Doctrine\ORM\Query\AST\ConditionalExpression
+
Double-dispatch method, supposed to dispatch back to the walker. +
+
dispatch() - Method in class Doctrine\ORM\Query\AST\ArithmeticExpression
+
Double-dispatch method, supposed to dispatch back to the walker. +
+
dispatch() - Method in class Doctrine\ORM\Query\AST\ArithmeticFactor
+
Double-dispatch method, supposed to dispatch back to the walker. +
+
dispatch() - Method in class Doctrine\ORM\Query\AST\BetweenExpression
+
Double-dispatch method, supposed to dispatch back to the walker. +
+
dispatch() - Method in class Doctrine\ORM\Query\AST\ArithmeticTerm
+
Double-dispatch method, supposed to dispatch back to the walker. +
+
dispatch() - Method in class Doctrine\ORM\Query\AST\ConditionalFactor
+
Double-dispatch method, supposed to dispatch back to the walker. +
+
dispatch() - Method in class Doctrine\ORM\Query\AST\ConditionalPrimary
+
Double-dispatch method, supposed to dispatch back to the walker. +
+
dispatch() - Method in class Doctrine\ORM\Query\AST\NullComparisonExpression
+
Double-dispatch method, supposed to dispatch back to the walker. +
+
dispatch() - Method in class Doctrine\ORM\Query\AST\FromClause
+
Double-dispatch method, supposed to dispatch back to the walker. +
+
dispatch() - Method in class Doctrine\ORM\Query\AST\EmptyCollectionComparisonExpression
+
Double-dispatch method, supposed to dispatch back to the walker. +
+
dispatch() - Method in class Doctrine\ORM\Query\AST\DeleteStatement
+
Double-dispatch method, supposed to dispatch back to the walker. +
+
dispatch() - Method in class Doctrine\ORM\Query\AST\ConditionalTerm
+
Double-dispatch method, supposed to dispatch back to the walker. +
+
dispatch() - Method in class Doctrine\ORM\Query\AST\DeleteClause
+
Double-dispatch method, supposed to dispatch back to the walker. +
+
dispatch() - Method in class Doctrine\ORM\Query\AST\GroupByClause
+
Double-dispatch method, supposed to dispatch back to the walker. +
+
dispatch() - Method in class Doctrine\ORM\Query\AST\LikeExpression
+
Double-dispatch method, supposed to dispatch back to the walker. +
+
dispatch() - Method in class Doctrine\ORM\Query\AST\SubselectFromClause
+
Double-dispatch method, supposed to dispatch back to the walker. +
+
dispatch() - Method in class Doctrine\ORM\Query\AST\Subselect
+
Double-dispatch method, supposed to dispatch back to the walker. +
+
dispatch() - Method in class Doctrine\ORM\Query\AST\UpdateClause
+
Double-dispatch method, supposed to dispatch back to the walker. +
+
dispatch() - Method in class Doctrine\ORM\Query\AST\QuantifiedExpression
+
+
dispatch() - Method in class Doctrine\ORM\Query\AST\SelectClause
+
Double-dispatch method, supposed to dispatch back to the walker. +
+
dispatch() - Method in class Doctrine\ORM\Query\AST\SimpleSelectExpression
+
Double-dispatch method, supposed to dispatch back to the walker. +
+
dispatch() - Method in class Doctrine\ORM\Query\AST\SimpleSelectClause
+
Double-dispatch method, supposed to dispatch back to the walker. +
+
dispatch() - Method in class Doctrine\ORM\Query\AST\SelectExpression
+
Double-dispatch method, supposed to dispatch back to the walker. +
+
dispatch() - Method in class Doctrine\ORM\Query\AST\RangeVariableDeclaration
+
Double-dispatch method, supposed to dispatch back to the walker. +
+
dispatch() - Method in class Doctrine\ORM\Query\AST\SelectStatement
+
Double-dispatch method, supposed to dispatch back to the walker. +
+
dispatch() - Method in class Doctrine\ORM\Query\AST\SimpleArithmeticExpression
+
Double-dispatch method, supposed to dispatch back to the walker. +
+
dispatch() - Method in class Doctrine\ORM\Query\AST\UpdateItem
+
Double-dispatch method, supposed to dispatch back to the walker. +
+
dispatch() - Method in class Doctrine\ORM\Query\AST\PathExpression
+
Double-dispatch method, supposed to dispatch back to the walker. +
+
dispatch() - Method in class Doctrine\ORM\Query\AST\CollectionMemberExpression
+
Double-dispatch method, supposed to dispatch back to the walker. +
+
dispatch() - Method in class Doctrine\ORM\Query\AST\Functions\FunctionNode
+
Double-dispatch method, supposed to dispatch back to the walker. +
+
dispatch() - Method in class Doctrine\ORM\Query\AST\OrderByClause
+
Double-dispatch method, supposed to dispatch back to the walker. +
+
dispatch() - Method in class Doctrine\ORM\Query\AST\UpdateStatement
+
Double-dispatch method, supposed to dispatch back to the walker. +
+
dispatch() - Method in class Doctrine\ORM\Query\AST\WhereClause
+
Double-dispatch method, supposed to dispatch back to the walker. +
+
dispatch() - Method in class Doctrine\ORM\Query\AST\OrderByItem
+
Double-dispatch method, supposed to dispatch back to the walker. +
+
dispatchEvent() - Method in class Doctrine\Common\EventManager
+
Dispatches an event to all registered listeners.
+
Driver() - Class in package Doctrine\DBAL\Driver\PDOMsSql
+
The PDO-based MsSql driver.
+
Driver() - Class in package Doctrine\DBAL\Driver\PDOOracle
+
Driver() - Class in package Doctrine\DBAL\Driver\PDOMySql
+
PDO MySql driver.
+
Driver() - Class in package Doctrine\DBAL\Driver\PDOSqlite
+
The PDO Sqlite driver.
+
Driver() - Interface in package Doctrine\ORM\Mapping\Driver
+
Contract for metadata drivers.
+
Driver() - Class in package Doctrine\DBAL\Driver\OCI8
+
A Doctrine DBAL driver for the Oracle OCI8 PHP extensions.
+
Driver() - Class in package Doctrine\DBAL\Driver\PDOPgSql
+
Driver that connects through pdo_pgsql.
+
Driver() - Interface in package Doctrine\DBAL
+
Driver interface. +
+
DriverChain() - Class in package Doctrine\ORM\Mapping\Driver
+
The DriverChain allows you to add multiple other mapping drivers for +certain namespaces
+
DriverManager() - Class in package Doctrine\DBAL
+
Factory for creating Doctrine\DBAL\Connection instances.
+
driverRequired() - Method in class Doctrine\DBAL\DBALException
+
dropAndCreateConstraint() - Method in class Doctrine\DBAL\Schema\AbstractSchemaManager
+
Drop and create a constraint
+
dropAndCreateDatabase() - Method in class Doctrine\DBAL\Schema\AbstractSchemaManager
+
Drop and creates a new database.
+
dropAndCreateForeignKey() - Method in class Doctrine\DBAL\Schema\AbstractSchemaManager
+
Drop and create a new foreign key
+
dropAndCreateIndex() - Method in class Doctrine\DBAL\Schema\AbstractSchemaManager
+
Drop and create a new index on a table
+
dropAndCreateSequence() - Method in class Doctrine\DBAL\Schema\AbstractSchemaManager
+
Drop and create a new sequence
+
dropAndCreateTable() - Method in class Doctrine\DBAL\Schema\AbstractSchemaManager
+
Drop and create a new table.
+
dropAndCreateView() - Method in class Doctrine\DBAL\Schema\AbstractSchemaManager
+
Drop and create a new view
+
dropAutoincrement() - Method in class Doctrine\DBAL\Schema\OracleSchemaManager
+
dropColumn() - Method in class Doctrine\DBAL\Schema\Table
+
Drop Column from Table
+
DropCommand() - Class in package Doctrine\ORM\Tools\Console\Command\SchemaTool
+
Command to drop the database schema for a set of classes based on their mappings.
+
dropConstraint() - Method in class Doctrine\DBAL\Schema\AbstractSchemaManager
+
Drop the constraint from the given table
+
dropDatabase() - Method in class Doctrine\DBAL\Schema\SqliteSchemaManager
+
{@inheritdoc}
+
dropDatabase() - Method in class Doctrine\DBAL\Schema\AbstractSchemaManager
+
Drops a database. +
+
dropDatabase() - Method in class Doctrine\DBAL\Schema\MsSqlSchemaManager
+
drop an existing database
+
dropDatabase() - Method in class Doctrine\DBAL\Schema\PostgreSqlSchemaManager
+
Drops a database. +
+
dropForeignKey() - Method in class Doctrine\DBAL\Schema\AbstractSchemaManager
+
Drops a foreign key from a table.
+
dropIndex() - Method in class Doctrine\DBAL\Schema\AbstractSchemaManager
+
Drop the index from the given table
+
dropSchema() - Method in class Doctrine\ORM\Tools\SchemaTool
+
Drops the database schema for the given classes. +
+
DropSchemaSqlCollector() - Class in package Doctrine\DBAL\Schema\Visitor
+
Gather SQL statements that allow to completly drop the current schema.
+
dropSequence() - Method in class Doctrine\DBAL\Schema\Schema
+
+
dropSequence() - Method in class Doctrine\DBAL\Schema\AbstractSchemaManager
+
Drops a sequence with a given name.
+
dropSequenceSql() - Method in class Doctrine\DBAL\Schema\MsSqlSchemaManager
+
This function drops an existing sequence
+
dropTable() - Method in class Doctrine\DBAL\Schema\OracleSchemaManager
+
Drop the given table
+
dropTable() - Method in class Doctrine\DBAL\Schema\Schema
+
Drop a table from the schema.
+
dropTable() - Method in class Doctrine\DBAL\Schema\AbstractSchemaManager
+
Drop the given table
+
dropView() - Method in class Doctrine\DBAL\Schema\AbstractSchemaManager
+
Drop a view
+
dump() - Method in class Doctrine\Common\Util\Debug
+
Prints a dump of the public, protected and private properties of $var.
+
dump() - Method in class Doctrine\ORM\Query\AST\Node
+
duplicateAssociationMapping() - Method in class Doctrine\ORM\Mapping\MappingException
+
duplicateColumnName() - Method in class Doctrine\ORM\Mapping\MappingException
+
+
duplicateFieldMapping() - Method in class Doctrine\ORM\Mapping\MappingException
+
+
+

E

+
+
EchoSQLLogger() - Class in package Doctrine\DBAL\Logging
+
A SQL logger that logs to the standard output using echo/var_dump.
+
ElementCollection() - Class in package Doctrine\ORM\Mapping
+
Annotations class
+
ElementCollectionPersister() - Class in package Doctrine\ORM\Persisters
+
Persister for collections of basic elements / value types.
+
EmptyCollectionComparisonExpression() - Class in package Doctrine\ORM\Query\AST
+
EmptyCollectionComparisonExpression ::= CollectionValuedPathExpression "IS" ["NOT"] "EMPTY"
+
EmptyCollectionComparisonExpression() - Method in class Doctrine\ORM\Query\Parser
+
EmptyCollectionComparisonExpression ::= CollectionValuedPathExpression "IS" ["NOT"] "EMPTY"
+
endProduction() - Method in class Doctrine\ORM\Query\Printer
+
Decreases indentation level by one and prints a closing parenthesis. +
+
ensureProductionSettings() - Method in class Doctrine\ORM\Configuration
+
Ensures that this Configuration instance contains settings that are +suitable for a production environment.
+
EnsureProductionSettingsCommand() - Class in package Doctrine\ORM\Tools\Console\Command
+
Command to ensure that Doctrine is properly configured for a production environment.
+
Entity() - Class in package Doctrine\ORM\Mapping
+
Annotations class
+
EntityExpression() - Method in class Doctrine\ORM\Query\Parser
+
EntityExpression ::= SingleValuedAssociationPathExpression | SimpleEntityExpression
+
EntityGenerator() - Class in package Doctrine\ORM\Tools
+
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');
+
EntityManager() - Class in package Doctrine\ORM
+
The EntityManager is the central access point to ORM functionality.
+
entityManagerClosed() - Method in class Doctrine\ORM\ORMException
+
EntityManagerHelper() - Class in package Doctrine\ORM\Tools\Console\Helper
+
Doctrine CLI Connection Helper.
+
entityMissingAssignedId() - Method in class Doctrine\ORM\ORMException
+
EntityNotFoundException() - Class in package Doctrine\ORM
+
Exception thrown when a Proxy fails to retrieve an Entity result.
+
EntityRepository() - Class in package Doctrine\ORM
+
An EntityRepository serves as a repository for entities with generic as well as +business specific methods for retrieving entities. +
+
eq() - Method in class Doctrine\ORM\Query\Expr
+
Creates an equality comparison expression with the given arguments. +
+
errorCode() - Method in class Doctrine\DBAL\Driver\OCI8\OCI8Connection
+
errorCode() - Method in class Doctrine\DBAL\Driver\OCI8\OCI8Statement
+
{@inheritdoc}
+
errorCode() - Method in class Doctrine\DBAL\Driver\Statement
+
errorCode +Fetch the SQLSTATE associated with the last operation on the statement handle
+
errorCode() - Method in class Doctrine\DBAL\Driver\Connection
+
errorInfo() - Method in class Doctrine\DBAL\Driver\OCI8\OCI8Statement
+
{@inheritdoc}
+
errorInfo() - Method in class Doctrine\DBAL\Driver\Connection
+
errorInfo() - Method in class Doctrine\DBAL\Driver\OCI8\OCI8Connection
+
errorInfo() - Method in class Doctrine\DBAL\Driver\Statement
+
errorInfo +Fetch extended error information associated with the last operation on the statement handle
+
EventArgs() - Class in package Doctrine\Common
+
EventArgs is the base class for classes containing event data. +
+
EventManager() - Class in package Doctrine\Common
+
The EventManager is the central point of Doctrine's event listener system. +
+
Events() - Class in package Doctrine\ORM
+
Container for all ORM events. +
+
Events() - Class in package Doctrine\DBAL
+
Container for all DBAL events. +
+
EventSubscriber() - Interface in package Doctrine\Common
+
An EventSubscriber knows himself what events he is interested in. +
+
exec() - Method in class Doctrine\DBAL\Driver\OCI8\OCI8Connection
+
exec() - Method in class Doctrine\DBAL\Driver\Connection
+
execute() - Method in class Doctrine\ORM\Query\Exec\MultiTableUpdateExecutor
+
Executes all SQL statements.
+
execute() - Method in class Doctrine\ORM\Tools\Console\Command\ClearCache\QueryCommand
+
+
execute() - Method in class Doctrine\ORM\Tools\Console\Command\ClearCache\MetadataCommand
+
+
execute() - Method in class Doctrine\DBAL\Driver\OCI8\OCI8Statement
+
{@inheritdoc}
+
execute() - Method in class Doctrine\ORM\Tools\Console\Command\ClearCache\ResultCommand
+
+
execute() - Method in class Doctrine\ORM\Query\Exec\SingleSelectExecutor
+
Executes all sql statements.
+
execute() - Method in class Doctrine\ORM\Query\Exec\AbstractSqlExecutor
+
Executes all sql statements.
+
execute() - Method in class Doctrine\ORM\Query\Exec\MultiTableDeleteExecutor
+
Executes all SQL statements.
+
execute() - Method in class Doctrine\ORM\Tools\Console\Command\ConvertMappingCommand
+
+
execute() - Method in class Doctrine\ORM\Query\Exec\SingleTableDeleteUpdateExecutor
+
Executes all sql statements.
+
execute() - Method in class Doctrine\ORM\AbstractQuery
+
Executes the query.
+
execute() - Method in class Doctrine\ORM\Tools\Console\Command\GenerateProxiesCommand
+
+
execute() - Method in class Doctrine\DBAL\Tools\Console\Command\RunSqlCommand
+
+
execute() - Method in class Doctrine\DBAL\Tools\Console\Command\ImportCommand
+
+
execute() - Method in class Doctrine\ORM\Tools\Console\Command\GenerateRepositoriesCommand
+
+
execute() - Method in class Doctrine\ORM\Tools\Console\Command\GenerateEntitiesCommand
+
+
execute() - Method in class Doctrine\DBAL\Driver\Statement
+
Executes a prepared statement + +If the prepared statement included parameter markers, you must either: +call PDOStatement->bindParam() to bind PHP variables to the parameter markers: +bound variables pass their value as input and receive the output value, +if any, of their associated parameter markers or pass an array of input-only +parameter values
+
execute() - Method in class Doctrine\ORM\Tools\Console\Command\ConvertDoctrine1SchemaCommand
+
+
execute() - Method in class Doctrine\ORM\Tools\Console\Command\RunDqlCommand
+
+
execute() - Method in class Doctrine\ORM\Tools\Console\Command\EnsureProductionSettingsCommand
+
+
execute() - Method in class Doctrine\ORM\Tools\Console\Command\SchemaTool\AbstractCommand
+
+
executeInserts() - Method in class Doctrine\ORM\Persisters\StandardEntityPersister
+
Executes all queued entity insertions and returns any generated post-insert +identifiers that were created as a result of the insertions. +
+
executeInserts() - Method in class Doctrine\ORM\Persisters\JoinedSubclassPersister
+
{@inheritdoc}
+
executeQuery() - Method in class Doctrine\DBAL\Connection
+
Executes an, optionally parameterized, SQL query. +
+
executeSchemaCommand() - Method in class Doctrine\ORM\Tools\Console\Command\SchemaTool\UpdateCommand
+
executeSchemaCommand() - Method in class Doctrine\ORM\Tools\Console\Command\SchemaTool\DropCommand
+
executeSchemaCommand() - Method in class Doctrine\ORM\Tools\Console\Command\SchemaTool\CreateCommand
+
executeSchemaCommand() - Method in class Doctrine\ORM\Tools\Console\Command\SchemaTool\AbstractCommand
+
+
executeUpdate() - Method in class Doctrine\DBAL\Connection
+
Executes an SQL INSERT/UPDATE/DELETE query with the given parameters +and returns the number of affected rows. +
+
exists() - Method in class Doctrine\ORM\Query\Expr
+
Creates an instance of EXISTS() function, with the given DQL Subquery.
+
exists() - Method in class Doctrine\ORM\PersistentCollection
+
{@inheritdoc}
+
exists() - Method in class Doctrine\Common\Collections\Collection
+
Tests for the existence of an element that satisfies the given predicate.
+
exists() - Method in class Doctrine\Common\Collections\ArrayCollection
+
Tests for the existance of an element that satisfies the given predicate.
+
ExistsExpression() - Class in package Doctrine\ORM\Query\AST
+
ExistsExpression ::= ["NOT"] "EXISTS" "(" Subselect ")"
+
ExistsExpression() - Method in class Doctrine\ORM\Query\Parser
+
ExistsExpression ::= ["NOT"] "EXISTS" "(" Subselect ")"
+
expireQueryCache() - Method in class Doctrine\ORM\Query
+
Defines if the query cache is active or not.
+
expireResultCache() - Method in class Doctrine\ORM\AbstractQuery
+
Defines if the result cache is active or not.
+
export() - Method in class Doctrine\ORM\Tools\Export\Driver\AbstractExporter
+
Export each ClassMetadata instance to a single Doctrine Mapping file +named after the entity
+
export() - Method in class Doctrine\Common\Util\Debug
+
exportClassMetadata() - Method in class Doctrine\ORM\Tools\Export\Driver\YamlExporter
+
Converts a single ClassMetadata instance to the exported format +and returns it + +TODO: Should this code be pulled out in to a toArray() method in ClassMetadata
+
exportClassMetadata() - Method in class Doctrine\ORM\Tools\Export\Driver\PhpExporter
+
Converts a single ClassMetadata instance to the exported format +and returns it
+
exportClassMetadata() - Method in class Doctrine\ORM\Tools\Export\Driver\AbstractExporter
+
Converts a single ClassMetadata instance to the exported format +and returns it
+
exportClassMetadata() - Method in class Doctrine\ORM\Tools\Export\Driver\AnnotationExporter
+
Converts a single ClassMetadata instance to the exported format +and returns it
+
exportClassMetadata() - Method in class Doctrine\ORM\Tools\Export\Driver\XmlExporter
+
Converts a single ClassMetadata instance to the exported format +and returns it
+
ExportException() - Class in package Doctrine\ORM\Tools\Export
+
Base exception class for all ORM exceptions.
+
expr() - Method in class Doctrine\ORM\QueryBuilder
+
Gets an ExpressionBuilder used for object-oriented construction of query expressions. +
+
Expr() - Class in package Doctrine\ORM\Query
+
This class is used to generate DQL expressions via a set of PHP static functions
+
+

F

+
+
fetch() - Method in class Doctrine\Common\Cache\Cache
+
Fetches an entry from the cache.
+
fetch() - Method in class Doctrine\Common\Cache\AbstractCache
+
{@inheritdoc}
+
fetch() - Method in class Doctrine\DBAL\Driver\OCI8\OCI8Statement
+
{@inheritdoc}
+
fetch() - Method in class Doctrine\DBAL\Driver\Statement
+
fetch
+
fetchAll() - Method in class Doctrine\DBAL\Driver\OCI8\OCI8Statement
+
{@inheritdoc}
+
fetchAll() - Method in class Doctrine\DBAL\Connection
+
Prepares and executes an SQL query and returns the result as an associative array.
+
fetchAll() - Method in class Doctrine\DBAL\Driver\Statement
+
Returns an array containing all of the result set rows
+
fetchArray() - Method in class Doctrine\DBAL\Connection
+
Prepares and executes an SQL query and returns the first row of the result +as a numerically indexed array.
+
fetchColumn() - Method in class Doctrine\DBAL\Connection
+
Prepares and executes an SQL query and returns the value of a single column +of the first row of the result.
+
fetchColumn() - Method in class Doctrine\DBAL\Driver\Statement
+
fetchColumn +Returns a single column from the next row of a +result set or FALSE if there are no more rows.
+
fetchColumn() - Method in class Doctrine\DBAL\Driver\OCI8\OCI8Statement
+
{@inheritdoc}
+
fetchRow() - Method in class Doctrine\DBAL\Connection
+
Prepares and executes an SQL query and returns the first row of the result +as an associative array.
+
FieldAssignment() - Method in class Doctrine\Common\Annotations\Parser
+
FieldAssignment ::= FieldName "=" PlainValue +FieldName ::= identifier
+
fileMappingDriversRequireConfiguredDirectoryPath() - Method in class Doctrine\ORM\Mapping\MappingException
+
filter() - Method in class Doctrine\ORM\Tools\Console\MetadataFilter
+
Filter Metadatas by one or more filter options.
+
filter() - Method in class Doctrine\Common\Collections\ArrayCollection
+
Returns all the elements of this collection that satisfy the predicate p. +
+
filter() - Method in class Doctrine\Common\Collections\Collection
+
Returns all the elements of this collection that satisfy the predicate p. +
+
filter() - Method in class Doctrine\ORM\PersistentCollection
+
{@inheritdoc}
+
find() - Method in class Doctrine\ORM\EntityRepository
+
Finds an entity by its primary key / identifier.
+
find() - Method in class Doctrine\ORM\EntityManager
+
Finds an Entity by its identifier. +
+
findAll() - Method in class Doctrine\ORM\EntityRepository
+
Finds all entities in the repository.
+
findBy() - Method in class Doctrine\ORM\EntityRepository
+
Finds entities by a set of criteria.
+
findByRequiresParameter() - Method in class Doctrine\ORM\ORMException
+
findOneBy() - Method in class Doctrine\ORM\EntityRepository
+
Finds a single entity by a set of criteria.
+
first() - Method in class Doctrine\Common\Collections\ArrayCollection
+
Sets the internal iterator to the first element in the collection and +returns this element.
+
first() - Method in class Doctrine\Common\Collections\Collection
+
Sets the internal iterator to the first element in the collection and +returns this element.
+
first() - Method in class Doctrine\ORM\PersistentCollection
+
{@inheritdoc}
+
FixSchema() - Class in package Doctrine\DBAL\Schema\Visitor
+
fixSchemaElementName() - Method in class Doctrine\DBAL\Platforms\OraclePlatform
+
Makes any fixes to a name of a schema element (table, sequence, ...) that are required +by restrictions of the platform, like a maximum length.
+
fixSchemaElementName() - Method in class Doctrine\DBAL\Platforms\AbstractPlatform
+
Makes any fixes to a name of a schema element (table, sequence, ...) that are required +by restrictions of the platform, like a maximum length.
+
flush() - Method in class Doctrine\ORM\EntityManager
+
Flushes all changes to objects that have been queued up to now to the database. +
+
forAll() - Method in class Doctrine\Common\Collections\Collection
+
Applies the given predicate p to all elements of this collection, +returning true, if the predicate yields true for all elements.
+
forAll() - Method in class Doctrine\Common\Collections\ArrayCollection
+
Applies the given predicate p to all elements of this collection, +returning true, if the predicate yields true for all elements.
+
forAll() - Method in class Doctrine\ORM\PersistentCollection
+
{@inheritdoc}
+
ForeignKeyConstraint() - Class in package Doctrine\DBAL\Schema
+
The abstract asset allows to reset the name of all assets without publishing this to the public userland. +
+
foreignKeyDoesNotExist() - Method in class Doctrine\DBAL\Schema\SchemaException
+
+
free() - Method in class Doctrine\ORM\AbstractQuery
+
Frees the resources used by the query object.
+
free() - Method in class Doctrine\ORM\Query
+
+
free() - Method in class Doctrine\ORM\Query\Parser
+
Free this parser enabling it to be reused
+
From() - Class in package Doctrine\ORM\Query\Expr
+
Expression class for DQL from
+
from() - Method in class Doctrine\ORM\QueryBuilder
+
Specify the FROM part when constructing a SELECT DQL query + +[php] +$qb = $em->createQueryBuilder() +->select('u') +->from('User', 'u')
+
FromClause() - Method in class Doctrine\ORM\Query\Parser
+
FromClause ::= "FROM" IdentificationVariableDeclaration {"," IdentificationVariableDeclaration}
+
FromClause() - Class in package Doctrine\ORM\Query\AST
+
FromClause ::= "FROM" IdentificationVariableDeclaration {"," IdentificationVariableDeclaration}
+
fromErrorInfo() - Method in class Doctrine\DBAL\Driver\OCI8\OCI8Exception
+
Func() - Class in package Doctrine\ORM\Query\Expr
+
Expression class for generating DQL functions
+
FunctionDeclaration() - Method in class Doctrine\ORM\Query\Parser
+
FunctionDeclaration ::= FunctionsReturningStrings | FunctionsReturningNumerics | FunctionsReturningDatetime
+
FunctionNode() - Class in package Doctrine\ORM\Query\AST\Functions
+
Abtract Function Node.
+
FunctionsReturningDatetime() - Method in class Doctrine\ORM\Query\Parser
+
FunctionsReturningDateTime ::= "CURRENT_DATE" | "CURRENT_TIME" | "CURRENT_TIMESTAMP"
+
FunctionsReturningNumerics() - Method in class Doctrine\ORM\Query\Parser
+
FunctionsReturningNumerics ::= +"LENGTH" "(" StringPrimary ")" | +"LOCATE" "(" StringPrimary "," StringPrimary ["," SimpleArithmeticExpression]")" | +"ABS" "(" SimpleArithmeticExpression ")" | +"SQRT" "(" SimpleArithmeticExpression ")" | +"MOD" "(" SimpleArithmeticExpression "," SimpleArithmeticExpression ")" | +"SIZE" "(" CollectionValuedPathExpression ")"
+
FunctionsReturningStrings() - Method in class Doctrine\ORM\Query\Parser
+
FunctionsReturningStrings ::= +"CONCAT" "(" StringPrimary "," StringPrimary ")" | +"SUBSTRING" "(" StringPrimary "," SimpleArithmeticExpression "," SimpleArithmeticExpression ")" | +"TRIM" "(" [["LEADING" | "TRAILING" | "BOTH"] [char] "FROM"] StringPrimary ")" | +"LOWER" "(" StringPrimary ")" | +"UPPER" "(" StringPrimary ")"
+
+

G

+
+
generate() - Method in class Doctrine\ORM\Id\IdentityGenerator
+
Generates an ID for the given entity.
+
generate() - Method in class Doctrine\ORM\Id\TableGenerator
+
Generates an identifier for an entity.
+
generate() - Method in class Doctrine\ORM\Id\SequenceIdentityGenerator
+
Generates an identifier for an entity.
+
generate() - Method in class Doctrine\ORM\Id\AssignedGenerator
+
Returns the identifier assigned to the given entity.
+
generate() - Method in class Doctrine\ORM\Id\SequenceGenerator
+
Generates an ID for the given entity.
+
generate() - Method in class Doctrine\ORM\Id\AbstractIdGenerator
+
Generates an identifier for an entity.
+
generate() - Method in class Doctrine\ORM\Tools\EntityGenerator
+
Generate and write entity classes for the given array of ClassMetadataInfo instances
+
GeneratedValue() - Class in package Doctrine\ORM\Mapping
+
Annotations class
+
GenerateEntitiesCommand() - Class in package Doctrine\ORM\Tools\Console\Command
+
Command to generate entity classes and method stubs from your mapping information.
+
generateEntityClass() - Method in class Doctrine\ORM\Tools\EntityGenerator
+
Generate a PHP5 Doctrine 2 entity class from the given ClassMetadataInfo instance
+
GenerateProxiesCommand() - Class in package Doctrine\ORM\Tools\Console\Command
+
Command to (re)generate the proxy classes used by doctrine.
+
generateProxyClasses() - Method in class Doctrine\ORM\Proxy\ProxyFactory
+
Generates proxy classes for all given classes.
+
GenerateRepositoriesCommand() - Class in package Doctrine\ORM\Tools\Console\Command
+
Command to generate repository classes for mapping information.
+
GenerateSchemaEventArgs() - Class in package Doctrine\ORM\Tools\Event
+
Event Args used for the Events::postGenerateSchema event.
+
GenerateSchemaTableEventArgs() - Class in package Doctrine\ORM\Tools\Event
+
Event Args used for the Events::postGenerateSchemaTable event.
+
generateUpdatedEntityClass() - Method in class Doctrine\ORM\Tools\EntityGenerator
+
Generate the updated code for the given ClassMetadataInfo and entity at path
+
generatorNotAllowedWithCompositeId() - Method in class Doctrine\ORM\Mapping\MappingException
+
get() - Method in class Doctrine\Common\Collections\Collection
+
Gets the element at the specified key/index.
+
get() - Method in class Doctrine\ORM\PersistentCollection
+
{@inheritdoc}
+
get() - Method in class Doctrine\Common\Collections\ArrayCollection
+
Gets the element with the given key/index.
+
getAcosExpression() - Method in class Doctrine\DBAL\Platforms\AbstractPlatform
+
getAdvancedForeignKeyOptionsSQL() - Method in class Doctrine\DBAL\Platforms\MySqlPlatform
+
Return the FOREIGN KEY query section dealing with non-standard options +as MATCH, INITIALLY DEFERRED, ON UPDATE, ...
+
getAdvancedForeignKeyOptionsSQL() - Method in class Doctrine\DBAL\Platforms\PostgreSqlPlatform
+
Return the FOREIGN KEY query section dealing with non-standard options +as MATCH, INITIALLY DEFERRED, ON UPDATE, ...
+
getAdvancedForeignKeyOptionsSQL() - Method in class Doctrine\DBAL\Platforms\AbstractPlatform
+
Return the FOREIGN KEY query section dealing with non-standard options +as MATCH, INITIALLY DEFERRED, ON UPDATE, ...
+
getAlias() - Method in class Doctrine\ORM\Query\Expr\From
+
getAliasMap() - Method in class Doctrine\ORM\Query\ResultSetMapping
+
+
getAllClassNames() - Method in class Doctrine\ORM\Mapping\Driver\AbstractFileDriver
+
Gets the names of all mapped classes known to this driver.
+
getAllClassNames() - Method in class Doctrine\ORM\Mapping\Driver\AnnotationDriver
+
{@inheritDoc}
+
getAllClassNames() - Method in class Doctrine\ORM\Mapping\Driver\DriverChain
+
Gets the names of all mapped classes known to this driver.
+
getAllClassNames() - Method in class Doctrine\ORM\Mapping\Driver\DatabaseDriver
+
{@inheritDoc}
+
getAllClassNames() - Method in class Doctrine\ORM\Mapping\Driver\Driver
+
Gets the names of all mapped classes known to this driver.
+
getAllMetadata() - Method in class Doctrine\ORM\Mapping\ClassMetadataFactory
+
Forces the factory to load the metadata of all classes known to the underlying +mapping driver.
+
getAllocationSize() - Method in class Doctrine\DBAL\Schema\Sequence
+
getAlterTableSQL() - Method in class Doctrine\DBAL\Platforms\AbstractPlatform
+
Gets the sql statements for altering an existing table. +
+
getAlterTableSQL() - Method in class Doctrine\DBAL\Platforms\PostgreSqlPlatform
+
generates the sql for altering an existing table on postgresql
+
getAlterTableSQL() - Method in class Doctrine\DBAL\Platforms\MsSqlPlatform
+
Gets the sql statements for altering an existing table. +
+
getAlterTableSQL() - Method in class Doctrine\DBAL\Platforms\MySqlPlatform
+
Gets the SQL to alter an existing table.
+
getAlterTableSQL() - Method in class Doctrine\DBAL\Platforms\OraclePlatform
+
Gets the sql statements for altering an existing table. +
+
getArrayResult() - Method in class Doctrine\ORM\AbstractQuery
+
Gets the array of results for the query. +
+
getAssociationMapping() - Method in class Doctrine\ORM\Mapping\ClassMetadataInfo
+
Gets the mapping of an association.
+
getAssociationMappings() - Method in class Doctrine\ORM\Mapping\ClassMetadataInfo
+
Gets all association mappings of the class.
+
getAST() - Method in class Doctrine\ORM\Query\Parser
+
Parse and build AST for the given Query.
+
getAST() - Method in class Doctrine\ORM\Query
+
Returns the corresponding AST for this DQL query.
+
getAutoGenerateProxyClasses() - Method in class Doctrine\ORM\Configuration
+
Gets a boolean flag that indicates whether proxy classes should always be regenerated +during each script execution.
+
getAvgExpression() - Method in class Doctrine\DBAL\Platforms\AbstractPlatform
+
Returns the average value of a column
+
getBetweenExpression() - Method in class Doctrine\DBAL\Platforms\AbstractPlatform
+
Returns SQL that checks if an expression evaluates to a value between +two values. +
+
getBigIntTypeDeclarationSQL() - Method in class Doctrine\DBAL\Platforms\SqlitePlatform
+
+
getBigIntTypeDeclarationSQL() - Method in class Doctrine\DBAL\Platforms\AbstractPlatform
+
Gets the SQL snippet that declares an 8 byte integer column.
+
getBigIntTypeDeclarationSQL() - Method in class Doctrine\DBAL\Platforms\MsSqlPlatform
+
+
getBigIntTypeDeclarationSQL() - Method in class Doctrine\DBAL\Platforms\MySqlPlatform
+
@override
+
getBigIntTypeDeclarationSQL() - Method in class Doctrine\DBAL\Platforms\OraclePlatform
+
+
getBigIntTypeDeclarationSQL() - Method in class Doctrine\DBAL\Platforms\PostgreSqlPlatform
+
+
getBindingType() - Method in class Doctrine\DBAL\Types\SmallIntType
+
Gets the (preferred) binding type for values of this type that +can be used when binding parameters to prepared statements. +
+
getBindingType() - Method in class Doctrine\DBAL\Types\Type
+
Gets the (preferred) binding type for values of this type that +can be used when binding parameters to prepared statements. +
+
getBindingType() - Method in class Doctrine\DBAL\Types\BooleanType
+
Gets the (preferred) binding type for values of this type that +can be used when binding parameters to prepared statements. +
+
getBindingType() - Method in class Doctrine\DBAL\Types\BigIntType
+
Gets the (preferred) binding type for values of this type that +can be used when binding parameters to prepared statements. +
+
getBindingType() - Method in class Doctrine\DBAL\Types\IntegerType
+
Gets the (preferred) binding type for values of this type that +can be used when binding parameters to prepared statements. +
+
getBooleanTypeDeclarationSQL() - Method in class Doctrine\DBAL\Platforms\AbstractPlatform
+
Gets the SQL snippet that declares a boolean column.
+
getBooleanTypeDeclarationSQL() - Method in class Doctrine\DBAL\Platforms\OraclePlatform
+
+
getBooleanTypeDeclarationSQL() - Method in class Doctrine\DBAL\Platforms\MySqlPlatform
+
+
getBooleanTypeDeclarationSQL() - Method in class Doctrine\DBAL\Platforms\SqlitePlatform
+
+
getBooleanTypeDeclarationSQL() - Method in class Doctrine\DBAL\Platforms\PostgreSqlPlatform
+
+
getBooleanTypeDeclarationSQL() - Method in class Doctrine\DBAL\Platforms\MsSqlPlatform
+
+
getByIdHash() - Method in class Doctrine\ORM\UnitOfWork
+
INTERNAL: +Gets an entity in the identity map by its identifier hash.
+
getCacheDriver() - Method in class Doctrine\ORM\Mapping\ClassMetadataFactory
+
Gets the cache driver used by the factory to cache ClassMetadata instances.
+
getCatchablePatterns() - Method in class Doctrine\ORM\Query\Lexer
+
+
getCheckDeclarationSQL() - Method in class Doctrine\DBAL\Platforms\AbstractPlatform
+
Obtain DBMS specific SQL code portion needed to set a CHECK constraint +declaration to be used in statements like CREATE TABLE.
+
getClassAnnotation() - Method in class Doctrine\Common\Annotations\AnnotationReader
+
Gets a class annotation.
+
getClassAnnotations() - Method in class Doctrine\Common\Annotations\AnnotationReader
+
Gets the annotations applied to a class.
+
getClassMetadata() - Method in class Doctrine\ORM\Tools\Event\GenerateSchemaTableEventArgs
+
+
getClassMetadata() - Method in class Doctrine\ORM\Persisters\StandardEntityPersister
+
Gets the ClassMetadata instance of the entity class this persister is used for.
+
getClassMetadata() - Method in class Doctrine\ORM\Event\LoadClassMetadataEventArgs
+
getClassMetadata() - Method in class Doctrine\ORM\EntityManager
+
Returns the metadata for a class.
+
getClassName() - Method in class Doctrine\ORM\Query\ResultSetMapping
+
Gets the name of the class of an entity result or joined entity result, +identified by the given unique alias.
+
getClassTable() - Method in class Doctrine\ORM\Tools\Event\GenerateSchemaTableEventArgs
+
+
getClobTypeDeclarationSQL() - Method in class Doctrine\DBAL\Platforms\MsSqlPlatform
+
@override
+
getClobTypeDeclarationSQL() - Method in class Doctrine\DBAL\Platforms\SqlitePlatform
+
Gets the SQL snippet used to declare a CLOB column type.
+
getClobTypeDeclarationSQL() - Method in class Doctrine\DBAL\Platforms\PostgreSqlPlatform
+
@override
+
getClobTypeDeclarationSQL() - Method in class Doctrine\DBAL\Platforms\OraclePlatform
+
@override
+
getClobTypeDeclarationSQL() - Method in class Doctrine\DBAL\Platforms\MySqlPlatform
+
@override
+
getClobTypeDeclarationSQL() - Method in class Doctrine\DBAL\Platforms\AbstractPlatform
+
Gets the SQL snippet used to declare a CLOB column type.
+
getCollationFieldDeclaration() - Method in class Doctrine\DBAL\Platforms\MySqlPlatform
+
Obtain DBMS specific SQL code portion needed to set the COLLATION +of a field declaration to be used in statements like CREATE TABLE.
+
getCollectionPersister() - Method in class Doctrine\ORM\UnitOfWork
+
Gets a collection persister for a collection-valued association.
+
getColumn() - Method in class Doctrine\DBAL\Schema\Table
+
Get a column instance
+
getColumnCharsetDeclarationSQL() - Method in class Doctrine\DBAL\Platforms\AbstractPlatform
+
Obtain DBMS specific SQL code portion needed to set the CHARACTER SET +of a field declaration to be used in statements like CREATE TABLE.
+
getColumnCollationDeclarationSQL() - Method in class Doctrine\DBAL\Platforms\AbstractPlatform
+
Obtain DBMS specific SQL code portion needed to set the COLLATION +of a field declaration to be used in statements like CREATE TABLE.
+
getColumnDeclarationListSQL() - Method in class Doctrine\DBAL\Platforms\AbstractPlatform
+
Get declaration of a number of fields in bulk
+
getColumnDeclarationSQL() - Method in class Doctrine\DBAL\Platforms\AbstractPlatform
+
Obtain DBMS specific SQL code portion needed to declare a generic type +field to be used in statements like CREATE TABLE.
+
getColumnDefinition() - Method in class Doctrine\DBAL\Schema\Column
+
getColumnName() - Method in class Doctrine\ORM\Mapping\ClassMetadataInfo
+
Gets a column name for a field name. +
+
getColumnNames() - Method in class Doctrine\ORM\Mapping\ClassMetadataInfo
+
Gets an array containing all the column names.
+
getColumns() - Method in class Doctrine\DBAL\Schema\Constraint
+
getColumns() - Method in class Doctrine\DBAL\Schema\Index
+
+
getColumns() - Method in class Doctrine\DBAL\Schema\Table
+
+
getColumns() - Method in class Doctrine\DBAL\Schema\ForeignKeyConstraint
+
getCommitOrder() - Method in class Doctrine\ORM\Internal\CommitOrderCalculator
+
Gets a valid commit order for all current nodes. +
+
getCommitOrderCalculator() - Method in class Doctrine\ORM\UnitOfWork
+
Gets the CommitOrderCalculator used by the UnitOfWork to order commits.
+
getConcatExpression() - Method in class Doctrine\DBAL\Platforms\MsSqlPlatform
+
Returns string to concatenate two or more string parameters
+
getConcatExpression() - Method in class Doctrine\DBAL\Platforms\MySqlPlatform
+
Returns a series of strings concatinated + +concat() accepts an arbitrary number of parameters.
+
getConcatExpression() - Method in class Doctrine\DBAL\Platforms\AbstractPlatform
+
Returns a series of strings concatinated + +concat() accepts an arbitrary number of parameters.
+
getConfiguration() - Method in class Doctrine\DBAL\Connection
+
Gets the Configuration used by the Connection.
+
getConfiguration() - Method in class Doctrine\ORM\EntityManager
+
Gets the Configuration used by the EntityManager.
+
getConnection() - Method in class Doctrine\ORM\Query\SqlWalker
+
Gets the Connection used by the walker.
+
getConnection() - Method in class Doctrine\DBAL\Tools\Console\Helper\ConnectionHelper
+
Retrieves Doctrine Database Connection
+
getConnection() - Method in class Doctrine\DBAL\Event\ConnectionEventArgs
+
+
getConnection() - Method in class Doctrine\ORM\EntityManager
+
Gets the database connection object used by the EntityManager.
+
getConnection() - Method in class Doctrine\DBAL\DriverManager
+
Creates a connection object based on the specified parameters. +
+
getCosExpression() - Method in class Doctrine\DBAL\Platforms\AbstractPlatform
+
getCountExpression() - Method in class Doctrine\DBAL\Platforms\AbstractPlatform
+
Returns the number of rows (without a NULL value) of a column + +If a '*' is used instead of a column the number of selected rows +is returned.
+
getCreateAutoincrementSql() - Method in class Doctrine\DBAL\Platforms\OraclePlatform
+
getCreateConstraintSQL() - Method in class Doctrine\DBAL\Platforms\AbstractPlatform
+
Gets the SQL to create a constraint on a table on this platform.
+
getCreateDatabaseSQL() - Method in class Doctrine\DBAL\Platforms\PostgreSqlPlatform
+
create a new database
+
getCreateDatabaseSQL() - Method in class Doctrine\DBAL\Platforms\MsSqlPlatform
+
create a new database
+
getCreateDatabaseSQL() - Method in class Doctrine\DBAL\Platforms\AbstractPlatform
+
getCreateDatabaseSQL() - Method in class Doctrine\DBAL\Platforms\MySqlPlatform
+
create a new database
+
getCreateForeignKeySQL() - Method in class Doctrine\DBAL\Platforms\AbstractPlatform
+
Create a new foreign key
+
getCreateIndexSQL() - Method in class Doctrine\DBAL\Platforms\AbstractPlatform
+
Gets the SQL to create an index on a table on this platform.
+
getCreateSchemaSql() - Method in class Doctrine\ORM\Tools\SchemaTool
+
Gets the list of DDL statements that are required to create the database schema for +the given list of ClassMetadata instances.
+
getCreateSequenceSQL() - Method in class Doctrine\DBAL\Platforms\AbstractPlatform
+
Gets the SQL to create a sequence on this platform.
+
getCreateSequenceSQL() - Method in class Doctrine\DBAL\Platforms\OraclePlatform
+
Gets the SQL used to create a sequence that starts with a given value +and increments by the given allocation size. +
+
getCreateSequenceSQL() - Method in class Doctrine\DBAL\Platforms\PostgreSqlPlatform
+
Gets the SQL to create a sequence on this platform.
+
getCreateTableSQL() - Method in class Doctrine\DBAL\Platforms\AbstractPlatform
+
Gets the SQL statement(s) to create a table with the specified name, columns and constraints +on this platform.
+
getCreateTemporaryTableSnippetSQL() - Method in class Doctrine\DBAL\Platforms\OraclePlatform
+
getCreateTemporaryTableSnippetSQL() - Method in class Doctrine\DBAL\Platforms\AbstractPlatform
+
getCreateViewSQL() - Method in class Doctrine\DBAL\Platforms\MySqlPlatform
+
getCreateViewSQL() - Method in class Doctrine\DBAL\Platforms\PostgreSqlPlatform
+
getCreateViewSQL() - Method in class Doctrine\DBAL\Platforms\OraclePlatform
+
getCreateViewSQL() - Method in class Doctrine\DBAL\Platforms\AbstractPlatform
+
getCreateViewSQL() - Method in class Doctrine\DBAL\Platforms\SqlitePlatform
+
getCurrentDateSQL() - Method in class Doctrine\DBAL\Platforms\AbstractPlatform
+
Gets the SQL specific for the platform to get the current date.
+
getCurrentMaxValue() - Method in class Doctrine\ORM\Id\SequenceGenerator
+
Gets the maximum value of the currently allocated bag of values.
+
getCurrentTimeSQL() - Method in class Doctrine\DBAL\Platforms\AbstractPlatform
+
Gets the SQL specific for the platform to get the current time.
+
getCurrentTimestampSQL() - Method in class Doctrine\DBAL\Platforms\AbstractPlatform
+
Gets the SQL specific for the platform to get the current timestamp
+
getCustomDatetimeFunction() - Method in class Doctrine\ORM\Configuration
+
Gets the implementation class name of a registered custom date/time DQL function.
+
getCustomNumericFunction() - Method in class Doctrine\ORM\Configuration
+
Gets the implementation class name of a registered custom numeric DQL function.
+
getCustomStringFunction() - Method in class Doctrine\ORM\Configuration
+
Gets the implementation class name of a registered custom string DQL function.
+
getCustomTypeDeclarationSQL() - Method in class Doctrine\DBAL\Platforms\AbstractPlatform
+
getCustomTypeDeclarationSql +Obtail SQL code portion needed to create a custom column, +e.g.
+
getDatabase() - Method in class Doctrine\DBAL\Connection
+
Gets the name of the database this Connection is connected to.
+
getDatabase() - Method in class Doctrine\DBAL\Driver\PDOSqlite\Driver
+
getDatabasePlatform() - Method in class Doctrine\DBAL\Schema\AbstractSchemaManager
+
Return associated platform.
+
getDatabasePlatform() - Method in class Doctrine\DBAL\Connection
+
Gets the DatabasePlatform for the connection.
+
getDatabasePlatform() - Method in class Doctrine\DBAL\Event\ConnectionEventArgs
+
+
getDatabasePlatform() - Method in class Doctrine\DBAL\Driver\PDOSqlite\Driver
+
Gets the database platform that is relevant for this driver.
+
getDateFormatString() - Method in class Doctrine\DBAL\Platforms\AbstractPlatform
+
Gets the format string, as accepted by the date() function, that describes +the format of a stored date value of this platform.
+
getDateTimeFormatString() - Method in class Doctrine\DBAL\Platforms\OraclePlatform
+
Gets the format string, as accepted by the date() function, that describes +the format of a stored datetime value of this platform.
+
getDateTimeFormatString() - Method in class Doctrine\DBAL\Platforms\AbstractPlatform
+
Gets the format string, as accepted by the date() function, that describes +the format of a stored datetime value of this platform.
+
getDateTimeFormatString() - Method in class Doctrine\DBAL\Platforms\PostgreSqlPlatform
+
Gets the format string, as accepted by the date() function, that describes +the format of a stored datetime value of this platform.
+
getDateTimeTypeDeclarationSQL() - Method in class Doctrine\DBAL\Platforms\MySqlPlatform
+
+
getDateTimeTypeDeclarationSQL() - Method in class Doctrine\DBAL\Platforms\PostgreSqlPlatform
+
+
getDateTimeTypeDeclarationSQL() - Method in class Doctrine\DBAL\Platforms\OraclePlatform
+
+
getDateTimeTypeDeclarationSQL() - Method in class Doctrine\DBAL\Platforms\SqlitePlatform
+
+
getDateTimeTypeDeclarationSQL() - Method in class Doctrine\DBAL\Platforms\AbstractPlatform
+
Obtain DBMS specific SQL to be used to create datetime fields in +statements like CREATE TABLE
+
getDateTimeTypeDeclarationSQL() - Method in class Doctrine\DBAL\Platforms\MsSqlPlatform
+
+
getDateTypeDeclarationSQL() - Method in class Doctrine\DBAL\Platforms\OraclePlatform
+
+
getDateTypeDeclarationSQL() - Method in class Doctrine\DBAL\Platforms\SqlitePlatform
+
+
getDateTypeDeclarationSQL() - Method in class Doctrine\DBAL\Platforms\MsSqlPlatform
+
+
getDateTypeDeclarationSQL() - Method in class Doctrine\DBAL\Platforms\MySqlPlatform
+
+
getDateTypeDeclarationSQL() - Method in class Doctrine\DBAL\Platforms\PostgreSqlPlatform
+
+
getDateTypeDeclarationSQL() - Method in class Doctrine\DBAL\Platforms\AbstractPlatform
+
Obtain DBMS specific SQL to be used to create date fields in statements +like CREATE TABLE.
+
getDecimalTypeDeclarationSQL() - Method in class Doctrine\DBAL\Platforms\AbstractPlatform
+
Gets the SQL snippet that declares a floating point column of arbitrary precision.
+
getDeclaringClass() - Method in class Doctrine\ORM\Query\ResultSetMapping
+
Gets the name of the class that owns a field mapping for the specified column.
+
getDefault() - Method in class Doctrine\DBAL\Schema\Column
+
getDefaultLength() - Method in class Doctrine\DBAL\Types\StringType
+
@override
+
getDefaultLength() - Method in class Doctrine\DBAL\Types\Type
+
Gets the default length of this type.
+
getDefaultTransactionIsolationLevel() - Method in class Doctrine\DBAL\Platforms\AbstractPlatform
+
Gets the default transaction isolation level of the platform.
+
getDefaultValueDeclarationSQL() - Method in class Doctrine\DBAL\Platforms\AbstractPlatform
+
Obtain DBMS specific SQL code portion needed to set a default value +declaration to be used in statements like CREATE TABLE.
+
getDeleteDiff() - Method in class Doctrine\ORM\PersistentCollection
+
INTERNAL: +getDeleteDiff
+
getDQL() - Method in class Doctrine\ORM\Query
+
Returns the DQL query that is represented by this query object.
+
getDQL() - Method in class Doctrine\ORM\QueryBuilder
+
Get the complete DQL string for this query builder instance + +[php] +$qb = $em->createQueryBuilder() +->select('u') +->from('User', 'u') +echo $qb->getDql(); // SELECT u FROM User u
+
getDQLPart() - Method in class Doctrine\ORM\QueryBuilder
+
Get a DQL part or parts by the part name
+
getDQLParts() - Method in class Doctrine\ORM\QueryBuilder
+
Get the full DQL parts array
+
getDriver() - Method in class Doctrine\DBAL\Event\ConnectionEventArgs
+
+
getDriver() - Method in class Doctrine\DBAL\Connection
+
Gets the DBAL driver instance.
+
getDrivers() - Method in class Doctrine\ORM\Mapping\Driver\DriverChain
+
Get the array of nested drivers.
+
getDropAutoincrementSql() - Method in class Doctrine\DBAL\Platforms\OraclePlatform
+
getDropConstraintSQL() - Method in class Doctrine\DBAL\Platforms\AbstractPlatform
+
Get drop constraint sql
+
getDropDatabaseSQL() - Method in class Doctrine\DBAL\Platforms\OraclePlatform
+
getDropDatabaseSQL() - Method in class Doctrine\DBAL\Platforms\PostgreSqlPlatform
+
drop an existing database
+
getDropDatabaseSQL() - Method in class Doctrine\DBAL\Platforms\AbstractPlatform
+
getDropDatabaseSQL() - Method in class Doctrine\DBAL\Platforms\MsSqlPlatform
+
drop an existing database
+
getDropDatabaseSQL() - Method in class Doctrine\DBAL\Platforms\MySqlPlatform
+
drop an existing database
+
getDropForeignKeySQL() - Method in class Doctrine\DBAL\Platforms\OraclePlatform
+
+
getDropForeignKeySQL() - Method in class Doctrine\DBAL\Platforms\PostgreSqlPlatform
+
+
getDropForeignKeySQL() - Method in class Doctrine\DBAL\Platforms\AbstractPlatform
+
+
getDropIndexSQL() - Method in class Doctrine\DBAL\Platforms\MySqlPlatform
+
Gets the SQL to drop an index of a table.
+
getDropIndexSQL() - Method in class Doctrine\DBAL\Platforms\AbstractPlatform
+
Drop index from a table
+
getDropSchemaSql() - Method in class Doctrine\ORM\Tools\SchemaTool
+
Gets the SQL needed to drop the database schema for the given classes.
+
getDropSequenceSQL() - Method in class Doctrine\DBAL\Platforms\OraclePlatform
+
+
getDropSequenceSQL() - Method in class Doctrine\DBAL\Platforms\AbstractPlatform
+
getDropSequenceSQL() - Method in class Doctrine\DBAL\Platforms\PostgreSqlPlatform
+
Drop existing sequence
+
getDropTableSQL() - Method in class Doctrine\DBAL\Platforms\AbstractPlatform
+
Drop a Table
+
getDropTableSQL() - Method in class Doctrine\DBAL\Platforms\MySqlPlatform
+
Gets the SQL to drop a table.
+
getDropViewSQL() - Method in class Doctrine\DBAL\Platforms\PostgreSqlPlatform
+
getDropViewSQL() - Method in class Doctrine\DBAL\Platforms\SqlitePlatform
+
getDropViewSQL() - Method in class Doctrine\DBAL\Platforms\MySqlPlatform
+
getDropViewSQL() - Method in class Doctrine\DBAL\Platforms\AbstractPlatform
+
getDropViewSQL() - Method in class Doctrine\DBAL\Platforms\OraclePlatform
+
getElement() - Method in class Doctrine\ORM\Mapping\Driver\AbstractFileDriver
+
Get the element of schema meta data for the class from the mapping file. +
+
getEmptyIdentityInsertSQL() - Method in class Doctrine\DBAL\Platforms\MsSqlPlatform
+
Get the insert sql for an empty insert statement
+
getEmptyIdentityInsertSQL() - Method in class Doctrine\DBAL\Platforms\PostgreSqlPlatform
+
Get the insert sql for an empty insert statement
+
getEmptyIdentityInsertSQL() - Method in class Doctrine\DBAL\Platforms\AbstractPlatform
+
Get the insert sql for an empty insert statement
+
getEmptyInstance() - Method in class Doctrine\Common\EventArgs
+
Gets the single, empty and immutable EventArgs instance. +
+
getEntity() - Method in class Doctrine\ORM\Event\LifecycleEventArgs
+
getEntityAlias() - Method in class Doctrine\ORM\Query\ResultSetMapping
+
Gets the alias of the class that owns a field mapping for the specified column.
+
getEntityChangeSet() - Method in class Doctrine\ORM\UnitOfWork
+
Gets the changeset for an entity.
+
getEntityChangeSet() - Method in class Doctrine\ORM\Event\PreUpdateEventArgs
+
getEntityIdentifier() - Method in class Doctrine\ORM\UnitOfWork
+
Gets the identifier of an entity. +
+
getEntityManager() - Method in class Doctrine\ORM\AbstractQuery
+
Retrieves the associated EntityManager of this Query instance.
+
getEntityManager() - Method in class Doctrine\ORM\Event\LifecycleEventArgs
+
+
getEntityManager() - Method in class Doctrine\ORM\Query\SqlWalker
+
Gets the EntityManager used by the walker.
+
getEntityManager() - Method in class Doctrine\ORM\Tools\Event\GenerateSchemaEventArgs
+
+
getEntityManager() - Method in class Doctrine\ORM\Query\Parser
+
Gets the EntityManager used by the parser.
+
getEntityManager() - Method in class Doctrine\ORM\Tools\Console\Helper\EntityManagerHelper
+
Retrieves Doctrine ORM EntityManager
+
getEntityManager() - Method in class Doctrine\ORM\QueryBuilder
+
Get the associated EntityManager for this query builder.
+
getEntityManager() - Method in class Doctrine\ORM\Event\OnFlushEventArgs
+
+
getEntityNamespace() - Method in class Doctrine\ORM\Configuration
+
Resolves a registered namespace alias to the full namespace.
+
getEntityPersister() - Method in class Doctrine\ORM\UnitOfWork
+
Gets the EntityPersister for an Entity.
+
getEntityResultCount() - Method in class Doctrine\ORM\Query\ResultSetMapping
+
Gets the number of different entities that appear in the mapped result.
+
getEntityState() - Method in class Doctrine\ORM\UnitOfWork
+
Gets the state of an entity within the current unit of work. +
+
getEventManager() - Method in class Doctrine\ORM\EntityManager
+
Gets the EventManager used by the EntityManager.
+
getEventManager() - Method in class Doctrine\DBAL\Connection
+
Gets the EventManager used by the Connection.
+
getExecutor() - Method in class Doctrine\ORM\Query\TreeWalkerAdapter
+
Gets an executor that can be used to execute the result of this walker.
+
getExecutor() - Method in class Doctrine\ORM\Query\TreeWalkerChain
+
Gets an executor that can be used to execute the result of this walker.
+
getExecutor() - Method in class Doctrine\ORM\Query\TreeWalker
+
Gets an executor that can be used to execute the result of this walker.
+
getExecutor() - Method in class Doctrine\ORM\Query\SqlWalker
+
Gets an executor that can be used to execute the result of this walker.
+
getExpireQueryCache() - Method in class Doctrine\ORM\Query
+
Retrieves if the query cache is active or not.
+
getExpireResultCache() - Method in class Doctrine\ORM\AbstractQuery
+
Retrieves if the resultset cache is active or not.
+
getExporter() - Method in class Doctrine\ORM\Tools\Export\ClassMetadataExporter
+
Get a exporter driver instance
+
getExpressionBuilder() - Method in class Doctrine\ORM\EntityManager
+
Gets an ExpressionBuilder used for object-oriented construction of query expressions. +
+
getExtension() - Method in class Doctrine\ORM\Tools\Export\Driver\AbstractExporter
+
Get the extension used to generated the path to a class
+
getFieldMapping() - Method in class Doctrine\ORM\Mapping\ClassMetadataInfo
+
Gets the mapping of a (regular) field that holds some data but not a +reference to another object.
+
getFieldName() - Method in class Doctrine\ORM\Mapping\ClassMetadataInfo
+
Gets the field name for a column name. +
+
getFieldName() - Method in class Doctrine\ORM\Query\ResultSetMapping
+
Gets the field name for a column name.
+
getFieldValue() - Method in class Doctrine\ORM\Mapping\ClassMetadata
+
Gets the specified field's value off the given entity.
+
getFileExtension() - Method in class Doctrine\ORM\Mapping\Driver\AbstractFileDriver
+
Get the file extension used to look for mapping files under
+
getFileExtension() - Method in class Doctrine\ORM\Mapping\Driver\AnnotationDriver
+
Get the file extension used to look for mapping files under
+
getFileExtension() - Method in class Doctrine\Common\ClassLoader
+
Gets the file extension of class files in the namespace of this class loader.
+
getFirstResult() - Method in class Doctrine\ORM\Query
+
Gets the position of the first result the query object was set to retrieve (the "offset"). +
+
getFirstResult() - Method in class Doctrine\ORM\QueryBuilder
+
Gets the position of the first result the query object was set to retrieve (the "offset"). +
+
getFixed() - Method in class Doctrine\DBAL\Schema\Column
+
getForeignColumns() - Method in class Doctrine\DBAL\Schema\ForeignKeyConstraint
+
+
getForeignKey() - Method in class Doctrine\DBAL\Schema\Table
+
+
getForeignKeyBaseDeclarationSQL() - Method in class Doctrine\DBAL\Platforms\AbstractPlatform
+
Obtain DBMS specific SQL code portion needed to set the FOREIGN KEY constraint +of a field declaration to be used in statements like CREATE TABLE.
+
getForeignKeyDeclarationSQL() - Method in class Doctrine\DBAL\Platforms\AbstractPlatform
+
Obtain DBMS specific SQL code portion needed to set the FOREIGN KEY constraint +of a field declaration to be used in statements like CREATE TABLE.
+
getForeignKeyReferentialActionSQL() - Method in class Doctrine\DBAL\Platforms\AbstractPlatform
+
returns given referential action in uppercase if valid, otherwise throws +an exception
+
getForeignKeys() - Method in class Doctrine\DBAL\Schema\Table
+
Get Constraints
+
getForeignTableName() - Method in class Doctrine\DBAL\Schema\ForeignKeyConstraint
+
+
getForUpdateSql() - Method in class Doctrine\DBAL\Platforms\AbstractPlatform
+
getFrom() - Method in class Doctrine\ORM\Query\Expr\From
+
getGuidExpression() - Method in class Doctrine\DBAL\Platforms\MySqlPlatform
+
Returns global unique identifier
+
getGuidExpression() - Method in class Doctrine\DBAL\Platforms\OraclePlatform
+
Returns global unique identifier
+
getGuidExpression() - Method in class Doctrine\DBAL\Platforms\MsSqlPlatform
+
Returns global unique identifier
+
getHint() - Method in class Doctrine\ORM\AbstractQuery
+
Gets the value of a query hint.
+
getHost() - Method in class Doctrine\DBAL\Connection
+
Gets the hostname of the currently connected database.
+
getHydrationMode() - Method in class Doctrine\ORM\AbstractQuery
+
Gets the hydration mode currently used by the query.
+
getHydrator() - Method in class Doctrine\ORM\EntityManager
+
Gets a hydrator for the given hydration mode. +
+
getIdentifierColumnNames() - Method in class Doctrine\ORM\Mapping\ClassMetadataInfo
+
Returns an array with all the identifier column names.
+
getIdentifierFieldNames() - Method in class Doctrine\ORM\Mapping\ClassMetadataInfo
+
Gets the identifier (primary key) field names of the class.
+
getIdentifierQuoteCharacter() - Method in class Doctrine\DBAL\Platforms\AbstractPlatform
+
Gets the character used for identifier quoting.
+
getIdentifierQuoteCharacter() - Method in class Doctrine\DBAL\Platforms\MySqlPlatform
+
Gets the character used for identifier quoting.
+
getIdentifierValues() - Method in class Doctrine\ORM\Mapping\ClassMetadata
+
Extracts the identifier values of an entity of this class. +
+
getIdentityColumnNullInsertSQL() - Method in class Doctrine\DBAL\Platforms\AbstractPlatform
+
getIdentityMap() - Method in class Doctrine\ORM\UnitOfWork
+
Gets the identity map of the UnitOfWork.
+
getIds() - Method in class Doctrine\Common\Cache\ApcCache
+
{@inheritdoc}
+
getIds() - Method in class Doctrine\Common\Cache\AbstractCache
+
Get an array of all the cache ids stored
+
getIds() - Method in class Doctrine\Common\Cache\MemcacheCache
+
{@inheritdoc}
+
getIds() - Method in class Doctrine\Common\Cache\XcacheCache
+
{@inheritdoc}
+
getIds() - Method in class Doctrine\Common\Cache\ArrayCache
+
{@inheritdoc}
+
getIncludePath() - Method in class Doctrine\Common\ClassLoader
+
Gets the base include path for all class files in the namespace of this class loader.
+
getIndex() - Method in class Doctrine\DBAL\Schema\Table
+
+
getIndexDeclarationSQL() - Method in class Doctrine\DBAL\Platforms\AbstractPlatform
+
Obtain DBMS specific SQL code portion needed to set an index +declaration to be used in statements like CREATE TABLE.
+
getIndexes() - Method in class Doctrine\DBAL\Schema\Table
+
+
getIndexFieldDeclarationListSQL() - Method in class Doctrine\DBAL\Platforms\AbstractPlatform
+
getIndexFieldDeclarationList +Obtain DBMS specific SQL code portion needed to set an index +declaration to be used in statements like CREATE TABLE.
+
getInExpression() - Method in class Doctrine\DBAL\Platforms\AbstractPlatform
+
Returns the SQL to check if a value is one in a set of +given values. +
+
getInitialValue() - Method in class Doctrine\DBAL\Schema\Sequence
+
getInsertDiff() - Method in class Doctrine\ORM\PersistentCollection
+
INTERNAL: +getInsertDiff
+
getInsertSQL() - Method in class Doctrine\ORM\Persisters\StandardEntityPersister
+
Gets the INSERT SQL used by the persister to persist a new entity.
+
getIntegerTypeDeclarationSQL() - Method in class Doctrine\DBAL\Platforms\OraclePlatform
+
+
getIntegerTypeDeclarationSQL() - Method in class Doctrine\DBAL\Platforms\AbstractPlatform
+
Gets the SQL snippet that declares a 4 byte integer column.
+
getIntegerTypeDeclarationSQL() - Method in class Doctrine\DBAL\Platforms\PostgreSqlPlatform
+
+
getIntegerTypeDeclarationSQL() - Method in class Doctrine\DBAL\Platforms\MsSqlPlatform
+
+
getIntegerTypeDeclarationSQL() - Method in class Doctrine\DBAL\Platforms\SqlitePlatform
+
+
getIntegerTypeDeclarationSQL() - Method in class Doctrine\DBAL\Platforms\MySqlPlatform
+
Obtain DBMS specific SQL code portion needed to declare an integer type +field to be used in statements like CREATE TABLE.
+
getIsNotNullExpression() - Method in class Doctrine\DBAL\Platforms\AbstractPlatform
+
Returns SQL that checks if a expression is not null.
+
getIsNullExpression() - Method in class Doctrine\DBAL\Platforms\AbstractPlatform
+
Returns SQL that checks if a expression is null.
+
getIterator() - Method in class Doctrine\ORM\PersistentCollection
+
{@inheritdoc}
+
getIterator() - Method in class Doctrine\Common\Collections\ArrayCollection
+
Gets an iterator for iterating over the elements in the collection.
+
getKeys() - Method in class Doctrine\ORM\PersistentCollection
+
{@inheritdoc}
+
getKeys() - Method in class Doctrine\Common\Collections\ArrayCollection
+
Gets all keys/indexes of the collection elements.
+
getKeys() - Method in class Doctrine\Common\Collections\Collection
+
Gets all keys/indices of the collection.
+
getLength() - Method in class Doctrine\DBAL\Schema\Column
+
getLengthExpression() - Method in class Doctrine\DBAL\Platforms\AbstractPlatform
+
Returns the length of a text field.
+
getLexer() - Method in class Doctrine\ORM\Query\Parser
+
Gets the lexer used by the parser.
+
getLifecycleCallbacks() - Method in class Doctrine\ORM\Mapping\ClassMetadataInfo
+
Gets the registered lifecycle callbacks for an event.
+
getListDatabasesSQL() - Method in class Doctrine\DBAL\Platforms\MySqlPlatform
+
getListDatabasesSQL() - Method in class Doctrine\DBAL\Platforms\OraclePlatform
+
getListDatabasesSQL() - Method in class Doctrine\DBAL\Platforms\AbstractPlatform
+
getListDatabasesSQL() - Method in class Doctrine\DBAL\Platforms\PostgreSqlPlatform
+
getListeners() - Method in class Doctrine\Common\EventManager
+
Gets the listeners of a specific event or all listeners.
+
getListSequencesSQL() - Method in class Doctrine\DBAL\Platforms\PostgreSqlPlatform
+
getListSequencesSQL() - Method in class Doctrine\DBAL\Platforms\OraclePlatform
+
getListSequencesSQL() - Method in class Doctrine\DBAL\Platforms\AbstractPlatform
+
getListTableColumnsSQL() - Method in class Doctrine\DBAL\Platforms\MySqlPlatform
+
getListTableColumnsSQL() - Method in class Doctrine\DBAL\Platforms\PostgreSqlPlatform
+
getListTableColumnsSQL() - Method in class Doctrine\DBAL\Platforms\SqlitePlatform
+
getListTableColumnsSQL() - Method in class Doctrine\DBAL\Platforms\AbstractPlatform
+
getListTableColumnsSQL() - Method in class Doctrine\DBAL\Platforms\OraclePlatform
+
getListTableConstraintsSQL() - Method in class Doctrine\DBAL\Platforms\OraclePlatform
+
getListTableConstraintsSQL() - Method in class Doctrine\DBAL\Platforms\SqlitePlatform
+
getListTableConstraintsSQL() - Method in class Doctrine\DBAL\Platforms\MySqlPlatform
+
getListTableConstraintsSQL() - Method in class Doctrine\DBAL\Platforms\PostgreSqlPlatform
+
getListTableConstraintsSQL() - Method in class Doctrine\DBAL\Platforms\AbstractPlatform
+
getListTableForeignKeysSQL() - Method in class Doctrine\DBAL\Platforms\OraclePlatform
+
getListTableForeignKeysSQL() - Method in class Doctrine\DBAL\Platforms\PostgreSqlPlatform
+
getListTableForeignKeysSQL() - Method in class Doctrine\DBAL\Platforms\AbstractPlatform
+
getListTableForeignKeysSQL() - Method in class Doctrine\DBAL\Platforms\MySqlPlatform
+
getListTableIndexesSQL() - Method in class Doctrine\DBAL\Platforms\MySqlPlatform
+
getListTableIndexesSQL() - Method in class Doctrine\DBAL\Platforms\AbstractPlatform
+
getListTableIndexesSQL() - Method in class Doctrine\DBAL\Platforms\PostgreSqlPlatform
+
+
getListTableIndexesSQL() - Method in class Doctrine\DBAL\Platforms\OraclePlatform
+
+
getListTableIndexesSQL() - Method in class Doctrine\DBAL\Platforms\SqlitePlatform
+
getListTablesSQL() - Method in class Doctrine\DBAL\Platforms\MsSqlPlatform
+
getListTablesSQL() - Method in class Doctrine\DBAL\Platforms\AbstractPlatform
+
getListTablesSQL() - Method in class Doctrine\DBAL\Platforms\PostgreSqlPlatform
+
getListTablesSQL() - Method in class Doctrine\DBAL\Platforms\SqlitePlatform
+
getListTablesSQL() - Method in class Doctrine\DBAL\Platforms\OraclePlatform
+
getListTablesSQL() - Method in class Doctrine\DBAL\Platforms\MySqlPlatform
+
getListUsersSQL() - Method in class Doctrine\DBAL\Platforms\AbstractPlatform
+
getListViewsSQL() - Method in class Doctrine\DBAL\Platforms\MySqlPlatform
+
Get the SQL to list all views of a database or user.
+
getListViewsSQL() - Method in class Doctrine\DBAL\Platforms\SqlitePlatform
+
Get the SQL to list all views of a database or user.
+
getListViewsSQL() - Method in class Doctrine\DBAL\Platforms\OraclePlatform
+
Get the SQL to list all views of a database or user.
+
getListViewsSQL() - Method in class Doctrine\DBAL\Platforms\AbstractPlatform
+
Get the SQL to list all views of a database or user.
+
getListViewsSQL() - Method in class Doctrine\DBAL\Platforms\PostgreSqlPlatform
+
Get the SQL to list all views of a database or user.
+
getLiteral() - Method in class Doctrine\Common\Lexer
+
Gets the literal for a given token.
+
getLoadedMetadata() - Method in class Doctrine\ORM\Mapping\ClassMetadataFactory
+
getLocalColumns() - Method in class Doctrine\DBAL\Schema\ForeignKeyConstraint
+
+
getLocalTableName() - Method in class Doctrine\DBAL\Schema\ForeignKeyConstraint
+
+
getLocateExpression() - Method in class Doctrine\DBAL\Platforms\AbstractPlatform
+
returns the position of the first occurrence of substring $substr in string $str
+
getLocateExpression() - Method in class Doctrine\DBAL\Platforms\PostgreSqlPlatform
+
returns the position of the first occurrence of substring $substr in string $str
+
getLocateExpression() - Method in class Doctrine\DBAL\Platforms\SqlitePlatform
+
returns the position of the first occurrence of substring $substr in string $str
+
getLocateExpression() - Method in class Doctrine\DBAL\Platforms\OraclePlatform
+
returns the position of the first occurrence of substring $substr in string $str
+
getLocateExpression() - Method in class Doctrine\DBAL\Platforms\MySqlPlatform
+
returns the position of the first occurrence of substring $substr in string $str
+
getLowerExpression() - Method in class Doctrine\DBAL\Platforms\AbstractPlatform
+
lower +Returns the string $str with all characters changed to +lowercase according to the current character set mapping.
+
getLtrimExpression() - Method in class Doctrine\DBAL\Platforms\AbstractPlatform
+
ltrim +returns the string $str with leading space characters removed
+
getMapping() - Method in class Doctrine\ORM\PersistentCollection
+
INTERNAL: Gets the association mapping of the collection.
+
getMaxExpression() - Method in class Doctrine\DBAL\Platforms\AbstractPlatform
+
Returns the highest value of a column
+
getMaxIdentifierLength() - Method in class Doctrine\DBAL\Schema\SchemaConfig
+
+
getMaxIdentifierLength() - Method in class Doctrine\DBAL\Platforms\OraclePlatform
+
Maximum length of any given databse identifier, like tables or column names.
+
getMaxIdentifierLength() - Method in class Doctrine\DBAL\Platforms\AbstractPlatform
+
Maximum length of any given databse identifier, like tables or column names.
+
getMaxResults() - Method in class Doctrine\ORM\QueryBuilder
+
Gets the maximum number of results the query object was set to retrieve (the "limit"). +
+
getMaxResults() - Method in class Doctrine\ORM\Query
+
Gets the maximum number of results the query object was set to retrieve (the "limit"). +
+
getMd5Expression() - Method in class Doctrine\DBAL\Platforms\AbstractPlatform
+
Returns the md5 sum of a field. +
+
getMediumIntTypeDeclarationSql() - Method in class Doctrine\DBAL\Platforms\SqlitePlatform
+
+
getMemcache() - Method in class Doctrine\Common\Cache\MemcacheCache
+
Gets the memcache instance used by the cache.
+
getMetadataCacheImpl() - Method in class Doctrine\ORM\Configuration
+
Gets the cache driver implementation that is used for metadata caching.
+
getMetadataDriverImpl() - Method in class Doctrine\ORM\Configuration
+
Gets the cache driver implementation that is used for the mapping metadata.
+
getMetadataFactory() - Method in class Doctrine\ORM\EntityManager
+
Gets the metadata factory used to gather the metadata of classes.
+
getMetadataFor() - Method in class Doctrine\ORM\Mapping\ClassMetadataFactory
+
Gets the class metadata descriptor for a class.
+
getMetadatas() - Method in class Doctrine\ORM\Tools\ConvertDoctrine1Schema
+
Get an array of ClassMetadataInfo instances from the passed +Doctrine 1 schema
+
getMetadatas() - Method in class Doctrine\ORM\Tools\ClassMetadataReader
+
Get an array of ClassMetadataInfo instances for all the configured mapping +directories.
+
getMetadatas() - Method in class Doctrine\ORM\Tools\Export\ClassMetadataExporter
+
Get an array of ClassMetadataInfo instances for all the configured mapping +directories.
+
getMethodAnnotation() - Method in class Doctrine\Common\Annotations\AnnotationReader
+
Gets a method annotation.
+
getMethodAnnotations() - Method in class Doctrine\Common\Annotations\AnnotationReader
+
Gets the annotations applied to a method.
+
getMigrateFromSql() - Method in class Doctrine\DBAL\Schema\Schema
+
+
getMigrateToSql() - Method in class Doctrine\DBAL\Schema\Schema
+
+
getMinExpression() - Method in class Doctrine\DBAL\Platforms\AbstractPlatform
+
Returns the lowest value of a column
+
getModExpression() - Method in class Doctrine\DBAL\Platforms\AbstractPlatform
+
Returns the remainder of the division operation +$expression1 / $expression2.
+
getName() - Method in class Doctrine\ORM\Tools\Console\Helper\EntityManagerHelper
+
+
getName() - Method in class Doctrine\DBAL\Types\StringType
+
@override
+
getName() - Method in class Doctrine\DBAL\Types\DateTimeType
+
Gets the name of this type.
+
getName() - Method in class Doctrine\DBAL\Types\DateType
+
Gets the name of this type.
+
getName() - Method in class Doctrine\DBAL\Types\BooleanType
+
Gets the name of this type.
+
getName() - Method in class Doctrine\DBAL\Types\BigIntType
+
Gets the name of this type.
+
getName() - Method in class Doctrine\DBAL\Types\ArrayType
+
Gets the name of this type.
+
getName() - Method in class Doctrine\DBAL\Types\DecimalType
+
Gets the name of this type.
+
getName() - Method in class Doctrine\DBAL\Types\IntegerType
+
Gets the name of this type.
+
getName() - Method in class Doctrine\DBAL\Types\TimeType
+
Gets the name of this type.
+
getName() - Method in class Doctrine\DBAL\Types\TextType
+
Gets the name of this type.
+
getName() - Method in class Doctrine\DBAL\Types\SmallIntType
+
Gets the name of this type.
+
getName() - Method in class Doctrine\DBAL\Types\ObjectType
+
Gets the name of this type.
+
getName() - Method in class Doctrine\DBAL\Types\Type
+
Gets the name of this type.
+
getName() - Method in class Doctrine\DBAL\Tools\Console\Helper\ConnectionHelper
+
+
getName() - Method in class Doctrine\DBAL\Platforms\AbstractPlatform
+
Gets the name of the platform.
+
getName() - Method in class Doctrine\DBAL\Schema\AbstractAsset
+
Return name of this schema asset.
+
getName() - Method in class Doctrine\DBAL\Platforms\PostgreSqlPlatform
+
Get the platform name for this instance
+
getName() - Method in class Doctrine\DBAL\Schema\Constraint
+
getName() - Method in class Doctrine\DBAL\Platforms\MsSqlPlatform
+
Get the platform name for this instance
+
getName() - Method in class Doctrine\DBAL\Platforms\SqlitePlatform
+
Get the platform name for this instance
+
getName() - Method in class Doctrine\DBAL\Platforms\MySqlPlatform
+
Get the platform name for this instance.
+
getName() - Method in class Doctrine\DBAL\Platforms\OraclePlatform
+
Get the platform name for this instance
+
getName() - Method in class Doctrine\DBAL\Driver\PDOSqlite\Driver
+
getNamedNativeQuery() - Method in class Doctrine\ORM\Configuration
+
Gets the components of a previously registered named native query.
+
getNamedQuery() - Method in class Doctrine\ORM\Configuration
+
Gets a previously registered named DQL query.
+
getNamespaceSeparator() - Method in class Doctrine\Common\ClassLoader
+
Gets the namespace separator used by classes in the namespace of this class loader.
+
getNewValue() - Method in class Doctrine\ORM\Event\PreUpdateEventArgs
+
Get the new value of the changeset of the changed field.
+
getNextValue() - Method in class Doctrine\ORM\Id\SequenceGenerator
+
Gets the next value that will be returned by generate().
+
getNonCatchablePatterns() - Method in class Doctrine\ORM\Query\Lexer
+
+
getNotExpression() - Method in class Doctrine\DBAL\Platforms\AbstractPlatform
+
Returns the SQL for a logical not. +
+
getNotnull() - Method in class Doctrine\DBAL\Schema\Column
+
getNowExpression() - Method in class Doctrine\DBAL\Platforms\MsSqlPlatform
+
Return string to call a variable with the current timestamp inside an SQL statement +There are three special variables for current date and time: +- CURRENT_TIMESTAMP (date and time, TIMESTAMP type) +- CURRENT_DATE (date, DATE type) +- CURRENT_TIME (time, TIME type)
+
getNowExpression() - Method in class Doctrine\DBAL\Platforms\PostgreSqlPlatform
+
Returns the SQL string to return the current system date and time.
+
getNowExpression() - Method in class Doctrine\DBAL\Platforms\SqlitePlatform
+
Return string to call a variable with the current timestamp inside an SQL statement +There are three special variables for current date and time.
+
getNowExpression() - Method in class Doctrine\DBAL\Platforms\OraclePlatform
+
Return string to call a variable with the current timestamp inside an SQL statement +There are three special variables for current date and time: +- CURRENT_TIMESTAMP (date and time, TIMESTAMP type) +- CURRENT_DATE (date, DATE type) +- CURRENT_TIME (time, TIME type)
+
getNowExpression() - Method in class Doctrine\DBAL\Platforms\AbstractPlatform
+
Returns the current system date.
+
getOldValue() - Method in class Doctrine\ORM\Event\PreUpdateEventArgs
+
Get the old value of the changeset of the changed field.
+
getOption() - Method in class Doctrine\DBAL\Schema\Table
+
getOption() - Method in class Doctrine\DBAL\Schema\ForeignKeyConstraint
+
getOptions() - Method in class Doctrine\DBAL\Schema\Table
+
getOriginalEntityData() - Method in class Doctrine\ORM\UnitOfWork
+
Gets the original data of an entity.
+
getOwner() - Method in class Doctrine\ORM\PersistentCollection
+
INTERNAL: +Gets the collection owner.
+
getOwningTable() - Method in class Doctrine\ORM\Persisters\StandardEntityPersister
+
Gets the name of the table that owns the column the given field is mapped to.
+
getOwningTable() - Method in class Doctrine\ORM\Persisters\JoinedSubclassPersister
+
Gets the name of the table that owns the column the given field is mapped to.
+
getParameter() - Method in class Doctrine\ORM\AbstractQuery
+
Gets a query parameter.
+
getParameter() - Method in class Doctrine\ORM\QueryBuilder
+
Gets a query parameter.
+
getParameterMappings() - Method in class Doctrine\ORM\Query\ParserResult
+
Gets all DQL to SQL parameter mappings.
+
getParameters() - Method in class Doctrine\ORM\AbstractQuery
+
Get all defined parameters.
+
getParameters() - Method in class Doctrine\ORM\QueryBuilder
+
Get all defined parameters
+
getParams() - Method in class Doctrine\DBAL\Connection
+
Gets the parameters used during instantiation.
+
getParentAlias() - Method in class Doctrine\ORM\Query\ResultSetMapping
+
Gets the parent alias of the given alias.
+
getParserResult() - Method in class Doctrine\ORM\Query\Parser
+
Gets the ParserResult that is being filled with information during parsing.
+
getPassword() - Method in class Doctrine\DBAL\Connection
+
Gets the password used by this connection.
+
getPaths() - Method in class Doctrine\ORM\Mapping\Driver\AbstractFileDriver
+
Retrieve the defined metadata lookup paths.
+
getPaths() - Method in class Doctrine\ORM\Mapping\Driver\AnnotationDriver
+
Retrieve the defined metadata lookup paths.
+
getPiExpression() - Method in class Doctrine\DBAL\Platforms\AbstractPlatform
+
getPlatformOption() - Method in class Doctrine\DBAL\Schema\Column
+
getPlatformOptions() - Method in class Doctrine\DBAL\Schema\Column
+
getPort() - Method in class Doctrine\DBAL\Connection
+
Gets the port of the currently connected database.
+
getPrecision() - Method in class Doctrine\DBAL\Schema\Column
+
getPrimaryKey() - Method in class Doctrine\DBAL\Schema\Table
+
+
getPropertyAnnotation() - Method in class Doctrine\Common\Annotations\AnnotationReader
+
Gets a property annotation.
+
getPropertyAnnotations() - Method in class Doctrine\Common\Annotations\AnnotationReader
+
Gets the annotations applied to a property.
+
getProxy() - Method in class Doctrine\ORM\Proxy\ProxyFactory
+
Gets a reference proxy instance for the entity of the given type and identified by +the given identifier.
+
getProxyDir() - Method in class Doctrine\ORM\Configuration
+
Gets the directory where Doctrine generates any necessary proxy class files.
+
getProxyFactory() - Method in class Doctrine\ORM\EntityManager
+
Gets the proxy factory used by the EntityManager to create entity proxies.
+
getProxyNamespace() - Method in class Doctrine\ORM\Configuration
+
Gets the namespace where proxy classes reside.
+
getQueries() - Method in class Doctrine\DBAL\Schema\Visitor\DropSchemaSqlCollector
+
+
getQueries() - Method in class Doctrine\DBAL\Schema\Visitor\CreateSchemaSqlCollector
+
Get all queries collected so far.
+
getQuery() - Method in class Doctrine\ORM\Query\SqlWalker
+
Gets the Query instance used by the walker.
+
getQuery() - Method in class Doctrine\ORM\QueryBuilder
+
Constructs a Query instance from the current configuration of the builder. +
+
getQueryCacheDriver() - Method in class Doctrine\ORM\Query
+
Returns the cache driver used for query caching.
+
getQueryCacheImpl() - Method in class Doctrine\ORM\Configuration
+
Gets the cache driver implementation that is used for the query cache (SQL cache).
+
getQueryCacheLifetime() - Method in class Doctrine\ORM\Query
+
Retrieves the lifetime of resultset cache.
+
getQueryComponent() - Method in class Doctrine\ORM\Query\SqlWalker
+
Gets the information about a single query component.
+
getQuotedColumnName() - Method in class Doctrine\ORM\Mapping\ClassMetadata
+
Gets the (possibly quoted) column name of a mapped field for safe use +in an SQL statement.
+
getQuotedJoinTableName() - Method in class Doctrine\ORM\Mapping\AssociationMapping
+
Gets the (possibly quoted) name of the join table.
+
getQuotedTableName() - Method in class Doctrine\ORM\Mapping\ClassMetadata
+
Gets the (possibly quoted) primary table name of this class for safe use +in an SQL statement.
+
getReference() - Method in class Doctrine\ORM\EntityManager
+
Gets a reference to the entity identified by the given type and identifier +without actually loading it. +
+
getReflectionClass() - Method in class Doctrine\ORM\Mapping\ClassMetadata
+
Gets the ReflectionClass instance of the mapped class.
+
getReflectionProperties() - Method in class Doctrine\ORM\Mapping\ClassMetadata
+
Gets the ReflectionPropertys of the mapped class.
+
getReflectionProperty() - Method in class Doctrine\ORM\Mapping\ClassMetadata
+
Gets a ReflectionProperty for a specific field of the mapped class.
+
getRegexpExpression() - Method in class Doctrine\DBAL\Platforms\MsSqlPlatform
+
Returns the regular expression operator.
+
getRegexpExpression() - Method in class Doctrine\DBAL\Platforms\AbstractPlatform
+
Returns the regular expression operator.
+
getRegexpExpression() - Method in class Doctrine\DBAL\Platforms\SqlitePlatform
+
returns the regular expression operator
+
getRegexpExpression() - Method in class Doctrine\DBAL\Platforms\MySqlPlatform
+
Returns the regular expression operator.
+
getRegexpExpression() - Method in class Doctrine\DBAL\Platforms\PostgreSqlPlatform
+
regexp
+
getRelation() - Method in class Doctrine\ORM\Query\ResultSetMapping
+
+
getRepository() - Method in class Doctrine\ORM\EntityManager
+
Gets the repository for an entity class.
+
getResult() - Method in class Doctrine\ORM\AbstractQuery
+
Gets the list of results for the query. +
+
getResultCacheDriver() - Method in class Doctrine\ORM\AbstractQuery
+
Returns the cache driver used for caching result sets.
+
getResultCacheImpl() - Method in class Doctrine\ORM\Configuration
+
Gets the cache driver implementation that is used for query result caching.
+
getResultCacheLifetime() - Method in class Doctrine\ORM\AbstractQuery
+
Retrieves the lifetime of resultset cache.
+
getResultSetMapping() - Method in class Doctrine\ORM\Query\ParserResult
+
Gets the ResultSetMapping for the parsed query.
+
getRollbackOnly() - Method in class Doctrine\DBAL\Connection
+
Check whether the current transaction is marked for rollback only.
+
getRootAlias() - Method in class Doctrine\ORM\QueryBuilder
+
Get the root alias for the query.
+
getRoundExpression() - Method in class Doctrine\DBAL\Platforms\AbstractPlatform
+
Rounds a numeric field to the number of decimals specified.
+
getRtrimExpression() - Method in class Doctrine\DBAL\Platforms\AbstractPlatform
+
rtrim +returns the string $str with proceeding space characters removed
+
getScalarAlias() - Method in class Doctrine\ORM\Query\ResultSetMapping
+
Gets the field alias for a column that is mapped as a scalar value.
+
getScalarResult() - Method in class Doctrine\ORM\AbstractQuery
+
Gets the scalar results for the query. +
+
getScale() - Method in class Doctrine\DBAL\Schema\Column
+
getScheduledCollectionDeletions() - Method in class Doctrine\ORM\UnitOfWork
+
Get the currently scheduled complete collection deletions
+
getScheduledCollectionUpdates() - Method in class Doctrine\ORM\UnitOfWork
+
Gets the currently scheduled collection inserts, updates and deletes.
+
getScheduledEntityDeletions() - Method in class Doctrine\ORM\UnitOfWork
+
Gets the currently scheduled entity deletions in this UnitOfWork.
+
getScheduledEntityInsertions() - Method in class Doctrine\ORM\UnitOfWork
+
Gets the currently scheduled entity insertions in this UnitOfWork.
+
getScheduledEntityUpdates() - Method in class Doctrine\ORM\UnitOfWork
+
Gets the currently scheduled entity updates in this UnitOfWork.
+
getSchema() - Method in class Doctrine\ORM\Tools\Event\GenerateSchemaEventArgs
+
+
getSchema() - Method in class Doctrine\ORM\Tools\Event\GenerateSchemaTableEventArgs
+
+
getSchemaFromMetadata() - Method in class Doctrine\ORM\Tools\SchemaTool
+
From a given set of metadata classes this method creates a Schema instance.
+
getSchemaManager() - Method in class Doctrine\DBAL\Event\ConnectionEventArgs
+
+
getSchemaManager() - Method in class Doctrine\DBAL\Driver\PDOSqlite\Driver
+
Gets the schema manager that is relevant for this driver.
+
getSchemaManager() - Method in class Doctrine\DBAL\Connection
+
Gets the SchemaManager that can be used to inspect or change the +database schema through the connection.
+
getSequence() - Method in class Doctrine\DBAL\Schema\Schema
+
+
getSequenceNextValSQL() - Method in class Doctrine\DBAL\Platforms\OraclePlatform
+
{@inheritdoc}
+
getSequenceNextValSQL() - Method in class Doctrine\DBAL\Platforms\PostgreSqlPlatform
+
getSequenceNextValSQL() - Method in class Doctrine\DBAL\Platforms\AbstractPlatform
+
getSequences() - Method in class Doctrine\DBAL\Schema\Schema
+
+
getSetCharsetSQL() - Method in class Doctrine\DBAL\Platforms\AbstractPlatform
+
Gets the SQL statement specific for the platform to set the charset. +
+
getSetTransactionIsolationSQL() - Method in class Doctrine\DBAL\Platforms\SqlitePlatform
+
Get sql to set the transaction isolation level
+
getSetTransactionIsolationSQL() - Method in class Doctrine\DBAL\Platforms\MsSqlPlatform
+
Get sql to set the transaction isolation level
+
getSetTransactionIsolationSQL() - Method in class Doctrine\DBAL\Platforms\AbstractPlatform
+
Get sql to set the transaction isolation level
+
getSetTransactionIsolationSQL() - Method in class Doctrine\DBAL\Platforms\PostgreSqlPlatform
+
Get sql to set the transaction isolation level
+
getSetTransactionIsolationSQL() - Method in class Doctrine\DBAL\Platforms\OraclePlatform
+
{@inheritdoc}
+
getSetTransactionIsolationSQL() - Method in class Doctrine\DBAL\Platforms\MySqlPlatform
+
Get sql to set the transaction isolation level
+
getShowDatabasesSQL() - Method in class Doctrine\DBAL\Platforms\AbstractPlatform
+
Get sql query to show a list of database.
+
getShowDatabasesSQL() - Method in class Doctrine\DBAL\Platforms\MsSqlPlatform
+
Get sql query to show a list of database.
+
getShowDatabasesSQL() - Method in class Doctrine\DBAL\Platforms\MySqlPlatform
+
Get sql query to show a list of database.
+
getSinExpression() - Method in class Doctrine\DBAL\Platforms\AbstractPlatform
+
getSingleIdentifierColumnName() - Method in class Doctrine\ORM\Mapping\ClassMetadataInfo
+
Gets the column name of the single id column.
+
getSingleIdentifierFieldName() - Method in class Doctrine\ORM\Mapping\ClassMetadataInfo
+
Gets the name of the single id field.
+
getSingleIdReflectionProperty() - Method in class Doctrine\ORM\Mapping\ClassMetadata
+
Gets the ReflectionProperty for the single identifier field.
+
getSingleResult() - Method in class Doctrine\ORM\AbstractQuery
+
Gets the single result of the query. +
+
getSingleScalarResult() - Method in class Doctrine\ORM\AbstractQuery
+
Gets the single scalar result of the query. +
+
getSmallIntTypeDeclarationSQL() - Method in class Doctrine\DBAL\Platforms\OraclePlatform
+
+
getSmallIntTypeDeclarationSQL() - Method in class Doctrine\DBAL\Platforms\AbstractPlatform
+
Gets the SQL snippet that declares a 2 byte integer column.
+
getSmallIntTypeDeclarationSQL() - Method in class Doctrine\DBAL\Platforms\SqlitePlatform
+
+
getSmallIntTypeDeclarationSQL() - Method in class Doctrine\DBAL\Platforms\PostgreSqlPlatform
+
+
getSmallIntTypeDeclarationSQL() - Method in class Doctrine\DBAL\Platforms\MySqlPlatform
+
@override
+
getSmallIntTypeDeclarationSQL() - Method in class Doctrine\DBAL\Platforms\MsSqlPlatform
+
+
getSnapshot() - Method in class Doctrine\ORM\PersistentCollection
+
INTERNAL: +Returns the last snapshot of the elements in the collection.
+
getSQL() - Method in class Doctrine\ORM\AbstractQuery
+
Gets the SQL query that corresponds to this query object. +
+
getSql() - Method in class Doctrine\ORM\Query\AST\Functions\SubstringFunction
+
+
getSQL() - Method in class Doctrine\ORM\Query
+
Gets the SQL query/queries that correspond to this DQL query.
+
getSql() - Method in class Doctrine\ORM\Query\AST\Functions\CurrentTimeFunction
+
+
getSql() - Method in class Doctrine\ORM\Query\AST\Functions\CurrentDateFunction
+
+
getSql() - Method in class Doctrine\ORM\Query\AST\Functions\ConcatFunction
+
+
getSql() - Method in class Doctrine\ORM\Query\AST\Functions\CurrentTimestampFunction
+
+
getSql() - Method in class Doctrine\ORM\Query\AST\Functions\FunctionNode
+
getSQL() - Method in class Doctrine\ORM\NativeQuery
+
Gets the SQL query.
+
getSql() - Method in class Doctrine\ORM\Query\AST\Functions\SqrtFunction
+
+
getSql() - Method in class Doctrine\ORM\Query\AST\Functions\ModFunction
+
+
getSql() - Method in class Doctrine\DBAL\Schema\View
+
+
getSql() - Method in class Doctrine\ORM\Query\AST\Functions\AbsFunction
+
+
getSql() - Method in class Doctrine\ORM\Query\AST\Functions\LowerFunction
+
+
getSql() - Method in class Doctrine\ORM\Query\AST\Functions\TrimFunction
+
+
getSql() - Method in class Doctrine\ORM\Query\AST\Functions\UpperFunction
+
+
getSql() - Method in class Doctrine\ORM\Query\AST\Functions\LengthFunction
+
+
getSql() - Method in class Doctrine\ORM\Query\AST\Functions\LocateFunction
+
+
getSql() - Method in class Doctrine\ORM\Query\AST\Functions\SizeFunction
+
+
getSqlColumnAlias() - Method in class Doctrine\ORM\Query\SqlWalker
+
Gets an SQL column alias for a column name.
+
getSqlCommentEndString() - Method in class Doctrine\DBAL\Platforms\AbstractPlatform
+
Gets the string portion that ends an SQL comment.
+
getSqlCommentStartString() - Method in class Doctrine\DBAL\Platforms\AbstractPlatform
+
Gets the string portion that starts an SQL comment.
+
getSqlDeclaration() - Method in class Doctrine\DBAL\Types\BooleanType
+
Gets the SQL declaration snippet for a field of this type.
+
getSqlDeclaration() - Method in class Doctrine\DBAL\Types\DateTimeType
+
Gets the SQL declaration snippet for a field of this type.
+
getSqlDeclaration() - Method in class Doctrine\DBAL\Types\BigIntType
+
Gets the SQL declaration snippet for a field of this type.
+
getSqlDeclaration() - Method in class Doctrine\DBAL\Types\ArrayType
+
Gets the SQL declaration snippet for a field of this type.
+
getSqlDeclaration() - Method in class Doctrine\DBAL\Types\Type
+
Gets the SQL declaration snippet for a field of this type.
+
getSqlDeclaration() - Method in class Doctrine\DBAL\Types\DateType
+
Gets the SQL declaration snippet for a field of this type.
+
getSqlDeclaration() - Method in class Doctrine\DBAL\Types\TimeType
+
{@inheritdoc}
+
getSqlDeclaration() - Method in class Doctrine\DBAL\Types\TextType
+
@override
+
getSqlDeclaration() - Method in class Doctrine\DBAL\Types\SmallIntType
+
Gets the SQL declaration snippet for a field of this type.
+
getSqlDeclaration() - Method in class Doctrine\DBAL\Types\ObjectType
+
Gets the SQL declaration snippet for a field of this type.
+
getSqlDeclaration() - Method in class Doctrine\DBAL\Types\DecimalType
+
Gets the SQL declaration snippet for a field of this type.
+
getSqlDeclaration() - Method in class Doctrine\DBAL\Types\IntegerType
+
Gets the SQL declaration snippet for a field of this type.
+
getSqlDeclaration() - Method in class Doctrine\DBAL\Types\StringType
+
@override
+
getSqlExecutor() - Method in class Doctrine\ORM\Query\ParserResult
+
Gets the SQL executor used by this ParserResult.
+
getSQLLogger() - Method in class Doctrine\DBAL\Configuration
+
Gets the SQL logger that is used.
+
getSqlParameterPositions() - Method in class Doctrine\ORM\Query\ParserResult
+
Gets the SQL parameter positions for a DQL parameter name/position.
+
getSQLResultCasing() - Method in class Doctrine\DBAL\Platforms\OraclePlatform
+
Gets the character casing of a column in an SQL result set of this platform. +
+
getSQLResultCasing() - Method in class Doctrine\DBAL\Platforms\PostgreSqlPlatform
+
Gets the character casing of a column in an SQL result set. +
+
getSQLResultCasing() - Method in class Doctrine\DBAL\Platforms\AbstractPlatform
+
Gets the character casing of a column in an SQL result set of this platform.
+
getSqlStatements() - Method in class Doctrine\ORM\Query\Exec\AbstractSqlExecutor
+
Gets the SQL statements that are executed by the executor.
+
getSqlTableAlias() - Method in class Doctrine\ORM\Query\SqlWalker
+
Generates a unique, short SQL table alias.
+
getState() - Method in class Doctrine\ORM\QueryBuilder
+
Get the state of this query builder instance + +[php] +if ($qb->getState() == QueryBuilder::STATE_DIRTY) { +echo 'Query builder is dirty'; +} else { +echo 'Query builder is clean'; +}
+
getState() - Method in class Doctrine\ORM\Query
+
Returns the state of this query object +By default the type is Doctrine_ORM_Query_Abstract::STATE_CLEAN but if it appears any unprocessed DQL +part, it is switched to Doctrine_ORM_Query_Abstract::STATE_DIRTY.
+
getSubscribedEvents() - Method in class Doctrine\DBAL\Event\Listeners\MysqlSessionInit
+
getSubscribedEvents() - Method in class Doctrine\DBAL\Event\Listeners\OracleSessionInit
+
getSubscribedEvents() - Method in class Doctrine\Common\EventSubscriber
+
Returns an array of events this subscriber wants to listen to.
+
getSubstringExpression() - Method in class Doctrine\DBAL\Platforms\PostgreSqlPlatform
+
Returns part of a string. +
+
getSubstringExpression() - Method in class Doctrine\DBAL\Platforms\MsSqlPlatform
+
return string to call a function to get a substring inside an SQL statement
+
getSubstringExpression() - Method in class Doctrine\DBAL\Platforms\SqlitePlatform
+
return string to call a function to get a substring inside an SQL statement + +Note: Not SQL92, but common functionality. +
+
getSubstringExpression() - Method in class Doctrine\DBAL\Platforms\OraclePlatform
+
return string to call a function to get a substring inside an SQL statement + +Note: Not SQL92, but common functionality.
+
getSubstringExpression() - Method in class Doctrine\DBAL\Platforms\AbstractPlatform
+
return string to call a function to get a substring inside an SQL statement + +Note: Not SQL92, but common functionality. +
+
getSumExpression() - Method in class Doctrine\DBAL\Platforms\AbstractPlatform
+
Returns the total sum of a column
+
getTable() - Method in class Doctrine\DBAL\Schema\Schema
+
+
getTableName() - Method in class Doctrine\ORM\Mapping\ClassMetadataInfo
+
Gets the name of the primary table.
+
getTables() - Method in class Doctrine\DBAL\Schema\Schema
+
Get all tables of this schema.
+
getTemporaryIdTableName() - Method in class Doctrine\ORM\Mapping\ClassMetadataInfo
+
Gets the table name to use for temporary identifier tables of this class.
+
getTemporaryTableSQL() - Method in class Doctrine\DBAL\Platforms\AbstractPlatform
+
A method to return the required SQL string that fits between CREATE ...
+
getTimeFormatString() - Method in class Doctrine\DBAL\Platforms\AbstractPlatform
+
Gets the format string, as accepted by the date() function, that describes +the format of a stored time value of this platform.
+
getTimeTypeDeclarationSQL() - Method in class Doctrine\DBAL\Platforms\OraclePlatform
+
+
getTimeTypeDeclarationSQL() - Method in class Doctrine\DBAL\Platforms\SqlitePlatform
+
+
getTimeTypeDeclarationSQL() - Method in class Doctrine\DBAL\Platforms\MsSqlPlatform
+
+
getTimeTypeDeclarationSQL() - Method in class Doctrine\DBAL\Platforms\AbstractPlatform
+
Obtain DBMS specific SQL to be used to create time fields in statements +like CREATE TABLE.
+
getTimeTypeDeclarationSQL() - Method in class Doctrine\DBAL\Platforms\MySqlPlatform
+
+
getTimeTypeDeclarationSQL() - Method in class Doctrine\DBAL\Platforms\PostgreSqlPlatform
+
+
getTinyIntTypeDeclarationSql() - Method in class Doctrine\DBAL\Platforms\SqlitePlatform
+
+
getTransactionIsolation() - Method in class Doctrine\DBAL\Connection
+
Gets the currently active transaction isolation level.
+
getTransactionNestingLevel() - Method in class Doctrine\DBAL\Connection
+
Returns the current transaction nesting level.
+
getTrimExpression() - Method in class Doctrine\DBAL\Platforms\AbstractPlatform
+
Trim a string, leading/trailing/both and with a given char which defaults to space.
+
getTrimExpression() - Method in class Doctrine\DBAL\Platforms\SqlitePlatform
+
Trim a string, leading/trailing/both and with a given char which defaults to space.
+
getTruncateTableSQL() - Method in class Doctrine\DBAL\Platforms\MsSqlPlatform
+
+
getTruncateTableSQL() - Method in class Doctrine\DBAL\Platforms\OraclePlatform
+
+
getTruncateTableSQL() - Method in class Doctrine\DBAL\Platforms\SqlitePlatform
+
+
getTruncateTableSQL() - Method in class Doctrine\DBAL\Platforms\PostgreSqlPlatform
+
+
getTruncateTableSQL() - Method in class Doctrine\DBAL\Platforms\AbstractPlatform
+
Generate a Truncate Table SQL statement for a given table. +
+
getType() - Method in class Doctrine\DBAL\Schema\Column
+
getType() - Method in class Doctrine\ORM\QueryBuilder
+
Get the type of the currently built query.
+
getType() - Method in class Doctrine\DBAL\Types\Type
+
Factory method to create type instances. +
+
getTypeClass() - Method in class Doctrine\ORM\PersistentCollection
+
getTypeOfColumn() - Method in class Doctrine\ORM\Mapping\ClassMetadataInfo
+
Gets the type of a column.
+
getTypeOfField() - Method in class Doctrine\ORM\Mapping\ClassMetadataInfo
+
Gets the type of a field.
+
getTypesMap() - Method in class Doctrine\DBAL\Types\Type
+
Get the types array map which holds all registered types and the corresponding +type class
+
getUniqueConstraintDeclarationSQL() - Method in class Doctrine\DBAL\Platforms\AbstractPlatform
+
Obtain DBMS specific SQL code portion needed to set a unique +constraint declaration to be used in statements like CREATE TABLE.
+
getUniqueFieldDeclarationSQL() - Method in class Doctrine\DBAL\Platforms\AbstractPlatform
+
Obtain DBMS specific SQL code portion needed to set the UNIQUE constraint +of a field declaration to be used in statements like CREATE TABLE.
+
getUnitOfWork() - Method in class Doctrine\ORM\EntityManager
+
Gets the UnitOfWork used by the EntityManager to coordinate operations.
+
getUnsigned() - Method in class Doctrine\DBAL\Schema\Column
+
getUpdateSchemaSql() - Method in class Doctrine\ORM\Tools\SchemaTool
+
Gets the sequence of SQL statements that need to be performed in order +to bring the given class mappings in-synch with the relational schema.
+
getUpperExpression() - Method in class Doctrine\DBAL\Platforms\AbstractPlatform
+
upper +Returns the string $str with all characters changed to +uppercase according to the current character set mapping.
+
getUseCExtension() - Method in class Doctrine\ORM\Configuration
+
Gets a boolean flag that indicates whether Doctrine should make use of the +C extension.
+
getUsername() - Method in class Doctrine\DBAL\Connection
+
Gets the username used by this connection.
+
getValues() - Method in class Doctrine\Common\Collections\ArrayCollection
+
Gets all elements.
+
getValues() - Method in class Doctrine\ORM\PersistentCollection
+
{@inheritdoc}
+
getValues() - Method in class Doctrine\Common\Collections\Collection
+
Gets all values of the collection.
+
getVarcharMaxLength() - Method in class Doctrine\DBAL\Platforms\AbstractPlatform
+
Gets the maximum length of a varchar field.
+
getVarcharTypeDeclarationSQL() - Method in class Doctrine\DBAL\Platforms\AbstractPlatform
+
Gets the SQL snippet used to declare a VARCHAR column type.
+
getVarcharTypeDeclarationSQL() - Method in class Doctrine\DBAL\Platforms\MySqlPlatform
+
Gets the SQL snippet used to declare a VARCHAR column on the MySql platform.
+
getVarcharTypeDeclarationSQL() - Method in class Doctrine\DBAL\Platforms\MsSqlPlatform
+
Gets the SQL snippet used to declare a VARCHAR column type.
+
getVarcharTypeDeclarationSQL() - Method in class Doctrine\DBAL\Platforms\OraclePlatform
+
Gets the SQL snippet used to declare a VARCHAR column on the Oracle platform.
+
getVarcharTypeDeclarationSQL() - Method in class Doctrine\DBAL\Platforms\PostgreSqlPlatform
+
Gets the SQL snippet used to declare a VARCHAR column on the MySql platform.
+
getVarcharTypeDeclarationSQL() - Method in class Doctrine\DBAL\Platforms\SqlitePlatform
+
{@inheritdoc}
+
getWildcards() - Method in class Doctrine\DBAL\Platforms\AbstractPlatform
+
Gets all SQL wildcard characters of the platform.
+
getWrappedConnection() - Method in class Doctrine\DBAL\Connection
+
Gets the wrapped driver connection.
+
getWrappedStatement() - Method in class Doctrine\DBAL\Statement
+
Gets the wrapped driver statement.
+
glimpse() - Method in class Doctrine\Common\Lexer
+
Peeks at the next token, returns it and immediately resets the peek.
+
GroupBy() - Class in package Doctrine\ORM\Query\Expr
+
Expression class for building DQL Group By parts
+
groupBy() - Method in class Doctrine\ORM\QueryBuilder
+
Set the GROUP BY clause + +[php] +$qb = $em->createQueryBuilder() +->select('u') +->from('User', 'u') +->groupBy('u.id');
+
GroupByClause() - Class in package Doctrine\ORM\Query\AST
+
Description of GroupByClause
+
GroupByClause() - Method in class Doctrine\ORM\Query\Parser
+
GroupByClause ::= "GROUP" "BY" GroupByItem {"," GroupByItem}
+
GroupByItem() - Method in class Doctrine\ORM\Query\Parser
+
GroupByItem ::= IdentificationVariable | SingleValuedPathExpression
+
gt() - Method in class Doctrine\ORM\Query\Expr
+
Creates an instance of Expr\Comparison, with the given arguments. +
+
gte() - Method in class Doctrine\ORM\Query\Expr
+
Creates an instance of Expr\Comparison, with the given arguments. +
+
+

H

+
+
hasAssociation() - Method in class Doctrine\ORM\Mapping\ClassMetadataInfo
+
Checks whether the class has a mapped association with the given field name.
+
hasCascades() - Method in class Doctrine\ORM\Mapping\AssociationMapping
+
Checks whether the association has any cascades configured.
+
hasChanged() - Method in class Doctrine\DBAL\Schema\ColumnDiff
+
hasChangedField() - Method in class Doctrine\ORM\Event\PreUpdateEventArgs
+
Field has a changeset?
+
hasClass() - Method in class Doctrine\ORM\Internal\CommitOrderCalculator
+
hasColumn() - Method in class Doctrine\DBAL\Schema\Table
+
Does this table have a column with the given name?
+
hasColumnAtPosition() - Method in class Doctrine\DBAL\Schema\Index
+
+
hasExplicitForeignKeyIndexes() - Method in class Doctrine\DBAL\Schema\SchemaConfig
+
+
hasExplicitForeignKeyIndexes() - Method in class Doctrine\DBAL\Schema\Schema
+
+
hasField() - Method in class Doctrine\ORM\Mapping\ClassMetadataInfo
+
Checks whether the class has a (mapped) field with a certain name.
+
hasForeignKey() - Method in class Doctrine\DBAL\Schema\Table
+
Does Table have a foreign key constraint with the given name?
+
hasIndex() - Method in class Doctrine\DBAL\Schema\Table
+
+
hasIndexBy() - Method in class Doctrine\ORM\Query\ResultSetMapping
+
Checks whether an entity result or joined entity result with a given alias has +a field set for indexing.
+
HasLifecycleCallbacks() - Class in package Doctrine\ORM\Mapping
+
Annotations class
+
hasLifecycleCallbacks() - Method in class Doctrine\ORM\Mapping\ClassMetadataInfo
+
Whether the class has any attached lifecycle listeners or callbacks for a lifecycle event.
+
hasListeners() - Method in class Doctrine\Common\EventManager
+
Checks whether an event has any registered listeners.
+
hasMetadataFor() - Method in class Doctrine\ORM\Mapping\ClassMetadataFactory
+
Checks whether the factory has the metadata for a class loaded already.
+
hasOption() - Method in class Doctrine\DBAL\Schema\ForeignKeyConstraint
+
hasOption() - Method in class Doctrine\DBAL\Schema\Table
+
hasParentAlias() - Method in class Doctrine\ORM\Query\ResultSetMapping
+
Checks whether the given alias has a parent alias.
+
hasPendingInsertions() - Method in class Doctrine\ORM\UnitOfWork
+
Checks whether the UnitOfWork has any pending insertions.
+
hasPlatformOption() - Method in class Doctrine\DBAL\Schema\Column
+
hasSequence() - Method in class Doctrine\DBAL\Schema\Schema
+
+
hasTable() - Method in class Doctrine\DBAL\Schema\Schema
+
Does this schema have a table with the given name?
+
hasType() - Method in class Doctrine\DBAL\Types\Type
+
Checks if exists support for a type.
+
having() - Method in class Doctrine\ORM\QueryBuilder
+
Set the HAVING clause
+
HavingClause() - Class in package Doctrine\ORM\Query\AST
+
Description of HavingClause
+
HavingClause() - Method in class Doctrine\ORM\Query\Parser
+
HavingClause ::= "HAVING" ConditionalExpression
+
hydrateAdd() - Method in class Doctrine\ORM\PersistentCollection
+
INTERNAL: +Adds an element to a collection during hydration.
+
hydrateAll() - Method in class Doctrine\ORM\Internal\Hydration\AbstractHydrator
+
Hydrates all rows returned by the passed statement instance at once.
+
hydrateRow() - Method in class Doctrine\ORM\Internal\Hydration\AbstractHydrator
+
Hydrates a single row returned by the current statement instance during +row-by-row hydration with {@link iterate()}.
+
hydrateSet() - Method in class Doctrine\ORM\PersistentCollection
+
INTERNAL: +Sets a keyed element in the collection during hydration.
+
HydrationException() - Class in package Doctrine\ORM\Internal\Hydration
+
+

I

+
+
Id() - Class in package Doctrine\ORM\Mapping
+
Annotations class
+
IdentificationVariable() - Method in class Doctrine\ORM\Query\Parser
+
IdentificationVariable ::= identifier
+
IdentificationVariableDeclaration() - Method in class Doctrine\ORM\Query\Parser
+
IdentificationVariableDeclaration ::= RangeVariableDeclaration [IndexBy] {JoinVariableDeclaration}
+
IdentificationVariableDeclaration() - Class in package Doctrine\ORM\Query\AST
+
IdentificationVariableDeclaration ::= RangeVariableDeclaration [IndexBy] {JoinVariableDeclaration}
+
identifierRequired() - Method in class Doctrine\ORM\Mapping\MappingException
+
IdentityGenerator() - Class in package Doctrine\ORM\Id
+
ImportCommand() - Class in package Doctrine\DBAL\Tools\Console\Command
+
Task for executing arbitrary SQL that can come from a file or directly from +the command line.
+
in() - Method in class Doctrine\ORM\Query\Expr
+
Creates an IN() expression with the given arguments.
+
Index() - Class in package Doctrine\ORM\Mapping
+
Annotations class
+
Index() - Class in package Doctrine\DBAL\Schema
+
The abstract asset allows to reset the name of all assets without publishing this to the public userland. +
+
indexAlreadyExists() - Method in class Doctrine\DBAL\Schema\SchemaException
+
+
IndexBy() - Class in package Doctrine\ORM\Query\AST
+
IndexBy ::= "INDEX" "BY" SimpleStateFieldPathExpression
+
IndexBy() - Method in class Doctrine\ORM\Query\Parser
+
IndexBy ::= "INDEX" "BY" SimpleStateFieldPathExpression
+
indexDoesNotExist() - Method in class Doctrine\DBAL\Schema\SchemaException
+
+
indexNameInvalid() - Method in class Doctrine\DBAL\Schema\SchemaException
+
+
indexOf() - Method in class Doctrine\Common\Collections\Collection
+
Gets the index/key of a given element.
+
indexOf() - Method in class Doctrine\Common\Collections\ArrayCollection
+
Searches for a given element and, if found, returns the corresponding key/index +of that element.
+
indexOf() - Method in class Doctrine\ORM\PersistentCollection
+
{@inheritdoc}
+
InExpression() - Method in class Doctrine\ORM\Query\Parser
+
InExpression ::= StateFieldPathExpression ["NOT"] "IN" "(" (InParameter {"," InParameter}* | Subselect) ")"
+
InExpression() - Class in package Doctrine\ORM\Query\AST
+
InExpression ::= StateFieldPathExpression ["NOT"] "IN" "(" (Literal {"," Literal}* | Subselect) ")"
+
Inflector() - Class in package Doctrine\Common\Util
+
Doctrine inflector has static methods for inflecting text + +The methods in these classes are from several different sources collected +across several different php projects and several different authors.
+
InheritanceType() - Class in package Doctrine\ORM\Mapping
+
Annotations class
+
innerJoin() - Method in class Doctrine\ORM\QueryBuilder
+
Add an INNER JOIN to an associated class. +
+
InParameter() - Method in class Doctrine\ORM\Query\Parser
+
InParameter ::= Literal | InputParameter
+
InputParameter() - Class in package Doctrine\ORM\Query\AST
+
Description of InputParameter
+
InputParameter() - Method in class Doctrine\ORM\Query\Parser
+
InputParameter ::= PositionalParameter | NamedParameter
+
insert() - Method in class Doctrine\DBAL\Connection
+
Inserts a table row with specified data.
+
insertRows() - Method in class Doctrine\ORM\Persisters\AbstractCollectionPersister
+
IntegerType() - Class in package Doctrine\DBAL\Types
+
Type that maps an SQL INT to a PHP integer.
+
invalidClassInDiscriminatorMap() - Method in class Doctrine\ORM\Mapping\MappingException
+
Throws an exception that indicates that a class used in a discriminator map does not exist. +
+
invalidDriverClass() - Method in class Doctrine\DBAL\DBALException
+
invalidEntityState() - Method in class Doctrine\ORM\ORMException
+
invalidExporterDriverType() - Method in class Doctrine\ORM\Tools\Export\ExportException
+
invalidFindByCall() - Method in class Doctrine\ORM\ORMException
+
invalidFlushMode() - Method in class Doctrine\ORM\ORMException
+
invalidHydrationMode() - Method in class Doctrine\ORM\ORMException
+
invalidInheritanceType() - Method in class Doctrine\ORM\Mapping\MappingException
+
invalidLiteral() - Method in class Doctrine\ORM\Query\QueryException
+
invalidMapping() - Method in class Doctrine\ORM\Mapping\MappingException
+
Generic exception for invalid mappings.
+
invalidMappingDriverType() - Method in class Doctrine\ORM\Tools\Export\ExportException
+
invalidParameterFormat() - Method in class Doctrine\ORM\Query\QueryException
+
invalidParameterNumber() - Method in class Doctrine\ORM\Query\QueryException
+
invalidParameterPosition() - Method in class Doctrine\ORM\Query\QueryException
+
invalidPathExpression() - Method in class Doctrine\ORM\Query\QueryException
+
invalidPdoInstance() - Method in class Doctrine\DBAL\DBALException
+
invalidPlatformSpecified() - Method in class Doctrine\DBAL\DBALException
+
invalidResultCacheDriver() - Method in class Doctrine\ORM\ORMException
+
invalidTableName() - Method in class Doctrine\DBAL\DBALException
+
+
invalidWrapperClass() - Method in class Doctrine\DBAL\DBALException
+
invokeLifecycleCallbacks() - Method in class Doctrine\ORM\Mapping\ClassMetadataInfo
+
Dispatches the lifecycle event of the given entity to the registered +lifecycle callbacks and lifecycle listeners.
+
isA() - Method in class Doctrine\Common\Lexer
+
Checks if given value is identical to the given token
+
isAll() - Method in class Doctrine\ORM\Query\AST\QuantifiedExpression
+
isAny() - Method in class Doctrine\ORM\Query\AST\QuantifiedExpression
+
isAsc() - Method in class Doctrine\ORM\Query\AST\OrderByItem
+
isChangeTrackingDeferredExplicit() - Method in class Doctrine\ORM\Mapping\ClassMetadataInfo
+
Whether the change tracking policy of this class is "deferred explicit".
+
isChangeTrackingDeferredImplicit() - Method in class Doctrine\ORM\Mapping\ClassMetadataInfo
+
Whether the change tracking policy of this class is "deferred implicit".
+
isChangeTrackingNotify() - Method in class Doctrine\ORM\Mapping\ClassMetadataInfo
+
Whether the change tracking policy of this class is "notify".
+
isCollectionScheduledForDeletion() - Method in class Doctrine\ORM\UnitOfWork
+
isCollectionValuedAssociation() - Method in class Doctrine\ORM\Mapping\ClassMetadataInfo
+
Checks whether the class has a mapped association for the specified field +and if yes, checks whether it is a collection-valued association (to-many).
+
isConditionalExpression() - Method in class Doctrine\ORM\Query\AST\ConditionalPrimary
+
isConnected() - Method in class Doctrine\DBAL\Connection
+
Whether an actual connection to the database is established.
+
isDesc() - Method in class Doctrine\ORM\Query\AST\OrderByItem
+
isDirty() - Method in class Doctrine\ORM\PersistentCollection
+
Gets a boolean flag indicating whether this colleciton is dirty which means +its state needs to be synchronized with the database.
+
isEagerlyFetched() - Method in class Doctrine\ORM\Mapping\AssociationMapping
+
Whether the target entity/entities of the association are eagerly fetched.
+
isEmpty() - Method in class Doctrine\Common\Collections\Collection
+
Checks whether the collection is empty (contains no elements).
+
isEmpty() - Method in class Doctrine\Common\Collections\ArrayCollection
+
Checks whether the collection is empty. +
+
isEmpty() - Method in class Doctrine\ORM\PersistentCollection
+
{@inheritdoc}
+
isEntityScheduled() - Method in class Doctrine\ORM\UnitOfWork
+
Checks whether an entity is scheduled for insertion, update or deletion.
+
isFieldResult() - Method in class Doctrine\ORM\Query\ResultSetMapping
+
Checks whether the column with the given name is mapped as a field result +as part of an entity result or joined entity result.
+
isIdentifier() - Method in class Doctrine\ORM\Mapping\ClassMetadataInfo
+
Checks whether a field is part of the identifier/primary key field(s).
+
isIdentifierNatural() - Method in class Doctrine\ORM\Mapping\ClassMetadataInfo
+
Checks whether the class has a natural identifier/pk (which means it does +not use any Id generator.
+
isIdGeneratorIdentity() - Method in class Doctrine\DBAL\Schema\Table
+
+
isIdGeneratorIdentity() - Method in class Doctrine\ORM\Mapping\ClassMetadataInfo
+
Checks whether the class uses an identity column for the Id generation.
+
isIdGeneratorSequence() - Method in class Doctrine\ORM\Mapping\ClassMetadataInfo
+
Checks whether the class uses a sequence for id generation.
+
isIdGeneratorSequence() - Method in class Doctrine\DBAL\Schema\Table
+
+
isIdGeneratorTable() - Method in class Doctrine\ORM\Mapping\ClassMetadataInfo
+
Checks whether the class uses a table for id generation.
+
isInheritanceTypeJoined() - Method in class Doctrine\ORM\Mapping\ClassMetadataInfo
+
Checks whether the mapped class uses the JOINED inheritance mapping strategy.
+
isInheritanceTypeNone() - Method in class Doctrine\ORM\Mapping\ClassMetadataInfo
+
+
isInheritanceTypeSingleTable() - Method in class Doctrine\ORM\Mapping\ClassMetadataInfo
+
Checks whether the mapped class uses the SINGLE_TABLE inheritance mapping strategy.
+
isInheritanceTypeTablePerClass() - Method in class Doctrine\ORM\Mapping\ClassMetadataInfo
+
Checks whether the mapped class uses the TABLE_PER_CLASS inheritance mapping strategy.
+
isInheritedAssociation() - Method in class Doctrine\ORM\Mapping\ClassMetadataInfo
+
Checks whether a mapped association field is inherited from a superclass.
+
isInheritedField() - Method in class Doctrine\ORM\Mapping\ClassMetadataInfo
+
Checks whether a mapped field is inherited from an entity superclass.
+
isInIdentityMap() - Method in class Doctrine\ORM\UnitOfWork
+
Checks whether an entity is registered in the identity map of this UnitOfWork.
+
isInitialized() - Method in class Doctrine\ORM\PersistentCollection
+
Checks whether this collection has been initialized.
+
isLazilyFetched() - Method in class Doctrine\ORM\Mapping\AssociationMapping
+
Whether the target entity/entities of the association are lazily fetched.
+
isManyToMany() - Method in class Doctrine\ORM\Mapping\ManyToManyMapping
+
{@inheritdoc}
+
isManyToMany() - Method in class Doctrine\ORM\Mapping\AssociationMapping
+
Whether the association is a many-to-many association.
+
isMixedResult() - Method in class Doctrine\ORM\Query\ResultSetMapping
+
Checks whether this ResultSetMapping defines a mixed result. +
+
isNegativeSigned() - Method in class Doctrine\ORM\Query\AST\ArithmeticFactor
+
isNextToken() - Method in class Doctrine\Common\Lexer
+
Checks whether a given token matches the current lookahead.
+
isNullable() - Method in class Doctrine\ORM\Mapping\ClassMetadataInfo
+
Check if the field is not null.
+
isOneToMany() - Method in class Doctrine\ORM\Mapping\AssociationMapping
+
Whether the association is a one-to-many association.
+
isOneToMany() - Method in class Doctrine\ORM\Mapping\OneToManyMapping
+
{@inheritdoc}
+
isOneToOne() - Method in class Doctrine\ORM\Mapping\OneToOneMapping
+
{@inheritdoc}
+
isOneToOne() - Method in class Doctrine\ORM\Mapping\AssociationMapping
+
Whether the association is a one-to-one association.
+
isPositiveSigned() - Method in class Doctrine\ORM\Query\AST\ArithmeticFactor
+
isPostInsertGenerator() - Method in class Doctrine\ORM\Id\SequenceIdentityGenerator
+
+
isPostInsertGenerator() - Method in class Doctrine\ORM\Id\IdentityGenerator
+
+
isPostInsertGenerator() - Method in class Doctrine\ORM\Id\AbstractIdGenerator
+
Gets whether this generator is a post-insert generator which means that +generate() must be called after the entity has been inserted +into the database. +
+
isPrimary() - Method in class Doctrine\DBAL\Schema\Index
+
+
isRelation() - Method in class Doctrine\ORM\Query\ResultSetMapping
+
+
isScalarResult() - Method in class Doctrine\ORM\Query\ResultSetMapping
+
Checks whether a column with a given name is mapped as a scalar result.
+
isScheduledForDelete() - Method in class Doctrine\ORM\UnitOfWork
+
Checks whether an entity is registered as removed/deleted with the unit +of work.
+
isScheduledForInsert() - Method in class Doctrine\ORM\UnitOfWork
+
Checks whether an entity is scheduled for insertion.
+
isScheduledForUpdate() - Method in class Doctrine\ORM\UnitOfWork
+
Checks whether an entity is registered as dirty in the unit of work. +
+
isSimpleArithmeticExpression() - Method in class Doctrine\ORM\Query\AST\ArithmeticExpression
+
isSimpleConditionalExpression() - Method in class Doctrine\ORM\Query\AST\ConditionalPrimary
+
isSingleValuedAssociation() - Method in class Doctrine\ORM\Mapping\ClassMetadataInfo
+
Checks whether the class has a mapped association for the specified field +and if yes, checks whether it is a single-valued association (to-one).
+
isSome() - Method in class Doctrine\ORM\Query\AST\QuantifiedExpression
+
isSubselect() - Method in class Doctrine\ORM\Query\AST\ArithmeticExpression
+
isTransactionActive() - Method in class Doctrine\DBAL\Connection
+
Checks whether a transaction is currently active.
+
isTransient() - Method in class Doctrine\ORM\Mapping\Driver\AnnotationDriver
+
Whether the class with the specified name is transient.
+
isTransient() - Method in class Doctrine\ORM\Mapping\Driver\Driver
+
Whether the class with the specified name should have its metadata loaded. +
+
isTransient() - Method in class Doctrine\ORM\Mapping\Driver\DriverChain
+
Whether the class with the specified name should have its metadata loaded. +
+
isTransient() - Method in class Doctrine\ORM\Mapping\Driver\AbstractFileDriver
+
Whether the class with the specified name should have its metadata loaded. +
+
isTransient() - Method in class Doctrine\ORM\Mapping\Driver\DatabaseDriver
+
{@inheritdoc}
+
isUnique() - Method in class Doctrine\DBAL\Schema\Index
+
+
isUniqueField() - Method in class Doctrine\ORM\Mapping\ClassMetadataInfo
+
Check if the field is unique.
+
IterableResult() - Class in package Doctrine\ORM\Internal\Hydration
+
Represents a result structure that can be iterated over, hydrating row-by-row +during the iteration.
+
iterate() - Method in class Doctrine\ORM\Query
+
Executes the query and returns an IterableResult that can be used to incrementally +iterated over the result.
+
iterate() - Method in class Doctrine\ORM\AbstractQuery
+
Executes the query and returns an IterableResult that can be used to incrementally +iterate over the result.
+
iterate() - Method in class Doctrine\ORM\Internal\Hydration\AbstractHydrator
+
Initiates a row-by-row hydration.
+
iterateWithFetchJoinCollectionNotAllowed() - Method in class Doctrine\ORM\Query\QueryException
+
+
iterateWithFetchJoinNotAllowed() - Method in class Doctrine\ORM\Query\QueryException
+
+

J

+
+
Join() - Method in class Doctrine\ORM\Query\Parser
+
Join ::= ["LEFT" ["OUTER"] | "INNER"] "JOIN" JoinAssociationPathExpression +["AS"] AliasIdentificationVariable ["WITH" ConditionalExpression]
+
join() - Method in class Doctrine\ORM\QueryBuilder
+
Add a INNER JOIN to an associated class. +
+
Join() - Class in package Doctrine\ORM\Query\Expr
+
Expression class for DQL from
+
Join() - Class in package Doctrine\ORM\Query\AST
+
Join ::= ["LEFT" ["OUTER"] | "INNER"] "JOIN" JoinAssociationPathExpression +["AS"] AliasIdentificationVariable [("ON" | "WITH") ConditionalExpression]
+
JoinAssociationPathExpression() - Method in class Doctrine\ORM\Query\Parser
+
JoinAssociationPathExpression ::= IdentificationVariable "." (CollectionValuedAssociationField | SingleValuedAssociationField)
+
JoinAssociationPathExpression() - Class in package Doctrine\ORM\Query\AST
+
JoinAssociationPathExpression ::= IdentificationVariable "." (SingleValuedAssociationField | CollectionValuedAssociationField)
+
JoinColumn() - Class in package Doctrine\ORM\Mapping
+
Annotations class
+
joinColumnMustPointToMappedField() - Method in class Doctrine\ORM\Mapping\MappingException
+
JoinColumns() - Class in package Doctrine\ORM\Mapping
+
Annotations class
+
JoinedSubclassPersister() - Class in package Doctrine\ORM\Persisters
+
The joined subclass persister maps a single entity instance to several tables in the +database as it is defined by the Class Table Inheritance strategy.
+
JoinTable() - Class in package Doctrine\ORM\Mapping
+
Annotations class
+
joinTableRequired() - Method in class Doctrine\ORM\Mapping\MappingException
+
JoinVariableDeclaration() - Class in package Doctrine\ORM\Query\AST
+
JoinVariableDeclaration ::= Join [IndexBy]
+
JoinVariableDeclaration() - Method in class Doctrine\ORM\Query\Parser
+
JoinVariableDeclaration ::= Join [IndexBy]
+
+

K

+
+
key() - Method in class Doctrine\Common\Collections\Collection
+
Gets the key/index of the element at the current iterator position.
+
key() - Method in class Doctrine\ORM\PersistentCollection
+
key() - Method in class Doctrine\Common\Collections\ArrayCollection
+
Gets the current key/index at the current internal iterator position.
+
key() - Method in class Doctrine\ORM\Internal\Hydration\IterableResult
+
+
+

L

+
+
last() - Method in class Doctrine\Common\Collections\ArrayCollection
+
Sets the internal iterator to the last element in the collection and +returns this element.
+
last() - Method in class Doctrine\Common\Collections\Collection
+
Sets the internal iterator to the last element in the collection and +returns this element.
+
last() - Method in class Doctrine\ORM\PersistentCollection
+
{@inheritdoc}
+
lastInsertId() - Method in class Doctrine\DBAL\Driver\OCI8\OCI8Connection
+
lastInsertId() - Method in class Doctrine\DBAL\Driver\Connection
+
leftJoin() - Method in class Doctrine\ORM\QueryBuilder
+
Add a LEFT JOIN + +[php] +$qb = $em->createQueryBuilder() +->select('u') +->from('User', 'u') +->leftJoin('u.Phonenumbers', 'p', Expr\Join::WITH, 'p.is_primary = 1');
+
length() - Method in class Doctrine\ORM\Query\Expr
+
Creates a LENGTH() function expression with the given argument.
+
LengthFunction() - Class in package Doctrine\ORM\Query\AST\Functions
+
"LENGTH" "(" StringPrimary ")"
+
Lexer() - Class in package Doctrine\Common
+
Simple generic lexical scanner.
+
Lexer() - Class in package Doctrine\Common\Annotations
+
Simple lexer for docblock annotations.
+
Lexer() - Class in package Doctrine\ORM\Query
+
Scans a DQL query for tokens.
+
LifecycleEventArgs() - Class in package Doctrine\ORM\Event
+
Lifecycle Events are triggered by the UnitOfWork during lifecycle transitions +of entities.
+
like() - Method in class Doctrine\ORM\Query\Expr
+
Creates a LIKE() comparison expression with the given arguments.
+
LikeExpression() - Method in class Doctrine\ORM\Query\Parser
+
LikeExpression ::= StringExpression ["NOT"] "LIKE" (string | input_parameter) ["ESCAPE" char]
+
LikeExpression() - Class in package Doctrine\ORM\Query\AST
+
LikeExpression ::= StringExpression ["NOT"] "LIKE" string ["ESCAPE" char]
+
limitOffsetInvalid() - Method in class Doctrine\DBAL\DBALException
+
listDatabases() - Method in class Doctrine\DBAL\Schema\AbstractSchemaManager
+
List the available databases for this connection
+
listSequences() - Method in class Doctrine\DBAL\Schema\MsSqlSchemaManager
+
lists all database sequences
+
listSequences() - Method in class Doctrine\DBAL\Schema\AbstractSchemaManager
+
List the available sequences for this connection
+
listTableColumns() - Method in class Doctrine\DBAL\Schema\AbstractSchemaManager
+
List the columns for a given table. +
+
listTableColumns() - Method in class Doctrine\DBAL\Schema\MsSqlSchemaManager
+
lists table constraints
+
listTableDetails() - Method in class Doctrine\DBAL\Schema\AbstractSchemaManager
+
+
listTableForeignKeys() - Method in class Doctrine\DBAL\Schema\AbstractSchemaManager
+
List the foreign keys for the given table
+
listTableIndexes() - Method in class Doctrine\DBAL\Schema\MsSqlSchemaManager
+
lists table constraints
+
listTableIndexes() - Method in class Doctrine\DBAL\Schema\AbstractSchemaManager
+
List the indexes for a given table returning an array of Index instances. +
+
listTableNames() - Method in class Doctrine\DBAL\Schema\AbstractSchemaManager
+
Return a list of all tables in the current database
+
listTables() - Method in class Doctrine\DBAL\Schema\AbstractSchemaManager
+
List the tables for this connection
+
listTables() - Method in class Doctrine\DBAL\Schema\MsSqlSchemaManager
+
lists tables
+
listTableTriggers() - Method in class Doctrine\DBAL\Schema\MsSqlSchemaManager
+
lists table triggers
+
listTableViews() - Method in class Doctrine\DBAL\Schema\MsSqlSchemaManager
+
lists table views
+
listTriggers() - Method in class Doctrine\DBAL\Schema\MsSqlSchemaManager
+
lists all triggers
+
listViews() - Method in class Doctrine\DBAL\Schema\AbstractSchemaManager
+
List the views this connection has
+
listViews() - Method in class Doctrine\DBAL\Schema\MsSqlSchemaManager
+
lists database views
+
literal() - Method in class Doctrine\ORM\Query\Expr
+
Creates a literal expression of the given argument.
+
Literal() - Class in package Doctrine\ORM\Query\Expr
+
Abstract base Expr class for building DQL parts
+
Literal() - Class in package Doctrine\ORM\Query\AST
+
Abstract class of an AST node
+
Literal() - Method in class Doctrine\ORM\Query\Parser
+
Literal ::= string | char | integer | float | boolean
+
load() - Method in class Doctrine\ORM\Persisters\StandardEntityPersister
+
Loads an entity by a list of field criteria.
+
load() - Method in class Doctrine\ORM\Mapping\OneToOneMapping
+
{@inheritdoc}
+
load() - Method in class Doctrine\ORM\Mapping\AssociationMapping
+
Loads data in $target domain object using this association. +
+
load() - Method in class Doctrine\ORM\Mapping\ManyToManyMapping
+
Loads entities in $targetCollection using $em. +
+
load() - Method in class Doctrine\ORM\Mapping\OneToManyMapping
+
Loads a one-to-many collection.
+
loadAll() - Method in class Doctrine\ORM\Persisters\StandardEntityPersister
+
Loads a list of entities by a list of field criteria.
+
loadClass() - Method in class Doctrine\Common\ClassLoader
+
Loads the given class or interface.
+
LoadClassMetadataEventArgs() - Class in package Doctrine\ORM\Event
+
Class that holds event arguments for a loadMetadata event.
+
loadManyToManyCollection() - Method in class Doctrine\ORM\Persisters\StandardEntityPersister
+
Loads a collection of entities of a many-to-many association.
+
loadMetadataForClass() - Method in class Doctrine\ORM\Mapping\Driver\AnnotationDriver
+
{@inheritdoc}
+
loadMetadataForClass() - Method in class Doctrine\ORM\Mapping\Driver\Driver
+
Loads the metadata for the specified class into the provided container.
+
loadMetadataForClass() - Method in class Doctrine\ORM\Mapping\Driver\DriverChain
+
Loads the metadata for the specified class into the provided container.
+
loadMetadataForClass() - Method in class Doctrine\ORM\Mapping\Driver\XmlDriver
+
{@inheritdoc}
+
loadMetadataForClass() - Method in class Doctrine\ORM\Mapping\Driver\YamlDriver
+
{@inheritdoc}
+
loadMetadataForClass() - Method in class Doctrine\ORM\Mapping\Driver\DatabaseDriver
+
{@inheritdoc}
+
loadMetadataForClass() - Method in class Doctrine\ORM\Mapping\Driver\PhpDriver
+
{@inheritdoc}
+
loadOneToManyCollection() - Method in class Doctrine\ORM\Persisters\StandardEntityPersister
+
Loads a collection of entities in a one-to-many association.
+
LocateFunction() - Class in package Doctrine\ORM\Query\AST\Functions
+
"LOCATE" "(" StringPrimary "," StringPrimary ["," SimpleArithmeticExpression]")"
+
lockFailed() - Method in class Doctrine\ORM\OptimisticLockException
+
logSQL() - Method in class Doctrine\DBAL\Logging\SQLLogger
+
Logs a SQL statement somewhere.
+
logSQL() - Method in class Doctrine\DBAL\Logging\DebugStack
+
{@inheritdoc}
+
logSQL() - Method in class Doctrine\DBAL\Logging\EchoSQLLogger
+
{@inheritdoc}
+
lower() - Method in class Doctrine\ORM\Query\Expr
+
Creates a LOWER() function expression with the given argument.
+
LowerFunction() - Class in package Doctrine\ORM\Query\AST\Functions
+
"LOWER" "(" StringPrimary ")"
+
lt() - Method in class Doctrine\ORM\Query\Expr
+
Creates an instance of Expr\Comparison, with the given arguments. +
+
lte() - Method in class Doctrine\ORM\Query\Expr
+
Creates an instance of Expr\Comparison, with the given arguments. +
+
+

M

+
+
ManyToMany() - Class in package Doctrine\ORM\Mapping
+
Annotations class
+
ManyToManyMapping() - Class in package Doctrine\ORM\Mapping
+
A many-to-many mapping describes the mapping between two collections of +entities. +
+
ManyToManyPersister() - Class in package Doctrine\ORM\Persisters
+
Persister for many-to-many collections.
+
ManyToOne() - Class in package Doctrine\ORM\Mapping
+
Annotations class
+
map() - Method in class Doctrine\ORM\PersistentCollection
+
{@inheritdoc}
+
map() - Method in class Doctrine\Common\Collections\ArrayCollection
+
Applies the given function to each element in the collection and returns +a new collection with the elements returned by the function.
+
map() - Method in class Doctrine\Common\Collections\Collection
+
Applies the given function to each element in the collection and returns +a new collection with the elements returned by the function.
+
mapField() - Method in class Doctrine\ORM\Mapping\ClassMetadataInfo
+
Adds a mapped field to the class.
+
mapManyToMany() - Method in class Doctrine\ORM\Mapping\ClassMetadataInfo
+
Adds a many-to-many mapping.
+
mapManyToOne() - Method in class Doctrine\ORM\Mapping\ClassMetadataInfo
+
Adds a many-to-one mapping.
+
mapOneToMany() - Method in class Doctrine\ORM\Mapping\ClassMetadataInfo
+
Adds a one-to-many mapping.
+
mapOneToOne() - Method in class Doctrine\ORM\Mapping\ClassMetadataInfo
+
Adds a one-to-one mapping.
+
MappedSuperclass() - Class in package Doctrine\ORM\Mapping
+
Annotations class
+
MappingException() - Class in package Doctrine\ORM\Mapping
+
A MappingException indicates that something is wrong with the mapping setup.
+
mappingFileNotFound() - Method in class Doctrine\ORM\Mapping\MappingException
+
mappingNotFound() - Method in class Doctrine\ORM\Mapping\MappingException
+
match() - Method in class Doctrine\ORM\Query\Parser
+
Attempts to match the given token with the current lookahead token. +
+
Math() - Class in package Doctrine\ORM\Query\Expr
+
Expression class for DQL math statements
+
max() - Method in class Doctrine\ORM\Query\Expr
+
Creates an instance of MAX() function, with the given argument.
+
MemcacheCache() - Class in package Doctrine\Common\Cache
+
Memcache cache driver.
+
merge() - Method in class Doctrine\ORM\EntityManager
+
Merges the state of a detached entity into the persistence context +of this EntityManager and returns the managed copy of the entity. +
+
merge() - Method in class Doctrine\ORM\UnitOfWork
+
Merges the state of the given detached entity into this UnitOfWork.
+
metadataCacheNotConfigured() - Method in class Doctrine\ORM\ORMException
+
MetadataCommand() - Class in package Doctrine\ORM\Tools\Console\Command\ClearCache
+
Command to clear the metadata cache of the various cache drivers.
+
MetadataFilter() - Class in package Doctrine\ORM\Tools\Console
+
Used by CLI Tools to restrict entity-based commands to given patterns.
+
min() - Method in class Doctrine\ORM\Query\Expr
+
Creates an instance of MIN() function, with the given argument.
+
mismatchedEventManager() - Method in class Doctrine\ORM\ORMException
+
missingFieldName() - Method in class Doctrine\ORM\Mapping\MappingException
+
missingMappingDriverImpl() - Method in class Doctrine\ORM\ORMException
+
missingRequiredOption() - Method in class Doctrine\ORM\Mapping\MappingException
+
Called if a required option was not found but is required
+
missingSourceEntity() - Method in class Doctrine\ORM\Mapping\MappingException
+
missingTargetEntity() - Method in class Doctrine\ORM\Mapping\MappingException
+
ModFunction() - Class in package Doctrine\ORM\Query\AST\Functions
+
"MOD" "(" SimpleArithmeticExpression "," SimpleArithmeticExpression ")"
+
modifyLimitQuery() - Method in class Doctrine\DBAL\Platforms\AbstractPlatform
+
modifyLimitQuery() - Method in class Doctrine\DBAL\Platforms\MsSqlPlatform
+
Adds an adapter-specific LIMIT clause to the SELECT statement.
+
modifyLimitQuery() - Method in class Doctrine\DBAL\Platforms\OraclePlatform
+
Adds an driver-specific LIMIT clause to the query
+
moveNext() - Method in class Doctrine\Common\Lexer
+
Moves to the next token in the input string. +
+
MsSqlPlatform() - Class in package Doctrine\DBAL\Platforms
+
The MsSqlPlatform provides the behavior, features and SQL dialect of the +MySQL database platform.
+
MsSqlSchemaManager() - Class in package Doctrine\DBAL\Schema
+
xxx
+
MultiTableDeleteExecutor() - Class in package Doctrine\ORM\Query\Exec
+
Executes the SQL statements for bulk DQL DELETE statements on classes in +Class Table Inheritance (JOINED).
+
MultiTableUpdateExecutor() - Class in package Doctrine\ORM\Query\Exec
+
Executes the SQL statements for bulk DQL UPDATE statements on classes in +Class Table Inheritance (JOINED).
+
MySqlPlatform() - Class in package Doctrine\DBAL\Platforms
+
The MySqlPlatform provides the behavior, features and SQL dialect of the +MySQL database platform.
+
MySqlSchemaManager() - Class in package Doctrine\DBAL\Schema
+
Schema manager for the MySql RDBMS.
+
MysqlSessionInit() - Class in package Doctrine\DBAL\Event\Listeners
+
MySQL Session Init Event Subscriber which allows to set the Client Encoding of the Connection
+
+

N

+
+
namedForeignKeyRequired() - Method in class Doctrine\DBAL\Schema\SchemaException
+
NativeQuery() - Class in package Doctrine\ORM
+
Represents a native SQL query.
+
neq() - Method in class Doctrine\ORM\Query\Expr
+
Creates an instance of Expr\Comparison, with the given arguments. +
+
newDefaultAnnotationDriver() - Method in class Doctrine\ORM\Configuration
+
Add a new default annotation driver with a correctly configured annotation reader.
+
newHydrator() - Method in class Doctrine\ORM\EntityManager
+
Create a new instance for the given hydration mode.
+
newInstance() - Method in class Doctrine\ORM\Mapping\ClassMetadata
+
Creates a new instance of the mapped class, without invoking the constructor.
+
NewValue() - Method in class Doctrine\ORM\Query\Parser
+
NewValue ::= SimpleArithmeticExpression | StringPrimary | DatetimePrimary | BooleanPrimary | +EnumPrimary | SimpleEntityExpression | "NULL" + +NOTE: Since it is not possible to correctly recognize individual types, here is the full +grammar that needs to be supported: + +NewValue ::= SimpleArithmeticExpression | "NULL" + +SimpleArithmeticExpression covers all *Primary grammar rules and also SimplEntityExpression
+
next() - Method in class Doctrine\Common\Collections\ArrayCollection
+
Moves the internal iterator position to the next element.
+
next() - Method in class Doctrine\Common\Collections\Collection
+
Moves the internal iterator position to the next element.
+
next() - Method in class Doctrine\ORM\PersistentCollection
+
Moves the internal iterator position to the next element.
+
next() - Method in class Doctrine\ORM\Internal\Hydration\IterableResult
+
Gets the next set of results.
+
noActiveTransaction() - Method in class Doctrine\DBAL\ConnectionException
+
noColumnsSpecifiedForTable() - Method in class Doctrine\DBAL\DBALException
+
+
Node() - Class in package Doctrine\ORM\Query\AST
+
Abstract class of an AST node
+
noDispatchForNode() - Method in class Doctrine\ORM\Query\AST\ASTException
+
nonUniqueResult() - Method in class Doctrine\ORM\Internal\Hydration\HydrationException
+
NonUniqueResultException() - Class in package Doctrine\ORM
+
Exception thrown when an ORM query unexpectedly returns more than one result.
+
NoResultException() - Class in package Doctrine\ORM
+
Exception thrown when an ORM query unexpectedly does not return any results.
+
not() - Method in class Doctrine\ORM\Query\Expr
+
Creates a negation expression of the given restriction.
+
NotifyPropertyChanged() - Interface in package Doctrine\Common
+
Contract for classes that provide the service of notifying listeners of +changes to their properties.
+
notIn() - Method in class Doctrine\ORM\Query\Expr
+
Creates a NOT IN() expression with the given arguments.
+
notSupported() - Method in class Doctrine\ORM\ORMException
+
notSupported() - Method in class Doctrine\DBAL\DBALException
+
NullComparisonExpression() - Class in package Doctrine\ORM\Query\AST
+
NullComparisonExpression ::= (SingleValuedPathExpression | InputParameter) "IS" ["NOT"] "NULL"
+
NullComparisonExpression() - Method in class Doctrine\ORM\Query\Parser
+
NullComparisonExpression ::= (SingleValuedPathExpression | InputParameter) "IS" ["NOT"] "NULL"
+
+

O

+
+
ObjectHydrator() - Class in package Doctrine\ORM\Internal\Hydration
+
The ObjectHydrator constructs an object graph out of an SQL result set.
+
ObjectType() - Class in package Doctrine\DBAL\Types
+
Type that maps a PHP object to a clob SQL type.
+
OCI8Connection() - Class in package Doctrine\DBAL\Driver\OCI8
+
OCI8 implementation of the Connection interface.
+
OCI8Exception() - Exception in package Doctrine\DBAL\Driver\OCI8
+
OCI8Statement() - Class in package Doctrine\DBAL\Driver\OCI8
+
The OCI8 implementation of the Statement interface.
+
offsetExists() - Method in class Doctrine\Common\Collections\ArrayCollection
+
ArrayAccess implementation of offsetExists()
+
offsetExists() - Method in class Doctrine\ORM\PersistentCollection
+
+
offsetGet() - Method in class Doctrine\Common\Collections\ArrayCollection
+
ArrayAccess implementation of offsetGet()
+
offsetGet() - Method in class Doctrine\ORM\PersistentCollection
+
+
offsetSet() - Method in class Doctrine\Common\Collections\ArrayCollection
+
ArrayAccess implementation of offsetGet()
+
offsetSet() - Method in class Doctrine\ORM\PersistentCollection
+
+
offsetUnset() - Method in class Doctrine\Common\Collections\ArrayCollection
+
ArrayAccess implementation of offsetUnset()
+
offsetUnset() - Method in class Doctrine\ORM\PersistentCollection
+
+
onDelete() - Method in class Doctrine\DBAL\Schema\ForeignKeyConstraint
+
Foreign Key onDelete status
+
OneToMany() - Class in package Doctrine\ORM\Mapping
+
Annotations class
+
OneToManyMapping() - Class in package Doctrine\ORM\Mapping
+
Represents a one-to-many mapping. +
+
OneToManyPersister() - Class in package Doctrine\ORM\Persisters
+
Persister for one-to-many collections. +
+
oneToManyRequiresMappedBy() - Method in class Doctrine\ORM\Mapping\MappingException
+
OneToOne() - Class in package Doctrine\ORM\Mapping
+
Annotations class
+
OneToOneMapping() - Class in package Doctrine\ORM\Mapping
+
A one-to-one mapping describes a uni-directional mapping from one entity +to another entity. +
+
OnFlushEventArgs() - Class in package Doctrine\ORM\Event
+
Provides event arguments for the preFlush event.
+
onUpdate() - Method in class Doctrine\DBAL\Schema\ForeignKeyConstraint
+
Foreign Key onUpdate status
+
OptimisticLockException() - Class in package Doctrine\ORM
+
OptimisticLockException
+
OraclePlatform() - Class in package Doctrine\DBAL\Platforms
+
OraclePlatform.
+
OracleSchemaManager() - Class in package Doctrine\DBAL\Schema
+
Oracle Schema Manager
+
OracleSessionInit() - Class in package Doctrine\DBAL\Event\Listeners
+
Should be used when Oracle Server default enviroment does not match the Doctrine requirements. +
+
OrderBy() - Class in package Doctrine\ORM\Query\Expr
+
Expression class for building DQL Order By parts
+
orderBy() - Method in class Doctrine\ORM\QueryBuilder
+
Set the ORDER BY clause
+
OrderBy() - Class in package Doctrine\ORM\Mapping
+
Annotations class
+
OrderByClause() - Method in class Doctrine\ORM\Query\Parser
+
OrderByClause ::= "ORDER" "BY" OrderByItem {"," OrderByItem}
+
OrderByClause() - Class in package Doctrine\ORM\Query\AST
+
OrderByClause ::= "ORDER" "BY" OrderByItem {"," OrderByItem}
+
OrderByItem() - Class in package Doctrine\ORM\Query\AST
+
OrderByItem ::= (ResultVariable | StateFieldPathExpression) ["ASC" | "DESC"]
+
OrderByItem() - Method in class Doctrine\ORM\Query\Parser
+
OrderByItem ::= (ResultVariable | StateFieldPathExpression) ["ASC" | "DESC"]
+
orHaving() - Method in class Doctrine\ORM\QueryBuilder
+
Add to the existing HAVING clause with an OR
+
ORMException() - Exception in package Doctrine\ORM
+
Base exception class for all ORM exceptions.
+
orWhere() - Method in class Doctrine\ORM\QueryBuilder
+
Add a new WHERE statement with an OR + +[php] +$qb = $em->createQueryBuilder() +->select('u') +->from('User', 'u') +->where('u.id = 1') +->orWhere('u.id = 2');
+
Orx() - Class in package Doctrine\ORM\Query\Expr
+
Expression class for building DQL OR clauses
+
orX() - Method in class Doctrine\ORM\Query\Expr
+
Creates a disjunction of the given boolean expressions. +
+
overrideType() - Method in class Doctrine\DBAL\Types\Type
+
Overrides an already defined type to use a different implementation.
+
overwritingJoinConditionsNotYetSupported() - Method in class Doctrine\ORM\Query\QueryException
+
+

P

+
+
parentObjectOfRelationNotFound() - Method in class Doctrine\ORM\Internal\Hydration\HydrationException
+
parse() - Method in class Doctrine\ORM\Query\AST\Functions\LowerFunction
+
+
parse() - Method in class Doctrine\ORM\Query\AST\Functions\CurrentTimestampFunction
+
+
parse() - Method in class Doctrine\ORM\Query\AST\Functions\CurrentTimeFunction
+
+
parse() - Method in class Doctrine\ORM\Query\AST\Functions\LengthFunction
+
+
parse() - Method in class Doctrine\ORM\Query\AST\Functions\ModFunction
+
+
parse() - Method in class Doctrine\ORM\Query\AST\Functions\TrimFunction
+
+
parse() - Method in class Doctrine\ORM\Query\AST\Functions\SizeFunction
+
+
parse() - Method in class Doctrine\ORM\Query\AST\Functions\SqrtFunction
+
+
parse() - Method in class Doctrine\ORM\Query\AST\Functions\LocateFunction
+
+
parse() - Method in class Doctrine\ORM\Query\AST\Functions\ConcatFunction
+
+
parse() - Method in class Doctrine\ORM\Query\AST\Functions\CurrentDateFunction
+
+
parse() - Method in class Doctrine\ORM\Query\AST\Functions\UpperFunction
+
+
parse() - Method in class Doctrine\ORM\Query\AST\Functions\AbsFunction
+
+
parse() - Method in class Doctrine\ORM\Query\AST\Functions\SubstringFunction
+
+
parse() - Method in class Doctrine\ORM\Query\AST\Functions\FunctionNode
+
parse() - Method in class Doctrine\ORM\Query\Parser
+
Parses a query string.
+
Parser() - Class in package Doctrine\ORM\Query
+
An LL(*) recursive-descent parser for the context-free grammar of the Doctrine Query Language. +
+
Parser() - Class in package Doctrine\Common\Annotations
+
A simple parser for docblock annotations.
+
ParserResult() - Class in package Doctrine\ORM\Query
+
Encapsulates the resulting components from a DQL query parsing process that +can be serialized.
+
PartialObjectExpression() - Method in class Doctrine\ORM\Query\Parser
+
PartialObjectExpression ::= "PARTIAL" IdentificationVariable "." PartialFieldSet +PartialFieldSet ::= "{" SimpleStateField {"," SimpleStateField}* "}"
+
PartialObjectExpression() - Class in package Doctrine\ORM\Query\AST
+
Abstract class of an AST node
+
partialObjectsAreDangerous() - Method in class Doctrine\ORM\Query\QueryException
+
partition() - Method in class Doctrine\Common\Collections\Collection
+
Partitions this collection in two collections according to a predicate. +
+
partition() - Method in class Doctrine\Common\Collections\ArrayCollection
+
Partitions this collection in two collections according to a predicate. +
+
partition() - Method in class Doctrine\ORM\PersistentCollection
+
{@inheritdoc}
+
PathExpression() - Class in package Doctrine\ORM\Query\AST
+
AssociationPathExpression ::= CollectionValuedPathExpression | SingleValuedAssociationPathExpression +SingleValuedPathExpression ::= StateFieldPathExpression | SingleValuedAssociationPathExpression +StateFieldPathExpression ::= SimpleStateFieldPathExpression | SimpleStateFieldAssociationPathExpression +SingleValuedAssociationPathExpression ::= IdentificationVariable "." {SingleValuedAssociationField "."}* SingleValuedAssociationField +CollectionValuedPathExpression ::= IdentificationVariable "." {SingleValuedAssociationField "."}* CollectionValuedAssociationField +StateField ::= {EmbeddedClassStateField "."}* SimpleStateField +SimpleStateFieldPathExpression ::= IdentificationVariable "." StateField +SimpleStateFieldAssociationPathExpression ::= SingleValuedAssociationPathExpression "." StateField
+
PathExpression() - Method in class Doctrine\ORM\Query\Parser
+
Parses an arbitrary path expression and defers semantical validation +based on expected types. +
+
pathRequired() - Method in class Doctrine\ORM\Mapping\MappingException
+
PDOConnection() - Class in package Doctrine\DBAL\Driver
+
PDO implementation of the Connection interface. +
+
PDOStatement() - Class in package Doctrine\DBAL\Driver
+
The PDO implementation of the Statement interface. +
+
peek() - Method in class Doctrine\Common\Lexer
+
Moves the lookahead token forward.
+
persist() - Method in class Doctrine\ORM\EntityManager
+
Tells the EntityManager to make an instance managed and persistent. +
+
persist() - Method in class Doctrine\ORM\UnitOfWork
+
Persists an entity as part of the current unit of work.
+
PersistentCollection() - Class in package Doctrine\ORM
+
A PersistentCollection represents a collection of elements that have persistent state. +
+
PhpDriver() - Class in package Doctrine\ORM\Mapping\Driver
+
The PhpDriver includes php files which just populate ClassMetadataInfo +instances with plain php code
+
PhpExporter() - Class in package Doctrine\ORM\Tools\Export\Driver
+
ClassMetadata exporter for PHP code
+
PlainValue() - Method in class Doctrine\Common\Annotations\Parser
+
PlainValue ::= integer | string | float | boolean | Array | Annotation
+
postConnect() - Method in class Doctrine\DBAL\Event\Listeners\OracleSessionInit
+
+
postConnect() - Method in class Doctrine\DBAL\Event\Listeners\MysqlSessionInit
+
+
PostgreSqlPlatform() - Class in package Doctrine\DBAL\Platforms
+
PostgreSqlPlatform.
+
PostgreSqlSchemaManager() - Class in package Doctrine\DBAL\Schema
+
xxx
+
PostLoad() - Class in package Doctrine\ORM\Mapping
+
Annotations class
+
PostPersist() - Class in package Doctrine\ORM\Mapping
+
Annotations class
+
PostRemove() - Class in package Doctrine\ORM\Mapping
+
Annotations class
+
PostUpdate() - Class in package Doctrine\ORM\Mapping
+
Annotations class
+
prefersIdentityColumns() - Method in class Doctrine\DBAL\Platforms\SqlitePlatform
+
+
prefersIdentityColumns() - Method in class Doctrine\DBAL\Platforms\AbstractPlatform
+
Whether the platform prefers identity columns (eg.
+
prefersIdentityColumns() - Method in class Doctrine\DBAL\Platforms\MsSqlPlatform
+
Whether the platform prefers identity columns for ID generation. +
+
prefersIdentityColumns() - Method in class Doctrine\DBAL\Platforms\MySqlPlatform
+
Whether the platform prefers identity columns for ID generation. +
+
prefersSequences() - Method in class Doctrine\DBAL\Platforms\PostgreSqlPlatform
+
Whether the platform prefers sequences for ID generation.
+
prefersSequences() - Method in class Doctrine\DBAL\Platforms\OraclePlatform
+
Whether the platform prefers sequences for ID generation.
+
prefersSequences() - Method in class Doctrine\DBAL\Platforms\AbstractPlatform
+
Whether the platform prefers sequences for ID generation. +
+
prepare() - Method in class Doctrine\DBAL\Driver\Connection
+
prepare() - Method in class Doctrine\DBAL\Driver\OCI8\OCI8Connection
+
PrePersist() - Class in package Doctrine\ORM\Mapping
+
Annotations class
+
PreRemove() - Class in package Doctrine\ORM\Mapping
+
Annotations class
+
PreUpdate() - Class in package Doctrine\ORM\Mapping
+
Annotations class
+
PreUpdateEventArgs() - Class in package Doctrine\ORM\Event
+
Class that holds event arguments for a preInsert/preUpdate event.
+
Printer() - Class in package Doctrine\ORM\Query
+
A parse tree printer for Doctrine Query Language parser.
+
println() - Method in class Doctrine\ORM\Query\Printer
+
Prints text indented with spaces depending on current indentation level.
+
prod() - Method in class Doctrine\ORM\Query\Expr
+
Creates a product mathematical expression with the given arguments. +
+
project() - Method in class Doctrine\DBAL\Connection
+
Executes an, optionally parameterized, SQL query and returns the result, +applying a given projection/transformation function on each row of the result.
+
propertyChanged() - Method in class Doctrine\ORM\UnitOfWork
+
Notifies this UnitOfWork of a property change in an entity.
+
propertyChanged() - Method in class Doctrine\Common\PropertyChangedListener
+
Notifies the listener of a property change.
+
PropertyChangedListener() - Interface in package Doctrine\Common
+
Contract for classes that are potential listeners of a NotifyPropertyChanged +implementor.
+
propertyTypeIsRequired() - Method in class Doctrine\ORM\Mapping\MappingException
+
Proxy() - Interface in package Doctrine\ORM\Proxy
+
Interface for proxy classes.
+
proxyClassesAlwaysRegenerating() - Method in class Doctrine\ORM\ORMException
+
proxyDirectoryRequired() - Method in class Doctrine\ORM\Proxy\ProxyException
+
ProxyException() - Class in package Doctrine\ORM\Proxy
+
ORM Proxy Exception
+
ProxyFactory() - Class in package Doctrine\ORM\Proxy
+
This factory is used to create proxy objects for entities at runtime.
+
proxyNamespaceRequired() - Method in class Doctrine\ORM\Proxy\ProxyException
+
+

Q

+
+
QuantifiedExpression() - Class in package Doctrine\ORM\Query\AST
+
QuantifiedExpression ::= ("ALL" | "ANY" | "SOME") "(" Subselect ")"
+
QuantifiedExpression() - Method in class Doctrine\ORM\Query\Parser
+
QuantifiedExpression ::= ("ALL" | "ANY" | "SOME") "(" Subselect ")"
+
query() - Method in class Doctrine\DBAL\Driver\Connection
+
Query() - Class in package Doctrine\ORM
+
A Query object represents a DQL query.
+
query() - Method in class Doctrine\DBAL\Driver\OCI8\OCI8Connection
+
QueryBuilder() - Class in package Doctrine\ORM
+
This class is responsible for building DQL query strings via an object oriented +PHP interface.
+
queryCacheNotConfigured() - Method in class Doctrine\ORM\ORMException
+
QueryCommand() - Class in package Doctrine\ORM\Tools\Console\Command\ClearCache
+
Command to clear the query cache of the various cache drivers.
+
QueryException() - Class in package Doctrine\ORM\Query
+
Description of QueryException
+
QueryLanguage() - Method in class Doctrine\ORM\Query\Parser
+
QueryLanguage ::= SelectStatement | UpdateStatement | DeleteStatement
+
quot() - Method in class Doctrine\ORM\Query\Expr
+
Creates a quotient mathematical expression with the given arguments. +
+
quote() - Method in class Doctrine\DBAL\Driver\OCI8\OCI8Connection
+
quote() - Method in class Doctrine\DBAL\Driver\Connection
+
quoteIdentifier() - Method in class Doctrine\DBAL\Connection
+
Quote a string so it can be safely used as a table or column name, even if +it is a reserved name. +
+
quoteIdentifier() - Method in class Doctrine\DBAL\Platforms\AbstractPlatform
+
Quotes a string so that it can be safely used as a table or column name, +even if it is a reserved word of the platform. +
+
+

R

+
+
RangeVariableDeclaration() - Method in class Doctrine\ORM\Query\Parser
+
RangeVariableDeclaration ::= AbstractSchemaName ["AS"] AliasIdentificationVariable
+
RangeVariableDeclaration() - Class in package Doctrine\ORM\Query\AST
+
RangeVariableDeclaration ::= AbstractSchemaName ["AS"] AliasIdentificationVariable
+
recomputeSingleEntityChangeSet() - Method in class Doctrine\ORM\UnitOfWork
+
INTERNAL: +Computes the changeset of an individual entity, independently of the +computeChangeSets() routine that is used at the beginning of a UnitOfWork#commit(). +
+
reflectionFailure() - Method in class Doctrine\ORM\Mapping\MappingException
+
Exception for reflection exceptions - adds the entity name, +because there might be long classnames that will be shortened +within the stacktrace
+
refresh() - Method in class Doctrine\ORM\UnitOfWork
+
Refreshes the state of the given entity from the database, overwriting +any local, unpersisted changes.
+
refresh() - Method in class Doctrine\ORM\Persisters\StandardEntityPersister
+
Refreshes an entity.
+
refresh() - Method in class Doctrine\ORM\EntityManager
+
Refreshes the persistent state of an entity from the database, +overriding any local changes that have not yet been persisted.
+
register() - Method in class Doctrine\Common\ClassLoader
+
Installs this class loader on the SPL autoload stack.
+
registerExportDriver() - Method in class Doctrine\ORM\Tools\Export\ClassMetadataExporter
+
Register a new exporter driver class under a specified name
+
registerManaged() - Method in class Doctrine\ORM\UnitOfWork
+
INTERNAL: +Registers an entity as managed.
+
registerMappingDriver() - Method in class Doctrine\ORM\Tools\ClassMetadataReader
+
Register a new mapping driver class under a specified name
+
remove() - Method in class Doctrine\ORM\UnitOfWork
+
Deletes an entity as part of the current unit of work.
+
remove() - Method in class Doctrine\ORM\PersistentCollection
+
{@inheritdoc}
+
remove() - Method in class Doctrine\ORM\EntityManager
+
Removes an entity instance. +
+
remove() - Method in class Doctrine\Common\Collections\ArrayCollection
+
Removes an element with a specific key/index from the collection.
+
remove() - Method in class Doctrine\Common\Collections\Collection
+
Removes the element at the specified index from the collection.
+
removedEntityInCollectionDetected() - Method in class Doctrine\ORM\ORMException
+
removeElement() - Method in class Doctrine\Common\Collections\Collection
+
Removes an element from the collection.
+
removeElement() - Method in class Doctrine\ORM\PersistentCollection
+
{@inheritdoc}
+
removeElement() - Method in class Doctrine\Common\Collections\ArrayCollection
+
Removes the specified element from the collection, if it is found.
+
removeEventListener() - Method in class Doctrine\Common\EventManager
+
Removes an event listener from the specified events.
+
removeFromIdentityMap() - Method in class Doctrine\ORM\UnitOfWork
+
INTERNAL: +Removes an entity from the identity map.
+
renameColumn() - Method in class Doctrine\DBAL\Schema\Table
+
Rename Column
+
renameTable() - Method in class Doctrine\DBAL\Schema\Schema
+
Rename a table
+
renameTable() - Method in class Doctrine\DBAL\Schema\AbstractSchemaManager
+
Rename a given table to another name
+
reset() - Method in class Doctrine\Common\Lexer
+
Resets the scanner
+
resetPeek() - Method in class Doctrine\Common\Lexer
+
Resets the peek pointer to 0
+
resetPosition() - Method in class Doctrine\Common\Lexer
+
Resets the lexer position on the input to the given position
+
resetQueries() - Method in class Doctrine\DBAL\Schema\Visitor\CreateSchemaSqlCollector
+
+
ResultCommand() - Class in package Doctrine\ORM\Tools\Console\Command\ClearCache
+
Command to clear the result cache of the various cache drivers.
+
ResultSetMapping() - Class in package Doctrine\ORM\Query
+
A ResultSetMapping describes how a result set of an SQL query maps to a Doctrine result. +
+
ResultVariable() - Method in class Doctrine\ORM\Query\Parser
+
ResultVariable ::= identifier
+
rewind() - Method in class Doctrine\ORM\Internal\Hydration\IterableResult
+
rollBack() - Method in class Doctrine\DBAL\Driver\Connection
+
rollback() - Method in class Doctrine\DBAL\Driver\PDOMsSql\Connection
+
Performs the rollback.
+
rollBack() - Method in class Doctrine\DBAL\Driver\OCI8\OCI8Connection
+
rollback() - Method in class Doctrine\ORM\EntityManager
+
Performs a rollback on the underlying database connection and closes the +EntityManager as it may now be in a corrupted state.
+
rowCount() - Method in class Doctrine\DBAL\Driver\OCI8\OCI8Statement
+
{@inheritdoc}
+
rowCount() - Method in class Doctrine\DBAL\Driver\Statement
+
rowCount +rowCount() returns the number of rows affected by the last DELETE, INSERT, or UPDATE statement +executed by the corresponding object. +
+
RunDqlCommand() - Class in package Doctrine\ORM\Tools\Console\Command
+
Command to execute DQL queries in a given EntityManager.
+
RunSqlCommand() - Class in package Doctrine\DBAL\Tools\Console\Command
+
Task for executing arbitrary SQL that can come from a file or directly from +the command line.
+
+

S

+
+
save() - Method in class Doctrine\Common\Cache\AbstractCache
+
{@inheritdoc}
+
save() - Method in class Doctrine\Common\Cache\Cache
+
Puts data into the cache.
+
ScalarExpression() - Method in class Doctrine\ORM\Query\Parser
+
ScalarExpression ::= SimpleArithmeticExpression | StringPrimary | DateTimePrimary | +StateFieldPathExpression | BooleanPrimary | CaseExpression | +EntityTypeExpression
+
ScalarHydrator() - Class in package Doctrine\ORM\Internal\Hydration
+
Hydrator that produces flat, rectangular results of scalar data. +
+
scheduleCollectionDeletion() - Method in class Doctrine\ORM\UnitOfWork
+
INTERNAL: +Schedules a complete collection for removal when this UnitOfWork commits.
+
scheduleExtraUpdate() - Method in class Doctrine\ORM\UnitOfWork
+
INTERNAL: +Schedules an extra update that will be executed immediately after the +regular entity updates within the currently running commit cycle. +
+
scheduleForDelete() - Method in class Doctrine\ORM\UnitOfWork
+
INTERNAL: +Schedules an entity for deletion.
+
scheduleForDirtyCheck() - Method in class Doctrine\ORM\UnitOfWork
+
Schedules an entity for dirty-checking at commit-time.
+
scheduleForInsert() - Method in class Doctrine\ORM\UnitOfWork
+
Schedules an entity for insertion into the database. +
+
scheduleForUpdate() - Method in class Doctrine\ORM\UnitOfWork
+
Schedules an entity for being updated.
+
scheduleOrphanRemoval() - Method in class Doctrine\ORM\UnitOfWork
+
INTERNAL: +Schedules an orphaned entity for removal.
+
Schema() - Class in package Doctrine\DBAL\Schema
+
Object representation of a database schema
+
SchemaConfig() - Class in package Doctrine\DBAL\Schema
+
Configuration for a Schema
+
SchemaDiff() - Class in package Doctrine\DBAL\Schema
+
Schema Diff
+
SchemaException() - Class in package Doctrine\DBAL\Schema
+
SchemaTool() - Class in package Doctrine\ORM\Tools
+
The SchemaTool is a tool to create/drop/update database schemas based on +ClassMetadata class descriptors.
+
select() - Method in class Doctrine\ORM\QueryBuilder
+
Set the SELECT statement + +[php] +$qb = $em->createQueryBuilder() +->select('u', 'p') +->from('User', 'u') +->leftJoin('u.Phonenumbers', 'p');
+
Select() - Class in package Doctrine\ORM\Query\Expr
+
Expression class for building DQL select statements
+
SelectClause() - Method in class Doctrine\ORM\Query\Parser
+
SelectClause ::= "SELECT" ["DISTINCT"] SelectExpression {"," SelectExpression}
+
SelectClause() - Class in package Doctrine\ORM\Query\AST
+
SelectClause = "SELECT" ["DISTINCT"] SelectExpression {"," SelectExpression}
+
SelectExpression() - Method in class Doctrine\ORM\Query\Parser
+
SelectExpression ::= +IdentificationVariable | StateFieldPathExpression | +(AggregateExpression | "(" Subselect ")" | ScalarExpression) [["AS"] AliasResultVariable]
+
SelectExpression() - Class in package Doctrine\ORM\Query\AST
+
SelectExpression ::= IdentificationVariable ["." "*"] | StateFieldPathExpression | +(AggregateExpression | "(" Subselect ")") [["AS"] FieldAliasIdentificationVariable]
+
SelectStatement() - Class in package Doctrine\ORM\Query\AST
+
SelectStatement = SelectClause FromClause [WhereClause] [GroupByClause] [HavingClause] [OrderByClause]
+
SelectStatement() - Method in class Doctrine\ORM\Query\Parser
+
SelectStatement ::= SelectClause FromClause [WhereClause] [GroupByClause] [HavingClause] [OrderByClause]
+
semanticalError() - Method in class Doctrine\ORM\Query\QueryException
+
semanticalError() - Method in class Doctrine\ORM\Query\Parser
+
Generates a new semantical error.
+
semanticalError() - Method in class Doctrine\Common\Annotations\AnnotationException
+
Sequence() - Class in package Doctrine\DBAL\Schema
+
Sequence Structure
+
sequenceAlreadyExists() - Method in class Doctrine\DBAL\Schema\SchemaException
+
+
sequenceDoesNotExist() - Method in class Doctrine\DBAL\Schema\SchemaException
+
+
SequenceGenerator() - Class in package Doctrine\ORM\Id
+
Represents an ID generator that uses a database sequence.
+
SequenceGenerator() - Class in package Doctrine\ORM\Mapping
+
Annotations class
+
SequenceIdentityGenerator() - Class in package Doctrine\ORM\Id
+
serialize() - Method in class Doctrine\ORM\Id\SequenceGenerator
+
set() - Method in class Doctrine\Common\Collections\ArrayCollection
+
Adds/sets an element in the collection at the index / with the specified key. +
+
set() - Method in class Doctrine\Common\Collections\Collection
+
Sets an element in the collection at the specified key/index.
+
set() - Method in class Doctrine\ORM\PersistentCollection
+
{@inheritdoc}
+
set() - Method in class Doctrine\ORM\QueryBuilder
+
Add a SET statement for a DQL UPDATE query + +[php] +$qb = $em->createQueryBuilder() +->update('User', 'u') +->set('u.password', md5('password')) +->where('u.id = ?');
+
setAnnotationNamespaceAlias() - Method in class Doctrine\Common\Annotations\Parser
+
Sets an alias for an annotation namespace.
+
setAnnotationNamespaceAlias() - Method in class Doctrine\Common\Annotations\AnnotationReader
+
Sets an alias for an annotation namespace.
+
setAutoGenerateProxyClasses() - Method in class Doctrine\ORM\Configuration
+
Sets a boolean flag that indicates whether proxy classes should always be regenerated +during each script execution.
+
setCacheDriver() - Method in class Doctrine\ORM\Mapping\ClassMetadataFactory
+
Sets the cache driver used by the factory to cache ClassMetadata instances.
+
setChangeTrackingPolicy() - Method in class Doctrine\ORM\Mapping\ClassMetadataInfo
+
Sets the change tracking policy used by this class.
+
setCharset() - Method in class Doctrine\DBAL\Connection
+
Sets the given charset on the current connection.
+
setClassToExtend() - Method in class Doctrine\ORM\Tools\EntityGenerator
+
Set the name of the class the generated classes should extend from
+
setColumnDefinition() - Method in class Doctrine\DBAL\Schema\Column
+
+
setCustomOutputTreeWalker() - Method in class Doctrine\ORM\Query\Parser
+
Sets a custom tree walker that produces output. +
+
setCustomRepositoryClass() - Method in class Doctrine\ORM\Mapping\ClassMetadataInfo
+
Registers a custom repository class for the entity class.
+
setDefault() - Method in class Doctrine\DBAL\Schema\Column
+
+
setDefaultAnnotationNamespace() - Method in class Doctrine\Common\Annotations\AnnotationReader
+
Sets the default namespace that the AnnotationReader should assume for annotations +with not fully qualified names.
+
setDefaultAnnotationNamespace() - Method in class Doctrine\Common\Annotations\Parser
+
Sets the default namespace that is assumed for an annotation that does not +define a namespace prefix.
+
setDirty() - Method in class Doctrine\ORM\PersistentCollection
+
Sets a boolean flag, indicating whether this collection is dirty.
+
setDiscriminatorColumn() - Method in class Doctrine\ORM\Mapping\ClassMetadataInfo
+
Sets the discriminator column definition.
+
setDiscriminatorColumn() - Method in class Doctrine\ORM\Query\ResultSetMapping
+
Sets a discriminator column for an entity result or joined entity result. +
+
setDiscriminatorMap() - Method in class Doctrine\ORM\Mapping\ClassMetadataInfo
+
Sets the discriminator values used by this class. +
+
setDQL() - Method in class Doctrine\ORM\Query
+
Sets a DQL query string.
+
setEntityGenerator() - Method in class Doctrine\ORM\Tools\Export\Driver\AnnotationExporter
+
setEntityManager() - Method in class Doctrine\ORM\Tools\Export\ClassMetadataExporter
+
Optionally set the EntityManager instance to get the AnnotationDriver +from instead of creating a new instance of the AnnotationDriver
+
setEntityManager() - Method in class Doctrine\ORM\Tools\ClassMetadataReader
+
Optionally set the EntityManager instance to get the AnnotationDriver +from instead of creating a new instance of the AnnotationDriver
+
setEntityNamespaces() - Method in class Doctrine\ORM\Configuration
+
Set the entity alias map
+
setExplicitForeignKeyIndexes() - Method in class Doctrine\DBAL\Schema\SchemaConfig
+
+
setExtension() - Method in class Doctrine\ORM\Tools\Export\Driver\AbstractExporter
+
Set the directory to output the mapping files to + +[php] +$exporter = new YamlExporter($metadatas, __DIR__ .
+
setExtension() - Method in class Doctrine\ORM\Tools\EntityGenerator
+
Set the extension to use when writing php files to disk
+
setFieldValue() - Method in class Doctrine\ORM\Mapping\ClassMetadata
+
Sets the specified field to the specified value on the given entity.
+
setFileExtension() - Method in class Doctrine\Common\ClassLoader
+
Sets the file extension of class files in the namespace of this class loader.
+
setFileExtension() - Method in class Doctrine\ORM\Mapping\Driver\AnnotationDriver
+
Set the file extension used to look for mapping files under
+
setFileExtension() - Method in class Doctrine\ORM\Mapping\Driver\AbstractFileDriver
+
Set the file extension used to look for mapping files under
+
setFirstResult() - Method in class Doctrine\ORM\QueryBuilder
+
Sets the position of the first result to retrieve (the "offset").
+
setFirstResult() - Method in class Doctrine\ORM\Query
+
Sets the position of the first result to retrieve (the "offset").
+
setFixed() - Method in class Doctrine\DBAL\Schema\Column
+
+
setGenerateAnnotations() - Method in class Doctrine\ORM\Tools\EntityGenerator
+
Set whether or not to generate annotations for the entity
+
setGenerateStubMethods() - Method in class Doctrine\ORM\Tools\EntityGenerator
+
Set whether or not to generate stub methods for the entity
+
setHint() - Method in class Doctrine\ORM\Query
+
{@inheritdoc}
+
setHint() - Method in class Doctrine\ORM\AbstractQuery
+
Sets a query hint.
+
setHydrationMode() - Method in class Doctrine\ORM\AbstractQuery
+
Defines the processing mode to be used during hydration / result set transformation.
+
setHydrationMode() - Method in class Doctrine\ORM\Query
+
{@inheritdoc}
+
setIdentifier() - Method in class Doctrine\ORM\Mapping\ClassMetadataInfo
+
INTERNAL: +Sets the mapped identifier/primary key fields of this class. +
+
setIdentifierValues() - Method in class Doctrine\ORM\Mapping\ClassMetadata
+
Populates the entity identifier of an entity.
+
setIdGenerator() - Method in class Doctrine\ORM\Mapping\ClassMetadataInfo
+
Sets the ID generator used to generate IDs for instances of this class.
+
setIdGeneratorType() - Method in class Doctrine\ORM\Mapping\ClassMetadataInfo
+
Sets the type of Id generator to use for the mapped class.
+
setIdGeneratorType() - Method in class Doctrine\DBAL\Schema\Table
+
+
setIncludePath() - Method in class Doctrine\Common\ClassLoader
+
Sets the base include path for all class files in the namespace of this class loader.
+
setInheritanceType() - Method in class Doctrine\ORM\Mapping\ClassMetadataInfo
+
Sets the inheritance type used by the class and it's subclasses.
+
setInitialized() - Method in class Doctrine\ORM\PersistentCollection
+
Sets the initialized flag of the collection, forcing it into that state.
+
setInput() - Method in class Doctrine\Common\Lexer
+
Inputs data to be tokenized
+
setLength() - Method in class Doctrine\DBAL\Schema\Column
+
+
setLifecycleCallbacks() - Method in class Doctrine\ORM\Mapping\ClassMetadataInfo
+
Sets the lifecycle callbacks for entities of this class. +
+
setLocalTable() - Method in class Doctrine\DBAL\Schema\ForeignKeyConstraint
+
+
setMaxIdentifierLength() - Method in class Doctrine\DBAL\Schema\SchemaConfig
+
+
setMaxResults() - Method in class Doctrine\ORM\QueryBuilder
+
Sets the maximum number of results to retrieve (the "limit").
+
setMaxResults() - Method in class Doctrine\ORM\Query
+
Sets the maximum number of results to retrieve (the "limit").
+
setMemcache() - Method in class Doctrine\Common\Cache\MemcacheCache
+
Sets the memcache instance to use.
+
setMetadataCacheImpl() - Method in class Doctrine\ORM\Configuration
+
Sets the cache driver implementation that is used for metadata caching.
+
setMetadataDriverImpl() - Method in class Doctrine\ORM\Configuration
+
Sets the cache driver implementation that is used for metadata caching.
+
setMetadataFor() - Method in class Doctrine\ORM\Mapping\ClassMetadataFactory
+
Sets the metadata descriptor for a specific class. +
+
setMetadatas() - Method in class Doctrine\ORM\Tools\Export\Driver\AbstractExporter
+
Set the array of ClassMetadataInfo instances to export
+
setNamespace() - Method in class Doctrine\Common\Cache\AbstractCache
+
Set the namespace to prefix all cache ids with.
+
setNamespaceSeparator() - Method in class Doctrine\Common\ClassLoader
+
Sets the namespace separator used by classes in the namespace of this class loader.
+
setNewValue() - Method in class Doctrine\ORM\Event\PreUpdateEventArgs
+
Set the new value of this field.
+
setNotnull() - Method in class Doctrine\DBAL\Schema\Column
+
+
setNumSpaces() - Method in class Doctrine\ORM\Tools\EntityGenerator
+
Set the number of spaces the exported class should have
+
setOptions() - Method in class Doctrine\DBAL\Schema\Column
+
+
setOriginalEntityData() - Method in class Doctrine\ORM\UnitOfWork
+
+
setOriginalEntityProperty() - Method in class Doctrine\ORM\UnitOfWork
+
INTERNAL: +Sets a property value of the original data array of an entity.
+
setOutputDir() - Method in class Doctrine\ORM\Tools\Export\Driver\AbstractExporter
+
Set the directory to output the mapping files to + +[php] +$exporter = new YamlExporter($metadatas); +$exporter->setOutputDir(__DIR__ .
+
setOwner() - Method in class Doctrine\ORM\PersistentCollection
+
INTERNAL: +Sets the collection's owning entity together with the AssociationMapping that +describes the association between the owner and the elements of the collection.
+
setParameter() - Method in class Doctrine\ORM\QueryBuilder
+
Sets a query parameter. +
+
setParameter() - Method in class Doctrine\ORM\AbstractQuery
+
Sets a query parameter.
+
setParameters() - Method in class Doctrine\ORM\AbstractQuery
+
Sets a collection of query parameters.
+
setParameters() - Method in class Doctrine\ORM\QueryBuilder
+
Sets a collection of query parameters. +
+
setParentClasses() - Method in class Doctrine\ORM\Mapping\ClassMetadataInfo
+
Sets the parent class names. +
+
setPlatformOption() - Method in class Doctrine\DBAL\Schema\Column
+
+
setPlatformOptions() - Method in class Doctrine\DBAL\Schema\Column
+
+
setPrecision() - Method in class Doctrine\DBAL\Schema\Column
+
+
setPrimaryKey() - Method in class Doctrine\DBAL\Schema\Table
+
Set Primary Key
+
setPrimaryTable() - Method in class Doctrine\ORM\Mapping\ClassMetadataInfo
+
Sets the primary table definition.
+
setProxyDir() - Method in class Doctrine\ORM\Configuration
+
Sets the directory where Doctrine generates any necessary proxy class files.
+
setProxyNamespace() - Method in class Doctrine\ORM\Configuration
+
Sets the namespace where proxy classes reside.
+
setQueryCacheDriver() - Method in class Doctrine\ORM\Query
+
Defines a cache driver to be used for caching queries.
+
setQueryCacheImpl() - Method in class Doctrine\ORM\Configuration
+
Sets the cache driver implementation that is used for the query cache (SQL cache).
+
setQueryCacheLifetime() - Method in class Doctrine\ORM\Query
+
Defines how long the query cache will be active before expire.
+
setRegenerateEntityIfExists() - Method in class Doctrine\ORM\Tools\EntityGenerator
+
Set whether or not to regenerate the entity if it exists
+
setResultCacheDriver() - Method in class Doctrine\ORM\AbstractQuery
+
Defines a cache driver to be used for caching result sets.
+
setResultCacheId() - Method in class Doctrine\ORM\AbstractQuery
+
Set the result cache id to use to store the result set cache entry. +
+
setResultCacheImpl() - Method in class Doctrine\ORM\Configuration
+
Sets the cache driver implementation that is used for query result caching.
+
setResultCacheLifetime() - Method in class Doctrine\ORM\AbstractQuery
+
Defines how long the result cache will be active before expire.
+
setResultSetMapping() - Method in class Doctrine\ORM\Query\ParserResult
+
Sets the ResultSetMapping of the parsed query.
+
setResultSetMapping() - Method in class Doctrine\ORM\AbstractQuery
+
Sets the ResultSetMapping that should be used for hydration.
+
setRollbackOnly() - Method in class Doctrine\DBAL\Connection
+
Marks the current transaction so that the only possible +outcome for the transaction to be rolled back.
+
setScale() - Method in class Doctrine\DBAL\Schema\Column
+
+
setSchemaConfig() - Method in class Doctrine\DBAL\Schema\Table
+
+
setSequenceGeneratorDefinition() - Method in class Doctrine\ORM\Mapping\ClassMetadataInfo
+
Sets the definition of the sequence ID generator for this class. +
+
setSQL() - Method in class Doctrine\ORM\NativeQuery
+
Sets the SQL of the query.
+
setSqlExecutor() - Method in class Doctrine\ORM\Query\ParserResult
+
Sets the SQL executor that should be used for this ParserResult.
+
setSQLLogger() - Method in class Doctrine\DBAL\Configuration
+
Sets the SQL logger to use.
+
setSqlTableAlias() - Method in class Doctrine\ORM\Query\SqlWalker
+
Forces the SqlWalker to use a specific alias for a table name, rather than +generating an alias on its own.
+
setSubclasses() - Method in class Doctrine\ORM\Mapping\ClassMetadataInfo
+
Sets the mapped subclasses of this class.
+
setTableName() - Method in class Doctrine\ORM\Mapping\ClassMetadataInfo
+
Sets the name of the primary table the class is mapped to.
+
setTransactionIsolation() - Method in class Doctrine\DBAL\Connection
+
Sets the transaction isolation level.
+
setType() - Method in class Doctrine\DBAL\Schema\Column
+
+
setUnsigned() - Method in class Doctrine\DBAL\Schema\Column
+
+
setUpdateEntityIfExists() - Method in class Doctrine\ORM\Tools\EntityGenerator
+
Set whether or not to try and update the entity if it already exists
+
setUseCExtension() - Method in class Doctrine\ORM\Configuration
+
Sets a boolean flag that indicates whether Doctrine should make use of the +C extension.
+
setVersioned() - Method in class Doctrine\ORM\Mapping\ClassMetadataInfo
+
Sets whether this class is to be versioned for optimistic locking.
+
setVersionField() - Method in class Doctrine\ORM\Mapping\ClassMetadataInfo
+
Sets the name of the field that is to be used for versioning if this class is +versioned for optimistic locking.
+
setVersionMapping() - Method in class Doctrine\ORM\Mapping\ClassMetadataInfo
+
Sets the version field mapping used for versioning.
+
shouldDeleteOrphans() - Method in class Doctrine\ORM\Mapping\OneToManyMapping
+
Whether orphaned elements (removed from the collection) should be deleted.
+
SimpleArithmeticExpression() - Class in package Doctrine\ORM\Query\AST
+
SimpleArithmeticExpression ::= ArithmeticTerm {("+" | "-") ArithmeticTerm}
+
SimpleArithmeticExpression() - Method in class Doctrine\ORM\Query\Parser
+
SimpleArithmeticExpression ::= ArithmeticTerm {("+" | "-") ArithmeticTerm}
+
SimpleConditionalExpression() - Method in class Doctrine\ORM\Query\Parser
+
SimpleConditionalExpression ::= +ComparisonExpression | BetweenExpression | LikeExpression | +InExpression | NullComparisonExpression | ExistsExpression | +EmptyCollectionComparisonExpression | CollectionMemberExpression
+
SimpleEntityExpression() - Method in class Doctrine\ORM\Query\Parser
+
SimpleEntityExpression ::= IdentificationVariable | InputParameter
+
SimpleSelectClause() - Class in package Doctrine\ORM\Query\AST
+
SimpleSelectClause ::= "SELECT" ["DISTINCT"] SimpleSelectExpression
+
SimpleSelectClause() - Method in class Doctrine\ORM\Query\Parser
+
SimpleSelectClause ::= "SELECT" ["DISTINCT"] SimpleSelectExpression
+
SimpleSelectExpression() - Class in package Doctrine\ORM\Query\AST
+
SimpleSelectExpression ::= StateFieldPathExpression | IdentificationVariable +| (AggregateExpression [["AS"] FieldAliasIdentificationVariable])
+
SimpleSelectExpression() - Method in class Doctrine\ORM\Query\Parser
+
SimpleSelectExpression ::= StateFieldPathExpression | IdentificationVariable | (AggregateExpression [["AS"] AliasResultVariable])
+
SimpleStateFieldPathExpression() - Method in class Doctrine\ORM\Query\Parser
+
SimpleStateFieldPathExpression ::= IdentificationVariable "." StateField
+
singleIdNotAllowedOnCompositePrimaryKey() - Method in class Doctrine\ORM\Mapping\MappingException
+
SingleScalarHydrator() - Class in package Doctrine\ORM\Internal\Hydration
+
Hydrator that hydrates a single scalar value from the result set.
+
SingleSelectExecutor() - Class in package Doctrine\ORM\Query\Exec
+
Executor that executes the SQL statement for simple DQL SELECT statements.
+
SingleTableDeleteUpdateExecutor() - Class in package Doctrine\ORM\Query\Exec
+
Executor that executes the SQL statements for DQL DELETE/UPDATE statements on classes +that are mapped to a single table.
+
SingleTablePersister() - Class in package Doctrine\ORM\Persisters
+
Persister for entities that participate in a hierarchy mapped with the +SINGLE_TABLE strategy.
+
SingleValuedAssociationPathExpression() - Method in class Doctrine\ORM\Query\Parser
+
SingleValuedAssociationPathExpression ::= IdentificationVariable "." {SingleValuedAssociationField "."}* SingleValuedAssociationField
+
SingleValuedPathExpression() - Method in class Doctrine\ORM\Query\Parser
+
SingleValuedPathExpression ::= StateFieldPathExpression | SingleValuedAssociationPathExpression
+
size() - Method in class Doctrine\ORM\UnitOfWork
+
Calculates the size of the UnitOfWork.
+
SizeFunction() - Class in package Doctrine\ORM\Query\AST\Functions
+
"SIZE" "(" CollectionValuedPathExpression ")"
+
skipUntil() - Method in class Doctrine\Common\Lexer
+
Tells the lexer to skip input tokens until it sees a token with the given value.
+
SmallIntType() - Class in package Doctrine\DBAL\Types
+
Type that maps a database SMALLINT to a PHP integer.
+
some() - Method in class Doctrine\ORM\Query\Expr
+
Creates a SOME() function expression with the given DQL subquery.
+
SqlitePlatform() - Class in package Doctrine\DBAL\Platforms
+
The SqlitePlatform class describes the specifics and dialects of the SQLite +database platform.
+
SqliteSchemaManager() - Class in package Doctrine\DBAL\Schema
+
SqliteSchemaManager
+
SQLLogger() - Interface in package Doctrine\DBAL\Logging
+
Interface for SQL loggers.
+
SqlWalker() - Class in package Doctrine\ORM\Query
+
The SqlWalker is a TreeWalker that walks over a DQL AST and constructs +the corresponding SQL.
+
sqrt() - Method in class Doctrine\ORM\Query\Expr
+
Creates a SQRT() function expression with the given argument.
+
SqrtFunction() - Class in package Doctrine\ORM\Query\AST\Functions
+
"SQRT" "(" SimpleArithmeticExpression ")"
+
StandardEntityPersister() - Class in package Doctrine\ORM\Persisters
+
A basic entity persister that maps an entity with no (mapped) inheritance to a single table +in the relational database.
+
startProduction() - Method in class Doctrine\ORM\Query\Printer
+
Prints an opening parenthesis followed by production name and increases +indentation level by one. +
+
StateFieldPathExpression() - Method in class Doctrine\ORM\Query\Parser
+
StateFieldPathExpression ::= SimpleStateFieldPathExpression | SimpleStateFieldAssociationPathExpression
+
Statement() - Class in package Doctrine\DBAL
+
A thin wrapper around a Doctrine\DBAL\Driver\Statement that adds support +for logging, DBAL mapping types, etc.
+
Statement() - Interface in package Doctrine\DBAL\Driver
+
Statement interface. +
+
StringExpression() - Method in class Doctrine\ORM\Query\Parser
+
StringExpression ::= StringPrimary | "(" Subselect ")"
+
StringPrimary() - Method in class Doctrine\ORM\Query\Parser
+
StringPrimary ::= StateFieldPathExpression | string | InputParameter | FunctionsReturningStrings | AggregateExpression
+
StringType() - Class in package Doctrine\DBAL\Types
+
Type that maps an SQL VARCHAR to a PHP string.
+
Subselect() - Method in class Doctrine\ORM\Query\Parser
+
Subselect ::= SimpleSelectClause SubselectFromClause [WhereClause] [GroupByClause] [HavingClause] [OrderByClause]
+
Subselect() - Class in package Doctrine\ORM\Query\AST
+
Subselect ::= SimpleSelectClause SubselectFromClause [WhereClause] [GroupByClause] [HavingClause] [OrderByClause]
+
SubselectFromClause() - Method in class Doctrine\ORM\Query\Parser
+
SubselectFromClause ::= "FROM" SubselectIdentificationVariableDeclaration {"," SubselectIdentificationVariableDeclaration}
+
SubselectFromClause() - Class in package Doctrine\ORM\Query\AST
+
SubselectFromClause ::= "FROM" SubselectIdentificationVariableDeclaration {"," SubselectIdentificationVariableDeclaration}
+
SubselectIdentificationVariableDeclaration() - Method in class Doctrine\ORM\Query\Parser
+
SubselectIdentificationVariableDeclaration ::= IdentificationVariableDeclaration | (AssociationPathExpression ["AS"] AliasIdentificationVariable)
+
substring() - Method in class Doctrine\ORM\Query\Expr
+
Creates a SUBSTRING() function expression with the given arguments.
+
SubstringFunction() - Class in package Doctrine\ORM\Query\AST\Functions
+
"SUBSTRING" "(" StringPrimary "," SimpleArithmeticExpression "," SimpleArithmeticExpression ")"
+
sum() - Method in class Doctrine\ORM\Query\Expr
+
Creates a sum mathematical expression with the given arguments. +
+
supportsAlterTable() - Method in class Doctrine\DBAL\Platforms\AbstractPlatform
+
supportsAlterTable() - Method in class Doctrine\DBAL\Platforms\SqlitePlatform
+
supportsForeignKeyConstraints() - Method in class Doctrine\DBAL\Platforms\SqlitePlatform
+
SQLite does support foreign key constraints, but only in CREATE TABLE statements... +
+
supportsForeignKeyConstraints() - Method in class Doctrine\DBAL\Platforms\AbstractPlatform
+
Does the platform supports foreign key constraints?
+
supportsForeignKeyOnUpdate() - Method in class Doctrine\DBAL\Platforms\OraclePlatform
+
Does this platform supports onUpdate in foreign key constraints?
+
supportsForeignKeyOnUpdate() - Method in class Doctrine\DBAL\Platforms\AbstractPlatform
+
Does this platform supports onUpdate in foreign key constraints?
+
supportsGettingAffectedRows() - Method in class Doctrine\DBAL\Platforms\AbstractPlatform
+
Whether the platform supports getting the affected rows of a recent +update/delete type query.
+
supportsIdentityColumns() - Method in class Doctrine\DBAL\Platforms\MySqlPlatform
+
Whether the platform supports identity columns. +
+
supportsIdentityColumns() - Method in class Doctrine\DBAL\Platforms\MsSqlPlatform
+
Whether the platform supports identity columns. +
+
supportsIdentityColumns() - Method in class Doctrine\DBAL\Platforms\AbstractPlatform
+
Whether the platform supports identity columns. +
+
supportsIdentityColumns() - Method in class Doctrine\DBAL\Platforms\PostgreSqlPlatform
+
Whether the platform supports identity columns. +
+
supportsIndexes() - Method in class Doctrine\DBAL\Platforms\AbstractPlatform
+
Whether the platform supports indexes.
+
supportsPrimaryConstraints() - Method in class Doctrine\DBAL\Platforms\AbstractPlatform
+
Whether the platform supports primary key constraints.
+
supportsSavepoints() - Method in class Doctrine\DBAL\Platforms\MsSqlPlatform
+
Whether the platform supports savepoints.
+
supportsSavepoints() - Method in class Doctrine\DBAL\Platforms\AbstractPlatform
+
Whether the platform supports savepoints.
+
supportsSavepoints() - Method in class Doctrine\DBAL\Platforms\MySqlPlatform
+
Whether the platform supports savepoints.
+
supportsSchemas() - Method in class Doctrine\DBAL\Platforms\PostgreSqlPlatform
+
Whether the platform supports database schemas.
+
supportsSchemas() - Method in class Doctrine\DBAL\Platforms\AbstractPlatform
+
Whether the platform supports database schemas.
+
supportsSequences() - Method in class Doctrine\DBAL\Platforms\OraclePlatform
+
Whether the platform supports sequences.
+
supportsSequences() - Method in class Doctrine\DBAL\Platforms\AbstractPlatform
+
Whether the platform supports sequences.
+
supportsSequences() - Method in class Doctrine\DBAL\Platforms\PostgreSqlPlatform
+
Whether the platform supports sequences. +
+
supportsTransactions() - Method in class Doctrine\DBAL\Platforms\AbstractPlatform
+
Whether the platform supports transactions.
+
syntaxError() - Method in class Doctrine\ORM\Query\QueryException
+
syntaxError() - Method in class Doctrine\Common\Annotations\AnnotationException
+
syntaxError() - Method in class Doctrine\ORM\Query\Parser
+
Generates a new syntax error.
+
+

T

+
+
Table() - Class in package Doctrine\DBAL\Schema
+
Object Representation of a table
+
Table() - Class in package Doctrine\ORM\Mapping
+
Annotations class
+
tableAlreadyExists() - Method in class Doctrine\DBAL\Schema\SchemaException
+
+
TableDiff() - Class in package Doctrine\DBAL\Schema
+
Table Diff
+
tableDoesNotExist() - Method in class Doctrine\DBAL\Schema\SchemaException
+
+
TableGenerator() - Class in package Doctrine\ORM\Id
+
Id generator that uses a single-row database table and a hi/lo algorithm.
+
tableIdGeneratorNotImplemented() - Method in class Doctrine\ORM\Mapping\MappingException
+
tableize() - Method in class Doctrine\Common\Util\Inflector
+
Convert word in to the format for a Doctrine table name.
+
takeSnapshot() - Method in class Doctrine\ORM\PersistentCollection
+
INTERNAL: +Tells this collection to take a snapshot of its current state.
+
TextType() - Class in package Doctrine\DBAL\Types
+
Type that maps an SQL CLOB to a PHP string.
+
TimeType() - Class in package Doctrine\DBAL\Types
+
Type that maps an SQL TIME to a PHP DateTime object.
+
toArray() - Method in class Doctrine\DBAL\Schema\Column
+
+
toArray() - Method in class Doctrine\Common\Collections\ArrayCollection
+
Gets the PHP array representation of this collection.
+
toArray() - Method in class Doctrine\Common\Collections\Collection
+
Gets a native PHP array representation of the collection.
+
toArray() - Method in class Doctrine\ORM\PersistentCollection
+
{@inheritdoc}
+
toDropSql() - Method in class Doctrine\DBAL\Schema\Schema
+
Return an array of necessary sql queries to drop the schema on the given platform.
+
ToolEvents() - Class in package Doctrine\ORM\Tools
+
ToolsException() - Class in package Doctrine\ORM\Tools
+
Base exception class for all ORM exceptions.
+
toSaveSql() - Method in class Doctrine\DBAL\Schema\SchemaDiff
+
The to save sql mode ensures that the following things don't happen: + +1.
+
toSql() - Method in class Doctrine\DBAL\Schema\SchemaDiff
+
+
toSql() - Method in class Doctrine\DBAL\Schema\Schema
+
Return an array of necessary sql queries to create the schema on the given platform.
+
TreeWalker() - Interface in package Doctrine\ORM\Query
+
Interface for walkers of DQL ASTs (abstract syntax trees).
+
TreeWalkerAdapter() - Class in package Doctrine\ORM\Query
+
An adapter implementation of the TreeWalker interface.
+
TreeWalkerChain() - Class in package Doctrine\ORM\Query
+
Represents a chain of tree walkers that modify an AST and finally emit output. +
+
trim() - Method in class Doctrine\ORM\Query\Expr
+
Creates an instance of TRIM() function, with the given argument.
+
TrimFunction() - Class in package Doctrine\ORM\Query\AST\Functions
+
"TRIM" "(" [["LEADING" | "TRAILING" | "BOTH"] [char] "FROM"] StringPrimary ")"
+
tryGetById() - Method in class Doctrine\ORM\UnitOfWork
+
Tries to find an entity with the given identifier in the identity map of +this UnitOfWork.
+
tryGetByIdHash() - Method in class Doctrine\ORM\UnitOfWork
+
INTERNAL: +Tries to get an entity by its identifier hash.
+
tryMethod() - Method in class Doctrine\DBAL\Schema\AbstractSchemaManager
+
Try any method on the schema manager.
+
Type() - Class in package Doctrine\DBAL\Types
+
The base class for so-called Doctrine mapping types. +
+
typeExists() - Method in class Doctrine\DBAL\DBALException
+
typeNotFound() - Method in class Doctrine\DBAL\DBALException
+
+

U

+
+
udfLocate() - Method in class Doctrine\DBAL\Platforms\SqlitePlatform
+
+
udfMod() - Method in class Doctrine\DBAL\Platforms\SqlitePlatform
+
User-defined function for Sqlite that implements MOD(a, b)
+
udfSqrt() - Method in class Doctrine\DBAL\Platforms\SqlitePlatform
+
User-defined function for Sqlite that is used with PDO::sqliteCreateFunction()
+
UnionSubclassPersister() - Class in package Doctrine\ORM\Persisters
+
A basic entity persister that maps an entity with no (mapped) inheritance to a single table +in the relational database.
+
UniqueConstraint() - Class in package Doctrine\ORM\Mapping
+
Annotations class
+
UnitOfWork() - Class in package Doctrine\ORM
+
The UnitOfWork is responsible for tracking changes to objects during an +"object-level" transaction and for writing out changes to the database +in the correct order.
+
unknownColumnType() - Method in class Doctrine\DBAL\DBALException
+
unknownDriver() - Method in class Doctrine\DBAL\DBALException
+
unknownEntityNamespace() - Method in class Doctrine\ORM\ORMException
+
unknownParameter() - Method in class Doctrine\ORM\Query\QueryException
+
unrecognizedField() - Method in class Doctrine\ORM\ORMException
+
unregister() - Method in class Doctrine\Common\ClassLoader
+
Uninstalls this class loader on the SPL autoload stack.
+
unserialize() - Method in class Doctrine\ORM\Id\SequenceGenerator
+
unsupportedOptimisticLockingType() - Method in class Doctrine\ORM\Mapping\MappingException
+
unwrap() - Method in class Doctrine\ORM\PersistentCollection
+
Retrieves the wrapped Collection instance.
+
update() - Method in class Doctrine\DBAL\Connection
+
Executes an SQL UPDATE statement on a table.
+
update() - Method in class Doctrine\ORM\QueryBuilder
+
Construct a DQL UPDATE query + +[php] +$qb = $em->createQueryBuilder() +->update('User', 'u') +->set('u.password', md5('password')) +->where('u.id = ?');
+
update() - Method in class Doctrine\ORM\Persisters\JoinedSubclassPersister
+
{@inheritdoc}
+
update() - Method in class Doctrine\ORM\Persisters\StandardEntityPersister
+
Updates an entity.
+
update() - Method in class Doctrine\ORM\Persisters\AbstractCollectionPersister
+
Updates the given collection, synchronizing it's state with the database +by inserting, updating and deleting individual elements.
+
UpdateClause() - Method in class Doctrine\ORM\Query\Parser
+
UpdateClause ::= "UPDATE" AbstractSchemaName ["AS"] AliasIdentificationVariable "SET" UpdateItem {"," UpdateItem}
+
UpdateClause() - Class in package Doctrine\ORM\Query\AST
+
UpdateClause ::= "UPDATE" AbstractSchemaName [["AS"] AliasIdentificationVariable] "SET" UpdateItem {"," UpdateItem}
+
UpdateCommand() - Class in package Doctrine\ORM\Tools\Console\Command\SchemaTool
+
Command to update the database schema for a set of classes based on their mappings.
+
UpdateItem() - Method in class Doctrine\ORM\Query\Parser
+
UpdateItem ::= IdentificationVariable "." {StateField | SingleValuedAssociationField} "=" NewValue
+
UpdateItem() - Class in package Doctrine\ORM\Query\AST
+
UpdateItem ::= [IdentificationVariable "."] {StateField | SingleValuedAssociationField} "=" NewValue +NewValue ::= SimpleArithmeticExpression | StringPrimary | DatetimePrimary | BooleanPrimary | +EnumPrimary | SimpleEntityExpression | "NULL"
+
updateSchema() - Method in class Doctrine\ORM\Tools\SchemaTool
+
Updates the database schema of the given classes by comparing the ClassMetadata +instances to the current database schema that is inspected.
+
UpdateStatement() - Class in package Doctrine\ORM\Query\AST
+
UpdateStatement = UpdateClause [WhereClause]
+
UpdateStatement() - Method in class Doctrine\ORM\Query\Parser
+
UpdateStatement ::= UpdateClause [WhereClause]
+
upper() - Method in class Doctrine\ORM\Query\Expr
+
Creates an UPPER() function expression with the given argument.
+
UpperFunction() - Class in package Doctrine\ORM\Query\AST\Functions
+
"UPPER" "(" StringPrimary ")"
+
useQueryCache() - Method in class Doctrine\ORM\Query
+
Defines whether the query should make use of a query cache, if available.
+
useResultCache() - Method in class Doctrine\ORM\AbstractQuery
+
Set whether or not to cache the results of this query and if so, for +how long and which ID to use for the cache entry.
+
usesIdGenerator() - Method in class Doctrine\ORM\Mapping\ClassMetadataInfo
+
Checks whether the mapped class uses an Id generator.
+
usesJoinTable() - Method in class Doctrine\ORM\Mapping\AssociationMapping
+
Whether the association uses a join table for the mapping.
+
+

V

+
+
valid() - Method in class Doctrine\ORM\Internal\Hydration\IterableResult
+
+
Value() - Method in class Doctrine\Common\Annotations\Parser
+
Value ::= PlainValue | FieldAssignment
+
Values() - Method in class Doctrine\Common\Annotations\Parser
+
Values ::= Array | Value {"," Value}
+
Version() - Class in package Doctrine\ORM\Mapping
+
Annotations class
+
Version() - Class in package Doctrine\Common
+
Class to store and retrieve the version of Doctrine
+
View() - Class in package Doctrine\DBAL\Schema
+
Representation of a Database View
+
visit() - Method in class Doctrine\DBAL\Schema\Table
+
+
visit() - Method in class Doctrine\DBAL\Schema\Schema
+
+
visit() - Method in class Doctrine\DBAL\Schema\Column
+
+
visit() - Method in class Doctrine\DBAL\Schema\Sequence
+
+
Visitor() - Interface in package Doctrine\DBAL\Schema\Visitor
+
Schema Visitor used for Validation or Generation purposes.
+
+

W

+
+
walkAggregateExpression() - Method in class Doctrine\ORM\Query\SqlWalker
+
Walks down an AggregateExpression AST node, thereby generating the appropriate SQL.
+
walkAggregateExpression() - Method in class Doctrine\ORM\Query\TreeWalkerChain
+
Walks down an AggregateExpression AST node, thereby generating the appropriate SQL.
+
walkAggregateExpression() - Method in class Doctrine\ORM\Query\TreeWalker
+
Walks down an AggregateExpression AST node, thereby generating the appropriate SQL.
+
walkAggregateExpression() - Method in class Doctrine\ORM\Query\TreeWalkerAdapter
+
Walks down an AggregateExpression AST node, thereby generating the appropriate SQL.
+
walkArithmeticExpression() - Method in class Doctrine\ORM\Query\TreeWalker
+
Walks down an ArithmeticExpression AST node, thereby generating the appropriate SQL.
+
walkArithmeticExpression() - Method in class Doctrine\ORM\Query\SqlWalker
+
Walks down an ArithmeticExpression AST node, thereby generating the appropriate SQL.
+
walkArithmeticExpression() - Method in class Doctrine\ORM\Query\TreeWalkerAdapter
+
Walks down an ArithmeticExpression AST node, thereby generating the appropriate SQL.
+
walkArithmeticExpression() - Method in class Doctrine\ORM\Query\TreeWalkerChain
+
Walks down an ArithmeticExpression AST node, thereby generating the appropriate SQL.
+
walkArithmeticFactor() - Method in class Doctrine\ORM\Query\TreeWalkerAdapter
+
Walks down an ArithmeticFactor that represents an AST node, thereby generating the appropriate SQL.
+
walkArithmeticFactor() - Method in class Doctrine\ORM\Query\TreeWalker
+
Walks down an ArithmeticFactor that represents an AST node, thereby generating the appropriate SQL.
+
walkArithmeticFactor() - Method in class Doctrine\ORM\Query\SqlWalker
+
Walks down an ArithmeticFactor that represents an AST node, thereby generating the appropriate SQL.
+
walkArithmeticFactor() - Method in class Doctrine\ORM\Query\TreeWalkerChain
+
Walks down an ArithmeticFactor that represents an AST node, thereby generating the appropriate SQL.
+
walkArithmeticTerm() - Method in class Doctrine\ORM\Query\TreeWalkerAdapter
+
Walks down an ArithmeticTerm AST node, thereby generating the appropriate SQL.
+
walkArithmeticTerm() - Method in class Doctrine\ORM\Query\TreeWalker
+
Walks down an ArithmeticTerm AST node, thereby generating the appropriate SQL.
+
walkArithmeticTerm() - Method in class Doctrine\ORM\Query\TreeWalkerChain
+
Walks down an ArithmeticTerm AST node, thereby generating the appropriate SQL.
+
walkArithmeticTerm() - Method in class Doctrine\ORM\Query\SqlWalker
+
Walks down an ArithmeticTerm AST node, thereby generating the appropriate SQL.
+
walkBetweenExpression() - Method in class Doctrine\ORM\Query\TreeWalkerAdapter
+
Walks down a BetweenExpression AST node, thereby generating the appropriate SQL.
+
walkBetweenExpression() - Method in class Doctrine\ORM\Query\SqlWalker
+
Walks down a BetweenExpression AST node, thereby generating the appropriate SQL.
+
walkBetweenExpression() - Method in class Doctrine\ORM\Query\TreeWalkerChain
+
Walks down a BetweenExpression AST node, thereby generating the appropriate SQL.
+
walkBetweenExpression() - Method in class Doctrine\ORM\Query\TreeWalker
+
Walks down a BetweenExpression AST node, thereby generating the appropriate SQL.
+
walkCollectionMemberExpression() - Method in class Doctrine\ORM\Query\TreeWalkerAdapter
+
Walks down a CollectionMemberExpression AST node, thereby generating the appropriate SQL.
+
walkCollectionMemberExpression() - Method in class Doctrine\ORM\Query\TreeWalker
+
Walks down a CollectionMemberExpression AST node, thereby generating the appropriate SQL.
+
walkCollectionMemberExpression() - Method in class Doctrine\ORM\Query\TreeWalkerChain
+
Walks down a CollectionMemberExpression AST node, thereby generating the appropriate SQL.
+
walkCollectionMemberExpression() - Method in class Doctrine\ORM\Query\SqlWalker
+
Walks down a CollectionMemberExpression AST node, thereby generating the appropriate SQL.
+
walkComparisonExpression() - Method in class Doctrine\ORM\Query\SqlWalker
+
Walks down a ComparisonExpression AST node, thereby generating the appropriate SQL.
+
walkComparisonExpression() - Method in class Doctrine\ORM\Query\TreeWalkerAdapter
+
Walks down a ComparisonExpression AST node, thereby generating the appropriate SQL.
+
walkComparisonExpression() - Method in class Doctrine\ORM\Query\TreeWalker
+
Walks down a ComparisonExpression AST node, thereby generating the appropriate SQL.
+
walkComparisonExpression() - Method in class Doctrine\ORM\Query\TreeWalkerChain
+
Walks down a ComparisonExpression AST node, thereby generating the appropriate SQL.
+
walkConditionalFactor() - Method in class Doctrine\ORM\Query\TreeWalkerAdapter
+
Walks down a ConditionalFactor AST node, thereby generating the appropriate SQL.
+
walkConditionalFactor() - Method in class Doctrine\ORM\Query\SqlWalker
+
Walks down a ConditionalFactor AST node, thereby generating the appropriate SQL.
+
walkConditionalFactor() - Method in class Doctrine\ORM\Query\TreeWalkerChain
+
Walks down a ConditionalFactor AST node, thereby generating the appropriate SQL.
+
walkConditionalFactor() - Method in class Doctrine\ORM\Query\TreeWalker
+
Walks down a ConditionalFactor AST node, thereby generating the appropriate SQL.
+
walkConditionalTerm() - Method in class Doctrine\ORM\Query\TreeWalker
+
Walks down a ConditionalTerm AST node, thereby generating the appropriate SQL.
+
walkConditionalTerm() - Method in class Doctrine\ORM\Query\TreeWalkerAdapter
+
Walks down a ConditionalTerm AST node, thereby generating the appropriate SQL.
+
walkConditionalTerm() - Method in class Doctrine\ORM\Query\TreeWalkerChain
+
Walks down a ConditionalTerm AST node, thereby generating the appropriate SQL.
+
walkConditionalTerm() - Method in class Doctrine\ORM\Query\SqlWalker
+
Walks down a ConditionalTerm AST node, thereby generating the appropriate SQL.
+
walkDeleteClause() - Method in class Doctrine\ORM\Query\SqlWalker
+
Walks down a DeleteClause AST node, thereby generating the appropriate SQL.
+
walkDeleteClause() - Method in class Doctrine\ORM\Query\TreeWalkerChain
+
Walks down a DeleteClause AST node, thereby generating the appropriate SQL.
+
walkDeleteClause() - Method in class Doctrine\ORM\Query\TreeWalkerAdapter
+
Walks down a DeleteClause AST node, thereby generating the appropriate SQL.
+
walkDeleteClause() - Method in class Doctrine\ORM\Query\TreeWalker
+
Walks down a DeleteClause AST node, thereby generating the appropriate SQL.
+
walkDeleteStatement() - Method in class Doctrine\ORM\Query\TreeWalkerChain
+
Walks down a DeleteStatement AST node, thereby generating the appropriate SQL.
+
walkDeleteStatement() - Method in class Doctrine\ORM\Query\TreeWalkerAdapter
+
Walks down a DeleteStatement AST node, thereby generating the appropriate SQL.
+
walkDeleteStatement() - Method in class Doctrine\ORM\Query\TreeWalker
+
Walks down a DeleteStatement AST node, thereby generating the appropriate SQL.
+
walkDeleteStatement() - Method in class Doctrine\ORM\Query\SqlWalker
+
Walks down a DeleteStatement AST node, thereby generating the appropriate SQL.
+
walkEmptyCollectionComparisonExpression() - Method in class Doctrine\ORM\Query\TreeWalker
+
Walks down an EmptyCollectionComparisonExpression AST node, thereby generating the appropriate SQL.
+
walkEmptyCollectionComparisonExpression() - Method in class Doctrine\ORM\Query\SqlWalker
+
Walks down an EmptyCollectionComparisonExpression AST node, thereby generating the appropriate SQL.
+
walkEmptyCollectionComparisonExpression() - Method in class Doctrine\ORM\Query\TreeWalkerChain
+
Walks down an EmptyCollectionComparisonExpression AST node, thereby generating the appropriate SQL.
+
walkEmptyCollectionComparisonExpression() - Method in class Doctrine\ORM\Query\TreeWalkerAdapter
+
Walks down an EmptyCollectionComparisonExpression AST node, thereby generating the appropriate SQL.
+
walkExistsExpression() - Method in class Doctrine\ORM\Query\TreeWalker
+
Walks down an ExistsExpression AST node, thereby generating the appropriate SQL.
+
walkExistsExpression() - Method in class Doctrine\ORM\Query\TreeWalkerChain
+
Walks down an ExistsExpression AST node, thereby generating the appropriate SQL.
+
walkExistsExpression() - Method in class Doctrine\ORM\Query\TreeWalkerAdapter
+
Walks down an ExistsExpression AST node, thereby generating the appropriate SQL.
+
walkExistsExpression() - Method in class Doctrine\ORM\Query\SqlWalker
+
Walks down an ExistsExpression AST node, thereby generating the appropriate SQL.
+
walkFromClause() - Method in class Doctrine\ORM\Query\SqlWalker
+
Walks down a FromClause AST node, thereby generating the appropriate SQL.
+
walkFromClause() - Method in class Doctrine\ORM\Query\TreeWalker
+
Walks down a FromClause AST node, thereby generating the appropriate SQL.
+
walkFromClause() - Method in class Doctrine\ORM\Query\TreeWalkerChain
+
Walks down a FromClause AST node, thereby generating the appropriate SQL.
+
walkFromClause() - Method in class Doctrine\ORM\Query\TreeWalkerAdapter
+
Walks down a FromClause AST node, thereby generating the appropriate SQL.
+
walkFunction() - Method in class Doctrine\ORM\Query\TreeWalkerChain
+
Walks down a FunctionNode AST node, thereby generating the appropriate SQL.
+
walkFunction() - Method in class Doctrine\ORM\Query\SqlWalker
+
Walks down a FunctionNode AST node, thereby generating the appropriate SQL.
+
walkFunction() - Method in class Doctrine\ORM\Query\TreeWalker
+
Walks down a FunctionNode AST node, thereby generating the appropriate SQL.
+
walkFunction() - Method in class Doctrine\ORM\Query\TreeWalkerAdapter
+
Walks down a FunctionNode AST node, thereby generating the appropriate SQL.
+
walkGroupByClause() - Method in class Doctrine\ORM\Query\TreeWalker
+
Walks down a GroupByClause AST node, thereby generating the appropriate SQL.
+
walkGroupByClause() - Method in class Doctrine\ORM\Query\SqlWalker
+
Walks down a GroupByClause AST node, thereby generating the appropriate SQL.
+
walkGroupByClause() - Method in class Doctrine\ORM\Query\TreeWalkerChain
+
Walks down a GroupByClause AST node, thereby generating the appropriate SQL.
+
walkGroupByClause() - Method in class Doctrine\ORM\Query\TreeWalkerAdapter
+
Walks down a GroupByClause AST node, thereby generating the appropriate SQL.
+
walkGroupByItem() - Method in class Doctrine\ORM\Query\TreeWalker
+
Walks down a GroupByItem AST node, thereby generating the appropriate SQL.
+
walkGroupByItem() - Method in class Doctrine\ORM\Query\TreeWalkerChain
+
Walks down a GroupByItem AST node, thereby generating the appropriate SQL.
+
walkGroupByItem() - Method in class Doctrine\ORM\Query\SqlWalker
+
Walks down a GroupByItem AST node, thereby generating the appropriate SQL.
+
walkGroupByItem() - Method in class Doctrine\ORM\Query\TreeWalkerAdapter
+
Walks down a GroupByItem AST node, thereby generating the appropriate SQL.
+
walkHavingClause() - Method in class Doctrine\ORM\Query\SqlWalker
+
Walks down a HavingClause AST node, thereby generating the appropriate SQL.
+
walkHavingClause() - Method in class Doctrine\ORM\Query\TreeWalkerAdapter
+
Walks down a HavingClause AST node, thereby generating the appropriate SQL.
+
walkHavingClause() - Method in class Doctrine\ORM\Query\TreeWalker
+
Walks down a HavingClause AST node, thereby generating the appropriate SQL.
+
walkHavingClause() - Method in class Doctrine\ORM\Query\TreeWalkerChain
+
Walks down a HavingClause AST node, thereby generating the appropriate SQL.
+
walkIdentificationVariable() - Method in class Doctrine\ORM\Query\SqlWalker
+
Walks down an IdentificationVariable (no AST node associated), thereby generating the SQL.
+
walkInExpression() - Method in class Doctrine\ORM\Query\TreeWalkerChain
+
Walks down an InExpression AST node, thereby generating the appropriate SQL.
+
walkInExpression() - Method in class Doctrine\ORM\Query\TreeWalker
+
Walks down an InExpression AST node, thereby generating the appropriate SQL.
+
walkInExpression() - Method in class Doctrine\ORM\Query\TreeWalkerAdapter
+
Walks down an InExpression AST node, thereby generating the appropriate SQL.
+
walkInExpression() - Method in class Doctrine\ORM\Query\SqlWalker
+
Walks down an InExpression AST node, thereby generating the appropriate SQL.
+
walkInParameter() - Method in class Doctrine\ORM\Query\SqlWalker
+
walkInputParameter() - Method in class Doctrine\ORM\Query\SqlWalker
+
Walks down an InputParameter AST node, thereby generating the appropriate SQL.
+
walkInputParameter() - Method in class Doctrine\ORM\Query\TreeWalkerAdapter
+
Walks down an InputParameter AST node, thereby generating the appropriate SQL.
+
walkInputParameter() - Method in class Doctrine\ORM\Query\TreeWalker
+
Walks down an InputParameter AST node, thereby generating the appropriate SQL.
+
walkInputParameter() - Method in class Doctrine\ORM\Query\TreeWalkerChain
+
Walks down an InputParameter AST node, thereby generating the appropriate SQL.
+
walkJoinVariableDeclaration() - Method in class Doctrine\ORM\Query\TreeWalkerAdapter
+
Walks down a JoinVariableDeclaration AST node and creates the corresponding SQL.
+
walkJoinVariableDeclaration() - Method in class Doctrine\ORM\Query\TreeWalker
+
Walks down a JoinVariableDeclaration AST node and creates the corresponding SQL.
+
walkJoinVariableDeclaration() - Method in class Doctrine\ORM\Query\TreeWalkerChain
+
Walks down a JoinVariableDeclaration AST node and creates the corresponding SQL.
+
walkJoinVariableDeclaration() - Method in class Doctrine\ORM\Query\SqlWalker
+
Walks down a JoinVariableDeclaration AST node and creates the corresponding SQL.
+
walkLikeExpression() - Method in class Doctrine\ORM\Query\TreeWalkerChain
+
Walks down a LikeExpression AST node, thereby generating the appropriate SQL.
+
walkLikeExpression() - Method in class Doctrine\ORM\Query\TreeWalkerAdapter
+
Walks down a LikeExpression AST node, thereby generating the appropriate SQL.
+
walkLikeExpression() - Method in class Doctrine\ORM\Query\TreeWalker
+
Walks down a LikeExpression AST node, thereby generating the appropriate SQL.
+
walkLikeExpression() - Method in class Doctrine\ORM\Query\SqlWalker
+
Walks down a LikeExpression AST node, thereby generating the appropriate SQL.
+
walkLiteral() - Method in class Doctrine\ORM\Query\SqlWalker
+
Walks down a literal that represents an AST node, thereby generating the appropriate SQL.
+
walkLiteral() - Method in class Doctrine\ORM\Query\TreeWalkerAdapter
+
Walks down a literal that represents an AST node, thereby generating the appropriate SQL.
+
walkLiteral() - Method in class Doctrine\ORM\Query\TreeWalker
+
Walks down a literal that represents an AST node, thereby generating the appropriate SQL.
+
walkLiteral() - Method in class Doctrine\ORM\Query\TreeWalkerChain
+
Walks down a literal that represents an AST node, thereby generating the appropriate SQL.
+
walkNullComparisonExpression() - Method in class Doctrine\ORM\Query\SqlWalker
+
Walks down a NullComparisonExpression AST node, thereby generating the appropriate SQL.
+
walkNullComparisonExpression() - Method in class Doctrine\ORM\Query\TreeWalker
+
Walks down a NullComparisonExpression AST node, thereby generating the appropriate SQL.
+
walkNullComparisonExpression() - Method in class Doctrine\ORM\Query\TreeWalkerAdapter
+
Walks down a NullComparisonExpression AST node, thereby generating the appropriate SQL.
+
walkNullComparisonExpression() - Method in class Doctrine\ORM\Query\TreeWalkerChain
+
Walks down a NullComparisonExpression AST node, thereby generating the appropriate SQL.
+
walkOrderByClause() - Method in class Doctrine\ORM\Query\SqlWalker
+
Walks down an OrderByClause AST node, thereby generating the appropriate SQL.
+
walkOrderByClause() - Method in class Doctrine\ORM\Query\TreeWalkerAdapter
+
Walks down an OrderByClause AST node, thereby generating the appropriate SQL.
+
walkOrderByClause() - Method in class Doctrine\ORM\Query\TreeWalker
+
Walks down an OrderByClause AST node, thereby generating the appropriate SQL.
+
walkOrderByClause() - Method in class Doctrine\ORM\Query\TreeWalkerChain
+
Walks down an OrderByClause AST node, thereby generating the appropriate SQL.
+
walkOrderByItem() - Method in class Doctrine\ORM\Query\TreeWalker
+
Walks down an OrderByItem AST node, thereby generating the appropriate SQL.
+
walkOrderByItem() - Method in class Doctrine\ORM\Query\SqlWalker
+
Walks down an OrderByItem AST node, thereby generating the appropriate SQL.
+
walkOrderByItem() - Method in class Doctrine\ORM\Query\TreeWalkerAdapter
+
Walks down an OrderByItem AST node, thereby generating the appropriate SQL.
+
walkOrderByItem() - Method in class Doctrine\ORM\Query\TreeWalkerChain
+
Walks down an OrderByItem AST node, thereby generating the appropriate SQL.
+
walkPathExpression() - Method in class Doctrine\ORM\Query\SqlWalker
+
Walks down a PathExpression AST node, thereby generating the appropriate SQL.
+
walkPathExpression() - Method in class Doctrine\ORM\Query\TreeWalker
+
Walks down an PathExpression AST node, thereby generating the appropriate SQL.
+
walkPathExpression() - Method in class Doctrine\ORM\Query\TreeWalkerChain
+
Walks down an PathExpression AST node, thereby generating the appropriate SQL.
+
walkPathExpression() - Method in class Doctrine\ORM\Query\TreeWalkerAdapter
+
Walks down an PathExpression AST node, thereby generating the appropriate SQL.
+
walkQuantifiedExpression() - Method in class Doctrine\ORM\Query\TreeWalkerChain
+
Walks down a QuantifiedExpression AST node, thereby generating the appropriate SQL.
+
walkQuantifiedExpression() - Method in class Doctrine\ORM\Query\TreeWalker
+
Walks down a QuantifiedExpression AST node, thereby generating the appropriate SQL.
+
walkQuantifiedExpression() - Method in class Doctrine\ORM\Query\TreeWalkerAdapter
+
Walks down a QuantifiedExpression AST node, thereby generating the appropriate SQL.
+
walkQuantifiedExpression() - Method in class Doctrine\ORM\Query\SqlWalker
+
Walks down a QuantifiedExpression AST node, thereby generating the appropriate SQL.
+
walkSelectClause() - Method in class Doctrine\ORM\Query\TreeWalkerChain
+
Walks down a SelectClause AST node, thereby generating the appropriate SQL.
+
walkSelectClause() - Method in class Doctrine\ORM\Query\TreeWalkerAdapter
+
Walks down a SelectClause AST node, thereby generating the appropriate SQL.
+
walkSelectClause() - Method in class Doctrine\ORM\Query\TreeWalker
+
Walks down a SelectClause AST node, thereby generating the appropriate SQL.
+
walkSelectClause() - Method in class Doctrine\ORM\Query\SqlWalker
+
Walks down a SelectClause AST node, thereby generating the appropriate SQL.
+
walkSelectExpression() - Method in class Doctrine\ORM\Query\TreeWalkerAdapter
+
Walks down a SelectExpression AST node and generates the corresponding SQL.
+
walkSelectExpression() - Method in class Doctrine\ORM\Query\TreeWalker
+
Walks down a SelectExpression AST node and generates the corresponding SQL.
+
walkSelectExpression() - Method in class Doctrine\ORM\Query\TreeWalkerChain
+
Walks down a SelectExpression AST node and generates the corresponding SQL.
+
walkSelectExpression() - Method in class Doctrine\ORM\Query\SqlWalker
+
Walks down a SelectExpression AST node and generates the corresponding SQL.
+
walkSelectStatement() - Method in class Doctrine\ORM\Query\TreeWalkerChain
+
Walks down a SelectStatement AST node, thereby generating the appropriate SQL.
+
walkSelectStatement() - Method in class Doctrine\ORM\Query\TreeWalkerAdapter
+
Walks down a SelectStatement AST node, thereby generating the appropriate SQL.
+
walkSelectStatement() - Method in class Doctrine\ORM\Query\TreeWalker
+
Walks down a SelectStatement AST node, thereby generating the appropriate SQL.
+
walkSelectStatement() - Method in class Doctrine\ORM\Query\SqlWalker
+
Walks down a SelectStatement AST node, thereby generating the appropriate SQL.
+
walkSimpleArithmeticExpression() - Method in class Doctrine\ORM\Query\TreeWalkerChain
+
Walks down an SimpleArithmeticExpression AST node, thereby generating the appropriate SQL.
+
walkSimpleArithmeticExpression() - Method in class Doctrine\ORM\Query\TreeWalkerAdapter
+
Walks down an SimpleArithmeticExpression AST node, thereby generating the appropriate SQL.
+
walkSimpleArithmeticExpression() - Method in class Doctrine\ORM\Query\TreeWalker
+
Walks down an SimpleArithmeticExpression AST node, thereby generating the appropriate SQL.
+
walkSimpleArithmeticExpression() - Method in class Doctrine\ORM\Query\SqlWalker
+
Walks down an SimpleArithmeticExpression AST node, thereby generating the appropriate SQL.
+
walkSimpleSelectClause() - Method in class Doctrine\ORM\Query\TreeWalker
+
Walks down a SimpleSelectClause AST node, thereby generating the appropriate SQL.
+
walkSimpleSelectClause() - Method in class Doctrine\ORM\Query\TreeWalkerAdapter
+
Walks down a SimpleSelectClause AST node, thereby generating the appropriate SQL.
+
walkSimpleSelectClause() - Method in class Doctrine\ORM\Query\SqlWalker
+
Walks down a SimpleSelectClause AST node, thereby generating the appropriate SQL.
+
walkSimpleSelectClause() - Method in class Doctrine\ORM\Query\TreeWalkerChain
+
Walks down a SimpleSelectClause AST node, thereby generating the appropriate SQL.
+
walkSimpleSelectExpression() - Method in class Doctrine\ORM\Query\TreeWalkerChain
+
Walks down a SimpleSelectExpression AST node, thereby generating the appropriate SQL.
+
walkSimpleSelectExpression() - Method in class Doctrine\ORM\Query\TreeWalker
+
Walks down a SimpleSelectExpression AST node, thereby generating the appropriate SQL.
+
walkSimpleSelectExpression() - Method in class Doctrine\ORM\Query\SqlWalker
+
Walks down a SimpleSelectExpression AST node, thereby generating the appropriate SQL.
+
walkSimpleSelectExpression() - Method in class Doctrine\ORM\Query\TreeWalkerAdapter
+
Walks down a SimpleSelectExpression AST node, thereby generating the appropriate SQL.
+
walkStateFieldPathExpression() - Method in class Doctrine\ORM\Query\TreeWalker
+
Walks down a StateFieldPathExpression AST node, thereby generating the appropriate SQL.
+
walkStateFieldPathExpression() - Method in class Doctrine\ORM\Query\TreeWalkerAdapter
+
Walks down a StateFieldPathExpression AST node, thereby generating the appropriate SQL.
+
walkStateFieldPathExpression() - Method in class Doctrine\ORM\Query\TreeWalkerChain
+
Walks down a StateFieldPathExpression AST node, thereby generating the appropriate SQL.
+
walkStateFieldPathExpression() - Method in class Doctrine\ORM\Query\SqlWalker
+
Walks down a StateFieldPathExpression AST node, thereby generating the appropriate SQL.
+
walkStringPrimary() - Method in class Doctrine\ORM\Query\SqlWalker
+
Walks down a StringPrimary that represents an AST node, thereby generating the appropriate SQL.
+
walkStringPrimary() - Method in class Doctrine\ORM\Query\TreeWalkerAdapter
+
Walks down a StringPrimary that represents an AST node, thereby generating the appropriate SQL.
+
walkStringPrimary() - Method in class Doctrine\ORM\Query\TreeWalkerChain
+
Walks down a StringPrimary that represents an AST node, thereby generating the appropriate SQL.
+
walkStringPrimary() - Method in class Doctrine\ORM\Query\TreeWalker
+
Walks down a StringPrimary that represents an AST node, thereby generating the appropriate SQL.
+
walkSubselect() - Method in class Doctrine\ORM\Query\TreeWalkerChain
+
Walks down a Subselect AST node, thereby generating the appropriate SQL.
+
walkSubselect() - Method in class Doctrine\ORM\Query\TreeWalkerAdapter
+
Walks down a Subselect AST node, thereby generating the appropriate SQL.
+
walkSubselect() - Method in class Doctrine\ORM\Query\TreeWalker
+
Walks down a Subselect AST node, thereby generating the appropriate SQL.
+
walkSubselect() - Method in class Doctrine\ORM\Query\SqlWalker
+
Walks down a Subselect AST node, thereby generating the appropriate SQL.
+
walkSubselectFromClause() - Method in class Doctrine\ORM\Query\SqlWalker
+
Walks down a SubselectFromClause AST node, thereby generating the appropriate SQL.
+
walkSubselectFromClause() - Method in class Doctrine\ORM\Query\TreeWalkerAdapter
+
Walks down a SubselectFromClause AST node, thereby generating the appropriate SQL.
+
walkSubselectFromClause() - Method in class Doctrine\ORM\Query\TreeWalkerChain
+
Walks down a SubselectFromClause AST node, thereby generating the appropriate SQL.
+
walkSubselectFromClause() - Method in class Doctrine\ORM\Query\TreeWalker
+
Walks down a SubselectFromClause AST node, thereby generating the appropriate SQL.
+
walkUpdateClause() - Method in class Doctrine\ORM\Query\TreeWalkerChain
+
Walks down an UpdateClause AST node, thereby generating the appropriate SQL.
+
walkUpdateClause() - Method in class Doctrine\ORM\Query\SqlWalker
+
Walks down an UpdateClause AST node, thereby generating the appropriate SQL.
+
walkUpdateClause() - Method in class Doctrine\ORM\Query\TreeWalker
+
Walks down an UpdateClause AST node, thereby generating the appropriate SQL.
+
walkUpdateClause() - Method in class Doctrine\ORM\Query\TreeWalkerAdapter
+
Walks down an UpdateClause AST node, thereby generating the appropriate SQL.
+
walkUpdateItem() - Method in class Doctrine\ORM\Query\TreeWalkerChain
+
Walks down an UpdateItem AST node, thereby generating the appropriate SQL.
+
walkUpdateItem() - Method in class Doctrine\ORM\Query\TreeWalker
+
Walks down an UpdateItem AST node, thereby generating the appropriate SQL.
+
walkUpdateItem() - Method in class Doctrine\ORM\Query\SqlWalker
+
Walks down an UpdateItem AST node, thereby generating the appropriate SQL.
+
walkUpdateItem() - Method in class Doctrine\ORM\Query\TreeWalkerAdapter
+
Walks down an UpdateItem AST node, thereby generating the appropriate SQL.
+
walkUpdateStatement() - Method in class Doctrine\ORM\Query\TreeWalker
+
Walks down an UpdateStatement AST node, thereby generating the appropriate SQL.
+
walkUpdateStatement() - Method in class Doctrine\ORM\Query\TreeWalkerChain
+
Walks down an UpdateStatement AST node, thereby generating the appropriate SQL.
+
walkUpdateStatement() - Method in class Doctrine\ORM\Query\SqlWalker
+
Walks down an UpdateStatement AST node, thereby generating the appropriate SQL.
+
walkUpdateStatement() - Method in class Doctrine\ORM\Query\TreeWalkerAdapter
+
Walks down an UpdateStatement AST node, thereby generating the appropriate SQL.
+
walkWhereClause() - Method in class Doctrine\ORM\Query\SqlWalker
+
Walks down a WhereClause AST node, thereby generating the appropriate SQL.
+
walkWhereClause() - Method in class Doctrine\ORM\Query\TreeWalkerAdapter
+
Walks down a WhereClause AST node, thereby generating the appropriate SQL.
+
walkWhereClause() - Method in class Doctrine\ORM\Query\TreeWalker
+
Walks down a WhereClause AST node, thereby generating the appropriate SQL.
+
walkWhereClause() - Method in class Doctrine\ORM\Query\TreeWalkerChain
+
Walks down a WhereClause AST node, thereby generating the appropriate SQL.
+
where() - Method in class Doctrine\ORM\QueryBuilder
+
Set and override any existing WHERE statements + +[php] +$qb = $em->createQueryBuilder() +->select('u') +->from('User', 'u') +->where('u.id = ?'); + +You can optionally programatically build and/or expressions +$qb = $em->createQueryBuilder(); + +$or = $qb->expr()->orx(); +$or->add($qb->expr()->eq('u.id', 1)); +$or->add($qb->expr()->eq('u.id', 2)); + +$qb->update('User', 'u') +->set('u.password', md5('password')) +->where($or);
+
WhereClause() - Method in class Doctrine\ORM\Query\Parser
+
WhereClause ::= "WHERE" ConditionalExpression
+
WhereClause() - Class in package Doctrine\ORM\Query\AST
+
WhereClause ::= "WHERE" ConditionalExpression
+
writeEntityClass() - Method in class Doctrine\ORM\Tools\EntityGenerator
+
Generated and write entity class to disk for the given ClassMetadataInfo instance
+
writeLimitClause() - Method in class Doctrine\DBAL\Platforms\MsSqlPlatform
+
Adds an adapter-specific LIMIT clause to the SELECT statement. +
+
+

X

+
+
XcacheCache() - Class in package Doctrine\Common\Cache
+
Xcache cache driver.
+
XmlDriver() - Class in package Doctrine\ORM\Mapping\Driver
+
XmlDriver is a metadata driver that enables mapping through XML files.
+
XmlExporter() - Class in package Doctrine\ORM\Tools\Export\Driver
+
ClassMetadata exporter for Doctrine XML mapping files
+
+

Y

+
+
YamlDriver() - Class in package Doctrine\ORM\Mapping\Driver
+
The YamlDriver reads the mapping metadata from yaml schema files.
+
YamlExporter() - Class in package Doctrine\ORM\Tools\Export\Driver
+
ClassMetadata exporter for Doctrine YAML mapping files
+
+
+

Doctrine

+ +
+ + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/index.html b/lib/api/index.html new file mode 100644 index 000000000..81217425e --- /dev/null +++ b/lib/api/index.html @@ -0,0 +1,35 @@ + + + + + + + + + + + +Doctrine + + + + + + + + + + + + + + + + <body> + <h2>Frame Alert</h2> + <p>This document is designed to be viewed using frames. If you see this message, you are using a non-frame-capable browser.<br> + Link to <a href="overview-summary.html">Non-frame version</a>.</p> + </body> + + + \ No newline at end of file diff --git a/lib/api/overview-frame.html b/lib/api/overview-frame.html new file mode 100644 index 000000000..9022bd93e --- /dev/null +++ b/lib/api/overview-frame.html @@ -0,0 +1,75 @@ + + + + + + + + + + + +Overview (Doctrine) + + + + +

Doctrine

+ + + +

Namespaces

+ + + + + + \ No newline at end of file diff --git a/lib/api/overview-summary.html b/lib/api/overview-summary.html new file mode 100644 index 000000000..7100e957f --- /dev/null +++ b/lib/api/overview-summary.html @@ -0,0 +1,106 @@ + + + + + + + + + + + +Overview (Doctrine) + + + + +
+

Doctrine

+ +
+ + +
+ +

Doctrine: PHP Object-Relational Mapper

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Namespaces
Doctrine\Common
Doctrine\Common\Annotations
Doctrine\Common\Cache
Doctrine\Common\Collections
Doctrine\Common\Util
Doctrine\DBAL
Doctrine\DBAL\Driver
Doctrine\DBAL\Driver\OCI8
Doctrine\DBAL\Driver\PDOMsSql
Doctrine\DBAL\Driver\PDOMySql
Doctrine\DBAL\Driver\PDOOracle
Doctrine\DBAL\Driver\PDOPgSql
Doctrine\DBAL\Driver\PDOSqlite
Doctrine\DBAL\Event
Doctrine\DBAL\Event\Listeners
Doctrine\DBAL\Logging
Doctrine\DBAL\Platforms
Doctrine\DBAL\Schema
Doctrine\DBAL\Schema\Visitor
Doctrine\DBAL\Tools\Console\Command
Doctrine\DBAL\Tools\Console\Helper
Doctrine\DBAL\Types
Doctrine\ORM
Doctrine\ORM\Event
Doctrine\ORM\Id
Doctrine\ORM\Internal
Doctrine\ORM\Internal\Hydration
Doctrine\ORM\Mapping
Doctrine\ORM\Mapping\Driver
Doctrine\ORM\Persisters
Doctrine\ORM\Proxy
Doctrine\ORM\Query
Doctrine\ORM\Query\AST
Doctrine\ORM\Query\AST\Functions
Doctrine\ORM\Query\Exec
Doctrine\ORM\Query\Expr
Doctrine\ORM\Tools
Doctrine\ORM\Tools\Console
Doctrine\ORM\Tools\Console\Command
Doctrine\ORM\Tools\Console\Command\ClearCache
Doctrine\ORM\Tools\Console\Command\SchemaTool
Doctrine\ORM\Tools\Console\Helper
Doctrine\ORM\Tools\Event
Doctrine\ORM\Tools\Export
Doctrine\ORM\Tools\Export\Driver
+ +
+ +
+

Doctrine

+ +
+ + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/overview-tree.html b/lib/api/overview-tree.html new file mode 100644 index 000000000..f28868994 --- /dev/null +++ b/lib/api/overview-tree.html @@ -0,0 +1,340 @@ + + + + + + + + + + + +Overview (Doctrine) + + + + +
+

Doctrine

+ +
+ + +

Class Hierarchy

+
+

Doctrine

+ +
+ + +
+ + + + + + \ No newline at end of file diff --git a/lib/api/stylesheet.css b/lib/api/stylesheet.css new file mode 100644 index 000000000..ec7982d39 --- /dev/null +++ b/lib/api/stylesheet.css @@ -0,0 +1,216 @@ +* { + margin: 0; + padding: 0; +} + +body { + font-family: "Times New Roman", Times, serif; + margin: 0px; + padding: 10px; + font-size: 100%; + background-color: #fff; + color: #000; +} + +a { + color: #00f; +} + +a:visited { + color: #518; +} + +table { + width: 100%; + margin: 10px 0; + border-collapse: collapse; +} + +table, th, td { + border: 2px solid #999; +} + +th { + padding: 2px 4px; + background-color: #ccf; + text-align: left; + font-size: 140%; +} + +td { + padding: 2px 4px; +} + +td p { + padding: 0; + margin: 0; +} + +hr, p, dl, ul, ol, h1, h2, h3, h4, h5, h6 { + margin: 5px 0; +} + +dt { + font-weight: bold; +} + +dd { + margin-left: 40px; +} + +ul, ol { + margin-left: 30px; +} + +p { + margin-left: 10px; +} + +h1 { + font-size: 140%; + font-family: Arial, Helvetica, sans-serif; +} + +h2 { + font-size: 120%; + font-family: Arial, Helvetica, sans-serif; +} + +/* page header */ + +div.header { + width: 100%; + font-family: Arial, Helvetica, sans-serif; + background-color: #eef; + margin: 0 0 10px; + padding: 4px 0; +} + +div.header h1 { + float: right; + font-size: 100%; + font-style: italic; + padding: 0 4px; + margin: 0; +} + +div.header ul { + list-style: none; + margin: 0; +} + +div.header ul li { + display: inline; + font-size: 100%; + font-weight: bold; + padding: 0 4px; +} + +div.header ul li.active { + background-color: #00008c; + color: #fff; +} + +div.header ul li a:visited { + color: #000; +} + +/* small links */ + +div.small_links { + text-transform: uppercase; + font-size: 65%; + font-family: Arial, Helvetica, sans-serif; + margin: 8px; +} + +/* footer */ + +p#footer { + font-size: 80%; +} + +/* frames */ + +#frame h1 { + font-size: 120%; +} + +#frame h2 { + font-size: 100%; +} + +#frame ul { + list-style: none; + margin-left: 10px; +} + +/* definition writer */ + +div.qualifiedName { + font-size: 80%; + font-weight: bold; + margin: 10px 0 0; +} + +div.location { + font-size: 80%; + float: right; +} + +#definition h1 { + margin: 0 0 10px; + font-family: "Times New Roman", Times, serif; +} + +#definition h2 { + border: 2px solid #999; + padding: 2px; + background-color: #ccf; + text-align: left; + font-size: 140%; + font-family: "Times New Roman", Times, serif; +} + +pre.tree { + margin: 10px 0; +} + +table.inherit th { + background-color: #eef; + font-size: 120%; +} + +p.signature, div.comment { + margin: 10px 0; +} + +code.signature { + display: block; + margin: 10px 0; +} + +div.details { + margin: 10px 0 10px 20px; +} + +td.type { + text-align: right; + vertical-align: top; + font-family: monospace; +} + +td p.name { + font-family: monospace; +} + +td p.description { + margin: 2px 0 0 20px; +} + +/* tree */ + +#tree ul ul { + margin-top: 0; + margin-bottom: 0; +} \ No newline at end of file From d150f8a6f734b5a0c7dc5d97a8c3eb6fe8f5a438 Mon Sep 17 00:00:00 2001 From: "Jonathan H. Wage" Date: Wed, 14 Apr 2010 11:21:39 -0400 Subject: [PATCH 41/86] Fixing issue with 4 spaces being hardcoded and not replaced with the configured amount of spaces --- lib/Doctrine/ORM/Tools/EntityGenerator.php | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/lib/Doctrine/ORM/Tools/EntityGenerator.php b/lib/Doctrine/ORM/Tools/EntityGenerator.php index c8957041a..b8c4d5002 100644 --- a/lib/Doctrine/ORM/Tools/EntityGenerator.php +++ b/lib/Doctrine/ORM/Tools/EntityGenerator.php @@ -98,7 +98,7 @@ class EntityGenerator */ public function () { - return $this->; +return $this->; }'; private static $_setMethodTemplate = @@ -109,7 +109,7 @@ public function () */ public function ($) { - $this-> = $; +$this-> = $; }'; private static $_addMethodTemplate = @@ -120,7 +120,7 @@ public function ($) */ public function ($) { - $this->[] = $; +$this->[] = $; }'; private static $_lifecycleCallbackMethodTemplate = @@ -129,7 +129,7 @@ public function ($) */ public function () { - // Add your code here +// Add your code here }'; /** @@ -192,7 +192,8 @@ public function () '', '', '', - '' + '', + '' ); $replacements = array( @@ -200,7 +201,8 @@ public function () $this->_generateEntityUse($metadata), $this->_generateEntityDocBlock($metadata), $this->_generateEntityClassName($metadata), - $this->_generateEntityBody($metadata) + $this->_generateEntityBody($metadata), + $this->_spaces ); return str_replace($placeHolders, $replacements, self::$_classTemplate); From 3afc8f794aeb5f9a7e53d73874521d4c824f23f9 Mon Sep 17 00:00:00 2001 From: "Jonathan H. Wage" Date: Wed, 14 Apr 2010 14:17:09 -0400 Subject: [PATCH 42/86] Throw exception when entity generator is not set --- lib/Doctrine/ORM/Tools/Export/Driver/AnnotationExporter.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/Doctrine/ORM/Tools/Export/Driver/AnnotationExporter.php b/lib/Doctrine/ORM/Tools/Export/Driver/AnnotationExporter.php index 1ba0d2e7f..254905eec 100644 --- a/lib/Doctrine/ORM/Tools/Export/Driver/AnnotationExporter.php +++ b/lib/Doctrine/ORM/Tools/Export/Driver/AnnotationExporter.php @@ -49,6 +49,9 @@ class AnnotationExporter extends AbstractExporter */ public function exportClassMetadata(ClassMetadataInfo $metadata) { + if ( ! $this->_entityGenerator) { + throw new \RuntimeException('For the AnnotationExporter you must set an EntityGenerator instance with the setEntityGenerator() method.'); + } $this->_entityGenerator->setGenerateAnnotations(true); $this->_entityGenerator->setGenerateStubMethods(false); $this->_entityGenerator->setRegenerateEntityIfExists(false); From ac4e33d0560166f40c75fc769ef8e493bfcafb3f Mon Sep 17 00:00:00 2001 From: "Jonathan H. Wage" Date: Wed, 14 Apr 2010 14:17:55 -0400 Subject: [PATCH 43/86] Fixing issue with EntityGenerator spaces --- lib/Doctrine/ORM/Tools/EntityGenerator.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/Doctrine/ORM/Tools/EntityGenerator.php b/lib/Doctrine/ORM/Tools/EntityGenerator.php index b8c4d5002..b8a47c64d 100644 --- a/lib/Doctrine/ORM/Tools/EntityGenerator.php +++ b/lib/Doctrine/ORM/Tools/EntityGenerator.php @@ -192,8 +192,7 @@ public function () '', '', '', - '', - '' + '' ); $replacements = array( @@ -201,11 +200,11 @@ public function () $this->_generateEntityUse($metadata), $this->_generateEntityDocBlock($metadata), $this->_generateEntityClassName($metadata), - $this->_generateEntityBody($metadata), - $this->_spaces + $this->_generateEntityBody($metadata) ); - return str_replace($placeHolders, $replacements, self::$_classTemplate); + $code = str_replace($placeHolders, $replacements, self::$_classTemplate); + return str_replace('', $this->_spaces, $code); } /** @@ -220,9 +219,10 @@ public function () $currentCode = file_get_contents($path); $body = $this->_generateEntityBody($metadata); + $body = str_replace('', $this->_spaces, $body); $last = strrpos($currentCode, '}'); - return substr($currentCode, 0, $last) . $body . '}'; + return substr($currentCode, 0, $last) . $body . "\n}"; } /** From 146b22a1a57f0da75068d430337d06a34e2f2d7e Mon Sep 17 00:00:00 2001 From: "Jonathan H. Wage" Date: Wed, 14 Apr 2010 14:18:10 -0400 Subject: [PATCH 44/86] Making 2nd argument of getExporter() optional again --- lib/Doctrine/ORM/Tools/Export/ClassMetadataExporter.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Doctrine/ORM/Tools/Export/ClassMetadataExporter.php b/lib/Doctrine/ORM/Tools/Export/ClassMetadataExporter.php index c86b9113e..2b528a2c2 100644 --- a/lib/Doctrine/ORM/Tools/Export/ClassMetadataExporter.php +++ b/lib/Doctrine/ORM/Tools/Export/ClassMetadataExporter.php @@ -63,7 +63,7 @@ class ClassMetadataExporter * @param string $source The directory where the exporter will export to * @return AbstractExporter $exporter */ - public function getExporter($type, $dest) + public function getExporter($type, $dest = null) { if ( ! isset(self::$_exporterDrivers[$type])) { throw ExportException::invalidExporterDriverType($type); From c122953a7e928c1b8859ce45334f3c4a08b609e7 Mon Sep 17 00:00:00 2001 From: Steven Surowiec Date: Wed, 14 Apr 2010 14:20:44 -0400 Subject: [PATCH 45/86] Changed privates to protected and updated setUp to use late static binding. This allows projects using Doctrine2 to use its test cases for testing their own entities. --- .../Doctrine/Tests/OrmFunctionalTestCase.php | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/tests/Doctrine/Tests/OrmFunctionalTestCase.php b/tests/Doctrine/Tests/OrmFunctionalTestCase.php index 9e02cb285..9502f2b7a 100644 --- a/tests/Doctrine/Tests/OrmFunctionalTestCase.php +++ b/tests/Doctrine/Tests/OrmFunctionalTestCase.php @@ -15,7 +15,7 @@ abstract class OrmFunctionalTestCase extends OrmTestCase private static $_queryCacheImpl = null; /* Shared connection when a TestCase is run alone (outside of it's functional suite) */ - private static $_sharedConn; + protected static $_sharedConn; /** * @var \Doctrine\ORM\EntityManager @@ -33,13 +33,13 @@ abstract class OrmFunctionalTestCase extends OrmTestCase protected $_sqlLoggerStack; /** The names of the model sets used in this testcase. */ - private $_usedModelSets = array(); + protected $_usedModelSets = array(); /** Whether the database schema has already been created. */ - private static $_tablesCreated = array(); + protected static $_tablesCreated = array(); /** List of model sets and their classes. */ - private static $_modelSets = array( + protected static $_modelSets = array( 'cms' => array( 'Doctrine\Tests\Models\CMS\CmsUser', 'Doctrine\Tests\Models\CMS\CmsPhonenumber', @@ -170,11 +170,11 @@ abstract class OrmFunctionalTestCase extends OrmTestCase $forceCreateTables = false; if ( ! isset($this->sharedFixture['conn'])) { - if ( ! isset(self::$_sharedConn)) { - self::$_sharedConn = TestUtil::getConnection(); + if ( ! isset(static::$_sharedConn)) { + static::$_sharedConn = TestUtil::getConnection(); } - $this->sharedFixture['conn'] = self::$_sharedConn; + $this->sharedFixture['conn'] = static::$_sharedConn; if ($this->sharedFixture['conn']->getDriver() instanceof \Doctrine\DBAL\Driver\PDOSqlite\Driver) { $forceCreateTables = true; @@ -189,12 +189,12 @@ abstract class OrmFunctionalTestCase extends OrmTestCase $classes = array(); foreach ($this->_usedModelSets as $setName => $bool) { - if ( ! isset(self::$_tablesCreated[$setName])/* || $forceCreateTables*/) { - foreach (self::$_modelSets[$setName] as $className) { + if ( ! isset(static::$_tablesCreated[$setName])/* || $forceCreateTables*/) { + foreach (static::$_modelSets[$setName] as $className) { $classes[] = $this->_em->getClassMetadata($className); } - self::$_tablesCreated[$setName] = true; + static::$_tablesCreated[$setName] = true; } } From 32a81f09d1b96f4286edbd7cfa2dbb05a4e7169b Mon Sep 17 00:00:00 2001 From: "Jonathan H. Wage" Date: Wed, 14 Apr 2010 14:32:47 -0400 Subject: [PATCH 46/86] Fixing generate-repositories command so it works again after migration to Symfony console --- .../Command/GenerateRepositoriesCommand.php | 26 ++++++++++++++----- 1 file changed, 20 insertions(+), 6 deletions(-) diff --git a/lib/Doctrine/ORM/Tools/Console/Command/GenerateRepositoriesCommand.php b/lib/Doctrine/ORM/Tools/Console/Command/GenerateRepositoriesCommand.php index 9c1477fcd..5410c08b4 100644 --- a/lib/Doctrine/ORM/Tools/Console/Command/GenerateRepositoriesCommand.php +++ b/lib/Doctrine/ORM/Tools/Console/Command/GenerateRepositoriesCommand.php @@ -40,12 +40,12 @@ use Symfony\Components\Console\Input\InputArgument, */ class GenerateRepositoriesCommand extends Console\Command\Command { - private static $_template = + protected static $_template = '; -use \Doctrine\ORM\EntityRepository; +use Doctrine\ORM\EntityRepository; /** * @@ -103,7 +103,7 @@ EOT ); } - if ( count($metadatas)) { + if (count($metadatas)) { $numRepositories = 0; foreach ($metadatas as $metadata) { @@ -112,7 +112,7 @@ EOT sprintf('Processing repository "%s"', $metadata->customRepositoryClassName) . PHP_EOL ); - $this->_generateRepositoryClass($metadata, $destPath); + $this->_writeRepositoryClass($metadata, $destPath); $numRepositories++; } @@ -129,9 +129,23 @@ EOT } } - private function _generateRepositoryClass($metadata, $destPath) + protected function _generateRepositoryClass($metadata) { - $code = $this->_generateRepositoryClass($metadata->customRepositoryClassName); + fullClassName = $metadata->customRepositoryClassName; + $namespace = substr($fullClassName, 0, strrpos($fullClassName, '\\')); + $className = substr($fullClassName, strrpos($fullClassName, '\\') + 1, strlen($fullClassName)); + + $variables = array( + '' => $namespace, + '' => $className + ); + $code = str_replace(array_keys($variables), array_values($variables), self::$_template); + return $code; + } + + protected function _writeRepositoryClass($metadata, $destPath) + { + $code = $this->_generateRepositoryClass($metadata); $path = $destPath . DIRECTORY_SEPARATOR . str_replace('\\', \DIRECTORY_SEPARATOR, $metadata->customRepositoryClassName) . '.php'; From 4d758035cc28359529f8d40fd9c975218baec730 Mon Sep 17 00:00:00 2001 From: "Jonathan H. Wage" Date: Wed, 14 Apr 2010 15:19:48 -0400 Subject: [PATCH 47/86] Extracting repository generation code to standalone class so it can be re-used --- .../Command/GenerateRepositoriesCommand.php | 52 +----------- .../ORM/Tools/EntityRepositoryGenerator.php | 81 +++++++++++++++++++ 2 files changed, 85 insertions(+), 48 deletions(-) create mode 100644 lib/Doctrine/ORM/Tools/EntityRepositoryGenerator.php diff --git a/lib/Doctrine/ORM/Tools/Console/Command/GenerateRepositoriesCommand.php b/lib/Doctrine/ORM/Tools/Console/Command/GenerateRepositoriesCommand.php index 5410c08b4..f417ee0f9 100644 --- a/lib/Doctrine/ORM/Tools/Console/Command/GenerateRepositoriesCommand.php +++ b/lib/Doctrine/ORM/Tools/Console/Command/GenerateRepositoriesCommand.php @@ -24,7 +24,8 @@ namespace Doctrine\ORM\Tools\Console\Command; use Symfony\Components\Console\Input\InputArgument, Symfony\Components\Console\Input\InputOption, Symfony\Components\Console, - Doctrine\ORM\Tools\Console\MetadataFilter; + Doctrine\ORM\Tools\Console\MetadataFilter, + Doctrine\ORM\Tools\EntityRepositoryGenerator; /** * Command to generate repository classes for mapping information. @@ -40,23 +41,6 @@ use Symfony\Components\Console\Input\InputArgument, */ class GenerateRepositoriesCommand extends Console\Command\Command { - protected static $_template = -'; - -use Doctrine\ORM\EntityRepository; - -/** - * - * - * This class was generated by the Doctrine ORM. Add your own custom - * repository methods below. - */ -class extends EntityRepository -{ -}'; - /** * @see Console\Command\Command */ @@ -105,6 +89,7 @@ EOT if (count($metadatas)) { $numRepositories = 0; + $generator = new EntityRepositoryGenerator(); foreach ($metadatas as $metadata) { if ($metadata->customRepositoryClassName) { @@ -112,7 +97,7 @@ EOT sprintf('Processing repository "%s"', $metadata->customRepositoryClassName) . PHP_EOL ); - $this->_writeRepositoryClass($metadata, $destPath); + $generator->writeEntityRepositoryClass($metadata->customRepositoryClassName, $destPath); $numRepositories++; } @@ -128,33 +113,4 @@ EOT $output->write('No Metadata Classes to process.' . PHP_EOL); } } - - protected function _generateRepositoryClass($metadata) - { - fullClassName = $metadata->customRepositoryClassName; - $namespace = substr($fullClassName, 0, strrpos($fullClassName, '\\')); - $className = substr($fullClassName, strrpos($fullClassName, '\\') + 1, strlen($fullClassName)); - - $variables = array( - '' => $namespace, - '' => $className - ); - $code = str_replace(array_keys($variables), array_values($variables), self::$_template); - return $code; - } - - protected function _writeRepositoryClass($metadata, $destPath) - { - $code = $this->_generateRepositoryClass($metadata); - - $path = $destPath . DIRECTORY_SEPARATOR - . str_replace('\\', \DIRECTORY_SEPARATOR, $metadata->customRepositoryClassName) . '.php'; - $dir = dirname($path); - - if ( ! is_dir($dir)) { - mkdir($dir, 0777, true); - } - - file_put_contents($path, $code); - } } \ No newline at end of file diff --git a/lib/Doctrine/ORM/Tools/EntityRepositoryGenerator.php b/lib/Doctrine/ORM/Tools/EntityRepositoryGenerator.php new file mode 100644 index 000000000..82c18035e --- /dev/null +++ b/lib/Doctrine/ORM/Tools/EntityRepositoryGenerator.php @@ -0,0 +1,81 @@ +. + */ + +namespace Doctrine\ORM\Tools; + +/** + * Class to generate entity repository classes + * + * @license http://www.opensource.org/licenses/lgpl-license.php LGPL + * @link www.doctrine-project.org + * @since 2.0 + * @version $Revision$ + * @author Benjamin Eberlei + * @author Guilherme Blanco + * @author Jonathan Wage + * @author Roman Borschel + */ +class EntityRepositoryGenerator +{ + protected static $_template = +'; + +use Doctrine\ORM\EntityRepository; + +/** + * + * + * This class was generated by the Doctrine ORM. Add your own custom + * repository methods below. + */ +class extends EntityRepository +{ +}'; + + public function generateEntityRepositoryClass($fullClassName) + { + $namespace = substr($fullClassName, 0, strrpos($fullClassName, '\\')); + $className = substr($fullClassName, strrpos($fullClassName, '\\') + 1, strlen($fullClassName)); + + $variables = array( + '' => $namespace, + '' => $className + ); + return str_replace(array_keys($variables), array_values($variables), self::$_template); + } + + public function writeEntityRepositoryClass($fullClassName, $outputDirectory) + { + $code = $this->generateEntityRepositoryClass($fullClassName); + + $path = $outputDirectory . DIRECTORY_SEPARATOR + . str_replace('\\', \DIRECTORY_SEPARATOR, $fullClassName) . '.php'; + $dir = dirname($path); + + if ( ! is_dir($dir)) { + mkdir($dir, 0777, true); + } + + file_put_contents($path, $code); + } +} \ No newline at end of file From 89c71138e6d0dfd5e1cf2bd8addebbadcaf9c601 Mon Sep 17 00:00:00 2001 From: "Jonathan H. Wage" Date: Wed, 14 Apr 2010 20:39:51 -0400 Subject: [PATCH 48/86] Fixing changed method names --- .../Console/Command/ConvertDoctrine1SchemaCommand.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/Doctrine/ORM/Tools/Console/Command/ConvertDoctrine1SchemaCommand.php b/lib/Doctrine/ORM/Tools/Console/Command/ConvertDoctrine1SchemaCommand.php index ae297c84f..2af1eb04b 100644 --- a/lib/Doctrine/ORM/Tools/Console/Command/ConvertDoctrine1SchemaCommand.php +++ b/lib/Doctrine/ORM/Tools/Console/Command/ConvertDoctrine1SchemaCommand.php @@ -134,16 +134,16 @@ EOT } $converter = new ConvertDoctrine1Schema($fromPaths); - $metadatas = $converter->getMetadatas(); + $metadata = $converter->getMetadata(); if ($metadatas) { $output->write(PHP_EOL); - foreach ($metadatas as $metadata) { - $output->write(sprintf('Processing entity "%s"', $metadata->name) . PHP_EOL); + foreach ($metadata as $class) { + $output->write(sprintf('Processing entity "%s"', $class->name) . PHP_EOL); } - $exporter->setMetadatas($metadatas); + $exporter->setMetadata($metadata); $exporter->export(); $output->write(PHP_EOL . sprintf( From 2f6f8587b5aa28facf432344bc6892740dcb69c1 Mon Sep 17 00:00:00 2001 From: "Jonathan H. Wage" Date: Wed, 14 Apr 2010 20:40:12 -0400 Subject: [PATCH 49/86] Fixing changed method names --- .../Tools/Console/Command/ConvertMappingCommand.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/Doctrine/ORM/Tools/Console/Command/ConvertMappingCommand.php b/lib/Doctrine/ORM/Tools/Console/Command/ConvertMappingCommand.php index c350ca045..6770e6360 100644 --- a/lib/Doctrine/ORM/Tools/Console/Command/ConvertMappingCommand.php +++ b/lib/Doctrine/ORM/Tools/Console/Command/ConvertMappingCommand.php @@ -97,8 +97,8 @@ EOT } $cmf = new DisconnectedClassMetadataFactory($em); - $metadatas = $cmf->getAllMetadata(); - $metadatas = MetadataFilter::filter($metadatas, $input->getOption('filter')); + $metadata = $cmf->getAllMetadata(); + $metadata = MetadataFilter::filter($metadata, $input->getOption('filter')); // Process destination directory if ( ! is_dir($destPath = $input->getArgument('dest-path'))) { @@ -132,12 +132,12 @@ EOT } } - if (count($metadatas)) { - foreach ($metadatas as $metadata) { - $output->write(sprintf('Processing entity "%s"', $metadata->name) . PHP_EOL); + if (count($metadata)) { + foreach ($metadata as $class) { + $output->write(sprintf('Processing entity "%s"', $class->name) . PHP_EOL); } - $exporter->setMetadatas($metadatas); + $exporter->setMetadata($metadata); $exporter->export(); $output->write(PHP_EOL . sprintf( From b2eeac564026d97647b67d7af618f8a5354f030d Mon Sep 17 00:00:00 2001 From: "Jonathan H. Wage" Date: Wed, 14 Apr 2010 20:41:41 -0400 Subject: [PATCH 50/86] Fixing strict standards notice --- lib/Doctrine/ORM/Tools/ConvertDoctrine1Schema.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/Doctrine/ORM/Tools/ConvertDoctrine1Schema.php b/lib/Doctrine/ORM/Tools/ConvertDoctrine1Schema.php index a1fd97bb1..d0eb5e9f0 100644 --- a/lib/Doctrine/ORM/Tools/ConvertDoctrine1Schema.php +++ b/lib/Doctrine/ORM/Tools/ConvertDoctrine1Schema.php @@ -41,7 +41,8 @@ class ConvertDoctrine1Schema private $_legacyTypeMap = array( // TODO: This list may need to be updated 'clob' => 'text', - 'timestamp' => 'datetime' + 'timestamp' => 'datetime', + 'enum' => 'string' ); /** @@ -238,6 +239,7 @@ class ConvertDoctrine1Schema if (isset($relation['refClass'])) { $type = 'many'; $foreignType = 'many'; + $joinColumns = array(); } else { $type = isset($relation['type']) ? $relation['type'] : 'one'; $foreignType = isset($relation['foreignType']) ? $relation['foreignType'] : 'many'; From c43740c08aa1c9b69bd1b2dd1529a6ecb7509c0e Mon Sep 17 00:00:00 2001 From: "Jonathan H. Wage" Date: Wed, 14 Apr 2010 20:42:17 -0400 Subject: [PATCH 51/86] Fixing EntityRepositoryGenerator to not generate the repository if it already exists --- lib/Doctrine/ORM/Tools/EntityRepositoryGenerator.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/Doctrine/ORM/Tools/EntityRepositoryGenerator.php b/lib/Doctrine/ORM/Tools/EntityRepositoryGenerator.php index 82c18035e..74740dbe4 100644 --- a/lib/Doctrine/ORM/Tools/EntityRepositoryGenerator.php +++ b/lib/Doctrine/ORM/Tools/EntityRepositoryGenerator.php @@ -76,6 +76,8 @@ class extends EntityRepository mkdir($dir, 0777, true); } - file_put_contents($path, $code); + if ( ! file_exists($path)) { + file_put_contents($path, $code); + } } } \ No newline at end of file From c6d784abc56699141b3b381f0a3b6bab08b71625 Mon Sep 17 00:00:00 2001 From: "Jonathan H. Wage" Date: Wed, 14 Apr 2010 20:42:39 -0400 Subject: [PATCH 52/86] Fixing ORMException --- lib/Doctrine/ORM/Tools/ToolsException.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/Doctrine/ORM/Tools/ToolsException.php b/lib/Doctrine/ORM/Tools/ToolsException.php index db13d862a..f7ed87105 100644 --- a/lib/Doctrine/ORM/Tools/ToolsException.php +++ b/lib/Doctrine/ORM/Tools/ToolsException.php @@ -2,8 +2,12 @@ namespace Doctrine\ORM\Tools; -class ToolsException extends ORMException { - public static function couldNotMapDoctrine1Type($type) { +use Doctrine\ORM\ORMException; + +class ToolsException extends ORMException +{ + public static function couldNotMapDoctrine1Type($type) + { return new self("Could not map doctrine 1 type '$type'!"); } } \ No newline at end of file From 955dc09cb92a5e31e21dc780fa71c38396113832 Mon Sep 17 00:00:00 2001 From: Guilherme Blanco Date: Wed, 14 Apr 2010 22:03:29 -0300 Subject: [PATCH 53/86] [2.0] Optimized support to IdentificationVariable in ArithmeticPrimary --- lib/Doctrine/ORM/Query/AST/PathExpression.php | 1 - lib/Doctrine/ORM/Query/Parser.php | 31 +++++++++---------- lib/Doctrine/ORM/Query/SqlWalker.php | 11 ------- 3 files changed, 15 insertions(+), 28 deletions(-) diff --git a/lib/Doctrine/ORM/Query/AST/PathExpression.php b/lib/Doctrine/ORM/Query/AST/PathExpression.php index 996d35c27..4f8d0e277 100644 --- a/lib/Doctrine/ORM/Query/AST/PathExpression.php +++ b/lib/Doctrine/ORM/Query/AST/PathExpression.php @@ -41,7 +41,6 @@ namespace Doctrine\ORM\Query\AST; */ class PathExpression extends Node { - const TYPE_IDENTIFICATION_VARIABLE = 1; const TYPE_COLLECTION_VALUED_ASSOCIATION = 2; const TYPE_SINGLE_VALUED_ASSOCIATION = 4; const TYPE_STATE_FIELD = 8; diff --git a/lib/Doctrine/ORM/Query/Parser.php b/lib/Doctrine/ORM/Query/Parser.php index 6f9e73c26..5d9766262 100644 --- a/lib/Doctrine/ORM/Query/Parser.php +++ b/lib/Doctrine/ORM/Query/Parser.php @@ -557,40 +557,44 @@ class Parser { foreach ($this->_deferredPathExpressions as $deferredItem) { $pathExpression = $deferredItem['expression']; - $parts = $pathExpression->parts; - $numParts = count($parts); $qComp = $this->_queryComponents[$pathExpression->identificationVariable]; + $numParts = count($pathExpression->parts); + if ($numParts == 0) { + $pathExpression->parts = array($qComp['metadata']->identifier[0]); + $numParts++; + } + + $parts = $pathExpression->parts; $aliasIdentificationVariable = $pathExpression->identificationVariable; $parentField = $pathExpression->identificationVariable; $class = $qComp['metadata']; - $fieldType = ($pathExpression->expectedType == AST\PathExpression::TYPE_IDENTIFICATION_VARIABLE) - ? AST\PathExpression::TYPE_IDENTIFICATION_VARIABLE : null; + $fieldType = null; $curIndex = 0; foreach ($parts as $field) { // Check if it is not in a state field if ($fieldType & AST\PathExpression::TYPE_STATE_FIELD) { $this->semanticalError( - 'Cannot navigate through state field named ' . $field . ' on ' . $parentField, - $deferredItem['token'] + 'Cannot navigate through state field named ' . $field . ' on ' . $parentField, + $deferredItem['token'] ); } // Check if it is not a collection field if ($fieldType & AST\PathExpression::TYPE_COLLECTION_VALUED_ASSOCIATION) { $this->semanticalError( - 'Cannot navigate through collection field named ' . $field . ' on ' . $parentField, - $deferredItem['token'] + 'Cannot navigate through collection field named ' . $field . ' on ' . $parentField, + $deferredItem['token'] ); } // Check if field or association exists if ( ! isset($class->associationMappings[$field]) && ! isset($class->fieldMappings[$field])) { $this->semanticalError( - 'Class ' . $class->name . ' has no field or association named ' . $field, - $deferredItem['token'] + 'Class ' . $class->name . ' has no field or association named ' . $field, + $deferredItem['token'] ); } @@ -650,11 +654,6 @@ class Parser // We need to recognize which was expected type(s) $expectedStringTypes = array(); - // Validate state field type - if ($expectedType & AST\PathExpression::TYPE_IDENTIFICATION_VARIABLE) { - $expectedStringTypes[] = 'IdentificationVariable'; - } - // Validate state field type if ($expectedType & AST\PathExpression::TYPE_STATE_FIELD) { $expectedStringTypes[] = 'StateFieldPathExpression'; @@ -2174,7 +2173,7 @@ class Parser return $this->SingleValuedPathExpression(); } - return $this->PathExpression(AST\PathExpression::TYPE_IDENTIFICATION_VARIABLE); + return $this->SimpleStateFieldPathExpression(); case Lexer::T_INPUT_PARAMETER: return $this->InputParameter(); diff --git a/lib/Doctrine/ORM/Query/SqlWalker.php b/lib/Doctrine/ORM/Query/SqlWalker.php index 25263dac5..f624798fd 100644 --- a/lib/Doctrine/ORM/Query/SqlWalker.php +++ b/lib/Doctrine/ORM/Query/SqlWalker.php @@ -446,17 +446,6 @@ class SqlWalker implements TreeWalker $sql = ''; switch ($pathExpr->type) { - case AST\PathExpression::TYPE_IDENTIFICATION_VARIABLE: - $dqlAlias = $pathExpr->identificationVariable; - $class = $this->_queryComponents[$dqlAlias]['metadata']; - - if ($this->_useSqlTableAliases) { - $sql .= $this->walkIdentificationVariable($dqlAlias) . '.'; - } - - $sql .= $class->getQuotedColumnName($class->identifier[0], $this->_platform); - break; - case AST\PathExpression::TYPE_STATE_FIELD: $parts = $pathExpr->parts; $fieldName = array_pop($parts); From c4ffd04da094a474fe5607332cf7decd6331cd67 Mon Sep 17 00:00:00 2001 From: Guilherme Blanco Date: Wed, 14 Apr 2010 22:49:53 -0300 Subject: [PATCH 54/86] [2.0][DDC-430] Added coverage, fixing the ticket. --- .../Tests/ORM/Query/SelectSqlGenerationTest.php | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/tests/Doctrine/Tests/ORM/Query/SelectSqlGenerationTest.php b/tests/Doctrine/Tests/ORM/Query/SelectSqlGenerationTest.php index 7ed9c6693..dda612152 100644 --- a/tests/Doctrine/Tests/ORM/Query/SelectSqlGenerationTest.php +++ b/tests/Doctrine/Tests/ORM/Query/SelectSqlGenerationTest.php @@ -585,4 +585,15 @@ class SelectSqlGenerationTest extends \Doctrine\Tests\OrmTestCase "SELECT c0_.name AS name0, (SELECT COUNT(c1_.phonenumber) AS dctrn__1 FROM cms_phonenumbers c1_ WHERE c1_.phonenumber = 1234) AS sclr1 FROM cms_users c0_ WHERE c0_.name = 'jon'" ); } + + /** + * DDC-430 + */ + public function testSupportSelectWithMoreThan10InputParameters() + { + $this->assertSqlGeneration( + "SELECT u FROM Doctrine\Tests\Models\CMS\CmsUser u WHERE u.id = ?1 OR u.id = ?2 OR u.id = ?3 OR u.id = ?4 OR u.id = ?5 OR u.id = ?6 OR u.id = ?7 OR u.id = ?8 OR u.id = ?9 OR u.id = ?10 OR u.id = ?11", + "SELECT c0_.id AS id0, c0_.status AS status1, c0_.username AS username2, c0_.name AS name3 FROM cms_users c0_ WHERE c0_.id = ? OR c0_.id = ? OR c0_.id = ? OR c0_.id = ? OR c0_.id = ? OR c0_.id = ? OR c0_.id = ? OR c0_.id = ? OR c0_.id = ? OR c0_.id = ? OR c0_.id = ?" + ); + } } From 26ff265652bc4824ff585b9915c3a5bcb2d82b30 Mon Sep 17 00:00:00 2001 From: Guilherme Blanco Date: Wed, 14 Apr 2010 23:27:33 -0300 Subject: [PATCH 55/86] [2.0][DDC-431] Added coverage, fixing the ticket. --- lib/Doctrine/ORM/Configuration.php | 42 ++++++++++++++++- .../ORM/Query/SelectSqlGenerationTest.php | 47 +++++++++++++++++++ 2 files changed, 88 insertions(+), 1 deletion(-) diff --git a/lib/Doctrine/ORM/Configuration.php b/lib/Doctrine/ORM/Configuration.php index 609bbfcd1..229126635 100644 --- a/lib/Doctrine/ORM/Configuration.php +++ b/lib/Doctrine/ORM/Configuration.php @@ -50,7 +50,14 @@ class Configuration extends \Doctrine\DBAL\Configuration 'proxyDir' => null, 'useCExtension' => false, 'autoGenerateProxyClasses' => true, - 'proxyNamespace' => null + 'proxyNamespace' => null, + 'entityNamespaces' => array(), + 'namedNativeQueries' => array(), + 'namedQueries' => array(), + // Custom DQL Functions + 'customDatetimeFunctions' => array(), + 'customNumericFunctions' => array(), + 'customStringFunctions' => array() )); } @@ -366,10 +373,21 @@ class Configuration extends \Doctrine\DBAL\Configuration */ public function getCustomStringFunction($name) { + $name = strtolower($name); + return isset($this->_attributes['customStringFunctions'][$name]) ? $this->_attributes['customStringFunctions'][$name] : null; } + /** + * Clean custom DQL functions that produces string values. + * + */ + public function clearCustomStringFunctions() + { + $this->_attributes['customStringFunctions'] = array(); + } + /** * Registers a custom DQL function that produces a numeric value. * Such a function can then be used in any DQL statement in any place where numeric @@ -391,10 +409,21 @@ class Configuration extends \Doctrine\DBAL\Configuration */ public function getCustomNumericFunction($name) { + $name = strtolower($name); + return isset($this->_attributes['customNumericFunctions'][$name]) ? $this->_attributes['customNumericFunctions'][$name] : null; } + /** + * Clean custom DQL functions that produces numeric values. + * + */ + public function clearCustomNumericFunctions() + { + $this->_attributes['customNumericFunctions'] = array(); + } + /** * Registers a custom DQL function that produces a date/time value. * Such a function can then be used in any DQL statement in any place where date/time @@ -416,7 +445,18 @@ class Configuration extends \Doctrine\DBAL\Configuration */ public function getCustomDatetimeFunction($name) { + $name = strtolower($name); + return isset($this->_attributes['customDatetimeFunctions'][$name]) ? $this->_attributes['customDatetimeFunctions'][$name] : null; } + + /** + * Clean custom DQL functions that produces date/time values. + * + */ + public function clearCustomDatetimeFunctions() + { + $this->_attributes['customDatetimeFunctions'] = array(); + } } \ No newline at end of file diff --git a/tests/Doctrine/Tests/ORM/Query/SelectSqlGenerationTest.php b/tests/Doctrine/Tests/ORM/Query/SelectSqlGenerationTest.php index dda612152..1ef832571 100644 --- a/tests/Doctrine/Tests/ORM/Query/SelectSqlGenerationTest.php +++ b/tests/Doctrine/Tests/ORM/Query/SelectSqlGenerationTest.php @@ -596,4 +596,51 @@ class SelectSqlGenerationTest extends \Doctrine\Tests\OrmTestCase "SELECT c0_.id AS id0, c0_.status AS status1, c0_.username AS username2, c0_.name AS name3 FROM cms_users c0_ WHERE c0_.id = ? OR c0_.id = ? OR c0_.id = ? OR c0_.id = ? OR c0_.id = ? OR c0_.id = ? OR c0_.id = ? OR c0_.id = ? OR c0_.id = ? OR c0_.id = ? OR c0_.id = ?" ); } + + /** + * DDC-431 + */ + public function testSupportToCustomDQLFunctions() + { + $config = $this->_em->getConfiguration(); + $config->addCustomNumericFunction('MYABS', 'Doctrine\Tests\ORM\Query\MyAbsFunction'); + + $this->assertSqlGeneration( + 'SELECT MYABS(p.phonenumber) FROM Doctrine\Tests\Models\CMS\CmsPhonenumber p', + 'SELECT ABS(c0_.phonenumber) AS sclr0 FROM cms_phonenumbers c0_' + ); + + $config->clearCustomNumericFunctions(); + } } + + +class MyAbsFunction extends \Doctrine\ORM\Query\AST\Functions\FunctionNode +{ + public $simpleArithmeticExpression; + + /** + * @override + */ + public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker) + { + return 'ABS(' . $sqlWalker->walkSimpleArithmeticExpression( + $this->simpleArithmeticExpression + ) . ')'; + } + + /** + * @override + */ + public function parse(\Doctrine\ORM\Query\Parser $parser) + { + $lexer = $parser->getLexer(); + + $parser->match(\Doctrine\ORM\Query\Lexer::T_IDENTIFIER); + $parser->match(\Doctrine\ORM\Query\Lexer::T_OPEN_PARENTHESIS); + + $this->simpleArithmeticExpression = $parser->SimpleArithmeticExpression(); + + $parser->match(\Doctrine\ORM\Query\Lexer::T_CLOSE_PARENTHESIS); + } +} \ No newline at end of file From e83bfeede34351e44eb18f43dbf1865918eb3b8c Mon Sep 17 00:00:00 2001 From: "Roman S. Borschel" Date: Thu, 15 Apr 2010 11:55:03 +0200 Subject: [PATCH 56/86] Simplified and streamlined configuration classes. --- lib/Doctrine/DBAL/Configuration.php | 19 +--- lib/Doctrine/ORM/Configuration.php | 96 +++++++++---------- .../ORM/Query/SelectSqlGenerationTest.php | 2 +- 3 files changed, 50 insertions(+), 67 deletions(-) diff --git a/lib/Doctrine/DBAL/Configuration.php b/lib/Doctrine/DBAL/Configuration.php index 3ad9e36a0..dfda73240 100644 --- a/lib/Doctrine/DBAL/Configuration.php +++ b/lib/Doctrine/DBAL/Configuration.php @@ -1,7 +1,5 @@ _attributes = array( - 'sqlLogger' => null - ); - } - /** * Sets the SQL logger to use. Defaults to NULL which means SQL logging is disabled. * * @param SQLLogger $logger */ - public function setSQLLogger($logger) + public function setSQLLogger(SqlLogger $logger) { $this->_attributes['sqlLogger'] = $logger; } @@ -73,6 +61,7 @@ class Configuration */ public function getSQLLogger() { - return $this->_attributes['sqlLogger']; + return isset($this->_attributes['sqlLogger']) ? + $this->_attributes['sqlLogger'] : null; } } \ No newline at end of file diff --git a/lib/Doctrine/ORM/Configuration.php b/lib/Doctrine/ORM/Configuration.php index 229126635..abb8a15d8 100644 --- a/lib/Doctrine/ORM/Configuration.php +++ b/lib/Doctrine/ORM/Configuration.php @@ -27,8 +27,7 @@ use Doctrine\Common\Cache\Cache, * It combines all configuration options from DBAL & ORM. * * @since 2.0 - * @internal When adding a new configuration option just write a getter/setter - * pair and add the option to the _attributes array with a proper default value. + * @internal When adding a new configuration option just write a getter/setter pair. * @author Benjamin Eberlei * @author Guilherme Blanco * @author Jonathan Wage @@ -36,31 +35,6 @@ use Doctrine\Common\Cache\Cache, */ class Configuration extends \Doctrine\DBAL\Configuration { - /** - * Creates a new configuration that can be used for Doctrine. - */ - public function __construct() - { - parent::__construct(); - $this->_attributes = array_merge($this->_attributes, array( - 'resultCacheImpl' => null, - 'queryCacheImpl' => null, - 'metadataCacheImpl' => null, - 'metadataDriverImpl' => null, - 'proxyDir' => null, - 'useCExtension' => false, - 'autoGenerateProxyClasses' => true, - 'proxyNamespace' => null, - 'entityNamespaces' => array(), - 'namedNativeQueries' => array(), - 'namedQueries' => array(), - // Custom DQL Functions - 'customDatetimeFunctions' => array(), - 'customNumericFunctions' => array(), - 'customStringFunctions' => array() - )); - } - /** * Sets the directory where Doctrine generates any necessary proxy class files. * @@ -78,7 +52,8 @@ class Configuration extends \Doctrine\DBAL\Configuration */ public function getProxyDir() { - return $this->_attributes['proxyDir']; + return isset($this->_attributes['proxyDir']) ? + $this->_attributes['proxyDir'] : null; } /** @@ -89,7 +64,8 @@ class Configuration extends \Doctrine\DBAL\Configuration */ public function getAutoGenerateProxyClasses() { - return $this->_attributes['autoGenerateProxyClasses']; + return isset($this->_attributes['autoGenerateProxyClasses']) ? + $this->_attributes['autoGenerateProxyClasses'] : true; } /** @@ -110,7 +86,8 @@ class Configuration extends \Doctrine\DBAL\Configuration */ public function getProxyNamespace() { - return $this->_attributes['proxyNamespace']; + return isset($this->_attributes['proxyNamespace']) ? + $this->_attributes['proxyNamespace'] : null; } /** @@ -195,7 +172,8 @@ class Configuration extends \Doctrine\DBAL\Configuration */ public function getMetadataDriverImpl() { - return $this->_attributes['metadataDriverImpl']; + return isset($this->_attributes['metadataDriverImpl']) ? + $this->_attributes['metadataDriverImpl'] : null; } /** @@ -205,7 +183,8 @@ class Configuration extends \Doctrine\DBAL\Configuration */ public function getResultCacheImpl() { - return $this->_attributes['resultCacheImpl']; + return isset($this->_attributes['resultCacheImpl']) ? + $this->_attributes['resultCacheImpl'] : null; } /** @@ -225,7 +204,8 @@ class Configuration extends \Doctrine\DBAL\Configuration */ public function getQueryCacheImpl() { - return $this->_attributes['queryCacheImpl']; + return isset($this->_attributes['queryCacheImpl']) ? + $this->_attributes['queryCacheImpl'] : null; } /** @@ -245,7 +225,8 @@ class Configuration extends \Doctrine\DBAL\Configuration */ public function getMetadataCacheImpl() { - return $this->_attributes['metadataCacheImpl']; + return isset($this->_attributes['metadataCacheImpl']) ? + $this->_attributes['metadataCacheImpl'] : null; } /** @@ -266,7 +247,8 @@ class Configuration extends \Doctrine\DBAL\Configuration */ public function getUseCExtension() { - return $this->_attributes['useCExtension']; + return isset($this->_attributes['useCExtension']) ? + $this->_attributes['useCExtension'] : false; } /** @@ -373,19 +355,23 @@ class Configuration extends \Doctrine\DBAL\Configuration */ public function getCustomStringFunction($name) { - $name = strtolower($name); - return isset($this->_attributes['customStringFunctions'][$name]) ? $this->_attributes['customStringFunctions'][$name] : null; } /** - * Clean custom DQL functions that produces string values. + * Sets a map of custom DQL string functions. * + * Keys must be function names and values the FQCN of the implementing class. + * The function names will be case-insensitive in DQL. + * + * Any previously added string functions are discarded. + * + * @param array $functions The map of custom DQL string functions. */ - public function clearCustomStringFunctions() + public function setCustomStringFunctions(array $functions) { - $this->_attributes['customStringFunctions'] = array(); + $this->_attributes['customStringFunctions'] = $functions; } /** @@ -409,19 +395,23 @@ class Configuration extends \Doctrine\DBAL\Configuration */ public function getCustomNumericFunction($name) { - $name = strtolower($name); - return isset($this->_attributes['customNumericFunctions'][$name]) ? $this->_attributes['customNumericFunctions'][$name] : null; } /** - * Clean custom DQL functions that produces numeric values. + * Sets a map of custom DQL numeric functions. * + * Keys must be function names and values the FQCN of the implementing class. + * The function names will be case-insensitive in DQL. + * + * Any previously added numeric functions are discarded. + * + * @param array $functions The map of custom DQL numeric functions. */ - public function clearCustomNumericFunctions() + public function setCustomNumericFunctions(array $functions) { - $this->_attributes['customNumericFunctions'] = array(); + $this->_attributes['customNumericFunctions'] = $functions; } /** @@ -445,18 +435,22 @@ class Configuration extends \Doctrine\DBAL\Configuration */ public function getCustomDatetimeFunction($name) { - $name = strtolower($name); - return isset($this->_attributes['customDatetimeFunctions'][$name]) ? $this->_attributes['customDatetimeFunctions'][$name] : null; } /** - * Clean custom DQL functions that produces date/time values. - * + * Sets a map of custom DQL date/time functions. + * + * Keys must be function names and values the FQCN of the implementing class. + * The function names will be case-insensitive in DQL. + * + * Any previously added date/time functions are discarded. + * + * @param array $functions The map of custom DQL date/time functions. */ - public function clearCustomDatetimeFunctions() + public function setCustomDatetimeFunctions(array $functions) { - $this->_attributes['customDatetimeFunctions'] = array(); + $this->_attributes['customDatetimeFunctions'] = $functions; } } \ No newline at end of file diff --git a/tests/Doctrine/Tests/ORM/Query/SelectSqlGenerationTest.php b/tests/Doctrine/Tests/ORM/Query/SelectSqlGenerationTest.php index 1ef832571..a85873a92 100644 --- a/tests/Doctrine/Tests/ORM/Query/SelectSqlGenerationTest.php +++ b/tests/Doctrine/Tests/ORM/Query/SelectSqlGenerationTest.php @@ -610,7 +610,7 @@ class SelectSqlGenerationTest extends \Doctrine\Tests\OrmTestCase 'SELECT ABS(c0_.phonenumber) AS sclr0 FROM cms_phonenumbers c0_' ); - $config->clearCustomNumericFunctions(); + $config->setCustomNumericFunctions(array()); } } From 29e0863ffa13b5a6fe122b900ebebaecc9e67a92 Mon Sep 17 00:00:00 2001 From: "Roman S. Borschel" Date: Thu, 15 Apr 2010 12:41:34 +0200 Subject: [PATCH 57/86] Fixed casing. --- lib/Doctrine/DBAL/Configuration.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/Doctrine/DBAL/Configuration.php b/lib/Doctrine/DBAL/Configuration.php index dfda73240..1ef539b90 100644 --- a/lib/Doctrine/DBAL/Configuration.php +++ b/lib/Doctrine/DBAL/Configuration.php @@ -19,7 +19,7 @@ namespace Doctrine\DBAL; -use Doctrine\DBAL\Logging\SqlLogger; +use Doctrine\DBAL\Logging\SQLLogger; /** * Configuration container for the Doctrine DBAL. @@ -49,7 +49,7 @@ class Configuration * * @param SQLLogger $logger */ - public function setSQLLogger(SqlLogger $logger) + public function setSQLLogger(SQLLogger $logger) { $this->_attributes['sqlLogger'] = $logger; } From 01c2c06bbf529d89c9741ea97702359509ea230a Mon Sep 17 00:00:00 2001 From: "Roman S. Borschel" Date: Thu, 15 Apr 2010 18:36:17 +0200 Subject: [PATCH 58/86] [DDC-512] Fixed. --- lib/Doctrine/DBAL/Configuration.php | 3 - .../ORM/Persisters/SingleTablePersister.php | 1 - lib/Doctrine/ORM/Query/AST/PathExpression.php | 5 - lib/Doctrine/ORM/Query/Parser.php | 5 - lib/Doctrine/ORM/Query/SqlWalker.php | 16 ++-- .../Tests/Models/Company/CompanyEvent.php | 4 +- .../Functional/ClassTableInheritanceTest.php | 1 - .../ORM/Functional/Ticket/DDC512Test.php | 94 +++++++++++++++++++ 8 files changed, 103 insertions(+), 26 deletions(-) create mode 100644 tests/Doctrine/Tests/ORM/Functional/Ticket/DDC512Test.php diff --git a/lib/Doctrine/DBAL/Configuration.php b/lib/Doctrine/DBAL/Configuration.php index 1ef539b90..76ce1c4f0 100644 --- a/lib/Doctrine/DBAL/Configuration.php +++ b/lib/Doctrine/DBAL/Configuration.php @@ -24,10 +24,7 @@ use Doctrine\DBAL\Logging\SQLLogger; /** * Configuration container for the Doctrine DBAL. * - * @license http://www.opensource.org/licenses/lgpl-license.php LGPL - * @link www.doctrine-project.org * @since 2.0 - * @version $Revision: 3938 $ * @author Guilherme Blanco * @author Jonathan Wage * @author Roman Borschel diff --git a/lib/Doctrine/ORM/Persisters/SingleTablePersister.php b/lib/Doctrine/ORM/Persisters/SingleTablePersister.php index a0adbea67..5f5a8a4d7 100644 --- a/lib/Doctrine/ORM/Persisters/SingleTablePersister.php +++ b/lib/Doctrine/ORM/Persisters/SingleTablePersister.php @@ -26,7 +26,6 @@ use Doctrine\ORM\Mapping\ClassMetadata; * SINGLE_TABLE strategy. * * @author Roman Borschel - * @license http://www.opensource.org/licenses/lgpl-license.php LGPL * @since 2.0 * @link http://martinfowler.com/eaaCatalog/singleTableInheritance.html */ diff --git a/lib/Doctrine/ORM/Query/AST/PathExpression.php b/lib/Doctrine/ORM/Query/AST/PathExpression.php index 4f8d0e277..ed856f679 100644 --- a/lib/Doctrine/ORM/Query/AST/PathExpression.php +++ b/lib/Doctrine/ORM/Query/AST/PathExpression.php @@ -1,7 +1,5 @@ * @author Jonathan Wage * @author Roman Borschel diff --git a/lib/Doctrine/ORM/Query/Parser.php b/lib/Doctrine/ORM/Query/Parser.php index 5d9766262..645cb5ae0 100644 --- a/lib/Doctrine/ORM/Query/Parser.php +++ b/lib/Doctrine/ORM/Query/Parser.php @@ -1,7 +1,5 @@ * @author Jonathan Wage * @author Roman Borschel diff --git a/lib/Doctrine/ORM/Query/SqlWalker.php b/lib/Doctrine/ORM/Query/SqlWalker.php index f624798fd..0b71b82bf 100644 --- a/lib/Doctrine/ORM/Query/SqlWalker.php +++ b/lib/Doctrine/ORM/Query/SqlWalker.php @@ -1,7 +1,5 @@ getSqlTableAlias($class->table['name'], $dqlAlias); + $baseTableAlias = $this->getSQLTableAlias($class->table['name'], $dqlAlias); // INNER JOIN parent class tables foreach ($class->parentClasses as $parentClassName) { $parentClass = $this->_em->getClassMetadata($parentClassName); - $tableAlias = $this->getSqlTableAlias($parentClass->table['name'], $dqlAlias); - $sql .= ' INNER JOIN ' . $parentClass->getQuotedTableName($this->_platform) + $tableAlias = $this->getSQLTableAlias($parentClass->table['name'], $dqlAlias); + // If this is a joined association we must use left joins to preserve the correct result. + $sql .= isset($this->_queryComponents[$dqlAlias]['relation']) ? ' LEFT ' : ' INNER '; + $sql .= 'JOIN ' . $parentClass->getQuotedTableName($this->_platform) . ' ' . $tableAlias . ' ON '; $first = true; - foreach ($class->identifier as $idField) { if ($first) $first = false; else $sql .= ' AND '; @@ -260,14 +259,13 @@ class SqlWalker implements TreeWalker } } - // LEFT JOIN subclass tables, if partial objects disallowed + // LEFT JOIN subclass tables, if partial objects disallowed. if ( ! $this->_query->getHint(Query::HINT_FORCE_PARTIAL_LOAD)) { foreach ($class->subClasses as $subClassName) { $subClass = $this->_em->getClassMetadata($subClassName); - $tableAlias = $this->getSqlTableAlias($subClass->table['name'], $dqlAlias); + $tableAlias = $this->getSQLTableAlias($subClass->table['name'], $dqlAlias); $sql .= ' LEFT JOIN ' . $subClass->getQuotedTableName($this->_platform) . ' ' . $tableAlias . ' ON '; - $first = true; foreach ($class->identifier as $idField) { if ($first) $first = false; else $sql .= ' AND '; diff --git a/tests/Doctrine/Tests/Models/Company/CompanyEvent.php b/tests/Doctrine/Tests/Models/Company/CompanyEvent.php index f0bb730cf..2db4986ae 100644 --- a/tests/Doctrine/Tests/Models/Company/CompanyEvent.php +++ b/tests/Doctrine/Tests/Models/Company/CompanyEvent.php @@ -6,9 +6,9 @@ namespace Doctrine\Tests\Models\Company; * @Entity @Table(name="company_events") * @InheritanceType("JOINED") * @DiscriminatorColumn(name="event_type", type="string") - * @DiscriminatorMap({"auction" = "CompanyAuction", "raffle" = "CompanyRaffle"}) + * @DiscriminatorMap({"auction"="CompanyAuction", "raffle"="CompanyRaffle"}) */ -class CompanyEvent { +abstract class CompanyEvent { /** * @Id @Column(type="integer") * @GeneratedValue diff --git a/tests/Doctrine/Tests/ORM/Functional/ClassTableInheritanceTest.php b/tests/Doctrine/Tests/ORM/Functional/ClassTableInheritanceTest.php index 206a567b6..ea1ad15d8 100644 --- a/tests/Doctrine/Tests/ORM/Functional/ClassTableInheritanceTest.php +++ b/tests/Doctrine/Tests/ORM/Functional/ClassTableInheritanceTest.php @@ -294,5 +294,4 @@ class ClassTableInheritanceTest extends \Doctrine\Tests\OrmFunctionalTestCase ->getResult()) > 0); } - } diff --git a/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC512Test.php b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC512Test.php new file mode 100644 index 000000000..72b11aaab --- /dev/null +++ b/tests/Doctrine/Tests/ORM/Functional/Ticket/DDC512Test.php @@ -0,0 +1,94 @@ +_schemaTool->createSchema(array( + $this->_em->getClassMetadata(__NAMESPACE__ . '\DDC512Customer'), + $this->_em->getClassMetadata(__NAMESPACE__ . '\DDC512OfferItem'), + $this->_em->getClassMetadata(__NAMESPACE__ . '\DDC512Item'), + )); + } + + public function testIssue() + { + $customer1 = new DDC512Customer(); + $item = new DDC512OfferItem(); + $customer1->item = $item; + $this->_em->persist($customer1); + + $customer2 = new DDC512Customer(); + $this->_em->persist($customer2); + + $this->_em->flush(); + $this->_em->clear(); + + $q = $this->_em->createQuery("select u,i from ".__NAMESPACE__."\\DDC512Customer u left join u.item i"); + $result = $q->getResult(); + + $this->assertEquals(2, count($result)); + $this->assertTrue($result[0] instanceof DDC512Customer); + $this->assertTrue($result[1] instanceof DDC512Customer); + if ($result[0]->id == $customer1->id) { + $this->assertTrue($result[0]->item instanceof DDC512OfferItem); + $this->assertEquals($item->id, $result[0]->item->id); + $this->assertNull($result[1]->item); + } else { + $this->assertTrue($result[1]->item instanceof DDC512OfferItem); + $this->assertNull($result[0]->item); + } + } +} + +/** + * @Entity + */ +class DDC512Customer { + /** + * @Id + * @Column(type="integer") + * @GeneratedValue(strategy="AUTO") + */ + public $id; + + /** + * NOTE that we can currently not name the join column the same as the field + * (item = item), this currently confuses Doctrine. + * + * @OneToOne(targetEntity="DDC512OfferItem", cascade={"remove","persist"}) + * @JoinColumn(name="item_id", referencedColumnName="id") + */ + public $item; +} + +/** + * @Entity + */ +class DDC512OfferItem extends DDC512Item +{ +} + +/** + * @Entity + * @InheritanceType("JOINED") + * @DiscriminatorColumn(name="discr", type="string") + * @DiscriminatorMap({"item" = "DDC512Item", "offerItem" = "DDC512OfferItem"}) + */ +class DDC512Item +{ + /** + * @Id + * @Column(type="integer") + * @GeneratedValue(strategy="AUTO") + */ + public $id; +} + + + + From 4b39705cd460f8db7f5ad2ecc08eb6b38fda57ab Mon Sep 17 00:00:00 2001 From: "Roman S. Borschel" Date: Thu, 15 Apr 2010 20:14:03 +0200 Subject: [PATCH 59/86] Fixed case-sensitivity of custom DQL functions. --- lib/Doctrine/ORM/Configuration.php | 15 ++++++++++++--- lib/Doctrine/ORM/Query/Parser.php | 21 ++++++++++++--------- 2 files changed, 24 insertions(+), 12 deletions(-) diff --git a/lib/Doctrine/ORM/Configuration.php b/lib/Doctrine/ORM/Configuration.php index abb8a15d8..b6fa3a99e 100644 --- a/lib/Doctrine/ORM/Configuration.php +++ b/lib/Doctrine/ORM/Configuration.php @@ -339,6 +339,8 @@ class Configuration extends \Doctrine\DBAL\Configuration * Such a function can then be used in any DQL statement in any place where string * functions are allowed. * + * DQL function names are case-insensitive. + * * @param string $name * @param string $className */ @@ -355,6 +357,7 @@ class Configuration extends \Doctrine\DBAL\Configuration */ public function getCustomStringFunction($name) { + $name = strtolower($name); return isset($this->_attributes['customStringFunctions'][$name]) ? $this->_attributes['customStringFunctions'][$name] : null; } @@ -371,7 +374,7 @@ class Configuration extends \Doctrine\DBAL\Configuration */ public function setCustomStringFunctions(array $functions) { - $this->_attributes['customStringFunctions'] = $functions; + $this->_attributes['customStringFunctions'] = array_change_key_case($functions); } /** @@ -379,6 +382,8 @@ class Configuration extends \Doctrine\DBAL\Configuration * Such a function can then be used in any DQL statement in any place where numeric * functions are allowed. * + * DQL function names are case-insensitive. + * * @param string $name * @param string $className */ @@ -395,6 +400,7 @@ class Configuration extends \Doctrine\DBAL\Configuration */ public function getCustomNumericFunction($name) { + $name = strtolower($name); return isset($this->_attributes['customNumericFunctions'][$name]) ? $this->_attributes['customNumericFunctions'][$name] : null; } @@ -411,7 +417,7 @@ class Configuration extends \Doctrine\DBAL\Configuration */ public function setCustomNumericFunctions(array $functions) { - $this->_attributes['customNumericFunctions'] = $functions; + $this->_attributes['customNumericFunctions'] = array_change_key_case($functions); } /** @@ -419,6 +425,8 @@ class Configuration extends \Doctrine\DBAL\Configuration * Such a function can then be used in any DQL statement in any place where date/time * functions are allowed. * + * DQL function names are case-insensitive. + * * @param string $name * @param string $className */ @@ -435,6 +443,7 @@ class Configuration extends \Doctrine\DBAL\Configuration */ public function getCustomDatetimeFunction($name) { + $name = strtolower($name); return isset($this->_attributes['customDatetimeFunctions'][$name]) ? $this->_attributes['customDatetimeFunctions'][$name] : null; } @@ -451,6 +460,6 @@ class Configuration extends \Doctrine\DBAL\Configuration */ public function setCustomDatetimeFunctions(array $functions) { - $this->_attributes['customDatetimeFunctions'] = $functions; + $this->_attributes['customDatetimeFunctions'] = array_change_key_case($functions); } } \ No newline at end of file diff --git a/lib/Doctrine/ORM/Query/Parser.php b/lib/Doctrine/ORM/Query/Parser.php index 645cb5ae0..960ae426d 100644 --- a/lib/Doctrine/ORM/Query/Parser.php +++ b/lib/Doctrine/ORM/Query/Parser.php @@ -2619,9 +2619,10 @@ class Parser public function CustomFunctionsReturningNumerics() { - $funcNameLower = strtolower($this->_lexer->lookahead['value']); - $funcClass = $this->_em->getConfiguration()->getCustomNumericFunction($funcNameLower); - $function = new $funcClass($funcNameLower); + $funcName = strtolower($this->_lexer->lookahead['value']); + // getCustomNumericFunction is case-insensitive + $funcClass = $this->_em->getConfiguration()->getCustomNumericFunction($funcName); + $function = new $funcClass($funcName); $function->parse($this); return $function; @@ -2642,9 +2643,10 @@ class Parser public function CustomFunctionsReturningDatetime() { - $funcNameLower = strtolower($this->_lexer->lookahead['value']); - $funcClass = $this->_em->getConfiguration()->getCustomDatetimeFunction($funcNameLower); - $function = new $funcClass($funcNameLower); + $funcName = $this->_lexer->lookahead['value']; + // getCustomDatetimeFunction is case-insensitive + $funcClass = $this->_em->getConfiguration()->getCustomDatetimeFunction($funcName); + $function = new $funcClass($funcName); $function->parse($this); return $function; @@ -2670,9 +2672,10 @@ class Parser public function CustomFunctionsReturningStrings() { - $funcNameLower = strtolower($this->_lexer->lookahead['value']); - $funcClass = $this->_em->getConfiguration()->getCustomStringFunction($funcNameLower); - $function = new $funcClass($funcNameLower); + $funcName = $this->_lexer->lookahead['value']; + // getCustomStringFunction is case-insensitive + $funcClass = $this->_em->getConfiguration()->getCustomStringFunction($funcName); + $function = new $funcClass($funcName); $function->parse($this); return $function; From 59f3fe3a40c3e556d17996210236c49da76c06ae Mon Sep 17 00:00:00 2001 From: "Jonathan H. Wage" Date: Fri, 16 Apr 2010 13:20:46 -0400 Subject: [PATCH 60/86] Fixing code style issue --- .../ORM/Tools/Console/Command/GenerateEntitiesCommand.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Doctrine/ORM/Tools/Console/Command/GenerateEntitiesCommand.php b/lib/Doctrine/ORM/Tools/Console/Command/GenerateEntitiesCommand.php index ccb29cf14..7565442ca 100644 --- a/lib/Doctrine/ORM/Tools/Console/Command/GenerateEntitiesCommand.php +++ b/lib/Doctrine/ORM/Tools/Console/Command/GenerateEntitiesCommand.php @@ -113,7 +113,7 @@ EOT ); } - if ( count($metadatas)) { + if (count($metadatas)) { // Create EntityGenerator $entityGenerator = new EntityGenerator(); From efb33a8365b064c8c2d687dd8b23b907af71aebd Mon Sep 17 00:00:00 2001 From: "Jonathan H. Wage" Date: Fri, 16 Apr 2010 13:21:16 -0400 Subject: [PATCH 61/86] Merging some fixes to Symfony Console component --- .../Components/Console/Application.php | 2 +- .../Components/Console/Command/Command.php | 26 +++++++++++++++++-- .../Components/Console/Input/ArgvInput.php | 2 +- 3 files changed, 26 insertions(+), 4 deletions(-) diff --git a/lib/vendor/Symfony/Components/Console/Application.php b/lib/vendor/Symfony/Components/Console/Application.php index e26319be7..929bc6bc0 100644 --- a/lib/vendor/Symfony/Components/Console/Application.php +++ b/lib/vendor/Symfony/Components/Console/Application.php @@ -488,7 +488,7 @@ class Application { // namespace $namespace = ''; - if (false !== $pos = strpos($name, ':')) + if (false !== $pos = strrpos($name, ':')) { $namespace = $this->findNamespace(substr($name, 0, $pos)); $name = substr($name, $pos + 1); diff --git a/lib/vendor/Symfony/Components/Console/Command/Command.php b/lib/vendor/Symfony/Components/Console/Command/Command.php index bbde5f94e..b0e3d863a 100644 --- a/lib/vendor/Symfony/Components/Console/Command/Command.php +++ b/lib/vendor/Symfony/Components/Console/Command/Command.php @@ -276,7 +276,7 @@ class Command */ public function setName($name) { - if (false !== $pos = strpos($name, ':')) + if (false !== $pos = strrpos($name, ':')) { $namespace = substr($name, 0, $pos); $name = substr($name, $pos + 1); @@ -375,6 +375,28 @@ class Command return $this->help; } + /** + * Returns the processed help for the command replacing the %command.name% and + * %command.full_name% patterns with the real values dynamically. + * + * @return string The processed help for the command + */ + public function getProcessedHelp() + { + $name = $this->namespace.':'.$this->name; + + $placeholders = array( + '%command.name%', + '%command.full_name%' + ); + $replacements = array( + $name, + $_SERVER['PHP_SELF'].' '.$name + ); + + return str_replace($placeholders, $replacements, $this->getHelp()); + } + /** * Sets the aliases for the command. * @@ -457,7 +479,7 @@ class Command $messages[] = $this->definition->asText(); - if ($help = $this->getHelp()) + if ($help = $this->getProcessedHelp()) { $messages[] = 'Help:'; $messages[] = ' '.implode("\n ", explode("\n", $help))."\n"; diff --git a/lib/vendor/Symfony/Components/Console/Input/ArgvInput.php b/lib/vendor/Symfony/Components/Console/Input/ArgvInput.php index a140219bf..7a78003f7 100644 --- a/lib/vendor/Symfony/Components/Console/Input/ArgvInput.php +++ b/lib/vendor/Symfony/Components/Console/Input/ArgvInput.php @@ -70,7 +70,7 @@ class ArgvInput extends Input protected function parse() { $this->parsed = $this->tokens; - while ($token = array_shift($this->parsed)) + while (null !== ($token = array_shift($this->parsed))) { if ('--' === substr($token, 0, 2)) { From aa70e6426dcc5e93bfcd20529a32fd211523b6cc Mon Sep 17 00:00:00 2001 From: "Jonathan H. Wage" Date: Fri, 16 Apr 2010 13:23:07 -0400 Subject: [PATCH 62/86] Fixing Console helpers to not override the default helpers provided --- tools/sandbox/cli-config.php | 4 ++-- tools/sandbox/doctrine.php | 5 ++++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/tools/sandbox/cli-config.php b/tools/sandbox/cli-config.php index 5c69499b0..afe1296e6 100644 --- a/tools/sandbox/cli-config.php +++ b/tools/sandbox/cli-config.php @@ -23,7 +23,7 @@ $connectionOptions = array( $em = \Doctrine\ORM\EntityManager::create($connectionOptions, $config); -$helperSet = new \Symfony\Components\Console\Helper\HelperSet(array( +$helpers = array( 'db' => new \Doctrine\DBAL\Tools\Console\Helper\ConnectionHelper($em->getConnection()), 'em' => new \Doctrine\ORM\Tools\Console\Helper\EntityManagerHelper($em) -)); \ No newline at end of file +); \ No newline at end of file diff --git a/tools/sandbox/doctrine.php b/tools/sandbox/doctrine.php index 152a9932e..3b4a856de 100644 --- a/tools/sandbox/doctrine.php +++ b/tools/sandbox/doctrine.php @@ -13,7 +13,10 @@ require __DIR__ . '/cli-config.php'; $cli = new \Symfony\Components\Console\Application('Doctrine Command Line Interface', Doctrine\Common\Version::VERSION); $cli->setCatchExceptions(true); -$cli->setHelperSet($helperSet); +$helperSet = $cli->getHelperSet(); +foreach ($helpers as $name => $helper) { + $helperSet->set($helper, $name); +} $cli->addCommands(array( // DBAL Commands new \Doctrine\DBAL\Tools\Console\Command\RunSqlCommand(), From fab5ef84298172ea5cca2251157363ae5f66f14d Mon Sep 17 00:00:00 2001 From: Benjamin Eberlei Date: Sat, 17 Apr 2010 08:47:40 +0200 Subject: [PATCH 63/86] DDC-515 - First version of a validate mapping command --- .../Console/Command/ValidateSchemaCommand.php | 78 +++++++++++++++++++ 1 file changed, 78 insertions(+) create mode 100644 lib/Doctrine/ORM/Tools/Console/Command/ValidateSchemaCommand.php diff --git a/lib/Doctrine/ORM/Tools/Console/Command/ValidateSchemaCommand.php b/lib/Doctrine/ORM/Tools/Console/Command/ValidateSchemaCommand.php new file mode 100644 index 000000000..f3053e08a --- /dev/null +++ b/lib/Doctrine/ORM/Tools/Console/Command/ValidateSchemaCommand.php @@ -0,0 +1,78 @@ +. +*/ + +namespace Doctrine\ORM\Tools\Console\Command; + +use Symfony\Components\Console\Input\InputArgument, + Symfony\Components\Console\Input\InputOption, + Symfony\Components\Console; + +/** + * Validate that the current mapping is valid + * + * @license http://www.opensource.org/licenses/lgpl-license.php LGPL + * @link www.doctrine-project.com + * @since 1.0 + * @version $Revision$ + * @author Benjamin Eberlei + * @author Guilherme Blanco + * @author Jonathan Wage + * @author Roman Borschel + */ +class ValidateSchemaCommand extends Console\Command\Command +{ + /** + * @see Console\Command\Command + */ + protected function configure() + { + $this->setName('orm:validate-schema') + ->setDescription('Validate that the current metadata schema is valid.'); + } + + /** + * @param InputInterface $input + * @param OutputInterface $output + */ + 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(); + + if ( ! empty($metadatas)) { + // Create SchemaTool + $tool = new \Doctrine\ORM\Tools\SchemaTool($em); + $updateSql = $tool->getUpdateSchemaSql($metadatas, false); + + 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."); + } + } else { + $output->write("No metadata mappings found"); + } + } +} \ No newline at end of file From 4b71afe7c28c22dd3da37ac44d46ebff9b5a5a78 Mon Sep 17 00:00:00 2001 From: "Roman S. Borschel" Date: Sun, 18 Apr 2010 22:47:03 +0200 Subject: [PATCH 64/86] Improving metadata caching performance by only serializing what is absolutely necessary. --- lib/Doctrine/Common/Annotations/Parser.php | 4 +- .../ORM/Mapping/AssociationMapping.php | 55 ++++++++++++++- lib/Doctrine/ORM/Mapping/ClassMetadata.php | 69 +++++++++++++------ .../ORM/Mapping/ManyToManyMapping.php | 23 ++++++- lib/Doctrine/ORM/Mapping/OneToManyMapping.php | 23 ++++++- lib/Doctrine/ORM/Mapping/OneToOneMapping.php | 24 ++++++- .../Tests/ORM/Mapping/ClassMetadataTest.php | 2 + 7 files changed, 170 insertions(+), 30 deletions(-) diff --git a/lib/Doctrine/Common/Annotations/Parser.php b/lib/Doctrine/Common/Annotations/Parser.php index bde253d58..de373c3f8 100644 --- a/lib/Doctrine/Common/Annotations/Parser.php +++ b/lib/Doctrine/Common/Annotations/Parser.php @@ -1,7 +1,5 @@ _isNestedAnnotation && $this->_lexer->lookahead != null && + ( ! $this->_isNestedAnnotation && $this->_lexer->lookahead != null && ! $this->_lexer->isNextToken(Lexer::T_OPEN_PARENTHESIS) && ! $this->_lexer->isNextToken(Lexer::T_AT)) || ! class_exists($name, false) diff --git a/lib/Doctrine/ORM/Mapping/AssociationMapping.php b/lib/Doctrine/ORM/Mapping/AssociationMapping.php index 18915ba3c..881f878fe 100644 --- a/lib/Doctrine/ORM/Mapping/AssociationMapping.php +++ b/lib/Doctrine/ORM/Mapping/AssociationMapping.php @@ -340,5 +340,58 @@ abstract class AssociationMapping ? $platform->quoteIdentifier($this->joinTable['name']) : $this->joinTable['name']; } - + + /** + * Determines which fields get serialized. + * + * It is only serialized what is necessary for best unserialization performance. + * That means any metadata properties that are not set or empty or simply have + * their default value are NOT serialized. + * + * @return array The names of all the fields that should be serialized. + */ + public function __sleep() + { + $serialized = array( + 'sourceEntityName', + 'targetEntityName', + 'sourceFieldName' + ); + + if ($this->isCascadeDetach) { + $serialized[] = 'isCascadeDetach'; + } + if ($this->isCascadeMerge) { + $serialized[] = 'isCascadeMerge'; + } + if ($this->isCascadePersist) { + $serialized[] = 'isCascadePersist'; + } + if ($this->isCascadeRefresh) { + $serialized[] = 'isCascadeRefresh'; + } + if ($this->isCascadeRemove) { + $serialized[] = 'isCascadeRemove'; + } + if ( ! $this->isOwningSide) { + $serialized[] = 'isOwningSide'; + } + if ($this->mappedBy) { + $serialized[] = 'mappedBy'; + } + if ($this->inversedBy) { + $serialized[] = 'inversedBy'; + } + if ($this->joinTable) { + $serialized[] = 'joinTable'; + } + if ($this->inherited) { + $serialized[] = 'inherited'; + } + if ($this->declared) { + $serialized[] = 'declared'; + } + + return $serialized; + } } diff --git a/lib/Doctrine/ORM/Mapping/ClassMetadata.php b/lib/Doctrine/ORM/Mapping/ClassMetadata.php index c358cc007..a659e8235 100644 --- a/lib/Doctrine/ORM/Mapping/ClassMetadata.php +++ b/lib/Doctrine/ORM/Mapping/ClassMetadata.php @@ -264,8 +264,12 @@ class ClassMetadata extends ClassMetadataInfo /** * Determines which fields get serialized. + * + * It is only serialized what is necessary for best unserialization performance. + * That means any metadata properties that are not set or empty or simply have + * their default value are NOT serialized. * - * Parts that are NOT serialized because they can not be properly unserialized: + * Parts that are also NOT serialized because they can not be properly unserialized: * - reflClass (ReflectionClass) * - reflFields (ReflectionProperty array) * @@ -273,31 +277,56 @@ class ClassMetadata extends ClassMetadataInfo */ public function __sleep() { - return array( - 'associationMappings', // unserialization "bottleneck" with many associations - 'changeTrackingPolicy', + // This metadata is always serialized/cached. + $serialized = array( + 'associationMappings', 'columnNames', //TODO: Not really needed. Can use fieldMappings[$fieldName]['columnName'] - 'customRepositoryClassName', - 'discriminatorColumn', - 'discriminatorValue', - 'discriminatorMap', - 'fieldMappings',//TODO: Not all of this stuff needs to be serialized. Only type, columnName and fieldName. - 'fieldNames', - 'generatorType', + 'fieldMappings', + 'fieldNames', 'identifier', - 'idGenerator', //TODO: Does not really need to be serialized. Could be moved to runtime. - 'inheritanceType', - 'isIdentifierComposite', - 'isMappedSuperclass', - 'isVersioned', - 'lifecycleCallbacks', + 'isIdentifierComposite', // TODO: REMOVE 'name', - 'parentClasses', 'table', 'rootEntityName', - 'subClasses', - 'versionField' + 'idGenerator', //TODO: Does not really need to be serialized. Could be moved to runtime. ); + + // The rest of the metadata is only serialized if necessary. + if ($this->changeTrackingPolicy != self::CHANGETRACKING_DEFERRED_IMPLICIT) { + $serialized[] = 'changeTrackingPolicy'; + } + + if ($this->customRepositoryClassName) { + $serialized[] = 'customRepositoryClassName'; + } + + if ($this->inheritanceType != self::INHERITANCE_TYPE_NONE) { + $serialized[] = 'inheritanceType'; + $serialized[] = 'discriminatorColumn'; + $serialized[] = 'discriminatorValue'; + $serialized[] = 'discriminatorMap'; + $serialized[] = 'parentClasses'; + $serialized[] = 'subClasses'; + } + + if ($this->generatorType != self::GENERATOR_TYPE_NONE) { + $serialized[] = 'generatorType'; + } + + if ($this->isMappedSuperclass) { + $serialized[] = 'isMappedSuperclass'; + } + + if ($this->isVersioned) { + $serialized[] = 'isVersioned'; + $serialized[] = 'versionField'; + } + + if ($this->lifecycleCallbacks) { + $serialized[] = 'lifecycleCallbacks'; + } + + return $serialized; } /** diff --git a/lib/Doctrine/ORM/Mapping/ManyToManyMapping.php b/lib/Doctrine/ORM/Mapping/ManyToManyMapping.php index 95aad2b41..35f7e451f 100644 --- a/lib/Doctrine/ORM/Mapping/ManyToManyMapping.php +++ b/lib/Doctrine/ORM/Mapping/ManyToManyMapping.php @@ -1,7 +1,5 @@ orderBy) { + $serialized[] = 'orderBy'; + } + return $serialized; + } } diff --git a/lib/Doctrine/ORM/Mapping/OneToManyMapping.php b/lib/Doctrine/ORM/Mapping/OneToManyMapping.php index 0c4a2bb4f..5860c625e 100644 --- a/lib/Doctrine/ORM/Mapping/OneToManyMapping.php +++ b/lib/Doctrine/ORM/Mapping/OneToManyMapping.php @@ -1,7 +1,5 @@ loadOneToManyCollection($this, $conditions, $targetCollection); } + + /** + * Determines which fields get serialized. + * + * It is only serialized what is necessary for best unserialization performance. + * That means any metadata properties that are not set or empty or simply have + * their default value are NOT serialized. + * + * @return array The names of all the fields that should be serialized. + */ + public function __sleep() + { + $serialized = parent::__sleep(); + if ($this->orderBy) { + $serialized[] = 'orderBy'; + } + if ($this->orphanRemoval) { + $serialized[] = 'orphanRemoval'; + } + return $serialized; + } } diff --git a/lib/Doctrine/ORM/Mapping/OneToOneMapping.php b/lib/Doctrine/ORM/Mapping/OneToOneMapping.php index c82558fb4..89a97449e 100644 --- a/lib/Doctrine/ORM/Mapping/OneToOneMapping.php +++ b/lib/Doctrine/ORM/Mapping/OneToOneMapping.php @@ -1,7 +1,5 @@ orphanRemoval) { + $serialized[] = 'orphanRemoval'; + } + return $serialized; + } } diff --git a/tests/Doctrine/Tests/ORM/Mapping/ClassMetadataTest.php b/tests/Doctrine/Tests/ORM/Mapping/ClassMetadataTest.php index b31f5077c..92231ae8e 100644 --- a/tests/Doctrine/Tests/ORM/Mapping/ClassMetadataTest.php +++ b/tests/Doctrine/Tests/ORM/Mapping/ClassMetadataTest.php @@ -20,8 +20,10 @@ class ClassMetadataTest extends \Doctrine\Tests\OrmTestCase $this->assertEquals('Doctrine\Tests\Models\CMS\CmsUser', $cm->rootEntityName); $this->assertEquals(array(), $cm->subClasses); $this->assertEquals(array(), $cm->parentClasses); + $this->assertEquals(ClassMetadata::INHERITANCE_TYPE_NONE, $cm->inheritanceType); // Customize state + $cm->setInheritanceType(ClassMetadata::INHERITANCE_TYPE_SINGLE_TABLE); $cm->setSubclasses(array("One", "Two", "Three")); $cm->setParentClasses(array("UserParent")); $cm->setCustomRepositoryClass("UserRepository"); From 5ecca4f5e0817d0bc5769e20c8588529249cfae5 Mon Sep 17 00:00:00 2001 From: Guilherme Blanco Date: Thu, 22 Apr 2010 11:32:01 -0300 Subject: [PATCH 65/86] [2.0][DDC-524] Fixed issue with UPDATE/DELETE statements generating wrong SQL when using Association Paths. --- lib/Doctrine/ORM/Query/SqlWalker.php | 8 ++++++-- .../Doctrine/Tests/ORM/Query/UpdateSqlGenerationTest.php | 8 ++++++++ 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/lib/Doctrine/ORM/Query/SqlWalker.php b/lib/Doctrine/ORM/Query/SqlWalker.php index f624798fd..ece61bd50 100644 --- a/lib/Doctrine/ORM/Query/SqlWalker.php +++ b/lib/Doctrine/ORM/Query/SqlWalker.php @@ -478,8 +478,12 @@ class SqlWalker implements TreeWalker if (count($assoc->sourceToTargetKeyColumns) > 1) { throw QueryException::associationPathCompositeKeyNotSupported(); } - $sql .= $this->getSqlTableAlias($class->table['name'], $dqlAlias) . '.' - . reset($assoc->targetToSourceKeyColumns); + + if ($this->_useSqlTableAliases) { + $sql .= $this->getSqlTableAlias($class->table['name'], $dqlAlias) . '.'; + } + + $sql .= reset($assoc->targetToSourceKeyColumns); } else { // 2- Inverse side: NOT (YET?) SUPPORTED throw QueryException::associationPathInverseSideNotSupported(); diff --git a/tests/Doctrine/Tests/ORM/Query/UpdateSqlGenerationTest.php b/tests/Doctrine/Tests/ORM/Query/UpdateSqlGenerationTest.php index 969ee35ca..506dacb8b 100644 --- a/tests/Doctrine/Tests/ORM/Query/UpdateSqlGenerationTest.php +++ b/tests/Doctrine/Tests/ORM/Query/UpdateSqlGenerationTest.php @@ -159,4 +159,12 @@ class UpdateSqlGenerationTest extends \Doctrine\Tests\OrmTestCase 'UPDATE cms_users SET status = ? WHERE id BETWEEN ? AND ?' ); } + + public function testSingleValuedAssociationFieldInWhere() + { + $this->assertSqlGeneration( + "UPDATE Doctrine\Tests\Models\CMS\CmsPhonenumber p SET p.phonenumber = 1234 WHERE p.user = ?1", + "UPDATE cms_phonenumbers SET phonenumber = 1234 WHERE user_id = ?" + ); + } } From 825cd7f47822a55784cdcbc7747210439088e5b9 Mon Sep 17 00:00:00 2001 From: Guilherme Blanco Date: Thu, 22 Apr 2010 12:17:58 -0300 Subject: [PATCH 66/86] [2.0][DDC-529] Fixed undeclared in dbal:run-sql command. Thanks for provided patch, Hannes. --- lib/Doctrine/DBAL/Tools/Console/Command/RunSqlCommand.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Doctrine/DBAL/Tools/Console/Command/RunSqlCommand.php b/lib/Doctrine/DBAL/Tools/Console/Command/RunSqlCommand.php index 0e6c05c82..a4fdaccd0 100644 --- a/lib/Doctrine/DBAL/Tools/Console/Command/RunSqlCommand.php +++ b/lib/Doctrine/DBAL/Tools/Console/Command/RunSqlCommand.php @@ -78,7 +78,7 @@ EOT if (preg_match('/^select/i', $sql)) { $resultSet = $conn->fetchAll($sql); } else { - $resultSet = $em->getConnection()->executeUpdate($sql); + $resultSet = $conn->executeUpdate($sql); } \Doctrine\Common\Util\Debug::dump($resultSet, (int) $depth); From 841008c46107e7ff68e2d49d9aff1a5b5af04e03 Mon Sep 17 00:00:00 2001 From: Guilherme Blanco Date: Fri, 23 Apr 2010 00:51:32 -0300 Subject: [PATCH 67/86] [2.0] Coding Standards fixes, added missing docblocks, removed some dependencies from Common package (in Annotations component), etc. --- .../Common/Annotations/Annotation.php | 24 +++++++++-- .../Annotations/AnnotationException.php | 20 +++++++-- .../Common/Annotations/AnnotationReader.php | 18 ++++---- lib/Doctrine/Common/Annotations/Lexer.php | 42 ++++++++++++++----- lib/Doctrine/Common/Annotations/Parser.php | 10 +++-- lib/Doctrine/ORM/EntityManager.php | 3 +- lib/Doctrine/ORM/Query/Parser.php | 24 ++++++----- 7 files changed, 99 insertions(+), 42 deletions(-) diff --git a/lib/Doctrine/Common/Annotations/Annotation.php b/lib/Doctrine/Common/Annotations/Annotation.php index ba7704be0..e2bf42bb5 100644 --- a/lib/Doctrine/Common/Annotations/Annotation.php +++ b/lib/Doctrine/Common/Annotations/Annotation.php @@ -27,7 +27,8 @@ namespace Doctrine\Common\Annotations; * @license http://www.opensource.org/licenses/lgpl-license.php LGPL * @link www.doctrine-project.org * @since 2.0 - * @version $Revision: 3938 $ + * @version $Revision$ + * @author Benjamin Eberlei * @author Guilherme Blanco * @author Jonathan Wage * @author Roman Borschel @@ -52,14 +53,29 @@ class Annotation $this->$key = $value; } } - + + /** + * Error handler for unknown property accessor in Annotation class. + * + * @param string $name Unknown property name + */ public function __get($name) { - throw new \BadMethodCallException("Unknown annotation property '$name' on annotation '".get_class($this)."'."); + throw new \BadMethodCallException( + sprintf("Unknown property '%s' on annotation '%s'.", $name, get_class($this)) + ); } + /** + * Error handler for unknown property mutator in Annotation class. + * + * @param string $name Unkown property name + * @param mixed $value Property value + */ public function __set($name, $value) { - throw new \BadMethodCallException("Unknown annotation property '$name' on annotation '".get_class($this)."'."); + throw new \BadMethodCallException( + sprintf("Unknown property '%s' on annotation '%s'.", $name, get_class($this)) + ); } } \ No newline at end of file diff --git a/lib/Doctrine/Common/Annotations/AnnotationException.php b/lib/Doctrine/Common/Annotations/AnnotationException.php index 7610b16ef..bdee49420 100644 --- a/lib/Doctrine/Common/Annotations/AnnotationException.php +++ b/lib/Doctrine/Common/Annotations/AnnotationException.php @@ -27,20 +27,32 @@ namespace Doctrine\Common\Annotations; * @license http://www.opensource.org/licenses/lgpl-license.php LGPL * @link www.doctrine-project.org * @since 2.0 - * @version $Revision: 3938 $ + * @version $Revision$ + * @author Benjamin Eberlei * @author Guilherme Blanco * @author Jonathan Wage * @author Roman Borschel */ -class AnnotationException extends \Doctrine\Common\CommonException +class AnnotationException extends \Exception { + /** + * Creates a new AnnotationException describing a Syntax error. + * + * @param string $message Exception message + * @return AnnotationException + */ public static function syntaxError($message) { return new self('[Syntax Error] ' . $message); } - - public static function semanticalError($message) + /** + * Creates a new AnnotationException describing a Semantical error. + * + * @param string $message Exception message + * @return AnnotationException + */ + public static function semanticalError($message) { return new self('[Semantical Error] ' . $message); } diff --git a/lib/Doctrine/Common/Annotations/AnnotationReader.php b/lib/Doctrine/Common/Annotations/AnnotationReader.php index bed578e35..dbbf8dff6 100644 --- a/lib/Doctrine/Common/Annotations/AnnotationReader.php +++ b/lib/Doctrine/Common/Annotations/AnnotationReader.php @@ -32,7 +32,7 @@ use \ReflectionClass, * @license http://www.opensource.org/licenses/lgpl-license.php LGPL * @link www.doctrine-project.org * @since 2.0 - * @version $Revision: 3938 $ + * @version $Revision$ * @author Benjamin Eberlei * @author Guilherme Blanco * @author Jonathan Wage @@ -46,7 +46,7 @@ class AnnotationReader * @var string * @static */ - private static $CACHE_SALT = "@"; + private static $CACHE_SALT = '@'; /** * Annotations Parser @@ -56,15 +56,14 @@ class AnnotationReader private $_parser; /** - * Cache machanism to store processed Annotations + * Cache mechanism to store processed Annotations * * @var Doctrine\Common\Cache\Cache */ private $_cache; /** - * Constructor. Initializes a new AnnotationReader that uses the given - * Cache provider. + * Constructor. Initializes a new AnnotationReader that uses the given Cache provider. * * @param Cache $cache The cache provider to use. If none is provided, ArrayCache is used. */ @@ -112,7 +111,7 @@ class AnnotationReader return $data; } - $annotations = $this->_parser->parse($class->getDocComment(), "class ".$class->getName()); + $annotations = $this->_parser->parse($class->getDocComment(), 'class ' . $class->getName()); $this->_cache->save($cacheKey, $annotations, null); return $annotations; @@ -128,6 +127,7 @@ class AnnotationReader public function getClassAnnotation(ReflectionClass $class, $annotation) { $annotations = $this->getClassAnnotations($class); + return isset($annotations[$annotation]) ? $annotations[$annotation] : null; } @@ -148,7 +148,7 @@ class AnnotationReader return $data; } - $context = "property ".$property->getDeclaringClass()->getName()."::\$".$property->getName(); + $context = 'property ' . $property->getDeclaringClass()->getName() . "::\$" . $property->getName(); $annotations = $this->_parser->parse($property->getDocComment(), $context); $this->_cache->save($cacheKey, $annotations, null); @@ -165,6 +165,7 @@ class AnnotationReader public function getPropertyAnnotation(ReflectionProperty $property, $annotation) { $annotations = $this->getPropertyAnnotations($property); + return isset($annotations[$annotation]) ? $annotations[$annotation] : null; } @@ -185,7 +186,7 @@ class AnnotationReader return $data; } - $context = "method ".$method->getDeclaringClass()->getName()."::".$method->getName()."()"; + $context = 'method ' . $method->getDeclaringClass()->getName() . '::' . $method->getName() . '()'; $annotations = $this->_parser->parse($method->getDocComment(), $context); $this->_cache->save($cacheKey, $annotations, null); @@ -202,6 +203,7 @@ class AnnotationReader public function getMethodAnnotation(ReflectionMethod $method, $annotation) { $annotations = $this->getMethodAnnotations($method); + return isset($annotations[$annotation]) ? $annotations[$annotation] : null; } } \ No newline at end of file diff --git a/lib/Doctrine/Common/Annotations/Lexer.php b/lib/Doctrine/Common/Annotations/Lexer.php index cb32f0cc2..a6b8c0675 100644 --- a/lib/Doctrine/Common/Annotations/Lexer.php +++ b/lib/Doctrine/Common/Annotations/Lexer.php @@ -27,7 +27,8 @@ namespace Doctrine\Common\Annotations; * @license http://www.opensource.org/licenses/lgpl-license.php LGPL * @link www.doctrine-project.org * @since 2.0 - * @version $Revision: 3938 $ + * @version $Revision$ + * @author Benjamin Eberlei * @author Guilherme Blanco * @author Jonathan Wage * @author Roman Borschel @@ -80,7 +81,7 @@ class Lexer extends \Doctrine\Common\Lexer $newVal = $this->_getNumeric($value); // Checking numeric value - if ($newVal !== false){ + if ($newVal !== false) { $value = $newVal; return (strpos($value, '.') !== false || stripos($value, 'e') !== false) @@ -93,16 +94,34 @@ class Lexer extends \Doctrine\Common\Lexer return self::T_STRING; } else { switch (strtolower($value)) { - case '@': return self::T_AT; - case ',': return self::T_COMMA; - case '(': return self::T_OPEN_PARENTHESIS; - case ')': return self::T_CLOSE_PARENTHESIS; - case '{': return self::T_OPEN_CURLY_BRACES; + case '@': + return self::T_AT; + + case ',': + return self::T_COMMA; + + case '(': + return self::T_OPEN_PARENTHESIS; + + case ')': + return self::T_CLOSE_PARENTHESIS; + + case '{': + return self::T_OPEN_CURLY_BRACES; + case '}': return self::T_CLOSE_CURLY_BRACES; - case '=': return self::T_EQUALS; - case '\\': return self::T_NAMESPACE_SEPARATOR; - case 'true': return self::T_TRUE; - case 'false': return self::T_FALSE; + case '=': + return self::T_EQUALS; + + case '\\': + return self::T_NAMESPACE_SEPARATOR; + + case 'true': + return self::T_TRUE; + + case 'false': + return self::T_FALSE; + default: if (ctype_alpha($value[0]) || $value[0] === '_') { return self::T_IDENTIFIER; @@ -126,6 +145,7 @@ class Lexer extends \Doctrine\Common\Lexer if ( ! is_scalar($value)) { return false; } + // Checking for valid numeric numbers: 1.234, -1.234e-2 if (is_numeric($value)) { return $value; diff --git a/lib/Doctrine/Common/Annotations/Parser.php b/lib/Doctrine/Common/Annotations/Parser.php index bde253d58..eba4ae42a 100644 --- a/lib/Doctrine/Common/Annotations/Parser.php +++ b/lib/Doctrine/Common/Annotations/Parser.php @@ -27,11 +27,11 @@ namespace Doctrine\Common\Annotations; * @license http://www.opensource.org/licenses/lgpl-license.php LGPL * @link www.doctrine-project.org * @since 2.0 - * @version $Revision: 3938 $ + * @version $Revision$ + * @author Benjamin Eberlei * @author Guilherme Blanco * @author Jonathan Wage * @author Roman Borschel - * @author Benjamin Eberlei */ class Parser { @@ -173,9 +173,10 @@ class Parser $message .= "'{$token['value']}' at position {$token['position']}"; } - if(strlen($this->_context)) { - $message .= ' in '.$this->_context; + if (strlen($this->_context)) { + $message .= ' in ' . $this->_context; } + $message .= '.'; throw AnnotationException::syntaxError($message); @@ -411,6 +412,7 @@ class Parser foreach ($values as $value) { list ($key, $val) = $value; + if ($key !== null) { $array[$key] = $val; } else { diff --git a/lib/Doctrine/ORM/EntityManager.php b/lib/Doctrine/ORM/EntityManager.php index e2db2b0d0..c4aa9bb55 100644 --- a/lib/Doctrine/ORM/EntityManager.php +++ b/lib/Doctrine/ORM/EntityManager.php @@ -440,7 +440,8 @@ class EntityManager * * @param object $entity The entity to copy. * @return object The new entity. - * @todo Implementation or remove. + * @todo Implementation need. This is necessary since $e2 = clone $e1; throws an E_FATAL when access anything on $e: + * Fatal error: Maximum function nesting level of '100' reached, aborting! */ public function copy($entity, $deep = false) { diff --git a/lib/Doctrine/ORM/Query/Parser.php b/lib/Doctrine/ORM/Query/Parser.php index 960ae426d..b15248689 100644 --- a/lib/Doctrine/ORM/Query/Parser.php +++ b/lib/Doctrine/ORM/Query/Parser.php @@ -203,12 +203,15 @@ class Parser // Process any deferred validations of some nodes in the AST. // This also allows post-processing of the AST for modification purposes. $this->_processDeferredIdentificationVariables(); + if ($this->_deferredPartialObjectExpressions) { $this->_processDeferredPartialObjectExpressions(); } + if ($this->_deferredPathExpressions) { $this->_processDeferredPathExpressions($AST); } + if ($this->_deferredResultVariables) { $this->_processDeferredResultVariables(); } @@ -456,7 +459,7 @@ class Parser // Check if IdentificationVariable exists in queryComponents if ( ! isset($this->_queryComponents[$identVariable])) { $this->semanticalError( - "'$identVariable' is not defined.", $deferredItem['token'] + "'$identVariable' is not defined.", $deferredItem['token'] ); } @@ -465,14 +468,14 @@ class Parser // Check if queryComponent points to an AbstractSchemaName or a ResultVariable if ( ! isset($qComp['metadata'])) { $this->semanticalError( - "'$identVariable' does not point to a Class.", $deferredItem['token'] + "'$identVariable' does not point to a Class.", $deferredItem['token'] ); } // Validate if identification variable nesting level is lower or equal than the current one if ($qComp['nestingLevel'] > $deferredItem['nestingLevel']) { $this->semanticalError( - "'$identVariable' is used outside the scope of its declaration.", $deferredItem['token'] + "'$identVariable' is used outside the scope of its declaration.", $deferredItem['token'] ); } } @@ -486,15 +489,15 @@ class Parser foreach ($expr->partialFieldSet as $field) { if ( ! isset($class->fieldMappings[$field])) { $this->semanticalError( - "There is no mapped field named '$field' on class " . $class->name . ".", - $deferredItem['token'] + "There is no mapped field named '$field' on class " . $class->name . ".", + $deferredItem['token'] ); } } if (array_intersect($class->identifier, $expr->partialFieldSet) != $class->identifier) { $this->semanticalError( - "The partial field selection of class " . $class->name . " must contain the identifier.", - $deferredItem['token'] + "The partial field selection of class " . $class->name . " must contain the identifier.", + $deferredItem['token'] ); } } @@ -514,7 +517,7 @@ class Parser // Check if ResultVariable exists in queryComponents if ( ! isset($this->_queryComponents[$resultVariable])) { $this->semanticalError( - "'$resultVariable' is not defined.", $deferredItem['token'] + "'$resultVariable' is not defined.", $deferredItem['token'] ); } @@ -523,14 +526,14 @@ class Parser // Check if queryComponent points to an AbstractSchemaName or a ResultVariable if ( ! isset($qComp['resultVariable'])) { $this->semanticalError( - "'$identVariable' does not point to a ResultVariable.", $deferredItem['token'] + "'$identVariable' does not point to a ResultVariable.", $deferredItem['token'] ); } // Validate if identification variable nesting level is lower or equal than the current one if ($qComp['nestingLevel'] > $deferredItem['nestingLevel']) { $this->semanticalError( - "'$resultVariable' is used outside the scope of its declaration.", $deferredItem['token'] + "'$resultVariable' is used outside the scope of its declaration.", $deferredItem['token'] ); } } @@ -625,6 +628,7 @@ class Parser ), null ); + $AST->fromClause->identificationVariableDeclarations[0]->joinVariableDeclarations[] = $joinVariableDeclaration; $this->_queryComponents[$aliasIdentificationVariable . '.' . $field] = $joinQueryComponent; From 6d29f05d3ade5081646f8733c08a8a44e6788eec Mon Sep 17 00:00:00 2001 From: "Jonathan H. Wage" Date: Fri, 23 Apr 2010 14:37:29 -0400 Subject: [PATCH 68/86] Renaming PhpDriver to PHPDriver --- .../ORM/Mapping/Driver/{PhpDriver.php => PHPDriver.php} | 4 ++-- .../{PhpMappingDriverTest.php => PHPMappingDriverTest.php} | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) rename lib/Doctrine/ORM/Mapping/Driver/{PhpDriver.php => PHPDriver.php} (95%) rename tests/Doctrine/Tests/ORM/Mapping/{PhpMappingDriverTest.php => PHPMappingDriverTest.php} (91%) diff --git a/lib/Doctrine/ORM/Mapping/Driver/PhpDriver.php b/lib/Doctrine/ORM/Mapping/Driver/PHPDriver.php similarity index 95% rename from lib/Doctrine/ORM/Mapping/Driver/PhpDriver.php rename to lib/Doctrine/ORM/Mapping/Driver/PHPDriver.php index 6b6954b83..99b8a145a 100644 --- a/lib/Doctrine/ORM/Mapping/Driver/PhpDriver.php +++ b/lib/Doctrine/ORM/Mapping/Driver/PHPDriver.php @@ -30,7 +30,7 @@ use Doctrine\Common\Cache\ArrayCache, Doctrine\ORM\Mapping\Driver\AbstractFileDriver; /** - * The PhpDriver includes php files which just populate ClassMetadataInfo + * The PHPDriver includes php files which just populate ClassMetadataInfo * instances with plain php code * * @license http://www.opensource.org/licenses/lgpl-license.php LGPL @@ -43,7 +43,7 @@ use Doctrine\Common\Cache\ArrayCache, * @author Roman Borschel * @todo Rename: PHPDriver */ -class PhpDriver extends AbstractFileDriver +class PHPDriver extends AbstractFileDriver { /** * {@inheritdoc} diff --git a/tests/Doctrine/Tests/ORM/Mapping/PhpMappingDriverTest.php b/tests/Doctrine/Tests/ORM/Mapping/PHPMappingDriverTest.php similarity index 91% rename from tests/Doctrine/Tests/ORM/Mapping/PhpMappingDriverTest.php rename to tests/Doctrine/Tests/ORM/Mapping/PHPMappingDriverTest.php index 50bfcb819..08ec30bcf 100644 --- a/tests/Doctrine/Tests/ORM/Mapping/PhpMappingDriverTest.php +++ b/tests/Doctrine/Tests/ORM/Mapping/PHPMappingDriverTest.php @@ -3,7 +3,7 @@ namespace Doctrine\Tests\ORM\Mapping; use Doctrine\ORM\Mapping\ClassMetadata, - Doctrine\ORM\Mapping\Driver\PhpDriver, + Doctrine\ORM\Mapping\Driver\PHPDriver, Doctrine\ORM\Tools\Export\ClassMetadataExporter; require_once __DIR__ . '/../../TestInit.php'; @@ -26,6 +26,6 @@ class PhpMappingDriverTest extends AbstractMappingDriverTest $exporter->export(); */ - return new PhpDriver($path); + return new PHPDriver($path); } } \ No newline at end of file From 27a0058b89d5fc4b413f0b1a7542c57cec60e1c6 Mon Sep 17 00:00:00 2001 From: "Jonathan H. Wage" Date: Fri, 23 Apr 2010 16:16:16 -0400 Subject: [PATCH 69/86] Initial entry of StaticPHPDriver --- lib/Doctrine/ORM/Mapping/Driver/PHPDriver.php | 1 - .../ORM/Mapping/Driver/StaticPHPDriver.php | 122 ++++++++++++++++++ .../ORM/Mapping/AbstractMappingDriverTest.php | 106 +++++++++++++++ tests/Doctrine/Tests/ORM/Mapping/AllTests.php | 3 +- .../ORM/Mapping/PHPMappingDriverTest.php | 2 +- .../Mapping/StaticPHPMappingDriverTest.php | 17 +++ 6 files changed, 248 insertions(+), 3 deletions(-) create mode 100644 lib/Doctrine/ORM/Mapping/Driver/StaticPHPDriver.php create mode 100644 tests/Doctrine/Tests/ORM/Mapping/StaticPHPMappingDriverTest.php diff --git a/lib/Doctrine/ORM/Mapping/Driver/PHPDriver.php b/lib/Doctrine/ORM/Mapping/Driver/PHPDriver.php index 99b8a145a..fae3721fa 100644 --- a/lib/Doctrine/ORM/Mapping/Driver/PHPDriver.php +++ b/lib/Doctrine/ORM/Mapping/Driver/PHPDriver.php @@ -41,7 +41,6 @@ use Doctrine\Common\Cache\ArrayCache, * @author Guilherme Blanco * @author Jonathan H. Wage * @author Roman Borschel - * @todo Rename: PHPDriver */ class PHPDriver extends AbstractFileDriver { diff --git a/lib/Doctrine/ORM/Mapping/Driver/StaticPHPDriver.php b/lib/Doctrine/ORM/Mapping/Driver/StaticPHPDriver.php new file mode 100644 index 000000000..01edab71b --- /dev/null +++ b/lib/Doctrine/ORM/Mapping/Driver/StaticPHPDriver.php @@ -0,0 +1,122 @@ +. + */ + +namespace Doctrine\ORM\Mapping\Driver; + +use Doctrine\ORM\Mapping\ClassMetadataInfo, + Doctrine\ORM\Mapping\MappingException; + +/** + * The StaticPHPDriver calls a static loadMetadata() method on your entity + * classes where you can manually populate the ClassMetadata instance. + * + * @license http://www.opensource.org/licenses/lgpl-license.php LGPL + * @link www.doctrine-project.org + * @since 2.0 + * @version $Revision$ + * @author Benjamin Eberlei + * @author Guilherme Blanco + * @author Jonathan H. Wage + * @author Roman Borschel + */ +class StaticPHPDriver implements Driver +{ + private $_paths = array(); + + public function __construct($paths) + { + $this->addPaths((array) $paths); + } + + public function addPaths(array $paths) + { + $this->_paths = array_unique(array_merge($this->_paths, $paths)); + } + + /** + * {@inheritdoc} + */ + public function loadMetadataForClass($className, ClassMetadataInfo $metadata) + { + call_user_func_array(array($className, 'loadMetadata'), array($metadata)); + } + + /** + * {@inheritDoc} + * @todo Same code exists in AnnotationDriver, should we re-use it somehow or not worry about it? + */ + public function getAllClassNames() + { + if ($this->_classNames !== null) { + return $this->_classNames; + } + + if (!$this->_paths) { + throw MappingException::pathRequired(); + } + + $classes = array(); + $includedFiles = array(); + + foreach ($this->_paths as $path) { + if ( ! is_dir($path)) { + throw MappingException::fileMappingDriversRequireConfiguredDirectoryPath(); + } + + $iterator = new \RecursiveIteratorIterator( + new \RecursiveDirectoryIterator($path), + \RecursiveIteratorIterator::LEAVES_ONLY + ); + + foreach ($iterator as $file) { + if (($fileName = $file->getBasename($this->_fileExtension)) == $file->getBasename()) { + continue; + } + + $sourceFile = realpath($file->getPathName()); + require_once $sourceFile; + $includedFiles[] = $sourceFile; + } + } + + $declared = get_declared_classes(); + + foreach ($declared as $className) { + $rc = new \ReflectionClass($className); + $sourceFile = $rc->getFileName(); + if (in_array($sourceFile, $includedFiles) && ! $this->isTransient($className)) { + $classes[] = $className; + } + } + + $this->_classNames = $classes; + + return $classes; + } + + /** + * {@inheritdoc} + */ + public function isTransient($className) + { + return method_exists($className, 'loadMetadata') ? false : true; + } +} \ No newline at end of file diff --git a/tests/Doctrine/Tests/ORM/Mapping/AbstractMappingDriverTest.php b/tests/Doctrine/Tests/ORM/Mapping/AbstractMappingDriverTest.php index 8b29c6bad..1fdf4a33c 100644 --- a/tests/Doctrine/Tests/ORM/Mapping/AbstractMappingDriverTest.php +++ b/tests/Doctrine/Tests/ORM/Mapping/AbstractMappingDriverTest.php @@ -3,6 +3,7 @@ namespace Doctrine\Tests\ORM\Mapping; use Doctrine\ORM\Mapping\ClassMetadata, + Doctrine\ORM\Mapping\ClassMetadataInfo, Doctrine\ORM\Mapping\Driver\XmlDriver, Doctrine\ORM\Mapping\Driver\YamlDriver; @@ -264,4 +265,109 @@ class User { } + + public static function loadMetadata(ClassMetadataInfo $metadata) + { + $metadata->setInheritanceType(ClassMetadataInfo::INHERITANCE_TYPE_NONE); + $metadata->setPrimaryTable(array( + 'name' => 'cms_users', + )); + $metadata->setChangeTrackingPolicy(ClassMetadataInfo::CHANGETRACKING_DEFERRED_IMPLICIT); + $metadata->addLifecycleCallback('doStuffOnPrePersist', 'prePersist'); + $metadata->addLifecycleCallback('doOtherStuffOnPrePersistToo', 'prePersist'); + $metadata->addLifecycleCallback('doStuffOnPostPersist', 'postPersist'); + $metadata->mapField(array( + 'id' => true, + 'fieldName' => 'id', + 'type' => 'integer', + 'columnName' => 'id', + )); + $metadata->mapField(array( + 'fieldName' => 'name', + 'type' => 'string', + 'length' => 50, + 'unique' => true, + 'nullable' => true, + 'columnName' => 'name', + )); + $metadata->mapField(array( + 'fieldName' => 'email', + 'type' => 'string', + 'columnName' => 'user_email', + 'columnDefinition' => 'CHAR(32) NOT NULL', + )); + $metadata->setIdGeneratorType(ClassMetadataInfo::GENERATOR_TYPE_AUTO); + $metadata->mapOneToOne(array( + 'fieldName' => 'address', + 'targetEntity' => 'Doctrine\\Tests\\ORM\\Mapping\\Address', + 'cascade' => + array( + 0 => 'remove', + ), + 'mappedBy' => NULL, + 'inversedBy' => 'user', + 'joinColumns' => + array( + 0 => + array( + 'name' => 'address_id', + 'referencedColumnName' => 'id', + 'onDelete' => 'CASCADE', + 'onUpdate' => 'CASCADE' + ), + ), + 'orphanRemoval' => false, + )); + $metadata->mapOneToMany(array( + 'fieldName' => 'phonenumbers', + 'targetEntity' => 'Doctrine\\Tests\\ORM\\Mapping\\Phonenumber', + 'cascade' => + array( + 1 => 'persist', + ), + 'mappedBy' => 'user', + 'orphanRemoval' => false, + 'orderBy' => + array( + 'number' => 'ASC', + ), + )); + $metadata->mapManyToMany(array( + 'fieldName' => 'groups', + 'targetEntity' => 'Doctrine\\Tests\\ORM\\Mapping\\Group', + 'cascade' => + array( + 0 => 'remove', + 1 => 'persist', + 2 => 'refresh', + 3 => 'merge', + 4 => 'detach', + ), + 'mappedBy' => NULL, + 'joinTable' => + array( + 'name' => 'cms_users_groups', + 'joinColumns' => + array( + 0 => + array( + 'name' => 'user_id', + 'referencedColumnName' => 'id', + 'unique' => false, + 'nullable' => false, + ), + ), + 'inverseJoinColumns' => + array( + 0 => + array( + 'name' => 'group_id', + 'referencedColumnName' => 'id', + 'columnDefinition' => 'INT NULL', + ), + ), + ), + 'orderBy' => NULL, + )); + } } \ No newline at end of file diff --git a/tests/Doctrine/Tests/ORM/Mapping/AllTests.php b/tests/Doctrine/Tests/ORM/Mapping/AllTests.php index db9ceb0e2..dcd5c768c 100644 --- a/tests/Doctrine/Tests/ORM/Mapping/AllTests.php +++ b/tests/Doctrine/Tests/ORM/Mapping/AllTests.php @@ -23,7 +23,8 @@ class AllTests $suite->addTestSuite('Doctrine\Tests\ORM\Mapping\XmlMappingDriverTest'); $suite->addTestSuite('Doctrine\Tests\ORM\Mapping\YamlMappingDriverTest'); $suite->addTestSuite('Doctrine\Tests\ORM\Mapping\AnnotationDriverTest'); - $suite->addTestSuite('Doctrine\Tests\ORM\Mapping\PhpMappingDriverTest'); + $suite->addTestSuite('Doctrine\Tests\ORM\Mapping\PHPMappingDriverTest'); + $suite->addTestSuite('Doctrine\Tests\ORM\Mapping\StaticPHPMappingDriverTest'); $suite->addTestSuite('Doctrine\Tests\ORM\Mapping\ClassMetadataFactoryTest'); $suite->addTestSuite('Doctrine\Tests\ORM\Mapping\ClassMetadataLoadEventTest'); $suite->addTestSuite('Doctrine\Tests\ORM\Mapping\BasicInheritanceMappingTest'); diff --git a/tests/Doctrine/Tests/ORM/Mapping/PHPMappingDriverTest.php b/tests/Doctrine/Tests/ORM/Mapping/PHPMappingDriverTest.php index 08ec30bcf..b346973cf 100644 --- a/tests/Doctrine/Tests/ORM/Mapping/PHPMappingDriverTest.php +++ b/tests/Doctrine/Tests/ORM/Mapping/PHPMappingDriverTest.php @@ -8,7 +8,7 @@ use Doctrine\ORM\Mapping\ClassMetadata, require_once __DIR__ . '/../../TestInit.php'; -class PhpMappingDriverTest extends AbstractMappingDriverTest +class PHPMappingDriverTest extends AbstractMappingDriverTest { protected function _loadDriver() { diff --git a/tests/Doctrine/Tests/ORM/Mapping/StaticPHPMappingDriverTest.php b/tests/Doctrine/Tests/ORM/Mapping/StaticPHPMappingDriverTest.php new file mode 100644 index 000000000..1a5a2074e --- /dev/null +++ b/tests/Doctrine/Tests/ORM/Mapping/StaticPHPMappingDriverTest.php @@ -0,0 +1,17 @@ + Date: Mon, 26 Apr 2010 13:02:30 +0200 Subject: [PATCH 70/86] [DDC-497][DDC-500][DDC-342] Fixed. Persister polishing and refactoring. More to come for that, but after beta1. --- .../Common/Annotations/AnnotationReader.php | 5 - lib/Doctrine/Common/Annotations/Parser.php | 5 +- lib/Doctrine/Common/Cache/AbstractCache.php | 5 - lib/Doctrine/Common/ClassLoader.php | 2 - .../Common/Collections/ArrayCollection.php | 19 +- .../Common/Collections/Collection.php | 5 - lib/Doctrine/Common/Lexer.php | 35 +- lib/Doctrine/Common/Version.php | 2 - lib/Doctrine/DBAL/Connection.php | 2 - lib/Doctrine/ORM/EntityNotFoundException.php | 19 +- lib/Doctrine/ORM/EntityRepository.php | 5 - lib/Doctrine/ORM/Event/LifecycleEventArgs.php | 11 +- lib/Doctrine/ORM/Id/AbstractIdGenerator.php | 17 + lib/Doctrine/ORM/Id/AssignedGenerator.php | 5 - lib/Doctrine/ORM/Id/IdentityGenerator.php | 17 + lib/Doctrine/ORM/Id/SequenceGenerator.php | 6 +- .../ORM/Id/SequenceIdentityGenerator.php | 17 + lib/Doctrine/ORM/Id/TableGenerator.php | 20 +- .../ORM/Internal/CommitOrderCalculator.php | 2 - .../Internal/Hydration/AbstractHydrator.php | 5 - .../ORM/Internal/Hydration/ArrayHydrator.php | 2 - .../ORM/Internal/Hydration/IterableResult.php | 2 - .../ORM/Internal/Hydration/ObjectHydrator.php | 6 +- .../ORM/Internal/Hydration/ScalarHydrator.php | 2 - .../Hydration/SingleScalarHydrator.php | 2 - .../ORM/Mapping/AssociationMapping.php | 3 +- lib/Doctrine/ORM/Mapping/Driver/Driver.php | 9 +- .../ORM/Mapping/Driver/DriverChain.php | 16 +- .../ORM/Mapping/ManyToManyMapping.php | 33 +- lib/Doctrine/ORM/Mapping/MappingException.php | 2 - lib/Doctrine/ORM/Mapping/OneToManyMapping.php | 20 +- lib/Doctrine/ORM/Mapping/OneToOneMapping.php | 51 +- lib/Doctrine/ORM/NoResultException.php | 17 + lib/Doctrine/ORM/NonUniqueResultException.php | 17 + lib/Doctrine/ORM/ORMException.php | 17 + lib/Doctrine/ORM/OptimisticLockException.php | 2 - lib/Doctrine/ORM/PersistentCollection.php | 2 - .../AbstractEntityInheritancePersister.php | 4 +- .../Persisters/JoinedSubclassPersister.php | 82 +-- .../ORM/Persisters/SingleTablePersister.php | 36 +- .../Persisters/StandardEntityPersister.php | 527 ++++++++++++------ lib/Doctrine/ORM/Proxy/ProxyFactory.php | 18 +- lib/Doctrine/ORM/Query/SqlWalker.php | 21 +- lib/Doctrine/ORM/UnitOfWork.php | 7 +- .../Functional/ClassTableInheritanceTest2.php | 52 +- .../Functional/SingleTableInheritanceTest.php | 17 +- 46 files changed, 671 insertions(+), 500 deletions(-) diff --git a/lib/Doctrine/Common/Annotations/AnnotationReader.php b/lib/Doctrine/Common/Annotations/AnnotationReader.php index bed578e35..0863ea94f 100644 --- a/lib/Doctrine/Common/Annotations/AnnotationReader.php +++ b/lib/Doctrine/Common/Annotations/AnnotationReader.php @@ -1,7 +1,5 @@ * @author Guilherme Blanco * @author Jonathan Wage diff --git a/lib/Doctrine/Common/Annotations/Parser.php b/lib/Doctrine/Common/Annotations/Parser.php index de373c3f8..a90d1f361 100644 --- a/lib/Doctrine/Common/Annotations/Parser.php +++ b/lib/Doctrine/Common/Annotations/Parser.php @@ -22,10 +22,7 @@ namespace Doctrine\Common\Annotations; /** * A simple parser for docblock annotations. * - * @license http://www.opensource.org/licenses/lgpl-license.php LGPL - * @link www.doctrine-project.org * @since 2.0 - * @version $Revision: 3938 $ * @author Guilherme Blanco * @author Jonathan Wage * @author Roman Borschel @@ -234,7 +231,7 @@ class Parser $nameParts[] = $this->_lexer->token['value']; } - // Effectively pick the name of class (append default NS if none, grab from NS alias, etc) + // Effectively pick the name of the class (append default NS if none, grab from NS alias, etc) if (count($nameParts) == 1) { if (strpos($nameParts[0], ':')) { list ($alias, $simpleName) = explode(':', $nameParts[0]); diff --git a/lib/Doctrine/Common/Cache/AbstractCache.php b/lib/Doctrine/Common/Cache/AbstractCache.php index ea5b5df5e..fa9e0a505 100644 --- a/lib/Doctrine/Common/Cache/AbstractCache.php +++ b/lib/Doctrine/Common/Cache/AbstractCache.php @@ -1,7 +1,5 @@ * @author Jonathan Wage * @author Roman Borschel diff --git a/lib/Doctrine/Common/ClassLoader.php b/lib/Doctrine/Common/ClassLoader.php index b2c525595..d971fe9a6 100644 --- a/lib/Doctrine/Common/ClassLoader.php +++ b/lib/Doctrine/Common/ClassLoader.php @@ -1,7 +1,5 @@ * @author Jonathan Wage * @author Roman Borschel @@ -39,7 +33,6 @@ class ArrayCollection implements Collection { /** * An array containing the entries of this collection. - * This is the internal php array. * * @var array */ @@ -54,7 +47,7 @@ class ArrayCollection implements Collection { $this->_elements = $elements; } - + /** * Gets the PHP array representation of this collection. * @@ -121,7 +114,7 @@ class ArrayCollection implements Collection * Removes an element with a specific key/index from the collection. * * @param mixed $key - * @return mixed + * @return mixed The removed element or NULL, if no element exists for the given key. */ public function remove($key) { @@ -131,7 +124,7 @@ class ArrayCollection implements Collection return $removed; } - + return null; } @@ -413,6 +406,7 @@ class ArrayCollection implements Collection /** * Returns a string representation of this object. * + * @return string */ public function __toString() { @@ -421,7 +415,6 @@ class ArrayCollection implements Collection /** * Clears the collection. - * */ public function clear() { diff --git a/lib/Doctrine/Common/Collections/Collection.php b/lib/Doctrine/Common/Collections/Collection.php index 6b415baaf..41af440b5 100644 --- a/lib/Doctrine/Common/Collections/Collection.php +++ b/lib/Doctrine/Common/Collections/Collection.php @@ -1,7 +1,5 @@ * @author Jonathan Wage * @author Roman Borschel diff --git a/lib/Doctrine/Common/Lexer.php b/lib/Doctrine/Common/Lexer.php index e4d39ce95..3949e11aa 100644 --- a/lib/Doctrine/Common/Lexer.php +++ b/lib/Doctrine/Common/Lexer.php @@ -1,7 +1,5 @@ * @author Jonathan Wage * @author Roman Borschel + * @todo Rename: AbstractLexer */ abstract class Lexer { @@ -50,7 +46,7 @@ abstract class Lexer private $_peek = 0; /** - * @var array The next token in the query string. + * @var array The next token in the input. */ public $lookahead; @@ -60,9 +56,12 @@ abstract class Lexer public $token; /** - * Inputs data to be tokenized + * Sets the input data to be tokenized. * - * @param string $input input to be tokenized + * The Lexer is immediately reset and the new input tokenized. + * Any unprocessed tokens from any previous input are lost. + * + * @param string $input The input to be tokenized. */ public function setInput($input) { @@ -72,20 +71,18 @@ abstract class Lexer } /** - * Resets the scanner - * + * Resets the lexer. */ public function reset() { $this->lookahead = null; - $this->token = null; - $this->_peek = 0; + $this->token = null; + $this->_peek = 0; $this->_position = 0; } - + /** - * Resets the peek pointer to 0 - * + * Resets the peek pointer to 0. */ public function resetPeek() { @@ -93,7 +90,7 @@ abstract class Lexer } /** - * Resets the lexer position on the input to the given position + * Resets the lexer position on the input to the given position. * * @param integer $position Position to place the lexical scanner */ @@ -235,14 +232,14 @@ abstract class Lexer } /** - * Lexical catchable patterns + * Lexical catchable patterns. * * @return array */ abstract protected function getCatchablePatterns(); /** - * Lexical non-catchable patterns + * Lexical non-catchable patterns. * * @return array */ diff --git a/lib/Doctrine/Common/Version.php b/lib/Doctrine/Common/Version.php index fd1b499f0..c01da049f 100644 --- a/lib/Doctrine/Common/Version.php +++ b/lib/Doctrine/Common/Version.php @@ -1,7 +1,5 @@ . + */ namespace Doctrine\ORM; @@ -12,6 +29,6 @@ class EntityNotFoundException extends ORMException { public function __construct() { - parent::__construct('Entity was found although one item was expected.'); + parent::__construct('Entity was not found.'); } } \ No newline at end of file diff --git a/lib/Doctrine/ORM/EntityRepository.php b/lib/Doctrine/ORM/EntityRepository.php index 1382cb5e6..de919430d 100644 --- a/lib/Doctrine/ORM/EntityRepository.php +++ b/lib/Doctrine/ORM/EntityRepository.php @@ -1,7 +1,5 @@ * @author Guilherme Blanco * @author Jonathan Wage diff --git a/lib/Doctrine/ORM/Event/LifecycleEventArgs.php b/lib/Doctrine/ORM/Event/LifecycleEventArgs.php index 3e7cdee21..a5dd39cfd 100644 --- a/lib/Doctrine/ORM/Event/LifecycleEventArgs.php +++ b/lib/Doctrine/ORM/Event/LifecycleEventArgs.php @@ -1,7 +1,5 @@ - * @author Benjamin Eberlei + * @since 2.0 + * @author Roman Borschel + * @author Benjamin Eberlei */ class LifecycleEventArgs extends \Doctrine\Common\EventArgs { diff --git a/lib/Doctrine/ORM/Id/AbstractIdGenerator.php b/lib/Doctrine/ORM/Id/AbstractIdGenerator.php index ffbad370e..cfe3b5daf 100644 --- a/lib/Doctrine/ORM/Id/AbstractIdGenerator.php +++ b/lib/Doctrine/ORM/Id/AbstractIdGenerator.php @@ -1,4 +1,21 @@ . + */ namespace Doctrine\ORM\Id; diff --git a/lib/Doctrine/ORM/Id/AssignedGenerator.php b/lib/Doctrine/ORM/Id/AssignedGenerator.php index 226d2b406..f4bd3d631 100644 --- a/lib/Doctrine/ORM/Id/AssignedGenerator.php +++ b/lib/Doctrine/ORM/Id/AssignedGenerator.php @@ -1,7 +1,5 @@ * @author Guilherme Blanco * @author Jonathan Wage diff --git a/lib/Doctrine/ORM/Id/IdentityGenerator.php b/lib/Doctrine/ORM/Id/IdentityGenerator.php index e2c3bf423..96ad08add 100644 --- a/lib/Doctrine/ORM/Id/IdentityGenerator.php +++ b/lib/Doctrine/ORM/Id/IdentityGenerator.php @@ -1,4 +1,21 @@ . + */ namespace Doctrine\ORM\Id; diff --git a/lib/Doctrine/ORM/Id/SequenceGenerator.php b/lib/Doctrine/ORM/Id/SequenceGenerator.php index fc9737653..0d564ed32 100644 --- a/lib/Doctrine/ORM/Id/SequenceGenerator.php +++ b/lib/Doctrine/ORM/Id/SequenceGenerator.php @@ -1,7 +1,5 @@ */ -class SequenceGenerator extends AbstractIdGenerator implements \Serializable +class SequenceGenerator extends AbstractIdGenerator implements Serializable { private $_allocationSize; private $_sequenceName; diff --git a/lib/Doctrine/ORM/Id/SequenceIdentityGenerator.php b/lib/Doctrine/ORM/Id/SequenceIdentityGenerator.php index 758d73474..c7158bbed 100644 --- a/lib/Doctrine/ORM/Id/SequenceIdentityGenerator.php +++ b/lib/Doctrine/ORM/Id/SequenceIdentityGenerator.php @@ -1,4 +1,21 @@ . + */ namespace Doctrine\ORM\Id; diff --git a/lib/Doctrine/ORM/Id/TableGenerator.php b/lib/Doctrine/ORM/Id/TableGenerator.php index 12ee0a2b3..5c46f8b5c 100644 --- a/lib/Doctrine/ORM/Id/TableGenerator.php +++ b/lib/Doctrine/ORM/Id/TableGenerator.php @@ -1,4 +1,21 @@ . + */ namespace Doctrine\ORM\Id; @@ -7,10 +24,7 @@ use Doctrine\ORM\EntityManager; /** * Id generator that uses a single-row database table and a hi/lo algorithm. * - * @license http://www.opensource.org/licenses/lgpl-license.php LGPL - * @link www.doctrine-project.org * @since 2.0 - * @version $Revision$ * @author Benjamin Eberlei * @author Guilherme Blanco * @author Jonathan Wage diff --git a/lib/Doctrine/ORM/Internal/CommitOrderCalculator.php b/lib/Doctrine/ORM/Internal/CommitOrderCalculator.php index 7af95e41e..8997b1ea5 100644 --- a/lib/Doctrine/ORM/Internal/CommitOrderCalculator.php +++ b/lib/Doctrine/ORM/Internal/CommitOrderCalculator.php @@ -1,7 +1,5 @@ * @author Roman Borschel */ diff --git a/lib/Doctrine/ORM/Internal/Hydration/ArrayHydrator.php b/lib/Doctrine/ORM/Internal/Hydration/ArrayHydrator.php index 9e5dcf2e9..aaa2c6ece 100644 --- a/lib/Doctrine/ORM/Internal/Hydration/ArrayHydrator.php +++ b/lib/Doctrine/ORM/Internal/Hydration/ArrayHydrator.php @@ -1,7 +1,5 @@ * @since 2.0 + * @todo Potentially remove if assoc mapping objects get replaced by simple arrays. */ abstract class AssociationMapping { @@ -58,7 +59,7 @@ abstract class AssociationMapping public $isCascadeRemove; /** - * READ-ONLY: Whether the association cascades save() operations from the source entity + * READ-ONLY: Whether the association cascades persist() operations from the source entity * to the target entity/entities. * * @var boolean diff --git a/lib/Doctrine/ORM/Mapping/Driver/Driver.php b/lib/Doctrine/ORM/Mapping/Driver/Driver.php index 1faaac964..b6cfe36b4 100644 --- a/lib/Doctrine/ORM/Mapping/Driver/Driver.php +++ b/lib/Doctrine/ORM/Mapping/Driver/Driver.php @@ -26,12 +26,9 @@ use Doctrine\ORM\Mapping\ClassMetadataInfo; /** * Contract for metadata drivers. * - * @license http://www.opensource.org/licenses/lgpl-license.php LGPL - * @link www.doctrine-project.com - * @since 2.0 - * @version $Revision: 1393 $ - * @author Jonathan H. Wage - * @todo Rename: MetadataDriver + * @since 2.0 + * @author Jonathan H. Wage + * @todo Rename: MetadataDriver or MappingDriver */ interface Driver { diff --git a/lib/Doctrine/ORM/Mapping/Driver/DriverChain.php b/lib/Doctrine/ORM/Mapping/Driver/DriverChain.php index cd2a727fe..3abf3480c 100644 --- a/lib/Doctrine/ORM/Mapping/Driver/DriverChain.php +++ b/lib/Doctrine/ORM/Mapping/Driver/DriverChain.php @@ -1,7 +1,5 @@ - * @author Guilherme Blanco - * @author Jonathan H. Wage - * @author Roman Borschel + * @since 2.0 + * @author Benjamin Eberlei + * @author Guilherme Blanco + * @author Jonathan H. Wage + * @author Roman Borschel + * @todo Rename: MappingDriverChain or MetadataDriverChain */ class DriverChain implements Driver { diff --git a/lib/Doctrine/ORM/Mapping/ManyToManyMapping.php b/lib/Doctrine/ORM/Mapping/ManyToManyMapping.php index 35f7e451f..21bdafe20 100644 --- a/lib/Doctrine/ORM/Mapping/ManyToManyMapping.php +++ b/lib/Doctrine/ORM/Mapping/ManyToManyMapping.php @@ -37,6 +37,7 @@ namespace Doctrine\ORM\Mapping; * @since 2.0 * @author Roman Borschel * @author Giorgio Sironi + * @todo Potentially remove if assoc mapping objects get replaced by simple arrays. */ class ManyToManyMapping extends AssociationMapping { @@ -140,39 +141,11 @@ class ManyToManyMapping extends AssociationMapping * @param object The owner of the collection. * @param object The collection to populate. * @param array + * @todo Remove */ public function load($sourceEntity, $targetCollection, $em, array $joinColumnValues = array()) { - $sourceClass = $em->getClassMetadata($this->sourceEntityName); - $joinTableConditions = array(); - if ($this->isOwningSide) { - foreach ($this->relationToSourceKeyColumns as $relationKeyColumn => $sourceKeyColumn) { - // getting id - if (isset($sourceClass->fieldNames[$sourceKeyColumn])) { - $joinTableConditions[$relationKeyColumn] = $sourceClass->reflFields[$sourceClass->fieldNames[$sourceKeyColumn]]->getValue($sourceEntity); - } else { - throw MappingException::joinColumnMustPointToMappedField( - $sourceClass->name, $sourceKeyColumn - ); - } - } - } else { - $owningAssoc = $em->getClassMetadata($this->targetEntityName)->associationMappings[$this->mappedBy]; - // TRICKY: since the association is inverted source and target are flipped - foreach ($owningAssoc->relationToTargetKeyColumns as $relationKeyColumn => $sourceKeyColumn) { - // getting id - if (isset($sourceClass->fieldNames[$sourceKeyColumn])) { - $joinTableConditions[$relationKeyColumn] = $sourceClass->reflFields[$sourceClass->fieldNames[$sourceKeyColumn]]->getValue($sourceEntity); - } else { - throw MappingException::joinColumnMustPointToMappedField( - $sourceClass->name, $sourceKeyColumn - ); - } - } - } - - $persister = $em->getUnitOfWork()->getEntityPersister($this->targetEntityName); - $persister->loadManyToManyCollection($this, $joinTableConditions, $targetCollection); + $em->getUnitOfWork()->getEntityPersister($this->targetEntityName)->loadManyToManyCollection($this, $sourceEntity, $targetCollection); } /** {@inheritdoc} */ diff --git a/lib/Doctrine/ORM/Mapping/MappingException.php b/lib/Doctrine/ORM/Mapping/MappingException.php index 8881a3c71..561f66bbd 100644 --- a/lib/Doctrine/ORM/Mapping/MappingException.php +++ b/lib/Doctrine/ORM/Mapping/MappingException.php @@ -1,7 +1,5 @@ * @author Giorgio Sironi * @since 2.0 + * @todo Potentially remove if assoc mapping objects get replaced by simple arrays. */ class OneToManyMapping extends AssociationMapping { @@ -99,8 +100,6 @@ class OneToManyMapping extends AssociationMapping /** * {@inheritdoc} - * - * @override */ public function isOneToMany() { @@ -115,24 +114,11 @@ class OneToManyMapping extends AssociationMapping * @param $em The EntityManager to use. * @param $joinColumnValues * @return void + * @todo Remove */ public function load($sourceEntity, $targetCollection, $em, array $joinColumnValues = array()) { - $persister = $em->getUnitOfWork()->getEntityPersister($this->targetEntityName); - // a one-to-many is always inverse (does not have foreign key) - $sourceClass = $em->getClassMetadata($this->sourceEntityName); - $owningAssoc = $em->getClassMetadata($this->targetEntityName)->associationMappings[$this->mappedBy]; - // TRICKY: since the association is specular source and target are flipped - foreach ($owningAssoc->targetToSourceKeyColumns as $sourceKeyColumn => $targetKeyColumn) { - // getting id - if (isset($sourceClass->fieldNames[$sourceKeyColumn])) { - $conditions[$targetKeyColumn] = $sourceClass->reflFields[$sourceClass->fieldNames[$sourceKeyColumn]]->getValue($sourceEntity); - } else { - $conditions[$targetKeyColumn] = $joinColumnValues[$sourceKeyColumn]; - } - } - - $persister->loadOneToManyCollection($this, $conditions, $targetCollection); + $em->getUnitOfWork()->getEntityPersister($this->targetEntityName)->loadOneToManyCollection($this, $sourceEntity, $targetCollection); } /** diff --git a/lib/Doctrine/ORM/Mapping/OneToOneMapping.php b/lib/Doctrine/ORM/Mapping/OneToOneMapping.php index 89a97449e..918228060 100644 --- a/lib/Doctrine/ORM/Mapping/OneToOneMapping.php +++ b/lib/Doctrine/ORM/Mapping/OneToOneMapping.php @@ -37,6 +37,7 @@ namespace Doctrine\ORM\Mapping; * @since 2.0 * @author Roman Borschel * @author Giorgio Sironi + * @todo Potentially remove if assoc mapping objects get replaced by simple arrays. */ class OneToOneMapping extends AssociationMapping { @@ -133,57 +134,11 @@ class OneToOneMapping extends AssociationMapping * @param object $targetEntity the entity to load data in * @param EntityManager $em * @param array $joinColumnValues Values of the join columns of $sourceEntity. + * @todo Remove */ public function load($sourceEntity, $targetEntity, $em, array $joinColumnValues = array()) { - $targetClass = $em->getClassMetadata($this->targetEntityName); - - if ($this->isOwningSide) { - // Mark inverse side as fetched in the hints, otherwise the UoW would - // try to load it in a separate query (remember: to-one inverse sides can not be lazy). - $hints = array(); - if ($this->inversedBy) { - $hints['fetched'][$targetClass->name][$this->inversedBy] = true; - if ($targetClass->subClasses) { - foreach ($targetClass->subClasses as $targetSubclassName) { - $hints['fetched'][$targetSubclassName][$this->inversedBy] = true; - } - } - } - /* cascade read-only status - if ($em->getUnitOfWork()->isReadOnly($sourceEntity)) { - $hints[Query::HINT_READ_ONLY] = true; - } - */ - - $targetEntity = $em->getUnitOfWork()->getEntityPersister($this->targetEntityName)->load($joinColumnValues, $targetEntity, $this, $hints); - - if ($targetEntity !== null && $this->inversedBy && ! $targetClass->isCollectionValuedAssociation($this->inversedBy)) { - $targetClass->reflFields[$this->inversedBy]->setValue($targetEntity, $sourceEntity); - } - } else { - $conditions = array(); - $sourceClass = $em->getClassMetadata($this->sourceEntityName); - $owningAssoc = $targetClass->getAssociationMapping($this->mappedBy); - // TRICKY: since the association is specular source and target are flipped - foreach ($owningAssoc->targetToSourceKeyColumns as $sourceKeyColumn => $targetKeyColumn) { - if (isset($sourceClass->fieldNames[$sourceKeyColumn])) { - $conditions[$targetKeyColumn] = $sourceClass->reflFields[$sourceClass->fieldNames[$sourceKeyColumn]]->getValue($sourceEntity); - } else { - throw MappingException::joinColumnMustPointToMappedField( - $sourceClass->name, $sourceKeyColumn - ); - } - } - - $targetEntity = $em->getUnitOfWork()->getEntityPersister($this->targetEntityName)->load($conditions, $targetEntity, $this); - - if ($targetEntity !== null) { - $targetClass->setFieldValue($targetEntity, $this->mappedBy, $sourceEntity); - } - } - - return $targetEntity; + return $em->getUnitOfWork()->getEntityPersister($this->targetEntityName)->loadOneToOneEntity($this, $sourceEntity, $targetEntity, $joinColumnValues); } /** diff --git a/lib/Doctrine/ORM/NoResultException.php b/lib/Doctrine/ORM/NoResultException.php index 1312ea1e3..80f08bb93 100644 --- a/lib/Doctrine/ORM/NoResultException.php +++ b/lib/Doctrine/ORM/NoResultException.php @@ -1,4 +1,21 @@ . + */ namespace Doctrine\ORM; diff --git a/lib/Doctrine/ORM/NonUniqueResultException.php b/lib/Doctrine/ORM/NonUniqueResultException.php index 601de023f..811df75c1 100644 --- a/lib/Doctrine/ORM/NonUniqueResultException.php +++ b/lib/Doctrine/ORM/NonUniqueResultException.php @@ -1,4 +1,21 @@ . + */ namespace Doctrine\ORM; diff --git a/lib/Doctrine/ORM/ORMException.php b/lib/Doctrine/ORM/ORMException.php index 4d39d1e47..abea24363 100644 --- a/lib/Doctrine/ORM/ORMException.php +++ b/lib/Doctrine/ORM/ORMException.php @@ -1,4 +1,21 @@ . + */ namespace Doctrine\ORM; diff --git a/lib/Doctrine/ORM/OptimisticLockException.php b/lib/Doctrine/ORM/OptimisticLockException.php index 796a7588c..ad6cde1ea 100644 --- a/lib/Doctrine/ORM/OptimisticLockException.php +++ b/lib/Doctrine/ORM/OptimisticLockException.php @@ -1,7 +1,5 @@ columnNames[$field]; - $sql = $this->_getSQLTableAlias($class) . '.' . $class->getQuotedColumnName($field, $this->_platform); + $sql = $this->_getSQLTableAlias($class->name) . '.' . $class->getQuotedColumnName($field, $this->_platform); $columnAlias = $this->_platform->getSQLResultCasing($columnName . $this->_sqlAliasCounter++); if ( ! isset($this->_resultColumnNames[$columnAlias])) { $this->_resultColumnNames[$columnAlias] = $columnName; diff --git a/lib/Doctrine/ORM/Persisters/JoinedSubclassPersister.php b/lib/Doctrine/ORM/Persisters/JoinedSubclassPersister.php index 9a68749b7..fd3f9097b 100644 --- a/lib/Doctrine/ORM/Persisters/JoinedSubclassPersister.php +++ b/lib/Doctrine/ORM/Persisters/JoinedSubclassPersister.php @@ -1,7 +1,5 @@ Class Table Inheritance strategy. * * @author Roman Borschel - * @license http://www.opensource.org/licenses/lgpl-license.php LGPL - * @link www.doctrine-project.org * @since 2.0 * @see http://martinfowler.com/eaaCatalog/classTableInheritance.html */ @@ -116,19 +113,19 @@ class JoinedSubclassPersister extends AbstractEntityInheritancePersister $this->_class : $this->_em->getClassMetadata($this->_class->rootEntityName); $rootPersister = $this->_em->getUnitOfWork()->getEntityPersister($rootClass->name); $rootTableName = $rootClass->table['name']; - $rootTableStmt = $this->_conn->prepare($rootPersister->getInsertSQL()); + $rootTableStmt = $this->_conn->prepare($rootPersister->_getInsertSQL()); // Prepare statements for sub tables. $subTableStmts = array(); if ($rootClass !== $this->_class) { - $subTableStmts[$this->_class->table['name']] = $this->_conn->prepare($this->getInsertSQL()); + $subTableStmts[$this->_class->table['name']] = $this->_conn->prepare($this->_getInsertSQL()); } foreach ($this->_class->parentClasses as $parentClassName) { $parentClass = $this->_em->getClassMetadata($parentClassName); $parentTableName = $parentClass->table['name']; if ($parentClass !== $rootClass) { $parentPersister = $this->_em->getUnitOfWork()->getEntityPersister($parentClassName); - $subTableStmts[$parentTableName] = $this->_conn->prepare($parentPersister->getInsertSQL()); + $subTableStmts[$parentTableName] = $this->_conn->prepare($parentPersister->_getInsertSQL()); } } @@ -231,27 +228,30 @@ class JoinedSubclassPersister extends AbstractEntityInheritancePersister /** * {@inheritdoc} */ - protected function _getSelectEntitiesSQL(array &$criteria, $assoc = null, $orderBy = null) + protected function _getSelectEntitiesSQL(array $criteria, $assoc = null) { $idColumns = $this->_class->getIdentifierColumnNames(); - $baseTableAlias = $this->_getSQLTableAlias($this->_class); + $baseTableAlias = $this->_getSQLTableAlias($this->_class->name); + // Create the column list fragment only once if ($this->_selectColumnListSql === null) { // Add regular columns $columnList = ''; foreach ($this->_class->fieldMappings as $fieldName => $mapping) { if ($columnList != '') $columnList .= ', '; $columnList .= $this->_getSelectColumnSQL($fieldName, - isset($mapping['inherited']) ? $this->_em->getClassMetadata($mapping['inherited']) : $this->_class); + isset($mapping['inherited']) ? + $this->_em->getClassMetadata($mapping['inherited']) : + $this->_class); } // Add foreign key columns - foreach ($this->_class->associationMappings as $assoc) { - if ($assoc->isOwningSide && $assoc->isOneToOne()) { - $tableAlias = $assoc->inherited ? - $this->_getSQLTableAlias($this->_em->getClassMetadata($assoc->inherited)) + foreach ($this->_class->associationMappings as $assoc2) { + if ($assoc2->isOwningSide && $assoc2->isOneToOne()) { + $tableAlias = $assoc2->inherited ? + $this->_getSQLTableAlias($assoc2->inherited) : $baseTableAlias; - foreach ($assoc->targetToSourceKeyColumns as $srcColumn) { + foreach ($assoc2->targetToSourceKeyColumns as $srcColumn) { $columnAlias = $srcColumn . $this->_sqlAliasCounter++; $columnList .= ", $tableAlias.$srcColumn AS $columnAlias"; $resultColumnName = $this->_platform->getSQLResultCasing($columnAlias); @@ -262,12 +262,12 @@ class JoinedSubclassPersister extends AbstractEntityInheritancePersister } } - // Add discriminator column (DO NOT ALIAS THIS COLUMN, see StandardEntityPersister#_processSQLResultInheritanceAware). + // Add discriminator column (DO NOT ALIAS, see AbstractEntityInheritancePersister#_processSQLResult). $discrColumn = $this->_class->discriminatorColumn['name']; if ($this->_class->rootEntityName == $this->_class->name) { $columnList .= ", $baseTableAlias.$discrColumn"; } else { - $columnList .= ', ' . $this->_getSQLTableAlias($this->_em->getClassMetadata($this->_class->rootEntityName)) + $columnList .= ', ' . $this->_getSQLTableAlias($this->_class->rootEntityName) . ".$discrColumn"; } @@ -279,7 +279,7 @@ class JoinedSubclassPersister extends AbstractEntityInheritancePersister $joinSql = ''; foreach ($this->_class->parentClasses as $parentClassName) { $parentClass = $this->_em->getClassMetadata($parentClassName); - $tableAlias = $this->_getSQLTableAlias($parentClass); + $tableAlias = $this->_getSQLTableAlias($parentClassName); $joinSql .= ' INNER JOIN ' . $parentClass->getQuotedTableName($this->_platform) . ' ' . $tableAlias . ' ON '; $first = true; foreach ($idColumns as $idColumn) { @@ -291,7 +291,7 @@ class JoinedSubclassPersister extends AbstractEntityInheritancePersister // OUTER JOIN sub tables foreach ($this->_class->subClasses as $subClassName) { $subClass = $this->_em->getClassMetadata($subClassName); - $tableAlias = $this->_getSQLTableAlias($subClass); + $tableAlias = $this->_getSQLTableAlias($subClassName); if ($this->_selectColumnListSql === null) { // Add subclass columns @@ -326,27 +326,14 @@ class JoinedSubclassPersister extends AbstractEntityInheritancePersister } } - $conditionSql = ''; - foreach ($criteria as $field => $value) { - if ($conditionSql != '') $conditionSql .= ' AND '; - if (isset($this->_class->fieldMappings[$field]['inherited'])) { - $conditionSql .= $this->_getSQLTableAlias($this->_em->getClassMetadata($this->_class->fieldMappings[$field]['inherited'])) . '.'; - } else { - $conditionSql .= $baseTableAlias . '.'; - } - if (isset($this->_class->columnNames[$field])) { - $conditionSql .= $this->_class->getQuotedColumnName($field, $this->_platform); - } else if ($assoc !== null) { - $conditionSql .= $field; - } else { - throw ORMException::unrecognizedField($field); - } - $conditionSql .= ' = ?'; - } + $joinSql .= $assoc != null && $assoc->isManyToMany() ? + $this->_getSelectManyToManyJoinSQL($assoc) : ''; + + $conditionSql = $this->_getSelectConditionSQL($criteria, $assoc); $orderBySql = ''; - if ($orderBy !== null) { - $orderBySql = $this->_getCollectionOrderBySQL($orderBy, $baseTableAlias); + if ($assoc != null && isset($assoc->orderBy)) { + $orderBySql = $this->_getCollectionOrderBySQL($assoc->orderBy, $baseTableAlias); } if ($this->_selectColumnListSql === null) { @@ -359,10 +346,10 @@ class JoinedSubclassPersister extends AbstractEntityInheritancePersister . ($conditionSql != '' ? ' WHERE ' . $conditionSql : '') . $orderBySql; } - /** Ensure this method is never called. This persister overrides _getSelectEntitiesSQL directly. */ + /* Ensure this method is never called. This persister overrides _getSelectEntitiesSQL directly. */ protected function _getSelectColumnListSQL() { - throw new \BadMethodCallException("Illegal invocation of ".__METHOD__." on JoinedSubclassPersister."); + throw new \BadMethodCallException("Illegal invocation of ".__METHOD__."."); } /** {@inheritdoc} */ @@ -398,17 +385,4 @@ class JoinedSubclassPersister extends AbstractEntityInheritancePersister return $columns; } - - /** - * Gets the SQL to select a collection of entities in a many-many association. - * - * @param ManyToManyMapping $manyToMany - * @param array $criteria - * @return string - */ - protected function _getSelectManyToManyEntityCollectionSQL($manyToMany, array &$criteria) - { - // @todo - throw new \BadMethodCallException("Not yet implemented, see http://www.doctrine-project.org/jira/browse/DDC-342"); - } } diff --git a/lib/Doctrine/ORM/Persisters/SingleTablePersister.php b/lib/Doctrine/ORM/Persisters/SingleTablePersister.php index 5f5a8a4d7..3f7574cba 100644 --- a/lib/Doctrine/ORM/Persisters/SingleTablePersister.php +++ b/lib/Doctrine/ORM/Persisters/SingleTablePersister.php @@ -41,24 +41,25 @@ class SingleTablePersister extends AbstractEntityInheritancePersister protected function _getSelectColumnListSQL() { $columnList = parent::_getSelectColumnListSQL(); + // Append discriminator column $discrColumn = $this->_class->discriminatorColumn['name']; $columnList .= ", $discrColumn"; $rootClass = $this->_em->getClassMetadata($this->_class->rootEntityName); - $tableAlias = $this->_getSQLTableAlias($rootClass); + $tableAlias = $this->_getSQLTableAlias($rootClass->name); $resultColumnName = $this->_platform->getSQLResultCasing($discrColumn); $this->_resultColumnNames[$resultColumnName] = $discrColumn; + // Append subclass columns foreach ($this->_class->subClasses as $subClassName) { $subClass = $this->_em->getClassMetadata($subClassName); - // Append subclass columns + // Regular columns foreach ($subClass->fieldMappings as $fieldName => $mapping) { if ( ! isset($mapping['inherited'])) { $columnList .= ', ' . $this->_getSelectColumnSQL($fieldName, $subClass); } } - - // Append subclass foreign keys + // Foreign key columns foreach ($subClass->associationMappings as $assoc) { if ($assoc->isOwningSide && $assoc->isOneToOne() && ! $assoc->inherited) { foreach ($assoc->targetToSourceKeyColumns as $srcColumn) { @@ -87,14 +88,27 @@ class SingleTablePersister extends AbstractEntityInheritancePersister } /** {@inheritdoc} */ - protected function _getSQLTableAlias(ClassMetadata $class) + protected function _getSQLTableAlias($className) { - if (isset($this->_sqlTableAliases[$class->rootEntityName])) { - return $this->_sqlTableAliases[$class->rootEntityName]; - } - $tableAlias = $this->_em->getClassMetadata($class->rootEntityName)->table['name'][0] . $this->_sqlAliasCounter++; - $this->_sqlTableAliases[$class->rootEntityName] = $tableAlias; + return parent::_getSQLTableAlias($this->_class->rootEntityName); + } - return $tableAlias; + /** {@inheritdoc} */ + protected function _getSelectConditionSQL(array $criteria, $assoc = null) + { + $conditionSql = parent::_getSelectConditionSQL($criteria, $assoc); + + // Append discriminator condition + if ($conditionSql) $conditionSql .= ' AND '; + $values = array($this->_conn->quote($this->_class->discriminatorValue)); + $discrValues = array_flip($this->_class->discriminatorMap); + foreach ($this->_class->subClasses as $subclassName) { + $values[] = $this->_conn->quote($discrValues[$subclassName]); + } + $conditionSql .= $this->_getSQLTableAlias($this->_class->name) . '.' + . $this->_class->discriminatorColumn['name'] + . ' IN (' . implode(', ', $values) . ')'; + + return $conditionSql; } } \ No newline at end of file diff --git a/lib/Doctrine/ORM/Persisters/StandardEntityPersister.php b/lib/Doctrine/ORM/Persisters/StandardEntityPersister.php index f599cc74b..29c04c09d 100644 --- a/lib/Doctrine/ORM/Persisters/StandardEntityPersister.php +++ b/lib/Doctrine/ORM/Persisters/StandardEntityPersister.php @@ -1,7 +1,5 @@ - * @author Giorgio Sironi - * @license http://www.opensource.org/licenses/lgpl-license.php LGPL - * @since 2.0 + * 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: + * + * - {@link addInsert} : To schedule an entity for insertion. + * - {@link executeInserts} : To execute all scheduled insertions. + * - {@link update} : To update the persistent state of an entity. + * - {@link delete} : To delete the persistent state of an entity. + * + * 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: + * + * - {@link load} : Loads (the state of) a single, managed entity. + * - {@link loadAll} : Loads multiple, managed entities. + * - {@link loadOneToOneEntity} : Loads a one/many-to-one association (lazy-loading). + * - {@link loadOneToManyCollection} : Loads a one-to-many association (lazy-loading). + * - {@link loadManyToManyCollection} : Loads a many-to-many association (lazy-loading). + * + * 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. + * + * @author Roman Borschel + * @author Giorgio Sironi + * @since 2.0 * @todo Rename: BasicEntityPersister */ class StandardEntityPersister @@ -50,16 +82,16 @@ class StandardEntityPersister protected $_class; /** - * The underlying Connection of the used EntityManager. + * The underlying DBAL Connection of the used EntityManager. * * @var Doctrine\DBAL\Connection $conn */ protected $_conn; - + /** * The database platform. * - * @var AbstractPlatform + * @var Doctrine\DBAL\Platforms\AbstractPlatform */ protected $_platform; @@ -87,8 +119,8 @@ class StandardEntityPersister protected $_resultColumnNames = array(); /** - * The map of column names to DBAL mapping types of all prepared columns used when INSERTing - * or UPDATEing an entity. + * The map of column names to DBAL mapping types of all prepared columns used + * when INSERTing or UPDATEing an entity. * * @var array * @see _prepareInsertData($entity) @@ -143,9 +175,9 @@ class StandardEntityPersister /** * Adds an entity to the queued insertions. - * The entity remains queued until {@link executeInserts()} is invoked. + * The entity remains queued until {@link executeInserts} is invoked. * - * @param object $entity The entitiy to queue for insertion. + * @param object $entity The entity to queue for insertion. */ public function addInsert($entity) { @@ -171,7 +203,7 @@ class StandardEntityPersister $idGen = $this->_class->idGenerator; $isPostInsertId = $idGen->isPostInsertGenerator(); - $stmt = $this->_conn->prepare($this->getInsertSQL()); + $stmt = $this->_conn->prepare($this->_getInsertSQL()); $tableName = $this->_class->table['name']; foreach ($this->_queuedInserts as $entity) { @@ -209,9 +241,9 @@ class StandardEntityPersister * by the preceding INSERT statement and assigns it back in to the * entities version field. * - * @param $class - * @param $entity - * @param $id + * @param Doctrine\ORM\Mapping\ClassMetadata $class + * @param object $entity + * @param mixed $id */ protected function _assignDefaultVersionValue($class, $entity, $id) { @@ -226,7 +258,16 @@ class StandardEntityPersister } /** - * Updates an entity. + * Updates a managed entity. The entity is updated according to its current changeset + * in the running UnitOfWork. If there is no changeset, nothing is updated. + * + * The data to update is retrieved through {@link _prepareUpdateData}. + * Subclasses that override this method are supposed to obtain the update data + * in the same way, through {@link _prepareUpdateData}. + * + * Subclasses are also supposed to take care of versioning when overriding this method, + * if necessary. The {@link _updateTable} method can be used to apply the data retrieved + * from {@_prepareUpdateData} on the target tables, thereby optionally applying versioning. * * @param object $entity The entity to update. */ @@ -241,14 +282,14 @@ class StandardEntityPersister /** * Performs an UPDATE statement for an entity on a specific table. - * The UPDATE can be optionally versioned, which requires the entity to have a version field. + * The UPDATE can optionally be versioned, which requires the entity to have a version field. * * @param object $entity The entity object being updated. * @param string $tableName The name of the table to apply the UPDATE on. * @param array $updateData The map of columns to update (column => value). * @param boolean $versioned Whether the UPDATE should be versioned. */ - protected function _updateTable($entity, $tableName, $updateData, $versioned = false) + protected final function _updateTable($entity, $tableName, array $updateData, $versioned = false) { $set = $params = $types = array(); @@ -261,7 +302,7 @@ class StandardEntityPersister $params[] = $value; $types[] = $this->_columnTypes[$columnName]; } - + $where = array(); $id = $this->_em->getUnitOfWork()->getEntityIdentifier($entity); foreach ($this->_class->identifier as $idField) { @@ -284,7 +325,7 @@ class StandardEntityPersister $types[] = $this->_class->fieldMappings[$versionField]['type']; } - $sql = 'UPDATE ' . $tableName . ' SET ' . implode(', ', $set) + $sql = "UPDATE $tableName SET " . implode(', ', $set) . ' WHERE ' . implode(' = ? AND ', $where) . ' = ?'; $result = $this->_conn->executeUpdate($sql, $params, $types); @@ -295,7 +336,12 @@ class StandardEntityPersister } /** - * Deletes an entity. + * Deletes a managed entity. + * + * The entity to delete must be managed and have a persistent identifier. + * The deletion happens instantaneously. + * + * Subclasses may override this method to customize the semantics of entity deletion. * * @param object $entity The entity to delete. */ @@ -319,7 +365,9 @@ class StandardEntityPersister } /** - * Prepares the data changeset of an entity for database insertion. + * Prepares the changeset of an entity for database insertion (UPDATE). + * + * The changeset is obtained from the currently running UnitOfWork. * * During this preparation the array that is passed as the second parameter is filled with * => pairs, grouped by table name. @@ -333,8 +381,6 @@ class StandardEntityPersister * ) * * - * Notes to inheritors: Be sure to call parent::_prepareData($entity, $result, $isInsert); - * * @param object $entity The entity for which to prepare the data. * @return array The prepared data. */ @@ -348,7 +394,7 @@ class StandardEntityPersister } foreach ($uow->getEntityChangeSet($entity) as $field => $change) { - if ($versioned && $versionField == $field) { + if ($versioned && $versionField == $field) { //TODO: Needed? continue; } @@ -356,9 +402,9 @@ class StandardEntityPersister $newVal = $change[1]; if (isset($this->_class->associationMappings[$field])) { - $assocMapping = $this->_class->associationMappings[$field]; + $assoc = $this->_class->associationMappings[$field]; // Only owning side of x-1 associations can have a FK column. - if ( ! $assocMapping->isOwningSide || ! $assocMapping->isOneToOne()) { + if ( ! $assoc->isOwningSide || ! $assoc->isOneToOne()) { continue; } @@ -379,10 +425,10 @@ class StandardEntityPersister $newValId = $uow->getEntityIdentifier($newVal); } - $targetClass = $this->_em->getClassMetadata($assocMapping->targetEntityName); + $targetClass = $this->_em->getClassMetadata($assoc->targetEntityName); $owningTable = $this->getOwningTable($field); - foreach ($assocMapping->sourceToTargetKeyColumns as $sourceColumn => $targetColumn) { + foreach ($assoc->sourceToTargetKeyColumns as $sourceColumn => $targetColumn) { if ($newVal === null) { $result[$owningTable][$sourceColumn] = null; } else { @@ -399,6 +445,16 @@ class StandardEntityPersister return $result; } + /** + * Prepares the data changeset of a managed entity for database insertion (initial INSERT). + * The changeset of the entity is obtained from the currently running UnitOfWork. + * + * The default insert data preparation is the same as for updates. + * + * @param object $entity The entity for which to prepare the data. + * @return array The prepared data for the tables to update. + * @see _prepareUpdateData + */ protected function _prepareInsertData($entity) { return $this->_prepareUpdateData($entity); @@ -407,8 +463,12 @@ class StandardEntityPersister /** * Gets the name of the table that owns the column the given field is mapped to. * - * @param string $fieldName - * @return string + * The default implementation in BasicEntityPersister always returns the name + * of the table the entity type of this persister is mapped to, since an entity + * is always persisted to a single table with a BasicEntityPersister. + * + * @param string $fieldName The field name. + * @return string The table name. */ public function getOwningTable($fieldName) { @@ -423,13 +483,13 @@ class StandardEntityPersister * a new entity is created. * @param $assoc The association that connects the entity to load to another entity, if any. * @param array $hints Hints for entity creation. - * @return The loaded entity instance or NULL if the entity/the data can not be found. + * @return object The loaded and managed entity instance or NULL if the entity can not be found. + * @todo Check identity map? loadById method? Try to guess whether $criteria is the id? */ public function load(array $criteria, $entity = null, $assoc = null, array $hints = array()) { $sql = $this->_getSelectEntitiesSQL($criteria, $assoc); - $params = array_values($criteria); - $stmt = $this->_conn->executeQuery($sql, $params); + $stmt = $this->_conn->executeQuery($sql, array_values($criteria)); $result = $stmt->fetch(PDO::FETCH_ASSOC); $stmt->closeCursor(); @@ -437,17 +497,80 @@ class StandardEntityPersister } /** - * Refreshes an entity. + * Loads an entity of this persister's mapped class as part of a single-valued + * association from another entity. + * + * @param OneToOneMapping $assoc The association to load. + * @param object $sourceEntity The entity that owns the association (not necessarily the "owning side"). + * @param object $targetEntity The existing ghost entity (proxy) to load, if any. + * @param array $identifier The identifier of the entity to load. Must be provided if + * the association to load represents the owning side, otherwise + * the identifier is derived from the $sourceEntity. + * @return object The loaded and managed entity instance or NULL if the entity can not be found. + */ + public function loadOneToOneEntity(OneToOneMapping $assoc, $sourceEntity, $targetEntity, array $identifier = array()) + { + $targetClass = $this->_em->getClassMetadata($assoc->targetEntityName); + + if ($assoc->isOwningSide) { + // Mark inverse side as fetched in the hints, otherwise the UoW would + // try to load it in a separate query (remember: to-one inverse sides can not be lazy). + $hints = array(); + if ($assoc->inversedBy) { + $hints['fetched'][$targetClass->name][$assoc->inversedBy] = true; + if ($targetClass->subClasses) { + foreach ($targetClass->subClasses as $targetSubclassName) { + $hints['fetched'][$targetSubclassName][$assoc->inversedBy] = true; + } + } + } + /* cascade read-only status + if ($this->_em->getUnitOfWork()->isReadOnly($sourceEntity)) { + $hints[Query::HINT_READ_ONLY] = true; + } + */ + + $targetEntity = $this->load($identifier, $targetEntity, $assoc, $hints); + + // Complete bidirectional association, if necessary + if ($targetEntity !== null && $assoc->inversedBy && ! $targetClass->isCollectionValuedAssociation($assoc->inversedBy)) { + $targetClass->reflFields[$assoc->inversedBy]->setValue($targetEntity, $sourceEntity); + } + } else { + $sourceClass = $this->_em->getClassMetadata($assoc->sourceEntityName); + $owningAssoc = $targetClass->getAssociationMapping($assoc->mappedBy); + // TRICKY: since the association is specular source and target are flipped + foreach ($owningAssoc->targetToSourceKeyColumns as $sourceKeyColumn => $targetKeyColumn) { + if (isset($sourceClass->fieldNames[$sourceKeyColumn])) { + $identifier[$targetKeyColumn] = $sourceClass->reflFields[$sourceClass->fieldNames[$sourceKeyColumn]]->getValue($sourceEntity); + } else { + throw MappingException::joinColumnMustPointToMappedField( + $sourceClass->name, $sourceKeyColumn + ); + } + } + + $targetEntity = $this->load($identifier, $targetEntity, $assoc); + + if ($targetEntity !== null) { + $targetClass->setFieldValue($targetEntity, $assoc->mappedBy, $sourceEntity); + } + } + + return $targetEntity; + } + + /** + * Refreshes a managed entity. * - * @param array $id The identifier of the entity as an associative array from column names to values. + * @param array $id The identifier of the entity as an associative array from + * column or field names to values. * @param object $entity The entity to refresh. */ public function refresh(array $id, $entity) { $sql = $this->_getSelectEntitiesSQL($id); - $params = array_values($id); - - $stmt = $this->_conn->executeQuery($sql, $params); + $stmt = $this->_conn->executeQuery($sql, array_values($id)); $result = $stmt->fetch(PDO::FETCH_ASSOC); $stmt->closeCursor(); @@ -527,10 +650,8 @@ class StandardEntityPersister public function loadAll(array $criteria = array()) { $entities = array(); - $sql = $this->_getSelectEntitiesSQL($criteria); - $params = array_values($criteria); - $stmt = $this->_conn->executeQuery($sql, $params); + $stmt = $this->_conn->executeQuery($sql, array_values($criteria)); $result = $stmt->fetchAll(PDO::FETCH_ASSOC); $stmt->closeCursor(); @@ -541,37 +662,44 @@ class StandardEntityPersister return $entities; } - /** - * Loads a collection of entities in a one-to-many association. - * - * @param OneToManyMapping $assoc - * @param array $criteria The criteria by which to select the entities. - * @param PersistentCollection The collection to fill. - */ - public function loadOneToManyCollection($assoc, array $criteria, PersistentCollection $coll) - { - $owningAssoc = $this->_class->associationMappings[$coll->getMapping()->mappedBy]; - $sql = $this->_getSelectEntitiesSQL($criteria, $owningAssoc, $assoc->orderBy); - $params = array_values($criteria); - $stmt = $this->_conn->executeQuery($sql, $params); - while ($result = $stmt->fetch(PDO::FETCH_ASSOC)) { - $coll->hydrateAdd($this->_createEntity($result)); - } - $stmt->closeCursor(); - } - /** * Loads a collection of entities of a many-to-many association. * - * @param ManyToManyMapping $assoc - * @param array $criteria + * @param ManyToManyMapping $assoc The association mapping of the association being loaded. + * @param object $sourceEntity The entity that owns the collection. * @param PersistentCollection $coll The collection to fill. */ - public function loadManyToManyCollection($assoc, array $criteria, PersistentCollection $coll) + public function loadManyToManyCollection(ManyToManyMapping $assoc, $sourceEntity, PersistentCollection $coll) { - $sql = $this->_getSelectManyToManyEntityCollectionSQL($assoc, $criteria); - $params = array_values($criteria); - $stmt = $this->_conn->executeQuery($sql, $params); + $criteria = array(); + $sourceClass = $this->_em->getClassMetadata($assoc->sourceEntityName); + $joinTableConditions = array(); + if ($assoc->isOwningSide) { + foreach ($assoc->relationToSourceKeyColumns as $relationKeyColumn => $sourceKeyColumn) { + if (isset($sourceClass->fieldNames[$sourceKeyColumn])) { + $criteria[$relationKeyColumn] = $sourceClass->reflFields[$sourceClass->fieldNames[$sourceKeyColumn]]->getValue($sourceEntity); + } else { + throw MappingException::joinColumnMustPointToMappedField( + $sourceClass->name, $sourceKeyColumn + ); + } + } + } else { + $owningAssoc = $this->_em->getClassMetadata($assoc->targetEntityName)->associationMappings[$assoc->mappedBy]; + // TRICKY: since the association is inverted source and target are flipped + foreach ($owningAssoc->relationToTargetKeyColumns as $relationKeyColumn => $sourceKeyColumn) { + if (isset($sourceClass->fieldNames[$sourceKeyColumn])) { + $criteria[$relationKeyColumn] = $sourceClass->reflFields[$sourceClass->fieldNames[$sourceKeyColumn]]->getValue($sourceEntity); + } else { + throw MappingException::joinColumnMustPointToMappedField( + $sourceClass->name, $sourceKeyColumn + ); + } + } + } + + $sql = $this->_getSelectEntitiesSQL($criteria, $assoc); + $stmt = $this->_conn->executeQuery($sql, array_values($criteria)); while ($result = $stmt->fetch(PDO::FETCH_ASSOC)) { $coll->hydrateAdd($this->_createEntity($result)); } @@ -613,10 +741,15 @@ class StandardEntityPersister /** * Processes an SQL result set row that contains data for an entity of the type * this persister is responsible for. + * + * Subclasses are supposed to override this method if they need to change the + * hydration procedure for entities loaded through basic find operations or + * lazy-loading (not DQL). * * @param array $sqlResult The SQL result set row to process. * @return array A tuple where the first value is the actual type of the entity and - * the second value the prepared data of the entity. + * the second value the prepared data of the entity (a map from field + * names to values). */ protected function _processSQLResult(array $sqlResult) { @@ -640,51 +773,37 @@ class StandardEntityPersister * * @param array $criteria * @param AssociationMapping $assoc - * @param string $orderBy * @return string + * @todo Refactor: _getSelectSQL(...) */ - protected function _getSelectEntitiesSQL(array &$criteria, $assoc = null, $orderBy = null) + protected function _getSelectEntitiesSQL(array $criteria, $assoc = null) { - // Construct WHERE conditions - $conditionSql = ''; - foreach ($criteria as $field => $value) { - if ($conditionSql != '') { - $conditionSql .= ' AND '; - } - - if (isset($this->_class->columnNames[$field])) { - $conditionSql .= $this->_class->getQuotedColumnName($field, $this->_platform); - } else if (isset($this->_class->fieldNames[$field])) { - $conditionSql .= $this->_class->getQuotedColumnName($this->_class->fieldNames[$field], $this->_platform); - } else if ($assoc !== null) { - $conditionSql .= $field; - } else { - throw ORMException::unrecognizedField($field); - } - $conditionSql .= ' = ?'; - } + $joinSql = $assoc != null && $assoc->isManyToMany() ? + $this->_getSelectManyToManyJoinSQL($assoc) : ''; - $orderBySql = ''; - if ($orderBy !== null) { - $orderBySql = $this->_getCollectionOrderBySQL( - $orderBy, $this->_getSQLTableAlias($this->_class) - ); - } + $conditionSql = $this->_getSelectConditionSQL($criteria, $assoc); + + $orderBySql = $assoc !== null && isset($assoc->orderBy) ? + $this->_getCollectionOrderBySQL($assoc->orderBy, $this->_getSQLTableAlias($this->_class->name)) + : ''; return 'SELECT ' . $this->_getSelectColumnListSQL() . ' FROM ' . $this->_class->getQuotedTableName($this->_platform) . ' ' - . $this->_getSQLTableAlias($this->_class) - . ($conditionSql ? ' WHERE ' . $conditionSql : '') . $orderBySql; + . $this->_getSQLTableAlias($this->_class->name) + . $joinSql + . ($conditionSql ? ' WHERE ' . $conditionSql : '') + . $orderBySql; } /** - * Generate ORDER BY SQL snippet for ordered collections. + * Gets the ORDER BY SQL snippet for ordered collections. * * @param array $orderBy * @param string $baseTableAlias * @return string + * @todo Rename: _getOrderBySQL */ - protected function _getCollectionOrderBySQL(array $orderBy, $baseTableAlias) + protected final function _getCollectionOrderBySQL(array $orderBy, $baseTableAlias) { $orderBySql = ''; foreach ($orderBy as $fieldName => $orientation) { @@ -693,27 +812,28 @@ class StandardEntityPersister } $tableAlias = isset($this->_class->fieldMappings[$fieldName]['inherited']) ? - $this->_getSQLTableAlias($this->_em->getClassMetadata($this->_class->fieldMappings[$fieldName]['inherited'])) + $this->_getSQLTableAlias($this->_class->fieldMappings[$fieldName]['inherited']) : $baseTableAlias; $columnName = $this->_class->getQuotedColumnName($fieldName, $this->_platform); - if ($orderBySql != '') { - $orderBySql .= ', '; - } else { - $orderBySql = ' ORDER BY '; - } + $orderBySql .= $orderBySql ? ', ' : 'ORDER BY '; $orderBySql .= $tableAlias . '.' . $columnName . ' ' . $orientation; } return $orderBySql; } - + /** * Gets the SQL fragment with the list of columns to select when querying for - * an entity within this persister. + * an entity in this persister. + * + * Subclasses should override this method to alter or change the select column + * list SQL fragment. Note that in the implementation of StandardEntityPersister + * the resulting SQL fragment is generated only once and cached in {@link _selectColumnListSql}. + * Subclasses may or may not do the same. * * @return string The SQL fragment. - * @todo Rename: _getSelectColumnListSQL() + * @todo Rename: _getSelectColumnsSQL() */ protected function _getSelectColumnListSQL() { @@ -725,7 +845,7 @@ class StandardEntityPersister // Add regular columns to select list foreach ($this->_class->fieldNames as $field) { - if ($columnList != '') $columnList .= ', '; + if ($columnList) $columnList .= ', '; $columnList .= $this->_getSelectColumnSQL($field, $this->_class); } @@ -733,15 +853,15 @@ class StandardEntityPersister return $this->_selectColumnListSql; } - + /** - * Gets the SQL to select a collection of entities in a many-many association. + * Gets the SQL join fragment used when selecting entities from a + * many-to-many association. * * @param ManyToManyMapping $manyToMany - * @param array $criteria * @return string */ - protected function _getSelectManyToManyEntityCollectionSQL($manyToMany, array &$criteria) + protected function _getSelectManyToManyJoinSQL(ManyToManyMapping $manyToMany) { if ($manyToMany->isOwningSide) { $owningAssoc = $manyToMany; @@ -756,32 +876,12 @@ class StandardEntityPersister $joinSql = ''; foreach ($joinClauses as $joinTableColumn => $sourceColumn) { if ($joinSql != '') $joinSql .= ' AND '; - $joinSql .= $this->_getSQLTableAlias($this->_class) . + $joinSql .= $this->_getSQLTableAlias($this->_class->name) . '.' . $this->_class->getQuotedColumnName($this->_class->fieldNames[$sourceColumn], $this->_platform) . ' = ' . $joinTableName . '.' . $joinTableColumn; } - $joinSql = ' INNER JOIN ' . $joinTableName . ' ON ' . $joinSql; - - $conditionSql = ''; - foreach ($criteria as $joinColumn => $value) { - if ($conditionSql != '') $conditionSql .= ' AND '; - $columnName = $joinTableName . '.' . $joinColumn; - $conditionSql .= $columnName . ' = ?'; - } - - $orderBySql = ''; - if ($manyToMany->orderBy !== null) { - $orderBySql = $this->_getCollectionOrderBySQL( - $manyToMany->orderBy, $this->_getSQLTableAlias($this->_class) - ); - } - - return 'SELECT ' . $this->_getSelectColumnListSQL() - . ' FROM ' . $this->_class->getQuotedTableName($this->_platform) . ' ' - . $this->_getSQLTableAlias($this->_class) - . $joinSql - . ' WHERE ' . $conditionSql . $orderBySql; + return " INNER JOIN $joinTableName ON $joinSql"; } /** @@ -789,19 +889,36 @@ class StandardEntityPersister * * @return string */ - public function getInsertSQL() + protected function _getInsertSQL() { if ($this->_insertSql === null) { - $this->_insertSql = $this->_generateInsertSQL(); + $insertSql = ''; + $columns = $this->_getInsertColumnList(); + if (empty($columns)) { + $insertSql = $this->_platform->getEmptyIdentityInsertSQL( + $this->_class->getQuotedTableName($this->_platform), + $this->_class->getQuotedColumnName($this->_class->identifier[0], $this->_platform) + ); + } else { + $columns = array_unique($columns); + $values = array_fill(0, count($columns), '?'); + + $insertSql = 'INSERT INTO ' . $this->_class->getQuotedTableName($this->_platform) + . ' (' . implode(', ', $columns) . ') ' + . 'VALUES (' . implode(', ', $values) . ')'; + } + $this->_insertSql = $insertSql; } return $this->_insertSql; } /** * Gets the list of columns to put in the INSERT SQL statement. - * + * + * Subclasses should override this method to alter or change the list of + * columns placed in the INSERT statements used by the persister. + * * @return array The list of columns. - * @internal INSERT SQL is cached by getInsertSQL() per request. */ protected function _getInsertColumnList() { @@ -826,33 +943,6 @@ class StandardEntityPersister return $columns; } - /** - * Generates the INSERT SQL used by the persister to persist entities. - * - * @return string - * @internal Result is cached by getInsertSQL() per request. - */ - protected function _generateInsertSQL() - { - $insertSql = ''; - $columns = $this->_getInsertColumnList(); - if (empty($columns)) { - $insertSql = $this->_platform->getEmptyIdentityInsertSQL( - $this->_class->getQuotedTableName($this->_platform), - $this->_class->getQuotedColumnName($this->_class->identifier[0], $this->_platform) - ); - } else { - $columns = array_unique($columns); - $values = array_fill(0, count($columns), '?'); - - $insertSql = 'INSERT INTO ' . $this->_class->getQuotedTableName($this->_platform) - . ' (' . implode(', ', $columns) . ') ' - . 'VALUES (' . implode(', ', $values) . ')'; - } - - return $insertSql; - } - /** * Gets the SQL snippet of a qualified column name for the given field name. * @@ -863,7 +953,7 @@ class StandardEntityPersister protected function _getSelectColumnSQL($field, ClassMetadata $class) { $columnName = $class->columnNames[$field]; - $sql = $this->_getSQLTableAlias($class) . '.' . $class->getQuotedColumnName($field, $this->_platform); + $sql = $this->_getSQLTableAlias($class->name) . '.' . $class->getQuotedColumnName($field, $this->_platform); $columnAlias = $this->_platform->getSQLResultCasing($columnName . $this->_sqlAliasCounter++); if ( ! isset($this->_resultColumnNames[$columnAlias])) { $this->_resultColumnNames[$columnAlias] = $columnName; @@ -875,17 +965,19 @@ class StandardEntityPersister /** * Gets the SQL snippet for all join columns of the given class that are to be * placed in an SQL SELECT statement. - * + * + * @param $class * @return string + * @todo Not reused... inline? */ - protected function _getSelectJoinColumnsSQL(ClassMetadata $class) + private function _getSelectJoinColumnsSQL(ClassMetadata $class) { $sql = ''; foreach ($class->associationMappings as $assoc) { if ($assoc->isOwningSide && $assoc->isOneToOne()) { foreach ($assoc->targetToSourceKeyColumns as $srcColumn) { $columnAlias = $srcColumn . $this->_sqlAliasCounter++; - $sql .= ', ' . $this->_getSQLTableAlias($this->_class) . ".$srcColumn AS $columnAlias"; + $sql .= ', ' . $this->_getSQLTableAlias($this->_class->name) . ".$srcColumn AS $columnAlias"; $resultColumnName = $this->_platform->getSQLResultCasing($columnAlias); if ( ! isset($this->_resultColumnNames[$resultColumnName])) { $this->_resultColumnNames[$resultColumnName] = $srcColumn; @@ -898,19 +990,92 @@ class StandardEntityPersister } /** - * Gets the SQL table alias for the given class. + * Gets the SQL table alias for the given class name. * - * @param ClassMetadata $class + * @param string $className * @return string The SQL table alias. + * @todo Remove. Binding table aliases to class names is not such a good idea. */ - protected function _getSQLTableAlias(ClassMetadata $class) + protected function _getSQLTableAlias($className) { - if (isset($this->_sqlTableAliases[$class->name])) { - return $this->_sqlTableAliases[$class->name]; + if (isset($this->_sqlTableAliases[$className])) { + return $this->_sqlTableAliases[$className]; } - $tableAlias = $class->table['name'][0] . $this->_sqlAliasCounter++; - $this->_sqlTableAliases[$class->name] = $tableAlias; + $tableAlias = 't' . $this->_sqlAliasCounter++; + $this->_sqlTableAliases[$className] = $tableAlias; return $tableAlias; } + + /** + * Gets the conditional SQL fragment used in the WHERE clause when selecting + * entities in this persister. + * + * Subclasses are supposed to override this method if they intend to change + * or alter the criteria by which entities are selected. + * + * @param array $criteria + * @param AssociationMapping $assoc + * @return string + */ + protected function _getSelectConditionSQL(array $criteria, $assoc = null) + { + $conditionSql = ''; + foreach ($criteria as $field => $value) { + $conditionSql .= $conditionSql ? ' AND ' : ''; + + if (isset($this->_class->columnNames[$field])) { + if (isset($this->_class->fieldMappings[$field]['inherited'])) { + $conditionSql .= $this->_getSQLTableAlias($this->_class->fieldMappings[$field]['inherited']) . '.'; + } else { + $conditionSql .= $this->_getSQLTableAlias($this->_class->name) . '.'; + } + $conditionSql .= $this->_class->getQuotedColumnName($field, $this->_platform); + } else if ($assoc !== null) { + if ($assoc->isManyToMany()) { + $owningAssoc = $assoc->isOwningSide ? $assoc : $this->_em->getClassMetadata($assoc->targetEntityName) + ->associationMappings[$assoc->mappedBy]; + $conditionSql .= $owningAssoc->getQuotedJoinTableName($this->_platform) . '.' . $field; + } else { + $conditionSql .= $field; + } + } else { + throw ORMException::unrecognizedField($field); + } + $conditionSql .= ' = ?'; + } + + return $conditionSql; + } + + /** + * Loads a collection of entities in a one-to-many association. + * + * @param OneToManyMapping $assoc + * @param array $criteria The criteria by which to select the entities. + * @param PersistentCollection The collection to load/fill. + */ + public function loadOneToManyCollection(OneToManyMapping $assoc, $sourceEntity, PersistentCollection $coll) + { + $criteria = array(); + $owningAssoc = $this->_class->associationMappings[$assoc->mappedBy]; + $sourceClass = $this->_em->getClassMetadata($assoc->sourceEntityName); + foreach ($owningAssoc->targetToSourceKeyColumns as $sourceKeyColumn => $targetKeyColumn) { + $criteria[$targetKeyColumn] = $sourceClass->reflFields[$sourceClass->fieldNames[$sourceKeyColumn]]->getValue($sourceEntity); + } + + $sql = $this->_getSelectEntitiesSQL($criteria, $assoc); + $params = array_values($criteria); + $stmt = $this->_conn->executeQuery($sql, $params); + while ($result = $stmt->fetch(PDO::FETCH_ASSOC)) { + $coll->hydrateAdd($this->_createEntity($result)); + } + $stmt->closeCursor(); + } + + //TODO + /*protected function _getOneToOneEagerFetchSQL() + { + + }*/ } diff --git a/lib/Doctrine/ORM/Proxy/ProxyFactory.php b/lib/Doctrine/ORM/Proxy/ProxyFactory.php index d4e255dcb..fceab4023 100644 --- a/lib/Doctrine/ORM/Proxy/ProxyFactory.php +++ b/lib/Doctrine/ORM/Proxy/ProxyFactory.php @@ -1,7 +1,5 @@ ProxyFactory class that is - * connected to the given EntityManager. - * - * @param EntityManager $em The EntityManager the new factory works for. - * @param string $proxyDir The directory to use for the proxy classes. It must exist. - * @param string $proxyNs The namespace to use for the proxy classes. - * @param boolean $autoGenerate Whether to automatically generate proxy classes. + * Initializes a new instance of the ProxyFactory class that is + * connected to the given EntityManager. + * + * @param EntityManager $em The EntityManager the new factory works for. + * @param string $proxyDir The directory to use for the proxy classes. It must exist. + * @param string $proxyNs The namespace to use for the proxy classes. + * @param boolean $autoGenerate Whether to automatically generate proxy classes. */ public function __construct(EntityManager $em, $proxyDir, $proxyNs, $autoGenerate = false) { @@ -240,7 +238,7 @@ class ProxyFactory return $sleepImpl; } - /** Reference Proxy class code template */ + /** Proxy class code template */ private static $_proxyClassTemplate = '_selectedClasses AS $dqlAlias => $class) { $qComp = $this->_queryComponents[$dqlAlias]; - if (isset($qComp['relation']) && ($qComp['relation']->isManyToMany() || $qComp['relation']->isOneToMany()) - && $qComp['relation']->orderBy != null) { - + if (isset($qComp['relation']->orderBy)) { foreach ($qComp['relation']->orderBy AS $fieldName => $orientation) { if ($qComp['metadata']->isInheritanceTypeJoined()) { $tableName = $this->_em->getUnitOfWork()->getEntityPersister($class->name)->getOwningTable($fieldName); @@ -299,8 +297,8 @@ class SqlWalker implements TreeWalker if ($sql != '') { $sql .= ', '; } - $sql .= $this->getSqlTableAlias($tableName, $dqlAlias) . "." . - $qComp['metadata']->getQuotedColumnName($fieldName, $this->_platform) . " ".$orientation; + $sql .= $this->getSqlTableAlias($tableName, $dqlAlias) . '.' . + $qComp['metadata']->getQuotedColumnName($fieldName, $this->_platform) . " $orientation"; } } } @@ -313,7 +311,7 @@ class SqlWalker implements TreeWalker * @param string $dqlAlias * @return string */ - private function _generateDiscriminatorColumnConditionSql($dqlAlias) + private function _generateDiscriminatorColumnConditionSQL($dqlAlias) { $sql = ''; @@ -338,7 +336,6 @@ class SqlWalker implements TreeWalker return $sql; } - /** * Walks down a SelectStatement AST node, thereby generating the appropriate SQL. * @@ -351,7 +348,7 @@ class SqlWalker implements TreeWalker if (($whereClause = $AST->whereClause) !== null) { $sql .= $this->walkWhereClause($whereClause); - } else if (($discSql = $this->_generateDiscriminatorColumnConditionSql($this->_currentRootAlias)) !== '') { + } else if (($discSql = $this->_generateDiscriminatorColumnConditionSQL($this->_currentRootAlias)) !== '') { $sql .= ' WHERE ' . $discSql; } @@ -385,7 +382,7 @@ class SqlWalker implements TreeWalker if (($whereClause = $AST->whereClause) !== null) { $sql .= $this->walkWhereClause($whereClause); - } else if (($discSql = $this->_generateDiscriminatorColumnConditionSql($this->_currentRootAlias)) !== '') { + } else if (($discSql = $this->_generateDiscriminatorColumnConditionSQL($this->_currentRootAlias)) !== '') { $sql .= ' WHERE ' . $discSql; } @@ -405,7 +402,7 @@ class SqlWalker implements TreeWalker if (($whereClause = $AST->whereClause) !== null) { $sql .= $this->walkWhereClause($whereClause); - } else if (($discSql = $this->_generateDiscriminatorColumnConditionSql($this->_currentRootAlias)) !== '') { + } else if (($discSql = $this->_generateDiscriminatorColumnConditionSQL($this->_currentRootAlias)) !== '') { $sql .= ' WHERE ' . $discSql; } @@ -780,7 +777,7 @@ class SqlWalker implements TreeWalker ). ')'; } - $discrSql = $this->_generateDiscriminatorColumnConditionSql($joinedDqlAlias); + $discrSql = $this->_generateDiscriminatorColumnConditionSQL($joinedDqlAlias); if ($discrSql) { $sql .= ' AND ' . $discrSql; @@ -1217,7 +1214,7 @@ class SqlWalker implements TreeWalker ' OR ', array_map(array($this, 'walkConditionalTerm'), $condExpr->conditionalTerms) ); - $discrSql = $this->_generateDiscriminatorColumnConditionSql($this->_currentRootAlias); + $discrSql = $this->_generateDiscriminatorColumnConditionSQL($this->_currentRootAlias); if ($discrSql) { $sql .= ' AND ' . $discrSql; diff --git a/lib/Doctrine/ORM/UnitOfWork.php b/lib/Doctrine/ORM/UnitOfWork.php index 46628c904..9cfbeda75 100644 --- a/lib/Doctrine/ORM/UnitOfWork.php +++ b/lib/Doctrine/ORM/UnitOfWork.php @@ -1,7 +1,5 @@ * @author Guilherme Blanco * @author Jonathan Wage * @author Roman Borschel - * @internal This class contains performance-critical code. + * @internal This class contains highly performance-sensitive code. */ class UnitOfWork implements PropertyChangedListener { diff --git a/tests/Doctrine/Tests/ORM/Functional/ClassTableInheritanceTest2.php b/tests/Doctrine/Tests/ORM/Functional/ClassTableInheritanceTest2.php index 7256d571e..d720f5d92 100644 --- a/tests/Doctrine/Tests/ORM/Functional/ClassTableInheritanceTest2.php +++ b/tests/Doctrine/Tests/ORM/Functional/ClassTableInheritanceTest2.php @@ -17,9 +17,10 @@ class ClassTableInheritanceTest2 extends \Doctrine\Tests\OrmFunctionalTestCase $this->_schemaTool->createSchema(array( $this->_em->getClassMetadata('Doctrine\Tests\ORM\Functional\CTIParent'), $this->_em->getClassMetadata('Doctrine\Tests\ORM\Functional\CTIChild'), - $this->_em->getClassMetadata('Doctrine\Tests\ORM\Functional\CTIRelated') + $this->_em->getClassMetadata('Doctrine\Tests\ORM\Functional\CTIRelated'), + $this->_em->getClassMetadata('Doctrine\Tests\ORM\Functional\CTIRelated2') )); - } catch (\Exception $e) { + } catch (\Exception $ignored) { // Swallow all exceptions. We do not test the schema tool here. } } @@ -49,6 +50,27 @@ class ClassTableInheritanceTest2 extends \Doctrine\Tests\OrmFunctionalTestCase $this->assertSame($related2, $related2->getCTIParent()->getRelated()); } + + public function testManyToManyToCTIHierarchy() + { + //$this->_em->getConnection()->getConfiguration()->setSQLLogger(new \Doctrine\DBAL\Logging\EchoSQLLogger()); + $mmrel = new CTIRelated2; + $child = new CTIChild; + $child->setData('child'); + $mmrel->addCTIChild($child); + + $this->_em->persist($mmrel); + $this->_em->persist($child); + + $this->_em->flush(); + $this->_em->clear(); + + $mmrel2 = $this->_em->find(get_class($mmrel), $mmrel->getId()); + $this->assertFalse($mmrel2->getCTIChildren()->isInitialized()); + $this->assertEquals(1, count($mmrel2->getCTIChildren())); + $this->assertTrue($mmrel2->getCTIChildren()->isInitialized()); + $this->assertTrue($mmrel2->getCTIChildren()->get(0) instanceof CTIChild); + } } /** @@ -126,3 +148,29 @@ class CTIRelated { $this->ctiParent = $ctiParent; } } + +/** @Entity */ +class CTIRelated2 +{ + /** @Id @Column(type="integer") @GeneratedValue */ + private $id; + /** @ManyToMany(targetEntity="CTIChild") */ + private $ctiChildren; + + + public function __construct() { + $this->ctiChildren = new \Doctrine\Common\Collections\ArrayCollection; + } + + public function getId() { + return $this->id; + } + + public function addCTIChild(CTIChild $child) { + $this->ctiChildren->add($child); + } + + public function getCTIChildren() { + return $this->ctiChildren; + } +} diff --git a/tests/Doctrine/Tests/ORM/Functional/SingleTableInheritanceTest.php b/tests/Doctrine/Tests/ORM/Functional/SingleTableInheritanceTest.php index 01583d1e0..17f01f27c 100644 --- a/tests/Doctrine/Tests/ORM/Functional/SingleTableInheritanceTest.php +++ b/tests/Doctrine/Tests/ORM/Functional/SingleTableInheritanceTest.php @@ -66,6 +66,7 @@ class SingleTableInheritanceTest extends \Doctrine\Tests\OrmFunctionalTestCase $this->_em->clear(); + // READ by DQL on subtype $query = $this->_em->createQuery("select e from Doctrine\Tests\ORM\Functional\ChildEntity e"); $entities = $query->getResult(); $this->assertEquals(1, count($entities)); @@ -77,6 +78,18 @@ class SingleTableInheritanceTest extends \Doctrine\Tests\OrmFunctionalTestCase $this->_em->clear(); + // READ by findAll() on subtype + $entities = $this->_em->getRepository('Doctrine\Tests\ORM\Functional\ChildEntity')->findAll(); + $this->assertEquals(1, count($entities)); + $this->assertTrue($entities[0] instanceof ChildEntity); + $this->assertTrue(is_numeric($entities[0]->getId())); + $this->assertEquals('thedata', $entities[0]->getData()); + $this->assertEquals(1234, $entities[0]->getNumber()); + $this->assertNull($entities[0]->getParentRelated()); + + $this->_em->clear(); + + // READ by joining into an STI hierarchy from outwards $query = $this->_em->createQuery("select r,o from Doctrine\Tests\ORM\Functional\RelatedEntity r join r.owner o"); $entities = $query->getResult(); @@ -194,7 +207,7 @@ class SingleTableInheritanceTest extends \Doctrine\Tests\OrmFunctionalTestCase class ParentEntity { /** * @Id - * @Column(type="integer") + * @Column(name="parent_id", type="integer") * @GeneratedValue(strategy="AUTO") */ private $id; @@ -317,7 +330,7 @@ class ParentRelatedEntity { public function setData($data) {$this->data = $data;} /** * @OneToOne(targetEntity="ParentEntity") - * @JoinColumn(name="parent_id", referencedColumnName="id") + * @JoinColumn(name="parent_id", referencedColumnName="parent_id") */ private $parent; public function getParent() {return $this->parent;} From b505a27370a531acf0ffdd4a428e994de8d5aa80 Mon Sep 17 00:00:00 2001 From: "Roman S. Borschel" Date: Mon, 26 Apr 2010 13:12:46 +0200 Subject: [PATCH 71/86] Renamed StandardEntityPersister to BasicEntityPersister --- .../ORM/Persisters/AbstractEntityInheritancePersister.php | 2 +- ...tandardEntityPersister.php => BasicEntityPersister.php} | 7 +++---- lib/Doctrine/ORM/Persisters/UnionSubclassPersister.php | 2 +- lib/Doctrine/ORM/UnitOfWork.php | 2 +- tests/Doctrine/Tests/Mocks/EntityPersisterMock.php | 2 +- tests/Doctrine/Tests/ORM/Proxy/ProxyClassGeneratorTest.php | 2 +- 6 files changed, 8 insertions(+), 9 deletions(-) rename lib/Doctrine/ORM/Persisters/{StandardEntityPersister.php => BasicEntityPersister.php} (99%) diff --git a/lib/Doctrine/ORM/Persisters/AbstractEntityInheritancePersister.php b/lib/Doctrine/ORM/Persisters/AbstractEntityInheritancePersister.php index d75855c02..512f636e2 100644 --- a/lib/Doctrine/ORM/Persisters/AbstractEntityInheritancePersister.php +++ b/lib/Doctrine/ORM/Persisters/AbstractEntityInheritancePersister.php @@ -30,7 +30,7 @@ use Doctrine\ORM\Mapping\ClassMetadata, * @author Roman Borschel * @since 2.0 */ -abstract class AbstractEntityInheritancePersister extends StandardEntityPersister +abstract class AbstractEntityInheritancePersister extends BasicEntityPersister { /** * Map from column names to class names that declare the field the column is mapped to. diff --git a/lib/Doctrine/ORM/Persisters/StandardEntityPersister.php b/lib/Doctrine/ORM/Persisters/BasicEntityPersister.php similarity index 99% rename from lib/Doctrine/ORM/Persisters/StandardEntityPersister.php rename to lib/Doctrine/ORM/Persisters/BasicEntityPersister.php index 29c04c09d..9b8609850 100644 --- a/lib/Doctrine/ORM/Persisters/StandardEntityPersister.php +++ b/lib/Doctrine/ORM/Persisters/BasicEntityPersister.php @@ -70,9 +70,8 @@ use PDO, * @author Roman Borschel * @author Giorgio Sironi * @since 2.0 - * @todo Rename: BasicEntityPersister */ -class StandardEntityPersister +class BasicEntityPersister { /** * Metadata object that describes the mapping of the mapped entity class. @@ -159,7 +158,7 @@ class StandardEntityPersister protected $_sqlTableAliases = array(); /** - * Initializes a new StandardEntityPersister that uses the given EntityManager + * Initializes a new BasicEntityPersister that uses the given EntityManager * and persists instances of the class described by the given ClassMetadata descriptor. * * @param Doctrine\ORM\EntityManager $em @@ -828,7 +827,7 @@ class StandardEntityPersister * an entity in this persister. * * Subclasses should override this method to alter or change the select column - * list SQL fragment. Note that in the implementation of StandardEntityPersister + * list SQL fragment. Note that in the implementation of BasicEntityPersister * the resulting SQL fragment is generated only once and cached in {@link _selectColumnListSql}. * Subclasses may or may not do the same. * diff --git a/lib/Doctrine/ORM/Persisters/UnionSubclassPersister.php b/lib/Doctrine/ORM/Persisters/UnionSubclassPersister.php index 6afc51b4b..b2e683a27 100644 --- a/lib/Doctrine/ORM/Persisters/UnionSubclassPersister.php +++ b/lib/Doctrine/ORM/Persisters/UnionSubclassPersister.php @@ -2,7 +2,7 @@ namespace Doctrine\ORM\Persisters; -class UnionSubclassPersister extends StandardEntityPersister +class UnionSubclassPersister extends BasicEntityPersister { } \ No newline at end of file diff --git a/lib/Doctrine/ORM/UnitOfWork.php b/lib/Doctrine/ORM/UnitOfWork.php index 9cfbeda75..4a0c5663f 100644 --- a/lib/Doctrine/ORM/UnitOfWork.php +++ b/lib/Doctrine/ORM/UnitOfWork.php @@ -1966,7 +1966,7 @@ class UnitOfWork implements PropertyChangedListener if ( ! isset($this->_persisters[$entityName])) { $class = $this->_em->getClassMetadata($entityName); if ($class->isInheritanceTypeNone()) { - $persister = new Persisters\StandardEntityPersister($this->_em, $class); + $persister = new Persisters\BasicEntityPersister($this->_em, $class); } else if ($class->isInheritanceTypeSingleTable()) { $persister = new Persisters\SingleTablePersister($this->_em, $class); } else if ($class->isInheritanceTypeJoined()) { diff --git a/tests/Doctrine/Tests/Mocks/EntityPersisterMock.php b/tests/Doctrine/Tests/Mocks/EntityPersisterMock.php index 2bf42fe9b..aa43081a8 100644 --- a/tests/Doctrine/Tests/Mocks/EntityPersisterMock.php +++ b/tests/Doctrine/Tests/Mocks/EntityPersisterMock.php @@ -5,7 +5,7 @@ namespace Doctrine\Tests\Mocks; /** * EntityPersister implementation used for mocking during tests. */ -class EntityPersisterMock extends \Doctrine\ORM\Persisters\StandardEntityPersister +class EntityPersisterMock extends \Doctrine\ORM\Persisters\BasicEntityPersister { private $_inserts = array(); private $_updates = array(); diff --git a/tests/Doctrine/Tests/ORM/Proxy/ProxyClassGeneratorTest.php b/tests/Doctrine/Tests/ORM/Proxy/ProxyClassGeneratorTest.php index 9445af133..fcf07cfa0 100644 --- a/tests/Doctrine/Tests/ORM/Proxy/ProxyClassGeneratorTest.php +++ b/tests/Doctrine/Tests/ORM/Proxy/ProxyClassGeneratorTest.php @@ -156,7 +156,7 @@ class ProxyClassGeneratorTest extends \Doctrine\Tests\OrmTestCase protected function _getMockPersister() { - $persister = $this->getMock('Doctrine\ORM\Persisters\StandardEntityPersister', array('load'), array(), '', false); + $persister = $this->getMock('Doctrine\ORM\Persisters\BasicEntityPersister', array('load'), array(), '', false); return $persister; } } From d1d1cecc06e9403e7044e60506402d2514863c7b Mon Sep 17 00:00:00 2001 From: "Roman S. Borschel" Date: Mon, 26 Apr 2010 14:12:20 +0200 Subject: [PATCH 72/86] Restored missing files. --- lib/Doctrine/ORM/Mapping/Driver/PhpDriver.php | 71 +++++++++++++++++++ .../AbstractEntityInheritancePersister.php | 2 +- tests/Doctrine/Tests/ORM/Mapping/AllTests.php | 2 +- .../ORM/Mapping/PhpMappingDriverTest.php | 31 ++++++++ 4 files changed, 104 insertions(+), 2 deletions(-) create mode 100644 lib/Doctrine/ORM/Mapping/Driver/PhpDriver.php create mode 100644 tests/Doctrine/Tests/ORM/Mapping/PhpMappingDriverTest.php diff --git a/lib/Doctrine/ORM/Mapping/Driver/PhpDriver.php b/lib/Doctrine/ORM/Mapping/Driver/PhpDriver.php new file mode 100644 index 000000000..6b6954b83 --- /dev/null +++ b/lib/Doctrine/ORM/Mapping/Driver/PhpDriver.php @@ -0,0 +1,71 @@ +. + */ + +namespace Doctrine\ORM\Mapping\Driver; + +use Doctrine\Common\Cache\ArrayCache, + Doctrine\Common\Annotations\AnnotationReader, + Doctrine\DBAL\Schema\AbstractSchemaManager, + Doctrine\ORM\Mapping\ClassMetadataInfo, + Doctrine\ORM\Mapping\MappingException, + Doctrine\Common\Util\Inflector, + Doctrine\ORM\Mapping\Driver\AbstractFileDriver; + +/** + * The PhpDriver includes php files which just populate ClassMetadataInfo + * instances with plain php code + * + * @license http://www.opensource.org/licenses/lgpl-license.php LGPL + * @link www.doctrine-project.org + * @since 2.0 + * @version $Revision$ + * @author Benjamin Eberlei + * @author Guilherme Blanco + * @author Jonathan H. Wage + * @author Roman Borschel + * @todo Rename: PHPDriver + */ +class PhpDriver extends AbstractFileDriver +{ + /** + * {@inheritdoc} + */ + protected $_fileExtension = '.php'; + protected $_metadata; + + /** + * {@inheritdoc} + */ + public function loadMetadataForClass($className, ClassMetadataInfo $metadata) + { + $this->_metadata = $metadata; + $this->_loadMappingFile($this->_findMappingFile($className)); + } + + /** + * {@inheritdoc} + */ + protected function _loadMappingFile($file) + { + $metadata = $this->_metadata; + include $file; + } +} \ No newline at end of file diff --git a/lib/Doctrine/ORM/Persisters/AbstractEntityInheritancePersister.php b/lib/Doctrine/ORM/Persisters/AbstractEntityInheritancePersister.php index 512f636e2..0515e4dc0 100644 --- a/lib/Doctrine/ORM/Persisters/AbstractEntityInheritancePersister.php +++ b/lib/Doctrine/ORM/Persisters/AbstractEntityInheritancePersister.php @@ -37,7 +37,7 @@ abstract class AbstractEntityInheritancePersister extends BasicEntityPersister * * @var array */ - /*private*/protected $_declaringClassMap = array(); + private $_declaringClassMap = array(); /** * {@inheritdoc} diff --git a/tests/Doctrine/Tests/ORM/Mapping/AllTests.php b/tests/Doctrine/Tests/ORM/Mapping/AllTests.php index 06bfe498f..dcd5c768c 100644 --- a/tests/Doctrine/Tests/ORM/Mapping/AllTests.php +++ b/tests/Doctrine/Tests/ORM/Mapping/AllTests.php @@ -23,7 +23,7 @@ class AllTests $suite->addTestSuite('Doctrine\Tests\ORM\Mapping\XmlMappingDriverTest'); $suite->addTestSuite('Doctrine\Tests\ORM\Mapping\YamlMappingDriverTest'); $suite->addTestSuite('Doctrine\Tests\ORM\Mapping\AnnotationDriverTest'); - //$suite->addTestSuite('Doctrine\Tests\ORM\Mapping\PHPMappingDriverTest'); FILE MISSING!!! + $suite->addTestSuite('Doctrine\Tests\ORM\Mapping\PHPMappingDriverTest'); $suite->addTestSuite('Doctrine\Tests\ORM\Mapping\StaticPHPMappingDriverTest'); $suite->addTestSuite('Doctrine\Tests\ORM\Mapping\ClassMetadataFactoryTest'); $suite->addTestSuite('Doctrine\Tests\ORM\Mapping\ClassMetadataLoadEventTest'); diff --git a/tests/Doctrine/Tests/ORM/Mapping/PhpMappingDriverTest.php b/tests/Doctrine/Tests/ORM/Mapping/PhpMappingDriverTest.php new file mode 100644 index 000000000..50bfcb819 --- /dev/null +++ b/tests/Doctrine/Tests/ORM/Mapping/PhpMappingDriverTest.php @@ -0,0 +1,31 @@ +addMappingSource(__DIR__ . DIRECTORY_SEPARATOR . 'yaml'); + + $exporter = $cme->getExporter('php', $path); + $exporter->setMetadatas($cme->getMetadatas()); + $exporter->export(); + */ + + return new PhpDriver($path); + } +} \ No newline at end of file From 6bda2b44fedc832350e1153043b316e5dfe946d5 Mon Sep 17 00:00:00 2001 From: "Jonathan H. Wage" Date: Fri, 23 Apr 2010 14:37:29 -0400 Subject: [PATCH 73/86] Renaming PhpDriver to PHPDriver --- .../ORM/Mapping/Driver/{PhpDriver.php => PHPDriver.php} | 4 ++-- .../{PhpMappingDriverTest.php => PHPMappingDriverTest.php} | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) rename lib/Doctrine/ORM/Mapping/Driver/{PhpDriver.php => PHPDriver.php} (95%) rename tests/Doctrine/Tests/ORM/Mapping/{PhpMappingDriverTest.php => PHPMappingDriverTest.php} (91%) diff --git a/lib/Doctrine/ORM/Mapping/Driver/PhpDriver.php b/lib/Doctrine/ORM/Mapping/Driver/PHPDriver.php similarity index 95% rename from lib/Doctrine/ORM/Mapping/Driver/PhpDriver.php rename to lib/Doctrine/ORM/Mapping/Driver/PHPDriver.php index 6b6954b83..99b8a145a 100644 --- a/lib/Doctrine/ORM/Mapping/Driver/PhpDriver.php +++ b/lib/Doctrine/ORM/Mapping/Driver/PHPDriver.php @@ -30,7 +30,7 @@ use Doctrine\Common\Cache\ArrayCache, Doctrine\ORM\Mapping\Driver\AbstractFileDriver; /** - * The PhpDriver includes php files which just populate ClassMetadataInfo + * The PHPDriver includes php files which just populate ClassMetadataInfo * instances with plain php code * * @license http://www.opensource.org/licenses/lgpl-license.php LGPL @@ -43,7 +43,7 @@ use Doctrine\Common\Cache\ArrayCache, * @author Roman Borschel * @todo Rename: PHPDriver */ -class PhpDriver extends AbstractFileDriver +class PHPDriver extends AbstractFileDriver { /** * {@inheritdoc} diff --git a/tests/Doctrine/Tests/ORM/Mapping/PhpMappingDriverTest.php b/tests/Doctrine/Tests/ORM/Mapping/PHPMappingDriverTest.php similarity index 91% rename from tests/Doctrine/Tests/ORM/Mapping/PhpMappingDriverTest.php rename to tests/Doctrine/Tests/ORM/Mapping/PHPMappingDriverTest.php index 50bfcb819..08ec30bcf 100644 --- a/tests/Doctrine/Tests/ORM/Mapping/PhpMappingDriverTest.php +++ b/tests/Doctrine/Tests/ORM/Mapping/PHPMappingDriverTest.php @@ -3,7 +3,7 @@ namespace Doctrine\Tests\ORM\Mapping; use Doctrine\ORM\Mapping\ClassMetadata, - Doctrine\ORM\Mapping\Driver\PhpDriver, + Doctrine\ORM\Mapping\Driver\PHPDriver, Doctrine\ORM\Tools\Export\ClassMetadataExporter; require_once __DIR__ . '/../../TestInit.php'; @@ -26,6 +26,6 @@ class PhpMappingDriverTest extends AbstractMappingDriverTest $exporter->export(); */ - return new PhpDriver($path); + return new PHPDriver($path); } } \ No newline at end of file From 8396e72a2c3e8b35c0560eb0dc8c3ed14bf238a7 Mon Sep 17 00:00:00 2001 From: "Roman S. Borschel" Date: Mon, 26 Apr 2010 14:25:23 +0200 Subject: [PATCH 74/86] Fixed casing. --- tests/Doctrine/Tests/ORM/Mapping/PHPMappingDriverTest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/Doctrine/Tests/ORM/Mapping/PHPMappingDriverTest.php b/tests/Doctrine/Tests/ORM/Mapping/PHPMappingDriverTest.php index 08ec30bcf..b346973cf 100644 --- a/tests/Doctrine/Tests/ORM/Mapping/PHPMappingDriverTest.php +++ b/tests/Doctrine/Tests/ORM/Mapping/PHPMappingDriverTest.php @@ -8,7 +8,7 @@ use Doctrine\ORM\Mapping\ClassMetadata, require_once __DIR__ . '/../../TestInit.php'; -class PhpMappingDriverTest extends AbstractMappingDriverTest +class PHPMappingDriverTest extends AbstractMappingDriverTest { protected function _loadDriver() { From 2f3e9fdcf89aea65084be03f3bcdb0ae78144e6e Mon Sep 17 00:00:00 2001 From: "Roman S. Borschel" Date: Tue, 27 Apr 2010 18:44:55 +0200 Subject: [PATCH 75/86] Updated UPGRADE file. --- UPGRADE_TO_2_0 | 27 +++++++++++++++++++++++---- 1 file changed, 23 insertions(+), 4 deletions(-) diff --git a/UPGRADE_TO_2_0 b/UPGRADE_TO_2_0 index edd11e965..24e7094bd 100644 --- a/UPGRADE_TO_2_0 +++ b/UPGRADE_TO_2_0 @@ -3,9 +3,9 @@ ## Console migrated to Symfony Console -The Doctrine Cli has been replaced by Symfony Console Configuration +The Doctrine CLI has been replaced by Symfony Console Configuration -Instead of having to specifiy: +Instead of having to specify: [php] $cliConfig = new CliConfiguration(); @@ -100,9 +100,22 @@ The "default" option for database column defaults has been removed. If desired, be implemented by using the columnDefinition attribute of the @Column annotation (or the approriate XML and YAML equivalents). Prefer PHP default values, if possible. -## Partial Objects +## Selecting Partial Objects -[TBD: New syntax, results, etc.] +Querying for partial objects now has a new syntax. The old syntax to query for partial objects +now has a different meaning. This is best illustrated by an example. If you previously +had a DQL query like this: + + [sql] + SELECT u.id, u.name FROM User u + +Since BETA1, simple state field path expressions in the select clause are used to select +object fields as plain scalar values (something that was not possible before). +To achieve the same result as previously (that is, a partial object with only id and name populated) +you need to use the following, explicit syntax: + + [sql] + SELECT PARTIAL u.{id,name} FROM User u ## XML Mapping Driver @@ -133,3 +146,9 @@ by using the API on the `PreUpdateEventArgs` instance passed to the preUpdate li to the state of the entitys properties won't affect the database UPDATE statement anymore. This gives drastic performance benefits for the preUpdate event. +## Collection API + +The Collection interface in the Common package has been updated with some missing methods +that were present only on the default implementation, ArrayCollection. Custom collection +implementations need to be updated to adhere to the updated interface. + From 025735e7308e619fa8258310b4b52e100e4b083a Mon Sep 17 00:00:00 2001 From: Benjamin Eberlei Date: Tue, 27 Apr 2010 19:37:27 +0200 Subject: [PATCH 76/86] DDC-536 - Make forwards compatible change in EntityRepository adding getters for the protected variables to allow a smooth change when they will be turned private in Beta2 --- UPGRADE_TO_2_0 | 13 +++++++++++++ lib/Doctrine/ORM/EntityRepository.php | 24 ++++++++++++++++++++++++ 2 files changed, 37 insertions(+) diff --git a/UPGRADE_TO_2_0 b/UPGRADE_TO_2_0 index 24e7094bd..d1be43bf2 100644 --- a/UPGRADE_TO_2_0 +++ b/UPGRADE_TO_2_0 @@ -1,6 +1,19 @@ # Upgrade from 2.0-ALPHA4 to 2.0-BETA1 +## EntityRepository deprecates access to protected variables + +Instead of accessing protected variables for the EntityManager in +a custom EntityRepository it is now required to use the getter methods +for all the three instance variables: + +* `$this->_em` now accessible through `$this->getEntityManager()` +* `$this->_class` now accessible through `$this->getClassMetadata()` +* `$this->_entityName` now accessible through `$this->getEntityName()` + +Important: For Beta 2 the protected visibility of these three properties will be +changed to private! + ## Console migrated to Symfony Console The Doctrine CLI has been replaced by Symfony Console Configuration diff --git a/lib/Doctrine/ORM/EntityRepository.php b/lib/Doctrine/ORM/EntityRepository.php index de919430d..67eda3a47 100644 --- a/lib/Doctrine/ORM/EntityRepository.php +++ b/lib/Doctrine/ORM/EntityRepository.php @@ -176,4 +176,28 @@ class EntityRepository throw ORMException::invalidFindByCall($this->_entityName, $fieldName, $method.$by); } } + + /** + * @return string + */ + protected function getEntityName() + { + return $this->_entityName; + } + + /** + * @return EntityManager + */ + protected function getEntityManager() + { + return $this->_em; + } + + /** + * @return Mapping\ClassMetadata + */ + protected function getClassMetadata() + { + return $this->_class; + } } \ No newline at end of file From ae39a5d389965757876b022fb704b3bd849b3e08 Mon Sep 17 00:00:00 2001 From: "Roman S. Borschel" Date: Tue, 27 Apr 2010 20:11:42 +0200 Subject: [PATCH 77/86] Fixed svn dependency in build file and some weird issues where the oci8 driver loses spaces in the sql while transforming positional to named parameters. --- build.xml | 8 ++++---- lib/Doctrine/DBAL/Driver/OCI8/OCI8Statement.php | 1 + lib/Doctrine/ORM/Persisters/BasicEntityPersister.php | 2 +- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/build.xml b/build.xml index ca368eb5a..54693d2c2 100644 --- a/build.xml +++ b/build.xml @@ -142,16 +142,16 @@ - - + + - - + + diff --git a/lib/Doctrine/DBAL/Driver/OCI8/OCI8Statement.php b/lib/Doctrine/DBAL/Driver/OCI8/OCI8Statement.php index 78b21796d..4ebdbec1c 100644 --- a/lib/Doctrine/DBAL/Driver/OCI8/OCI8Statement.php +++ b/lib/Doctrine/DBAL/Driver/OCI8/OCI8Statement.php @@ -60,6 +60,7 @@ class OCI8Statement implements \Doctrine\DBAL\Driver\Statement * placeholders and converted to a named parameter. * * @param string $statement The SQL statement to convert. + * @todo review and test for lost spaces. we experienced missing spaces with oci8 in some sql statements. */ private function _convertPositionalToNamedPlaceholders($statement) { diff --git a/lib/Doctrine/ORM/Persisters/BasicEntityPersister.php b/lib/Doctrine/ORM/Persisters/BasicEntityPersister.php index 9b8609850..54c7e5195 100644 --- a/lib/Doctrine/ORM/Persisters/BasicEntityPersister.php +++ b/lib/Doctrine/ORM/Persisters/BasicEntityPersister.php @@ -815,7 +815,7 @@ class BasicEntityPersister : $baseTableAlias; $columnName = $this->_class->getQuotedColumnName($fieldName, $this->_platform); - $orderBySql .= $orderBySql ? ', ' : 'ORDER BY '; + $orderBySql .= $orderBySql ? ', ' : ' ORDER BY '; $orderBySql .= $tableAlias . '.' . $columnName . ' ' . $orientation; } From 47ebbb4312d53da54d066717bea1886369299528 Mon Sep 17 00:00:00 2001 From: "Roman S. Borschel" Date: Tue, 27 Apr 2010 23:18:28 +0200 Subject: [PATCH 78/86] Updated build.xml with new pear channel URLs. --- build.xml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/build.xml b/build.xml index 54693d2c2..7665bdb63 100644 --- a/build.xml +++ b/build.xml @@ -163,7 +163,7 @@ DoctrineCommon Common Doctrine code - pear.phpdoctrine.org + pear.doctrine-project.org The Doctrine Common package contains shared code between the other packages. @@ -182,7 +182,7 @@ DoctrineDBAL Doctrine Database Abstraction Layer - pear.phpdoctrine.org + pear.doctrine-project.org The Doctrine DBAL package is the database abstraction layer used to power the ORM package. @@ -201,7 +201,7 @@ DoctrineORM Doctrine Object Relationl Mapper - pear.phpdoctrine.org + pear.doctrine-project.org The Doctrine ORM package is the primary package containing the object relational mapper. From de72db2a7a1b9efe0f77a6746baf6c9fe789c2f2 Mon Sep 17 00:00:00 2001 From: "Jonathan H. Wage" Date: Wed, 28 Apr 2010 11:39:47 -0400 Subject: [PATCH 79/86] Fixing xml schema generation for code completion in ides --- lib/Doctrine/ORM/Tools/Export/Driver/XmlExporter.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Doctrine/ORM/Tools/Export/Driver/XmlExporter.php b/lib/Doctrine/ORM/Tools/Export/Driver/XmlExporter.php index 366e14de8..23466a1b9 100644 --- a/lib/Doctrine/ORM/Tools/Export/Driver/XmlExporter.php +++ b/lib/Doctrine/ORM/Tools/Export/Driver/XmlExporter.php @@ -53,7 +53,7 @@ class XmlExporter extends AbstractExporter $xml->addAttribute('xmlns', 'http://doctrine-project.org/schemas/orm/doctrine-mapping'); $xml->addAttribute('xmlns:xsi', 'http://www.w3.org/2001/XMLSchema-instance'); - $xml->addAttribute('xsi:schemaLocation', 'http://doctrine-project.org/schemas/orm/doctrine-mapping.xsd'); + $xml->addAttribute('xsi:schemaLocation', 'http://doctrine-project.org/schemas/orm/doctrine-mapping http://doctrine-project.org/schemas/orm/doctrine-mapping.xsd'); if ($metadata->isMappedSuperclass) { $root = $xml->addChild('mapped-superclass'); From f38584a51ef9bac77b1f91e968d9146d22ded11c Mon Sep 17 00:00:00 2001 From: Benjamin Eberlei Date: Wed, 28 Apr 2010 20:27:53 +0200 Subject: [PATCH 80/86] DDC-545 - Add unittest for all drivers uniqueConstraint capabilities, fix bug in XML Driver that disallowed using them --- lib/Doctrine/ORM/Mapping/Driver/XmlDriver.php | 16 ++++++++------ .../ORM/Mapping/AbstractMappingDriverTest.php | 22 ++++++++++++++++++- .../php/Doctrine.Tests.ORM.Mapping.User.php | 5 ++++- .../Doctrine.Tests.ORM.Mapping.User.dcm.xml | 4 ++++ .../Doctrine.Tests.ORM.Mapping.User.dcm.yml | 5 ++++- 5 files changed, 42 insertions(+), 10 deletions(-) diff --git a/lib/Doctrine/ORM/Mapping/Driver/XmlDriver.php b/lib/Doctrine/ORM/Mapping/Driver/XmlDriver.php index 40608d001..fd06dd07c 100644 --- a/lib/Doctrine/ORM/Mapping/Driver/XmlDriver.php +++ b/lib/Doctrine/ORM/Mapping/Driver/XmlDriver.php @@ -118,15 +118,17 @@ class XmlDriver extends AbstractFileDriver // Evaluate if (isset($xmlRoot->{'unique-constraints'})) { foreach ($xmlRoot->{'unique-constraints'}->{'unique-constraint'} as $unique) { - if (is_string($unique['columns'])) { - $columns = explode(',', $unique['columns']); + $columns = explode(',', (string)$unique['columns']); + + if (isset($unique['name'])) { + $metadata->table['uniqueConstraints'][(string)$unique['name']] = array( + 'columns' => $columns + ); } else { - $columns = $unique['columns']; + $metadata->table['uniqueConstraints'][] = array( + 'columns' => $columns + ); } - - $metadata->table['uniqueConstraints'][$unique['name']] = array( - 'columns' => $columns - ); } } diff --git a/tests/Doctrine/Tests/ORM/Mapping/AbstractMappingDriverTest.php b/tests/Doctrine/Tests/ORM/Mapping/AbstractMappingDriverTest.php index 1fdf4a33c..741b35a6c 100644 --- a/tests/Doctrine/Tests/ORM/Mapping/AbstractMappingDriverTest.php +++ b/tests/Doctrine/Tests/ORM/Mapping/AbstractMappingDriverTest.php @@ -36,6 +36,23 @@ abstract class AbstractMappingDriverTest extends \Doctrine\Tests\OrmTestCase return $class; } + /** + * @depends testEntityTableNameAndInheritance + * @param ClassMetadata $class + */ + public function testEntityUniqueConstraints($class) + { + $this->assertArrayHasKey('uniqueConstraints', $class->table, + 'ClassMetadata should have uniqueConstraints key in table property when Unique Constraints are set.'); + + $this->assertEquals(array( + "search_idx" => array("columns" => array("name", "user_email")) + ), $class->table['uniqueConstraints']); + + return $class; + } + + /** * @depends testEntityTableNameAndInheritance * @param ClassMetadata $class @@ -206,7 +223,7 @@ abstract class AbstractMappingDriverTest extends \Doctrine\Tests\OrmTestCase /** * @Entity * @HasLifecycleCallbacks - * @Table(name="cms_users") + * @Table(name="cms_users", uniqueConstraints={@UniqueConstraint(name="search_idx", columns={"name", "user_email"})}) */ class User { @@ -369,5 +386,8 @@ class User ), 'orderBy' => NULL, )); + $metadata->table['uniqueConstraints'] = array( + 'search_idx' => array('columns' => array('name', 'user_email')), + ); } } \ No newline at end of file diff --git a/tests/Doctrine/Tests/ORM/Mapping/php/Doctrine.Tests.ORM.Mapping.User.php b/tests/Doctrine/Tests/ORM/Mapping/php/Doctrine.Tests.ORM.Mapping.User.php index e2a057f14..a7a58c60d 100644 --- a/tests/Doctrine/Tests/ORM/Mapping/php/Doctrine.Tests.ORM.Mapping.User.php +++ b/tests/Doctrine/Tests/ORM/Mapping/php/Doctrine.Tests.ORM.Mapping.User.php @@ -102,4 +102,7 @@ $metadata->mapManyToMany(array( ), ), 'orderBy' => NULL, - )); \ No newline at end of file + )); +$metadata->table['uniqueConstraints'] = array( + 'search_idx' => array('columns' => array('name', 'user_email')), +); \ No newline at end of file diff --git a/tests/Doctrine/Tests/ORM/Mapping/xml/Doctrine.Tests.ORM.Mapping.User.dcm.xml b/tests/Doctrine/Tests/ORM/Mapping/xml/Doctrine.Tests.ORM.Mapping.User.dcm.xml index 65b71f04c..7372604bb 100644 --- a/tests/Doctrine/Tests/ORM/Mapping/xml/Doctrine.Tests.ORM.Mapping.User.dcm.xml +++ b/tests/Doctrine/Tests/ORM/Mapping/xml/Doctrine.Tests.ORM.Mapping.User.dcm.xml @@ -6,6 +6,10 @@ http://www.doctrine-project.org/schemas/orm/doctrine-mapping.xsd"> + + + + diff --git a/tests/Doctrine/Tests/ORM/Mapping/yaml/Doctrine.Tests.ORM.Mapping.User.dcm.yml b/tests/Doctrine/Tests/ORM/Mapping/yaml/Doctrine.Tests.ORM.Mapping.User.dcm.yml index 3cf687169..9017da012 100644 --- a/tests/Doctrine/Tests/ORM/Mapping/yaml/Doctrine.Tests.ORM.Mapping.User.dcm.yml +++ b/tests/Doctrine/Tests/ORM/Mapping/yaml/Doctrine.Tests.ORM.Mapping.User.dcm.yml @@ -51,4 +51,7 @@ Doctrine\Tests\ORM\Mapping\User: - all lifecycleCallbacks: prePersist: [ doStuffOnPrePersist, doOtherStuffOnPrePersistToo ] - postPersist: [ doStuffOnPostPersist ] \ No newline at end of file + postPersist: [ doStuffOnPostPersist ] + uniqueConstraints: + search_idx: + columns: name,user_email \ No newline at end of file From 41e830ca68a8e3a46041a1a368fc6d408d58fa6a Mon Sep 17 00:00:00 2001 From: "Jonathan H. Wage" Date: Thu, 29 Apr 2010 08:13:02 -0400 Subject: [PATCH 81/86] Fixing sequence-generate in XmlDriver --- lib/Doctrine/ORM/Mapping/Driver/XmlDriver.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/Doctrine/ORM/Mapping/Driver/XmlDriver.php b/lib/Doctrine/ORM/Mapping/Driver/XmlDriver.php index 40608d001..3c45ad8a4 100644 --- a/lib/Doctrine/ORM/Mapping/Driver/XmlDriver.php +++ b/lib/Doctrine/ORM/Mapping/Driver/XmlDriver.php @@ -203,9 +203,9 @@ class XmlDriver extends AbstractFileDriver if (isset($idElement->{'sequence-generator'})) { $seqGenerator = $idElement->{'sequence-generator'}; $metadata->setSequenceGeneratorDefinition(array( - 'sequenceName' => $seqGenerator->{'sequence-name'}, - 'allocationSize' => $seqGenerator->{'allocation-size'}, - 'initialValue' => $seqGeneratorAnnot->{'initial-value'} + 'sequenceName' => (string)$seqGenerator['sequence-name'], + 'allocationSize' => (string)$seqGenerator['allocation-size'], + 'initialValue' => (string)$seqGeneratorAnnot['initial-value'] )); } else if (isset($idElement->{'table-generator'})) { throw MappingException::tableIdGeneratorNotImplemented($className); From db2be55e27c87fa513073b2bf44456f1d1423582 Mon Sep 17 00:00:00 2001 From: "Roman S. Borschel" Date: Fri, 30 Apr 2010 17:30:27 +0200 Subject: [PATCH 82/86] [DDC-561] Fixed. --- lib/Doctrine/ORM/Mapping/AssociationMapping.php | 3 ++- lib/Doctrine/ORM/Mapping/ClassMetadata.php | 1 + lib/Doctrine/ORM/Mapping/Driver/AnnotationDriver.php | 2 +- lib/Doctrine/ORM/PersistentCollection.php | 2 +- tests/Doctrine/Tests/ORM/Mapping/ClassMetadataTest.php | 2 ++ 5 files changed, 7 insertions(+), 3 deletions(-) diff --git a/lib/Doctrine/ORM/Mapping/AssociationMapping.php b/lib/Doctrine/ORM/Mapping/AssociationMapping.php index cadda07e3..488bcd0ff 100644 --- a/lib/Doctrine/ORM/Mapping/AssociationMapping.php +++ b/lib/Doctrine/ORM/Mapping/AssociationMapping.php @@ -356,7 +356,8 @@ abstract class AssociationMapping $serialized = array( 'sourceEntityName', 'targetEntityName', - 'sourceFieldName' + 'sourceFieldName', + 'fetchMode' ); if ($this->isCascadeDetach) { diff --git a/lib/Doctrine/ORM/Mapping/ClassMetadata.php b/lib/Doctrine/ORM/Mapping/ClassMetadata.php index a659e8235..18558c01a 100644 --- a/lib/Doctrine/ORM/Mapping/ClassMetadata.php +++ b/lib/Doctrine/ORM/Mapping/ClassMetadata.php @@ -286,6 +286,7 @@ class ClassMetadata extends ClassMetadataInfo 'identifier', 'isIdentifierComposite', // TODO: REMOVE 'name', + 'namespace', // TODO: REMOVE 'table', 'rootEntityName', 'idGenerator', //TODO: Does not really need to be serialized. Could be moved to runtime. diff --git a/lib/Doctrine/ORM/Mapping/Driver/AnnotationDriver.php b/lib/Doctrine/ORM/Mapping/Driver/AnnotationDriver.php index ec3d92f7b..e44af01cf 100644 --- a/lib/Doctrine/ORM/Mapping/Driver/AnnotationDriver.php +++ b/lib/Doctrine/ORM/Mapping/Driver/AnnotationDriver.php @@ -143,7 +143,7 @@ class AnnotationDriver implements Driver throw MappingException::classIsNotAValidEntityOrMappedSuperClass($className); } - // Evaluate DoctrineTable annotation + // Evaluate Table annotation if (isset($classAnnotations['Doctrine\ORM\Mapping\Table'])) { $tableAnnot = $classAnnotations['Doctrine\ORM\Mapping\Table']; $primaryTable = array( diff --git a/lib/Doctrine/ORM/PersistentCollection.php b/lib/Doctrine/ORM/PersistentCollection.php index 81d9a3e07..afbbf361f 100644 --- a/lib/Doctrine/ORM/PersistentCollection.php +++ b/lib/Doctrine/ORM/PersistentCollection.php @@ -359,7 +359,7 @@ final class PersistentCollection implements Collection $this->_em->getUnitOfWork()->scheduleOrphanRemoval($removed); } } - + return $removed; } diff --git a/tests/Doctrine/Tests/ORM/Mapping/ClassMetadataTest.php b/tests/Doctrine/Tests/ORM/Mapping/ClassMetadataTest.php index 92231ae8e..96fc026f7 100644 --- a/tests/Doctrine/Tests/ORM/Mapping/ClassMetadataTest.php +++ b/tests/Doctrine/Tests/ORM/Mapping/ClassMetadataTest.php @@ -37,6 +37,7 @@ class ClassMetadataTest extends \Doctrine\Tests\OrmTestCase // Check state $this->assertTrue(count($cm->getReflectionProperties()) > 0); + $this->assertEquals('Doctrine\Tests\Models\CMS', $cm->namespace); $this->assertTrue($cm->reflClass instanceof \ReflectionClass); $this->assertEquals('Doctrine\Tests\Models\CMS\CmsUser', $cm->name); $this->assertEquals('UserParent', $cm->rootEntityName); @@ -47,6 +48,7 @@ class ClassMetadataTest extends \Doctrine\Tests\OrmTestCase $this->assertTrue($cm->getAssociationMapping('phonenumbers') instanceof \Doctrine\ORM\Mapping\OneToOneMapping); $this->assertEquals(1, count($cm->associationMappings)); $oneOneMapping = $cm->getAssociationMapping('phonenumbers'); + $this->assertTrue($oneOneMapping->fetchMode == \Doctrine\ORM\Mapping\AssociationMapping::FETCH_LAZY); $this->assertEquals('phonenumbers', $oneOneMapping->sourceFieldName); $this->assertEquals('Doctrine\Tests\Models\CMS\Bar', $oneOneMapping->targetEntityName); } From 94928c5dd8e7c18ba7f09c6e650dc13b1d4a0733 Mon Sep 17 00:00:00 2001 From: "Jonathan H. Wage" Date: Fri, 30 Apr 2010 12:27:52 -0400 Subject: [PATCH 83/86] [DDC-552] Fixing issue with getReflectionClass() not existing on ClassMetadataInfo when it is required by AnnotationDriver --- lib/Doctrine/ORM/Mapping/ClassMetadata.php | 17 -------------- .../ORM/Mapping/ClassMetadataInfo.php | 22 +++++++++++++++++++ 2 files changed, 22 insertions(+), 17 deletions(-) diff --git a/lib/Doctrine/ORM/Mapping/ClassMetadata.php b/lib/Doctrine/ORM/Mapping/ClassMetadata.php index 18558c01a..48bbc996a 100644 --- a/lib/Doctrine/ORM/Mapping/ClassMetadata.php +++ b/lib/Doctrine/ORM/Mapping/ClassMetadata.php @@ -41,13 +41,6 @@ use ReflectionClass, ReflectionProperty; */ class ClassMetadata extends ClassMetadataInfo { - /** - * The ReflectionClass instance of the mapped class. - * - * @var ReflectionClass - */ - public $reflClass; - /** * The ReflectionProperty instances of the mapped class. * @@ -76,16 +69,6 @@ class ClassMetadata extends ClassMetadataInfo $this->table['name'] = $this->reflClass->getShortName(); } - /** - * Gets the ReflectionClass instance of the mapped class. - * - * @return ReflectionClass - */ - public function getReflectionClass() - { - return $this->reflClass; - } - /** * Gets the ReflectionPropertys of the mapped class. * diff --git a/lib/Doctrine/ORM/Mapping/ClassMetadataInfo.php b/lib/Doctrine/ORM/Mapping/ClassMetadataInfo.php index ac481c48f..d1f13f002 100644 --- a/lib/Doctrine/ORM/Mapping/ClassMetadataInfo.php +++ b/lib/Doctrine/ORM/Mapping/ClassMetadataInfo.php @@ -19,6 +19,8 @@ namespace Doctrine\ORM\Mapping; +use ReflectionClass; + /** * A ClassMetadata instance holds all the object-relational mapping metadata * of an entity and it's associations. @@ -366,6 +368,13 @@ class ClassMetadataInfo */ public $versionField; + /** + * The ReflectionClass instance of the mapped class. + * + * @var ReflectionClass + */ + public $reflClass; + /** * Initializes a new ClassMetadata instance that will hold the object-relational mapping * metadata of the class with the given name. @@ -378,6 +387,19 @@ class ClassMetadataInfo $this->rootEntityName = $entityName; } + /** + * Gets the ReflectionClass instance of the mapped class. + * + * @return ReflectionClass + */ + public function getReflectionClass() + { + if ( ! $this->reflClass) { + $this->reflClass = new ReflectionClass($entityName); + } + return $this->reflClass; + } + /** * Sets the change tracking policy used by this class. * From 6c7aaa727c0b25f62078cb05f3bb861c57f962ed Mon Sep 17 00:00:00 2001 From: Benjamin Eberlei Date: Sat, 1 May 2010 03:28:18 +0200 Subject: [PATCH 84/86] Added tests for 41e830ca68a8e3a46041a1a368fc6d408d58fa6a, thereby finding two issues with XML and YAML Driver handling of Sequence-Generator --- lib/Doctrine/ORM/Mapping/Driver/XmlDriver.php | 2 +- .../ORM/Mapping/Driver/YamlDriver.php | 16 ++++++---- .../ORM/Mapping/AbstractMappingDriverTest.php | 29 ++++++++++++++++++- .../php/Doctrine.Tests.ORM.Mapping.User.php | 7 ++++- .../Doctrine.Tests.ORM.Mapping.User.dcm.xml | 1 + .../Doctrine.Tests.ORM.Mapping.User.dcm.yml | 4 +++ 6 files changed, 50 insertions(+), 9 deletions(-) diff --git a/lib/Doctrine/ORM/Mapping/Driver/XmlDriver.php b/lib/Doctrine/ORM/Mapping/Driver/XmlDriver.php index 5eaa8897e..fe221c0d8 100644 --- a/lib/Doctrine/ORM/Mapping/Driver/XmlDriver.php +++ b/lib/Doctrine/ORM/Mapping/Driver/XmlDriver.php @@ -207,7 +207,7 @@ class XmlDriver extends AbstractFileDriver $metadata->setSequenceGeneratorDefinition(array( 'sequenceName' => (string)$seqGenerator['sequence-name'], 'allocationSize' => (string)$seqGenerator['allocation-size'], - 'initialValue' => (string)$seqGeneratorAnnot['initial-value'] + 'initialValue' => (string)$seqGenerator['initial-value'] )); } else if (isset($idElement->{'table-generator'})) { throw MappingException::tableIdGeneratorNotImplemented($className); diff --git a/lib/Doctrine/ORM/Mapping/Driver/YamlDriver.php b/lib/Doctrine/ORM/Mapping/Driver/YamlDriver.php index f5448ff1f..873f9b21f 100644 --- a/lib/Doctrine/ORM/Mapping/Driver/YamlDriver.php +++ b/lib/Doctrine/ORM/Mapping/Driver/YamlDriver.php @@ -135,6 +135,10 @@ class YamlDriver extends AbstractFileDriver if (isset($element['id'])) { // Evaluate identifier settings foreach ($element['id'] as $name => $idElement) { + if (!isset($idElement['type'])) { + throw MappingException::propertyTypeIsRequired($className, $name); + } + $mapping = array( 'id' => true, 'fieldName' => $name, @@ -151,6 +155,12 @@ class YamlDriver extends AbstractFileDriver $metadata->setIdGeneratorType(constant('Doctrine\ORM\Mapping\ClassMetadata::GENERATOR_TYPE_' . strtoupper($idElement['generator']['strategy']))); } + // Check for SequenceGenerator/TableGenerator definition + if (isset($idElement['sequenceGenerator'])) { + $metadata->setSequenceGeneratorDefinition($idElement['sequenceGenerator']); + } else if (isset($idElement['tableGenerator'])) { + throw MappingException::tableIdGeneratorNotImplemented($className); + } } } @@ -177,12 +187,6 @@ class YamlDriver extends AbstractFileDriver . strtoupper($fieldMapping['generator']['strategy']))); } } - // Check for SequenceGenerator/TableGenerator definition - if (isset($fieldMapping['sequenceGenerator'])) { - $metadata->setSequenceGeneratorDefinition($fieldMapping['sequenceGenerator']); - } else if (isset($fieldMapping['tableGenerator'])) { - throw MappingException::tableIdGeneratorNotImplemented($className); - } if (isset($fieldMapping['column'])) { $mapping['columnName'] = $fieldMapping['column']; } diff --git a/tests/Doctrine/Tests/ORM/Mapping/AbstractMappingDriverTest.php b/tests/Doctrine/Tests/ORM/Mapping/AbstractMappingDriverTest.php index 741b35a6c..270e16234 100644 --- a/tests/Doctrine/Tests/ORM/Mapping/AbstractMappingDriverTest.php +++ b/tests/Doctrine/Tests/ORM/Mapping/AbstractMappingDriverTest.php @@ -52,6 +52,23 @@ abstract class AbstractMappingDriverTest extends \Doctrine\Tests\OrmTestCase return $class; } + /** + * @depends testEntityTableNameAndInheritance + * @param ClassMetadata $class + */ + public function testEntitySequence($class) + { + $this->assertType('array', $class->sequenceGeneratorDefinition, 'No Sequence Definition set on this driver.'); + $this->assertEquals( + array( + 'sequenceName' => 'tablename_seq', + 'allocationSize' => 100, + 'initialValue' => 1, + ), + $class->sequenceGeneratorDefinition + ); + } + /** * @depends testEntityTableNameAndInheritance @@ -227,7 +244,12 @@ abstract class AbstractMappingDriverTest extends \Doctrine\Tests\OrmTestCase */ class User { - /** @Id @Column(type="integer") @generatedValue(strategy="AUTO") */ + /** + * @Id + * @Column(type="integer") + * @generatedValue(strategy="AUTO") + * @SequenceGenerator(sequenceName="tablename_seq", initialValue=1, allocationSize=100) + **/ public $id; /** @@ -389,5 +411,10 @@ class User $metadata->table['uniqueConstraints'] = array( 'search_idx' => array('columns' => array('name', 'user_email')), ); + $metadata->setSequenceGeneratorDefinition(array( + 'sequenceName' => 'tablename_seq', + 'allocationSize' => 100, + 'initialValue' => 1, + )); } } \ No newline at end of file diff --git a/tests/Doctrine/Tests/ORM/Mapping/php/Doctrine.Tests.ORM.Mapping.User.php b/tests/Doctrine/Tests/ORM/Mapping/php/Doctrine.Tests.ORM.Mapping.User.php index a7a58c60d..819a01109 100644 --- a/tests/Doctrine/Tests/ORM/Mapping/php/Doctrine.Tests.ORM.Mapping.User.php +++ b/tests/Doctrine/Tests/ORM/Mapping/php/Doctrine.Tests.ORM.Mapping.User.php @@ -105,4 +105,9 @@ $metadata->mapManyToMany(array( )); $metadata->table['uniqueConstraints'] = array( 'search_idx' => array('columns' => array('name', 'user_email')), -); \ No newline at end of file +); +$metadata->setSequenceGeneratorDefinition(array( + 'sequenceName' => 'tablename_seq', + 'allocationSize' => 100, + 'initialValue' => 1, + )); \ No newline at end of file diff --git a/tests/Doctrine/Tests/ORM/Mapping/xml/Doctrine.Tests.ORM.Mapping.User.dcm.xml b/tests/Doctrine/Tests/ORM/Mapping/xml/Doctrine.Tests.ORM.Mapping.User.dcm.xml index 7372604bb..793be0f06 100644 --- a/tests/Doctrine/Tests/ORM/Mapping/xml/Doctrine.Tests.ORM.Mapping.User.dcm.xml +++ b/tests/Doctrine/Tests/ORM/Mapping/xml/Doctrine.Tests.ORM.Mapping.User.dcm.xml @@ -18,6 +18,7 @@ + diff --git a/tests/Doctrine/Tests/ORM/Mapping/yaml/Doctrine.Tests.ORM.Mapping.User.dcm.yml b/tests/Doctrine/Tests/ORM/Mapping/yaml/Doctrine.Tests.ORM.Mapping.User.dcm.yml index 9017da012..7dd6bfaed 100644 --- a/tests/Doctrine/Tests/ORM/Mapping/yaml/Doctrine.Tests.ORM.Mapping.User.dcm.yml +++ b/tests/Doctrine/Tests/ORM/Mapping/yaml/Doctrine.Tests.ORM.Mapping.User.dcm.yml @@ -6,6 +6,10 @@ Doctrine\Tests\ORM\Mapping\User: type: integer generator: strategy: AUTO + sequenceGenerator: + sequenceName: tablename_seq + allocationSize: 100 + initialValue: 1 fields: name: type: string From 987fbee75862b9235292b0219fb9ffe7dfd0347a Mon Sep 17 00:00:00 2001 From: Benjamin Eberlei Date: Sat, 1 May 2010 03:33:13 +0200 Subject: [PATCH 85/86] DDC-537 Add missing sequence-generator tag definition in doctrine-mapping.xsd --- doctrine-mapping.xsd | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/doctrine-mapping.xsd b/doctrine-mapping.xsd index f3bea4f8e..e74010a8e 100644 --- a/doctrine-mapping.xsd +++ b/doctrine-mapping.xsd @@ -173,12 +173,19 @@ + + + + + + + From 427d4eed29e9c8893e33770492fcaee0100e50e6 Mon Sep 17 00:00:00 2001 From: Benjamin Eberlei Date: Sat, 1 May 2010 03:57:58 +0200 Subject: [PATCH 86/86] DDC-541 - Schema Table now return Pk, then Fk, then normal columns in that order --- lib/Doctrine/DBAL/Schema/Table.php | 19 ++++++++++++++++++- .../SchemaTool/MySqlSchemaToolTest.php | 2 +- .../SchemaTool/PostgreSqlSchemaToolTest.php | 2 +- 3 files changed, 20 insertions(+), 3 deletions(-) diff --git a/lib/Doctrine/DBAL/Schema/Table.php b/lib/Doctrine/DBAL/Schema/Table.php index c514f8f8f..7cf31fa8e 100644 --- a/lib/Doctrine/DBAL/Schema/Table.php +++ b/lib/Doctrine/DBAL/Schema/Table.php @@ -510,7 +510,24 @@ class Table extends AbstractAsset */ public function getColumns() { - return $this->_columns; + $columns = $this->_columns; + + $pkCols = array(); + $fkCols = array(); + + if ($this->hasIndex($this->_primaryKeyName)) { + $pkCols = $this->getPrimaryKey()->getColumns(); + } + foreach ($this->getForeignKeys() AS $fk) { + /* @var $fk ForeignKeyConstraint */ + $fkCols = array_merge($fkCols, $fk->getColumns()); + } + $colNames = array_unique(array_merge($pkCols, $fkCols, array_keys($columns))); + + uksort($columns, function($a, $b) use($colNames) { + return (array_search($a, $colNames) >= array_search($b, $colNames)); + }); + return $columns; } diff --git a/tests/Doctrine/Tests/ORM/Functional/SchemaTool/MySqlSchemaToolTest.php b/tests/Doctrine/Tests/ORM/Functional/SchemaTool/MySqlSchemaToolTest.php index 78977205c..194f7109e 100644 --- a/tests/Doctrine/Tests/ORM/Functional/SchemaTool/MySqlSchemaToolTest.php +++ b/tests/Doctrine/Tests/ORM/Functional/SchemaTool/MySqlSchemaToolTest.php @@ -27,7 +27,7 @@ class MySqlSchemaToolTest extends \Doctrine\Tests\OrmFunctionalTestCase $tool = new SchemaTool($this->_em); $sql = $tool->getCreateSchemaSql($classes); $this->assertEquals(8, count($sql)); - $this->assertEquals("CREATE TABLE cms_addresses (id INT AUTO_INCREMENT NOT NULL, country VARCHAR(50) NOT NULL, zip VARCHAR(50) NOT NULL, city VARCHAR(50) NOT NULL, user_id INT DEFAULT NULL, PRIMARY KEY(id)) ENGINE = InnoDB", $sql[0]); + $this->assertEquals("CREATE TABLE cms_addresses (id INT AUTO_INCREMENT NOT NULL, user_id INT DEFAULT NULL, country VARCHAR(50) NOT NULL, zip VARCHAR(50) NOT NULL, city VARCHAR(50) NOT NULL, PRIMARY KEY(id)) ENGINE = InnoDB", $sql[0]); $this->assertEquals("CREATE TABLE cms_users (id INT AUTO_INCREMENT NOT NULL, status VARCHAR(50) NOT NULL, username VARCHAR(255) NOT NULL, name VARCHAR(255) NOT NULL, UNIQUE INDEX cms_users_username_uniq (username), PRIMARY KEY(id)) ENGINE = InnoDB", $sql[1]); $this->assertEquals("CREATE TABLE cms_users_groups (user_id INT NOT NULL, group_id INT NOT NULL, PRIMARY KEY(user_id, group_id)) ENGINE = InnoDB", $sql[2]); $this->assertEquals("CREATE TABLE cms_phonenumbers (phonenumber VARCHAR(50) NOT NULL, user_id INT DEFAULT NULL, PRIMARY KEY(phonenumber)) ENGINE = InnoDB", $sql[3]); diff --git a/tests/Doctrine/Tests/ORM/Functional/SchemaTool/PostgreSqlSchemaToolTest.php b/tests/Doctrine/Tests/ORM/Functional/SchemaTool/PostgreSqlSchemaToolTest.php index 9210bbd3b..8646068f0 100644 --- a/tests/Doctrine/Tests/ORM/Functional/SchemaTool/PostgreSqlSchemaToolTest.php +++ b/tests/Doctrine/Tests/ORM/Functional/SchemaTool/PostgreSqlSchemaToolTest.php @@ -34,7 +34,7 @@ class PostgreSqlSchemaToolTest extends \Doctrine\Tests\OrmFunctionalTestCase $sql = $tool->getCreateSchemaSql($classes); $this->assertEquals(count($sql), 11); - $this->assertEquals("CREATE TABLE cms_addresses (id INT NOT NULL, country VARCHAR(50) NOT NULL, zip VARCHAR(50) NOT NULL, city VARCHAR(50) NOT NULL, user_id INT DEFAULT NULL, PRIMARY KEY(id))", $sql[0]); + $this->assertEquals("CREATE TABLE cms_addresses (id INT NOT NULL, user_id INT DEFAULT NULL, country VARCHAR(50) NOT NULL, zip VARCHAR(50) NOT NULL, city VARCHAR(50) NOT NULL, PRIMARY KEY(id))", $sql[0]); $this->assertEquals("CREATE TABLE cms_users (id INT NOT NULL, status VARCHAR(50) NOT NULL, username VARCHAR(255) NOT NULL, name VARCHAR(255) NOT NULL, PRIMARY KEY(id))", $sql[1]); $this->assertEquals("CREATE UNIQUE INDEX cms_users_username_uniq ON cms_users (username)", $sql[2]); $this->assertEquals("CREATE TABLE cms_users_groups (user_id INT NOT NULL, group_id INT NOT NULL, PRIMARY KEY(user_id, group_id))", $sql[3]);