commit 082a0130c295668d4c31da3dacc68cfd92a5953a
Author: Polonkai Gergely
Date: Sun Jul 1 09:52:20 2012 +0200
Initial commit with Symfony 2.1+Vendors
Signed-off-by: Gergely POLONKAI (W00d5t0ck)
diff --git a/LICENSE b/LICENSE
new file mode 100644
index 0000000..cdffe7a
--- /dev/null
+++ b/LICENSE
@@ -0,0 +1,19 @@
+Copyright (c) 2004-2012 Fabien Potencier
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is furnished
+to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..52ee084
--- /dev/null
+++ b/README.md
@@ -0,0 +1,174 @@
+Symfony Standard Edition
+========================
+
+Welcome to the Symfony Standard Edition - a fully-functional Symfony2
+application that you can use as the skeleton for your new applications.
+
+This document contains information on how to download, install, and start
+using Symfony. For a more detailed explanation, see the [Installation][1]
+chapter of the Symfony Documentation.
+
+1) Installing the Standard Edition
+----------------------------------
+
+When it comes to installing the Symfony Standard Edition, you have the
+following options.
+
+### Use Composer (*recommended*)
+
+As Symfony uses [Composer][2] to manage its dependencies, the recommended way
+to create a new project is to use it.
+
+If you don't have Composer yet, download it following the instructions on
+http://getcomposer.org/ or just run the following command:
+
+ curl -s http://getcomposer.org/installer | php
+
+Then, use the `create-project` command to generate a new Symfony application:
+
+ composer.phar create-project symfony/framework-standard-edition path/to/install
+
+Composer will install Symfony and all its dependencies under the
+`path/to/install` directory.
+
+### Download an Archive File
+
+To quickly test Symfony, you can also download an [archive][3] of the Standard
+Edition and unpack it somewhere under your web server root directory.
+
+If you downloaded an archive "without vendors", you also need to install all
+the necessary dependencies. Download composer (see above) and run the
+following command:
+
+ php composer.phar install
+
+2) Checking your System Configuration
+-------------------------------------
+
+Before starting coding, make sure that your local system is properly
+configured for Symfony.
+
+Execute the `check.php` script from the command line:
+
+ php app/check.php
+
+Access the `config.php` script from a browser:
+
+ http://localhost/path/to/symfony/app/web/config.php
+
+If you get any warnings or recommendations, fix them before moving on.
+
+3) Browsing the Demo Application
+--------------------------------
+
+Congratulations! You're now ready to use Symfony.
+
+From the `config.php` page, click the "Bypass configuration and go to the
+Welcome page" link to load up your first Symfony page.
+
+You can also use a web-based configurator by clicking on the "Configure your
+Symfony Application online" link of the `config.php` page.
+
+To see a real-live Symfony page in action, access the following page:
+
+ web/app_dev.php/demo/hello/Fabien
+
+3) Getting started with Symfony
+-------------------------------
+
+This distribution is meant to be the starting point for your Symfony
+applications, but it also contains some sample code that you can learn from
+and play with.
+
+A great way to start learning Symfony is via the [Quick Tour][4], which will
+take you through all the basic features of Symfony2.
+
+Once you're feeling good, you can move onto reading the official
+[Symfony2 book][5].
+
+A default bundle, `AcmeDemoBundle`, shows you Symfony2 in action. After
+playing with it, you can remove it by following these steps:
+
+ * delete the `src/Acme` directory;
+
+ * remove the routing entries referencing AcmeBundle in
+ `app/config/routing_dev.yml`;
+
+ * remove the AcmeBundle from the registered bundles in `app/AppKernel.php`;
+
+ * remove the `web/bundles/acmedemo` directory;
+
+ * remove the inclusion of the security configuration in
+ `app/config/config.yml` (remove the `- { resource: security.yml }` line)
+ or tweak the security configuration to fit your needs.
+
+What's inside?
+---------------
+
+The Symfony Standard Edition is configured with the following defaults:
+
+ * Twig is the only configured template engine;
+
+ * Doctrine ORM/DBAL is configured;
+
+ * Swiftmailer is configured;
+
+ * Annotations for everything are enabled.
+
+It comes pre-configured with the following bundles:
+
+ * **FrameworkBundle** - The core Symfony framework bundle
+
+ * [**SensioFrameworkExtraBundle**][6] - Adds several enhancements, including
+ template and routing annotation capability
+
+ * [**DoctrineBundle**][7] - Adds support for the Doctrine ORM
+
+ * [**TwigBundle**][8] - Adds support for the Twig templating engine
+
+ * [**SecurityBundle**][9] - Adds security by integrating Symfony's security
+ component
+
+ * [**SwiftmailerBundle**][10] - Adds support for Swiftmailer, a library for
+ sending emails
+
+ * [**MonologBundle**][11] - Adds support for Monolog, a logging library
+
+ * [**AsseticBundle**][12] - Adds support for Assetic, an asset processing
+ library
+
+ * [**JMSSecurityExtraBundle**][13] - Allows security to be added via
+ annotations
+
+ * [**JMSDiExtraBundle**][14] - Adds more powerful dependency injection
+ features
+
+ * **WebProfilerBundle** (in dev/test env) - Adds profiling functionality and
+ the web debug toolbar
+
+ * **SensioDistributionBundle** (in dev/test env) - Adds functionality for
+ configuring and working with Symfony distributions
+
+ * [**SensioGeneratorBundle**][15] (in dev/test env) - Adds code generation
+ capabilities
+
+ * **AcmeDemoBundle** (in dev/test env) - A demo bundle with some example
+ code
+
+Enjoy!
+
+[1]: http://symfony.com/doc/2.1/book/installation.html
+[2]: http://getcomposer.org/
+[3]: http://symfony.com/download
+[4]: http://symfony.com/doc/2.1/quick_tour/the_big_picture.html
+[5]: http://symfony.com/doc/2.1/
+[6]: http://symfony.com/doc/2.1/bundles/SensioFrameworkExtraBundle/index.html
+[7]: http://symfony.com/doc/2.1/book/doctrine.html
+[8]: http://symfony.com/doc/2.1/book/templating.html
+[9]: http://symfony.com/doc/2.1/book/security.html
+[10]: http://symfony.com/doc/2.1/cookbook/email.html
+[11]: http://symfony.com/doc/2.1/cookbook/logging/monolog.html
+[12]: http://symfony.com/doc/2.1/cookbook/assetic/asset_management.html
+[13]: http://jmsyst.com/bundles/JMSSecurityExtraBundle/1.1
+[14]: http://jmsyst.com/bundles/JMSDiExtraBundle/1.0
+[15]: http://symfony.com/doc/2.1/bundles/SensioGeneratorBundle/index.html
diff --git a/app/.htaccess b/app/.htaccess
new file mode 100644
index 0000000..3418e55
--- /dev/null
+++ b/app/.htaccess
@@ -0,0 +1 @@
+deny from all
\ No newline at end of file
diff --git a/app/AppCache.php b/app/AppCache.php
new file mode 100644
index 0000000..ddb51db
--- /dev/null
+++ b/app/AppCache.php
@@ -0,0 +1,9 @@
+getEnvironment(), array('dev', 'test'))) {
+ $bundles[] = new Acme\DemoBundle\AcmeDemoBundle();
+ $bundles[] = new Symfony\Bundle\WebProfilerBundle\WebProfilerBundle();
+ $bundles[] = new Sensio\Bundle\DistributionBundle\SensioDistributionBundle();
+ $bundles[] = new Sensio\Bundle\GeneratorBundle\SensioGeneratorBundle();
+ }
+
+ return $bundles;
+ }
+
+ public function registerContainerConfiguration(LoaderInterface $loader)
+ {
+ $loader->load(__DIR__.'/config/config_'.$this->getEnvironment().'.yml');
+ }
+}
diff --git a/app/Resources/views/base.html.twig b/app/Resources/views/base.html.twig
new file mode 100644
index 0000000..bafd28d
--- /dev/null
+++ b/app/Resources/views/base.html.twig
@@ -0,0 +1,13 @@
+
+
+
+
+ {% block title %}Welcome!{% endblock %}
+ {% block stylesheets %}{% endblock %}
+
+
+
+ {% block body %}{% endblock %}
+ {% block javascripts %}{% endblock %}
+
+
diff --git a/app/SymfonyRequirements.php b/app/SymfonyRequirements.php
new file mode 100644
index 0000000..0399b96
--- /dev/null
+++ b/app/SymfonyRequirements.php
@@ -0,0 +1,580 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+/**
+ * Represents a single PHP requirement, e.g. an installed extension.
+ * It can be a mandatory requirement or an optional recommendation.
+ * There is a special subclass, named PhpIniRequirement, to check a php.ini configuration.
+ *
+ * @author Tobias Schultze
+ */
+class Requirement
+{
+ private $fulfilled;
+ private $testMessage;
+ private $helpText;
+ private $helpHtml;
+ private $optional;
+
+ /**
+ * Constructor that initializes the requirement.
+ *
+ * @param Boolean $fulfilled Whether the requirement is fulfilled
+ * @param string $testMessage The message for testing the requirement
+ * @param string $helpHtml The help text formatted in HTML for resolving the problem
+ * @param string|null $helpText The help text (when null, it will be inferred from $helpHtml, i.e. stripped from HTML tags)
+ * @param Boolean $optional Whether this is only an optional recommendation not a mandatory requirement
+ */
+ public function __construct($fulfilled, $testMessage, $helpHtml, $helpText = null, $optional = false)
+ {
+ $this->fulfilled = (Boolean) $fulfilled;
+ $this->testMessage = (string) $testMessage;
+ $this->helpHtml = (string) $helpHtml;
+ $this->helpText = null === $helpText ? strip_tags($this->helpHtml) : (string) $helpText;
+ $this->optional = (Boolean) $optional;
+ }
+
+ /**
+ * Returns whether the requirement is fulfilled.
+ *
+ * @return Boolean true if fulfilled, otherwise false
+ */
+ public function isFulfilled()
+ {
+ return $this->fulfilled;
+ }
+
+ /**
+ * Returns the message for testing the requirement.
+ *
+ * @return string The test message
+ */
+ public function getTestMessage()
+ {
+ return $this->testMessage;
+ }
+
+ /**
+ * Returns the help text for resolving the problem
+ *
+ * @return string The help text
+ */
+ public function getHelpText()
+ {
+ return $this->helpText;
+ }
+
+ /**
+ * Returns the help text formatted in HTML.
+ *
+ * @return string The HTML help
+ */
+ public function getHelpHtml()
+ {
+ return $this->helpHtml;
+ }
+
+ /**
+ * Returns whether this is only an optional recommendation and not a mandatory requirement.
+ *
+ * @return Boolean true if optional, false if mandatory
+ */
+ public function isOptional()
+ {
+ return $this->optional;
+ }
+}
+
+/**
+ * Represents a PHP requirement in form of a php.ini configuration.
+ *
+ * @author Tobias Schultze
+ */
+class PhpIniRequirement extends Requirement
+{
+ /**
+ * Constructor that initializes the requirement.
+ *
+ * @param string $cfgName The configuration name used for ini_get()
+ * @param Boolean|callback $evaluation Either a Boolean indicating whether the configuration should evaluate to true or false,
+ or a callback function receiving the configuration value as parameter to determine the fulfillment of the requirement
+ * @param Boolean $approveCfgAbsence If true the Requirement will be fulfilled even if the configuration option does not exist, i.e. ini_get() returns false.
+ This is helpful for abandoned configs in later PHP versions or configs of an optional extension, like Suhosin.
+ Example: You require a config to be true but PHP later removes this config and defaults it to true internally.
+ * @param string $testMessage The message for testing the requirement (when null and $evaluation is a Boolean a default message is derived)
+ * @param string $helpHtml The help text formatted in HTML for resolving the problem (when null and $evaluation is a Boolean a default help is derived)
+ * @param string|null $helpText The help text (when null, it will be inferred from $helpHtml, i.e. stripped from HTML tags)
+ * @param Boolean $optional Whether this is only an optional recommendation not a mandatory requirement
+ */
+ public function __construct($cfgName, $evaluation, $approveCfgAbsence = false, $testMessage = null, $helpHtml = null, $helpText = null, $optional = false)
+ {
+ $cfgValue = ini_get($cfgName);
+
+ if (is_callable($evaluation)) {
+ if (null === $testMessage || null === $helpHtml) {
+ throw new InvalidArgumentException('You must provide the parameters testMessage and helpHtml for a callback evaluation.');
+ }
+
+ $fulfilled = call_user_func($evaluation, $cfgValue);
+ } else {
+ if (null === $testMessage) {
+ $testMessage = sprintf('%s %s be %s in php.ini',
+ $cfgName,
+ $optional ? 'should' : 'must',
+ $evaluation ? 'enabled' : 'disabled'
+ );
+ }
+
+ if (null === $helpHtml) {
+ $helpHtml = sprintf('Set %s to %s in php.ini*.',
+ $cfgName,
+ $evaluation ? 'on' : 'off'
+ );
+ }
+
+ $fulfilled = $evaluation == $cfgValue;
+ }
+
+ parent::__construct($fulfilled || ($approveCfgAbsence && false === $cfgValue), $testMessage, $helpHtml, $helpText, $optional);
+ }
+}
+
+/**
+ * A RequirementCollection represents a set of Requirement instances.
+ *
+ * Users of PHP 5.2 should be able to run the requirements checks.
+ * This is why the class must be compatible with PHP 5.2
+ * (e.g. not using namespaces and closures).
+ *
+ * @author Tobias Schultze
+ */
+class RequirementCollection implements IteratorAggregate
+{
+ private $requirements = array();
+
+ /**
+ * Gets the current RequirementCollection as an Iterator.
+ *
+ * @return Traversable A Traversable interface
+ */
+ public function getIterator()
+ {
+ return new ArrayIterator($this->requirements);
+ }
+
+ /**
+ * Adds a Requirement.
+ *
+ * @param Requirement $requirement A Requirement instance
+ */
+ public function add(Requirement $requirement)
+ {
+ $this->requirements[] = $requirement;
+ }
+
+ /**
+ * Adds a mandatory requirement.
+ *
+ * @param Boolean $fulfilled Whether the requirement is fulfilled
+ * @param string $testMessage The message for testing the requirement
+ * @param string $helpHtml The help text formatted in HTML for resolving the problem
+ * @param string|null $helpText The help text (when null, it will be inferred from $helpHtml, i.e. stripped from HTML tags)
+ */
+ public function addRequirement($fulfilled, $testMessage, $helpHtml, $helpText = null)
+ {
+ $this->add(new Requirement($fulfilled, $testMessage, $helpHtml, $helpText, false));
+ }
+
+ /**
+ * Adds an optional recommendation.
+ *
+ * @param Boolean $fulfilled Whether the recommendation is fulfilled
+ * @param string $testMessage The message for testing the recommendation
+ * @param string $helpHtml The help text formatted in HTML for resolving the problem
+ * @param string|null $helpText The help text (when null, it will be inferred from $helpHtml, i.e. stripped from HTML tags)
+ */
+ public function addRecommendation($fulfilled, $testMessage, $helpHtml, $helpText = null)
+ {
+ $this->add(new Requirement($fulfilled, $testMessage, $helpHtml, $helpText, true));
+ }
+
+ /**
+ * Adds a mandatory requirement in form of a php.ini configuration.
+ *
+ * @param string $cfgName The configuration name used for ini_get()
+ * @param Boolean|callback $evaluation Either a Boolean indicating whether the configuration should evaluate to true or false,
+ or a callback function receiving the configuration value as parameter to determine the fulfillment of the requirement
+ * @param Boolean $approveCfgAbsence If true the Requirement will be fulfilled even if the configuration option does not exist, i.e. ini_get() returns false.
+ This is helpful for abandoned configs in later PHP versions or configs of an optional extension, like Suhosin.
+ Example: You require a config to be true but PHP later removes this config and defaults it to true internally.
+ * @param string $testMessage The message for testing the requirement (when null and $evaluation is a Boolean a default message is derived)
+ * @param string $helpHtml The help text formatted in HTML for resolving the problem (when null and $evaluation is a Boolean a default help is derived)
+ * @param string|null $helpText The help text (when null, it will be inferred from $helpHtml, i.e. stripped from HTML tags)
+ */
+ public function addPhpIniRequirement($cfgName, $evaluation, $approveCfgAbsence = false, $testMessage = null, $helpHtml = null, $helpText = null)
+ {
+ $this->add(new PhpIniRequirement($cfgName, $evaluation, $approveCfgAbsence, $testMessage, $helpHtml, $helpText, false));
+ }
+
+ /**
+ * Adds an optional recommendation in form of a php.ini configuration.
+ *
+ * @param string $cfgName The configuration name used for ini_get()
+ * @param Boolean|callback $evaluation Either a Boolean indicating whether the configuration should evaluate to true or false,
+ or a callback function receiving the configuration value as parameter to determine the fulfillment of the requirement
+ * @param Boolean $approveCfgAbsence If true the Requirement will be fulfilled even if the configuration option does not exist, i.e. ini_get() returns false.
+ This is helpful for abandoned configs in later PHP versions or configs of an optional extension, like Suhosin.
+ Example: You require a config to be true but PHP later removes this config and defaults it to true internally.
+ * @param string $testMessage The message for testing the requirement (when null and $evaluation is a Boolean a default message is derived)
+ * @param string $helpHtml The help text formatted in HTML for resolving the problem (when null and $evaluation is a Boolean a default help is derived)
+ * @param string|null $helpText The help text (when null, it will be inferred from $helpHtml, i.e. stripped from HTML tags)
+ */
+ public function addPhpIniRecommendation($cfgName, $evaluation, $approveCfgAbsence = false, $testMessage = null, $helpHtml = null, $helpText = null)
+ {
+ $this->add(new PhpIniRequirement($cfgName, $evaluation, $approveCfgAbsence, $testMessage, $helpHtml, $helpText, true));
+ }
+
+ /**
+ * Adds a requirement collection to the current set of requirements.
+ *
+ * @param RequirementCollection $collection A RequirementCollection instance
+ */
+ public function addCollection(RequirementCollection $collection)
+ {
+ $this->requirements = array_merge($this->requirements, $collection->all());
+ }
+
+ /**
+ * Returns both requirements and recommendations.
+ *
+ * @return array Array of Requirement instances
+ */
+ public function all()
+ {
+ return $this->requirements;
+ }
+
+ /**
+ * Returns all mandatory requirements.
+ *
+ * @return array Array of Requirement instances
+ */
+ public function getRequirements()
+ {
+ $array = array();
+ foreach ($this->requirements as $req) {
+ if (!$req->isOptional()) {
+ $array[] = $req;
+ }
+ }
+
+ return $array;
+ }
+
+ /**
+ * Returns the mandatory requirements that were not met.
+ *
+ * @return array Array of Requirement instances
+ */
+ public function getFailedRequirements()
+ {
+ $array = array();
+ foreach ($this->requirements as $req) {
+ if (!$req->isFulfilled() && !$req->isOptional()) {
+ $array[] = $req;
+ }
+ }
+
+ return $array;
+ }
+
+ /**
+ * Returns all optional recommmendations.
+ *
+ * @return array Array of Requirement instances
+ */
+ public function getRecommendations()
+ {
+ $array = array();
+ foreach ($this->requirements as $req) {
+ if ($req->isOptional()) {
+ $array[] = $req;
+ }
+ }
+
+ return $array;
+ }
+
+ /**
+ * Returns the recommendations that were not met.
+ *
+ * @return array Array of Requirement instances
+ */
+ public function getFailedRecommendations()
+ {
+ $array = array();
+ foreach ($this->requirements as $req) {
+ if (!$req->isFulfilled() && $req->isOptional()) {
+ $array[] = $req;
+ }
+ }
+
+ return $array;
+ }
+
+ /**
+ * Returns whether a php.ini configuration is not correct.
+ *
+ * @return Boolean php.ini configuration problem?
+ */
+ public function hasPhpIniConfigIssue()
+ {
+ foreach ($this->requirements as $req) {
+ if (!$req->isFulfilled() && $req instanceof PhpIniRequirement) {
+ return true;
+ }
+ }
+
+ return false;
+ }
+
+ /**
+ * Returns the PHP configuration file (php.ini) path.
+ *
+ * @return string|false php.ini file path
+ */
+ public function getPhpIniConfigPath()
+ {
+ return get_cfg_var('cfg_file_path');
+ }
+}
+
+/**
+ * This class specifies all requirements and optional recommendations that
+ * are necessary to run the Symfony Standard Edition.
+ *
+ * @author Tobias Schultze
+ */
+class SymfonyRequirements extends RequirementCollection
+{
+ const REQUIRED_PHP_VERSION = '5.3.3';
+
+ /**
+ * Constructor that initializes the requirements.
+ */
+ public function __construct()
+ {
+ /* mandatory requirements follow */
+
+ $installedPhpVersion = phpversion();
+
+ $this->addRequirement(
+ version_compare($installedPhpVersion, self::REQUIRED_PHP_VERSION, '>='),
+ sprintf('PHP version must be at least %s (%s installed)', self::REQUIRED_PHP_VERSION, $installedPhpVersion),
+ sprintf('You are running PHP version "%s", but Symfony needs at least PHP "%s" to run.
+ Before using Symfony, upgrade your PHP installation, preferably to the latest version.',
+ $installedPhpVersion, self::REQUIRED_PHP_VERSION),
+ sprintf('Install PHP %s or newer (installed version is %s)', self::REQUIRED_PHP_VERSION, $installedPhpVersion)
+ );
+
+ $this->addRequirement(
+ is_dir(__DIR__.'/../vendor/symfony'),
+ 'Vendor libraries must be installed',
+ 'Vendor libraries are missing. Install composer following instructions from http://getcomposer.org/. ' .
+ 'Then run "php composer.phar install" to install them.'
+ );
+
+ $baseDir = basename(__DIR__);
+ $this->addRequirement(
+ is_writable(__DIR__.'/cache'),
+ "$baseDir/cache/ directory must be writable",
+ "Change the permissions of the \"$baseDir/cache/\" directory so that the web server can write into it."
+ );
+
+ $this->addRequirement(
+ is_writable(__DIR__.'/logs'),
+ "$baseDir/logs/ directory must be writable",
+ "Change the permissions of the \"$baseDir/logs/\" directory so that the web server can write into it."
+ );
+
+ $this->addPhpIniRequirement(
+ 'date.timezone', true, false,
+ 'date.timezone setting must be set',
+ 'Set the "date.timezone" setting in php.ini* (like Europe/Paris).'
+ );
+
+ if (version_compare($installedPhpVersion, self::REQUIRED_PHP_VERSION, '>=')) {
+ $this->addRequirement(
+ (in_array(date_default_timezone_get(), \DateTimeZone::listIdentifiers())),
+ sprintf('Default timezone is deprecated (%s)', date_default_timezone_get()),
+ 'Fix your php.ini file (list of deprecated timezones http://us.php.net/manual/en/timezones.others.php).'
+ );
+ }
+
+ $this->addRequirement(
+ function_exists('json_encode'),
+ 'json_encode() must be available',
+ 'Install and enable the JSON extension.'
+ );
+
+ $this->addRequirement(
+ function_exists('session_start'),
+ 'session_start() must be available',
+ 'Install and enable the session extension.'
+ );
+
+ $this->addRequirement(
+ function_exists('ctype_alpha'),
+ 'ctype_alpha() must be available',
+ 'Install and enable the ctype extension.'
+ );
+
+ $this->addRequirement(
+ function_exists('token_get_all'),
+ 'token_get_all() must be available',
+ 'Install and enable the Tokenizer extension.'
+ );
+
+ $this->addRequirement(
+ function_exists('simplexml_import_dom'),
+ 'simplexml_import_dom() must be available',
+ 'Install and enable the SimpleXML extension.'
+ );
+
+ $this->addRequirement(
+ !(function_exists('apc_store') && ini_get('apc.enabled')) || version_compare(phpversion('apc'), '3.0.17', '>='),
+ 'APC version must be at least 3.0.17',
+ 'Upgrade your APC extension (3.0.17+)'
+ );
+
+ $this->addPhpIniRequirement('detect_unicode', false);
+
+ $this->addPhpIniRequirement(
+ 'suhosin.executor.include.whitelist',
+ create_function('$cfgValue', 'return false !== stripos($cfgValue, "phar");'),
+ true,
+ 'suhosin.executor.include.whitelist must be configured correctly in php.ini',
+ 'Add "phar" to suhosin.executor.include.whitelist in php.ini*.'
+ );
+
+ $pcreVersion = defined('PCRE_VERSION') ? (float) PCRE_VERSION : null;
+
+ $this->addRequirement(
+ null !== $pcreVersion && $pcreVersion > 8.0,
+ sprintf('PCRE extension must be available and at least 8.0 (%s installed)', $pcreVersion ? $pcreVersion : 'not'),
+ 'Upgrade your PCRE extension (8.0+)'
+ );
+
+ /* optional recommendations follow */
+
+ $this->addRecommendation(
+ version_compare($installedPhpVersion, '5.3.8', '>='),
+ sprintf('Annotations might not work properly due to the PHP bug #55156 before PHP 5.3.8 (%s installed)', $installedPhpVersion),
+ 'Install PHP 5.3.8 or newer if your project uses annotations'
+ );
+
+ $this->addRecommendation(
+ class_exists('DomDocument'),
+ 'PHP-XML module should be installed',
+ 'Install and enable the PHP-XML module.'
+ );
+
+ $this->addRecommendation(
+ function_exists('mb_strlen'),
+ 'mb_strlen() should be available',
+ 'Install and enable the mbstring extension.'
+ );
+
+ $this->addRecommendation(
+ function_exists('iconv'),
+ 'iconv() should be available',
+ 'Install and enable the iconv extension.'
+ );
+
+ $this->addRecommendation(
+ function_exists('utf8_decode'),
+ 'utf8_decode() should be available',
+ 'Install and enable the XML extension.'
+ );
+
+ if (!defined('PHP_WINDOWS_VERSION_BUILD')) {
+ $this->addRecommendation(
+ function_exists('posix_isatty'),
+ 'posix_isatty() should be available',
+ 'Install and enable the php_posix extension (used to colorize the CLI output).'
+ );
+ }
+
+ $this->addRecommendation(
+ class_exists('Locale'),
+ 'intl extension should be available',
+ 'Install and enable the intl extension (used for validators).'
+ );
+
+ if (class_exists('Locale')) {
+ if (defined('INTL_ICU_VERSION')) {
+ $version = INTL_ICU_VERSION;
+ } else {
+ $reflector = new ReflectionExtension('intl');
+
+ ob_start();
+ $reflector->info();
+ $output = strip_tags(ob_get_clean());
+
+ preg_match('/^ICU version +(?:=> )?(.*)$/m', $output, $matches);
+ $version = $matches[1];
+ }
+
+ $this->addRecommendation(
+ version_compare($version, '4.0', '>='),
+ 'intl ICU version should be at least 4+',
+ 'Upgrade your intl extension with a newer ICU version (4+).'
+ );
+ }
+
+ $accelerator =
+ (function_exists('apc_store') && ini_get('apc.enabled'))
+ ||
+ function_exists('eaccelerator_put') && ini_get('eaccelerator.enable')
+ ||
+ function_exists('xcache_set')
+ ;
+
+ $this->addRecommendation(
+ $accelerator,
+ 'a PHP accelerator should be installed',
+ 'Install and enable a PHP accelerator like APC (highly recommended).'
+ );
+
+ $this->addPhpIniRecommendation('short_open_tag', false);
+
+ $this->addPhpIniRecommendation('magic_quotes_gpc', false, true);
+
+ $this->addPhpIniRecommendation('register_globals', false, true);
+
+ $this->addPhpIniRecommendation('session.auto_start', false);
+
+ $this->addRecommendation(
+ class_exists('PDO'),
+ 'PDO should be installed',
+ 'Install PDO (mandatory for Doctrine).'
+ );
+
+ if (class_exists('PDO')) {
+ $drivers = PDO::getAvailableDrivers();
+ $this->addRecommendation(
+ count($drivers),
+ sprintf('PDO should have some drivers installed (currently available: %s)', count($drivers) ? implode(', ', $drivers) : 'none'),
+ 'Install PDO drivers (mandatory for Doctrine).'
+ );
+ }
+ }
+}
diff --git a/app/autoload.php b/app/autoload.php
new file mode 100644
index 0000000..28425dc
--- /dev/null
+++ b/app/autoload.php
@@ -0,0 +1,32 @@
+You must set up the project dependencies by running the following commands:
+EOF;
+ }
+
+ protected function getControllerCode()
+ {
+ $class = get_class($this->controller[0]);
+ if (class_exists('CG\Core\ClassUtils')) {
+ $class = ClassUtils::getUserClass($class);
+ }
+
+ $r = new \ReflectionClass($class);
+ $m = $r->getMethod($this->controller[1]);
+
+ $code = file($r->getFilename());
+
+ return ' '.$m->getDocComment()."\n".implode('', array_slice($code, $m->getStartline() - 1, $m->getEndLine() - $m->getStartline() + 1));
+ }
+
+ protected function getTemplateCode($template)
+ {
+ return $this->loader->getSource($template->getTemplateName());
+ }
+
+ /**
+ * Returns the name of the extension.
+ *
+ * @return string The extension name
+ */
+ public function getName()
+ {
+ return 'demo';
+ }
+}
diff --git a/vendor/ClassLoader.php b/vendor/ClassLoader.php
new file mode 100644
index 0000000..d07cb31
--- /dev/null
+++ b/vendor/ClassLoader.php
@@ -0,0 +1,203 @@
+
+ * Jordi Boggiano
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Composer\Autoload;
+
+/**
+ * ClassLoader implements an PSR-0 class loader
+ *
+ * See https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-0.md
+ *
+ * $loader = new ComposerClassLoader();
+ *
+ * // register classes with namespaces
+ * $loader->add('Symfony\Component', __DIR__.'/component');
+ * $loader->add('Symfony', __DIR__.'/framework');
+ *
+ * // activate the autoloader
+ * $loader->register();
+ *
+ * // to enable searching the include path (eg. for PEAR packages)
+ * $loader->setUseIncludePath(true);
+ *
+ * In this example, if you try to use a class in the Symfony\Component
+ * namespace or one of its children (Symfony\Component\Console for instance),
+ * the autoloader will first look for the class under the component/
+ * directory, and it will then fallback to the framework/ directory if not
+ * found before giving up.
+ *
+ * This class is loosely based on the Symfony UniversalClassLoader.
+ *
+ * @author Fabien Potencier
+ * @author Jordi Boggiano
+ */
+class ClassLoader
+{
+ private $prefixes = array();
+ private $fallbackDirs = array();
+ private $useIncludePath = false;
+ private $classMap = array();
+
+ public function getPrefixes()
+ {
+ return $this->prefixes;
+ }
+
+ public function getFallbackDirs()
+ {
+ return $this->fallbackDirs;
+ }
+
+ public function getClassMap()
+ {
+ return $this->classMap;
+ }
+
+ /**
+ * @param array $classMap Class to filename map
+ */
+ public function addClassMap(array $classMap)
+ {
+ if ($this->classMap) {
+ $this->classMap = array_merge($this->classMap, $classMap);
+ } else {
+ $this->classMap = $classMap;
+ }
+ }
+
+ /**
+ * Registers a set of classes
+ *
+ * @param string $prefix The classes prefix
+ * @param array|string $paths The location(s) of the classes
+ */
+ public function add($prefix, $paths)
+ {
+ if (!$prefix) {
+ foreach ((array) $paths as $path) {
+ $this->fallbackDirs[] = $path;
+ }
+ return;
+ }
+ if (isset($this->prefixes[$prefix])) {
+ $this->prefixes[$prefix] = array_merge(
+ $this->prefixes[$prefix],
+ (array) $paths
+ );
+ } else {
+ $this->prefixes[$prefix] = (array) $paths;
+ }
+ }
+
+ /**
+ * Turns on searching the include for class files.
+ *
+ * @param Boolean $useIncludePath
+ */
+ public function setUseIncludePath($useIncludePath)
+ {
+ $this->useIncludePath = $useIncludePath;
+ }
+
+ /**
+ * Can be used to check if the autoloader uses the include path to check
+ * for classes.
+ *
+ * @return Boolean
+ */
+ public function getUseIncludePath()
+ {
+ return $this->useIncludePath;
+ }
+
+ /**
+ * Registers this instance as an autoloader.
+ *
+ * @param Boolean $prepend Whether to prepend the autoloader or not
+ */
+ public function register($prepend = false)
+ {
+ spl_autoload_register(array($this, 'loadClass'), true, $prepend);
+ }
+
+ /**
+ * Unregisters this instance as an autoloader.
+ */
+ public function unregister()
+ {
+ spl_autoload_unregister(array($this, 'loadClass'));
+ }
+
+ /**
+ * Loads the given class or interface.
+ *
+ * @param string $class The name of the class
+ * @return Boolean|null True, if loaded
+ */
+ public function loadClass($class)
+ {
+ if ($file = $this->findFile($class)) {
+ require $file;
+ return true;
+ }
+ }
+
+ /**
+ * Finds the path to the file where the class is defined.
+ *
+ * @param string $class The name of the class
+ *
+ * @return string|null The path, if found
+ */
+ public function findFile($class)
+ {
+ if (isset($this->classMap[$class])) {
+ return $this->classMap[$class];
+ }
+
+ if ('\\' == $class[0]) {
+ $class = substr($class, 1);
+ }
+
+ if (false !== $pos = strrpos($class, '\\')) {
+ // namespaced class name
+ $classPath = str_replace('\\', DIRECTORY_SEPARATOR, substr($class, 0, $pos)) . DIRECTORY_SEPARATOR;
+ $className = substr($class, $pos + 1);
+ } else {
+ // PEAR-like class name
+ $classPath = null;
+ $className = $class;
+ }
+
+ $classPath .= str_replace('_', DIRECTORY_SEPARATOR, $className) . '.php';
+
+ foreach ($this->prefixes as $prefix => $dirs) {
+ if (0 === strpos($class, $prefix)) {
+ foreach ($dirs as $dir) {
+ if (file_exists($dir . DIRECTORY_SEPARATOR . $classPath)) {
+ return $dir . DIRECTORY_SEPARATOR . $classPath;
+ }
+ }
+ }
+ }
+
+ foreach ($this->fallbackDirs as $dir) {
+ if (file_exists($dir . DIRECTORY_SEPARATOR . $classPath)) {
+ return $dir . DIRECTORY_SEPARATOR . $classPath;
+ }
+ }
+
+ if ($this->useIncludePath && $file = stream_resolve_include_path($classPath)) {
+ return $file;
+ }
+ }
+}
diff --git a/vendor/autoload.php b/vendor/autoload.php
new file mode 100644
index 0000000..d979957
--- /dev/null
+++ b/vendor/autoload.php
@@ -0,0 +1,27 @@
+ $path) {
+ $loader->add($namespace, $path);
+ }
+
+ $classMap = require $composerDir . '/autoload_classmap.php';
+ if ($classMap) {
+ $loader->addClassMap($classMap);
+ }
+
+ $loader->register();
+
+ return $loader;
+});
diff --git a/vendor/autoload_classmap.php b/vendor/autoload_classmap.php
new file mode 100644
index 0000000..b382d27
--- /dev/null
+++ b/vendor/autoload_classmap.php
@@ -0,0 +1,9 @@
+ $vendorDir . '/twig/extensions/lib/',
+ 'Twig_' => $vendorDir . '/twig/twig/lib/',
+ 'Symfony\\Bundle\\SwiftmailerBundle' => $vendorDir . '/symfony/swiftmailer-bundle/',
+ 'Symfony\\Bundle\\MonologBundle' => $vendorDir . '/symfony/monolog-bundle/',
+ 'Symfony\\Bundle\\AsseticBundle' => $vendorDir . '/symfony/assetic-bundle/',
+ 'Symfony\\Bridge\\Swiftmailer' => $vendorDir . '/symfony/swiftmailer-bridge/',
+ 'Symfony' => $vendorDir . '/symfony/symfony/src/',
+ 'SessionHandlerInterface' => $vendorDir . '/symfony/symfony/src/Symfony/Component/HttpFoundation/Resources/stubs',
+ 'Sensio\\Bundle\\GeneratorBundle' => $vendorDir . '/sensio/generator-bundle/',
+ 'Sensio\\Bundle\\FrameworkExtraBundle' => $vendorDir . '/sensio/framework-extra-bundle/',
+ 'Sensio\\Bundle\\DistributionBundle' => $vendorDir . '/sensio/distribution-bundle/',
+ 'Monolog' => $vendorDir . '/monolog/monolog/src/',
+ 'Metadata\\' => $vendorDir . '/jms/metadata/src/',
+ 'JMS\\SecurityExtraBundle' => $vendorDir . '/jms/security-extra-bundle/',
+ 'JMS\\DiExtraBundle' => $vendorDir . '/jms/di-extra-bundle/',
+ 'JMS\\AopBundle' => $vendorDir . '/jms/aop-bundle/',
+ 'Doctrine\\ORM' => $vendorDir . '/doctrine/orm/lib/',
+ 'Doctrine\\DBAL' => $vendorDir . '/doctrine/dbal/lib/',
+ 'Doctrine\\Common' => $vendorDir . '/doctrine/common/lib/',
+ 'Doctrine\\Bundle\\DoctrineBundle' => $vendorDir . '/doctrine/doctrine-bundle/',
+ 'CG\\' => $vendorDir . '/jms/cg/src/',
+ 'Assetic' => $vendorDir . '/kriswallsmith/assetic/src/',
+ '' => $baseDir . '/src/',
+);
diff --git a/vendor/composer/ClassLoader.php b/vendor/composer/ClassLoader.php
new file mode 100644
index 0000000..5b9574e
--- /dev/null
+++ b/vendor/composer/ClassLoader.php
@@ -0,0 +1,205 @@
+
+ * Jordi Boggiano
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Composer\Autoload;
+
+/**
+ * ClassLoader implements a PSR-0 class loader
+ *
+ * See https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-0.md
+ *
+ * $loader = new \Composer\Autoload\ClassLoader();
+ *
+ * // register classes with namespaces
+ * $loader->add('Symfony\Component', __DIR__.'/component');
+ * $loader->add('Symfony', __DIR__.'/framework');
+ *
+ * // activate the autoloader
+ * $loader->register();
+ *
+ * // to enable searching the include path (eg. for PEAR packages)
+ * $loader->setUseIncludePath(true);
+ *
+ * In this example, if you try to use a class in the Symfony\Component
+ * namespace or one of its children (Symfony\Component\Console for instance),
+ * the autoloader will first look for the class under the component/
+ * directory, and it will then fallback to the framework/ directory if not
+ * found before giving up.
+ *
+ * This class is loosely based on the Symfony UniversalClassLoader.
+ *
+ * @author Fabien Potencier
+ * @author Jordi Boggiano
+ */
+class ClassLoader
+{
+ private $prefixes = array();
+ private $fallbackDirs = array();
+ private $useIncludePath = false;
+ private $classMap = array();
+
+ public function getPrefixes()
+ {
+ return $this->prefixes;
+ }
+
+ public function getFallbackDirs()
+ {
+ return $this->fallbackDirs;
+ }
+
+ public function getClassMap()
+ {
+ return $this->classMap;
+ }
+
+ /**
+ * @param array $classMap Class to filename map
+ */
+ public function addClassMap(array $classMap)
+ {
+ if ($this->classMap) {
+ $this->classMap = array_merge($this->classMap, $classMap);
+ } else {
+ $this->classMap = $classMap;
+ }
+ }
+
+ /**
+ * Registers a set of classes
+ *
+ * @param string $prefix The classes prefix
+ * @param array|string $paths The location(s) of the classes
+ */
+ public function add($prefix, $paths)
+ {
+ if (!$prefix) {
+ foreach ((array) $paths as $path) {
+ $this->fallbackDirs[] = $path;
+ }
+
+ return;
+ }
+ if (isset($this->prefixes[$prefix])) {
+ $this->prefixes[$prefix] = array_merge(
+ $this->prefixes[$prefix],
+ (array) $paths
+ );
+ } else {
+ $this->prefixes[$prefix] = (array) $paths;
+ }
+ }
+
+ /**
+ * Turns on searching the include path for class files.
+ *
+ * @param Boolean $useIncludePath
+ */
+ public function setUseIncludePath($useIncludePath)
+ {
+ $this->useIncludePath = $useIncludePath;
+ }
+
+ /**
+ * Can be used to check if the autoloader uses the include path to check
+ * for classes.
+ *
+ * @return Boolean
+ */
+ public function getUseIncludePath()
+ {
+ return $this->useIncludePath;
+ }
+
+ /**
+ * Registers this instance as an autoloader.
+ *
+ * @param Boolean $prepend Whether to prepend the autoloader or not
+ */
+ public function register($prepend = false)
+ {
+ spl_autoload_register(array($this, 'loadClass'), true, $prepend);
+ }
+
+ /**
+ * Unregisters this instance as an autoloader.
+ */
+ public function unregister()
+ {
+ spl_autoload_unregister(array($this, 'loadClass'));
+ }
+
+ /**
+ * Loads the given class or interface.
+ *
+ * @param string $class The name of the class
+ * @return Boolean|null True, if loaded
+ */
+ public function loadClass($class)
+ {
+ if ($file = $this->findFile($class)) {
+ include $file;
+
+ return true;
+ }
+ }
+
+ /**
+ * Finds the path to the file where the class is defined.
+ *
+ * @param string $class The name of the class
+ *
+ * @return string|null The path, if found
+ */
+ public function findFile($class)
+ {
+ if (isset($this->classMap[$class])) {
+ return $this->classMap[$class];
+ }
+
+ if ('\\' == $class[0]) {
+ $class = substr($class, 1);
+ }
+
+ if (false !== $pos = strrpos($class, '\\')) {
+ // namespaced class name
+ $classPath = str_replace('\\', DIRECTORY_SEPARATOR, substr($class, 0, $pos)) . DIRECTORY_SEPARATOR;
+ $className = substr($class, $pos + 1);
+ } else {
+ // PEAR-like class name
+ $classPath = null;
+ $className = $class;
+ }
+
+ $classPath .= str_replace('_', DIRECTORY_SEPARATOR, $className) . '.php';
+
+ foreach ($this->prefixes as $prefix => $dirs) {
+ if (0 === strpos($class, $prefix)) {
+ foreach ($dirs as $dir) {
+ if (file_exists($dir . DIRECTORY_SEPARATOR . $classPath)) {
+ return $dir . DIRECTORY_SEPARATOR . $classPath;
+ }
+ }
+ }
+ }
+
+ foreach ($this->fallbackDirs as $dir) {
+ if (file_exists($dir . DIRECTORY_SEPARATOR . $classPath)) {
+ return $dir . DIRECTORY_SEPARATOR . $classPath;
+ }
+ }
+
+ if ($this->useIncludePath && $file = stream_resolve_include_path($classPath)) {
+ return $file;
+ }
+ }
+}
diff --git a/vendor/composer/autoload_classmap.php b/vendor/composer/autoload_classmap.php
new file mode 100644
index 0000000..4a9177d
--- /dev/null
+++ b/vendor/composer/autoload_classmap.php
@@ -0,0 +1,9 @@
+ $vendorDir . '/twig/extensions/lib/',
+ 'Twig_' => $vendorDir . '/twig/twig/lib/',
+ 'Symfony\\Bundle\\SwiftmailerBundle' => $vendorDir . '/symfony/swiftmailer-bundle/',
+ 'Symfony\\Bundle\\MonologBundle' => $vendorDir . '/symfony/monolog-bundle/',
+ 'Symfony\\Bundle\\AsseticBundle' => $vendorDir . '/symfony/assetic-bundle/',
+ 'Symfony' => $vendorDir . '/symfony/symfony/src/',
+ 'SessionHandlerInterface' => $vendorDir . '/symfony/symfony/src/Symfony/Component/HttpFoundation/Resources/stubs',
+ 'Sensio\\Bundle\\GeneratorBundle' => $vendorDir . '/sensio/generator-bundle/',
+ 'Sensio\\Bundle\\FrameworkExtraBundle' => $vendorDir . '/sensio/framework-extra-bundle/',
+ 'Sensio\\Bundle\\DistributionBundle' => $vendorDir . '/sensio/distribution-bundle/',
+ 'Monolog' => $vendorDir . '/monolog/monolog/src/',
+ 'Metadata\\' => $vendorDir . '/jms/metadata/src/',
+ 'JMS\\SecurityExtraBundle' => $vendorDir . '/jms/security-extra-bundle/',
+ 'JMS\\DiExtraBundle' => $vendorDir . '/jms/di-extra-bundle/',
+ 'JMS\\AopBundle' => $vendorDir . '/jms/aop-bundle/',
+ 'Doctrine\\ORM' => $vendorDir . '/doctrine/orm/lib/',
+ 'Doctrine\\DBAL' => $vendorDir . '/doctrine/dbal/lib/',
+ 'Doctrine\\Common' => $vendorDir . '/doctrine/common/lib/',
+ 'Doctrine\\Bundle\\DoctrineBundle' => $vendorDir . '/doctrine/doctrine-bundle/',
+ 'CG\\' => $vendorDir . '/jms/cg/src/',
+ 'Assetic' => $vendorDir . '/kriswallsmith/assetic/src/',
+ '' => $baseDir . '/src/',
+);
diff --git a/vendor/composer/installed.json b/vendor/composer/installed.json
new file mode 100644
index 0000000..51ab6ef
--- /dev/null
+++ b/vendor/composer/installed.json
@@ -0,0 +1,1171 @@
+[
+ {
+ "name": "jms/metadata",
+ "version": "1.1.1",
+ "version_normalized": "1.1.1.0",
+ "time": "2011-12-31 21:32:49",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/schmittjoh/metadata",
+ "reference": "1.1.1"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://github.com/schmittjoh/metadata/zipball/1.1.1",
+ "reference": "1.1.1",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=5.3.0"
+ },
+ "type": "library",
+ "installation-source": "dist",
+ "license": [
+ "Apache"
+ ],
+ "authors": [
+ {
+ "name": "Johannes M. Schmitt",
+ "email": "schmittjoh@gmail.com",
+ "homepage": "https://github.com/schmittjoh"
+ }
+ ],
+ "description": "Class/method/property metadata management in PHP",
+ "keywords": [
+ "annotations",
+ "yaml",
+ "xml",
+ "metadata"
+ ],
+ "autoload": {
+ "psr-0": {
+ "Metadata\\": "src/"
+ }
+ }
+ },
+ {
+ "name": "jms/cg",
+ "version": "1.0.0",
+ "version_normalized": "1.0.0.0",
+ "time": "2011-12-31 20:40:52",
+ "source": {
+ "type": "git",
+ "url": "git://github.com/schmittjoh/cg-library.git",
+ "reference": "1.0.0"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://github.com/schmittjoh/cg-library/zipball/1.0.0",
+ "reference": "1.0.0",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=5.3.0"
+ },
+ "type": "library",
+ "installation-source": "dist",
+ "license": [
+ "Apache"
+ ],
+ "authors": [
+ {
+ "name": "Johannes M. Schmitt",
+ "email": "schmittjoh@gmail.com",
+ "homepage": "https://github.com/schmittjoh"
+ }
+ ],
+ "description": "Toolset for generating PHP code",
+ "keywords": [
+ "code generation"
+ ],
+ "autoload": {
+ "psr-0": {
+ "CG\\": "src/"
+ }
+ }
+ },
+ {
+ "name": "jms/aop-bundle",
+ "version": "1.0.0",
+ "version_normalized": "1.0.0.0",
+ "target-dir": "JMS/AopBundle",
+ "time": "2011-12-31 20:50:26",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/schmittjoh/JMSAopBundle",
+ "reference": "1.0.0"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://github.com/schmittjoh/JMSAopBundle/zipball/1.0.0",
+ "reference": "1.0.0",
+ "shasum": ""
+ },
+ "require": {
+ "symfony/framework-bundle": "2.*",
+ "jms/cg": "1.0.0"
+ },
+ "type": "symfony-bundle",
+ "installation-source": "dist",
+ "license": [
+ "Apache"
+ ],
+ "authors": [
+ {
+ "name": "Johannes M. Schmitt",
+ "email": "schmittjoh@gmail.com",
+ "homepage": "https://github.com/schmittjoh"
+ }
+ ],
+ "description": "Adds AOP capabilities to Symfony2",
+ "keywords": [
+ "annotations",
+ "aop"
+ ],
+ "autoload": {
+ "psr-0": {
+ "JMS\\AopBundle": ""
+ }
+ }
+ },
+ {
+ "name": "jms/security-extra-bundle",
+ "version": "1.1.0",
+ "version_normalized": "1.1.0.0",
+ "target-dir": "JMS/SecurityExtraBundle",
+ "time": "2012-01-01 00:38:12",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/schmittjoh/JMSSecurityExtraBundle",
+ "reference": "1.1.0"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://github.com/schmittjoh/JMSSecurityExtraBundle/zipball/1.1.0",
+ "reference": "1.1.0",
+ "shasum": ""
+ },
+ "require": {
+ "symfony/framework-bundle": "2.*",
+ "jms/metadata": "1.1.*",
+ "jms/aop-bundle": "1.0.*"
+ },
+ "type": "symfony-bundle",
+ "installation-source": "source",
+ "license": [
+ "Apache"
+ ],
+ "authors": [
+ {
+ "name": "Johannes M. Schmitt",
+ "email": "schmittjoh@gmail.com",
+ "homepage": "https://github.com/schmittjoh"
+ }
+ ],
+ "description": "Enhances the Symfony2 Security Component by adding several new features",
+ "keywords": [
+ "annotations",
+ "authorization"
+ ],
+ "autoload": {
+ "psr-0": {
+ "JMS\\SecurityExtraBundle": ""
+ }
+ }
+ },
+ {
+ "name": "jms/di-extra-bundle",
+ "version": "1.0.1",
+ "version_normalized": "1.0.1.0",
+ "target-dir": "JMS/DiExtraBundle",
+ "time": "2012-02-26 16:01:54",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/schmittjoh/JMSDiExtraBundle",
+ "reference": "1.0.1"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://github.com/schmittjoh/JMSDiExtraBundle/zipball/1.0.1",
+ "reference": "1.0.1",
+ "shasum": ""
+ },
+ "require": {
+ "symfony/framework-bundle": "2.*",
+ "jms/metadata": "1.1.*"
+ },
+ "type": "symfony-bundle",
+ "installation-source": "dist",
+ "license": [
+ "Apache"
+ ],
+ "authors": [
+ {
+ "name": "Johannes M. Schmitt",
+ "email": "schmittjoh@gmail.com",
+ "homepage": "https://github.com/schmittjoh"
+ }
+ ],
+ "description": "Allows to configure dependency injection using annotations",
+ "keywords": [
+ "dependency injection",
+ "annotations"
+ ],
+ "autoload": {
+ "psr-0": {
+ "JMS\\DiExtraBundle": ""
+ }
+ }
+ },
+ {
+ "name": "doctrine/common",
+ "version": "2.2.2",
+ "version_normalized": "2.2.2.0",
+ "time": "2012-04-11 01:46:44",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/doctrine/common",
+ "reference": "2.2.2"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://github.com/doctrine/common/zipball/2.2.2",
+ "reference": "2.2.2",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=5.3.2"
+ },
+ "type": "library",
+ "installation-source": "dist",
+ "license": [
+ "LGPL"
+ ],
+ "authors": [
+ {
+ "name": "Jonathan Wage",
+ "email": "jonwage@gmail.com",
+ "homepage": "http://www.jwage.com/"
+ },
+ {
+ "name": "Guilherme Blanco",
+ "email": "guilhermeblanco@gmail.com",
+ "homepage": null
+ },
+ {
+ "name": "Roman Borschel",
+ "email": "roman@code-factory.org",
+ "homepage": null
+ },
+ {
+ "name": "Benjamin Eberlei",
+ "email": "kontakt@beberlei.de",
+ "homepage": null
+ },
+ {
+ "name": "Johannes Schmitt",
+ "email": "schmittjoh@gmail.com",
+ "homepage": "https://github.com/schmittjoh"
+ }
+ ],
+ "description": "Common Library for Doctrine projects",
+ "homepage": "http://www.doctrine-project.org",
+ "keywords": [
+ "collections",
+ "spl",
+ "eventmanager",
+ "annotations",
+ "persistence"
+ ],
+ "autoload": {
+ "psr-0": {
+ "Doctrine\\Common": "lib/"
+ }
+ }
+ },
+ {
+ "name": "monolog/monolog",
+ "version": "1.1.0",
+ "version_normalized": "1.1.0.0",
+ "time": "2012-04-21 12:27:40",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/Seldaek/monolog.git",
+ "reference": "1.1.0"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://github.com/Seldaek/monolog/zipball/1.1.0",
+ "reference": "1.1.0",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=5.3.0"
+ },
+ "require-dev": {
+ "mlehner/gelf-php": "1.0.*"
+ },
+ "suggest": {
+ "mlehner/gelf-php": "Allow sending log messages to a GrayLog2 server"
+ },
+ "type": "library",
+ "installation-source": "dist",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Jordi Boggiano",
+ "email": "j.boggiano@seld.be",
+ "homepage": "http://seld.be",
+ "role": null
+ }
+ ],
+ "description": "Logging for PHP 5.3",
+ "homepage": "http://github.com/Seldaek/monolog",
+ "keywords": [
+ "log",
+ "logging"
+ ],
+ "autoload": {
+ "psr-0": {
+ "Monolog": "src/"
+ }
+ }
+ },
+ {
+ "name": "twig/extensions",
+ "version": "dev-master",
+ "version_normalized": "9999999-dev",
+ "time": "2012-05-19 19:28:19",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/fabpot/Twig-extensions",
+ "reference": "feb6d3f10c411e2631997c0a905aa581c80305c1"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://github.com/fabpot/Twig-extensions/zipball/feb6d3f10c411e2631997c0a905aa581c80305c1",
+ "reference": "feb6d3f10c411e2631997c0a905aa581c80305c1",
+ "shasum": ""
+ },
+ "require": {
+ "twig/twig": "1.*"
+ },
+ "type": "library",
+ "installation-source": "source",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Fabien Potencier",
+ "email": "fabien@symfony.com",
+ "homepage": null,
+ "role": null
+ }
+ ],
+ "description": "Common additional features for Twig that do not directly belong in core",
+ "homepage": "https://github.com/fabpot/Twig-extensions",
+ "keywords": [
+ "debug",
+ "i18n",
+ "text"
+ ],
+ "autoload": {
+ "psr-0": {
+ "Twig_Extensions_": "lib/"
+ }
+ }
+ },
+ {
+ "name": "symfony/monolog-bundle",
+ "version": "dev-master",
+ "version_normalized": "9999999-dev",
+ "target-dir": "Symfony/Bundle/MonologBundle",
+ "time": "2012-06-13 05:14:37",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/symfony/MonologBundle",
+ "reference": "0b5046d3d1ef93cd59ceabfa37de2665f5118c7f"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://github.com/symfony/MonologBundle/zipball/0b5046d3d1ef93cd59ceabfa37de2665f5118c7f",
+ "reference": "0b5046d3d1ef93cd59ceabfa37de2665f5118c7f",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=5.3.2",
+ "monolog/monolog": "1.*",
+ "symfony/monolog-bridge": "2.1.*",
+ "symfony/dependency-injection": "2.1.*",
+ "symfony/config": "2.1.*"
+ },
+ "require-dev": {
+ "symfony/yaml": "2.1.*"
+ },
+ "type": "symfony-bundle",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "2.1.x-dev"
+ }
+ },
+ "installation-source": "source",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Fabien Potencier",
+ "email": "fabien@symfony.com",
+ "homepage": null,
+ "role": null
+ },
+ {
+ "name": "Symfony Community",
+ "email": null,
+ "homepage": "http://symfony.com/contributors",
+ "role": null
+ }
+ ],
+ "description": "Symfony MonologBundle",
+ "homepage": "http://symfony.com",
+ "autoload": {
+ "psr-0": {
+ "Symfony\\Bundle\\MonologBundle": ""
+ }
+ }
+ },
+ {
+ "name": "kriswallsmith/assetic",
+ "version": "dev-master",
+ "version_normalized": "9999999-dev",
+ "time": "2012-06-10 23:41:54",
+ "source": {
+ "type": "git",
+ "url": "http://github.com/kriswallsmith/assetic.git",
+ "reference": "d6f89a3170c5280ad554347dc113eb25fdf00ad7"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://github.com/kriswallsmith/assetic/zipball/d6f89a3170c5280ad554347dc113eb25fdf00ad7",
+ "reference": "d6f89a3170c5280ad554347dc113eb25fdf00ad7",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=5.3.0",
+ "symfony/process": "2.1.*"
+ },
+ "require-dev": {
+ "twig/twig": ">=1.6.0,<2.0",
+ "leafo/lessphp": "*"
+ },
+ "suggest": {
+ "twig/twig": "Assetic provides the integration with the Twig templating engine",
+ "leafo/lessphp": "Assetic provides the integration with the lessphp LESS compiler"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "1.1-dev"
+ }
+ },
+ "installation-source": "source",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Kris Wallsmith",
+ "email": "kris.wallsmith@gmail.com",
+ "homepage": "http://kriswallsmith.net/",
+ "role": null
+ }
+ ],
+ "description": "Asset Management for PHP",
+ "homepage": "https://github.com/kriswallsmith/assetic",
+ "keywords": [
+ "assets",
+ "compression",
+ "minification"
+ ],
+ "autoload": {
+ "psr-0": {
+ "Assetic": "src/"
+ }
+ }
+ },
+ {
+ "name": "doctrine/orm",
+ "version": "2.2.x-dev",
+ "version_normalized": "2.2.9999999.9999999-dev",
+ "time": "2012-05-26 01:13:46",
+ "source": {
+ "type": "git",
+ "url": "git://github.com/doctrine/doctrine2.git",
+ "reference": "5f66c65c9a8d984899903b54215d0249a45b92d6"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://github.com/doctrine/doctrine2/zipball/5f66c65c9a8d984899903b54215d0249a45b92d6",
+ "reference": "5f66c65c9a8d984899903b54215d0249a45b92d6",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=5.3.2",
+ "ext-pdo": "*",
+ "doctrine/common": "2.2.*",
+ "doctrine/dbal": "2.2.*"
+ },
+ "type": "library",
+ "installation-source": "source",
+ "license": [
+ "LGPL"
+ ],
+ "authors": [
+ {
+ "name": "Jonathan Wage",
+ "email": "jonwage@gmail.com",
+ "homepage": "http://www.jwage.com/",
+ "role": null
+ },
+ {
+ "name": "Guilherme Blanco",
+ "email": "guilhermeblanco@gmail.com",
+ "homepage": null,
+ "role": null
+ },
+ {
+ "name": "Roman Borschel",
+ "email": "roman@code-factory.org",
+ "homepage": null,
+ "role": null
+ },
+ {
+ "name": "Benjamin Eberlei",
+ "email": "kontakt@beberlei.de",
+ "homepage": null,
+ "role": null
+ }
+ ],
+ "description": "Object-Relational-Mapper for PHP",
+ "homepage": "http://www.doctrine-project.org",
+ "keywords": [
+ "database",
+ "orm"
+ ],
+ "autoload": {
+ "psr-0": {
+ "Doctrine\\ORM": "lib/"
+ }
+ }
+ },
+ {
+ "name": "doctrine/dbal",
+ "version": "2.2.x-dev",
+ "version_normalized": "2.2.9999999.9999999-dev",
+ "time": "2012-05-25 20:08:36",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/doctrine/dbal",
+ "reference": "8cc129aa64a8de6447056bce20f0a274fe2a340b"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://github.com/doctrine/dbal/zipball/8cc129aa64a8de6447056bce20f0a274fe2a340b",
+ "reference": "8cc129aa64a8de6447056bce20f0a274fe2a340b",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=5.3.2",
+ "doctrine/common": ">=2.2.0,<=2.2.99"
+ },
+ "type": "library",
+ "installation-source": "source",
+ "license": [
+ "LGPL"
+ ],
+ "authors": [
+ {
+ "name": "Jonathan Wage",
+ "email": "jonwage@gmail.com",
+ "homepage": "http://www.jwage.com/",
+ "role": null
+ },
+ {
+ "name": "Guilherme Blanco",
+ "email": "guilhermeblanco@gmail.com",
+ "homepage": null,
+ "role": null
+ },
+ {
+ "name": "Roman Borschel",
+ "email": "roman@code-factory.org",
+ "homepage": null,
+ "role": null
+ },
+ {
+ "name": "Benjamin Eberlei",
+ "email": "kontakt@beberlei.de",
+ "homepage": null,
+ "role": null
+ }
+ ],
+ "description": "Database Abstraction Layer",
+ "homepage": "http://www.doctrine-project.org",
+ "keywords": [
+ "database",
+ "persistence",
+ "dbal",
+ "queryobject"
+ ],
+ "autoload": {
+ "psr-0": {
+ "Doctrine\\DBAL": "lib/"
+ }
+ }
+ },
+ {
+ "name": "twig/twig",
+ "version": "dev-master",
+ "version_normalized": "9999999-dev",
+ "time": "2012-06-16 08:52:23",
+ "source": {
+ "type": "git",
+ "url": "git://github.com/fabpot/Twig.git",
+ "reference": "4679ad51c5390648b7ea4c8f0ecd2c0c344145ba"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://github.com/fabpot/Twig/zipball/4679ad51c5390648b7ea4c8f0ecd2c0c344145ba",
+ "reference": "4679ad51c5390648b7ea4c8f0ecd2c0c344145ba",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=5.2.4"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "1.8-dev"
+ }
+ },
+ "installation-source": "source",
+ "license": [
+ "BSD-3"
+ ],
+ "authors": [
+ {
+ "name": "Fabien Potencier",
+ "email": "fabien@symfony.com",
+ "homepage": null,
+ "role": null
+ },
+ {
+ "name": "Armin Ronacher",
+ "email": "armin.ronacher@active-4.com",
+ "homepage": null,
+ "role": null
+ }
+ ],
+ "description": "Twig, the flexible, fast, and secure template language for PHP",
+ "homepage": "http://twig.sensiolabs.org",
+ "keywords": [
+ "templating"
+ ],
+ "autoload": {
+ "psr-0": {
+ "Twig_": "lib/"
+ }
+ }
+ },
+ {
+ "name": "doctrine/doctrine-bundle",
+ "version": "dev-master",
+ "version_normalized": "9999999-dev",
+ "target-dir": "Doctrine/Bundle/DoctrineBundle",
+ "time": "2012-06-18 06:36:07",
+ "source": {
+ "type": "git",
+ "url": "git://github.com/doctrine/DoctrineBundle.git",
+ "reference": "94951737d6c692500d6b13bb92871935568a4ba5"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://github.com/doctrine/DoctrineBundle/zipball/94951737d6c692500d6b13bb92871935568a4ba5",
+ "reference": "94951737d6c692500d6b13bb92871935568a4ba5",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=5.3.2",
+ "doctrine/dbal": ">=2.2,<2.4-dev",
+ "symfony/framework-bundle": "2.1.*",
+ "symfony/doctrine-bridge": "2.1.*"
+ },
+ "require-dev": {
+ "doctrine/orm": ">=2.2,<2.4-dev",
+ "symfony/validator": "2.1.*",
+ "symfony/yaml": "2.1.*"
+ },
+ "suggest": {
+ "doctrine/orm": "The Doctrine ORM integration is optional in the bundle."
+ },
+ "type": "symfony-bundle",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "1.0.x-dev"
+ }
+ },
+ "installation-source": "source",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Fabien Potencier",
+ "email": "fabien@symfony.com",
+ "homepage": null,
+ "role": null
+ },
+ {
+ "name": "Symfony Community",
+ "email": null,
+ "homepage": "http://symfony.com/contributors",
+ "role": null
+ },
+ {
+ "name": "Benjamin Eberlei",
+ "email": "kontakt@beberlei.de",
+ "homepage": null,
+ "role": null
+ }
+ ],
+ "description": "Symfony DoctrineBundle",
+ "homepage": "http://www.doctrine-project.org",
+ "keywords": [
+ "database",
+ "orm",
+ "persistence",
+ "dbal"
+ ],
+ "autoload": {
+ "psr-0": {
+ "Doctrine\\Bundle\\DoctrineBundle": ""
+ }
+ }
+ },
+ {
+ "name": "sensio/generator-bundle",
+ "version": "dev-master",
+ "version_normalized": "9999999-dev",
+ "target-dir": "Sensio/Bundle/GeneratorBundle",
+ "time": "2012-06-18 16:40:45",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/sensio/SensioGeneratorBundle",
+ "reference": "43ed45c48db18e4a0e48aec0c098f42e56e22d36"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://github.com/sensio/SensioGeneratorBundle/zipball/43ed45c48db18e4a0e48aec0c098f42e56e22d36",
+ "reference": "43ed45c48db18e4a0e48aec0c098f42e56e22d36",
+ "shasum": ""
+ },
+ "require": {
+ "symfony/framework-bundle": "2.1.*"
+ },
+ "require-dev": {
+ "symfony/doctrine-bridge": "2.1.*",
+ "doctrine/orm": ">=2.1,<2.4-dev",
+ "twig/twig": ">=1.8,<2.0-dev"
+ },
+ "suggest": {
+ "doctrine/doctrine-bundle": "to generate entities and their crud controller"
+ },
+ "type": "symfony-bundle",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "2.1.x-dev"
+ }
+ },
+ "installation-source": "source",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Fabien Potencier",
+ "email": "fabien@symfony.com",
+ "homepage": null,
+ "role": null
+ }
+ ],
+ "description": "This bundle generates code for you",
+ "autoload": {
+ "psr-0": {
+ "Sensio\\Bundle\\GeneratorBundle": ""
+ }
+ }
+ },
+ {
+ "name": "sensio/framework-extra-bundle",
+ "version": "dev-master",
+ "version_normalized": "9999999-dev",
+ "target-dir": "Sensio/Bundle/FrameworkExtraBundle",
+ "time": "2012-06-18 10:41:18",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/sensio/SensioFrameworkExtraBundle",
+ "reference": "62e41b85947034b0f1dfe31bb8e76920e1488571"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://github.com/sensio/SensioFrameworkExtraBundle/zipball/62e41b85947034b0f1dfe31bb8e76920e1488571",
+ "reference": "62e41b85947034b0f1dfe31bb8e76920e1488571",
+ "shasum": ""
+ },
+ "require": {
+ "doctrine/common": ">=2.1,<2.4-dev",
+ "symfony/framework-bundle": "2.1.*"
+ },
+ "type": "symfony-bundle",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "2.1.x-dev"
+ }
+ },
+ "installation-source": "source",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Fabien Potencier",
+ "email": "fabien@symfony.com",
+ "homepage": null,
+ "role": null
+ }
+ ],
+ "description": "This bundle provides a way to configure your controllers with annotations",
+ "keywords": [
+ "annotations",
+ "controllers"
+ ],
+ "autoload": {
+ "psr-0": {
+ "Sensio\\Bundle\\FrameworkExtraBundle": ""
+ }
+ }
+ },
+ {
+ "name": "symfony/assetic-bundle",
+ "version": "dev-master",
+ "version_normalized": "9999999-dev",
+ "target-dir": "Symfony/Bundle/AsseticBundle",
+ "time": "2012-06-19 21:29:31",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/symfony/AsseticBundle",
+ "reference": "8fe7b898b08103c1d6fce64c3e279a7afd61adfc"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://github.com/symfony/AsseticBundle/zipball/8fe7b898b08103c1d6fce64c3e279a7afd61adfc",
+ "reference": "8fe7b898b08103c1d6fce64c3e279a7afd61adfc",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=5.3.0",
+ "symfony/framework-bundle": "2.1.*",
+ "kriswallsmith/assetic": "1.1.*"
+ },
+ "suggest": {
+ "symfony/twig-bundle": "2.1.*"
+ },
+ "type": "symfony-bundle",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "2.1.x-dev"
+ }
+ },
+ "installation-source": "source",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Kris Wallsmith",
+ "email": "kris.wallsmith@gmail.com",
+ "homepage": "http://kriswallsmith.net/",
+ "role": null
+ }
+ ],
+ "description": "Integrates Assetic into Symfony2",
+ "homepage": "https://github.com/symfony/AsseticBundle",
+ "keywords": [
+ "assets",
+ "compression",
+ "minification"
+ ],
+ "autoload": {
+ "psr-0": {
+ "Symfony\\Bundle\\AsseticBundle": ""
+ }
+ }
+ },
+ {
+ "name": "symfony/swiftmailer-bundle",
+ "version": "dev-master",
+ "version_normalized": "9999999-dev",
+ "target-dir": "Symfony/Bundle/SwiftmailerBundle",
+ "time": "2012-06-18 20:25:44",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/symfony/SwiftmailerBundle",
+ "reference": "d05c9c514a631ee688c53c4cc5505da757bd50d3"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://github.com/symfony/SwiftmailerBundle/zipball/d05c9c514a631ee688c53c4cc5505da757bd50d3",
+ "reference": "d05c9c514a631ee688c53c4cc5505da757bd50d3",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=5.3.2",
+ "symfony/swiftmailer-bridge": "self.version",
+ "swiftmailer/swiftmailer": ">=4.1.8,<4.2-dev"
+ },
+ "type": "symfony-bundle",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "2.1.x-dev"
+ }
+ },
+ "installation-source": "source",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Fabien Potencier",
+ "email": "fabien@symfony.com",
+ "homepage": null,
+ "role": null
+ },
+ {
+ "name": "Symfony Community",
+ "email": null,
+ "homepage": "http://symfony.com/contributors",
+ "role": null
+ }
+ ],
+ "description": "Symfony SwiftmailerBundle",
+ "homepage": "http://symfony.com",
+ "autoload": {
+ "psr-0": {
+ "Symfony\\Bundle\\SwiftmailerBundle": ""
+ }
+ }
+ },
+ {
+ "name": "swiftmailer/swiftmailer",
+ "version": "dev-master",
+ "version_normalized": "9999999-dev",
+ "time": "2012-06-20 14:46:20",
+ "source": {
+ "type": "git",
+ "url": "git://github.com/swiftmailer/swiftmailer.git",
+ "reference": "d57ffdeed664d6061cef0047e1f5d3fc3ee3fb99"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://github.com/swiftmailer/swiftmailer/zipball/d57ffdeed664d6061cef0047e1f5d3fc3ee3fb99",
+ "reference": "d57ffdeed664d6061cef0047e1f5d3fc3ee3fb99",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=5.2.4"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "4.1-dev"
+ }
+ },
+ "installation-source": "source",
+ "license": [
+ "LGPL"
+ ],
+ "authors": [
+ {
+ "name": "Fabien Potencier",
+ "email": "fabien@symfony.com",
+ "homepage": null,
+ "role": null
+ },
+ {
+ "name": "Chris Corbyn",
+ "email": "",
+ "homepage": null,
+ "role": null
+ }
+ ],
+ "description": "Swiftmailer, free feature-rich PHP mailer",
+ "homepage": "http://swiftmailer.org",
+ "keywords": [
+ "mail",
+ "mailer"
+ ],
+ "autoload": {
+ "files": [
+ "lib/swift_required.php"
+ ]
+ }
+ },
+ {
+ "name": "symfony/symfony",
+ "version": "dev-master",
+ "version_normalized": "9999999-dev",
+ "time": "2012-06-21 09:42:20",
+ "source": {
+ "type": "git",
+ "url": "git://github.com/symfony/symfony.git",
+ "reference": "v2.1.0-BETA1"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://github.com/symfony/symfony/zipball/v2.1.0-BETA1",
+ "reference": "v2.1.0-BETA1",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=5.3.3",
+ "twig/twig": ">=1.8,<2.0-dev",
+ "doctrine/common": ">2.2,<2.4-dev"
+ },
+ "replace": {
+ "symfony/doctrine-bridge": "self.version",
+ "symfony/monolog-bridge": "self.version",
+ "symfony/twig-bridge": "self.version",
+ "symfony/framework-bundle": "self.version",
+ "symfony/security-bundle": "self.version",
+ "symfony/twig-bundle": "self.version",
+ "symfony/web-profiler-bundle": "self.version",
+ "symfony/browser-kit": "self.version",
+ "symfony/class-loader": "self.version",
+ "symfony/config": "self.version",
+ "symfony/console": "self.version",
+ "symfony/css-selector": "self.version",
+ "symfony/dependency-injection": "self.version",
+ "symfony/dom-crawler": "self.version",
+ "symfony/event-dispatcher": "self.version",
+ "symfony/filesystem": "self.version",
+ "symfony/finder": "self.version",
+ "symfony/form": "self.version",
+ "symfony/http-foundation": "self.version",
+ "symfony/http-kernel": "self.version",
+ "symfony/locale": "self.version",
+ "symfony/process": "self.version",
+ "symfony/routing": "self.version",
+ "symfony/security": "self.version",
+ "symfony/serializer": "self.version",
+ "symfony/templating": "self.version",
+ "symfony/translation": "self.version",
+ "symfony/validator": "self.version",
+ "symfony/yaml": "self.version",
+ "symfony/propel1-bridge": "self.version",
+ "symfony/options-resolver": "self.version",
+ "symfony/swiftmailer-bridge": "self.version"
+ },
+ "require-dev": {
+ "doctrine/data-fixtures": "1.0.*",
+ "propel/propel1": "dev-master",
+ "monolog/monolog": "dev-master",
+ "doctrine/dbal": ">=2.2,<2.4-dev",
+ "doctrine/orm": ">=2.2,<2.4-dev"
+ },
+ "suggest": {
+ "doctrine/data-fixtures": "1.0.*"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "2.1-dev"
+ }
+ },
+ "installation-source": "source",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Fabien Potencier",
+ "email": "fabien@symfony.com",
+ "homepage": null,
+ "role": null
+ },
+ {
+ "name": "Symfony Community",
+ "email": null,
+ "homepage": "http://symfony.com/contributors",
+ "role": null
+ }
+ ],
+ "description": "The Symfony PHP framework",
+ "homepage": "http://symfony.com",
+ "keywords": [
+ "framework"
+ ],
+ "autoload": {
+ "psr-0": {
+ "Symfony": "src/",
+ "SessionHandlerInterface": "src/Symfony/Component/HttpFoundation/Resources/stubs"
+ }
+ }
+ },
+ {
+ "name": "sensio/distribution-bundle",
+ "version": "dev-master",
+ "version_normalized": "9999999-dev",
+ "target-dir": "Sensio/Bundle/DistributionBundle",
+ "time": "2012-06-21 15:12:48",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/sensio/SensioDistributionBundle",
+ "reference": "a360ad61fe34206a7295c1ef00b5455b2b2e1071"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://github.com/sensio/SensioDistributionBundle/zipball/a360ad61fe34206a7295c1ef00b5455b2b2e1071",
+ "reference": "a360ad61fe34206a7295c1ef00b5455b2b2e1071",
+ "shasum": ""
+ },
+ "require": {
+ "symfony/framework-bundle": "2.1.*"
+ },
+ "type": "symfony-bundle",
+ "installation-source": "source",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Fabien Potencier",
+ "email": "fabien@symfony.com",
+ "homepage": null,
+ "role": null
+ }
+ ],
+ "description": "The base bundle for the Symfony Distributions",
+ "keywords": [
+ "distribution",
+ "configuration"
+ ],
+ "autoload": {
+ "psr-0": {
+ "Sensio\\Bundle\\DistributionBundle": ""
+ }
+ }
+ }
+]
diff --git a/vendor/composer/installed_dev.json b/vendor/composer/installed_dev.json
new file mode 100644
index 0000000..3be7d3e
--- /dev/null
+++ b/vendor/composer/installed_dev.json
@@ -0,0 +1,3 @@
+[
+
+ ]
diff --git a/vendor/doctrine/common/.travis.yml b/vendor/doctrine/common/.travis.yml
new file mode 100644
index 0000000..4464d4f
--- /dev/null
+++ b/vendor/doctrine/common/.travis.yml
@@ -0,0 +1,5 @@
+language: php
+
+php:
+ - 5.3
+ - 5.4
diff --git a/vendor/doctrine/common/LICENSE b/vendor/doctrine/common/LICENSE
new file mode 100644
index 0000000..1c03f74
--- /dev/null
+++ b/vendor/doctrine/common/LICENSE
@@ -0,0 +1,504 @@
+ GNU LESSER GENERAL PUBLIC LICENSE
+ Version 2.1, February 1999
+
+ Copyright (C) 1991, 1999 Free Software Foundation, Inc.
+ 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+[This is the first released version of the Lesser GPL. It also counts
+ as the successor of the GNU Library Public License, version 2, hence
+ the version number 2.1.]
+
+ Preamble
+
+ The licenses for most software are designed to take away your
+freedom to share and change it. By contrast, the GNU General Public
+Licenses are intended to guarantee your freedom to share and change
+free software--to make sure the software is free for all its users.
+
+ This license, the Lesser General Public License, applies to some
+specially designated software packages--typically libraries--of the
+Free Software Foundation and other authors who decide to use it. You
+can use it too, but we suggest you first think carefully about whether
+this license or the ordinary General Public License is the better
+strategy to use in any particular case, based on the explanations below.
+
+ When we speak of free software, we are referring to freedom of use,
+not price. Our General Public Licenses are designed to make sure that
+you have the freedom to distribute copies of free software (and charge
+for this service if you wish); that you receive source code or can get
+it if you want it; that you can change the software and use pieces of
+it in new free programs; and that you are informed that you can do
+these things.
+
+ To protect your rights, we need to make restrictions that forbid
+distributors to deny you these rights or to ask you to surrender these
+rights. These restrictions translate to certain responsibilities for
+you if you distribute copies of the library or if you modify it.
+
+ For example, if you distribute copies of the library, whether gratis
+or for a fee, you must give the recipients all the rights that we gave
+you. You must make sure that they, too, receive or can get the source
+code. If you link other code with the library, you must provide
+complete object files to the recipients, so that they can relink them
+with the library after making changes to the library and recompiling
+it. And you must show them these terms so they know their rights.
+
+ We protect your rights with a two-step method: (1) we copyright the
+library, and (2) we offer you this license, which gives you legal
+permission to copy, distribute and/or modify the library.
+
+ To protect each distributor, we want to make it very clear that
+there is no warranty for the free library. Also, if the library is
+modified by someone else and passed on, the recipients should know
+that what they have is not the original version, so that the original
+author's reputation will not be affected by problems that might be
+introduced by others.
+
+ Finally, software patents pose a constant threat to the existence of
+any free program. We wish to make sure that a company cannot
+effectively restrict the users of a free program by obtaining a
+restrictive license from a patent holder. Therefore, we insist that
+any patent license obtained for a version of the library must be
+consistent with the full freedom of use specified in this license.
+
+ Most GNU software, including some libraries, is covered by the
+ordinary GNU General Public License. This license, the GNU Lesser
+General Public License, applies to certain designated libraries, and
+is quite different from the ordinary General Public License. We use
+this license for certain libraries in order to permit linking those
+libraries into non-free programs.
+
+ When a program is linked with a library, whether statically or using
+a shared library, the combination of the two is legally speaking a
+combined work, a derivative of the original library. The ordinary
+General Public License therefore permits such linking only if the
+entire combination fits its criteria of freedom. The Lesser General
+Public License permits more lax criteria for linking other code with
+the library.
+
+ We call this license the "Lesser" General Public License because it
+does Less to protect the user's freedom than the ordinary General
+Public License. It also provides other free software developers Less
+of an advantage over competing non-free programs. These disadvantages
+are the reason we use the ordinary General Public License for many
+libraries. However, the Lesser license provides advantages in certain
+special circumstances.
+
+ For example, on rare occasions, there may be a special need to
+encourage the widest possible use of a certain library, so that it becomes
+a de-facto standard. To achieve this, non-free programs must be
+allowed to use the library. A more frequent case is that a free
+library does the same job as widely used non-free libraries. In this
+case, there is little to gain by limiting the free library to free
+software only, so we use the Lesser General Public License.
+
+ In other cases, permission to use a particular library in non-free
+programs enables a greater number of people to use a large body of
+free software. For example, permission to use the GNU C Library in
+non-free programs enables many more people to use the whole GNU
+operating system, as well as its variant, the GNU/Linux operating
+system.
+
+ Although the Lesser General Public License is Less protective of the
+users' freedom, it does ensure that the user of a program that is
+linked with the Library has the freedom and the wherewithal to run
+that program using a modified version of the Library.
+
+ The precise terms and conditions for copying, distribution and
+modification follow. Pay close attention to the difference between a
+"work based on the library" and a "work that uses the library". The
+former contains code derived from the library, whereas the latter must
+be combined with the library in order to run.
+
+ GNU LESSER GENERAL PUBLIC LICENSE
+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+ 0. This License Agreement applies to any software library or other
+program which contains a notice placed by the copyright holder or
+other authorized party saying it may be distributed under the terms of
+this Lesser General Public License (also called "this License").
+Each licensee is addressed as "you".
+
+ A "library" means a collection of software functions and/or data
+prepared so as to be conveniently linked with application programs
+(which use some of those functions and data) to form executables.
+
+ The "Library", below, refers to any such software library or work
+which has been distributed under these terms. A "work based on the
+Library" means either the Library or any derivative work under
+copyright law: that is to say, a work containing the Library or a
+portion of it, either verbatim or with modifications and/or translated
+straightforwardly into another language. (Hereinafter, translation is
+included without limitation in the term "modification".)
+
+ "Source code" for a work means the preferred form of the work for
+making modifications to it. For a library, complete source code means
+all the source code for all modules it contains, plus any associated
+interface definition files, plus the scripts used to control compilation
+and installation of the library.
+
+ Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope. The act of
+running a program using the Library is not restricted, and output from
+such a program is covered only if its contents constitute a work based
+on the Library (independent of the use of the Library in a tool for
+writing it). Whether that is true depends on what the Library does
+and what the program that uses the Library does.
+
+ 1. You may copy and distribute verbatim copies of the Library's
+complete source code as you receive it, in any medium, provided that
+you conspicuously and appropriately publish on each copy an
+appropriate copyright notice and disclaimer of warranty; keep intact
+all the notices that refer to this License and to the absence of any
+warranty; and distribute a copy of this License along with the
+Library.
+
+ You may charge a fee for the physical act of transferring a copy,
+and you may at your option offer warranty protection in exchange for a
+fee.
+
+ 2. You may modify your copy or copies of the Library or any portion
+of it, thus forming a work based on the Library, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+ a) The modified work must itself be a software library.
+
+ b) You must cause the files modified to carry prominent notices
+ stating that you changed the files and the date of any change.
+
+ c) You must cause the whole of the work to be licensed at no
+ charge to all third parties under the terms of this License.
+
+ d) If a facility in the modified Library refers to a function or a
+ table of data to be supplied by an application program that uses
+ the facility, other than as an argument passed when the facility
+ is invoked, then you must make a good faith effort to ensure that,
+ in the event an application does not supply such function or
+ table, the facility still operates, and performs whatever part of
+ its purpose remains meaningful.
+
+ (For example, a function in a library to compute square roots has
+ a purpose that is entirely well-defined independent of the
+ application. Therefore, Subsection 2d requires that any
+ application-supplied function or table used by this function must
+ be optional: if the application does not supply it, the square
+ root function must still compute square roots.)
+
+These requirements apply to the modified work as a whole. If
+identifiable sections of that work are not derived from the Library,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works. But when you
+distribute the same sections as part of a whole which is a work based
+on the Library, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote
+it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Library.
+
+In addition, mere aggregation of another work not based on the Library
+with the Library (or with a work based on the Library) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+ 3. You may opt to apply the terms of the ordinary GNU General Public
+License instead of this License to a given copy of the Library. To do
+this, you must alter all the notices that refer to this License, so
+that they refer to the ordinary GNU General Public License, version 2,
+instead of to this License. (If a newer version than version 2 of the
+ordinary GNU General Public License has appeared, then you can specify
+that version instead if you wish.) Do not make any other change in
+these notices.
+
+ Once this change is made in a given copy, it is irreversible for
+that copy, so the ordinary GNU General Public License applies to all
+subsequent copies and derivative works made from that copy.
+
+ This option is useful when you wish to copy part of the code of
+the Library into a program that is not a library.
+
+ 4. You may copy and distribute the Library (or a portion or
+derivative of it, under Section 2) in object code or executable form
+under the terms of Sections 1 and 2 above provided that you accompany
+it with the complete corresponding machine-readable source code, which
+must be distributed under the terms of Sections 1 and 2 above on a
+medium customarily used for software interchange.
+
+ If distribution of object code is made by offering access to copy
+from a designated place, then offering equivalent access to copy the
+source code from the same place satisfies the requirement to
+distribute the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+ 5. A program that contains no derivative of any portion of the
+Library, but is designed to work with the Library by being compiled or
+linked with it, is called a "work that uses the Library". Such a
+work, in isolation, is not a derivative work of the Library, and
+therefore falls outside the scope of this License.
+
+ However, linking a "work that uses the Library" with the Library
+creates an executable that is a derivative of the Library (because it
+contains portions of the Library), rather than a "work that uses the
+library". The executable is therefore covered by this License.
+Section 6 states terms for distribution of such executables.
+
+ When a "work that uses the Library" uses material from a header file
+that is part of the Library, the object code for the work may be a
+derivative work of the Library even though the source code is not.
+Whether this is true is especially significant if the work can be
+linked without the Library, or if the work is itself a library. The
+threshold for this to be true is not precisely defined by law.
+
+ If such an object file uses only numerical parameters, data
+structure layouts and accessors, and small macros and small inline
+functions (ten lines or less in length), then the use of the object
+file is unrestricted, regardless of whether it is legally a derivative
+work. (Executables containing this object code plus portions of the
+Library will still fall under Section 6.)
+
+ Otherwise, if the work is a derivative of the Library, you may
+distribute the object code for the work under the terms of Section 6.
+Any executables containing that work also fall under Section 6,
+whether or not they are linked directly with the Library itself.
+
+ 6. As an exception to the Sections above, you may also combine or
+link a "work that uses the Library" with the Library to produce a
+work containing portions of the Library, and distribute that work
+under terms of your choice, provided that the terms permit
+modification of the work for the customer's own use and reverse
+engineering for debugging such modifications.
+
+ You must give prominent notice with each copy of the work that the
+Library is used in it and that the Library and its use are covered by
+this License. You must supply a copy of this License. If the work
+during execution displays copyright notices, you must include the
+copyright notice for the Library among them, as well as a reference
+directing the user to the copy of this License. Also, you must do one
+of these things:
+
+ a) Accompany the work with the complete corresponding
+ machine-readable source code for the Library including whatever
+ changes were used in the work (which must be distributed under
+ Sections 1 and 2 above); and, if the work is an executable linked
+ with the Library, with the complete machine-readable "work that
+ uses the Library", as object code and/or source code, so that the
+ user can modify the Library and then relink to produce a modified
+ executable containing the modified Library. (It is understood
+ that the user who changes the contents of definitions files in the
+ Library will not necessarily be able to recompile the application
+ to use the modified definitions.)
+
+ b) Use a suitable shared library mechanism for linking with the
+ Library. A suitable mechanism is one that (1) uses at run time a
+ copy of the library already present on the user's computer system,
+ rather than copying library functions into the executable, and (2)
+ will operate properly with a modified version of the library, if
+ the user installs one, as long as the modified version is
+ interface-compatible with the version that the work was made with.
+
+ c) Accompany the work with a written offer, valid for at
+ least three years, to give the same user the materials
+ specified in Subsection 6a, above, for a charge no more
+ than the cost of performing this distribution.
+
+ d) If distribution of the work is made by offering access to copy
+ from a designated place, offer equivalent access to copy the above
+ specified materials from the same place.
+
+ e) Verify that the user has already received a copy of these
+ materials or that you have already sent this user a copy.
+
+ For an executable, the required form of the "work that uses the
+Library" must include any data and utility programs needed for
+reproducing the executable from it. However, as a special exception,
+the materials to be distributed need not include anything that is
+normally distributed (in either source or binary form) with the major
+components (compiler, kernel, and so on) of the operating system on
+which the executable runs, unless that component itself accompanies
+the executable.
+
+ It may happen that this requirement contradicts the license
+restrictions of other proprietary libraries that do not normally
+accompany the operating system. Such a contradiction means you cannot
+use both them and the Library together in an executable that you
+distribute.
+
+ 7. You may place library facilities that are a work based on the
+Library side-by-side in a single library together with other library
+facilities not covered by this License, and distribute such a combined
+library, provided that the separate distribution of the work based on
+the Library and of the other library facilities is otherwise
+permitted, and provided that you do these two things:
+
+ a) Accompany the combined library with a copy of the same work
+ based on the Library, uncombined with any other library
+ facilities. This must be distributed under the terms of the
+ Sections above.
+
+ b) Give prominent notice with the combined library of the fact
+ that part of it is a work based on the Library, and explaining
+ where to find the accompanying uncombined form of the same work.
+
+ 8. You may not copy, modify, sublicense, link with, or distribute
+the Library except as expressly provided under this License. Any
+attempt otherwise to copy, modify, sublicense, link with, or
+distribute the Library is void, and will automatically terminate your
+rights under this License. However, parties who have received copies,
+or rights, from you under this License will not have their licenses
+terminated so long as such parties remain in full compliance.
+
+ 9. You are not required to accept this License, since you have not
+signed it. However, nothing else grants you permission to modify or
+distribute the Library or its derivative works. These actions are
+prohibited by law if you do not accept this License. Therefore, by
+modifying or distributing the Library (or any work based on the
+Library), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Library or works based on it.
+
+ 10. Each time you redistribute the Library (or any work based on the
+Library), the recipient automatically receives a license from the
+original licensor to copy, distribute, link with or modify the Library
+subject to these terms and conditions. You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties with
+this License.
+
+ 11. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License. If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Library at all. For example, if a patent
+license would not permit royalty-free redistribution of the Library by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Library.
+
+If any portion of this section is held invalid or unenforceable under any
+particular circumstance, the balance of the section is intended to apply,
+and the section as a whole is intended to apply in other circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system which is
+implemented by public license practices. Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+ 12. If the distribution and/or use of the Library is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Library under this License may add
+an explicit geographical distribution limitation excluding those countries,
+so that distribution is permitted only in or among countries not thus
+excluded. In such case, this License incorporates the limitation as if
+written in the body of this License.
+
+ 13. The Free Software Foundation may publish revised and/or new
+versions of the Lesser General Public License from time to time.
+Such new versions will be similar in spirit to the present version,
+but may differ in detail to address new problems or concerns.
+
+Each version is given a distinguishing version number. If the Library
+specifies a version number of this License which applies to it and
+"any later version", you have the option of following the terms and
+conditions either of that version or of any later version published by
+the Free Software Foundation. If the Library does not specify a
+license version number, you may choose any version ever published by
+the Free Software Foundation.
+
+ 14. If you wish to incorporate parts of the Library into other free
+programs whose distribution conditions are incompatible with these,
+write to the author to ask for permission. For software which is
+copyrighted by the Free Software Foundation, write to the Free
+Software Foundation; we sometimes make exceptions for this. Our
+decision will be guided by the two goals of preserving the free status
+of all derivatives of our free software and of promoting the sharing
+and reuse of software generally.
+
+ NO WARRANTY
+
+ 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
+WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
+EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
+OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
+KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
+LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
+THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+ 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
+WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
+AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
+FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
+CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
+LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
+RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
+FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
+SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
+DAMAGES.
+
+ END OF TERMS AND CONDITIONS
+
+ How to Apply These Terms to Your New Libraries
+
+ If you develop a new library, and you want it to be of the greatest
+possible use to the public, we recommend making it free software that
+everyone can redistribute and change. You can do so by permitting
+redistribution under these terms (or, alternatively, under the terms of the
+ordinary General Public License).
+
+ To apply these terms, attach the following notices to the library. It is
+safest to attach them to the start of each source file to most effectively
+convey the exclusion of warranty; and each file should have at least the
+"copyright" line and a pointer to where the full notice is found.
+
+
+ Copyright (C)
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with this library; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+Also add information on how to contact you by electronic and paper mail.
+
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a "copyright disclaimer" for the library, if
+necessary. Here is a sample; alter the names:
+
+ Yoyodyne, Inc., hereby disclaims all copyright interest in the
+ library `Frob' (a library for tweaking knobs) written by James Random Hacker.
+
+ , 1 April 1990
+ Ty Coon, President of Vice
+
+That's all there is to it!
+
+
diff --git a/vendor/doctrine/common/README.md b/vendor/doctrine/common/README.md
new file mode 100644
index 0000000..c63f762
--- /dev/null
+++ b/vendor/doctrine/common/README.md
@@ -0,0 +1,12 @@
+# Doctrine Common
+
+[![Build Status](https://secure.travis-ci.org/doctrine/common.png)](http://travis-ci.org/doctrine/common)
+
+The Doctrine Common project is a library that provides extensions to core PHP functionality.
+
+## More resources:
+
+* [Website](http://www.doctrine-project.org)
+* [Documentation](http://www.doctrine-project.org/projects/common/current/docs/en)
+* [Issue Tracker](http://www.doctrine-project.org/jira/browse/DCOM)
+* [Downloads](http://github.com/doctrine/common/downloads)
diff --git a/vendor/doctrine/common/UPGRADE_TO_2_1 b/vendor/doctrine/common/UPGRADE_TO_2_1
new file mode 100644
index 0000000..891a2e5
--- /dev/null
+++ b/vendor/doctrine/common/UPGRADE_TO_2_1
@@ -0,0 +1,39 @@
+This document details all the possible changes that you should investigate when updating
+your project from Doctrine Common 2.0.x to 2.1
+
+## AnnotationReader changes
+
+The annotation reader was heavily refactored between 2.0 and 2.1-RC1. In theory the operation of the new reader should be backwards compatible, but it has to be setup differently to work that way:
+
+ $reader = new \Doctrine\Common\Annotations\AnnotationReader();
+ $reader->setDefaultAnnotationNamespace('Doctrine\ORM\Mapping\\');
+ // new code necessary starting here
+ $reader->setIgnoreNotImportedAnnotations(true);
+ $reader->setEnableParsePhpImports(false);
+ $reader = new \Doctrine\Common\Annotations\CachedReader(
+ new \Doctrine\Common\Annotations\IndexedReader($reader), new ArrayCache()
+ );
+
+## Annotation Base class or @Annotation
+
+Beginning after 2.1-RC2 you have to either extend ``Doctrine\Common\Annotations\Annotation`` or add @Annotation to your annotations class-level docblock, otherwise the class will simply be ignored.
+
+## Removed methods on AnnotationReader
+
+* AnnotationReader::setAutoloadAnnotations()
+* AnnotationReader::getAutoloadAnnotations()
+* AnnotationReader::isAutoloadAnnotations()
+
+## AnnotationRegistry
+
+Autoloading through the PHP autoloader is removed from the 2.1 AnnotationReader. Instead you have to use the global AnnotationRegistry for loading purposes:
+
+ \Doctrine\Common\Annotations\AnnotationRegistry::registerFile($fileWithAnnotations);
+ \Doctrine\Common\Annotations\AnnotationRegistry::registerAutoloadNamespace($namespace, $dirs = null);
+ \Doctrine\Common\Annotations\AnnotationRegistry::registerAutoloadNamespaces($namespaces);
+ \Doctrine\Common\Annotations\AnnotationRegistry::registerLoader($callable);
+
+The $callable for registering a loader accepts a class as first and only parameter and must try to silently autoload it. On success true has to be returned.
+The registerAutoloadNamespace function registers a PSR-0 compatible silent autoloader for all classes with the given namespace in the given directories.
+If null is passed as directory the include path will be used.
+
diff --git a/vendor/doctrine/common/UPGRADE_TO_2_2 b/vendor/doctrine/common/UPGRADE_TO_2_2
new file mode 100644
index 0000000..1d93a13
--- /dev/null
+++ b/vendor/doctrine/common/UPGRADE_TO_2_2
@@ -0,0 +1,61 @@
+This document details all the possible changes that you should investigate when
+updating your project from Doctrine Common 2.1 to 2.2:
+
+## Annotation Changes
+
+- AnnotationReader::setIgnoreNotImportedAnnotations has been removed, you need to
+ add ignore annotation names which are supposed to be ignored via
+ AnnotationReader::addGlobalIgnoredName
+
+- AnnotationReader::setAutoloadAnnotations was deprecated by the AnnotationRegistry
+ in 2.1 and has been removed in 2.2
+
+- AnnotationReader::setEnableParsePhpImports was added to ease transition to the new
+ annotation mechanism in 2.1 and is removed in 2.2
+
+- AnnotationReader::isParsePhpImportsEnabled is removed (see above)
+
+- AnnotationReader::setDefaultAnnotationNamespace was deprecated in favor of explicit
+ configuration in 2.1 and will be removed in 2.2 (for isolated projects where you
+ have full-control over _all_ available annotations, we offer a dedicated reader
+ class ``SimpleAnnotationReader``)
+
+- AnnotationReader::setAnnotationCreationFunction was deprecated in 2.1 and will be
+ removed in 2.2. We only offer two creation mechanisms which cannot be changed
+ anymore to allow the same reader instance to work with all annotations regardless
+ of which library they are coming from.
+
+- AnnotationReader::setAnnotationNamespaceAlias was deprecated in 2.1 and will be
+ removed in 2.2 (see setDefaultAnnotationNamespace)
+
+- If you use a class as annotation which has not the @Annotation marker in it's
+ class block, we will now throw an exception instead of silently ignoring it. You
+ can however still achieve the previous behavior using the @IgnoreAnnotation, or
+ AnnotationReader::addGlobalIgnoredName (the exception message will contain detailed
+ instructions when you run into this problem).
+
+## Cache Changes
+
+- Renamed old AbstractCache to CacheProvider
+
+- Dropped the support to the following functions of all cache providers:
+
+ - CacheProvider::deleteByWildcard
+
+ - CacheProvider::deleteByRegEx
+
+ - CacheProvider::deleteByPrefix
+
+ - CacheProvider::deleteBySuffix
+
+- CacheProvider::deleteAll will not remove ALL entries, it will only mark them as invalid
+
+- CacheProvider::flushAll will remove ALL entries, namespaced or not
+
+- Added support to MemcachedCache
+
+- Added support to WincacheCache
+
+## ClassLoader Changes
+
+- ClassLoader::fileExistsInIncludePath() no longer exists. Use the native stream_resolve_include_path() PHP function
\ No newline at end of file
diff --git a/vendor/doctrine/common/composer.json b/vendor/doctrine/common/composer.json
new file mode 100644
index 0000000..7780d93
--- /dev/null
+++ b/vendor/doctrine/common/composer.json
@@ -0,0 +1,21 @@
+{
+ "name": "doctrine/common",
+ "type": "library","version":"2.2.2",
+ "description": "Common Library for Doctrine projects",
+ "keywords": ["collections", "spl", "eventmanager", "annotations", "persistence"],
+ "homepage": "http://www.doctrine-project.org",
+ "license": "LGPL",
+ "authors": [
+ {"name": "Guilherme Blanco", "email": "guilhermeblanco@gmail.com"},
+ {"name": "Roman Borschel", "email": "roman@code-factory.org"},
+ {"name": "Benjamin Eberlei", "email": "kontakt@beberlei.de"},
+ {"name": "Jonathan Wage", "email": "jonwage@gmail.com"},
+ {"name": "Johannes Schmitt", "email": "schmittjoh@gmail.com"}
+ ],
+ "require": {
+ "php": ">=5.3.2"
+ },
+ "autoload": {
+ "psr-0": { "Doctrine\\Common": "lib/" }
+ }
+}
diff --git a/vendor/doctrine/common/lib/Doctrine/Common/Annotations/Annotation.php b/vendor/doctrine/common/lib/Doctrine/Common/Annotations/Annotation.php
new file mode 100644
index 0000000..6251252
--- /dev/null
+++ b/vendor/doctrine/common/lib/Doctrine/Common/Annotations/Annotation.php
@@ -0,0 +1,75 @@
+.
+ */
+
+namespace Doctrine\Common\Annotations;
+
+/**
+ * Annotations class
+ *
+ * @author Benjamin Eberlei
+ * @author Guilherme Blanco
+ * @author Jonathan Wage
+ * @author Roman Borschel
+ */
+class Annotation
+{
+ /**
+ * Value property. Common among all derived classes.
+ *
+ * @var string
+ */
+ public $value;
+
+ /**
+ * Constructor
+ *
+ * @param array $data Key-value for properties to be defined in this class
+ */
+ public final function __construct(array $data)
+ {
+ foreach ($data as $key => $value) {
+ $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(
+ 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(
+ sprintf("Unknown property '%s' on annotation '%s'.", $name, get_class($this))
+ );
+ }
+}
\ No newline at end of file
diff --git a/vendor/doctrine/common/lib/Doctrine/Common/Annotations/Annotation/Attribute.php b/vendor/doctrine/common/lib/Doctrine/Common/Annotations/Annotation/Attribute.php
new file mode 100644
index 0000000..21597b1
--- /dev/null
+++ b/vendor/doctrine/common/lib/Doctrine/Common/Annotations/Annotation/Attribute.php
@@ -0,0 +1,47 @@
+.
+ */
+
+namespace Doctrine\Common\Annotations\Annotation;
+
+/**
+ * Annotation that can be used to signal to the parser
+ * to check the attribute type during the parsing process.
+ *
+ * @author Fabio B. Silva
+ *
+ * @Annotation
+ */
+final class Attribute
+{
+ /**
+ * @var string
+ */
+ public $name;
+
+ /**
+ * @var string
+ */
+ public $type;
+
+ /**
+ * @var boolean
+ */
+ public $required = false;
+}
\ No newline at end of file
diff --git a/vendor/doctrine/common/lib/Doctrine/Common/Annotations/Annotation/Attributes.php b/vendor/doctrine/common/lib/Doctrine/Common/Annotations/Annotation/Attributes.php
new file mode 100644
index 0000000..6e314be
--- /dev/null
+++ b/vendor/doctrine/common/lib/Doctrine/Common/Annotations/Annotation/Attributes.php
@@ -0,0 +1,37 @@
+.
+ */
+
+namespace Doctrine\Common\Annotations\Annotation;
+
+/**
+ * Annotation that can be used to signal to the parser
+ * to check the types of all declared attributes during the parsing process.
+ *
+ * @author Fabio B. Silva
+ *
+ * @Annotation
+ */
+final class Attributes
+{
+ /**
+ * @var array
+ */
+ public $value;
+}
\ No newline at end of file
diff --git a/vendor/doctrine/common/lib/Doctrine/Common/Annotations/Annotation/IgnoreAnnotation.php b/vendor/doctrine/common/lib/Doctrine/Common/Annotations/Annotation/IgnoreAnnotation.php
new file mode 100644
index 0000000..1b2b20a
--- /dev/null
+++ b/vendor/doctrine/common/lib/Doctrine/Common/Annotations/Annotation/IgnoreAnnotation.php
@@ -0,0 +1,44 @@
+.
+ */
+
+namespace Doctrine\Common\Annotations\Annotation;
+
+/**
+ * Annotation that can be used to signal to the parser to ignore specific
+ * annotations during the parsing process.
+ *
+ * @Annotation
+ * @author Johannes M. Schmitt
+ */
+final class IgnoreAnnotation
+{
+ public $names;
+
+ public function __construct(array $values)
+ {
+ if (is_string($values['value'])) {
+ $values['value'] = array($values['value']);
+ }
+ if (!is_array($values['value'])) {
+ throw new \RuntimeException(sprintf('@IgnoreAnnotation expects either a string name, or an array of strings, but got %s.', json_encode($values['value'])));
+ }
+
+ $this->names = $values['value'];
+ }
+}
\ No newline at end of file
diff --git a/vendor/doctrine/common/lib/Doctrine/Common/Annotations/Annotation/Required.php b/vendor/doctrine/common/lib/Doctrine/Common/Annotations/Annotation/Required.php
new file mode 100644
index 0000000..7b89a02
--- /dev/null
+++ b/vendor/doctrine/common/lib/Doctrine/Common/Annotations/Annotation/Required.php
@@ -0,0 +1,33 @@
+.
+ */
+
+namespace Doctrine\Common\Annotations\Annotation;
+
+/**
+ * Annotation that can be used to signal to the parser
+ * to check if that attribute is required during the parsing process.
+ *
+ * @author Fabio B. Silva
+ *
+ * @Annotation
+ */
+final class Required
+{
+}
\ No newline at end of file
diff --git a/vendor/doctrine/common/lib/Doctrine/Common/Annotations/Annotation/Target.php b/vendor/doctrine/common/lib/Doctrine/Common/Annotations/Annotation/Target.php
new file mode 100644
index 0000000..c41896a
--- /dev/null
+++ b/vendor/doctrine/common/lib/Doctrine/Common/Annotations/Annotation/Target.php
@@ -0,0 +1,105 @@
+.
+ */
+
+namespace Doctrine\Common\Annotations\Annotation;
+
+/**
+ * Annotation that can be used to signal to the parser
+ * to check the annotation target during the parsing process.
+ *
+ * @author Fabio B. Silva
+ *
+ * @Annotation
+ */
+final class Target
+{
+ const TARGET_CLASS = 1;
+ const TARGET_METHOD = 2;
+ const TARGET_PROPERTY = 4;
+ const TARGET_ANNOTATION = 8;
+ const TARGET_ALL = 15;
+
+ /**
+ * @var array
+ */
+ private static $map = array(
+ 'ALL' => self::TARGET_ALL,
+ 'CLASS' => self::TARGET_CLASS,
+ 'METHOD' => self::TARGET_METHOD,
+ 'PROPERTY' => self::TARGET_PROPERTY,
+ 'ANNOTATION' => self::TARGET_ANNOTATION,
+ );
+
+ /**
+ * @var array
+ */
+ public $value;
+
+ /**
+ * Targets as bitmask.
+ *
+ * @var integer
+ */
+ public $targets;
+
+ /**
+ * Literal target declaration.
+ *
+ * @var integer
+ */
+ public $literal;
+
+ /**
+ * Annotation construct
+ *
+ * @param array $values
+ */
+ public function __construct(array $values)
+ {
+ if (!isset($values['value'])){
+ $values['value'] = null;
+ }
+ if (is_string($values['value'])){
+ $values['value'] = array($values['value']);
+ }
+ if (!is_array($values['value'])){
+ throw new \InvalidArgumentException(
+ sprintf('@Target expects either a string value, or an array of strings, "%s" given.',
+ is_object($values['value']) ? get_class($values['value']) : gettype($values['value'])
+ )
+ );
+ }
+
+ $bitmask = 0;
+ foreach ($values['value'] as $literal) {
+ if(!isset(self::$map[$literal])){
+ throw new \InvalidArgumentException(
+ sprintf('Invalid Target "%s". Available targets: [%s]',
+ $literal, implode(', ', array_keys(self::$map)))
+ );
+ }
+ $bitmask += self::$map[$literal];
+ }
+
+ $this->targets = $bitmask;
+ $this->value = $values['value'];
+ $this->literal = implode(', ', $this->value);
+ }
+}
\ No newline at end of file
diff --git a/vendor/doctrine/common/lib/Doctrine/Common/Annotations/AnnotationException.php b/vendor/doctrine/common/lib/Doctrine/Common/Annotations/AnnotationException.php
new file mode 100644
index 0000000..fdc1913
--- /dev/null
+++ b/vendor/doctrine/common/lib/Doctrine/Common/Annotations/AnnotationException.php
@@ -0,0 +1,111 @@
+.
+ */
+
+namespace Doctrine\Common\Annotations;
+
+/**
+ * Description of AnnotationException
+ *
+ * @since 2.0
+ * @author Benjamin Eberlei
+ * @author Guilherme Blanco
+ * @author Jonathan Wage
+ * @author Roman Borschel
+ */
+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);
+ }
+
+ /**
+ * 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);
+ }
+
+ /**
+ * Creates a new AnnotationException describing an error which occurred during
+ * the creation of the annotation.
+ *
+ * @since 2.2
+ * @param string $message
+ * @return AnnotationException
+ */
+ public static function creationError($message)
+ {
+ return new self('[Creation Error] ' . $message);
+ }
+
+ /**
+ * Creates a new AnnotationException describing an type error of an attribute.
+ *
+ * @since 2.2
+ * @param string $attributeName
+ * @param string $annotationName
+ * @param string $context
+ * @param string $expected
+ * @param mixed $actual
+ * @return AnnotationException
+ */
+ public static function typeError($attributeName, $annotationName, $context, $expected, $actual)
+ {
+ return new self(sprintf(
+ '[Type Error] Attribute "%s" of @%s declared on %s expects %s, but got %s.',
+ $attributeName,
+ $annotationName,
+ $context,
+ $expected,
+ is_object($actual) ? 'an instance of '.get_class($actual) : gettype($actual)
+ ));
+ }
+
+ /**
+ * Creates a new AnnotationException describing an required error of an attribute.
+ *
+ * @since 2.2
+ * @param string $attributeName
+ * @param string $annotationName
+ * @param string $context
+ * @param string $expected
+ * @return AnnotationException
+ */
+ public static function requiredError($attributeName, $annotationName, $context, $expected)
+ {
+ return new self(sprintf(
+ '[Type Error] Attribute "%s" of @%s declared on %s expects %s. This value should not be null.',
+ $attributeName,
+ $annotationName,
+ $context,
+ $expected
+ ));
+ }
+}
\ No newline at end of file
diff --git a/vendor/doctrine/common/lib/Doctrine/Common/Annotations/AnnotationReader.php b/vendor/doctrine/common/lib/Doctrine/Common/Annotations/AnnotationReader.php
new file mode 100644
index 0000000..dda8b23
--- /dev/null
+++ b/vendor/doctrine/common/lib/Doctrine/Common/Annotations/AnnotationReader.php
@@ -0,0 +1,301 @@
+.
+ */
+
+namespace Doctrine\Common\Annotations;
+
+use Doctrine\Common\Annotations\Annotation\IgnoreAnnotation;
+use Doctrine\Common\Annotations\Annotation\Target;
+use Closure;
+use ReflectionClass;
+use ReflectionMethod;
+use ReflectionProperty;
+
+/**
+ * A reader for docblock annotations.
+ *
+ * @author Benjamin Eberlei
+ * @author Guilherme Blanco
+ * @author Jonathan Wage
+ * @author Roman Borschel
+ * @author Johannes M. Schmitt
+ */
+final class AnnotationReader implements Reader
+{
+ /**
+ * Global map for imports.
+ *
+ * @var array
+ */
+ private static $globalImports = array(
+ 'ignoreannotation' => 'Doctrine\Common\Annotations\Annotation\IgnoreAnnotation',
+ );
+
+ /**
+ * A list with annotations that are not causing exceptions when not resolved to an annotation class.
+ *
+ * The names are case sensitive.
+ *
+ * @var array
+ */
+ private static $globalIgnoredNames = array(
+ 'access'=> true, 'author'=> true, 'copyright'=> true, 'deprecated'=> true,
+ 'example'=> true, 'ignore'=> true, 'internal'=> true, 'link'=> true, 'see'=> true,
+ 'since'=> true, 'tutorial'=> true, 'version'=> true, 'package'=> true,
+ 'subpackage'=> true, 'name'=> true, 'global'=> true, 'param'=> true,
+ 'return'=> true, 'staticvar'=> true, 'category'=> true, 'staticVar'=> true,
+ 'static'=> true, 'var'=> true, 'throws'=> true, 'inheritdoc'=> true,
+ 'inheritDoc'=> true, 'license'=> true, 'todo'=> true, 'deprecated'=> true,
+ 'deprec'=> true, 'author'=> true, 'property' => true, 'method' => true,
+ 'abstract'=> true, 'exception'=> true, 'magic' => true, 'api' => true,
+ 'final'=> true, 'filesource'=> true, 'throw' => true, 'uses' => true,
+ 'usedby'=> true, 'private' => true, 'Annotation' => true, 'override' => true,
+ 'codeCoverageIgnore' => true, 'codeCoverageIgnoreStart' => true, 'codeCoverageIgnoreEnd' => true,
+ 'Required' => true, 'Attribute' => true, 'Attributes' => true,
+ 'Target' => true, 'SuppressWarnings' => true,
+ );
+
+ /**
+ * Add a new annotation to the globally ignored annotation names with regard to exception handling.
+ *
+ * @param string $name
+ */
+ static public function addGlobalIgnoredName($name)
+ {
+ self::$globalIgnoredNames[$name] = true;
+ }
+
+ /**
+ * Annotations Parser
+ *
+ * @var Doctrine\Common\Annotations\DocParser
+ */
+ private $parser;
+
+ /**
+ * Annotations Parser used to collect parsing metadata
+ *
+ * @var Doctrine\Common\Annotations\DocParser
+ */
+ private $preParser;
+
+ /**
+ * PHP Parser used to collect imports.
+ *
+ * @var Doctrine\Common\Annotations\PhpParser
+ */
+ private $phpParser;
+
+ /**
+ * In-memory cache mechanism to store imported annotations per class.
+ *
+ * @var array
+ */
+ private $imports = array();
+
+ /**
+ * In-memory cache mechanism to store ignored annotations per class.
+ *
+ * @var array
+ */
+ private $ignoredAnnotationNames = array();
+
+ /**
+ * Constructor.
+ *
+ * Initializes a new AnnotationReader.
+ */
+ public function __construct()
+ {
+ AnnotationRegistry::registerFile(__DIR__ . '/Annotation/IgnoreAnnotation.php');
+
+ $this->parser = new DocParser;
+
+ $this->preParser = new DocParser;
+ $this->preParser->setImports(self::$globalImports);
+ $this->preParser->setIgnoreNotImportedAnnotations(true);
+
+ $this->phpParser = new PhpParser;
+ }
+
+ /**
+ * Gets the annotations applied to a class.
+ *
+ * @param ReflectionClass $class The ReflectionClass of the class from which
+ * the class annotations should be read.
+ * @return array An array of Annotations.
+ */
+ public function getClassAnnotations(ReflectionClass $class)
+ {
+ $this->parser->setTarget(Target::TARGET_CLASS);
+ $this->parser->setImports($this->getImports($class));
+ $this->parser->setIgnoredAnnotationNames($this->getIgnoredAnnotationNames($class));
+
+ return $this->parser->parse($class->getDocComment(), 'class ' . $class->getName());
+ }
+
+ /**
+ * Gets a class annotation.
+ *
+ * @param ReflectionClass $class The ReflectionClass of the class from which
+ * the class annotations should be read.
+ * @param string $annotationName The name of the annotation.
+ * @return The Annotation or NULL, if the requested annotation does not exist.
+ */
+ public function getClassAnnotation(ReflectionClass $class, $annotationName)
+ {
+ $annotations = $this->getClassAnnotations($class);
+
+ foreach ($annotations as $annotation) {
+ if ($annotation instanceof $annotationName) {
+ return $annotation;
+ }
+ }
+
+ return null;
+ }
+
+ /**
+ * Gets the annotations applied to a property.
+ *
+ * @param ReflectionProperty $property The ReflectionProperty of the property
+ * from which the annotations should be read.
+ * @return array An array of Annotations.
+ */
+ public function getPropertyAnnotations(ReflectionProperty $property)
+ {
+ $class = $property->getDeclaringClass();
+ $context = 'property ' . $class->getName() . "::\$" . $property->getName();
+ $this->parser->setTarget(Target::TARGET_PROPERTY);
+ $this->parser->setImports($this->getImports($class));
+ $this->parser->setIgnoredAnnotationNames($this->getIgnoredAnnotationNames($class));
+
+ return $this->parser->parse($property->getDocComment(), $context);
+ }
+
+ /**
+ * Gets a property annotation.
+ *
+ * @param ReflectionProperty $property
+ * @param string $annotationName The name of the annotation.
+ * @return The Annotation or NULL, if the requested annotation does not exist.
+ */
+ public function getPropertyAnnotation(ReflectionProperty $property, $annotationName)
+ {
+ $annotations = $this->getPropertyAnnotations($property);
+
+ foreach ($annotations as $annotation) {
+ if ($annotation instanceof $annotationName) {
+ return $annotation;
+ }
+ }
+
+ return null;
+ }
+
+ /**
+ * Gets the annotations applied to a method.
+ *
+ * @param ReflectionMethod $property The ReflectionMethod of the method from which
+ * the annotations should be read.
+ * @return array An array of Annotations.
+ */
+ public function getMethodAnnotations(ReflectionMethod $method)
+ {
+ $class = $method->getDeclaringClass();
+ $context = 'method ' . $class->getName() . '::' . $method->getName() . '()';
+ $this->parser->setTarget(Target::TARGET_METHOD);
+ $this->parser->setImports($this->getImports($class));
+ $this->parser->setIgnoredAnnotationNames($this->getIgnoredAnnotationNames($class));
+
+ return $this->parser->parse($method->getDocComment(), $context);
+ }
+
+ /**
+ * Gets a method annotation.
+ *
+ * @param ReflectionMethod $method
+ * @param string $annotationName The name of the annotation.
+ * @return The Annotation or NULL, if the requested annotation does not exist.
+ */
+ public function getMethodAnnotation(ReflectionMethod $method, $annotationName)
+ {
+ $annotations = $this->getMethodAnnotations($method);
+
+ foreach ($annotations as $annotation) {
+ if ($annotation instanceof $annotationName) {
+ return $annotation;
+ }
+ }
+
+ return null;
+ }
+
+ /**
+ * Returns the ignored annotations for the given class.
+ *
+ * @param ReflectionClass $class
+ * @return array
+ */
+ private function getIgnoredAnnotationNames(ReflectionClass $class)
+ {
+ if (isset($this->ignoredAnnotationNames[$name = $class->getName()])) {
+ return $this->ignoredAnnotationNames[$name];
+ }
+ $this->collectParsingMetadata($class);
+
+ return $this->ignoredAnnotationNames[$name];
+ }
+
+ private function getImports(ReflectionClass $class)
+ {
+ if (isset($this->imports[$name = $class->getName()])) {
+ return $this->imports[$name];
+ }
+ $this->collectParsingMetadata($class);
+
+ return $this->imports[$name];
+ }
+
+ /**
+ * Collects parsing metadata for a given class
+ *
+ * @param ReflectionClass $class
+ */
+ private function collectParsingMetadata(ReflectionClass $class)
+ {
+ $ignoredAnnotationNames = self::$globalIgnoredNames;
+
+ $annotations = $this->preParser->parse($class->getDocComment(), 'class '.$class->name);
+ foreach ($annotations as $annotation) {
+ if ($annotation instanceof IgnoreAnnotation) {
+ foreach ($annotation->names AS $annot) {
+ $ignoredAnnotationNames[$annot] = true;
+ }
+ }
+ }
+
+ $name = $class->getName();
+ $this->imports[$name] = array_merge(
+ self::$globalImports,
+ $this->phpParser->parseClass($class),
+ array('__NAMESPACE__' => $class->getNamespaceName())
+ );
+ $this->ignoredAnnotationNames[$name] = $ignoredAnnotationNames;
+ }
+}
diff --git a/vendor/doctrine/common/lib/Doctrine/Common/Annotations/AnnotationRegistry.php b/vendor/doctrine/common/lib/Doctrine/Common/Annotations/AnnotationRegistry.php
new file mode 100644
index 0000000..60b00f5
--- /dev/null
+++ b/vendor/doctrine/common/lib/Doctrine/Common/Annotations/AnnotationRegistry.php
@@ -0,0 +1,129 @@
+.
+ */
+
+namespace Doctrine\Common\Annotations;
+
+final class AnnotationRegistry
+{
+ /**
+ * A map of namespaces to use for autoloading purposes based on a PSR-0 convention.
+ *
+ * Contains the namespace as key and an array of directories as value. If the value is NULL
+ * the include path is used for checking for the corresponding file.
+ *
+ * This autoloading mechanism does not utilize the PHP autoloading but implements autoloading on its own.
+ *
+ * @var array
+ */
+ static private $autoloadNamespaces = array();
+
+ /**
+ * A map of autoloader callables.
+ *
+ * @var array
+ */
+ static private $loaders = array();
+
+ static public function reset()
+ {
+ self::$autoloadNamespaces = array();
+ self::$loaders = array();
+ }
+
+ static public function registerFile($file)
+ {
+ require_once $file;
+ }
+
+ /**
+ * Add a namespace with one or many directories to look for files or null for the include path.
+ *
+ * Loading of this namespaces will be done with a PSR-0 namespace loading algorithm.
+ *
+ * @param string $namespace
+ * @param string|array|null $dirs
+ */
+ static public function registerAutoloadNamespace($namespace, $dirs = null)
+ {
+ self::$autoloadNamespaces[$namespace] = $dirs;
+ }
+
+ /**
+ * Register multiple namespaces
+ *
+ * Loading of this namespaces will be done with a PSR-0 namespace loading algorithm.
+ *
+ * @param array $namespaces
+ */
+ static public function registerAutoloadNamespaces(array $namespaces)
+ {
+ self::$autoloadNamespaces = array_merge(self::$autoloadNamespaces, $namespaces);
+ }
+
+ /**
+ * Register an autoloading callabale for annotations, much like spl_autoload_register().
+ *
+ * NOTE: These class loaders HAVE to be silent when a class was not found!
+ * IMPORTANT: Loaders have to return true if they loaded a class that could contain the searched annotation class.
+ *
+ * @param callabale $callabale
+ */
+ static public function registerLoader($callabale)
+ {
+ if (!is_callable($callabale)) {
+ throw new \InvalidArgumentException("A callable is expected in AnnotationRegistry::registerLoader().");
+ }
+ self::$loaders[] = $callabale;
+ }
+
+ /**
+ * Autoload an annotation class silently.
+ *
+ * @param string $class
+ * @return void
+ */
+ static public function loadAnnotationClass($class)
+ {
+ foreach (self::$autoloadNamespaces AS $namespace => $dirs) {
+ if (strpos($class, $namespace) === 0) {
+ $file = str_replace("\\", DIRECTORY_SEPARATOR, $class) . ".php";
+ if ($dirs === null) {
+ if ($path = stream_resolve_include_path($file)) {
+ require $path;
+ return true;
+ }
+ } else {
+ foreach((array)$dirs AS $dir) {
+ if (file_exists($dir . DIRECTORY_SEPARATOR . $file)) {
+ require $dir . DIRECTORY_SEPARATOR . $file;
+ return true;
+ }
+ }
+ }
+ }
+ }
+
+ foreach (self::$loaders AS $loader) {
+ if (call_user_func($loader, $class) === true) {
+ return true;
+ }
+ }
+ return false;
+ }
+}
diff --git a/vendor/doctrine/common/lib/Doctrine/Common/Annotations/CachedReader.php b/vendor/doctrine/common/lib/Doctrine/Common/Annotations/CachedReader.php
new file mode 100644
index 0000000..6ea47c6
--- /dev/null
+++ b/vendor/doctrine/common/lib/Doctrine/Common/Annotations/CachedReader.php
@@ -0,0 +1,179 @@
+.
+ */
+
+namespace Doctrine\Common\Annotations;
+
+use Doctrine\Common\Cache\Cache;
+
+/**
+ * A cache aware annotation reader.
+ *
+ * @author Johannes M. Schmitt
+ * @author Benjamin Eberlei
+ */
+final class CachedReader implements Reader
+{
+ private static $CACHE_SALT = '@[Annot]';
+
+ /**
+ * @var Reader
+ */
+ private $delegate;
+
+ /**
+ * @var Cache
+ */
+ private $cache;
+
+ /**
+ * @var boolean
+ */
+ private $debug;
+
+ /**
+ * @var array
+ */
+ private $loadedAnnotations;
+
+ /**
+ * @param Reader $reader
+ * @param Cache $cache
+ */
+ public function __construct(Reader $reader, Cache $cache, $debug = false)
+ {
+ $this->delegate = $reader;
+ $this->cache = $cache;
+ $this->debug = $debug;
+ }
+
+ public function getClassAnnotations(\ReflectionClass $class)
+ {
+ $cacheKey = $class->getName() . self::$CACHE_SALT;
+
+ if (isset($this->loadedAnnotations[$cacheKey])) {
+ return $this->loadedAnnotations[$cacheKey];
+ }
+
+ // Attempt to grab data from cache
+ if (($data = $this->cache->fetch($cacheKey)) !== false) {
+ if (!$this->debug || $this->isCacheFresh($cacheKey, $class)) {
+ return $data;
+ }
+ }
+
+ $annots = $this->delegate->getClassAnnotations($class);
+ $this->cache->save($cacheKey, $annots);
+ $this->cache->save('[C]'.$cacheKey, time());
+
+ return $this->loadedAnnotations[$cacheKey] = $annots;
+ }
+
+ public function getClassAnnotation(\ReflectionClass $class, $annotationName)
+ {
+ foreach ($this->getClassAnnotations($class) as $annot) {
+ if ($annot instanceof $annotationName) {
+ return $annot;
+ }
+ }
+
+ return null;
+ }
+
+ public function getPropertyAnnotations(\ReflectionProperty $property)
+ {
+ $class = $property->getDeclaringClass();
+ $cacheKey = $class->getName().'$'.$property->getName().self::$CACHE_SALT;
+
+ if (isset($this->loadedAnnotations[$cacheKey])) {
+ return $this->loadedAnnotations[$cacheKey];
+ }
+
+ // Attempt to grab data from cache
+ if (($data = $this->cache->fetch($cacheKey)) !== false) {
+ if (!$this->debug || $this->isCacheFresh($cacheKey, $class)) {
+ return $data;
+ }
+ }
+
+ $annots = $this->delegate->getPropertyAnnotations($property);
+ $this->cache->save($cacheKey, $annots);
+ $this->cache->save('[C]'.$cacheKey, time());
+
+ return $this->loadedAnnotations[$cacheKey] = $annots;
+ }
+
+ public function getPropertyAnnotation(\ReflectionProperty $property, $annotationName)
+ {
+ foreach ($this->getPropertyAnnotations($property) as $annot) {
+ if ($annot instanceof $annotationName) {
+ return $annot;
+ }
+ }
+
+ return null;
+ }
+
+ public function getMethodAnnotations(\ReflectionMethod $method)
+ {
+ $class = $method->getDeclaringClass();
+ $cacheKey = $class->getName().'#'.$method->getName().self::$CACHE_SALT;
+
+ if (isset($this->loadedAnnotations[$cacheKey])) {
+ return $this->loadedAnnotations[$cacheKey];
+ }
+
+ // Attempt to grab data from cache
+ if (($data = $this->cache->fetch($cacheKey)) !== false) {
+ if (!$this->debug || $this->isCacheFresh($cacheKey, $class)) {
+ return $data;
+ }
+ }
+
+ $annots = $this->delegate->getMethodAnnotations($method);
+ $this->cache->save($cacheKey, $annots);
+ $this->cache->save('[C]'.$cacheKey, time());
+
+ return $this->loadedAnnotations[$cacheKey] = $annots;
+ }
+
+ public function getMethodAnnotation(\ReflectionMethod $method, $annotationName)
+ {
+ foreach ($this->getMethodAnnotations($method) as $annot) {
+ if ($annot instanceof $annotationName) {
+ return $annot;
+ }
+ }
+
+ return null;
+ }
+
+ public function clearLoadedAnnotations()
+ {
+ $this->loadedAnnotations = array();
+ }
+
+ private function isCacheFresh($cacheKey, \ReflectionClass $class)
+ {
+ if (false === $filename = $class->getFilename()) {
+ return true;
+ }
+
+ return $this->cache->fetch('[C]'.$cacheKey) >= filemtime($filename);
+ }
+}
\ No newline at end of file
diff --git a/vendor/doctrine/common/lib/Doctrine/Common/Annotations/DocLexer.php b/vendor/doctrine/common/lib/Doctrine/Common/Annotations/DocLexer.php
new file mode 100644
index 0000000..c6223e3
--- /dev/null
+++ b/vendor/doctrine/common/lib/Doctrine/Common/Annotations/DocLexer.php
@@ -0,0 +1,140 @@
+.
+ */
+
+namespace Doctrine\Common\Annotations;
+
+use Doctrine\Common\Lexer;
+
+/**
+ * Simple lexer for docblock annotations.
+ *
+ * @author Benjamin Eberlei
+ * @author Guilherme Blanco
+ * @author Jonathan Wage
+ * @author Roman Borschel
+ * @author Johannes M. Schmitt
+ */
+final class DocLexer extends Lexer
+{
+ const T_NONE = 1;
+ const T_IDENTIFIER = 2;
+ const T_INTEGER = 3;
+ const T_STRING = 4;
+ const T_FLOAT = 5;
+
+ const T_AT = 101;
+ const T_CLOSE_CURLY_BRACES = 102;
+ const T_CLOSE_PARENTHESIS = 103;
+ const T_COMMA = 104;
+ const T_EQUALS = 105;
+ const T_FALSE = 106;
+ const T_NAMESPACE_SEPARATOR = 107;
+ const T_OPEN_CURLY_BRACES = 108;
+ const T_OPEN_PARENTHESIS = 109;
+ const T_TRUE = 110;
+ const T_NULL = 111;
+ const T_COLON = 112;
+
+ /**
+ * @inheritdoc
+ */
+ protected function getCatchablePatterns()
+ {
+ return array(
+ '[a-z_][a-z0-9_:]*',
+ '(?:[+-]?[0-9]+(?:[\.][0-9]+)*)(?:[eE][+-]?[0-9]+)?',
+ '"(?:[^"]|"")*"',
+ );
+ }
+
+ /**
+ * @inheritdoc
+ */
+ protected function getNonCatchablePatterns()
+ {
+ return array('\s+', '\*+', '(.)');
+ }
+
+ /**
+ * @inheritdoc
+ */
+ protected function getType(&$value)
+ {
+ $type = self::T_NONE;
+
+ // Checking numeric value
+ if (is_numeric($value)) {
+ return (strpos($value, '.') !== false || stripos($value, 'e') !== false)
+ ? self::T_FLOAT : self::T_INTEGER;
+ }
+
+ if ($value[0] === '"') {
+ $value = str_replace('""', '"', substr($value, 1, strlen($value) - 2));
+
+ 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_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 'null':
+ return self::T_NULL;
+
+ case ':':
+ return self::T_COLON;
+
+ default:
+ if (ctype_alpha($value[0]) || $value[0] === '_') {
+ return self::T_IDENTIFIER;
+ }
+
+ break;
+ }
+ }
+
+ return $type;
+ }
+}
\ No newline at end of file
diff --git a/vendor/doctrine/common/lib/Doctrine/Common/Annotations/DocParser.php b/vendor/doctrine/common/lib/Doctrine/Common/Annotations/DocParser.php
new file mode 100644
index 0000000..9d16b17
--- /dev/null
+++ b/vendor/doctrine/common/lib/Doctrine/Common/Annotations/DocParser.php
@@ -0,0 +1,891 @@
+.
+ */
+
+namespace Doctrine\Common\Annotations;
+
+use Closure;
+use ReflectionClass;
+use Doctrine\Common\Annotations\Annotation\Target;
+use Doctrine\Common\Annotations\Annotation\Attribute;
+use Doctrine\Common\Annotations\Annotation\Attributes;
+
+/**
+ * A parser for docblock annotations.
+ *
+ * It is strongly discouraged to change the default annotation parsing process.
+ *
+ * @author Benjamin Eberlei
+ * @author Guilherme Blanco
+ * @author Jonathan Wage
+ * @author Roman Borschel
+ * @author Johannes M. Schmitt
+ * @author Fabio B. Silva
+ */
+final class DocParser
+{
+ /**
+ * An array of all valid tokens for a class name.
+ *
+ * @var array
+ */
+ private static $classIdentifiers = array(DocLexer::T_IDENTIFIER, DocLexer::T_TRUE, DocLexer::T_FALSE, DocLexer::T_NULL);
+
+ /**
+ * The lexer.
+ *
+ * @var Doctrine\Common\Annotations\DocLexer
+ */
+ private $lexer;
+
+ /**
+ * Current target context
+ *
+ * @var string
+ */
+ private $target;
+
+ /**
+ * Doc Parser used to collect annotation target
+ *
+ * @var Doctrine\Common\Annotations\DocParser
+ */
+ private static $metadataParser;
+
+ /**
+ * Flag to control if the current annotation is nested or not.
+ *
+ * @var boolean
+ */
+ private $isNestedAnnotation = false;
+
+ /**
+ * Hashmap containing all use-statements that are to be used when parsing
+ * the given doc block.
+ *
+ * @var array
+ */
+ private $imports = array();
+
+ /**
+ * This hashmap is used internally to cache results of class_exists()
+ * look-ups.
+ *
+ * @var array
+ */
+ private $classExists = array();
+
+ /**
+ * Whether annotations that have not been imported should be ignored.
+ *
+ * @var boolean
+ */
+ private $ignoreNotImportedAnnotations = false;
+
+ /**
+ * An array of default namespaces if operating in simple mode.
+ *
+ * @var array
+ */
+ private $namespaces = array();
+
+ /**
+ * A list with annotations that are not causing exceptions when not resolved to an annotation class.
+ *
+ * The names must be the raw names as used in the class, not the fully qualified
+ * class names.
+ *
+ * @var array
+ */
+ private $ignoredAnnotationNames = array();
+
+ /**
+ * @var string
+ */
+ private $context = '';
+
+ /**
+ * Hash-map for caching annotation metadata
+ * @var array
+ */
+ private static $annotationMetadata = array(
+ 'Doctrine\Common\Annotations\Annotation\Target' => array(
+ 'is_annotation' => true,
+ 'has_constructor' => true,
+ 'properties' => array(),
+ 'targets_literal' => 'ANNOTATION_CLASS',
+ 'targets' => Target::TARGET_CLASS,
+ 'default_property' => 'value',
+ 'attribute_types' => array(
+ 'value' => array(
+ 'required' => false,
+ 'type' =>'array',
+ 'array_type'=>'string',
+ 'value' =>'array'
+ )
+ ),
+ ),
+ 'Doctrine\Common\Annotations\Annotation\Attribute' => array(
+ 'is_annotation' => true,
+ 'has_constructor' => false,
+ 'targets_literal' => 'ANNOTATION_ANNOTATION',
+ 'targets' => Target::TARGET_ANNOTATION,
+ 'default_property' => 'name',
+ 'properties' => array(
+ 'name' => 'name',
+ 'type' => 'type',
+ 'required' => 'required'
+ ),
+ 'attribute_types' => array(
+ 'value' => array(
+ 'required' => true,
+ 'type' =>'string',
+ 'value' =>'string'
+ ),
+ 'type' => array(
+ 'required' =>true,
+ 'type' =>'string',
+ 'value' =>'string'
+ ),
+ 'required' => array(
+ 'required' =>false,
+ 'type' =>'boolean',
+ 'value' =>'boolean'
+ )
+ ),
+ ),
+ 'Doctrine\Common\Annotations\Annotation\Attributes' => array(
+ 'is_annotation' => true,
+ 'has_constructor' => false,
+ 'targets_literal' => 'ANNOTATION_CLASS',
+ 'targets' => Target::TARGET_CLASS,
+ 'default_property' => 'value',
+ 'properties' => array(
+ 'value' => 'value'
+ ),
+ 'attribute_types' => array(
+ 'value' => array(
+ 'type' =>'array',
+ 'required' =>true,
+ 'array_type'=>'Doctrine\Common\Annotations\Annotation\Attribute',
+ 'value' =>'array'
+ )
+ ),
+ ),
+ );
+
+ /**
+ * Hash-map for handle types declaration
+ *
+ * @var array
+ */
+ private static $typeMap = array(
+ 'float' => 'double',
+ 'bool' => 'boolean',
+ // allow uppercase Boolean in honor of George Boole
+ 'Boolean' => 'boolean',
+ 'int' => 'integer',
+ );
+
+ /**
+ * Constructs a new DocParser.
+ */
+ public function __construct()
+ {
+ $this->lexer = new DocLexer;
+ }
+
+ /**
+ * Sets the annotation names that are ignored during the parsing process.
+ *
+ * The names are supposed to be the raw names as used in the class, not the
+ * fully qualified class names.
+ *
+ * @param array $names
+ */
+ public function setIgnoredAnnotationNames(array $names)
+ {
+ $this->ignoredAnnotationNames = $names;
+ }
+
+ public function setIgnoreNotImportedAnnotations($bool)
+ {
+ $this->ignoreNotImportedAnnotations = (Boolean) $bool;
+ }
+
+ /**
+ * Sets the default namespaces.
+ * @param array $namespaces
+ */
+ public function addNamespace($namespace)
+ {
+ if ($this->imports) {
+ throw new \RuntimeException('You must either use addNamespace(), or setImports(), but not both.');
+ }
+ $this->namespaces[] = $namespace;
+ }
+
+ public function setImports(array $imports)
+ {
+ if ($this->namespaces) {
+ throw new \RuntimeException('You must either use addNamespace(), or setImports(), but not both.');
+ }
+ $this->imports = $imports;
+ }
+
+ /**
+ * Sets current target context as bitmask.
+ *
+ * @param integer $target
+ */
+ public function setTarget($target)
+ {
+ $this->target = $target;
+ }
+
+ /**
+ * Parses the given docblock string for annotations.
+ *
+ * @param string $input The docblock string to parse.
+ * @param string $context The parsing context.
+ * @return array Array of annotations. If no annotations are found, an empty array is returned.
+ */
+ public function parse($input, $context = '')
+ {
+ if (false === $pos = strpos($input, '@')) {
+ return array();
+ }
+
+ // also parse whatever character is before the @
+ if ($pos > 0) {
+ $pos -= 1;
+ }
+
+ $this->context = $context;
+ $this->lexer->setInput(trim(substr($input, $pos), '* /'));
+ $this->lexer->moveNext();
+
+ return $this->Annotations();
+ }
+
+ /**
+ * Attempts to match the given token with the current lookahead token.
+ * If they match, updates the lookahead token; otherwise raises a syntax error.
+ *
+ * @param int Token type.
+ * @return bool True if tokens match; false otherwise.
+ */
+ private function match($token)
+ {
+ if ( ! $this->lexer->isNextToken($token) ) {
+ $this->syntaxError($this->lexer->getLiteral($token));
+ }
+
+ return $this->lexer->moveNext();
+ }
+
+ /**
+ * Attempts to match the current lookahead token with any of the given tokens.
+ *
+ * If any of them matches, this method updates the lookahead token; otherwise
+ * a syntax error is raised.
+ *
+ * @param array $tokens
+ * @return bool
+ */
+ private function matchAny(array $tokens)
+ {
+ if ( ! $this->lexer->isNextTokenAny($tokens)) {
+ $this->syntaxError(implode(' or ', array_map(array($this->lexer, 'getLiteral'), $tokens)));
+ }
+
+ return $this->lexer->moveNext();
+ }
+
+ /**
+ * Generates a new syntax error.
+ *
+ * @param string $expected Expected string.
+ * @param array $token Optional token.
+ * @throws SyntaxException
+ */
+ private function syntaxError($expected, $token = null)
+ {
+ if ($token === null) {
+ $token = $this->lexer->lookahead;
+ }
+
+ $message = "Expected {$expected}, got ";
+
+ if ($this->lexer->lookahead === null) {
+ $message .= 'end of string';
+ } else {
+ $message .= "'{$token['value']}' at position {$token['position']}";
+ }
+
+ if (strlen($this->context)) {
+ $message .= ' in ' . $this->context;
+ }
+
+ $message .= '.';
+
+ throw AnnotationException::syntaxError($message);
+ }
+
+ /**
+ * Attempt to check if a class exists or not. This never goes through the PHP autoloading mechanism
+ * but uses the {@link AnnotationRegistry} to load classes.
+ *
+ * @param string $fqcn
+ * @return boolean
+ */
+ private function classExists($fqcn)
+ {
+ if (isset($this->classExists[$fqcn])) {
+ return $this->classExists[$fqcn];
+ }
+
+ // first check if the class already exists, maybe loaded through another AnnotationReader
+ if (class_exists($fqcn, false)) {
+ return $this->classExists[$fqcn] = true;
+ }
+
+ // final check, does this class exist?
+ return $this->classExists[$fqcn] = AnnotationRegistry::loadAnnotationClass($fqcn);
+ }
+
+ /**
+ * Collects parsing metadata for a given annotation class
+ *
+ * @param string $name The annotation name
+ */
+ private function collectAnnotationMetadata($name)
+ {
+ if (self::$metadataParser == null){
+ self::$metadataParser = new self();
+ self::$metadataParser->setTarget(Target::TARGET_CLASS);
+ self::$metadataParser->setIgnoreNotImportedAnnotations(true);
+ self::$metadataParser->setImports(array(
+ 'target' => 'Doctrine\Common\Annotations\Annotation\Target',
+ 'attribute' => 'Doctrine\Common\Annotations\Annotation\Attribute',
+ 'attributes' => 'Doctrine\Common\Annotations\Annotation\Attributes'
+ ));
+ AnnotationRegistry::registerFile(__DIR__ . '/Annotation/Target.php');
+ AnnotationRegistry::registerFile(__DIR__ . '/Annotation/Attribute.php');
+ AnnotationRegistry::registerFile(__DIR__ . '/Annotation/Attributes.php');
+ }
+
+ $class = new \ReflectionClass($name);
+ $docComment = $class->getDocComment();
+
+ // Sets default values for annotation metadata
+ $metadata = array(
+ 'default_property' => null,
+ 'has_constructor' => (null !== $constructor = $class->getConstructor()) && $constructor->getNumberOfParameters() > 0,
+ 'properties' => array(),
+ 'property_types' => array(),
+ 'attribute_types' => array(),
+ 'targets_literal' => null,
+ 'targets' => Target::TARGET_ALL,
+ 'is_annotation' => false !== strpos($docComment, '@Annotation'),
+ );
+
+ // verify that the class is really meant to be an annotation
+ if ($metadata['is_annotation']) {
+ foreach (self::$metadataParser->parse($docComment, 'class @' . $name) as $annotation) {
+ if ($annotation instanceof Target) {
+ $metadata['targets'] = $annotation->targets;
+ $metadata['targets_literal'] = $annotation->literal;
+
+ } elseif ($annotation instanceof Attributes) {
+ foreach ($annotation->value as $attrib) {
+ // handle internal type declaration
+ $type = isset(self::$typeMap[$attrib->type]) ? self::$typeMap[$attrib->type] : $attrib->type;
+
+ // handle the case if the property type is mixed
+ if ('mixed' !== $type) {
+ // Checks if the property has array
+ if (false !== $pos = strpos($type, '<')) {
+ $arrayType = substr($type, $pos+1, -1);
+ $type = 'array';
+
+ if (isset(self::$typeMap[$arrayType])) {
+ $arrayType = self::$typeMap[$arrayType];
+ }
+
+ $metadata['attribute_types'][$attrib->name]['array_type'] = $arrayType;
+ }
+
+ $metadata['attribute_types'][$attrib->name]['type'] = $type;
+ $metadata['attribute_types'][$attrib->name]['value'] = $attrib->type;
+ $metadata['attribute_types'][$attrib->name]['required'] = $attrib->required;
+ }
+ }
+ }
+ }
+
+ // if not has a constructor will inject values into public properties
+ if (false === $metadata['has_constructor']) {
+ // collect all public properties
+ foreach ($class->getProperties(\ReflectionProperty::IS_PUBLIC) as $property) {
+ $metadata['properties'][$property->name] = $property->name;
+
+ // checks if the property has @var annotation
+ if ((false !== $propertyComment = $property->getDocComment())
+ && false !== strpos($propertyComment, '@var')
+ && preg_match('/@var\s+([^\s]+)/',$propertyComment, $matches)) {
+ // literal type declaration
+ $value = $matches[1];
+
+ // handle internal type declaration
+ $type = isset(self::$typeMap[$value]) ? self::$typeMap[$value] : $value;
+
+ // handle the case if the property type is mixed
+ if ('mixed' !== $type) {
+ // Checks if the property has @var array annotation
+ if (false !== $pos = strpos($type, '<')) {
+ $arrayType = substr($type, $pos+1, -1);
+ $type = 'array';
+
+ if (isset(self::$typeMap[$arrayType])) {
+ $arrayType = self::$typeMap[$arrayType];
+ }
+
+ $metadata['attribute_types'][$property->name]['array_type'] = $arrayType;
+ }
+
+ $metadata['attribute_types'][$property->name]['type'] = $type;
+ $metadata['attribute_types'][$property->name]['value'] = $value;
+ $metadata['attribute_types'][$property->name]['required'] = false !== strpos($propertyComment, '@Required');
+ }
+ }
+ }
+
+ // choose the first property as default property
+ $metadata['default_property'] = reset($metadata['properties']);
+ }
+ }
+
+ self::$annotationMetadata[$name] = $metadata;
+ }
+
+ /**
+ * Annotations ::= Annotation {[ "*" ]* [Annotation]}*
+ *
+ * @return array
+ */
+ private function Annotations()
+ {
+ $annotations = array();
+
+ while (null !== $this->lexer->lookahead) {
+ if (DocLexer::T_AT !== $this->lexer->lookahead['type']) {
+ $this->lexer->moveNext();
+ continue;
+ }
+
+ // make sure the @ is preceded by non-catchable pattern
+ if (null !== $this->lexer->token && $this->lexer->lookahead['position'] === $this->lexer->token['position'] + strlen($this->lexer->token['value'])) {
+ $this->lexer->moveNext();
+ continue;
+ }
+
+ // make sure the @ is followed by either a namespace separator, or
+ // an identifier token
+ if ((null === $peek = $this->lexer->glimpse())
+ || (DocLexer::T_NAMESPACE_SEPARATOR !== $peek['type'] && !in_array($peek['type'], self::$classIdentifiers, true))
+ || $peek['position'] !== $this->lexer->lookahead['position'] + 1) {
+ $this->lexer->moveNext();
+ continue;
+ }
+
+ $this->isNestedAnnotation = false;
+ if (false !== $annot = $this->Annotation()) {
+ $annotations[] = $annot;
+ }
+ }
+
+ return $annotations;
+ }
+
+ /**
+ * Annotation ::= "@" AnnotationName ["(" [Values] ")"]
+ * AnnotationName ::= QualifiedName | SimpleName
+ * QualifiedName ::= NameSpacePart "\" {NameSpacePart "\"}* SimpleName
+ * NameSpacePart ::= identifier | null | false | true
+ * SimpleName ::= identifier | null | false | true
+ *
+ * @return mixed False if it is not a valid annotation.
+ */
+ private function Annotation()
+ {
+ $this->match(DocLexer::T_AT);
+
+ // check if we have an annotation
+ if ($this->lexer->isNextTokenAny(self::$classIdentifiers)) {
+ $this->lexer->moveNext();
+ $name = $this->lexer->token['value'];
+ } else if ($this->lexer->isNextToken(DocLexer::T_NAMESPACE_SEPARATOR)) {
+ $name = '';
+ } else {
+ $this->syntaxError('namespace separator or identifier');
+ }
+
+ while ($this->lexer->lookahead['position'] === $this->lexer->token['position'] + strlen($this->lexer->token['value']) && $this->lexer->isNextToken(DocLexer::T_NAMESPACE_SEPARATOR)) {
+ $this->match(DocLexer::T_NAMESPACE_SEPARATOR);
+ $this->matchAny(self::$classIdentifiers);
+ $name .= '\\'.$this->lexer->token['value'];
+ }
+
+ // only process names which are not fully qualified, yet
+ // fully qualified names must start with a \
+ $originalName = $name;
+ if ('\\' !== $name[0]) {
+ $alias = (false === $pos = strpos($name, '\\'))? $name : substr($name, 0, $pos);
+
+ $found = false;
+ if ($this->namespaces) {
+ foreach ($this->namespaces as $namespace) {
+ if ($this->classExists($namespace.'\\'.$name)) {
+ $name = $namespace.'\\'.$name;
+ $found = true;
+ break;
+ }
+ }
+ } elseif (isset($this->imports[$loweredAlias = strtolower($alias)])) {
+ if (false !== $pos) {
+ $name = $this->imports[$loweredAlias].substr($name, $pos);
+ } else {
+ $name = $this->imports[$loweredAlias];
+ }
+ $found = true;
+ } elseif (isset($this->imports['__NAMESPACE__']) && $this->classExists($this->imports['__NAMESPACE__'].'\\'.$name)) {
+ $name = $this->imports['__NAMESPACE__'].'\\'.$name;
+ $found = true;
+ } elseif ($this->classExists($name)) {
+ $found = true;
+ }
+
+ if (!$found) {
+ if ($this->ignoreNotImportedAnnotations || isset($this->ignoredAnnotationNames[$name])) {
+ return false;
+ }
+
+ throw AnnotationException::semanticalError(sprintf('The annotation "@%s" in %s was never imported. Did you maybe forget to add a "use" statement for this annotation?', $name, $this->context));
+ }
+ }
+
+ if (!$this->classExists($name)) {
+ throw AnnotationException::semanticalError(sprintf('The annotation "@%s" in %s does not exist, or could not be auto-loaded.', $name, $this->context));
+ }
+
+ // at this point, $name contains the fully qualified class name of the
+ // annotation, and it is also guaranteed that this class exists, and
+ // that it is loaded
+
+
+ // collects the metadata annotation only if there is not yet
+ if (!isset(self::$annotationMetadata[$name])) {
+ $this->collectAnnotationMetadata($name);
+ }
+
+ // verify that the class is really meant to be an annotation and not just any ordinary class
+ if (self::$annotationMetadata[$name]['is_annotation'] === false) {
+ if (isset($this->ignoredAnnotationNames[$originalName])) {
+ return false;
+ }
+
+ throw AnnotationException::semanticalError(sprintf('The class "%s" is not annotated with @Annotation. Are you sure this class can be used as annotation? If so, then you need to add @Annotation to the _class_ doc comment of "%s". If it is indeed no annotation, then you need to add @IgnoreAnnotation("%s") to the _class_ doc comment of %s.', $name, $name, $originalName, $this->context));
+ }
+
+ //if target is nested annotation
+ $target = $this->isNestedAnnotation ? Target::TARGET_ANNOTATION : $this->target;
+
+ // Next will be nested
+ $this->isNestedAnnotation = true;
+
+ //if annotation does not support current target
+ if (0 === (self::$annotationMetadata[$name]['targets'] & $target) && $target) {
+ throw AnnotationException::semanticalError(
+ sprintf('Annotation @%s is not allowed to be declared on %s. You may only use this annotation on these code elements: %s.',
+ $originalName, $this->context, self::$annotationMetadata[$name]['targets_literal'])
+ );
+ }
+
+ $values = array();
+ if ($this->lexer->isNextToken(DocLexer::T_OPEN_PARENTHESIS)) {
+ $this->match(DocLexer::T_OPEN_PARENTHESIS);
+
+ if ( ! $this->lexer->isNextToken(DocLexer::T_CLOSE_PARENTHESIS)) {
+ $values = $this->Values();
+ }
+
+ $this->match(DocLexer::T_CLOSE_PARENTHESIS);
+ }
+
+ // checks all declared attributes
+ foreach (self::$annotationMetadata[$name]['attribute_types'] as $property => $type) {
+ if ($property === self::$annotationMetadata[$name]['default_property']
+ && !isset($values[$property]) && isset($values['value'])) {
+ $property = 'value';
+ }
+
+ // handle a not given attribute or null value
+ if (!isset($values[$property])) {
+ if ($type['required']) {
+ throw AnnotationException::requiredError($property, $originalName, $this->context, 'a(n) '.$type['value']);
+ }
+
+ continue;
+ }
+
+ if ($type['type'] === 'array') {
+ // handle the case of a single value
+ if (!is_array($values[$property])) {
+ $values[$property] = array($values[$property]);
+ }
+
+ // checks if the attribute has array type declaration, such as "array"
+ if (isset($type['array_type'])) {
+ foreach ($values[$property] as $item) {
+ if (gettype($item) !== $type['array_type'] && !$item instanceof $type['array_type']) {
+ throw AnnotationException::typeError($property, $originalName, $this->context, 'either a(n) '.$type['array_type'].', or an array of '.$type['array_type'].'s', $item);
+ }
+ }
+ }
+ } elseif (gettype($values[$property]) !== $type['type'] && !$values[$property] instanceof $type['type']) {
+ throw AnnotationException::typeError($property, $originalName, $this->context, 'a(n) '.$type['value'], $values[$property]);
+ }
+ }
+
+ // check if the annotation expects values via the constructor,
+ // or directly injected into public properties
+ if (self::$annotationMetadata[$name]['has_constructor'] === true) {
+ return new $name($values);
+ }
+
+ $instance = new $name();
+ foreach ($values as $property => $value) {
+ if (!isset(self::$annotationMetadata[$name]['properties'][$property])) {
+ if ('value' !== $property) {
+ throw AnnotationException::creationError(sprintf('The annotation @%s declared on %s does not have a property named "%s". Available properties: %s', $originalName, $this->context, $property, implode(', ', self::$annotationMetadata[$name]['properties'])));
+ }
+
+ // handle the case if the property has no annotations
+ if (!$property = self::$annotationMetadata[$name]['default_property']) {
+ throw AnnotationException::creationError(sprintf('The annotation @%s declared on %s does not accept any values, but got %s.', $originalName, $this->context, json_encode($values)));
+ }
+ }
+
+ $instance->{$property} = $value;
+ }
+
+ return $instance;
+ }
+
+ /**
+ * Values ::= Array | Value {"," Value}*
+ *
+ * @return array
+ */
+ private function Values()
+ {
+ $values = array();
+
+ // Handle the case of a single array as value, i.e. @Foo({....})
+ if ($this->lexer->isNextToken(DocLexer::T_OPEN_CURLY_BRACES)) {
+ $values['value'] = $this->Value();
+ return $values;
+ }
+
+ $values[] = $this->Value();
+
+ while ($this->lexer->isNextToken(DocLexer::T_COMMA)) {
+ $this->match(DocLexer::T_COMMA);
+ $token = $this->lexer->lookahead;
+ $value = $this->Value();
+
+ if ( ! is_object($value) && ! is_array($value)) {
+ $this->syntaxError('Value', $token);
+ }
+
+ $values[] = $value;
+ }
+
+ foreach ($values as $k => $value) {
+ if (is_object($value) && $value instanceof \stdClass) {
+ $values[$value->name] = $value->value;
+ } else if ( ! isset($values['value'])){
+ $values['value'] = $value;
+ } else {
+ if ( ! is_array($values['value'])) {
+ $values['value'] = array($values['value']);
+ }
+
+ $values['value'][] = $value;
+ }
+
+ unset($values[$k]);
+ }
+
+ return $values;
+ }
+
+ /**
+ * Value ::= PlainValue | FieldAssignment
+ *
+ * @return mixed
+ */
+ private function Value()
+ {
+ $peek = $this->lexer->glimpse();
+
+ if (DocLexer::T_EQUALS === $peek['type']) {
+ return $this->FieldAssignment();
+ }
+
+ return $this->PlainValue();
+ }
+
+ /**
+ * PlainValue ::= integer | string | float | boolean | Array | Annotation
+ *
+ * @return mixed
+ */
+ private function PlainValue()
+ {
+ if ($this->lexer->isNextToken(DocLexer::T_OPEN_CURLY_BRACES)) {
+ return $this->Arrayx();
+ }
+
+ if ($this->lexer->isNextToken(DocLexer::T_AT)) {
+ return $this->Annotation();
+ }
+
+ switch ($this->lexer->lookahead['type']) {
+ case DocLexer::T_STRING:
+ $this->match(DocLexer::T_STRING);
+ return $this->lexer->token['value'];
+
+ case DocLexer::T_INTEGER:
+ $this->match(DocLexer::T_INTEGER);
+ return (int)$this->lexer->token['value'];
+
+ case DocLexer::T_FLOAT:
+ $this->match(DocLexer::T_FLOAT);
+ return (float)$this->lexer->token['value'];
+
+ case DocLexer::T_TRUE:
+ $this->match(DocLexer::T_TRUE);
+ return true;
+
+ case DocLexer::T_FALSE:
+ $this->match(DocLexer::T_FALSE);
+ return false;
+
+ case DocLexer::T_NULL:
+ $this->match(DocLexer::T_NULL);
+ return null;
+
+ default:
+ $this->syntaxError('PlainValue');
+ }
+ }
+
+ /**
+ * FieldAssignment ::= FieldName "=" PlainValue
+ * FieldName ::= identifier
+ *
+ * @return array
+ */
+ private function FieldAssignment()
+ {
+ $this->match(DocLexer::T_IDENTIFIER);
+ $fieldName = $this->lexer->token['value'];
+
+ $this->match(DocLexer::T_EQUALS);
+
+ $item = new \stdClass();
+ $item->name = $fieldName;
+ $item->value = $this->PlainValue();
+
+ return $item;
+ }
+
+ /**
+ * Array ::= "{" ArrayEntry {"," ArrayEntry}* [","] "}"
+ *
+ * @return array
+ */
+ private function Arrayx()
+ {
+ $array = $values = array();
+
+ $this->match(DocLexer::T_OPEN_CURLY_BRACES);
+ $values[] = $this->ArrayEntry();
+
+ while ($this->lexer->isNextToken(DocLexer::T_COMMA)) {
+ $this->match(DocLexer::T_COMMA);
+
+ // optional trailing comma
+ if ($this->lexer->isNextToken(DocLexer::T_CLOSE_CURLY_BRACES)) {
+ break;
+ }
+
+ $values[] = $this->ArrayEntry();
+ }
+
+ $this->match(DocLexer::T_CLOSE_CURLY_BRACES);
+
+ foreach ($values as $value) {
+ list ($key, $val) = $value;
+
+ if ($key !== null) {
+ $array[$key] = $val;
+ } else {
+ $array[] = $val;
+ }
+ }
+
+ return $array;
+ }
+
+ /**
+ * ArrayEntry ::= Value | KeyValuePair
+ * KeyValuePair ::= Key ("=" | ":") PlainValue
+ * Key ::= string | integer
+ *
+ * @return array
+ */
+ private function ArrayEntry()
+ {
+ $peek = $this->lexer->glimpse();
+
+ if (DocLexer::T_EQUALS === $peek['type']
+ || DocLexer::T_COLON === $peek['type']) {
+ $this->matchAny(array(DocLexer::T_INTEGER, DocLexer::T_STRING));
+
+ $key = $this->lexer->token['value'];
+ $this->matchAny(array(DocLexer::T_EQUALS, DocLexer::T_COLON));
+
+ return array($key, $this->PlainValue());
+ }
+
+ return array(null, $this->Value());
+ }
+}
\ No newline at end of file
diff --git a/vendor/doctrine/common/lib/Doctrine/Common/Annotations/FileCacheReader.php b/vendor/doctrine/common/lib/Doctrine/Common/Annotations/FileCacheReader.php
new file mode 100644
index 0000000..4a42b58
--- /dev/null
+++ b/vendor/doctrine/common/lib/Doctrine/Common/Annotations/FileCacheReader.php
@@ -0,0 +1,209 @@
+.
+ */
+
+namespace Doctrine\Common\Annotations;
+
+
+/**
+ * File cache reader for annotations.
+ *
+ * @author Johannes M. Schmitt
+ * @author Benjamin Eberlei
+ */
+class FileCacheReader implements Reader
+{
+ /**
+ * @var Reader
+ */
+ private $reader;
+ private $dir;
+ private $debug;
+ private $loadedAnnotations = array();
+
+ public function __construct(Reader $reader, $cacheDir, $debug = false)
+ {
+ $this->reader = $reader;
+ if (!is_dir($cacheDir) && !@mkdir($cacheDir, 0777, true)) {
+ throw new \InvalidArgumentException(sprintf('The directory "%s" does not exist and could not be created.', $cacheDir));
+ }
+ if (!is_writable($cacheDir)) {
+ throw new \InvalidArgumentException(sprintf('The directory "%s" is not writable. Both, the webserver and the console user need access. You can manage access rights for multiple users with "chmod +a". If your system does not support this, check out the acl package.', $cacheDir));
+ }
+
+ $this->dir = rtrim($cacheDir, '\\/');
+ $this->debug = $debug;
+ }
+
+ public function getClassAnnotations(\ReflectionClass $class)
+ {
+ $key = $class->getName();
+
+ if (isset($this->loadedAnnotations[$key])) {
+ return $this->loadedAnnotations[$key];
+ }
+
+ $path = $this->dir.'/'.strtr($key, '\\', '-').'.cache.php';
+ if (!file_exists($path)) {
+ $annot = $this->reader->getClassAnnotations($class);
+ $this->saveCacheFile($path, $annot);
+ return $this->loadedAnnotations[$key] = $annot;
+ }
+
+ if ($this->debug
+ && (false !== $filename = $class->getFilename())
+ && filemtime($path) < filemtime($filename)) {
+ @unlink($path);
+
+ $annot = $this->reader->getClassAnnotations($class);
+ $this->saveCacheFile($path, $annot);
+ return $this->loadedAnnotations[$key] = $annot;
+ }
+
+ return $this->loadedAnnotations[$key] = include $path;
+ }
+
+ public function getPropertyAnnotations(\ReflectionProperty $property)
+ {
+ $class = $property->getDeclaringClass();
+ $key = $class->getName().'$'.$property->getName();
+
+ if (isset($this->loadedAnnotations[$key])) {
+ return $this->loadedAnnotations[$key];
+ }
+
+ $path = $this->dir.'/'.strtr($key, '\\', '-').'.cache.php';
+ if (!file_exists($path)) {
+ $annot = $this->reader->getPropertyAnnotations($property);
+ $this->saveCacheFile($path, $annot);
+ return $this->loadedAnnotations[$key] = $annot;
+ }
+
+ if ($this->debug
+ && (false !== $filename = $class->getFilename())
+ && filemtime($path) < filemtime($filename)) {
+ unlink($path);
+
+ $annot = $this->reader->getPropertyAnnotations($property);
+ $this->saveCacheFile($path, $annot);
+ return $this->loadedAnnotations[$key] = $annot;
+ }
+
+ return $this->loadedAnnotations[$key] = include $path;
+ }
+
+ public function getMethodAnnotations(\ReflectionMethod $method)
+ {
+ $class = $method->getDeclaringClass();
+ $key = $class->getName().'#'.$method->getName();
+
+ if (isset($this->loadedAnnotations[$key])) {
+ return $this->loadedAnnotations[$key];
+ }
+
+ $path = $this->dir.'/'.strtr($key, '\\', '-').'.cache.php';
+ if (!file_exists($path)) {
+ $annot = $this->reader->getMethodAnnotations($method);
+ $this->saveCacheFile($path, $annot);
+ return $this->loadedAnnotations[$key] = $annot;
+ }
+
+ if ($this->debug
+ && (false !== $filename = $class->getFilename())
+ && filemtime($path) < filemtime($filename)) {
+ unlink($path);
+
+ $annot = $this->reader->getMethodAnnotations($method);
+ $this->saveCacheFile($path, $annot);
+ return $this->loadedAnnotations[$key] = $annot;
+ }
+
+ return $this->loadedAnnotations[$key] = include $path;
+ }
+
+ private function saveCacheFile($path, $data)
+ {
+ file_put_contents($path, 'getClassAnnotations($class);
+
+ foreach ($annotations as $annotation) {
+ if ($annotation instanceof $annotationName) {
+ return $annotation;
+ }
+ }
+
+ return null;
+ }
+
+ /**
+ * Gets a method annotation.
+ *
+ * @param ReflectionMethod $method
+ * @param string $annotationName The name of the annotation.
+ * @return The Annotation or NULL, if the requested annotation does not exist.
+ */
+ public function getMethodAnnotation(\ReflectionMethod $method, $annotationName)
+ {
+ $annotations = $this->getMethodAnnotations($method);
+
+ foreach ($annotations as $annotation) {
+ if ($annotation instanceof $annotationName) {
+ return $annotation;
+ }
+ }
+
+ return null;
+ }
+
+ /**
+ * Gets a property annotation.
+ *
+ * @param ReflectionProperty $property
+ * @param string $annotationName The name of the annotation.
+ * @return The Annotation or NULL, if the requested annotation does not exist.
+ */
+ public function getPropertyAnnotation(\ReflectionProperty $property, $annotationName)
+ {
+ $annotations = $this->getPropertyAnnotations($property);
+
+ foreach ($annotations as $annotation) {
+ if ($annotation instanceof $annotationName) {
+ return $annotation;
+ }
+ }
+
+ return null;
+ }
+
+ public function clearLoadedAnnotations()
+ {
+ $this->loadedAnnotations = array();
+ }
+}
\ No newline at end of file
diff --git a/vendor/doctrine/common/lib/Doctrine/Common/Annotations/IndexedReader.php b/vendor/doctrine/common/lib/Doctrine/Common/Annotations/IndexedReader.php
new file mode 100644
index 0000000..1eea492
--- /dev/null
+++ b/vendor/doctrine/common/lib/Doctrine/Common/Annotations/IndexedReader.php
@@ -0,0 +1,94 @@
+.
+ */
+
+namespace Doctrine\Common\Annotations;
+
+use Doctrine\Common\Annotations\Reader;
+
+/**
+ * Allows the reader to be used in-place of Doctrine's reader.
+ *
+ * @author Johannes M. Schmitt
+ */
+class IndexedReader implements Reader
+{
+ private $delegate;
+
+ public function __construct(Reader $reader)
+ {
+ $this->delegate = $reader;
+ }
+
+ public function getClassAnnotations(\ReflectionClass $class)
+ {
+ $annotations = array();
+ foreach ($this->delegate->getClassAnnotations($class) as $annot) {
+ $annotations[get_class($annot)] = $annot;
+ }
+
+ return $annotations;
+ }
+
+ public function getClassAnnotation(\ReflectionClass $class, $annotation)
+ {
+ return $this->delegate->getClassAnnotation($class, $annotation);
+ }
+
+ public function getMethodAnnotations(\ReflectionMethod $method)
+ {
+ $annotations = array();
+ foreach ($this->delegate->getMethodAnnotations($method) as $annot) {
+ $annotations[get_class($annot)] = $annot;
+ }
+
+ return $annotations;
+ }
+
+ public function getMethodAnnotation(\ReflectionMethod $method, $annotation)
+ {
+ return $this->delegate->getMethodAnnotation($method, $annotation);
+ }
+
+ public function getPropertyAnnotations(\ReflectionProperty $property)
+ {
+ $annotations = array();
+ foreach ($this->delegate->getPropertyAnnotations($property) as $annot) {
+ $annotations[get_class($annot)] = $annot;
+ }
+
+ return $annotations;
+ }
+
+ public function getPropertyAnnotation(\ReflectionProperty $property, $annotation)
+ {
+ return $this->delegate->getPropertyAnnotation($property, $annotation);
+ }
+
+ /**
+ * Proxy all methods to the delegate.
+ *
+ * @param type $method
+ * @param type $args
+ * @return type
+ */
+ public function __call($method, $args)
+ {
+ return call_user_func_array(array($this->delegate, $method), $args);
+ }
+}
\ No newline at end of file
diff --git a/vendor/doctrine/common/lib/Doctrine/Common/Annotations/PhpParser.php b/vendor/doctrine/common/lib/Doctrine/Common/Annotations/PhpParser.php
new file mode 100644
index 0000000..a14f8f5
--- /dev/null
+++ b/vendor/doctrine/common/lib/Doctrine/Common/Annotations/PhpParser.php
@@ -0,0 +1,203 @@
+.
+ */
+
+namespace Doctrine\Common\Annotations;
+
+use SplFileObject;
+
+/**
+ * Parses a file for namespaces/use/class declarations.
+ *
+ * @author Fabien Potencier
+ * @author Christian Kaps
+ */
+final class PhpParser
+{
+ /**
+ * The token list.
+ *
+ * @var array
+ */
+ private $tokens;
+
+ /**
+ * The number of tokens.
+ *
+ * @var int
+ */
+ private $numTokens = 0;
+
+ /**
+ * The current array pointer.
+ *
+ * @var int
+ */
+ private $pointer = 0;
+
+ /**
+ * Parses a class.
+ *
+ * @param \ReflectionClass $class A ReflectionClass object.
+ * @return array A list with use statements in the form (Alias => FQN).
+ */
+ public function parseClass(\ReflectionClass $class)
+ {
+ if (false === $filename = $class->getFilename()) {
+ return array();
+ }
+
+ $content = $this->getFileContent($filename, $class->getStartLine());
+ $namespace = str_replace('\\', '\\\\', $class->getNamespaceName());
+ $content = preg_replace('/^.*?(\bnamespace\s+' . $namespace . '\s*[;{].*)$/s', '\\1', $content);
+ $this->tokens = token_get_all('numTokens = count($this->tokens);
+ $this->pointer = 0;
+
+ $statements = $this->parseUseStatements($class->getNamespaceName());
+
+ return $statements;
+ }
+
+ /**
+ * Get the content of the file right up to the given line number.
+ *
+ * @param string $filename The name of the file to load.
+ * @param int $lineNumber The number of lines to read from file.
+ * @return string The content of the file.
+ */
+ private function getFileContent($filename, $lineNumber)
+ {
+ $content = '';
+ $lineCnt = 0;
+ $file = new SplFileObject($filename);
+ while(!$file->eof()) {
+ if ($lineCnt++ == $lineNumber) {
+ break;
+ }
+
+ $content .= $file->fgets();
+ }
+
+ return $content;
+ }
+
+ /**
+ * Gets the next non whitespace and non comment token.
+ *
+ * @return array The token if exists, null otherwise.
+ */
+ private function next()
+ {
+ for ($i = $this->pointer; $i < $this->numTokens; $i++) {
+ $this->pointer++;
+ if ($this->tokens[$i][0] === T_WHITESPACE ||
+ $this->tokens[$i][0] === T_COMMENT ||
+ $this->tokens[$i][0] === T_DOC_COMMENT) {
+
+ continue;
+ }
+
+ return $this->tokens[$i];
+ }
+
+ return null;
+ }
+
+ /**
+ * Get all use statements.
+ *
+ * @param string $namespaceName The namespace name of the reflected class.
+ * @return array A list with all found use statements.
+ */
+ private function parseUseStatements($namespaceName)
+ {
+ $statements = array();
+ while (($token = $this->next())) {
+ if ($token[0] === T_USE) {
+ $statements = array_merge($statements, $this->parseUseStatement());
+ continue;
+ } else if ($token[0] !== T_NAMESPACE || $this->parseNamespace() != $namespaceName) {
+ continue;
+ }
+
+ // Get fresh array for new namespace. This is to prevent the parser to collect the use statements
+ // for a previous namespace with the same name. This is the case if a namespace is defined twice
+ // or if a namespace with the same name is commented out.
+ $statements = array();
+ }
+
+ return $statements;
+ }
+
+ /**
+ * Get the namespace name.
+ *
+ * @return string The found namespace name.
+ */
+ private function parseNamespace()
+ {
+ $namespace = '';
+ while (($token = $this->next())){
+ if ($token[0] === T_STRING || $token[0] === T_NS_SEPARATOR) {
+ $namespace .= $token[1];
+ } else {
+ break;
+ }
+ }
+
+ return $namespace;
+ }
+
+ /**
+ * Parse a single use statement.
+ *
+ * @return array A list with all found class names for a use statement.
+ */
+ private function parseUseStatement()
+ {
+ $class = '';
+ $alias = '';
+ $statements = array();
+ $explicitAlias = false;
+ while (($token = $this->next())) {
+ $isNameToken = $token[0] === T_STRING || $token[0] === T_NS_SEPARATOR;
+ if (!$explicitAlias && $isNameToken) {
+ $class .= $token[1];
+ $alias = $token[1];
+ } else if ($explicitAlias && $isNameToken) {
+ $alias .= $token[1];
+ } else if ($token[0] === T_AS) {
+ $explicitAlias = true;
+ $alias = '';
+ } else if ($token === ',') {
+ $statements[strtolower($alias)] = $class;
+ $class = '';
+ $alias = '';
+ $explicitAlias = false;
+ } else if ($token === ';') {
+ $statements[strtolower($alias)] = $class;
+ break;
+ } else {
+ break;
+ }
+ }
+
+ return $statements;
+ }
+}
\ No newline at end of file
diff --git a/vendor/doctrine/common/lib/Doctrine/Common/Annotations/Reader.php b/vendor/doctrine/common/lib/Doctrine/Common/Annotations/Reader.php
new file mode 100644
index 0000000..8e85d39
--- /dev/null
+++ b/vendor/doctrine/common/lib/Doctrine/Common/Annotations/Reader.php
@@ -0,0 +1,35 @@
+.
+ */
+
+namespace Doctrine\Common\Annotations;
+
+/**
+ * Interface for annotation readers.
+ *
+ * @author Johannes M. Schmitt
+ */
+interface Reader
+{
+ function getClassAnnotations(\ReflectionClass $class);
+ function getClassAnnotation(\ReflectionClass $class, $annotationName);
+ function getMethodAnnotations(\ReflectionMethod $method);
+ function getMethodAnnotation(\ReflectionMethod $method, $annotationName);
+ function getPropertyAnnotations(\ReflectionProperty $property);
+ function getPropertyAnnotation(\ReflectionProperty $property, $annotationName);
+}
\ No newline at end of file
diff --git a/vendor/doctrine/common/lib/Doctrine/Common/Annotations/SimpleAnnotationReader.php b/vendor/doctrine/common/lib/Doctrine/Common/Annotations/SimpleAnnotationReader.php
new file mode 100644
index 0000000..a13c7fa
--- /dev/null
+++ b/vendor/doctrine/common/lib/Doctrine/Common/Annotations/SimpleAnnotationReader.php
@@ -0,0 +1,152 @@
+.
+ */
+
+namespace Doctrine\Common\Annotations;
+
+use Doctrine\Common\Annotations\Annotation\Target;
+
+/**
+ * Simple Annotation Reader.
+ *
+ * This annotation reader is intended to be used in projects where you have
+ * full-control over all annotations that are available.
+ *
+ * @since 2.2
+ * @author Johannes M. Schmitt
+ * @author Fabio B. Silva
+ */
+class SimpleAnnotationReader implements Reader
+{
+ /**
+ * @var DocParser
+ */
+ private $parser;
+
+ /**
+ * Constructor.
+ *
+ * Initializes a new SimpleAnnotationReader.
+ */
+ public function __construct()
+ {
+ $this->parser = new DocParser();
+ $this->parser->setIgnoreNotImportedAnnotations(true);
+ }
+
+ /**
+ * Adds a namespace in which we will look for annotations.
+ *
+ * @param string $namespace
+ */
+ public function addNamespace($namespace)
+ {
+ $this->parser->addNamespace($namespace);
+ }
+
+ /**
+ * Gets the annotations applied to a class.
+ *
+ * @param ReflectionClass $class The ReflectionClass of the class from which
+ * the class annotations should be read.
+ * @return array An array of Annotations.
+ */
+ public function getClassAnnotations(\ReflectionClass $class)
+ {
+ return $this->parser->parse($class->getDocComment(), 'class '.$class->getName());
+ }
+
+ /**
+ * Gets the annotations applied to a method.
+ *
+ * @param ReflectionMethod $property The ReflectionMethod of the method from which
+ * the annotations should be read.
+ * @return array An array of Annotations.
+ */
+ public function getMethodAnnotations(\ReflectionMethod $method)
+ {
+ return $this->parser->parse($method->getDocComment(), 'method '.$method->getDeclaringClass()->name.'::'.$method->getName().'()');
+ }
+
+ /**
+ * Gets the annotations applied to a property.
+ *
+ * @param ReflectionProperty $property The ReflectionProperty of the property
+ * from which the annotations should be read.
+ * @return array An array of Annotations.
+ */
+ public function getPropertyAnnotations(\ReflectionProperty $property)
+ {
+ return $this->parser->parse($property->getDocComment(), 'property '.$property->getDeclaringClass()->name.'::$'.$property->getName());
+ }
+
+ /**
+ * Gets a class annotation.
+ *
+ * @param ReflectionClass $class The ReflectionClass of the class from which
+ * the class annotations should be read.
+ * @param string $annotationName The name of the annotation.
+ * @return The Annotation or NULL, if the requested annotation does not exist.
+ */
+ public function getClassAnnotation(\ReflectionClass $class, $annotationName)
+ {
+ foreach ($this->getClassAnnotations($class) as $annot) {
+ if ($annot instanceof $annotationName) {
+ return $annot;
+ }
+ }
+
+ return null;
+ }
+
+ /**
+ * Gets a method annotation.
+ *
+ * @param ReflectionMethod $method
+ * @param string $annotationName The name of the annotation.
+ * @return The Annotation or NULL, if the requested annotation does not exist.
+ */
+ public function getMethodAnnotation(\ReflectionMethod $method, $annotationName)
+ {
+ foreach ($this->getMethodAnnotations($method) as $annot) {
+ if ($annot instanceof $annotationName) {
+ return $annot;
+ }
+ }
+
+ return null;
+ }
+
+ /**
+ * Gets a property annotation.
+ *
+ * @param ReflectionProperty $property
+ * @param string $annotationName The name of the annotation.
+ * @return The Annotation or NULL, if the requested annotation does not exist.
+ */
+ public function getPropertyAnnotation(\ReflectionProperty $property, $annotationName)
+ {
+ foreach ($this->getPropertyAnnotations($property) as $annot) {
+ if ($annot instanceof $annotationName) {
+ return $annot;
+ }
+ }
+
+ return null;
+ }
+}
\ No newline at end of file
diff --git a/vendor/doctrine/common/lib/Doctrine/Common/Cache/ApcCache.php b/vendor/doctrine/common/lib/Doctrine/Common/Cache/ApcCache.php
new file mode 100644
index 0000000..a59296f
--- /dev/null
+++ b/vendor/doctrine/common/lib/Doctrine/Common/Cache/ApcCache.php
@@ -0,0 +1,97 @@
+.
+ */
+
+namespace Doctrine\Common\Cache;
+
+/**
+ * APC cache provider.
+ *
+ * @license http://www.opensource.org/licenses/lgpl-license.php LGPL
+ * @link www.doctrine-project.org
+ * @since 2.0
+ * @author Benjamin Eberlei
+ * @author Guilherme Blanco
+ * @author Jonathan Wage
+ * @author Roman Borschel
+ * @author David Abdemoulaie
+ */
+class ApcCache extends CacheProvider
+{
+ /**
+ * {@inheritdoc}
+ */
+ protected function doFetch($id)
+ {
+ return apc_fetch($id);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function doContains($id)
+ {
+ $found = false;
+
+ apc_fetch($id, $found);
+
+ return $found;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function doSave($id, $data, $lifeTime = 0)
+ {
+ return (bool) apc_store($id, $data, (int) $lifeTime);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function doDelete($id)
+ {
+ return apc_delete($id);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function doFlush()
+ {
+ return apc_clear_cache() && apc_clear_cache('user');
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function doGetStats()
+ {
+ $info = apc_cache_info();
+ $sma = apc_sma_info();
+
+ return array(
+ Cache::STATS_HITS => $info['num_hits'],
+ Cache::STATS_MISSES => $info['num_misses'],
+ Cache::STATS_UPTIME => $info['start_time'],
+ Cache::STATS_MEMORY_USAGE => $info['mem_size'],
+ Cache::STATS_MEMORY_AVAILIABLE => $sma['avail_mem'],
+ );
+ }
+}
\ No newline at end of file
diff --git a/vendor/doctrine/common/lib/Doctrine/Common/Cache/ArrayCache.php b/vendor/doctrine/common/lib/Doctrine/Common/Cache/ArrayCache.php
new file mode 100644
index 0000000..8a0b982
--- /dev/null
+++ b/vendor/doctrine/common/lib/Doctrine/Common/Cache/ArrayCache.php
@@ -0,0 +1,96 @@
+.
+ */
+
+namespace Doctrine\Common\Cache;
+
+/**
+ * Array cache driver.
+ *
+ * @license http://www.opensource.org/licenses/lgpl-license.php LGPL
+ * @link www.doctrine-project.org
+ * @since 2.0
+ * @author Benjamin Eberlei
+ * @author Guilherme Blanco
+ * @author Jonathan Wage
+ * @author Roman Borschel
+ * @author David Abdemoulaie
+ */
+class ArrayCache extends CacheProvider
+{
+ /**
+ * @var array $data
+ */
+ private $data = array();
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function doFetch($id)
+ {
+ return (isset($this->data[$id])) ? $this->data[$id] : false;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function doContains($id)
+ {
+ return isset($this->data[$id]);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function doSave($id, $data, $lifeTime = 0)
+ {
+ $this->data[$id] = $data;
+
+ return true;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function doDelete($id)
+ {
+ unset($this->data[$id]);
+
+ return true;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function doFlush()
+ {
+ $this->data = array();
+
+ return true;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function doGetStats()
+ {
+ return null;
+ }
+}
\ No newline at end of file
diff --git a/vendor/doctrine/common/lib/Doctrine/Common/Cache/Cache.php b/vendor/doctrine/common/lib/Doctrine/Common/Cache/Cache.php
new file mode 100644
index 0000000..d303bde
--- /dev/null
+++ b/vendor/doctrine/common/lib/Doctrine/Common/Cache/Cache.php
@@ -0,0 +1,102 @@
+.
+ */
+
+namespace Doctrine\Common\Cache;
+
+/**
+ * Interface for cache drivers.
+ *
+ * @license http://www.opensource.org/licenses/lgpl-license.php LGPL
+ * @link www.doctrine-project.org
+ * @since 2.0
+ * @author Benjamin Eberlei
+ * @author Guilherme Blanco
+ * @author Jonathan Wage
+ * @author Roman Borschel
+ * @author Fabio B. Silva
+ */
+interface Cache
+{
+ const STATS_HITS = 'hits';
+ const STATS_MISSES = 'misses';
+ const STATS_UPTIME = 'uptime';
+ const STATS_MEMORY_USAGE = 'memory_usage';
+ const STATS_MEMORY_AVAILIABLE = 'memory_available';
+
+ /**
+ * Fetches an entry from the cache.
+ *
+ * @param string $id cache id The id of the cache entry to fetch.
+ * @return string The cached data or FALSE, if no cache entry exists for the given id.
+ */
+ function fetch($id);
+
+ /**
+ * Test if an entry exists in the cache.
+ *
+ * @param string $id cache id The cache id of the entry to check for.
+ * @return boolean TRUE if a cache entry exists for the given cache id, FALSE otherwise.
+ */
+ function contains($id);
+
+ /**
+ * Puts data into the cache.
+ *
+ * @param string $id The cache id.
+ * @param string $data The cache entry/data.
+ * @param int $lifeTime The lifetime. If != 0, sets a specific lifetime for this cache entry (0 => infinite lifeTime).
+ * @return boolean TRUE if the entry was successfully stored in the cache, FALSE otherwise.
+ */
+ function save($id, $data, $lifeTime = 0);
+
+ /**
+ * Deletes a cache entry.
+ *
+ * @param string $id cache id
+ * @return boolean TRUE if the cache entry was successfully deleted, FALSE otherwise.
+ */
+ function delete($id);
+
+ /**
+ * Retrieves cached information from data store
+ *
+ * The server's statistics array has the following values:
+ *
+ * - hits
+ * Number of keys that have been requested and found present.
+ *
+ * - misses
+ * Number of items that have been requested and not found.
+ *
+ * - uptime
+ * Time that the server is running.
+ *
+ * - memory_usage
+ * Memory used by this server to store items.
+ *
+ * - memory_available
+ * Memory allowed to use for storage.
+ *
+ * @since 2.2
+ * @var array Associative array with server's statistics if available, NULL otherwise.
+ */
+ function getStats();
+}
diff --git a/vendor/doctrine/common/lib/Doctrine/Common/Cache/CacheProvider.php b/vendor/doctrine/common/lib/Doctrine/Common/Cache/CacheProvider.php
new file mode 100644
index 0000000..fa11fc2
--- /dev/null
+++ b/vendor/doctrine/common/lib/Doctrine/Common/Cache/CacheProvider.php
@@ -0,0 +1,188 @@
+.
+ */
+
+namespace Doctrine\Common\Cache;
+
+/**
+ * Base class for cache provider implementations.
+ *
+ * @since 2.2
+ * @author Benjamin Eberlei
+ * @author Guilherme Blanco
+ * @author Jonathan Wage
+ * @author Roman Borschel
+ * @author Fabio B. Silva
+ */
+abstract class CacheProvider implements Cache
+{
+ const DOCTRINE_NAMESPACE_CACHEKEY = 'DoctrineNamespaceCacheKey[%s]';
+
+ /**
+ * @var string The namespace to prefix all cache ids with
+ */
+ private $namespace = '';
+
+ /**
+ * Set the namespace to prefix all cache ids with.
+ *
+ * @param string $namespace
+ * @return void
+ */
+ public function setNamespace($namespace)
+ {
+ $this->namespace = (string) $namespace;
+ }
+
+ /**
+ * Retrieve the namespace that prefixes all cache ids.
+ *
+ * @return string
+ */
+ public function getNamespace()
+ {
+ return $this->namespace;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function fetch($id)
+ {
+ return $this->doFetch($this->getNamespacedId($id));
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function contains($id)
+ {
+ return $this->doContains($this->getNamespacedId($id));
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function save($id, $data, $lifeTime = 0)
+ {
+ return $this->doSave($this->getNamespacedId($id), $data, $lifeTime);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function delete($id)
+ {
+ return $this->doDelete($this->getNamespacedId($id));
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function getStats()
+ {
+ return $this->doGetStats();
+ }
+
+ /**
+ * Deletes all cache entries.
+ *
+ * @return boolean TRUE if the cache entries were successfully flushed, FALSE otherwise.
+ */
+ public function flushAll()
+ {
+ return $this->doFlush();
+ }
+
+ /**
+ * Delete all cache entries.
+ *
+ * @return boolean TRUE if the cache entries were successfully deleted, FALSE otherwise.
+ */
+ public function deleteAll()
+ {
+ $namespaceCacheKey = sprintf(self::DOCTRINE_NAMESPACE_CACHEKEY, $this->namespace);
+ $namespaceVersion = ($this->doContains($namespaceCacheKey)) ? $this->doFetch($namespaceCacheKey) : 1;
+
+ return $this->doSave($namespaceCacheKey, $namespaceVersion + 1);
+ }
+
+ /**
+ * Prefix the passed id with the configured namespace value
+ *
+ * @param string $id The id to namespace
+ * @return string $id The namespaced id
+ */
+ private function getNamespacedId($id)
+ {
+ $namespaceCacheKey = sprintf(self::DOCTRINE_NAMESPACE_CACHEKEY, $this->namespace);
+ $namespaceVersion = ($this->doContains($namespaceCacheKey)) ? $this->doFetch($namespaceCacheKey) : 1;
+
+ return sprintf('%s[%s][%s]', $this->namespace, $id, $namespaceVersion);
+ }
+
+ /**
+ * Fetches an entry from the cache.
+ *
+ * @param string $id cache id The id of the cache entry to fetch.
+ * @return string The cached data or FALSE, if no cache entry exists for the given id.
+ */
+ abstract protected function doFetch($id);
+
+ /**
+ * Test if an entry exists in the cache.
+ *
+ * @param string $id cache id The cache id of the entry to check for.
+ * @return boolean TRUE if a cache entry exists for the given cache id, FALSE otherwise.
+ */
+ abstract protected function doContains($id);
+
+ /**
+ * Puts data into the cache.
+ *
+ * @param string $id The cache id.
+ * @param string $data The cache entry/data.
+ * @param int $lifeTime The lifetime. If != false, sets a specific lifetime for this cache entry (null => infinite lifeTime).
+ * @return boolean TRUE if the entry was successfully stored in the cache, FALSE otherwise.
+ */
+ abstract protected function doSave($id, $data, $lifeTime = false);
+
+ /**
+ * Deletes a cache entry.
+ *
+ * @param string $id cache id
+ * @return boolean TRUE if the cache entry was successfully deleted, FALSE otherwise.
+ */
+ abstract protected function doDelete($id);
+
+ /**
+ * Deletes all cache entries.
+ *
+ * @return boolean TRUE if the cache entry was successfully deleted, FALSE otherwise.
+ */
+ abstract protected function doFlush();
+
+ /**
+ * Retrieves cached information from data store
+ *
+ * @since 2.2
+ * @return array An associative array with server's statistics if available, NULL otherwise.
+ */
+ abstract protected function doGetStats();
+}
diff --git a/vendor/doctrine/common/lib/Doctrine/Common/Cache/MemcacheCache.php b/vendor/doctrine/common/lib/Doctrine/Common/Cache/MemcacheCache.php
new file mode 100644
index 0000000..dd6d1e3
--- /dev/null
+++ b/vendor/doctrine/common/lib/Doctrine/Common/Cache/MemcacheCache.php
@@ -0,0 +1,121 @@
+.
+ */
+
+namespace Doctrine\Common\Cache;
+
+use \Memcache;
+
+/**
+ * Memcache cache provider.
+ *
+ * @license http://www.opensource.org/licenses/lgpl-license.php LGPL
+ * @link www.doctrine-project.org
+ * @since 2.0
+ * @author Benjamin Eberlei
+ * @author Guilherme Blanco
+ * @author Jonathan Wage
+ * @author Roman Borschel
+ * @author David Abdemoulaie
+ */
+class MemcacheCache extends CacheProvider
+{
+ /**
+ * @var Memcache
+ */
+ private $memcache;
+
+ /**
+ * Sets the memcache instance to use.
+ *
+ * @param Memcache $memcache
+ */
+ public function setMemcache(Memcache $memcache)
+ {
+ $this->memcache = $memcache;
+ }
+
+ /**
+ * Gets the memcache instance used by the cache.
+ *
+ * @return Memcache
+ */
+ public function getMemcache()
+ {
+ return $this->memcache;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function doFetch($id)
+ {
+ return $this->memcache->get($id);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function doContains($id)
+ {
+ return (bool) $this->memcache->get($id);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function doSave($id, $data, $lifeTime = 0)
+ {
+ if ($lifeTime > 30 * 24 * 3600) {
+ $lifeTime = time() + $lifeTime;
+ }
+ return $this->memcache->set($id, $data, 0, (int) $lifeTime);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function doDelete($id)
+ {
+ return $this->memcache->delete($id);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function doFlush()
+ {
+ return $this->memcache->flush();
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function doGetStats()
+ {
+ $stats = $this->memcache->getStats();
+ return array(
+ Cache::STATS_HITS => $stats['get_hits'],
+ Cache::STATS_MISSES => $stats['get_misses'],
+ Cache::STATS_UPTIME => $stats['uptime'],
+ Cache::STATS_MEMORY_USAGE => $stats['bytes'],
+ Cache::STATS_MEMORY_AVAILIABLE => $stats['limit_maxbytes'],
+ );
+ }
+}
diff --git a/vendor/doctrine/common/lib/Doctrine/Common/Cache/MemcachedCache.php b/vendor/doctrine/common/lib/Doctrine/Common/Cache/MemcachedCache.php
new file mode 100644
index 0000000..4675fae
--- /dev/null
+++ b/vendor/doctrine/common/lib/Doctrine/Common/Cache/MemcachedCache.php
@@ -0,0 +1,124 @@
+.
+ */
+
+namespace Doctrine\Common\Cache;
+
+use \Memcached;
+
+/**
+ * Memcached cache provider.
+ *
+ * @license http://www.opensource.org/licenses/lgpl-license.php LGPL
+ * @link www.doctrine-project.org
+ * @since 2.2
+ * @author Benjamin Eberlei
+ * @author Guilherme Blanco
+ * @author Jonathan Wage
+ * @author Roman Borschel
+ * @author David Abdemoulaie
+ */
+class MemcachedCache extends CacheProvider
+{
+ /**
+ * @var Memcached
+ */
+ private $memcached;
+
+ /**
+ * Sets the memcache instance to use.
+ *
+ * @param Memcached $memcached
+ */
+ public function setMemcached(Memcached $memcached)
+ {
+ $this->memcached = $memcached;
+ }
+
+ /**
+ * Gets the memcached instance used by the cache.
+ *
+ * @return Memcached
+ */
+ public function getMemcached()
+ {
+ return $this->memcached;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function doFetch($id)
+ {
+ return $this->memcached->get($id);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function doContains($id)
+ {
+ return (false !== $this->memcached->get($id));
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function doSave($id, $data, $lifeTime = 0)
+ {
+ if ($lifeTime > 30 * 24 * 3600) {
+ $lifeTime = time() + $lifeTime;
+ }
+ return $this->memcached->set($id, $data, (int) $lifeTime);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function doDelete($id)
+ {
+ return $this->memcached->delete($id);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function doFlush()
+ {
+ return $this->memcached->flush();
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function doGetStats()
+ {
+ $stats = $this->memcached->getStats();
+ $servers = $this->memcached->getServerList();
+ $key = $servers[0]['host'] . ':' . $servers[0]['port'];
+ $stats = $stats[$key];
+ return array(
+ Cache::STATS_HITS => $stats['get_hits'],
+ Cache::STATS_MISSES => $stats['get_misses'],
+ Cache::STATS_UPTIME => $stats['uptime'],
+ Cache::STATS_MEMORY_USAGE => $stats['bytes'],
+ Cache::STATS_MEMORY_AVAILIABLE => $stats['limit_maxbytes'],
+ );
+ }
+}
diff --git a/vendor/doctrine/common/lib/Doctrine/Common/Cache/WinCacheCache.php b/vendor/doctrine/common/lib/Doctrine/Common/Cache/WinCacheCache.php
new file mode 100644
index 0000000..ed8ca74
--- /dev/null
+++ b/vendor/doctrine/common/lib/Doctrine/Common/Cache/WinCacheCache.php
@@ -0,0 +1,92 @@
+.
+ */
+
+namespace Doctrine\Common\Cache;
+
+/**
+ * WinCache cache provider.
+ *
+ * @license http://www.opensource.org/licenses/lgpl-license.php LGPL
+ * @link www.doctrine-project.org
+ * @since 2.2
+ * @author Benjamin Eberlei
+ * @author Guilherme Blanco
+ * @author Jonathan Wage
+ * @author Roman Borschel
+ * @author David Abdemoulaie
+ */
+class WincacheCache extends CacheProvider
+{
+ /**
+ * {@inheritdoc}
+ */
+ protected function doFetch($id)
+ {
+ return wincache_ucache_get($id);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function doContains($id)
+ {
+ return wincache_ucache_exists($id);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function doSave($id, $data, $lifeTime = 0)
+ {
+ return (bool) wincache_ucache_set($id, $data, (int) $lifeTime);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function doDelete($id)
+ {
+ return wincache_ucache_delete($id);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function doFlush()
+ {
+ return wincache_ucache_clear();
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function doGetStats()
+ {
+ $info = wincache_ucache_info();
+ $meminfo= wincache_ucache_meminfo();
+ return array(
+ Cache::STATS_HITS => $info['total_hit_count'],
+ Cache::STATS_MISSES => $info['total_miss_count'],
+ Cache::STATS_UPTIME => $info['total_cache_uptime'],
+ Cache::STATS_MEMORY_USAGE => $meminfo['memory_total'],
+ Cache::STATS_MEMORY_AVAILIABLE => $meminfo['memory_free'],
+ );
+ }
+}
\ No newline at end of file
diff --git a/vendor/doctrine/common/lib/Doctrine/Common/Cache/XcacheCache.php b/vendor/doctrine/common/lib/Doctrine/Common/Cache/XcacheCache.php
new file mode 100644
index 0000000..6e22d26
--- /dev/null
+++ b/vendor/doctrine/common/lib/Doctrine/Common/Cache/XcacheCache.php
@@ -0,0 +1,110 @@
+.
+ */
+
+namespace Doctrine\Common\Cache;
+
+/**
+ * Xcache cache driver.
+ *
+ * @license http://www.opensource.org/licenses/lgpl-license.php LGPL
+ * @link www.doctrine-project.org
+ * @since 2.0
+ * @author Benjamin Eberlei
+ * @author Guilherme Blanco
+ * @author Jonathan Wage
+ * @author Roman Borschel
+ * @author David Abdemoulaie
+ */
+class XcacheCache extends CacheProvider
+{
+ /**
+ * {@inheritdoc}
+ */
+ protected function doFetch($id)
+ {
+ return $this->doContains($id) ? unserialize(xcache_get($id)) : false;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function doContains($id)
+ {
+ return xcache_isset($id);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function doSave($id, $data, $lifeTime = 0)
+ {
+ return xcache_set($id, serialize($data), (int) $lifeTime);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function doDelete($id)
+ {
+ return xcache_unset($id);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function doFlush()
+ {
+ $this->checkAuthorization();
+
+ xcache_clear_cache(XC_TYPE_VAR, 0);
+
+ return true;
+ }
+
+ /**
+ * Checks that xcache.admin.enable_auth is Off
+ *
+ * @throws \BadMethodCallException When xcache.admin.enable_auth is On
+ * @return void
+ */
+ protected function checkAuthorization()
+ {
+ if (ini_get('xcache.admin.enable_auth')) {
+ throw new \BadMethodCallException('To use all features of \Doctrine\Common\Cache\XcacheCache, you must set "xcache.admin.enable_auth" to "Off" in your php.ini.');
+ }
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function doGetStats()
+ {
+ $this->checkAuthorization();
+
+ $info = xcache_info(XC_TYPE_VAR, 0);
+ return array(
+ Cache::STATS_HITS => $info['hits'],
+ Cache::STATS_MISSES => $info['misses'],
+ Cache::STATS_UPTIME => null,
+ Cache::STATS_MEMORY_USAGE => $info['size'],
+ Cache::STATS_MEMORY_AVAILIABLE => $info['avail'],
+ );
+ }
+}
\ No newline at end of file
diff --git a/vendor/doctrine/common/lib/Doctrine/Common/Cache/ZendDataCache.php b/vendor/doctrine/common/lib/Doctrine/Common/Cache/ZendDataCache.php
new file mode 100644
index 0000000..4e4dabe
--- /dev/null
+++ b/vendor/doctrine/common/lib/Doctrine/Common/Cache/ZendDataCache.php
@@ -0,0 +1,84 @@
+.
+ */
+
+namespace Doctrine\Common\Cache;
+
+/**
+ * Zend Data Cache cache driver.
+ *
+ * @license http://www.opensource.org/licenses/lgpl-license.php LGPL
+ * @link www.doctrine-project.org
+ * @since 2.0
+ * @author Ralph Schindler
+ * @author Guilherme Blanco
+ */
+class ZendDataCache extends CacheProvider
+{
+ /**
+ * {@inheritdoc}
+ */
+ protected function doFetch($id)
+ {
+ return zend_shm_cache_fetch($id);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function doContains($id)
+ {
+ return (false !== zend_shm_cache_fetch($id));
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function doSave($id, $data, $lifeTime = 0)
+ {
+ return zend_shm_cache_store($id, $data, $lifeTime);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function doDelete($id)
+ {
+ return zend_shm_cache_delete($id);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function doFlush()
+ {
+ $namespace = $this->getNamespace();
+ if (empty($namespace)) {
+ return zend_shm_cache_clear();
+ }
+ return zend_shm_cache_clear($namespace);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function doGetStats()
+ {
+ return null;
+ }
+}
diff --git a/vendor/doctrine/common/lib/Doctrine/Common/ClassLoader.php b/vendor/doctrine/common/lib/Doctrine/Common/ClassLoader.php
new file mode 100644
index 0000000..375b0d6
--- /dev/null
+++ b/vendor/doctrine/common/lib/Doctrine/Common/ClassLoader.php
@@ -0,0 +1,262 @@
+.
+ */
+
+namespace Doctrine\Common;
+
+/**
+ * A ClassLoader is an autoloader for class files that can be
+ * installed on the SPL autoload stack. It is a class loader that either loads only classes
+ * of a specific namespace or all namespaces and it is suitable for working together
+ * with other autoloaders in the SPL autoload stack.
+ *
+ * If no include path is configured through the constructor or {@link setIncludePath}, a ClassLoader
+ * relies on the PHP include_path.
+ *
+ * @author Roman Borschel
+ * @since 2.0
+ */
+class ClassLoader
+{
+ /**
+ * @var string PHP file extension
+ */
+ protected $fileExtension = '.php';
+
+ /**
+ * @var string Current namespace
+ */
+ protected $namespace;
+
+ /**
+ * @var string Current include path
+ */
+ protected $includePath;
+
+ /**
+ * @var string PHP namespace separator
+ */
+ protected $namespaceSeparator = '\\';
+
+ /**
+ * Creates a new ClassLoader that loads classes of the
+ * specified namespace from the specified include path.
+ *
+ * If no include path is given, the ClassLoader relies on the PHP include_path.
+ * If neither a namespace nor an include path is given, the ClassLoader will
+ * be responsible for loading all classes, thereby relying on the PHP include_path.
+ *
+ * @param string $ns The namespace of the classes to load.
+ * @param string $includePath The base include path to use.
+ */
+ public function __construct($ns = null, $includePath = null)
+ {
+ $this->namespace = $ns;
+ $this->includePath = $includePath;
+ }
+
+ /**
+ * Sets the namespace separator used by classes in the namespace of this ClassLoader.
+ *
+ * @param string $sep The separator to use.
+ */
+ public function setNamespaceSeparator($sep)
+ {
+ $this->namespaceSeparator = $sep;
+ }
+
+ /**
+ * Gets the namespace separator used by classes in the namespace of this ClassLoader.
+ *
+ * @return string
+ */
+ public function getNamespaceSeparator()
+ {
+ return $this->namespaceSeparator;
+ }
+
+ /**
+ * Sets the base include path for all class files in the namespace of this ClassLoader.
+ *
+ * @param string $includePath
+ */
+ public function setIncludePath($includePath)
+ {
+ $this->includePath = $includePath;
+ }
+
+ /**
+ * Gets the base include path for all class files in the namespace of this ClassLoader.
+ *
+ * @return string
+ */
+ public function getIncludePath()
+ {
+ return $this->includePath;
+ }
+
+ /**
+ * Sets the file extension of class files in the namespace of this ClassLoader.
+ *
+ * @param string $fileExtension
+ */
+ public function setFileExtension($fileExtension)
+ {
+ $this->fileExtension = $fileExtension;
+ }
+
+ /**
+ * Gets the file extension of class files in the namespace of this ClassLoader.
+ *
+ * @return string
+ */
+ public function getFileExtension()
+ {
+ return $this->fileExtension;
+ }
+
+ /**
+ * Registers this ClassLoader on the SPL autoload stack.
+ */
+ public function register()
+ {
+ spl_autoload_register(array($this, 'loadClass'));
+ }
+
+ /**
+ * Removes this ClassLoader from the SPL autoload stack.
+ */
+ public function unregister()
+ {
+ spl_autoload_unregister(array($this, 'loadClass'));
+ }
+
+ /**
+ * Loads the given class or interface.
+ *
+ * @param string $classname The name of the class to load.
+ * @return boolean TRUE if the class has been successfully loaded, FALSE otherwise.
+ */
+ public function loadClass($className)
+ {
+ if ($this->namespace !== null && strpos($className, $this->namespace.$this->namespaceSeparator) !== 0) {
+ return false;
+ }
+
+ require ($this->includePath !== null ? $this->includePath . DIRECTORY_SEPARATOR : '')
+ . str_replace($this->namespaceSeparator, DIRECTORY_SEPARATOR, $className)
+ . $this->fileExtension;
+
+ return true;
+ }
+
+ /**
+ * Asks this ClassLoader whether it can potentially load the class (file) with
+ * the given name.
+ *
+ * @param string $className The fully-qualified name of the class.
+ * @return boolean TRUE if this ClassLoader can load the class, FALSE otherwise.
+ */
+ public function canLoadClass($className)
+ {
+ if ($this->namespace !== null && strpos($className, $this->namespace.$this->namespaceSeparator) !== 0) {
+ return false;
+ }
+
+ $file = str_replace($this->namespaceSeparator, DIRECTORY_SEPARATOR, $className) . $this->fileExtension;
+
+ if ($this->includePath !== null) {
+ return file_exists($this->includePath . DIRECTORY_SEPARATOR . $file);
+ }
+
+ return (false !== stream_resolve_include_path($file));
+ }
+
+ /**
+ * Checks whether a class with a given name exists. A class "exists" if it is either
+ * already defined in the current request or if there is an autoloader on the SPL
+ * autoload stack that is a) responsible for the class in question and b) is able to
+ * load a class file in which the class definition resides.
+ *
+ * If the class is not already defined, each autoloader in the SPL autoload stack
+ * is asked whether it is able to tell if the class exists. If the autoloader is
+ * a ClassLoader, {@link canLoadClass} is used, otherwise the autoload
+ * function of the autoloader is invoked and expected to return a value that
+ * evaluates to TRUE if the class (file) exists. As soon as one autoloader reports
+ * that the class exists, TRUE is returned.
+ *
+ * Note that, depending on what kinds of autoloaders are installed on the SPL
+ * autoload stack, the class (file) might already be loaded as a result of checking
+ * for its existence. This is not the case with a ClassLoader, who separates
+ * these responsibilities.
+ *
+ * @param string $className The fully-qualified name of the class.
+ * @return boolean TRUE if the class exists as per the definition given above, FALSE otherwise.
+ */
+ public static function classExists($className)
+ {
+ if (class_exists($className, false) || interface_exists($className, false)) {
+ return true;
+ }
+
+ foreach (spl_autoload_functions() as $loader) {
+ if (is_array($loader)) { // array(???, ???)
+ if (is_object($loader[0])) {
+ if ($loader[0] instanceof ClassLoader) { // array($obj, 'methodName')
+ if ($loader[0]->canLoadClass($className)) {
+ return true;
+ }
+ } else if ($loader[0]->{$loader[1]}($className)) {
+ return true;
+ }
+ } else if ($loader[0]::$loader[1]($className)) { // array('ClassName', 'methodName')
+ return true;
+ }
+ } else if ($loader instanceof \Closure) { // function($className) {..}
+ if ($loader($className)) {
+ return true;
+ }
+ } else if (is_string($loader) && $loader($className)) { // "MyClass::loadClass"
+ return true;
+ }
+ }
+
+ return class_exists($className, false) || interface_exists($className, false);
+ }
+
+ /**
+ * Gets the ClassLoader from the SPL autoload stack that is responsible
+ * for (and is able to load) the class with the given name.
+ *
+ * @param string $className The name of the class.
+ * @return The ClassLoader for the class or NULL if no such ClassLoader exists.
+ */
+ public static function getClassLoader($className)
+ {
+ foreach (spl_autoload_functions() as $loader) {
+ if (is_array($loader)
+ && $loader[0] instanceof ClassLoader
+ && $loader[0]->canLoadClass($className)
+ ) {
+ return $loader[0];
+ }
+ }
+
+ return null;
+ }
+}
diff --git a/vendor/doctrine/common/lib/Doctrine/Common/Collections/ArrayCollection.php b/vendor/doctrine/common/lib/Doctrine/Common/Collections/ArrayCollection.php
new file mode 100644
index 0000000..2a7d4ea
--- /dev/null
+++ b/vendor/doctrine/common/lib/Doctrine/Common/Collections/ArrayCollection.php
@@ -0,0 +1,447 @@
+.
+ */
+
+namespace Doctrine\Common\Collections;
+
+use Closure, ArrayIterator;
+
+/**
+ * An ArrayCollection is a Collection implementation that wraps a regular PHP array.
+ *
+ * @since 2.0
+ * @author Guilherme Blanco
+ * @author Jonathan Wage
+ * @author Roman Borschel
+ */
+class ArrayCollection implements Collection
+{
+ /**
+ * An array containing the entries of this collection.
+ *
+ * @var array
+ */
+ private $_elements;
+
+ /**
+ * Initializes a new ArrayCollection.
+ *
+ * @param array $elements
+ */
+ public function __construct(array $elements = array())
+ {
+ $this->_elements = $elements;
+ }
+
+ /**
+ * Gets the PHP array representation of this collection.
+ *
+ * @return array The PHP array representation of this collection.
+ */
+ public function toArray()
+ {
+ return $this->_elements;
+ }
+
+ /**
+ * Sets the internal iterator to the first element in the collection and
+ * returns this element.
+ *
+ * @return mixed
+ */
+ public function first()
+ {
+ return reset($this->_elements);
+ }
+
+ /**
+ * Sets the internal iterator to the last element in the collection and
+ * returns this element.
+ *
+ * @return mixed
+ */
+ public function last()
+ {
+ return end($this->_elements);
+ }
+
+ /**
+ * Gets the current key/index at the current internal iterator position.
+ *
+ * @return mixed
+ */
+ public function key()
+ {
+ return key($this->_elements);
+ }
+
+ /**
+ * Moves the internal iterator position to the next element.
+ *
+ * @return mixed
+ */
+ public function next()
+ {
+ return next($this->_elements);
+ }
+
+ /**
+ * Gets the element of the collection at the current internal iterator position.
+ *
+ * @return mixed
+ */
+ public function current()
+ {
+ return current($this->_elements);
+ }
+
+ /**
+ * Removes an element with a specific key/index from the collection.
+ *
+ * @param mixed $key
+ * @return mixed The removed element or NULL, if no element exists for the given key.
+ */
+ public function remove($key)
+ {
+ if (isset($this->_elements[$key])) {
+ $removed = $this->_elements[$key];
+ unset($this->_elements[$key]);
+
+ return $removed;
+ }
+
+ return null;
+ }
+
+ /**
+ * Removes the specified element from the collection, if it is found.
+ *
+ * @param mixed $element The element to remove.
+ * @return boolean TRUE if this collection contained the specified element, FALSE otherwise.
+ */
+ public function removeElement($element)
+ {
+ $key = array_search($element, $this->_elements, true);
+
+ if ($key !== false) {
+ unset($this->_elements[$key]);
+
+ return true;
+ }
+
+ return false;
+ }
+
+ /**
+ * ArrayAccess implementation of offsetExists()
+ *
+ * @see containsKey()
+ */
+ public function offsetExists($offset)
+ {
+ return $this->containsKey($offset);
+ }
+
+ /**
+ * ArrayAccess implementation of offsetGet()
+ *
+ * @see get()
+ */
+ public function offsetGet($offset)
+ {
+ return $this->get($offset);
+ }
+
+ /**
+ * ArrayAccess implementation of offsetGet()
+ *
+ * @see add()
+ * @see set()
+ */
+ public function offsetSet($offset, $value)
+ {
+ if ( ! isset($offset)) {
+ return $this->add($value);
+ }
+ return $this->set($offset, $value);
+ }
+
+ /**
+ * ArrayAccess implementation of offsetUnset()
+ *
+ * @see remove()
+ */
+ public function offsetUnset($offset)
+ {
+ return $this->remove($offset);
+ }
+
+ /**
+ * Checks whether the collection contains a specific key/index.
+ *
+ * @param mixed $key The key to check for.
+ * @return boolean TRUE if the given key/index exists, FALSE otherwise.
+ */
+ public function containsKey($key)
+ {
+ return isset($this->_elements[$key]);
+ }
+
+ /**
+ * 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.
+ *
+ * @param mixed $element
+ * @return boolean TRUE if the given element is contained in the collection,
+ * FALSE otherwise.
+ */
+ public function contains($element)
+ {
+ foreach ($this->_elements as $collectionElement) {
+ if ($element === $collectionElement) {
+ return true;
+ }
+ }
+
+ return false;
+ }
+
+ /**
+ * Tests for the existance of an element that satisfies the given predicate.
+ *
+ * @param Closure $p The predicate.
+ * @return boolean TRUE if the predicate is TRUE for at least one element, FALSE otherwise.
+ */
+ public function exists(Closure $p)
+ {
+ foreach ($this->_elements as $key => $element) {
+ if ($p($key, $element)) {
+ return true;
+ }
+ }
+ return false;
+ }
+
+ /**
+ * 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.
+ *
+ * @param mixed $element The element to search for.
+ * @return mixed The key/index of the element or FALSE if the element was not found.
+ */
+ public function indexOf($element)
+ {
+ return array_search($element, $this->_elements, true);
+ }
+
+ /**
+ * Gets the element with the given key/index.
+ *
+ * @param mixed $key The key.
+ * @return mixed The element or NULL, if no element exists for the given key.
+ */
+ public function get($key)
+ {
+ if (isset($this->_elements[$key])) {
+ return $this->_elements[$key];
+ }
+ return null;
+ }
+
+ /**
+ * Gets all keys/indexes of the collection elements.
+ *
+ * @return array
+ */
+ public function getKeys()
+ {
+ return array_keys($this->_elements);
+ }
+
+ /**
+ * Gets all elements.
+ *
+ * @return array
+ */
+ public function getValues()
+ {
+ return array_values($this->_elements);
+ }
+
+ /**
+ * Returns the number of elements in the collection.
+ *
+ * Implementation of the Countable interface.
+ *
+ * @return integer The number of elements in the collection.
+ */
+ public function count()
+ {
+ return count($this->_elements);
+ }
+
+ /**
+ * 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).
+ *
+ * @param mixed $key
+ * @param mixed $value
+ */
+ public function set($key, $value)
+ {
+ $this->_elements[$key] = $value;
+ }
+
+ /**
+ * Adds an element to the collection.
+ *
+ * @param mixed $value
+ * @return boolean Always TRUE.
+ */
+ public function add($value)
+ {
+ $this->_elements[] = $value;
+ return true;
+ }
+
+ /**
+ * Checks whether the collection is empty.
+ *
+ * Note: This is preferrable over count() == 0.
+ *
+ * @return boolean TRUE if the collection is empty, FALSE otherwise.
+ */
+ public function isEmpty()
+ {
+ return ! $this->_elements;
+ }
+
+ /**
+ * Gets an iterator for iterating over the elements in the collection.
+ *
+ * @return ArrayIterator
+ */
+ public function getIterator()
+ {
+ return new ArrayIterator($this->_elements);
+ }
+
+ /**
+ * Applies the given function to each element in the collection and returns
+ * a new collection with the elements returned by the function.
+ *
+ * @param Closure $func
+ * @return Collection
+ */
+ public function map(Closure $func)
+ {
+ return new static(array_map($func, $this->_elements));
+ }
+
+ /**
+ * Returns all the elements of this collection that satisfy the predicate p.
+ * The order of the elements is preserved.
+ *
+ * @param Closure $p The predicate used for filtering.
+ * @return Collection A collection with the results of the filter operation.
+ */
+ public function filter(Closure $p)
+ {
+ return new static(array_filter($this->_elements, $p));
+ }
+
+ /**
+ * Applies the given predicate p to all elements of this collection,
+ * returning true, if the predicate yields true for all elements.
+ *
+ * @param Closure $p The predicate.
+ * @return boolean TRUE, if the predicate yields TRUE for all elements, FALSE otherwise.
+ */
+ public function forAll(Closure $p)
+ {
+ foreach ($this->_elements as $key => $element) {
+ if ( ! $p($key, $element)) {
+ return false;
+ }
+ }
+
+ return true;
+ }
+
+ /**
+ * Partitions this collection in two collections according to a predicate.
+ * Keys are preserved in the resulting collections.
+ *
+ * @param Closure $p The predicate on which to partition.
+ * @return array 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.
+ */
+ public function partition(Closure $p)
+ {
+ $coll1 = $coll2 = array();
+ foreach ($this->_elements as $key => $element) {
+ if ($p($key, $element)) {
+ $coll1[$key] = $element;
+ } else {
+ $coll2[$key] = $element;
+ }
+ }
+ return array(new static($coll1), new static($coll2));
+ }
+
+ /**
+ * Returns a string representation of this object.
+ *
+ * @return string
+ */
+ public function __toString()
+ {
+ return __CLASS__ . '@' . spl_object_hash($this);
+ }
+
+ /**
+ * Clears the collection.
+ */
+ public function clear()
+ {
+ $this->_elements = array();
+ }
+
+ /**
+ * Extract a slice of $length elements starting at position $offset from the Collection.
+ *
+ * If $length is null it returns all elements from $offset to the end of the Collection.
+ * Keys have to be preserved by this method. Calling this method will only return the
+ * selected slice and NOT change the elements contained in the collection slice is called on.
+ *
+ * @param int $offset
+ * @param int $length
+ * @return array
+ */
+ public function slice($offset, $length = null)
+ {
+ return array_slice($this->_elements, $offset, $length, true);
+ }
+}
diff --git a/vendor/doctrine/common/lib/Doctrine/Common/Collections/Collection.php b/vendor/doctrine/common/lib/Doctrine/Common/Collections/Collection.php
new file mode 100644
index 0000000..9fca659
--- /dev/null
+++ b/vendor/doctrine/common/lib/Doctrine/Common/Collections/Collection.php
@@ -0,0 +1,243 @@
+.
+ */
+
+namespace Doctrine\Common\Collections;
+
+use Closure, Countable, IteratorAggregate, ArrayAccess;
+
+/**
+ * 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 {@link getIterator()} internally) or
+ * explicitly retrieve an iterator though {@link 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.
+ *
+ * @since 2.0
+ * @author Guilherme Blanco
+ * @author Jonathan Wage
+ * @author Roman Borschel
+ */
+interface Collection extends Countable, IteratorAggregate, ArrayAccess
+{
+ /**
+ * Adds an element at the end of the collection.
+ *
+ * @param mixed $element The element to add.
+ * @return boolean Always TRUE.
+ */
+ function add($element);
+
+ /**
+ * Clears the collection, removing all elements.
+ */
+ function clear();
+
+ /**
+ * Checks whether an element is contained in the collection.
+ * This is an O(n) operation, where n is the size of the collection.
+ *
+ * @param mixed $element The element to search for.
+ * @return boolean TRUE if the collection contains the element, FALSE otherwise.
+ */
+ function contains($element);
+
+ /**
+ * Checks whether the collection is empty (contains no elements).
+ *
+ * @return boolean TRUE if the collection is empty, FALSE otherwise.
+ */
+ function isEmpty();
+
+ /**
+ * Removes the element at the specified index from the collection.
+ *
+ * @param string|integer $key The kex/index of the element to remove.
+ * @return mixed The removed element or NULL, if the collection did not contain the element.
+ */
+ function remove($key);
+
+ /**
+ * Removes the specified element from the collection, if it is found.
+ *
+ * @param mixed $element The element to remove.
+ * @return boolean TRUE if this collection contained the specified element, FALSE otherwise.
+ */
+ function removeElement($element);
+
+ /**
+ * Checks whether the collection contains an element with the specified key/index.
+ *
+ * @param string|integer $key The key/index to check for.
+ * @return boolean TRUE if the collection contains an element with the specified key/index,
+ * FALSE otherwise.
+ */
+ function containsKey($key);
+
+ /**
+ * Gets the element at the specified key/index.
+ *
+ * @param string|integer $key The key/index of the element to retrieve.
+ * @return mixed
+ */
+ function get($key);
+
+ /**
+ * Gets all keys/indices of the collection.
+ *
+ * @return array The keys/indices of the collection, in the order of the corresponding
+ * elements in the collection.
+ */
+ function getKeys();
+
+ /**
+ * Gets all values of the collection.
+ *
+ * @return array The values of all elements in the collection, in the order they
+ * appear in the collection.
+ */
+ function getValues();
+
+ /**
+ * Sets an element in the collection at the specified key/index.
+ *
+ * @param string|integer $key The key/index of the element to set.
+ * @param mixed $value The element to set.
+ */
+ function set($key, $value);
+
+ /**
+ * Gets a native PHP array representation of the collection.
+ *
+ * @return array
+ */
+ function toArray();
+
+ /**
+ * Sets the internal iterator to the first element in the collection and
+ * returns this element.
+ *
+ * @return mixed
+ */
+ function first();
+
+ /**
+ * Sets the internal iterator to the last element in the collection and
+ * returns this element.
+ *
+ * @return mixed
+ */
+ function last();
+
+ /**
+ * Gets the key/index of the element at the current iterator position.
+ *
+ */
+ function key();
+
+ /**
+ * Gets the element of the collection at the current iterator position.
+ *
+ */
+ function current();
+
+ /**
+ * Moves the internal iterator position to the next element.
+ *
+ */
+ function next();
+
+ /**
+ * Tests for the existence of an element that satisfies the given predicate.
+ *
+ * @param Closure $p The predicate.
+ * @return boolean TRUE if the predicate is TRUE for at least one element, FALSE otherwise.
+ */
+ function exists(Closure $p);
+
+ /**
+ * Returns all the elements of this collection that satisfy the predicate p.
+ * The order of the elements is preserved.
+ *
+ * @param Closure $p The predicate used for filtering.
+ * @return Collection A collection with the results of the filter operation.
+ */
+ function filter(Closure $p);
+
+ /**
+ * Applies the given predicate p to all elements of this collection,
+ * returning true, if the predicate yields true for all elements.
+ *
+ * @param Closure $p The predicate.
+ * @return boolean TRUE, if the predicate yields TRUE for all elements, FALSE otherwise.
+ */
+ function forAll(Closure $p);
+
+ /**
+ * Applies the given function to each element in the collection and returns
+ * a new collection with the elements returned by the function.
+ *
+ * @param Closure $func
+ * @return Collection
+ */
+ function map(Closure $func);
+
+ /**
+ * Partitions this collection in two collections according to a predicate.
+ * Keys are preserved in the resulting collections.
+ *
+ * @param Closure $p The predicate on which to partition.
+ * @return array 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.
+ */
+ function partition(Closure $p);
+
+ /**
+ * 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.
+ *
+ * @param mixed $element The element to search for.
+ * @return mixed The key/index of the element or FALSE if the element was not found.
+ */
+ function indexOf($element);
+
+ /**
+ * Extract a slice of $length elements starting at position $offset from the Collection.
+ *
+ * If $length is null it returns all elements from $offset to the end of the Collection.
+ * Keys have to be preserved by this method. Calling this method will only return the
+ * selected slice and NOT change the elements contained in the collection slice is called on.
+ *
+ * @param int $offset
+ * @param int $length
+ * @return array
+ */
+ function slice($offset, $length = null);
+}
\ No newline at end of file
diff --git a/vendor/doctrine/common/lib/Doctrine/Common/CommonException.php b/vendor/doctrine/common/lib/Doctrine/Common/CommonException.php
new file mode 100644
index 0000000..8c5669b
--- /dev/null
+++ b/vendor/doctrine/common/lib/Doctrine/Common/CommonException.php
@@ -0,0 +1,28 @@
+.
+ */
+
+namespace Doctrine\Common;
+
+/**
+ * Base exception class for package Doctrine\Common
+ * @author heinrich
+ *
+ */
+class CommonException extends \Exception {
+}
\ No newline at end of file
diff --git a/vendor/doctrine/common/lib/Doctrine/Common/Comparable.php b/vendor/doctrine/common/lib/Doctrine/Common/Comparable.php
new file mode 100644
index 0000000..bc95d30
--- /dev/null
+++ b/vendor/doctrine/common/lib/Doctrine/Common/Comparable.php
@@ -0,0 +1,47 @@
+.
+ */
+
+
+namespace Doctrine\Common;
+
+/**
+ * Comparable interface that allows to compare two value objects to each other for similarity.
+ *
+ * @license http://www.opensource.org/licenses/lgpl-license.php LGPL
+ * @link www.doctrine-project.com
+ * @since 2.2
+ * @author Benjamin Eberlei
+ * @author Guilherme Blanco
+ */
+interface Comparable
+{
+ /**
+ * Compare the current object to the passed $other.
+ *
+ * Returns 0 if they are semantically equal, 1 if the other object
+ * is less than the current one, or -1 if its more than the current one.
+ *
+ * This method should not check for identity using ===, only for semantical equality for example
+ * when two different DateTime instances point to the exact same Date + TZ.
+ *
+ * @return int
+ */
+ public function compareTo($other);
+}
+
diff --git a/vendor/doctrine/common/lib/Doctrine/Common/EventArgs.php b/vendor/doctrine/common/lib/Doctrine/Common/EventArgs.php
new file mode 100644
index 0000000..6a3c069
--- /dev/null
+++ b/vendor/doctrine/common/lib/Doctrine/Common/EventArgs.php
@@ -0,0 +1,69 @@
+.
+ */
+
+namespace Doctrine\Common;
+
+/**
+ * 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 {@link getEmptyInstance}.
+ *
+ * @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 EventArgs
+{
+ /**
+ * @var EventArgs Single instance of EventArgs
+ * @static
+ */
+ private static $_emptyEventArgsInstance;
+
+ /**
+ * 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 EventManager::dispatchEvent
+ * @link http://msdn.microsoft.com/en-us/library/system.eventargs.aspx
+ * @static
+ * @return EventArgs
+ */
+ public static function getEmptyInstance()
+ {
+ if ( ! self::$_emptyEventArgsInstance) {
+ self::$_emptyEventArgsInstance = new EventArgs;
+ }
+
+ return self::$_emptyEventArgsInstance;
+ }
+}
diff --git a/vendor/doctrine/common/lib/Doctrine/Common/EventManager.php b/vendor/doctrine/common/lib/Doctrine/Common/EventManager.php
new file mode 100644
index 0000000..a1f11ed
--- /dev/null
+++ b/vendor/doctrine/common/lib/Doctrine/Common/EventManager.php
@@ -0,0 +1,136 @@
+.
+ */
+
+namespace Doctrine\Common;
+
+/**
+ * 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
+ * @link www.doctrine-project.org
+ * @since 2.0
+ * @version $Revision: 3938 $
+ * @author Guilherme Blanco
+ * @author Jonathan Wage
+ * @author Roman Borschel
+ */
+class EventManager
+{
+ /**
+ * Map of registered listeners.
+ * =>
+ *
+ * @var array
+ */
+ private $_listeners = array();
+
+ /**
+ * Dispatches an event to all registered listeners.
+ *
+ * @param string $eventName The name of the event to dispatch. The name of the event is
+ * the name of the method that is invoked on listeners.
+ * @param EventArgs $eventArgs The event arguments to pass to the event handlers/listeners.
+ * If not supplied, the single empty EventArgs instance is used.
+ * @return boolean
+ */
+ public function dispatchEvent($eventName, EventArgs $eventArgs = null)
+ {
+ if (isset($this->_listeners[$eventName])) {
+ $eventArgs = $eventArgs === null ? EventArgs::getEmptyInstance() : $eventArgs;
+
+ foreach ($this->_listeners[$eventName] as $listener) {
+ $listener->$eventName($eventArgs);
+ }
+ }
+ }
+
+ /**
+ * Gets the listeners of a specific event or all listeners.
+ *
+ * @param string $event The name of the event.
+ * @return array The event listeners for the specified event, or all event listeners.
+ */
+ public function getListeners($event = null)
+ {
+ return $event ? $this->_listeners[$event] : $this->_listeners;
+ }
+
+ /**
+ * Checks whether an event has any registered listeners.
+ *
+ * @param string $event
+ * @return boolean TRUE if the specified event has any listeners, FALSE otherwise.
+ */
+ public function hasListeners($event)
+ {
+ return isset($this->_listeners[$event]) && $this->_listeners[$event];
+ }
+
+ /**
+ * Adds an event listener that listens on the specified events.
+ *
+ * @param string|array $events The event(s) to listen on.
+ * @param object $listener The listener object.
+ */
+ public function addEventListener($events, $listener)
+ {
+ // Picks the hash code related to that listener
+ $hash = spl_object_hash($listener);
+
+ foreach ((array) $events as $event) {
+ // Overrides listener if a previous one was associated already
+ // Prevents duplicate listeners on same event (same instance only)
+ $this->_listeners[$event][$hash] = $listener;
+ }
+ }
+
+ /**
+ * Removes an event listener from the specified events.
+ *
+ * @param string|array $events
+ * @param object $listener
+ */
+ public function removeEventListener($events, $listener)
+ {
+ // Picks the hash code related to that listener
+ $hash = spl_object_hash($listener);
+
+ foreach ((array) $events as $event) {
+ // Check if actually have this listener associated
+ if (isset($this->_listeners[$event][$hash])) {
+ unset($this->_listeners[$event][$hash]);
+ }
+ }
+ }
+
+ /**
+ * Adds an EventSubscriber. The subscriber is asked for all the events he is
+ * interested in and added as a listener for these events.
+ *
+ * @param Doctrine\Common\EventSubscriber $subscriber The subscriber.
+ */
+ public function addEventSubscriber(EventSubscriber $subscriber)
+ {
+ $this->addEventListener($subscriber->getSubscribedEvents(), $subscriber);
+ }
+}
\ No newline at end of file
diff --git a/vendor/doctrine/common/lib/Doctrine/Common/EventSubscriber.php b/vendor/doctrine/common/lib/Doctrine/Common/EventSubscriber.php
new file mode 100644
index 0000000..ed3383f
--- /dev/null
+++ b/vendor/doctrine/common/lib/Doctrine/Common/EventSubscriber.php
@@ -0,0 +1,45 @@
+.
+ */
+
+namespace Doctrine\Common;
+
+/**
+ * An EventSubscriber knows himself what events he is interested in.
+ * If an EventSubscriber is added to an EventManager, the manager invokes
+ * {@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
+ * @author Guilherme Blanco
+ * @author Jonathan Wage
+ * @author Roman Borschel
+ */
+interface EventSubscriber
+{
+ /**
+ * Returns an array of events this subscriber wants to listen to.
+ *
+ * @return array
+ */
+ function getSubscribedEvents();
+}
diff --git a/vendor/doctrine/common/lib/Doctrine/Common/Lexer.php b/vendor/doctrine/common/lib/Doctrine/Common/Lexer.php
new file mode 100644
index 0000000..8df3b84
--- /dev/null
+++ b/vendor/doctrine/common/lib/Doctrine/Common/Lexer.php
@@ -0,0 +1,266 @@
+.
+ */
+
+namespace Doctrine\Common;
+
+/**
+ * Base class for writing simple lexers, i.e. for creating small DSLs.
+ *
+ * @since 2.0
+ * @author Guilherme Blanco
+ * @author Jonathan Wage
+ * @author Roman Borschel
+ * @todo Rename: AbstractLexer
+ */
+abstract class Lexer
+{
+ /**
+ * @var array Array of scanned tokens
+ */
+ private $tokens = array();
+
+ /**
+ * @var integer Current lexer position in input string
+ */
+ private $position = 0;
+
+ /**
+ * @var integer Current peek of current lexer position
+ */
+ private $peek = 0;
+
+ /**
+ * @var array The next token in the input.
+ */
+ public $lookahead;
+
+ /**
+ * @var array The last matched/seen token.
+ */
+ public $token;
+
+ /**
+ * Sets the input data 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)
+ {
+ $this->tokens = array();
+ $this->reset();
+ $this->scan($input);
+ }
+
+ /**
+ * Resets the lexer.
+ */
+ public function reset()
+ {
+ $this->lookahead = null;
+ $this->token = null;
+ $this->peek = 0;
+ $this->position = 0;
+ }
+
+ /**
+ * Resets the peek pointer to 0.
+ */
+ public function resetPeek()
+ {
+ $this->peek = 0;
+ }
+
+ /**
+ * Resets the lexer position on the input to the given position.
+ *
+ * @param integer $position Position to place the lexical scanner
+ */
+ public function resetPosition($position = 0)
+ {
+ $this->position = $position;
+ }
+
+ /**
+ * Checks whether a given token matches the current lookahead.
+ *
+ * @param integer|string $token
+ * @return boolean
+ */
+ public function isNextToken($token)
+ {
+ return null !== $this->lookahead && $this->lookahead['type'] === $token;
+ }
+
+ /**
+ * Checks whether any of the given tokens matches the current lookahead
+ *
+ * @param array $tokens
+ * @return boolean
+ */
+ public function isNextTokenAny(array $tokens)
+ {
+ return null !== $this->lookahead && in_array($this->lookahead['type'], $tokens, true);
+ }
+
+ /**
+ * 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
+ *
+ * @return array|null the next token; null if there is no more tokens left
+ */
+ public function moveNext()
+ {
+ $this->peek = 0;
+ $this->token = $this->lookahead;
+ $this->lookahead = (isset($this->tokens[$this->position]))
+ ? $this->tokens[$this->position++] : null;
+
+ return $this->lookahead !== null;
+ }
+
+ /**
+ * Tells the lexer to skip input tokens until it sees a token with the given value.
+ *
+ * @param $type The token type to skip until.
+ */
+ public function skipUntil($type)
+ {
+ while ($this->lookahead !== null && $this->lookahead['type'] !== $type) {
+ $this->moveNext();
+ }
+ }
+
+ /**
+ * Checks if given value is identical to the given token
+ *
+ * @param mixed $value
+ * @param integer $token
+ * @return boolean
+ */
+ public function isA($value, $token)
+ {
+ return $this->getType($value) === $token;
+ }
+
+ /**
+ * Moves the lookahead token forward.
+ *
+ * @return array | null The next token or NULL if there are no more tokens ahead.
+ */
+ public function peek()
+ {
+ if (isset($this->tokens[$this->position + $this->peek])) {
+ return $this->tokens[$this->position + $this->peek++];
+ } else {
+ return null;
+ }
+ }
+
+ /**
+ * Peeks at the next token, returns it and immediately resets the peek.
+ *
+ * @return array|null The next token or NULL if there are no more tokens ahead.
+ */
+ public function glimpse()
+ {
+ $peek = $this->peek();
+ $this->peek = 0;
+ return $peek;
+ }
+
+ /**
+ * Scans the input string for tokens.
+ *
+ * @param string $input a query string
+ */
+ protected function scan($input)
+ {
+ static $regex;
+
+ if ( ! isset($regex)) {
+ $regex = '/(' . implode(')|(', $this->getCatchablePatterns()) . ')|'
+ . implode('|', $this->getNonCatchablePatterns()) . '/i';
+ }
+
+ $flags = PREG_SPLIT_NO_EMPTY | PREG_SPLIT_DELIM_CAPTURE | PREG_SPLIT_OFFSET_CAPTURE;
+ $matches = preg_split($regex, $input, -1, $flags);
+
+ foreach ($matches as $match) {
+ // Must remain before 'value' assignment since it can change content
+ $type = $this->getType($match[0]);
+
+ $this->tokens[] = array(
+ 'value' => $match[0],
+ 'type' => $type,
+ 'position' => $match[1],
+ );
+ }
+ }
+
+ /**
+ * Gets the literal for a given token.
+ *
+ * @param integer $token
+ * @return string
+ */
+ public function getLiteral($token)
+ {
+ $className = get_class($this);
+ $reflClass = new \ReflectionClass($className);
+ $constants = $reflClass->getConstants();
+
+ foreach ($constants as $name => $value) {
+ if ($value === $token) {
+ return $className . '::' . $name;
+ }
+ }
+
+ return $token;
+ }
+
+ /**
+ * Lexical catchable patterns.
+ *
+ * @return array
+ */
+ abstract protected function getCatchablePatterns();
+
+ /**
+ * Lexical non-catchable patterns.
+ *
+ * @return array
+ */
+ abstract protected function getNonCatchablePatterns();
+
+ /**
+ * Retrieve token type. Also processes the token value if necessary.
+ *
+ * @param string $value
+ * @return integer
+ */
+ abstract protected function getType(&$value);
+}
\ No newline at end of file
diff --git a/vendor/doctrine/common/lib/Doctrine/Common/NotifyPropertyChanged.php b/vendor/doctrine/common/lib/Doctrine/Common/NotifyPropertyChanged.php
new file mode 100644
index 0000000..93e504a
--- /dev/null
+++ b/vendor/doctrine/common/lib/Doctrine/Common/NotifyPropertyChanged.php
@@ -0,0 +1,45 @@
+.
+ */
+
+namespace Doctrine\Common;
+
+/**
+ * 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
+ * @link www.doctrine-project.org
+ * @since 2.0
+ * @version $Revision: 3938 $
+ * @author Guilherme Blanco
+ * @author Jonathan Wage
+ * @author Roman Borschel
+ */
+interface NotifyPropertyChanged
+{
+ /**
+ * Adds a listener that wants to be notified about property changes.
+ *
+ * @param PropertyChangedListener $listener
+ */
+ function addPropertyChangedListener(PropertyChangedListener $listener);
+}
+
diff --git a/vendor/doctrine/common/lib/Doctrine/Common/Persistence/AbstractManagerRegistry.php b/vendor/doctrine/common/lib/Doctrine/Common/Persistence/AbstractManagerRegistry.php
new file mode 100644
index 0000000..f045286
--- /dev/null
+++ b/vendor/doctrine/common/lib/Doctrine/Common/Persistence/AbstractManagerRegistry.php
@@ -0,0 +1,218 @@
+.
+ */
+
+namespace Doctrine\Common\Persistence;
+
+use Doctrine\Common\Persistence\ManagerRegistry;
+
+/**
+ * Abstract implementation of the ManagerRegistry contract.
+ *
+ * @license http://www.opensource.org/licenses/lgpl-license.php LGPL
+ * @link www.doctrine-project.org
+ * @since 2.2
+ * @author Fabien Potencier
+ * @author Benjamin Eberlei
+ * @author Lukas Kahwe Smith
+ */
+abstract class AbstractManagerRegistry implements ManagerRegistry
+{
+ private $name;
+ private $connections;
+ private $managers;
+ private $defaultConnection;
+ private $defaultManager;
+ private $proxyInterfaceName;
+
+ public function __construct($name, array $connections, array $managers, $defaultConnection, $defaultManager, $proxyInterfaceName)
+ {
+ $this->name = $name;
+ $this->connections = $connections;
+ $this->managers = $managers;
+ $this->defaultConnection = $defaultConnection;
+ $this->defaultManager = $defaultManager;
+ $this->proxyInterfaceName = $proxyInterfaceName;
+ }
+
+ /**
+ * Fetches/creates the given services
+ *
+ * A service in this context is connection or a manager instance
+ *
+ * @param string $name name of the service
+ * @return object instance of the given service
+ */
+ abstract protected function getService($name);
+
+ /**
+ * Resets the given services
+ *
+ * A service in this context is connection or a manager instance
+ *
+ * @param string $name name of the service
+ * @return void
+ */
+ abstract protected function resetService($name);
+
+ /**
+ * Get the name of the registry
+ *
+ * @return string
+ */
+ public function getName()
+ {
+ return $this->name;
+ }
+
+ /**
+ * @inheritdoc
+ */
+ public function getConnection($name = null)
+ {
+ if (null === $name) {
+ $name = $this->defaultConnection;
+ }
+
+ if (!isset($this->connections[$name])) {
+ throw new \InvalidArgumentException(sprintf('Doctrine %s Connection named "%s" does not exist.', $this->name, $name));
+ }
+
+ return $this->getService($this->connections[$name]);
+ }
+
+ /**
+ * @inheritdoc
+ */
+ public function getConnectionNames()
+ {
+ return $this->connections;
+ }
+
+ /**
+ * @inheritdoc
+ */
+ public function getConnections()
+ {
+ $connections = array();
+ foreach ($this->connections as $name => $id) {
+ $connections[$name] = $this->getService($id);
+ }
+
+ return $connections;
+ }
+
+ /**
+ * @inheritdoc
+ */
+ public function getDefaultConnectionName()
+ {
+ return $this->defaultConnection;
+ }
+
+ /**
+ * @inheritdoc
+ */
+ public function getDefaultManagerName()
+ {
+ return $this->defaultManager;
+ }
+
+ /**
+ * @inheritdoc
+ */
+ public function getManager($name = null)
+ {
+ if (null === $name) {
+ $name = $this->defaultManager;
+ }
+
+ if (!isset($this->managers[$name])) {
+ throw new \InvalidArgumentException(sprintf('Doctrine %s Manager named "%s" does not exist.', $this->name, $name));
+ }
+
+ return $this->getService($this->managers[$name]);
+ }
+
+ /**
+ * @inheritdoc
+ */
+ public function getManagerForClass($class)
+ {
+ $proxyClass = new \ReflectionClass($class);
+ if ($proxyClass->implementsInterface($this->proxyInterfaceName)) {
+ $class = $proxyClass->getParentClass()->getName();
+ }
+
+ foreach ($this->managers as $id) {
+ $manager = $this->getService($id);
+
+ if (!$manager->getMetadataFactory()->isTransient($class)) {
+ return $manager;
+ }
+ }
+ }
+
+ /**
+ * @inheritdoc
+ */
+ public function getManagerNames()
+ {
+ return $this->managers;
+ }
+
+ /**
+ * @inheritdoc
+ */
+ public function getManagers()
+ {
+ $dms = array();
+ foreach ($this->managers as $name => $id) {
+ $dms[$name] = $this->getService($id);
+ }
+
+ return $dms;
+ }
+
+ /**
+ * @inheritdoc
+ */
+ public function getRepository($persistentObjectName, $persistentManagerName = null)
+ {
+ return $this->getManager($persistentManagerName)->getRepository($persistentObjectName);
+ }
+
+ /**
+ * @inheritdoc
+ */
+ public function resetManager($name = null)
+ {
+ if (null === $name) {
+ $name = $this->defaultManager;
+ }
+
+ if (!isset($this->managers[$name])) {
+ throw new \InvalidArgumentException(sprintf('Doctrine %s Manager named "%s" does not exist.', $this->name, $name));
+ }
+
+ // force the creation of a new document manager
+ // if the current one is closed
+ $this->resetService($this->managers[$name]);
+ }
+}
diff --git a/vendor/doctrine/common/lib/Doctrine/Common/Persistence/ConnectionRegistry.php b/vendor/doctrine/common/lib/Doctrine/Common/Persistence/ConnectionRegistry.php
new file mode 100644
index 0000000..a47727f
--- /dev/null
+++ b/vendor/doctrine/common/lib/Doctrine/Common/Persistence/ConnectionRegistry.php
@@ -0,0 +1,63 @@
+.
+ */
+
+namespace Doctrine\Common\Persistence;
+
+/**
+ * Contract covering connection for a Doctrine persistence layer ManagerRegistry class to implement.
+ *
+ * @license http://www.opensource.org/licenses/lgpl-license.php LGPL
+ * @link www.doctrine-project.org
+ * @since 2.2
+ * @author Fabien Potencier
+ * @author Benjamin Eberlei
+ * @author Lukas Kahwe Smith
+ */
+interface ConnectionRegistry
+{
+ /**
+ * Gets the default connection name.
+ *
+ * @return string The default connection name
+ */
+ function getDefaultConnectionName();
+
+ /**
+ * Gets the named connection.
+ *
+ * @param string $name The connection name (null for the default one)
+ *
+ * @return Connection
+ */
+ function getConnection($name = null);
+
+ /**
+ * Gets an array of all registered connections
+ *
+ * @return array An array of Connection instances
+ */
+ function getConnections();
+
+ /**
+ * Gets all connection names.
+ *
+ * @return array An array of connection names
+ */
+ function getConnectionNames();
+}
diff --git a/vendor/doctrine/common/lib/Doctrine/Common/Persistence/Event/LifecycleEventArgs.php b/vendor/doctrine/common/lib/Doctrine/Common/Persistence/Event/LifecycleEventArgs.php
new file mode 100644
index 0000000..8055b66
--- /dev/null
+++ b/vendor/doctrine/common/lib/Doctrine/Common/Persistence/Event/LifecycleEventArgs.php
@@ -0,0 +1,77 @@
+.
+*/
+
+namespace Doctrine\Common\Persistence\Event;
+
+use Doctrine\Common\EventArgs;
+use Doctrine\Common\Persistence\ObjectManager;
+
+/**
+ * Lifecycle Events are triggered by the UnitOfWork during lifecycle transitions
+ * of entities.
+ *
+ * @link www.doctrine-project.org
+ * @since 2.2
+ * @author Roman Borschel
+ * @author Benjamin Eberlei
+ */
+class LifecycleEventArgs extends EventArgs
+{
+ /**
+ * @var ObjectManager
+ */
+ private $objectManager;
+
+ /**
+ * @var object
+ */
+ private $entity;
+
+ /**
+ * Constructor
+ *
+ * @param object $entity
+ * @param ObjectManager $objectManager
+ */
+ public function __construct($entity, ObjectManager $objectManager)
+ {
+ $this->entity = $entity;
+ $this->objectManager = $objectManager;
+ }
+
+ /**
+ * Retireve associated Entity.
+ *
+ * @return object
+ */
+ public function getEntity()
+ {
+ return $this->entity;
+ }
+
+ /**
+ * Retrieve associated ObjectManager.
+ *
+ * @return ObjectManager
+ */
+ public function getObjectManager()
+ {
+ return $this->objectManager;
+ }
+}
\ No newline at end of file
diff --git a/vendor/doctrine/common/lib/Doctrine/Common/Persistence/Event/LoadClassMetadataEventArgs.php b/vendor/doctrine/common/lib/Doctrine/Common/Persistence/Event/LoadClassMetadataEventArgs.php
new file mode 100644
index 0000000..4a18d16
--- /dev/null
+++ b/vendor/doctrine/common/lib/Doctrine/Common/Persistence/Event/LoadClassMetadataEventArgs.php
@@ -0,0 +1,76 @@
+.
+ */
+
+namespace Doctrine\Common\Persistence\Event;
+
+use Doctrine\Common\EventArgs;
+use Doctrine\Common\Persistence\ObjectManager;
+use Doctrine\Common\Persistence\Mapping\ClassMetadata;
+
+/**
+ * Class that holds event arguments for a loadMetadata event.
+ *
+ * @author Jonathan H. Wage
+ * @since 2.2
+ */
+class LoadClassMetadataEventArgs extends EventArgs
+{
+ /**
+ * @var ClassMetadata
+ */
+ private $classMetadata;
+
+ /**
+ * @var ObjectManager
+ */
+ private $objectManager;
+
+ /**
+ * Constructor.
+ *
+ * @param ClasseMetadata $classMetadata
+ * @param ObjectManager $objectManager
+ */
+ public function __construct(ClassMetadata $classMetadata, ObjectManager $objectManager)
+ {
+ $this->classMetadata = $classMetadata;
+ $this->objectManager = $objectManager;
+ }
+
+ /**
+ * Retrieve associated ClassMetadata.
+ *
+ * @return ClassMetadata
+ */
+ public function getClassMetadata()
+ {
+ return $this->classMetadata;
+ }
+
+ /**
+ * Retrieve associated ObjectManager.
+ *
+ * @return ObjectManager
+ */
+ public function getObjectManager()
+ {
+ return $this->objectManager;
+ }
+}
+
diff --git a/vendor/doctrine/common/lib/Doctrine/Common/Persistence/Event/ManagerEventArgs.php b/vendor/doctrine/common/lib/Doctrine/Common/Persistence/Event/ManagerEventArgs.php
new file mode 100644
index 0000000..33c4d79
--- /dev/null
+++ b/vendor/doctrine/common/lib/Doctrine/Common/Persistence/Event/ManagerEventArgs.php
@@ -0,0 +1,59 @@
+.
+*/
+
+namespace Doctrine\Common\Persistence\Event;
+
+use Doctrine\Common\Persistence\ObjectManager;
+
+/**
+ * Provides event arguments for the preFlush event.
+ *
+ * @license http://www.opensource.org/licenses/lgpl-license.php LGPL
+ * @link www.doctrine-project.org
+ * @since 2.2
+ * @author Roman Borschel
+ * @author Benjamin Eberlei
+ */
+class ManagerEventArgs extends \Doctrine\Common\EventArgs
+{
+ /**
+ * @var ObjectManager
+ */
+ private $objectManager;
+
+ /**
+ * Constructor.
+ *
+ * @param ObjectManager $objectManager
+ */
+ public function __construct(ObjectManager $objectManager)
+ {
+ $this->objectManager = $objectManager;
+ }
+
+ /**
+ * Retrieve associated ObjectManager.
+ *
+ * @return ObjectManager
+ */
+ public function getObjectManager()
+ {
+ return $this->objectManager;
+ }
+}
\ No newline at end of file
diff --git a/vendor/doctrine/common/lib/Doctrine/Common/Persistence/Event/OnClearEventArgs.php b/vendor/doctrine/common/lib/Doctrine/Common/Persistence/Event/OnClearEventArgs.php
new file mode 100644
index 0000000..f67ab50
--- /dev/null
+++ b/vendor/doctrine/common/lib/Doctrine/Common/Persistence/Event/OnClearEventArgs.php
@@ -0,0 +1,84 @@
+.
+ */
+
+namespace Doctrine\Common\Persistence\Event;
+
+/**
+ * Provides event arguments for the onClear event.
+ *
+ * @license http://www.opensource.org/licenses/lgpl-license.php LGPL
+ * @link www.doctrine-project.org
+ * @since 2.2
+ * @author Roman Borschel
+ * @author Benjamin Eberlei
+ */
+class OnClearEventArgs extends \Doctrine\Common\EventArgs
+{
+ /**
+ * @var ObjectManager
+ */
+ private $objectManager;
+
+ /**
+ * @var string
+ */
+ private $entityClass;
+
+ /**
+ * Constructor.
+ *
+ * @param ObjectManager $objectManager
+ * @param string $entityClass Optional entity class
+ */
+ public function __construct($objectManager, $entityClass = null)
+ {
+ $this->objectManager = $objectManager;
+ $this->entityClass = $entityClass;
+ }
+
+ /**
+ * Retrieve associated ObjectManager.
+ *
+ * @return ObjectManager
+ */
+ public function getObjectManager()
+ {
+ return $this->objectManager;
+ }
+
+ /**
+ * Name of the entity class that is cleared, or empty if all are cleared.
+ *
+ * @return string
+ */
+ public function getEntityClass()
+ {
+ return $this->entityClass;
+ }
+
+ /**
+ * Check if event clears all entities.
+ *
+ * @return bool
+ */
+ public function clearsAllEntities()
+ {
+ return ($this->entityClass === null);
+ }
+}
\ No newline at end of file
diff --git a/vendor/doctrine/common/lib/Doctrine/Common/Persistence/Event/PreUpdateEventArgs.php b/vendor/doctrine/common/lib/Doctrine/Common/Persistence/Event/PreUpdateEventArgs.php
new file mode 100644
index 0000000..191d053
--- /dev/null
+++ b/vendor/doctrine/common/lib/Doctrine/Common/Persistence/Event/PreUpdateEventArgs.php
@@ -0,0 +1,129 @@
+.
+ */
+
+namespace Doctrine\Common\Persistence\Event;
+
+use Doctrine\Common\EventArgs,
+ Doctrine\Common\Persistence\ObjectManager;
+
+/**
+ * Class that holds event arguments for a preUpdate event.
+ *
+ * @author Guilherme Blanco
+ * @author Roman Borschel
+ * @author Benjamin Eberlei
+ * @since 2.2
+ */
+class PreUpdateEventArgs extends LifecycleEventArgs
+{
+ /**
+ * @var array
+ */
+ private $entityChangeSet;
+
+ /**
+ * Constructor.
+ *
+ * @param object $entity
+ * @param ObjectManager $objectManager
+ * @param array $changeSet
+ */
+ public function __construct($entity, ObjectManager $objectManager, array &$changeSet)
+ {
+ parent::__construct($entity, $objectManager);
+
+ $this->entityChangeSet = &$changeSet;
+ }
+
+ /**
+ * Retrieve entity changeset.
+ *
+ * @return array
+ */
+ public function getEntityChangeSet()
+ {
+ return $this->entityChangeSet;
+ }
+
+ /**
+ * Check if field has a changeset.
+ *
+ * @return boolean
+ */
+ public function hasChangedField($field)
+ {
+ return isset($this->entityChangeSet[$field]);
+ }
+
+ /**
+ * Get the old value of the changeset of the changed field.
+ *
+ * @param string $field
+ * @return mixed
+ */
+ public function getOldValue($field)
+ {
+ $this->assertValidField($field);
+
+ return $this->entityChangeSet[$field][0];
+ }
+
+ /**
+ * Get the new value of the changeset of the changed field.
+ *
+ * @param string $field
+ * @return mixed
+ */
+ public function getNewValue($field)
+ {
+ $this->assertValidField($field);
+
+ return $this->entityChangeSet[$field][1];
+ }
+
+ /**
+ * Set the new value of this field.
+ *
+ * @param string $field
+ * @param mixed $value
+ */
+ public function setNewValue($field, $value)
+ {
+ $this->assertValidField($field);
+
+ $this->entityChangeSet[$field][1] = $value;
+ }
+
+ /**
+ * Assert the field exists in changeset.
+ *
+ * @param string $field
+ */
+ private function assertValidField($field)
+ {
+ if ( ! isset($this->entityChangeSet[$field])) {
+ throw new \InvalidArgumentException(sprintf(
+ 'Field "%s" is not a valid field of the entity "%s" in PreUpdateEventArgs.',
+ $field,
+ get_class($this->getEntity())
+ ));
+ }
+ }
+}
+
diff --git a/vendor/doctrine/common/lib/Doctrine/Common/Persistence/ManagerRegistry.php b/vendor/doctrine/common/lib/Doctrine/Common/Persistence/ManagerRegistry.php
new file mode 100644
index 0000000..4d92426
--- /dev/null
+++ b/vendor/doctrine/common/lib/Doctrine/Common/Persistence/ManagerRegistry.php
@@ -0,0 +1,112 @@
+.
+ */
+
+namespace Doctrine\Common\Persistence;
+
+/**
+ * Contract covering object managers for a Doctrine persistence layer ManagerRegistry class to implement.
+ *
+ * @license http://www.opensource.org/licenses/lgpl-license.php LGPL
+ * @link www.doctrine-project.org
+ * @since 2.2
+ * @author Fabien Potencier
+ * @author Benjamin Eberlei
+ * @author Lukas Kahwe Smith
+ */
+interface ManagerRegistry extends ConnectionRegistry
+{
+ /**
+ * Gets the default object manager name.
+ *
+ * @return string The default object manager name
+ */
+ function getDefaultManagerName();
+
+ /**
+ * Gets a named object manager.
+ *
+ * @param string $name The object manager name (null for the default one)
+ *
+ * @return \Doctrine\Common\Persistence\ObjectManager
+ */
+ function getManager($name = null);
+
+ /**
+ * Gets an array of all registered object managers
+ *
+ * @return array An array of ObjectManager instances
+ */
+ function getManagers();
+
+ /**
+ * Resets a named object manager.
+ *
+ * This method is useful when an object manager has been closed
+ * because of a rollbacked transaction AND when you think that
+ * it makes sense to get a new one to replace the closed one.
+ *
+ * Be warned that you will get a brand new object manager as
+ * the existing one is not useable anymore. This means that any
+ * other object with a dependency on this object manager will
+ * hold an obsolete reference. You can inject the registry instead
+ * to avoid this problem.
+ *
+ * @param string $name The object manager name (null for the default one)
+ *
+ * @return \Doctrine\Common\Persistence\ObjectManager
+ */
+ function resetManager($name = null);
+
+ /**
+ * Resolves a registered namespace alias to the full namespace.
+ *
+ * This method looks for the alias in all registered object managers.
+ *
+ * @param string $alias The alias
+ *
+ * @return string The full namespace
+ */
+ function getAliasNamespace($alias);
+
+ /**
+ * Gets all connection names.
+ *
+ * @return array An array of connection names
+ */
+ function getManagerNames();
+
+ /**
+ * Gets the ObjectRepository for an persistent object.
+ *
+ * @param string $persistentObject The name of the persistent object.
+ * @param string $persistentManagerName The object manager name (null for the default one)
+ *
+ * @return \Doctrine\Common\Persistence\ObjectRepository
+ */
+ function getRepository($persistentObject, $persistentManagerName = null);
+
+ /**
+ * Gets the object manager associated with a given class.
+ *
+ * @param string $class A persistent object class name
+ *
+ * @return \Doctrine\Common\Persistence\ObjectManager|null
+ */
+ function getManagerForClass($class);
+}
diff --git a/vendor/doctrine/common/lib/Doctrine/Common/Persistence/Mapping/AbstractClassMetadataFactory.php b/vendor/doctrine/common/lib/Doctrine/Common/Persistence/Mapping/AbstractClassMetadataFactory.php
new file mode 100644
index 0000000..a2a6185
--- /dev/null
+++ b/vendor/doctrine/common/lib/Doctrine/Common/Persistence/Mapping/AbstractClassMetadataFactory.php
@@ -0,0 +1,359 @@
+.
+ */
+
+namespace Doctrine\Common\Persistence\Mapping;
+
+use Doctrine\Common\Cache\Cache;
+
+/**
+ * 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.
+ *
+ * This class was abstracted from the ORM ClassMetadataFactory
+ *
+ * @since 2.2
+ * @author Benjamin Eberlei
+ * @author Guilherme Blanco
+ * @author Jonathan Wage
+ * @author Roman Borschel
+ */
+abstract class AbstractClassMetadataFactory implements ClassMetadataFactory
+{
+ /**
+ * Salt used by specific Object Manager implementation.
+ *
+ * @var string
+ */
+ protected $cacheSalt = "\$CLASSMETADATA";
+
+ /**
+ * @var \Doctrine\Common\Cache\Cache
+ */
+ private $cacheDriver;
+
+ /**
+ * @var array
+ */
+ private $loadedMetadata = array();
+
+ /**
+ * @var bool
+ */
+ protected $initialized = false;
+
+ /**
+ * @var ReflectionService
+ */
+ private $reflectionService;
+
+ /**
+ * Sets the cache driver used by the factory to cache ClassMetadata instances.
+ *
+ * @param Doctrine\Common\Cache\Cache $cacheDriver
+ */
+ public function setCacheDriver(Cache $cacheDriver = null)
+ {
+ $this->cacheDriver = $cacheDriver;
+ }
+
+ /**
+ * Gets the cache driver used by the factory to cache ClassMetadata instances.
+ *
+ * @return Doctrine\Common\Cache\Cache
+ */
+ public function getCacheDriver()
+ {
+ return $this->cacheDriver;
+ }
+
+ /**
+ * Return an array of all the loaded metadata currently in memory.
+ *
+ * @return array
+ */
+ public function getLoadedMetadata()
+ {
+ return $this->loadedMetadata;
+ }
+
+ /**
+ * Forces the factory to load the metadata of all classes known to the underlying
+ * mapping driver.
+ *
+ * @return array The ClassMetadata instances of all mapped classes.
+ */
+ public function getAllMetadata()
+ {
+ if ( ! $this->initialized) {
+ $this->initialize();
+ }
+
+ $driver = $this->getDriver();
+ $metadata = array();
+ foreach ($driver->getAllClassNames() as $className) {
+ $metadata[] = $this->getMetadataFor($className);
+ }
+
+ return $metadata;
+ }
+
+ /**
+ * Lazy initialization of this stuff, especially the metadata driver,
+ * since these are not needed at all when a metadata cache is active.
+ *
+ * @return void
+ */
+ abstract protected function initialize();
+
+ /**
+ * Get the fully qualified class-name from the namespace alias.
+ *
+ * @param string $namespaceAlias
+ * @param string $simpleClassName
+ * @return string
+ */
+ abstract protected function getFqcnFromAlias($namespaceAlias, $simpleClassName);
+
+ /**
+ * Return the mapping driver implementation.
+ *
+ * @return MappingDriver
+ */
+ abstract protected function getDriver();
+
+ /**
+ * Wakeup reflection after ClassMetadata gets unserialized from cache.
+ *
+ * @param ClassMetadata $class
+ * @param ReflectionService $reflService
+ * @return void
+ */
+ abstract protected function wakeupReflection(ClassMetadata $class, ReflectionService $reflService);
+
+ /**
+ * Initialize Reflection after ClassMetadata was constructed.
+ *
+ * @param ClassMetadata $class
+ * @param ReflectionSErvice $reflService
+ * @return void
+ */
+ abstract protected function initializeReflection(ClassMetadata $class, ReflectionService $reflService);
+
+ /**
+ * Gets the class metadata descriptor for a class.
+ *
+ * @param string $className The name of the class.
+ * @return Doctrine\Common\Persistence\Mapping\ClassMetadata
+ */
+ public function getMetadataFor($className)
+ {
+ if ( ! isset($this->loadedMetadata[$className])) {
+ $realClassName = $className;
+
+ // Check for namespace alias
+ if (strpos($className, ':') !== false) {
+ list($namespaceAlias, $simpleClassName) = explode(':', $className);
+ $realClassName = $this->getFqcnFromAlias($namespaceAlias, $simpleClassName);
+
+ if (isset($this->loadedMetadata[$realClassName])) {
+ // We do not have the alias name in the map, include it
+ $this->loadedMetadata[$className] = $this->loadedMetadata[$realClassName];
+
+ return $this->loadedMetadata[$realClassName];
+ }
+ }
+
+ if ($this->cacheDriver) {
+ if (($cached = $this->cacheDriver->fetch($realClassName . $this->cacheSalt)) !== false) {
+ $this->loadedMetadata[$realClassName] = $cached;
+ $this->wakeupReflection($cached, $this->getReflectionService());
+ } else {
+ foreach ($this->loadMetadata($realClassName) as $loadedClassName) {
+ $this->cacheDriver->save(
+ $loadedClassName . $this->cacheSalt, $this->loadedMetadata[$loadedClassName], null
+ );
+ }
+ }
+ } else {
+ $this->loadMetadata($realClassName);
+ }
+
+ if ($className != $realClassName) {
+ // We do not have the alias name in the map, include it
+ $this->loadedMetadata[$className] = $this->loadedMetadata[$realClassName];
+ }
+ }
+
+ return $this->loadedMetadata[$className];
+ }
+
+ /**
+ * Checks whether the factory has the metadata for a class loaded already.
+ *
+ * @param string $className
+ * @return boolean TRUE if the metadata of the class in question is already loaded, FALSE otherwise.
+ */
+ public function hasMetadataFor($className)
+ {
+ return isset($this->loadedMetadata[$className]);
+ }
+
+ /**
+ * Sets the metadata descriptor for a specific class.
+ *
+ * NOTE: This is only useful in very special cases, like when generating proxy classes.
+ *
+ * @param string $className
+ * @param ClassMetadata $class
+ */
+ public function setMetadataFor($className, $class)
+ {
+ $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.
+ $parentClasses = array();
+ foreach (array_reverse($this->getReflectionService()->getParentClasses($name)) as $parentClass) {
+ if ( ! $this->getDriver()->isTransient($parentClass)) {
+ $parentClasses[] = $parentClass;
+ }
+ }
+ return $parentClasses;
+ }
+
+ /**
+ * Loads the metadata of the class in question and all it's ancestors whose metadata
+ * is still not loaded.
+ *
+ * @param string $name The name of the class for which the metadata should get loaded.
+ * @param array $tables The metadata collection to which the loaded metadata is added.
+ */
+ protected function loadMetadata($name)
+ {
+ if ( ! $this->initialized) {
+ $this->initialize();
+ }
+
+ $loaded = array();
+
+ $parentClasses = $this->getParentClasses($name);
+ $parentClasses[] = $name;
+
+ // Move down the hierarchy of parent classes, starting from the topmost class
+ $parent = null;
+ $rootEntityFound = false;
+ $visited = array();
+ $reflService = $this->getReflectionService();
+ foreach ($parentClasses as $className) {
+ if (isset($this->loadedMetadata[$className])) {
+ $parent = $this->loadedMetadata[$className];
+ if (isset($parent->isMappedSuperclass) && $parent->isMappedSuperclass === false) {
+ $rootEntityFound = true;
+ array_unshift($visited, $className);
+ }
+ continue;
+ }
+
+ $class = $this->newClassMetadataInstance($className);
+ $this->initializeReflection($class, $reflService);
+
+ $this->doLoadMetadata($class, $parent, $rootEntityFound);
+
+ $this->loadedMetadata[$className] = $class;
+
+ $parent = $class;
+
+ if (isset($parent->isMappedSuperclass) && $class->isMappedSuperclass === false) {
+ $rootEntityFound = true;
+ array_unshift($visited, $className);
+ }
+
+ $this->wakeupReflection($class, $reflService);
+
+ $loaded[] = $className;
+ }
+
+ return $loaded;
+ }
+
+ /**
+ * Actually load the metadata from the underlying metadata
+ *
+ * @param ClassMetadata $class
+ * @param ClassMetadata $parent
+ * @param bool $rootEntityFound
+ * @return void
+ */
+ abstract protected function doLoadMetadata($class, $parent, $rootEntityFound);
+
+ /**
+ * Creates a new ClassMetadata instance for the given class name.
+ *
+ * @param string $className
+ * @return ClassMetadata
+ */
+ abstract protected function newClassMetadataInstance($className);
+
+ /**
+ * Check if this class is mapped by this Object Manager + ClassMetadata configuration
+ *
+ * @param $class
+ * @return bool
+ */
+ public function isTransient($class)
+ {
+ if ( ! $this->initialized) {
+ $this->initialize();
+ }
+
+ return $this->getDriver()->isTransient($class);
+ }
+
+ /**
+ * Set reflectionService.
+ *
+ * @param ReflectionService $reflectionService
+ */
+ public function setReflectionService(ReflectionService $reflectionService)
+ {
+ $this->reflectionService = $reflectionService;
+ }
+
+ /**
+ * Get the reflection service associated with this metadata factory.
+ *
+ * @return ReflectionService
+ */
+ public function getReflectionService()
+ {
+ if ($this->reflectionService === null) {
+ $this->reflectionService = new RuntimeReflectionService();
+ }
+ return $this->reflectionService;
+ }
+}
diff --git a/vendor/doctrine/common/lib/Doctrine/Common/Persistence/Mapping/ClassMetadata.php b/vendor/doctrine/common/lib/Doctrine/Common/Persistence/Mapping/ClassMetadata.php
new file mode 100644
index 0000000..705d59a
--- /dev/null
+++ b/vendor/doctrine/common/lib/Doctrine/Common/Persistence/Mapping/ClassMetadata.php
@@ -0,0 +1,165 @@
+.
+ */
+
+namespace Doctrine\Common\Persistence\Mapping;
+
+/**
+ * Contract for a Doctrine persistence layer ClassMetadata class to implement.
+ *
+ * @license http://www.opensource.org/licenses/lgpl-license.php LGPL
+ * @link www.doctrine-project.org
+ * @since 2.1
+ * @author Benjamin Eberlei
+ * @author Jonathan Wage
+ */
+interface ClassMetadata
+{
+ /**
+ * Get fully-qualified class name of this persistent class.
+ *
+ * @return string
+ */
+ function getName();
+
+ /**
+ * Gets the mapped identifier field name.
+ *
+ * The returned structure is an array of the identifier field names.
+ *
+ * @return array
+ */
+ function getIdentifier();
+
+ /**
+ * Gets the ReflectionClass instance for this mapped class.
+ *
+ * @return ReflectionClass
+ */
+ function getReflectionClass();
+
+ /**
+ * Checks if the given field name is a mapped identifier for this class.
+ *
+ * @param string $fieldName
+ * @return boolean
+ */
+ function isIdentifier($fieldName);
+
+ /**
+ * Checks if the given field is a mapped property for this class.
+ *
+ * @param string $fieldName
+ * @return boolean
+ */
+ function hasField($fieldName);
+
+ /**
+ * Checks if the given field is a mapped association for this class.
+ *
+ * @param string $fieldName
+ * @return boolean
+ */
+ function hasAssociation($fieldName);
+
+ /**
+ * Checks if the given field is a mapped single valued association for this class.
+ *
+ * @param string $fieldName
+ * @return boolean
+ */
+ function isSingleValuedAssociation($fieldName);
+
+ /**
+ * Checks if the given field is a mapped collection valued association for this class.
+ *
+ * @param string $fieldName
+ * @return boolean
+ */
+ function isCollectionValuedAssociation($fieldName);
+
+ /**
+ * A numerically indexed list of field names of this persistent class.
+ *
+ * This array includes identifier fields if present on this class.
+ *
+ * @return array
+ */
+ function getFieldNames();
+
+ /**
+ * Returns an array of identifier field names numerically indexed.
+ *
+ * @return array
+ */
+ function getIdentifierFieldNames();
+
+ /**
+ * A numerically indexed list of association names of this persistent class.
+ *
+ * This array includes identifier associations if present on this class.
+ *
+ * @return array
+ */
+ function getAssociationNames();
+
+ /**
+ * Returns a type name of this field.
+ *
+ * This type names can be implementation specific but should at least include the php types:
+ * integer, string, boolean, float/double, datetime.
+ *
+ * @param string $fieldName
+ * @return string
+ */
+ function getTypeOfField($fieldName);
+
+ /**
+ * Returns the target class name of the given association.
+ *
+ * @param string $assocName
+ * @return string
+ */
+ function getAssociationTargetClass($assocName);
+
+ /**
+ * Checks if the association is the inverse side of a bidirectional association
+ *
+ * @param string $assocName
+ * @return boolean
+ */
+ function isAssociationInverseSide($assocName);
+
+ /**
+ * Returns the target field of the owning side of the association
+ *
+ * @param string $assocName
+ * @return string
+ */
+ function getAssociationMappedByTargetField($assocName);
+
+ /**
+ * Return the identifier of this object as an array with field name as key.
+ *
+ * Has to return an empty array if no identifier isset.
+ *
+ * @param object $object
+ * @return array
+ */
+ function getIdentifierValues($object);
+}
diff --git a/vendor/doctrine/common/lib/Doctrine/Common/Persistence/Mapping/ClassMetadataFactory.php b/vendor/doctrine/common/lib/Doctrine/Common/Persistence/Mapping/ClassMetadataFactory.php
new file mode 100644
index 0000000..bf27ba9
--- /dev/null
+++ b/vendor/doctrine/common/lib/Doctrine/Common/Persistence/Mapping/ClassMetadataFactory.php
@@ -0,0 +1,74 @@
+.
+ */
+
+namespace Doctrine\Common\Persistence\Mapping;
+
+/**
+ * Contract for a Doctrine persistence layer ClassMetadata class to implement.
+ *
+ * @license http://www.opensource.org/licenses/lgpl-license.php LGPL
+ * @link www.doctrine-project.org
+ * @since 2.1
+ * @author Benjamin Eberlei
+ * @author Jonathan Wage
+ */
+interface ClassMetadataFactory
+{
+ /**
+ * Forces the factory to load the metadata of all classes known to the underlying
+ * mapping driver.
+ *
+ * @return array The ClassMetadata instances of all mapped classes.
+ */
+ function getAllMetadata();
+
+ /**
+ * Gets the class metadata descriptor for a class.
+ *
+ * @param string $className The name of the class.
+ * @return ClassMetadata
+ */
+ function getMetadataFor($className);
+
+ /**
+ * Checks whether the factory has the metadata for a class loaded already.
+ *
+ * @param string $className
+ * @return boolean TRUE if the metadata of the class in question is already loaded, FALSE otherwise.
+ */
+ function hasMetadataFor($className);
+
+ /**
+ * Sets the metadata descriptor for a specific class.
+ *
+ * @param string $className
+ * @param ClassMetadata $class
+ */
+ function setMetadataFor($className, $class);
+
+ /**
+ * Whether the class with the specified name should have its metadata loaded.
+ * This is only the case if it is either mapped directly or as a
+ * MappedSuperclass.
+ *
+ * @param string $className
+ * @return boolean
+ */
+ function isTransient($className);
+}
diff --git a/vendor/doctrine/common/lib/Doctrine/Common/Persistence/Mapping/Driver/AnnotationDriver.php b/vendor/doctrine/common/lib/Doctrine/Common/Persistence/Mapping/Driver/AnnotationDriver.php
new file mode 100644
index 0000000..f52d37e
--- /dev/null
+++ b/vendor/doctrine/common/lib/Doctrine/Common/Persistence/Mapping/Driver/AnnotationDriver.php
@@ -0,0 +1,214 @@
+.
+ */
+
+namespace Doctrine\Common\Persistence\Mapping\Driver;
+
+use Doctrine\Common\Cache\ArrayCache,
+ Doctrine\Common\Annotations\AnnotationReader,
+ Doctrine\Common\Annotations\AnnotationRegistry,
+ Doctrine\Common\Persistence\Mapping\MappingException;
+
+/**
+ * The AnnotationDriver reads the mapping metadata from docblock annotations.
+ *
+ * @since 2.2
+ * @author Benjamin Eberlei
+ * @author Guilherme Blanco
+ * @author Jonathan H. Wage
+ * @author Roman Borschel
+ */
+abstract class AnnotationDriver implements MappingDriver
+{
+ /**
+ * The AnnotationReader.
+ *
+ * @var AnnotationReader
+ */
+ protected $reader;
+
+ /**
+ * The paths where to look for mapping files.
+ *
+ * @var array
+ */
+ protected $paths = array();
+
+ /**
+ * The file extension of mapping documents.
+ *
+ * @var string
+ */
+ protected $fileExtension = '.php';
+
+ /**
+ * Cache for AnnotationDriver#getAllClassNames()
+ *
+ * @var array
+ */
+ protected $classNames;
+
+ /**
+ * Name of the entity annotations as keys
+ *
+ * @var array
+ */
+ protected $entityAnnotationClasses = array();
+
+ /**
+ * Initializes a new AnnotationDriver that uses the given AnnotationReader for reading
+ * docblock annotations.
+ *
+ * @param AnnotationReader $reader The AnnotationReader to use, duck-typed.
+ * @param string|array $paths One or multiple paths where mapping classes can be found.
+ */
+ public function __construct($reader, $paths = null)
+ {
+ $this->reader = $reader;
+ if ($paths) {
+ $this->addPaths((array) $paths);
+ }
+ }
+
+ /**
+ * Append lookup paths to metadata driver.
+ *
+ * @param array $paths
+ */
+ public function addPaths(array $paths)
+ {
+ $this->paths = array_unique(array_merge($this->paths, $paths));
+ }
+
+ /**
+ * Retrieve the defined metadata lookup paths.
+ *
+ * @return array
+ */
+ public function getPaths()
+ {
+ return $this->paths;
+ }
+
+ /**
+ * Retrieve the current annotation reader
+ *
+ * @return AnnotationReader
+ */
+ public function getReader()
+ {
+ return $this->reader;
+ }
+
+ /**
+ * Get the file extension used to look for mapping files under
+ *
+ * @return void
+ */
+ public function getFileExtension()
+ {
+ return $this->fileExtension;
+ }
+
+ /**
+ * Set the file extension used to look for mapping files under
+ *
+ * @param string $fileExtension The file extension to set
+ * @return void
+ */
+ public function setFileExtension($fileExtension)
+ {
+ $this->fileExtension = $fileExtension;
+ }
+
+ /**
+ * 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 an annotation
+ * from the {@see AnnotationDriver::entityAnnotationClasses}.
+ *
+ * @param string $className
+ * @return boolean
+ */
+ public function isTransient($className)
+ {
+ $classAnnotations = $this->reader->getClassAnnotations(new \ReflectionClass($className));
+
+ foreach ($classAnnotations as $annot) {
+ if (isset($this->entityAnnotationClasses[get_class($annot)])) {
+ return false;
+ }
+ }
+ return true;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ 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($path);
+ }
+
+ $iterator = new \RegexIterator(
+ new \RecursiveIteratorIterator(
+ new \RecursiveDirectoryIterator($path, \FilesystemIterator::SKIP_DOTS),
+ \RecursiveIteratorIterator::LEAVES_ONLY
+ ),
+ '/^.+' . str_replace('.', '\.', $this->fileExtension) . '$/i',
+ \RecursiveRegexIterator::GET_MATCH
+ );
+
+ foreach ($iterator as $file) {
+ $sourceFile = realpath($file[0]);
+
+ 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;
+ }
+}
diff --git a/vendor/doctrine/common/lib/Doctrine/Common/Persistence/Mapping/Driver/DefaultFileLocator.php b/vendor/doctrine/common/lib/Doctrine/Common/Persistence/Mapping/Driver/DefaultFileLocator.php
new file mode 100644
index 0000000..efaf545
--- /dev/null
+++ b/vendor/doctrine/common/lib/Doctrine/Common/Persistence/Mapping/Driver/DefaultFileLocator.php
@@ -0,0 +1,169 @@
+.
+*/
+
+namespace Doctrine\Common\Persistence\Mapping\Driver;
+
+use Doctrine\Common\Persistence\Mapping\MappingException;
+
+/**
+ * Locate the file that contains the metadata information for a given class name.
+ *
+ * This behavior is inpependent of the actual content of the file. It just detects
+ * the file which is responsible for the given class name.
+ *
+ * @author Benjamin Eberlei
+ * @author Johannes M. Schmitt
+ */
+class DefaultFileLocator implements FileLocator
+{
+ /**
+ * The paths where to look for mapping files.
+ *
+ * @var array
+ */
+ protected $paths = array();
+
+ /**
+ * The file extension of mapping documents.
+ *
+ * @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.
+ *
+ * @param string|array $paths One or multiple paths where mapping documents can be found.
+ */
+ public function __construct($paths, $fileExtension = null)
+ {
+ $this->addPaths((array) $paths);
+ $this->fileExtension = $fileExtension;
+ }
+
+ /**
+ * Append lookup paths to metadata driver.
+ *
+ * @param array $paths
+ */
+ public function addPaths(array $paths)
+ {
+ $this->paths = array_unique(array_merge($this->paths, $paths));
+ }
+
+ /**
+ * Retrieve the defined metadata lookup paths.
+ *
+ * @return array
+ */
+ public function getPaths()
+ {
+ return $this->paths;
+ }
+
+ /**
+ * Get the file extension used to look for mapping files under
+ *
+ * @return void
+ */
+ public function getFileExtension()
+ {
+ return $this->fileExtension;
+ }
+
+ /**
+ * Set the file extension used to look for mapping files under
+ *
+ * @param string $fileExtension The file extension to set
+ * @return void
+ */
+ public function setFileExtension($fileExtension)
+ {
+ $this->fileExtension = $fileExtension;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public function findMappingFile($className)
+ {
+ $fileName = str_replace('\\', '.', $className) . $this->fileExtension;
+
+ // Check whether file exists
+ foreach ($this->paths as $path) {
+ if (file_exists($path . DIRECTORY_SEPARATOR . $fileName)) {
+ return $path . DIRECTORY_SEPARATOR . $fileName;
+ }
+ }
+
+ throw MappingException::mappingFileNotFound($className, $fileName);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public function getAllClassNames($globalBasename)
+ {
+ $classes = array();
+
+ if ($this->paths) {
+ foreach ($this->paths as $path) {
+ if ( ! is_dir($path)) {
+ throw MappingException::fileMappingDriversRequireConfiguredDirectoryPath($path);
+ }
+
+ $iterator = new \RecursiveIteratorIterator(
+ new \RecursiveDirectoryIterator($path),
+ \RecursiveIteratorIterator::LEAVES_ONLY
+ );
+
+ foreach ($iterator as $file) {
+ $fileName = $file->getBasename($this->fileExtension);
+
+ if ($fileName == $file->getBasename() || $fileName == $globalBasename) {
+ continue;
+ }
+
+ // NOTE: All files found here means classes are not transient!
+ $classes[] = str_replace('.', '\\', $fileName);
+ }
+ }
+ }
+
+ return $classes;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public function fileExists($className)
+ {
+ $fileName = str_replace('\\', '.', $className) . $this->fileExtension;
+
+ // Check whether file exists
+ foreach ((array) $this->paths as $path) {
+ if (file_exists($path . DIRECTORY_SEPARATOR . $fileName)) {
+ return true;
+ }
+ }
+
+ return false;
+ }
+}
\ No newline at end of file
diff --git a/vendor/doctrine/common/lib/Doctrine/Common/Persistence/Mapping/Driver/FileDriver.php b/vendor/doctrine/common/lib/Doctrine/Common/Persistence/Mapping/Driver/FileDriver.php
new file mode 100644
index 0000000..22cf117
--- /dev/null
+++ b/vendor/doctrine/common/lib/Doctrine/Common/Persistence/Mapping/Driver/FileDriver.php
@@ -0,0 +1,178 @@
+.
+ */
+
+namespace Doctrine\Common\Persistence\Mapping\Driver;
+
+use Doctrine\Common\Persistence\Mapping\MappingException;
+
+/**
+ * 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
+ * @link www.doctrine-project.com
+ * @since 2.2
+ * @author Benjamin Eberlei
+ * @author Guilherme Blanco
+ * @author Jonathan H. Wage
+ * @author Roman Borschel
+ */
+abstract class FileDriver implements MappingDriver
+{
+ /**
+ * @var FileLocator
+ */
+ protected $locator;
+
+ /**
+ * @var array
+ */
+ protected $classCache;
+
+ /**
+ * @var string
+ */
+ protected $globalBasename;
+
+ /**
+ * Initializes a new FileDriver that looks in the given path(s) for mapping
+ * documents and operates in the specified operating mode.
+ *
+ * @param string|array|FileLocator $paths A FileLocator or one/multiple paths where mapping documents can be found.
+ * @param string $fileExtension
+ */
+ public function __construct($locator, $fileExtension = null)
+ {
+ if ($locator instanceof FileLocator) {
+ $this->locator = $locator;
+ } else {
+ $this->locator = new DefaultFileLocator((array)$locator, $fileExtension);
+ }
+ }
+
+ public function setGlobalBasename($file)
+ {
+ $this->globalBasename = $file;
+ }
+
+ public function getGlobalBasename()
+ {
+ return $this->globalBasename;
+ }
+
+ /**
+ * 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
+ *
+ * @return array $element The element of schema meta data
+ */
+ public function getElement($className)
+ {
+ if ($this->classCache === null) {
+ $this->initialize();
+ }
+
+ if (isset($this->classCache[$className])) {
+ return $this->classCache[$className];
+ }
+
+ $result = $this->loadMappingFile($this->locator->findMappingFile($className));
+
+ return $result[$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.
+ *
+ * @param string $className
+ * @return boolean
+ */
+ public function isTransient($className)
+ {
+ if ($this->classCache === null) {
+ $this->initialize();
+ }
+
+ if (isset($this->classCache[$className])) {
+ return false;
+ }
+
+ return !$this->locator->fileExists($className);
+ }
+
+ /**
+ * Gets the names of all mapped classes known to this driver.
+ *
+ * @return array The names of all mapped classes known to this driver.
+ */
+ public function getAllClassNames()
+ {
+ if ($this->classCache === null) {
+ $this->initialize();
+ }
+
+ $classNames = (array)$this->locator->getAllClassNames($this->globalBasename);
+ if ($this->classCache) {
+ $classNames = array_merge(array_keys($this->classCache), $classNames);
+ }
+ return $classNames;
+ }
+
+ /**
+ * Loads a mapping file with the given name and returns a map
+ * from class/entity names to their corresponding file driver elements.
+ *
+ * @param string $file The mapping file to load.
+ * @return array
+ */
+ abstract protected function loadMappingFile($file);
+
+ /**
+ * Initialize the class cache from all the global files.
+ *
+ * Using this feature adds a substantial performance hit to file drivers as
+ * more metadata has to be loaded into memory than might actually be
+ * necessary. This may not be relevant to scenarios where caching of
+ * metadata is in place, however hits very hard in scenarios where no
+ * caching is used.
+ *
+ * @return void
+ */
+ protected function initialize()
+ {
+ $this->classCache = array();
+ if (null !== $this->globalBasename) {
+ foreach ($this->locator->getPaths() as $path) {
+ $file = $path.'/'.$this->globalBasename.$this->locator->getFileExtension();
+ if (is_file($file)) {
+ $this->classCache = array_merge(
+ $this->classCache,
+ $this->loadMappingFile($file)
+ );
+ }
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/vendor/doctrine/common/lib/Doctrine/Common/Persistence/Mapping/Driver/FileLocator.php b/vendor/doctrine/common/lib/Doctrine/Common/Persistence/Mapping/Driver/FileLocator.php
new file mode 100644
index 0000000..a1019d7
--- /dev/null
+++ b/vendor/doctrine/common/lib/Doctrine/Common/Persistence/Mapping/Driver/FileLocator.php
@@ -0,0 +1,69 @@
+.
+*/
+
+namespace Doctrine\Common\Persistence\Mapping\Driver;
+
+/**
+ * Locate the file that contains the metadata information for a given class name.
+ *
+ * This behavior is inpependent of the actual content of the file. It just detects
+ * the file which is responsible for the given class name.
+ *
+ * @author Benjamin Eberlei
+ * @author Johannes M. Schmitt
+ */
+interface FileLocator
+{
+ /**
+ * Locate mapping file for the given class name.
+ *
+ * @param string $className
+ * @return string
+ */
+ function findMappingFile($className);
+
+ /**
+ * Get all class names that are found with this file locator.
+ *
+ * @param string $globalBasename Passed to allow excluding the basename
+ * @return array
+ */
+ function getAllClassNames($globalBasename);
+
+ /**
+ * Check if a file can be found for this class name.
+ *
+ * @return bool
+ */
+ function fileExists($className);
+
+ /**
+ * Get all the paths that this file locator looks for mapping files.
+ *
+ * @return array
+ */
+ function getPaths();
+
+ /**
+ * Get the file extension that mapping files are suffixed with.
+ *
+ * @return string
+ */
+ function getFileExtension();
+}
diff --git a/vendor/doctrine/common/lib/Doctrine/Common/Persistence/Mapping/Driver/MappingDriver.php b/vendor/doctrine/common/lib/Doctrine/Common/Persistence/Mapping/Driver/MappingDriver.php
new file mode 100644
index 0000000..c050d32
--- /dev/null
+++ b/vendor/doctrine/common/lib/Doctrine/Common/Persistence/Mapping/Driver/MappingDriver.php
@@ -0,0 +1,56 @@
+.
+ */
+
+namespace Doctrine\Common\Persistence\Mapping\Driver;
+
+use Doctrine\Common\Persistence\Mapping\ClassMetadata;
+
+/**
+ * Contract for metadata drivers.
+ *
+ * @since 2.2
+ * @author Jonathan H. Wage
+ */
+interface MappingDriver
+{
+ /**
+ * Loads the metadata for the specified class into the provided container.
+ *
+ * @param string $className
+ * @param ClassMetadata $metadata
+ */
+ function loadMetadataForClass($className, ClassMetadata $metadata);
+
+ /**
+ * Gets the names of all mapped classes known to this driver.
+ *
+ * @return array The names of all mapped classes known to this driver.
+ */
+ function getAllClassNames();
+
+ /**
+ * 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.
+ *
+ * @param string $className
+ * @return boolean
+ */
+ function isTransient($className);
+}
\ No newline at end of file
diff --git a/vendor/doctrine/common/lib/Doctrine/Common/Persistence/Mapping/Driver/MappingDriverChain.php b/vendor/doctrine/common/lib/Doctrine/Common/Persistence/Mapping/Driver/MappingDriverChain.php
new file mode 100644
index 0000000..c7c1452
--- /dev/null
+++ b/vendor/doctrine/common/lib/Doctrine/Common/Persistence/Mapping/Driver/MappingDriverChain.php
@@ -0,0 +1,125 @@
+.
+ */
+
+namespace Doctrine\Common\Persistence\Mapping\Driver;
+
+use Doctrine\Common\Persistence\Mapping\Driver\MappingDriver,
+ Doctrine\Common\Persistence\Mapping\ClassMetadata,
+ Doctrine\Common\Persistence\Mapping\MappingException;
+
+/**
+ * The DriverChain allows you to add multiple other mapping drivers for
+ * certain namespaces
+ *
+ * @since 2.2
+ * @author Benjamin Eberlei
+ * @author Guilherme Blanco
+ * @author Jonathan H. Wage
+ * @author Roman Borschel
+ */
+class MappingDriverChain implements MappingDriver
+{
+ /**
+ * @var array
+ */
+ private $drivers = array();
+
+ /**
+ * Add a nested driver.
+ *
+ * @param Driver $nestedDriver
+ * @param string $namespace
+ */
+ public function addDriver(MappingDriver $nestedDriver, $namespace)
+ {
+ $this->drivers[$namespace] = $nestedDriver;
+ }
+
+ /**
+ * Get the array of nested drivers.
+ *
+ * @return array $drivers
+ */
+ public function getDrivers()
+ {
+ return $this->drivers;
+ }
+
+ /**
+ * Loads the metadata for the specified class into the provided container.
+ *
+ * @param string $className
+ * @param ClassMetadataInfo $metadata
+ */
+ public function loadMetadataForClass($className, ClassMetadata $metadata)
+ {
+ foreach ($this->drivers as $namespace => $driver) {
+ if (strpos($className, $namespace) === 0) {
+ $driver->loadMetadataForClass($className, $metadata);
+ return;
+ }
+ }
+
+ throw MappingException::classNotFoundInNamespaces($className, array_keys($this->drivers));
+ }
+
+ /**
+ * Gets the names of all mapped classes known to this driver.
+ *
+ * @return array The names of all mapped classes known to this driver.
+ */
+ public function getAllClassNames()
+ {
+ $classNames = array();
+ $driverClasses = array();
+ foreach ($this->drivers AS $namespace => $driver) {
+ $oid = spl_object_hash($driver);
+ if (!isset($driverClasses[$oid])) {
+ $driverClasses[$oid] = $driver->getAllClassNames();
+ }
+
+ foreach ($driverClasses[$oid] AS $className) {
+ if (strpos($className, $namespace) === 0) {
+ $classNames[$className] = true;
+ }
+ }
+ }
+ return array_keys($classNames);
+ }
+
+ /**
+ * Whether the class with the specified name should have its metadata loaded.
+ *
+ * This is only the case for non-transient classes either mapped as an Entity or MappedSuperclass.
+ *
+ * @param string $className
+ * @return boolean
+ */
+ public function isTransient($className)
+ {
+ foreach ($this->drivers AS $namespace => $driver) {
+ if (strpos($className, $namespace) === 0) {
+ return $driver->isTransient($className);
+ }
+ }
+
+ // class isTransient, i.e. not an entity or mapped superclass
+ return true;
+ }
+}
\ No newline at end of file
diff --git a/vendor/doctrine/common/lib/Doctrine/Common/Persistence/Mapping/Driver/PHPDriver.php b/vendor/doctrine/common/lib/Doctrine/Common/Persistence/Mapping/Driver/PHPDriver.php
new file mode 100644
index 0000000..7751dae
--- /dev/null
+++ b/vendor/doctrine/common/lib/Doctrine/Common/Persistence/Mapping/Driver/PHPDriver.php
@@ -0,0 +1,70 @@
+.
+ */
+
+namespace Doctrine\Common\Persistence\Mapping\Driver;
+
+use Doctrine\Common\Persistence\Mapping\ClassMetadata;
+
+/**
+ * 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
+ */
+class PHPDriver extends FileDriver
+{
+ /**
+ * {@inheritdoc}
+ */
+ protected $metadata;
+
+ /**
+ * {@inheritDoc}
+ */
+ public function __construct($locator, $fileExtension = null)
+ {
+ $fileExtension = ".php";
+ parent::__construct($locator, $fileExtension);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function loadMetadataForClass($className, ClassMetadata $metadata)
+ {
+ $this->metadata = $metadata;
+ $this->loadMappingFile($this->locator->findMappingFile($className));
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function loadMappingFile($file)
+ {
+ $metadata = $this->metadata;
+ include $file;
+ }
+}
diff --git a/vendor/doctrine/common/lib/Doctrine/Common/Persistence/Mapping/Driver/StaticPHPDriver.php b/vendor/doctrine/common/lib/Doctrine/Common/Persistence/Mapping/Driver/StaticPHPDriver.php
new file mode 100644
index 0000000..9103ed8
--- /dev/null
+++ b/vendor/doctrine/common/lib/Doctrine/Common/Persistence/Mapping/Driver/StaticPHPDriver.php
@@ -0,0 +1,131 @@
+.
+ */
+
+namespace Doctrine\Common\Persistence\Mapping\Driver;
+
+use Doctrine\Common\Persistence\Mapping\ClassMetadata;
+use Doctrine\Common\Persistence\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.2
+ * @author Benjamin Eberlei
+ * @author Guilherme Blanco
+ * @author Jonathan H. Wage
+ * @author Roman Borschel
+ */
+class StaticPHPDriver implements MappingDriver
+{
+ /**
+ * Paths of entity directories.
+ *
+ * @var array
+ */
+ private $paths = array();
+
+ /**
+ * Map of all class names.
+ *
+ * @var array
+ */
+ private $classNames;
+
+ 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, ClassMetadata $metadata)
+ {
+ $className::loadMetadata($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($path);
+ }
+
+ $iterator = new \RecursiveIteratorIterator(
+ new \RecursiveDirectoryIterator($path),
+ \RecursiveIteratorIterator::LEAVES_ONLY
+ );
+
+ foreach ($iterator as $file) {
+ if ($file->getBasename('.php') == $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');
+ }
+}
diff --git a/vendor/doctrine/common/lib/Doctrine/Common/Persistence/Mapping/Driver/SymfonyFileLocator.php b/vendor/doctrine/common/lib/Doctrine/Common/Persistence/Mapping/Driver/SymfonyFileLocator.php
new file mode 100644
index 0000000..d338cf6
--- /dev/null
+++ b/vendor/doctrine/common/lib/Doctrine/Common/Persistence/Mapping/Driver/SymfonyFileLocator.php
@@ -0,0 +1,198 @@
+.
+*/
+
+namespace Doctrine\Common\Persistence\Mapping\Driver;
+
+use Doctrine\Common\Persistence\Mapping\MappingException;
+
+/**
+ * The Symfony File Locator makes a simplifying assumptions compared
+ * to the DefaultFileLocator. By assuming paths only contain entities of a certain
+ * namespace the mapping files consists of the short classname only.
+ *
+ * @author Fabien Potencier
+ * @author Benjamin Eberlei
+ * @license MIT
+ */
+class SymfonyFileLocator implements FileLocator
+{
+ /**
+ * The paths where to look for mapping files.
+ *
+ * @var array
+ */
+ protected $paths = array();
+
+ /**
+ * A map of mapping directory path to namespace prefix used to expand class shortnames.
+ *
+ * @var array
+ */
+ protected $prefixes = array();
+
+ /**
+ * File extension that is searched for.
+ *
+ * @var string
+ */
+ protected $fileExtension;
+
+ public function __construct(array $prefixes, $fileExtension = null)
+ {
+ $this->addNamespacePrefixes($prefixes);
+ $this->fileExtension = $fileExtension;
+ }
+
+ public function addNamespacePrefixes(array $prefixes)
+ {
+ $this->prefixes = array_merge($this->prefixes, $prefixes);
+ $this->paths = array_merge($this->paths, array_keys($prefixes));
+ }
+
+ public function getNamespacePrefixes()
+ {
+ return $this->prefixes;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public function getPaths()
+ {
+ return $this->paths;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public function getFileExtension()
+ {
+ return $this->fileExtension;
+ }
+
+ /**
+ * Set the file extension used to look for mapping files under
+ *
+ * @param string $fileExtension The file extension to set
+ * @return void
+ */
+ public function setFileExtension($fileExtension)
+ {
+ $this->fileExtension = $fileExtension;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public function fileExists($className)
+ {
+ $defaultFileName = str_replace('\\', '.', $className).$this->fileExtension;
+ foreach ($this->paths as $path) {
+ if (!isset($this->prefixes[$path])) {
+ // global namespace class
+ if (is_file($path.DIRECTORY_SEPARATOR.$defaultFileName)) {
+ return true;
+ }
+
+ continue;
+ }
+
+ $prefix = $this->prefixes[$path];
+
+ if (0 !== strpos($className, $prefix.'\\')) {
+ continue;
+ }
+
+ $filename = $path.'/'.strtr(substr($className, strlen($prefix)+1), '\\', '.').$this->fileExtension;
+ return is_file($filename);
+ }
+
+ return false;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public function getAllClassNames($globalBasename = null)
+ {
+ $classes = array();
+
+ if ($this->paths) {
+ foreach ((array) $this->paths as $path) {
+ if (!is_dir($path)) {
+ throw MappingException::fileMappingDriversRequireConfiguredDirectoryPath($path);
+ }
+
+ $iterator = new \RecursiveIteratorIterator(
+ new \RecursiveDirectoryIterator($path),
+ \RecursiveIteratorIterator::LEAVES_ONLY
+ );
+
+ foreach ($iterator as $file) {
+ $fileName = $file->getBasename($this->fileExtension);
+
+ if ($fileName == $file->getBasename() || $fileName == $globalBasename) {
+ continue;
+ }
+
+ // NOTE: All files found here means classes are not transient!
+ if (isset($this->prefixes[$path])) {
+ $classes[] = $this->prefixes[$path].'\\'.str_replace('.', '\\', $fileName);
+ } else {
+ $classes[] = str_replace('.', '\\', $fileName);
+ }
+ }
+ }
+ }
+
+ return $classes;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public function findMappingFile($className)
+ {
+ $defaultFileName = str_replace('\\', '.', $className).$this->fileExtension;
+ foreach ($this->paths as $path) {
+ if (!isset($this->prefixes[$path])) {
+ if (is_file($path.DIRECTORY_SEPARATOR.$defaultFileName)) {
+ return $path.DIRECTORY_SEPARATOR.$defaultFileName;
+ }
+
+ continue;
+ }
+
+ $prefix = $this->prefixes[$path];
+
+ if (0 !== strpos($className, $prefix.'\\')) {
+ continue;
+ }
+
+ $filename = $path.'/'.strtr(substr($className, strlen($prefix)+1), '\\', '.').$this->fileExtension;
+ if (is_file($filename)) {
+ return $filename;
+ }
+
+ throw MappingException::mappingFileNotFound($className, $filename);
+ }
+
+ throw MappingException::mappingFileNotFound($className, substr($className, strrpos($className, '\\') + 1).$this->fileExtension);
+ }
+}
diff --git a/vendor/doctrine/common/lib/Doctrine/Common/Persistence/Mapping/MappingException.php b/vendor/doctrine/common/lib/Doctrine/Common/Persistence/Mapping/MappingException.php
new file mode 100644
index 0000000..4ecd2ad
--- /dev/null
+++ b/vendor/doctrine/common/lib/Doctrine/Common/Persistence/Mapping/MappingException.php
@@ -0,0 +1,57 @@
+.
+ */
+
+namespace Doctrine\Common\Persistence\Mapping;
+
+/**
+ * A MappingException indicates that something is wrong with the mapping setup.
+ *
+ * @since 2.2
+ */
+class MappingException extends \Exception
+{
+ public static function classNotFoundInNamespaces($className, $namespaces)
+ {
+ return new self("The class '" . $className . "' was not found in the ".
+ "chain configured namespaces " . implode(", ", $namespaces));
+ }
+
+ 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 fileMappingDriversRequireConfiguredDirectoryPath($path = null)
+ {
+ if ( ! empty($path)) {
+ $path = '[' . $path . ']';
+ }
+
+ return new self(
+ 'File mapping drivers must have a valid directory path, ' .
+ 'however the given path ' . $path . ' seems to be incorrect!'
+ );
+ }
+
+ public static function mappingFileNotFound($entityName, $fileName)
+ {
+ return new self("No mapping file found named '$fileName' for class '$entityName'.");
+ }
+}
diff --git a/vendor/doctrine/common/lib/Doctrine/Common/Persistence/Mapping/ReflectionService.php b/vendor/doctrine/common/lib/Doctrine/Common/Persistence/Mapping/ReflectionService.php
new file mode 100644
index 0000000..4e0e312
--- /dev/null
+++ b/vendor/doctrine/common/lib/Doctrine/Common/Persistence/Mapping/ReflectionService.php
@@ -0,0 +1,80 @@
+.
+ */
+
+namespace Doctrine\Common\Persistence\Mapping;
+
+/**
+ * Very simple reflection service abstraction.
+ *
+ * This is required inside metadata layers that may require either
+ * static or runtime reflection.
+ *
+ * @author Benjamin Eberlei
+ */
+interface ReflectionService
+{
+ /**
+ * Return an array of the parent classes (not interfaces) for the given class.
+ *
+ * @param string $class
+ * @return array
+ */
+ function getParentClasses($class);
+
+ /**
+ * Return the shortname of a class.
+ *
+ * @param string $class
+ * @return string
+ */
+ function getClassShortName($class);
+
+ /**
+ * @param string $class
+ * @return string
+ */
+ function getClassNamespace($class);
+
+ /**
+ * Return a reflection class instance or null
+ *
+ * @param string $class
+ * @return ReflectionClass|null
+ */
+ function getClass($class);
+
+ /**
+ * Return an accessible property (setAccessible(true)) or null.
+ *
+ * @param string $class
+ * @param string $property
+ * @return ReflectionProperty|null
+ */
+ function getAccessibleProperty($class, $property);
+
+ /**
+ * Check if the class have a public method with the given name.
+ *
+ * @param mixed $class
+ * @param mixed $method
+ * @return bool
+ */
+ function hasPublicMethod($class, $method);
+}
+
diff --git a/vendor/doctrine/common/lib/Doctrine/Common/Persistence/Mapping/RuntimeReflectionService.php b/vendor/doctrine/common/lib/Doctrine/Common/Persistence/Mapping/RuntimeReflectionService.php
new file mode 100644
index 0000000..abcff58
--- /dev/null
+++ b/vendor/doctrine/common/lib/Doctrine/Common/Persistence/Mapping/RuntimeReflectionService.php
@@ -0,0 +1,102 @@
+.
+ */
+
+namespace Doctrine\Common\Persistence\Mapping;
+
+use ReflectionClass;
+use ReflectionProperty;
+
+/**
+ * PHP Runtime Reflection Service
+ *
+ * @author Benjamin Eberlei
+ */
+class RuntimeReflectionService implements ReflectionService
+{
+ /**
+ * Return an array of the parent classes (not interfaces) for the given class.
+ *
+ * @param string $class
+ * @return array
+ */
+ public function getParentClasses($class)
+ {
+ return class_parents($class);
+ }
+
+ /**
+ * Return the shortname of a class.
+ *
+ * @param string $class
+ * @return string
+ */
+ public function getClassShortName($class)
+ {
+ $r = new ReflectionClass($class);
+ return $r->getShortName();
+ }
+
+ /**
+ * @param string $class
+ * @return string
+ */
+ public function getClassNamespace($class)
+ {
+ $r = new ReflectionClass($class);
+ return $r->getNamespaceName();
+ }
+
+ /**
+ * Return a reflection class instance or null
+ *
+ * @param string $class
+ * @return ReflectionClass|null
+ */
+ public function getClass($class)
+ {
+ return new ReflectionClass($class);
+ }
+
+ /**
+ * Return an accessible property (setAccessible(true)) or null.
+ *
+ * @param string $class
+ * @param string $property
+ * @return ReflectionProperty|null
+ */
+ public function getAccessibleProperty($class, $property)
+ {
+ $property = new ReflectionProperty($class, $property);
+ $property->setAccessible(true);
+ return $property;
+ }
+
+ /**
+ * Check if the class have a public method with the given name.
+ *
+ * @param mixed $class
+ * @param mixed $method
+ * @return bool
+ */
+ public function hasPublicMethod($class, $method)
+ {
+ return method_exists($class, $method) && is_callable(array($class, $method));
+ }
+}
+
diff --git a/vendor/doctrine/common/lib/Doctrine/Common/Persistence/Mapping/StaticReflectionService.php b/vendor/doctrine/common/lib/Doctrine/Common/Persistence/Mapping/StaticReflectionService.php
new file mode 100644
index 0000000..2de6e76
--- /dev/null
+++ b/vendor/doctrine/common/lib/Doctrine/Common/Persistence/Mapping/StaticReflectionService.php
@@ -0,0 +1,107 @@
+.
+ */
+
+namespace Doctrine\Common\Persistence\Mapping;
+
+use ReflectionClass;
+use ReflectionProperty;
+
+/**
+ * PHP Runtime Reflection Service
+ *
+ * @author Benjamin Eberlei
+ */
+class StaticReflectionService implements ReflectionService
+{
+ /**
+ * Return an array of the parent classes (not interfaces) for the given class.
+ *
+ * @param string $class
+ * @return array
+ */
+ public function getParentClasses($class)
+ {
+ return array();
+ }
+
+ /**
+ * Return the shortname of a class.
+ *
+ * @param string $className
+ * @return string
+ */
+ public function getClassShortName($className)
+ {
+ if (strpos($className, '\\') !== false) {
+ $className = substr($className, strrpos($className, "\\")+1);
+ }
+ return $className;
+ }
+
+ /**
+ * Return the namespace of a class.
+ *
+ * @param string $className
+ * @return string
+ */
+ public function getClassNamespace($className)
+ {
+ $namespace = '';
+ if (strpos($className, '\\') !== false) {
+ $namespace = strrev(substr( strrev($className), strpos(strrev($className), '\\')+1 ));
+ }
+ return $namespace;
+ }
+
+ /**
+ * Return a reflection class instance or null
+ *
+ * @param string $class
+ * @return ReflectionClass|null
+ */
+ public function getClass($class)
+ {
+ return null;
+ }
+
+ /**
+ * Return an accessible property (setAccessible(true)) or null.
+ *
+ * @param string $class
+ * @param string $property
+ * @return ReflectionProperty|null
+ */
+ public function getAccessibleProperty($class, $property)
+ {
+ return null;
+ }
+
+ /**
+ * Check if the class have a public method with the given name.
+ *
+ * @param mixed $class
+ * @param mixed $method
+ * @return bool
+ */
+ public function hasPublicMethod($class, $method)
+ {
+ return method_exists($class, $method) && is_callable(array($class, $method));
+ }
+}
+
diff --git a/vendor/doctrine/common/lib/Doctrine/Common/Persistence/ObjectManager.php b/vendor/doctrine/common/lib/Doctrine/Common/Persistence/ObjectManager.php
new file mode 100644
index 0000000..6d70fc1
--- /dev/null
+++ b/vendor/doctrine/common/lib/Doctrine/Common/Persistence/ObjectManager.php
@@ -0,0 +1,143 @@
+.
+ */
+
+namespace Doctrine\Common\Persistence;
+
+/**
+ * Contract for a Doctrine persistence layer ObjectManager class to implement.
+ *
+ * @license http://www.opensource.org/licenses/lgpl-license.php LGPL
+ * @link www.doctrine-project.org
+ * @since 2.1
+ * @author Benjamin Eberlei
+ * @author Jonathan Wage
+ */
+interface ObjectManager
+{
+ /**
+ * Finds a object by its identifier.
+ *
+ * This is just a convenient shortcut for getRepository($className)->find($id).
+ *
+ * @param string
+ * @param mixed
+ * @return object
+ */
+ function find($className, $id);
+
+ /**
+ * Tells the ObjectManager to make an instance managed and persistent.
+ *
+ * The object will be entered into the database as a result of the flush operation.
+ *
+ * NOTE: The persist operation always considers objects that are not yet known to
+ * this ObjectManager as NEW. Do not pass detached objects to the persist operation.
+ *
+ * @param object $object The instance to make managed and persistent.
+ */
+ function persist($object);
+
+ /**
+ * Removes an object instance.
+ *
+ * A removed object will be removed from the database as a result of the flush operation.
+ *
+ * @param object $object The object instance to remove.
+ */
+ function remove($object);
+
+ /**
+ * Merges the state of a detached object into the persistence context
+ * of this ObjectManager and returns the managed copy of the object.
+ * The object passed to merge will not become associated/managed with this ObjectManager.
+ *
+ * @param object $object
+ */
+ function merge($object);
+
+ /**
+ * Detaches an object from the ObjectManager, causing a managed object to
+ * become detached. Unflushed changes made to the object if any
+ * (including removal of the object), will not be synchronized to the database.
+ * Objects which previously referenced the detached object will continue to
+ * reference it.
+ *
+ * @param object $object The object to detach.
+ */
+ function detach($object);
+
+ /**
+ * Refreshes the persistent state of an object from the database,
+ * overriding any local changes that have not yet been persisted.
+ *
+ * @param object $object The object to refresh.
+ */
+ function refresh($object);
+
+ /**
+ * 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.
+ */
+ function flush();
+
+ /**
+ * Gets the repository for a class.
+ *
+ * @param string $className
+ * @return \Doctrine\Common\Persistence\ObjectRepository
+ */
+ function getRepository($className);
+
+ /**
+ * Returns the ClassMetadata descriptor for a class.
+ *
+ * The class name must be the fully-qualified class name without a leading backslash
+ * (as it is returned by get_class($obj)).
+ *
+ * @param string $className
+ * @return \Doctrine\Common\Persistence\Mapping\ClassMetadata
+ */
+ function getClassMetadata($className);
+
+ /**
+ * Gets the metadata factory used to gather the metadata of classes.
+ *
+ * @return Doctrine\Common\Persistence\Mapping\ClassMetadataFactory
+ */
+ function getMetadataFactory();
+
+ /**
+ * Helper method to initialize a lazy loading proxy or persistent collection.
+ *
+ * This method is a no-op for other objects.
+ *
+ * @param object $obj
+ */
+ function initializeObject($obj);
+
+ /**
+ * Check if the object is part of the current UnitOfWork and therefore
+ * managed.
+ *
+ * @param object $object
+ * @return bool
+ */
+ function contains($object);
+}
diff --git a/vendor/doctrine/common/lib/Doctrine/Common/Persistence/ObjectManagerAware.php b/vendor/doctrine/common/lib/Doctrine/Common/Persistence/ObjectManagerAware.php
new file mode 100644
index 0000000..015dd3d
--- /dev/null
+++ b/vendor/doctrine/common/lib/Doctrine/Common/Persistence/ObjectManagerAware.php
@@ -0,0 +1,49 @@
+.
+ */
+
+namespace Doctrine\Common\Persistence;
+
+use Doctrine\Common\Persistence\Mapping\ClassMetadata;
+
+/**
+ * Makes a Persistent Objects aware of its own object-manager.
+ *
+ * Using this interface the managing object manager and class metadata instances
+ * are injected into the persistent object after construction. This allows
+ * you to implement ActiveRecord functionality on top of the persistance-ignorance
+ * that Doctrine propagates.
+ *
+ * Word of Warning: This is a very powerful hook to change how you can work with your domain models.
+ * Using this hook will break the Single Responsibility Principle inside your Domain Objects
+ * and increase the coupling of database and objects.
+ *
+ * Every ObjectManager has to implement this functionality itself.
+ *
+ * @author Benjamin Eberlei
+ */
+interface ObjectManagerAware
+{
+ /**
+ * Injects responsible ObjectManager and the ClassMetadata into this persistent object.
+ *
+ * @param ObjectManager $objectManager
+ * @param ClassMetadata $classMetadata
+ */
+ public function injectObjectManager(ObjectManager $objectManager, ClassMetadata $classMetadata);
+}
diff --git a/vendor/doctrine/common/lib/Doctrine/Common/Persistence/ObjectRepository.php b/vendor/doctrine/common/lib/Doctrine/Common/Persistence/ObjectRepository.php
new file mode 100644
index 0000000..2263328
--- /dev/null
+++ b/vendor/doctrine/common/lib/Doctrine/Common/Persistence/ObjectRepository.php
@@ -0,0 +1,78 @@
+.
+ */
+
+namespace Doctrine\Common\Persistence;
+
+/**
+ * Contract for a Doctrine persistence layer ObjectRepository class to implement.
+ *
+ * @license http://www.opensource.org/licenses/lgpl-license.php LGPL
+ * @link www.doctrine-project.org
+ * @since 2.1
+ * @author Benjamin Eberlei
+ * @author Jonathan Wage
+ */
+interface ObjectRepository
+{
+ /**
+ * Finds an object by its primary key / identifier.
+ *
+ * @param $id The identifier.
+ * @return object The object.
+ */
+ function find($id);
+
+ /**
+ * Finds all objects in the repository.
+ *
+ * @return mixed The objects.
+ */
+ function findAll();
+
+ /**
+ * Finds objects by a set of criteria.
+ *
+ * Optionally sorting and limiting details can be passed. An implementation may throw
+ * an UnexpectedValueException if certain values of the sorting or limiting details are
+ * not supported.
+ *
+ * @throws UnexpectedValueException
+ * @param array $criteria
+ * @param array|null $orderBy
+ * @param int|null $limit
+ * @param int|null $offset
+ * @return mixed The objects.
+ */
+ function findBy(array $criteria, array $orderBy = null, $limit = null, $offset = null);
+
+ /**
+ * Finds a single object by a set of criteria.
+ *
+ * @param array $criteria
+ * @return object The object.
+ */
+ function findOneBy(array $criteria);
+
+ /**
+ * Returns the class name of the object managed by the repository
+ *
+ * @return string
+ */
+ function getClassName();
+}
diff --git a/vendor/doctrine/common/lib/Doctrine/Common/Persistence/PersistentObject.php b/vendor/doctrine/common/lib/Doctrine/Common/Persistence/PersistentObject.php
new file mode 100644
index 0000000..4274af6
--- /dev/null
+++ b/vendor/doctrine/common/lib/Doctrine/Common/Persistence/PersistentObject.php
@@ -0,0 +1,233 @@
+.
+ */
+
+namespace Doctrine\Common\Persistence;
+
+use Doctrine\Common\Persistence\Mapping\ClassMetadata;
+use Doctrine\Common\Collections\ArrayCollection;
+use Doctrine\Common\Collections\Collection;
+
+/**
+ * PersistentObject base class that implements getter/setter methods for all mapped fields and associations
+ * by overriding __call.
+ *
+ * This class is a forward compatible implementation of the PersistentObject trait.
+ *
+ *
+ * Limitations:
+ *
+ * 1. All persistent objects have to be associated with a single ObjectManager, multiple
+ * ObjectManagers are not supported. You can set the ObjectManager with `PersistentObject#setObjectManager()`.
+ * 2. Setters and getters only work if a ClassMetadata instance was injected into the PersistentObject.
+ * This is either done on `postLoad` of an object or by accessing the global object manager.
+ * 3. There are no hooks for setters/getters. Just implement the method yourself instead of relying on __call().
+ * 4. Slower than handcoded implementations: An average of 7 method calls per access to a field and 11 for an association.
+ * 5. Only the inverse side associations get autoset on the owning side aswell. Setting objects on the owning side
+ * will not set the inverse side associations.
+ *
+ * @example
+ *
+ * PersistentObject::setObjectManager($em);
+ *
+ * class Foo extends PersistentObject
+ * {
+ * private $id;
+ * }
+ *
+ * $foo = new Foo();
+ * $foo->getId(); // method exists through __call
+ *
+ * @author Benjamin Eberlei
+ */
+abstract class PersistentObject implements ObjectManagerAware
+{
+ /**
+ * @var ObjectManager
+ */
+ private static $objectManager;
+
+ /**
+ * @var ClassMetadata
+ */
+ private $cm;
+
+ /**
+ * Set the object manager responsible for all persistent object base classes.
+ *
+ * @param ObjectManager $objectManager
+ */
+ static public function setObjectManager(ObjectManager $objectManager = null)
+ {
+ self::$objectManager = $objectManager;
+ }
+
+ /**
+ * @return ObjectManager
+ */
+ static public function getObjectManager()
+ {
+ return self::$objectManager;
+ }
+
+ /**
+ * Inject Doctrine Object Manager
+ *
+ * @param ObjectManager $objectManager
+ * @param ClassMetadata $classMetadata
+ */
+ public function injectObjectManager(ObjectManager $objectManager, ClassMetadata $classMetadata)
+ {
+ if ($objectManager !== self::$objectManager) {
+ throw new \RuntimeException("Trying to use PersistentObject with different ObjectManager instances. " .
+ "Was PersistentObject::setObjectManager() called?");
+ }
+
+ $this->cm = $classMetadata;
+ }
+
+ /**
+ * Sets a persistent fields value.
+ *
+ * @throws InvalidArgumentException - When the wrong target object type is passed to an association
+ * @throws BadMethodCallException - When no persistent field exists by that name.
+ * @param string $field
+ * @param array $args
+ * @return void
+ */
+ private function set($field, $args)
+ {
+ $this->initializeDoctrine();
+
+ if ($this->cm->hasField($field) && !$this->cm->isIdentifier($field)) {
+ $this->$field = $args[0];
+ } else if ($this->cm->hasAssociation($field) && $this->cm->isSingleValuedAssociation($field)) {
+ $targetClass = $this->cm->getAssociationTargetClass($field);
+ if (!($args[0] instanceof $targetClass) && $args[0] !== null) {
+ throw new \InvalidArgumentException("Expected persistent object of type '".$targetClass."'");
+ }
+ $this->$field = $args[0];
+ $this->completeOwningSide($field, $targetClass, $args[0]);
+ } else {
+ throw new \BadMethodCallException("no field with name '".$field."' exists on '".$this->cm->getName()."'");
+ }
+ }
+
+ /**
+ * Get persistent field value.
+ *
+ * @throws BadMethodCallException - When no persistent field exists by that name.
+ * @param string $field
+ * @return mixed
+ */
+ private function get($field)
+ {
+ $this->initializeDoctrine();
+
+ if ( $this->cm->hasField($field) || $this->cm->hasAssociation($field) ) {
+ return $this->$field;
+ } else {
+ throw new \BadMethodCallException("no field with name '".$field."' exists on '".$this->cm->getName()."'");
+ }
+ }
+
+ /**
+ * If this is an inverse side association complete the owning side.
+ *
+ * @param string $field
+ * @param ClassMetadata $targetClass
+ * @param object $targetObject
+ */
+ private function completeOwningSide($field, $targetClass, $targetObject)
+ {
+ // add this object on the owning side aswell, for obvious infinite recursion
+ // reasons this is only done when called on the inverse side.
+ if ($this->cm->isAssociationInverseSide($field)) {
+ $mappedByField = $this->cm->getAssociationMappedByTargetField($field);
+ $targetMetadata = self::$objectManager->getClassMetadata($targetClass);
+
+ $setter = ($targetMetadata->isCollectionValuedAssociation($mappedByField) ? "add" : "set").$mappedByField;
+ $targetObject->$setter($this);
+ }
+ }
+
+ /**
+ * Add an object to a collection
+ *
+ * @param type $field
+ * @param assoc $args
+ */
+ private function add($field, $args)
+ {
+ $this->initializeDoctrine();
+
+ if ($this->cm->hasAssociation($field) && $this->cm->isCollectionValuedAssociation($field)) {
+ $targetClass = $this->cm->getAssociationTargetClass($field);
+ if (!($args[0] instanceof $targetClass)) {
+ throw new \InvalidArgumentException("Expected persistent object of type '".$targetClass."'");
+ }
+ if (!($this->$field instanceof Collection)) {
+ $this->$field = new ArrayCollection($this->$field ?: array());
+ }
+ $this->$field->add($args[0]);
+ $this->completeOwningSide($field, $targetClass, $args[0]);
+ } else {
+ throw new \BadMethodCallException("There is no method add".$field."() on ".$this->cm->getName());
+ }
+ }
+
+ /**
+ * Initialize Doctrine Metadata for this class.
+ *
+ * @return void
+ */
+ private function initializeDoctrine()
+ {
+ if ($this->cm !== null) {
+ return;
+ }
+
+ if (!self::$objectManager) {
+ throw new \RuntimeException("No runtime object manager set. Call PersistentObject#setObjectManager().");
+ }
+
+ $this->cm = self::$objectManager->getClassMetadata(get_class($this));
+ }
+
+ /**
+ * Magic method that implements
+ *
+ * @param string $method
+ * @param array $args
+ * @return mixed
+ */
+ public function __call($method, $args)
+ {
+ $command = substr($method, 0, 3);
+ $field = lcfirst(substr($method, 3));
+ if ($command == "set") {
+ $this->set($field, $args);
+ } else if ($command == "get") {
+ return $this->get($field);
+ } else if ($command == "add") {
+ $this->add($field, $args);
+ } else {
+ throw new \BadMethodCallException("There is no method ".$method." on ".$this->cm->getName());
+ }
+ }
+}
diff --git a/vendor/doctrine/common/lib/Doctrine/Common/Persistence/Proxy.php b/vendor/doctrine/common/lib/Doctrine/Common/Persistence/Proxy.php
new file mode 100644
index 0000000..726979f
--- /dev/null
+++ b/vendor/doctrine/common/lib/Doctrine/Common/Persistence/Proxy.php
@@ -0,0 +1,60 @@
+.
+ */
+
+namespace Doctrine\Common\Persistence;
+
+/**
+ * Interface for proxy classes.
+ *
+ * @author Roman Borschel
+ * @since 2.2
+ */
+interface Proxy
+{
+ /**
+ * Marker for Proxy class names.
+ *
+ * @var string
+ */
+ const MARKER = '__CG__';
+
+ /**
+ * Length of the proxy marker
+ *
+ * @var int
+ */
+ const MARKER_LENGTH = 6;
+
+ /**
+ * Initialize this proxy if its not yet initialized.
+ *
+ * Acts as a no-op if already initialized.
+ *
+ * @return void
+ */
+ public function __load();
+
+ /**
+ * Is this proxy initialized or not.
+ *
+ * @return bool
+ */
+ public function __isInitialized();
+}
diff --git a/vendor/doctrine/common/lib/Doctrine/Common/PropertyChangedListener.php b/vendor/doctrine/common/lib/Doctrine/Common/PropertyChangedListener.php
new file mode 100644
index 0000000..87c5b41
--- /dev/null
+++ b/vendor/doctrine/common/lib/Doctrine/Common/PropertyChangedListener.php
@@ -0,0 +1,48 @@
+.
+ */
+
+namespace Doctrine\Common;
+
+/**
+ * Contract for classes that are potential listeners of a NotifyPropertyChanged
+ * implementor.
+ *
+ * @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
+ */
+interface PropertyChangedListener
+{
+ /**
+ * Notifies the listener of a property change.
+ *
+ * @param object $sender The object on which the property changed.
+ * @param string $propertyName The name of the property that changed.
+ * @param mixed $oldValue The old value of the property that changed.
+ * @param mixed $newValue The new value of the property that changed.
+ */
+ function propertyChanged($sender, $propertyName, $oldValue, $newValue);
+}
+
diff --git a/vendor/doctrine/common/lib/Doctrine/Common/Util/ClassUtils.php b/vendor/doctrine/common/lib/Doctrine/Common/Util/ClassUtils.php
new file mode 100644
index 0000000..c346278
--- /dev/null
+++ b/vendor/doctrine/common/lib/Doctrine/Common/Util/ClassUtils.php
@@ -0,0 +1,103 @@
+.
+ */
+
+namespace Doctrine\Common\Util;
+
+use Doctrine\Common\Persistence\Proxy;
+
+/**
+ * Class and reflection related functionality for objects that
+ * might or not be proxy objects at the moment.
+ *
+ * @author Benjamin Eberlei
+ * @author Johannes Schmitt
+ */
+class ClassUtils
+{
+ /**
+ * Get the real class name of a class name that could be a proxy.
+ *
+ * @param string
+ * @return string
+ */
+ public static function getRealClass($class)
+ {
+ if (false === $pos = strrpos($class, '\\'.Proxy::MARKER.'\\')) {
+ return $class;
+ }
+
+ return substr($class, $pos + Proxy::MARKER_LENGTH + 2);
+ }
+
+ /**
+ * Get the real class name of an object (even if its a proxy)
+ *
+ * @param object
+ * @return string
+ */
+ public static function getClass($object)
+ {
+ return self::getRealClass(get_class($object));
+ }
+
+ /**
+ * Get the real parent class name of a class or object
+ *
+ * @param string
+ * @return string
+ */
+ public static function getParentClass($className)
+ {
+ return get_parent_class( self::getRealClass( $className ) );
+ }
+
+ /**
+ * Create a new reflection class
+ *
+ * @param string
+ * @return ReflectionClass
+ */
+ public static function newReflectionClass($class)
+ {
+ return new \ReflectionClass( self::getRealClass( $class ) );
+ }
+
+ /**
+ * Create a new reflection object
+ *
+ * @param object
+ * @return ReflectionObject
+ */
+ public static function newReflectionObject($object)
+ {
+ return self::newReflectionClass( self::getClass( $object ) );
+ }
+
+ /**
+ * Given a class name and a proxy namespace return the proxy name.
+ *
+ * @param string $className
+ * @param string $proxyNamespace
+ * @return string
+ */
+ public static function generateProxyClassName($className, $proxyNamespace)
+ {
+ return rtrim($proxyNamespace, '\\') . '\\'.Proxy::MARKER.'\\' . ltrim($className, '\\');
+ }
+}
diff --git a/vendor/doctrine/common/lib/Doctrine/Common/Util/Debug.php b/vendor/doctrine/common/lib/Doctrine/Common/Util/Debug.php
new file mode 100644
index 0000000..57ae312
--- /dev/null
+++ b/vendor/doctrine/common/lib/Doctrine/Common/Util/Debug.php
@@ -0,0 +1,123 @@
+.
+ */
+
+namespace Doctrine\Common\Util;
+
+/**
+ * Static class containing most used debug methods.
+ *
+ * @license http://www.opensource.org/licenses/lgpl-license.php LGPL
+ * @link www.doctrine-project.org
+ * @since 2.0
+ * @author Guilherme Blanco
+ * @author Jonathan Wage
+ * @author Roman Borschel
+ * @author Giorgio Sironi
+ */
+final class Debug
+{
+ /**
+ * Private constructor (prevents from instantiation)
+ *
+ */
+ private function __construct() {}
+
+ /**
+ * Prints a dump of the public, protected and private properties of $var.
+ *
+ * @static
+ * @link http://xdebug.org/
+ * @param mixed $var
+ * @param integer $maxDepth Maximum nesting level for object properties
+ * @param boolean $stripTags Flag that indicate if output should strip HTML tags
+ */
+ public static function dump($var, $maxDepth = 2, $stripTags = true)
+ {
+ ini_set('html_errors', 'On');
+
+ if (extension_loaded('xdebug')) {
+ ini_set('xdebug.var_display_max_depth', $maxDepth);
+ }
+
+ $var = self::export($var, $maxDepth++);
+
+ ob_start();
+ var_dump($var);
+ $dump = ob_get_contents();
+ ob_end_clean();
+
+ echo ($stripTags ? strip_tags(html_entity_decode($dump)) : $dump);
+
+ ini_set('html_errors', 'Off');
+ }
+
+ public static function export($var, $maxDepth)
+ {
+ $return = null;
+ $isObj = is_object($var);
+
+ if ($isObj && in_array('Doctrine\Common\Collections\Collection', class_implements($var))) {
+ $var = $var->toArray();
+ }
+
+ if ($maxDepth) {
+ if (is_array($var)) {
+ $return = array();
+
+ foreach ($var as $k => $v) {
+ $return[$k] = self::export($v, $maxDepth - 1);
+ }
+ } else if ($isObj) {
+ $return = new \stdclass();
+ if ($var instanceof \DateTime) {
+ $return->__CLASS__ = "DateTime";
+ $return->date = $var->format('c');
+ $return->timezone = $var->getTimeZone()->getName();
+ } else {
+ $reflClass = ClassUtils::newReflectionObject($var);
+ $return->__CLASS__ = ClassUtils::getClass($var);
+
+ if ($var instanceof \Doctrine\Common\Persistence\Proxy) {
+ $return->__IS_PROXY__ = true;
+ $return->__PROXY_INITIALIZED__ = $var->__isInitialized();
+ }
+
+ foreach ($reflClass->getProperties() as $reflProperty) {
+ $name = $reflProperty->getName();
+
+ $reflProperty->setAccessible(true);
+ $return->$name = self::export($reflProperty->getValue($var), $maxDepth - 1);
+ }
+ }
+ } else {
+ $return = $var;
+ }
+ } else {
+ $return = is_object($var) ? get_class($var)
+ : (is_array($var) ? 'Array(' . count($var) . ')' : $var);
+ }
+
+ return $return;
+ }
+
+ public static function toString($obj)
+ {
+ return method_exists('__toString', $obj) ? (string) $obj : get_class($obj) . '@' . spl_object_hash($obj);
+ }
+}
diff --git a/vendor/doctrine/common/lib/Doctrine/Common/Util/Inflector.php b/vendor/doctrine/common/lib/Doctrine/Common/Util/Inflector.php
new file mode 100644
index 0000000..ba1eb17
--- /dev/null
+++ b/vendor/doctrine/common/lib/Doctrine/Common/Util/Inflector.php
@@ -0,0 +1,72 @@
+.
+ */
+
+namespace 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. The
+ * original author names and emails are not known
+ *
+ * @license http://www.opensource.org/licenses/lgpl-license.php LGPL
+ * @link www.doctrine-project.org
+ * @since 1.0
+ * @version $Revision: 3189 $
+ * @author Konsta Vesterinen
+ * @author Jonathan H. Wage
+ */
+class Inflector
+{
+ /**
+ * Convert word in to the format for a Doctrine table name. Converts 'ModelName' to 'model_name'
+ *
+ * @param string $word Word to tableize
+ * @return string $word Tableized word
+ */
+ public static function tableize($word)
+ {
+ return strtolower(preg_replace('~(?<=\\w)([A-Z])~', '_$1', $word));
+ }
+
+ /**
+ * Convert a word in to the format for a Doctrine class name. Converts 'table_name' to 'TableName'
+ *
+ * @param string $word Word to classify
+ * @return string $word Classified word
+ */
+ public static function classify($word)
+ {
+ return str_replace(" ", "", ucwords(strtr($word, "_-", " ")));
+ }
+
+ /**
+ * Camelize a word. This uses the classify() method and turns the first character to lowercase
+ *
+ * @param string $word
+ * @return string $word
+ */
+ public static function camelize($word)
+ {
+ return lcfirst(self::classify($word));
+ }
+}
\ No newline at end of file
diff --git a/vendor/doctrine/common/lib/Doctrine/Common/Version.php b/vendor/doctrine/common/lib/Doctrine/Common/Version.php
new file mode 100644
index 0000000..b7c9a82
--- /dev/null
+++ b/vendor/doctrine/common/lib/Doctrine/Common/Version.php
@@ -0,0 +1,55 @@
+.
+ */
+
+namespace Doctrine\Common;
+
+/**
+ * Class to store and retrieve the version of 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 Version
+{
+ /**
+ * Current Doctrine Version
+ */
+ const VERSION = '2.2.2';
+
+ /**
+ * Compares a Doctrine version with the current one.
+ *
+ * @param string $version Doctrine version to compare.
+ * @return int Returns -1 if older, 0 if it is the same, 1 if version
+ * passed as argument is newer.
+ */
+ public static function compare($version)
+ {
+ $currentVersion = str_replace(' ', '', strtolower(self::VERSION));
+ $version = str_replace(' ', '', $version);
+
+ return version_compare($version, $currentVersion);
+ }
+}
diff --git a/vendor/doctrine/common/phpunit.xml.dist b/vendor/doctrine/common/phpunit.xml.dist
new file mode 100644
index 0000000..b9d3b34
--- /dev/null
+++ b/vendor/doctrine/common/phpunit.xml.dist
@@ -0,0 +1,31 @@
+
+
+
+
+
+ ./tests/Doctrine/
+
+
+
+
+
+ ./lib/Doctrine/
+
+
+
+
+
+ performance
+
+
+
diff --git a/vendor/doctrine/dbal/.travis.yml b/vendor/doctrine/dbal/.travis.yml
new file mode 100644
index 0000000..ab6fde0
--- /dev/null
+++ b/vendor/doctrine/dbal/.travis.yml
@@ -0,0 +1,20 @@
+language: php
+
+php:
+ - 5.3
+ - 5.4
+env:
+ - DB=mysql
+ - DB=pgsql
+ - DB=sqlite
+
+before_script:
+ - sh -c "if [ '$DB' = 'pgsql' ]; then psql -c 'DROP DATABASE IF EXISTS doctrine_tests;' -U postgres; fi"
+ - sh -c "if [ '$DB' = 'pgsql' ]; then psql -c 'DROP DATABASE IF EXISTS doctrine_tests_tmp;' -U postgres; fi"
+ - sh -c "if [ '$DB' = 'pgsql' ]; then psql -c 'create database doctrine_tests;' -U postgres; fi"
+ - sh -c "if [ '$DB' = 'pgsql' ]; then psql -c 'create database doctrine_tests_tmp;' -U postgres; fi"
+ - sh -c "if [ '$DB' = 'mysql' ]; then mysql -e 'create database IF NOT EXISTS doctrine_tests_tmp;create database IF NOT EXISTS doctrine_tests;'; fi"
+ - git submodule update --init
+
+script: phpunit --configuration tests/travis/$DB.travis.xml
+
diff --git a/vendor/doctrine/dbal/LICENSE b/vendor/doctrine/dbal/LICENSE
new file mode 100644
index 0000000..1c03f74
--- /dev/null
+++ b/vendor/doctrine/dbal/LICENSE
@@ -0,0 +1,504 @@
+ GNU LESSER GENERAL PUBLIC LICENSE
+ Version 2.1, February 1999
+
+ Copyright (C) 1991, 1999 Free Software Foundation, Inc.
+ 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+[This is the first released version of the Lesser GPL. It also counts
+ as the successor of the GNU Library Public License, version 2, hence
+ the version number 2.1.]
+
+ Preamble
+
+ The licenses for most software are designed to take away your
+freedom to share and change it. By contrast, the GNU General Public
+Licenses are intended to guarantee your freedom to share and change
+free software--to make sure the software is free for all its users.
+
+ This license, the Lesser General Public License, applies to some
+specially designated software packages--typically libraries--of the
+Free Software Foundation and other authors who decide to use it. You
+can use it too, but we suggest you first think carefully about whether
+this license or the ordinary General Public License is the better
+strategy to use in any particular case, based on the explanations below.
+
+ When we speak of free software, we are referring to freedom of use,
+not price. Our General Public Licenses are designed to make sure that
+you have the freedom to distribute copies of free software (and charge
+for this service if you wish); that you receive source code or can get
+it if you want it; that you can change the software and use pieces of
+it in new free programs; and that you are informed that you can do
+these things.
+
+ To protect your rights, we need to make restrictions that forbid
+distributors to deny you these rights or to ask you to surrender these
+rights. These restrictions translate to certain responsibilities for
+you if you distribute copies of the library or if you modify it.
+
+ For example, if you distribute copies of the library, whether gratis
+or for a fee, you must give the recipients all the rights that we gave
+you. You must make sure that they, too, receive or can get the source
+code. If you link other code with the library, you must provide
+complete object files to the recipients, so that they can relink them
+with the library after making changes to the library and recompiling
+it. And you must show them these terms so they know their rights.
+
+ We protect your rights with a two-step method: (1) we copyright the
+library, and (2) we offer you this license, which gives you legal
+permission to copy, distribute and/or modify the library.
+
+ To protect each distributor, we want to make it very clear that
+there is no warranty for the free library. Also, if the library is
+modified by someone else and passed on, the recipients should know
+that what they have is not the original version, so that the original
+author's reputation will not be affected by problems that might be
+introduced by others.
+
+ Finally, software patents pose a constant threat to the existence of
+any free program. We wish to make sure that a company cannot
+effectively restrict the users of a free program by obtaining a
+restrictive license from a patent holder. Therefore, we insist that
+any patent license obtained for a version of the library must be
+consistent with the full freedom of use specified in this license.
+
+ Most GNU software, including some libraries, is covered by the
+ordinary GNU General Public License. This license, the GNU Lesser
+General Public License, applies to certain designated libraries, and
+is quite different from the ordinary General Public License. We use
+this license for certain libraries in order to permit linking those
+libraries into non-free programs.
+
+ When a program is linked with a library, whether statically or using
+a shared library, the combination of the two is legally speaking a
+combined work, a derivative of the original library. The ordinary
+General Public License therefore permits such linking only if the
+entire combination fits its criteria of freedom. The Lesser General
+Public License permits more lax criteria for linking other code with
+the library.
+
+ We call this license the "Lesser" General Public License because it
+does Less to protect the user's freedom than the ordinary General
+Public License. It also provides other free software developers Less
+of an advantage over competing non-free programs. These disadvantages
+are the reason we use the ordinary General Public License for many
+libraries. However, the Lesser license provides advantages in certain
+special circumstances.
+
+ For example, on rare occasions, there may be a special need to
+encourage the widest possible use of a certain library, so that it becomes
+a de-facto standard. To achieve this, non-free programs must be
+allowed to use the library. A more frequent case is that a free
+library does the same job as widely used non-free libraries. In this
+case, there is little to gain by limiting the free library to free
+software only, so we use the Lesser General Public License.
+
+ In other cases, permission to use a particular library in non-free
+programs enables a greater number of people to use a large body of
+free software. For example, permission to use the GNU C Library in
+non-free programs enables many more people to use the whole GNU
+operating system, as well as its variant, the GNU/Linux operating
+system.
+
+ Although the Lesser General Public License is Less protective of the
+users' freedom, it does ensure that the user of a program that is
+linked with the Library has the freedom and the wherewithal to run
+that program using a modified version of the Library.
+
+ The precise terms and conditions for copying, distribution and
+modification follow. Pay close attention to the difference between a
+"work based on the library" and a "work that uses the library". The
+former contains code derived from the library, whereas the latter must
+be combined with the library in order to run.
+
+ GNU LESSER GENERAL PUBLIC LICENSE
+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+ 0. This License Agreement applies to any software library or other
+program which contains a notice placed by the copyright holder or
+other authorized party saying it may be distributed under the terms of
+this Lesser General Public License (also called "this License").
+Each licensee is addressed as "you".
+
+ A "library" means a collection of software functions and/or data
+prepared so as to be conveniently linked with application programs
+(which use some of those functions and data) to form executables.
+
+ The "Library", below, refers to any such software library or work
+which has been distributed under these terms. A "work based on the
+Library" means either the Library or any derivative work under
+copyright law: that is to say, a work containing the Library or a
+portion of it, either verbatim or with modifications and/or translated
+straightforwardly into another language. (Hereinafter, translation is
+included without limitation in the term "modification".)
+
+ "Source code" for a work means the preferred form of the work for
+making modifications to it. For a library, complete source code means
+all the source code for all modules it contains, plus any associated
+interface definition files, plus the scripts used to control compilation
+and installation of the library.
+
+ Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope. The act of
+running a program using the Library is not restricted, and output from
+such a program is covered only if its contents constitute a work based
+on the Library (independent of the use of the Library in a tool for
+writing it). Whether that is true depends on what the Library does
+and what the program that uses the Library does.
+
+ 1. You may copy and distribute verbatim copies of the Library's
+complete source code as you receive it, in any medium, provided that
+you conspicuously and appropriately publish on each copy an
+appropriate copyright notice and disclaimer of warranty; keep intact
+all the notices that refer to this License and to the absence of any
+warranty; and distribute a copy of this License along with the
+Library.
+
+ You may charge a fee for the physical act of transferring a copy,
+and you may at your option offer warranty protection in exchange for a
+fee.
+
+ 2. You may modify your copy or copies of the Library or any portion
+of it, thus forming a work based on the Library, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+ a) The modified work must itself be a software library.
+
+ b) You must cause the files modified to carry prominent notices
+ stating that you changed the files and the date of any change.
+
+ c) You must cause the whole of the work to be licensed at no
+ charge to all third parties under the terms of this License.
+
+ d) If a facility in the modified Library refers to a function or a
+ table of data to be supplied by an application program that uses
+ the facility, other than as an argument passed when the facility
+ is invoked, then you must make a good faith effort to ensure that,
+ in the event an application does not supply such function or
+ table, the facility still operates, and performs whatever part of
+ its purpose remains meaningful.
+
+ (For example, a function in a library to compute square roots has
+ a purpose that is entirely well-defined independent of the
+ application. Therefore, Subsection 2d requires that any
+ application-supplied function or table used by this function must
+ be optional: if the application does not supply it, the square
+ root function must still compute square roots.)
+
+These requirements apply to the modified work as a whole. If
+identifiable sections of that work are not derived from the Library,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works. But when you
+distribute the same sections as part of a whole which is a work based
+on the Library, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote
+it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Library.
+
+In addition, mere aggregation of another work not based on the Library
+with the Library (or with a work based on the Library) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+ 3. You may opt to apply the terms of the ordinary GNU General Public
+License instead of this License to a given copy of the Library. To do
+this, you must alter all the notices that refer to this License, so
+that they refer to the ordinary GNU General Public License, version 2,
+instead of to this License. (If a newer version than version 2 of the
+ordinary GNU General Public License has appeared, then you can specify
+that version instead if you wish.) Do not make any other change in
+these notices.
+
+ Once this change is made in a given copy, it is irreversible for
+that copy, so the ordinary GNU General Public License applies to all
+subsequent copies and derivative works made from that copy.
+
+ This option is useful when you wish to copy part of the code of
+the Library into a program that is not a library.
+
+ 4. You may copy and distribute the Library (or a portion or
+derivative of it, under Section 2) in object code or executable form
+under the terms of Sections 1 and 2 above provided that you accompany
+it with the complete corresponding machine-readable source code, which
+must be distributed under the terms of Sections 1 and 2 above on a
+medium customarily used for software interchange.
+
+ If distribution of object code is made by offering access to copy
+from a designated place, then offering equivalent access to copy the
+source code from the same place satisfies the requirement to
+distribute the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+ 5. A program that contains no derivative of any portion of the
+Library, but is designed to work with the Library by being compiled or
+linked with it, is called a "work that uses the Library". Such a
+work, in isolation, is not a derivative work of the Library, and
+therefore falls outside the scope of this License.
+
+ However, linking a "work that uses the Library" with the Library
+creates an executable that is a derivative of the Library (because it
+contains portions of the Library), rather than a "work that uses the
+library". The executable is therefore covered by this License.
+Section 6 states terms for distribution of such executables.
+
+ When a "work that uses the Library" uses material from a header file
+that is part of the Library, the object code for the work may be a
+derivative work of the Library even though the source code is not.
+Whether this is true is especially significant if the work can be
+linked without the Library, or if the work is itself a library. The
+threshold for this to be true is not precisely defined by law.
+
+ If such an object file uses only numerical parameters, data
+structure layouts and accessors, and small macros and small inline
+functions (ten lines or less in length), then the use of the object
+file is unrestricted, regardless of whether it is legally a derivative
+work. (Executables containing this object code plus portions of the
+Library will still fall under Section 6.)
+
+ Otherwise, if the work is a derivative of the Library, you may
+distribute the object code for the work under the terms of Section 6.
+Any executables containing that work also fall under Section 6,
+whether or not they are linked directly with the Library itself.
+
+ 6. As an exception to the Sections above, you may also combine or
+link a "work that uses the Library" with the Library to produce a
+work containing portions of the Library, and distribute that work
+under terms of your choice, provided that the terms permit
+modification of the work for the customer's own use and reverse
+engineering for debugging such modifications.
+
+ You must give prominent notice with each copy of the work that the
+Library is used in it and that the Library and its use are covered by
+this License. You must supply a copy of this License. If the work
+during execution displays copyright notices, you must include the
+copyright notice for the Library among them, as well as a reference
+directing the user to the copy of this License. Also, you must do one
+of these things:
+
+ a) Accompany the work with the complete corresponding
+ machine-readable source code for the Library including whatever
+ changes were used in the work (which must be distributed under
+ Sections 1 and 2 above); and, if the work is an executable linked
+ with the Library, with the complete machine-readable "work that
+ uses the Library", as object code and/or source code, so that the
+ user can modify the Library and then relink to produce a modified
+ executable containing the modified Library. (It is understood
+ that the user who changes the contents of definitions files in the
+ Library will not necessarily be able to recompile the application
+ to use the modified definitions.)
+
+ b) Use a suitable shared library mechanism for linking with the
+ Library. A suitable mechanism is one that (1) uses at run time a
+ copy of the library already present on the user's computer system,
+ rather than copying library functions into the executable, and (2)
+ will operate properly with a modified version of the library, if
+ the user installs one, as long as the modified version is
+ interface-compatible with the version that the work was made with.
+
+ c) Accompany the work with a written offer, valid for at
+ least three years, to give the same user the materials
+ specified in Subsection 6a, above, for a charge no more
+ than the cost of performing this distribution.
+
+ d) If distribution of the work is made by offering access to copy
+ from a designated place, offer equivalent access to copy the above
+ specified materials from the same place.
+
+ e) Verify that the user has already received a copy of these
+ materials or that you have already sent this user a copy.
+
+ For an executable, the required form of the "work that uses the
+Library" must include any data and utility programs needed for
+reproducing the executable from it. However, as a special exception,
+the materials to be distributed need not include anything that is
+normally distributed (in either source or binary form) with the major
+components (compiler, kernel, and so on) of the operating system on
+which the executable runs, unless that component itself accompanies
+the executable.
+
+ It may happen that this requirement contradicts the license
+restrictions of other proprietary libraries that do not normally
+accompany the operating system. Such a contradiction means you cannot
+use both them and the Library together in an executable that you
+distribute.
+
+ 7. You may place library facilities that are a work based on the
+Library side-by-side in a single library together with other library
+facilities not covered by this License, and distribute such a combined
+library, provided that the separate distribution of the work based on
+the Library and of the other library facilities is otherwise
+permitted, and provided that you do these two things:
+
+ a) Accompany the combined library with a copy of the same work
+ based on the Library, uncombined with any other library
+ facilities. This must be distributed under the terms of the
+ Sections above.
+
+ b) Give prominent notice with the combined library of the fact
+ that part of it is a work based on the Library, and explaining
+ where to find the accompanying uncombined form of the same work.
+
+ 8. You may not copy, modify, sublicense, link with, or distribute
+the Library except as expressly provided under this License. Any
+attempt otherwise to copy, modify, sublicense, link with, or
+distribute the Library is void, and will automatically terminate your
+rights under this License. However, parties who have received copies,
+or rights, from you under this License will not have their licenses
+terminated so long as such parties remain in full compliance.
+
+ 9. You are not required to accept this License, since you have not
+signed it. However, nothing else grants you permission to modify or
+distribute the Library or its derivative works. These actions are
+prohibited by law if you do not accept this License. Therefore, by
+modifying or distributing the Library (or any work based on the
+Library), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Library or works based on it.
+
+ 10. Each time you redistribute the Library (or any work based on the
+Library), the recipient automatically receives a license from the
+original licensor to copy, distribute, link with or modify the Library
+subject to these terms and conditions. You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties with
+this License.
+
+ 11. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License. If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Library at all. For example, if a patent
+license would not permit royalty-free redistribution of the Library by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Library.
+
+If any portion of this section is held invalid or unenforceable under any
+particular circumstance, the balance of the section is intended to apply,
+and the section as a whole is intended to apply in other circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system which is
+implemented by public license practices. Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+ 12. If the distribution and/or use of the Library is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Library under this License may add
+an explicit geographical distribution limitation excluding those countries,
+so that distribution is permitted only in or among countries not thus
+excluded. In such case, this License incorporates the limitation as if
+written in the body of this License.
+
+ 13. The Free Software Foundation may publish revised and/or new
+versions of the Lesser General Public License from time to time.
+Such new versions will be similar in spirit to the present version,
+but may differ in detail to address new problems or concerns.
+
+Each version is given a distinguishing version number. If the Library
+specifies a version number of this License which applies to it and
+"any later version", you have the option of following the terms and
+conditions either of that version or of any later version published by
+the Free Software Foundation. If the Library does not specify a
+license version number, you may choose any version ever published by
+the Free Software Foundation.
+
+ 14. If you wish to incorporate parts of the Library into other free
+programs whose distribution conditions are incompatible with these,
+write to the author to ask for permission. For software which is
+copyrighted by the Free Software Foundation, write to the Free
+Software Foundation; we sometimes make exceptions for this. Our
+decision will be guided by the two goals of preserving the free status
+of all derivatives of our free software and of promoting the sharing
+and reuse of software generally.
+
+ NO WARRANTY
+
+ 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
+WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
+EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
+OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
+KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
+LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
+THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+ 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
+WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
+AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
+FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
+CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
+LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
+RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
+FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
+SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
+DAMAGES.
+
+ END OF TERMS AND CONDITIONS
+
+ How to Apply These Terms to Your New Libraries
+
+ If you develop a new library, and you want it to be of the greatest
+possible use to the public, we recommend making it free software that
+everyone can redistribute and change. You can do so by permitting
+redistribution under these terms (or, alternatively, under the terms of the
+ordinary General Public License).
+
+ To apply these terms, attach the following notices to the library. It is
+safest to attach them to the start of each source file to most effectively
+convey the exclusion of warranty; and each file should have at least the
+"copyright" line and a pointer to where the full notice is found.
+
+
+ Copyright (C)
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with this library; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+Also add information on how to contact you by electronic and paper mail.
+
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a "copyright disclaimer" for the library, if
+necessary. Here is a sample; alter the names:
+
+ Yoyodyne, Inc., hereby disclaims all copyright interest in the
+ library `Frob' (a library for tweaking knobs) written by James Random Hacker.
+
+ , 1 April 1990
+ Ty Coon, President of Vice
+
+That's all there is to it!
+
+
diff --git a/vendor/doctrine/dbal/README.md b/vendor/doctrine/dbal/README.md
new file mode 100644
index 0000000..70617c3
--- /dev/null
+++ b/vendor/doctrine/dbal/README.md
@@ -0,0 +1,14 @@
+# Doctrine DBAL
+
+Powerful database abstraction layer with many features for database schema introspection, schema management and PDO abstraction.
+
+* Master: [![Build Status](https://secure.travis-ci.org/doctrine/dbal.png?branch=master)](http://travis-ci.org/doctrine/dbal)
+* Master: [![Build Status](https://secure.travis-ci.org/doctrine/dbal.png?branch=2.2)](http://travis-ci.org/doctrine/dbal)
+* 2.1.x: [![Build Status](https://secure.travis-ci.org/doctrine/dbal.png?branch=2.1.x)](http://travis-ci.org/doctrine/dbal)
+
+## More resources:
+
+* [Website](http://www.doctrine-project.org)
+* [Documentation](http://www.doctrine-project.org/projects/dbal/current/docs/en)
+* [Issue Tracker](http://www.doctrine-project.org/jira/browse/DBAL)
+* [Downloads](http://github.com/doctrine/dbal/downloads)
diff --git a/vendor/doctrine/dbal/UPGRADE b/vendor/doctrine/dbal/UPGRADE
new file mode 100644
index 0000000..9466d7a
--- /dev/null
+++ b/vendor/doctrine/dbal/UPGRADE
@@ -0,0 +1,72 @@
+# Upgrade to 2.2
+
+## Doctrine\DBAL\Connection#insert and Doctrine\DBAL\Connnection#update
+
+Both methods now accept an optional last parameter $types with binding types of the values passed.
+This can potentially break child classes that have overwritten one of these methods.
+
+## Doctrine\DBAL\Connection#executeQuery
+
+Doctrine\DBAL\Connection#executeQuery() got a new last parameter "QueryCacheProfile $qcp"
+
+## Doctrine\DBAL\Driver\Statement split
+
+The Driver statement was split into a ResultStatement and the normal statement extending from it.
+This seperates the configuration and the retrieval API from a statement.
+
+## MsSql Platform/SchemaManager renamed
+
+The MsSqlPlatform was renamed to SQLServerPlatform, the MsSqlSchemaManager was renamed
+to SQLServerSchemaManager.
+
+## Cleanup SQLServer Platform version mess
+
+DBAL 2.1 and before were actually only compatible to SQL Server 2008, not earlier versions.
+Still other parts of the platform did use old features instead of newly introduced datatypes
+in SQL Server 2005. Starting with DBAL 2.2 you can pick the Doctrine abstraction exactly
+matching your SQL Server version.
+
+The PDO SqlSrv driver now uses the new `SQLServer2008Platform` as default platform.
+This platform uses new features of SQL Server as of version 2008. This also includes a switch
+in the used fields for "text" and "blob" field types to:
+
+ "text" => "VARCHAR(MAX)"
+ "blob" => "VARBINARY(MAX)"
+
+Additionally `SQLServerPlatform` in DBAL 2.1 and before used "DATE", "TIME" and "DATETIME2" for dates.
+This types are only available since version 2008 and the introduction of an explicit
+SQLServer 2008 platform makes this dependency explicit.
+
+An `SQLServer2005Platform` was also introduced to differentiate the features between
+versions 2003, earlier and 2005.
+
+With this change the `SQLServerPlatform` now throws an exception for using limit queries
+with an offset, since SQLServer 2003 and lower do not support this feature.
+
+To use the old SQL Server Platform, because you are using SQL Server 2003 and below use
+the following configuration code:
+
+ use Doctrine\DBAL\DriverManager;
+ use Doctrine\DBAL\Platforms\SQLServerPlatform;
+ use Doctrine\DBAL\Platforms\SQLServer2005Platform;
+
+ // You are using SQL Server 2003 or earlier
+ $conn = DriverManager::getConnection(array(
+ 'driver' => 'pdo_sqlsrv',
+ 'platform' => new SQLServerPlatform()
+ // .. additional parameters
+ ));
+
+ // You are using SQL Server 2005
+ $conn = DriverManager::getConnection(array(
+ 'driver' => 'pdo_sqlsrv',
+ 'platform' => new SQLServer2005Platform()
+ // .. additional parameters
+ ));
+
+ // You are using SQL Server 2008
+ $conn = DriverManager::getConnection(array(
+ 'driver' => 'pdo_sqlsrv',
+ // 2008 is default platform
+ // .. additional parameters
+ ));
diff --git a/vendor/doctrine/dbal/composer.json b/vendor/doctrine/dbal/composer.json
new file mode 100644
index 0000000..9fca5d3
--- /dev/null
+++ b/vendor/doctrine/dbal/composer.json
@@ -0,0 +1,21 @@
+{
+ "name": "doctrine/dbal",
+ "type": "library",
+ "description": "Database Abstraction Layer",
+ "keywords": ["dbal", "database", "persistence", "queryobject"],
+ "homepage": "http://www.doctrine-project.org",
+ "license": "LGPL",
+ "authors": [
+ {"name": "Guilherme Blanco", "email": "guilhermeblanco@gmail.com"},
+ {"name": "Roman Borschel", "email": "roman@code-factory.org"},
+ {"name": "Benjamin Eberlei", "email": "kontakt@beberlei.de"},
+ {"name": "Jonathan Wage", "email": "jonwage@gmail.com"}
+ ],
+ "require": {
+ "php": ">=5.3.2",
+ "doctrine/common": ">=2.2.0,<=2.2.99"
+ },
+ "autoload": {
+ "psr-0": { "Doctrine\\DBAL": "lib/" }
+ }
+}
diff --git a/vendor/doctrine/dbal/lib/Doctrine/DBAL/Cache/ArrayStatement.php b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Cache/ArrayStatement.php
new file mode 100644
index 0000000..4818cd2
--- /dev/null
+++ b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Cache/ArrayStatement.php
@@ -0,0 +1,98 @@
+.
+ */
+
+namespace Doctrine\DBAL\Cache;
+
+use Doctrine\DBAL\Driver\ResultStatement;
+use PDO;
+
+class ArrayStatement implements \IteratorAggregate, ResultStatement
+{
+ private $data;
+ private $columnCount = 0;
+ private $num = 0;
+ private $defaultFetchStyle = PDO::FETCH_BOTH;
+
+ public function __construct(array $data)
+ {
+ $this->data = $data;
+ if (count($data)) {
+ $this->columnCount = count($data[0]);
+ }
+ }
+
+ public function closeCursor()
+ {
+ unset ($this->data);
+ }
+
+ public function columnCount()
+ {
+ return $this->columnCount;
+ }
+
+ public function setFetchMode($fetchStyle, $arg2 = null, $arg3 = null)
+ {
+ if ($arg2 !== null || $arg3 !== null) {
+ throw new \InvalidArgumentException("Caching layer does not support 2nd/3rd argument to setFetchMode()");
+ }
+
+ $this->defaultFetchStyle = $fetchStyle;
+ }
+
+ public function getIterator()
+ {
+ $data = $this->fetchAll($this->defaultFetchStyle);
+ return new \ArrayIterator($data);
+ }
+
+ public function fetch($fetchStyle = PDO::FETCH_BOTH)
+ {
+ if (isset($this->data[$this->num])) {
+ $row = $this->data[$this->num++];
+ if ($fetchStyle === PDO::FETCH_ASSOC) {
+ return $row;
+ } else if ($fetchStyle === PDO::FETCH_NUM) {
+ return array_values($row);
+ } else if ($fetchStyle === PDO::FETCH_BOTH) {
+ return array_merge($row, array_values($row));
+ }
+ }
+ return false;
+ }
+
+ public function fetchAll($fetchStyle = PDO::FETCH_BOTH)
+ {
+ $rows = array();
+ while ($row = $this->fetch($fetchStyle)) {
+ $rows[] = $row;
+ }
+ return $rows;
+ }
+
+ public function fetchColumn($columnIndex = 0)
+ {
+ $row = $this->fetch(PDO::FETCH_NUM);
+ if (!isset($row[$columnIndex])) {
+ // TODO: verify this is correct behavior
+ return false;
+ }
+ return $row[$columnIndex];
+ }
+}
diff --git a/vendor/doctrine/dbal/lib/Doctrine/DBAL/Cache/CacheException.php b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Cache/CacheException.php
new file mode 100644
index 0000000..367ab81
--- /dev/null
+++ b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Cache/CacheException.php
@@ -0,0 +1,37 @@
+.
+ */
+
+namespace Doctrine\DBAL\Cache;
+
+/**
+ * @author Benjamin Eberlei
+ * @since 2.2
+ */
+class CacheException extends \Doctrine\DBAL\DBALException
+{
+ static public function noCacheKey()
+ {
+ return new self("No cache key was set.");
+ }
+
+ static public function noResultDriverConfigured()
+ {
+ return new self("Trying to cache a query but no result driver is configured.");
+ }
+}
\ No newline at end of file
diff --git a/vendor/doctrine/dbal/lib/Doctrine/DBAL/Cache/QueryCacheProfile.php b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Cache/QueryCacheProfile.php
new file mode 100644
index 0000000..1ffbd97
--- /dev/null
+++ b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Cache/QueryCacheProfile.php
@@ -0,0 +1,131 @@
+.
+ */
+
+namespace Doctrine\DBAL\Cache;
+
+use Doctrine\Common\Cache\Cache;
+
+/**
+ * Query Cache Profile handles the data relevant for query caching.
+ *
+ * It is a value object, setter methods return NEW instances.
+ *
+ * @author Benjamin Eberlei
+ */
+class QueryCacheProfile
+{
+ /**
+ * @var Cache
+ */
+ private $resultCacheDriver;
+ /**
+ * @var int
+ */
+ private $lifetime = 0;
+ /**
+ * @var string
+ */
+ private $cacheKey;
+
+ /**
+ * @param int $lifetime
+ * @param string $cacheKey
+ * @param Cache $resultCache
+ */
+ public function __construct($lifetime = 0, $cacheKey = null, Cache $resultCache = null)
+ {
+ $this->lifetime = $lifetime;
+ $this->cacheKey = $cacheKey;
+ $this->resultCacheDriver = $resultCache;
+ }
+
+ /**
+ * @return Cache
+ */
+ public function getResultCacheDriver()
+ {
+ return $this->resultCacheDriver;
+ }
+
+ /**
+ * @return int
+ */
+ public function getLifetime()
+ {
+ return $this->lifetime;
+ }
+
+ /**
+ * @return string
+ */
+ public function getCacheKey()
+ {
+ if ($this->cacheKey === null) {
+ throw CacheException::noCacheKey();
+ }
+ return $this->cacheKey;
+ }
+
+ /**
+ * Generate the real cache key from query, params and types.
+ *
+ * @param string $query
+ * @param array $params
+ * @param array $types
+ * @return array
+ */
+ public function generateCacheKeys($query, $params, $types)
+ {
+ $realCacheKey = $query . "-" . serialize($params) . "-" . serialize($types);
+ // should the key be automatically generated using the inputs or is the cache key set?
+ if ($this->cacheKey === null) {
+ $cacheKey = sha1($realCacheKey);
+ } else {
+ $cacheKey = $this->cacheKey;
+ }
+ return array($cacheKey, $realCacheKey);
+ }
+
+ /**
+ * @param Cache $cache
+ * @return QueryCacheProfile
+ */
+ public function setResultCacheDriver(Cache $cache)
+ {
+ return new QueryCacheProfile($this->lifetime, $this->cacheKey, $cache);
+ }
+
+ /**
+ * @param string|null $cacheKey
+ * @return QueryCacheProfile
+ */
+ public function setCacheKey($cacheKey)
+ {
+ return new QueryCacheProfile($this->lifetime, $cacheKey, $this->resultCacheDriver);
+ }
+
+ /**
+ * @param int $lifetime
+ * @return QueryCacheProfile
+ */
+ public function setLifetime($lifetime)
+ {
+ return new QueryCacheProfile($lifetime, $this->cacheKey, $this->resultCacheDriver);
+ }
+}
\ No newline at end of file
diff --git a/vendor/doctrine/dbal/lib/Doctrine/DBAL/Cache/ResultCacheStatement.php b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Cache/ResultCacheStatement.php
new file mode 100644
index 0000000..6054184
--- /dev/null
+++ b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Cache/ResultCacheStatement.php
@@ -0,0 +1,255 @@
+.
+ */
+
+namespace Doctrine\DBAL\Cache;
+
+use Doctrine\DBAL\Driver\Statement;
+use Doctrine\DBAL\Driver\ResultStatement;
+use Doctrine\DBAL\Connection;
+use Doctrine\Common\Cache\Cache;
+use PDO;
+
+/**
+ * Cache statement for SQL results.
+ *
+ * A result is saved in multiple cache keys, there is the originally specified
+ * cache key which is just pointing to result rows by key. The following things
+ * have to be ensured:
+ *
+ * 1. lifetime of the original key has to be longer than that of all the individual rows keys
+ * 2. if any one row key is missing the query has to be re-executed.
+ *
+ * Also you have to realize that the cache will load the whole result into memory at once to ensure 2.
+ * This means that the memory usage for cached results might increase by using this feature.
+ */
+class ResultCacheStatement implements \IteratorAggregate, ResultStatement
+{
+ /**
+ * @var \Doctrine\Common\Cache\Cache
+ */
+ private $resultCache;
+
+ /**
+ *
+ * @var string
+ */
+ private $cacheKey;
+
+ /**
+ * @var string
+ */
+ private $realKey;
+
+ /**
+ * @var int
+ */
+ private $lifetime;
+
+ /**
+ * @var Doctrine\DBAL\Driver\Statement
+ */
+ private $statement;
+
+ /**
+ * Did we reach the end of the statement?
+ *
+ * @var bool
+ */
+ private $emptied = false;
+
+ /**
+ * @var array
+ */
+ private $data;
+
+ /**
+ * @var int
+ */
+ private $defaultFetchStyle = PDO::FETCH_BOTH;
+
+ /**
+ * @param Statement $stmt
+ * @param Cache $resultCache
+ * @param string $cacheKey
+ * @param string $realKey
+ * @param int $lifetime
+ */
+ public function __construct(Statement $stmt, Cache $resultCache, $cacheKey, $realKey, $lifetime)
+ {
+ $this->statement = $stmt;
+ $this->resultCache = $resultCache;
+ $this->cacheKey = $cacheKey;
+ $this->realKey = $realKey;
+ $this->lifetime = $lifetime;
+ }
+
+ /**
+ * Closes the cursor, enabling the statement to be executed again.
+ *
+ * @return boolean Returns TRUE on success or FALSE on failure.
+ */
+ public function closeCursor()
+ {
+ $this->statement->closeCursor();
+ if ($this->emptied && $this->data !== null) {
+ $data = $this->resultCache->fetch($this->cacheKey);
+ if (!$data) {
+ $data = array();
+ }
+ $data[$this->realKey] = $this->data;
+
+ $this->resultCache->save($this->cacheKey, $data, $this->lifetime);
+ unset($this->data);
+ }
+ }
+
+ /**
+ * columnCount
+ * Returns the number of columns in the result set
+ *
+ * @return integer 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.
+ */
+ public function columnCount()
+ {
+ return $this->statement->columnCount();
+ }
+
+ public function setFetchMode($fetchStyle, $arg2 = null, $arg3 = null)
+ {
+ $this->defaultFetchStyle = $fetchStyle;
+ }
+
+ public function getIterator()
+ {
+ $data = $this->fetchAll($this->defaultFetchStyle);
+ return new \ArrayIterator($data);
+ }
+
+ /**
+ * fetch
+ *
+ * @see Query::HYDRATE_* constants
+ * @param integer $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
+ *
+ * @param integer $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().
+ *
+ * @param integer $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.
+ *
+ * @return mixed
+ */
+ public function fetch($fetchStyle = PDO::FETCH_BOTH)
+ {
+ if ($this->data === null) {
+ $this->data = array();
+ }
+
+ $row = $this->statement->fetch(PDO::FETCH_ASSOC);
+ if ($row) {
+ $this->data[] = $row;
+
+ if ($fetchStyle == PDO::FETCH_ASSOC) {
+ return $row;
+ } else if ($fetchStyle == PDO::FETCH_NUM) {
+ return array_values($row);
+ } else if ($fetchStyle == PDO::FETCH_BOTH) {
+ return array_merge($row, array_values($row));
+ } else {
+ throw new \InvalidArgumentException("Invalid fetch-style given for caching result.");
+ }
+ }
+ $this->emptied = true;
+ return false;
+ }
+
+ /**
+ * Returns an array containing all of the result set rows
+ *
+ * @param integer $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
+ *
+ * @param integer $columnIndex Returns the indicated 0-indexed column when the value of $fetchStyle is
+ * Query::HYDRATE_COLUMN. Defaults to 0.
+ *
+ * @return array
+ */
+ public function fetchAll($fetchStyle = PDO::FETCH_BOTH)
+ {
+ $rows = array();
+ while ($row = $this->fetch($fetchStyle)) {
+ $rows[] = $row;
+ }
+ return $rows;
+ }
+
+ /**
+ * fetchColumn
+ * Returns a single column from the next row of a
+ * result set or FALSE if there are no more rows.
+ *
+ * @param integer $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.
+ *
+ * @return string returns a single column in the next row of a result set.
+ */
+ public function fetchColumn($columnIndex = 0)
+ {
+ $row = $this->fetch(PDO::FETCH_NUM);
+ if (!isset($row[$columnIndex])) {
+ // TODO: verify this is correct behavior
+ return false;
+ }
+ return $row[$columnIndex];
+ }
+
+ /**
+ * 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.
+ *
+ * @return integer Returns the number of rows.
+ */
+ public function rowCount()
+ {
+ return $this->statement->rowCount();
+ }
+}
diff --git a/vendor/doctrine/dbal/lib/Doctrine/DBAL/Configuration.php b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Configuration.php
new file mode 100644
index 0000000..03327fb
--- /dev/null
+++ b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Configuration.php
@@ -0,0 +1,113 @@
+.
+ */
+
+namespace Doctrine\DBAL;
+
+use Doctrine\DBAL\Logging\SQLLogger;
+use Doctrine\Common\Cache\Cache;
+
+/**
+ * Configuration container for the Doctrine DBAL.
+ *
+ * @since 2.0
+ * @author Guilherme Blanco
+ * @author Jonathan Wage
+ * @author 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.
+ */
+class Configuration
+{
+ /**
+ * The attributes that are contained in the configuration.
+ * Values are default values.
+ *
+ * @var array
+ */
+ protected $_attributes = array();
+
+ /**
+ * Sets the SQL logger to use. Defaults to NULL which means SQL logging is disabled.
+ *
+ * @param SQLLogger $logger
+ */
+ public function setSQLLogger(SQLLogger $logger = null)
+ {
+ $this->_attributes['sqlLogger'] = $logger;
+ }
+
+ /**
+ * Gets the SQL logger that is used.
+ *
+ * @return SQLLogger
+ */
+ public function getSQLLogger()
+ {
+ return isset($this->_attributes['sqlLogger']) ?
+ $this->_attributes['sqlLogger'] : null;
+ }
+
+ /**
+ * Gets the cache driver implementation that is used for query result caching.
+ *
+ * @return \Doctrine\Common\Cache\Cache
+ */
+ public function getResultCacheImpl()
+ {
+ return isset($this->_attributes['resultCacheImpl']) ?
+ $this->_attributes['resultCacheImpl'] : null;
+ }
+
+ /**
+ * Sets the cache driver implementation that is used for query result caching.
+ *
+ * @param \Doctrine\Common\Cache\Cache $cacheImpl
+ */
+ public function setResultCacheImpl(Cache $cacheImpl)
+ {
+ $this->_attributes['resultCacheImpl'] = $cacheImpl;
+ }
+
+ /**
+ * Filter schema assets expression.
+ *
+ * Only include tables/sequences matching the filter expression regexp in
+ * schema instances generated for the active connection when calling
+ * {AbstractSchemaManager#createSchema()}.
+ *
+ * @param string $filterExpression
+ */
+ public function setFilterSchemaAssetsExpression($filterExpression)
+ {
+ $this->_attributes['filterSchemaAssetsExpression'] = $filterExpression;
+ }
+
+ /**
+ * Return filter schema assets expression.
+ *
+ * @return string|null
+ */
+ public function getFilterSchemaAssetsExpression()
+ {
+ if (isset($this->_attributes['filterSchemaAssetsExpression'])) {
+ return $this->_attributes['filterSchemaAssetsExpression'];
+ }
+ return null;
+ }
+}
diff --git a/vendor/doctrine/dbal/lib/Doctrine/DBAL/Connection.php b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Connection.php
new file mode 100644
index 0000000..abe9376
--- /dev/null
+++ b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Connection.php
@@ -0,0 +1,1168 @@
+.
+ */
+
+namespace Doctrine\DBAL;
+
+use PDO, Closure, Exception,
+ Doctrine\DBAL\Types\Type,
+ Doctrine\DBAL\Driver\Connection as DriverConnection,
+ Doctrine\Common\EventManager,
+ Doctrine\DBAL\DBALException,
+ Doctrine\DBAL\Cache\ResultCacheStatement,
+ Doctrine\DBAL\Cache\QueryCacheProfile,
+ Doctrine\DBAL\Cache\ArrayStatement,
+ Doctrine\DBAL\Cache\CacheException;
+
+/**
+ * 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
+ * @link www.doctrine-project.org
+ * @since 2.0
+ * @author Guilherme Blanco
+ * @author Jonathan Wage
+ * @author Roman Borschel
+ * @author Konsta Vesterinen
+ * @author Lukas Smith (MDB2 library)
+ * @author Benjamin Eberlei
+ */
+class Connection implements DriverConnection
+{
+ /**
+ * Constant for transaction isolation level READ UNCOMMITTED.
+ */
+ const TRANSACTION_READ_UNCOMMITTED = 1;
+
+ /**
+ * Constant for transaction isolation level READ COMMITTED.
+ */
+ const TRANSACTION_READ_COMMITTED = 2;
+
+ /**
+ * Constant for transaction isolation level REPEATABLE READ.
+ */
+ const TRANSACTION_REPEATABLE_READ = 3;
+
+ /**
+ * Constant for transaction isolation level SERIALIZABLE.
+ */
+ const TRANSACTION_SERIALIZABLE = 4;
+
+ /**
+ * Represents an array of ints to be expanded by Doctrine SQL parsing.
+ *
+ * @var int
+ */
+ const PARAM_INT_ARRAY = 101;
+
+ /**
+ * Represents an array of strings to be expanded by Doctrine SQL parsing.
+ *
+ * @var int
+ */
+ const PARAM_STR_ARRAY = 102;
+
+ /**
+ * Offset by which PARAM_* constants are detected as arrays of the param type.
+ *
+ * @var int
+ */
+ const ARRAY_PARAM_OFFSET = 100;
+
+ /**
+ * The wrapped driver connection.
+ *
+ * @var Doctrine\DBAL\Driver\Connection
+ */
+ protected $_conn;
+
+ /**
+ * @var Doctrine\DBAL\Configuration
+ */
+ protected $_config;
+
+ /**
+ * @var Doctrine\Common\EventManager
+ */
+ protected $_eventManager;
+
+ /**
+ * @var Doctrine\DBAL\Query\ExpressionBuilder
+ */
+ protected $_expr;
+
+ /**
+ * Whether or not a connection has been established.
+ *
+ * @var boolean
+ */
+ private $_isConnected = false;
+
+ /**
+ * The transaction nesting level.
+ *
+ * @var integer
+ */
+ private $_transactionNestingLevel = 0;
+
+ /**
+ * The currently active transaction isolation level.
+ *
+ * @var integer
+ */
+ private $_transactionIsolationLevel;
+
+ /**
+ * If nested transations should use savepoints
+ *
+ * @var integer
+ */
+ private $_nestTransactionsWithSavepoints;
+
+ /**
+ * The parameters used during creation of the Connection instance.
+ *
+ * @var array
+ */
+ private $_params = array();
+
+ /**
+ * The DatabasePlatform object that provides information about the
+ * database platform used by the connection.
+ *
+ * @var Doctrine\DBAL\Platforms\AbstractPlatform
+ */
+ protected $_platform;
+
+ /**
+ * The schema manager.
+ *
+ * @var Doctrine\DBAL\Schema\SchemaManager
+ */
+ protected $_schemaManager;
+
+ /**
+ * The used DBAL driver.
+ *
+ * @var Doctrine\DBAL\Driver
+ */
+ protected $_driver;
+
+ /**
+ * Flag that indicates whether the current transaction is marked for rollback only.
+ *
+ * @var boolean
+ */
+ private $_isRollbackOnly = false;
+
+ /**
+ * Initializes a new instance of the Connection class.
+ *
+ * @param array $params The connection parameters.
+ * @param Driver $driver
+ * @param Configuration $config
+ * @param EventManager $eventManager
+ */
+ public function __construct(array $params, Driver $driver, Configuration $config = null,
+ EventManager $eventManager = null)
+ {
+ $this->_driver = $driver;
+ $this->_params = $params;
+
+ if (isset($params['pdo'])) {
+ $this->_conn = $params['pdo'];
+ $this->_isConnected = true;
+ }
+
+ // Create default config and event manager if none given
+ if ( ! $config) {
+ $config = new Configuration();
+ }
+
+ if ( ! $eventManager) {
+ $eventManager = new EventManager();
+ }
+
+ $this->_config = $config;
+ $this->_eventManager = $eventManager;
+
+ $this->_expr = new Query\Expression\ExpressionBuilder($this);
+
+ if ( ! isset($params['platform'])) {
+ $this->_platform = $driver->getDatabasePlatform();
+ } else if ($params['platform'] instanceof Platforms\AbstractPlatform) {
+ $this->_platform = $params['platform'];
+ } else {
+ throw DBALException::invalidPlatformSpecified();
+ }
+
+ $this->_platform->setEventManager($eventManager);
+
+ $this->_transactionIsolationLevel = $this->_platform->getDefaultTransactionIsolationLevel();
+ }
+
+ /**
+ * Gets the parameters used during instantiation.
+ *
+ * @return array $params
+ */
+ public function getParams()
+ {
+ return $this->_params;
+ }
+
+ /**
+ * Gets the name of the database this Connection is connected to.
+ *
+ * @return string $database
+ */
+ public function getDatabase()
+ {
+ return $this->_driver->getDatabase($this);
+ }
+
+ /**
+ * Gets the hostname of the currently connected database.
+ *
+ * @return string
+ */
+ public function getHost()
+ {
+ return isset($this->_params['host']) ? $this->_params['host'] : null;
+ }
+
+ /**
+ * Gets the port of the currently connected database.
+ *
+ * @return mixed
+ */
+ public function getPort()
+ {
+ return isset($this->_params['port']) ? $this->_params['port'] : null;
+ }
+
+ /**
+ * Gets the username used by this connection.
+ *
+ * @return string
+ */
+ public function getUsername()
+ {
+ return isset($this->_params['user']) ? $this->_params['user'] : null;
+ }
+
+ /**
+ * Gets the password used by this connection.
+ *
+ * @return string
+ */
+ public function getPassword()
+ {
+ return isset($this->_params['password']) ? $this->_params['password'] : null;
+ }
+
+ /**
+ * Gets the DBAL driver instance.
+ *
+ * @return \Doctrine\DBAL\Driver
+ */
+ public function getDriver()
+ {
+ return $this->_driver;
+ }
+
+ /**
+ * Gets the Configuration used by the Connection.
+ *
+ * @return \Doctrine\DBAL\Configuration
+ */
+ public function getConfiguration()
+ {
+ return $this->_config;
+ }
+
+ /**
+ * Gets the EventManager used by the Connection.
+ *
+ * @return \Doctrine\Common\EventManager
+ */
+ public function getEventManager()
+ {
+ return $this->_eventManager;
+ }
+
+ /**
+ * Gets the DatabasePlatform for the connection.
+ *
+ * @return \Doctrine\DBAL\Platforms\AbstractPlatform
+ */
+ public function getDatabasePlatform()
+ {
+ return $this->_platform;
+ }
+
+ /**
+ * Gets the ExpressionBuilder for the connection.
+ *
+ * @return \Doctrine\DBAL\Query\ExpressionBuilder
+ */
+ public function getExpressionBuilder()
+ {
+ return $this->_expr;
+ }
+
+ /**
+ * Establishes the connection with the database.
+ *
+ * @return boolean TRUE if the connection was successfully established, FALSE if
+ * the connection is already open.
+ */
+ public function connect()
+ {
+ if ($this->_isConnected) return false;
+
+ $driverOptions = isset($this->_params['driverOptions']) ?
+ $this->_params['driverOptions'] : array();
+ $user = isset($this->_params['user']) ? $this->_params['user'] : null;
+ $password = isset($this->_params['password']) ?
+ $this->_params['password'] : null;
+
+ $this->_conn = $this->_driver->connect($this->_params, $user, $password, $driverOptions);
+ $this->_isConnected = true;
+
+ if ($this->_eventManager->hasListeners(Events::postConnect)) {
+ $eventArgs = new Event\ConnectionEventArgs($this);
+ $this->_eventManager->dispatchEvent(Events::postConnect, $eventArgs);
+ }
+
+ return true;
+ }
+
+ /**
+ * Prepares and executes an SQL query and returns the first row of the result
+ * as an associative array.
+ *
+ * @param string $statement The SQL query.
+ * @param array $params The query parameters.
+ * @return array
+ */
+ public function fetchAssoc($statement, array $params = array())
+ {
+ return $this->executeQuery($statement, $params)->fetch(PDO::FETCH_ASSOC);
+ }
+
+ /**
+ * Prepares and executes an SQL query and returns the first row of the result
+ * as a numerically indexed array.
+ *
+ * @param string $statement sql query to be executed
+ * @param array $params prepared statement params
+ * @return array
+ */
+ public function fetchArray($statement, array $params = array())
+ {
+ return $this->executeQuery($statement, $params)->fetch(PDO::FETCH_NUM);
+ }
+
+ /**
+ * Prepares and executes an SQL query and returns the value of a single column
+ * of the first row of the result.
+ *
+ * @param string $statement sql query to be executed
+ * @param array $params prepared statement params
+ * @param int $colnum 0-indexed column number to retrieve
+ * @return mixed
+ */
+ public function fetchColumn($statement, array $params = array(), $colnum = 0)
+ {
+ return $this->executeQuery($statement, $params)->fetchColumn($colnum);
+ }
+
+ /**
+ * Whether an actual connection to the database is established.
+ *
+ * @return boolean
+ */
+ public function isConnected()
+ {
+ return $this->_isConnected;
+ }
+
+ /**
+ * Checks whether a transaction is currently active.
+ *
+ * @return boolean TRUE if a transaction is currently active, FALSE otherwise.
+ */
+ public function isTransactionActive()
+ {
+ return $this->_transactionNestingLevel > 0;
+ }
+
+ /**
+ * Executes an SQL DELETE statement on a table.
+ *
+ * @param string $table The name of the table on which to delete.
+ * @param array $identifier The deletion criteria. An associateve array containing column-value pairs.
+ * @return integer The number of affected rows.
+ */
+ public function delete($tableName, array $identifier)
+ {
+ $this->connect();
+
+ $criteria = array();
+
+ foreach (array_keys($identifier) as $columnName) {
+ $criteria[] = $columnName . ' = ?';
+ }
+
+ $query = 'DELETE FROM ' . $tableName . ' WHERE ' . implode(' AND ', $criteria);
+
+ return $this->executeUpdate($query, array_values($identifier));
+ }
+
+ /**
+ * Closes the connection.
+ *
+ * @return void
+ */
+ public function close()
+ {
+ unset($this->_conn);
+
+ $this->_isConnected = false;
+ }
+
+ /**
+ * Sets the transaction isolation level.
+ *
+ * @param integer $level The level to set.
+ */
+ public function setTransactionIsolation($level)
+ {
+ $this->_transactionIsolationLevel = $level;
+
+ return $this->executeUpdate($this->_platform->getSetTransactionIsolationSQL($level));
+ }
+
+ /**
+ * Gets the currently active transaction isolation level.
+ *
+ * @return integer The current transaction isolation level.
+ */
+ public function getTransactionIsolation()
+ {
+ return $this->_transactionIsolationLevel;
+ }
+
+ /**
+ * Executes an SQL UPDATE statement on a table.
+ *
+ * @param string $table The name of the table to update.
+ * @param array $identifier The update criteria. An associative array containing column-value pairs.
+ * @param array $types Types of the merged $data and $identifier arrays in that order.
+ * @return integer The number of affected rows.
+ */
+ public function update($tableName, array $data, array $identifier, array $types = array())
+ {
+ $this->connect();
+ $set = array();
+ foreach ($data as $columnName => $value) {
+ $set[] = $columnName . ' = ?';
+ }
+
+ $params = array_merge(array_values($data), array_values($identifier));
+
+ $sql = 'UPDATE ' . $tableName . ' SET ' . implode(', ', $set)
+ . ' WHERE ' . implode(' = ? AND ', array_keys($identifier))
+ . ' = ?';
+
+ return $this->executeUpdate($sql, $params, $types);
+ }
+
+ /**
+ * Inserts a table row with specified data.
+ *
+ * @param string $table The name of the table to insert data into.
+ * @param array $data An associative array containing column-value pairs.
+ * @param array $types Types of the inserted data.
+ * @return integer The number of affected rows.
+ */
+ public function insert($tableName, array $data, array $types = array())
+ {
+ $this->connect();
+
+ // column names are specified as array keys
+ $cols = array();
+ $placeholders = array();
+
+ foreach ($data as $columnName => $value) {
+ $cols[] = $columnName;
+ $placeholders[] = '?';
+ }
+
+ $query = 'INSERT INTO ' . $tableName
+ . ' (' . implode(', ', $cols) . ')'
+ . ' VALUES (' . implode(', ', $placeholders) . ')';
+
+ return $this->executeUpdate($query, array_values($data), $types);
+ }
+
+ /**
+ * Sets the given charset on the current connection.
+ *
+ * @param string $charset The charset to set.
+ */
+ public function setCharset($charset)
+ {
+ $this->executeUpdate($this->_platform->getSetCharsetSQL($charset));
+ }
+
+ /**
+ * 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.
+ *
+ * @param string $str The name to be quoted.
+ * @return string The quoted name.
+ */
+ public function quoteIdentifier($str)
+ {
+ return $this->_platform->quoteIdentifier($str);
+ }
+
+ /**
+ * Quotes a given input parameter.
+ *
+ * @param mixed $input Parameter to be quoted.
+ * @param string $type Type of the parameter.
+ * @return string The quoted parameter.
+ */
+ public function quote($input, $type = null)
+ {
+ $this->connect();
+
+ list($value, $bindingType) = $this->getBindingInfo($input, $type);
+ return $this->_conn->quote($value, $bindingType);
+ }
+
+ /**
+ * Prepares and executes an SQL query and returns the result as an associative array.
+ *
+ * @param string $sql The SQL query.
+ * @param array $params The query parameters.
+ * @return array
+ */
+ public function fetchAll($sql, array $params = array())
+ {
+ return $this->executeQuery($sql, $params)->fetchAll(PDO::FETCH_ASSOC);
+ }
+
+ /**
+ * Prepares an SQL statement.
+ *
+ * @param string $statement The SQL statement to prepare.
+ * @return Doctrine\DBAL\Driver\Statement The prepared statement.
+ */
+ public function prepare($statement)
+ {
+ $this->connect();
+
+ return new Statement($statement, $this);
+ }
+
+ /**
+ * 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.
+ *
+ * @param string $query The SQL query to execute.
+ * @param array $params The parameters to bind to the query, if any.
+ * @param array $types The types the previous parameters are in.
+ * @param QueryCacheProfile $qcp
+ * @return Doctrine\DBAL\Driver\Statement The executed statement.
+ * @internal PERF: Directly prepares a driver statement, not a wrapper.
+ */
+ public function executeQuery($query, array $params = array(), $types = array(), QueryCacheProfile $qcp = null)
+ {
+ if ($qcp !== null) {
+ return $this->executeCacheQuery($query, $params, $types, $qcp);
+ }
+
+ $this->connect();
+
+ $hasLogger = $this->_config->getSQLLogger() !== null;
+ if ($hasLogger) {
+ $this->_config->getSQLLogger()->startQuery($query, $params, $types);
+ }
+
+ if ($params) {
+ list($query, $params, $types) = SQLParserUtils::expandListParameters($query, $params, $types);
+
+ $stmt = $this->_conn->prepare($query);
+ if ($types) {
+ $this->_bindTypedValues($stmt, $params, $types);
+ $stmt->execute();
+ } else {
+ $stmt->execute($params);
+ }
+ } else {
+ $stmt = $this->_conn->query($query);
+ }
+
+ if ($hasLogger) {
+ $this->_config->getSQLLogger()->stopQuery();
+ }
+
+ return $stmt;
+ }
+
+ /**
+ * Execute a caching query and
+ *
+ * @param string $query
+ * @param array $params
+ * @param array $types
+ * @param QueryCacheProfile $qcp
+ * @return \Doctrine\DBAL\Driver\ResultStatement
+ */
+ public function executeCacheQuery($query, $params, $types, QueryCacheProfile $qcp)
+ {
+ $resultCache = $qcp->getResultCacheDriver() ?: $this->_config->getResultCacheImpl();
+ if (!$resultCache) {
+ throw CacheException::noResultDriverConfigured();
+ }
+
+ list($cacheKey, $realKey) = $qcp->generateCacheKeys($query, $params, $types);
+
+ // fetch the row pointers entry
+ if ($data = $resultCache->fetch($cacheKey)) {
+ // is the real key part of this row pointers map or is the cache only pointing to other cache keys?
+ if (isset($data[$realKey])) {
+ return new ArrayStatement($data[$realKey]);
+ } else if (array_key_exists($realKey, $data)) {
+ return new ArrayStatement(array());
+ }
+ }
+ return new ResultCacheStatement($this->executeQuery($query, $params, $types), $resultCache, $cacheKey, $realKey, $qcp->getLifetime());
+ }
+
+ /**
+ * Executes an, optionally parameterized, SQL query and returns the result,
+ * applying a given projection/transformation function on each row of the result.
+ *
+ * @param string $query The SQL query to execute.
+ * @param array $params The parameters, if any.
+ * @param Closure $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.
+ * @return mixed The projected result of the query.
+ */
+ public function project($query, array $params, Closure $function)
+ {
+ $result = array();
+ $stmt = $this->executeQuery($query, $params ?: array());
+
+ while ($row = $stmt->fetch()) {
+ $result[] = $function($row);
+ }
+
+ $stmt->closeCursor();
+
+ return $result;
+ }
+
+ /**
+ * Executes an SQL statement, returning a result set as a Statement object.
+ *
+ * @param string $statement
+ * @param integer $fetchType
+ * @return Doctrine\DBAL\Driver\Statement
+ */
+ public function query()
+ {
+ $this->connect();
+
+ $args = func_get_args();
+
+ $logger = $this->getConfiguration()->getSQLLogger();
+ if ($logger) {
+ $logger->startQuery($args[0]);
+ }
+
+ $statement = call_user_func_array(array($this->_conn, 'query'), $args);
+
+ if ($logger) {
+ $logger->stopQuery();
+ }
+
+ return $statement;
+ }
+
+ /**
+ * 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.
+ *
+ * @param string $query The SQL query.
+ * @param array $params The query parameters.
+ * @param array $types The parameter types.
+ * @return integer The number of affected rows.
+ * @internal PERF: Directly prepares a driver statement, not a wrapper.
+ */
+ public function executeUpdate($query, array $params = array(), array $types = array())
+ {
+ $this->connect();
+
+ $hasLogger = $this->_config->getSQLLogger() !== null;
+ if ($hasLogger) {
+ $this->_config->getSQLLogger()->startQuery($query, $params, $types);
+ }
+
+ if ($params) {
+ list($query, $params, $types) = SQLParserUtils::expandListParameters($query, $params, $types);
+
+ $stmt = $this->_conn->prepare($query);
+ if ($types) {
+ $this->_bindTypedValues($stmt, $params, $types);
+ $stmt->execute();
+ } else {
+ $stmt->execute($params);
+ }
+ $result = $stmt->rowCount();
+ } else {
+ $result = $this->_conn->exec($query);
+ }
+
+ if ($hasLogger) {
+ $this->_config->getSQLLogger()->stopQuery();
+ }
+
+ return $result;
+ }
+
+ /**
+ * Execute an SQL statement and return the number of affected rows.
+ *
+ * @param string $statement
+ * @return integer The number of affected rows.
+ */
+ public function exec($statement)
+ {
+ $this->connect();
+ return $this->_conn->exec($statement);
+ }
+
+ /**
+ * Returns the current transaction nesting level.
+ *
+ * @return integer The nesting level. A value of 0 means there's no active transaction.
+ */
+ public function getTransactionNestingLevel()
+ {
+ return $this->_transactionNestingLevel;
+ }
+
+ /**
+ * Fetch the SQLSTATE associated with the last database operation.
+ *
+ * @return integer The last error code.
+ */
+ public function errorCode()
+ {
+ $this->connect();
+ return $this->_conn->errorCode();
+ }
+
+ /**
+ * Fetch extended error information associated with the last database operation.
+ *
+ * @return array The last error information.
+ */
+ public function errorInfo()
+ {
+ $this->connect();
+ return $this->_conn->errorInfo();
+ }
+
+ /**
+ * 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.
+ *
+ * @param string $seqName Name of the sequence object from which the ID should be returned.
+ * @return string A string representation of the last inserted ID.
+ */
+ public function lastInsertId($seqName = null)
+ {
+ $this->connect();
+ return $this->_conn->lastInsertId($seqName);
+ }
+
+ /**
+ * Executes a function in a transaction.
+ *
+ * The function gets passed this Connection instance as an (optional) parameter.
+ *
+ * If an exception occurs during execution of the function or transaction commit,
+ * the transaction is rolled back and the exception re-thrown.
+ *
+ * @param Closure $func The function to execute transactionally.
+ */
+ public function transactional(Closure $func)
+ {
+ $this->beginTransaction();
+ try {
+ $func($this);
+ $this->commit();
+ } catch (Exception $e) {
+ $this->rollback();
+ throw $e;
+ }
+ }
+
+ /**
+ * Set if nested transactions should use savepoints
+ *
+ * @param boolean
+ * @return void
+ */
+ public function setNestTransactionsWithSavepoints($nestTransactionsWithSavepoints)
+ {
+ if ($this->_transactionNestingLevel > 0) {
+ throw ConnectionException::mayNotAlterNestedTransactionWithSavepointsInTransaction();
+ }
+
+ if (!$this->_platform->supportsSavepoints()) {
+ throw ConnectionException::savepointsNotSupported();
+ }
+
+ $this->_nestTransactionsWithSavepoints = $nestTransactionsWithSavepoints;
+ }
+
+ /**
+ * Get if nested transactions should use savepoints
+ *
+ * @return boolean
+ */
+ public function getNestTransactionsWithSavepoints()
+ {
+ return $this->_nestTransactionsWithSavepoints;
+ }
+
+ /**
+ * Returns the savepoint name to use for nested transactions are false if they are not supported
+ * "savepointFormat" parameter is not set
+ *
+ * @return mixed a string with the savepoint name or false
+ */
+ protected function _getNestedTransactionSavePointName()
+ {
+ return 'DOCTRINE2_SAVEPOINT_'.$this->_transactionNestingLevel;
+ }
+
+ /**
+ * Starts a transaction by suspending auto-commit mode.
+ *
+ * @return void
+ */
+ public function beginTransaction()
+ {
+ $this->connect();
+
+ ++$this->_transactionNestingLevel;
+
+ if ($this->_transactionNestingLevel == 1) {
+ $this->_conn->beginTransaction();
+ } else if ($this->_nestTransactionsWithSavepoints) {
+ $this->createSavepoint($this->_getNestedTransactionSavePointName());
+ }
+ }
+
+ /**
+ * Commits the current transaction.
+ *
+ * @return void
+ * @throws ConnectionException If the commit failed due to no active transaction or
+ * because the transaction was marked for rollback only.
+ */
+ public function commit()
+ {
+ if ($this->_transactionNestingLevel == 0) {
+ throw ConnectionException::noActiveTransaction();
+ }
+ if ($this->_isRollbackOnly) {
+ throw ConnectionException::commitFailedRollbackOnly();
+ }
+
+ $this->connect();
+
+ if ($this->_transactionNestingLevel == 1) {
+ $this->_conn->commit();
+ } else if ($this->_nestTransactionsWithSavepoints) {
+ $this->releaseSavepoint($this->_getNestedTransactionSavePointName());
+ }
+
+ --$this->_transactionNestingLevel;
+ }
+
+ /**
+ * Cancel any database changes done during the current transaction.
+ *
+ * this method can be listened with onPreTransactionRollback and onTransactionRollback
+ * eventlistener methods
+ *
+ * @throws ConnectionException If the rollback operation failed.
+ */
+ public function rollback()
+ {
+ if ($this->_transactionNestingLevel == 0) {
+ throw ConnectionException::noActiveTransaction();
+ }
+
+ $this->connect();
+
+ if ($this->_transactionNestingLevel == 1) {
+ $this->_transactionNestingLevel = 0;
+ $this->_conn->rollback();
+ $this->_isRollbackOnly = false;
+ } else if ($this->_nestTransactionsWithSavepoints) {
+ $this->rollbackSavepoint($this->_getNestedTransactionSavePointName());
+ --$this->_transactionNestingLevel;
+ } else {
+ $this->_isRollbackOnly = true;
+ --$this->_transactionNestingLevel;
+ }
+ }
+
+ /**
+ * createSavepoint
+ * creates a new savepoint
+ *
+ * @param string $savepoint name of a savepoint to set
+ * @return void
+ */
+ public function createSavepoint($savepoint)
+ {
+ if (!$this->_platform->supportsSavepoints()) {
+ throw ConnectionException::savepointsNotSupported();
+ }
+
+ $this->_conn->exec($this->_platform->createSavePoint($savepoint));
+ }
+
+ /**
+ * releaseSavePoint
+ * releases given savepoint
+ *
+ * @param string $savepoint name of a savepoint to release
+ * @return void
+ */
+ public function releaseSavepoint($savepoint)
+ {
+ if (!$this->_platform->supportsSavepoints()) {
+ throw ConnectionException::savepointsNotSupported();
+ }
+
+ if ($this->_platform->supportsReleaseSavepoints()) {
+ $this->_conn->exec($this->_platform->releaseSavePoint($savepoint));
+ }
+ }
+
+ /**
+ * rollbackSavePoint
+ * releases given savepoint
+ *
+ * @param string $savepoint name of a savepoint to rollback to
+ * @return void
+ */
+ public function rollbackSavepoint($savepoint)
+ {
+ if (!$this->_platform->supportsSavepoints()) {
+ throw ConnectionException::savepointsNotSupported();
+ }
+
+ $this->_conn->exec($this->_platform->rollbackSavePoint($savepoint));
+ }
+
+ /**
+ * Gets the wrapped driver connection.
+ *
+ * @return Doctrine\DBAL\Driver\Connection
+ */
+ public function getWrappedConnection()
+ {
+ $this->connect();
+
+ return $this->_conn;
+ }
+
+ /**
+ * Gets the SchemaManager that can be used to inspect or change the
+ * database schema through the connection.
+ *
+ * @return Doctrine\DBAL\Schema\AbstractSchemaManager
+ */
+ public function getSchemaManager()
+ {
+ if ( ! $this->_schemaManager) {
+ $this->_schemaManager = $this->_driver->getSchemaManager($this);
+ }
+
+ return $this->_schemaManager;
+ }
+
+ /**
+ * Marks the current transaction so that the only possible
+ * outcome for the transaction to be rolled back.
+ *
+ * @throws ConnectionException If no transaction is active.
+ */
+ public function setRollbackOnly()
+ {
+ if ($this->_transactionNestingLevel == 0) {
+ throw ConnectionException::noActiveTransaction();
+ }
+ $this->_isRollbackOnly = true;
+ }
+
+ /**
+ * Check whether the current transaction is marked for rollback only.
+ *
+ * @return boolean
+ * @throws ConnectionException If no transaction is active.
+ */
+ public function isRollbackOnly()
+ {
+ if ($this->_transactionNestingLevel == 0) {
+ throw ConnectionException::noActiveTransaction();
+ }
+ return $this->_isRollbackOnly;
+ }
+
+ /**
+ * Converts a given value to its database representation according to the conversion
+ * rules of a specific DBAL mapping type.
+ *
+ * @param mixed $value The value to convert.
+ * @param string $type The name of the DBAL mapping type.
+ * @return mixed The converted value.
+ */
+ public function convertToDatabaseValue($value, $type)
+ {
+ return Type::getType($type)->convertToDatabaseValue($value, $this->_platform);
+ }
+
+ /**
+ * Converts a given value to its PHP representation according to the conversion
+ * rules of a specific DBAL mapping type.
+ *
+ * @param mixed $value The value to convert.
+ * @param string $type The name of the DBAL mapping type.
+ * @return mixed The converted type.
+ */
+ public function convertToPHPValue($value, $type)
+ {
+ return Type::getType($type)->convertToPHPValue($value, $this->_platform);
+ }
+
+ /**
+ * Binds a set of parameters, some or all of which are typed with a PDO binding type
+ * or DBAL mapping type, to a given statement.
+ *
+ * @param $stmt The statement to bind the values to.
+ * @param array $params The map/list of named/positional parameters.
+ * @param array $types The parameter types (PDO binding types or DBAL mapping types).
+ * @internal Duck-typing used on the $stmt parameter to support driver statements as well as
+ * raw PDOStatement instances.
+ */
+ private function _bindTypedValues($stmt, array $params, array $types)
+ {
+ // Check whether parameters are positional or named. Mixing is not allowed, just like in PDO.
+ if (is_int(key($params))) {
+ // Positional parameters
+ $typeOffset = array_key_exists(0, $types) ? -1 : 0;
+ $bindIndex = 1;
+ foreach ($params as $position => $value) {
+ $typeIndex = $bindIndex + $typeOffset;
+ if (isset($types[$typeIndex])) {
+ $type = $types[$typeIndex];
+ list($value, $bindingType) = $this->getBindingInfo($value, $type);
+ $stmt->bindValue($bindIndex, $value, $bindingType);
+ } else {
+ $stmt->bindValue($bindIndex, $value);
+ }
+ ++$bindIndex;
+ }
+ } else {
+ // Named parameters
+ foreach ($params as $name => $value) {
+ if (isset($types[$name])) {
+ $type = $types[$name];
+ list($value, $bindingType) = $this->getBindingInfo($value, $type);
+ $stmt->bindValue($name, $value, $bindingType);
+ } else {
+ $stmt->bindValue($name, $value);
+ }
+ }
+ }
+ }
+
+ /**
+ * Gets the binding type of a given type. The given type can be a PDO or DBAL mapping type.
+ *
+ * @param mixed $value The value to bind
+ * @param mixed $type The type to bind (PDO or DBAL)
+ * @return array [0] => the (escaped) value, [1] => the binding type
+ */
+ private function getBindingInfo($value, $type)
+ {
+ if (is_string($type)) {
+ $type = Type::getType($type);
+ }
+ if ($type instanceof Type) {
+ $value = $type->convertToDatabaseValue($value, $this->_platform);
+ $bindingType = $type->getBindingType();
+ } else {
+ $bindingType = $type; // PDO::PARAM_* constants
+ }
+ return array($value, $bindingType);
+ }
+
+ /**
+ * Create a new instance of a SQL query builder.
+ *
+ * @return Query\QueryBuilder
+ */
+ public function createQueryBuilder()
+ {
+ return new Query\QueryBuilder($this);
+ }
+}
diff --git a/vendor/doctrine/dbal/lib/Doctrine/DBAL/ConnectionException.php b/vendor/doctrine/dbal/lib/Doctrine/DBAL/ConnectionException.php
new file mode 100644
index 0000000..8c8f703
--- /dev/null
+++ b/vendor/doctrine/dbal/lib/Doctrine/DBAL/ConnectionException.php
@@ -0,0 +1,54 @@
+.
+ */
+
+namespace Doctrine\DBAL;
+
+/**
+ * Doctrine\DBAL\ConnectionException
+ *
+ * @license http://www.opensource.org/licenses/lgpl-license.php LGPL
+ * @link www.doctrine-project.org
+ * @since 2.0
+ * @version $Revision: 4628 $
+ * @author Jonathan H. Wage .
+ */
+
+namespace Doctrine\DBAL\Connections;
+
+
+use Doctrine\DBAL\Connection,
+ Doctrine\DBAL\Driver,
+ Doctrine\DBAL\Configuration,
+ Doctrine\Common\EventManager,
+ Doctrine\DBAL\Event\ConnectionEventArgs,
+ Doctrine\DBAL\Events;
+
+/**
+ * Master-Slave Connection
+ *
+ * Connection can be used with master-slave setups.
+ *
+ * Important for the understanding of this connection should be how and when
+ * it picks the slave or master.
+ *
+ * 1. Slave if master was never picked before and ONLY if 'getWrappedConnection'
+ * or 'executeQuery' is used.
+ * 2. Master picked when 'exec', 'executeUpdate', 'insert', 'delete', 'update', 'createSavepoint',
+ * 'releaseSavepoint', 'beginTransaction', 'rollback', 'commit', 'query' or
+ * 'prepare' is called.
+ * 3. If master was picked once during the lifetime of the connection it will always get picked afterwards.
+ * 4. One slave connection is randomly picked ONCE during a request.
+ *
+ * ATTENTION: You can write to the slave with this connection if you execute a write query without
+ * opening up a transaction. For example:
+ *
+ * $conn = DriverManager::getConnection(...);
+ * $conn->executeQuery("DELETE FROM table");
+ *
+ * Be aware that Connection#executeQuery is a method specifically for READ
+ * operations only.
+ *
+ * This connection is limited to slave operations using the
+ * Connection#executeQuery operation only, because it wouldn't be compatible
+ * with the ORM or SchemaManager code otherwise. Both use all the other
+ * operations in a context where writes could happen to a slave, which makes
+ * this restricted approach necessary.
+ *
+ * You can manually connect to the master at any time by calling:
+ *
+ * $conn->connect('master');
+ *
+ * Instantiation through the DriverManager looks like:
+ *
+ * @example
+ *
+ * $conn = DriverManager::getConnection(array(
+ * 'wrapperClass' => 'Doctrine\DBAL\Connections\MasterSlaveConnection',
+ * 'driver' => 'pdo_mysql',
+ * 'master' => array('user' => '', 'password' => '', 'host' => '', 'dbname' => ''),
+ * 'slaves' => array(
+ * array('user' => 'slave1', 'password', 'host' => '', 'dbname' => ''),
+ * array('user' => 'slave2', 'password', 'host' => '', 'dbname' => ''),
+ * )
+ * ));
+ *
+ * You can also pass 'driverOptions' and any other documented option to each of this drivers to pass additional information.
+ *
+ * @author Lars Strojny
+ * @author Benjamin Eberlei
+ */
+class MasterSlaveConnection extends Connection
+{
+ /**
+ * Master and slave connection (one of the randomly picked slaves)
+ *
+ * @var Doctrine\DBAL\Driver\Connection[]
+ */
+ protected $connections = array('master' => null, 'slave' => null);
+
+ /**
+ * Create Master Slave Connection
+ *
+ * @param array $params
+ * @param Driver $driver
+ * @param Configuration $config
+ * @param EventManager $eventManager
+ */
+ public function __construct(array $params, Driver $driver, Configuration $config = null, EventManager $eventManager = null)
+ {
+ if ( !isset($params['slaves']) || !isset($params['master']) ) {
+ throw new \InvalidArgumentException('master or slaves configuration missing');
+ }
+ if ( count($params['slaves']) == 0 ) {
+ throw new \InvalidArgumentException('You have to configure at least one slaves.');
+ }
+
+ $params['master']['driver'] = $params['driver'];
+ foreach ($params['slaves'] as $slaveKey => $slave) {
+ $params['slaves'][$slaveKey]['driver'] = $params['driver'];
+ }
+
+ parent::__construct($params, $driver, $config, $eventManager);
+ }
+
+ /**
+ * Check if the connection is currently towards the master or not.
+ *
+ * @return bool
+ */
+ public function isConnectedToMaster()
+ {
+ return $this->_conn !== null && $this->_conn === $this->connections['master'];
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public function connect($connectionName = 'slave')
+ {
+ if ( $connectionName !== 'slave' && $connectionName !== 'master' ) {
+ throw new \InvalidArgumentException("Invalid option to connect(), only master or slave allowed.");
+ }
+
+ $forceMasterAsSlave = false;
+
+ if ($this->getTransactionNestingLevel() > 0) {
+ $connectionName = 'master';
+ $forceMasterAsSlave = true;
+ }
+
+ if ($this->connections[$connectionName]) {
+ if ($forceMasterAsSlave) {
+ $this->connections['slave'] = $this->_conn = $this->connections['master'];
+ } else {
+ $this->_conn = $this->connections[$connectionName];
+ }
+ return false;
+ }
+
+ if ($connectionName === 'master') {
+ /** Set slave connection to master to avoid invalid reads */
+ if ($this->connections['slave']) {
+ unset($this->connections['slave']);
+ }
+
+ $this->connections['master'] = $this->connections['slave'] = $this->_conn = $this->connectTo($connectionName);
+ } else {
+ $this->connections['slave'] = $this->_conn = $this->connectTo($connectionName);
+ }
+
+ if ($this->_eventManager->hasListeners(Events::postConnect)) {
+ $eventArgs = new ConnectionEventArgs($this);
+ $this->_eventManager->dispatchEvent(Events::postConnect, $eventArgs);
+ }
+
+ return true;
+ }
+
+ /**
+ * Connect to a specific connection
+ *
+ * @param string $connectionName
+ * @return Driver
+ */
+ protected function connectTo($connectionName)
+ {
+ $params = $this->getParams();
+
+ $driverOptions = isset($params['driverOptions']) ? $params['driverOptions'] : array();
+
+ $connectionParams = $this->chooseConnectionConfiguration($connectionName, $params);
+
+ $user = isset($connectionParams['user']) ? $connectionParams['user'] : null;
+ $password = isset($connectionParams['password']) ? $connectionParams['password'] : null;
+
+ return $this->_driver->connect($connectionParams, $user, $password, $driverOptions);
+ }
+
+ protected function chooseConnectionConfiguration($connectionName, $params)
+ {
+ if ($connectionName === 'master') {
+ return $params['master'];
+ }
+
+ return $params['slaves'][array_rand($params['slaves'])];
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public function executeUpdate($query, array $params = array(), array $types = array())
+ {
+ $this->connect('master');
+ return parent::executeUpdate($query, $params, $types);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public function beginTransaction()
+ {
+ $this->connect('master');
+ return parent::beginTransaction();
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public function commit()
+ {
+ $this->connect('master');
+ return parent::commit();
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public function rollback()
+ {
+ $this->connect('master');
+ return parent::rollback();
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public function delete($tableName, array $identifier)
+ {
+ $this->connect('master');
+ return parent::delete($tableName, $identifier);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public function update($tableName, array $data, array $identifier, array $types = array())
+ {
+ $this->connect('master');
+ return parent::update($tableName, $data, $identifier, $types);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public function insert($tableName, array $data, array $types = array())
+ {
+ $this->connect('master');
+ return parent::insert($tableName, $data, $types);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public function exec($statement)
+ {
+ $this->connect('master');
+ return parent::exec($statement);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public function createSavepoint($savepoint)
+ {
+ $this->connect('master');
+
+ return parent::createSavepoint($savepoint);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public function releaseSavepoint($savepoint)
+ {
+ $this->connect('master');
+
+ return parent::releaseSavepoint($savepoint);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public function rollbackSavepoint($savepoint)
+ {
+ $this->connect('master');
+
+ return parent::rollbackSavepoint($savepoint);
+ }
+
+ public function query()
+ {
+ $this->connect('master');
+
+ $args = func_get_args();
+
+ $logger = $this->getConfiguration()->getSQLLogger();
+ if ($logger) {
+ $logger->startQuery($args[0]);
+ }
+
+ $statement = call_user_func_array(array($this->_conn, 'query'), $args);
+
+ if ($logger) {
+ $logger->stopQuery();
+ }
+
+ return $statement;
+ }
+
+ public function prepare($statement)
+ {
+ $this->connect('master');
+
+ return parent::prepare($statement);
+ }
+}
diff --git a/vendor/doctrine/dbal/lib/Doctrine/DBAL/DBALException.php b/vendor/doctrine/dbal/lib/Doctrine/DBAL/DBALException.php
new file mode 100644
index 0000000..9222e7e
--- /dev/null
+++ b/vendor/doctrine/dbal/lib/Doctrine/DBAL/DBALException.php
@@ -0,0 +1,88 @@
+.
+ */
+
+namespace Doctrine\DBAL;
+
+/**
+ * Driver interface.
+ * Interface that all DBAL drivers must implement.
+ *
+ * @since 2.0
+ */
+interface Driver
+{
+ /**
+ * Attempts to create a connection with the database.
+ *
+ * @param array $params All connection parameters passed by the user.
+ * @param string $username The username to use when connecting.
+ * @param string $password The password to use when connecting.
+ * @param array $driverOptions The driver options to use when connecting.
+ * @return Doctrine\DBAL\Driver\Connection The database connection.
+ */
+ public function connect(array $params, $username = null, $password = null, array $driverOptions = array());
+
+ /**
+ * Gets the DatabasePlatform instance that provides all the metadata about
+ * the platform this driver connects to.
+ *
+ * @return Doctrine\DBAL\Platforms\AbstractPlatform The database platform.
+ */
+ public function getDatabasePlatform();
+
+ /**
+ * Gets the SchemaManager that can be used to inspect and change the underlying
+ * database schema of the platform this driver connects to.
+ *
+ * @param Doctrine\DBAL\Connection $conn
+ * @return Doctrine\DBAL\SchemaManager
+ */
+ public function getSchemaManager(Connection $conn);
+
+ /**
+ * Gets the name of the driver.
+ *
+ * @return string The name of the driver.
+ */
+ public function getName();
+
+ /**
+ * Get the name of the database connected to for this driver.
+ *
+ * @param Doctrine\DBAL\Connection $conn
+ * @return string $database
+ */
+ public function getDatabase(Connection $conn);
+}
\ No newline at end of file
diff --git a/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/Connection.php b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/Connection.php
new file mode 100644
index 0000000..c3f0d56
--- /dev/null
+++ b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/Connection.php
@@ -0,0 +1,42 @@
+.
+ */
+
+namespace Doctrine\DBAL\Driver;
+
+/**
+ * Connection interface.
+ * Driver connections must implement this interface.
+ *
+ * This resembles (a subset of) the PDO interface.
+ *
+ * @since 2.0
+ */
+interface Connection
+{
+ function prepare($prepareString);
+ function query();
+ function quote($input, $type=\PDO::PARAM_STR);
+ function exec($statement);
+ function lastInsertId($name = null);
+ function beginTransaction();
+ function commit();
+ function rollBack();
+ function errorCode();
+ function errorInfo();
+}
\ No newline at end of file
diff --git a/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/IBMDB2/DB2Connection.php b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/IBMDB2/DB2Connection.php
new file mode 100644
index 0000000..c9d2fef
--- /dev/null
+++ b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/IBMDB2/DB2Connection.php
@@ -0,0 +1,115 @@
+.
+*/
+
+namespace Doctrine\DBAL\Driver\IBMDB2;
+
+class DB2Connection implements \Doctrine\DBAL\Driver\Connection
+{
+ private $_conn = null;
+
+ public function __construct(array $params, $username, $password, $driverOptions = array())
+ {
+ $isPersistant = (isset($params['persistent']) && $params['persistent'] == true);
+
+ if ($isPersistant) {
+ $this->_conn = db2_pconnect($params['dbname'], $username, $password, $driverOptions);
+ } else {
+ $this->_conn = db2_connect($params['dbname'], $username, $password, $driverOptions);
+ }
+ if (!$this->_conn) {
+ throw new DB2Exception(db2_conn_errormsg());
+ }
+ }
+
+ public function prepare($sql)
+ {
+ $stmt = @db2_prepare($this->_conn, $sql);
+ if (!$stmt) {
+ throw new DB2Exception(db2_stmt_errormsg());
+ }
+ return new DB2Statement($stmt);
+ }
+
+ public function query()
+ {
+ $args = func_get_args();
+ $sql = $args[0];
+ $stmt = $this->prepare($sql);
+ $stmt->execute();
+ return $stmt;
+ }
+
+ public function quote($input, $type=\PDO::PARAM_STR)
+ {
+ $input = db2_escape_string($input);
+ if ($type == \PDO::PARAM_INT ) {
+ return $input;
+ } else {
+ return "'".$input."'";
+ }
+ }
+
+ public function exec($statement)
+ {
+ $stmt = $this->prepare($statement);
+ $stmt->execute();
+ return $stmt->rowCount();
+ }
+
+ public function lastInsertId($name = null)
+ {
+ return db2_last_insert_id($this->_conn);
+ }
+
+ public function beginTransaction()
+ {
+ db2_autocommit($this->_conn, DB2_AUTOCOMMIT_OFF);
+ }
+
+ public function commit()
+ {
+ if (!db2_commit($this->_conn)) {
+ throw new DB2Exception(db2_conn_errormsg($this->_conn));
+ }
+ db2_autocommit($this->_conn, DB2_AUTOCOMMIT_ON);
+ }
+
+ public function rollBack()
+ {
+ if (!db2_rollback($this->_conn)) {
+ throw new DB2Exception(db2_conn_errormsg($this->_conn));
+ }
+ db2_autocommit($this->_conn, DB2_AUTOCOMMIT_ON);
+ }
+
+ public function errorCode()
+ {
+ return db2_conn_error($this->_conn);
+ }
+
+ public function errorInfo()
+ {
+ return array(
+ 0 => db2_conn_errormsg($this->_conn),
+ 1 => $this->errorCode(),
+ );
+ }
+}
\ No newline at end of file
diff --git a/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/IBMDB2/DB2Driver.php b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/IBMDB2/DB2Driver.php
new file mode 100644
index 0000000..d574b68
--- /dev/null
+++ b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/IBMDB2/DB2Driver.php
@@ -0,0 +1,111 @@
+.
+*/
+
+namespace Doctrine\DBAL\Driver\IBMDB2;
+
+use Doctrine\DBAL\Driver,
+ Doctrine\DBAL\Connection;
+
+/**
+ * IBM DB2 Driver
+ *
+ * @since 2.0
+ * @author Benjamin Eberlei
+ */
+class DB2Driver implements Driver
+{
+ /**
+ * Attempts to create a connection with the database.
+ *
+ * @param array $params All connection parameters passed by the user.
+ * @param string $username The username to use when connecting.
+ * @param string $password The password to use when connecting.
+ * @param array $driverOptions The driver options to use when connecting.
+ * @return Doctrine\DBAL\Driver\Connection The database connection.
+ */
+ public function connect(array $params, $username = null, $password = null, array $driverOptions = array())
+ {
+ if ( ! isset($params['protocol'])) {
+ $params['protocol'] = 'TCPIP';
+ }
+
+ if ($params['host'] !== 'localhost' && $params['host'] != '127.0.0.1') {
+ // if the host isn't localhost, use extended connection params
+ $params['dbname'] = 'DRIVER={IBM DB2 ODBC DRIVER}' .
+ ';DATABASE=' . $params['dbname'] .
+ ';HOSTNAME=' . $params['host'] .
+ ';PROTOCOL=' . $params['protocol'] .
+ ';UID=' . $username .
+ ';PWD=' . $password .';';
+ if (isset($params['port'])) {
+ $params['dbname'] .= 'PORT=' . $params['port'];
+ }
+
+ $username = null;
+ $password = null;
+ }
+
+ return new DB2Connection($params, $username, $password, $driverOptions);
+ }
+
+ /**
+ * Gets the DatabasePlatform instance that provides all the metadata about
+ * the platform this driver connects to.
+ *
+ * @return Doctrine\DBAL\Platforms\AbstractPlatform The database platform.
+ */
+ public function getDatabasePlatform()
+ {
+ return new \Doctrine\DBAL\Platforms\DB2Platform;
+ }
+
+ /**
+ * Gets the SchemaManager that can be used to inspect and change the underlying
+ * database schema of the platform this driver connects to.
+ *
+ * @param Doctrine\DBAL\Connection $conn
+ * @return Doctrine\DBAL\SchemaManager
+ */
+ public function getSchemaManager(Connection $conn)
+ {
+ return new \Doctrine\DBAL\Schema\DB2SchemaManager($conn);
+ }
+
+ /**
+ * Gets the name of the driver.
+ *
+ * @return string The name of the driver.
+ */
+ public function getName()
+ {
+ return 'ibm_db2';
+ }
+
+ /**
+ * Get the name of the database connected to for this driver.
+ *
+ * @param Doctrine\DBAL\Connection $conn
+ * @return string $database
+ */
+ public function getDatabase(\Doctrine\DBAL\Connection $conn)
+ {
+ $params = $conn->getParams();
+ return $params['dbname'];
+ }
+}
diff --git a/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/IBMDB2/DB2Exception.php b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/IBMDB2/DB2Exception.php
new file mode 100644
index 0000000..7a6cc41
--- /dev/null
+++ b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/IBMDB2/DB2Exception.php
@@ -0,0 +1,27 @@
+.
+*/
+
+namespace Doctrine\DBAL\Driver\IBMDB2;
+
+class DB2Exception extends \Exception
+{
+
+}
\ No newline at end of file
diff --git a/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/IBMDB2/DB2Statement.php b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/IBMDB2/DB2Statement.php
new file mode 100644
index 0000000..27da2ee
--- /dev/null
+++ b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/IBMDB2/DB2Statement.php
@@ -0,0 +1,215 @@
+.
+*/
+
+namespace Doctrine\DBAL\Driver\IBMDB2;
+
+use \Doctrine\DBAL\Driver\Statement;
+
+class DB2Statement implements \IteratorAggregate, Statement
+{
+ private $_stmt = null;
+
+ private $_bindParam = array();
+
+ private $_defaultFetchStyle = \PDO::FETCH_BOTH;
+
+ /**
+ * DB2_BINARY, DB2_CHAR, DB2_DOUBLE, or DB2_LONG
+ * @var array
+ */
+ static private $_typeMap = array(
+ \PDO::PARAM_INT => DB2_LONG,
+ \PDO::PARAM_STR => DB2_CHAR,
+ );
+
+ public function __construct($stmt)
+ {
+ $this->_stmt = $stmt;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function bindValue($param, $value, $type = null)
+ {
+ return $this->bindParam($param, $value, $type);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function bindParam($column, &$variable, $type = null)
+ {
+ $this->_bindParam[$column] =& $variable;
+
+ if ($type && isset(self::$_typeMap[$type])) {
+ $type = self::$_typeMap[$type];
+ } else {
+ $type = DB2_CHAR;
+ }
+
+ if (!db2_bind_param($this->_stmt, $column, "variable", DB2_PARAM_IN, $type)) {
+ throw new DB2Exception(db2_stmt_errormsg());
+ }
+ return true;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function closeCursor()
+ {
+ if (!$this->_stmt) {
+ return false;
+ }
+
+ $this->_bindParam = array();
+ db2_free_result($this->_stmt);
+ $ret = db2_free_stmt($this->_stmt);
+ $this->_stmt = false;
+ return $ret;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function columnCount()
+ {
+ if (!$this->_stmt) {
+ return false;
+ }
+ return db2_num_fields($this->_stmt);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function errorCode()
+ {
+ return db2_stmt_error();
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function errorInfo()
+ {
+ return array(
+ 0 => db2_stmt_errormsg(),
+ 1 => db2_stmt_error(),
+ );
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function execute($params = null)
+ {
+ if (!$this->_stmt) {
+ return false;
+ }
+
+ /*$retval = true;
+ if ($params !== null) {
+ $retval = @db2_execute($this->_stmt, $params);
+ } else {
+ $retval = @db2_execute($this->_stmt);
+ }*/
+ if ($params === null) {
+ ksort($this->_bindParam);
+ $params = array_values($this->_bindParam);
+ }
+ $retval = @db2_execute($this->_stmt, $params);
+
+ if ($retval === false) {
+ throw new DB2Exception(db2_stmt_errormsg());
+ }
+ return $retval;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function setFetchMode($fetchStyle = \PDO::FETCH_BOTH, $arg2 = null, $arg3 = null)
+ {
+ $this->_defaultFetchStyle = $fetchStyle;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function getIterator()
+ {
+ $data = $this->fetchAll($this->_defaultFetchStyle);
+ return new \ArrayIterator($data);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function fetch($fetchStyle = null)
+ {
+ $fetchStyle = $fetchStyle ?: $this->_defaultFetchStyle;
+ switch ($fetchStyle) {
+ case \PDO::FETCH_BOTH:
+ return db2_fetch_both($this->_stmt);
+ case \PDO::FETCH_ASSOC:
+ return db2_fetch_assoc($this->_stmt);
+ case \PDO::FETCH_NUM:
+ return db2_fetch_array($this->_stmt);
+ default:
+ throw new DB2Exception("Given Fetch-Style " . $fetchStyle . " is not supported.");
+ }
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function fetchAll($fetchStyle = null)
+ {
+ $fetchStyle = $fetchStyle ?: $this->_defaultFetchStyle;
+ $rows = array();
+ while ($row = $this->fetch($fetchStyle)) {
+ $rows[] = $row;
+ }
+ return $rows;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function fetchColumn($columnIndex = 0)
+ {
+ $row = $this->fetch(\PDO::FETCH_NUM);
+ if ($row && isset($row[$columnIndex])) {
+ return $row[$columnIndex];
+ }
+ return false;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function rowCount()
+ {
+ return (@db2_num_rows($this->_stmt))?:0;
+ }
+}
diff --git a/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/Mysqli/Driver.php b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/Mysqli/Driver.php
new file mode 100644
index 0000000..b77de67
--- /dev/null
+++ b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/Mysqli/Driver.php
@@ -0,0 +1,69 @@
+.
+ */
+
+namespace Doctrine\DBAL\Driver\Mysqli;
+
+use Doctrine\DBAL\Driver as DriverInterface;
+
+/**
+ * @author Kim Hemsø Rasmussen
+ */
+class Driver implements DriverInterface
+{
+ /**
+ * {@inheritdoc}
+ */
+ public function connect(array $params, $username = null, $password = null, array $driverOptions = array())
+ {
+ return new MysqliConnection($params, $username, $password, $driverOptions);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function getName()
+ {
+ return 'mysqli';
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function getSchemaManager(\Doctrine\DBAL\Connection $conn)
+ {
+ return new \Doctrine\DBAL\Schema\MySqlSchemaManager($conn);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function getDatabasePlatform()
+ {
+ return new \Doctrine\DBAL\Platforms\MySqlPlatform();
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function getDatabase(\Doctrine\DBAL\Connection $conn)
+ {
+ $params = $conn->getParams();
+ return $params['dbname'];
+ }
+}
diff --git a/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/Mysqli/MysqliConnection.php b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/Mysqli/MysqliConnection.php
new file mode 100644
index 0000000..b69535b
--- /dev/null
+++ b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/Mysqli/MysqliConnection.php
@@ -0,0 +1,146 @@
+.
+ */
+
+namespace Doctrine\DBAL\Driver\Mysqli;
+
+use Doctrine\DBAL\Driver\Connection as Connection;
+
+/**
+ * @author Kim Hemsø Rasmussen
+ */
+class MysqliConnection implements Connection
+{
+ /**
+ * @var \mysqli
+ */
+ private $_conn;
+
+ public function __construct(array $params, $username, $password, array $driverOptions = array())
+ {
+ $port = isset($params['port']) ? $params['port'] : ini_get('mysqli.default_port');
+ $socket = isset($params['unix_socket']) ? $params['unix_socket'] : ini_get('mysqli.default_socket');
+
+ $this->_conn = mysqli_init();
+ if (!$this->_conn->real_connect($params['host'], $username, $password, $params['dbname'], $port, $socket)) {
+ throw new MysqliException($this->_conn->connect_error, $this->_conn->connect_errno);
+ }
+
+ if (isset($params['charset'])) {
+ $this->_conn->set_charset($params['charset']);
+ }
+ }
+
+ /**
+ * Retrieve mysqli native resource handle.
+ *
+ * Could be used if part of your application is not using DBAL
+ *
+ * @return mysqli
+ */
+ public function getWrappedResourceHandle()
+ {
+ return $this->_conn;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function prepare($prepareString)
+ {
+ return new MysqliStatement($this->_conn, $prepareString);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function query()
+ {
+ $args = func_get_args();
+ $sql = $args[0];
+ $stmt = $this->prepare($sql);
+ $stmt->execute();
+ return $stmt;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function quote($input, $type=\PDO::PARAM_STR)
+ {
+ return "'". $this->_conn->escape_string($input) ."'";
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function exec($statement)
+ {
+ $this->_conn->query($statement);
+ return $this->_conn->affected_rows;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function lastInsertId($name = null)
+ {
+ return $this->_conn->insert_id;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function beginTransaction()
+ {
+ $this->_conn->query('START TRANSACTION');
+ return true;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function commit()
+ {
+ return $this->_conn->commit();
+ }
+
+ /**
+ * {@inheritdoc}non-PHPdoc)
+ */
+ public function rollBack()
+ {
+ return $this->_conn->rollback();
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function errorCode()
+ {
+ return $this->_conn->errno;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function errorInfo()
+ {
+ return $this->_conn->error;
+ }
+}
diff --git a/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/Mysqli/MysqliException.php b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/Mysqli/MysqliException.php
new file mode 100644
index 0000000..e59a803
--- /dev/null
+++ b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/Mysqli/MysqliException.php
@@ -0,0 +1,26 @@
+.
+*/
+
+namespace Doctrine\DBAL\Driver\Mysqli;
+
+/**
+ * @author Kim Hemsø Rasmussen
+ */
+class MysqliException extends \Exception
+{}
diff --git a/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/Mysqli/MysqliStatement.php b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/Mysqli/MysqliStatement.php
new file mode 100644
index 0000000..d7f9703
--- /dev/null
+++ b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/Mysqli/MysqliStatement.php
@@ -0,0 +1,335 @@
+.
+ */
+
+namespace Doctrine\DBAL\Driver\Mysqli;
+
+use Doctrine\DBAL\Driver\Statement;
+use PDO;
+
+/**
+ * @author Kim Hemsø Rasmussen
+ */
+class MysqliStatement implements \IteratorAggregate, Statement
+{
+ protected static $_paramTypeMap = array(
+ PDO::PARAM_STR => 's',
+ PDO::PARAM_BOOL => 'i',
+ PDO::PARAM_NULL => 's',
+ PDO::PARAM_INT => 'i',
+ PDO::PARAM_LOB => 's' // TODO Support LOB bigger then max package size.
+ );
+
+ protected $_conn;
+ protected $_stmt;
+
+ /**
+ * @var null|false|array
+ */
+ protected $_columnNames;
+
+ /**
+ * @var null|array
+ */
+ protected $_rowBindedValues;
+
+ /**
+ * @var array
+ */
+ protected $_bindedValues;
+
+ /**
+ * Contains ref values for bindValue()
+ *
+ * @var array
+ */
+ protected $_values = array();
+
+ protected $_defaultFetchStyle = PDO::FETCH_BOTH;
+
+ public function __construct(\mysqli $conn, $prepareString)
+ {
+ $this->_conn = $conn;
+ $this->_stmt = $conn->prepare($prepareString);
+ if (false === $this->_stmt) {
+ throw new MysqliException($this->_conn->error, $this->_conn->errno);
+ }
+
+ $paramCount = $this->_stmt->param_count;
+ if (0 < $paramCount) {
+ // Index 0 is types
+ // Need to init the string else php think we are trying to access it as a array.
+ $bindedValues = array(0 => str_repeat('s', $paramCount));
+ $null = null;
+ for ($i = 1; $i < $paramCount; $i++) {
+ $bindedValues[] =& $null;
+ }
+ $this->_bindedValues = $bindedValues;
+ }
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function bindParam($column, &$variable, $type = null)
+ {
+ if (null === $type) {
+ $type = 's';
+ } else {
+ if (isset(self::$_paramTypeMap[$type])) {
+ $type = self::$_paramTypeMap[$type];
+ } else {
+ throw new MysqliException("Unkown type: '{$type}'");
+ }
+ }
+
+ $this->_bindedValues[$column] =& $variable;
+ $this->_bindedValues[0][$column - 1] = 's';
+ return true;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function bindValue($param, $value, $type = null)
+ {
+ if (null === $type) {
+ $type = 's';
+ } else {
+ if (isset(self::$_paramTypeMap[$type])) {
+ $type = self::$_paramTypeMap[$type];
+ } else {
+ throw new MysqliException("Unknown type: '{$type}'");
+ }
+ }
+
+ $this->_values[$param] = $value;
+ $this->_bindedValues[$param] =& $this->_values[$param];
+ $this->_bindedValues[0][$param - 1] = 's';
+ return true;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function execute($params = null)
+ {
+ if (null !== $this->_bindedValues) {
+ if (null !== $params) {
+ if (!$this->_bindValues($params)) {
+ throw new MysqliException($this->_stmt->error, $this->_stmt->errno);
+ }
+ } else {
+ if (!call_user_func_array(array($this->_stmt, 'bind_param'), $this->_bindedValues)) {
+ throw new MysqliException($this->_stmt->error, $this->_stmt->errno);
+ }
+ }
+ }
+
+ if (!$this->_stmt->execute()) {
+ throw new MysqliException($this->_stmt->error, $this->_stmt->errno);
+ }
+
+ if (null === $this->_columnNames) {
+ $meta = $this->_stmt->result_metadata();
+ if (false !== $meta) {
+ $columnNames = array();
+ foreach ($meta->fetch_fields() as $col) {
+ $columnNames[] = $col->name;
+ }
+ $meta->free();
+
+ $this->_columnNames = $columnNames;
+ $this->_rowBindedValues = array_fill(0, count($columnNames), NULL);
+
+ $refs = array();
+ foreach ($this->_rowBindedValues as $key => &$value) {
+ $refs[$key] =& $value;
+ }
+
+ if (!call_user_func_array(array($this->_stmt, 'bind_result'), $refs)) {
+ throw new MysqliException($this->_stmt->error, $this->_stmt->errno);
+ }
+ } else {
+ $this->_columnNames = false;
+ }
+ }
+
+ // We have a result.
+ if (false !== $this->_columnNames) {
+ $this->_stmt->store_result();
+ }
+ return true;
+ }
+
+ /**
+ * Bind a array of values to bound parameters
+ *
+ * @param array $values
+ * @return boolean
+ */
+ private function _bindValues($values)
+ {
+ $params = array();
+ $types = str_repeat('s', count($values));
+ $params[0] = $types;
+
+ foreach ($values as &$v) {
+ $params[] =& $v;
+ }
+ return call_user_func_array(array($this->_stmt, 'bind_param'), $params);
+ }
+
+ /**
+ * @return null|false|array
+ */
+ private function _fetch()
+ {
+ $ret = $this->_stmt->fetch();
+
+ if (true === $ret) {
+ $values = array();
+ foreach ($this->_rowBindedValues as $v) {
+ // Mysqli converts them to a scalar type it can fit in.
+ $values[] = null === $v ? null : (string)$v;
+ }
+ return $values;
+ }
+ return $ret;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function fetch($fetchStyle = null)
+ {
+ $values = $this->_fetch();
+ if (null === $values) {
+ return null;
+ }
+
+ if (false === $values) {
+ throw new MysqliException($this->_stmt->error, $this->_stmt->errno);
+ }
+
+ $fetchStyle = $fetchStyle ?: $this->_defaultFetchStyle;
+
+ switch ($fetchStyle) {
+ case PDO::FETCH_NUM:
+ return $values;
+
+ case PDO::FETCH_ASSOC:
+ return array_combine($this->_columnNames, $values);
+
+ case PDO::FETCH_BOTH:
+ $ret = array_combine($this->_columnNames, $values);
+ $ret += $values;
+ return $ret;
+
+ default:
+ throw new MysqliException("Unknown fetch type '{$fetchStyle}'");
+ }
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function fetchAll($fetchStyle = null)
+ {
+ $fetchStyle = $fetchStyle ?: $this->_defaultFetchStyle;
+
+ $a = array();
+ while (($row = $this->fetch($fetchStyle)) !== null) {
+ $a[] = $row;
+ }
+ return $a;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function fetchColumn($columnIndex = 0)
+ {
+ $row = $this->fetch(PDO::FETCH_NUM);
+ if (null === $row) {
+ return false;
+ }
+ return $row[$columnIndex];
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function errorCode()
+ {
+ return $this->_stmt->errno;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function errorInfo()
+ {
+ return $this->_stmt->error;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function closeCursor()
+ {
+ $this->_stmt->free_result();
+ return true;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function rowCount()
+ {
+ if (false === $this->_columnNames) {
+ return $this->_stmt->affected_rows;
+ }
+ return $this->_stmt->num_rows;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function columnCount()
+ {
+ return $this->_stmt->field_count;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function setFetchMode($fetchMode = PDO::FETCH_BOTH, $arg2 = null, $arg3 = null)
+ {
+ $this->_defaultFetchStyle = $fetchMode;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function getIterator()
+ {
+ $data = $this->fetchAll($this->_defaultFetchStyle);
+ return new \ArrayIterator($data);
+ }
+}
diff --git a/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/OCI8/Driver.php b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/OCI8/Driver.php
new file mode 100644
index 0000000..650ad9b
--- /dev/null
+++ b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/OCI8/Driver.php
@@ -0,0 +1,95 @@
+.
+ */
+
+namespace Doctrine\DBAL\Driver\OCI8;
+
+use Doctrine\DBAL\Platforms;
+
+/**
+ * A Doctrine DBAL driver for the Oracle OCI8 PHP extensions.
+ *
+ * @author Roman Borschel
+ * @since 2.0
+ */
+class Driver implements \Doctrine\DBAL\Driver
+{
+ public function connect(array $params, $username = null, $password = null, array $driverOptions = array())
+ {
+ return new OCI8Connection(
+ $username,
+ $password,
+ $this->_constructDsn($params),
+ isset($params['charset']) ? $params['charset'] : null,
+ isset($params['sessionMode']) ? $params['sessionMode'] : OCI_DEFAULT
+ );
+ }
+
+ /**
+ * Constructs the Oracle DSN.
+ *
+ * @return string The DSN.
+ */
+ protected function _constructDsn(array $params)
+ {
+ $dsn = '';
+ if (isset($params['host']) && $params['host'] != '') {
+ $dsn .= '(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)' .
+ '(HOST=' . $params['host'] . ')';
+
+ if (isset($params['port'])) {
+ $dsn .= '(PORT=' . $params['port'] . ')';
+ } else {
+ $dsn .= '(PORT=1521)';
+ }
+
+ if (isset($params['service']) && $params['service'] == true) {
+ $dsn .= '))(CONNECT_DATA=(SERVICE_NAME=' . $params['dbname'] . ')))';
+ } else {
+ $dsn .= '))(CONNECT_DATA=(SID=' . $params['dbname'] . ')))';
+ }
+ } else {
+ $dsn .= $params['dbname'];
+ }
+
+ return $dsn;
+ }
+
+ public function getDatabasePlatform()
+ {
+ return new \Doctrine\DBAL\Platforms\OraclePlatform();
+ }
+
+ public function getSchemaManager(\Doctrine\DBAL\Connection $conn)
+ {
+ return new \Doctrine\DBAL\Schema\OracleSchemaManager($conn);
+ }
+
+ public function getName()
+ {
+ return 'oci8';
+ }
+
+ public function getDatabase(\Doctrine\DBAL\Connection $conn)
+ {
+ $params = $conn->getParams();
+ return $params['user'];
+ }
+}
\ No newline at end of file
diff --git a/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/OCI8/OCI8Connection.php b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/OCI8/OCI8Connection.php
new file mode 100644
index 0000000..f00ffaf
--- /dev/null
+++ b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/OCI8/OCI8Connection.php
@@ -0,0 +1,172 @@
+.
+ */
+
+namespace Doctrine\DBAL\Driver\OCI8;
+
+/**
+ * OCI8 implementation of the Connection interface.
+ *
+ * @since 2.0
+ */
+class OCI8Connection implements \Doctrine\DBAL\Driver\Connection
+{
+ protected $_dbh;
+
+ protected $_executeMode = OCI_COMMIT_ON_SUCCESS;
+
+ /**
+ * Create a Connection to an Oracle Database using oci8 extension.
+ *
+ * @param string $username
+ * @param string $password
+ * @param string $db
+ */
+ public function __construct($username, $password, $db, $charset = null, $sessionMode = OCI_DEFAULT)
+ {
+ if (!defined('OCI_NO_AUTO_COMMIT')) {
+ define('OCI_NO_AUTO_COMMIT', 0);
+ }
+
+ $this->_dbh = @oci_connect($username, $password, $db, $charset, $sessionMode);
+ if (!$this->_dbh) {
+ throw OCI8Exception::fromErrorInfo(oci_error());
+ }
+ }
+
+ /**
+ * Create a non-executed prepared statement.
+ *
+ * @param string $prepareString
+ * @return OCI8Statement
+ */
+ public function prepare($prepareString)
+ {
+ return new OCI8Statement($this->_dbh, $prepareString, $this);
+ }
+
+ /**
+ * @param string $sql
+ * @return OCI8Statement
+ */
+ public function query()
+ {
+ $args = func_get_args();
+ $sql = $args[0];
+ //$fetchMode = $args[1];
+ $stmt = $this->prepare($sql);
+ $stmt->execute();
+ return $stmt;
+ }
+
+ /**
+ * Quote input value.
+ *
+ * @param mixed $input
+ * @param int $type PDO::PARAM*
+ * @return mixed
+ */
+ public function quote($value, $type=\PDO::PARAM_STR)
+ {
+ if (is_int($value) || is_float($value)) {
+ return $value;
+ }
+ $value = str_replace("'", "''", $value);
+ return "'" . addcslashes($value, "\000\n\r\\\032") . "'";
+ }
+
+ /**
+ *
+ * @param string $statement
+ * @return int
+ */
+ public function exec($statement)
+ {
+ $stmt = $this->prepare($statement);
+ $stmt->execute();
+ return $stmt->rowCount();
+ }
+
+ public function lastInsertId($name = null)
+ {
+ //TODO: throw exception or support sequences?
+ }
+
+ /**
+ * Return the current execution mode.
+ */
+ public function getExecuteMode()
+ {
+ return $this->_executeMode;
+ }
+
+ /**
+ * Start a transactiom
+ *
+ * Oracle has to explicitly set the autocommit mode off. That means
+ * after connection, a commit or rollback there is always automatically
+ * opened a new transaction.
+ *
+ * @return bool
+ */
+ public function beginTransaction()
+ {
+ $this->_executeMode = OCI_NO_AUTO_COMMIT;
+ return true;
+ }
+
+ /**
+ * @throws OCI8Exception
+ * @return bool
+ */
+ public function commit()
+ {
+ if (!oci_commit($this->_dbh)) {
+ throw OCI8Exception::fromErrorInfo($this->errorInfo());
+ }
+ $this->_executeMode = OCI_COMMIT_ON_SUCCESS;
+ return true;
+ }
+
+ /**
+ * @throws OCI8Exception
+ * @return bool
+ */
+ public function rollBack()
+ {
+ if (!oci_rollback($this->_dbh)) {
+ throw OCI8Exception::fromErrorInfo($this->errorInfo());
+ }
+ $this->_executeMode = OCI_COMMIT_ON_SUCCESS;
+ return true;
+ }
+
+ public function errorCode()
+ {
+ $error = oci_error($this->_dbh);
+ if ($error !== false) {
+ $error = $error['code'];
+ }
+ return $error;
+ }
+
+ public function errorInfo()
+ {
+ return oci_error($this->_dbh);
+ }
+}
diff --git a/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/OCI8/OCI8Exception.php b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/OCI8/OCI8Exception.php
new file mode 100644
index 0000000..66fe615
--- /dev/null
+++ b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/OCI8/OCI8Exception.php
@@ -0,0 +1,30 @@
+.
+*/
+
+namespace Doctrine\DBAL\Driver\OCI8;
+
+class OCI8Exception extends \Exception
+{
+ static public function fromErrorInfo($error)
+ {
+ return new self($error['message'], $error['code']);
+ }
+}
diff --git a/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/OCI8/OCI8Statement.php b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/OCI8/OCI8Statement.php
new file mode 100644
index 0000000..677b684
--- /dev/null
+++ b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/OCI8/OCI8Statement.php
@@ -0,0 +1,258 @@
+.
+ */
+
+namespace Doctrine\DBAL\Driver\OCI8;
+
+use PDO;
+use IteratorAggregate;
+use Doctrine\DBAL\Driver\Statement;
+
+/**
+ * The OCI8 implementation of the Statement interface.
+ *
+ * @since 2.0
+ * @author Roman Borschel
+ */
+class OCI8Statement implements \IteratorAggregate, Statement
+{
+ /** Statement handle. */
+ protected $_dbh;
+ protected $_sth;
+ protected $_conn;
+ protected static $_PARAM = ':param';
+ protected static $fetchStyleMap = array(
+ PDO::FETCH_BOTH => OCI_BOTH,
+ PDO::FETCH_ASSOC => OCI_ASSOC,
+ PDO::FETCH_NUM => OCI_NUM,
+ PDO::PARAM_LOB => OCI_B_BLOB,
+ );
+ protected $_defaultFetchStyle = PDO::FETCH_BOTH;
+ protected $_paramMap = array();
+
+ /**
+ * Creates a new OCI8Statement that uses the given connection handle and SQL statement.
+ *
+ * @param resource $dbh The connection handle.
+ * @param string $statement The SQL statement.
+ */
+ public function __construct($dbh, $statement, OCI8Connection $conn)
+ {
+ list($statement, $paramMap) = self::convertPositionalToNamedPlaceholders($statement);
+ $this->_sth = oci_parse($dbh, $statement);
+ $this->_dbh = $dbh;
+ $this->_paramMap = $paramMap;
+ $this->_conn = $conn;
+ }
+
+ /**
+ * Convert positional (?) into named placeholders (:param)
+ *
+ * Oracle does not support positional parameters, hence this method converts all
+ * positional parameters into artificially named parameters. Note that this conversion
+ * is not perfect. All question marks (?) in the original statement are treated as
+ * placeholders and converted to a named parameter.
+ *
+ * The algorithm uses a state machine with two possible states: InLiteral and NotInLiteral.
+ * Question marks inside literal strings are therefore handled correctly by this method.
+ * This comes at a cost, the whole sql statement has to be looped over.
+ *
+ * @todo extract into utility class in Doctrine\DBAL\Util namespace
+ * @todo review and test for lost spaces. we experienced missing spaces with oci8 in some sql statements.
+ * @param string $statement The SQL statement to convert.
+ * @return string
+ */
+ static public function convertPositionalToNamedPlaceholders($statement)
+ {
+ $count = 1;
+ $inLiteral = false; // a valid query never starts with quotes
+ $stmtLen = strlen($statement);
+ $paramMap = array();
+ for ($i = 0; $i < $stmtLen; $i++) {
+ if ($statement[$i] == '?' && !$inLiteral) {
+ // real positional parameter detected
+ $paramMap[$count] = ":param$count";
+ $len = strlen($paramMap[$count]);
+ $statement = substr_replace($statement, ":param$count", $i, 1);
+ $i += $len-1; // jump ahead
+ $stmtLen = strlen($statement); // adjust statement length
+ ++$count;
+ } else if ($statement[$i] == "'" || $statement[$i] == '"') {
+ $inLiteral = ! $inLiteral; // switch state!
+ }
+ }
+
+ return array($statement, $paramMap);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function bindValue($param, $value, $type = null)
+ {
+ return $this->bindParam($param, $value, $type);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function bindParam($column, &$variable, $type = null)
+ {
+ $column = isset($this->_paramMap[$column]) ? $this->_paramMap[$column] : $column;
+
+ if ($type == \PDO::PARAM_LOB) {
+ $lob = oci_new_descriptor($this->_dbh, OCI_D_LOB);
+ $lob->writeTemporary($variable, OCI_TEMP_BLOB);
+
+ return oci_bind_by_name($this->_sth, $column, $lob, -1, OCI_B_BLOB);
+ } else {
+ return oci_bind_by_name($this->_sth, $column, $variable);
+ }
+ }
+
+ /**
+ * Closes the cursor, enabling the statement to be executed again.
+ *
+ * @return boolean Returns TRUE on success or FALSE on failure.
+ */
+ public function closeCursor()
+ {
+ return oci_free_statement($this->_sth);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function columnCount()
+ {
+ return oci_num_fields($this->_sth);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function errorCode()
+ {
+ $error = oci_error($this->_sth);
+ if ($error !== false) {
+ $error = $error['code'];
+ }
+ return $error;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function errorInfo()
+ {
+ return oci_error($this->_sth);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function execute($params = null)
+ {
+ if ($params) {
+ $hasZeroIndex = array_key_exists(0, $params);
+ foreach ($params as $key => $val) {
+ if ($hasZeroIndex && is_numeric($key)) {
+ $this->bindValue($key + 1, $val);
+ } else {
+ $this->bindValue($key, $val);
+ }
+ }
+ }
+
+ $ret = @oci_execute($this->_sth, $this->_conn->getExecuteMode());
+ if ( ! $ret) {
+ throw OCI8Exception::fromErrorInfo($this->errorInfo());
+ }
+ return $ret;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function setFetchMode($fetchStyle = PDO::FETCH_BOTH, $arg2 = null, $arg3 = null)
+ {
+ $this->_defaultFetchStyle = $fetchStyle;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function getIterator()
+ {
+ $data = $this->fetchAll($this->_defaultFetchStyle);
+ return new \ArrayIterator($data);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function fetch($fetchStyle = null)
+ {
+ $fetchStyle = $fetchStyle ?: $this->_defaultFetchStyle;
+ if ( ! isset(self::$fetchStyleMap[$fetchStyle])) {
+ throw new \InvalidArgumentException("Invalid fetch style: " . $fetchStyle);
+ }
+
+ return oci_fetch_array($this->_sth, self::$fetchStyleMap[$fetchStyle] | OCI_RETURN_NULLS | OCI_RETURN_LOBS);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function fetchAll($fetchStyle = null)
+ {
+ $fetchStyle = $fetchStyle ?: $this->_defaultFetchStyle;
+ if ( ! isset(self::$fetchStyleMap[$fetchStyle])) {
+ throw new \InvalidArgumentException("Invalid fetch style: " . $fetchStyle);
+ }
+
+ $result = array();
+ if (self::$fetchStyleMap[$fetchStyle] === OCI_BOTH) {
+ while ($row = $this->fetch($fetchStyle)) {
+ $result[] = $row;
+ }
+ } else {
+ oci_fetch_all($this->_sth, $result, 0, -1,
+ self::$fetchStyleMap[$fetchStyle] | OCI_RETURN_NULLS | OCI_FETCHSTATEMENT_BY_ROW | OCI_RETURN_LOBS);
+ }
+
+ return $result;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function fetchColumn($columnIndex = 0)
+ {
+ $row = oci_fetch_array($this->_sth, OCI_NUM | OCI_RETURN_NULLS | OCI_RETURN_LOBS);
+ return isset($row[$columnIndex]) ? $row[$columnIndex] : false;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function rowCount()
+ {
+ return oci_num_rows($this->_sth);
+ }
+}
diff --git a/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php
new file mode 100644
index 0000000..f006807
--- /dev/null
+++ b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php
@@ -0,0 +1,40 @@
+.
+ */
+
+namespace Doctrine\DBAL\Driver;
+
+use \PDO;
+
+/**
+ * PDO implementation of the Connection interface.
+ * Used by all PDO-based drivers.
+ *
+ * @since 2.0
+ */
+class PDOConnection extends PDO implements Connection
+{
+ public function __construct($dsn, $user = null, $password = null, array $options = null)
+ {
+ parent::__construct($dsn, $user, $password, $options);
+ $this->setAttribute(PDO::ATTR_STATEMENT_CLASS, array('Doctrine\DBAL\Driver\PDOStatement', array()));
+ $this->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
+ }
+}
\ No newline at end of file
diff --git a/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOIbm/Driver.php b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOIbm/Driver.php
new file mode 100644
index 0000000..844f2ab
--- /dev/null
+++ b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOIbm/Driver.php
@@ -0,0 +1,126 @@
+.
+*/
+
+namespace Doctrine\DBAL\Driver\PDOIbm;
+
+use Doctrine\DBAL\Connection;
+
+/**
+ * Driver for the PDO IBM extension
+ *
+ * @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 Driver implements \Doctrine\DBAL\Driver
+{
+ /**
+ * Attempts to establish a connection with the underlying driver.
+ *
+ * @param array $params
+ * @param string $username
+ * @param string $password
+ * @param array $driverOptions
+ * @return Doctrine\DBAL\Driver\Connection
+ */
+ public function connect(array $params, $username = null, $password = null, array $driverOptions = array())
+ {
+ $conn = new \Doctrine\DBAL\Driver\PDOConnection(
+ $this->_constructPdoDsn($params),
+ $username,
+ $password,
+ $driverOptions
+ );
+ return $conn;
+ }
+
+ /**
+ * Constructs the MySql PDO DSN.
+ *
+ * @return string The DSN.
+ */
+ private function _constructPdoDsn(array $params)
+ {
+ $dsn = 'ibm:';
+ if (isset($params['host'])) {
+ $dsn .= 'HOSTNAME=' . $params['host'] . ';';
+ }
+ if (isset($params['port'])) {
+ $dsn .= 'PORT=' . $params['port'] . ';';
+ }
+ $dsn .= 'PROTOCOL=TCPIP;';
+ if (isset($params['dbname'])) {
+ $dsn .= 'DATABASE=' . $params['dbname'] . ';';
+ }
+
+ return $dsn;
+ }
+
+ /**
+ * Gets the DatabasePlatform instance that provides all the metadata about
+ * the platform this driver connects to.
+ *
+ * @return Doctrine\DBAL\Platforms\AbstractPlatform The database platform.
+ */
+ public function getDatabasePlatform()
+ {
+ return new \Doctrine\DBAL\Platforms\DB2Platform;
+ }
+
+ /**
+ * Gets the SchemaManager that can be used to inspect and change the underlying
+ * database schema of the platform this driver connects to.
+ *
+ * @param Doctrine\DBAL\Connection $conn
+ * @return Doctrine\DBAL\SchemaManager
+ */
+ public function getSchemaManager(Connection $conn)
+ {
+ return new \Doctrine\DBAL\Schema\DB2SchemaManager($conn);
+ }
+
+ /**
+ * Gets the name of the driver.
+ *
+ * @return string The name of the driver.
+ */
+ public function getName()
+ {
+ return 'pdo_ibm';
+ }
+
+ /**
+ * Get the name of the database connected to for this driver.
+ *
+ * @param Doctrine\DBAL\Connection $conn
+ * @return string $database
+ */
+ public function getDatabase(\Doctrine\DBAL\Connection $conn)
+ {
+ $params = $conn->getParams();
+ return $params['dbname'];
+ }
+}
\ No newline at end of file
diff --git a/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOMySql/Driver.php b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOMySql/Driver.php
new file mode 100644
index 0000000..cb2df85
--- /dev/null
+++ b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOMySql/Driver.php
@@ -0,0 +1,102 @@
+.
+ */
+
+namespace Doctrine\DBAL\Driver\PDOMySql;
+
+use Doctrine\DBAL\Connection;
+
+/**
+ * PDO MySql driver.
+ *
+ * @since 2.0
+ */
+class Driver implements \Doctrine\DBAL\Driver
+{
+ /**
+ * Attempts to establish a connection with the underlying driver.
+ *
+ * @param array $params
+ * @param string $username
+ * @param string $password
+ * @param array $driverOptions
+ * @return Doctrine\DBAL\Driver\Connection
+ */
+ public function connect(array $params, $username = null, $password = null, array $driverOptions = array())
+ {
+ $conn = new \Doctrine\DBAL\Driver\PDOConnection(
+ $this->_constructPdoDsn($params),
+ $username,
+ $password,
+ $driverOptions
+ );
+ return $conn;
+ }
+
+ /**
+ * Constructs the MySql PDO DSN.
+ *
+ * @return string The DSN.
+ */
+ private function _constructPdoDsn(array $params)
+ {
+ $dsn = 'mysql:';
+ if (isset($params['host']) && $params['host'] != '') {
+ $dsn .= 'host=' . $params['host'] . ';';
+ }
+ if (isset($params['port'])) {
+ $dsn .= 'port=' . $params['port'] . ';';
+ }
+ if (isset($params['dbname'])) {
+ $dsn .= 'dbname=' . $params['dbname'] . ';';
+ }
+ if (isset($params['unix_socket'])) {
+ $dsn .= 'unix_socket=' . $params['unix_socket'] . ';';
+ }
+ if (isset($params['charset'])) {
+ $dsn .= 'charset=' . $params['charset'] . ';';
+ }
+
+ return $dsn;
+ }
+
+ public function getDatabasePlatform()
+ {
+ return new \Doctrine\DBAL\Platforms\MySqlPlatform();
+ }
+
+ public function getSchemaManager(\Doctrine\DBAL\Connection $conn)
+ {
+ return new \Doctrine\DBAL\Schema\MySqlSchemaManager($conn);
+ }
+
+ public function getName()
+ {
+ return 'pdo_mysql';
+ }
+
+ public function getDatabase(\Doctrine\DBAL\Connection $conn)
+ {
+ $params = $conn->getParams();
+
+ if (isset($params['dbname'])) {
+ return $params['dbname'];
+ }
+ return $conn->query('SELECT DATABASE()')->fetchColumn();
+ }
+}
\ No newline at end of file
diff --git a/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOOracle/Driver.php b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOOracle/Driver.php
new file mode 100644
index 0000000..1f007c1
--- /dev/null
+++ b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOOracle/Driver.php
@@ -0,0 +1,98 @@
+.
+ */
+
+namespace Doctrine\DBAL\Driver\PDOOracle;
+
+use Doctrine\DBAL\Platforms;
+
+/**
+ * PDO Oracle driver
+ *
+ * WARNING: This driver gives us segfauls in our testsuites on CLOB and other
+ * stuff. PDO Oracle is not maintained by Oracle or anyone in the PHP community,
+ * which leads us to the recommendation to use the "oci8" driver to connect
+ * to Oracle instead.
+ */
+class Driver implements \Doctrine\DBAL\Driver
+{
+ public function connect(array $params, $username = null, $password = null, array $driverOptions = array())
+ {
+ return new \Doctrine\DBAL\Driver\PDOConnection(
+ $this->_constructPdoDsn($params),
+ $username,
+ $password,
+ $driverOptions
+ );
+ }
+
+ /**
+ * Constructs the Oracle PDO DSN.
+ *
+ * @return string The DSN.
+ */
+ private function _constructPdoDsn(array $params)
+ {
+ $dsn = 'oci:';
+ if (isset($params['host'])) {
+ $dsn .= 'dbname=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)' .
+ '(HOST=' . $params['host'] . ')';
+
+ if (isset($params['port'])) {
+ $dsn .= '(PORT=' . $params['port'] . ')';
+ } else {
+ $dsn .= '(PORT=1521)';
+ }
+
+ if (isset($params['service']) && $params['service'] == true) {
+ $dsn .= '))(CONNECT_DATA=(SERVICE_NAME=' . $params['dbname'] . ')))';
+ } else {
+ $dsn .= '))(CONNECT_DATA=(SID=' . $params['dbname'] . ')))';
+ }
+ } else {
+ $dsn .= 'dbname=' . $params['dbname'];
+ }
+
+ if (isset($params['charset'])) {
+ $dsn .= ';charset=' . $params['charset'];
+ }
+
+ return $dsn;
+ }
+
+ public function getDatabasePlatform()
+ {
+ return new \Doctrine\DBAL\Platforms\OraclePlatform();
+ }
+
+ public function getSchemaManager(\Doctrine\DBAL\Connection $conn)
+ {
+ return new \Doctrine\DBAL\Schema\OracleSchemaManager($conn);
+ }
+
+ public function getName()
+ {
+ return 'pdo_oracle';
+ }
+
+ public function getDatabase(\Doctrine\DBAL\Connection $conn)
+ {
+ $params = $conn->getParams();
+ return $params['user'];
+ }
+}
\ No newline at end of file
diff --git a/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOPgSql/Driver.php b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOPgSql/Driver.php
new file mode 100644
index 0000000..247eb8f
--- /dev/null
+++ b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOPgSql/Driver.php
@@ -0,0 +1,70 @@
+_constructPdoDsn($params),
+ $username,
+ $password,
+ $driverOptions
+ );
+ }
+
+ /**
+ * Constructs the Postgres PDO DSN.
+ *
+ * @return string The DSN.
+ */
+ private function _constructPdoDsn(array $params)
+ {
+ $dsn = 'pgsql:';
+ if (isset($params['host']) && $params['host'] != '') {
+ $dsn .= 'host=' . $params['host'] . ' ';
+ }
+ if (isset($params['port']) && $params['port'] != '') {
+ $dsn .= 'port=' . $params['port'] . ' ';
+ }
+ if (isset($params['dbname'])) {
+ $dsn .= 'dbname=' . $params['dbname'] . ' ';
+ }
+
+ return $dsn;
+ }
+
+ public function getDatabasePlatform()
+ {
+ return new \Doctrine\DBAL\Platforms\PostgreSqlPlatform();
+ }
+
+ public function getSchemaManager(\Doctrine\DBAL\Connection $conn)
+ {
+ return new \Doctrine\DBAL\Schema\PostgreSqlSchemaManager($conn);
+ }
+
+ public function getName()
+ {
+ return 'pdo_pgsql';
+ }
+
+ public function getDatabase(\Doctrine\DBAL\Connection $conn)
+ {
+ $params = $conn->getParams();
+ return $params['dbname'];
+ }
+}
diff --git a/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOSqlite/Driver.php b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOSqlite/Driver.php
new file mode 100644
index 0000000..e13526a
--- /dev/null
+++ b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOSqlite/Driver.php
@@ -0,0 +1,116 @@
+.
+ */
+
+namespace Doctrine\DBAL\Driver\PDOSqlite;
+
+/**
+ * The PDO Sqlite driver.
+ *
+ * @since 2.0
+ */
+class Driver implements \Doctrine\DBAL\Driver
+{
+ /**
+ * @var array
+ */
+ protected $_userDefinedFunctions = array(
+ 'sqrt' => array('callback' => array('Doctrine\DBAL\Platforms\SqlitePlatform', 'udfSqrt'), 'numArgs' => 1),
+ 'mod' => array('callback' => array('Doctrine\DBAL\Platforms\SqlitePlatform', 'udfMod'), 'numArgs' => 2),
+ 'locate' => array('callback' => array('Doctrine\DBAL\Platforms\SqlitePlatform', 'udfLocate'), 'numArgs' => -1),
+ );
+
+ /**
+ * Tries to establish a database connection to SQLite.
+ *
+ * @param array $params
+ * @param string $username
+ * @param string $password
+ * @param array $driverOptions
+ * @return Connection
+ */
+ public function connect(array $params, $username = null, $password = null, array $driverOptions = array())
+ {
+ if (isset($driverOptions['userDefinedFunctions'])) {
+ $this->_userDefinedFunctions = array_merge(
+ $this->_userDefinedFunctions, $driverOptions['userDefinedFunctions']);
+ unset($driverOptions['userDefinedFunctions']);
+ }
+
+ $pdo = new \Doctrine\DBAL\Driver\PDOConnection(
+ $this->_constructPdoDsn($params),
+ $username,
+ $password,
+ $driverOptions
+ );
+
+ foreach ($this->_userDefinedFunctions AS $fn => $data) {
+ $pdo->sqliteCreateFunction($fn, $data['callback'], $data['numArgs']);
+ }
+
+ return $pdo;
+ }
+
+ /**
+ * Constructs the Sqlite PDO DSN.
+ *
+ * @return string The DSN.
+ * @override
+ */
+ protected function _constructPdoDsn(array $params)
+ {
+ $dsn = 'sqlite:';
+ if (isset($params['path'])) {
+ $dsn .= $params['path'];
+ } else if (isset($params['memory'])) {
+ $dsn .= ':memory:';
+ }
+
+ return $dsn;
+ }
+
+ /**
+ * Gets the database platform that is relevant for this driver.
+ */
+ public function getDatabasePlatform()
+ {
+ return new \Doctrine\DBAL\Platforms\SqlitePlatform();
+ }
+
+ /**
+ * Gets the schema manager that is relevant for this driver.
+ *
+ * @param Doctrine\DBAL\Connection $conn
+ * @return Doctrine\DBAL\Schema\SqliteSchemaManager
+ */
+ public function getSchemaManager(\Doctrine\DBAL\Connection $conn)
+ {
+ return new \Doctrine\DBAL\Schema\SqliteSchemaManager($conn);
+ }
+
+ public function getName()
+ {
+ return 'pdo_sqlite';
+ }
+
+ public function getDatabase(\Doctrine\DBAL\Connection $conn)
+ {
+ $params = $conn->getParams();
+ return isset($params['path']) ? $params['path'] : null;
+ }
+}
\ No newline at end of file
diff --git a/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOSqlsrv/Connection.php b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOSqlsrv/Connection.php
new file mode 100644
index 0000000..ba8aaf0
--- /dev/null
+++ b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOSqlsrv/Connection.php
@@ -0,0 +1,45 @@
+.
+ */
+
+namespace Doctrine\DBAL\Driver\PDOSqlsrv;
+
+/**
+ * Sqlsrv Connection implementation.
+ *
+ * @since 2.0
+ */
+class Connection extends \Doctrine\DBAL\Driver\PDOConnection implements \Doctrine\DBAL\Driver\Connection
+{
+ /**
+ * @override
+ */
+ public function quote($value, $type=\PDO::PARAM_STR)
+ {
+ $val = parent::quote($value, $type);
+
+ // Fix for a driver version terminating all values with null byte
+ if (strpos($val, "\0") !== false) {
+ $val = substr($val, 0, -1);
+ }
+
+ return $val;
+ }
+}
\ No newline at end of file
diff --git a/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOSqlsrv/Driver.php b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOSqlsrv/Driver.php
new file mode 100644
index 0000000..d3c6bf1
--- /dev/null
+++ b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOSqlsrv/Driver.php
@@ -0,0 +1,88 @@
+.
+ */
+
+namespace Doctrine\DBAL\Driver\PDOSqlsrv;
+
+/**
+ * The PDO-based Sqlsrv driver.
+ *
+ * @since 2.0
+ */
+class Driver implements \Doctrine\DBAL\Driver
+{
+ public function connect(array $params, $username = null, $password = null, array $driverOptions = array())
+ {
+ return new Connection(
+ $this->_constructPdoDsn($params),
+ $username,
+ $password,
+ $driverOptions
+ );
+ }
+
+ /**
+ * Constructs the Sqlsrv PDO DSN.
+ *
+ * @return string The DSN.
+ */
+ private function _constructPdoDsn(array $params)
+ {
+ $dsn = 'sqlsrv:server=';
+
+ if (isset($params['host'])) {
+ $dsn .= $params['host'];
+ }
+
+ if (isset($params['port']) && !empty($params['port'])) {
+ $dsn .= ',' . $params['port'];
+ }
+
+ if (isset($params['dbname'])) {;
+ $dsn .= ';Database=' . $params['dbname'];
+ }
+
+ if (isset($params['MultipleActiveResultSets'])) {
+ $dsn .= '; MultipleActiveResultSets=' . ($params['MultipleActiveResultSets'] ? 'true' : 'false');
+ }
+
+ return $dsn;
+ }
+
+
+ public function getDatabasePlatform()
+ {
+ return new \Doctrine\DBAL\Platforms\SQLServer2008Platform();
+ }
+
+ public function getSchemaManager(\Doctrine\DBAL\Connection $conn)
+ {
+ return new \Doctrine\DBAL\Schema\SQLServerSchemaManager($conn);
+ }
+
+ public function getName()
+ {
+ return 'pdo_sqlsrv';
+ }
+
+ public function getDatabase(\Doctrine\DBAL\Connection $conn)
+ {
+ $params = $conn->getParams();
+ return $params['dbname'];
+ }
+}
diff --git a/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOStatement.php b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOStatement.php
new file mode 100644
index 0000000..6456af7
--- /dev/null
+++ b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOStatement.php
@@ -0,0 +1,50 @@
+.
+ */
+
+namespace Doctrine\DBAL\Driver;
+
+/**
+ * The PDO implementation of the Statement interface.
+ * Used by all PDO-based drivers.
+ *
+ * @since 2.0
+ */
+class PDOStatement extends \PDOStatement implements Statement
+{
+ private function __construct() {}
+
+ public function setFetchMode($fetchStyle, $arg2 = null, $arg3 = null)
+ {
+ // This thin wrapper is necessary to shield against the weird signature
+ // of PDOStatement::setFetchMode(): even if the second and third
+ // parameters are optional, PHP will not let us remove it from this
+ // declaration.
+ if ($arg2 === null && $arg3 === null) {
+ return parent::setFetchMode($fetchStyle);
+ }
+
+ if ($arg3 === null) {
+ return parent::setFetchMode($fetchStyle, $arg2);
+ }
+
+ return parent::setFetchMode($fetchStyle, $arg2, $arg3);
+ }
+}
diff --git a/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/ResultStatement.php b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/ResultStatement.php
new file mode 100644
index 0000000..ef5eb02
--- /dev/null
+++ b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/ResultStatement.php
@@ -0,0 +1,113 @@
+.
+ */
+
+namespace Doctrine\DBAL\Driver;
+
+use PDO;
+
+/**
+ * Interface for the reading part of a prepare statement only.
+ *
+ * @author Benjamin Eberlei
+ */
+interface ResultStatement extends \Traversable
+{
+ /**
+ * Closes the cursor, enabling the statement to be executed again.
+ *
+ * @return boolean Returns TRUE on success or FALSE on failure.
+ */
+ function closeCursor();
+
+
+ /**
+ * columnCount
+ * Returns the number of columns in the result set
+ *
+ * @return integer 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.
+ */
+ function columnCount();
+
+ /**
+ * setFetchMode
+ * Set the fetch mode to use while iterating this statement.
+ *
+ * @param integer $fetchStyle
+ */
+ function setFetchMode($fetchStyle, $arg2 = null, $arg3 = null);
+
+ /**
+ * fetch
+ *
+ * @see Query::HYDRATE_* constants
+ * @param integer $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
+ *
+ * @param integer $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().
+ *
+ * @param integer $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.
+ *
+ * @return mixed
+ */
+ function fetch($fetchStyle = PDO::FETCH_BOTH);
+
+ /**
+ * Returns an array containing all of the result set rows
+ *
+ * @param integer $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
+ *
+ * @param integer $columnIndex Returns the indicated 0-indexed column when the value of $fetchStyle is
+ * Query::HYDRATE_COLUMN. Defaults to 0.
+ *
+ * @return array
+ */
+ function fetchAll($fetchStyle = PDO::FETCH_BOTH);
+
+ /**
+ * fetchColumn
+ * Returns a single column from the next row of a
+ * result set or FALSE if there are no more rows.
+ *
+ * @param integer $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.
+ *
+ * @return string returns a single column in the next row of a result set.
+ */
+ function fetchColumn($columnIndex = 0);
+}
+
diff --git a/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/Statement.php b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/Statement.php
new file mode 100644
index 0000000..d417833
--- /dev/null
+++ b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/Statement.php
@@ -0,0 +1,124 @@
+.
+ */
+
+namespace Doctrine\DBAL\Driver;
+
+use \PDO;
+
+/**
+ * Statement interface.
+ * Drivers must implement this interface.
+ *
+ * This resembles (a subset of) the PDOStatement interface.
+ *
+ * @author Konsta Vesterinen
+ * @author Roman Borschel
+ * @license http://www.opensource.org/licenses/lgpl-license.php LGPL
+ * @link www.doctrine-project.org
+ * @since 2.0
+ */
+interface Statement extends ResultStatement
+{
+ /**
+ * Binds a value to a corresponding named or positional
+ * placeholder in the SQL statement that was used to prepare the statement.
+ *
+ * @param mixed $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
+ *
+ * @param mixed $value The value to bind to the parameter.
+ * @param integer $type Explicit data type for the parameter using the PDO::PARAM_* constants.
+ *
+ * @return boolean Returns TRUE on success or FALSE on failure.
+ */
+ function bindValue($param, $value, $type = null);
+
+ /**
+ * 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.
+ *
+ * @param mixed $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
+ *
+ * @param mixed $variable Name of the PHP variable to bind to the SQL statement parameter.
+ *
+ * @param integer $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.
+ * @return boolean Returns TRUE on success or FALSE on failure.
+ */
+ function bindParam($column, &$variable, $type = null);
+
+ /**
+ * errorCode
+ * Fetch the SQLSTATE associated with the last operation on the statement handle
+ *
+ * @see Doctrine_Adapter_Interface::errorCode()
+ * @return string error code string
+ */
+ function errorCode();
+
+ /**
+ * errorInfo
+ * Fetch extended error information associated with the last operation on the statement handle
+ *
+ * @see Doctrine_Adapter_Interface::errorInfo()
+ * @return array error info array
+ */
+ function errorInfo();
+
+ /**
+ * 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
+ *
+ *
+ * @param array $params An array of values with as many elements as there are
+ * bound parameters in the SQL statement being executed.
+ * @return boolean Returns TRUE on success or FALSE on failure.
+ */
+ function execute($params = null);
+
+ /**
+ * 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.
+ *
+ * @return integer Returns the number of rows.
+ */
+ function rowCount();
+}
\ No newline at end of file
diff --git a/vendor/doctrine/dbal/lib/Doctrine/DBAL/DriverManager.php b/vendor/doctrine/dbal/lib/Doctrine/DBAL/DriverManager.php
new file mode 100644
index 0000000..b670ee5
--- /dev/null
+++ b/vendor/doctrine/dbal/lib/Doctrine/DBAL/DriverManager.php
@@ -0,0 +1,165 @@
+.
+ */
+
+namespace Doctrine\DBAL;
+
+use Doctrine\Common\EventManager;
+
+/**
+ * Factory for creating Doctrine\DBAL\Connection instances.
+ *
+ * @author Roman Borschel
+ * @since 2.0
+ */
+final class DriverManager
+{
+ /**
+ * List of supported drivers and their mappings to the driver classes.
+ *
+ * @var array
+ * @todo REMOVE. Users should directly supply class names instead.
+ */
+ private static $_driverMap = array(
+ 'pdo_mysql' => 'Doctrine\DBAL\Driver\PDOMySql\Driver',
+ 'pdo_sqlite' => 'Doctrine\DBAL\Driver\PDOSqlite\Driver',
+ 'pdo_pgsql' => 'Doctrine\DBAL\Driver\PDOPgSql\Driver',
+ 'pdo_oci' => 'Doctrine\DBAL\Driver\PDOOracle\Driver',
+ 'oci8' => 'Doctrine\DBAL\Driver\OCI8\Driver',
+ 'ibm_db2' => 'Doctrine\DBAL\Driver\IBMDB2\DB2Driver',
+ 'pdo_ibm' => 'Doctrine\DBAL\Driver\PDOIbm\Driver',
+ 'pdo_sqlsrv' => 'Doctrine\DBAL\Driver\PDOSqlsrv\Driver',
+ 'mysqli' => 'Doctrine\DBAL\Driver\Mysqli\Driver',
+ );
+
+ /** Private constructor. This class cannot be instantiated. */
+ private function __construct() { }
+
+ /**
+ * 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_sqlsrv
+ *
+ * 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.
+ *
+ * driverClass:
+ * The driver class to use.
+ *
+ * @param array $params The parameters.
+ * @param Doctrine\DBAL\Configuration The configuration to use.
+ * @param Doctrine\Common\EventManager The event manager to use.
+ * @return Doctrine\DBAL\Connection
+ */
+ public static function getConnection(
+ array $params,
+ Configuration $config = null,
+ EventManager $eventManager = null)
+ {
+ // create default config and event manager, if not set
+ if ( ! $config) {
+ $config = new Configuration();
+ }
+ if ( ! $eventManager) {
+ $eventManager = new EventManager();
+ }
+
+ // check for existing pdo object
+ if (isset($params['pdo']) && ! $params['pdo'] instanceof \PDO) {
+ throw DBALException::invalidPdoInstance();
+ } else if (isset($params['pdo'])) {
+ $params['pdo']->setAttribute(\PDO::ATTR_ERRMODE, \PDO::ERRMODE_EXCEPTION);
+ $params['driver'] = 'pdo_' . $params['pdo']->getAttribute(\PDO::ATTR_DRIVER_NAME);
+ } else {
+ self::_checkParams($params);
+ }
+ if (isset($params['driverClass'])) {
+ $className = $params['driverClass'];
+ } else {
+ $className = self::$_driverMap[$params['driver']];
+ }
+
+ $driver = new $className();
+
+ $wrapperClass = 'Doctrine\DBAL\Connection';
+ if (isset($params['wrapperClass'])) {
+ if (is_subclass_of($params['wrapperClass'], $wrapperClass)) {
+ $wrapperClass = $params['wrapperClass'];
+ } else {
+ throw DBALException::invalidWrapperClass($params['wrapperClass']);
+ }
+ }
+
+ return new $wrapperClass($params, $driver, $config, $eventManager);
+ }
+
+ /**
+ * Checks the list of parameters.
+ *
+ * @param array $params
+ */
+ private static function _checkParams(array $params)
+ {
+ // check existance of mandatory parameters
+
+ // driver
+ if ( ! isset($params['driver']) && ! isset($params['driverClass'])) {
+ throw DBALException::driverRequired();
+ }
+
+ // check validity of parameters
+
+ // driver
+ if ( isset($params['driver']) && ! isset(self::$_driverMap[$params['driver']])) {
+ throw DBALException::unknownDriver($params['driver'], array_keys(self::$_driverMap));
+ }
+
+ if (isset($params['driverClass']) && ! in_array('Doctrine\DBAL\Driver', class_implements($params['driverClass'], true))) {
+ throw DBALException::invalidDriverClass($params['driverClass']);
+ }
+ }
+}
diff --git a/vendor/doctrine/dbal/lib/Doctrine/DBAL/Event/ConnectionEventArgs.php b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Event/ConnectionEventArgs.php
new file mode 100644
index 0000000..ce80ecd
--- /dev/null
+++ b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Event/ConnectionEventArgs.php
@@ -0,0 +1,79 @@
+.
+*/
+
+namespace Doctrine\DBAL\Event;
+
+use Doctrine\Common\EventArgs,
+ Doctrine\DBAL\Connection;
+
+/**
+ * Event Arguments used when a Driver connection is established inside Doctrine\DBAL\Connection.
+ *
+ * @license http://www.opensource.org/licenses/lgpl-license.php LGPL
+ * @link www.doctrine-project.com
+ * @since 1.0
+ * @version $Revision$
+ * @author Benjamin Eberlei
+ */
+class ConnectionEventArgs extends EventArgs
+{
+ /**
+ * @var Connection
+ */
+ private $_connection = null;
+
+ public function __construct(Connection $connection)
+ {
+ $this->_connection = $connection;
+ }
+
+ /**
+ * @return Doctrine\DBAL\Connection
+ */
+ public function getConnection()
+ {
+ return $this->_connection;
+ }
+
+ /**
+ * @return Doctrine\DBAL\Driver
+ */
+ public function getDriver()
+ {
+ return $this->_connection->getDriver();
+ }
+
+ /**
+ * @return Doctrine\DBAL\Platforms\AbstractPlatform
+ */
+ public function getDatabasePlatform()
+ {
+ return $this->_connection->getDatabasePlatform();
+ }
+
+ /**
+ * @return Doctrine\DBAL\Schema\AbstractSchemaManager
+ */
+ public function getSchemaManager()
+ {
+ return $this->_connection->getSchemaManager();
+ }
+}
diff --git a/vendor/doctrine/dbal/lib/Doctrine/DBAL/Event/Listeners/MysqlSessionInit.php b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Event/Listeners/MysqlSessionInit.php
new file mode 100644
index 0000000..a9718d5
--- /dev/null
+++ b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Event/Listeners/MysqlSessionInit.php
@@ -0,0 +1,74 @@
+.
+*/
+
+namespace Doctrine\DBAL\Event\Listeners;
+
+use Doctrine\DBAL\Event\ConnectionEventArgs;
+use Doctrine\DBAL\Events;
+use Doctrine\Common\EventSubscriber;
+
+/**
+ * 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
+ * @link www.doctrine-project.com
+ * @since 1.0
+ * @version $Revision$
+ * @author Benjamin Eberlei
+ * @deprecated Use "charset" option to PDO MySQL Connection instead.
+ */
+class MysqlSessionInit implements EventSubscriber
+{
+ /**
+ * @var string
+ */
+ private $_charset;
+
+ /**
+ * @var string
+ */
+ private $_collation;
+
+ /**
+ * Configure Charset and Collation options of MySQL Client for each Connection
+ *
+ * @param string $charset
+ * @param string $collation
+ */
+ public function __construct($charset = 'utf8', $collation = false)
+ {
+ $this->_charset = $charset;
+ $this->_collation = $collation;
+ }
+
+ /**
+ * @param ConnectionEventArgs $args
+ * @return void
+ */
+ public function postConnect(ConnectionEventArgs $args)
+ {
+ $collation = ($this->_collation) ? " COLLATE ".$this->_collation : "";
+ $args->getConnection()->executeUpdate("SET NAMES ".$this->_charset . $collation);
+ }
+
+ public function getSubscribedEvents()
+ {
+ return array(Events::postConnect);
+ }
+}
\ No newline at end of file
diff --git a/vendor/doctrine/dbal/lib/Doctrine/DBAL/Event/Listeners/OracleSessionInit.php b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Event/Listeners/OracleSessionInit.php
new file mode 100644
index 0000000..7f5caa3
--- /dev/null
+++ b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Event/Listeners/OracleSessionInit.php
@@ -0,0 +1,79 @@
+.
+*/
+
+namespace Doctrine\DBAL\Event\Listeners;
+
+use Doctrine\DBAL\Event\ConnectionEventArgs;
+use Doctrine\DBAL\Events;
+use Doctrine\Common\EventSubscriber;
+
+/**
+ * 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 HH24:MI:SS"
+ * 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
+ * @link www.doctrine-project.com
+ * @since 2.0
+ * @author Benjamin Eberlei
+ */
+class OracleSessionInit implements EventSubscriber
+{
+ protected $_defaultSessionVars = array(
+ 'NLS_TIME_FORMAT' => "HH24:MI:SS",
+ 'NLS_DATE_FORMAT' => "YYYY-MM-DD HH24:MI:SS",
+ 'NLS_TIMESTAMP_FORMAT' => "YYYY-MM-DD HH24:MI:SS",
+ 'NLS_TIMESTAMP_TZ_FORMAT' => "YYYY-MM-DD HH24:MI:SS TZH:TZM",
+ );
+
+ /**
+ * @param array $oracleSessionVars
+ */
+ public function __construct(array $oracleSessionVars = array())
+ {
+ $this->_defaultSessionVars = array_merge($this->_defaultSessionVars, $oracleSessionVars);
+ }
+
+ /**
+ * @param ConnectionEventArgs $args
+ * @return void
+ */
+ public function postConnect(ConnectionEventArgs $args)
+ {
+ if (count($this->_defaultSessionVars)) {
+ array_change_key_case($this->_defaultSessionVars, \CASE_UPPER);
+ $vars = array();
+ foreach ($this->_defaultSessionVars AS $option => $value) {
+ $vars[] = $option." = '".$value."'";
+ }
+ $sql = "ALTER SESSION SET ".implode(" ", $vars);
+ $args->getConnection()->executeUpdate($sql);
+ }
+ }
+
+ public function getSubscribedEvents()
+ {
+ return array(Events::postConnect);
+ }
+}
diff --git a/vendor/doctrine/dbal/lib/Doctrine/DBAL/Event/Listeners/SQLSessionInit.php b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Event/Listeners/SQLSessionInit.php
new file mode 100644
index 0000000..670a61e
--- /dev/null
+++ b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Event/Listeners/SQLSessionInit.php
@@ -0,0 +1,63 @@
+.
+*/
+
+namespace Doctrine\DBAL\Event\Listeners;
+
+use Doctrine\DBAL\Event\ConnectionEventArgs;
+use Doctrine\DBAL\Events;
+use Doctrine\Common\EventSubscriber;
+
+/**
+ * Session init listener for executing a single SQL statement right after a connection is opened.
+ *
+ * @license http://www.opensource.org/licenses/lgpl-license.php LGPL
+ * @link www.doctrine-project.com
+ * @since 2.2
+ * @author Benjamin Eberlei
+ */
+class SQLSessionInit implements EventSubscriber
+{
+ /**
+ * @var string
+ */
+ protected $sql;
+
+ /**
+ * @param string $sql
+ */
+ public function __construct($sql)
+ {
+ $this->sql = $sql;
+ }
+
+ /**
+ * @param ConnectionEventArgs $args
+ * @return void
+ */
+ public function postConnect(ConnectionEventArgs $args)
+ {
+ $conn = $args->getConnection();
+ $conn->exec($this->sql);
+ }
+
+ public function getSubscribedEvents()
+ {
+ return array(Events::postConnect);
+ }
+}
\ No newline at end of file
diff --git a/vendor/doctrine/dbal/lib/Doctrine/DBAL/Event/SchemaAlterTableAddColumnEventArgs.php b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Event/SchemaAlterTableAddColumnEventArgs.php
new file mode 100644
index 0000000..453f942
--- /dev/null
+++ b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Event/SchemaAlterTableAddColumnEventArgs.php
@@ -0,0 +1,114 @@
+.
+*/
+
+namespace Doctrine\DBAL\Event;
+
+use Doctrine\DBAL\Platforms\AbstractPlatform,
+ Doctrine\DBAL\Schema\Column,
+ Doctrine\DBAL\Schema\TableDiff;
+
+/**
+ * Event Arguments used when SQL queries for adding table columns are generated inside Doctrine\DBAL\Platform\*Platform.
+ *
+ * @license http://www.opensource.org/licenses/lgpl-license.php LGPL
+ * @link www.doctrine-project.com
+ * @since 2.2
+ * @author Jan Sorgalla
+ */
+class SchemaAlterTableAddColumnEventArgs extends SchemaEventArgs
+{
+ /**
+ * @var \Doctrine\DBAL\Schema\Column
+ */
+ private $_column = null;
+
+ /**
+ * @var \Doctrine\DBAL\Schema\TableDiff
+ */
+ private $_tableDiff = null;
+
+ /**
+ * @var \Doctrine\DBAL\Platforms\AbstractPlatform
+ */
+ private $_platform = null;
+
+ /**
+ * @var array
+ */
+ private $_sql = array();
+
+ /**
+ * @param \Doctrine\DBAL\Schema\Column $column
+ * @param \Doctrine\DBAL\Schema\TableDiff $tableDiff
+ * @param \Doctrine\DBAL\Platforms\AbstractPlatform $platform
+ */
+ public function __construct(Column $column, TableDiff $tableDiff, AbstractPlatform $platform)
+ {
+ $this->_column = $column;
+ $this->_tableDiff = $tableDiff;
+ $this->_platform = $platform;
+ }
+
+ /**
+ * @return \Doctrine\DBAL\Schema\Column
+ */
+ public function getColumn()
+ {
+ return $this->_column;
+ }
+
+ /**
+ * @return \Doctrine\DBAL\Schema\TableDiff
+ */
+ public function getTableDiff()
+ {
+ return $this->_tableDiff;
+ }
+
+ /**
+ * @return \Doctrine\DBAL\Platforms\AbstractPlatform
+ */
+ public function getPlatform()
+ {
+ return $this->_platform;
+ }
+
+ /**
+ * @param string|array $sql
+ * @return \Doctrine\DBAL\Event\SchemaAlterTableAddColumnEventArgs
+ */
+ public function addSql($sql)
+ {
+ if (is_array($sql)) {
+ $this->_sql = array_merge($this->_sql, $sql);
+ } else {
+ $this->_sql[] = $sql;
+ }
+
+ return $this;
+ }
+
+ /**
+ * @return array
+ */
+ public function getSql()
+ {
+ return $this->_sql;
+ }
+}
diff --git a/vendor/doctrine/dbal/lib/Doctrine/DBAL/Event/SchemaAlterTableChangeColumnEventArgs.php b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Event/SchemaAlterTableChangeColumnEventArgs.php
new file mode 100644
index 0000000..180fbee
--- /dev/null
+++ b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Event/SchemaAlterTableChangeColumnEventArgs.php
@@ -0,0 +1,114 @@
+.
+*/
+
+namespace Doctrine\DBAL\Event;
+
+use Doctrine\DBAL\Platforms\AbstractPlatform,
+ Doctrine\DBAL\Schema\ColumnDiff,
+ Doctrine\DBAL\Schema\TableDiff;
+
+/**
+ * Event Arguments used when SQL queries for changing table columns are generated inside Doctrine\DBAL\Platform\*Platform.
+ *
+ * @license http://www.opensource.org/licenses/lgpl-license.php LGPL
+ * @link www.doctrine-project.com
+ * @since 2.2
+ * @author Jan Sorgalla
+ */
+class SchemaAlterTableChangeColumnEventArgs extends SchemaEventArgs
+{
+ /**
+ * @var \Doctrine\DBAL\Schema\ColumnDiff
+ */
+ private $_columnDiff = null;
+
+ /**
+ * @var \Doctrine\DBAL\Schema\TableDiff
+ */
+ private $_tableDiff = null;
+
+ /**
+ * @var \Doctrine\DBAL\Platforms\AbstractPlatform
+ */
+ private $_platform = null;
+
+ /**
+ * @var array
+ */
+ private $_sql = array();
+
+ /**
+ * @param \Doctrine\DBAL\Schema\ColumnDiff $columnDiff
+ * @param \Doctrine\DBAL\Schema\TableDiff $tableDiff
+ * @param \Doctrine\DBAL\Platforms\AbstractPlatform $platform
+ */
+ public function __construct(ColumnDiff $columnDiff, TableDiff $tableDiff, AbstractPlatform $platform)
+ {
+ $this->_columnDiff = $columnDiff;
+ $this->_tableDiff = $tableDiff;
+ $this->_platform = $platform;
+ }
+
+ /**
+ * @return \Doctrine\DBAL\Schema\ColumnDiff
+ */
+ public function getColumnDiff()
+ {
+ return $this->_columnDiff;
+ }
+
+ /**
+ * @return \Doctrine\DBAL\Schema\TableDiff
+ */
+ public function getTableDiff()
+ {
+ return $this->_tableDiff;
+ }
+
+ /**
+ * @return \Doctrine\DBAL\Platforms\AbstractPlatform
+ */
+ public function getPlatform()
+ {
+ return $this->_platform;
+ }
+
+ /**
+ * @param string|array $sql
+ * @return \Doctrine\DBAL\Event\SchemaAlterTableChangeColumnEventArgs
+ */
+ public function addSql($sql)
+ {
+ if (is_array($sql)) {
+ $this->_sql = array_merge($this->_sql, $sql);
+ } else {
+ $this->_sql[] = $sql;
+ }
+
+ return $this;
+ }
+
+ /**
+ * @return array
+ */
+ public function getSql()
+ {
+ return $this->_sql;
+ }
+}
diff --git a/vendor/doctrine/dbal/lib/Doctrine/DBAL/Event/SchemaAlterTableEventArgs.php b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Event/SchemaAlterTableEventArgs.php
new file mode 100644
index 0000000..0f9a0a5
--- /dev/null
+++ b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Event/SchemaAlterTableEventArgs.php
@@ -0,0 +1,99 @@
+.
+*/
+
+namespace Doctrine\DBAL\Event;
+
+use Doctrine\DBAL\Platforms\AbstractPlatform,
+ Doctrine\DBAL\Schema\Column,
+ Doctrine\DBAL\Schema\TableDiff;
+
+/**
+ * Event Arguments used when SQL queries for creating tables are generated inside Doctrine\DBAL\Platform\*Platform.
+ *
+ * @license http://www.opensource.org/licenses/lgpl-license.php LGPL
+ * @link www.doctrine-project.com
+ * @since 2.2
+ * @author Jan Sorgalla
+ */
+class SchemaAlterTableEventArgs extends SchemaEventArgs
+{
+ /**
+ * @var \Doctrine\DBAL\Schema\TableDiff
+ */
+ private $_tableDiff = null;
+
+ /**
+ * @var \Doctrine\DBAL\Platforms\AbstractPlatform
+ */
+ private $_platform = null;
+
+ /**
+ * @var array
+ */
+ private $_sql = array();
+
+ /**
+ * @param \Doctrine\DBAL\Schema\TableDiff $tableDiff
+ * @param \Doctrine\DBAL\Platforms\AbstractPlatform $platform
+ */
+ public function __construct(TableDiff $tableDiff, AbstractPlatform $platform)
+ {
+ $this->_tableDiff = $tableDiff;
+ $this->_platform = $platform;
+ }
+
+ /**
+ * @return \Doctrine\DBAL\Schema\TableDiff
+ */
+ public function getTableDiff()
+ {
+ return $this->_tableDiff;
+ }
+
+ /**
+ * @return \Doctrine\DBAL\Platforms\AbstractPlatform
+ */
+ public function getPlatform()
+ {
+ return $this->_platform;
+ }
+
+ /**
+ * @param string|array $sql
+ * @return \Doctrine\DBAL\Event\SchemaAlterTableEventArgs
+ */
+ public function addSql($sql)
+ {
+ if (is_array($sql)) {
+ $this->_sql = array_merge($this->_sql, $sql);
+ } else {
+ $this->_sql[] = $sql;
+ }
+
+ return $this;
+ }
+
+ /**
+ * @return array
+ */
+ public function getSql()
+ {
+ return $this->_sql;
+ }
+}
diff --git a/vendor/doctrine/dbal/lib/Doctrine/DBAL/Event/SchemaAlterTableRemoveColumnEventArgs.php b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Event/SchemaAlterTableRemoveColumnEventArgs.php
new file mode 100644
index 0000000..b64bbc1
--- /dev/null
+++ b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Event/SchemaAlterTableRemoveColumnEventArgs.php
@@ -0,0 +1,114 @@
+.
+*/
+
+namespace Doctrine\DBAL\Event;
+
+use Doctrine\DBAL\Platforms\AbstractPlatform,
+ Doctrine\DBAL\Schema\Column,
+ Doctrine\DBAL\Schema\TableDiff;
+
+/**
+ * Event Arguments used when SQL queries for removing table columns are generated inside Doctrine\DBAL\Platform\*Platform.
+ *
+ * @license http://www.opensource.org/licenses/lgpl-license.php LGPL
+ * @link www.doctrine-project.com
+ * @since 2.2
+ * @author Jan Sorgalla
+ */
+class SchemaAlterTableRemoveColumnEventArgs extends SchemaEventArgs
+{
+ /**
+ * @var \Doctrine\DBAL\Schema\Column
+ */
+ private $_column = null;
+
+ /**
+ * @var \Doctrine\DBAL\Schema\TableDiff
+ */
+ private $_tableDiff = null;
+
+ /**
+ * @var \Doctrine\DBAL\Platforms\AbstractPlatform
+ */
+ private $_platform = null;
+
+ /**
+ * @var array
+ */
+ private $_sql = array();
+
+ /**
+ * @param \Doctrine\DBAL\Schema\Column $column
+ * @param \Doctrine\DBAL\Schema\TableDiff $tableDiff
+ * @param \Doctrine\DBAL\Platforms\AbstractPlatform $platform
+ */
+ public function __construct(Column $column, TableDiff $tableDiff, AbstractPlatform $platform)
+ {
+ $this->_column = $column;
+ $this->_tableDiff = $tableDiff;
+ $this->_platform = $platform;
+ }
+
+ /**
+ * @return \Doctrine\DBAL\Schema\Column
+ */
+ public function getColumn()
+ {
+ return $this->_column;
+ }
+
+ /**
+ * @return \Doctrine\DBAL\Schema\TableDiff
+ */
+ public function getTableDiff()
+ {
+ return $this->_tableDiff;
+ }
+
+ /**
+ * @return \Doctrine\DBAL\Platforms\AbstractPlatform
+ */
+ public function getPlatform()
+ {
+ return $this->_platform;
+ }
+
+ /**
+ * @param string|array $sql
+ * @return \Doctrine\DBAL\Event\SchemaAlterTableRemoveColumnEventArgs
+ */
+ public function addSql($sql)
+ {
+ if (is_array($sql)) {
+ $this->_sql = array_merge($this->_sql, $sql);
+ } else {
+ $this->_sql[] = $sql;
+ }
+
+ return $this;
+ }
+
+ /**
+ * @return array
+ */
+ public function getSql()
+ {
+ return $this->_sql;
+ }
+}
diff --git a/vendor/doctrine/dbal/lib/Doctrine/DBAL/Event/SchemaAlterTableRenameColumnEventArgs.php b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Event/SchemaAlterTableRenameColumnEventArgs.php
new file mode 100644
index 0000000..4b9a88b
--- /dev/null
+++ b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Event/SchemaAlterTableRenameColumnEventArgs.php
@@ -0,0 +1,129 @@
+.
+*/
+
+namespace Doctrine\DBAL\Event;
+
+use Doctrine\DBAL\Platforms\AbstractPlatform,
+ Doctrine\DBAL\Schema\Column,
+ Doctrine\DBAL\Schema\TableDiff;
+
+/**
+ * Event Arguments used when SQL queries for renaming table columns are generated inside Doctrine\DBAL\Platform\*Platform.
+ *
+ * @license http://www.opensource.org/licenses/lgpl-license.php LGPL
+ * @link www.doctrine-project.com
+ * @since 2.2
+ * @author Jan Sorgalla
+ */
+class SchemaAlterTableRenameColumnEventArgs extends SchemaEventArgs
+{
+ /**
+ * @var string
+ */
+ private $_oldColumnName = null;
+
+ /**
+ * @var \Doctrine\DBAL\Schema\Column
+ */
+ private $_column = null;
+
+ /**
+ * @var \Doctrine\DBAL\Schema\TableDiff
+ */
+ private $_tableDiff = null;
+
+ /**
+ * @var \Doctrine\DBAL\Platforms\AbstractPlatform
+ */
+ private $_platform = null;
+
+ /**
+ * @var array
+ */
+ private $_sql = array();
+
+ /**
+ * @param string $oldColumnName
+ * @param \Doctrine\DBAL\Schema\Column $column
+ * @param \Doctrine\DBAL\Schema\TableDiff $tableDiff
+ * @param \Doctrine\DBAL\Platforms\AbstractPlatform $platform
+ */
+ public function __construct($oldColumnName, Column $column, TableDiff $tableDiff, AbstractPlatform $platform)
+ {
+ $this->_oldColumnName = $oldColumnName;
+ $this->_column = $column;
+ $this->_tableDiff = $tableDiff;
+ $this->_platform = $platform;
+ }
+
+ /**
+ * @return string
+ */
+ public function getOldColumnName()
+ {
+ return $this->_oldColumnName;
+ }
+
+ /**
+ * @return \Doctrine\DBAL\Schema\Column
+ */
+ public function getColumn()
+ {
+ return $this->_column;
+ }
+
+ /**
+ * @return \Doctrine\DBAL\Schema\TableDiff
+ */
+ public function getTableDiff()
+ {
+ return $this->_tableDiff;
+ }
+
+ /**
+ * @return \Doctrine\DBAL\Platforms\AbstractPlatform
+ */
+ public function getPlatform()
+ {
+ return $this->_platform;
+ }
+
+ /**
+ * @param string|array $sql
+ * @return \Doctrine\DBAL\Event\SchemaAlterTableRenameColumnEventArgs
+ */
+ public function addSql($sql)
+ {
+ if (is_array($sql)) {
+ $this->_sql = array_merge($this->_sql, $sql);
+ } else {
+ $this->_sql[] = $sql;
+ }
+
+ return $this;
+ }
+
+ /**
+ * @return array
+ */
+ public function getSql()
+ {
+ return $this->_sql;
+ }
+}
diff --git a/vendor/doctrine/dbal/lib/Doctrine/DBAL/Event/SchemaColumnDefinitionEventArgs.php b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Event/SchemaColumnDefinitionEventArgs.php
new file mode 100644
index 0000000..4cde46c
--- /dev/null
+++ b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Event/SchemaColumnDefinitionEventArgs.php
@@ -0,0 +1,137 @@
+.
+*/
+
+namespace Doctrine\DBAL\Event;
+
+use Doctrine\DBAL\Connection,
+ Doctrine\DBAL\Schema\Column;
+
+/**
+ * Event Arguments used when the portable column definition is generated inside Doctrine\DBAL\Schema\AbstractSchemaManager.
+ *
+ * @license http://www.opensource.org/licenses/lgpl-license.php LGPL
+ * @link www.doctrine-project.com
+ * @since 2.2
+ * @author Jan Sorgalla
+ */
+class SchemaColumnDefinitionEventArgs extends SchemaEventArgs
+{
+ /**
+ * @var \Doctrine\DBAL\Schema\Column
+ */
+ private $_column = null;
+
+ /**
+ * Raw column data as fetched from the database
+ *
+ * @var array
+ */
+ private $_tableColumn = null;
+
+ /**
+ * @var string
+ */
+ private $_table = null;
+
+ /**
+ * @var string
+ */
+ private $_database = null;
+
+ /**
+ * @var \Doctrine\DBAL\Connection
+ */
+ private $_connection = null;
+
+ /**
+ * @param array $tableColumn
+ * @param string $table
+ * @param string $database
+ * @param \Doctrine\DBAL\Connection $conn
+ */
+ public function __construct(array $tableColumn, $table, $database, Connection $connection)
+ {
+ $this->_tableColumn = $tableColumn;
+ $this->_table = $table;
+ $this->_database = $database;
+ $this->_connection = $connection;
+ }
+
+ /**
+ * Allows to clear the column which means the column will be excluded from
+ * tables column list.
+ *
+ * @param null|\Doctrine\DBAL\Schema\Column $column
+ * @return SchemaColumnDefinitionEventArgs
+ */
+ public function setColumn(Column $column = null)
+ {
+ $this->_column = $column;
+
+ return $this;
+ }
+
+ /**
+ * @return \Doctrine\DBAL\Schema\Column
+ */
+ public function getColumn()
+ {
+ return $this->_column;
+ }
+
+ /**
+ * @return array
+ */
+ public function getTableColumn()
+ {
+ return $this->_tableColumn;
+ }
+
+ /**
+ * @return string
+ */
+ public function getTable()
+ {
+ return $this->_table;
+ }
+
+ /**
+ * @return string
+ */
+ public function getDatabase()
+ {
+ return $this->_database;
+ }
+
+ /**
+ * @return \Doctrine\DBAL\Connection
+ */
+ public function getConnection()
+ {
+ return $this->_connection;
+ }
+
+ /**
+ * @return \Doctrine\DBAL\Platforms\AbstractPlatform
+ */
+ public function getDatabasePlatform()
+ {
+ return $this->_connection->getDatabasePlatform();
+ }
+}
diff --git a/vendor/doctrine/dbal/lib/Doctrine/DBAL/Event/SchemaCreateTableColumnEventArgs.php b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Event/SchemaCreateTableColumnEventArgs.php
new file mode 100644
index 0000000..5e9a440
--- /dev/null
+++ b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Event/SchemaCreateTableColumnEventArgs.php
@@ -0,0 +1,114 @@
+.
+*/
+
+namespace Doctrine\DBAL\Event;
+
+use Doctrine\DBAL\Platforms\AbstractPlatform,
+ Doctrine\DBAL\Schema\Column,
+ Doctrine\DBAL\Schema\Table;
+
+/**
+ * Event Arguments used when SQL queries for creating table columns are generated inside Doctrine\DBAL\Platform\AbstractPlatform.
+ *
+ * @license http://www.opensource.org/licenses/lgpl-license.php LGPL
+ * @link www.doctrine-project.com
+ * @since 2.2
+ * @author Jan Sorgalla
+ */
+class SchemaCreateTableColumnEventArgs extends SchemaEventArgs
+{
+ /**
+ * @var \Doctrine\DBAL\Schema\Column
+ */
+ private $_column = null;
+
+ /**
+ * @var \Doctrine\DBAL\Schema\Table
+ */
+ private $_table = null;
+
+ /**
+ * @var \Doctrine\DBAL\Platforms\AbstractPlatform
+ */
+ private $_platform = null;
+
+ /**
+ * @var array
+ */
+ private $_sql = array();
+
+ /**
+ * @param \Doctrine\DBAL\Schema\Column $column
+ * @param \Doctrine\DBAL\Schema\Table $table
+ * @param \Doctrine\DBAL\Platforms\AbstractPlatform $platform
+ */
+ public function __construct(Column $column, Table $table, AbstractPlatform $platform)
+ {
+ $this->_column = $column;
+ $this->_table = $table;
+ $this->_platform = $platform;
+ }
+
+ /**
+ * @return \Doctrine\DBAL\Schema\Column
+ */
+ public function getColumn()
+ {
+ return $this->_column;
+ }
+
+ /**
+ * @return \Doctrine\DBAL\Schema\Table
+ */
+ public function getTable()
+ {
+ return $this->_table;
+ }
+
+ /**
+ * @return \Doctrine\DBAL\Platforms\AbstractPlatform
+ */
+ public function getPlatform()
+ {
+ return $this->_platform;
+ }
+
+ /**
+ * @param string|array $sql
+ * @return \Doctrine\DBAL\Event\SchemaCreateTableColumnEventArgs
+ */
+ public function addSql($sql)
+ {
+ if (is_array($sql)) {
+ $this->_sql = array_merge($this->_sql, $sql);
+ } else {
+ $this->_sql[] = $sql;
+ }
+
+ return $this;
+ }
+
+ /**
+ * @return array
+ */
+ public function getSql()
+ {
+ return $this->_sql;
+ }
+}
diff --git a/vendor/doctrine/dbal/lib/Doctrine/DBAL/Event/SchemaCreateTableEventArgs.php b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Event/SchemaCreateTableEventArgs.php
new file mode 100644
index 0000000..138981c
--- /dev/null
+++ b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Event/SchemaCreateTableEventArgs.php
@@ -0,0 +1,128 @@
+.
+*/
+
+namespace Doctrine\DBAL\Event;
+
+use Doctrine\DBAL\Platforms\AbstractPlatform,
+ Doctrine\DBAL\Schema\Table;
+
+/**
+ * Event Arguments used when SQL queries for creating tables are generated inside Doctrine\DBAL\Platform\AbstractPlatform.
+ *
+ * @license http://www.opensource.org/licenses/lgpl-license.php LGPL
+ * @link www.doctrine-project.com
+ * @since 2.2
+ * @author Jan Sorgalla
+ */
+class SchemaCreateTableEventArgs extends SchemaEventArgs
+{
+ /**
+ * @var \Doctrine\DBAL\Schema\Table
+ */
+ private $_table = null;
+
+ /**
+ * @var array
+ */
+ private $_columns = null;
+
+ /**
+ * @var array
+ */
+ private $_options = null;
+
+ /**
+ * @var \Doctrine\DBAL\Platforms\AbstractPlatform
+ */
+ private $_platform = null;
+
+ /**
+ * @var array
+ */
+ private $_sql = array();
+
+ /**
+ * @param \Doctrine\DBAL\Schema\Table $table
+ * @param array $columns
+ * @param array $options
+ * @param Doctrine\DBAL\Platforms\AbstractPlatform $platform
+ */
+ public function __construct(Table $table, array $columns, array $options, AbstractPlatform $platform)
+ {
+ $this->_table = $table;
+ $this->_columns = $columns;
+ $this->_options = $options;
+ $this->_platform = $platform;
+ }
+
+ /**
+ * @return \Doctrine\DBAL\Schema\Table
+ */
+ public function getTable()
+ {
+ return $this->_table;
+ }
+
+ /**
+ * @return array
+ */
+ public function getColumns()
+ {
+ return $this->_columns;
+ }
+
+ /**
+ * @return array
+ */
+ public function getOptions()
+ {
+ return $this->_options;
+ }
+
+ /**
+ * @return \Doctrine\DBAL\Platforms\AbstractPlatform
+ */
+ public function getPlatform()
+ {
+ return $this->_platform;
+ }
+
+ /**
+ * @param string|array $sql
+ * @return \Doctrine\DBAL\Event\SchemaCreateTableEventArgs
+ */
+ public function addSql($sql)
+ {
+ if (is_array($sql)) {
+ $this->_sql = array_merge($this->_sql, $sql);
+ } else {
+ $this->_sql[] = $sql;
+ }
+
+ return $this;
+ }
+
+ /**
+ * @return array
+ */
+ public function getSql()
+ {
+ return $this->_sql;
+ }
+}
diff --git a/vendor/doctrine/dbal/lib/Doctrine/DBAL/Event/SchemaDropTableEventArgs.php b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Event/SchemaDropTableEventArgs.php
new file mode 100644
index 0000000..ebd2163
--- /dev/null
+++ b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Event/SchemaDropTableEventArgs.php
@@ -0,0 +1,98 @@
+.
+*/
+
+namespace Doctrine\DBAL\Event;
+
+use Doctrine\DBAL\Platforms\AbstractPlatform,
+ Doctrine\DBAL\Schema\Table;
+
+/**
+ * Event Arguments used when the SQL query for dropping tables are generated inside Doctrine\DBAL\Platform\AbstractPlatform.
+ *
+ * @license http://www.opensource.org/licenses/lgpl-license.php LGPL
+ * @link www.doctrine-project.com
+ * @since 2.2
+ * @author Jan Sorgalla
+ */
+class SchemaDropTableEventArgs extends SchemaEventArgs
+{
+ /**
+ * @var string|\Doctrine\DBAL\Schema\Table
+ */
+ private $_table = null;
+
+ /**
+ * @var \Doctrine\DBAL\Platforms\AbstractPlatform
+ */
+ private $_platform = null;
+
+ /**
+ * @var string
+ */
+ private $_sql = null;
+
+ /**
+ * @param string|\Doctrine\DBAL\Schema\Table $table
+ * @param \Doctrine\DBAL\Platforms\AbstractPlatform $platform
+ */
+ public function __construct($table, AbstractPlatform $platform)
+ {
+ if (!$table instanceof Table && !is_string($table)) {
+ throw new \InvalidArgumentException('SchemaCreateTableEventArgs expects $table parameter to be string or \Doctrine\DBAL\Schema\Table.');
+ }
+
+ $this->_table = $table;
+ $this->_platform = $platform;
+ }
+
+ /**
+ * @return string|\Doctrine\DBAL\Schema\Table
+ */
+ public function getTable()
+ {
+ return $this->_table;
+ }
+
+ /**
+ * @return \Doctrine\DBAL\Platforms\AbstractPlatform
+ */
+ public function getPlatform()
+ {
+ return $this->_platform;
+ }
+
+ /**
+ * @param string $sql
+ * @return \Doctrine\DBAL\Event\SchemaDropTableEventArgs
+ */
+ public function setSql($sql)
+ {
+ $this->_sql = $sql;
+
+ return $this;
+ }
+
+ /**
+ * @return string
+ */
+ public function getSql()
+ {
+ return $this->_sql;
+ }
+}
diff --git a/vendor/doctrine/dbal/lib/Doctrine/DBAL/Event/SchemaEventArgs.php b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Event/SchemaEventArgs.php
new file mode 100644
index 0000000..8181225
--- /dev/null
+++ b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Event/SchemaEventArgs.php
@@ -0,0 +1,56 @@
+.
+*/
+
+namespace Doctrine\DBAL\Event;
+
+use Doctrine\Common\EventArgs;
+
+/**
+ * Base class for schema related events.
+ *
+ * @license http://www.opensource.org/licenses/lgpl-license.php LGPL
+ * @link www.doctrine-project.com
+ * @since 2.2
+ * @author Jan Sorgalla
+ */
+class SchemaEventArgs extends EventArgs
+{
+ /**
+ * @var boolean
+ */
+ private $_preventDefault = false;
+
+ /**
+ * @return \Doctrine\DBAL\Event\SchemaEventArgs
+ */
+ public function preventDefault()
+ {
+ $this->_preventDefault = true;
+
+ return $this;
+ }
+
+ /**
+ * @return boolean
+ */
+ public function isDefaultPrevented()
+ {
+ return $this->_preventDefault;
+ }
+}
diff --git a/vendor/doctrine/dbal/lib/Doctrine/DBAL/Event/SchemaIndexDefinitionEventArgs.php b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Event/SchemaIndexDefinitionEventArgs.php
new file mode 100644
index 0000000..9eb95af
--- /dev/null
+++ b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Event/SchemaIndexDefinitionEventArgs.php
@@ -0,0 +1,122 @@
+.
+*/
+
+namespace Doctrine\DBAL\Event;
+
+use Doctrine\DBAL\Connection,
+ Doctrine\DBAL\Schema\Index;
+
+/**
+ * Event Arguments used when the portable index definition is generated inside Doctrine\DBAL\Schema\AbstractSchemaManager.
+ *
+ * @license http://www.opensource.org/licenses/lgpl-license.php LGPL
+ * @link www.doctrine-project.com
+ * @since 2.2
+ * @author Jan Sorgalla
+ */
+class SchemaIndexDefinitionEventArgs extends SchemaEventArgs
+{
+ /**
+ * @var \Doctrine\DBAL\Schema\Index
+ */
+ private $_index = null;
+
+ /**
+ * Raw index data as fetched from the database
+ *
+ * @var array
+ */
+ private $_tableIndex = null;
+
+ /**
+ * @var string
+ */
+ private $_table = null;
+
+ /**
+ * @var \Doctrine\DBAL\Connection
+ */
+ private $_connection = null;
+
+ /**
+ * @param array $tableIndex
+ * @param string $table
+ * @param \Doctrine\DBAL\Connection $conn
+ */
+ public function __construct(array $tableIndex, $table, Connection $connection)
+ {
+ $this->_tableIndex = $tableIndex;
+ $this->_table = $table;
+ $this->_connection = $connection;
+ }
+
+ /**
+ * Allows to clear the index which means the index will be excluded from
+ * tables index list.
+ *
+ * @param null|\Doctrine\DBAL\Schema\Index $index
+ * @return SchemaIndexDefinitionEventArgs
+ */
+ public function setIndex(Index $index = null)
+ {
+ $this->_index = $index;
+
+ return $this;
+ }
+
+ /**
+ * @return \Doctrine\DBAL\Schema\Index
+ */
+ public function getIndex()
+ {
+ return $this->_index;
+ }
+
+ /**
+ * @return array
+ */
+ public function getTableIndex()
+ {
+ return $this->_tableIndex;
+ }
+
+ /**
+ * @return string
+ */
+ public function getTable()
+ {
+ return $this->_table;
+ }
+
+ /**
+ * @return \Doctrine\DBAL\Connection
+ */
+ public function getConnection()
+ {
+ return $this->_connection;
+ }
+
+ /**
+ * @return \Doctrine\DBAL\Platforms\AbstractPlatform
+ */
+ public function getDatabasePlatform()
+ {
+ return $this->_connection->getDatabasePlatform();
+ }
+}
diff --git a/vendor/doctrine/dbal/lib/Doctrine/DBAL/Events.php b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Events.php
new file mode 100644
index 0000000..25e31f0
--- /dev/null
+++ b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Events.php
@@ -0,0 +1,48 @@
+.
+ */
+
+namespace Doctrine\DBAL;
+
+/**
+ * Container for all DBAL events.
+ *
+ * This class cannot be instantiated.
+ *
+ * @author Roman Borschel
+ * @since 2.0
+ */
+final class Events
+{
+ private function __construct() {}
+
+ const postConnect = 'postConnect';
+
+ const onSchemaCreateTable = 'onSchemaCreateTable';
+ const onSchemaCreateTableColumn = 'onSchemaCreateTableColumn';
+ const onSchemaDropTable = 'onSchemaDropTable';
+ const onSchemaAlterTable = 'onSchemaAlterTable';
+ const onSchemaAlterTableAddColumn = 'onSchemaAlterTableAddColumn';
+ const onSchemaAlterTableRemoveColumn = 'onSchemaAlterTableRemoveColumn';
+ const onSchemaAlterTableChangeColumn = 'onSchemaAlterTableChangeColumn';
+ const onSchemaAlterTableRenameColumn = 'onSchemaAlterTableRenameColumn';
+ const onSchemaColumnDefinition = 'onSchemaColumnDefinition';
+ const onSchemaIndexDefinition = 'onSchemaIndexDefinition';
+}
diff --git a/vendor/doctrine/dbal/lib/Doctrine/DBAL/LockMode.php b/vendor/doctrine/dbal/lib/Doctrine/DBAL/LockMode.php
new file mode 100644
index 0000000..dff96de
--- /dev/null
+++ b/vendor/doctrine/dbal/lib/Doctrine/DBAL/LockMode.php
@@ -0,0 +1,42 @@
+.
+*/
+
+namespace Doctrine\DBAL;
+
+/**
+ * Contains all DBAL LockModes
+ *
+ * @license http://www.opensource.org/licenses/lgpl-license.php LGPL
+ * @link www.doctrine-project.com
+ * @since 1.0
+ * @version $Revision$
+ * @author Benjamin Eberlei
+ * @author Roman Borschel
+ */
+class LockMode
+{
+ const NONE = 0;
+ const OPTIMISTIC = 1;
+ const PESSIMISTIC_READ = 2;
+ const PESSIMISTIC_WRITE = 4;
+
+ final private function __construct() { }
+}
\ No newline at end of file
diff --git a/vendor/doctrine/dbal/lib/Doctrine/DBAL/Logging/DebugStack.php b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Logging/DebugStack.php
new file mode 100644
index 0000000..7dca159
--- /dev/null
+++ b/vendor/doctrine/dbal/lib/Doctrine/DBAL/Logging/DebugStack.php
@@ -0,0 +1,67 @@
+.
+ */
+
+namespace Doctrine\DBAL\Logging;
+
+/**
+ * Includes executed SQLs in a Debug Stack
+ *
+ * @license http://www.opensource.org/licenses/lgpl-license.php LGPL
+ * @link www.doctrine-project.org
+ * @since 2.0
+ * @version $Revision$
+ * @author Benjamin Eberlei