From 4805dab42b011af5d93a40de91386ad05e0a5c45 Mon Sep 17 00:00:00 2001 From: meus Date: Sat, 13 Oct 2007 21:45:08 +0000 Subject: [PATCH] refactored test harness and moved logic away from the run.php file. fixed coverage reporting so that it now generates a full html coverage files. look in tests/coverage/index.php in a browser for details --- tests/DoctrineTest.php | 225 + tests/DoctrineTest/Coverage.php | 337 ++ tests/DoctrineTest/Doctrine_TestCoverage.php | 238 + .../Doctrine_UnitTestCase.php} | 601 +- tests/DoctrineTest/GroupTest.php | 79 + tests/DoctrineTest/Reporter.php | 12 + tests/DoctrineTest/Reporter/Cli.php | 18 + tests/DoctrineTest/Reporter/Html.php | 37 + tests/DoctrineTest/UnitTestCase.php | 109 + tests/Test.php | 190 - tests/coverage.txt | 1 - tests/coverage/Doctrine.html | 2724 +++++++++ tests/coverage/Doctrine_Access.html | 435 ++ tests/coverage/Doctrine_Adapter_Mock.html | 495 ++ .../Doctrine_Adapter_Statement_Mock.html | 1011 ++++ tests/coverage/Doctrine_AuditLog.html | 345 ++ .../coverage/Doctrine_AuditLog_Listener.html | 273 + tests/coverage/Doctrine_Cache_Array.html | 336 ++ tests/coverage/Doctrine_Collection.html | 2196 +++++++ tests/coverage/Doctrine_Configurable.html | 1044 ++++ tests/coverage/Doctrine_Connection.html | 3441 +++++++++++ .../coverage/Doctrine_Connection_Common.html | 182 + .../Doctrine_Connection_Exception.html | 350 ++ .../Doctrine_Connection_Firebird.html | 335 ++ ...octrine_Connection_Firebird_Exception.html | 413 ++ .../coverage/Doctrine_Connection_Module.html | 245 + tests/coverage/Doctrine_Connection_Mssql.html | 578 ++ .../Doctrine_Connection_Mssql_Exception.html | 233 + tests/coverage/Doctrine_Connection_Mysql.html | 632 ++ .../Doctrine_Connection_Mysql_Exception.html | 263 + .../coverage/Doctrine_Connection_Oracle.html | 359 ++ .../Doctrine_Connection_Oracle_Exception.html | 248 + tests/coverage/Doctrine_Connection_Pgsql.html | 581 ++ .../Doctrine_Connection_Pgsql_Exception.html | 332 ++ .../Doctrine_Connection_Profiler.html | 533 ++ .../coverage/Doctrine_Connection_Sqlite.html | 353 ++ .../Doctrine_Connection_Sqlite_Exception.html | 242 + .../Doctrine_Connection_Statement.html | 1326 +++++ .../Doctrine_Connection_UnitOfWork.html | 1887 ++++++ tests/coverage/Doctrine_DataDict.html | 293 + .../coverage/Doctrine_DataDict_Exception.html | 113 + .../coverage/Doctrine_DataDict_Firebird.html | 656 +++ tests/coverage/Doctrine_DataDict_Mssql.html | 576 ++ tests/coverage/Doctrine_DataDict_Mysql.html | 1397 +++++ tests/coverage/Doctrine_DataDict_Oracle.html | 593 ++ tests/coverage/Doctrine_DataDict_Pgsql.html | 1875 ++++++ tests/coverage/Doctrine_DataDict_Sqlite.html | 905 +++ tests/coverage/Doctrine_Event.html | 933 +++ tests/coverage/Doctrine_EventListener.html | 372 ++ .../Doctrine_EventListener_Chain.html | 1176 ++++ tests/coverage/Doctrine_Exception.html | 282 + tests/coverage/Doctrine_Export.html | 3527 ++++++++++++ tests/coverage/Doctrine_Export_Exception.html | 113 + tests/coverage/Doctrine_Export_Firebird.html | 1631 ++++++ tests/coverage/Doctrine_Export_Mysql.html | 1928 +++++++ tests/coverage/Doctrine_Export_Oracle.html | 1490 +++++ tests/coverage/Doctrine_Export_Pgsql.html | 1061 ++++ tests/coverage/Doctrine_Export_Schema.html | 470 ++ tests/coverage/Doctrine_Export_Sqlite.html | 1244 ++++ tests/coverage/Doctrine_Expression.html | 317 + .../coverage/Doctrine_Expression_Driver.html | 2144 +++++++ .../Doctrine_Expression_Exception.html | 113 + tests/coverage/Doctrine_Expression_Mock.html | 116 + tests/coverage/Doctrine_Expression_Mysql.html | 341 ++ tests/coverage/Doctrine_Expression_Pgsql.html | 683 +++ .../coverage/Doctrine_Expression_Sqlite.html | 506 ++ tests/coverage/Doctrine_Formatter.html | 677 +++ tests/coverage/Doctrine_Hook.html | 656 +++ tests/coverage/Doctrine_Hook_Equal.html | 167 + tests/coverage/Doctrine_Hook_Integer.html | 236 + tests/coverage/Doctrine_Hook_Parser.html | 206 + .../Doctrine_Hook_Parser_Complex.html | 296 + tests/coverage/Doctrine_Hook_WordLike.html | 209 + tests/coverage/Doctrine_Hydrate.html | 3567 ++++++++++++ tests/coverage/Doctrine_Hydrate_Array.html | 257 + tests/coverage/Doctrine_Hydrate_Record.html | 378 ++ tests/coverage/Doctrine_I18n.html | 363 ++ tests/coverage/Doctrine_Import.html | 632 ++ tests/coverage/Doctrine_Import_Builder.html | 1112 ++++ tests/coverage/Doctrine_Import_Firebird.html | 377 ++ tests/coverage/Doctrine_Import_Mssql.html | 587 ++ tests/coverage/Doctrine_Import_Oracle.html | 686 +++ tests/coverage/Doctrine_Import_Pgsql.html | 713 +++ tests/coverage/Doctrine_Import_Schema.html | 776 +++ tests/coverage/Doctrine_Import_Sqlite.html | 701 +++ tests/coverage/Doctrine_Lib.html | 791 +++ .../coverage/Doctrine_Locator_Injectable.html | 438 ++ tests/coverage/Doctrine_Manager.html | 1851 ++++++ .../coverage/Doctrine_Manager_Exception.html | 110 + tests/coverage/Doctrine_Migration.html | 1463 +++++ .../Doctrine_Migration_Exception.html | 113 + tests/coverage/Doctrine_Node.html | 551 ++ tests/coverage/Doctrine_Node_NestedSet.html | 2990 ++++++++++ tests/coverage/Doctrine_Null.html | 146 + tests/coverage/Doctrine_Parser.html | 398 ++ tests/coverage/Doctrine_Parser_Yml.html | 243 + tests/coverage/Doctrine_Plugin.html | 546 ++ tests/coverage/Doctrine_Query.html | 5088 +++++++++++++++++ tests/coverage/Doctrine_Query_Abstract.html | 1082 ++++ tests/coverage/Doctrine_Query_Check.html | 488 ++ tests/coverage/Doctrine_Query_Condition.html | 347 ++ tests/coverage/Doctrine_Query_Exception.html | 113 + tests/coverage/Doctrine_Query_From.html | 281 + tests/coverage/Doctrine_Query_Groupby.html | 197 + tests/coverage/Doctrine_Query_Having.html | 317 + .../Doctrine_Query_JoinCondition.html | 323 ++ tests/coverage/Doctrine_Query_Limit.html | 128 + tests/coverage/Doctrine_Query_Offset.html | 128 + tests/coverage/Doctrine_Query_Orderby.html | 233 + tests/coverage/Doctrine_Query_Part.html | 170 + tests/coverage/Doctrine_Query_Registry.html | 221 + tests/coverage/Doctrine_Query_Select.html | 128 + tests/coverage/Doctrine_Query_Set.html | 191 + tests/coverage/Doctrine_Query_Where.html | 539 ++ tests/coverage/Doctrine_RawSql.html | 854 +++ tests/coverage/Doctrine_Record.html | 4797 ++++++++++++++++ tests/coverage/Doctrine_Record_Abstract.html | 975 ++++ tests/coverage/Doctrine_Record_Exception.html | 113 + tests/coverage/Doctrine_Record_Filter.html | 191 + .../Doctrine_Record_Filter_Compound.html | 308 + .../Doctrine_Record_Filter_Standard.html | 179 + tests/coverage/Doctrine_Record_Iterator.html | 242 + tests/coverage/Doctrine_Record_Listener.html | 240 + .../Doctrine_Record_Listener_Chain.html | 570 ++ tests/coverage/Doctrine_Relation.html | 950 +++ .../Doctrine_Relation_Association.html | 293 + .../coverage/Doctrine_Relation_Exception.html | 113 + .../Doctrine_Relation_ForeignKey.html | 305 + .../coverage/Doctrine_Relation_LocalKey.html | 254 + tests/coverage/Doctrine_Relation_Nest.html | 437 ++ tests/coverage/Doctrine_Relation_Parser.html | 1397 +++++ .../Doctrine_Relation_Parser_Exception.html | 113 + tests/coverage/Doctrine_Schema.html | 246 + tests/coverage/Doctrine_Schema_Column.html | 237 + tests/coverage/Doctrine_Schema_Database.html | 291 + tests/coverage/Doctrine_Schema_Exception.html | 117 + tests/coverage/Doctrine_Schema_Object.html | 318 ++ tests/coverage/Doctrine_Schema_Relation.html | 375 ++ tests/coverage/Doctrine_Schema_Table.html | 330 ++ tests/coverage/Doctrine_Search.html | 612 ++ .../Doctrine_Search_Analyzer_Standard.html | 884 +++ tests/coverage/Doctrine_Search_Listener.html | 179 + tests/coverage/Doctrine_Search_Query.html | 722 +++ tests/coverage/Doctrine_Sequence.html | 227 + .../coverage/Doctrine_Sequence_Firebird.html | 326 ++ tests/coverage/Doctrine_Sequence_Mssql.html | 476 ++ tests/coverage/Doctrine_Sequence_Mysql.html | 341 ++ tests/coverage/Doctrine_Sequence_Oracle.html | 293 + tests/coverage/Doctrine_Sequence_Pgsql.html | 287 + tests/coverage/Doctrine_Sequence_Sqlite.html | 347 ++ tests/coverage/Doctrine_Table.html | 4314 ++++++++++++++ tests/coverage/Doctrine_Table_Exception.html | 134 + tests/coverage/Doctrine_Table_Repository.html | 464 ++ tests/coverage/Doctrine_Template.html | 330 ++ tests/coverage/Doctrine_Template_I18n.html | 227 + .../coverage/Doctrine_Template_NestedSet.html | 149 + .../Doctrine_Template_Searchable.html | 195 + .../Doctrine_Template_Versionable.html | 164 + tests/coverage/Doctrine_Tokenizer.html | 962 ++++ tests/coverage/Doctrine_Transaction.html | 1298 +++++ .../Doctrine_Transaction_Exception.html | 113 + .../Doctrine_Transaction_Firebird.html | 422 ++ tests/coverage/Doctrine_Transaction_Mock.html | 119 + .../coverage/Doctrine_Transaction_Mssql.html | 215 + .../coverage/Doctrine_Transaction_Mysql.html | 347 ++ .../coverage/Doctrine_Transaction_Oracle.html | 320 ++ .../coverage/Doctrine_Transaction_Pgsql.html | 317 + .../coverage/Doctrine_Transaction_Sqlite.html | 209 + tests/coverage/Doctrine_Tree.html | 401 ++ tests/coverage/Doctrine_Tree_NestedSet.html | 1076 ++++ tests/coverage/Doctrine_Validator.html | 972 ++++ tests/coverage/Doctrine_Validator_Date.html | 170 + tests/coverage/Doctrine_Validator_Driver.html | 341 ++ tests/coverage/Doctrine_Validator_Email.html | 245 + .../Doctrine_Validator_ErrorStack.html | 434 ++ .../Doctrine_Validator_Exception.html | 305 + tests/coverage/Doctrine_Validator_Future.html | 248 + .../coverage/Doctrine_Validator_Notblank.html | 149 + .../coverage/Doctrine_Validator_Notnull.html | 146 + tests/coverage/Doctrine_Validator_Past.html | 248 + tests/coverage/Doctrine_Validator_Range.html | 164 + tests/coverage/Doctrine_Validator_Regexp.html | 197 + tests/coverage/Doctrine_Validator_Unique.html | 224 + .../coverage/Doctrine_Validator_Unsigned.html | 161 + .../coverage/Doctrine_Validator_Usstate.html | 323 ++ tests/coverage/Doctrine_View.html | 479 ++ tests/coverage/coverage.txt | 1 + tests/coverage/index.php | 61 + tests/run.php | 238 +- 189 files changed, 115422 insertions(+), 703 deletions(-) create mode 100644 tests/DoctrineTest.php create mode 100644 tests/DoctrineTest/Coverage.php create mode 100644 tests/DoctrineTest/Doctrine_TestCoverage.php rename tests/{UnitTestCase.php => DoctrineTest/Doctrine_UnitTestCase.php} (96%) create mode 100644 tests/DoctrineTest/GroupTest.php create mode 100644 tests/DoctrineTest/Reporter.php create mode 100644 tests/DoctrineTest/Reporter/Cli.php create mode 100644 tests/DoctrineTest/Reporter/Html.php create mode 100644 tests/DoctrineTest/UnitTestCase.php delete mode 100644 tests/Test.php delete mode 100755 tests/coverage.txt create mode 100644 tests/coverage/Doctrine.html create mode 100644 tests/coverage/Doctrine_Access.html create mode 100644 tests/coverage/Doctrine_Adapter_Mock.html create mode 100644 tests/coverage/Doctrine_Adapter_Statement_Mock.html create mode 100644 tests/coverage/Doctrine_AuditLog.html create mode 100644 tests/coverage/Doctrine_AuditLog_Listener.html create mode 100644 tests/coverage/Doctrine_Cache_Array.html create mode 100644 tests/coverage/Doctrine_Collection.html create mode 100644 tests/coverage/Doctrine_Configurable.html create mode 100644 tests/coverage/Doctrine_Connection.html create mode 100644 tests/coverage/Doctrine_Connection_Common.html create mode 100644 tests/coverage/Doctrine_Connection_Exception.html create mode 100644 tests/coverage/Doctrine_Connection_Firebird.html create mode 100644 tests/coverage/Doctrine_Connection_Firebird_Exception.html create mode 100644 tests/coverage/Doctrine_Connection_Module.html create mode 100644 tests/coverage/Doctrine_Connection_Mssql.html create mode 100644 tests/coverage/Doctrine_Connection_Mssql_Exception.html create mode 100644 tests/coverage/Doctrine_Connection_Mysql.html create mode 100644 tests/coverage/Doctrine_Connection_Mysql_Exception.html create mode 100644 tests/coverage/Doctrine_Connection_Oracle.html create mode 100644 tests/coverage/Doctrine_Connection_Oracle_Exception.html create mode 100644 tests/coverage/Doctrine_Connection_Pgsql.html create mode 100644 tests/coverage/Doctrine_Connection_Pgsql_Exception.html create mode 100644 tests/coverage/Doctrine_Connection_Profiler.html create mode 100644 tests/coverage/Doctrine_Connection_Sqlite.html create mode 100644 tests/coverage/Doctrine_Connection_Sqlite_Exception.html create mode 100644 tests/coverage/Doctrine_Connection_Statement.html create mode 100644 tests/coverage/Doctrine_Connection_UnitOfWork.html create mode 100644 tests/coverage/Doctrine_DataDict.html create mode 100644 tests/coverage/Doctrine_DataDict_Exception.html create mode 100644 tests/coverage/Doctrine_DataDict_Firebird.html create mode 100644 tests/coverage/Doctrine_DataDict_Mssql.html create mode 100644 tests/coverage/Doctrine_DataDict_Mysql.html create mode 100644 tests/coverage/Doctrine_DataDict_Oracle.html create mode 100644 tests/coverage/Doctrine_DataDict_Pgsql.html create mode 100644 tests/coverage/Doctrine_DataDict_Sqlite.html create mode 100644 tests/coverage/Doctrine_Event.html create mode 100644 tests/coverage/Doctrine_EventListener.html create mode 100644 tests/coverage/Doctrine_EventListener_Chain.html create mode 100644 tests/coverage/Doctrine_Exception.html create mode 100644 tests/coverage/Doctrine_Export.html create mode 100644 tests/coverage/Doctrine_Export_Exception.html create mode 100644 tests/coverage/Doctrine_Export_Firebird.html create mode 100644 tests/coverage/Doctrine_Export_Mysql.html create mode 100644 tests/coverage/Doctrine_Export_Oracle.html create mode 100644 tests/coverage/Doctrine_Export_Pgsql.html create mode 100644 tests/coverage/Doctrine_Export_Schema.html create mode 100644 tests/coverage/Doctrine_Export_Sqlite.html create mode 100644 tests/coverage/Doctrine_Expression.html create mode 100644 tests/coverage/Doctrine_Expression_Driver.html create mode 100644 tests/coverage/Doctrine_Expression_Exception.html create mode 100644 tests/coverage/Doctrine_Expression_Mock.html create mode 100644 tests/coverage/Doctrine_Expression_Mysql.html create mode 100644 tests/coverage/Doctrine_Expression_Pgsql.html create mode 100644 tests/coverage/Doctrine_Expression_Sqlite.html create mode 100644 tests/coverage/Doctrine_Formatter.html create mode 100644 tests/coverage/Doctrine_Hook.html create mode 100644 tests/coverage/Doctrine_Hook_Equal.html create mode 100644 tests/coverage/Doctrine_Hook_Integer.html create mode 100644 tests/coverage/Doctrine_Hook_Parser.html create mode 100644 tests/coverage/Doctrine_Hook_Parser_Complex.html create mode 100644 tests/coverage/Doctrine_Hook_WordLike.html create mode 100644 tests/coverage/Doctrine_Hydrate.html create mode 100644 tests/coverage/Doctrine_Hydrate_Array.html create mode 100644 tests/coverage/Doctrine_Hydrate_Record.html create mode 100644 tests/coverage/Doctrine_I18n.html create mode 100644 tests/coverage/Doctrine_Import.html create mode 100644 tests/coverage/Doctrine_Import_Builder.html create mode 100644 tests/coverage/Doctrine_Import_Firebird.html create mode 100644 tests/coverage/Doctrine_Import_Mssql.html create mode 100644 tests/coverage/Doctrine_Import_Oracle.html create mode 100644 tests/coverage/Doctrine_Import_Pgsql.html create mode 100644 tests/coverage/Doctrine_Import_Schema.html create mode 100644 tests/coverage/Doctrine_Import_Sqlite.html create mode 100644 tests/coverage/Doctrine_Lib.html create mode 100644 tests/coverage/Doctrine_Locator_Injectable.html create mode 100644 tests/coverage/Doctrine_Manager.html create mode 100644 tests/coverage/Doctrine_Manager_Exception.html create mode 100644 tests/coverage/Doctrine_Migration.html create mode 100644 tests/coverage/Doctrine_Migration_Exception.html create mode 100644 tests/coverage/Doctrine_Node.html create mode 100644 tests/coverage/Doctrine_Node_NestedSet.html create mode 100644 tests/coverage/Doctrine_Null.html create mode 100644 tests/coverage/Doctrine_Parser.html create mode 100644 tests/coverage/Doctrine_Parser_Yml.html create mode 100644 tests/coverage/Doctrine_Plugin.html create mode 100644 tests/coverage/Doctrine_Query.html create mode 100644 tests/coverage/Doctrine_Query_Abstract.html create mode 100644 tests/coverage/Doctrine_Query_Check.html create mode 100644 tests/coverage/Doctrine_Query_Condition.html create mode 100644 tests/coverage/Doctrine_Query_Exception.html create mode 100644 tests/coverage/Doctrine_Query_From.html create mode 100644 tests/coverage/Doctrine_Query_Groupby.html create mode 100644 tests/coverage/Doctrine_Query_Having.html create mode 100644 tests/coverage/Doctrine_Query_JoinCondition.html create mode 100644 tests/coverage/Doctrine_Query_Limit.html create mode 100644 tests/coverage/Doctrine_Query_Offset.html create mode 100644 tests/coverage/Doctrine_Query_Orderby.html create mode 100644 tests/coverage/Doctrine_Query_Part.html create mode 100644 tests/coverage/Doctrine_Query_Registry.html create mode 100644 tests/coverage/Doctrine_Query_Select.html create mode 100644 tests/coverage/Doctrine_Query_Set.html create mode 100644 tests/coverage/Doctrine_Query_Where.html create mode 100644 tests/coverage/Doctrine_RawSql.html create mode 100644 tests/coverage/Doctrine_Record.html create mode 100644 tests/coverage/Doctrine_Record_Abstract.html create mode 100644 tests/coverage/Doctrine_Record_Exception.html create mode 100644 tests/coverage/Doctrine_Record_Filter.html create mode 100644 tests/coverage/Doctrine_Record_Filter_Compound.html create mode 100644 tests/coverage/Doctrine_Record_Filter_Standard.html create mode 100644 tests/coverage/Doctrine_Record_Iterator.html create mode 100644 tests/coverage/Doctrine_Record_Listener.html create mode 100644 tests/coverage/Doctrine_Record_Listener_Chain.html create mode 100644 tests/coverage/Doctrine_Relation.html create mode 100644 tests/coverage/Doctrine_Relation_Association.html create mode 100644 tests/coverage/Doctrine_Relation_Exception.html create mode 100644 tests/coverage/Doctrine_Relation_ForeignKey.html create mode 100644 tests/coverage/Doctrine_Relation_LocalKey.html create mode 100644 tests/coverage/Doctrine_Relation_Nest.html create mode 100644 tests/coverage/Doctrine_Relation_Parser.html create mode 100644 tests/coverage/Doctrine_Relation_Parser_Exception.html create mode 100644 tests/coverage/Doctrine_Schema.html create mode 100644 tests/coverage/Doctrine_Schema_Column.html create mode 100644 tests/coverage/Doctrine_Schema_Database.html create mode 100644 tests/coverage/Doctrine_Schema_Exception.html create mode 100644 tests/coverage/Doctrine_Schema_Object.html create mode 100644 tests/coverage/Doctrine_Schema_Relation.html create mode 100644 tests/coverage/Doctrine_Schema_Table.html create mode 100644 tests/coverage/Doctrine_Search.html create mode 100644 tests/coverage/Doctrine_Search_Analyzer_Standard.html create mode 100644 tests/coverage/Doctrine_Search_Listener.html create mode 100644 tests/coverage/Doctrine_Search_Query.html create mode 100644 tests/coverage/Doctrine_Sequence.html create mode 100644 tests/coverage/Doctrine_Sequence_Firebird.html create mode 100644 tests/coverage/Doctrine_Sequence_Mssql.html create mode 100644 tests/coverage/Doctrine_Sequence_Mysql.html create mode 100644 tests/coverage/Doctrine_Sequence_Oracle.html create mode 100644 tests/coverage/Doctrine_Sequence_Pgsql.html create mode 100644 tests/coverage/Doctrine_Sequence_Sqlite.html create mode 100644 tests/coverage/Doctrine_Table.html create mode 100644 tests/coverage/Doctrine_Table_Exception.html create mode 100644 tests/coverage/Doctrine_Table_Repository.html create mode 100644 tests/coverage/Doctrine_Template.html create mode 100644 tests/coverage/Doctrine_Template_I18n.html create mode 100644 tests/coverage/Doctrine_Template_NestedSet.html create mode 100644 tests/coverage/Doctrine_Template_Searchable.html create mode 100644 tests/coverage/Doctrine_Template_Versionable.html create mode 100644 tests/coverage/Doctrine_Tokenizer.html create mode 100644 tests/coverage/Doctrine_Transaction.html create mode 100644 tests/coverage/Doctrine_Transaction_Exception.html create mode 100644 tests/coverage/Doctrine_Transaction_Firebird.html create mode 100644 tests/coverage/Doctrine_Transaction_Mock.html create mode 100644 tests/coverage/Doctrine_Transaction_Mssql.html create mode 100644 tests/coverage/Doctrine_Transaction_Mysql.html create mode 100644 tests/coverage/Doctrine_Transaction_Oracle.html create mode 100644 tests/coverage/Doctrine_Transaction_Pgsql.html create mode 100644 tests/coverage/Doctrine_Transaction_Sqlite.html create mode 100644 tests/coverage/Doctrine_Tree.html create mode 100644 tests/coverage/Doctrine_Tree_NestedSet.html create mode 100644 tests/coverage/Doctrine_Validator.html create mode 100644 tests/coverage/Doctrine_Validator_Date.html create mode 100644 tests/coverage/Doctrine_Validator_Driver.html create mode 100644 tests/coverage/Doctrine_Validator_Email.html create mode 100644 tests/coverage/Doctrine_Validator_ErrorStack.html create mode 100644 tests/coverage/Doctrine_Validator_Exception.html create mode 100644 tests/coverage/Doctrine_Validator_Future.html create mode 100644 tests/coverage/Doctrine_Validator_Notblank.html create mode 100644 tests/coverage/Doctrine_Validator_Notnull.html create mode 100644 tests/coverage/Doctrine_Validator_Past.html create mode 100644 tests/coverage/Doctrine_Validator_Range.html create mode 100644 tests/coverage/Doctrine_Validator_Regexp.html create mode 100644 tests/coverage/Doctrine_Validator_Unique.html create mode 100644 tests/coverage/Doctrine_Validator_Unsigned.html create mode 100644 tests/coverage/Doctrine_Validator_Usstate.html create mode 100644 tests/coverage/Doctrine_View.html create mode 100644 tests/coverage/coverage.txt create mode 100644 tests/coverage/index.php diff --git a/tests/DoctrineTest.php b/tests/DoctrineTest.php new file mode 100644 index 000000000..5081dbe3c --- /dev/null +++ b/tests/DoctrineTest.php @@ -0,0 +1,225 @@ +. + */ + +/** + * Doctrine_UnitTestCase + * + * @package Doctrine + * @author Konsta Vesterinen + * @author Bjarte S. Karlsen + * @license http://www.opensource.org/licenses/lgpl-license.php LGPL + * @category Object Relational Mapping + * @link www.phpdoctrine.com + * @since 1.0 + * @version $Revision$ + */ + +require_once dirname(__FILE__) . '/DoctrineTest/UnitTestCase.php'; +require_once dirname(__FILE__) . '/DoctrineTest/GroupTest.php'; +require_once dirname(__FILE__) . '/DoctrineTest/Doctrine_UnitTestCase.php'; +require_once dirname(__FILE__) . '/DoctrineTest/Reporter.php'; + +class DoctrineTest +{ + + protected $testGroup; // the default test group + protected $groups; + + public function __construct() + { + $this->requireModels(); + $this->testGroup = new GroupTest('Doctrine Framework Unit Tests', 'main'); + } + + /** + * Add a test to be run. + * + * This is a thin wrapper around GroupTest that also store the testcase in + * this class so that it is easier to create custom groups + * + * @param UnitTestCase A test case + */ + public function addTestCase($testCase){ + $this->groups[$testCase->getName()] = $testCase; + $this->testGroup->addTestCase($testCase); + } + + /** + * Run the tests + * + * This method will run the tests with the correct Reporter. It will run + * grouped tests if asked to and filter results. It also has support for + * running coverage report. + * + */ + public function run(){ + $testGroup = $this->testGroup; + if (PHP_SAPI === 'cli') { + require_once(dirname(__FILE__) . '/DoctrineTest/Reporter/Cli.php'); + $reporter = new DoctrineTest_Reporter_Cli(); + $argv = $_SERVER['argv']; + array_shift($argv); + $options = $this->parseOptions($argv); + } else { + require_once(dirname(__FILE__) . '/DoctrineTest/Reporter/Html.php'); + $options = $_GET; + $reporter = new DoctrineTest_Reporter_Html(); + } + + //replace global group with custom group if we have group option set + if (isset($options['group'])) { + $testGroup = new GroupTest('Doctrine Framework Custom test', 'custom'); + foreach($options['group'] as $group) { + if (isset($this->groups[$group])) { + $testGroup->addTestCase($this->groups[$group]); + } else if (class_exists($group)) { + $testGroup->addTestCase(new $group); + } else { + die($group . " is not a valid group or doctrine test class\n "); + } + } + } + + $filter = ''; + if (isset($options['filter'])) { + $filter = $options['filter']; + } + + //show help text + if (isset($options['help'])) { + echo "Doctrine test runner help\n"; + echo "===========================\n"; + echo " To run all tests simply run this script without arguments. \n"; + echo "\n Flags:\n"; + echo " -coverage will generate coverage report data that can be viewed with the cc.php script in this folder. NB! This takes time. You need xdebug to run this\n"; + echo " -group Use this option to run just a group of tests or tests with a given classname. Groups are currently defined as the variable name they are called in this script.\n"; + echo " -filter case insensitive strings that will be applied to the className of the tests. A test_classname must contain all of these strings to be run\n"; + echo "\nAvailable groups:\n tickets, transaction, driver, data_dict, sequence, export, import, expression, core, relation, data_types, utility, db, event_listener, query_tests, record, cache\n"; + die(); + } + + //generate coverage report + if (isset($options['coverage'])) { + xdebug_start_code_coverage(XDEBUG_CC_UNUSED | XDEBUG_CC_DEAD_CODE); + $testGroup->run($reporter, $filter); + $result['coverage'] = xdebug_get_code_coverage(); + xdebug_stop_code_coverage(); + file_put_contents(dirname(__FILE__) . '/coverage/coverage.txt', serialize($result)); + require_once dirname(__FILE__) . '/DoctrineTest/Coverage.php'; + $coverageGeneration = new DoctrineTest_Coverage(); + $coverageGeneration->generateReport(); + } else { + $testGroup->run($reporter, $filter); + } + } + + + /** + * Require all the models needed in the tests + * + */ + public function requireModels() + { + $models = new DirectoryIterator(dirname(__FILE__) . '/../models/'); + foreach($models as $key => $file) { + if ($file->isFile() && ! $file->isDot()) { + $e = explode('.', $file->getFileName()); + if (end($e) === 'php') { + require_once $file->getPathname(); + } + } + } + } + + /** + * Parse Options from cli into an associative array + * + * @param array $array An argv array from cli + * @return array An array with options + */ + public function parseOptions($array) { + $currentName=''; + $options=array(); + foreach($array as $name) { + if (strpos($name,'-')===0) { + $name=str_replace('-','',$name); + $currentName=$name; + if ( ! isset($options[$currentName])) { + $options[$currentName]=array(); + } + } else { + $values=$options[$currentName]; + array_push($values,$name); + $options[$currentName]=$values; + } + } + return $options; + } + + /** + * Autoload test cases + * + * Will create test case if it does not exist + * + * @param string $class The name of the class to autoload + * @return boolean True + */ + public static function autoload($class) { + if (strpos($class, 'TestCase') === false) { + return false; + } + + $e = explode('_', $class); + $count = count($e); + + $prefix = array_shift($e); + + if ($prefix !== 'Doctrine') { + return false; + } + + $dir = array_shift($e); + + $file = $dir . '_' . substr(implode('_', $e), 0, -(strlen('_TestCase'))) . 'TestCase.php'; + + if ( $count > 3) { + $file = str_replace('_', DIRECTORY_SEPARATOR, $file); + } else { + $file = str_replace('_', '', $file); + } + + // create a test case file if it doesn't exist + + if ( ! file_exists($file)) { + $contents = file_get_contents('template.tpl'); + $contents = sprintf($contents, $class, $class); + + if ( ! file_exists($dir)) { + mkdir($dir, 0777); + } + + file_put_contents($file, $contents); + } + require_once($file); + + return true; + } +} diff --git a/tests/DoctrineTest/Coverage.php b/tests/DoctrineTest/Coverage.php new file mode 100644 index 000000000..5446f360e --- /dev/null +++ b/tests/DoctrineTest/Coverage.php @@ -0,0 +1,337 @@ +. + */ + +/** + * Doctrine_UnitTestCase + * + * @package Doctrine + * @author Konsta Vesterinen + * @author Bjarte S. Karlsen + * @license http://www.opensource.org/licenses/lgpl-license.php LGPL + * @category Object Relational Mapping + * @link www.phpdoctrine.com + * @since 1.0 + * @version $Revision$ + */ + +class DoctrineTest_Coverage +{ + + const COVERED = 1; + const MAYBE = -2; + const NOTCOVERED = -1; + + private $covered; + private $totallines = 0; + private $totalcovered = 0; + private $totalmaybe = 0; + private $totalnotcovered = 0; + private $result; + + /* + * Create a new Coverage object. We read data from a fixed file. + */ + public function __construct() + { + $this->result = unserialize(file_get_contents($this->getCoverageDir() . "coverage.txt")); + $this->sortBy ="percentage"; // default sort + } + + /** + * Get the directory to store coverage report in + * + * @return string The path to store the coverage in + */ + public function getCoverageDir(){ + $dir = Doctrine::getPath() . DIRECTORY_SEPARATOR . ".." . DIRECTORY_SEPARATOR . "tests" . DIRECTORY_SEPARATOR . "coverage" . DIRECTORY_SEPARATOR; + return $dir; + } + + /* + * Show a summary of all files in Doctrine and their coverage data + * + */ + public function showSummary() + { + if ( isset($_GET['order'])){ + $this->sortBy = $_GET['order']; + } + + if ( ! isset($this->result['data'])){ + die("Impropper coverage report. Please regenerate"); + } + + $coveredArray = $this->result["data"]; + //lets sort it. + uasort($coveredArray, array($this,"sortArray")); + + //and flip if it perhaps? + if (isset($_GET["desc"]) && $_GET["desc"] == "true"){ + $coveredArray = array_reverse($coveredArray, true); + } + + $totals = $this->result["totals"]; + + echo 'TOTAL' , + $totals['percentage'] , '%' , + $totals['lines'] , '' , + $totals['covered'] , '', + $totals['maybe'] , '', + $totals['notcovered'] , ''; + + foreach($coveredArray as $class => $info){ + echo '' . $class . '' . $info['percentage'] . ' % ' . $info['total'] . '' . $info['covered'] . '' . $info['maybe'] . '' . $info['notcovered']. ''; + if ( $info['type'] == "covered") { + echo '', $class , ''; + } else { + echo ' not covered'; + } + echo ''; + } + } + + + /** + * Return the revision the coverage was made against + * + *@param int The revision number + */ + public function getRevision(){ + return $this->result["revision"]; + } + + /** + * Generate the report. + * + * This method will analyze the coverage data and create a data array that + * contains information about each of the classes in Doctrine/lib. It will + * also generate html files for each file that has coverage data with + * information about what lines that are covered. + * + * + * @uses generateCoverageInfoCoveredFile + * @uses saveFile + * @uses generateCoverageInfoNotCoveredFile + * @uses getCoverageDir + * @uses calculateTotalPercentage + * + */ + public function generateReport(){ + $svn_info = explode(" ", exec("svn info | grep Revision")); + $this->result["revision"] = $svn_info[1]; + + //loop through all files and generate coverage files for them + $it = new RecursiveDirectoryIterator(Doctrine::getPath()); + $notCoveredArray = array(); + foreach (new RecursiveIteratorIterator($it) as $file){ + if (strpos($file->getPathname(), ".svn")){ + continue; + } + + if(strpos($file->getPathname(), "cli.php")){ + continue; + } + + $class = $this->getClassNameFromFileName($file->getPathname()); + + if (strpos($class, '_Interface')) { + continue; + } + + if ( ! class_exists($class)){ + continue; + } + if (isset($this->result['coverage'][$file->getPathname()])){ + $coverageInfo[$class] = $this->generateCoverageInfoCoveredFile($file->getPathname()); + $this->saveFile($file->getPathname()); + }else{ + $coverageInfo[$class] = $this->generateCoverageInfoNotCoveredFile($class); + } + } + $this->result["totals"] = array( + "lines" => $this->totallines, + "notcovered" => $this->totalnotcovered, + "covered" => $this->totalcovered, + "maybe" => $this->totalmaybe, + "percentage" => $this->calculateTotalPercentage()); + + $this->result["data"] = $coverageInfo; + + file_put_contents($this->getCoverageDir() . "coverage.txt", serialize($this->result)); + + } + + /** + * + * Return the name of a class from its filename. + * + * This method simply removes the Doctrine Path and raplces _ with / and + * removes .php to get the classname for a file + * + * @param string $fileName The name of the file + * @return string The name of the class + */ + public function getClassNameFromFileName($fileName){ + $path = Doctrine::getPath() . DIRECTORY_SEPARATOR; + $class = str_replace($path, "", $fileName); + $class = str_replace(DIRECTORY_SEPARATOR, "_", $class); + $class = substr($class, 0,-4); + return $class; + } + + /** + * Calculate total coverage percentage + * + *@return double The percetage as a double + */ + public function calculateTotalPercentage(){ + return round((($this->totalcovered + $this->totalmaybe) / $this->totallines) * 100, 2); + } + + /** + * Generate Coverage for a class that is not in the coverage report. + * + * This method will simply check if the method has no lines that should be + * tested or not. Then it will return data to be stored for later use. + * + * @param string $class The name of a class + * @return array An associative array with coverage information + */ + public function generateCoverageInfoNotCoveredFile($class){ + try{ + $refClass = new ReflectionClass($class); + } catch (Exception $e){ + echo $e->getMessage(); + } + $lines = 0; + $methodLines = 0; + foreach ($refClass->getMethods() as $refMethod){ + if ($refMethod->getDeclaringClass() != $refClass){ + continue; + } + $methodLines = $refMethod->getEndLine() - $refMethod->getStartLine(); + $lines += $methodLines; + } + $this->totallines += $lines; + $this->totalnotcovered += $lines; + if ($lines == 0){ + return array("covered" => 0, "maybe" => 0, "notcovered"=>$lines, "total" => $lines, "percentage" => 100, "type" => "notcovered"); + } else { + return array("covered" => 0, "maybe" => 0, "notcovered"=>$lines, "total" => $lines, "percentage" => 0, "type" => "notcovered"); + } + } + + + /* + * Save a html report for the given filename + * + * @param string $fileName The name of the file + */ + public function saveFile($fileName) + { + $className = $this->getClassNameFromFileName($fileName); + $title = "Coverage for " . $className; + + $html = ' + + ' . $title . ' + + +

' . $title . '

Back to coverage report

'; + $coveredLines = $this->result["coverage"][$fileName]; + $fileArray = file($fileName); + + $html .= '' . "\n"; + foreach ($fileArray as $num => $line){ + $linenum = $num+1; + $html .= '' . "\n"; + $class ="normal"; + if (isset($coveredLines[$linenum]) && $coveredLines[$linenum] == self::COVERED){ + $class = "covered"; + } else if (isset($coveredLines[$linenum]) && $coveredLines[$linenum] == self::NOTCOVERED) { + $class ="red"; + } else if (isset($coveredLines[$linenum]) && $coveredLines[$linenum] == self::MAYBE) { + $class ="orange"; + } + + $line = str_replace(" ", " ", htmlspecialchars($line)); + $html .= '' . "\n"; + } + $html .='
' . $linenum . '' . $line . '
'; + file_put_contents($this->getCoverageDir() . $className . ".html",$html); + } + + /* + * Generate coverage data for tested file + * + *@return array An array of coverage data + */ + public function generateCoverageInfoCoveredFile($file) + { + $lines = $this->result["coverage"][$file]; + + $total = count($lines) -1; //we have to remove one since it always reports the last line as a hit + $covered = 0; + $maybe = 0; + $notcovered = 0; + foreach ($lines as $result){ + switch($result){ + case self::COVERED: + $covered++; + break; + case self::NOTCOVERED: + $notcovered++; + break; + case self::MAYBE: + $maybe++; + break; + } + } + $covered--; //again we have to remove that last line. + $this->totallines += $total; + $this->totalcovered += $covered; + $this->totalnotcovered += $notcovered; + $this->totalmaybe += $maybe; + + if ($total === 0) { + $total = 1; + } + $percentage = round((($covered + $maybe) / $total) * 100, 2); + return array("covered" => $covered, "maybe" => $maybe, "notcovered"=>$notcovered, "total" => $total, "percentage" => $percentage, "type" => "covered"); + } + + /* + * Uasort function to sort the array by key + * + */ + public function sortArray($a, $b) + { + if ($a[$this->sortBy] == $b[$this->sortBy]) { + return 0; + } + return ( $a[$this->sortBy] < $b[$this->sortBy]) ? -1 : 1; + } +} diff --git a/tests/DoctrineTest/Doctrine_TestCoverage.php b/tests/DoctrineTest/Doctrine_TestCoverage.php new file mode 100644 index 000000000..30b21eebe --- /dev/null +++ b/tests/DoctrineTest/Doctrine_TestCoverage.php @@ -0,0 +1,238 @@ + + * @license http://www.opensource.org/licenses/lgpl-license.php LGPL + * @category Object Relational Mapping + * @link www.phpdoctrine.com + * @since 1.0 + * @version $Revision: 1976 $ + */ +class Doctrine_TestCoverage +{ + + const COVERED = 1; + const MAYBE = -2; + const NOTCOVERED = -1; + + private $path; + private $coverage; + private $key; + private $covered; + private $totallines = 0; + private $totalcovered = 0; + private $totalmaybe = 0; + private $totalnotcovered = 0; + + /* + * Create a new coverage report + * + * @param string $file The name of the file where coverage data is stored + * + */ + public function __construct() + $result = unserialize(file_get_contents(__FILE__ . "/coverage.txt")); + $this->path = $result["path"]; + $this->coverage = $result["coverage"]; + $this->sortBy ="percentage"; // default sort + } + + /* + * Show graphical coverage report for a file + * + * @param string $fileName The name of the file to show + */ + public function showFile($fileName) + { + $key = $this->path . $fileName; + $html = '
'; + if ( ! isset( $this->coverage[$key])) + { + echo '

This file has not been tested!

'; + } + $coveredLines = $this->coverage[$key]; + $fileArray = file(Doctrine::getPath() . "/".$fileName); + $html .= '' . "\n"; + foreach ($fileArray as $num => $line){ + $linenum = $num+1; + $html .= '' . "\n"; + $class ="normal"; + if (isset($coveredLines[$linenum]) && $coveredLines[$linenum] == 1){ + $class = "covered"; + } else if (isset($coveredLines[$linenum]) && $coveredLines[$linenum] == -1) { + $class ="red"; + } else if (isset($coveredLines[$linenum]) && $coveredLines[$linenum] == -2) { + $class ="orange"; + } + + $line = str_replace(" ", " ", htmlspecialchars($line)); + $html .= '' . "\n"; + } + $html .='
' . $linenum . '' . $line . '
'; + echo $html; + } + + /* + * Generate coverage data for non tested files + * + * Scans all files and records data for those that are not in the coverage + * record. + * + * @return array An array with coverage data + */ + public function generateNotCoveredFiles() + { + $it = new RecursiveDirectoryIterator(Doctrine::getPath()); + + $notCoveredArray = array(); + foreach (new RecursiveIteratorIterator($it) as $file){ + if (strpos($file->getPathname(), ".svn")){ + continue; + } + $path = Doctrine::getPath() . DIRECTORY_SEPARATOR; + $coveredPath = str_replace($path, $this->path, $file->getPathname()); + if (isset($this->coverage[$coveredPath])){ + continue; + } + + $class = str_replace($path, "", $file->getPathname()); + $class = str_replace(DIRECTORY_SEPARATOR, "_", $class); + $class = substr($class, 0,-4); + if (strpos($class, '_Interface')) { + continue; + } + + if ( ! class_exists($class)){ + continue; + } + + try{ + $refClass = new ReflectionClass($class); + } catch (Exception $e){ + echo $e->getMessage(); + continue; + } + $lines = 0; + $methodLines = 0; + foreach ($refClass->getMethods() as $refMethod){ + + if ($refMethod->getDeclaringClass() != $refClass){ + continue; + } + $methodLines = $refMethod->getEndLine() - $refMethod->getStartLine(); + $lines += $methodLines; + } + if ($methodLines == 0){ + $notCoveredArray[$class] = array("covered" => 0, "maybe" => 0, "notcovered"=>$lines, "total" => $lines, "percentage" => 100); + } else { + $notCoveredArray[$class] = array("covered" => 0, "maybe" => 0, "notcovered"=>$lines, "total" => $lines, "percentage" => 0); + } + $this->totallines += $lines; + $this->totalnotcovered += $lines; + } + return $notCoveredArray; + } + + /* + * Show a summary of all files in Doctrine and their coverage data + * + * @uses generateNonCoveredFiles + * @uses generateCoverage + */ + public function showSummary() + { + if (isset($_GET["order"])){ + $this->sortBy = $_GET["order"]; + } + $coveredArray = $this->generateCoverage(); + $notcoveredArray = $this->generateNotCoveredFiles(); + $coveredArray = array_merge($coveredArray, $notcoveredArray); + + //lets sort it. + uasort($coveredArray, array($this,"sortArray")); + + //and flip if it perhaps? + if (isset($_GET["desc"]) && $_GET["desc"] == "true"){ + $coveredArray = array_reverse($coveredArray, true); + } + + //ugly code to print out the result: + echo "" . TOTAL . "" . round((($this->totalcovered + $this->totalmaybe) / $this->totallines) * 100, 2) . " % $this->totallines$this->totalcovered$this->totalmaybe$this->totalnotcovered"; + foreach($coveredArray as $class => $info){ + $fileName = str_replace("_", "/", $class) . ".php"; + echo "" . $class . "" . $info["percentage"] . " % " . $info["total"] . "" . $info["covered"] . "" . $info["maybe"] . "" . $info["notcovered"]. "coverage"; + } + } + + /* + * Generate coverage data for tested files + * + *@return array An array of coverage data + */ + public function generateCoverage() + { + $coveredArray = array(); + foreach ($this->coverage as $file => $lines) { + $pos = strpos($file, $this->path); + if ($pos === false && $pos !== 0){ + continue; + } + + $class = str_replace(DIRECTORY_SEPARATOR, '_', substr($file, strlen($this->path), -4)); + $class = str_replace($this->path, Doctrine::getPath(), $class); + if (strpos($class, '_Interface')) { + continue; + } + + if ( ! class_exists($class)){ + continue; + } + + $total = count($lines) -1; //we have to remove one since it always reports the last line as a hit + $covered = 0; + $maybe = 0; + $notcovered = 0; + foreach ($lines as $result){ + switch($result){ + case self::COVERED: + $covered++; + break; + case self::NOTCOVERED: + $notcovered++; + break; + case self::MAYBE: + $maybe++; + break; + } + } + $covered--; //again we have to remove that last line. + $this->totallines += $total; + $this->totalcovered += $covered; + $this->totalnotcovered += $notcovered; + $this->totalmaybe += $maybe; + + if ($total === 0) { + $total = 1; + } + $percentage = round((($covered + $maybe) / $total) * 100, 2); + $coveredArray[$class] = array("covered" => $covered, "maybe" => $maybe, "notcovered"=>$notcovered, "total" => $total, "percentage" => $percentage); + } + return $coveredArray; + } + + /* + * Uasort function to sort the array by key + * + */ + public function sortArray($a, $b) + { + if ($a[$this->sortBy] == $b[$this->sortBy]) { + return 0; + } + return ( $a[$this->sortBy] < $b[$this->sortBy]) ? -1 : 1; + } +} + diff --git a/tests/UnitTestCase.php b/tests/DoctrineTest/Doctrine_UnitTestCase.php similarity index 96% rename from tests/UnitTestCase.php rename to tests/DoctrineTest/Doctrine_UnitTestCase.php index 627ca16d2..4f02058ff 100644 --- a/tests/UnitTestCase.php +++ b/tests/DoctrineTest/Doctrine_UnitTestCase.php @@ -1,298 +1,303 @@ -. - */ - -/** - * Doctrine_UnitTestCase - * - * @package Doctrine - * @author Konsta Vesterinen - * @license http://www.opensource.org/licenses/lgpl-license.php LGPL - * @category Object Relational Mapping - * @link www.phpdoctrine.com - * @since 1.0 - * @version $Revision$ - */ -class Doctrine_UnitTestCase extends UnitTestCase -{ - protected $manager; - protected $connection; - protected $objTable; - protected $new; - protected $old; - protected $dbh; - protected $listener; - - protected $users; - protected $valueHolder; - protected $tables = array(); - protected $unitOfWork; - protected $driverName = false; - protected $generic = false; - protected $conn; - protected $adapter; - protected $export; - protected $expr; - protected $dataDict; - protected $transaction; - - - protected $init = false; - - public function init() - { - $name = get_class($this); - - $this->manager = Doctrine_Manager::getInstance(); - $this->manager->setAttribute(Doctrine::ATTR_EXPORT, Doctrine::EXPORT_ALL); - - $this->tables = array_merge($this->tables, - array('entity', - 'entityReference', - 'email', - 'phonenumber', - 'groupuser', - 'album', - 'song', - 'element', - 'error', - 'description', - 'address', - 'account', - 'task', - 'resource', - 'assignment', - 'resourceType', - 'resourceReference') - ); - - - $class = get_class($this); - $e = explode('_', $class); - - - if ( ! $this->driverName) { - $this->driverName = 'main'; - - switch($e[1]) { - case 'Export': - case 'Import': - case 'Transaction': - case 'DataDict': - case 'Sequence': - $this->driverName = 'Sqlite'; - break; - } - - $module = $e[1]; - - if(count($e) > 3) { - $driver = $e[2]; - switch($e[2]) { - case 'Firebird': - case 'Informix': - case 'Mysql': - case 'Mssql': - case 'Oracle': - case 'Pgsql': - case 'Sqlite': - $this->driverName = $e[2]; - break; - } - } - } - - try { - $this->conn = $this->connection = $this->manager->getConnection($this->driverName); - $this->manager->setCurrentConnection($this->driverName); - - $this->connection->evictTables(); - $this->dbh = $this->adapter = $this->connection->getDbh(); - $this->listener = $this->manager->getAttribute(Doctrine::ATTR_LISTENER); - - $this->manager->setAttribute(Doctrine::ATTR_LISTENER, $this->listener); - - } catch(Doctrine_Manager_Exception $e) { - if($this->driverName == 'main') { - $this->dbh = new PDO('sqlite::memory:'); - $this->dbh->sqliteCreateFunction('trim', 'trim', 1); - } else { - $this->dbh = $this->adapter = new Doctrine_Adapter_Mock($this->driverName); - } - - $this->conn = $this->connection = $this->manager->openConnection($this->dbh, $this->driverName); - - if($this->driverName !== 'main') { - $exc = 'Doctrine_Connection_' . ucwords($this->driverName) . '_Exception'; - - $this->exc = new $exc(); - - } else { - } - - $this->listener = new Doctrine_EventListener(); - $this->manager->setAttribute(Doctrine::ATTR_LISTENER, $this->listener); - } - if ($this->driverName !== 'main') { - - if (isset($module)) { - switch($module) { - case 'Export': - case 'Import': - case 'Transaction': - case 'Sequence': - case 'Expression': - $lower = strtolower($module); - - $this->$lower = $this->connection->$lower; - break; - case 'DataDict': - $this->dataDict = $this->connection->dataDict; - break; - } - } - } - $this->unitOfWork = $this->connection->unitOfWork; - $this->connection->setListener(new Doctrine_EventListener()); - $this->query = new Doctrine_Query($this->connection); - - if ($this->driverName === 'main') { - $this->prepareTables(); - $this->prepareData(); - } - } - public function prepareTables() { - foreach($this->tables as $name) { - $name = ucwords($name); - $table = $this->connection->getTable($name); - $query = 'DROP TABLE ' . $table->getTableName(); - try { - $this->conn->exec($query); - } catch(Doctrine_Connection_Exception $e) { - - } - } - $this->conn->export->exportClasses($this->tables); - /** - foreach($this->tables as $name) { - $name = ucwords($name); - $table = $this->connection->getTable($name); - - $table->clear(); - } - */ - - $this->objTable = $this->connection->getTable('User'); - } - public function prepareData() - { - $groups = new Doctrine_Collection($this->connection->getTable('Group')); - - $groups[0]->name = 'Drama Actors'; - - $groups[1]->name = 'Quality Actors'; - - - $groups[2]->name = 'Action Actors'; - $groups[2]['Phonenumber'][0]->phonenumber = '123 123'; - $groups->save(); - - $users = new Doctrine_Collection('User'); - - - $users[0]->name = 'zYne'; - $users[0]['Email']->address = 'zYne@example.com'; - $users[0]['Phonenumber'][0]->phonenumber = '123 123'; - - $users[1]->name = 'Arnold Schwarzenegger'; - $users[1]->Email->address = 'arnold@example.com'; - $users[1]['Phonenumber'][0]->phonenumber = '123 123'; - $users[1]['Phonenumber'][1]->phonenumber = '456 456'; - $users[1]->Phonenumber[2]->phonenumber = '789 789'; - $users[1]->Group[0] = $groups[2]; - - $users[2]->name = 'Michael Caine'; - $users[2]->Email->address = 'caine@example.com'; - $users[2]->Phonenumber[0]->phonenumber = '123 123'; - - $users[3]->name = 'Takeshi Kitano'; - $users[3]->Email->address = 'kitano@example.com'; - $users[3]->Phonenumber[0]->phonenumber = '111 222 333'; - - $users[4]->name = 'Sylvester Stallone'; - $users[4]->Email->address = 'stallone@example.com'; - $users[4]->Phonenumber[0]->phonenumber = '111 555 333'; - $users[4]['Phonenumber'][1]->phonenumber = '123 213'; - $users[4]['Phonenumber'][2]->phonenumber = '444 555'; - - $users[5]->name = 'Kurt Russell'; - $users[5]->Email->address = 'russell@example.com'; - $users[5]->Phonenumber[0]->phonenumber = '111 222 333'; - - $users[6]->name = 'Jean Reno'; - $users[6]->Email->address = 'reno@example.com'; - $users[6]->Phonenumber[0]->phonenumber = '111 222 333'; - $users[6]['Phonenumber'][1]->phonenumber = '222 123'; - $users[6]['Phonenumber'][2]->phonenumber = '123 456'; - - $users[7]->name = 'Edward Furlong'; - $users[7]->Email->address = 'furlong@example.com'; - $users[7]->Phonenumber[0]->phonenumber = '111 567 333'; - - $this->users = $users; - $this->users->save(); - } - public function getConnection() - { - return $this->connection; - } - public function assertDeclarationType($type, $type2) - { - $dec = $this->getDeclaration($type); - - if ( ! is_array($type2)) { - $type2 = array($type2); - } - - $this->assertEqual($dec['type'], $type2); - } - public function getDeclaration($type) - { - return $this->dataDict->getPortableDeclaration(array('type' => $type, 'name' => 'colname', 'length' => 1, 'fixed' => true)); - } - public function clearCache() - { - foreach($this->tables as $name) { - $table = $this->connection->getTable($name); - $table->getCache()->deleteAll(); - } - } - public function setUp() - { - if ( ! $this->init) { - $this->init(); - } - if (isset($this->objTable)) { - $this->objTable->clear(); - } - - $this->init = true; - } -} +. + */ + +/** + * Doctrine_UnitTestCase + * + * @package Doctrine + * @author Konsta Vesterinen + * @license http://www.opensource.org/licenses/lgpl-license.php LGPL + * @category Object Relational Mapping + * @link www.phpdoctrine.com + * @since 1.0 + * @version $Revision$ + */ +class Doctrine_UnitTestCase extends UnitTestCase +{ + protected $manager; + protected $connection; + protected $objTable; + protected $new; + protected $old; + protected $dbh; + protected $listener; + + protected $users; + protected $valueHolder; + protected $tables = array(); + protected $unitOfWork; + protected $driverName = false; + protected $generic = false; + protected $conn; + protected $adapter; + protected $export; + protected $expr; + protected $dataDict; + protected $transaction; + protected $_name; + + + protected $init = false; + + public function getName(){ + return $this->_name; + } + + public function init() + { + $this->_name = get_class($this); + + $this->manager = Doctrine_Manager::getInstance(); + $this->manager->setAttribute(Doctrine::ATTR_EXPORT, Doctrine::EXPORT_ALL); + + $this->tables = array_merge($this->tables, + array('entity', + 'entityReference', + 'email', + 'phonenumber', + 'groupuser', + 'album', + 'song', + 'element', + 'error', + 'description', + 'address', + 'account', + 'task', + 'resource', + 'assignment', + 'resourceType', + 'resourceReference') + ); + + + $class = get_class($this); + $e = explode('_', $class); + + + if ( ! $this->driverName) { + $this->driverName = 'main'; + + switch($e[1]) { + case 'Export': + case 'Import': + case 'Transaction': + case 'DataDict': + case 'Sequence': + $this->driverName = 'Sqlite'; + break; + } + + $module = $e[1]; + + if(count($e) > 3) { + $driver = $e[2]; + switch($e[2]) { + case 'Firebird': + case 'Informix': + case 'Mysql': + case 'Mssql': + case 'Oracle': + case 'Pgsql': + case 'Sqlite': + $this->driverName = $e[2]; + break; + } + } + } + + try { + $this->conn = $this->connection = $this->manager->getConnection($this->driverName); + $this->manager->setCurrentConnection($this->driverName); + + $this->connection->evictTables(); + $this->dbh = $this->adapter = $this->connection->getDbh(); + $this->listener = $this->manager->getAttribute(Doctrine::ATTR_LISTENER); + + $this->manager->setAttribute(Doctrine::ATTR_LISTENER, $this->listener); + + } catch(Doctrine_Manager_Exception $e) { + if($this->driverName == 'main') { + $this->dbh = new PDO('sqlite::memory:'); + $this->dbh->sqliteCreateFunction('trim', 'trim', 1); + } else { + $this->dbh = $this->adapter = new Doctrine_Adapter_Mock($this->driverName); + } + + $this->conn = $this->connection = $this->manager->openConnection($this->dbh, $this->driverName); + + if($this->driverName !== 'main') { + $exc = 'Doctrine_Connection_' . ucwords($this->driverName) . '_Exception'; + + $this->exc = new $exc(); + + } else { + } + + $this->listener = new Doctrine_EventListener(); + $this->manager->setAttribute(Doctrine::ATTR_LISTENER, $this->listener); + } + if ($this->driverName !== 'main') { + + if (isset($module)) { + switch($module) { + case 'Export': + case 'Import': + case 'Transaction': + case 'Sequence': + case 'Expression': + $lower = strtolower($module); + + $this->$lower = $this->connection->$lower; + break; + case 'DataDict': + $this->dataDict = $this->connection->dataDict; + break; + } + } + } + $this->unitOfWork = $this->connection->unitOfWork; + $this->connection->setListener(new Doctrine_EventListener()); + $this->query = new Doctrine_Query($this->connection); + + if ($this->driverName === 'main') { + $this->prepareTables(); + $this->prepareData(); + } + } + public function prepareTables() { + foreach($this->tables as $name) { + $name = ucwords($name); + $table = $this->connection->getTable($name); + $query = 'DROP TABLE ' . $table->getTableName(); + try { + $this->conn->exec($query); + } catch(Doctrine_Connection_Exception $e) { + + } + } + $this->conn->export->exportClasses($this->tables); + /** + foreach($this->tables as $name) { + $name = ucwords($name); + $table = $this->connection->getTable($name); + + $table->clear(); + } + */ + + $this->objTable = $this->connection->getTable('User'); + } + public function prepareData() + { + $groups = new Doctrine_Collection($this->connection->getTable('Group')); + + $groups[0]->name = 'Drama Actors'; + + $groups[1]->name = 'Quality Actors'; + + + $groups[2]->name = 'Action Actors'; + $groups[2]['Phonenumber'][0]->phonenumber = '123 123'; + $groups->save(); + + $users = new Doctrine_Collection('User'); + + + $users[0]->name = 'zYne'; + $users[0]['Email']->address = 'zYne@example.com'; + $users[0]['Phonenumber'][0]->phonenumber = '123 123'; + + $users[1]->name = 'Arnold Schwarzenegger'; + $users[1]->Email->address = 'arnold@example.com'; + $users[1]['Phonenumber'][0]->phonenumber = '123 123'; + $users[1]['Phonenumber'][1]->phonenumber = '456 456'; + $users[1]->Phonenumber[2]->phonenumber = '789 789'; + $users[1]->Group[0] = $groups[2]; + + $users[2]->name = 'Michael Caine'; + $users[2]->Email->address = 'caine@example.com'; + $users[2]->Phonenumber[0]->phonenumber = '123 123'; + + $users[3]->name = 'Takeshi Kitano'; + $users[3]->Email->address = 'kitano@example.com'; + $users[3]->Phonenumber[0]->phonenumber = '111 222 333'; + + $users[4]->name = 'Sylvester Stallone'; + $users[4]->Email->address = 'stallone@example.com'; + $users[4]->Phonenumber[0]->phonenumber = '111 555 333'; + $users[4]['Phonenumber'][1]->phonenumber = '123 213'; + $users[4]['Phonenumber'][2]->phonenumber = '444 555'; + + $users[5]->name = 'Kurt Russell'; + $users[5]->Email->address = 'russell@example.com'; + $users[5]->Phonenumber[0]->phonenumber = '111 222 333'; + + $users[6]->name = 'Jean Reno'; + $users[6]->Email->address = 'reno@example.com'; + $users[6]->Phonenumber[0]->phonenumber = '111 222 333'; + $users[6]['Phonenumber'][1]->phonenumber = '222 123'; + $users[6]['Phonenumber'][2]->phonenumber = '123 456'; + + $users[7]->name = 'Edward Furlong'; + $users[7]->Email->address = 'furlong@example.com'; + $users[7]->Phonenumber[0]->phonenumber = '111 567 333'; + + $this->users = $users; + $this->users->save(); + } + public function getConnection() + { + return $this->connection; + } + public function assertDeclarationType($type, $type2) + { + $dec = $this->getDeclaration($type); + + if ( ! is_array($type2)) { + $type2 = array($type2); + } + + $this->assertEqual($dec['type'], $type2); + } + public function getDeclaration($type) + { + return $this->dataDict->getPortableDeclaration(array('type' => $type, 'name' => 'colname', 'length' => 1, 'fixed' => true)); + } + public function clearCache() + { + foreach($this->tables as $name) { + $table = $this->connection->getTable($name); + $table->getCache()->deleteAll(); + } + } + public function setUp() + { + if ( ! $this->init) { + $this->init(); + } + if (isset($this->objTable)) { + $this->objTable->clear(); + } + + $this->init = true; + } +} diff --git a/tests/DoctrineTest/GroupTest.php b/tests/DoctrineTest/GroupTest.php new file mode 100644 index 000000000..18da66dc3 --- /dev/null +++ b/tests/DoctrineTest/GroupTest.php @@ -0,0 +1,79 @@ +_title = $title; + $this->_name = $name; + } + + public function getName(){ + return $this->_name; + } + + public function addTestCase(UnitTestCase $testCase) + { + if($testCase instanceOf GroupTest) { + $this->_testCases = array_merge($this->_testCases, $testCase->getTestCases()); + } else { + $this->_testCases[get_class($testCase)] = $testCase; + } + } + + public function shouldBeRun($testCase, $filter){ + if ( ! is_array($filter)) { + return true; + } + foreach($filter as $subFilter) { + $name = strtolower(get_class($testCase)); + $pos = strpos($name, strtolower($subFilter)); + //it can be 0 so we have to use === to see if false + if ($pos === false) { + return false; + } + } + return true; + } + public function run(DoctrineTest_Reporter $reporter = null, $filter = null) + { + $reporter->paintHeader($this->_title); + foreach ($this->_testCases as $k => $testCase) { + if ( ! $this->shouldBeRun($testCase, $filter)) { + continue; + } + try{ + $testCase->run(); + } catch(Exception $e) { + $this->_failed += 1; + $this->_messages[] = 'Unexpected exception thrown with message [' . $e->getMessage() . '] in ' . $e->getFile() . ' on line ' . $e->getLine(); + } + $this->_passed += $testCase->getPassCount(); + $this->_failed += $testCase->getFailCount(); + $this->_messages = array_merge($this->_messages, $testCase->getMessages()); + + $this->_testCases[$k] = null; + if(PHP_SAPI === 'cli'){ + echo '.'; + } + set_time_limit(900); + } + $reporter->setTestCase($this); + + $reporter->paintFooter(); + } + + + public function getTestCaseCount() + { + return count($this->_testCases); + } + + public function getTestCases(){ + return $this->_testCases; + } +} + diff --git a/tests/DoctrineTest/Reporter.php b/tests/DoctrineTest/Reporter.php new file mode 100644 index 000000000..b849ce97a --- /dev/null +++ b/tests/DoctrineTest/Reporter.php @@ -0,0 +1,12 @@ +_test = $test; + } +} + diff --git a/tests/DoctrineTest/Reporter/Cli.php b/tests/DoctrineTest/Reporter/Cli.php new file mode 100644 index 000000000..a40c1bd2e --- /dev/null +++ b/tests/DoctrineTest/Reporter/Cli.php @@ -0,0 +1,18 @@ +_test->getMessages() as $message) { + print $message . "\n"; + } + echo "====================\n"; + print "Tested: " . $this->_test->getTestCaseCount() . ' test cases' ."\n"; + print "Successes: " . $this->_test->getPassCount() . " passes. \n"; + print "Failures: " . $this->_test->getFailCount() . " fails. \n"; + } +} diff --git a/tests/DoctrineTest/Reporter/Html.php b/tests/DoctrineTest/Reporter/Html.php new file mode 100644 index 000000000..3a5f60530 --- /dev/null +++ b/tests/DoctrineTest/Reporter/Html.php @@ -0,0 +1,37 @@ + + + + Doctrine Unit Tests + + + + + +

+'; + foreach ($this->_test->getMessages() as $message) { + print "

$message

"; + } + print ''; + $colour = ($this->_test->getFailCount() > 0 ? 'red' : 'green'); + print '
'; + print $this->_test->getTestCaseCount() . ' test cases.'; + print '' . $this->_test->getPassCount() . ' passes and '; + print '' . $this->_test->getFailCount() . ' fails.'; + print '
'; + } + } diff --git a/tests/DoctrineTest/UnitTestCase.php b/tests/DoctrineTest/UnitTestCase.php new file mode 100644 index 000000000..962f4206a --- /dev/null +++ b/tests/DoctrineTest/UnitTestCase.php @@ -0,0 +1,109 @@ +_passed++; + } else { + $seperator = "
"; + if(PHP_SAPI === "cli"){ + $seperator = "\n"; + } + $message = "$seperator Value1: $value $seperator != $seperator Value2: $value2 $seperator"; + $this->_fail($message); + } + } + + public function assertIdentical($value, $value2) + { + if ($value === $value2) { + $this->_passed++; + } else { + $this->_fail(); + } + } + + public function assertNotEqual($value, $value2) + { + if ($value != $value2) { + $this->_passed++; + } else { + $this->_fail(); + } + } + public function assertTrue($expr) + { + if ($expr) { + $this->_passed++; + } else { + $this->_fail(); + } + } + public function assertFalse($expr) + { + if ( ! $expr) { + $this->_passed++; + } else { + $this->_fail(); + } + } + public function pass() + { + $this->_passed++; + } + public function fail($message = "") + { + $this->_fail($message); + } + public function _fail($message = "") + { + $trace = debug_backtrace(); + array_shift($trace); + + + foreach ($trace as $stack) { + if (substr($stack['function'], 0, 4) === 'test') { + $class = new ReflectionClass($stack['class']); + + if ( ! isset($line)) { + $line = $stack['line']; + } + + $errorMessage = $class->getName() . ' : method ' . $stack['function'] . ' failed on line ' . $line; + $this->_messages[] = $errorMessage . " " . $message; + break; + } + $line = $stack['line']; + } + $this->_failed++; + } + public function run(DoctrineTest_Reporter $reporter = null, $filter = null) + { + foreach (get_class_methods($this) as $method) { + if (substr($method, 0, 4) === 'test') { + $this->setUp(); + + $this->$method(); + } + } + } + public function getMessages() + { + return $this->_messages; + } + public function getFailCount() + { + return $this->_failed; + } + public function getPassCount() + { + return $this->_passed; + } +} diff --git a/tests/Test.php b/tests/Test.php deleted file mode 100644 index 2d5a257be..000000000 --- a/tests/Test.php +++ /dev/null @@ -1,190 +0,0 @@ -_testCases = array_merge($this->_testCases, $testCase->getTestCases()); - } else { - $this->_testCases[get_class($testCase)] = $testCase; - } - } - - public function shouldBeRun($testCase, $filter){ - if ( ! is_array($filter)) { - return true; - } - foreach($filter as $subFilter) { - $name = strtolower(get_class($testCase)); - $pos = strpos($name, strtolower($subFilter)); - //it can be 0 so we have to use === to see if false - if ($pos === false) { - return false; - } - } - return true; - } - public function run(HtmlReporter $reporter = null, $filter = null) - { - $reporter->paintHeader(); - foreach ($this->_testCases as $k => $testCase) { - if ( ! $this->shouldBeRun($testCase, $filter)) { - continue; - } - try{ - $testCase->run(); - } catch(Exception $e) { - $this->_failed += 1; - $this->_messages[] = 'Unexpected exception thrown with message [' . $e->getMessage() . '] in ' . $e->getFile() . ' on line ' . $e->getLine(); - } - $this->_passed += $testCase->getPassCount(); - $this->_failed += $testCase->getFailCount(); - $this->_messages = array_merge($this->_messages, $testCase->getMessages()); - - $this->_testCases[$k] = null; - if(PHP_SAPI === 'cli'){ - echo '.'; - } - set_time_limit(900); - } - $reporter->setTestCase($this); - - $reporter->paintFooter(); - } - - - public function getTestCaseCount() - { - return count($this->_testCases); - } - - public function getTestCases(){ - return $this->_testCases; - } -} -class HtmlReporter -{ - protected $_test; - - public function setTestCase(GroupTest $test) - { - $this->_test = $test; - } -} -class UnitTestCase -{ - protected $_passed = 0; - - protected $_failed = 0; - - protected $_messages = array(); - - public function assertEqual($value, $value2) - { - if ($value == $value2) { - $this->_passed++; - } else { - $seperator = "
"; - if(PHP_SAPI === "cli"){ - $seperator = "\n"; - } - $message = "$seperator Value1: $value $seperator != $seperator Value2: $value2 $seperator"; - $this->_fail($message); - } - } - - public function assertIdentical($value, $value2) - { - if ($value === $value2) { - $this->_passed++; - } else { - $this->_fail(); - } - } - - public function assertNotEqual($value, $value2) - { - if ($value != $value2) { - $this->_passed++; - } else { - $this->_fail(); - } - } - public function assertTrue($expr) - { - if ($expr) { - $this->_passed++; - } else { - $this->_fail(); - } - } - public function assertFalse($expr) - { - if ( ! $expr) { - $this->_passed++; - } else { - $this->_fail(); - } - } - public function pass() - { - $this->_passed++; - } - public function fail($message = "") - { - $this->_fail($message); - } - public function _fail($message = "") - { - $trace = debug_backtrace(); - array_shift($trace); - - - foreach ($trace as $stack) { - if (substr($stack['function'], 0, 4) === 'test') { - $class = new ReflectionClass($stack['class']); - - if ( ! isset($line)) { - $line = $stack['line']; - } - - $errorMessage = $class->getName() . ' : method ' . $stack['function'] . ' failed on line ' . $line; - $this->_messages[] = $errorMessage . " " . $message; - break; - } - $line = $stack['line']; - } - $this->_failed++; - } - public function run(HtmlReporter $reporter = null, $filter = null) - { - foreach (get_class_methods($this) as $method) { - if (substr($method, 0, 4) === 'test') { - $this->setUp(); - - $this->$method(); - } - } - } - public function getMessages() - { - return $this->_messages; - } - public function getFailCount() - { - return $this->_failed; - } - public function getPassCount() - { - return $this->_passed; - } -} diff --git a/tests/coverage.txt b/tests/coverage.txt deleted file mode 100755 index 8c4af4674..000000000 --- a/tests/coverage.txt +++ /dev/null @@ -1 +0,0 @@ -a:2:{s:4:"path";s:38:"/home/bjarte/public_html/doctrine/lib/";s:8:"coverage";a:375:{s:57:"/home/bjarte/public_html/doctrine/lib/Doctrine/Record.php";a:629:{i:0;i:1;i:135;i:1;i:136;i:1;i:137;i:1;i:138;i:1;i:139;i:1;i:141;i:1;i:142;i:1;i:143;i:1;i:147;i:1;i:153;i:1;i:154;i:1;i:156;i:1;i:158;i:1;i:161;i:1;i:164;i:1;i:166;i:1;i:168;i:1;i:170;i:1;i:171;i:1;i:172;i:1;i:173;i:1;i:174;i:1;i:178;i:1;i:179;i:1;i:180;i:1;i:182;i:1;i:183;i:1;i:184;i:1;i:187;i:1;i:189;i:1;i:190;i:1;i:192;i:1;i:193;i:1;i:195;i:1;i:203;i:-1;i:204;i:-2;i:213;i:1;i:222;i:1;i:231;i:1;i:232;i:-2;i:240;i:1;i:241;i:1;i:242;i:-2;i:244;i:1;i:247;i:1;i:248;i:1;i:249;i:1;i:250;i:1;i:251;i:1;i:252;i:1;i:253;i:1;i:256;i:1;i:257;i:-2;i:264;i:1;i:271;i:1;i:278;i:1;i:284;i:1;i:290;i:1;i:296;i:1;i:302;i:1;i:308;i:1;i:314;i:1;i:320;i:1;i:326;i:1;i:333;i:1;i:340;i:1;i:347;i:1;i:354;i:1;i:362;i:1;i:363;i:-2;i:373;i:1;i:374;i:-1;i:375;i:-1;i:376;i:-2;i:377;i:-1;i:378;i:-1;i:379;i:1;i:381;i:-1;i:391;i:1;i:392;i:1;i:393;i:-2;i:394;i:1;i:395;i:1;i:397;i:1;i:398;i:1;i:399;i:1;i:401;i:1;i:402;i:1;i:403;i:1;i:404;i:1;i:405;i:1;i:406;i:1;i:407;i:1;i:416;i:1;i:417;i:1;i:419;i:1;i:420;i:1;i:421;i:1;i:422;i:1;i:423;i:1;i:425;i:1;i:426;i:1;i:428;i:1;i:429;i:-2;i:439;i:1;i:440;i:1;i:442;i:1;i:443;i:1;i:453;i:1;i:454;i:1;i:455;i:1;i:456;i:1;i:457;i:1;i:459;i:1;i:460;i:1;i:461;i:1;i:462;i:1;i:463;i:1;i:464;i:1;i:465;i:1;i:466;i:1;i:468;i:1;i:469;i:1;i:470;i:1;i:471;i:1;i:472;i:1;i:474;i:1;i:475;i:1;i:476;i:-1;i:477;i:1;i:486;i:1;i:488;i:1;i:490;i:1;i:492;i:1;i:493;i:1;i:494;i:1;i:495;i:1;i:496;i:1;i:497;i:1;i:499;i:1;i:500;i:1;i:502;i:1;i:503;i:1;i:504;i:-1;i:505;i:1;i:506;i:1;i:507;i:1;i:508;i:1;i:509;i:1;i:510;i:1;i:511;i:1;i:512;i:1;i:513;i:1;i:514;i:1;i:515;i:1;i:516;i:1;i:517;i:1;i:518;i:1;i:519;i:-1;i:521;i:1;i:523;i:1;i:525;i:1;i:527;i:1;i:528;i:-2;i:539;i:1;i:541;i:1;i:543;i:1;i:544;i:1;i:546;i:1;i:547;i:1;i:549;i:1;i:551;i:1;i:553;i:1;i:554;i:1;i:555;i:1;i:557;i:1;i:559;i:1;i:560;i:1;i:561;i:1;i:562;i:1;i:563;i:1;i:564;i:1;i:565;i:1;i:566;i:1;i:567;i:1;i:568;i:1;i:569;i:1;i:571;i:-1;i:572;i:1;i:574;i:1;i:575;i:1;i:577;i:1;i:579;i:1;i:581;i:1;i:582;i:1;i:595;i:1;i:596;i:1;i:597;i:-2;i:598;i:1;i:599;i:1;i:600;i:1;i:601;i:1;i:602;i:1;i:603;i:-1;i:605;i:1;i:606;i:-1;i:608;i:-1;i:609;i:-1;i:610;i:-1;i:611;i:-1;i:612;i:-1;i:614;i:-1;i:616;i:1;i:617;i:1;i:619;i:1;i:620;i:1;i:622;i:1;i:623;i:-1;i:624;i:-2;i:625;i:1;i:636;i:1;i:637;i:1;i:638;i:-1;i:639;i:-1;i:640;i:1;i:641;i:-1;i:642;i:-2;i:643;i:1;i:645;i:1;i:646;i:1;i:647;i:1;i:648;i:1;i:651;i:1;i:652;i:1;i:653;i:-2;i:655;i:1;i:657;i:1;i:659;i:1;i:661;i:1;i:662;i:-2;i:675;i:1;i:676;i:1;i:677;i:1;i:678;i:1;i:679;i:1;i:680;i:1;i:681;i:1;i:683;i:1;i:693;i:1;i:694;i:-2;i:703;i:1;i:704;i:-2;i:717;i:1;i:718;i:-1;i:719;i:-2;i:720;i:1;i:721;i:1;i:723;i:1;i:724;i:-2;i:735;i:1;i:736;i:-1;i:738;i:-1;i:740;i:-1;i:741;i:-2;i:742;i:1;i:743;i:-2;i:755;i:1;i:756;i:1;i:758;i:1;i:760;i:1;i:762;i:1;i:763;i:1;i:764;i:1;i:766;i:1;i:767;i:1;i:768;i:1;i:769;i:1;i:771;i:1;i:772;i:-2;i:774;i:1;i:775;i:-1;i:776;i:-2;i:777;i:1;i:778;i:-1;i:779;i:-2;i:780;i:1;i:781;i:1;i:782;i:-2;i:786;i:1;i:788;i:1;i:790;i:1;i:791;i:1;i:793;i:1;i:794;i:1;i:797;i:1;i:798;i:-2;i:811;i:1;i:812;i:1;i:813;i:1;i:830;i:1;i:832;i:1;i:834;i:1;i:835;i:1;i:836;i:1;i:838;i:1;i:840;i:1;i:841;i:1;i:842;i:1;i:843;i:1;i:845;i:1;i:846;i:1;i:847;i:1;i:848;i:1;i:851;i:1;i:852;i:1;i:853;i:1;i:854;i:1;i:856;i:1;i:857;i:1;i:858;i:1;i:859;i:1;i:860;i:1;i:861;i:1;i:862;i:1;i:863;i:1;i:864;i:1;i:865;i:-1;i:866;i:1;i:867;i:1;i:869;i:1;i:870;i:1;i:871;i:-2;i:874;i:1;i:878;i:1;i:881;i:1;i:882;i:1;i:883;i:1;i:885;i:1;i:886;i:-1;i:887;i:-2;i:888;i:1;i:889;i:1;i:890;i:1;i:891;i:-2;i:892;i:-1;i:893;i:1;i:895;i:1;i:896;i:-1;i:897;i:-2;i:898;i:1;i:899;i:1;i:900;i:1;i:901;i:1;i:903;i:1;i:904;i:1;i:905;i:1;i:907;i:1;i:910;i:1;i:912;i:1;i:913;i:-1;i:914;i:-2;i:915;i:1;i:917;i:1;i:918;i:1;i:927;i:1;i:929;i:1;i:930;i:1;i:931;i:-2;i:932;i:1;i:933;i:-1;i:934;i:-2;i:935;i:1;i:936;i:-1;i:937;i:-2;i:938;i:1;i:939;i:1;i:941;i:1;i:942;i:-2;i:943;i:1;i:944;i:-2;i:951;i:-1;i:952;i:-1;i:953;i:-1;i:955;i:-1;i:968;i:1;i:969;i:1;i:970;i:1;i:971;i:1;i:972;i:1;i:984;i:-1;i:985;i:-1;i:986;i:-2;i:987;i:-2;i:989;i:-2;i:1010;i:-1;i:1011;i:-1;i:1012;i:-1;i:1014;i:-1;i:1015;i:-2;i:1022;i:1;i:1024;i:1;i:1025;i:1;i:1026;i:1;i:1027;i:1;i:1028;i:-2;i:1040;i:1;i:1042;i:1;i:1043;i:1;i:1044;i:1;i:1046;i:1;i:1047;i:1;i:1049;i:1;i:1050;i:1;i:1051;i:1;i:1052;i:-2;i:1055;i:1;i:1056;i:1;i:1057;i:1;i:1058;i:1;i:1059;i:1;i:1060;i:1;i:1061;i:1;i:1062;i:1;i:1063;i:1;i:1064;i:1;i:1065;i:1;i:1066;i:1;i:1067;i:1;i:1068;i:1;i:1069;i:1;i:1070;i:1;i:1071;i:1;i:1078;i:1;i:1079;i:1;i:1080;i:1;i:1081;i:1;i:1082;i:1;i:1083;i:1;i:1085;i:1;i:1086;i:1;i:1087;i:1;i:1088;i:1;i:1089;i:1;i:1091;i:1;i:1092;i:-2;i:1101;i:1;i:1102;i:-2;i:1110;i:-1;i:1111;i:-2;i:1121;i:1;i:1123;i:1;i:1124;i:1;i:1125;i:1;i:1126;i:1;i:1127;i:1;i:1128;i:1;i:1129;i:1;i:1130;i:1;i:1131;i:1;i:1132;i:1;i:1133;i:1;i:1134;i:-1;i:1135;i:-1;i:1136;i:-1;i:1137;i:-1;i:1138;i:1;i:1139;i:-2;i:1148;i:1;i:1149;i:1;i:1150;i:-2;i:1159;i:1;i:1160;i:1;i:1161;i:-2;i:1169;i:-1;i:1170;i:-1;i:1171;i:-2;i:1172;i:-1;i:1173;i:-2;i:1180;i:1;i:1181;i:-2;i:1192;i:1;i:1193;i:1;i:1194;i:1;i:1195;i:1;i:1196;i:-2;i:1205;i:1;i:1207;i:1;i:1208;i:1;i:1210;i:1;i:1211;i:1;i:1213;i:1;i:1214;i:1;i:1216;i:1;i:1217;i:1;i:1218;i:1;i:1219;i:1;i:1220;i:1;i:1223;i:1;i:1224;i:-2;i:1232;i:-1;i:1234;i:-1;i:1235;i:-1;i:1236;i:-1;i:1237;i:-1;i:1238;i:-1;i:1239;i:-1;i:1240;i:-1;i:1242;i:-1;i:1243;i:-1;i:1244;i:-2;i:1254;i:1;i:1255;i:-1;i:1256;i:-1;i:1257;i:-1;i:1258;i:-1;i:1259;i:1;i:1260;i:1;i:1261;i:1;i:1262;i:1;i:1263;i:1;i:1264;i:1;i:1265;i:1;i:1266;i:1;i:1267;i:1;i:1268;i:1;i:1270;i:1;i:1278;i:1;i:1279;i:-2;i:1287;i:1;i:1288;i:1;i:1289;i:1;i:1290;i:-2;i:1292;i:1;i:1293;i:-2;i:1304;i:1;i:1305;i:-2;i:1313;i:1;i:1314;i:-2;i:1323;i:-1;i:1324;i:-1;i:1325;i:-2;i:1326;i:-1;i:1327;i:-2;i:1334;i:1;i:1335;i:-2;i:1344;i:-1;i:1345;i:-1;i:1356;i:-1;i:1357;i:-1;i:1358;i:-1;i:1369;i:-1;i:1371;i:-1;i:1372;i:-1;i:1373;i:-1;i:1374;i:-1;i:1377;i:-1;i:1378;i:-1;i:1389;i:1;i:1390;i:1;i:1392;i:1;i:1393;i:1;i:1394;i:1;i:1396;i:1;i:1398;i:1;i:1399;i:1;i:1400;i:1;i:1401;i:-2;i:1409;i:1;i:1410;i:-1;i:1411;i:-2;i:1413;i:1;i:1414;i:1;i:1415;i:1;i:1416;i:1;i:1417;i:1;i:1418;i:1;i:1420;i:1;i:1421;i:-2;i:1433;i:-1;i:1434;i:-1;i:1435;i:-1;i:1436;i:-1;i:1438;i:-1;i:1439;i:-1;i:1440;i:-2;i:1442;i:-1;i:1444;i:-1;i:1445;i:-2;i:1456;i:1;i:1458;i:1;i:1460;i:1;i:1462;i:1;i:1463;i:1;i:1464;i:1;i:1465;i:1;i:1466;i:1;i:1468;i:1;i:1471;i:1;i:1472;i:1;i:1473;i:1;i:1474;i:1;i:1475;i:1;i:1477;i:1;i:1478;i:1;i:1479;i:1;i:1480;i:1;i:1481;i:-1;i:1482;i:-1;i:1483;i:-1;i:1484;i:-1;i:1485;i:1;i:1486;i:1;i:1487;i:1;i:1488;i:-2;i:1504;i:-1;i:1505;i:-1;i:1506;i:-1;i:1508;i:-1;i:1509;i:-2;i:1510;i:-1;i:1512;i:-1;i:1513;i:-2;i:1519;i:-1;i:1520;i:-1;i:1523;i:-1;i:1524;i:-2;i:1530;i:1;i:1531;i:-2;}s:49:"/home/bjarte/public_html/doctrine/models/Song.php";a:4:{i:4;i:1;i:5;i:1;i:6;i:1;i:7;i:1;}s:63:"/home/bjarte/public_html/doctrine/lib/Doctrine/Query/Select.php";a:6:{i:21;i:1;i:33;i:1;i:37;i:1;i:39;i:1;i:40;i:-2;i:42;i:1;}s:72:"/home/bjarte/public_html/doctrine/tests/Transaction/FirebirdTestCase.php";a:44:{i:37;i:1;i:39;i:1;i:40;i:1;i:43;i:1;i:45;i:1;i:46;i:1;i:49;i:1;i:50;i:1;i:52;i:1;i:53;i:1;i:57;i:1;i:58;i:-1;i:59;i:1;i:60;i:1;i:62;i:1;i:66;i:1;i:67;i:-1;i:68;i:1;i:69;i:1;i:71;i:1;i:75;i:1;i:76;i:-1;i:77;i:1;i:78;i:1;i:80;i:1;i:83;i:1;i:84;i:1;i:85;i:1;i:86;i:1;i:88;i:1;i:89;i:1;i:90;i:1;i:91;i:1;i:92;i:1;i:95;i:1;i:97;i:1;i:99;i:1;i:101;i:1;i:102;i:1;i:105;i:1;i:107;i:1;i:109;i:1;i:111;i:1;i:112;i:1;}s:67:"/home/bjarte/public_html/doctrine/tests/Export/FirebirdTestCase.php";a:31:{i:38;i:1;i:39;i:-1;i:40;i:1;i:41;i:1;i:43;i:1;i:47;i:1;i:48;i:-1;i:49;i:1;i:50;i:1;i:52;i:1;i:55;i:1;i:57;i:1;i:59;i:1;i:61;i:1;i:67;i:1;i:68;i:1;i:71;i:1;i:72;i:1;i:73;i:1;i:74;i:1;i:76;i:1;i:77;i:1;i:79;i:1;i:80;i:1;i:83;i:1;i:84;i:1;i:85;i:1;i:87;i:1;i:88;i:1;i:90;i:1;i:91;i:1;}s:61:"/home/bjarte/public_html/doctrine/models/MysqlGroupMember.php";a:3:{i:6;i:1;i:7;i:1;i:8;i:1;}s:62:"/home/bjarte/public_html/doctrine/tests/UnitOfWorkTestCase.php";a:77:{i:43;i:1;i:45;i:1;i:46;i:1;i:48;i:1;i:49;i:1;i:51;i:1;i:52;i:1;i:54;i:1;i:56;i:1;i:57;i:1;i:59;i:1;i:61;i:1;i:62;i:1;i:63;i:1;i:64;i:1;i:65;i:1;i:67;i:1;i:69;i:1;i:70;i:1;i:71;i:1;i:72;i:1;i:73;i:1;i:75;i:1;i:76;i:1;i:77;i:1;i:78;i:1;i:79;i:1;i:81;i:1;i:82;i:1;i:83;i:1;i:84;i:1;i:85;i:1;i:87;i:1;i:88;i:1;i:89;i:1;i:90;i:1;i:91;i:1;i:93;i:1;i:94;i:1;i:95;i:1;i:96;i:1;i:97;i:1;i:99;i:1;i:100;i:1;i:101;i:1;i:102;i:1;i:103;i:1;i:104;i:1;i:105;i:1;i:107;i:1;i:108;i:1;i:109;i:1;i:110;i:1;i:111;i:1;i:112;i:1;i:113;i:1;i:115;i:1;i:116;i:1;i:117;i:1;i:118;i:1;i:119;i:1;i:120;i:1;i:121;i:1;i:123;i:1;i:124;i:1;i:125;i:1;i:126;i:1;i:127;i:1;i:128;i:1;i:129;i:1;i:131;i:1;i:132;i:1;i:133;i:1;i:134;i:1;i:135;i:1;i:136;i:1;i:137;i:1;}s:51:"/home/bjarte/public_html/doctrine/models/Author.php";a:3:{i:4;i:1;i:5;i:1;i:6;i:1;}s:56:"/home/bjarte/public_html/doctrine/models/Record_City.php";a:7:{i:4;i:1;i:5;i:1;i:6;i:1;i:7;i:1;i:9;i:1;i:10;i:1;i:11;i:1;}s:67:"/home/bjarte/public_html/doctrine/tests/Relation/ParserTestCase.php";a:99:{i:37;i:1;i:39;i:1;i:40;i:1;i:42;i:1;i:44;i:1;i:45;i:1;i:46;i:1;i:48;i:1;i:49;i:1;i:52;i:1;i:54;i:1;i:56;i:1;i:57;i:-1;i:58;i:1;i:59;i:1;i:61;i:1;i:64;i:1;i:66;i:1;i:67;i:1;i:68;i:1;i:70;i:1;i:71;i:1;i:74;i:1;i:76;i:1;i:77;i:1;i:78;i:1;i:80;i:1;i:81;i:1;i:84;i:1;i:86;i:1;i:87;i:1;i:88;i:1;i:90;i:1;i:91;i:1;i:94;i:1;i:96;i:1;i:97;i:1;i:98;i:1;i:100;i:1;i:101;i:1;i:104;i:1;i:106;i:1;i:107;i:1;i:109;i:1;i:110;i:1;i:111;i:1;i:115;i:1;i:117;i:1;i:118;i:1;i:120;i:1;i:121;i:1;i:122;i:1;i:125;i:1;i:127;i:1;i:128;i:1;i:129;i:1;i:130;i:1;i:132;i:1;i:133;i:1;i:136;i:1;i:138;i:1;i:139;i:1;i:140;i:1;i:141;i:1;i:143;i:1;i:144;i:1;i:147;i:1;i:148;i:1;i:149;i:1;i:151;i:1;i:153;i:1;i:155;i:1;i:156;i:1;i:159;i:1;i:160;i:1;i:162;i:1;i:164;i:1;i:166;i:1;i:167;i:1;i:170;i:1;i:171;i:1;i:172;i:1;i:174;i:1;i:176;i:1;i:178;i:1;i:179;i:1;i:180;i:1;i:181;i:1;i:184;i:1;i:185;i:1;i:186;i:1;i:187;i:1;i:188;i:1;i:190;i:1;i:192;i:1;i:193;i:1;i:195;i:1;i:196;i:1;i:197;i:1;}s:55:"/home/bjarte/public_html/doctrine/lib/Doctrine/View.php";a:26:{i:35;i:1;i:69;i:1;i:70;i:1;i:71;i:1;i:72;i:1;i:73;i:1;i:82;i:1;i:83;i:-2;i:92;i:1;i:93;i:-2;i:102;i:1;i:103;i:-2;i:113;i:1;i:115;i:1;i:116;i:1;i:117;i:-2;i:119;i:1;i:130;i:1;i:131;i:1;i:132;i:-2;i:134;i:1;i:144;i:1;i:145;i:-2;i:154;i:1;i:155;i:-2;i:157;i:1;}s:73:"/home/bjarte/public_html/doctrine/models/ValidatorTest_FootballPlayer.php";a:4:{i:4;i:1;i:5;i:1;i:6;i:1;i:7;i:1;}s:67:"/home/bjarte/public_html/doctrine/tests/Query/MultiJoinTestCase.php";a:107:{i:37;i:1;i:38;i:1;i:39;i:1;i:40;i:1;i:44;i:1;i:46;i:1;i:49;i:1;i:50;i:1;i:52;i:1;i:53;i:1;i:55;i:1;i:56;i:1;i:57;i:1;i:59;i:1;i:62;i:1;i:63;i:1;i:64;i:1;i:65;i:1;i:66;i:1;i:68;i:1;i:70;i:1;i:72;i:1;i:73;i:1;i:76;i:1;i:78;i:1;i:79;i:1;i:80;i:1;i:81;i:1;i:83;i:1;i:85;i:1;i:86;i:1;i:87;i:1;i:90;i:1;i:92;i:1;i:94;i:1;i:96;i:1;i:98;i:1;i:100;i:1;i:101;i:1;i:102;i:1;i:103;i:1;i:104;i:1;i:105;i:1;i:106;i:1;i:107;i:1;i:108;i:1;i:110;i:1;i:111;i:1;i:112;i:1;i:113;i:1;i:114;i:1;i:116;i:1;i:118;i:1;i:119;i:1;i:120;i:1;i:121;i:1;i:125;i:1;i:126;i:1;i:127;i:1;i:128;i:1;i:129;i:1;i:130;i:1;i:131;i:1;i:134;i:1;i:136;i:1;i:137;i:1;i:138;i:1;i:139;i:1;i:140;i:1;i:141;i:1;i:142;i:1;i:143;i:1;i:145;i:1;i:146;i:1;i:149;i:1;i:151;i:1;i:153;i:1;i:155;i:1;i:156;i:1;i:157;i:1;i:158;i:1;i:159;i:1;i:160;i:1;i:161;i:1;i:162;i:1;i:163;i:1;i:164;i:1;i:166;i:1;i:167;i:1;i:168;i:1;i:169;i:1;i:170;i:1;i:172;i:1;i:173;i:1;i:174;i:1;i:175;i:1;i:176;i:1;i:178;i:1;i:179;i:1;i:180;i:1;i:181;i:1;i:182;i:1;i:183;i:1;i:184;i:1;i:188;i:1;i:190;i:1;i:191;i:1;}s:59:"/home/bjarte/public_html/doctrine/models/QueryTest_Rank.php";a:9:{i:9;i:1;i:10;i:1;i:11;i:1;i:12;i:1;i:13;i:1;i:14;i:1;i:15;i:1;i:18;i:1;i:19;i:1;}s:77:"/home/bjarte/public_html/doctrine/tests/Query/MysqlSubqueryHavingTestCase.php";a:25:{i:37;i:1;i:38;i:1;i:39;i:1;i:43;i:1;i:44;i:1;i:45;i:1;i:46;i:1;i:47;i:1;i:48;i:1;i:49;i:1;i:51;i:1;i:53;i:1;i:55;i:1;i:56;i:1;i:60;i:1;i:61;i:1;i:62;i:1;i:63;i:1;i:64;i:1;i:65;i:1;i:66;i:1;i:68;i:1;i:70;i:1;i:71;i:1;i:72;i:1;}s:56:"/home/bjarte/public_html/doctrine/lib/Doctrine/Event.php";a:84:{i:0;i:1;i:33;i:1;i:103;i:1;i:104;i:1;i:105;i:1;i:106;i:1;i:107;i:1;i:115;i:1;i:116;i:-2;i:125;i:-1;i:126;i:-1;i:127;i:-1;i:128;i:-1;i:129;i:-1;i:130;i:-1;i:131;i:-1;i:132;i:-1;i:133;i:-1;i:134;i:-1;i:135;i:-1;i:136;i:-1;i:137;i:-1;i:139;i:-1;i:140;i:-1;i:141;i:-1;i:142;i:-1;i:143;i:-1;i:144;i:-1;i:146;i:-1;i:147;i:-1;i:148;i:-1;i:149;i:-1;i:150;i:-1;i:151;i:-1;i:153;i:-1;i:154;i:-1;i:155;i:-1;i:156;i:-1;i:157;i:-1;i:158;i:-1;i:160;i:-1;i:161;i:-1;i:162;i:-1;i:163;i:-1;i:164;i:-1;i:165;i:-1;i:166;i:-1;i:167;i:-1;i:168;i:-1;i:169;i:-1;i:170;i:-1;i:171;i:-1;i:172;i:-1;i:173;i:-1;i:181;i:1;i:182;i:-2;i:192;i:1;i:193;i:1;i:194;i:-2;i:196;i:1;i:197;i:-2;i:207;i:1;i:209;i:1;i:210;i:-2;i:221;i:1;i:223;i:1;i:224;i:-2;i:233;i:1;i:234;i:1;i:243;i:1;i:244;i:-2;i:253;i:1;i:255;i:1;i:256;i:-2;i:266;i:-1;i:267;i:-2;i:276;i:-1;i:277;i:-2;i:286;i:1;i:287;i:-1;i:288;i:-2;i:289;i:1;i:290;i:-2;i:292;i:1;}s:69:"/home/bjarte/public_html/doctrine/tests/Connection/OracleTestCase.php";a:54:{i:35;i:1;i:37;i:1;i:38;i:1;i:40;i:1;i:42;i:1;i:43;i:1;i:45;i:1;i:47;i:1;i:48;i:1;i:50;i:1;i:52;i:1;i:53;i:1;i:55;i:1;i:57;i:1;i:58;i:1;i:60;i:1;i:62;i:1;i:63;i:1;i:65;i:1;i:67;i:1;i:68;i:1;i:70;i:1;i:72;i:1;i:73;i:1;i:75;i:1;i:77;i:1;i:78;i:1;i:80;i:1;i:82;i:1;i:83;i:1;i:85;i:1;i:87;i:1;i:88;i:1;i:90;i:1;i:92;i:1;i:93;i:1;i:95;i:1;i:97;i:1;i:98;i:1;i:100;i:1;i:102;i:1;i:103;i:1;i:105;i:1;i:107;i:1;i:108;i:1;i:110;i:1;i:112;i:1;i:113;i:1;i:115;i:1;i:117;i:1;i:118;i:1;i:120;i:1;i:122;i:1;i:123;i:1;}s:69:"/home/bjarte/public_html/doctrine/tests/Connection/SqliteTestCase.php";a:33:{i:35;i:1;i:37;i:1;i:38;i:1;i:40;i:1;i:42;i:1;i:43;i:1;i:45;i:1;i:47;i:1;i:48;i:1;i:50;i:1;i:52;i:1;i:53;i:1;i:55;i:1;i:57;i:1;i:58;i:1;i:60;i:1;i:62;i:1;i:63;i:1;i:65;i:1;i:67;i:1;i:68;i:1;i:70;i:1;i:72;i:1;i:73;i:1;i:75;i:1;i:77;i:1;i:78;i:1;i:80;i:1;i:82;i:1;i:83;i:1;i:85;i:1;i:87;i:1;i:88;i:1;}s:49:"/home/bjarte/public_html/doctrine/models/Role.php";a:4:{i:6;i:1;i:7;i:1;i:10;i:1;i:11;i:1;}s:60:"/home/bjarte/public_html/doctrine/models/Record_District.php";a:2:{i:4;i:1;i:5;i:1;}s:67:"/home/bjarte/public_html/doctrine/lib/Doctrine/Validator/Regexp.php";a:18:{i:34;i:1;i:44;i:1;i:45;i:-1;i:46;i:-2;i:47;i:1;i:48;i:-1;i:49;i:-1;i:50;i:-1;i:51;i:-2;i:52;i:-1;i:53;i:-1;i:54;i:-2;i:55;i:1;i:56;i:1;i:57;i:-2;i:60;i:1;i:61;i:-2;i:63;i:1;}s:72:"/home/bjarte/public_html/doctrine/tests/Query/AggregateValueTestCase.php";a:101:{i:37;i:1;i:40;i:1;i:42;i:1;i:43;i:1;i:44;i:1;i:45;i:1;i:47;i:1;i:48;i:1;i:49;i:1;i:50;i:1;i:51;i:1;i:52;i:1;i:54;i:1;i:55;i:1;i:59;i:1;i:62;i:1;i:63;i:-1;i:64;i:1;i:65;i:1;i:68;i:1;i:71;i:1;i:72;i:1;i:73;i:-2;i:75;i:1;i:76;i:1;i:80;i:1;i:82;i:1;i:84;i:1;i:85;i:1;i:87;i:1;i:89;i:1;i:91;i:1;i:92;i:1;i:96;i:1;i:98;i:1;i:100;i:1;i:102;i:1;i:104;i:1;i:105;i:1;i:107;i:1;i:108;i:1;i:109;i:1;i:113;i:1;i:115;i:1;i:117;i:1;i:119;i:1;i:121;i:1;i:122;i:1;i:124;i:1;i:125;i:1;i:126;i:1;i:130;i:1;i:132;i:1;i:134;i:1;i:136;i:1;i:138;i:1;i:139;i:1;i:140;i:1;i:141;i:1;i:142;i:1;i:146;i:1;i:148;i:1;i:150;i:1;i:151;i:1;i:153;i:1;i:154;i:1;i:158;i:1;i:160;i:1;i:162;i:1;i:163;i:1;i:164;i:1;i:165;i:1;i:168;i:1;i:170;i:1;i:172;i:1;i:174;i:1;i:176;i:1;i:177;i:1;i:178;i:1;i:179;i:1;i:182;i:1;i:183;i:1;i:185;i:1;i:186;i:1;i:189;i:1;i:190;i:1;i:192;i:1;i:193;i:1;i:196;i:1;i:197;i:1;i:199;i:1;i:200;i:1;i:203;i:1;i:204;i:1;i:206;i:1;i:207;i:1;i:210;i:1;i:211;i:1;i:212;i:1;i:214;i:1;i:215;i:1;}s:65:"/home/bjarte/public_html/doctrine/lib/Doctrine/Tree/Interface.php";a:2:{i:32;i:1;i:65;i:1;}s:50:"/home/bjarte/public_html/doctrine/lib/Doctrine.php";a:68:{i:0;i:1;i:379;i:-1;i:380;i:-2;i:392;i:-1;i:393;i:-1;i:394;i:-1;i:395;i:-1;i:396;i:-2;i:405;i:1;i:406;i:-1;i:407;i:-1;i:408;i:1;i:409;i:-2;i:418;i:-1;i:420;i:-1;i:421;i:-1;i:422;i:-1;i:423;i:-1;i:434;i:-1;i:435;i:-2;i:444;i:1;i:445;i:-2;i:454;i:-1;i:455;i:-2;i:469;i:-1;i:470;i:-1;i:480;i:1;i:481;i:1;i:482;i:-2;i:483;i:1;i:484;i:-1;i:485;i:-1;i:486;i:1;i:488;i:1;i:489;i:1;i:490;i:-2;i:492;i:1;i:494;i:1;i:495;i:-2;i:507;i:-1;i:508;i:-1;i:509;i:-1;i:510;i:-1;i:511;i:-1;i:512;i:-1;i:513;i:-1;i:514;i:-1;i:515;i:-1;i:516;i:-1;i:517;i:-1;i:518;i:-1;i:519;i:-1;i:520;i:-1;i:521;i:-1;i:522;i:-1;i:523;i:-1;i:524;i:-1;i:525;i:-1;i:526;i:-2;i:535;i:1;i:536;i:-2;i:545;i:1;i:546;i:-2;i:555;i:-1;i:556;i:-1;i:557;i:-2;i:559;i:-1;i:560;i:-2;}s:68:"/home/bjarte/public_html/doctrine/lib/Doctrine/Connection/Sqlite.php";a:32:{i:21;i:1;i:34;i:1;i:49;i:-1;i:50;i:1;i:51;i:1;i:52;i:1;i:53;i:1;i:54;i:1;i:55;i:1;i:56;i:1;i:57;i:1;i:58;i:1;i:59;i:1;i:60;i:1;i:61;i:1;i:62;i:1;i:63;i:1;i:64;i:1;i:65;i:1;i:66;i:1;i:67;i:1;i:76;i:1;i:77;i:1;i:86;i:1;i:88;i:1;i:89;i:1;i:90;i:1;i:91;i:1;i:92;i:1;i:101;i:1;i:102;i:-2;i:104;i:1;}s:50:"/home/bjarte/public_html/doctrine/models/Album.php";a:5:{i:4;i:1;i:5;i:1;i:7;i:1;i:8;i:1;i:9;i:1;}s:68:"/home/bjarte/public_html/doctrine/lib/Doctrine/Connection/Oracle.php";a:43:{i:21;i:1;i:33;i:1;i:42;i:-1;i:43;i:1;i:44;i:1;i:45;i:1;i:46;i:1;i:47;i:1;i:48;i:1;i:49;i:1;i:50;i:1;i:51;i:1;i:52;i:1;i:53;i:1;i:54;i:1;i:55;i:1;i:56;i:1;i:57;i:1;i:58;i:1;i:59;i:1;i:60;i:1;i:71;i:1;i:72;i:1;i:79;i:-1;i:80;i:-1;i:96;i:1;i:97;i:1;i:98;i:1;i:99;i:1;i:100;i:-1;i:101;i:-1;i:102;i:1;i:104;i:1;i:105;i:1;i:106;i:1;i:108;i:1;i:109;i:1;i:110;i:1;i:112;i:1;i:113;i:1;i:114;i:1;i:115;i:-2;i:117;i:1;}s:62:"/home/bjarte/public_html/doctrine/models/TestMovieUserVote.php";a:4:{i:5;i:1;i:6;i:1;i:7;i:1;i:8;i:1;}s:54:"/home/bjarte/public_html/doctrine/models/EnumTest2.php";a:3:{i:5;i:1;i:6;i:1;i:7;i:1;}s:67:"/home/bjarte/public_html/doctrine/lib/Doctrine/Validator/Driver.php";a:23:{i:0;i:1;i:34;i:1;i:47;i:-1;i:48;i:-1;i:49;i:-2;i:50;i:-1;i:51;i:-2;i:59;i:-1;i:60;i:-2;i:70;i:1;i:72;i:1;i:73;i:-2;i:82;i:-1;i:83;i:-1;i:84;i:-2;i:86;i:-1;i:87;i:-2;i:97;i:-1;i:99;i:-1;i:100;i:-2;i:108;i:-1;i:109;i:-2;i:111;i:1;}s:60:"/home/bjarte/public_html/doctrine/models/QueryTest_Entry.php";a:7:{i:9;i:1;i:10;i:1;i:11;i:1;i:12;i:1;i:13;i:1;i:20;i:1;i:21;i:1;}s:71:"/home/bjarte/public_html/doctrine/lib/Doctrine/Connection/Exception.php";a:10:{i:21;i:1;i:33;i:1;i:86;i:1;i:87;i:-2;i:96;i:-1;i:97;i:-2;i:110;i:-1;i:111;i:-1;i:112;i:-2;i:114;i:1;}s:66:"/home/bjarte/public_html/doctrine/lib/Doctrine/Relation/Parser.php";a:234:{i:33;i:1;i:53;i:1;i:54;i:1;i:62;i:-1;i:63;i:-2;i:71;i:1;i:72;i:-1;i:73;i:-2;i:75;i:1;i:76;i:-2;i:80;i:1;i:81;i:1;i:82;i:-2;i:84;i:1;i:85;i:-2;i:95;i:1;i:96;i:-1;i:97;i:-1;i:99;i:1;i:101;i:1;i:102;i:-1;i:103;i:-2;i:105;i:1;i:106;i:1;i:107;i:1;i:109;i:1;i:110;i:1;i:111;i:-2;i:113;i:1;i:115;i:1;i:117;i:1;i:118;i:1;i:119;i:1;i:120;i:1;i:121;i:1;i:122;i:1;i:124;i:1;i:125;i:-2;i:133;i:1;i:134;i:1;i:135;i:-2;i:137;i:1;i:138;i:1;i:142;i:1;i:143;i:1;i:144;i:1;i:146;i:1;i:147;i:1;i:149;i:1;i:150;i:1;i:151;i:1;i:152;i:1;i:153;i:1;i:154;i:1;i:155;i:1;i:156;i:1;i:157;i:1;i:159;i:1;i:160;i:1;i:161;i:1;i:162;i:1;i:163;i:1;i:164;i:1;i:165;i:1;i:166;i:1;i:167;i:1;i:168;i:1;i:170;i:1;i:172;i:1;i:174;i:1;i:176;i:1;i:177;i:1;i:178;i:1;i:181;i:1;i:183;i:1;i:185;i:1;i:186;i:1;i:187;i:-2;i:188;i:-1;i:189;i:1;i:190;i:1;i:192;i:1;i:193;i:-2;i:194;i:1;i:196;i:-2;i:205;i:1;i:206;i:1;i:207;i:1;i:209;i:1;i:210;i:-2;i:221;i:1;i:223;i:1;i:224;i:-1;i:226;i:-1;i:227;i:-1;i:228;i:-2;i:229;i:-1;i:230;i:1;i:233;i:1;i:234;i:-2;i:243;i:1;i:244;i:1;i:245;i:1;i:246;i:1;i:248;i:1;i:250;i:1;i:251;i:1;i:255;i:-1;i:256;i:-1;i:257;i:1;i:261;i:1;i:262;i:1;i:263;i:1;i:265;i:1;i:269;i:1;i:271;i:1;i:272;i:1;i:273;i:1;i:276;i:1;i:278;i:1;i:279;i:1;i:281;i:1;i:282;i:-2;i:294;i:1;i:295;i:-1;i:296;i:-1;i:297;i:-1;i:298;i:-1;i:299;i:-1;i:300;i:-1;i:301;i:1;i:302;i:1;i:305;i:1;i:306;i:-2;i:316;i:1;i:318;i:1;i:320;i:1;i:321;i:1;i:322;i:-2;i:324;i:1;i:325;i:1;i:327;i:1;i:328;i:1;i:329;i:-1;i:330;i:-1;i:331;i:-2;i:332;i:1;i:333;i:1;i:334;i:1;i:335;i:-2;i:336;i:-1;i:338;i:1;i:339;i:-1;i:340;i:-2;i:342;i:1;i:343;i:-2;i:352;i:1;i:353;i:1;i:354;i:1;i:356;i:1;i:357;i:1;i:359;i:1;i:360;i:1;i:364;i:1;i:365;i:1;i:366;i:1;i:369;i:1;i:370;i:1;i:372;i:1;i:373;i:1;i:374;i:1;i:375;i:1;i:376;i:1;i:378;i:1;i:379;i:1;i:382;i:1;i:383;i:1;i:385;i:1;i:386;i:1;i:387;i:-2;i:389;i:1;i:390;i:1;i:392;i:1;i:396;i:1;i:399;i:1;i:400;i:1;i:401;i:1;i:402;i:1;i:404;i:1;i:405;i:1;i:406;i:1;i:407;i:1;i:408;i:1;i:410;i:1;i:411;i:-2;i:412;i:1;i:413;i:1;i:415;i:1;i:416;i:1;i:417;i:1;i:418;i:1;i:420;i:1;i:421;i:1;i:422;i:1;i:423;i:1;i:424;i:1;i:425;i:1;i:426;i:1;i:427;i:-2;i:428;i:-1;i:429;i:-1;i:432;i:-1;i:433;i:-1;i:434;i:-1;i:435;i:-1;i:437;i:-1;i:438;i:-1;i:439;i:-1;i:441;i:-1;i:442;i:-1;i:443;i:-1;i:444;i:-1;i:445;i:-1;i:447;i:-1;i:449;i:-1;i:450;i:-1;i:451;i:-1;i:452;i:-1;i:453;i:-1;i:454;i:-1;i:456;i:-1;i:459;i:1;i:460;i:-2;i:462;i:1;}s:52:"/home/bjarte/public_html/doctrine/models/Address.php";a:6:{i:6;i:1;i:7;i:1;i:8;i:1;i:9;i:1;i:11;i:1;i:12;i:1;}s:71:"/home/bjarte/public_html/doctrine/lib/Doctrine/Transaction/Firebird.php";a:51:{i:21;i:1;i:33;i:1;i:44;i:1;i:46;i:1;i:47;i:-2;i:57;i:1;i:59;i:1;i:60;i:-2;i:70;i:1;i:72;i:1;i:73;i:-2;i:93;i:1;i:94;i:1;i:95;i:1;i:96;i:1;i:97;i:1;i:98;i:1;i:99;i:1;i:100;i:1;i:101;i:1;i:102;i:1;i:103;i:1;i:104;i:1;i:105;i:1;i:106;i:1;i:107;i:1;i:109;i:1;i:111;i:1;i:112;i:1;i:113;i:1;i:114;i:1;i:115;i:1;i:116;i:1;i:117;i:1;i:118;i:1;i:119;i:1;i:120;i:1;i:122;i:1;i:123;i:1;i:124;i:1;i:125;i:1;i:126;i:1;i:127;i:1;i:128;i:1;i:129;i:1;i:130;i:1;i:131;i:1;i:133;i:1;i:135;i:1;i:136;i:1;i:138;i:1;}s:66:"/home/bjarte/public_html/doctrine/lib/Doctrine/Export/Firebird.php";a:194:{i:21;i:1;i:35;i:1;i:45;i:1;i:47;i:1;i:48;i:-2;i:57;i:1;i:59;i:1;i:60;i:-2;i:71;i:1;i:72;i:-1;i:73;i:-1;i:74;i:-1;i:76;i:-1;i:77;i:-1;i:78;i:-1;i:79;i:-1;i:80;i:1;i:83;i:1;i:84;i:1;i:86;i:1;i:87;i:1;i:89;i:1;i:93;i:1;i:94;i:1;i:95;i:1;i:96;i:1;i:100;i:1;i:101;i:-2;i:111;i:-1;i:114;i:-1;i:115;i:-1;i:117;i:-1;i:118;i:-2;i:151;i:1;i:154;i:1;i:155;i:1;i:158;i:1;i:159;i:1;i:160;i:1;i:162;i:1;i:163;i:1;i:166;i:1;i:167;i:-2;i:168;i:1;i:169;i:1;i:178;i:-1;i:180;i:-1;i:181;i:-1;i:182;i:-1;i:183;i:-1;i:184;i:-1;i:188;i:-1;i:189;i:-1;i:190;i:-1;i:191;i:-1;i:192;i:-1;i:193;i:-1;i:194;i:-1;i:195;i:-1;i:196;i:-1;i:197;i:-1;i:198;i:-2;i:208;i:-1;i:209;i:-1;i:213;i:-1;i:214;i:-2;i:305;i:-1;i:307;i:-1;i:308;i:-1;i:309;i:-1;i:310;i:-1;i:311;i:-1;i:312;i:-1;i:313;i:-1;i:314;i:-1;i:315;i:-1;i:316;i:-1;i:317;i:-1;i:318;i:-1;i:319;i:-1;i:320;i:-1;i:321;i:-1;i:322;i:-2;i:323;i:-1;i:324;i:-1;i:325;i:-1;i:326;i:-1;i:327;i:-1;i:328;i:-1;i:329;i:-1;i:330;i:-1;i:331;i:-1;i:333;i:-1;i:334;i:-1;i:335;i:-1;i:336;i:-1;i:337;i:-1;i:338;i:-1;i:339;i:-1;i:340;i:-1;i:341;i:-1;i:343;i:-1;i:344;i:-1;i:345;i:-1;i:346;i:-1;i:347;i:-1;i:348;i:-1;i:349;i:-1;i:350;i:-1;i:351;i:-1;i:353;i:-1;i:355;i:-1;i:356;i:-1;i:357;i:-1;i:358;i:-1;i:359;i:-1;i:360;i:-1;i:361;i:-1;i:362;i:-1;i:363;i:-1;i:364;i:-1;i:366;i:-1;i:367;i:-1;i:368;i:-2;i:370;i:-1;i:371;i:-1;i:372;i:-1;i:373;i:-1;i:374;i:-2;i:408;i:-1;i:410;i:-1;i:411;i:-1;i:412;i:-1;i:413;i:-1;i:414;i:-1;i:415;i:-1;i:416;i:-1;i:417;i:-1;i:418;i:-1;i:419;i:-1;i:420;i:-1;i:421;i:-1;i:422;i:-1;i:423;i:-1;i:424;i:-1;i:425;i:-1;i:426;i:-1;i:427;i:-1;i:428;i:-1;i:429;i:-1;i:430;i:-1;i:432;i:-1;i:433;i:-2;i:457;i:1;i:459;i:1;i:460;i:-1;i:461;i:-1;i:462;i:1;i:463;i:1;i:464;i:1;i:465;i:-1;i:466;i:-1;i:467;i:1;i:468;i:1;i:469;i:-1;i:470;i:-1;i:471;i:-1;i:472;i:-1;i:474;i:1;i:475;i:1;i:476;i:1;i:477;i:1;i:478;i:1;i:479;i:1;i:481;i:1;i:482;i:-2;i:492;i:-1;i:493;i:-2;i:509;i:1;i:511;i:1;i:514;i:1;i:516;i:1;i:517;i:-2;i:519;i:-2;i:520;i:-2;i:521;i:-2;i:524;i:-2;i:525;i:-2;i:534;i:-1;i:535;i:-1;i:536;i:-1;i:538;i:-1;i:539;i:-2;i:541;i:1;}s:70:"/home/bjarte/public_html/doctrine/tests/Relation/OneToManyTestCase.php";a:47:{i:36;i:1;i:39;i:1;i:41;i:1;i:42;i:1;i:45;i:1;i:47;i:1;i:49;i:1;i:51;i:1;i:53;i:1;i:54;i:1;i:58;i:1;i:60;i:1;i:62;i:1;i:63;i:1;i:67;i:1;i:69;i:1;i:71;i:1;i:72;i:1;i:75;i:1;i:76;i:1;i:78;i:1;i:79;i:1;i:81;i:1;i:82;i:1;i:84;i:1;i:85;i:1;i:88;i:1;i:89;i:1;i:90;i:1;i:92;i:1;i:93;i:1;i:94;i:1;i:95;i:1;i:96;i:1;i:100;i:1;i:101;i:1;i:102;i:1;i:103;i:1;i:105;i:1;i:106;i:1;i:107;i:1;i:108;i:1;i:110;i:1;i:112;i:1;i:114;i:1;i:116;i:1;i:117;i:1;}s:54:"/home/bjarte/public_html/doctrine/models/EnumTest3.php";a:2:{i:5;i:1;i:6;i:1;}s:56:"/home/bjarte/public_html/doctrine/tests/ViewTestCase.php";a:26:{i:38;i:1;i:39;i:1;i:41;i:1;i:43;i:1;i:45;i:1;i:46;i:1;i:47;i:1;i:49;i:1;i:52;i:1;i:53;i:1;i:54;i:-2;i:56;i:1;i:58;i:1;i:59;i:1;i:60;i:1;i:61;i:1;i:62;i:1;i:63;i:1;i:64;i:1;i:66;i:1;i:68;i:1;i:69;i:1;i:70;i:-2;i:72;i:1;i:73;i:1;i:77;i:1;}s:66:"/home/bjarte/public_html/doctrine/lib/Doctrine/Validator/Range.php";a:10:{i:34;i:1;i:43;i:1;i:44;i:1;i:45;i:-2;i:46;i:-1;i:47;i:-1;i:48;i:-2;i:49;i:-1;i:50;i:-2;i:52;i:1;}s:69:"/home/bjarte/public_html/doctrine/lib/Doctrine/Validator/Notblank.php";a:4:{i:33;i:1;i:44;i:1;i:45;i:-2;i:47;i:1;}s:59:"/home/bjarte/public_html/doctrine/models/QueryTest_Item.php";a:3:{i:6;i:1;i:7;i:1;i:8;i:1;}s:64:"/home/bjarte/public_html/doctrine/tests/Query/SelectTestCase.php";a:109:{i:37;i:1;i:38;i:1;i:39;i:1;i:41;i:1;i:43;i:1;i:44;i:1;i:45;i:1;i:49;i:1;i:51;i:1;i:53;i:1;i:54;i:1;i:58;i:1;i:60;i:1;i:62;i:1;i:63;i:1;i:67;i:1;i:69;i:1;i:71;i:1;i:72;i:1;i:76;i:1;i:78;i:1;i:80;i:1;i:81;i:1;i:85;i:1;i:87;i:1;i:89;i:1;i:90;i:1;i:93;i:1;i:95;i:1;i:97;i:1;i:98;i:1;i:101;i:1;i:104;i:1;i:106;i:-1;i:107;i:1;i:108;i:1;i:110;i:1;i:113;i:1;i:116;i:1;i:118;i:1;i:119;i:-1;i:120;i:1;i:121;i:1;i:124;i:1;i:127;i:1;i:129;i:1;i:131;i:1;i:133;i:1;i:135;i:1;i:136;i:1;i:137;i:1;i:138;i:1;i:139;i:1;i:143;i:1;i:145;i:1;i:147;i:1;i:148;i:1;i:151;i:1;i:153;i:1;i:155;i:1;i:156;i:1;i:159;i:1;i:161;i:1;i:163;i:1;i:164;i:1;i:167;i:1;i:169;i:1;i:171;i:1;i:172;i:1;i:176;i:1;i:178;i:1;i:180;i:1;i:182;i:1;i:183;i:1;i:184;i:1;i:185;i:1;i:186;i:1;i:187;i:1;i:190;i:1;i:192;i:1;i:194;i:1;i:195;i:1;i:196;i:1;i:197;i:1;i:198;i:1;i:199;i:1;i:201;i:1;i:202;i:1;i:203;i:1;i:204;i:1;i:205;i:1;i:206;i:1;i:209;i:1;i:211;i:1;i:213;i:1;i:215;i:1;i:217;i:1;i:219;i:1;i:221;i:1;i:222;i:1;i:223;i:1;i:224;i:1;i:225;i:1;i:227;i:1;i:228;i:1;i:229;i:1;i:230;i:1;i:231;i:1;i:232;i:1;}s:58:"/home/bjarte/public_html/doctrine/tests/RecordTestCase.php";a:543:{i:38;i:1;i:39;i:1;i:40;i:1;i:41;i:1;i:42;i:1;i:43;i:1;i:44;i:1;i:48;i:1;i:49;i:1;i:51;i:1;i:53;i:1;i:55;i:1;i:56;i:1;i:57;i:1;i:58;i:1;i:59;i:1;i:60;i:1;i:61;i:1;i:63;i:1;i:64;i:1;i:66;i:1;i:68;i:1;i:69;i:1;i:70;i:1;i:71;i:1;i:72;i:1;i:73;i:1;i:76;i:1;i:77;i:1;i:78;i:1;i:79;i:1;i:80;i:1;i:82;i:1;i:83;i:1;i:84;i:1;i:86;i:1;i:87;i:1;i:88;i:1;i:91;i:1;i:92;i:1;i:95;i:1;i:96;i:1;i:98;i:1;i:99;i:1;i:101;i:1;i:102;i:1;i:103;i:1;i:105;i:1;i:109;i:1;i:110;i:1;i:111;i:1;i:113;i:1;i:115;i:1;i:116;i:1;i:117;i:1;i:118;i:1;i:122;i:1;i:124;i:1;i:126;i:1;i:128;i:1;i:129;i:-1;i:130;i:1;i:131;i:1;i:132;i:1;i:135;i:1;i:139;i:1;i:140;i:1;i:142;i:1;i:143;i:1;i:144;i:1;i:145;i:1;i:146;i:1;i:148;i:1;i:149;i:1;i:150;i:1;i:152;i:1;i:154;i:1;i:155;i:1;i:156;i:1;i:157;i:1;i:158;i:1;i:159;i:1;i:164;i:1;i:166;i:1;i:167;i:1;i:168;i:1;i:169;i:1;i:170;i:1;i:171;i:1;i:176;i:1;i:178;i:1;i:180;i:1;i:181;i:1;i:184;i:1;i:185;i:1;i:186;i:1;i:188;i:1;i:190;i:1;i:192;i:1;i:194;i:1;i:195;i:1;i:196;i:1;i:197;i:1;i:198;i:1;i:200;i:1;i:202;i:1;i:204;i:1;i:205;i:1;i:206;i:1;i:207;i:1;i:208;i:1;i:209;i:1;i:210;i:1;i:212;i:1;i:214;i:1;i:215;i:1;i:216;i:1;i:217;i:1;i:218;i:1;i:219;i:1;i:223;i:1;i:224;i:1;i:225;i:1;i:227;i:1;i:228;i:1;i:232;i:1;i:233;i:1;i:234;i:1;i:236;i:1;i:238;i:1;i:240;i:1;i:242;i:1;i:243;i:1;i:245;i:1;i:249;i:1;i:250;i:1;i:251;i:1;i:253;i:1;i:254;i:1;i:255;i:1;i:259;i:1;i:260;i:1;i:261;i:1;i:262;i:1;i:263;i:1;i:264;i:1;i:265;i:1;i:268;i:1;i:269;i:1;i:270;i:1;i:271;i:1;i:272;i:1;i:274;i:1;i:275;i:1;i:276;i:1;i:277;i:1;i:278;i:1;i:279;i:1;i:281;i:1;i:282;i:1;i:283;i:1;i:284;i:1;i:285;i:1;i:287;i:1;i:288;i:1;i:289;i:1;i:290;i:1;i:292;i:1;i:294;i:1;i:295;i:1;i:296;i:1;i:297;i:1;i:298;i:1;i:299;i:1;i:301;i:1;i:302;i:1;i:303;i:1;i:304;i:1;i:305;i:1;i:306;i:1;i:308;i:1;i:309;i:1;i:310;i:1;i:311;i:1;i:313;i:1;i:314;i:1;i:315;i:1;i:316;i:1;i:317;i:1;i:319;i:1;i:320;i:1;i:321;i:1;i:322;i:1;i:324;i:1;i:325;i:1;i:326;i:1;i:327;i:1;i:328;i:1;i:330;i:1;i:331;i:1;i:332;i:1;i:337;i:1;i:339;i:1;i:340;i:1;i:342;i:1;i:344;i:1;i:345;i:1;i:346;i:1;i:348;i:1;i:349;i:1;i:350;i:1;i:351;i:1;i:354;i:1;i:355;i:1;i:357;i:1;i:358;i:1;i:359;i:1;i:361;i:1;i:362;i:1;i:363;i:1;i:364;i:1;i:366;i:1;i:368;i:1;i:370;i:1;i:371;i:1;i:372;i:1;i:373;i:1;i:375;i:1;i:380;i:1;i:381;i:1;i:382;i:1;i:383;i:1;i:384;i:1;i:385;i:1;i:386;i:1;i:387;i:1;i:388;i:1;i:389;i:1;i:390;i:1;i:391;i:1;i:393;i:1;i:397;i:1;i:399;i:1;i:400;i:1;i:401;i:1;i:402;i:1;i:404;i:1;i:405;i:1;i:406;i:1;i:407;i:1;i:408;i:1;i:409;i:1;i:413;i:1;i:415;i:1;i:416;i:1;i:417;i:1;i:418;i:1;i:419;i:1;i:423;i:1;i:424;i:1;i:425;i:1;i:427;i:1;i:428;i:1;i:430;i:1;i:432;i:1;i:433;i:1;i:434;i:1;i:435;i:1;i:439;i:1;i:440;i:1;i:441;i:1;i:443;i:1;i:444;i:1;i:446;i:1;i:448;i:1;i:449;i:1;i:451;i:1;i:452;i:1;i:455;i:1;i:456;i:1;i:457;i:1;i:458;i:1;i:459;i:1;i:461;i:1;i:465;i:1;i:466;i:1;i:467;i:1;i:468;i:1;i:471;i:1;i:472;i:1;i:473;i:1;i:475;i:1;i:476;i:1;i:477;i:1;i:478;i:1;i:480;i:1;i:481;i:1;i:482;i:1;i:485;i:1;i:486;i:1;i:487;i:1;i:488;i:1;i:489;i:1;i:491;i:1;i:492;i:1;i:493;i:1;i:494;i:1;i:495;i:1;i:496;i:1;i:498;i:1;i:499;i:1;i:500;i:1;i:501;i:1;i:503;i:1;i:505;i:1;i:506;i:1;i:509;i:1;i:510;i:1;i:511;i:1;i:513;i:1;i:514;i:1;i:515;i:1;i:517;i:1;i:518;i:1;i:522;i:1;i:523;i:1;i:524;i:1;i:525;i:1;i:528;i:1;i:529;i:1;i:530;i:1;i:531;i:1;i:533;i:1;i:534;i:1;i:535;i:1;i:536;i:1;i:537;i:1;i:538;i:1;i:542;i:1;i:543;i:1;i:544;i:1;i:546;i:1;i:548;i:1;i:549;i:1;i:551;i:1;i:552;i:1;i:553;i:1;i:557;i:1;i:558;i:1;i:561;i:1;i:564;i:1;i:565;i:1;i:566;i:1;i:570;i:1;i:571;i:1;i:573;i:1;i:574;i:1;i:576;i:1;i:577;i:1;i:578;i:1;i:579;i:1;i:580;i:1;i:581;i:1;i:582;i:1;i:583;i:1;i:587;i:1;i:588;i:1;i:590;i:1;i:591;i:1;i:593;i:1;i:595;i:1;i:596;i:1;i:598;i:1;i:599;i:1;i:601;i:1;i:602;i:1;i:603;i:1;i:604;i:1;i:608;i:1;i:610;i:1;i:611;i:1;i:613;i:1;i:615;i:1;i:616;i:1;i:617;i:1;i:619;i:1;i:621;i:1;i:623;i:1;i:624;i:1;i:626;i:1;i:627;i:1;i:631;i:1;i:633;i:1;i:634;i:1;i:635;i:1;i:637;i:1;i:640;i:1;i:642;i:1;i:643;i:1;i:644;i:1;i:646;i:1;i:647;i:1;i:649;i:1;i:650;i:1;i:651;i:1;i:652;i:1;i:656;i:1;i:658;i:1;i:659;i:1;i:660;i:1;i:661;i:1;i:665;i:1;i:666;i:1;i:667;i:1;i:669;i:1;i:670;i:1;i:671;i:1;i:672;i:1;i:675;i:1;i:676;i:1;i:677;i:1;i:678;i:1;i:679;i:1;i:681;i:1;i:682;i:1;i:683;i:1;i:685;i:1;i:691;i:1;i:692;i:1;i:693;i:1;i:695;i:1;i:697;i:1;i:698;i:1;i:699;i:1;i:701;i:1;i:703;i:1;i:704;i:1;i:705;i:1;i:706;i:1;i:707;i:1;i:711;i:1;i:712;i:1;i:713;i:1;i:715;i:1;i:716;i:1;i:717;i:1;i:718;i:1;i:720;i:1;i:721;i:1;i:722;i:1;i:724;i:1;i:727;i:1;i:731;i:1;i:732;i:1;i:734;i:1;i:735;i:1;i:740;i:1;i:742;i:1;i:744;i:1;i:750;i:1;i:751;i:1;i:752;i:1;i:753;i:1;i:755;i:1;i:757;i:1;i:758;i:1;i:764;i:1;i:765;i:1;i:766;i:1;i:768;i:1;i:769;i:1;i:771;i:1;i:772;i:1;i:777;i:1;i:778;i:1;i:779;i:1;i:784;i:1;i:785;i:1;i:786;i:1;i:792;i:1;i:793;i:1;i:795;i:1;i:796;i:1;i:798;i:1;i:799;i:1;i:800;i:1;i:803;i:1;i:805;i:1;i:806;i:1;i:807;i:-1;i:808;i:-1;i:809;i:1;i:813;i:1;i:814;i:1;i:815;i:1;i:816;i:1;i:820;i:1;i:821;i:1;i:822;i:1;i:823;i:1;i:824;i:1;i:829;i:1;i:830;i:1;i:832;i:1;i:833;i:1;i:835;i:1;i:836;i:1;i:837;i:1;i:838;i:1;i:839;i:1;i:840;i:1;i:841;i:1;i:843;i:1;i:844;i:1;i:846;i:1;i:848;i:1;i:849;i:1;i:850;i:1;i:852;i:1;i:857;i:1;i:859;i:1;i:860;i:1;i:864;i:1;i:866;i:1;i:867;i:1;i:868;i:1;i:870;i:1;i:871;i:1;i:874;i:1;i:875;i:1;i:876;i:1;i:880;i:1;i:881;i:1;i:882;i:1;i:883;i:1;i:884;i:1;i:885;i:1;i:886;i:1;i:887;i:1;i:888;i:1;i:889;i:1;i:890;i:1;i:891;i:1;}s:60:"/home/bjarte/public_html/doctrine/models/ColumnAliasTest.php";a:4:{i:6;i:1;i:7;i:1;i:8;i:1;i:11;i:1;}s:49:"/home/bjarte/public_html/doctrine/models/User.php";a:20:{i:11;i:1;i:12;i:1;i:13;i:1;i:14;i:1;i:15;i:1;i:16;i:1;i:17;i:1;i:19;i:1;i:24;i:1;i:25;i:1;i:26;i:1;i:27;i:1;i:30;i:1;i:31;i:1;i:32;i:1;i:33;i:1;i:36;i:1;i:37;i:1;i:38;i:1;i:39;i:1;}s:67:"/home/bjarte/public_html/doctrine/lib/Doctrine/Connection/Mssql.php";a:85:{i:21;i:1;i:34;i:1;i:49;i:-1;i:50;i:1;i:51;i:1;i:52;i:1;i:53;i:1;i:54;i:1;i:55;i:1;i:56;i:1;i:57;i:1;i:58;i:1;i:59;i:1;i:60;i:1;i:61;i:1;i:62;i:1;i:63;i:1;i:64;i:1;i:67;i:1;i:68;i:1;i:82;i:1;i:83;i:1;i:84;i:-2;i:85;i:-1;i:86;i:-2;i:99;i:-1;i:100;i:-1;i:102;i:-1;i:103;i:-1;i:104;i:-1;i:105;i:-2;i:107;i:-1;i:108;i:-1;i:109;i:-1;i:110;i:-1;i:111;i:-1;i:112;i:-1;i:114;i:-1;i:116;i:-1;i:117;i:-1;i:118;i:-1;i:119;i:-1;i:120;i:-1;i:121;i:-1;i:122;i:-1;i:123;i:-1;i:124;i:-1;i:126;i:-1;i:128;i:-2;i:130;i:-1;i:131;i:-2;i:140;i:1;i:141;i:-1;i:142;i:-1;i:143;i:1;i:144;i:1;i:147;i:1;i:148;i:1;i:149;i:1;i:151;i:-1;i:152;i:-1;i:153;i:-1;i:154;i:-1;i:155;i:-1;i:156;i:-1;i:157;i:-1;i:159;i:1;i:160;i:1;i:161;i:1;i:162;i:1;i:163;i:1;i:164;i:1;i:166;i:1;i:167;i:1;i:168;i:-2;i:177;i:-1;i:179;i:-1;i:180;i:-1;i:181;i:-2;i:182;i:-2;i:183;i:-2;i:185;i:-2;i:187;i:-1;i:188;i:-2;i:190;i:1;}s:66:"/home/bjarte/public_html/doctrine/tests/Sequence/MysqlTestCase.php";a:13:{i:37;i:1;i:39;i:1;i:40;i:1;i:43;i:1;i:45;i:1;i:47;i:1;i:48;i:1;i:49;i:1;i:50;i:1;i:53;i:1;i:55;i:1;i:57;i:1;i:58;i:1;}s:65:"/home/bjarte/public_html/doctrine/lib/Doctrine/Sequence/Pgsql.php";a:22:{i:21;i:1;i:33;i:1;i:45;i:1;i:47;i:1;i:49;i:1;i:50;i:1;i:51;i:-2;i:54;i:-2;i:55;i:-2;i:56;i:-2;i:58;i:-2;i:59;i:-2;i:61;i:1;i:62;i:-2;i:75;i:1;i:76;i:1;i:78;i:1;i:79;i:-2;i:89;i:1;i:90;i:1;i:91;i:-2;i:93;i:1;}s:64:"/home/bjarte/public_html/doctrine/lib/Doctrine/Hook/WordLike.php";a:16:{i:21;i:1;i:33;i:1;i:49;i:1;i:50;i:1;i:52;i:1;i:53;i:1;i:55;i:1;i:56;i:1;i:58;i:1;i:59;i:1;i:60;i:1;i:61;i:1;i:62;i:1;i:64;i:1;i:65;i:-2;i:67;i:1;}s:57:"/home/bjarte/public_html/doctrine/tests/QueryTestCase.php";a:9:{i:37;i:1;i:39;i:1;i:41;i:1;i:44;i:1;i:45;i:1;i:52;i:1;i:53;i:1;i:54;i:1;i:55;i:1;}s:67:"/home/bjarte/public_html/doctrine/lib/Doctrine/Schema/Exception.php";a:3:{i:21;i:1;i:39;i:1;i:41;i:1;}s:58:"/home/bjarte/public_html/doctrine/tests/RawSqlTestCase.php";a:120:{i:39;i:1;i:40;i:1;i:41;i:1;i:43;i:1;i:46;i:1;i:47;i:1;i:49;i:1;i:50;i:1;i:51;i:1;i:52;i:1;i:57;i:1;i:58;i:1;i:59;i:1;i:61;i:1;i:63;i:1;i:65;i:1;i:67;i:1;i:68;i:1;i:71;i:1;i:72;i:1;i:76;i:1;i:77;i:1;i:79;i:1;i:80;i:1;i:82;i:1;i:84;i:1;i:86;i:1;i:87;i:1;i:88;i:1;i:91;i:1;i:94;i:1;i:95;i:1;i:97;i:1;i:99;i:1;i:101;i:1;i:103;i:1;i:104;i:1;i:105;i:1;i:109;i:1;i:112;i:1;i:114;i:1;i:116;i:1;i:118;i:1;i:119;i:1;i:121;i:1;i:123;i:1;i:124;i:1;i:126;i:1;i:127;i:1;i:128;i:1;i:131;i:1;i:132;i:1;i:134;i:1;i:135;i:1;i:137;i:1;i:139;i:1;i:140;i:1;i:142;i:1;i:144;i:1;i:145;i:1;i:147;i:1;i:148;i:1;i:149;i:1;i:154;i:1;i:156;i:1;i:158;i:1;i:160;i:1;i:161;i:1;i:162;i:1;i:163;i:1;i:164;i:1;i:167;i:1;i:168;i:1;i:169;i:1;i:171;i:1;i:173;i:1;i:174;i:1;i:175;i:1;i:176;i:1;i:177;i:1;i:183;i:1;i:185;i:1;i:186;i:1;i:187;i:1;i:189;i:1;i:190;i:1;i:191;i:1;i:192;i:1;i:193;i:1;i:199;i:1;i:201;i:1;i:202;i:1;i:204;i:1;i:207;i:1;i:209;i:1;i:210;i:1;i:211;i:1;i:212;i:1;i:214;i:1;i:218;i:1;i:220;i:1;i:222;i:1;i:223;i:1;i:224;i:1;i:228;i:1;i:230;i:1;i:231;i:1;i:232;i:1;i:233;i:1;i:234;i:1;i:236;i:1;i:237;i:1;i:241;i:1;i:243;i:1;i:244;i:1;i:245;i:1;i:246;i:1;i:247;i:1;i:249;i:1;i:250;i:1;}s:47:"/home/bjarte/public_html/doctrine/tests/run.php";a:76:{i:0;i:1;i:6;i:-1;i:7;i:-1;i:8;i:-1;i:9;i:-1;i:10;i:-1;i:11;i:-1;i:12;i:-1;i:13;i:-1;i:14;i:-1;i:15;i:-1;i:16;i:-1;i:17;i:-1;i:18;i:-1;i:20;i:-1;i:21;i:-1;i:22;i:-2;i:25;i:1;i:26;i:1;i:27;i:-2;i:29;i:-1;i:30;i:-1;i:32;i:-1;i:34;i:-1;i:35;i:-1;i:36;i:-2;i:38;i:-1;i:40;i:-1;i:42;i:-1;i:43;i:-1;i:44;i:-1;i:45;i:-1;i:50;i:-1;i:51;i:-1;i:52;i:-1;i:54;i:-1;i:55;i:-1;i:56;i:-1;i:58;i:-1;i:59;i:-1;i:60;i:-1;i:62;i:-1;i:63;i:-2;i:340;i:1;i:341;i:1;i:342;i:1;i:344;i:1;i:345;i:1;i:346;i:1;i:347;i:1;i:348;i:1;i:349;i:1;i:350;i:1;i:351;i:1;i:352;i:1;i:361;i:-1;i:369;i:-1;i:371;i:-1;i:376;i:-1;i:377;i:-1;i:378;i:-1;i:379;i:-1;i:380;i:-1;i:381;i:-1;i:382;i:-1;i:383;i:-1;i:384;i:-1;i:385;i:-1;i:386;i:-1;i:387;i:-1;i:388;i:-1;i:389;i:-1;i:390;i:-1;i:439;i:1;i:440;i:1;i:441;i:1;}s:60:"/home/bjarte/public_html/doctrine/models/EntityReference.php";a:3:{i:6;i:1;i:7;i:1;i:9;i:1;}s:62:"/home/bjarte/public_html/doctrine/lib/Doctrine/Query/Where.php";a:91:{i:21;i:1;i:33;i:1;i:37;i:1;i:38;i:1;i:39;i:1;i:41;i:1;i:42;i:1;i:43;i:1;i:44;i:1;i:45;i:1;i:46;i:-2;i:47;i:1;i:49;i:1;i:50;i:1;i:51;i:1;i:53;i:1;i:54;i:1;i:55;i:1;i:56;i:1;i:57;i:1;i:58;i:1;i:60;i:1;i:62;i:1;i:64;i:1;i:65;i:1;i:67;i:1;i:68;i:1;i:70;i:1;i:71;i:1;i:72;i:1;i:73;i:1;i:75;i:1;i:76;i:1;i:78;i:1;i:79;i:1;i:81;i:1;i:82;i:1;i:83;i:1;i:85;i:1;i:86;i:1;i:88;i:1;i:90;i:1;i:91;i:-2;i:94;i:-1;i:98;i:1;i:100;i:1;i:102;i:1;i:103;i:1;i:106;i:1;i:107;i:1;i:109;i:1;i:110;i:-1;i:111;i:-1;i:113;i:1;i:115;i:1;i:117;i:1;i:119;i:1;i:120;i:1;i:121;i:1;i:122;i:1;i:124;i:1;i:125;i:1;i:126;i:1;i:127;i:1;i:129;i:1;i:130;i:1;i:132;i:1;i:134;i:1;i:135;i:1;i:136;i:1;i:137;i:1;i:139;i:1;i:140;i:1;i:141;i:1;i:143;i:1;i:144;i:1;i:146;i:1;i:147;i:1;i:148;i:1;i:149;i:1;i:152;i:1;i:153;i:-2;i:163;i:1;i:165;i:1;i:167;i:1;i:168;i:-1;i:169;i:-2;i:171;i:1;i:173;i:1;i:174;i:-2;i:176;i:1;}s:64:"/home/bjarte/public_html/doctrine/tests/Import/PgsqlTestCase.php";a:36:{i:37;i:1;i:39;i:1;i:45;i:1;i:46;i:1;i:49;i:1;i:51;i:1;i:73;i:1;i:74;i:1;i:77;i:1;i:79;i:1;i:90;i:1;i:91;i:1;i:94;i:1;i:109;i:1;i:110;i:1;i:111;i:1;i:114;i:1;i:116;i:1;i:117;i:1;i:118;i:1;i:121;i:1;i:123;i:1;i:124;i:1;i:125;i:1;i:128;i:1;i:130;i:1;i:131;i:1;i:132;i:1;i:135;i:1;i:148;i:1;i:149;i:1;i:150;i:1;i:153;i:1;i:166;i:1;i:167;i:1;i:168;i:1;}s:57:"/home/bjarte/public_html/doctrine/models/RelationTest.php";a:6:{i:6;i:1;i:7;i:1;i:8;i:1;i:15;i:1;i:17;i:1;i:18;i:1;}s:56:"/home/bjarte/public_html/doctrine/models/PolicyAsset.php";a:7:{i:6;i:1;i:7;i:1;i:8;i:1;i:12;i:1;i:13;i:1;i:14;i:1;i:15;i:1;}s:63:"/home/bjarte/public_html/doctrine/lib/Doctrine/Query/Offset.php";a:4:{i:33;i:1;i:37;i:1;i:38;i:-2;i:40;i:1;}s:66:"/home/bjarte/public_html/doctrine/tests/Query/SubqueryTestCase.php";a:50:{i:39;i:1;i:40;i:1;i:42;i:1;i:43;i:1;i:45;i:1;i:47;i:1;i:48;i:1;i:49;i:1;i:53;i:1;i:54;i:1;i:56;i:1;i:57;i:1;i:62;i:1;i:64;i:1;i:66;i:1;i:68;i:1;i:70;i:1;i:72;i:1;i:74;i:1;i:75;i:1;i:76;i:1;i:81;i:1;i:83;i:1;i:85;i:1;i:87;i:1;i:91;i:1;i:92;i:1;i:93;i:1;i:94;i:1;i:95;i:1;i:99;i:1;i:101;i:1;i:103;i:1;i:104;i:1;i:105;i:-2;i:108;i:1;i:109;i:1;i:113;i:1;i:115;i:1;i:116;i:1;i:117;i:1;i:118;i:1;i:119;i:1;i:120;i:1;i:121;i:1;i:124;i:1;i:125;i:1;i:126;i:1;i:127;i:-2;i:129;i:1;}s:64:"/home/bjarte/public_html/doctrine/lib/Doctrine/Schema/Column.php";a:15:{i:21;i:1;i:40;i:1;i:58;i:-1;i:59;i:-2;i:62;i:-1;i:63;i:-2;i:66;i:-1;i:67;i:-2;i:70;i:-1;i:71;i:-2;i:74;i:-1;i:75;i:-2;i:78;i:-1;i:79;i:-2;i:81;i:1;}s:68:"/home/bjarte/public_html/doctrine/lib/Doctrine/Manager/Exception.php";a:2:{i:32;i:1;i:34;i:1;}s:68:"/home/bjarte/public_html/doctrine/lib/Doctrine/Expression/Sqlite.php";a:41:{i:0;i:1;i:21;i:1;i:33;i:1;i:43;i:-1;i:44;i:-2;i:54;i:-1;i:55;i:-2;i:64;i:1;i:65;i:1;i:66;i:-2;i:78;i:-1;i:79;i:-2;i:82;i:-1;i:83;i:-2;i:86;i:-1;i:87;i:-2;i:90;i:-1;i:91;i:-2;i:94;i:-1;i:95;i:-2;i:103;i:-1;i:104;i:-2;i:117;i:-1;i:118;i:-2;i:128;i:-1;i:129;i:-1;i:130;i:-1;i:131;i:-1;i:132;i:-1;i:133;i:-1;i:134;i:-1;i:135;i:-1;i:136;i:-2;i:144;i:1;i:145;i:-2;i:160;i:1;i:161;i:1;i:162;i:-2;i:163;i:-1;i:164;i:-2;i:166;i:1;}s:55:"/home/bjarte/public_html/doctrine/models/Assignment.php";a:3:{i:4;i:1;i:5;i:1;i:6;i:1;}s:63:"/home/bjarte/public_html/doctrine/lib/Doctrine/Import/Pgsql.php";a:49:{i:21;i:1;i:33;i:1;i:129;i:-1;i:138;i:1;i:139;i:1;i:141;i:1;i:142;i:-2;i:151;i:1;i:152;i:1;i:153;i:1;i:155;i:1;i:156;i:1;i:157;i:-1;i:159;i:-1;i:161;i:-1;i:162;i:-1;i:163;i:-1;i:165;i:-1;i:168;i:-1;i:169;i:-1;i:170;i:-1;i:171;i:-1;i:172;i:-1;i:173;i:-1;i:174;i:-1;i:175;i:-1;i:176;i:-1;i:177;i:-1;i:178;i:-1;i:179;i:-1;i:180;i:-1;i:181;i:1;i:182;i:-2;i:191;i:1;i:192;i:1;i:194;i:1;i:195;i:-2;i:204;i:1;i:205;i:-2;i:217;i:-1;i:218;i:-1;i:219;i:-1;i:220;i:-1;i:221;i:-1;i:222;i:-1;i:223;i:-2;i:232;i:-1;i:233;i:-2;i:235;i:1;}s:58:"/home/bjarte/public_html/doctrine/models/FieldNameTest.php";a:6:{i:6;i:1;i:7;i:1;i:8;i:1;i:9;i:1;i:10;i:1;i:11;i:1;}s:62:"/home/bjarte/public_html/doctrine/lib/Doctrine/Hook/Parser.php";a:6:{i:34;i:1;i:40;i:1;i:41;i:-2;i:50;i:1;i:51;i:-2;i:66;i:1;}s:63:"/home/bjarte/public_html/doctrine/models/QueryTest_Category.php";a:13:{i:17;i:1;i:18;i:1;i:19;i:1;i:20;i:1;i:21;i:1;i:22;i:1;i:23;i:1;i:24;i:1;i:25;i:1;i:32;i:1;i:33;i:1;i:34;i:1;i:35;i:1;}s:57:"/home/bjarte/public_html/doctrine/models/LocationI18n.php";a:6:{i:6;i:1;i:7;i:1;i:8;i:1;i:9;i:1;i:13;i:1;i:14;i:1;}s:63:"/home/bjarte/public_html/doctrine/tests/Query/WhereTestCase.php";a:154:{i:37;i:1;i:40;i:1;i:41;i:1;i:42;i:1;i:45;i:1;i:47;i:1;i:48;i:1;i:49;i:1;i:51;i:1;i:53;i:1;i:55;i:1;i:57;i:1;i:58;i:1;i:59;i:1;i:63;i:1;i:65;i:1;i:67;i:1;i:69;i:1;i:70;i:1;i:71;i:1;i:72;i:1;i:76;i:1;i:78;i:1;i:79;i:1;i:80;i:1;i:82;i:1;i:84;i:1;i:86;i:1;i:88;i:1;i:89;i:1;i:90;i:1;i:91;i:1;i:95;i:1;i:96;i:1;i:97;i:1;i:99;i:1;i:101;i:1;i:103;i:1;i:105;i:1;i:106;i:1;i:107;i:1;i:108;i:1;i:111;i:1;i:113;i:1;i:115;i:1;i:117;i:1;i:119;i:1;i:120;i:1;i:121;i:1;i:124;i:1;i:126;i:1;i:128;i:1;i:129;i:1;i:130;i:1;i:131;i:1;i:134;i:1;i:136;i:1;i:137;i:1;i:139;i:1;i:140;i:1;i:141;i:1;i:144;i:1;i:146;i:1;i:147;i:1;i:148;i:1;i:149;i:1;i:153;i:1;i:154;i:1;i:155;i:1;i:156;i:-2;i:158;i:1;i:160;i:1;i:161;i:1;i:162;i:1;i:166;i:1;i:170;i:1;i:171;i:1;i:172;i:1;i:173;i:-2;i:175;i:1;i:176;i:1;i:177;i:1;i:178;i:1;i:179;i:1;i:182;i:1;i:184;i:1;i:186;i:1;i:188;i:1;i:189;i:1;i:190;i:1;i:192;i:1;i:195;i:1;i:197;i:1;i:199;i:1;i:201;i:1;i:202;i:1;i:203;i:1;i:206;i:1;i:208;i:1;i:210;i:1;i:211;i:1;i:213;i:1;i:214;i:1;i:217;i:1;i:219;i:1;i:221;i:1;i:222;i:1;i:224;i:1;i:225;i:1;i:228;i:1;i:230;i:1;i:232;i:1;i:233;i:1;i:235;i:1;i:236;i:1;i:239;i:1;i:241;i:1;i:243;i:1;i:244;i:1;i:246;i:1;i:247;i:1;i:250;i:1;i:252;i:1;i:254;i:1;i:255;i:1;i:258;i:1;i:260;i:1;i:262;i:1;i:263;i:1;i:266;i:1;i:267;i:1;i:268;i:1;i:270;i:1;i:272;i:1;i:274;i:1;i:276;i:1;i:278;i:1;i:279;i:1;i:283;i:1;i:285;i:1;i:287;i:1;i:289;i:1;i:290;i:1;i:291;i:1;i:292;i:1;i:293;i:1;i:297;i:1;i:299;i:1;i:301;i:1;i:303;i:1;i:304;i:1;i:305;i:1;i:306;i:1;i:307;i:1;}s:64:"/home/bjarte/public_html/doctrine/lib/Doctrine/Schema/Object.php";a:33:{i:21;i:1;i:35;i:1;i:43;i:1;i:44;i:1;i:45;i:-1;i:46;i:-1;i:47;i:1;i:48;i:1;i:52;i:1;i:53;i:1;i:54;i:-2;i:55;i:1;i:57;i:-2;i:61;i:1;i:62;i:1;i:63;i:-2;i:64;i:1;i:65;i:1;i:69;i:-1;i:70;i:-2;i:74;i:-1;i:75;i:-2;i:83;i:-1;i:84;i:-1;i:85;i:-2;i:86;i:-1;i:87;i:-2;i:97;i:-1;i:98;i:-1;i:99;i:-2;i:100;i:-1;i:101;i:-2;i:103;i:1;}s:68:"/home/bjarte/public_html/doctrine/tests/CustomPrimaryKeyTestCase.php";a:14:{i:36;i:1;i:40;i:1;i:42;i:1;i:43;i:1;i:46;i:1;i:47;i:1;i:49;i:1;i:50;i:1;i:52;i:1;i:53;i:1;i:54;i:1;i:56;i:1;i:58;i:1;i:59;i:1;}s:59:"/home/bjarte/public_html/doctrine/lib/Doctrine/DataDict.php";a:34:{i:33;i:1;i:44;i:-1;i:46;i:-1;i:47;i:-1;i:48;i:-2;i:50;i:-1;i:51;i:-1;i:52;i:-2;i:54;i:-1;i:56;i:-1;i:57;i:-1;i:58;i:-1;i:60;i:-1;i:61;i:-1;i:62;i:-1;i:63;i:-1;i:64;i:-1;i:66;i:-1;i:67;i:-1;i:68;i:-1;i:69;i:-1;i:70;i:-1;i:71;i:-1;i:72;i:-1;i:74;i:-1;i:75;i:-2;i:87;i:1;i:88;i:1;i:89;i:1;i:90;i:1;i:91;i:1;i:92;i:1;i:93;i:-2;i:95;i:1;}s:57:"/home/bjarte/public_html/doctrine/models/ResourceType.php";a:4:{i:4;i:1;i:5;i:1;i:7;i:1;i:8;i:1;}s:56:"/home/bjarte/public_html/doctrine/lib/Doctrine/Query.php";a:795:{i:0;i:1;i:112;i:1;i:113;i:-2;i:116;i:1;i:117;i:1;i:118;i:1;i:119;i:1;i:120;i:1;i:121;i:1;i:122;i:1;i:123;i:1;i:124;i:1;i:134;i:-1;i:135;i:-1;i:136;i:-2;i:137;i:-1;i:138;i:-1;i:148;i:-1;i:149;i:-1;i:159;i:1;i:161;i:1;i:162;i:1;i:163;i:1;i:164;i:1;i:166;i:1;i:175;i:1;i:176;i:-2;i:184;i:1;i:185;i:-2;i:194;i:1;i:195;i:1;i:196;i:1;i:197;i:1;i:198;i:1;i:199;i:1;i:200;i:1;i:201;i:1;i:202;i:-2;i:218;i:1;i:219;i:1;i:220;i:-2;i:222;i:1;i:223;i:1;i:224;i:-2;i:233;i:1;i:235;i:1;i:237;i:1;i:238;i:-2;i:239;i:1;i:240;i:1;i:242;i:1;i:243;i:-2;i:244;i:1;i:245;i:-2;i:255;i:1;i:256;i:1;i:258;i:1;i:260;i:1;i:261;i:-1;i:262;i:-2;i:264;i:1;i:265;i:1;i:267;i:1;i:268;i:-2;i:282;i:1;i:283;i:-1;i:284;i:-2;i:287;i:1;i:288;i:1;i:289;i:-2;i:292;i:1;i:293;i:1;i:294;i:1;i:295;i:1;i:298;i:1;i:299;i:1;i:301;i:1;i:303;i:1;i:304;i:1;i:305;i:-1;i:306;i:-1;i:307;i:1;i:309;i:1;i:310;i:1;i:312;i:1;i:314;i:1;i:315;i:-2;i:325;i:-1;i:326;i:-1;i:327;i:-2;i:329;i:-1;i:330;i:-2;i:341;i:1;i:342;i:1;i:343;i:1;i:344;i:1;i:345;i:1;i:346;i:1;i:347;i:1;i:348;i:1;i:349;i:1;i:351;i:1;i:352;i:-2;i:365;i:1;i:366;i:1;i:368;i:1;i:369;i:1;i:372;i:1;i:373;i:1;i:374;i:1;i:377;i:1;i:378;i:1;i:379;i:1;i:381;i:1;i:382;i:1;i:383;i:1;i:385;i:1;i:387;i:1;i:388;i:1;i:390;i:1;i:392;i:1;i:402;i:1;i:404;i:1;i:405;i:1;i:407;i:1;i:408;i:1;i:410;i:1;i:411;i:1;i:413;i:1;i:414;i:1;i:415;i:1;i:416;i:1;i:418;i:1;i:419;i:1;i:420;i:1;i:422;i:1;i:425;i:1;i:426;i:1;i:427;i:-1;i:428;i:-1;i:429;i:1;i:432;i:1;i:433;i:1;i:445;i:1;i:446;i:1;i:448;i:1;i:449;i:-1;i:450;i:-1;i:451;i:-2;i:452;i:-1;i:453;i:-1;i:455;i:1;i:457;i:1;i:458;i:1;i:475;i:1;i:477;i:1;i:478;i:1;i:479;i:1;i:481;i:1;i:482;i:1;i:483;i:1;i:484;i:1;i:486;i:1;i:489;i:1;i:490;i:1;i:491;i:1;i:495;i:1;i:496;i:1;i:497;i:-2;i:499;i:1;i:500;i:1;i:501;i:1;i:504;i:1;i:506;i:-1;i:507;i:-1;i:509;i:1;i:512;i:1;i:514;i:1;i:515;i:1;i:516;i:1;i:517;i:1;i:518;i:1;i:520;i:1;i:521;i:1;i:524;i:1;i:525;i:-1;i:526;i:-2;i:528;i:1;i:531;i:1;i:534;i:1;i:535;i:-1;i:536;i:-2;i:538;i:1;i:541;i:1;i:543;i:1;i:544;i:1;i:545;i:1;i:546;i:1;i:549;i:1;i:550;i:1;i:551;i:1;i:552;i:-2;i:564;i:1;i:565;i:1;i:567;i:1;i:568;i:1;i:569;i:1;i:570;i:-2;i:573;i:1;i:574;i:1;i:576;i:1;i:578;i:1;i:579;i:1;i:580;i:1;i:584;i:1;i:585;i:1;i:586;i:1;i:589;i:1;i:591;i:1;i:593;i:1;i:594;i:1;i:595;i:-1;i:596;i:-1;i:597;i:-2;i:598;i:-1;i:599;i:-1;i:600;i:1;i:602;i:1;i:603;i:1;i:606;i:1;i:607;i:1;i:609;i:1;i:610;i:-2;i:622;i:1;i:623;i:1;i:625;i:1;i:627;i:1;i:629;i:1;i:630;i:1;i:631;i:1;i:633;i:1;i:635;i:1;i:637;i:1;i:638;i:1;i:639;i:1;i:640;i:1;i:641;i:1;i:651;i:1;i:652;i:1;i:654;i:1;i:657;i:1;i:658;i:1;i:660;i:1;i:661;i:1;i:662;i:-2;i:664;i:1;i:666;i:1;i:667;i:1;i:670;i:1;i:671;i:-1;i:672;i:-2;i:674;i:1;i:676;i:1;i:679;i:1;i:680;i:1;i:681;i:-2;i:683;i:1;i:685;i:1;i:689;i:1;i:690;i:1;i:691;i:1;i:692;i:1;i:694;i:1;i:695;i:1;i:696;i:1;i:697;i:1;i:699;i:1;i:700;i:1;i:702;i:1;i:704;i:1;i:705;i:1;i:707;i:1;i:709;i:1;i:710;i:1;i:712;i:1;i:713;i:1;i:723;i:1;i:724;i:1;i:725;i:1;i:726;i:1;i:727;i:1;i:728;i:1;i:729;i:1;i:730;i:1;i:731;i:1;i:733;i:1;i:734;i:1;i:735;i:-1;i:736;i:1;i:737;i:-2;i:746;i:1;i:747;i:1;i:748;i:1;i:749;i:1;i:750;i:1;i:751;i:-2;i:754;i:1;i:755;i:1;i:757;i:1;i:758;i:1;i:760;i:1;i:761;i:-1;i:763;i:1;i:764;i:-1;i:765;i:-2;i:767;i:1;i:769;i:1;i:770;i:1;i:772;i:1;i:773;i:1;i:774;i:1;i:775;i:1;i:777;i:1;i:779;i:1;i:780;i:1;i:782;i:1;i:784;i:1;i:785;i:1;i:786;i:1;i:787;i:-2;i:800;i:1;i:813;i:-1;i:824;i:1;i:825;i:1;i:826;i:-2;i:828;i:1;i:831;i:1;i:832;i:1;i:833;i:1;i:834;i:1;i:835;i:1;i:836;i:1;i:839;i:1;i:841;i:1;i:843;i:1;i:845;i:1;i:846;i:1;i:849;i:1;i:851;i:1;i:852;i:1;i:853;i:1;i:855;i:1;i:856;i:1;i:857;i:1;i:859;i:1;i:860;i:1;i:861;i:1;i:862;i:1;i:863;i:1;i:865;i:1;i:868;i:1;i:869;i:1;i:871;i:1;i:873;i:1;i:874;i:-1;i:875;i:-2;i:877;i:1;i:878;i:1;i:879;i:1;i:880;i:1;i:881;i:1;i:883;i:1;i:884;i:1;i:885;i:1;i:886;i:1;i:889;i:1;i:890;i:1;i:894;i:1;i:895;i:1;i:897;i:1;i:898;i:1;i:899;i:1;i:902;i:1;i:905;i:1;i:906;i:1;i:907;i:1;i:910;i:1;i:911;i:1;i:913;i:1;i:914;i:1;i:917;i:1;i:918;i:1;i:920;i:1;i:921;i:1;i:922;i:1;i:923;i:1;i:925;i:1;i:926;i:1;i:927;i:-1;i:929;i:1;i:932;i:1;i:933;i:1;i:934;i:1;i:936;i:1;i:937;i:1;i:938;i:1;i:940;i:1;i:941;i:1;i:942;i:1;i:943;i:1;i:945;i:1;i:947;i:1;i:948;i:1;i:951;i:1;i:952;i:1;i:953;i:1;i:954;i:1;i:955;i:1;i:956;i:1;i:957;i:1;i:959;i:1;i:960;i:-2;i:973;i:1;i:974;i:1;i:975;i:1;i:978;i:1;i:979;i:1;i:982;i:1;i:984;i:1;i:988;i:1;i:989;i:1;i:990;i:1;i:991;i:1;i:992;i:1;i:994;i:1;i:995;i:1;i:996;i:-2;i:999;i:1;i:1000;i:-1;i:1001;i:-2;i:1004;i:1;i:1005;i:1;i:1006;i:1;i:1007;i:1;i:1008;i:1;i:1010;i:1;i:1011;i:1;i:1012;i:1;i:1013;i:1;i:1014;i:1;i:1015;i:1;i:1016;i:1;i:1019;i:1;i:1022;i:1;i:1024;i:1;i:1025;i:1;i:1027;i:1;i:1028;i:-1;i:1029;i:-2;i:1030;i:1;i:1032;i:1;i:1033;i:1;i:1036;i:1;i:1037;i:1;i:1038;i:1;i:1040;i:1;i:1043;i:1;i:1045;i:1;i:1047;i:1;i:1048;i:1;i:1049;i:-1;i:1050;i:-2;i:1052;i:1;i:1054;i:1;i:1055;i:1;i:1056;i:1;i:1057;i:-2;i:1059;i:1;i:1060;i:1;i:1061;i:-2;i:1062;i:1;i:1064;i:1;i:1065;i:1;i:1066;i:1;i:1068;i:1;i:1069;i:1;i:1070;i:1;i:1072;i:1;i:1073;i:1;i:1074;i:1;i:1075;i:-1;i:1076;i:-2;i:1077;i:1;i:1078;i:1;i:1079;i:-2;i:1081;i:1;i:1083;i:1;i:1084;i:1;i:1085;i:1;i:1087;i:1;i:1088;i:1;i:1089;i:1;i:1090;i:1;i:1092;i:1;i:1093;i:1;i:1094;i:-2;i:1116;i:1;i:1118;i:1;i:1119;i:1;i:1120;i:1;i:1121;i:1;i:1122;i:1;i:1123;i:1;i:1124;i:1;i:1125;i:1;i:1126;i:1;i:1127;i:1;i:1128;i:1;i:1129;i:1;i:1130;i:1;i:1131;i:1;i:1132;i:1;i:1133;i:1;i:1134;i:1;i:1135;i:1;i:1136;i:1;i:1137;i:1;i:1138;i:1;i:1139;i:1;i:1140;i:-1;i:1142;i:1;i:1143;i:1;i:1144;i:1;i:1145;i:1;i:1146;i:1;i:1147;i:1;i:1149;i:1;i:1150;i:1;i:1151;i:1;i:1152;i:1;i:1153;i:-2;i:1167;i:1;i:1168;i:1;i:1169;i:1;i:1171;i:1;i:1172;i:1;i:1173;i:1;i:1175;i:1;i:1177;i:1;i:1178;i:1;i:1179;i:1;i:1181;i:1;i:1182;i:-1;i:1183;i:-1;i:1184;i:1;i:1185;i:-1;i:1186;i:-1;i:1187;i:1;i:1188;i:1;i:1189;i:1;i:1190;i:1;i:1191;i:1;i:1192;i:1;i:1193;i:1;i:1194;i:1;i:1195;i:1;i:1196;i:1;i:1197;i:1;i:1198;i:1;i:1199;i:1;i:1200;i:1;i:1201;i:1;i:1202;i:1;i:1203;i:1;i:1204;i:1;i:1205;i:1;i:1206;i:1;i:1207;i:1;i:1208;i:1;i:1209;i:1;i:1210;i:1;i:1211;i:1;i:1212;i:-2;i:1213;i:1;i:1215;i:1;i:1216;i:-2;i:1220;i:1;i:1222;i:1;i:1223;i:1;i:1224;i:1;i:1226;i:1;i:1227;i:1;i:1230;i:1;i:1232;i:1;i:1234;i:1;i:1235;i:1;i:1236;i:1;i:1237;i:1;i:1238;i:1;i:1239;i:1;i:1241;i:1;i:1242;i:1;i:1243;i:1;i:1244;i:1;i:1245;i:1;i:1248;i:1;i:1249;i:1;i:1251;i:1;i:1253;i:1;i:1254;i:1;i:1255;i:1;i:1257;i:1;i:1258;i:1;i:1259;i:1;i:1261;i:1;i:1262;i:1;i:1264;i:1;i:1266;i:1;i:1269;i:1;i:1271;i:1;i:1274;i:1;i:1275;i:1;i:1276;i:1;i:1277;i:1;i:1281;i:1;i:1282;i:1;i:1283;i:-2;i:1285;i:1;i:1288;i:1;i:1289;i:1;i:1290;i:1;i:1292;i:1;i:1293;i:1;i:1295;i:1;i:1296;i:1;i:1297;i:1;i:1298;i:1;i:1299;i:1;i:1300;i:1;i:1301;i:1;i:1302;i:1;i:1304;i:1;i:1305;i:1;i:1306;i:1;i:1308;i:1;i:1310;i:1;i:1312;i:1;i:1314;i:1;i:1316;i:1;i:1317;i:1;i:1318;i:1;i:1320;i:1;i:1321;i:1;i:1323;i:1;i:1325;i:1;i:1326;i:1;i:1327;i:1;i:1329;i:1;i:1331;i:1;i:1333;i:1;i:1336;i:1;i:1337;i:1;i:1338;i:1;i:1339;i:1;i:1341;i:1;i:1344;i:1;i:1345;i:1;i:1346;i:1;i:1347;i:1;i:1349;i:1;i:1351;i:1;i:1353;i:1;i:1355;i:1;i:1356;i:1;i:1358;i:1;i:1359;i:1;i:1360;i:1;i:1362;i:1;i:1364;i:1;i:1366;i:1;i:1368;i:1;i:1369;i:1;i:1370;i:1;i:1371;i:1;i:1372;i:1;i:1373;i:1;i:1374;i:1;i:1375;i:1;i:1376;i:1;i:1377;i:1;i:1379;i:1;i:1381;i:1;i:1383;i:1;i:1384;i:1;i:1385;i:1;i:1386;i:1;i:1389;i:1;i:1390;i:1;i:1391;i:1;i:1392;i:1;i:1394;i:1;i:1396;i:1;i:1398;i:1;i:1399;i:1;i:1400;i:1;i:1402;i:1;i:1404;i:1;i:1405;i:1;i:1407;i:1;i:1408;i:1;i:1409;i:1;i:1411;i:1;i:1412;i:1;i:1413;i:1;i:1414;i:1;i:1415;i:1;i:1416;i:1;i:1417;i:1;i:1418;i:1;i:1419;i:1;i:1420;i:1;i:1422;i:1;i:1423;i:1;i:1424;i:-2;i:1426;i:1;i:1427;i:1;i:1428;i:1;i:1429;i:-2;i:1440;i:1;i:1441;i:1;i:1443;i:1;i:1444;i:1;i:1447;i:1;i:1449;i:1;i:1451;i:1;i:1452;i:1;i:1453;i:1;i:1455;i:1;i:1456;i:1;i:1457;i:1;i:1459;i:1;i:1460;i:-2;i:1484;i:1;i:1487;i:1;i:1488;i:1;i:1489;i:1;i:1490;i:1;i:1491;i:1;i:1492;i:1;i:1495;i:1;i:1496;i:1;i:1497;i:1;i:1499;i:1;i:1500;i:1;i:1501;i:1;i:1502;i:1;i:1503;i:1;i:1505;i:1;i:1508;i:1;i:1510;i:1;i:1511;i:1;i:1512;i:1;i:1514;i:1;i:1515;i:1;i:1516;i:1;i:1518;i:1;i:1519;i:-1;i:1520;i:-1;i:1522;i:1;i:1524;i:1;i:1526;i:1;i:1527;i:-1;i:1528;i:-1;i:1529;i:-1;i:1530;i:-1;i:1531;i:-1;i:1532;i:1;i:1535;i:1;i:1536;i:-2;i:1550;i:1;i:1552;i:1;i:1553;i:-2;i:1557;i:1;i:1558;i:1;i:1559;i:1;i:1561;i:1;i:1562;i:1;i:1563;i:1;i:1565;i:1;i:1566;i:-2;i:1579;i:-1;i:1580;i:-1;i:1581;i:-1;i:1582;i:-1;i:1583;i:-1;}s:68:"/home/bjarte/public_html/doctrine/tests/Connection/MssqlTestCase.php";a:39:{i:35;i:1;i:37;i:1;i:38;i:1;i:40;i:1;i:42;i:1;i:43;i:1;i:45;i:1;i:47;i:1;i:48;i:1;i:50;i:1;i:52;i:1;i:53;i:1;i:55;i:1;i:57;i:1;i:58;i:1;i:60;i:1;i:62;i:1;i:63;i:1;i:65;i:1;i:67;i:1;i:68;i:1;i:70;i:1;i:72;i:1;i:73;i:1;i:75;i:1;i:77;i:1;i:78;i:1;i:80;i:1;i:82;i:1;i:83;i:1;i:85;i:1;i:87;i:1;i:88;i:1;i:90;i:1;i:92;i:1;i:93;i:1;i:95;i:1;i:97;i:1;i:98;i:1;}s:65:"/home/bjarte/public_html/doctrine/lib/Doctrine/Sequence/Mysql.php";a:29:{i:21;i:1;i:33;i:1;i:45;i:1;i:46;i:1;i:47;i:1;i:51;i:1;i:53;i:1;i:54;i:-2;i:59;i:-2;i:60;i:-2;i:61;i:-2;i:64;i:-2;i:65;i:-2;i:66;i:-2;i:69;i:1;i:71;i:1;i:72;i:1;i:73;i:1;i:80;i:1;i:81;i:1;i:82;i:-2;i:93;i:1;i:94;i:-2;i:104;i:1;i:105;i:1;i:106;i:1;i:108;i:1;i:109;i:-2;i:111;i:1;}s:66:"/home/bjarte/public_html/doctrine/tests/Sequence/PgsqlTestCase.php";a:10:{i:37;i:1;i:38;i:1;i:40;i:1;i:41;i:1;i:44;i:1;i:46;i:1;i:48;i:1;i:51;i:1;i:53;i:1;i:54;i:1;}s:71:"/home/bjarte/public_html/doctrine/lib/Doctrine/Expression/Exception.php";a:3:{i:21;i:1;i:33;i:1;i:35;i:1;}s:57:"/home/bjarte/public_html/doctrine/models/Forum_Thread.php";a:7:{i:4;i:1;i:5;i:1;i:6;i:1;i:7;i:1;i:9;i:1;i:10;i:1;i:11;i:1;}s:57:"/home/bjarte/public_html/doctrine/lib/Doctrine/RawSql.php";a:148:{i:21;i:1;i:33;i:1;i:52;i:1;i:53;i:1;i:55;i:1;i:56;i:1;i:57;i:1;i:58;i:1;i:59;i:1;i:60;i:1;i:61;i:-1;i:64;i:1;i:65;i:-2;i:75;i:1;i:77;i:1;i:78;i:1;i:80;i:1;i:82;i:1;i:83;i:1;i:84;i:1;i:85;i:1;i:86;i:1;i:87;i:1;i:88;i:1;i:89;i:1;i:90;i:1;i:91;i:1;i:92;i:1;i:93;i:1;i:94;i:1;i:95;i:1;i:96;i:1;i:97;i:1;i:98;i:1;i:99;i:1;i:100;i:1;i:101;i:1;i:102;i:1;i:104;i:1;i:105;i:-1;i:107;i:1;i:108;i:1;i:109;i:1;i:110;i:1;i:111;i:1;i:112;i:1;i:113;i:1;i:114;i:1;i:116;i:1;i:117;i:1;i:119;i:1;i:120;i:1;i:122;i:1;i:123;i:-2;i:132;i:1;i:134;i:1;i:135;i:1;i:136;i:1;i:137;i:-1;i:138;i:-2;i:140;i:1;i:142;i:1;i:143;i:1;i:144;i:-1;i:146;i:1;i:148;i:1;i:150;i:1;i:151;i:1;i:152;i:1;i:154;i:1;i:155;i:1;i:156;i:1;i:157;i:1;i:158;i:1;i:160;i:1;i:164;i:1;i:165;i:1;i:167;i:1;i:168;i:1;i:170;i:1;i:171;i:1;i:172;i:1;i:173;i:1;i:174;i:1;i:177;i:1;i:178;i:1;i:180;i:1;i:181;i:1;i:183;i:1;i:184;i:1;i:185;i:1;i:186;i:1;i:187;i:1;i:189;i:1;i:190;i:1;i:191;i:1;i:192;i:1;i:193;i:1;i:194;i:1;i:196;i:1;i:197;i:1;i:198;i:1;i:199;i:1;i:200;i:1;i:201;i:1;i:202;i:1;i:204;i:1;i:205;i:1;i:206;i:1;i:207;i:1;i:208;i:-2;i:217;i:1;i:218;i:-2;i:228;i:1;i:229;i:1;i:231;i:1;i:233;i:1;i:234;i:1;i:236;i:1;i:238;i:1;i:240;i:1;i:241;i:1;i:243;i:1;i:244;i:1;i:246;i:1;i:248;i:1;i:251;i:1;i:253;i:1;i:256;i:1;i:257;i:1;i:258;i:1;i:259;i:1;i:261;i:1;i:262;i:1;i:263;i:1;i:265;i:1;i:266;i:1;i:267;i:1;i:268;i:1;i:270;i:1;i:271;i:1;i:272;i:1;i:274;i:1;i:276;i:1;i:277;i:1;i:279;i:1;i:280;i:-2;i:283;i:1;}s:56:"/home/bjarte/public_html/doctrine/models/BooleanTest.php";a:3:{i:4;i:1;i:5;i:1;i:6;i:1;}s:63:"/home/bjarte/public_html/doctrine/lib/Doctrine/Hook/Integer.php";a:17:{i:21;i:1;i:33;i:1;i:49;i:1;i:51;i:1;i:52;i:1;i:54;i:1;i:56;i:1;i:58;i:1;i:61;i:1;i:63;i:1;i:64;i:1;i:67;i:1;i:69;i:1;i:72;i:1;i:73;i:1;i:74;i:-2;i:76;i:1;}s:59:"/home/bjarte/public_html/doctrine/models/QueryTest_User.php";a:7:{i:7;i:1;i:8;i:1;i:9;i:1;i:10;i:1;i:17;i:1;i:18;i:1;i:19;i:1;}s:48:"/home/bjarte/public_html/doctrine/models/Tag.php";a:4:{i:4;i:1;i:5;i:1;i:7;i:1;i:8;i:1;}s:53:"/home/bjarte/public_html/doctrine/models/GzipTest.php";a:2:{i:4;i:1;i:5;i:1;}s:63:"/home/bjarte/public_html/doctrine/tests/Record/LockTestCase.php";a:13:{i:5;i:1;i:6;i:1;i:7;i:1;i:8;i:1;i:10;i:1;i:14;i:1;i:15;i:1;i:16;i:1;i:17;i:1;i:18;i:1;i:20;i:1;i:21;i:1;i:22;i:1;}s:65:"/home/bjarte/public_html/doctrine/lib/Doctrine/Node/Interface.php";a:2:{i:32;i:1;i:268;i:1;}s:63:"/home/bjarte/public_html/doctrine/tests/Query/CacheTestCase.php";a:47:{i:38;i:1;i:40;i:1;i:41;i:1;i:42;i:1;i:44;i:1;i:45;i:1;i:47;i:1;i:49;i:1;i:50;i:1;i:51;i:1;i:55;i:1;i:57;i:1;i:58;i:1;i:59;i:1;i:60;i:1;i:62;i:1;i:63;i:1;i:65;i:1;i:67;i:1;i:68;i:1;i:69;i:1;i:73;i:1;i:75;i:1;i:76;i:1;i:77;i:1;i:78;i:1;i:80;i:1;i:82;i:1;i:83;i:1;i:85;i:1;i:87;i:1;i:88;i:1;i:89;i:1;i:92;i:1;i:94;i:1;i:95;i:1;i:97;i:1;i:98;i:1;i:99;i:1;i:101;i:1;i:103;i:1;i:104;i:1;i:106;i:1;i:108;i:1;i:109;i:1;i:111;i:1;i:112;i:1;}s:56:"/home/bjarte/public_html/doctrine/tests/UnitTestCase.php";a:166:{i:61;i:1;i:63;i:1;i:64;i:1;i:66;i:1;i:67;i:1;i:68;i:1;i:69;i:1;i:70;i:1;i:71;i:1;i:72;i:1;i:73;i:1;i:74;i:1;i:75;i:1;i:76;i:1;i:77;i:1;i:78;i:1;i:79;i:1;i:80;i:1;i:81;i:1;i:82;i:1;i:83;i:1;i:84;i:1;i:87;i:1;i:88;i:1;i:91;i:1;i:92;i:1;i:94;i:1;i:95;i:1;i:96;i:1;i:97;i:1;i:98;i:1;i:99;i:1;i:100;i:1;i:101;i:1;i:102;i:-1;i:104;i:1;i:106;i:1;i:107;i:1;i:108;i:1;i:109;i:1;i:110;i:1;i:111;i:1;i:112;i:1;i:113;i:1;i:114;i:1;i:115;i:1;i:116;i:1;i:117;i:1;i:118;i:-1;i:119;i:1;i:120;i:1;i:123;i:1;i:124;i:1;i:126;i:1;i:127;i:1;i:128;i:1;i:130;i:1;i:132;i:1;i:133;i:1;i:134;i:1;i:135;i:1;i:136;i:1;i:137;i:1;i:140;i:1;i:142;i:1;i:143;i:1;i:145;i:1;i:147;i:1;i:150;i:1;i:151;i:1;i:153;i:1;i:155;i:1;i:157;i:1;i:158;i:1;i:159;i:1;i:160;i:1;i:161;i:1;i:162;i:1;i:164;i:1;i:165;i:1;i:166;i:1;i:167;i:1;i:168;i:1;i:169;i:-2;i:170;i:1;i:171;i:1;i:172;i:1;i:173;i:1;i:174;i:1;i:176;i:1;i:177;i:1;i:178;i:1;i:179;i:1;i:180;i:1;i:182;i:1;i:183;i:1;i:185;i:1;i:186;i:1;i:189;i:1;i:190;i:1;i:200;i:1;i:201;i:1;i:204;i:1;i:206;i:1;i:208;i:1;i:211;i:1;i:212;i:1;i:213;i:1;i:215;i:1;i:218;i:1;i:219;i:1;i:220;i:1;i:222;i:1;i:223;i:1;i:224;i:1;i:225;i:1;i:226;i:1;i:227;i:1;i:229;i:1;i:230;i:1;i:231;i:1;i:233;i:1;i:234;i:1;i:235;i:1;i:237;i:1;i:238;i:1;i:239;i:1;i:240;i:1;i:241;i:1;i:243;i:1;i:244;i:1;i:245;i:1;i:247;i:1;i:248;i:1;i:249;i:1;i:250;i:1;i:251;i:1;i:253;i:1;i:254;i:1;i:255;i:1;i:257;i:1;i:258;i:1;i:259;i:1;i:262;i:-1;i:263;i:-2;i:266;i:1;i:268;i:1;i:269;i:1;i:270;i:1;i:272;i:1;i:273;i:1;i:276;i:1;i:277;i:-2;i:280;i:-1;i:281;i:-1;i:282;i:-1;i:283;i:-1;i:284;i:-1;i:287;i:1;i:288;i:1;i:289;i:1;i:290;i:1;i:291;i:1;i:292;i:1;i:294;i:1;i:295;i:1;}s:64:"/home/bjarte/public_html/doctrine/lib/Doctrine/Relation/Nest.php";a:60:{i:21;i:1;i:33;i:1;i:44;i:-1;i:45;i:-1;i:46;i:-1;i:47;i:-1;i:48;i:-1;i:50;i:-1;i:51;i:-1;i:52;i:-1;i:53;i:-1;i:55;i:-1;i:56;i:-1;i:57;i:-1;i:58;i:-1;i:59;i:-1;i:60;i:-1;i:61;i:-1;i:62;i:-1;i:63;i:-1;i:64;i:-1;i:65;i:-1;i:66;i:-1;i:67;i:-1;i:68;i:-1;i:69;i:-1;i:70;i:-1;i:72;i:-1;i:73;i:-2;i:102;i:1;i:105;i:1;i:106;i:1;i:107;i:-2;i:108;i:1;i:110;i:1;i:111;i:1;i:112;i:1;i:114;i:1;i:115;i:1;i:116;i:1;i:117;i:1;i:119;i:1;i:120;i:1;i:122;i:1;i:123;i:1;i:124;i:1;i:125;i:1;i:126;i:1;i:128;i:1;i:129;i:1;i:130;i:1;i:131;i:1;i:132;i:1;i:133;i:1;i:134;i:1;i:135;i:1;i:137;i:1;i:139;i:1;i:141;i:-2;i:143;i:1;}s:65:"/home/bjarte/public_html/doctrine/lib/Doctrine/Query/Abstract.php";a:89:{i:44;i:1;i:45;i:-2;i:55;i:-1;i:56;i:-2;i:67;i:1;i:68;i:1;i:69;i:1;i:70;i:1;i:72;i:1;i:73;i:-2;i:84;i:1;i:85;i:1;i:86;i:1;i:87;i:1;i:88;i:-1;i:89;i:-1;i:90;i:-1;i:91;i:1;i:93;i:1;i:94;i:1;i:96;i:1;i:98;i:1;i:100;i:1;i:101;i:-2;i:111;i:-1;i:112;i:-2;i:123;i:-1;i:124;i:-1;i:125;i:-1;i:126;i:-1;i:128;i:-1;i:129;i:-2;i:139;i:1;i:140;i:-2;i:150;i:1;i:151;i:-2;i:161;i:1;i:163;i:1;i:164;i:-2;i:175;i:-1;i:177;i:-1;i:178;i:-2;i:187;i:1;i:189;i:1;i:190;i:-2;i:200;i:1;i:202;i:1;i:203;i:-2;i:213;i:1;i:214;i:-1;i:215;i:-1;i:216;i:-1;i:217;i:-1;i:218;i:1;i:219;i:1;i:220;i:1;i:221;i:1;i:222;i:-1;i:224;i:1;i:225;i:1;i:227;i:-1;i:237;i:1;i:238;i:-2;i:248;i:1;i:249;i:-2;i:259;i:1;i:260;i:-2;i:270;i:1;i:271;i:-2;i:282;i:1;i:283;i:1;i:284;i:1;i:285;i:1;i:286;i:-1;i:289;i:1;i:290;i:-2;i:301;i:1;i:302;i:1;i:303;i:1;i:304;i:1;i:305;i:-1;i:308;i:1;i:309;i:-2;i:319;i:1;i:320;i:-2;i:330;i:1;i:331;i:-2;i:341;i:1;i:342;i:-2;}s:67:"/home/bjarte/public_html/doctrine/tests/Sequence/OracleTestCase.php";a:10:{i:37;i:1;i:38;i:1;i:40;i:1;i:41;i:1;i:44;i:1;i:46;i:1;i:48;i:1;i:51;i:1;i:53;i:1;i:54;i:1;}s:67:"/home/bjarte/public_html/doctrine/tests/Sequence/SqliteTestCase.php";a:14:{i:37;i:1;i:39;i:1;i:41;i:1;i:42;i:1;i:45;i:1;i:47;i:1;i:49;i:1;i:50;i:1;i:51;i:1;i:52;i:1;i:55;i:1;i:57;i:1;i:59;i:1;i:60;i:1;}s:65:"/home/bjarte/public_html/doctrine/tests/Export/RecordTestCase.php";a:40:{i:36;i:-1;i:38;i:-1;i:40;i:1;i:41;i:1;i:42;i:1;i:43;i:1;i:45;i:1;i:46;i:1;i:50;i:1;i:52;i:1;i:53;i:1;i:54;i:1;i:55;i:1;i:56;i:-1;i:58;i:1;i:62;i:1;i:64;i:1;i:65;i:1;i:69;i:1;i:71;i:1;i:72;i:1;i:76;i:1;i:78;i:1;i:79;i:1;i:80;i:1;i:81;i:1;i:82;i:-1;i:84;i:1;i:88;i:1;i:90;i:1;i:92;i:1;i:94;i:1;i:95;i:1;i:99;i:1;i:101;i:1;i:102;i:1;i:103;i:1;i:104;i:1;i:105;i:1;i:106;i:1;}s:60:"/home/bjarte/public_html/doctrine/tests/RelationTestCase.php";a:71:{i:36;i:1;i:39;i:1;i:41;i:1;i:42;i:1;i:46;i:1;i:48;i:1;i:49;i:1;i:50;i:1;i:51;i:1;i:53;i:1;i:54;i:1;i:55;i:1;i:57;i:1;i:59;i:1;i:60;i:1;i:64;i:1;i:66;i:1;i:68;i:1;i:70;i:1;i:72;i:1;i:74;i:1;i:76;i:1;i:78;i:1;i:80;i:1;i:82;i:1;i:83;i:1;i:87;i:1;i:89;i:1;i:91;i:1;i:93;i:1;i:95;i:1;i:97;i:1;i:99;i:1;i:101;i:1;i:103;i:1;i:104;i:1;i:105;i:1;i:106;i:1;i:107;i:1;i:111;i:1;i:114;i:1;i:116;i:1;i:117;i:1;i:119;i:-2;i:121;i:1;i:123;i:1;i:124;i:1;i:125;i:1;i:128;i:1;i:131;i:1;i:132;i:1;i:133;i:1;i:134;i:-2;i:136;i:1;i:137;i:1;i:139;i:1;i:143;i:1;i:144;i:1;i:145;i:1;i:146;i:-2;i:149;i:1;i:150;i:1;i:152;i:1;i:154;i:1;i:155;i:1;i:157;i:1;i:159;i:1;i:160;i:1;i:162;i:1;i:164;i:1;i:165;i:1;}s:53:"/home/bjarte/public_html/doctrine/models/Location.php";a:5:{i:6;i:1;i:7;i:1;i:8;i:1;i:12;i:1;i:13;i:1;}s:57:"/home/bjarte/public_html/doctrine/lib/Doctrine/Export.php";a:330:{i:21;i:1;i:34;i:1;i:59;i:1;i:60;i:1;i:70;i:-1;i:71;i:-2;i:81;i:1;i:82;i:-2;i:92;i:1;i:93;i:1;i:104;i:1;i:105;i:-2;i:116;i:1;i:117;i:1;i:118;i:-2;i:129;i:1;i:130;i:1;i:131;i:1;i:132;i:-2;i:144;i:1;i:145;i:1;i:156;i:-1;i:157;i:-2;i:167;i:1;i:168;i:1;i:178;i:1;i:179;i:-2;i:210;i:1;i:211;i:-1;i:212;i:-2;i:214;i:1;i:215;i:-1;i:216;i:-2;i:218;i:1;i:221;i:1;i:222;i:1;i:223;i:1;i:225;i:1;i:226;i:1;i:227;i:1;i:228;i:1;i:229;i:1;i:231;i:1;i:233;i:1;i:235;i:1;i:236;i:-1;i:237;i:-1;i:239;i:1;i:243;i:1;i:245;i:1;i:247;i:-1;i:248;i:-1;i:249;i:-1;i:250;i:-1;i:251;i:-1;i:252;i:-1;i:253;i:1;i:254;i:-2;i:267;i:1;i:269;i:1;i:270;i:1;i:271;i:1;i:272;i:1;i:289;i:1;i:290;i:-2;i:308;i:-1;i:309;i:-2;i:333;i:-1;i:334;i:-2;i:358;i:1;i:359;i:1;i:360;i:1;i:362;i:1;i:363;i:1;i:364;i:1;i:365;i:-1;i:366;i:-1;i:368;i:1;i:369;i:1;i:370;i:1;i:371;i:1;i:372;i:1;i:374;i:1;i:375;i:-2;i:409;i:1;i:410;i:-2;i:422;i:-1;i:423;i:-1;i:424;i:-1;i:426;i:-1;i:427;i:-1;i:428;i:-1;i:429;i:-1;i:430;i:-1;i:431;i:-1;i:432;i:-1;i:433;i:-1;i:434;i:-1;i:436;i:-1;i:438;i:-1;i:439;i:-1;i:440;i:-1;i:441;i:-1;i:442;i:-1;i:444;i:-1;i:445;i:-2;i:455;i:1;i:457;i:1;i:459;i:1;i:460;i:-2;i:552;i:1;i:553;i:-1;i:568;i:-1;i:569;i:-2;i:601;i:1;i:602;i:1;i:604;i:1;i:605;i:1;i:606;i:1;i:607;i:-2;i:643;i:1;i:645;i:1;i:646;i:1;i:648;i:1;i:649;i:1;i:651;i:1;i:653;i:1;i:654;i:1;i:656;i:1;i:657;i:1;i:659;i:1;i:661;i:1;i:662;i:1;i:663;i:-2;i:664;i:1;i:666;i:1;i:667;i:-2;i:678;i:1;i:679;i:1;i:680;i:1;i:681;i:-1;i:682;i:-1;i:684;i:-1;i:685;i:-1;i:686;i:-1;i:687;i:-1;i:688;i:-1;i:690;i:1;i:691;i:1;i:692;i:1;i:693;i:1;i:694;i:1;i:695;i:1;i:696;i:-2;i:706;i:1;i:707;i:1;i:708;i:1;i:709;i:-1;i:710;i:-1;i:711;i:1;i:712;i:-1;i:713;i:-1;i:715;i:1;i:716;i:-1;i:717;i:-1;i:719;i:1;i:721;i:1;i:722;i:-2;i:733;i:1;i:734;i:1;i:736;i:1;i:737;i:-1;i:738;i:-1;i:739;i:-1;i:740;i:-1;i:742;i:-1;i:744;i:1;i:745;i:-1;i:746;i:-2;i:748;i:1;i:750;i:1;i:752;i:1;i:753;i:-2;i:763;i:1;i:764;i:1;i:765;i:1;i:766;i:-1;i:767;i:-1;i:768;i:1;i:770;i:1;i:771;i:1;i:772;i:-2;i:789;i:-1;i:790;i:-2;i:835;i:1;i:836;i:1;i:838;i:1;i:839;i:-2;i:850;i:-1;i:851;i:-1;i:852;i:-1;i:853;i:-1;i:854;i:-1;i:855;i:-1;i:856;i:-1;i:857;i:-1;i:858;i:-2;i:871;i:1;i:873;i:1;i:874;i:1;i:875;i:1;i:876;i:1;i:877;i:1;i:878;i:1;i:879;i:-2;i:880;i:-1;i:881;i:-1;i:882;i:-1;i:883;i:-2;i:894;i:1;i:895;i:1;i:896;i:-1;i:897;i:-1;i:898;i:1;i:900;i:1;i:901;i:-1;i:902;i:-2;i:903;i:1;i:904;i:-1;i:905;i:-2;i:906;i:1;i:907;i:-1;i:908;i:-2;i:910;i:1;i:911;i:1;i:912;i:1;i:913;i:1;i:914;i:1;i:915;i:1;i:917;i:1;i:919;i:1;i:920;i:1;i:922;i:1;i:923;i:-2;i:933;i:1;i:934;i:-2;i:945;i:-1;i:946;i:-2;i:957;i:-1;i:958;i:-2;i:976;i:1;i:978;i:1;i:980;i:1;i:982;i:1;i:983;i:1;i:985;i:-2;i:986;i:-2;i:987;i:-2;i:988;i:-2;i:990;i:1;i:991;i:1;i:992;i:1;i:1004;i:1;i:1006;i:1;i:1008;i:1;i:1010;i:1;i:1011;i:1;i:1013;i:1;i:1014;i:-2;i:1015;i:-2;i:1016;i:-2;i:1018;i:1;i:1019;i:1;i:1020;i:1;i:1032;i:1;i:1034;i:1;i:1035;i:1;i:1039;i:1;i:1040;i:1;i:1041;i:1;i:1047;i:1;i:1048;i:1;i:1049;i:1;i:1050;i:1;i:1051;i:1;i:1053;i:1;i:1054;i:1;i:1055;i:-1;i:1056;i:-2;i:1057;i:1;i:1059;i:1;i:1060;i:-1;i:1061;i:-2;i:1063;i:1;i:1064;i:1;i:1065;i:1;i:1067;i:1;i:1069;i:1;i:1070;i:1;i:1071;i:1;i:1072;i:-1;i:1074;i:1;i:1075;i:1;i:1076;i:1;i:1078;i:1;i:1079;i:-2;i:1097;i:1;i:1099;i:1;i:1100;i:1;i:1101;i:1;i:1102;i:1;i:1104;i:1;i:1105;i:1;i:1106;i:1;i:1107;i:1;i:1108;i:1;i:1109;i:1;i:1110;i:1;i:1111;i:1;i:1112;i:1;i:1114;i:1;i:1115;i:-2;i:1135;i:-1;i:1137;i:-1;i:1138;i:-1;i:1140;i:-2;i:1141;i:-2;i:1142;i:-2;i:1144;i:-1;i:1146;i:1;}s:62:"/home/bjarte/public_html/doctrine/lib/Doctrine/Transaction.php";a:138:{i:21;i:1;i:35;i:1;i:79;i:1;i:81;i:1;i:82;i:-2;i:92;i:1;i:93;i:1;i:94;i:1;i:95;i:-2;i:96;i:1;i:97;i:1;i:98;i:-2;i:99;i:1;i:100;i:1;i:101;i:1;i:102;i:-2;i:114;i:1;i:115;i:-1;i:116;i:-2;i:117;i:1;i:118;i:1;i:119;i:-2;i:129;i:1;i:130;i:-2;i:139;i:1;i:141;i:1;i:142;i:-2;i:158;i:1;i:160;i:1;i:162;i:1;i:163;i:1;i:165;i:1;i:167;i:1;i:169;i:1;i:170;i:1;i:171;i:1;i:173;i:1;i:174;i:1;i:175;i:1;i:176;i:1;i:178;i:1;i:180;i:1;i:182;i:1;i:183;i:1;i:184;i:-2;i:186;i:1;i:187;i:1;i:188;i:1;i:191;i:1;i:193;i:1;i:194;i:-2;i:210;i:1;i:212;i:1;i:213;i:1;i:214;i:-2;i:216;i:1;i:218;i:1;i:219;i:1;i:221;i:1;i:223;i:1;i:225;i:1;i:226;i:1;i:227;i:1;i:229;i:1;i:230;i:1;i:232;i:1;i:233;i:1;i:234;i:1;i:236;i:1;i:237;i:1;i:239;i:1;i:240;i:-2;i:243;i:1;i:244;i:1;i:245;i:1;i:246;i:1;i:248;i:1;i:250;i:1;i:251;i:1;i:252;i:1;i:253;i:1;i:254;i:1;i:256;i:1;i:258;i:1;i:261;i:1;i:262;i:-2;i:280;i:1;i:282;i:1;i:283;i:1;i:284;i:-2;i:286;i:1;i:288;i:1;i:289;i:1;i:291;i:1;i:293;i:1;i:295;i:1;i:296;i:1;i:297;i:1;i:299;i:1;i:300;i:1;i:301;i:1;i:303;i:1;i:305;i:1;i:306;i:1;i:308;i:1;i:309;i:1;i:310;i:-2;i:312;i:1;i:314;i:1;i:317;i:1;i:318;i:-2;i:329;i:1;i:330;i:-2;i:341;i:1;i:342;i:-2;i:353;i:1;i:354;i:-2;i:366;i:1;i:368;i:1;i:369;i:1;i:371;i:1;i:372;i:1;i:373;i:1;i:374;i:1;i:375;i:1;i:376;i:1;i:377;i:1;i:378;i:1;i:379;i:1;i:380;i:1;i:381;i:1;i:383;i:1;i:384;i:-2;i:410;i:1;i:411;i:-2;i:427;i:1;i:428;i:-2;i:430;i:1;}s:57:"/home/bjarte/public_html/doctrine/lib/Doctrine/Access.php";a:25:{i:0;i:1;i:46;i:1;i:47;i:1;i:48;i:1;i:50;i:1;i:51;i:-2;i:63;i:1;i:64;i:1;i:75;i:1;i:76;i:-2;i:86;i:1;i:87;i:-2;i:97;i:-1;i:98;i:-2;i:105;i:1;i:106;i:-2;i:115;i:1;i:116;i:-2;i:126;i:1;i:127;i:1;i:128;i:1;i:129;i:1;i:131;i:1;i:139;i:1;i:140;i:-2;}s:80:"/home/bjarte/public_html/doctrine/lib/Doctrine/Connection/Firebird/Exception.php";a:14:{i:21;i:1;i:35;i:1;i:123;i:-1;i:124;i:-1;i:125;i:-1;i:126;i:-1;i:127;i:-2;i:128;i:-1;i:129;i:-1;i:130;i:-1;i:131;i:-1;i:132;i:-1;i:133;i:-2;i:135;i:1;}s:54:"/home/bjarte/public_html/doctrine/models/BarRecord.php";a:5:{i:6;i:1;i:7;i:1;i:8;i:1;i:11;i:1;i:12;i:1;}s:64:"/home/bjarte/public_html/doctrine/lib/Doctrine/Import/Oracle.php";a:62:{i:21;i:1;i:31;i:1;i:40;i:1;i:41;i:-1;i:42;i:-2;i:51;i:1;i:53;i:1;i:54;i:1;i:56;i:1;i:57;i:-2;i:65;i:1;i:67;i:1;i:68;i:-2;i:78;i:-1;i:87;i:1;i:89;i:1;i:91;i:1;i:92;i:-2;i:101;i:1;i:104;i:1;i:106;i:1;i:108;i:1;i:109;i:-2;i:118;i:1;i:120;i:1;i:122;i:1;i:124;i:1;i:125;i:-1;i:126;i:-1;i:129;i:-1;i:130;i:-1;i:131;i:-1;i:132;i:-1;i:133;i:-1;i:134;i:-1;i:135;i:-1;i:136;i:-1;i:137;i:-1;i:138;i:-1;i:139;i:-1;i:140;i:-1;i:142;i:-1;i:143;i:1;i:144;i:-2;i:153;i:1;i:155;i:1;i:156;i:1;i:158;i:1;i:160;i:1;i:161;i:-2;i:170;i:1;i:171;i:1;i:172;i:-2;i:182;i:-1;i:192;i:-1;i:209;i:1;i:212;i:1;i:213;i:-2;i:222;i:1;i:223;i:1;i:224;i:-2;i:226;i:1;}s:64:"/home/bjarte/public_html/doctrine/lib/Doctrine/Import/Sqlite.php";a:87:{i:21;i:1;i:32;i:1;i:42;i:-1;i:51;i:-1;i:61;i:-1;i:70;i:1;i:71;i:1;i:73;i:1;i:74;i:1;i:75;i:-1;i:76;i:-1;i:77;i:-1;i:78;i:-1;i:79;i:1;i:80;i:1;i:81;i:1;i:82;i:1;i:83;i:-2;i:92;i:-1;i:94;i:-1;i:96;i:-1;i:97;i:-1;i:98;i:-1;i:99;i:-1;i:101;i:-1;i:102;i:-1;i:104;i:-1;i:105;i:-1;i:106;i:-1;i:107;i:-1;i:108;i:-1;i:109;i:-1;i:110;i:-1;i:111;i:-1;i:112;i:-1;i:114;i:-1;i:115;i:-1;i:116;i:-1;i:117;i:-1;i:118;i:-2;i:127;i:1;i:128;i:1;i:130;i:1;i:131;i:1;i:132;i:1;i:133;i:-1;i:134;i:-1;i:137;i:-1;i:138;i:-1;i:139;i:-1;i:140;i:-1;i:141;i:-1;i:142;i:-1;i:143;i:-1;i:144;i:-1;i:145;i:-1;i:146;i:-1;i:147;i:-1;i:148;i:-1;i:149;i:-1;i:150;i:-1;i:151;i:1;i:152;i:-2;i:161;i:1;i:162;i:1;i:163;i:-2;i:174;i:1;i:176;i:1;i:177;i:-2;i:187;i:-1;i:196;i:-1;i:197;i:-1;i:199;i:-1;i:200;i:-1;i:201;i:-1;i:202;i:-1;i:203;i:-1;i:204;i:-1;i:205;i:-1;i:206;i:-1;i:207;i:-1;i:208;i:-2;i:217;i:-1;i:226;i:-1;i:228;i:-1;i:229;i:-2;i:232;i:1;}s:69:"/home/bjarte/public_html/doctrine/tests/Hydrate/FetchModeTestCase.php";a:74:{i:38;i:1;i:40;i:1;i:42;i:1;i:44;i:1;i:46;i:1;i:47;i:1;i:50;i:1;i:52;i:1;i:54;i:1;i:56;i:1;i:58;i:1;i:59;i:1;i:62;i:1;i:64;i:1;i:66;i:1;i:68;i:1;i:70;i:1;i:71;i:1;i:72;i:1;i:75;i:1;i:77;i:1;i:79;i:1;i:81;i:1;i:82;i:1;i:83;i:1;i:86;i:1;i:88;i:1;i:90;i:1;i:92;i:1;i:93;i:1;i:94;i:1;i:98;i:1;i:100;i:1;i:101;i:1;i:102;i:1;i:104;i:1;i:106;i:1;i:107;i:1;i:108;i:1;i:109;i:1;i:110;i:1;i:112;i:1;i:113;i:1;i:115;i:1;i:116;i:1;i:120;i:1;i:122;i:1;i:123;i:1;i:124;i:1;i:126;i:1;i:127;i:1;i:128;i:1;i:129;i:1;i:130;i:1;i:132;i:1;i:133;i:1;i:137;i:1;i:139;i:1;i:140;i:1;i:141;i:1;i:143;i:1;i:144;i:1;i:145;i:1;i:148;i:1;i:149;i:1;i:153;i:1;i:154;i:1;i:155;i:1;i:156;i:1;i:158;i:1;i:159;i:1;i:160;i:1;i:161;i:1;i:162;i:1;}s:70:"/home/bjarte/public_html/doctrine/lib/Doctrine/Hook/Parser/Complex.php";a:25:{i:21;i:1;i:33;i:1;i:49;i:1;i:50;i:1;i:61;i:1;i:63;i:1;i:64;i:-1;i:65;i:-1;i:66;i:-1;i:67;i:-1;i:69;i:-1;i:70;i:-1;i:71;i:1;i:72;i:1;i:73;i:1;i:74;i:1;i:75;i:1;i:76;i:1;i:78;i:1;i:79;i:1;i:80;i:1;i:81;i:1;i:84;i:1;i:85;i:-2;i:96;i:1;}s:62:"/home/bjarte/public_html/doctrine/tests/Query/JoinTestCase.php";a:98:{i:37;i:1;i:38;i:1;i:40;i:1;i:41;i:1;i:44;i:1;i:48;i:1;i:50;i:1;i:52;i:1;i:53;i:1;i:54;i:1;i:56;i:1;i:57;i:1;i:58;i:1;i:60;i:1;i:62;i:1;i:63;i:1;i:67;i:1;i:69;i:1;i:70;i:1;i:71;i:1;i:73;i:1;i:74;i:1;i:78;i:1;i:80;i:1;i:81;i:1;i:82;i:1;i:84;i:1;i:85;i:1;i:89;i:1;i:91;i:1;i:92;i:1;i:93;i:1;i:95;i:1;i:97;i:1;i:98;i:1;i:99;i:1;i:100;i:1;i:102;i:1;i:103;i:1;i:104;i:1;i:108;i:1;i:110;i:1;i:111;i:1;i:112;i:1;i:114;i:1;i:116;i:1;i:118;i:1;i:119;i:1;i:120;i:1;i:121;i:1;i:123;i:1;i:124;i:1;i:125;i:1;i:129;i:1;i:131;i:1;i:133;i:1;i:134;i:1;i:138;i:1;i:140;i:1;i:142;i:1;i:143;i:1;i:147;i:1;i:148;i:1;i:149;i:1;i:151;i:1;i:153;i:1;i:154;i:1;i:155;i:1;i:156;i:-2;i:158;i:1;i:162;i:1;i:163;i:1;i:164;i:1;i:166;i:1;i:168;i:1;i:169;i:1;i:170;i:1;i:171;i:-2;i:173;i:1;i:177;i:1;i:178;i:1;i:180;i:1;i:181;i:1;i:182;i:1;i:183;i:1;i:187;i:1;i:188;i:1;i:189;i:1;i:191;i:1;i:192;i:1;i:193;i:1;i:194;i:1;i:199;i:1;i:200;i:1;i:202;i:-1;i:203;i:1;i:204;i:1;i:206;i:1;}s:67:"/home/bjarte/public_html/doctrine/lib/Doctrine/Expression/Pgsql.php";a:57:{i:21;i:1;i:33;i:1;i:55;i:-1;i:57;i:-1;i:58;i:-1;i:59;i:-2;i:60;i:-1;i:62;i:-2;i:76;i:-1;i:78;i:-1;i:79;i:-1;i:80;i:-1;i:81;i:-2;i:82;i:-1;i:84;i:-2;i:105;i:-1;i:106;i:-1;i:107;i:-2;i:108;i:-1;i:109;i:-2;i:119;i:-1;i:120;i:-2;i:125;i:-1;i:127;i:-1;i:128;i:-2;i:136;i:-1;i:137;i:-2;i:145;i:-1;i:146;i:-2;i:155;i:-1;i:156;i:-2;i:176;i:-1;i:177;i:-1;i:178;i:-1;i:179;i:-1;i:182;i:-1;i:183;i:-1;i:184;i:-1;i:186;i:-1;i:187;i:-1;i:188;i:-1;i:189;i:-1;i:190;i:-1;i:191;i:-1;i:192;i:-1;i:193;i:-1;i:194;i:-1;i:195;i:-1;i:196;i:-1;i:197;i:-1;i:198;i:-1;i:200;i:-1;i:201;i:-1;i:202;i:-1;i:203;i:-1;i:204;i:-2;i:206;i:1;}s:59:"/home/bjarte/public_html/doctrine/tests/NewCoreTestCase.php";a:7:{i:37;i:1;i:39;i:1;i:41;i:1;i:42;i:1;i:44;i:1;i:46;i:1;i:47;i:1;}s:63:"/home/bjarte/public_html/doctrine/lib/Doctrine/Configurable.php";a:159:{i:71;i:1;i:72;i:-1;i:74;i:-1;i:75;i:-1;i:76;i:-1;i:77;i:-1;i:78;i:-1;i:80;i:-1;i:82;i:1;i:83;i:-1;i:84;i:-1;i:85;i:-2;i:86;i:-1;i:87;i:1;i:88;i:1;i:89;i:1;i:90;i:1;i:91;i:-1;i:92;i:-1;i:93;i:-2;i:94;i:-1;i:95;i:1;i:96;i:1;i:97;i:-1;i:98;i:-2;i:99;i:1;i:100;i:-1;i:101;i:-2;i:102;i:1;i:103;i:1;i:104;i:1;i:105;i:1;i:106;i:-1;i:107;i:-2;i:108;i:1;i:109;i:1;i:110;i:1;i:111;i:1;i:112;i:1;i:113;i:-1;i:114;i:1;i:115;i:1;i:116;i:1;i:117;i:1;i:118;i:1;i:119;i:1;i:120;i:1;i:121;i:1;i:122;i:1;i:123;i:1;i:124;i:1;i:125;i:1;i:126;i:1;i:127;i:1;i:128;i:1;i:130;i:1;i:131;i:1;i:132;i:1;i:133;i:-1;i:134;i:-2;i:135;i:1;i:136;i:1;i:137;i:-1;i:138;i:-1;i:139;i:-1;i:140;i:1;i:141;i:1;i:142;i:1;i:143;i:-1;i:144;i:-1;i:145;i:-2;i:146;i:1;i:147;i:-1;i:148;i:-1;i:149;i:-1;i:151;i:1;i:153;i:1;i:166;i:-1;i:168;i:-1;i:169;i:-2;i:178;i:-1;i:179;i:-1;i:180;i:-1;i:181;i:-2;i:182;i:-1;i:183;i:-2;i:184;i:-1;i:185;i:-2;i:193;i:1;i:194;i:-1;i:195;i:-2;i:197;i:1;i:198;i:-2;i:205;i:1;i:206;i:-2;i:215;i:-1;i:216;i:-1;i:218;i:-1;i:219;i:-1;i:220;i:-1;i:222;i:-1;i:223;i:-2;i:231;i:1;i:232;i:1;i:233;i:1;i:234;i:-2;i:235;i:-1;i:236;i:-2;i:237;i:1;i:238;i:-2;i:247;i:-1;i:248;i:-1;i:249;i:-1;i:250;i:-1;i:251;i:-2;i:252;i:-1;i:254;i:-1;i:255;i:-2;i:264;i:1;i:265;i:1;i:267;i:1;i:268;i:1;i:269;i:1;i:271;i:1;i:272;i:-2;i:280;i:1;i:281;i:1;i:282;i:1;i:283;i:-2;i:284;i:-1;i:285;i:-2;i:286;i:1;i:287;i:-2;i:296;i:1;i:297;i:1;i:298;i:1;i:299;i:-1;i:300;i:-2;i:301;i:1;i:303;i:1;i:304;i:-2;i:313;i:1;i:315;i:1;i:316;i:-1;i:317;i:-2;i:319;i:1;i:320;i:1;i:321;i:1;i:322;i:-2;i:323;i:1;i:324;i:-2;i:325;i:1;i:326;i:-2;i:335;i:-1;i:336;i:-2;i:346;i:1;i:347;i:1;i:356;i:1;i:357;i:-2;}s:50:"/home/bjarte/public_html/doctrine/models/Group.php";a:3:{i:10;i:1;i:11;i:1;i:13;i:1;}s:71:"/home/bjarte/public_html/doctrine/lib/Doctrine/Validator/ErrorStack.php";a:21:{i:33;i:1;i:48;i:1;i:58;i:1;i:59;i:1;i:68;i:-1;i:69;i:-1;i:70;i:-1;i:71;i:-1;i:81;i:1;i:82;i:-2;i:91;i:-1;i:92;i:-1;i:101;i:-1;i:102;i:-2;i:109;i:1;i:110;i:1;i:119;i:-1;i:120;i:-2;i:128;i:1;i:129;i:-2;i:131;i:1;}s:56:"/home/bjarte/public_html/doctrine/models/Phonenumber.php";a:7:{i:6;i:1;i:7;i:1;i:8;i:1;i:11;i:1;i:12;i:1;i:13;i:1;i:14;i:1;}s:63:"/home/bjarte/public_html/doctrine/tests/TransactionTestCase.php";a:136:{i:37;i:1;i:39;i:1;i:41;i:1;i:42;i:1;i:47;i:1;i:49;i:1;i:50;i:1;i:51;i:-2;i:54;i:1;i:55;i:1;i:56;i:1;i:61;i:1;i:63;i:1;i:64;i:1;i:65;i:-2;i:68;i:1;i:69;i:1;i:70;i:1;i:71;i:1;i:75;i:1;i:76;i:1;i:77;i:1;i:78;i:1;i:79;i:1;i:80;i:1;i:81;i:1;i:82;i:1;i:83;i:1;i:84;i:1;i:85;i:1;i:86;i:1;i:87;i:1;i:88;i:1;i:93;i:1;i:94;i:1;i:96;i:1;i:97;i:1;i:98;i:-2;i:101;i:1;i:102;i:1;i:103;i:1;i:104;i:1;i:105;i:1;i:107;i:1;i:108;i:1;i:109;i:1;i:114;i:1;i:115;i:-1;i:116;i:1;i:117;i:1;i:119;i:1;i:124;i:1;i:126;i:1;i:127;i:-1;i:128;i:1;i:129;i:1;i:131;i:1;i:132;i:1;i:137;i:1;i:139;i:1;i:140;i:-1;i:141;i:1;i:142;i:1;i:144;i:1;i:145;i:1;i:150;i:1;i:151;i:-1;i:152;i:1;i:153;i:1;i:155;i:1;i:160;i:1;i:161;i:-1;i:162;i:1;i:163;i:1;i:165;i:1;i:169;i:1;i:170;i:1;i:174;i:1;i:175;i:1;i:179;i:1;i:180;i:1;i:184;i:1;i:185;i:1;i:189;i:1;i:191;i:1;i:192;i:1;i:196;i:1;i:198;i:1;i:199;i:1;i:202;i:1;i:205;i:1;i:208;i:1;i:209;i:1;i:210;i:1;i:213;i:1;i:214;i:1;i:215;i:1;i:216;i:1;i:218;i:1;i:219;i:1;i:220;i:-2;i:223;i:1;i:224;i:1;i:225;i:1;i:234;i:1;i:236;i:1;i:237;i:1;i:240;i:1;i:241;i:1;i:245;i:-1;i:247;i:-1;i:248;i:-1;i:251;i:-1;i:252;i:-1;i:256;i:1;i:258;i:1;i:259;i:1;i:262;i:1;i:263;i:1;i:268;i:1;i:270;i:1;i:271;i:1;i:274;i:1;i:275;i:1;i:279;i:1;i:281;i:1;i:282;i:1;i:285;i:1;i:286;i:1;i:290;i:1;i:292;i:1;i:293;i:1;i:297;i:1;i:298;i:1;i:302;i:1;i:303;i:-2;}s:58:"/home/bjarte/public_html/doctrine/tests/ExportTestCase.php";a:24:{i:38;i:1;i:40;i:-1;i:41;i:1;i:42;i:1;i:44;i:1;i:48;i:1;i:50;i:-1;i:51;i:1;i:52;i:1;i:54;i:1;i:57;i:1;i:59;i:1;i:60;i:1;i:63;i:1;i:65;i:1;i:66;i:1;i:70;i:1;i:72;i:1;i:73;i:1;i:76;i:1;i:78;i:1;i:79;i:1;i:83;i:1;i:87;i:1;}s:59:"/home/bjarte/public_html/doctrine/models/ForeignKeyTest.php";a:14:{i:6;i:1;i:7;i:1;i:8;i:1;i:9;i:1;i:11;i:1;i:12;i:1;i:13;i:1;i:14;i:1;i:15;i:1;i:16;i:1;i:18;i:1;i:19;i:1;i:21;i:1;i:23;i:1;}s:65:"/home/bjarte/public_html/doctrine/models/MysqlIndexTestRecord.php";a:8:{i:6;i:1;i:7;i:1;i:8;i:1;i:10;i:1;i:11;i:1;i:12;i:1;i:14;i:1;i:16;i:1;}s:65:"/home/bjarte/public_html/doctrine/tests/Import/OracleTestCase.php";a:36:{i:37;i:1;i:39;i:1;i:41;i:1;i:42;i:1;i:45;i:1;i:47;i:1;i:49;i:1;i:50;i:1;i:53;i:1;i:57;i:1;i:59;i:1;i:60;i:1;i:63;i:1;i:65;i:1;i:66;i:1;i:67;i:1;i:70;i:1;i:72;i:1;i:73;i:1;i:74;i:1;i:77;i:1;i:79;i:1;i:80;i:1;i:81;i:1;i:84;i:1;i:86;i:1;i:87;i:1;i:88;i:1;i:91;i:1;i:93;i:1;i:94;i:1;i:95;i:1;i:98;i:1;i:101;i:1;i:103;i:1;i:104;i:1;}s:65:"/home/bjarte/public_html/doctrine/tests/Import/SqliteTestCase.php";a:13:{i:37;i:1;i:39;i:1;i:40;i:1;i:43;i:1;i:45;i:1;i:46;i:1;i:49;i:1;i:51;i:1;i:52;i:1;i:55;i:1;i:57;i:1;i:59;i:1;i:60;i:1;}s:58:"/home/bjarte/public_html/doctrine/tests/AccessTestCase.php";a:51:{i:36;i:1;i:40;i:1;i:41;i:1;i:42;i:1;i:47;i:1;i:50;i:1;i:52;i:1;i:53;i:1;i:55;i:1;i:56;i:1;i:58;i:1;i:60;i:1;i:62;i:1;i:63;i:1;i:65;i:1;i:67;i:1;i:68;i:1;i:72;i:1;i:73;i:1;i:75;i:1;i:76;i:1;i:78;i:1;i:80;i:1;i:81;i:1;i:83;i:1;i:84;i:1;i:85;i:1;i:86;i:1;i:87;i:1;i:91;i:1;i:92;i:1;i:94;i:1;i:96;i:1;i:98;i:1;i:100;i:1;i:101;i:1;i:103;i:1;i:104;i:1;i:105;i:1;i:106;i:1;i:107;i:1;i:110;i:1;i:111;i:1;i:113;i:1;i:114;i:1;i:116;i:1;i:118;i:1;i:120;i:1;i:122;i:1;i:123;i:1;i:124;i:1;}s:54:"/home/bjarte/public_html/doctrine/lib/Doctrine/Lib.php";a:136:{i:33;i:1;i:42;i:1;i:43;i:-1;i:44;i:-2;i:45;i:1;i:46;i:-1;i:47;i:-2;i:48;i:1;i:49;i:-1;i:50;i:-2;i:51;i:1;i:52;i:-1;i:53;i:-2;i:54;i:1;i:55;i:1;i:56;i:-2;i:57;i:-2;i:58;i:-1;i:66;i:-1;i:67;i:-1;i:68;i:-1;i:69;i:-1;i:70;i:-1;i:71;i:-1;i:72;i:-1;i:73;i:-1;i:74;i:-1;i:75;i:-2;i:88;i:-1;i:89;i:-1;i:90;i:-1;i:91;i:-1;i:92;i:-1;i:93;i:-1;i:94;i:-1;i:95;i:-1;i:97;i:-1;i:98;i:-1;i:99;i:-1;i:100;i:-1;i:101;i:-1;i:103;i:-1;i:104;i:-1;i:105;i:-1;i:106;i:-1;i:107;i:-2;i:110;i:-1;i:111;i:-2;i:130;i:-1;i:131;i:-1;i:132;i:-1;i:133;i:-1;i:134;i:-1;i:135;i:-1;i:137;i:-1;i:138;i:-1;i:139;i:-1;i:140;i:-1;i:141;i:-1;i:142;i:-1;i:143;i:-1;i:144;i:-1;i:145;i:-1;i:146;i:-1;i:147;i:-1;i:148;i:-1;i:149;i:-1;i:151;i:-1;i:152;i:-1;i:153;i:-1;i:154;i:-1;i:155;i:-2;i:156;i:-1;i:157;i:-1;i:158;i:-1;i:159;i:-1;i:160;i:-1;i:161;i:-1;i:162;i:-1;i:163;i:-1;i:164;i:-1;i:166;i:-1;i:167;i:-1;i:168;i:-1;i:169;i:-2;i:180;i:1;i:181;i:1;i:182;i:-2;i:183;i:-1;i:184;i:-1;i:185;i:-2;i:186;i:-1;i:187;i:-1;i:188;i:-2;i:189;i:-2;i:190;i:-1;i:198;i:-1;i:199;i:-1;i:200;i:-1;i:201;i:-1;i:202;i:-1;i:203;i:-1;i:205;i:-1;i:206;i:-1;i:207;i:-2;i:215;i:-1;i:216;i:-1;i:217;i:-1;i:218;i:-1;i:219;i:-1;i:220;i:-2;i:226;i:-1;i:227;i:-1;i:228;i:-1;i:229;i:-1;i:230;i:-1;i:231;i:-1;i:232;i:-1;i:233;i:-1;i:234;i:-1;i:235;i:-1;i:236;i:-1;i:237;i:-1;i:238;i:-1;i:239;i:-1;i:240;i:-1;i:241;i:-1;i:243;i:-1;i:244;i:-2;i:252;i:-1;i:253;i:-1;i:254;i:-1;i:257;i:-1;i:258;i:-1;i:259;i:-2;i:261;i:1;}s:60:"/home/bjarte/public_html/doctrine/lib/Doctrine/Query/Set.php";a:16:{i:21;i:1;i:33;i:1;i:37;i:1;i:39;i:1;i:40;i:1;i:41;i:1;i:42;i:1;i:44;i:1;i:46;i:1;i:47;i:1;i:49;i:1;i:50;i:1;i:51;i:1;i:53;i:1;i:54;i:-2;i:57;i:1;}s:67:"/home/bjarte/public_html/doctrine/lib/Doctrine/Expression/Mysql.php";a:34:{i:21;i:1;i:33;i:1;i:42;i:-1;i:43;i:-2;i:51;i:-1;i:52;i:-2;i:72;i:-1;i:73;i:-1;i:74;i:-1;i:75;i:-1;i:78;i:-1;i:79;i:-1;i:80;i:-1;i:82;i:-1;i:83;i:-1;i:84;i:-1;i:85;i:-1;i:86;i:-1;i:87;i:-1;i:88;i:-1;i:89;i:-1;i:90;i:-1;i:91;i:-1;i:92;i:-1;i:93;i:-1;i:94;i:-1;i:96;i:-1;i:97;i:-1;i:98;i:-1;i:99;i:-1;i:100;i:-2;i:108;i:-1;i:109;i:-2;i:111;i:1;}s:58:"/home/bjarte/public_html/doctrine/models/ZeroValueTest.php";a:11:{i:6;i:1;i:7;i:1;i:8;i:1;i:9;i:1;i:10;i:1;i:11;i:1;i:12;i:1;i:13;i:1;i:14;i:1;i:15;i:1;i:18;i:1;}s:59:"/home/bjarte/public_html/doctrine/lib/Doctrine/Relation.php";a:72:{i:33;i:1;i:121;i:1;i:122;i:1;i:123;i:1;i:124;i:-1;i:125;i:-2;i:126;i:1;i:127;i:1;i:128;i:1;i:129;i:1;i:131;i:1;i:133;i:1;i:134;i:1;i:143;i:1;i:144;i:1;i:145;i:1;i:146;i:-2;i:149;i:-1;i:150;i:-2;i:154;i:-1;i:155;i:-2;i:158;i:1;i:159;i:-2;i:163;i:-1;i:164;i:-2;i:168;i:-1;i:169;i:-1;i:170;i:-2;i:172;i:-1;i:173;i:-2;i:177;i:-1;i:178;i:-1;i:179;i:-1;i:180;i:-1;i:184;i:-1;i:185;i:-1;i:193;i:1;i:194;i:-2;i:203;i:1;i:204;i:-2;i:214;i:1;i:215;i:-2;i:224;i:1;i:225;i:1;i:226;i:1;i:227;i:-2;i:236;i:1;i:237;i:-2;i:247;i:1;i:248;i:-2;i:257;i:-1;i:258;i:-1;i:259;i:-2;i:268;i:1;i:269;i:1;i:270;i:-2;i:279;i:1;i:282;i:1;i:283;i:1;i:285;i:1;i:286;i:-2;i:303;i:-1;i:304;i:-1;i:305;i:-1;i:306;i:-1;i:307;i:-1;i:308;i:-1;i:309;i:-1;i:310;i:-1;i:311;i:-1;i:312;i:-2;i:314;i:1;}s:52:"/home/bjarte/public_html/doctrine/models/Element.php";a:6:{i:4;i:1;i:5;i:1;i:6;i:1;i:8;i:1;i:9;i:1;i:10;i:1;}s:66:"/home/bjarte/public_html/doctrine/lib/Doctrine/Sequence/Sqlite.php";a:29:{i:21;i:1;i:33;i:1;i:45;i:1;i:46;i:1;i:48;i:1;i:52;i:1;i:54;i:1;i:55;i:-2;i:61;i:-2;i:62;i:-2;i:63;i:-2;i:66;i:-2;i:67;i:-2;i:68;i:-2;i:71;i:1;i:73;i:1;i:74;i:1;i:76;i:1;i:81;i:1;i:82;i:1;i:83;i:-2;i:94;i:1;i:95;i:-2;i:105;i:1;i:106;i:1;i:108;i:1;i:110;i:1;i:111;i:-2;i:113;i:1;}s:66:"/home/bjarte/public_html/doctrine/lib/Doctrine/Table/Exception.php";a:5:{i:21;i:1;i:34;i:1;i:39;i:1;i:40;i:1;i:42;i:1;}s:66:"/home/bjarte/public_html/doctrine/lib/Doctrine/Sequence/Oracle.php";a:26:{i:21;i:1;i:33;i:1;i:45;i:1;i:46;i:1;i:49;i:1;i:50;i:1;i:51;i:-2;i:54;i:-2;i:55;i:-2;i:56;i:-2;i:58;i:-2;i:59;i:-2;i:60;i:-2;i:62;i:1;i:63;i:-2;i:73;i:1;i:74;i:1;i:76;i:1;i:77;i:-2;i:87;i:1;i:88;i:1;i:89;i:1;i:90;i:1;i:92;i:1;i:93;i:-2;i:95;i:1;}s:65:"/home/bjarte/public_html/doctrine/tests/Relation/NestTestCase.php";a:120:{i:36;i:1;i:39;i:1;i:41;i:1;i:42;i:1;i:45;i:1;i:46;i:1;i:48;i:1;i:49;i:1;i:51;i:1;i:52;i:1;i:54;i:1;i:55;i:1;i:57;i:1;i:58;i:1;i:60;i:1;i:61;i:1;i:63;i:1;i:64;i:1;i:66;i:1;i:67;i:1;i:69;i:1;i:70;i:1;i:72;i:1;i:73;i:1;i:75;i:1;i:77;i:1;i:79;i:1;i:80;i:1;i:83;i:1;i:85;i:1;i:86;i:1;i:88;i:1;i:89;i:1;i:91;i:1;i:92;i:1;i:94;i:1;i:95;i:1;i:96;i:1;i:98;i:1;i:99;i:1;i:100;i:1;i:102;i:1;i:103;i:1;i:105;i:1;i:107;i:1;i:109;i:1;i:118;i:1;i:120;i:1;i:122;i:1;i:124;i:1;i:126;i:1;i:127;i:1;i:131;i:1;i:133;i:1;i:134;i:1;i:136;i:1;i:137;i:1;i:139;i:1;i:141;i:1;i:142;i:1;i:144;i:1;i:146;i:1;i:147;i:1;i:149;i:1;i:150;i:1;i:151;i:1;i:153;i:1;i:155;i:1;i:157;i:1;i:159;i:1;i:161;i:1;i:162;i:1;i:165;i:1;i:167;i:1;i:169;i:1;i:171;i:1;i:172;i:1;i:173;i:1;i:177;i:1;i:178;i:1;i:179;i:1;i:180;i:1;i:181;i:1;i:182;i:1;i:183;i:1;i:184;i:1;i:185;i:1;i:186;i:1;i:187;i:1;i:189;i:1;i:190;i:1;i:194;i:1;i:196;i:1;i:197;i:1;i:198;i:1;i:199;i:1;i:201;i:1;i:202;i:1;i:205;i:1;i:207;i:1;i:208;i:1;i:211;i:1;i:213;i:1;i:215;i:1;i:217;i:1;i:219;i:1;i:220;i:1;i:223;i:1;i:225;i:1;i:227;i:1;i:229;i:1;i:231;i:1;i:232;i:1;i:236;i:1;i:238;i:1;i:240;i:1;i:242;i:1;i:244;i:1;i:246;i:1;i:247;i:1;}s:70:"/home/bjarte/public_html/doctrine/lib/Doctrine/Validator/Exception.php";a:20:{i:21;i:1;i:33;i:1;i:44;i:1;i:45;i:1;i:46;i:1;i:50;i:1;i:51;i:-2;i:55;i:-1;i:56;i:-2;i:60;i:1;i:61;i:-2;i:70;i:-1;i:71;i:-2;i:75;i:1;i:76;i:1;i:77;i:1;i:78;i:1;i:79;i:1;i:80;i:-2;i:83;i:1;}s:53:"/home/bjarte/public_html/doctrine/models/Phototag.php";a:3:{i:4;i:1;i:5;i:1;i:6;i:1;}s:55:"/home/bjarte/public_html/doctrine/lib/Doctrine/Tree.php";a:29:{i:33;i:1;i:54;i:1;i:55;i:1;i:56;i:1;i:57;i:1;i:58;i:1;i:59;i:-1;i:60;i:-1;i:61;i:-1;i:62;i:-1;i:63;i:-1;i:64;i:-1;i:66;i:1;i:75;i:-1;i:76;i:-2;i:84;i:1;i:97;i:1;i:98;i:1;i:99;i:-1;i:100;i:-2;i:101;i:1;i:102;i:-2;i:110;i:1;i:111;i:-2;i:120;i:-1;i:121;i:-1;i:128;i:1;i:129;i:-2;i:131;i:1;}s:65:"/home/bjarte/public_html/doctrine/lib/Doctrine/Tree/NestedSet.php";a:115:{i:32;i:1;i:46;i:1;i:47;i:1;i:48;i:1;i:50;i:1;i:51;i:1;i:60;i:1;i:61;i:-1;i:62;i:-1;i:64;i:1;i:65;i:1;i:66;i:1;i:67;i:1;i:76;i:1;i:77;i:-1;i:78;i:-1;i:81;i:1;i:82;i:-1;i:83;i:-1;i:85;i:1;i:86;i:1;i:87;i:1;i:89;i:1;i:91;i:1;i:92;i:-2;i:102;i:-1;i:103;i:-2;i:112;i:1;i:113;i:1;i:116;i:1;i:117;i:1;i:119;i:1;i:120;i:-1;i:121;i:-2;i:123;i:1;i:124;i:1;i:125;i:1;i:126;i:1;i:127;i:-1;i:128;i:-1;i:129;i:-1;i:130;i:-1;i:133;i:1;i:134;i:-2;i:145;i:-1;i:147;i:-1;i:150;i:-1;i:151;i:-1;i:152;i:-1;i:153;i:-1;i:154;i:-1;i:155;i:-1;i:158;i:-1;i:159;i:-1;i:161;i:-1;i:162;i:-1;i:163;i:-2;i:165;i:-1;i:166;i:-2;i:178;i:-1;i:179;i:-1;i:181;i:-1;i:182;i:-2;i:185;i:-1;i:186;i:-1;i:187;i:-1;i:188;i:-1;i:189;i:-1;i:190;i:-1;i:191;i:-2;i:201;i:-1;i:202;i:-1;i:203;i:-1;i:204;i:-2;i:213;i:-1;i:214;i:-2;i:223;i:-1;i:224;i:-1;i:229;i:-1;i:231;i:-1;i:233;i:-1;i:235;i:-1;i:237;i:-1;i:238;i:-2;i:249;i:1;i:250;i:-1;i:251;i:-1;i:252;i:-1;i:253;i:-1;i:254;i:-1;i:256;i:-1;i:258;i:1;i:259;i:-2;i:269;i:1;i:270;i:1;i:271;i:1;i:272;i:1;i:273;i:-2;i:281;i:1;i:282;i:-2;i:290;i:1;i:291;i:1;i:292;i:1;i:293;i:1;i:294;i:-2;i:303;i:-1;i:304;i:-1;i:305;i:-1;i:306;i:-1;i:307;i:-1;i:308;i:-1;i:309;i:-1;i:317;i:-1;i:318;i:-1;i:356;i:1;}s:66:"/home/bjarte/public_html/doctrine/lib/Doctrine/Cache/Interface.php";a:2:{i:34;i:1;i:75;i:1;}s:64:"/home/bjarte/public_html/doctrine/lib/Doctrine/Query/Groupby.php";a:18:{i:21;i:1;i:33;i:1;i:44;i:1;i:45;i:1;i:46;i:1;i:47;i:1;i:49;i:1;i:50;i:1;i:51;i:1;i:52;i:1;i:54;i:1;i:55;i:1;i:56;i:-1;i:57;i:-1;i:59;i:1;i:60;i:1;i:61;i:-2;i:63;i:1;}s:67:"/home/bjarte/public_html/doctrine/lib/Doctrine/Transaction/Mock.php";a:3:{i:21;i:1;i:35;i:1;i:38;i:1;}s:64:"/home/bjarte/public_html/doctrine/models/export/Cms_Cateogry.php";a:13:{i:2;i:1;i:7;i:1;i:8;i:1;i:12;i:1;i:13;i:1;i:14;i:1;i:15;i:1;i:16;i:1;i:17;i:1;i:18;i:1;i:19;i:1;i:20;i:1;i:22;i:1;}s:64:"/home/bjarte/public_html/doctrine/tests/Import/MssqlTestCase.php";a:19:{i:37;i:1;i:39;i:1;i:40;i:1;i:43;i:1;i:44;i:1;i:46;i:1;i:47;i:1;i:50;i:1;i:52;i:1;i:53;i:1;i:56;i:1;i:58;i:1;i:59;i:1;i:62;i:1;i:64;i:1;i:65;i:1;i:68;i:1;i:70;i:1;i:71;i:1;}s:64:"/home/bjarte/public_html/doctrine/lib/Doctrine/Hydrate/Array.php";a:30:{i:35;i:1;i:38;i:1;i:39;i:-2;i:42;i:1;i:43;i:-2;i:46;i:-1;i:47;i:-2;i:51;i:1;i:54;i:1;i:55;i:1;i:56;i:1;i:57;i:1;i:58;i:-2;i:61;i:1;i:62;i:-2;i:65;i:1;i:66;i:1;i:67;i:1;i:68;i:1;i:69;i:1;i:70;i:1;i:71;i:1;i:72;i:1;i:73;i:1;i:74;i:-2;i:75;i:1;i:76;i:1;i:77;i:-2;i:81;i:1;i:83;i:1;}s:60:"/home/bjarte/public_html/doctrine/models/QueryTest_Board.php";a:12:{i:9;i:1;i:10;i:1;i:11;i:1;i:12;i:1;i:13;i:1;i:14;i:1;i:15;i:1;i:16;i:1;i:17;i:1;i:24;i:1;i:25;i:1;i:26;i:1;}s:74:"/home/bjarte/public_html/doctrine/tests/Query/OneToOneFetchingTestCase.php";a:125:{i:36;i:1;i:39;i:1;i:40;i:1;i:41;i:1;i:42;i:1;i:43;i:1;i:44;i:1;i:45;i:1;i:48;i:1;i:50;i:1;i:52;i:1;i:53;i:1;i:54;i:1;i:55;i:1;i:56;i:1;i:58;i:1;i:59;i:1;i:60;i:1;i:61;i:1;i:62;i:1;i:64;i:1;i:65;i:1;i:66;i:1;i:68;i:1;i:69;i:1;i:70;i:1;i:71;i:1;i:74;i:1;i:75;i:1;i:77;i:1;i:78;i:1;i:79;i:1;i:80;i:1;i:81;i:1;i:84;i:1;i:85;i:1;i:87;i:1;i:102;i:1;i:104;i:1;i:105;i:1;i:106;i:1;i:107;i:1;i:108;i:1;i:109;i:1;i:110;i:1;i:115;i:1;i:116;i:1;i:117;i:1;i:120;i:1;i:122;i:1;i:126;i:1;i:127;i:1;i:131;i:1;i:132;i:1;i:136;i:1;i:137;i:1;i:138;i:1;i:140;i:1;i:141;i:-2;i:143;i:1;i:153;i:1;i:154;i:1;i:155;i:1;i:156;i:1;i:158;i:1;i:160;i:1;i:161;i:1;i:162;i:1;i:163;i:1;i:164;i:1;i:165;i:1;i:166;i:1;i:170;i:1;i:171;i:1;i:172;i:1;i:175;i:1;i:177;i:1;i:179;i:1;i:180;i:-2;i:183;i:1;i:184;i:1;i:185;i:1;i:191;i:1;i:193;i:1;i:194;i:1;i:195;i:1;i:196;i:1;i:197;i:1;i:198;i:1;i:199;i:1;i:202;i:1;i:203;i:1;i:206;i:1;i:208;i:1;i:209;i:1;i:211;i:1;i:212;i:1;i:214;i:1;i:215;i:1;i:216;i:1;i:218;i:1;i:219;i:-2;i:221;i:1;i:230;i:1;i:231;i:1;i:232;i:1;i:233;i:1;i:235;i:1;i:237;i:1;i:238;i:1;i:239;i:1;i:240;i:1;i:241;i:1;i:242;i:1;i:243;i:1;i:246;i:1;i:247;i:1;i:248;i:1;i:251;i:1;i:253;i:1;i:255;i:1;i:256;i:-2;i:257;i:-2;i:260;i:1;i:262;i:1;}s:70:"/home/bjarte/public_html/doctrine/lib/Doctrine/Relation/ForeignKey.php";a:39:{i:21;i:1;i:34;i:1;i:46;i:1;i:47;i:1;i:48;i:1;i:49;i:1;i:50;i:1;i:51;i:1;i:52;i:1;i:53;i:1;i:54;i:1;i:55;i:1;i:57;i:1;i:58;i:1;i:59;i:1;i:60;i:1;i:62;i:1;i:63;i:1;i:66;i:1;i:68;i:1;i:70;i:1;i:71;i:1;i:73;i:1;i:74;i:1;i:75;i:1;i:76;i:1;i:78;i:1;i:80;i:1;i:81;i:-2;i:89;i:1;i:90;i:1;i:91;i:1;i:92;i:1;i:93;i:1;i:94;i:1;i:95;i:1;i:96;i:1;i:97;i:-2;i:99;i:1;}s:60:"/home/bjarte/public_html/doctrine/lib/Doctrine/Formatter.php";a:80:{i:21;i:1;i:33;i:1;i:49;i:-1;i:50;i:-1;i:52;i:-1;i:53;i:-1;i:54;i:-1;i:56;i:-1;i:57;i:-1;i:58;i:-1;i:59;i:-1;i:60;i:-1;i:61;i:-2;i:74;i:1;i:75;i:1;i:76;i:1;i:77;i:1;i:78;i:1;i:79;i:1;i:80;i:1;i:81;i:1;i:82;i:1;i:83;i:1;i:85;i:1;i:86;i:-2;i:121;i:1;i:122;i:1;i:123;i:-2;i:124;i:1;i:125;i:1;i:126;i:1;i:127;i:1;i:129;i:1;i:130;i:-2;i:141;i:1;i:142;i:1;i:143;i:1;i:145;i:1;i:146;i:1;i:147;i:1;i:148;i:1;i:149;i:1;i:150;i:1;i:151;i:1;i:152;i:1;i:153;i:1;i:154;i:1;i:155;i:1;i:156;i:1;i:157;i:1;i:158;i:1;i:159;i:1;i:160;i:1;i:161;i:1;i:162;i:1;i:163;i:1;i:165;i:1;i:166;i:-2;i:167;i:-1;i:176;i:-1;i:177;i:-1;i:179;i:-1;i:180;i:-1;i:181;i:-2;i:182;i:-1;i:183;i:-2;i:192;i:-1;i:193;i:-1;i:194;i:-1;i:195;i:-1;i:196;i:-2;i:197;i:-1;i:198;i:-2;i:207;i:1;i:208;i:1;i:209;i:-2;i:218;i:1;i:219;i:1;i:220;i:-2;i:222;i:1;}s:50:"/home/bjarte/public_html/doctrine/models/Error.php";a:6:{i:4;i:1;i:5;i:1;i:7;i:1;i:8;i:1;i:9;i:1;i:10;i:1;}s:67:"/home/bjarte/public_html/doctrine/lib/Doctrine/Connection/Pgsql.php";a:90:{i:21;i:1;i:34;i:1;i:49;i:-1;i:50;i:1;i:51;i:1;i:52;i:1;i:53;i:1;i:54;i:1;i:55;i:1;i:56;i:1;i:57;i:1;i:58;i:1;i:59;i:1;i:60;i:1;i:61;i:1;i:62;i:1;i:63;i:1;i:64;i:1;i:65;i:1;i:66;i:1;i:67;i:1;i:70;i:1;i:71;i:1;i:72;i:1;i:73;i:1;i:75;i:1;i:76;i:1;i:77;i:1;i:78;i:1;i:79;i:1;i:89;i:-1;i:90;i:-1;i:91;i:-1;i:104;i:1;i:105;i:1;i:106;i:-1;i:107;i:-1;i:108;i:-1;i:109;i:-1;i:110;i:1;i:111;i:-1;i:112;i:-1;i:113;i:-1;i:115;i:1;i:116;i:-2;i:128;i:1;i:129;i:1;i:131;i:1;i:132;i:-1;i:133;i:-1;i:135;i:1;i:136;i:-1;i:137;i:-1;i:138;i:-1;i:139;i:-1;i:140;i:-1;i:142;i:-1;i:143;i:1;i:144;i:1;i:145;i:1;i:146;i:1;i:147;i:-1;i:148;i:-1;i:150;i:1;i:151;i:1;i:152;i:-2;i:161;i:-1;i:163;i:-1;i:165;i:-1;i:166;i:-1;i:168;i:-1;i:169;i:-1;i:170;i:-1;i:172;i:-1;i:173;i:-1;i:174;i:-1;i:175;i:-1;i:176;i:-1;i:177;i:-1;i:178;i:-1;i:180;i:-1;i:181;i:-1;i:182;i:-1;i:183;i:-1;i:184;i:-1;i:185;i:-1;i:187;i:-1;i:188;i:-1;i:189;i:-2;i:191;i:1;}s:68:"/home/bjarte/public_html/doctrine/tests/Connection/MysqlTestCase.php";a:72:{i:35;i:1;i:36;i:1;i:37;i:1;i:39;i:1;i:41;i:1;i:42;i:1;i:44;i:1;i:46;i:1;i:47;i:1;i:49;i:1;i:51;i:1;i:52;i:1;i:54;i:1;i:56;i:1;i:57;i:1;i:59;i:1;i:61;i:1;i:62;i:1;i:64;i:1;i:66;i:1;i:67;i:1;i:69;i:1;i:71;i:1;i:72;i:1;i:74;i:1;i:76;i:1;i:77;i:1;i:79;i:1;i:81;i:1;i:82;i:1;i:84;i:1;i:86;i:1;i:87;i:1;i:89;i:1;i:91;i:1;i:92;i:1;i:94;i:1;i:96;i:1;i:97;i:1;i:99;i:1;i:101;i:1;i:102;i:1;i:104;i:1;i:106;i:1;i:107;i:1;i:109;i:1;i:111;i:1;i:112;i:1;i:114;i:1;i:116;i:1;i:117;i:1;i:119;i:1;i:121;i:1;i:122;i:1;i:124;i:1;i:126;i:1;i:127;i:1;i:129;i:1;i:131;i:1;i:132;i:1;i:134;i:1;i:136;i:1;i:137;i:1;i:139;i:1;i:141;i:1;i:142;i:1;i:144;i:1;i:146;i:1;i:147;i:1;i:149;i:1;i:151;i:1;i:152;i:1;}s:68:"/home/bjarte/public_html/doctrine/lib/Doctrine/DataDict/Firebird.php";a:122:{i:21;i:1;i:34;i:1;i:60;i:1;i:61;i:-1;i:62;i:-2;i:63;i:1;i:64;i:1;i:65;i:1;i:66;i:1;i:67;i:1;i:68;i:1;i:69;i:1;i:70;i:1;i:71;i:1;i:72;i:1;i:74;i:1;i:76;i:1;i:77;i:1;i:78;i:1;i:79;i:1;i:80;i:1;i:81;i:1;i:82;i:1;i:83;i:1;i:84;i:1;i:85;i:1;i:86;i:1;i:87;i:1;i:88;i:1;i:89;i:1;i:90;i:1;i:91;i:1;i:92;i:1;i:93;i:1;i:94;i:1;i:95;i:-1;i:96;i:-1;i:97;i:-1;i:98;i:-1;i:99;i:-1;i:101;i:-1;i:102;i:-2;i:111;i:1;i:113;i:1;i:114;i:1;i:115;i:1;i:116;i:1;i:117;i:1;i:119;i:1;i:120;i:1;i:121;i:1;i:124;i:1;i:125;i:1;i:126;i:1;i:128;i:-1;i:129;i:-1;i:130;i:-1;i:131;i:-2;i:132;i:1;i:133;i:1;i:134;i:1;i:135;i:1;i:136;i:-1;i:137;i:-1;i:138;i:-1;i:139;i:-1;i:140;i:-1;i:141;i:1;i:142;i:1;i:143;i:1;i:144;i:1;i:145;i:1;i:146;i:1;i:147;i:1;i:148;i:-1;i:149;i:-1;i:150;i:-1;i:151;i:-1;i:152;i:-1;i:153;i:1;i:154;i:1;i:155;i:1;i:156;i:1;i:157;i:1;i:158;i:1;i:159;i:1;i:160;i:1;i:161;i:1;i:162;i:1;i:163;i:1;i:164;i:1;i:165;i:1;i:166;i:1;i:167;i:1;i:168;i:1;i:169;i:1;i:170;i:1;i:171;i:1;i:172;i:1;i:173;i:1;i:174;i:1;i:175;i:1;i:176;i:1;i:177;i:1;i:178;i:1;i:179;i:1;i:180;i:1;i:181;i:1;i:182;i:1;i:183;i:1;i:184;i:1;i:185;i:1;i:187;i:1;i:188;i:1;i:189;i:1;i:190;i:1;i:191;i:-2;i:202;i:1;i:203;i:-2;i:214;i:1;i:215;i:-2;i:217;i:1;}s:65:"/home/bjarte/public_html/doctrine/lib/Doctrine/Sequence/Mssql.php";a:53:{i:21;i:1;i:33;i:1;i:45;i:1;i:46;i:1;i:49;i:1;i:50;i:1;i:51;i:1;i:52;i:1;i:53;i:-1;i:58;i:1;i:60;i:1;i:61;i:-2;i:66;i:-2;i:67;i:-2;i:68;i:-2;i:76;i:-2;i:77;i:-2;i:78;i:-2;i:80;i:-2;i:81;i:-2;i:82;i:-2;i:85;i:1;i:87;i:1;i:88;i:1;i:91;i:1;i:92;i:1;i:93;i:-2;i:94;i:-2;i:95;i:-2;i:97;i:1;i:98;i:1;i:99;i:-2;i:109;i:1;i:111;i:1;i:112;i:1;i:113;i:-2;i:114;i:-2;i:115;i:-2;i:117;i:1;i:118;i:-2;i:129;i:1;i:130;i:1;i:131;i:1;i:132;i:1;i:134;i:-1;i:136;i:-1;i:137;i:1;i:140;i:1;i:141;i:-2;i:151;i:1;i:153;i:1;i:154;i:-2;i:156;i:1;}s:73:"/home/bjarte/public_html/doctrine/models/export/Cms_CateogryLanguages.php";a:14:{i:2;i:1;i:6;i:1;i:7;i:1;i:8;i:1;i:12;i:1;i:13;i:1;i:14;i:1;i:15;i:1;i:16;i:1;i:17;i:1;i:18;i:1;i:19;i:1;i:20;i:1;i:22;i:1;}s:69:"/home/bjarte/public_html/doctrine/tests/Expression/DriverTestCase.php";a:73:{i:39;i:1;i:41;i:1;i:42;i:1;i:44;i:1;i:45;i:1;i:47;i:1;i:48;i:1;i:50;i:1;i:51;i:1;i:53;i:1;i:54;i:1;i:58;i:1;i:59;i:-1;i:60;i:1;i:61;i:1;i:63;i:1;i:66;i:1;i:67;i:-1;i:68;i:1;i:69;i:1;i:71;i:1;i:76;i:1;i:77;i:1;i:83;i:1;i:84;i:1;i:86;i:1;i:87;i:1;i:89;i:1;i:90;i:1;i:92;i:1;i:93;i:1;i:95;i:1;i:96;i:1;i:98;i:1;i:99;i:1;i:101;i:1;i:103;i:1;i:104;i:1;i:110;i:1;i:112;i:1;i:113;i:1;i:115;i:1;i:116;i:1;i:118;i:1;i:119;i:1;i:121;i:1;i:122;i:1;i:124;i:1;i:125;i:1;i:127;i:1;i:128;i:1;i:135;i:1;i:136;i:1;i:138;i:1;i:139;i:1;i:141;i:1;i:142;i:1;i:144;i:1;i:145;i:1;i:147;i:1;i:148;i:1;i:150;i:1;i:151;i:1;i:157;i:1;i:158;i:1;i:160;i:1;i:161;i:1;i:163;i:1;i:164;i:1;i:166;i:1;i:167;i:1;i:169;i:1;i:170;i:1;}s:70:"/home/bjarte/public_html/doctrine/lib/Doctrine/Connection/Profiler.php";a:36:{i:0;i:1;i:21;i:1;i:33;i:1;i:56;i:1;i:65;i:-1;i:79;i:1;i:80;i:-1;i:81;i:-2;i:84;i:1;i:86;i:1;i:88;i:1;i:89;i:1;i:90;i:1;i:91;i:1;i:93;i:1;i:107;i:1;i:116;i:-1;i:117;i:-1;i:118;i:-2;i:119;i:-1;i:120;i:-2;i:129;i:-1;i:130;i:-2;i:139;i:-1;i:140;i:-2;i:148;i:-1;i:149;i:-2;i:157;i:-1;i:158;i:-2;i:167;i:1;i:168;i:-1;i:169;i:-2;i:171;i:1;i:172;i:1;i:173;i:-2;i:175;i:1;}s:68:"/home/bjarte/public_html/doctrine/tests/DataType/BooleanTestCase.php";a:58:{i:34;i:1;i:36;i:1;i:37;i:1;i:38;i:1;i:41;i:1;i:42;i:1;i:44;i:1;i:45;i:1;i:46;i:1;i:48;i:1;i:49;i:1;i:50;i:1;i:53;i:1;i:54;i:1;i:55;i:1;i:56;i:1;i:58;i:1;i:59;i:1;i:61;i:1;i:63;i:1;i:64;i:1;i:65;i:1;i:67;i:1;i:68;i:1;i:69;i:1;i:71;i:1;i:72;i:1;i:74;i:1;i:75;i:1;i:77;i:1;i:78;i:1;i:79;i:1;i:81;i:1;i:82;i:1;i:83;i:1;i:84;i:1;i:86;i:1;i:87;i:1;i:88;i:1;i:90;i:1;i:91;i:1;i:93;i:1;i:94;i:1;i:97;i:1;i:98;i:1;i:100;i:1;i:101;i:1;i:102;i:1;i:104;i:1;i:105;i:1;i:107;i:1;i:108;i:1;i:110;i:1;i:111;i:1;i:112;i:1;i:114;i:1;i:115;i:1;i:116;i:1;}s:68:"/home/bjarte/public_html/doctrine/lib/Doctrine/Validator/Usstate.php";a:6:{i:34;i:1;i:92;i:-1;i:93;i:-2;i:102;i:1;i:103;i:-2;i:105;i:1;}s:56:"/home/bjarte/public_html/doctrine/tests/HookTestCase.php";a:69:{i:38;i:1;i:40;i:1;i:42;i:1;i:43;i:1;i:44;i:1;i:48;i:1;i:50;i:1;i:52;i:1;i:53;i:1;i:54;i:1;i:58;i:1;i:60;i:1;i:62;i:1;i:63;i:1;i:64;i:1;i:68;i:1;i:70;i:1;i:72;i:1;i:73;i:1;i:74;i:1;i:78;i:1;i:80;i:1;i:82;i:1;i:83;i:1;i:85;i:1;i:86;i:1;i:90;i:1;i:92;i:1;i:93;i:1;i:95;i:1;i:96;i:1;i:97;i:1;i:98;i:1;i:102;i:1;i:104;i:1;i:106;i:1;i:107;i:1;i:108;i:1;i:109;i:1;i:113;i:1;i:115;i:1;i:117;i:1;i:119;i:1;i:120;i:1;i:124;i:1;i:126;i:1;i:128;i:1;i:129;i:1;i:130;i:1;i:134;i:1;i:136;i:1;i:138;i:1;i:139;i:1;i:140;i:1;i:144;i:1;i:146;i:1;i:148;i:1;i:149;i:1;i:150;i:1;i:154;i:1;i:156;i:1;i:158;i:1;i:159;i:1;i:160;i:1;i:164;i:1;i:166;i:1;i:168;i:1;i:169;i:1;i:170;i:1;}s:61:"/home/bjarte/public_html/doctrine/lib/Doctrine/Hook/Equal.php";a:6:{i:21;i:1;i:33;i:1;i:49;i:1;i:50;i:1;i:51;i:1;i:53;i:1;}s:63:"/home/bjarte/public_html/doctrine/tests/Query/CheckTestCase.php";a:18:{i:36;i:1;i:38;i:1;i:41;i:1;i:43;i:1;i:45;i:1;i:46;i:1;i:49;i:1;i:52;i:1;i:53;i:-1;i:54;i:1;i:55;i:1;i:57;i:1;i:60;i:1;i:63;i:1;i:64;i:-1;i:65;i:1;i:66;i:1;i:68;i:1;}s:59:"/home/bjarte/public_html/doctrine/models/RecordHookTest.php";a:20:{i:8;i:1;i:9;i:1;i:12;i:1;i:13;i:1;i:16;i:1;i:17;i:1;i:20;i:1;i:21;i:1;i:24;i:1;i:25;i:1;i:28;i:1;i:29;i:1;i:32;i:1;i:33;i:1;i:36;i:1;i:37;i:1;i:40;i:1;i:41;i:1;i:44;i:1;i:45;i:-2;}s:56:"/home/bjarte/public_html/doctrine/models/NotNullTest.php";a:3:{i:4;i:1;i:5;i:1;i:6;i:1;}s:66:"/home/bjarte/public_html/doctrine/lib/Doctrine/Record/Iterator.php";a:14:{i:0;i:1;i:2;i:1;i:19;i:1;i:20;i:1;i:21;i:1;i:29;i:-1;i:30;i:-1;i:38;i:1;i:40;i:1;i:41;i:-1;i:42;i:-2;i:43;i:1;i:45;i:-2;i:47;i:1;}s:63:"/home/bjarte/public_html/doctrine/lib/Doctrine/Schema/Table.php";a:19:{i:21;i:1;i:40;i:1;i:59;i:-1;i:67;i:-1;i:68;i:-2;i:74;i:-1;i:75;i:-1;i:76;i:-2;i:77;i:-1;i:78;i:-2;i:87;i:-1;i:88;i:-1;i:90;i:-1;i:91;i:-2;i:100;i:-1;i:101;i:-1;i:108;i:-1;i:109;i:-2;i:112;i:1;}s:55:"/home/bjarte/public_html/doctrine/lib/Doctrine/Node.php";a:32:{i:32;i:1;i:69;i:1;i:70;i:1;i:71;i:1;i:72;i:1;i:84;i:1;i:86;i:1;i:87;i:-1;i:88;i:-2;i:90;i:1;i:91;i:-2;i:100;i:-1;i:101;i:-1;i:110;i:-1;i:111;i:-2;i:121;i:-1;i:122;i:-2;i:132;i:-1;i:133;i:-1;i:134;i:-1;i:136;i:-1;i:137;i:-1;i:138;i:-1;i:140;i:-1;i:141;i:-1;i:143;i:-1;i:144;i:-2;i:153;i:-1;i:154;i:-1;i:163;i:-1;i:164;i:-1;i:166;i:1;}s:65:"/home/bjarte/public_html/doctrine/lib/Doctrine/Node/NestedSet.php";a:438:{i:33;i:1;i:42;i:-1;i:43;i:-2;i:52;i:-1;i:53;i:-2;i:62;i:-1;i:63;i:-2;i:72;i:-1;i:73;i:-2;i:82;i:-1;i:83;i:-1;i:84;i:-1;i:85;i:-1;i:86;i:-1;i:88;i:-1;i:89;i:-1;i:90;i:-2;i:92;i:-1;i:93;i:-1;i:94;i:-1;i:95;i:-1;i:96;i:-1;i:98;i:-1;i:99;i:-2;i:108;i:-1;i:109;i:-1;i:110;i:-1;i:111;i:-1;i:112;i:-1;i:114;i:-1;i:115;i:-1;i:116;i:-2;i:118;i:-1;i:119;i:-1;i:120;i:-1;i:121;i:-1;i:122;i:-1;i:124;i:-1;i:125;i:-2;i:134;i:-1;i:135;i:-1;i:136;i:-1;i:137;i:-1;i:138;i:-1;i:139;i:-1;i:140;i:-2;i:141;i:-1;i:142;i:-1;i:143;i:-1;i:144;i:-1;i:145;i:-2;i:154;i:-1;i:155;i:-1;i:156;i:-1;i:157;i:-1;i:158;i:-1;i:160;i:-1;i:161;i:-1;i:162;i:-2;i:164;i:-1;i:165;i:-1;i:166;i:-1;i:167;i:-1;i:168;i:-1;i:170;i:-1;i:171;i:-2;i:180;i:-1;i:181;i:-1;i:182;i:-1;i:183;i:-1;i:184;i:-1;i:186;i:-1;i:187;i:-1;i:188;i:-2;i:190;i:-1;i:191;i:-1;i:192;i:-1;i:193;i:-1;i:194;i:-1;i:196;i:-1;i:197;i:-2;i:206;i:1;i:207;i:-2;i:218;i:1;i:219;i:1;i:220;i:1;i:222;i:1;i:223;i:-1;i:224;i:-1;i:225;i:1;i:228;i:1;i:229;i:1;i:230;i:1;i:232;i:1;i:233;i:1;i:235;i:1;i:236;i:-1;i:237;i:-2;i:239;i:1;i:240;i:-2;i:249;i:-1;i:250;i:-1;i:251;i:-1;i:252;i:-1;i:253;i:-1;i:254;i:-1;i:256;i:-1;i:257;i:-1;i:258;i:-2;i:260;i:-1;i:261;i:-1;i:262;i:-1;i:263;i:-1;i:264;i:-1;i:266;i:-1;i:267;i:-2;i:278;i:1;i:279;i:1;i:280;i:1;i:281;i:1;i:282;i:1;i:283;i:-1;i:284;i:-1;i:285;i:1;i:286;i:1;i:287;i:1;i:288;i:-1;i:289;i:-2;i:290;i:1;i:291;i:-2;i:302;i:-1;i:303;i:-1;i:304;i:-1;i:305;i:-1;i:306;i:-1;i:307;i:-1;i:308;i:-1;i:309;i:-1;i:311;i:-1;i:312;i:-2;i:321;i:1;i:322;i:-2;i:331;i:-1;i:332;i:-2;i:343;i:-1;i:344;i:-1;i:345;i:-2;i:347;i:-1;i:348;i:-1;i:349;i:-2;i:350;i:-1;i:351;i:-1;i:352;i:-1;i:354;i:-1;i:355;i:-1;i:357;i:-1;i:358;i:-1;i:360;i:-1;i:361;i:-2;i:372;i:-1;i:373;i:-1;i:375;i:-1;i:376;i:-1;i:377;i:-1;i:379;i:-1;i:380;i:-1;i:381;i:-1;i:386;i:-1;i:387;i:-2;i:398;i:-1;i:399;i:-1;i:401;i:-1;i:402;i:-1;i:403;i:-1;i:405;i:-1;i:406;i:-1;i:407;i:-1;i:412;i:-1;i:413;i:-2;i:424;i:-1;i:425;i:-1;i:427;i:-1;i:428;i:-1;i:429;i:-1;i:431;i:-1;i:432;i:-1;i:433;i:-1;i:438;i:-1;i:439;i:-2;i:450;i:1;i:451;i:1;i:453;i:1;i:454;i:1;i:455;i:1;i:457;i:1;i:458;i:1;i:459;i:1;i:464;i:1;i:465;i:-2;i:478;i:-1;i:481;i:-1;i:484;i:-1;i:485;i:-1;i:486;i:-1;i:487;i:-1;i:488;i:-1;i:491;i:-1;i:494;i:-1;i:495;i:-1;i:498;i:-1;i:499;i:-1;i:500;i:-1;i:503;i:-1;i:504;i:-1;i:507;i:-1;i:508;i:-1;i:509;i:-1;i:510;i:-1;i:511;i:-1;i:512;i:-1;i:513;i:-1;i:514;i:-1;i:515;i:-1;i:516;i:-1;i:517;i:-1;i:518;i:-1;i:519;i:-1;i:520;i:-1;i:521;i:-1;i:523;i:-1;i:524;i:-1;i:525;i:-1;i:527;i:-1;i:528;i:-1;i:531;i:-1;i:532;i:-1;i:533;i:-1;i:536;i:-1;i:537;i:-1;i:538;i:-1;i:539;i:-1;i:540;i:-1;i:541;i:-1;i:542;i:-1;i:543;i:-1;i:544;i:-1;i:545;i:-1;i:547;i:-1;i:548;i:-1;i:549;i:-1;i:550;i:-1;i:552;i:-1;i:560;i:-1;i:562;i:-1;i:563;i:-1;i:565;i:-1;i:566;i:-1;i:567;i:-1;i:569;i:-1;i:577;i:-1;i:579;i:-1;i:580;i:-1;i:582;i:-1;i:583;i:-1;i:584;i:-1;i:586;i:-1;i:594;i:-1;i:596;i:-1;i:597;i:-1;i:599;i:-1;i:600;i:-1;i:601;i:-1;i:603;i:-1;i:611;i:-1;i:613;i:-1;i:614;i:-1;i:616;i:-1;i:617;i:-1;i:618;i:-1;i:620;i:-1;i:630;i:-1;i:631;i:-1;i:632;i:-2;i:634;i:-1;i:635;i:-1;i:636;i:-1;i:637;i:-1;i:640;i:-1;i:641;i:-1;i:644;i:-1;i:645;i:-1;i:646;i:-1;i:649;i:-1;i:650;i:-1;i:651;i:-1;i:652;i:-1;i:655;i:-1;i:656;i:-1;i:657;i:-1;i:658;i:-1;i:659;i:-1;i:660;i:-1;i:661;i:-1;i:662;i:-1;i:663;i:-1;i:664;i:-1;i:665;i:-1;i:666;i:-1;i:667;i:-1;i:668;i:-1;i:670;i:-1;i:672;i:-1;i:673;i:-2;i:674;i:-2;i:676;i:-1;i:684;i:-1;i:685;i:-1;i:694;i:-1;i:695;i:-2;i:704;i:-1;i:705;i:-2;i:714;i:-1;i:715;i:-1;i:716;i:-1;i:717;i:-1;i:718;i:-2;i:727;i:-1;i:728;i:-1;i:729;i:-1;i:730;i:-2;i:739;i:-1;i:740;i:-1;i:741;i:-1;i:742;i:-2;i:751;i:1;i:752;i:1;i:753;i:-1;i:754;i:-1;i:755;i:-2;i:756;i:-1;i:758;i:-2;i:767;i:-1;i:768;i:-1;i:770;i:-1;i:771;i:-1;i:773;i:-1;i:775;i:-1;i:777;i:-1;i:779;i:-1;i:781;i:-1;i:782;i:-1;i:783;i:-1;i:785;i:-1;i:786;i:-2;i:796;i:1;i:797;i:1;i:798;i:1;i:799;i:1;i:800;i:1;i:810;i:-1;i:811;i:-1;i:812;i:-1;i:813;i:-1;i:815;i:-1;i:818;i:-1;i:820;i:-1;i:821;i:-1;i:822;i:-1;i:823;i:-1;i:826;i:-1;i:827;i:-1;i:828;i:-1;i:829;i:-1;i:830;i:-1;i:831;i:-1;i:832;i:-1;i:835;i:-1;i:838;i:-1;i:840;i:-1;i:841;i:-1;i:842;i:-1;i:852;i:1;i:853;i:1;i:856;i:1;i:857;i:1;i:858;i:1;i:859;i:1;i:861;i:1;i:863;i:1;i:866;i:1;i:867;i:1;i:868;i:1;i:870;i:1;i:872;i:1;i:873;i:1;i:885;i:-1;i:886;i:-1;i:889;i:-1;i:890;i:-1;i:891;i:-1;i:892;i:-1;i:894;i:-1;i:896;i:-1;i:899;i:-1;i:900;i:-1;i:901;i:-1;i:903;i:-1;i:905;i:-1;i:906;i:-1;i:915;i:1;i:916;i:-2;i:925;i:1;i:926;i:1;i:935;i:1;i:936;i:-2;i:945;i:1;i:946;i:1;i:955;i:-1;i:956;i:-1;i:957;i:-1;i:958;i:-1;i:959;i:-1;i:961;i:-1;i:963;i:-1;i:965;i:-1;i:966;i:-1;i:967;i:-1;i:968;i:-2;i:976;i:1;i:977;i:-1;i:978;i:-2;i:979;i:1;i:980;i:-2;i:989;i:1;i:990;i:-1;i:991;i:-1;i:992;i:1;i:994;i:1;}s:68:"/home/bjarte/public_html/doctrine/lib/Doctrine/Connection/Module.php";a:13:{i:33;i:1;i:49;i:1;i:50;i:1;i:51;i:1;i:52;i:1;i:54;i:1;i:56;i:1;i:57;i:1;i:66;i:1;i:67;i:-2;i:76;i:-1;i:77;i:-2;i:79;i:1;}s:68:"/home/bjarte/public_html/doctrine/lib/Doctrine/Expression/Driver.php";a:137:{i:0;i:1;i:21;i:1;i:33;i:1;i:37;i:1;i:38;i:-2;i:41;i:1;i:42;i:-2;i:51;i:1;i:52;i:-2;i:61;i:1;i:62;i:1;i:63;i:-2;i:76;i:1;i:77;i:1;i:78;i:-2;i:88;i:1;i:89;i:1;i:90;i:-2;i:100;i:1;i:101;i:1;i:102;i:-2;i:112;i:1;i:113;i:1;i:114;i:-2;i:127;i:-1;i:128;i:-1;i:129;i:-2;i:140;i:1;i:141;i:1;i:142;i:-2;i:153;i:1;i:155;i:1;i:156;i:-2;i:168;i:1;i:169;i:1;i:170;i:1;i:171;i:-2;i:182;i:1;i:183;i:-2;i:194;i:-1;i:195;i:-2;i:206;i:1;i:207;i:-2;i:218;i:1;i:219;i:-2;i:230;i:1;i:231;i:-2;i:242;i:1;i:243;i:-2;i:251;i:1;i:252;i:-2;i:265;i:1;i:266;i:-2;i:281;i:1;i:282;i:1;i:283;i:1;i:285;i:1;i:286;i:1;i:288;i:-2;i:299;i:1;i:301;i:1;i:302;i:-2;i:318;i:1;i:319;i:1;i:320;i:-2;i:335;i:1;i:336;i:1;i:337;i:-1;i:338;i:-2;i:339;i:1;i:340;i:-1;i:341;i:-2;i:342;i:1;i:344;i:-2;i:367;i:1;i:368;i:-2;i:392;i:1;i:393;i:-2;i:417;i:1;i:418;i:-2;i:442;i:1;i:443;i:-2;i:462;i:1;i:463;i:1;i:464;i:1;i:465;i:-2;i:484;i:1;i:485;i:1;i:486;i:1;i:487;i:-2;i:506;i:1;i:507;i:1;i:508;i:1;i:509;i:-2;i:529;i:1;i:530;i:1;i:531;i:1;i:532;i:-2;i:551;i:1;i:552;i:1;i:553;i:1;i:554;i:-2;i:574;i:1;i:575;i:1;i:576;i:1;i:577;i:-2;i:602;i:1;i:603;i:-1;i:604;i:-1;i:605;i:1;i:606;i:1;i:608;i:1;i:609;i:-1;i:610;i:-2;i:611;i:1;i:612;i:-2;i:629;i:1;i:630;i:1;i:631;i:-2;i:648;i:1;i:649;i:1;i:650;i:-2;i:676;i:1;i:677;i:1;i:678;i:1;i:679;i:1;i:680;i:-2;i:688;i:-1;i:689;i:-2;i:697;i:-1;i:698;i:-2;i:706;i:1;i:707;i:1;i:708;i:-2;i:709;i:1;i:710;i:-2;i:712;i:1;}s:51:"/home/bjarte/public_html/doctrine/models/Entity.php";a:18:{i:6;i:1;i:7;i:1;i:8;i:1;i:9;i:1;i:10;i:1;i:11;i:1;i:12;i:1;i:13;i:1;i:16;i:1;i:17;i:1;i:18;i:1;i:19;i:1;i:20;i:1;i:21;i:1;i:22;i:1;i:23;i:1;i:24;i:1;i:25;i:1;}s:68:"/home/bjarte/public_html/doctrine/tests/Connection/PgsqlTestCase.php";a:78:{i:38;i:1;i:40;i:1;i:41;i:1;i:45;i:1;i:47;i:1;i:48;i:1;i:52;i:1;i:54;i:1;i:55;i:1;i:59;i:1;i:61;i:1;i:62;i:1;i:66;i:1;i:68;i:1;i:69;i:1;i:73;i:1;i:75;i:1;i:76;i:1;i:80;i:1;i:82;i:1;i:83;i:1;i:87;i:1;i:89;i:1;i:90;i:1;i:94;i:1;i:96;i:1;i:97;i:1;i:101;i:1;i:103;i:1;i:104;i:1;i:108;i:1;i:110;i:1;i:111;i:1;i:115;i:1;i:117;i:1;i:118;i:1;i:122;i:1;i:124;i:1;i:125;i:1;i:129;i:1;i:131;i:1;i:132;i:1;i:136;i:1;i:138;i:1;i:139;i:1;i:143;i:1;i:145;i:1;i:146;i:1;i:150;i:1;i:152;i:1;i:153;i:1;i:157;i:1;i:159;i:1;i:160;i:1;i:164;i:1;i:166;i:1;i:167;i:1;i:171;i:1;i:173;i:1;i:174;i:1;i:178;i:1;i:180;i:1;i:181;i:1;i:185;i:1;i:187;i:1;i:188;i:1;i:192;i:1;i:194;i:1;i:195;i:1;i:199;i:1;i:201;i:1;i:202;i:1;i:206;i:1;i:208;i:1;i:209;i:1;i:213;i:1;i:215;i:1;i:216;i:1;}s:67:"/home/bjarte/public_html/doctrine/lib/Doctrine/Connection/Mysql.php";a:70:{i:21;i:1;i:34;i:1;i:48;i:1;i:49;i:1;i:51;i:-1;i:52;i:1;i:53;i:1;i:54;i:1;i:55;i:1;i:56;i:1;i:57;i:1;i:58;i:1;i:59;i:1;i:60;i:1;i:61;i:1;i:62;i:1;i:63;i:1;i:64;i:1;i:65;i:1;i:66;i:1;i:67;i:1;i:68;i:1;i:70;i:1;i:72;i:1;i:73;i:1;i:74;i:1;i:75;i:1;i:77;i:1;i:78;i:1;i:79;i:1;i:81;i:1;i:82;i:1;i:83;i:1;i:84;i:1;i:87;i:1;i:89;i:1;i:90;i:1;i:100;i:-1;i:101;i:-1;i:102;i:-1;i:169;i:-1;i:170;i:-1;i:171;i:-1;i:173;i:-1;i:174;i:-1;i:176;i:-1;i:177;i:-1;i:178;i:-1;i:179;i:-1;i:181;i:-1;i:183;i:-1;i:184;i:-1;i:185;i:-1;i:186;i:-1;i:187;i:-1;i:190;i:-1;i:192;i:-1;i:193;i:-1;i:194;i:-1;i:195;i:-2;i:196;i:-1;i:197;i:-1;i:198;i:-1;i:200;i:-1;i:201;i:-1;i:202;i:-2;i:203;i:-1;i:205;i:-1;i:206;i:-2;i:208;i:1;}s:69:"/home/bjarte/public_html/doctrine/tests/DataDict/FirebirdTestCase.php";a:145:{i:37;i:1;i:38;i:1;i:41;i:1;i:42;i:1;i:46;i:1;i:47;i:-1;i:48;i:1;i:49;i:1;i:51;i:1;i:54;i:1;i:56;i:1;i:57;i:1;i:58;i:1;i:59;i:1;i:60;i:1;i:63;i:1;i:65;i:1;i:66;i:1;i:67;i:1;i:68;i:1;i:69;i:1;i:72;i:1;i:74;i:1;i:75;i:1;i:76;i:1;i:77;i:1;i:78;i:1;i:81;i:1;i:83;i:1;i:84;i:1;i:85;i:1;i:86;i:1;i:87;i:1;i:90;i:1;i:92;i:1;i:93;i:1;i:94;i:1;i:95;i:1;i:96;i:1;i:98;i:1;i:100;i:1;i:101;i:1;i:102;i:1;i:103;i:1;i:104;i:1;i:107;i:1;i:109;i:1;i:110;i:1;i:111;i:1;i:112;i:1;i:113;i:1;i:116;i:1;i:118;i:1;i:119;i:1;i:120;i:1;i:121;i:1;i:122;i:1;i:125;i:1;i:127;i:1;i:128;i:1;i:129;i:1;i:130;i:1;i:131;i:1;i:134;i:1;i:136;i:1;i:137;i:1;i:138;i:1;i:139;i:1;i:140;i:1;i:143;i:1;i:145;i:1;i:146;i:1;i:147;i:1;i:148;i:1;i:149;i:1;i:152;i:1;i:154;i:1;i:155;i:1;i:156;i:1;i:157;i:1;i:158;i:1;i:161;i:1;i:163;i:1;i:164;i:1;i:165;i:1;i:166;i:1;i:167;i:1;i:170;i:1;i:172;i:1;i:173;i:1;i:174;i:1;i:175;i:1;i:176;i:1;i:179;i:1;i:181;i:1;i:182;i:1;i:183;i:1;i:184;i:1;i:185;i:1;i:188;i:1;i:190;i:1;i:192;i:1;i:194;i:1;i:196;i:1;i:198;i:1;i:199;i:1;i:203;i:1;i:205;i:1;i:206;i:1;i:209;i:1;i:211;i:1;i:212;i:1;i:215;i:1;i:217;i:1;i:218;i:1;i:221;i:1;i:223;i:1;i:224;i:1;i:227;i:1;i:229;i:1;i:230;i:1;i:233;i:1;i:235;i:1;i:236;i:1;i:239;i:1;i:241;i:1;i:242;i:1;i:245;i:1;i:247;i:1;i:248;i:1;i:251;i:1;i:253;i:1;i:254;i:1;i:257;i:1;i:259;i:1;i:260;i:1;i:263;i:1;i:265;i:1;i:266;i:1;i:269;i:1;i:271;i:1;i:272;i:1;i:275;i:1;i:277;i:1;i:278;i:1;}s:66:"/home/bjarte/public_html/doctrine/tests/Sequence/MssqlTestCase.php";a:17:{i:37;i:1;i:39;i:1;i:41;i:1;i:42;i:1;i:43;i:1;i:44;i:1;i:45;i:1;i:48;i:1;i:50;i:1;i:52;i:1;i:53;i:1;i:54;i:1;i:55;i:1;i:56;i:1;i:59;i:1;i:61;i:1;i:62;i:1;}s:72:"/home/bjarte/public_html/doctrine/tests/Relation/ManyToMany2TestCase.php";a:59:{i:37;i:1;i:41;i:1;i:42;i:1;i:43;i:1;i:47;i:1;i:48;i:1;i:49;i:1;i:51;i:1;i:52;i:1;i:53;i:1;i:54;i:1;i:55;i:1;i:56;i:1;i:58;i:1;i:60;i:1;i:61;i:1;i:62;i:1;i:63;i:1;i:64;i:1;i:65;i:1;i:67;i:1;i:68;i:1;i:69;i:1;i:70;i:-2;i:73;i:1;i:76;i:1;i:77;i:1;i:78;i:1;i:79;i:1;i:80;i:1;i:81;i:1;i:83;i:1;i:84;i:1;i:85;i:1;i:86;i:-2;i:88;i:1;i:92;i:1;i:93;i:1;i:94;i:1;i:96;i:1;i:97;i:1;i:98;i:1;i:100;i:1;i:101;i:1;i:102;i:1;i:104;i:1;i:105;i:1;i:109;i:1;i:111;i:1;i:113;i:1;i:115;i:1;i:117;i:1;i:119;i:1;i:121;i:1;i:122;i:1;i:123;i:1;i:125;i:1;i:127;i:1;i:133;i:1;}s:56:"/home/bjarte/public_html/doctrine/models/SelfRefTest.php";a:5:{i:6;i:1;i:7;i:1;i:8;i:1;i:11;i:1;i:12;i:1;}s:55:"/home/bjarte/public_html/doctrine/lib/Doctrine/Hook.php";a:70:{i:34;i:1;i:78;i:1;i:79;i:1;i:80;i:1;i:81;i:1;i:82;i:-1;i:83;i:-1;i:84;i:-1;i:87;i:1;i:88;i:1;i:96;i:1;i:97;i:-2;i:106;i:-1;i:107;i:-1;i:116;i:-1;i:117;i:-1;i:128;i:1;i:129;i:-1;i:130;i:-2;i:131;i:1;i:132;i:1;i:133;i:-1;i:134;i:-2;i:135;i:1;i:137;i:1;i:138;i:1;i:140;i:1;i:141;i:1;i:143;i:1;i:144;i:-1;i:145;i:-2;i:147;i:1;i:149;i:1;i:150;i:1;i:151;i:1;i:152;i:1;i:153;i:1;i:155;i:1;i:157;i:1;i:158;i:1;i:159;i:1;i:160;i:1;i:162;i:1;i:163;i:-2;i:174;i:1;i:175;i:-1;i:176;i:-2;i:177;i:1;i:178;i:1;i:180;i:1;i:182;i:1;i:183;i:1;i:184;i:1;i:186;i:1;i:188;i:1;i:189;i:1;i:191;i:1;i:192;i:1;i:194;i:1;i:195;i:1;i:196;i:1;i:197;i:1;i:198;i:1;i:199;i:1;i:200;i:-2;i:206;i:-1;i:207;i:-1;i:213;i:-1;i:214;i:-1;i:216;i:1;}s:71:"/home/bjarte/public_html/doctrine/tests/Connection/ProfilerTestCase.php";a:87:{i:37;i:-1;i:39;i:-1;i:41;i:1;i:45;i:1;i:47;i:1;i:49;i:1;i:51;i:1;i:53;i:1;i:54;i:1;i:55;i:1;i:56;i:1;i:58;i:1;i:59;i:1;i:64;i:1;i:65;i:1;i:67;i:1;i:68;i:1;i:69;i:1;i:70;i:1;i:72;i:1;i:74;i:1;i:75;i:1;i:76;i:1;i:77;i:1;i:79;i:1;i:80;i:1;i:85;i:1;i:86;i:1;i:87;i:1;i:88;i:1;i:89;i:1;i:91;i:1;i:92;i:1;i:93;i:1;i:94;i:1;i:95;i:1;i:107;i:1;i:112;i:1;i:113;i:1;i:114;i:1;i:115;i:1;i:116;i:1;i:118;i:-2;i:120;i:1;i:121;i:1;i:122;i:1;i:123;i:1;i:125;i:1;i:126;i:1;i:127;i:1;i:128;i:1;i:129;i:1;i:134;i:1;i:135;i:1;i:136;i:1;i:137;i:-2;i:139;i:1;i:140;i:1;i:141;i:1;i:142;i:1;i:145;i:1;i:146;i:1;i:147;i:1;i:148;i:-2;i:151;i:1;i:152;i:1;i:153;i:1;i:154;i:1;i:155;i:1;i:160;i:1;i:161;i:1;i:162;i:1;i:163;i:-2;i:165;i:1;i:166;i:1;i:167;i:1;i:168;i:1;i:171;i:1;i:172;i:1;i:173;i:1;i:174;i:-2;i:175;i:-2;i:178;i:1;i:179;i:1;i:180;i:1;i:181;i:1;i:182;i:1;}s:62:"/home/bjarte/public_html/doctrine/lib/Doctrine/Query/Check.php";a:60:{i:34;i:1;i:49;i:1;i:50;i:1;i:51;i:1;i:52;i:1;i:53;i:1;i:54;i:1;i:55;i:1;i:64;i:-1;i:65;i:-2;i:74;i:1;i:75;i:1;i:86;i:1;i:88;i:1;i:89;i:-1;i:90;i:-1;i:91;i:-1;i:92;i:-1;i:94;i:-1;i:95;i:-1;i:96;i:1;i:97;i:1;i:98;i:-1;i:99;i:-1;i:100;i:-1;i:101;i:-1;i:103;i:-1;i:104;i:-1;i:105;i:1;i:106;i:1;i:109;i:-1;i:110;i:-2;i:113;i:1;i:115;i:1;i:117;i:1;i:118;i:1;i:119;i:1;i:120;i:1;i:121;i:1;i:122;i:1;i:124;i:1;i:125;i:1;i:126;i:1;i:127;i:1;i:129;i:1;i:130;i:-2;i:133;i:1;i:134;i:1;i:135;i:1;i:137;i:1;i:139;i:1;i:140;i:1;i:141;i:-2;i:143;i:1;i:144;i:1;i:145;i:1;i:146;i:-2;i:157;i:1;i:158;i:-2;i:160;i:1;}s:55:"/home/bjarte/public_html/doctrine/models/TestRecord.php";a:2:{i:6;i:1;i:7;i:1;}s:63:"/home/bjarte/public_html/doctrine/tests/ColumnAliasTestCase.php";a:41:{i:36;i:1;i:39;i:1;i:41;i:1;i:42;i:1;i:46;i:1;i:48;i:1;i:49;i:1;i:51;i:1;i:52;i:1;i:53;i:1;i:54;i:-2;i:56;i:1;i:57;i:1;i:60;i:1;i:62;i:1;i:64;i:1;i:66;i:1;i:67;i:1;i:68;i:1;i:71;i:1;i:73;i:1;i:74;i:1;i:75;i:1;i:77;i:1;i:79;i:1;i:80;i:1;i:81;i:1;i:84;i:1;i:86;i:1;i:87;i:1;i:89;i:1;i:91;i:1;i:92;i:1;i:95;i:1;i:97;i:1;i:98;i:1;i:99;i:1;i:100;i:1;i:102;i:1;i:104;i:1;i:105;i:1;}s:64:"/home/bjarte/public_html/doctrine/lib/Doctrine/Import/Schema.php";a:12:{i:41;i:1;i:74;i:1;i:75;i:1;i:77;i:1;i:79;i:1;i:80;i:1;i:81;i:1;i:83;i:1;i:85;i:1;i:86;i:1;i:87;i:1;i:88;i:1;}s:64:"/home/bjarte/public_html/doctrine/lib/Doctrine/Record/Filter.php";a:78:{i:34;i:1;i:47;i:1;i:48;i:1;i:56;i:-1;i:57;i:-2;i:67;i:-1;i:69;i:-1;i:70;i:-1;i:71;i:-2;i:72;i:-1;i:73;i:-1;i:74;i:-1;i:76;i:-1;i:77;i:-1;i:78;i:-1;i:80;i:-1;i:81;i:-1;i:82;i:-1;i:83;i:-1;i:84;i:-1;i:85;i:-1;i:86;i:-1;i:87;i:-1;i:97;i:-1;i:98;i:-1;i:99;i:-1;i:100;i:-1;i:101;i:-1;i:102;i:-1;i:103;i:-1;i:104;i:-1;i:106;i:-1;i:107;i:-1;i:108;i:-1;i:109;i:-1;i:110;i:-1;i:112;i:-1;i:123;i:-1;i:125;i:-1;i:126;i:-1;i:127;i:-1;i:128;i:-1;i:129;i:-1;i:131;i:-1;i:132;i:-1;i:133;i:-1;i:134;i:-2;i:137;i:-1;i:138;i:-1;i:139;i:-1;i:140;i:-1;i:141;i:-1;i:142;i:-1;i:143;i:-1;i:144;i:-1;i:145;i:-1;i:146;i:-1;i:147;i:-1;i:148;i:-1;i:149;i:-1;i:150;i:-1;i:151;i:-1;i:152;i:-1;i:153;i:-1;i:155;i:-1;i:156;i:-1;i:157;i:-1;i:158;i:-1;i:159;i:-1;i:160;i:-1;i:162;i:-1;i:163;i:-1;i:164;i:-1;i:165;i:-1;i:166;i:-1;i:168;i:-1;i:169;i:-2;i:171;i:1;}s:66:"/home/bjarte/public_html/doctrine/lib/Doctrine/Record/Abstract.php";a:102:{i:47;i:-1;i:49;i:-1;i:50;i:-2;i:58;i:-1;i:59;i:-2;i:68;i:-1;i:70;i:-1;i:71;i:-2;i:84;i:1;i:85;i:-1;i:86;i:-2;i:87;i:1;i:89;i:-2;i:92;i:1;i:93;i:1;i:96;i:1;i:97;i:1;i:100;i:-1;i:101;i:-1;i:105;i:1;i:106;i:1;i:107;i:1;i:108;i:-2;i:109;i:1;i:110;i:1;i:111;i:1;i:112;i:1;i:113;i:1;i:114;i:1;i:115;i:1;i:128;i:-1;i:129;i:-1;i:130;i:-1;i:131;i:-1;i:132;i:-1;i:133;i:-1;i:134;i:-1;i:136;i:-1;i:137;i:-1;i:139;i:-1;i:151;i:1;i:152;i:-1;i:153;i:-1;i:154;i:-1;i:155;i:-1;i:156;i:-1;i:157;i:-1;i:159;i:-1;i:160;i:1;i:162;i:1;i:174;i:1;i:176;i:1;i:177;i:-2;i:189;i:1;i:190;i:1;i:191;i:-2;i:203;i:1;i:205;i:1;i:206;i:-2;i:218;i:1;i:220;i:1;i:221;i:-2;i:234;i:1;i:235;i:1;i:238;i:-1;i:239;i:-1;i:240;i:-1;i:241;i:-1;i:249;i:-1;i:250;i:-1;i:252;i:-1;i:254;i:-1;i:255;i:-1;i:256;i:-2;i:267;i:1;i:268;i:1;i:269;i:-1;i:270;i:-1;i:271;i:1;i:273;i:1;i:274;i:-1;i:275;i:-2;i:278;i:1;i:280;i:1;i:282;i:1;i:283;i:-1;i:284;i:-2;i:285;i:1;i:287;i:1;i:289;i:1;i:290;i:1;i:291;i:1;i:293;i:1;i:294;i:-2;i:305;i:-1;i:306;i:-1;i:307;i:-1;i:308;i:-1;i:309;i:-1;i:310;i:-1;i:312;i:-1;i:313;i:-2;}s:57:"/home/bjarte/public_html/doctrine/models/FooBarRecord.php";a:3:{i:6;i:1;i:7;i:1;i:8;i:1;}s:62:"/home/bjarte/public_html/doctrine/models/FooForeignlyOwned.php";a:3:{i:6;i:1;i:7;i:1;i:8;i:1;}s:63:"/home/bjarte/public_html/doctrine/lib/Doctrine/Import/Mssql.php";a:75:{i:21;i:1;i:34;i:1;i:44;i:1;i:45;i:1;i:47;i:1;i:48;i:-2;i:57;i:1;i:58;i:1;i:59;i:1;i:61;i:1;i:62;i:-1;i:64;i:-1;i:65;i:-1;i:66;i:-1;i:67;i:-1;i:68;i:-1;i:71;i:-1;i:72;i:-1;i:73;i:-1;i:75;i:-1;i:78;i:-1;i:79;i:-1;i:80;i:-1;i:81;i:-1;i:82;i:-1;i:83;i:-1;i:84;i:-1;i:85;i:-1;i:86;i:-1;i:87;i:-1;i:88;i:-1;i:89;i:-1;i:90;i:-1;i:92;i:1;i:93;i:-2;i:103;i:-1;i:112;i:1;i:114;i:1;i:115;i:-2;i:123;i:1;i:125;i:1;i:127;i:1;i:128;i:-2;i:137;i:1;i:138;i:1;i:140;i:1;i:142;i:1;i:143;i:-2;i:152;i:-1;i:153;i:-1;i:154;i:-1;i:155;i:-1;i:156;i:-1;i:157;i:-1;i:158;i:-1;i:159;i:-1;i:160;i:-1;i:162;i:-1;i:163;i:-1;i:164;i:-1;i:165;i:-1;i:167;i:-1;i:168;i:-1;i:170;i:-1;i:172;i:-1;i:173;i:-1;i:174;i:-1;i:175;i:-1;i:176;i:-1;i:178;i:-1;i:179;i:-2;i:188;i:1;i:190;i:1;i:191;i:-2;i:193;i:1;}s:53:"/home/bjarte/public_html/doctrine/models/NestTest.php";a:13:{i:6;i:1;i:7;i:1;i:10;i:1;i:11;i:1;i:12;i:1;i:13;i:1;i:14;i:1;i:15;i:1;i:17;i:1;i:18;i:1;i:19;i:1;i:20;i:1;i:21;i:1;}s:59:"/home/bjarte/public_html/doctrine/models/Record_Country.php";a:4:{i:4;i:1;i:5;i:1;i:7;i:1;i:8;i:1;}s:67:"/home/bjarte/public_html/doctrine/lib/Doctrine/Validator/Unique.php";a:21:{i:34;i:1;i:43;i:1;i:44;i:1;i:46;i:1;i:47;i:-1;i:48;i:-1;i:50;i:1;i:52;i:1;i:53;i:1;i:58;i:1;i:59;i:1;i:60;i:1;i:61;i:1;i:62;i:1;i:63;i:1;i:64;i:1;i:66;i:1;i:67;i:1;i:69;i:1;i:70;i:-2;i:72;i:1;}s:72:"/home/bjarte/public_html/doctrine/tests/Query/ReferenceModelTestCase.php";a:44:{i:35;i:1;i:36;i:1;i:37;i:1;i:38;i:1;i:39;i:1;i:41;i:1;i:42;i:1;i:43;i:1;i:45;i:1;i:48;i:1;i:50;i:1;i:52;i:1;i:53;i:1;i:54;i:1;i:55;i:1;i:56;i:1;i:57;i:1;i:58;i:1;i:60;i:1;i:61;i:1;i:63;i:1;i:65;i:1;i:66;i:1;i:67;i:1;i:68;i:1;i:69;i:1;i:70;i:1;i:71;i:1;i:73;i:1;i:74;i:1;i:77;i:1;i:79;i:1;i:80;i:1;i:82;i:1;i:84;i:1;i:86;i:1;i:87;i:1;i:88;i:1;i:89;i:1;i:90;i:1;i:91;i:1;i:92;i:1;i:94;i:1;i:95;i:1;}s:63:"/home/bjarte/public_html/doctrine/tests/Record/HookTestCase.php";a:41:{i:36;i:1;i:39;i:1;i:41;i:1;i:42;i:1;i:46;i:1;i:48;i:1;i:49;i:1;i:51;i:1;i:52;i:1;i:53;i:1;i:54;i:1;i:55;i:1;i:59;i:1;i:60;i:1;i:62;i:1;i:63;i:1;i:65;i:1;i:66;i:1;i:67;i:1;i:68;i:1;i:69;i:1;i:73;i:1;i:74;i:1;i:76;i:1;i:78;i:1;i:79;i:1;i:80;i:1;i:84;i:1;i:85;i:1;i:86;i:1;i:87;i:1;i:89;i:1;i:90;i:1;i:92;i:1;i:93;i:1;i:96;i:1;i:97;i:1;i:98;i:1;i:99;i:1;i:100;i:-2;i:102;i:1;}s:60:"/home/bjarte/public_html/doctrine/models/InheritanceTest.php";a:5:{i:6;i:1;i:7;i:1;i:9;i:1;i:10;i:1;i:11;i:1;}s:73:"/home/bjarte/public_html/doctrine/models/NestedSetTest_SingleRootNode.php";a:3:{i:5;i:1;i:6;i:1;i:7;i:1;}s:64:"/home/bjarte/public_html/doctrine/lib/Doctrine/Export/Sqlite.php";a:111:{i:21;i:1;i:34;i:1;i:46;i:1;i:47;i:1;i:48;i:1;i:49;i:-2;i:50;i:-1;i:51;i:-1;i:52;i:-1;i:53;i:-2;i:54;i:-1;i:90;i:1;i:91;i:1;i:92;i:1;i:93;i:1;i:95;i:1;i:96;i:-2;i:106;i:1;i:108;i:1;i:109;i:1;i:111;i:1;i:112;i:1;i:113;i:1;i:115;i:1;i:116;i:1;i:117;i:1;i:118;i:1;i:119;i:1;i:120;i:1;i:121;i:1;i:122;i:1;i:123;i:1;i:124;i:1;i:126;i:1;i:127;i:1;i:128;i:1;i:129;i:-2;i:160;i:1;i:161;i:1;i:162;i:-2;i:164;i:1;i:165;i:1;i:166;i:-2;i:167;i:1;i:169;i:1;i:170;i:1;i:171;i:1;i:172;i:1;i:173;i:1;i:174;i:1;i:175;i:-2;i:176;i:1;i:178;i:1;i:179;i:1;i:180;i:1;i:182;i:1;i:183;i:1;i:185;i:1;i:186;i:-1;i:187;i:-1;i:189;i:1;i:190;i:-1;i:191;i:-1;i:193;i:1;i:195;i:1;i:197;i:1;i:198;i:1;i:199;i:1;i:200;i:1;i:201;i:1;i:202;i:1;i:243;i:-2;i:255;i:-1;i:256;i:-1;i:257;i:-1;i:258;i:-1;i:259;i:-1;i:260;i:-1;i:261;i:-1;i:262;i:-1;i:263;i:-1;i:264;i:-1;i:265;i:-1;i:266;i:-1;i:267;i:-1;i:268;i:-1;i:270;i:-1;i:271;i:-1;i:272;i:-1;i:273;i:-1;i:275;i:-1;i:276;i:-2;i:292;i:-1;i:293;i:-1;i:294;i:-1;i:296;i:-1;i:298;i:-1;i:299;i:-1;i:300;i:-2;i:303;i:-1;i:304;i:-1;i:305;i:-2;i:309;i:-2;i:310;i:-2;i:311;i:-2;i:314;i:-2;i:315;i:-2;i:324;i:-1;i:326;i:-1;i:327;i:-2;i:329;i:1;}s:69:"/home/bjarte/public_html/doctrine/lib/Doctrine/Transaction/Sqlite.php";a:17:{i:21;i:1;i:33;i:1;i:50;i:1;i:51;i:1;i:52;i:1;i:53;i:1;i:54;i:1;i:55;i:1;i:56;i:1;i:57;i:1;i:58;i:1;i:59;i:1;i:60;i:1;i:62;i:1;i:64;i:1;i:65;i:-2;i:67;i:1;}s:68:"/home/bjarte/public_html/doctrine/lib/Doctrine/Adapter/Interface.php";a:2:{i:33;i:1;i:45;i:1;}s:69:"/home/bjarte/public_html/doctrine/lib/Doctrine/Transaction/Oracle.php";a:25:{i:21;i:1;i:33;i:1;i:44;i:1;i:46;i:1;i:47;i:-2;i:58;i:1;i:59;i:-2;i:69;i:1;i:71;i:1;i:72;i:-2;i:88;i:1;i:89;i:1;i:90;i:1;i:91;i:1;i:92;i:1;i:93;i:1;i:94;i:1;i:95;i:1;i:96;i:1;i:97;i:1;i:98;i:1;i:100;i:1;i:101;i:1;i:102;i:-2;i:104;i:1;}s:64:"/home/bjarte/public_html/doctrine/lib/Doctrine/Export/Oracle.php";a:157:{i:21;i:1;i:34;i:1;i:46;i:-1;i:47;i:-1;i:49;i:-1;i:50;i:-1;i:52;i:-1;i:53;i:-1;i:55;i:-1;i:56;i:-1;i:59;i:-1;i:60;i:-1;i:61;i:-1;i:62;i:-1;i:63;i:-1;i:65;i:-1;i:66;i:-2;i:77;i:-1;i:78;i:-1;i:79;i:-1;i:81;i:-1;i:83;i:-1;i:84;i:-2;i:96;i:1;i:97;i:1;i:98;i:1;i:100;i:1;i:101;i:1;i:102;i:1;i:104;i:1;i:106;i:1;i:107;i:-1;i:108;i:-1;i:110;i:-1;i:111;i:-1;i:113;i:1;i:115;i:1;i:116;i:1;i:117;i:1;i:118;i:1;i:119;i:1;i:121;i:1;i:127;i:1;i:128;i:1;i:129;i:1;i:133;i:1;i:136;i:1;i:140;i:1;i:141;i:1;i:142;i:-2;i:151;i:-1;i:152;i:-1;i:153;i:-1;i:154;i:-1;i:155;i:-1;i:156;i:-1;i:158;i:-1;i:159;i:-1;i:160;i:-1;i:163;i:-1;i:166;i:-1;i:168;i:-1;i:171;i:-1;i:172;i:-1;i:173;i:-1;i:183;i:-1;i:184;i:-2;i:196;i:-1;i:197;i:-1;i:198;i:-1;i:199;i:-1;i:200;i:-1;i:201;i:-1;i:202;i:-1;i:203;i:-1;i:205;i:-1;i:206;i:-1;i:207;i:-1;i:208;i:-1;i:210;i:-1;i:211;i:-2;i:246;i:1;i:248;i:1;i:249;i:1;i:250;i:1;i:252;i:1;i:253;i:1;i:288;i:1;i:290;i:1;i:291;i:1;i:292;i:1;i:293;i:1;i:294;i:1;i:295;i:1;i:297;i:1;i:298;i:-2;i:308;i:-1;i:309;i:-1;i:311;i:-1;i:312;i:-2;i:404;i:-1;i:406;i:-1;i:407;i:-1;i:408;i:-1;i:409;i:-1;i:410;i:-1;i:411;i:-1;i:412;i:-1;i:413;i:-1;i:414;i:-1;i:415;i:-1;i:417;i:-1;i:418;i:-1;i:419;i:-2;i:421;i:-1;i:423;i:-1;i:424;i:-1;i:425;i:-1;i:426;i:-1;i:427;i:-1;i:428;i:-1;i:429;i:-1;i:431;i:-1;i:432;i:-1;i:433;i:-1;i:434;i:-1;i:435;i:-1;i:436;i:-1;i:437;i:-1;i:439;i:-1;i:440;i:-1;i:441;i:-1;i:442;i:-1;i:444;i:-1;i:445;i:-1;i:446;i:-1;i:448;i:-1;i:449;i:-1;i:450;i:-1;i:451;i:-1;i:452;i:-1;i:453;i:-1;i:454;i:-1;i:456;i:-1;i:457;i:-1;i:458;i:-1;i:459;i:-1;i:460;i:-1;i:476;i:1;i:477;i:1;i:478;i:1;i:479;i:1;i:480;i:-2;i:490;i:1;i:491;i:1;i:492;i:-2;i:494;i:1;}s:55:"/home/bjarte/public_html/doctrine/models/MysqlGroup.php";a:3:{i:6;i:1;i:8;i:1;i:9;i:1;}s:57:"/home/bjarte/public_html/doctrine/lib/Doctrine/Import.php";a:54:{i:21;i:1;i:37;i:1;i:47;i:1;i:48;i:-1;i:49;i:-2;i:51;i:1;i:52;i:-2;i:60;i:1;i:61;i:-1;i:62;i:-2;i:64;i:1;i:65;i:-2;i:74;i:-1;i:75;i:-2;i:84;i:1;i:85;i:-1;i:86;i:-2;i:88;i:1;i:89;i:-2;i:98;i:-1;i:99;i:-2;i:108;i:-1;i:109;i:-2;i:118;i:-1;i:119;i:-2;i:128;i:-1;i:129;i:-2;i:138;i:-1;i:139;i:-2;i:148;i:-1;i:149;i:-2;i:157;i:1;i:158;i:-1;i:159;i:-2;i:161;i:1;i:162;i:-2;i:171;i:1;i:172;i:-1;i:173;i:-2;i:175;i:1;i:176;i:-2;i:188;i:-1;i:189;i:-1;i:191;i:-1;i:192;i:-1;i:193;i:-1;i:194;i:-1;i:195;i:-1;i:196;i:-1;i:198;i:-1;i:199;i:-1;i:201;i:-1;i:202;i:-2;i:204;i:1;}s:57:"/home/bjarte/public_html/doctrine/tests/TableTestCase.php";a:123:{i:38;i:1;i:39;i:1;i:40;i:1;i:44;i:1;i:46;i:1;i:48;i:1;i:49;i:1;i:50;i:1;i:51;i:1;i:52;i:1;i:53;i:1;i:55;i:1;i:56;i:1;i:57;i:1;i:58;i:1;i:59;i:1;i:61;i:1;i:63;i:1;i:64;i:1;i:65;i:1;i:66;i:1;i:67;i:1;i:69;i:1;i:71;i:1;i:72;i:1;i:73;i:1;i:74;i:1;i:75;i:1;i:77;i:1;i:79;i:1;i:81;i:1;i:82;i:1;i:83;i:1;i:84;i:1;i:85;i:1;i:87;i:1;i:88;i:1;i:92;i:1;i:93;i:1;i:94;i:1;i:95;i:1;i:96;i:1;i:97;i:1;i:99;i:1;i:100;i:1;i:101;i:1;i:102;i:1;i:103;i:1;i:104;i:1;i:107;i:1;i:108;i:1;i:109;i:1;i:110;i:1;i:111;i:1;i:112;i:1;i:115;i:1;i:118;i:1;i:119;i:1;i:123;i:1;i:124;i:1;i:128;i:1;i:129;i:1;i:133;i:1;i:134;i:1;i:138;i:1;i:139;i:1;i:140;i:1;i:141;i:1;i:145;i:1;i:146;i:1;i:147;i:1;i:148;i:1;i:152;i:1;i:153;i:1;i:156;i:1;i:157;i:1;i:158;i:1;i:159;i:-2;i:163;i:1;i:164;i:1;i:165;i:1;i:166;i:1;i:167;i:1;i:168;i:1;i:169;i:1;i:170;i:-2;i:174;i:1;i:175;i:1;i:176;i:1;i:177;i:-2;i:181;i:1;i:182;i:1;i:183;i:1;i:184;i:-2;i:188;i:1;i:189;i:1;i:190;i:1;i:191;i:-2;i:193;i:1;i:197;i:1;i:198;i:1;i:199;i:1;i:201;i:1;i:202;i:1;i:203;i:1;i:204;i:1;i:205;i:1;i:206;i:1;i:210;i:1;i:211;i:1;i:212;i:1;i:213;i:1;i:217;i:1;i:218;i:1;i:221;i:1;i:222;i:1;i:223;i:-2;i:225;i:1;i:229;i:1;i:230;i:1;i:232;i:1;i:236;i:1;i:237;i:1;}s:53:"/home/bjarte/public_html/doctrine/models/EnumTest.php";a:6:{i:5;i:1;i:6;i:1;i:7;i:1;i:9;i:1;i:10;i:1;i:11;i:1;}s:61:"/home/bjarte/public_html/doctrine/tests/ValidatorTestCase.php";a:219:{i:40;i:1;i:41;i:1;i:42;i:1;i:43;i:1;i:44;i:1;i:45;i:1;i:46;i:1;i:47;i:1;i:51;i:1;i:52;i:1;i:53;i:1;i:54;i:1;i:55;i:1;i:56;i:1;i:58;i:1;i:59;i:1;i:60;i:1;i:61;i:1;i:62;i:1;i:63;i:1;i:65;i:1;i:66;i:1;i:67;i:1;i:68;i:1;i:69;i:1;i:70;i:1;i:72;i:1;i:73;i:1;i:74;i:1;i:75;i:1;i:76;i:1;i:77;i:1;i:79;i:1;i:80;i:1;i:81;i:1;i:82;i:1;i:83;i:1;i:84;i:1;i:86;i:1;i:87;i:1;i:88;i:1;i:89;i:1;i:90;i:1;i:91;i:1;i:93;i:1;i:94;i:1;i:95;i:1;i:96;i:1;i:97;i:1;i:98;i:1;i:100;i:1;i:101;i:1;i:102;i:1;i:103;i:1;i:104;i:1;i:105;i:1;i:107;i:1;i:108;i:1;i:109;i:1;i:110;i:1;i:111;i:1;i:112;i:1;i:113;i:1;i:118;i:1;i:119;i:1;i:120;i:1;i:121;i:1;i:123;i:1;i:124;i:1;i:126;i:1;i:128;i:1;i:130;i:1;i:131;i:1;i:132;i:1;i:133;i:1;i:134;i:1;i:137;i:1;i:138;i:1;i:142;i:1;i:144;i:1;i:145;i:1;i:146;i:1;i:147;i:1;i:148;i:1;i:149;i:1;i:150;i:1;i:152;i:1;i:154;i:1;i:155;i:1;i:158;i:1;i:160;i:1;i:161;i:1;i:162;i:1;i:163;i:1;i:165;i:1;i:166;i:1;i:167;i:1;i:168;i:1;i:170;i:1;i:171;i:1;i:173;i:1;i:174;i:1;i:182;i:1;i:184;i:1;i:185;i:1;i:186;i:1;i:187;i:1;i:189;i:1;i:190;i:1;i:191;i:1;i:192;i:1;i:193;i:1;i:200;i:1;i:201;i:1;i:203;i:1;i:204;i:1;i:205;i:1;i:206;i:1;i:207;i:1;i:208;i:1;i:209;i:1;i:210;i:1;i:214;i:1;i:215;i:1;i:216;i:1;i:217;i:1;i:218;i:-1;i:219;i:1;i:220;i:1;i:221;i:1;i:223;i:1;i:225;i:1;i:226;i:1;i:227;i:1;i:228;i:1;i:231;i:1;i:232;i:1;i:240;i:1;i:243;i:1;i:245;i:1;i:246;i:1;i:247;i:1;i:248;i:1;i:249;i:1;i:250;i:1;i:251;i:1;i:253;i:1;i:255;i:1;i:256;i:1;i:257;i:1;i:261;i:1;i:263;i:1;i:264;i:1;i:265;i:1;i:266;i:1;i:267;i:-1;i:268;i:1;i:269;i:1;i:270;i:1;i:272;i:1;i:274;i:1;i:275;i:1;i:278;i:1;i:279;i:1;i:287;i:1;i:289;i:1;i:290;i:1;i:293;i:1;i:294;i:-1;i:295;i:1;i:296;i:1;i:297;i:1;i:300;i:1;i:301;i:1;i:332;i:1;i:334;i:1;i:335;i:1;i:336;i:1;i:338;i:1;i:339;i:1;i:341;i:1;i:343;i:1;i:344;i:-2;i:347;i:1;i:349;i:1;i:350;i:1;i:354;i:1;i:356;i:1;i:357;i:1;i:358;i:1;i:360;i:1;i:361;i:1;i:363;i:1;i:364;i:-1;i:365;i:1;i:366;i:1;i:368;i:1;i:370;i:1;i:371;i:1;i:375;i:1;i:377;i:1;i:378;i:1;i:379;i:1;i:380;i:1;i:381;i:-1;i:382;i:1;i:383;i:1;i:384;i:1;i:385;i:1;i:387;i:1;i:388;i:1;i:389;i:1;i:390;i:1;i:391;i:1;i:392;i:1;i:393;i:1;i:394;i:1;i:397;i:1;i:398;i:1;}s:66:"/home/bjarte/public_html/doctrine/lib/Doctrine/Validator/Email.php";a:27:{i:34;i:1;i:44;i:1;i:45;i:1;i:46;i:-2;i:47;i:1;i:48;i:1;i:49;i:1;i:50;i:1;i:51;i:1;i:52;i:-2;i:53;i:-1;i:54;i:-1;i:56;i:1;i:57;i:1;i:58;i:1;i:59;i:1;i:60;i:1;i:61;i:1;i:62;i:1;i:63;i:1;i:64;i:1;i:65;i:1;i:73;i:1;i:74;i:1;i:76;i:1;i:77;i:-2;i:80;i:1;}s:49:"/home/bjarte/public_html/doctrine/models/Rec1.php";a:4:{i:6;i:1;i:7;i:1;i:11;i:1;i:12;i:1;}s:66:"/home/bjarte/public_html/doctrine/lib/Doctrine/Record/Listener.php";a:14:{i:33;i:1;i:37;i:-1;i:40;i:-1;i:43;i:-1;i:46;i:-1;i:49;i:1;i:52;i:1;i:55;i:1;i:58;i:1;i:61;i:1;i:64;i:1;i:67;i:1;i:70;i:1;i:72;i:1;}s:59:"/home/bjarte/public_html/doctrine/models/LiabilityCodeN.php";a:6:{i:5;i:1;i:6;i:1;i:7;i:1;i:8;i:1;i:9;i:1;i:13;i:1;}s:71:"/home/bjarte/public_html/doctrine/lib/Doctrine/Connection/Statement.php";a:93:{i:21;i:1;i:33;i:1;i:53;i:1;i:54;i:1;i:56;i:1;i:57;i:-1;i:58;i:-2;i:59;i:1;i:68;i:-1;i:69;i:-2;i:72;i:-1;i:73;i:-2;i:76;i:1;i:77;i:-2;i:92;i:-1;i:93;i:-1;i:94;i:-2;i:95;i:-1;i:97;i:-2;i:114;i:-1;i:115;i:-1;i:116;i:-2;i:117;i:-1;i:119;i:-2;i:149;i:-1;i:150;i:-1;i:151;i:-2;i:152;i:-1;i:154;i:-2;i:163;i:1;i:164;i:-2;i:175;i:-1;i:176;i:-2;i:186;i:-1;i:187;i:-2;i:197;i:-1;i:198;i:-2;i:217;i:1;i:218;i:1;i:220;i:1;i:221;i:1;i:222;i:1;i:223;i:1;i:224;i:1;i:226;i:1;i:228;i:1;i:229;i:-2;i:230;i:-2;i:233;i:-2;i:235;i:-2;i:236;i:-2;i:268;i:1;i:270;i:1;i:271;i:1;i:272;i:1;i:274;i:1;i:276;i:1;i:277;i:1;i:278;i:1;i:280;i:1;i:282;i:1;i:283;i:-2;i:300;i:1;i:301;i:1;i:302;i:1;i:304;i:1;i:306;i:1;i:307;i:1;i:308;i:1;i:309;i:1;i:310;i:-1;i:313;i:1;i:314;i:1;i:316;i:1;i:318;i:1;i:319;i:-2;i:333;i:1;i:334;i:-2;i:350;i:-1;i:351;i:-2;i:362;i:-1;i:363;i:-2;i:382;i:-1;i:383;i:-2;i:397;i:-1;i:398;i:-2;i:413;i:1;i:414;i:-2;i:425;i:-1;i:426;i:-2;i:436;i:-1;i:437;i:-2;i:439;i:1;}s:72:"/home/bjarte/public_html/doctrine/lib/Doctrine/Transaction/Exception.php";a:3:{i:21;i:1;i:33;i:1;i:35;i:1;}s:70:"/home/bjarte/public_html/doctrine/lib/Doctrine/Connection/Firebird.php";a:33:{i:21;i:1;i:35;i:1;i:50;i:-1;i:51;i:1;i:52;i:1;i:53;i:1;i:54;i:1;i:55;i:1;i:56;i:1;i:57;i:1;i:58;i:1;i:59;i:1;i:60;i:1;i:61;i:1;i:62;i:1;i:63;i:1;i:64;i:1;i:65;i:1;i:66;i:1;i:67;i:1;i:69;i:1;i:78;i:1;i:79;i:1;i:89;i:-1;i:90;i:-1;i:91;i:-1;i:102;i:-1;i:103;i:-1;i:104;i:-1;i:105;i:-1;i:106;i:-1;i:107;i:-2;i:109;i:1;}s:66:"/home/bjarte/public_html/doctrine/tests/DataDict/MysqlTestCase.php";a:196:{i:36;i:1;i:37;i:1;i:40;i:1;i:41;i:1;i:45;i:1;i:46;i:-1;i:47;i:1;i:48;i:1;i:50;i:1;i:53;i:1;i:56;i:1;i:57;i:1;i:58;i:1;i:59;i:1;i:60;i:1;i:62;i:1;i:63;i:1;i:64;i:1;i:65;i:1;i:67;i:1;i:69;i:1;i:70;i:1;i:71;i:1;i:72;i:1;i:74;i:1;i:76;i:1;i:77;i:1;i:78;i:1;i:79;i:1;i:81;i:1;i:83;i:1;i:84;i:1;i:85;i:1;i:86;i:1;i:88;i:1;i:90;i:1;i:91;i:1;i:92;i:1;i:93;i:1;i:94;i:1;i:97;i:1;i:99;i:1;i:100;i:1;i:101;i:1;i:102;i:1;i:104;i:1;i:106;i:1;i:107;i:1;i:108;i:1;i:109;i:1;i:111;i:1;i:113;i:1;i:114;i:1;i:115;i:1;i:116;i:1;i:118;i:1;i:120;i:1;i:121;i:1;i:122;i:1;i:123;i:1;i:125;i:1;i:127;i:1;i:128;i:1;i:129;i:1;i:130;i:1;i:132;i:1;i:134;i:1;i:135;i:1;i:136;i:1;i:137;i:1;i:138;i:1;i:141;i:1;i:143;i:1;i:144;i:1;i:145;i:1;i:146;i:1;i:148;i:1;i:150;i:1;i:151;i:1;i:152;i:1;i:153;i:1;i:155;i:1;i:157;i:1;i:158;i:1;i:159;i:1;i:160;i:1;i:161;i:1;i:165;i:1;i:167;i:1;i:168;i:1;i:169;i:1;i:170;i:1;i:171;i:1;i:174;i:1;i:176;i:1;i:177;i:1;i:178;i:1;i:179;i:1;i:181;i:1;i:183;i:1;i:184;i:1;i:185;i:1;i:186;i:1;i:188;i:1;i:190;i:1;i:191;i:1;i:192;i:1;i:193;i:1;i:194;i:1;i:198;i:1;i:200;i:1;i:201;i:1;i:202;i:1;i:203;i:1;i:205;i:1;i:207;i:1;i:208;i:1;i:209;i:1;i:210;i:1;i:211;i:1;i:214;i:1;i:217;i:1;i:218;i:1;i:219;i:1;i:220;i:1;i:221;i:1;i:224;i:1;i:226;i:1;i:227;i:1;i:228;i:1;i:229;i:1;i:231;i:1;i:233;i:1;i:234;i:1;i:235;i:1;i:236;i:1;i:238;i:1;i:240;i:1;i:241;i:1;i:242;i:1;i:243;i:1;i:245;i:1;i:247;i:1;i:248;i:1;i:249;i:1;i:250;i:1;i:251;i:1;i:255;i:1;i:257;i:1;i:259;i:1;i:261;i:1;i:263;i:1;i:265;i:1;i:266;i:1;i:270;i:1;i:272;i:1;i:273;i:1;i:276;i:1;i:278;i:1;i:279;i:1;i:282;i:1;i:284;i:1;i:285;i:1;i:288;i:1;i:290;i:1;i:291;i:1;i:294;i:1;i:296;i:1;i:297;i:1;i:300;i:1;i:302;i:1;i:303;i:1;i:306;i:1;i:308;i:1;i:309;i:1;i:312;i:1;i:314;i:1;i:315;i:1;i:318;i:1;i:320;i:1;i:321;i:1;i:324;i:1;i:326;i:1;i:327;i:1;i:330;i:1;i:332;i:1;i:333;i:1;i:336;i:1;i:338;i:1;i:339;i:1;i:342;i:1;i:344;i:1;i:345;i:1;i:348;i:1;i:350;i:1;i:351;i:1;}s:65:"/home/bjarte/public_html/doctrine/lib/Doctrine/DataDict/Pgsql.php";a:194:{i:21;i:1;i:34;i:1;i:363;i:1;i:364;i:-1;i:365;i:-2;i:366;i:1;i:367;i:1;i:368;i:1;i:369;i:1;i:370;i:1;i:371;i:1;i:372;i:1;i:373;i:1;i:376;i:1;i:378;i:1;i:379;i:1;i:381;i:1;i:382;i:1;i:383;i:1;i:384;i:1;i:385;i:1;i:386;i:1;i:387;i:1;i:388;i:1;i:389;i:1;i:390;i:1;i:391;i:1;i:392;i:1;i:393;i:-2;i:394;i:1;i:395;i:1;i:396;i:-2;i:397;i:1;i:398;i:1;i:399;i:1;i:400;i:1;i:401;i:1;i:402;i:1;i:403;i:1;i:404;i:1;i:405;i:-2;i:406;i:-1;i:407;i:-1;i:408;i:1;i:409;i:1;i:410;i:1;i:411;i:1;i:412;i:1;i:413;i:1;i:414;i:1;i:415;i:1;i:416;i:1;i:417;i:1;i:418;i:1;i:419;i:-1;i:420;i:-1;i:421;i:-1;i:422;i:-1;i:423;i:-1;i:424;i:-1;i:425;i:-2;i:436;i:1;i:437;i:1;i:438;i:-1;i:439;i:-1;i:440;i:1;i:441;i:1;i:442;i:1;i:443;i:1;i:444;i:1;i:446;i:1;i:447;i:1;i:448;i:1;i:450;i:1;i:453;i:1;i:454;i:1;i:455;i:1;i:456;i:1;i:457;i:1;i:458;i:1;i:459;i:1;i:460;i:1;i:461;i:-1;i:462;i:-1;i:463;i:1;i:464;i:1;i:465;i:1;i:466;i:1;i:467;i:1;i:468;i:1;i:469;i:1;i:470;i:1;i:471;i:1;i:472;i:1;i:473;i:1;i:474;i:1;i:475;i:1;i:476;i:1;i:477;i:1;i:478;i:1;i:479;i:1;i:480;i:1;i:481;i:1;i:482;i:1;i:483;i:1;i:484;i:1;i:485;i:1;i:486;i:1;i:487;i:1;i:488;i:1;i:489;i:1;i:490;i:1;i:491;i:1;i:492;i:1;i:493;i:1;i:494;i:1;i:495;i:1;i:496;i:1;i:497;i:-1;i:498;i:-1;i:499;i:1;i:500;i:1;i:501;i:1;i:502;i:1;i:503;i:1;i:504;i:1;i:505;i:1;i:506;i:1;i:507;i:1;i:508;i:1;i:509;i:1;i:510;i:1;i:511;i:1;i:512;i:1;i:513;i:1;i:514;i:1;i:515;i:1;i:516;i:1;i:517;i:1;i:518;i:1;i:519;i:1;i:520;i:1;i:521;i:1;i:522;i:1;i:523;i:1;i:524;i:1;i:525;i:1;i:526;i:1;i:527;i:1;i:528;i:1;i:529;i:1;i:530;i:1;i:531;i:1;i:532;i:1;i:533;i:1;i:534;i:1;i:535;i:1;i:536;i:1;i:537;i:1;i:538;i:1;i:539;i:1;i:540;i:1;i:541;i:1;i:542;i:1;i:543;i:1;i:544;i:1;i:545;i:1;i:546;i:1;i:547;i:1;i:548;i:1;i:549;i:1;i:551;i:1;i:552;i:1;i:553;i:1;i:554;i:1;i:555;i:-2;i:586;i:1;i:587;i:1;i:588;i:1;i:589;i:-2;i:591;i:1;i:592;i:1;i:593;i:1;i:594;i:-1;i:595;i:-1;i:596;i:1;i:597;i:1;i:605;i:1;i:606;i:1;i:607;i:1;i:608;i:-2;i:619;i:-1;i:620;i:-2;i:622;i:1;}s:60:"/home/bjarte/public_html/doctrine/tests/SequenceTestCase.php";a:7:{i:37;i:-1;i:40;i:-1;i:43;i:1;i:44;i:1;i:45;i:1;i:46;i:1;i:66;i:1;}s:67:"/home/bjarte/public_html/doctrine/lib/Doctrine/Export/Exception.php";a:3:{i:21;i:1;i:33;i:1;i:35;i:1;}s:61:"/home/bjarte/public_html/doctrine/tests/TokenizerTestCase.php";a:52:{i:37;i:1;i:39;i:1;i:43;i:1;i:44;i:1;i:46;i:1;i:48;i:1;i:49;i:1;i:50;i:1;i:52;i:1;i:53;i:1;i:54;i:1;i:56;i:1;i:57;i:1;i:58;i:1;i:60;i:1;i:61;i:1;i:62;i:1;i:64;i:1;i:65;i:1;i:66;i:1;i:68;i:1;i:69;i:1;i:70;i:1;i:72;i:1;i:73;i:1;i:74;i:1;i:76;i:1;i:77;i:1;i:78;i:1;i:80;i:1;i:81;i:1;i:82;i:1;i:84;i:1;i:85;i:1;i:86;i:1;i:88;i:1;i:89;i:1;i:90;i:1;i:92;i:1;i:93;i:1;i:94;i:1;i:96;i:1;i:97;i:1;i:98;i:1;i:100;i:1;i:101;i:1;i:102;i:1;i:103;i:1;i:107;i:1;i:108;i:1;i:110;i:1;i:111;i:1;}s:62:"/home/bjarte/public_html/doctrine/models/EventListenerTest.php";a:8:{i:4;i:1;i:5;i:1;i:6;i:1;i:9;i:1;i:11;i:-1;i:12;i:-2;i:14;i:-1;i:15;i:-2;}s:63:"/home/bjarte/public_html/doctrine/models/QueryTest_UserRank.php";a:3:{i:6;i:1;i:7;i:1;i:8;i:1;}s:80:"/home/bjarte/public_html/doctrine/tests/Query/MultipleAggregateValueTestCase.php";a:40:{i:37;i:1;i:40;i:1;i:41;i:1;i:43;i:1;i:44;i:1;i:45;i:1;i:47;i:1;i:48;i:1;i:49;i:1;i:50;i:1;i:54;i:1;i:55;i:1;i:56;i:1;i:57;i:1;i:58;i:1;i:59;i:1;i:61;i:1;i:64;i:1;i:65;i:1;i:66;i:1;i:67;i:1;i:68;i:-2;i:71;i:1;i:72;i:1;i:73;i:1;i:76;i:1;i:77;i:1;i:78;i:1;i:79;i:1;i:80;i:1;i:81;i:1;i:83;i:1;i:86;i:1;i:87;i:1;i:88;i:1;i:89;i:1;i:90;i:-2;i:93;i:1;i:94;i:1;i:95;i:1;}s:74:"/home/bjarte/public_html/doctrine/tests/Query/SelectExpressionTestCase.php";a:40:{i:37;i:1;i:40;i:1;i:41;i:1;i:42;i:1;i:45;i:1;i:46;i:1;i:47;i:1;i:50;i:1;i:51;i:1;i:52;i:1;i:54;i:1;i:58;i:1;i:59;i:1;i:60;i:1;i:63;i:1;i:64;i:1;i:65;i:1;i:67;i:1;i:71;i:1;i:72;i:1;i:73;i:1;i:76;i:1;i:77;i:1;i:78;i:1;i:80;i:1;i:84;i:1;i:85;i:1;i:86;i:1;i:89;i:1;i:90;i:1;i:91;i:1;i:93;i:1;i:97;i:1;i:98;i:1;i:99;i:1;i:100;i:1;i:103;i:1;i:104;i:1;i:105;i:1;i:107;i:1;}s:57:"/home/bjarte/public_html/doctrine/models/ResourceTask.php";a:5:{i:4;i:1;i:5;i:1;i:6;i:1;i:8;i:1;i:9;i:1;}s:59:"/home/bjarte/public_html/doctrine/lib/Doctrine/Sequence.php";a:10:{i:21;i:1;i:34;i:1;i:46;i:-1;i:47;i:-2;i:57;i:-1;i:58;i:-2;i:68;i:-1;i:70;i:-1;i:71;i:-2;i:73;i:1;}s:60:"/home/bjarte/public_html/doctrine/lib/Doctrine/Tokenizer.php";a:136:{i:34;i:1;i:38;i:-1;i:42;i:-1;i:52;i:1;i:53;i:1;i:54;i:-2;i:55;i:1;i:57;i:-2;i:81;i:1;i:82;i:1;i:83;i:1;i:84;i:1;i:85;i:1;i:88;i:1;i:89;i:1;i:90;i:1;i:91;i:1;i:92;i:1;i:93;i:1;i:94;i:1;i:96;i:1;i:97;i:1;i:98;i:1;i:99;i:1;i:100;i:1;i:101;i:1;i:102;i:1;i:104;i:1;i:105;i:1;i:106;i:1;i:108;i:1;i:109;i:1;i:110;i:-2;i:128;i:1;i:129;i:-1;i:130;i:-1;i:131;i:-1;i:132;i:1;i:135;i:1;i:136;i:1;i:137;i:1;i:138;i:1;i:139;i:1;i:141;i:1;i:142;i:1;i:143;i:1;i:144;i:1;i:145;i:-1;i:147;i:-1;i:148;i:-1;i:149;i:-1;i:151;i:1;i:152;i:1;i:153;i:-2;i:184;i:1;i:185;i:1;i:186;i:1;i:187;i:1;i:188;i:1;i:190;i:1;i:191;i:1;i:192;i:1;i:194;i:1;i:196;i:1;i:197;i:1;i:198;i:1;i:199;i:1;i:202;i:1;i:203;i:1;i:205;i:1;i:206;i:1;i:207;i:1;i:209;i:1;i:210;i:1;i:212;i:1;i:213;i:1;i:214;i:1;i:215;i:1;i:216;i:1;i:217;i:1;i:218;i:1;i:219;i:1;i:220;i:1;i:222;i:1;i:223;i:1;i:224;i:1;i:225;i:1;i:227;i:1;i:228;i:1;i:229;i:1;i:230;i:1;i:231;i:1;i:232;i:1;i:233;i:1;i:234;i:1;i:235;i:1;i:238;i:1;i:239;i:1;i:240;i:-2;i:271;i:1;i:272;i:1;i:274;i:1;i:275;i:1;i:276;i:1;i:278;i:1;i:280;i:1;i:281;i:1;i:283;i:1;i:284;i:1;i:286;i:1;i:287;i:1;i:288;i:1;i:289;i:1;i:290;i:1;i:291;i:1;i:292;i:-2;i:293;i:1;i:294;i:1;i:295;i:1;i:296;i:1;i:299;i:1;i:300;i:1;i:302;i:1;i:303;i:1;i:304;i:1;i:305;i:1;i:306;i:1;i:307;i:1;i:308;i:1;i:309;i:1;i:310;i:1;i:312;i:1;i:313;i:1;i:315;i:1;i:316;i:-2;i:318;i:1;}s:65:"/home/bjarte/public_html/doctrine/lib/Doctrine/DataDict/Mysql.php";a:251:{i:21;i:1;i:33;i:1;i:137;i:1;i:138;i:-1;i:139;i:-2;i:141;i:1;i:142;i:1;i:143;i:1;i:145;i:1;i:146;i:1;i:147;i:1;i:148;i:1;i:149;i:1;i:150;i:1;i:151;i:1;i:152;i:1;i:153;i:-1;i:154;i:-1;i:155;i:1;i:157;i:1;i:159;i:1;i:160;i:1;i:162;i:1;i:163;i:1;i:164;i:1;i:165;i:1;i:166;i:-1;i:167;i:-1;i:168;i:-1;i:169;i:-1;i:170;i:-1;i:171;i:-1;i:172;i:-1;i:173;i:-2;i:174;i:-1;i:175;i:1;i:176;i:1;i:177;i:1;i:178;i:1;i:179;i:1;i:180;i:-1;i:181;i:1;i:182;i:1;i:183;i:-1;i:184;i:-1;i:185;i:-2;i:186;i:-1;i:187;i:1;i:188;i:1;i:189;i:-1;i:190;i:-1;i:191;i:-1;i:192;i:-1;i:193;i:-1;i:194;i:-1;i:195;i:-2;i:197;i:1;i:198;i:1;i:199;i:1;i:200;i:1;i:201;i:1;i:202;i:-1;i:203;i:1;i:204;i:1;i:205;i:1;i:206;i:1;i:207;i:1;i:208;i:1;i:209;i:1;i:210;i:1;i:211;i:-2;i:212;i:-1;i:213;i:1;i:214;i:1;i:215;i:1;i:216;i:1;i:217;i:1;i:218;i:1;i:219;i:1;i:220;i:1;i:221;i:1;i:222;i:1;i:223;i:1;i:224;i:1;i:225;i:-1;i:226;i:-1;i:227;i:-1;i:228;i:-1;i:229;i:-1;i:230;i:-1;i:231;i:-2;i:240;i:1;i:241;i:1;i:242;i:1;i:243;i:-1;i:244;i:-1;i:245;i:1;i:246;i:-1;i:247;i:-1;i:248;i:-1;i:249;i:1;i:250;i:1;i:252;i:1;i:253;i:1;i:255;i:1;i:256;i:1;i:257;i:1;i:259;i:1;i:262;i:1;i:263;i:1;i:264;i:1;i:265;i:1;i:266;i:-1;i:267;i:-1;i:268;i:1;i:269;i:1;i:270;i:1;i:271;i:1;i:272;i:1;i:273;i:1;i:274;i:1;i:275;i:1;i:276;i:1;i:277;i:1;i:278;i:1;i:279;i:1;i:280;i:1;i:281;i:1;i:282;i:1;i:283;i:1;i:284;i:1;i:285;i:1;i:286;i:1;i:287;i:1;i:288;i:1;i:289;i:1;i:290;i:1;i:291;i:1;i:292;i:1;i:293;i:1;i:294;i:1;i:295;i:1;i:296;i:1;i:297;i:1;i:298;i:1;i:299;i:1;i:300;i:1;i:301;i:1;i:302;i:1;i:303;i:1;i:304;i:1;i:305;i:-1;i:306;i:-1;i:307;i:1;i:308;i:1;i:309;i:1;i:310;i:-1;i:311;i:-1;i:312;i:1;i:313;i:1;i:314;i:1;i:315;i:1;i:316;i:1;i:317;i:1;i:318;i:-1;i:319;i:-1;i:320;i:-1;i:321;i:-1;i:322;i:-1;i:323;i:-1;i:324;i:-1;i:325;i:-1;i:326;i:-1;i:327;i:-1;i:328;i:-1;i:329;i:-1;i:330;i:-1;i:331;i:-1;i:332;i:-1;i:334;i:-1;i:335;i:-1;i:336;i:1;i:337;i:-1;i:338;i:-1;i:339;i:-1;i:340;i:-1;i:341;i:1;i:342;i:1;i:343;i:1;i:344;i:1;i:345;i:1;i:346;i:1;i:347;i:1;i:348;i:1;i:349;i:1;i:350;i:1;i:351;i:-1;i:352;i:-1;i:353;i:-1;i:354;i:1;i:355;i:1;i:356;i:1;i:357;i:1;i:358;i:1;i:359;i:1;i:360;i:1;i:361;i:1;i:362;i:1;i:363;i:1;i:364;i:1;i:365;i:1;i:366;i:1;i:367;i:1;i:368;i:1;i:369;i:1;i:370;i:1;i:371;i:1;i:372;i:1;i:373;i:1;i:374;i:1;i:375;i:1;i:376;i:1;i:377;i:1;i:378;i:1;i:379;i:1;i:380;i:1;i:382;i:1;i:384;i:1;i:385;i:1;i:386;i:-2;i:387;i:-1;i:389;i:-2;i:400;i:1;i:401;i:-2;i:412;i:1;i:413;i:-2;i:441;i:1;i:442;i:1;i:443;i:1;i:444;i:1;i:445;i:-1;i:446;i:-1;i:447;i:-1;i:448;i:-1;i:449;i:-1;i:456;i:1;i:457;i:1;i:459;i:1;i:461;i:1;i:462;i:-2;i:464;i:1;}s:66:"/home/bjarte/public_html/doctrine/tests/DataDict/PgsqlTestCase.php";a:194:{i:37;i:1;i:38;i:-2;i:42;i:1;i:43;i:-1;i:44;i:1;i:45;i:1;i:47;i:1;i:50;i:1;i:52;i:1;i:53;i:1;i:54;i:1;i:55;i:1;i:57;i:1;i:59;i:1;i:60;i:1;i:61;i:1;i:62;i:1;i:64;i:1;i:66;i:1;i:67;i:1;i:68;i:1;i:69;i:1;i:71;i:1;i:73;i:1;i:74;i:1;i:75;i:1;i:76;i:1;i:78;i:1;i:80;i:1;i:81;i:1;i:82;i:1;i:83;i:1;i:85;i:1;i:87;i:1;i:88;i:1;i:89;i:1;i:90;i:1;i:91;i:1;i:94;i:1;i:96;i:1;i:97;i:1;i:98;i:1;i:99;i:1;i:101;i:1;i:103;i:1;i:104;i:1;i:105;i:1;i:106;i:1;i:107;i:1;i:110;i:1;i:112;i:1;i:113;i:1;i:114;i:1;i:115;i:1;i:117;i:1;i:119;i:1;i:120;i:1;i:121;i:1;i:122;i:1;i:124;i:1;i:126;i:1;i:127;i:1;i:128;i:1;i:129;i:1;i:130;i:1;i:133;i:1;i:135;i:1;i:136;i:1;i:137;i:1;i:138;i:1;i:140;i:1;i:142;i:1;i:143;i:1;i:144;i:1;i:145;i:1;i:147;i:1;i:149;i:1;i:150;i:1;i:151;i:1;i:152;i:1;i:153;i:1;i:156;i:1;i:158;i:1;i:159;i:1;i:160;i:1;i:161;i:1;i:162;i:1;i:165;i:1;i:167;i:1;i:168;i:1;i:169;i:1;i:170;i:1;i:171;i:1;i:174;i:1;i:176;i:1;i:177;i:1;i:178;i:1;i:179;i:1;i:180;i:1;i:183;i:1;i:185;i:1;i:186;i:1;i:187;i:1;i:188;i:1;i:190;i:1;i:192;i:1;i:193;i:1;i:194;i:1;i:195;i:1;i:197;i:1;i:199;i:1;i:200;i:1;i:201;i:1;i:202;i:1;i:205;i:1;i:207;i:1;i:208;i:1;i:209;i:1;i:210;i:1;i:213;i:1;i:215;i:1;i:216;i:1;i:217;i:1;i:218;i:1;i:220;i:1;i:223;i:1;i:225;i:1;i:226;i:1;i:228;i:1;i:229;i:1;i:230;i:1;i:231;i:1;i:232;i:1;i:234;i:1;i:235;i:1;i:236;i:1;i:237;i:1;i:238;i:1;i:241;i:1;i:242;i:1;i:243;i:1;i:247;i:1;i:249;i:1;i:251;i:1;i:253;i:1;i:255;i:1;i:257;i:1;i:258;i:1;i:261;i:1;i:263;i:1;i:265;i:1;i:267;i:1;i:269;i:1;i:271;i:1;i:272;i:1;i:275;i:1;i:277;i:1;i:278;i:1;i:281;i:1;i:283;i:1;i:284;i:1;i:287;i:1;i:289;i:1;i:290;i:1;i:293;i:1;i:295;i:1;i:296;i:1;i:299;i:1;i:301;i:1;i:302;i:1;i:305;i:1;i:307;i:1;i:308;i:1;i:311;i:1;i:313;i:1;i:314;i:1;i:317;i:1;i:319;i:1;i:320;i:1;i:323;i:1;i:325;i:1;i:326;i:1;i:329;i:1;i:331;i:1;i:332;i:1;i:335;i:1;i:337;i:1;i:338;i:1;i:341;i:1;i:343;i:1;i:344;i:1;i:347;i:1;i:349;i:1;i:350;i:1;}s:53:"/home/bjarte/public_html/doctrine/models/TestUser.php";a:11:{i:6;i:1;i:7;i:1;i:8;i:1;i:9;i:1;i:11;i:1;i:12;i:1;i:13;i:1;i:14;i:1;i:16;i:1;i:19;i:1;i:20;i:1;}s:58:"/home/bjarte/public_html/doctrine/models/NestReference.php";a:3:{i:6;i:1;i:7;i:1;i:8;i:1;}s:68:"/home/bjarte/public_html/doctrine/lib/Doctrine/Validator/Notnull.php";a:4:{i:33;i:1;i:43;i:1;i:44;i:-2;i:46;i:1;}s:68:"/home/bjarte/public_html/doctrine/tests/Query/MultiJoin2TestCase.php";a:56:{i:36;i:1;i:39;i:1;i:41;i:1;i:42;i:1;i:45;i:1;i:47;i:1;i:49;i:1;i:50;i:1;i:51;i:1;i:52;i:1;i:53;i:1;i:55;i:1;i:56;i:1;i:57;i:1;i:58;i:1;i:59;i:1;i:61;i:1;i:62;i:1;i:63;i:1;i:65;i:1;i:66;i:1;i:67;i:1;i:68;i:1;i:70;i:1;i:74;i:1;i:75;i:1;i:77;i:1;i:78;i:1;i:79;i:1;i:80;i:1;i:81;i:1;i:82;i:1;i:83;i:1;i:84;i:1;i:85;i:1;i:87;i:1;i:89;i:1;i:90;i:1;i:91;i:1;i:92;i:-2;i:94;i:1;i:98;i:1;i:99;i:1;i:101;i:1;i:102;i:1;i:103;i:1;i:104;i:1;i:105;i:1;i:106;i:1;i:107;i:1;i:108;i:1;i:109;i:1;i:110;i:1;i:111;i:1;i:112;i:-2;i:114;i:1;}s:72:"/home/bjarte/public_html/doctrine/tests/Query/ComponentAliasTestCase.php";a:53:{i:38;i:1;i:39;i:1;i:41;i:1;i:43;i:1;i:45;i:1;i:47;i:1;i:48;i:1;i:49;i:1;i:50;i:1;i:51;i:1;i:52;i:1;i:56;i:1;i:57;i:1;i:59;i:1;i:61;i:1;i:63;i:1;i:65;i:1;i:66;i:1;i:67;i:1;i:68;i:1;i:69;i:1;i:70;i:1;i:73;i:1;i:74;i:1;i:76;i:1;i:78;i:1;i:80;i:1;i:82;i:1;i:83;i:1;i:84;i:1;i:85;i:1;i:89;i:1;i:90;i:1;i:92;i:1;i:94;i:1;i:96;i:1;i:99;i:1;i:100;i:1;i:101;i:1;i:102;i:1;i:103;i:1;i:104;i:1;i:105;i:1;i:107;i:1;i:108;i:1;i:112;i:1;i:113;i:1;i:115;i:1;i:117;i:1;i:118;i:1;i:119;i:1;i:120;i:1;i:121;i:1;}s:64:"/home/bjarte/public_html/doctrine/tests/Query/DeleteTestCase.php";a:35:{i:38;i:1;i:40;i:1;i:42;i:1;i:44;i:1;i:46;i:1;i:48;i:1;i:49;i:1;i:52;i:1;i:54;i:1;i:56;i:1;i:58;i:1;i:60;i:1;i:62;i:1;i:63;i:1;i:66;i:1;i:68;i:1;i:70;i:1;i:72;i:1;i:74;i:1;i:76;i:1;i:77;i:1;i:80;i:1;i:82;i:1;i:84;i:1;i:86;i:1;i:88;i:1;i:90;i:1;i:91;i:1;i:94;i:1;i:96;i:1;i:98;i:1;i:100;i:1;i:102;i:1;i:104;i:1;i:105;i:1;}s:72:"/home/bjarte/public_html/doctrine/tests/NestedSet/SingleRootTestCase.php";a:39:{i:37;i:1;i:38;i:1;i:39;i:1;i:43;i:1;i:44;i:1;i:45;i:1;i:46;i:1;i:48;i:1;i:49;i:1;i:50;i:1;i:52;i:1;i:53;i:1;i:54;i:1;i:55;i:1;i:59;i:1;i:60;i:1;i:61;i:1;i:62;i:1;i:63;i:1;i:67;i:1;i:68;i:1;i:69;i:1;i:70;i:1;i:71;i:1;i:72;i:1;i:73;i:1;i:74;i:1;i:78;i:1;i:79;i:1;i:80;i:1;i:81;i:1;i:85;i:1;i:86;i:1;i:87;i:1;i:88;i:1;i:89;i:1;i:90;i:1;i:91;i:1;i:92;i:1;}s:56:"/home/bjarte/public_html/doctrine/lib/Doctrine/Table.php";a:572:{i:0;i:1;i:172;i:1;i:174;i:1;i:176;i:1;i:177;i:1;i:179;i:1;i:180;i:1;i:181;i:-2;i:182;i:1;i:184;i:1;i:186;i:1;i:191;i:1;i:192;i:1;i:193;i:-2;i:195;i:1;i:196;i:1;i:197;i:1;i:200;i:1;i:202;i:1;i:203;i:1;i:206;i:1;i:207;i:1;i:209;i:1;i:210;i:1;i:211;i:1;i:212;i:-1;i:214;i:1;i:217;i:1;i:218;i:1;i:219;i:1;i:221;i:1;i:223;i:1;i:224;i:1;i:225;i:1;i:227;i:1;i:228;i:1;i:229;i:1;i:230;i:1;i:231;i:1;i:232;i:1;i:233;i:1;i:235;i:1;i:236;i:1;i:237;i:1;i:238;i:1;i:239;i:1;i:240;i:1;i:241;i:1;i:242;i:1;i:243;i:1;i:245;i:1;i:246;i:1;i:247;i:1;i:249;i:1;i:251;i:1;i:253;i:1;i:255;i:1;i:257;i:1;i:258;i:1;i:259;i:1;i:260;i:1;i:261;i:1;i:262;i:1;i:263;i:1;i:264;i:1;i:265;i:1;i:266;i:1;i:268;i:1;i:269;i:1;i:270;i:1;i:271;i:-1;i:272;i:-1;i:273;i:-1;i:274;i:-1;i:277;i:1;i:278;i:-1;i:279;i:1;i:280;i:1;i:281;i:1;i:282;i:1;i:283;i:1;i:284;i:1;i:286;i:1;i:289;i:1;i:292;i:1;i:293;i:1;i:294;i:1;i:295;i:1;i:296;i:1;i:305;i:-1;i:306;i:-2;i:318;i:-1;i:319;i:-1;i:328;i:1;i:329;i:1;i:331;i:1;i:332;i:1;i:334;i:1;i:335;i:1;i:336;i:1;i:337;i:1;i:338;i:1;i:339;i:1;i:340;i:1;i:341;i:1;i:342;i:1;i:343;i:1;i:344;i:1;i:345;i:-1;i:346;i:1;i:348;i:1;i:349;i:1;i:350;i:1;i:351;i:1;i:352;i:1;i:354;i:1;i:355;i:1;i:357;i:1;i:359;i:1;i:360;i:1;i:362;i:1;i:363;i:1;i:364;i:1;i:366;i:1;i:367;i:1;i:368;i:-1;i:369;i:-2;i:371;i:1;i:372;i:-2;i:374;i:1;i:375;i:1;i:377;i:1;i:378;i:1;i:379;i:1;i:380;i:1;i:382;i:1;i:383;i:1;i:385;i:1;i:386;i:1;i:387;i:-1;i:388;i:-1;i:389;i:-1;i:391;i:1;i:392;i:1;i:394;i:1;i:395;i:1;i:396;i:1;i:398;i:1;i:399;i:1;i:400;i:1;i:402;i:1;i:403;i:1;i:404;i:1;i:405;i:-2;i:416;i:-1;i:418;i:-1;i:419;i:-1;i:420;i:-1;i:421;i:-1;i:422;i:-1;i:423;i:-2;i:425;i:-2;i:427;i:-1;i:436;i:1;i:437;i:-2;i:446;i:1;i:447;i:1;i:448;i:-2;i:449;i:1;i:450;i:-2;i:458;i:-1;i:459;i:-2;i:468;i:1;i:469;i:-2;i:479;i:-1;i:480;i:-1;i:490;i:-1;i:491;i:-1;i:492;i:-1;i:493;i:-1;i:496;i:-1;i:497;i:-2;i:507;i:1;i:508;i:1;i:516;i:-1;i:517;i:-1;i:518;i:-2;i:520;i:-1;i:521;i:-2;i:524;i:1;i:525;i:1;i:527;i:1;i:528;i:-1;i:529;i:-1;i:532;i:1;i:533;i:1;i:534;i:1;i:535;i:1;i:536;i:1;i:537;i:1;i:539;i:1;i:542;i:1;i:543;i:1;i:544;i:1;i:545;i:1;i:546;i:1;i:547;i:1;i:549;i:1;i:550;i:1;i:551;i:1;i:552;i:1;i:553;i:1;i:555;i:1;i:558;i:1;i:560;i:1;i:561;i:1;i:562;i:1;i:563;i:1;i:565;i:1;i:575;i:-1;i:576;i:-2;i:585;i:1;i:586;i:-2;i:595;i:1;i:596;i:-2;i:606;i:-1;i:607;i:-2;i:615;i:1;i:616;i:-2;i:630;i:1;i:631;i:1;i:632;i:1;i:633;i:1;i:634;i:1;i:635;i:1;i:636;i:1;i:637;i:1;i:638;i:-1;i:639;i:-2;i:640;i:1;i:641;i:-2;i:642;i:1;i:643;i:1;i:653;i:1;i:654;i:1;i:655;i:-2;i:656;i:-1;i:657;i:-2;i:670;i:1;i:671;i:1;i:672;i:1;i:673;i:-2;i:675;i:1;i:676;i:-2;i:689;i:1;i:690;i:1;i:691;i:1;i:693;i:1;i:694;i:1;i:695;i:1;i:696;i:1;i:697;i:1;i:698;i:1;i:699;i:1;i:700;i:1;i:702;i:1;i:703;i:1;i:705;i:1;i:706;i:1;i:707;i:1;i:708;i:1;i:712;i:1;i:714;i:1;i:715;i:1;i:716;i:1;i:717;i:1;i:718;i:1;i:719;i:1;i:720;i:1;i:721;i:1;i:723;i:1;i:724;i:1;i:725;i:1;i:726;i:1;i:727;i:1;i:729;i:1;i:730;i:1;i:732;i:1;i:733;i:1;i:735;i:1;i:736;i:1;i:737;i:-2;i:738;i:1;i:740;i:1;i:741;i:1;i:742;i:1;i:744;i:1;i:745;i:1;i:746;i:1;i:747;i:1;i:748;i:1;i:749;i:1;i:750;i:1;i:759;i:1;i:760;i:-2;i:770;i:1;i:771;i:1;i:772;i:-1;i:773;i:-2;i:774;i:1;i:775;i:1;i:776;i:-2;i:777;i:1;i:779;i:-2;i:785;i:1;i:786;i:-2;i:792;i:1;i:793;i:-2;i:800;i:1;i:801;i:-2;i:808;i:-1;i:809;i:-1;i:810;i:-1;i:811;i:-1;i:812;i:-1;i:813;i:-1;i:814;i:-1;i:815;i:-1;i:816;i:-1;i:823;i:1;i:824;i:-2;i:830;i:-1;i:831;i:-2;i:837;i:1;i:838;i:-2;i:847;i:1;i:848;i:1;i:849;i:1;i:850;i:1;i:851;i:-2;i:861;i:1;i:862;i:1;i:863;i:1;i:864;i:1;i:865;i:1;i:866;i:1;i:867;i:1;i:868;i:1;i:871;i:1;i:872;i:1;i:873;i:1;i:874;i:1;i:876;i:1;i:877;i:1;i:878;i:-2;i:881;i:1;i:882;i:1;i:883;i:1;i:884;i:-2;i:885;i:1;i:886;i:1;i:887;i:1;i:888;i:-2;i:889;i:-1;i:890;i:-1;i:891;i:1;i:892;i:-2;i:900;i:1;i:901;i:1;i:902;i:1;i:903;i:1;i:904;i:1;i:905;i:1;i:906;i:1;i:907;i:1;i:908;i:1;i:909;i:-2;i:919;i:1;i:920;i:1;i:921;i:1;i:922;i:-2;i:934;i:1;i:935;i:1;i:936;i:1;i:937;i:-2;i:940;i:1;i:941;i:-2;i:950;i:1;i:951;i:1;i:961;i:1;i:963;i:1;i:964;i:-1;i:965;i:-2;i:967;i:1;i:969;i:1;i:970;i:-2;i:980;i:1;i:981;i:1;i:983;i:1;i:985;i:1;i:986;i:1;i:987;i:1;i:989;i:1;i:990;i:1;i:991;i:1;i:993;i:1;i:994;i:1;i:995;i:-2;i:996;i:1;i:997;i:1;i:999;i:1;i:1000;i:1;i:1001;i:1;i:1002;i:1;i:1004;i:1;i:1005;i:-2;i:1008;i:1;i:1010;i:1;i:1011;i:1;i:1012;i:1;i:1013;i:1;i:1014;i:1;i:1015;i:1;i:1016;i:1;i:1018;i:1;i:1019;i:1;i:1020;i:-1;i:1021;i:-1;i:1025;i:1;i:1026;i:-2;i:1044;i:1;i:1045;i:1;i:1046;i:-2;i:1047;i:1;i:1048;i:1;i:1049;i:1;i:1050;i:1;i:1051;i:1;i:1052;i:1;i:1053;i:1;i:1054;i:1;i:1055;i:-2;i:1056;i:1;i:1057;i:1;i:1058;i:1;i:1059;i:-2;i:1060;i:1;i:1061;i:1;i:1062;i:-2;i:1070;i:1;i:1071;i:1;i:1072;i:1;i:1073;i:1;i:1074;i:1;i:1076;i:1;i:1078;i:1;i:1080;i:1;i:1081;i:1;i:1082;i:1;i:1083;i:1;i:1084;i:-2;i:1092;i:-1;i:1093;i:-1;i:1094;i:-2;i:1100;i:-1;i:1101;i:-1;i:1102;i:-1;i:1103;i:-2;i:1110;i:1;i:1111;i:1;i:1112;i:-2;i:1113;i:1;i:1115;i:-2;i:1125;i:1;i:1126;i:-1;i:1127;i:-2;i:1129;i:1;i:1130;i:-1;i:1131;i:1;i:1132;i:1;i:1133;i:-2;i:1135;i:-1;i:1136;i:-2;i:1146;i:1;i:1148;i:1;i:1149;i:1;i:1150;i:1;i:1151;i:-2;i:1152;i:-1;i:1153;i:-2;i:1160;i:1;i:1161;i:-2;i:1170;i:1;i:1171;i:-2;i:1179;i:1;i:1180;i:-2;i:1188;i:1;i:1189;i:1;i:1190;i:-2;i:1191;i:1;i:1192;i:-2;i:1200;i:1;i:1201;i:1;i:1202;i:-2;i:1203;i:1;i:1204;i:-2;i:1215;i:1;i:1216;i:1;i:1225;i:1;i:1226;i:-2;i:1252;i:1;i:1253;i:-1;i:1254;i:1;i:1255;i:1;i:1256;i:-2;i:1257;i:1;i:1260;i:1;i:1261;i:1;i:1262;i:1;i:1263;i:1;i:1265;i:1;i:1266;i:-1;i:1267;i:-2;i:1268;i:1;i:1269;i:-2;i:1270;i:-1;i:1271;i:1;i:1272;i:1;i:1274;i:1;i:1275;i:-1;i:1276;i:-2;i:1277;i:1;i:1278;i:-2;i:1279;i:1;i:1280;i:1;i:1281;i:-2;i:1282;i:1;i:1283;i:1;i:1284;i:-2;i:1285;i:1;i:1287;i:1;i:1288;i:-2;i:1290;i:1;i:1291;i:-2;i:1298;i:1;i:1299;i:1;i:1300;i:1;i:1301;i:1;i:1302;i:1;i:1304;i:1;i:1305;i:1;i:1306;i:1;i:1307;i:-2;i:1308;i:-1;i:1309;i:-2;i:1312;i:1;i:1313;i:-2;i:1316;i:1;i:1317;i:-2;i:1320;i:-1;i:1321;i:-1;i:1328;i:1;i:1329;i:-2;i:1333;i:-1;i:1334;i:-1;i:1335;i:-2;i:1337;i:-1;i:1338;i:-2;i:1342;i:1;i:1343;i:1;i:1351;i:-1;i:1352;i:-2;}s:56:"/home/bjarte/public_html/doctrine/models/Description.php";a:3:{i:4;i:1;i:5;i:1;i:6;i:1;}s:70:"/home/bjarte/public_html/doctrine/tests/Transaction/OracleTestCase.php";a:23:{i:37;i:1;i:39;i:1;i:40;i:1;i:43;i:1;i:44;i:1;i:47;i:1;i:48;i:1;i:50;i:1;i:51;i:1;i:55;i:1;i:56;i:-1;i:57;i:1;i:58;i:1;i:60;i:1;i:63;i:1;i:64;i:1;i:65;i:1;i:66;i:1;i:68;i:1;i:69;i:1;i:70;i:1;i:71;i:1;i:72;i:1;}s:70:"/home/bjarte/public_html/doctrine/tests/Transaction/SqliteTestCase.php";a:14:{i:38;i:1;i:39;i:-1;i:40;i:1;i:41;i:1;i:43;i:1;i:46;i:1;i:47;i:1;i:48;i:1;i:49;i:1;i:51;i:1;i:52;i:1;i:53;i:1;i:54;i:1;i:55;i:1;}s:65:"/home/bjarte/public_html/doctrine/tests/Export/OracleTestCase.php";a:71:{i:37;i:1;i:38;i:1;i:39;i:1;i:41;i:1;i:43;i:1;i:44;i:1;i:48;i:1;i:50;i:1;i:52;i:1;i:54;i:1;i:55;i:1;i:58;i:1;i:60;i:1;i:61;i:1;i:63;i:1;i:65;i:1;i:66;i:1;i:67;i:1;i:68;i:1;i:71;i:1;i:72;i:1;i:73;i:1;i:74;i:1;i:76;i:1;i:77;i:1;i:80;i:1;i:81;i:1;i:82;i:1;i:83;i:1;i:86;i:1;i:87;i:1;i:88;i:1;i:90;i:1;i:91;i:1;i:94;i:1;i:95;i:1;i:96;i:1;i:97;i:1;i:100;i:1;i:102;i:1;i:105;i:1;i:107;i:1;i:108;i:1;i:109;i:1;i:110;i:1;i:111;i:1;i:112;i:1;i:113;i:1;i:117;i:1;i:119;i:1;i:121;i:1;i:123;i:1;i:124;i:1;i:125;i:1;i:128;i:1;i:129;i:1;i:130;i:1;i:132;i:1;i:133;i:1;i:135;i:1;i:137;i:1;i:138;i:1;i:141;i:1;i:142;i:1;i:143;i:1;i:145;i:1;i:146;i:1;i:147;i:1;i:149;i:1;i:151;i:1;i:152;i:1;}s:65:"/home/bjarte/public_html/doctrine/tests/Export/SqliteTestCase.php";a:60:{i:38;i:1;i:39;i:-1;i:40;i:1;i:41;i:1;i:43;i:1;i:47;i:1;i:48;i:-1;i:49;i:1;i:50;i:1;i:52;i:1;i:55;i:1;i:57;i:1;i:59;i:1;i:61;i:1;i:62;i:1;i:65;i:1;i:66;i:1;i:67;i:1;i:68;i:1;i:70;i:1;i:71;i:1;i:73;i:1;i:74;i:1;i:77;i:1;i:78;i:1;i:79;i:1;i:81;i:1;i:82;i:1;i:84;i:1;i:85;i:1;i:88;i:1;i:89;i:1;i:90;i:1;i:92;i:1;i:93;i:1;i:94;i:1;i:96;i:1;i:102;i:1;i:104;i:1;i:105;i:1;i:108;i:1;i:109;i:1;i:112;i:1;i:113;i:-1;i:114;i:1;i:115;i:1;i:117;i:1;i:120;i:1;i:121;i:1;i:122;i:1;i:124;i:1;i:127;i:1;i:128;i:1;i:129;i:1;i:130;i:1;i:131;i:1;i:133;i:1;i:138;i:1;i:140;i:1;i:142;i:1;}s:56:"/home/bjarte/public_html/doctrine/models/Forum_Board.php";a:7:{i:4;i:1;i:5;i:1;i:6;i:1;i:7;i:1;i:9;i:1;i:10;i:1;i:11;i:1;}s:69:"/home/bjarte/public_html/doctrine/lib/Doctrine/Relation/Exception.php";a:3:{i:21;i:1;i:33;i:1;i:35;i:1;}s:60:"/home/bjarte/public_html/doctrine/lib/Doctrine/Validator.php";a:144:{i:33;i:1;i:47;i:1;i:48;i:1;i:49;i:1;i:50;i:1;i:51;i:1;i:52;i:-1;i:55;i:1;i:56;i:1;i:57;i:-2;i:67;i:1;i:68;i:1;i:70;i:1;i:74;i:1;i:76;i:1;i:77;i:1;i:78;i:1;i:79;i:1;i:80;i:1;i:81;i:1;i:82;i:1;i:84;i:1;i:86;i:1;i:87;i:-1;i:89;i:-1;i:90;i:-1;i:91;i:-1;i:92;i:-2;i:93;i:-1;i:95;i:1;i:96;i:1;i:97;i:1;i:99;i:1;i:100;i:-2;i:101;i:1;i:103;i:1;i:104;i:1;i:105;i:-1;i:106;i:1;i:107;i:1;i:108;i:1;i:109;i:1;i:110;i:1;i:111;i:1;i:112;i:1;i:113;i:1;i:114;i:-2;i:116;i:1;i:117;i:1;i:118;i:-2;i:120;i:1;i:121;i:1;i:122;i:1;i:123;i:1;i:124;i:1;i:125;i:1;i:126;i:1;i:127;i:-2;i:129;i:1;i:130;i:1;i:131;i:1;i:132;i:1;i:133;i:1;i:134;i:1;i:135;i:1;i:136;i:-2;i:138;i:1;i:139;i:1;i:140;i:1;i:141;i:1;i:143;i:1;i:144;i:1;i:150;i:1;i:151;i:1;i:153;i:1;i:154;i:-1;i:155;i:-1;i:156;i:-1;i:157;i:-2;i:158;i:-1;i:159;i:1;i:160;i:1;i:166;i:1;i:167;i:1;i:168;i:1;i:169;i:1;i:170;i:1;i:171;i:1;i:174;i:1;i:175;i:1;i:176;i:-2;i:177;i:1;i:178;i:-2;i:186;i:-1;i:187;i:-2;i:198;i:1;i:199;i:-1;i:200;i:1;i:201;i:1;i:202;i:1;i:203;i:1;i:204;i:1;i:205;i:1;i:206;i:-1;i:207;i:-2;i:208;i:1;i:209;i:1;i:210;i:1;i:211;i:-2;i:222;i:1;i:223;i:1;i:224;i:-2;i:226;i:1;i:227;i:1;i:230;i:1;i:231;i:1;i:232;i:1;i:233;i:1;i:234;i:1;i:235;i:-2;i:236;i:1;i:237;i:1;i:238;i:1;i:239;i:1;i:240;i:-2;i:241;i:1;i:242;i:1;i:243;i:-2;i:244;i:-2;i:245;i:-1;i:254;i:1;i:256;i:1;i:257;i:1;i:258;i:1;i:259;i:1;i:260;i:1;i:261;i:-2;i:262;i:1;i:264;i:-2;i:265;i:1;i:266;i:1;i:267;i:1;i:268;i:-2;i:270;i:1;}s:49:"/home/bjarte/public_html/doctrine/models/Rec2.php";a:5:{i:6;i:1;i:7;i:1;i:8;i:1;i:12;i:1;i:13;i:1;}s:52:"/home/bjarte/public_html/doctrine/models/Account.php";a:3:{i:6;i:1;i:7;i:1;i:8;i:1;}s:62:"/home/bjarte/public_html/doctrine/models/ResourceReference.php";a:3:{i:4;i:1;i:5;i:1;i:6;i:1;}s:65:"/home/bjarte/public_html/doctrine/models/CustomSequenceRecord.php";a:3:{i:5;i:1;i:6;i:1;i:7;i:1;}s:60:"/home/bjarte/public_html/doctrine/models/MysqlTestRecord.php";a:4:{i:6;i:1;i:7;i:1;i:9;i:1;i:10;i:1;}s:70:"/home/bjarte/public_html/doctrine/models/ValidatorTest_ClientModel.php";a:8:{i:5;i:1;i:6;i:1;i:7;i:1;i:8;i:1;i:9;i:1;i:10;i:1;i:13;i:1;i:14;i:1;}s:64:"/home/bjarte/public_html/doctrine/tests/Query/HavingTestCase.php";a:11:{i:37;i:1;i:39;i:1;i:41;i:1;i:42;i:1;i:45;i:1;i:47;i:1;i:49;i:1;i:50;i:1;i:54;i:1;i:56;i:1;i:57;i:1;}s:59:"/home/bjarte/public_html/doctrine/models/SoftDeleteTest.php";a:9:{i:6;i:1;i:7;i:1;i:8;i:1;i:9;i:1;i:12;i:1;i:13;i:1;i:16;i:1;i:18;i:1;i:19;i:1;}s:62:"/home/bjarte/public_html/doctrine/models/BoardWithPosition.php";a:5:{i:4;i:1;i:5;i:1;i:6;i:1;i:8;i:1;i:9;i:1;}s:77:"/home/bjarte/public_html/doctrine/lib/Doctrine/Connection/Pgsql/Exception.php";a:11:{i:21;i:1;i:35;i:1;i:99;i:1;i:100;i:1;i:101;i:1;i:102;i:1;i:103;i:-2;i:104;i:1;i:105;i:-1;i:106;i:-2;i:108;i:1;}s:73:"/home/bjarte/public_html/doctrine/lib/Doctrine/Adapter/Statement/Mock.php";a:36:{i:34;i:1;i:42;i:1;i:43;i:1;i:58;i:-1;i:76;i:-1;i:107;i:-1;i:116;i:1;i:117;i:-2;i:128;i:-1;i:129;i:-2;i:139;i:-1;i:140;i:-2;i:150;i:-1;i:151;i:-2;i:183;i:1;i:184;i:-2;i:200;i:1;i:201;i:-2;i:219;i:1;i:220;i:1;i:221;i:1;i:222;i:1;i:223;i:-2;i:237;i:1;i:238;i:-2;i:254;i:-1;i:255;i:-2;i:269;i:-1;i:270;i:-2;i:285;i:1;i:286;i:-2;i:304;i:-1;i:314;i:-1;i:324;i:-1;i:333;i:-1;i:335;i:1;}s:69:"/home/bjarte/public_html/doctrine/tests/Transaction/MssqlTestCase.php";a:17:{i:38;i:1;i:39;i:-1;i:40;i:1;i:41;i:1;i:43;i:1;i:46;i:1;i:47;i:1;i:48;i:1;i:49;i:1;i:51;i:1;i:52;i:1;i:53;i:1;i:54;i:1;i:55;i:1;i:58;i:1;i:60;i:1;i:61;i:1;}s:63:"/home/bjarte/public_html/doctrine/models/FooReferenceRecord.php";a:4:{i:6;i:1;i:8;i:1;i:9;i:1;i:10;i:1;}s:51:"/home/bjarte/public_html/doctrine/models/Policy.php";a:6:{i:6;i:1;i:7;i:1;i:11;i:1;i:12;i:1;i:13;i:1;i:14;i:1;}s:69:"/home/bjarte/public_html/doctrine/lib/Doctrine/Validator/Unsigned.php";a:8:{i:34;i:1;i:43;i:1;i:45;i:1;i:46;i:-1;i:47;i:-2;i:48;i:1;i:49;i:-2;i:51;i:1;}s:64:"/home/bjarte/public_html/doctrine/tests/Query/DriverTestCase.php";a:32:{i:36;i:1;i:38;i:1;i:42;i:1;i:44;i:1;i:46;i:1;i:48;i:1;i:50;i:1;i:51;i:1;i:55;i:1;i:57;i:1;i:59;i:1;i:61;i:1;i:63;i:1;i:64;i:1;i:68;i:1;i:70;i:1;i:72;i:1;i:74;i:1;i:76;i:1;i:77;i:1;i:81;i:1;i:83;i:1;i:85;i:1;i:87;i:1;i:89;i:1;i:90;i:1;i:94;i:1;i:96;i:1;i:98;i:1;i:100;i:1;i:102;i:1;i:103;i:1;}s:58:"/home/bjarte/public_html/doctrine/models/SerializeTest.php";a:20:{i:6;i:1;i:8;i:1;i:9;i:1;i:10;i:1;i:11;i:1;i:12;i:1;i:13;i:1;i:14;i:1;i:15;i:1;i:16;i:1;i:17;i:1;i:18;i:1;i:19;i:1;i:22;i:1;i:23;i:1;i:25;i:1;i:26;i:1;i:27;i:1;i:28;i:1;i:29;i:1;}s:66:"/home/bjarte/public_html/doctrine/lib/Doctrine/Schema/Relation.php";a:10:{i:21;i:1;i:40;i:1;i:107;i:-1;i:108;i:-1;i:109;i:-1;i:110;i:-1;i:116;i:-1;i:117;i:-2;i:125;i:-1;i:127;i:1;}s:55:"/home/bjarte/public_html/doctrine/lib/Doctrine/Null.php";a:6:{i:36;i:1;i:39;i:-1;i:40;i:-2;i:43;i:-1;i:44;i:-2;i:46;i:1;}s:56:"/home/bjarte/public_html/doctrine/models/PolicyCodeN.php";a:6:{i:5;i:1;i:6;i:1;i:7;i:1;i:8;i:1;i:9;i:1;i:13;i:1;}s:77:"/home/bjarte/public_html/doctrine/lib/Doctrine/Connection/Mysql/Exception.php";a:10:{i:21;i:1;i:34;i:1;i:77;i:1;i:78;i:1;i:79;i:1;i:80;i:1;i:81;i:-2;i:82;i:-1;i:83;i:-2;i:85;i:1;}s:68:"/home/bjarte/public_html/doctrine/lib/Doctrine/Transaction/Mssql.php";a:15:{i:21;i:1;i:33;i:1;i:54;i:1;i:55;i:1;i:56;i:1;i:57;i:1;i:58;i:1;i:59;i:1;i:60;i:1;i:61;i:1;i:62;i:1;i:64;i:1;i:66;i:1;i:67;i:1;i:69;i:1;}s:68:"/home/bjarte/public_html/doctrine/models/FooForeignlyOwnedWithPK.php";a:4:{i:6;i:1;i:7;i:1;i:10;i:1;i:11;i:1;}s:66:"/home/bjarte/public_html/doctrine/models/TestMovieUserBookmark.php";a:3:{i:6;i:1;i:7;i:1;i:8;i:1;}s:69:"/home/bjarte/public_html/doctrine/tests/Record/ZeroValuesTestCase.php";a:24:{i:37;i:1;i:39;i:1;i:40;i:1;i:44;i:1;i:45;i:1;i:46;i:1;i:47;i:1;i:48;i:1;i:49;i:1;i:50;i:1;i:54;i:1;i:56;i:1;i:57;i:1;i:61;i:1;i:62;i:1;i:63;i:1;i:65;i:1;i:67;i:1;i:68;i:1;i:72;i:1;i:73;i:1;i:74;i:1;i:76;i:1;i:77;i:1;}s:66:"/home/bjarte/public_html/doctrine/lib/Doctrine/Schema/Database.php";a:10:{i:21;i:1;i:40;i:1;i:60;i:-1;i:69;i:-1;i:78;i:-1;i:86;i:-1;i:87;i:-1;i:96;i:-1;i:97;i:-2;i:99;i:1;}s:65:"/home/bjarte/public_html/doctrine/models/ValidatorTest_Person.php";a:5:{i:4;i:1;i:5;i:1;i:6;i:1;i:9;i:1;i:10;i:1;}s:63:"/home/bjarte/public_html/doctrine/lib/Doctrine/Query/Having.php";a:40:{i:21;i:1;i:33;i:1;i:43;i:1;i:45;i:1;i:46;i:1;i:48;i:1;i:49;i:1;i:50;i:1;i:52;i:1;i:53;i:1;i:54;i:1;i:56;i:1;i:58;i:1;i:60;i:-2;i:61;i:1;i:62;i:1;i:64;i:1;i:65;i:1;i:66;i:1;i:67;i:1;i:68;i:1;i:69;i:1;i:70;i:1;i:71;i:1;i:72;i:1;i:74;i:1;i:75;i:-2;i:76;i:-1;i:79;i:-2;i:89;i:1;i:91;i:1;i:92;i:1;i:94;i:1;i:95;i:1;i:96;i:1;i:97;i:1;i:98;i:1;i:100;i:1;i:101;i:-2;i:103;i:1;}s:79:"/home/bjarte/public_html/doctrine/tests/Record/SerializeUnserializeTestCase.php";a:48:{i:38;i:1;i:40;i:1;i:41;i:1;i:44;i:1;i:48;i:1;i:49;i:1;i:50;i:1;i:51;i:1;i:52;i:1;i:53;i:1;i:54;i:1;i:55;i:1;i:56;i:1;i:57;i:1;i:58;i:1;i:59;i:1;i:60;i:1;i:61;i:1;i:63;i:1;i:65;i:1;i:66;i:1;i:67;i:1;i:69;i:1;i:70;i:1;i:71;i:1;i:72;i:1;i:73;i:1;i:74;i:1;i:75;i:1;i:76;i:1;i:77;i:1;i:78;i:1;i:79;i:1;i:80;i:1;i:81;i:1;i:83;i:1;i:87;i:1;i:88;i:1;i:90;i:1;i:91;i:1;i:93;i:1;i:95;i:1;i:97;i:1;i:98;i:1;i:100;i:1;i:101;i:1;i:112;i:1;i:113;i:1;}s:62:"/home/bjarte/public_html/doctrine/lib/Doctrine/Cache/Array.php";a:17:{i:34;i:1;i:52;i:1;i:53;i:1;i:54;i:-2;i:55;i:1;i:56;i:-2;i:65;i:-1;i:66;i:-2;i:79;i:1;i:80;i:1;i:89;i:-1;i:90;i:-1;i:98;i:-1;i:99;i:-1;i:107;i:1;i:108;i:-2;i:110;i:1;}s:57:"/home/bjarte/public_html/doctrine/lib/Doctrine/Object.php";a:4:{i:48;i:1;i:49;i:1;i:58;i:1;i:59;i:-2;}s:58:"/home/bjarte/public_html/doctrine/models/EntityAddress.php";a:3:{i:6;i:1;i:7;i:1;i:8;i:1;}s:49:"/home/bjarte/public_html/doctrine/models/Task.php";a:6:{i:4;i:1;i:5;i:1;i:6;i:1;i:8;i:1;i:9;i:1;i:10;i:1;}s:58:"/home/bjarte/public_html/doctrine/models/CoverageCodeN.php";a:6:{i:5;i:1;i:6;i:1;i:7;i:1;i:8;i:1;i:9;i:1;i:13;i:1;}s:65:"/home/bjarte/public_html/doctrine/lib/Doctrine/Hydrate/Record.php";a:47:{i:34;i:1;i:44;i:1;i:45;i:1;i:47;i:1;i:48;i:-2;i:51;i:1;i:52;i:-2;i:55;i:1;i:56;i:1;i:58;i:1;i:59;i:-2;i:60;i:-1;i:61;i:-2;i:64;i:1;i:65;i:1;i:77;i:-1;i:79;i:-1;i:80;i:-1;i:81;i:-1;i:82;i:-1;i:83;i:-2;i:84;i:-1;i:85;i:-1;i:86;i:-1;i:87;i:-1;i:88;i:-2;i:90;i:-1;i:91;i:-2;i:94;i:1;i:95;i:-2;i:98;i:1;i:99;i:1;i:100;i:1;i:101;i:1;i:102;i:1;i:103;i:1;i:104;i:1;i:106;i:1;i:107;i:-2;i:111;i:1;i:112;i:1;i:113;i:1;i:114;i:1;i:115;i:1;i:116;i:1;i:117;i:1;i:119;i:1;}s:67:"/home/bjarte/public_html/doctrine/lib/Doctrine/Record/Exception.php";a:3:{i:21;i:1;i:33;i:1;i:35;i:1;}s:65:"/home/bjarte/public_html/doctrine/lib/Doctrine/DataDict/Mssql.php";a:113:{i:21;i:1;i:35;i:1;i:62;i:1;i:63;i:-1;i:64;i:-2;i:65;i:1;i:66;i:1;i:67;i:1;i:68;i:1;i:69;i:1;i:70;i:1;i:71;i:1;i:72;i:1;i:73;i:1;i:74;i:1;i:76;i:1;i:78;i:1;i:79;i:1;i:80;i:1;i:81;i:1;i:82;i:-1;i:83;i:-1;i:84;i:-1;i:85;i:-2;i:86;i:-1;i:87;i:1;i:88;i:1;i:89;i:1;i:90;i:-1;i:91;i:-1;i:92;i:-1;i:93;i:-2;i:94;i:-1;i:95;i:1;i:96;i:1;i:97;i:1;i:98;i:1;i:99;i:1;i:100;i:1;i:101;i:1;i:102;i:1;i:103;i:1;i:104;i:1;i:105;i:1;i:106;i:1;i:107;i:1;i:108;i:1;i:109;i:1;i:110;i:-1;i:111;i:-1;i:112;i:-1;i:113;i:-1;i:114;i:-1;i:116;i:-1;i:117;i:-2;i:126;i:1;i:127;i:1;i:129;i:1;i:131;i:1;i:133;i:1;i:134;i:1;i:137;i:1;i:138;i:1;i:139;i:1;i:140;i:1;i:141;i:1;i:142;i:1;i:143;i:1;i:144;i:1;i:145;i:1;i:146;i:1;i:147;i:1;i:148;i:1;i:149;i:1;i:150;i:1;i:151;i:1;i:152;i:1;i:153;i:1;i:154;i:1;i:155;i:1;i:156;i:1;i:157;i:1;i:158;i:1;i:159;i:1;i:160;i:1;i:161;i:1;i:162;i:1;i:163;i:1;i:164;i:1;i:165;i:1;i:166;i:-1;i:167;i:-1;i:168;i:1;i:169;i:1;i:170;i:1;i:171;i:1;i:172;i:1;i:173;i:1;i:174;i:1;i:175;i:1;i:176;i:1;i:177;i:1;i:178;i:1;i:179;i:1;i:180;i:1;i:181;i:1;i:182;i:1;i:184;i:1;i:185;i:1;i:186;i:1;i:187;i:1;i:188;i:-2;i:190;i:1;}s:68:"/home/bjarte/public_html/doctrine/lib/Doctrine/Sequence/Firebird.php";a:28:{i:21;i:1;i:33;i:1;i:45;i:1;i:47;i:1;i:50;i:1;i:52;i:1;i:53;i:-2;i:58;i:-2;i:59;i:-2;i:60;i:-2;i:65;i:-2;i:66;i:-2;i:67;i:-2;i:69;i:1;i:70;i:-2;i:80;i:1;i:81;i:-2;i:91;i:1;i:94;i:1;i:96;i:1;i:97;i:1;i:98;i:-2;i:100;i:1;i:101;i:-1;i:102;i:-2;i:103;i:1;i:104;i:-2;i:106;i:1;}s:62:"/home/bjarte/public_html/doctrine/tests/ConnectionTestCase.php";a:122:{i:39;i:1;i:40;i:-1;i:41;i:1;i:42;i:1;i:44;i:1;i:48;i:1;i:50;i:1;i:51;i:1;i:52;i:1;i:53;i:1;i:57;i:1;i:58;i:1;i:60;i:1;i:61;i:1;i:63;i:1;i:66;i:1;i:69;i:1;i:70;i:1;i:71;i:1;i:74;i:1;i:75;i:1;i:76;i:1;i:77;i:1;i:78;i:1;i:82;i:1;i:84;i:1;i:86;i:1;i:88;i:1;i:89;i:1;i:94;i:1;i:96;i:1;i:97;i:1;i:98;i:1;i:99;i:1;i:101;i:1;i:103;i:1;i:104;i:1;i:105;i:1;i:106;i:1;i:110;i:1;i:112;i:1;i:113;i:1;i:114;i:1;i:115;i:1;i:117;i:1;i:119;i:1;i:120;i:1;i:121;i:1;i:122;i:1;i:123;i:1;i:127;i:1;i:129;i:1;i:130;i:1;i:131;i:1;i:132;i:1;i:134;i:1;i:136;i:1;i:137;i:1;i:138;i:1;i:139;i:1;i:140;i:1;i:144;i:1;i:145;i:1;i:149;i:1;i:150;i:1;i:154;i:1;i:155;i:1;i:156;i:1;i:157;i:1;i:161;i:1;i:162;i:1;i:164;i:1;i:165;i:-1;i:166;i:1;i:167;i:1;i:169;i:1;i:171;i:1;i:172;i:1;i:174;i:1;i:178;i:1;i:179;i:1;i:180;i:1;i:184;i:1;i:185;i:1;i:189;i:1;i:190;i:1;i:194;i:1;i:195;i:1;i:199;i:1;i:200;i:1;i:201;i:1;i:205;i:1;i:206;i:1;i:210;i:1;i:211;i:1;i:212;i:1;i:213;i:1;i:214;i:1;i:215;i:1;i:216;i:1;i:220;i:1;i:221;i:1;i:222;i:1;i:223;i:1;i:224;i:1;i:225;i:1;i:226;i:1;i:227;i:1;i:228;i:1;i:229;i:1;i:230;i:1;i:231;i:1;i:232;i:1;i:233;i:1;i:237;i:1;i:240;i:1;i:242;i:1;i:243;i:1;i:244;i:1;i:245;i:-2;i:247;i:1;i:248;i:1;}s:67:"/home/bjarte/public_html/doctrine/tests/Query/ConditionTestCase.php";a:50:{i:35;i:1;i:36;i:1;i:40;i:1;i:41;i:1;i:43;i:1;i:45;i:1;i:48;i:1;i:50;i:1;i:52;i:1;i:53;i:1;i:55;i:1;i:56;i:1;i:58;i:1;i:59;i:1;i:61;i:1;i:62;i:1;i:64;i:1;i:65;i:1;i:67;i:1;i:69;i:1;i:71;i:1;i:73;i:1;i:74;i:1;i:76;i:1;i:77;i:1;i:79;i:1;i:80;i:1;i:82;i:1;i:86;i:1;i:88;i:1;i:90;i:1;i:91;i:1;i:93;i:1;i:94;i:1;i:96;i:1;i:97;i:1;i:99;i:1;i:100;i:1;i:102;i:1;i:103;i:1;i:105;i:1;i:107;i:1;i:109;i:1;i:111;i:1;i:112;i:1;i:114;i:1;i:115;i:1;i:117;i:1;i:118;i:1;i:119;i:1;}s:72:"/home/bjarte/public_html/doctrine/tests/CustomResultSetOrderTestCase.php";a:69:{i:44;i:1;i:45;i:1;i:46;i:1;i:48;i:1;i:49;i:1;i:50;i:1;i:52;i:1;i:53;i:1;i:54;i:1;i:56;i:1;i:57;i:1;i:59;i:1;i:60;i:1;i:62;i:1;i:63;i:1;i:66;i:1;i:67;i:1;i:68;i:1;i:70;i:1;i:71;i:1;i:74;i:1;i:76;i:1;i:77;i:1;i:83;i:1;i:84;i:1;i:85;i:1;i:86;i:1;i:101;i:1;i:103;i:1;i:104;i:1;i:105;i:1;i:106;i:1;i:107;i:1;i:109;i:1;i:112;i:1;i:113;i:1;i:114;i:1;i:117;i:1;i:118;i:1;i:119;i:1;i:121;i:1;i:122;i:1;i:123;i:1;i:126;i:1;i:127;i:1;i:128;i:-1;i:130;i:1;i:131;i:1;i:147;i:1;i:148;i:1;i:149;i:1;i:150;i:1;i:151;i:1;i:152;i:1;i:154;i:1;i:157;i:1;i:159;i:1;i:160;i:1;i:163;i:1;i:164;i:1;i:165;i:1;i:168;i:1;i:169;i:1;i:170;i:1;i:173;i:1;i:174;i:1;i:175;i:-1;i:177;i:1;i:178;i:1;}s:80:"/home/bjarte/public_html/doctrine/tests/ColumnAggregationInheritanceTestCase.php";a:26:{i:40;i:1;i:42;i:1;i:43;i:1;i:44;i:1;i:45;i:1;i:46;i:1;i:47;i:1;i:51;i:1;i:52;i:1;i:53;i:1;i:54;i:1;i:58;i:1;i:59;i:1;i:60;i:1;i:62;i:1;i:63;i:1;i:64;i:1;i:65;i:1;i:68;i:1;i:70;i:1;i:72;i:1;i:73;i:1;i:77;i:1;i:78;i:1;i:80;i:1;i:81;i:1;}s:68:"/home/bjarte/public_html/doctrine/lib/Doctrine/Import/Schema/Xml.php";a:33:{i:40;i:1;i:50;i:1;i:51;i:-1;i:52;i:-2;i:54;i:1;i:55;i:-1;i:56;i:-2;i:58;i:1;i:59;i:-2;i:72;i:1;i:75;i:1;i:77;i:1;i:79;i:1;i:80;i:1;i:81;i:1;i:82;i:1;i:83;i:1;i:84;i:1;i:85;i:1;i:86;i:1;i:87;i:1;i:88;i:1;i:89;i:1;i:91;i:1;i:92;i:1;i:94;i:1;i:96;i:1;i:97;i:1;i:99;i:1;i:100;i:1;i:102;i:1;i:103;i:-2;i:105;i:1;}s:68:"/home/bjarte/public_html/doctrine/lib/Doctrine/Connection/Common.php";a:14:{i:21;i:1;i:33;i:1;i:44;i:1;i:45;i:1;i:47;i:1;i:48;i:1;i:49;i:1;i:50;i:1;i:51;i:1;i:52;i:-1;i:53;i:-1;i:55;i:1;i:56;i:-2;i:58;i:1;}s:64:"/home/bjarte/public_html/doctrine/tests/Ticket/NjeroTestCase.php";a:50:{i:16;i:1;i:19;i:1;i:20;i:1;i:21;i:1;i:22;i:1;i:23;i:1;i:24;i:1;i:25;i:1;i:29;i:1;i:30;i:1;i:31;i:1;i:32;i:1;i:34;i:1;i:35;i:1;i:36;i:1;i:37;i:1;i:39;i:1;i:40;i:1;i:41;i:1;i:42;i:1;i:44;i:1;i:45;i:1;i:46;i:1;i:47;i:1;i:49;i:1;i:50;i:1;i:51;i:1;i:52;i:1;i:53;i:1;i:54;i:1;i:56;i:1;i:57;i:1;i:58;i:1;i:59;i:1;i:61;i:1;i:67;i:1;i:68;i:1;i:69;i:1;i:70;i:1;i:72;i:1;i:73;i:1;i:74;i:1;i:75;i:1;i:76;i:1;i:78;i:1;i:79;i:1;i:80;i:1;i:82;i:1;i:83;i:1;i:86;i:1;}s:50:"/home/bjarte/public_html/doctrine/models/Email.php";a:2:{i:6;i:1;i:7;i:1;}s:50:"/home/bjarte/public_html/doctrine/models/RateN.php";a:11:{i:5;i:1;i:6;i:1;i:7;i:1;i:8;i:1;i:9;i:1;i:10;i:1;i:11;i:1;i:17;i:1;i:18;i:1;i:19;i:1;i:20;i:1;}s:67:"/home/bjarte/public_html/doctrine/tests/Import/FirebirdTestCase.php";a:21:{i:37;i:1;i:39;i:1;i:40;i:1;i:43;i:1;i:45;i:1;i:46;i:1;i:49;i:1;i:51;i:1;i:52;i:1;i:55;i:1;i:57;i:1;i:58;i:1;i:61;i:1;i:63;i:1;i:64;i:1;i:67;i:1;i:69;i:1;i:70;i:1;i:73;i:1;i:75;i:1;i:76;i:1;}s:59:"/home/bjarte/public_html/doctrine/models/Forum_Category.php";a:9:{i:4;i:1;i:5;i:1;i:6;i:1;i:7;i:1;i:8;i:1;i:10;i:1;i:11;i:1;i:12;i:1;i:13;i:1;}s:79:"/home/bjarte/public_html/doctrine/models/ValidatorTest_ClientToAddressModel.php";a:5:{i:6;i:1;i:7;i:1;i:8;i:1;i:11;i:1;i:14;i:1;}s:70:"/home/bjarte/public_html/doctrine/tests/Query/ShortAliasesTestCase.php";a:6:{i:13;i:1;i:15;i:1;i:17;i:1;i:19;i:1;i:21;i:1;i:23;i:1;}s:68:"/home/bjarte/public_html/doctrine/tests/Query/ExpressionTestCase.php";a:41:{i:38;i:1;i:41;i:1;i:43;i:1;i:44;i:-1;i:45;i:1;i:46;i:1;i:48;i:1;i:52;i:1;i:55;i:1;i:57;i:1;i:58;i:-1;i:59;i:1;i:60;i:1;i:62;i:1;i:66;i:1;i:68;i:1;i:70;i:1;i:71;i:1;i:75;i:1;i:77;i:1;i:79;i:1;i:80;i:1;i:84;i:1;i:86;i:1;i:88;i:1;i:89;i:1;i:93;i:1;i:95;i:1;i:97;i:1;i:98;i:1;i:99;i:1;i:101;i:1;i:102;i:1;i:103;i:1;i:104;i:1;i:105;i:1;i:106;i:1;i:107;i:1;i:109;i:1;i:111;i:1;i:112;i:1;}s:50:"/home/bjarte/public_html/doctrine/models/Photo.php";a:4:{i:4;i:1;i:5;i:1;i:7;i:1;i:8;i:1;}s:70:"/home/bjarte/public_html/doctrine/lib/Doctrine/Query/JoinCondition.php";a:52:{i:21;i:1;i:33;i:1;i:37;i:1;i:39;i:1;i:41;i:1;i:42;i:1;i:43;i:1;i:44;i:1;i:45;i:1;i:46;i:1;i:48;i:1;i:49;i:1;i:50;i:1;i:52;i:1;i:55;i:1;i:57;i:-1;i:59;i:-1;i:61;i:-1;i:62;i:-1;i:63;i:-1;i:64;i:-1;i:65;i:-1;i:67;i:-1;i:69;i:-1;i:70;i:-1;i:71;i:-1;i:72;i:-1;i:73;i:-1;i:74;i:-1;i:75;i:-1;i:77;i:-1;i:78;i:-1;i:80;i:-1;i:81;i:1;i:82;i:-1;i:83;i:-1;i:84;i:1;i:89;i:1;i:90;i:1;i:91;i:1;i:92;i:1;i:93;i:1;i:94;i:-1;i:95;i:-1;i:96;i:1;i:97;i:1;i:98;i:1;i:99;i:1;i:101;i:1;i:102;i:1;i:103;i:-2;i:105;i:1;}s:68:"/home/bjarte/public_html/doctrine/lib/Doctrine/Import/Schema/Yml.php";a:11:{i:40;i:1;i:50;i:1;i:51;i:-1;i:52;i:-2;i:54;i:1;i:55;i:-2;i:68;i:1;i:70;i:1;i:98;i:1;i:99;i:-2;i:101;i:1;}s:48:"/home/bjarte/public_html/doctrine/tests/Test.php";a:107:{i:8;i:-1;i:10;i:-1;i:11;i:-1;i:15;i:-1;i:16;i:-1;i:17;i:-1;i:18;i:-1;i:20;i:-1;i:23;i:1;i:24;i:1;i:25;i:-2;i:26;i:-1;i:27;i:-1;i:28;i:-1;i:30;i:-1;i:31;i:-1;i:32;i:-2;i:33;i:-1;i:34;i:-1;i:35;i:-2;i:38;i:1;i:39;i:1;i:40;i:1;i:41;i:-1;i:42;i:-2;i:43;i:1;i:44;i:1;i:45;i:1;i:46;i:1;i:48;i:1;i:49;i:1;i:50;i:1;i:51;i:1;i:52;i:1;i:53;i:1;i:54;i:1;i:56;i:1;i:57;i:1;i:62;i:1;i:63;i:-2;i:66;i:-1;i:67;i:-2;i:75;i:1;i:76;i:1;i:88;i:1;i:89;i:1;i:90;i:1;i:91;i:1;i:92;i:1;i:93;i:1;i:94;i:1;i:95;i:1;i:96;i:1;i:98;i:1;i:102;i:1;i:103;i:1;i:104;i:1;i:105;i:-1;i:107;i:1;i:111;i:1;i:112;i:1;i:113;i:1;i:114;i:-1;i:116;i:1;i:119;i:1;i:120;i:1;i:121;i:1;i:122;i:1;i:124;i:1;i:127;i:1;i:128;i:1;i:129;i:1;i:130;i:-1;i:132;i:1;i:135;i:1;i:136;i:1;i:139;i:1;i:140;i:1;i:143;i:1;i:144;i:1;i:147;i:1;i:148;i:1;i:149;i:1;i:151;i:1;i:152;i:-1;i:153;i:-1;i:155;i:1;i:156;i:1;i:157;i:1;i:158;i:-2;i:159;i:1;i:160;i:1;i:161;i:1;i:162;i:1;i:165;i:1;i:166;i:1;i:167;i:1;i:169;i:1;i:170;i:1;i:171;i:1;i:172;i:1;i:175;i:1;i:176;i:-2;i:179;i:1;i:180;i:-2;i:183;i:1;i:184;i:-2;}s:60:"/home/bjarte/public_html/doctrine/lib/Doctrine/Exception.php";a:8:{i:32;i:1;i:82;i:-1;i:83;i:-1;i:84;i:-2;i:86;i:-1;i:87;i:-1;i:88;i:-2;i:91;i:1;}s:72:"/home/bjarte/public_html/doctrine/lib/Doctrine/Connection/UnitOfWork.php";a:339:{i:21;i:1;i:33;i:1;i:48;i:1;i:49;i:1;i:51;i:1;i:52;i:1;i:53;i:1;i:54;i:1;i:56;i:1;i:58;i:1;i:59;i:1;i:60;i:1;i:61;i:1;i:63;i:1;i:67;i:1;i:68;i:1;i:69;i:1;i:70;i:1;i:71;i:1;i:72;i:1;i:74;i:1;i:75;i:1;i:76;i:1;i:77;i:1;i:80;i:1;i:81;i:1;i:82;i:-2;i:84;i:1;i:85;i:1;i:86;i:1;i:87;i:1;i:89;i:1;i:90;i:1;i:91;i:1;i:92;i:1;i:93;i:1;i:96;i:1;i:97;i:1;i:98;i:1;i:99;i:1;i:101;i:1;i:102;i:1;i:103;i:1;i:104;i:1;i:105;i:1;i:107;i:1;i:108;i:1;i:109;i:1;i:111;i:1;i:112;i:1;i:114;i:1;i:115;i:1;i:117;i:1;i:119;i:1;i:120;i:1;i:121;i:1;i:123;i:-1;i:124;i:-1;i:125;i:-1;i:126;i:-1;i:127;i:1;i:129;i:1;i:130;i:1;i:131;i:1;i:132;i:1;i:133;i:-2;i:142;i:1;i:144;i:1;i:145;i:1;i:146;i:1;i:147;i:-2;i:149;i:1;i:151;i:1;i:153;i:1;i:155;i:1;i:157;i:1;i:158;i:1;i:160;i:1;i:162;i:1;i:164;i:1;i:166;i:1;i:167;i:1;i:168;i:1;i:169;i:1;i:170;i:1;i:171;i:1;i:172;i:1;i:173;i:1;i:174;i:1;i:176;i:1;i:177;i:-2;i:178;i:1;i:180;i:1;i:182;i:1;i:183;i:1;i:184;i:1;i:187;i:1;i:189;i:1;i:191;i:1;i:192;i:1;i:194;i:1;i:195;i:1;i:196;i:1;i:197;i:1;i:198;i:1;i:201;i:1;i:203;i:1;i:205;i:1;i:207;i:1;i:208;i:-2;i:217;i:1;i:219;i:1;i:221;i:1;i:223;i:1;i:224;i:1;i:225;i:1;i:226;i:1;i:227;i:1;i:228;i:1;i:229;i:1;i:230;i:1;i:231;i:1;i:232;i:1;i:233;i:1;i:235;i:1;i:236;i:-1;i:237;i:1;i:239;i:1;i:241;i:1;i:242;i:1;i:253;i:1;i:254;i:1;i:255;i:-2;i:256;i:1;i:258;i:1;i:260;i:1;i:262;i:1;i:264;i:1;i:266;i:1;i:268;i:1;i:270;i:1;i:271;i:1;i:273;i:1;i:275;i:1;i:276;i:1;i:278;i:1;i:282;i:1;i:284;i:1;i:286;i:1;i:288;i:1;i:289;i:-2;i:293;i:1;i:294;i:1;i:296;i:1;i:297;i:1;i:298;i:1;i:300;i:1;i:303;i:1;i:304;i:1;i:307;i:1;i:308;i:-2;i:318;i:-1;i:319;i:-1;i:320;i:-1;i:322;i:-1;i:323;i:-1;i:325;i:-1;i:326;i:-1;i:328;i:-1;i:329;i:-1;i:330;i:-1;i:331;i:-1;i:332;i:-1;i:333;i:-1;i:334;i:-1;i:335;i:-1;i:336;i:-1;i:337;i:-1;i:338;i:-1;i:339;i:-1;i:341;i:-1;i:342;i:-1;i:343;i:-1;i:344;i:-1;i:345;i:-1;i:346;i:-1;i:347;i:-1;i:348;i:-1;i:351;i:-1;i:352;i:-1;i:353;i:-1;i:354;i:-1;i:356;i:-1;i:357;i:-1;i:359;i:-1;i:360;i:-1;i:370;i:1;i:371;i:1;i:372;i:1;i:374;i:1;i:375;i:1;i:377;i:1;i:378;i:1;i:379;i:1;i:381;i:1;i:384;i:1;i:385;i:1;i:386;i:1;i:387;i:1;i:388;i:1;i:389;i:1;i:391;i:1;i:392;i:-2;i:410;i:1;i:411;i:1;i:413;i:1;i:414;i:1;i:416;i:1;i:417;i:1;i:418;i:1;i:419;i:1;i:420;i:1;i:422;i:1;i:423;i:1;i:425;i:1;i:426;i:1;i:427;i:1;i:428;i:1;i:430;i:1;i:431;i:1;i:432;i:1;i:433;i:1;i:434;i:1;i:444;i:1;i:445;i:1;i:446;i:1;i:447;i:1;i:448;i:1;i:449;i:1;i:450;i:1;i:452;i:1;i:454;i:1;i:455;i:1;i:456;i:-1;i:457;i:1;i:458;i:1;i:469;i:1;i:472;i:1;i:473;i:1;i:475;i:1;i:476;i:1;i:477;i:1;i:478;i:1;i:481;i:1;i:482;i:1;i:484;i:1;i:485;i:1;i:486;i:1;i:487;i:1;i:488;i:1;i:498;i:1;i:500;i:1;i:502;i:1;i:504;i:1;i:505;i:1;i:507;i:1;i:508;i:-1;i:509;i:-2;i:510;i:1;i:511;i:1;i:512;i:1;i:513;i:-1;i:514;i:-1;i:515;i:-1;i:517;i:1;i:519;i:1;i:520;i:-1;i:521;i:-1;i:522;i:-1;i:523;i:-1;i:524;i:-1;i:525;i:-1;i:527;i:1;i:529;i:1;i:530;i:1;i:532;i:1;i:533;i:-1;i:534;i:-1;i:535;i:1;i:536;i:1;i:538;i:1;i:539;i:1;i:540;i:1;i:541;i:1;i:543;i:1;i:544;i:1;i:546;i:1;i:547;i:1;i:549;i:1;i:551;i:1;i:553;i:1;i:554;i:-2;i:564;i:1;i:566;i:1;i:568;i:1;i:570;i:1;i:571;i:1;i:573;i:1;i:574;i:-1;i:575;i:-2;i:576;i:1;i:577;i:1;i:579;i:1;i:581;i:1;i:582;i:1;i:583;i:1;i:584;i:1;i:586;i:1;i:587;i:1;i:589;i:1;i:591;i:1;i:592;i:1;i:594;i:1;i:595;i:-1;i:596;i:-1;i:598;i:1;i:600;i:1;i:601;i:-1;i:602;i:-1;i:604;i:1;i:605;i:1;i:606;i:1;i:608;i:1;i:609;i:1;i:611;i:1;i:613;i:1;i:615;i:1;i:616;i:-2;i:618;i:1;}s:58:"/home/bjarte/public_html/doctrine/lib/Doctrine/Hydrate.php";a:440:{i:174;i:1;i:175;i:1;i:176;i:1;i:177;i:1;i:178;i:1;i:187;i:1;i:188;i:-1;i:189;i:-1;i:191;i:1;i:193;i:1;i:194;i:-2;i:203;i:1;i:205;i:1;i:206;i:-2;i:215;i:1;i:217;i:1;i:218;i:-1;i:219;i:-2;i:221;i:1;i:222;i:-2;i:231;i:1;i:232;i:-2;i:242;i:1;i:243;i:1;i:244;i:1;i:245;i:-1;i:247;i:-1;i:248;i:-2;i:249;i:1;i:250;i:1;i:251;i:1;i:253;i:1;i:254;i:-2;i:263;i:-1;i:265;i:-1;i:266;i:-2;i:275;i:1;i:276;i:-1;i:277;i:-1;i:278;i:1;i:280;i:1;i:281;i:-2;i:290;i:1;i:291;i:1;i:292;i:-2;i:293;i:1;i:295;i:-2;i:303;i:-1;i:304;i:-1;i:305;i:-2;i:314;i:-1;i:316;i:-1;i:327;i:-1;i:337;i:1;i:339;i:1;i:340;i:1;i:342;i:1;i:343;i:1;i:344;i:1;i:346;i:1;i:348;i:1;i:349;i:-2;i:351;i:-1;i:352;i:-2;i:362;i:1;i:363;i:-2;i:373;i:1;i:374;i:-1;i:375;i:-2;i:376;i:1;i:377;i:-2;i:387;i:-1;i:388;i:-1;i:389;i:-2;i:390;i:-1;i:391;i:-2;i:403;i:1;i:405;i:1;i:407;i:1;i:408;i:1;i:409;i:1;i:411;i:1;i:412;i:1;i:413;i:-1;i:414;i:-1;i:415;i:1;i:416;i:1;i:418;i:1;i:420;i:1;i:421;i:-2;i:430;i:1;i:431;i:-2;i:442;i:1;i:444;i:1;i:445;i:-2;i:460;i:1;i:462;i:1;i:463;i:1;i:464;i:-2;i:466;i:1;i:467;i:-1;i:468;i:-2;i:470;i:1;i:471;i:-2;i:483;i:1;i:484;i:-1;i:485;i:-2;i:486;i:1;i:487;i:1;i:488;i:1;i:489;i:1;i:491;i:1;i:492;i:-2;i:504;i:1;i:505;i:-1;i:506;i:-2;i:508;i:1;i:509;i:-2;i:520;i:1;i:521;i:1;i:522;i:1;i:523;i:1;i:524;i:1;i:526;i:1;i:527;i:-1;i:529;i:1;i:530;i:-2;i:542;i:1;i:543;i:-1;i:544;i:-2;i:546;i:1;i:547;i:1;i:548;i:-1;i:549;i:-1;i:550;i:1;i:552;i:1;i:553;i:1;i:556;i:1;i:557;i:-2;i:567;i:-1;i:568;i:-2;i:578;i:1;i:579;i:-1;i:580;i:-2;i:582;i:1;i:583;i:-2;i:597;i:1;i:598;i:1;i:599;i:1;i:600;i:1;i:601;i:-2;i:610;i:1;i:611;i:1;i:614;i:1;i:617;i:1;i:619;i:1;i:620;i:-2;i:629;i:1;i:630;i:-2;i:639;i:-1;i:640;i:1;i:641;i:1;i:642;i:1;i:643;i:1;i:644;i:1;i:645;i:1;i:646;i:1;i:647;i:1;i:648;i:1;i:649;i:1;i:650;i:1;i:651;i:1;i:653;i:1;i:654;i:1;i:662;i:1;i:663;i:-2;i:674;i:1;i:675;i:1;i:684;i:1;i:685;i:-2;i:693;i:1;i:694;i:-2;i:701;i:-1;i:702;i:-1;i:705;i:1;i:706;i:-2;i:716;i:-1;i:718;i:-1;i:719;i:-2;i:728;i:1;i:729;i:-2;i:739;i:1;i:741;i:1;i:742;i:1;i:743;i:1;i:744;i:1;i:745;i:1;i:747;i:1;i:748;i:-1;i:749;i:-1;i:750;i:1;i:752;i:1;i:753;i:-2;i:756;i:1;i:758;i:1;i:759;i:1;i:760;i:1;i:761;i:1;i:764;i:1;i:766;i:1;i:767;i:1;i:769;i:1;i:770;i:1;i:772;i:1;i:773;i:1;i:774;i:-2;i:776;i:1;i:777;i:1;i:778;i:-2;i:788;i:1;i:789;i:1;i:790;i:1;i:791;i:1;i:793;i:1;i:795;i:1;i:797;i:1;i:800;i:1;i:802;i:1;i:803;i:1;i:805;i:1;i:807;i:1;i:808;i:1;i:809;i:1;i:810;i:1;i:811;i:1;i:813;i:1;i:814;i:1;i:815;i:1;i:816;i:1;i:817;i:1;i:818;i:1;i:819;i:1;i:820;i:1;i:821;i:1;i:823;i:1;i:824;i:-1;i:825;i:-1;i:826;i:1;i:827;i:1;i:829;i:1;i:830;i:1;i:832;i:1;i:833;i:1;i:834;i:-2;i:836;i:1;i:838;i:1;i:839;i:-2;i:857;i:1;i:858;i:-2;i:868;i:1;i:870;i:1;i:871;i:1;i:872;i:1;i:873;i:1;i:876;i:1;i:877;i:1;i:879;i:1;i:880;i:1;i:881;i:1;i:884;i:1;i:885;i:1;i:886;i:1;i:887;i:1;i:890;i:1;i:891;i:1;i:892;i:1;i:893;i:1;i:895;i:1;i:896;i:1;i:897;i:1;i:898;i:1;i:899;i:1;i:901;i:1;i:903;i:1;i:904;i:1;i:905;i:1;i:906;i:1;i:908;i:1;i:909;i:1;i:910;i:1;i:911;i:1;i:912;i:1;i:914;i:1;i:916;i:1;i:917;i:-2;i:926;i:1;i:927;i:-2;i:939;i:1;i:940;i:1;i:941;i:1;i:943;i:1;i:946;i:1;i:947;i:1;i:948;i:1;i:949;i:-2;i:950;i:-1;i:951;i:-1;i:952;i:-2;i:954;i:-1;i:955;i:-2;i:972;i:1;i:973;i:1;i:974;i:1;i:975;i:1;i:977;i:1;i:978;i:1;i:979;i:1;i:981;i:1;i:982;i:1;i:983;i:1;i:984;i:1;i:987;i:1;i:989;i:1;i:990;i:-1;i:991;i:-2;i:993;i:1;i:994;i:1;i:995;i:1;i:997;i:1;i:1002;i:1;i:1003;i:1;i:1004;i:1;i:1005;i:1;i:1006;i:1;i:1009;i:1;i:1010;i:1;i:1011;i:1;i:1012;i:1;i:1014;i:1;i:1015;i:1;i:1016;i:1;i:1019;i:1;i:1020;i:1;i:1021;i:1;i:1023;i:1;i:1024;i:1;i:1025;i:1;i:1027;i:1;i:1028;i:1;i:1029;i:1;i:1030;i:1;i:1031;i:1;i:1034;i:1;i:1035;i:1;i:1036;i:1;i:1038;i:1;i:1040;i:1;i:1041;i:1;i:1042;i:1;i:1043;i:1;i:1044;i:1;i:1045;i:-1;i:1046;i:-2;i:1048;i:1;i:1049;i:-1;i:1050;i:-2;i:1051;i:1;i:1052;i:1;i:1053;i:1;i:1055;i:1;i:1056;i:1;i:1057;i:1;i:1059;i:1;i:1060;i:1;i:1061;i:1;i:1062;i:1;i:1063;i:1;i:1064;i:1;i:1066;i:1;i:1067;i:1;i:1068;i:1;i:1070;i:1;i:1071;i:1;i:1072;i:-2;i:1075;i:1;i:1078;i:1;i:1081;i:1;i:1082;i:1;i:1084;i:1;i:1085;i:1;i:1086;i:-1;i:1087;i:-1;i:1088;i:-1;i:1089;i:-2;i:1090;i:-1;i:1091;i:-1;i:1092;i:-2;i:1093;i:-1;i:1094;i:-1;i:1095;i:1;i:1097;i:1;i:1098;i:1;i:1100;i:1;i:1101;i:1;i:1102;i:1;i:1103;i:1;i:1104;i:1;i:1105;i:1;i:1106;i:1;i:1108;i:1;i:1110;i:1;i:1111;i:1;i:1112;i:1;i:1113;i:1;i:1115;i:1;i:1117;i:1;i:1118;i:1;i:1119;i:-2;i:1131;i:1;i:1132;i:1;i:1133;i:-2;i:1134;i:1;i:1135;i:1;i:1136;i:1;i:1139;i:1;i:1140;i:1;i:1141;i:1;i:1142;i:1;i:1143;i:1;i:1144;i:1;i:1145;i:1;i:1147;i:1;i:1148;i:1;i:1150;i:1;i:1151;i:1;i:1152;i:1;i:1153;i:1;i:1156;i:1;i:1162;i:-1;i:1163;i:-2;}s:78:"/home/bjarte/public_html/doctrine/lib/Doctrine/Connection/Sqlite/Exception.php";a:11:{i:21;i:1;i:34;i:1;i:68;i:1;i:69;i:1;i:71;i:1;i:72;i:1;i:73;i:-2;i:74;i:1;i:75;i:-1;i:76;i:-2;i:78;i:1;}s:78:"/home/bjarte/public_html/doctrine/lib/Doctrine/Adapter/Statement/Interface.php";a:2:{i:32;i:1;i:276;i:1;}s:78:"/home/bjarte/public_html/doctrine/lib/Doctrine/Connection/Oracle/Exception.php";a:10:{i:21;i:1;i:34;i:1;i:72;i:1;i:73;i:1;i:74;i:1;i:75;i:1;i:76;i:-2;i:77;i:-1;i:78;i:-2;i:80;i:1;}s:66:"/home/bjarte/public_html/doctrine/lib/Doctrine/Import/Firebird.php";a:29:{i:21;i:1;i:33;i:1;i:42;i:1;i:44;i:1;i:45;i:-2;i:55;i:1;i:56;i:1;i:58;i:1;i:59;i:-2;i:67;i:1;i:68;i:-2;i:76;i:1;i:77;i:-2;i:86;i:1;i:87;i:1;i:88;i:1;i:90;i:1;i:91;i:-2;i:99;i:1;i:101;i:1;i:102;i:-2;i:113;i:1;i:115;i:1;i:116;i:1;i:117;i:1;i:118;i:1;i:120;i:1;i:121;i:-2;i:123;i:1;}s:66:"/home/bjarte/public_html/doctrine/lib/Doctrine/Expression/Mock.php";a:3:{i:21;i:1;i:34;i:1;i:36;i:1;}s:65:"/home/bjarte/public_html/doctrine/tests/DataType/EnumTestCase.php";a:99:{i:36;i:1;i:39;i:1;i:40;i:1;i:41;i:1;i:45;i:1;i:46;i:1;i:47;i:1;i:48;i:1;i:51;i:1;i:52;i:1;i:53;i:1;i:55;i:1;i:56;i:1;i:57;i:-2;i:61;i:1;i:62;i:1;i:63;i:1;i:64;i:1;i:65;i:-2;i:67;i:1;i:74;i:1;i:75;i:1;i:76;i:1;i:77;i:1;i:78;i:-2;i:82;i:1;i:83;i:1;i:84;i:1;i:85;i:1;i:86;i:-2;i:88;i:1;i:93;i:1;i:94;i:1;i:95;i:1;i:96;i:1;i:97;i:-2;i:99;i:1;i:104;i:1;i:105;i:1;i:106;i:1;i:107;i:1;i:108;i:-2;i:110;i:1;i:115;i:1;i:116;i:1;i:117;i:1;i:118;i:1;i:119;i:1;i:120;i:1;i:121;i:1;i:123;i:1;i:125;i:1;i:127;i:1;i:128;i:1;i:129;i:1;i:130;i:1;i:131;i:1;i:132;i:1;i:136;i:1;i:138;i:1;i:140;i:1;i:141;i:1;i:143;i:1;i:144;i:1;i:146;i:1;i:147;i:1;i:149;i:1;i:151;i:1;i:153;i:1;i:154;i:1;i:156;i:1;i:157;i:1;i:159;i:1;i:160;i:1;i:164;i:1;i:166;i:1;i:169;i:1;i:171;i:-1;i:172;i:1;i:173;i:1;i:175;i:1;i:178;i:1;i:179;i:1;i:180;i:1;i:181;i:1;i:182;i:1;i:184;i:1;i:185;i:-1;i:186;i:-1;i:187;i:1;i:192;i:1;i:193;i:1;i:194;i:1;i:195;i:1;i:196;i:1;i:197;i:1;i:198;i:1;i:200;i:1;i:201;i:1;}s:64:"/home/bjarte/public_html/doctrine/tests/Query/UpdateTestCase.php";a:22:{i:39;i:1;i:41;i:1;i:43;i:1;i:45;i:1;i:47;i:1;i:49;i:1;i:50;i:1;i:54;i:1;i:56;i:1;i:58;i:1;i:60;i:1;i:62;i:1;i:64;i:1;i:65;i:1;i:69;i:1;i:71;i:1;i:73;i:1;i:74;i:1;i:77;i:1;i:79;i:1;i:81;i:1;i:82;i:1;}s:71:"/home/bjarte/public_html/doctrine/tests/Query/JoinConditionTestCase.php";a:18:{i:36;i:1;i:38;i:1;i:41;i:1;i:43;i:1;i:45;i:1;i:46;i:1;i:49;i:1;i:51;i:1;i:53;i:1;i:54;i:1;i:57;i:1;i:59;i:1;i:61;i:1;i:62;i:1;i:65;i:1;i:67;i:1;i:69;i:1;i:70;i:1;}s:69:"/home/bjarte/public_html/doctrine/tests/Import/Schema/YmlTestCase.php";a:11:{i:37;i:1;i:38;i:1;i:40;i:1;i:41;i:1;i:42;i:1;i:43;i:-1;i:46;i:1;i:47;i:1;i:48;i:1;i:49;i:-1;i:51;i:1;}s:76:"/home/bjarte/public_html/doctrine/lib/Doctrine/Record/Listener/Interface.php";a:2:{i:33;i:1;i:60;i:1;}s:61:"/home/bjarte/public_html/doctrine/lib/Doctrine/Connection.php";a:324:{i:0;i:1;i:21;i:1;i:56;i:1;i:166;i:1;i:167;i:1;i:168;i:-1;i:169;i:-2;i:170;i:1;i:172;i:1;i:174;i:1;i:175;i:1;i:177;i:1;i:178;i:1;i:179;i:1;i:180;i:1;i:182;i:1;i:184;i:1;i:185;i:1;i:187;i:1;i:188;i:1;i:199;i:1;i:200;i:1;i:201;i:1;i:202;i:-2;i:203;i:1;i:204;i:-2;i:206;i:1;i:208;i:1;i:209;i:-2;i:210;i:-2;i:212;i:-2;i:213;i:-1;i:214;i:-1;i:215;i:-1;i:216;i:-1;i:218;i:-1;i:220;i:-2;i:226;i:-1;i:227;i:-2;i:238;i:1;i:239;i:1;i:240;i:1;i:241;i:1;i:242;i:1;i:243;i:1;i:244;i:1;i:247;i:1;i:248;i:-2;i:257;i:1;i:258;i:-2;i:274;i:1;i:275;i:1;i:276;i:-2;i:278;i:1;i:279;i:1;i:280;i:-2;i:281;i:1;i:283;i:1;i:284;i:1;i:285;i:1;i:286;i:1;i:287;i:1;i:288;i:1;i:289;i:1;i:290;i:1;i:291;i:1;i:292;i:1;i:293;i:1;i:295;i:1;i:296;i:-2;i:304;i:1;i:305;i:-2;i:313;i:1;i:315;i:1;i:316;i:-2;i:326;i:1;i:327;i:1;i:328;i:-2;i:330;i:1;i:332;i:1;i:334;i:1;i:335;i:1;i:337;i:1;i:338;i:1;i:339;i:1;i:340;i:1;i:341;i:1;i:342;i:1;i:343;i:1;i:345;i:1;i:346;i:-1;i:348;i:-1;i:349;i:-1;i:350;i:-1;i:351;i:-1;i:353;i:-1;i:356;i:1;i:358;i:1;i:359;i:1;i:360;i:-2;i:361;i:1;i:362;i:1;i:364;i:1;i:366;i:1;i:367;i:1;i:368;i:-2;i:372;i:1;i:373;i:1;i:381;i:-1;i:390;i:-1;i:391;i:-1;i:392;i:-1;i:393;i:-2;i:433;i:-1;i:434;i:-1;i:435;i:-2;i:436;i:-1;i:438;i:-1;i:439;i:-1;i:441;i:-1;i:442;i:-1;i:443;i:-1;i:445;i:-1;i:446;i:-1;i:447;i:-1;i:448;i:-1;i:450;i:-1;i:451;i:-1;i:453;i:-1;i:455;i:-1;i:458;i:-1;i:459;i:-2;i:468;i:1;i:469;i:-1;i:470;i:-2;i:473;i:1;i:475;i:1;i:476;i:1;i:477;i:1;i:478;i:1;i:479;i:1;i:480;i:1;i:481;i:1;i:482;i:1;i:484;i:1;i:487;i:1;i:488;i:1;i:489;i:1;i:491;i:1;i:494;i:1;i:496;i:1;i:497;i:-2;i:508;i:-1;i:544;i:1;i:545;i:1;i:547;i:1;i:548;i:1;i:549;i:-2;i:550;i:1;i:551;i:-2;i:564;i:1;i:565;i:-2;i:576;i:1;i:577;i:-2;i:587;i:-1;i:597;i:1;i:598;i:-2;i:609;i:1;i:610;i:-2;i:620;i:1;i:621;i:-2;i:631;i:1;i:632;i:-2;i:643;i:1;i:644;i:-2;i:654;i:1;i:655;i:-2;i:665;i:-1;i:666;i:-2;i:686;i:1;i:688;i:1;i:689;i:-2;i:697;i:1;i:700;i:1;i:702;i:1;i:704;i:1;i:706;i:1;i:707;i:1;i:708;i:1;i:710;i:1;i:712;i:1;i:713;i:1;i:714;i:1;i:716;i:1;i:717;i:-2;i:739;i:1;i:741;i:1;i:742;i:1;i:743;i:-1;i:744;i:-2;i:745;i:1;i:746;i:-2;i:758;i:-1;i:759;i:-1;i:760;i:-1;i:761;i:-1;i:762;i:-2;i:773;i:1;i:774;i:-2;i:784;i:1;i:787;i:1;i:788;i:1;i:789;i:1;i:790;i:1;i:791;i:-2;i:792;i:1;i:794;i:1;i:796;i:1;i:797;i:1;i:799;i:1;i:800;i:1;i:801;i:1;i:803;i:1;i:805;i:-2;i:806;i:-2;i:808;i:-2;i:809;i:-2;i:818;i:1;i:821;i:1;i:822;i:1;i:823;i:1;i:825;i:1;i:826;i:-2;i:827;i:1;i:829;i:1;i:831;i:1;i:832;i:1;i:834;i:1;i:835;i:1;i:836;i:1;i:838;i:1;i:840;i:1;i:841;i:1;i:843;i:1;i:844;i:-2;i:852;i:1;i:854;i:1;i:856;i:1;i:858;i:1;i:859;i:1;i:860;i:-1;i:861;i:-1;i:862;i:1;i:864;i:1;i:865;i:1;i:866;i:-2;i:868;i:-1;i:869;i:-1;i:879;i:1;i:880;i:-2;i:889;i:1;i:890;i:1;i:891;i:-2;i:892;i:1;i:894;i:1;i:895;i:1;i:896;i:1;i:897;i:1;i:900;i:1;i:903;i:1;i:904;i:-2;i:912;i:1;i:913;i:-2;i:928;i:1;i:929;i:-2;i:937;i:1;i:938;i:-2;i:948;i:-1;i:950;i:-1;i:951;i:-1;i:952;i:-2;i:953;i:-1;i:954;i:-1;i:955;i:-2;i:966;i:1;i:967;i:-2;i:978;i:1;i:979;i:1;i:980;i:1;i:981;i:1;i:990;i:1;i:991;i:1;i:992;i:1;i:993;i:1;i:994;i:1;i:1003;i:1;i:1004;i:1;i:1005;i:1;i:1014;i:1;i:1016;i:1;i:1018;i:1;i:1020;i:1;i:1021;i:1;i:1023;i:1;i:1024;i:1;i:1032;i:-1;i:1033;i:-2;i:1042;i:-1;i:1044;i:-1;i:1045;i:-2;i:1054;i:-1;i:1056;i:-1;i:1057;i:-2;i:1072;i:-1;i:1073;i:-2;i:1089;i:1;i:1090;i:1;i:1106;i:1;i:1107;i:1;i:1124;i:1;i:1125;i:1;i:1133;i:-1;i:1134;i:-2;i:1137;i:1;}s:54:"/home/bjarte/public_html/doctrine/models/GroupUser.php";a:4:{i:6;i:1;i:7;i:1;i:8;i:1;i:9;i:1;}s:52:"/home/bjarte/public_html/doctrine/models/PolicyN.php";a:7:{i:5;i:1;i:6;i:1;i:7;i:1;i:8;i:1;i:9;i:1;i:12;i:1;i:13;i:1;}s:66:"/home/bjarte/public_html/doctrine/lib/Doctrine/Query/Condition.php";a:40:{i:21;i:1;i:33;i:1;i:44;i:1;i:46;i:1;i:48;i:1;i:49;i:1;i:50;i:1;i:51;i:1;i:52;i:1;i:53;i:1;i:54;i:1;i:55;i:1;i:57;i:1;i:58;i:1;i:59;i:1;i:60;i:1;i:61;i:1;i:62;i:1;i:63;i:1;i:64;i:1;i:65;i:1;i:66;i:1;i:67;i:1;i:68;i:-2;i:69;i:1;i:74;i:1;i:75;i:-2;i:91;i:1;i:93;i:1;i:94;i:1;i:96;i:1;i:98;i:1;i:101;i:1;i:103;i:1;i:104;i:1;i:105;i:1;i:106;i:1;i:110;i:1;i:111;i:-2;i:113;i:1;}s:61:"/home/bjarte/public_html/doctrine/lib/Doctrine/Collection.php";a:267:{i:0;i:1;i:21;i:1;i:34;i:1;i:77;i:1;i:78;i:1;i:79;i:1;i:80;i:1;i:81;i:1;i:83;i:1;i:84;i:1;i:85;i:-1;i:86;i:-1;i:87;i:1;i:96;i:-1;i:97;i:-1;i:106;i:-1;i:107;i:-2;i:116;i:1;i:117;i:1;i:125;i:-1;i:127;i:-1;i:128;i:-1;i:129;i:-1;i:130;i:-1;i:131;i:-1;i:132;i:-1;i:134;i:-1;i:136;i:-1;i:137;i:-2;i:146;i:-1;i:147;i:-1;i:149;i:-1;i:151;i:-1;i:152;i:-1;i:153;i:-1;i:155;i:-1;i:158;i:-1;i:159;i:-1;i:160;i:-1;i:161;i:-1;i:162;i:-1;i:172;i:-1;i:174;i:-1;i:175;i:-2;i:184;i:-1;i:185;i:-2;i:194;i:1;i:195;i:-2;i:204;i:1;i:205;i:-2;i:214;i:1;i:215;i:-2;i:224;i:1;i:225;i:1;i:228;i:1;i:229;i:1;i:231;i:1;i:233;i:1;i:235;i:1;i:236;i:1;i:237;i:1;i:238;i:1;i:239;i:-1;i:241;i:1;i:242;i:1;i:244;i:1;i:245;i:1;i:253;i:-1;i:254;i:-2;i:264;i:1;i:266;i:1;i:267;i:1;i:268;i:-2;i:278;i:1;i:279;i:-2;i:282;i:-1;i:283;i:-2;i:303;i:1;i:304;i:1;i:306;i:1;i:307;i:1;i:309;i:1;i:310;i:1;i:311;i:1;i:312;i:1;i:314;i:1;i:316;i:1;i:318;i:1;i:319;i:-2;i:321;i:1;i:322;i:-2;i:329;i:-1;i:330;i:-1;i:332;i:-1;i:333;i:-1;i:334;i:-1;i:335;i:-1;i:336;i:-1;i:338;i:-1;i:339;i:-1;i:340;i:-2;i:347;i:-1;i:348;i:-2;i:358;i:1;i:359;i:-2;i:368;i:1;i:369;i:1;i:370;i:1;i:372;i:1;i:373;i:1;i:382;i:1;i:383;i:1;i:385;i:1;i:386;i:1;i:387;i:1;i:388;i:-1;i:390;i:1;i:396;i:1;i:397;i:1;i:398;i:-1;i:399;i:-2;i:400;i:1;i:402;i:1;i:403;i:-1;i:404;i:-1;i:405;i:-2;i:406;i:-1;i:407;i:-1;i:408;i:-2;i:410;i:1;i:411;i:-1;i:412;i:-1;i:413;i:-1;i:414;i:-2;i:415;i:-1;i:416;i:-1;i:417;i:1;i:419;i:1;i:420;i:-2;i:429;i:-1;i:430;i:-1;i:432;i:-1;i:433;i:-1;i:434;i:-1;i:435;i:-1;i:436;i:-1;i:437;i:-1;i:438;i:-1;i:439;i:-1;i:440;i:-1;i:442;i:-1;i:443;i:-2;i:445;i:-1;i:447;i:-1;i:448;i:-1;i:449;i:-1;i:450;i:-1;i:451;i:-1;i:452;i:-1;i:453;i:-1;i:454;i:-1;i:455;i:-1;i:456;i:-1;i:457;i:-1;i:460;i:-1;i:462;i:-1;i:464;i:-1;i:465;i:-1;i:475;i:-1;i:476;i:-1;i:477;i:-1;i:478;i:-1;i:480;i:-1;i:481;i:-1;i:482;i:-1;i:483;i:-1;i:484;i:-1;i:485;i:-1;i:486;i:-1;i:487;i:-1;i:488;i:-1;i:489;i:-1;i:490;i:-1;i:491;i:-1;i:492;i:-2;i:493;i:-1;i:495;i:-1;i:496;i:-1;i:497;i:-1;i:498;i:-1;i:499;i:-1;i:500;i:-1;i:502;i:-1;i:503;i:-1;i:504;i:-1;i:505;i:-1;i:506;i:-1;i:507;i:-1;i:509;i:-1;i:510;i:-1;i:511;i:-1;i:512;i:-2;i:513;i:-1;i:514;i:-1;i:515;i:-1;i:516;i:-1;i:517;i:-1;i:518;i:-1;i:519;i:-1;i:521;i:-1;i:522;i:-1;i:523;i:-1;i:532;i:-1;i:533;i:-2;i:549;i:1;i:551;i:1;i:552;i:-2;i:561;i:1;i:562;i:-2;i:577;i:1;i:578;i:1;i:579;i:1;i:581;i:1;i:582;i:-2;i:591;i:-1;i:592;i:-1;i:593;i:-1;i:594;i:-1;i:595;i:-1;i:596;i:-1;i:597;i:-2;i:600;i:-1;i:602;i:-2;i:605;i:1;i:606;i:-2;i:609;i:1;i:610;i:-2;i:621;i:1;i:622;i:1;i:623;i:1;i:624;i:1;i:626;i:1;i:628;i:1;i:630;i:1;i:631;i:1;i:632;i:1;i:634;i:1;i:636;i:1;i:637;i:-2;i:648;i:1;i:649;i:1;i:650;i:1;i:652;i:1;i:653;i:1;i:655;i:1;i:656;i:1;i:657;i:1;i:659;i:1;i:661;i:1;i:663;i:1;i:664;i:-2;i:671;i:1;i:672;i:1;i:673;i:-2;i:679;i:-1;i:680;i:-2;i:682;i:1;}s:62:"/home/bjarte/public_html/doctrine/tests/Ticket/428TestCase.php";a:18:{i:18;i:1;i:24;i:1;i:26;i:1;i:27;i:1;i:28;i:1;i:29;i:1;i:30;i:1;i:31;i:1;i:32;i:1;i:33;i:1;i:37;i:1;i:39;i:1;i:40;i:1;i:43;i:1;i:47;i:1;i:48;i:1;i:49;i:1;i:51;i:1;}s:66:"/home/bjarte/public_html/doctrine/tests/DataDict/MssqlTestCase.php";a:128:{i:38;i:1;i:39;i:-1;i:40;i:1;i:41;i:1;i:43;i:1;i:46;i:1;i:48;i:1;i:49;i:1;i:50;i:1;i:51;i:1;i:52;i:1;i:55;i:1;i:57;i:1;i:58;i:1;i:59;i:1;i:60;i:1;i:62;i:1;i:64;i:1;i:65;i:1;i:66;i:1;i:67;i:1;i:69;i:1;i:71;i:1;i:72;i:1;i:73;i:1;i:74;i:1;i:75;i:1;i:78;i:1;i:80;i:1;i:81;i:1;i:82;i:1;i:83;i:1;i:85;i:1;i:87;i:1;i:88;i:1;i:89;i:1;i:90;i:1;i:91;i:1;i:94;i:1;i:96;i:1;i:97;i:1;i:98;i:1;i:99;i:1;i:101;i:1;i:103;i:1;i:104;i:1;i:105;i:1;i:106;i:1;i:107;i:1;i:110;i:1;i:112;i:1;i:113;i:1;i:114;i:1;i:115;i:1;i:116;i:1;i:119;i:1;i:121;i:1;i:122;i:1;i:123;i:1;i:124;i:1;i:126;i:1;i:128;i:1;i:129;i:1;i:130;i:1;i:131;i:1;i:132;i:1;i:135;i:1;i:137;i:1;i:138;i:1;i:139;i:1;i:140;i:1;i:142;i:1;i:144;i:1;i:145;i:1;i:146;i:1;i:147;i:1;i:149;i:1;i:151;i:1;i:152;i:1;i:153;i:1;i:154;i:1;i:155;i:1;i:158;i:1;i:160;i:1;i:162;i:1;i:164;i:1;i:166;i:1;i:168;i:1;i:169;i:1;i:173;i:1;i:175;i:1;i:176;i:1;i:179;i:1;i:181;i:1;i:182;i:1;i:185;i:1;i:187;i:1;i:188;i:1;i:191;i:1;i:193;i:1;i:194;i:1;i:197;i:1;i:199;i:1;i:200;i:1;i:203;i:1;i:205;i:1;i:206;i:1;i:209;i:1;i:211;i:1;i:212;i:1;i:215;i:1;i:217;i:1;i:218;i:1;i:221;i:1;i:223;i:1;i:224;i:1;i:227;i:1;i:229;i:1;i:230;i:1;i:233;i:1;i:235;i:1;i:236;i:1;i:239;i:1;i:241;i:1;i:242;i:1;i:245;i:1;i:247;i:1;i:248;i:1;}s:69:"/home/bjarte/public_html/doctrine/tests/Sequence/FirebirdTestCase.php";a:10:{i:37;i:1;i:39;i:1;i:40;i:1;i:43;i:1;i:45;i:1;i:46;i:1;i:49;i:1;i:51;i:1;i:53;i:1;i:54;i:1;}s:71:"/home/bjarte/public_html/doctrine/tests/Collection/SnapshotTestCase.php";a:60:{i:43;i:1;i:45;i:1;i:46;i:1;i:50;i:1;i:52;i:1;i:53;i:1;i:55;i:1;i:56;i:1;i:58;i:1;i:60;i:1;i:61;i:1;i:63;i:1;i:65;i:1;i:67;i:1;i:68;i:1;i:69;i:1;i:70;i:1;i:74;i:1;i:75;i:1;i:76;i:1;i:78;i:1;i:80;i:1;i:82;i:1;i:83;i:1;i:85;i:1;i:86;i:1;i:88;i:1;i:89;i:1;i:91;i:1;i:93;i:1;i:95;i:1;i:96;i:1;i:98;i:1;i:100;i:1;i:102;i:1;i:106;i:1;i:107;i:1;i:108;i:1;i:109;i:1;i:110;i:1;i:112;i:1;i:114;i:1;i:115;i:1;i:117;i:1;i:118;i:1;i:119;i:1;i:120;i:1;i:122;i:1;i:123;i:1;i:125;i:1;i:126;i:1;i:127;i:1;i:129;i:1;i:130;i:1;i:132;i:1;i:134;i:1;i:136;i:1;i:137;i:1;i:139;i:1;i:141;i:1;}s:54:"/home/bjarte/public_html/doctrine/models/TestMovie.php";a:15:{i:7;i:1;i:8;i:1;i:9;i:1;i:11;i:1;i:12;i:1;i:13;i:1;i:14;i:1;i:16;i:1;i:17;i:1;i:18;i:1;i:19;i:1;i:20;i:1;i:24;i:1;i:25;i:1;i:26;i:1;}s:71:"/home/bjarte/public_html/doctrine/models/ValidatorTest_AddressModel.php";a:10:{i:5;i:1;i:7;i:1;i:8;i:1;i:9;i:1;i:10;i:1;i:11;i:1;i:12;i:1;i:13;i:1;i:16;i:1;i:17;i:1;}s:64:"/home/bjarte/public_html/doctrine/tests/Record/StateTestCase.php";a:13:{i:37;i:1;i:39;i:1;i:40;i:1;i:43;i:1;i:47;i:1;i:49;i:1;i:51;i:1;i:53;i:1;i:55;i:1;i:57;i:1;i:59;i:1;i:61;i:1;i:62;i:1;}s:69:"/home/bjarte/public_html/doctrine/tests/Import/Schema/XmlTestCase.php";a:11:{i:37;i:1;i:38;i:1;i:40;i:1;i:41;i:-1;i:42;i:-1;i:43;i:1;i:46;i:1;i:47;i:-1;i:48;i:-1;i:49;i:1;i:51;i:1;}s:77:"/home/bjarte/public_html/doctrine/lib/Doctrine/Connection/Mssql/Exception.php";a:10:{i:21;i:1;i:34;i:1;i:67;i:1;i:68;i:1;i:69;i:1;i:70;i:1;i:71;i:-2;i:72;i:-1;i:73;i:-2;i:75;i:1;}s:68:"/home/bjarte/public_html/doctrine/lib/Doctrine/Transaction/Mysql.php";a:25:{i:21;i:1;i:33;i:1;i:44;i:1;i:46;i:1;i:47;i:-2;i:57;i:1;i:59;i:1;i:60;i:-2;i:70;i:1;i:72;i:1;i:73;i:-2;i:90;i:1;i:91;i:1;i:92;i:1;i:93;i:1;i:94;i:1;i:95;i:1;i:96;i:1;i:97;i:1;i:99;i:1;i:101;i:1;i:102;i:-2;i:110;i:1;i:111;i:-2;i:113;i:1;}s:69:"/home/bjarte/public_html/doctrine/tests/Transaction/PgsqlTestCase.php";a:18:{i:37;i:1;i:39;i:1;i:40;i:1;i:43;i:1;i:45;i:1;i:46;i:1;i:49;i:1;i:50;i:1;i:52;i:1;i:53;i:1;i:57;i:1;i:58;i:-1;i:59;i:1;i:60;i:1;i:62;i:1;i:65;i:1;i:67;i:1;i:68;i:1;}s:64:"/home/bjarte/public_html/doctrine/tests/Export/PgsqlTestCase.php";a:41:{i:37;i:1;i:38;i:1;i:39;i:1;i:42;i:1;i:44;i:1;i:45;i:1;i:48;i:1;i:50;i:1;i:51;i:1;i:53;i:1;i:55;i:1;i:56;i:1;i:59;i:1;i:60;i:1;i:61;i:1;i:62;i:1;i:64;i:1;i:65;i:1;i:67;i:1;i:68;i:1;i:71;i:1;i:72;i:1;i:73;i:1;i:75;i:1;i:76;i:1;i:78;i:1;i:79;i:1;i:82;i:1;i:85;i:1;i:86;i:1;i:87;i:1;i:88;i:1;i:89;i:1;i:90;i:1;i:91;i:1;i:92;i:1;i:93;i:1;i:94;i:1;i:95;i:1;i:96;i:1;i:97;i:1;}s:60:"/home/bjarte/public_html/doctrine/models/FooLocallyOwned.php";a:2:{i:6;i:1;i:7;i:1;}s:63:"/home/bjarte/public_html/doctrine/lib/Doctrine/Export/Mysql.php";a:283:{i:21;i:1;i:34;i:1;i:44;i:1;i:45;i:-2;i:54;i:1;i:55;i:-2;i:92;i:1;i:93;i:1;i:95;i:1;i:96;i:-1;i:97;i:-2;i:98;i:1;i:101;i:1;i:102;i:1;i:103;i:1;i:104;i:1;i:105;i:1;i:106;i:1;i:107;i:1;i:109;i:-1;i:110;i:1;i:112;i:1;i:113;i:1;i:114;i:1;i:115;i:1;i:116;i:1;i:117;i:1;i:119;i:-1;i:120;i:-1;i:122;i:1;i:123;i:1;i:124;i:1;i:125;i:1;i:126;i:1;i:129;i:1;i:130;i:1;i:131;i:1;i:132;i:1;i:133;i:1;i:136;i:1;i:137;i:1;i:138;i:1;i:140;i:1;i:142;i:1;i:144;i:1;i:145;i:-1;i:146;i:-1;i:147;i:1;i:148;i:1;i:149;i:1;i:150;i:1;i:151;i:1;i:152;i:1;i:154;i:1;i:157;i:1;i:158;i:1;i:159;i:1;i:160;i:1;i:163;i:1;i:164;i:1;i:165;i:1;i:167;i:1;i:168;i:1;i:169;i:1;i:170;i:1;i:172;i:1;i:174;i:1;i:175;i:1;i:176;i:1;i:177;i:1;i:178;i:1;i:179;i:1;i:180;i:1;i:181;i:-2;i:272;i:1;i:273;i:1;i:274;i:-2;i:275;i:-1;i:277;i:-1;i:278;i:-1;i:279;i:-1;i:280;i:-1;i:281;i:-1;i:282;i:-1;i:283;i:-1;i:284;i:-1;i:285;i:-1;i:286;i:-1;i:288;i:-1;i:289;i:-1;i:290;i:-2;i:292;i:-1;i:293;i:-1;i:294;i:-1;i:295;i:-1;i:296;i:-1;i:298;i:-1;i:299;i:-1;i:300;i:-1;i:301;i:-1;i:302;i:-1;i:303;i:-1;i:304;i:-1;i:305;i:-1;i:307;i:-1;i:308;i:-1;i:309;i:-1;i:310;i:-1;i:311;i:-1;i:312;i:-1;i:313;i:-1;i:314;i:-1;i:315;i:-1;i:317;i:-1;i:318;i:-1;i:319;i:-1;i:320;i:-1;i:321;i:-1;i:322;i:-1;i:324;i:-1;i:325;i:-1;i:326;i:-1;i:327;i:-1;i:328;i:-1;i:329;i:-1;i:330;i:-1;i:331;i:-1;i:332;i:-1;i:333;i:-1;i:335;i:-1;i:336;i:-1;i:337;i:-1;i:338;i:-1;i:339;i:-1;i:341;i:-1;i:342;i:-1;i:343;i:-1;i:344;i:-1;i:345;i:-1;i:346;i:-1;i:347;i:-1;i:348;i:-1;i:349;i:-1;i:350;i:-1;i:351;i:-1;i:353;i:-1;i:354;i:-1;i:355;i:-2;i:357;i:-1;i:358;i:-1;i:359;i:-2;i:376;i:-1;i:377;i:-1;i:379;i:-1;i:381;i:-1;i:382;i:-1;i:383;i:-1;i:385;i:-1;i:386;i:-1;i:388;i:-1;i:389;i:-1;i:390;i:-1;i:391;i:-1;i:393;i:-1;i:395;i:-1;i:396;i:-1;i:397;i:-1;i:398;i:-1;i:400;i:-1;i:401;i:-1;i:402;i:-1;i:407;i:-1;i:408;i:-1;i:409;i:-1;i:410;i:-1;i:412;i:-1;i:413;i:-1;i:414;i:-2;i:417;i:-1;i:418;i:-1;i:421;i:-1;i:423;i:-1;i:427;i:-1;i:428;i:-1;i:429;i:-2;i:433;i:-1;i:470;i:-1;i:471;i:-1;i:472;i:-1;i:473;i:-1;i:474;i:-1;i:475;i:-1;i:476;i:-1;i:477;i:-1;i:478;i:-1;i:479;i:-1;i:480;i:-1;i:481;i:-1;i:482;i:-1;i:483;i:-1;i:484;i:-1;i:486;i:-1;i:487;i:-2;i:498;i:1;i:499;i:1;i:500;i:-1;i:501;i:-1;i:502;i:-1;i:504;i:-1;i:505;i:-1;i:506;i:-1;i:507;i:-1;i:508;i:-1;i:509;i:-1;i:511;i:-1;i:512;i:-1;i:513;i:1;i:514;i:-2;i:525;i:1;i:526;i:1;i:527;i:1;i:528;i:1;i:529;i:1;i:530;i:1;i:531;i:1;i:532;i:1;i:533;i:-1;i:534;i:-1;i:535;i:-1;i:536;i:1;i:538;i:1;i:539;i:-1;i:540;i:-2;i:541;i:1;i:542;i:1;i:543;i:1;i:545;i:1;i:547;i:1;i:549;i:1;i:550;i:-2;i:560;i:1;i:562;i:1;i:563;i:1;i:565;i:1;i:566;i:1;i:567;i:1;i:568;i:1;i:570;i:1;i:571;i:1;i:573;i:1;i:574;i:1;i:575;i:1;i:576;i:1;i:577;i:1;i:578;i:1;i:579;i:1;i:580;i:1;i:581;i:1;i:582;i:1;i:584;i:1;i:585;i:1;i:586;i:1;i:587;i:-2;i:598;i:1;i:599;i:1;i:600;i:-1;i:601;i:-1;i:602;i:1;i:603;i:1;i:604;i:1;i:605;i:1;i:606;i:1;i:607;i:1;i:608;i:1;i:609;i:-2;i:619;i:1;i:620;i:1;i:621;i:1;i:622;i:-2;i:632;i:-1;i:633;i:-1;i:634;i:-2;i:637;i:1;}s:62:"/home/bjarte/public_html/doctrine/tests/ExpressionTestCase.php";a:15:{i:37;i:1;i:41;i:1;i:42;i:1;i:44;i:1;i:45;i:1;i:46;i:1;i:47;i:1;i:48;i:1;i:49;i:1;i:53;i:1;i:54;i:1;i:55;i:1;i:59;i:1;i:60;i:1;i:61;i:1;}s:49:"/home/bjarte/public_html/doctrine/models/Book.php";a:5:{i:4;i:1;i:5;i:1;i:7;i:1;i:8;i:1;i:9;i:1;}s:69:"/home/bjarte/public_html/doctrine/tests/Relation/OneToOneTestCase.php";a:32:{i:36;i:1;i:39;i:1;i:41;i:1;i:42;i:1;i:45;i:1;i:46;i:1;i:48;i:1;i:49;i:1;i:52;i:1;i:54;i:1;i:56;i:1;i:57;i:1;i:59;i:1;i:60;i:1;i:62;i:1;i:63;i:1;i:66;i:1;i:68;i:1;i:69;i:1;i:70;i:1;i:71;i:1;i:75;i:1;i:76;i:1;i:77;i:1;i:78;i:1;i:79;i:1;i:80;i:1;i:81;i:1;i:82;i:1;i:83;i:1;i:84;i:1;i:85;i:1;}s:65:"/home/bjarte/public_html/doctrine/tests/EventListenerTestCase.php";a:21:{i:38;i:1;i:40;i:1;i:41;i:1;i:42;i:1;i:45;i:1;i:47;i:1;i:49;i:1;i:51;i:1;i:52;i:1;i:54;i:1;i:55;i:1;i:183;i:-1;i:184;i:-1;i:186;i:-1;i:187;i:-2;i:189;i:-1;i:190;i:-1;i:192;i:-1;i:193;i:-2;i:195;i:-1;i:196;i:-2;}s:67:"/home/bjarte/public_html/doctrine/models/EventListenerChainTest.php";a:6:{i:5;i:1;i:6;i:1;i:8;i:1;i:9;i:1;i:10;i:1;i:11;i:1;}s:71:"/home/bjarte/public_html/doctrine/tests/Query/PgsqlSubqueryTestCase.php";a:23:{i:37;i:1;i:38;i:1;i:39;i:1;i:43;i:1;i:44;i:1;i:45;i:1;i:46;i:1;i:47;i:1;i:48;i:1;i:50;i:1;i:52;i:1;i:54;i:1;i:55;i:1;i:57;i:1;i:61;i:1;i:62;i:1;i:63;i:1;i:64;i:1;i:65;i:1;i:66;i:1;i:68;i:1;i:70;i:1;i:71;i:1;}s:57:"/home/bjarte/public_html/doctrine/lib/Doctrine/Schema.php";a:8:{i:39;i:1;i:54;i:-1;i:55;i:-1;i:64;i:-1;i:65;i:-2;i:74;i:-1;i:83;i:-1;i:85;i:1;}s:71:"/home/bjarte/public_html/doctrine/lib/Doctrine/Relation/Association.php";a:31:{i:21;i:1;i:36;i:1;i:43;i:1;i:44;i:-2;i:47;i:1;i:48;i:-2;i:57;i:1;i:59;i:1;i:60;i:1;i:61;i:1;i:62;i:1;i:63;i:1;i:64;i:1;i:65;i:1;i:66;i:-1;i:67;i:-1;i:68;i:-1;i:69;i:-1;i:70;i:-1;i:71;i:-2;i:73;i:1;i:74;i:-2;i:85;i:1;i:86;i:1;i:87;i:1;i:88;i:1;i:89;i:1;i:91;i:1;i:92;i:1;i:93;i:-2;i:95;i:1;}s:67:"/home/bjarte/public_html/doctrine/tests/DataDict/OracleTestCase.php";a:158:{i:37;i:1;i:38;i:-1;i:39;i:1;i:40;i:1;i:42;i:1;i:45;i:1;i:47;i:1;i:48;i:1;i:49;i:1;i:50;i:1;i:51;i:1;i:54;i:1;i:56;i:1;i:57;i:1;i:58;i:1;i:59;i:1;i:61;i:1;i:63;i:1;i:64;i:1;i:65;i:1;i:66;i:1;i:68;i:1;i:70;i:1;i:71;i:1;i:72;i:1;i:73;i:1;i:74;i:1;i:77;i:1;i:79;i:1;i:80;i:1;i:81;i:1;i:82;i:1;i:84;i:1;i:86;i:1;i:87;i:1;i:88;i:1;i:89;i:1;i:91;i:1;i:93;i:1;i:94;i:1;i:95;i:1;i:96;i:1;i:98;i:1;i:100;i:1;i:101;i:1;i:102;i:1;i:103;i:1;i:105;i:1;i:107;i:1;i:108;i:1;i:109;i:1;i:110;i:1;i:111;i:1;i:114;i:1;i:116;i:1;i:117;i:1;i:118;i:1;i:119;i:1;i:122;i:1;i:124;i:1;i:125;i:1;i:126;i:1;i:127;i:1;i:129;i:1;i:132;i:1;i:134;i:1;i:135;i:1;i:136;i:1;i:137;i:1;i:139;i:1;i:141;i:1;i:142;i:1;i:143;i:1;i:144;i:1;i:145;i:1;i:148;i:1;i:150;i:1;i:151;i:1;i:152;i:1;i:153;i:1;i:155;i:1;i:157;i:1;i:158;i:1;i:159;i:1;i:160;i:1;i:162;i:1;i:164;i:1;i:165;i:1;i:166;i:1;i:167;i:1;i:169;i:1;i:172;i:1;i:174;i:1;i:175;i:1;i:176;i:1;i:177;i:1;i:179;i:1;i:181;i:1;i:182;i:1;i:183;i:1;i:184;i:1;i:186;i:1;i:188;i:1;i:189;i:1;i:190;i:1;i:191;i:1;i:193;i:1;i:195;i:1;i:196;i:1;i:197;i:1;i:198;i:1;i:199;i:1;i:202;i:1;i:204;i:1;i:206;i:1;i:208;i:1;i:210;i:1;i:212;i:1;i:213;i:1;i:217;i:1;i:219;i:1;i:220;i:1;i:223;i:1;i:225;i:1;i:226;i:1;i:229;i:1;i:231;i:1;i:232;i:1;i:235;i:1;i:237;i:1;i:238;i:1;i:241;i:1;i:243;i:1;i:244;i:1;i:247;i:1;i:249;i:1;i:250;i:1;i:253;i:1;i:255;i:1;i:256;i:1;i:259;i:1;i:261;i:1;i:262;i:1;i:265;i:1;i:267;i:1;i:268;i:1;i:271;i:1;i:273;i:1;i:274;i:1;i:277;i:1;i:279;i:1;i:280;i:1;i:283;i:1;i:285;i:1;i:286;i:1;i:289;i:1;i:291;i:1;i:292;i:1;}s:67:"/home/bjarte/public_html/doctrine/tests/DataDict/SqliteTestCase.php";a:71:{i:37;i:1;i:38;i:1;i:41;i:1;i:42;i:1;i:43;i:1;i:44;i:1;i:45;i:1;i:46;i:1;i:47;i:1;i:48;i:1;i:49;i:1;i:52;i:1;i:53;i:1;i:54;i:1;i:55;i:1;i:56;i:1;i:59;i:1;i:60;i:1;i:61;i:1;i:64;i:1;i:65;i:1;i:66;i:1;i:67;i:1;i:70;i:1;i:71;i:1;i:74;i:1;i:76;i:1;i:78;i:1;i:80;i:1;i:82;i:1;i:84;i:1;i:85;i:1;i:89;i:1;i:91;i:1;i:92;i:1;i:95;i:1;i:97;i:1;i:98;i:1;i:101;i:1;i:103;i:1;i:104;i:1;i:107;i:1;i:109;i:1;i:110;i:1;i:113;i:1;i:115;i:1;i:116;i:1;i:119;i:1;i:121;i:1;i:122;i:1;i:125;i:1;i:127;i:1;i:128;i:1;i:131;i:1;i:133;i:1;i:134;i:1;i:137;i:1;i:139;i:1;i:140;i:1;i:143;i:1;i:145;i:1;i:146;i:1;i:149;i:1;i:151;i:1;i:152;i:1;i:155;i:1;i:157;i:1;i:158;i:1;i:161;i:1;i:163;i:1;i:164;i:1;}s:59:"/home/bjarte/public_html/doctrine/tests/ManagerTestCase.php";a:18:{i:35;i:1;i:36;i:1;i:38;i:1;i:39;i:1;i:41;i:1;i:42;i:1;i:44;i:1;i:45;i:1;i:47;i:1;i:48;i:1;i:50;i:1;i:51;i:1;i:53;i:1;i:54;i:1;i:55;i:1;i:58;i:1;i:59;i:1;i:60;i:1;}s:69:"/home/bjarte/public_html/doctrine/lib/Doctrine.php(545) : regexp code";a:1:{i:1;i:1;}s:56:"/home/bjarte/public_html/doctrine/models/Forum_Entry.php";a:10:{i:4;i:1;i:5;i:1;i:6;i:1;i:7;i:1;i:8;i:1;i:9;i:1;i:10;i:1;i:12;i:1;i:13;i:1;i:14;i:1;}s:64:"/home/bjarte/public_html/doctrine/lib/Doctrine/Query/Orderby.php";a:25:{i:21;i:1;i:33;i:1;i:44;i:1;i:46;i:1;i:47;i:1;i:48;i:1;i:49;i:1;i:51;i:1;i:52;i:1;i:53;i:1;i:54;i:1;i:56;i:1;i:57;i:1;i:59;i:1;i:62;i:1;i:63;i:1;i:65;i:1;i:67;i:1;i:68;i:1;i:69;i:1;i:70;i:1;i:71;i:1;i:72;i:1;i:73;i:-2;i:75;i:1;}s:65:"/home/bjarte/public_html/doctrine/tests/TreeStructureTestCase.php";a:49:{i:38;i:1;i:39;i:1;i:40;i:1;i:45;i:1;i:49;i:1;i:52;i:1;i:53;i:1;i:54;i:1;i:55;i:1;i:56;i:-2;i:58;i:1;i:61;i:1;i:63;i:1;i:64;i:1;i:65;i:1;i:67;i:1;i:68;i:1;i:69;i:1;i:70;i:1;i:86;i:1;i:87;i:1;i:88;i:1;i:90;i:1;i:91;i:1;i:92;i:1;i:93;i:1;i:95;i:1;i:96;i:1;i:97;i:1;i:98;i:1;i:102;i:1;i:103;i:1;i:104;i:1;i:106;i:1;i:107;i:1;i:108;i:1;i:109;i:1;i:111;i:1;i:112;i:1;i:114;i:1;i:115;i:1;i:116;i:1;i:119;i:1;i:120;i:1;i:121;i:1;i:122;i:1;i:123;i:1;i:125;i:1;i:127;i:1;}s:53:"/home/bjarte/public_html/doctrine/models/TreeLeaf.php";a:6:{i:6;i:1;i:7;i:1;i:8;i:1;i:11;i:1;i:12;i:1;i:13;i:1;}s:70:"/home/bjarte/public_html/doctrine/lib/Doctrine/EventListener/Chain.php";a:143:{i:21;i:1;i:36;i:1;i:52;i:1;i:53;i:1;i:55;i:-1;i:56;i:-2;i:57;i:1;i:58;i:1;i:59;i:1;i:60;i:-1;i:62;i:1;i:72;i:-1;i:73;i:-1;i:74;i:-2;i:75;i:-1;i:76;i:-2;i:86;i:-1;i:87;i:-1;i:97;i:-1;i:98;i:-1;i:99;i:-1;i:100;i:-1;i:111;i:-1;i:112;i:-1;i:113;i:-1;i:114;i:-1;i:124;i:-1;i:125;i:-1;i:126;i:-1;i:127;i:-1;i:137;i:-1;i:138;i:-1;i:139;i:-1;i:140;i:-1;i:150;i:-1;i:151;i:-1;i:152;i:-1;i:153;i:-1;i:163;i:-1;i:164;i:-1;i:165;i:-1;i:166;i:-1;i:176;i:-1;i:177;i:-1;i:178;i:-1;i:179;i:-1;i:189;i:1;i:190;i:1;i:191;i:1;i:192;i:1;i:202;i:1;i:203;i:1;i:204;i:1;i:205;i:1;i:215;i:-1;i:216;i:-1;i:217;i:-1;i:218;i:-1;i:228;i:-1;i:229;i:-1;i:230;i:-1;i:231;i:-1;i:241;i:1;i:242;i:1;i:243;i:1;i:244;i:1;i:254;i:1;i:255;i:1;i:256;i:1;i:257;i:1;i:267;i:-1;i:268;i:-1;i:269;i:-1;i:270;i:-1;i:280;i:-1;i:281;i:-1;i:282;i:-1;i:283;i:-1;i:286;i:-1;i:287;i:-1;i:288;i:-1;i:289;i:-1;i:292;i:-1;i:293;i:-1;i:294;i:-1;i:295;i:-1;i:298;i:-1;i:299;i:-1;i:300;i:-1;i:301;i:-1;i:304;i:-1;i:305;i:-1;i:306;i:-1;i:307;i:-1;i:311;i:1;i:312;i:1;i:313;i:1;i:314;i:1;i:317;i:1;i:318;i:1;i:319;i:1;i:320;i:1;i:324;i:-1;i:325;i:-1;i:326;i:-1;i:327;i:-1;i:330;i:-1;i:331;i:-1;i:332;i:-1;i:333;i:-1;i:337;i:-1;i:338;i:-1;i:339;i:-1;i:340;i:-1;i:343;i:-1;i:344;i:-1;i:345;i:-1;i:346;i:-1;i:350;i:1;i:351;i:1;i:352;i:1;i:353;i:1;i:356;i:1;i:357;i:1;i:358;i:1;i:359;i:1;i:363;i:-1;i:364;i:-1;i:365;i:-1;i:366;i:-1;i:370;i:-1;i:371;i:-1;i:372;i:-1;i:373;i:-1;i:377;i:1;i:378;i:1;i:379;i:1;i:380;i:1;i:384;i:1;i:385;i:1;i:386;i:1;i:387;i:1;i:389;i:1;}s:49:"/home/bjarte/public_html/doctrine/models/Auth.php";a:5:{i:6;i:1;i:7;i:1;i:8;i:1;i:11;i:1;i:12;i:1;}s:62:"/home/bjarte/public_html/doctrine/lib/Doctrine/Query/Limit.php";a:4:{i:33;i:1;i:37;i:1;i:38;i:-2;i:40;i:1;}s:58:"/home/bjarte/public_html/doctrine/models/ValidatorTest.php";a:10:{i:4;i:1;i:5;i:1;i:6;i:1;i:7;i:1;i:8;i:1;i:9;i:1;i:10;i:1;i:12;i:1;i:13;i:1;i:14;i:1;}s:62:"/home/bjarte/public_html/doctrine/tests/Query/FromTestCase.php";a:40:{i:36;i:1;i:40;i:1;i:42;i:1;i:43;i:1;i:46;i:1;i:48;i:1;i:50;i:1;i:51;i:1;i:55;i:1;i:57;i:1;i:59;i:1;i:60;i:1;i:64;i:1;i:66;i:1;i:68;i:1;i:69;i:1;i:73;i:1;i:75;i:1;i:77;i:1;i:78;i:1;i:81;i:1;i:83;i:1;i:85;i:1;i:86;i:1;i:89;i:1;i:91;i:1;i:93;i:1;i:94;i:1;i:97;i:1;i:99;i:1;i:101;i:1;i:102;i:1;i:105;i:1;i:107;i:1;i:109;i:1;i:110;i:1;i:113;i:1;i:115;i:1;i:117;i:1;i:118;i:1;}s:53:"/home/bjarte/public_html/doctrine/models/CustomPK.php";a:3:{i:4;i:1;i:5;i:1;i:6;i:1;}s:69:"/home/bjarte/public_html/doctrine/lib/Doctrine/Template/NestedSet.php";a:7:{i:32;i:1;i:38;i:1;i:39;i:1;i:43;i:1;i:44;i:1;i:45;i:1;i:47;i:1;}s:59:"/home/bjarte/public_html/doctrine/lib/Doctrine/Template.php";a:10:{i:46;i:1;i:47;i:1;i:56;i:-1;i:57;i:-2;i:68;i:-1;i:69;i:-1;i:78;i:-1;i:79;i:-2;i:83;i:-1;i:88;i:1;}s:58:"/home/bjarte/public_html/doctrine/lib/Doctrine/Manager.php";a:233:{i:0;i:1;i:34;i:1;i:70;i:1;i:72;i:1;i:73;i:1;i:76;i:1;i:77;i:1;i:80;i:1;i:81;i:1;i:84;i:-1;i:85;i:-1;i:86;i:-2;i:88;i:-1;i:89;i:-2;i:92;i:-1;i:93;i:-1;i:94;i:-2;i:96;i:-1;i:97;i:-2;i:106;i:1;i:107;i:1;i:108;i:1;i:110;i:1;i:111;i:1;i:112;i:1;i:113;i:1;i:114;i:1;i:115;i:1;i:116;i:1;i:117;i:1;i:118;i:1;i:119;i:1;i:120;i:1;i:121;i:1;i:122;i:1;i:123;i:1;i:124;i:1;i:125;i:1;i:126;i:1;i:127;i:1;i:128;i:1;i:129;i:1;i:130;i:1;i:131;i:1;i:132;i:-2;i:133;i:1;i:134;i:-2;i:142;i:-1;i:143;i:-2;i:153;i:1;i:154;i:1;i:155;i:1;i:156;i:1;i:157;i:1;i:158;i:-2;i:175;i:1;i:176;i:1;i:177;i:-2;i:178;i:1;i:180;i:-2;i:193;i:1;i:194;i:1;i:195;i:-1;i:196;i:-2;i:198;i:1;i:199;i:1;i:200;i:1;i:201;i:-1;i:202;i:-2;i:203;i:1;i:205;i:1;i:206;i:-1;i:207;i:-1;i:209;i:1;i:210;i:1;i:211;i:1;i:212;i:1;i:214;i:1;i:215;i:1;i:216;i:1;i:217;i:1;i:219;i:1;i:221;i:1;i:225;i:1;i:227;i:1;i:228;i:1;i:229;i:1;i:230;i:-1;i:231;i:-2;i:232;i:1;i:233;i:1;i:234;i:1;i:237;i:1;i:238;i:1;i:239;i:1;i:240;i:1;i:241;i:1;i:242;i:1;i:243;i:1;i:244;i:1;i:245;i:1;i:246;i:1;i:247;i:1;i:248;i:1;i:249;i:-1;i:250;i:-2;i:251;i:1;i:252;i:1;i:254;i:1;i:256;i:1;i:257;i:1;i:258;i:1;i:259;i:1;i:260;i:-2;i:270;i:1;i:272;i:1;i:274;i:1;i:275;i:1;i:276;i:1;i:277;i:1;i:278;i:1;i:280;i:1;i:281;i:-1;i:282;i:-2;i:284;i:1;i:285;i:1;i:286;i:1;i:287;i:1;i:288;i:1;i:289;i:-1;i:290;i:-1;i:291;i:-1;i:292;i:1;i:293;i:1;i:296;i:1;i:297;i:-1;i:298;i:-1;i:299;i:-1;i:300;i:-1;i:301;i:-1;i:302;i:-1;i:303;i:-1;i:304;i:-1;i:305;i:-1;i:306;i:-1;i:307;i:-1;i:308;i:-1;i:309;i:-1;i:310;i:-2;i:311;i:-1;i:312;i:-1;i:313;i:-1;i:314;i:-1;i:315;i:-1;i:316;i:-2;i:318;i:-1;i:319;i:-1;i:320;i:-1;i:322;i:-1;i:323;i:-1;i:324;i:-1;i:326;i:-1;i:328;i:-1;i:329;i:-1;i:330;i:-1;i:331;i:-1;i:332;i:-1;i:333;i:-1;i:336;i:1;i:337;i:-2;i:346;i:1;i:347;i:1;i:348;i:-2;i:350;i:1;i:351;i:-2;i:363;i:-1;i:364;i:-1;i:365;i:-2;i:367;i:-1;i:368;i:-2;i:380;i:-1;i:382;i:-1;i:383;i:-2;i:392;i:-1;i:393;i:-2;i:406;i:-1;i:407;i:-1;i:416;i:1;i:417;i:-1;i:418;i:-2;i:419;i:1;i:420;i:-2;i:432;i:1;i:433;i:-2;i:445;i:-1;i:446;i:-1;i:447;i:-1;i:448;i:-2;i:457;i:-1;i:459;i:-1;i:461;i:-1;i:462;i:-1;i:463;i:-1;i:464;i:-1;i:466;i:-1;i:467;i:-1;i:476;i:1;i:477;i:-2;i:488;i:1;i:489;i:1;i:490;i:-1;i:491;i:-2;i:492;i:1;i:493;i:1;i:503;i:-1;i:504;i:-2;i:513;i:1;i:514;i:-2;i:523;i:1;i:524;i:-2;i:534;i:1;i:535;i:1;i:536;i:-1;i:537;i:-2;i:538;i:1;i:539;i:-2;i:548;i:-1;i:549;i:-1;i:550;i:-1;i:551;i:-1;i:552;i:-1;i:553;i:-2;i:555;i:1;}s:67:"/home/bjarte/public_html/doctrine/lib/Doctrine/Table/Repository.php";a:41:{i:0;i:1;i:34;i:1;i:53;i:1;i:54;i:1;i:62;i:-1;i:63;i:-2;i:72;i:1;i:74;i:1;i:75;i:-1;i:76;i:-2;i:77;i:1;i:79;i:1;i:80;i:-2;i:88;i:-1;i:89;i:-1;i:90;i:-2;i:91;i:-1;i:92;i:-2;i:100;i:-1;i:101;i:-2;i:108;i:1;i:109;i:-1;i:110;i:-2;i:111;i:1;i:112;i:1;i:113;i:-2;i:119;i:1;i:120;i:1;i:121;i:1;i:122;i:1;i:123;i:1;i:124;i:1;i:125;i:1;i:126;i:-2;i:133;i:1;i:134;i:-2;i:141;i:-1;i:142;i:-2;i:149;i:-1;i:150;i:-1;i:152;i:1;}s:68:"/home/bjarte/public_html/doctrine/lib/Doctrine/Relation/LocalKey.php";a:24:{i:21;i:1;i:34;i:1;i:46;i:1;i:48;i:1;i:49;i:1;i:50;i:1;i:51;i:1;i:52;i:1;i:54;i:1;i:55;i:1;i:56;i:1;i:57;i:1;i:59;i:1;i:60;i:-1;i:61;i:-1;i:64;i:1;i:66;i:1;i:67;i:-2;i:76;i:1;i:77;i:1;i:78;i:1;i:79;i:1;i:80;i:-2;i:83;i:1;}s:66:"/home/bjarte/public_html/doctrine/lib/Doctrine/DataDict/Sqlite.php";a:189:{i:21;i:1;i:33;i:1;i:60;i:1;i:61;i:-1;i:62;i:-2;i:63;i:1;i:64;i:1;i:65;i:1;i:66;i:1;i:67;i:1;i:68;i:1;i:69;i:1;i:70;i:1;i:71;i:1;i:73;i:1;i:75;i:1;i:76;i:1;i:77;i:1;i:78;i:1;i:79;i:1;i:80;i:1;i:81;i:-1;i:82;i:1;i:83;i:-1;i:84;i:1;i:85;i:-1;i:86;i:-2;i:87;i:1;i:88;i:1;i:89;i:1;i:90;i:1;i:91;i:1;i:92;i:1;i:93;i:-1;i:94;i:1;i:95;i:-1;i:96;i:1;i:97;i:-1;i:98;i:-2;i:99;i:1;i:100;i:1;i:101;i:1;i:102;i:1;i:103;i:1;i:104;i:1;i:105;i:1;i:106;i:1;i:107;i:1;i:108;i:1;i:109;i:1;i:110;i:1;i:111;i:1;i:112;i:1;i:113;i:1;i:114;i:1;i:116;i:-1;i:117;i:-1;i:118;i:-1;i:119;i:-1;i:120;i:-1;i:121;i:-1;i:122;i:-2;i:131;i:1;i:132;i:1;i:133;i:1;i:134;i:1;i:135;i:1;i:137;i:1;i:138;i:-1;i:139;i:-1;i:142;i:1;i:143;i:1;i:144;i:1;i:145;i:1;i:146;i:1;i:147;i:1;i:148;i:1;i:149;i:-1;i:150;i:-1;i:151;i:1;i:152;i:1;i:153;i:1;i:154;i:1;i:155;i:1;i:156;i:1;i:157;i:1;i:158;i:1;i:159;i:1;i:160;i:1;i:161;i:1;i:162;i:1;i:163;i:1;i:164;i:1;i:165;i:1;i:166;i:1;i:167;i:1;i:168;i:1;i:169;i:1;i:170;i:1;i:171;i:1;i:172;i:1;i:173;i:1;i:174;i:1;i:175;i:1;i:176;i:1;i:177;i:1;i:178;i:1;i:179;i:1;i:180;i:1;i:181;i:1;i:182;i:1;i:183;i:1;i:184;i:-1;i:185;i:1;i:186;i:-1;i:187;i:-1;i:188;i:-1;i:189;i:-1;i:190;i:-1;i:191;i:-1;i:192;i:-1;i:193;i:-1;i:194;i:-1;i:195;i:-1;i:196;i:-1;i:197;i:-1;i:198;i:-1;i:199;i:1;i:200;i:-1;i:201;i:-1;i:202;i:-1;i:203;i:1;i:204;i:1;i:205;i:-1;i:206;i:-1;i:207;i:-1;i:208;i:1;i:209;i:-1;i:210;i:-1;i:211;i:-1;i:212;i:1;i:213;i:1;i:214;i:1;i:215;i:1;i:216;i:1;i:217;i:1;i:218;i:1;i:219;i:1;i:220;i:1;i:221;i:1;i:222;i:1;i:223;i:1;i:224;i:1;i:225;i:1;i:226;i:1;i:227;i:1;i:228;i:1;i:229;i:1;i:230;i:1;i:231;i:1;i:232;i:1;i:233;i:1;i:234;i:1;i:235;i:-1;i:236;i:-1;i:237;i:-1;i:239;i:1;i:240;i:1;i:241;i:1;i:242;i:1;i:243;i:-2;i:272;i:1;i:273;i:1;i:275;i:1;i:277;i:1;i:278;i:1;i:279;i:1;i:280;i:1;i:281;i:1;i:282;i:-1;i:283;i:-1;i:284;i:1;i:285;i:1;i:291;i:1;i:294;i:1;i:296;i:1;i:297;i:1;i:298;i:-2;i:300;i:1;}s:61:"/home/bjarte/public_html/doctrine/lib/Doctrine/Query/From.php";a:37:{i:21;i:1;i:33;i:1;i:44;i:1;i:45;i:1;i:47;i:1;i:49;i:1;i:50;i:1;i:51;i:1;i:52;i:1;i:53;i:1;i:54;i:1;i:55;i:-1;i:58;i:1;i:60;i:1;i:61;i:1;i:63;i:1;i:64;i:-1;i:65;i:-2;i:67;i:1;i:69;i:1;i:70;i:1;i:71;i:1;i:72;i:1;i:74;i:1;i:75;i:1;i:76;i:1;i:77;i:1;i:79;i:1;i:80;i:1;i:81;i:1;i:83;i:1;i:84;i:1;i:86;i:1;i:87;i:1;i:88;i:1;i:89;i:-2;i:92;i:1;}s:66:"/home/bjarte/public_html/doctrine/lib/Doctrine/DataDict/Oracle.php";a:124:{i:21;i:1;i:32;i:1;i:58;i:1;i:59;i:-1;i:60;i:-2;i:61;i:1;i:62;i:1;i:63;i:1;i:64;i:1;i:65;i:1;i:66;i:1;i:67;i:1;i:68;i:1;i:69;i:1;i:71;i:1;i:73;i:1;i:74;i:1;i:75;i:1;i:76;i:1;i:77;i:1;i:78;i:1;i:79;i:1;i:80;i:1;i:81;i:1;i:82;i:1;i:83;i:-2;i:84;i:1;i:85;i:1;i:86;i:1;i:87;i:1;i:88;i:1;i:89;i:1;i:90;i:1;i:91;i:1;i:92;i:1;i:93;i:1;i:94;i:-1;i:95;i:-1;i:96;i:-1;i:97;i:-1;i:98;i:-1;i:99;i:-1;i:100;i:-2;i:110;i:1;i:111;i:1;i:112;i:1;i:113;i:1;i:114;i:1;i:115;i:1;i:117;i:1;i:118;i:1;i:119;i:1;i:122;i:1;i:123;i:1;i:124;i:1;i:125;i:1;i:126;i:1;i:127;i:1;i:128;i:1;i:129;i:-1;i:130;i:-1;i:131;i:1;i:132;i:1;i:133;i:1;i:134;i:1;i:135;i:1;i:136;i:1;i:137;i:1;i:138;i:1;i:139;i:1;i:140;i:1;i:141;i:1;i:142;i:1;i:143;i:-1;i:144;i:-1;i:145;i:1;i:146;i:1;i:147;i:1;i:148;i:1;i:149;i:1;i:150;i:1;i:151;i:1;i:152;i:1;i:153;i:1;i:154;i:1;i:155;i:1;i:156;i:1;i:157;i:1;i:158;i:1;i:159;i:1;i:160;i:-1;i:161;i:-1;i:162;i:1;i:163;i:1;i:164;i:1;i:165;i:1;i:166;i:-1;i:167;i:-1;i:168;i:1;i:170;i:1;i:171;i:1;i:172;i:1;i:173;i:1;i:174;i:1;i:175;i:1;i:176;i:1;i:177;i:1;i:178;i:1;i:179;i:1;i:180;i:1;i:181;i:1;i:182;i:1;i:183;i:1;i:184;i:1;i:185;i:1;i:186;i:1;i:187;i:1;i:188;i:1;i:190;i:1;i:191;i:1;i:192;i:1;i:193;i:1;i:194;i:-2;i:196;i:1;}s:54:"/home/bjarte/public_html/doctrine/models/FooRecord.php";a:28:{i:6;i:1;i:8;i:1;i:9;i:1;i:10;i:1;i:11;i:1;i:14;i:1;i:15;i:1;i:16;i:1;i:17;i:1;i:18;i:1;i:20;i:1;i:21;i:1;i:22;i:1;i:23;i:1;i:24;i:1;i:26;i:1;i:27;i:1;i:28;i:1;i:29;i:1;i:31;i:1;i:33;i:1;i:34;i:1;i:35;i:1;i:37;i:1;i:38;i:1;i:39;i:1;i:40;i:1;i:42;i:1;}s:54:"/home/bjarte/public_html/doctrine/models/MysqlUser.php";a:3:{i:6;i:1;i:8;i:1;i:9;i:1;}s:71:"/home/bjarte/public_html/doctrine/tests/EventListener/ChainTestCase.php";a:7:{i:36;i:1;i:39;i:1;i:40;i:1;i:41;i:1;i:44;i:1;i:45;i:1;i:47;i:1;}s:63:"/home/bjarte/public_html/doctrine/tests/Query/LimitTestCase.php";a:168:{i:39;i:1;i:40;i:1;i:41;i:1;i:43;i:1;i:44;i:1;i:48;i:1;i:49;i:1;i:51;i:1;i:52;i:1;i:53;i:1;i:55;i:1;i:58;i:1;i:59;i:1;i:61;i:1;i:62;i:1;i:63;i:1;i:64;i:1;i:68;i:1;i:69;i:1;i:71;i:1;i:73;i:1;i:74;i:1;i:76;i:1;i:77;i:1;i:78;i:1;i:79;i:1;i:80;i:1;i:82;i:1;i:84;i:1;i:85;i:1;i:86;i:1;i:87;i:1;i:88;i:1;i:89;i:1;i:93;i:1;i:94;i:1;i:96;i:1;i:98;i:1;i:100;i:1;i:101;i:1;i:102;i:1;i:103;i:1;i:104;i:1;i:106;i:1;i:107;i:1;i:108;i:1;i:113;i:1;i:114;i:1;i:117;i:1;i:119;i:1;i:120;i:1;i:121;i:1;i:122;i:1;i:123;i:1;i:125;i:1;i:126;i:1;i:130;i:1;i:131;i:1;i:132;i:1;i:135;i:1;i:137;i:1;i:138;i:1;i:139;i:1;i:140;i:1;i:141;i:1;i:144;i:1;i:146;i:1;i:147;i:1;i:148;i:1;i:149;i:1;i:150;i:1;i:152;i:1;i:153;i:1;i:154;i:1;i:158;i:1;i:159;i:1;i:160;i:1;i:161;i:1;i:162;i:1;i:164;i:1;i:165;i:1;i:166;i:1;i:167;i:1;i:169;i:1;i:170;i:1;i:172;i:1;i:173;i:1;i:174;i:1;i:175;i:1;i:177;i:1;i:178;i:1;i:181;i:1;i:182;i:1;i:183;i:1;i:185;i:1;i:188;i:1;i:189;i:1;i:190;i:1;i:194;i:1;i:195;i:1;i:196;i:1;i:197;i:1;i:199;i:1;i:201;i:1;i:203;i:1;i:206;i:1;i:207;i:1;i:209;i:1;i:211;i:1;i:213;i:1;i:214;i:1;i:215;i:1;i:217;i:1;i:218;i:1;i:220;i:1;i:221;i:1;i:223;i:1;i:224;i:1;i:226;i:1;i:228;i:1;i:229;i:1;i:233;i:1;i:234;i:1;i:237;i:1;i:239;i:1;i:241;i:1;i:242;i:1;i:243;i:1;i:244;i:1;i:246;i:1;i:247;i:1;i:251;i:1;i:253;i:1;i:254;i:1;i:255;i:1;i:256;i:1;i:258;i:1;i:260;i:1;i:261;i:1;i:262;i:1;i:266;i:1;i:267;i:1;i:269;i:1;i:272;i:1;i:273;i:1;i:274;i:1;i:275;i:1;i:276;i:1;i:277;i:1;i:278;i:1;i:279;i:1;i:280;i:1;i:281;i:1;i:282;i:1;i:283;i:1;i:285;i:1;i:286;i:1;i:288;i:1;i:289;i:1;i:290;i:1;i:291;i:1;i:292;i:1;i:296;i:1;i:298;i:1;i:299;i:1;i:300;i:1;i:302;i:1;i:303;i:1;}s:65:"/home/bjarte/public_html/doctrine/tests/Query/OrderbyTestCase.php";a:13:{i:37;i:1;i:39;i:1;i:40;i:1;i:41;i:1;i:43;i:1;i:44;i:1;i:47;i:1;i:49;i:1;i:50;i:1;i:51;i:1;i:52;i:1;i:54;i:1;i:55;i:1;}s:65:"/home/bjarte/public_html/doctrine/models/CategoryWithPosition.php";a:5:{i:4;i:1;i:5;i:1;i:6;i:1;i:8;i:1;i:9;i:1;}s:65:"/home/bjarte/public_html/doctrine/lib/Doctrine/Import/Builder.php";a:128:{i:38;i:1;i:50;i:1;i:51;i:1;i:61;i:1;i:62;i:-1;i:63;i:-1;i:65;i:1;i:66;i:1;i:74;i:-1;i:75;i:-2;i:85;i:1;i:86;i:1;i:87;i:-2;i:89;i:1;i:90;i:-1;i:103;i:1;i:104;i:1;i:106;i:1;i:116;i:1;i:117;i:1;i:119;i:1;i:120;i:1;i:121;i:1;i:122;i:1;i:123;i:1;i:124;i:1;i:127;i:1;i:129;i:1;i:130;i:-1;i:131;i:-1;i:132;i:1;i:133;i:1;i:134;i:1;i:135;i:1;i:136;i:-1;i:137;i:-1;i:138;i:1;i:139;i:1;i:140;i:1;i:141;i:1;i:142;i:-1;i:143;i:-1;i:144;i:1;i:145;i:-1;i:146;i:-1;i:147;i:1;i:148;i:-1;i:149;i:-1;i:151;i:1;i:152;i:1;i:153;i:1;i:154;i:1;i:155;i:1;i:156;i:1;i:158;i:1;i:159;i:1;i:160;i:1;i:161;i:1;i:162;i:1;i:164;i:1;i:165;i:-2;i:168;i:1;i:169;i:1;i:170;i:1;i:171;i:-1;i:173;i:-1;i:174;i:-1;i:175;i:-1;i:177;i:-1;i:178;i:-1;i:179;i:-1;i:180;i:-1;i:181;i:-1;i:183;i:-1;i:185;i:-1;i:186;i:-1;i:187;i:-1;i:188;i:-1;i:189;i:-1;i:190;i:-1;i:191;i:-1;i:192;i:-1;i:193;i:-1;i:194;i:-1;i:195;i:-1;i:196;i:-1;i:197;i:-1;i:198;i:-1;i:199;i:-1;i:200;i:-1;i:201;i:-1;i:202;i:-1;i:203;i:-1;i:204;i:-1;i:205;i:-1;i:206;i:-1;i:207;i:-1;i:208;i:1;i:209;i:-2;i:214;i:1;i:215;i:-1;i:216;i:-2;i:220;i:1;i:221;i:1;i:222;i:1;i:224;i:1;i:225;i:-2;i:229;i:1;i:230;i:-1;i:231;i:-2;i:233;i:1;i:234;i:-1;i:235;i:-1;i:236;i:-1;i:237;i:-2;i:240;i:-1;i:241;i:-1;i:242;i:-1;i:243;i:-2;i:245;i:-1;i:246;i:-1;i:248;i:1;i:250;i:1;i:252;i:1;i:253;i:-1;i:254;i:-2;i:255;i:1;i:257;i:1;}s:64:"/home/bjarte/public_html/doctrine/lib/Doctrine/EventListener.php";a:33:{i:38;i:1;i:40;i:1;i:43;i:-1;i:45;i:-1;i:48;i:1;i:51;i:1;i:53;i:1;i:56;i:1;i:58;i:1;i:61;i:1;i:63;i:1;i:67;i:1;i:69;i:1;i:72;i:1;i:74;i:1;i:77;i:1;i:79;i:1;i:82;i:1;i:84;i:1;i:87;i:1;i:89;i:1;i:92;i:1;i:94;i:1;i:97;i:1;i:99;i:1;i:102;i:1;i:104;i:-1;i:107;i:1;i:109;i:1;i:112;i:1;i:114;i:1;i:117;i:1;i:119;i:1;}s:61:"/home/bjarte/public_html/doctrine/lib/Doctrine/Query/Part.php";a:6:{i:34;i:1;i:44;i:1;i:45;i:1;i:51;i:-1;i:52;i:-2;i:54;i:1;}s:63:"/home/bjarte/public_html/doctrine/lib/Doctrine/Adapter/Mock.php";a:66:{i:34;i:1;i:46;i:1;i:47;i:1;i:50;i:-1;i:51;i:-2;i:54;i:1;i:55;i:-2;i:58;i:-1;i:59;i:-1;i:62;i:1;i:63;i:1;i:65;i:1;i:66;i:-2;i:69;i:1;i:70;i:1;i:73;i:1;i:75;i:1;i:77;i:1;i:78;i:-1;i:80;i:-1;i:82;i:-1;i:83;i:-2;i:85;i:1;i:86;i:1;i:88;i:1;i:89;i:-2;i:92;i:-1;i:93;i:-2;i:96;i:1;i:97;i:-2;i:100;i:1;i:102;i:1;i:104;i:1;i:105;i:-1;i:107;i:-1;i:109;i:-1;i:110;i:-2;i:112;i:1;i:113;i:-2;i:116;i:1;i:117;i:1;i:118;i:1;i:119;i:1;i:121;i:1;i:124;i:1;i:125;i:1;i:126;i:1;i:127;i:-2;i:128;i:1;i:130;i:-2;i:133;i:-1;i:134;i:-2;i:137;i:1;i:138;i:1;i:141;i:1;i:142;i:1;i:145;i:-1;i:146;i:-1;i:148;i:-1;i:150;i:-1;i:153;i:1;i:154;i:1;i:155;i:-1;i:159;i:1;i:161;i:1;i:163;i:1;}s:69:"/home/bjarte/public_html/doctrine/tests/Transaction/MysqlTestCase.php";a:21:{i:37;i:1;i:39;i:1;i:40;i:1;i:43;i:1;i:45;i:1;i:46;i:1;i:49;i:1;i:50;i:1;i:52;i:1;i:53;i:1;i:56;i:1;i:58;i:1;i:59;i:1;i:63;i:1;i:64;i:-1;i:65;i:1;i:66;i:1;i:68;i:1;i:71;i:1;i:73;i:1;i:74;i:1;}s:68:"/home/bjarte/public_html/doctrine/lib/Doctrine/Transaction/Pgsql.php";a:23:{i:21;i:1;i:34;i:1;i:45;i:1;i:47;i:1;i:48;i:-2;i:58;i:1;i:60;i:1;i:61;i:-2;i:71;i:1;i:73;i:1;i:74;i:-2;i:90;i:1;i:91;i:1;i:92;i:1;i:93;i:1;i:94;i:1;i:95;i:1;i:96;i:1;i:97;i:1;i:99;i:1;i:100;i:1;i:101;i:-2;i:103;i:1;}s:69:"/home/bjarte/public_html/doctrine/lib/Doctrine/DataDict/Exception.php";a:3:{i:21;i:1;i:33;i:1;i:35;i:1;}s:63:"/home/bjarte/public_html/doctrine/lib/Doctrine/Export/Pgsql.php";a:126:{i:21;i:1;i:34;i:1;i:45;i:1;i:47;i:1;i:48;i:-2;i:58;i:1;i:60;i:1;i:61;i:-2;i:73;i:1;i:74;i:1;i:75;i:-1;i:76;i:-1;i:77;i:1;i:78;i:-1;i:79;i:-1;i:80;i:1;i:81;i:1;i:82;i:1;i:83;i:1;i:84;i:-1;i:85;i:-1;i:86;i:1;i:88;i:1;i:89;i:-1;i:90;i:-1;i:91;i:1;i:93;i:1;i:94;i:-2;i:187;i:-1;i:189;i:-1;i:190;i:-1;i:191;i:-1;i:192;i:-1;i:193;i:-1;i:194;i:-1;i:195;i:-1;i:196;i:-1;i:197;i:-1;i:198;i:-1;i:200;i:-1;i:201;i:-1;i:202;i:-2;i:204;i:-1;i:205;i:-1;i:206;i:-1;i:207;i:-1;i:208;i:-1;i:209;i:-1;i:211;i:-1;i:212;i:-1;i:213;i:-1;i:214;i:-1;i:215;i:-1;i:216;i:-1;i:217;i:-1;i:219;i:-1;i:220;i:-1;i:221;i:-1;i:222;i:-1;i:223;i:-1;i:225;i:-1;i:226;i:-1;i:227;i:-2;i:228;i:-1;i:229;i:-1;i:230;i:-1;i:231;i:-1;i:232;i:-1;i:233;i:-1;i:234;i:-1;i:235;i:-1;i:236;i:-1;i:237;i:-1;i:238;i:-1;i:239;i:-1;i:240;i:-1;i:242;i:-1;i:243;i:-1;i:244;i:-1;i:245;i:-1;i:246;i:-1;i:247;i:-1;i:249;i:-1;i:250;i:-1;i:251;i:-1;i:252;i:-1;i:253;i:-1;i:254;i:-1;i:271;i:-1;i:272;i:-1;i:273;i:-1;i:274;i:-2;i:282;i:-1;i:283;i:-1;i:284;i:-2;i:296;i:1;i:297;i:-1;i:298;i:-2;i:300;i:1;i:301;i:-1;i:302;i:-2;i:304;i:1;i:307;i:1;i:308;i:1;i:309;i:1;i:311;i:1;i:313;i:1;i:315;i:1;i:316;i:-1;i:317;i:-1;i:318;i:-1;i:319;i:-1;i:321;i:1;i:323;i:1;i:324;i:1;i:325;i:1;i:326;i:1;i:327;i:1;i:328;i:1;i:330;i:1;i:331;i:-2;i:342;i:1;i:344;i:1;i:346;i:1;i:347;i:-2;i:350;i:1;}s:64:"/home/bjarte/public_html/doctrine/tests/Export/MysqlTestCase.php";a:155:{i:36;i:-1;i:38;i:-1;i:43;i:1;i:45;i:-1;i:46;i:1;i:47;i:1;i:49;i:1;i:52;i:1;i:54;i:1;i:55;i:1;i:57;i:1;i:59;i:1;i:60;i:1;i:63;i:1;i:65;i:1;i:67;i:1;i:70;i:1;i:71;i:1;i:74;i:1;i:75;i:1;i:76;i:1;i:78;i:1;i:79;i:1;i:81;i:1;i:82;i:1;i:85;i:1;i:87;i:1;i:88;i:1;i:89;i:1;i:91;i:1;i:93;i:1;i:94;i:1;i:97;i:1;i:99;i:1;i:100;i:1;i:102;i:1;i:104;i:1;i:105;i:1;i:108;i:1;i:110;i:1;i:111;i:1;i:113;i:1;i:115;i:1;i:116;i:1;i:119;i:1;i:121;i:1;i:122;i:1;i:124;i:1;i:126;i:1;i:127;i:1;i:130;i:1;i:132;i:1;i:133;i:1;i:135;i:1;i:137;i:1;i:138;i:1;i:141;i:1;i:143;i:1;i:144;i:1;i:146;i:1;i:148;i:1;i:149;i:1;i:152;i:1;i:154;i:1;i:155;i:1;i:157;i:1;i:159;i:1;i:160;i:1;i:164;i:1;i:166;i:1;i:167;i:1;i:169;i:1;i:171;i:1;i:172;i:1;i:175;i:1;i:177;i:1;i:178;i:1;i:179;i:1;i:180;i:1;i:181;i:1;i:182;i:1;i:183;i:1;i:184;i:1;i:187;i:1;i:189;i:1;i:190;i:1;i:191;i:1;i:194;i:1;i:196;i:1;i:197;i:1;i:198;i:1;i:199;i:1;i:200;i:1;i:201;i:1;i:202;i:1;i:203;i:1;i:204;i:1;i:207;i:1;i:208;i:1;i:209;i:1;i:210;i:1;i:213;i:1;i:215;i:1;i:216;i:1;i:219;i:1;i:221;i:1;i:222;i:1;i:226;i:1;i:228;i:1;i:229;i:1;i:232;i:1;i:233;i:1;i:236;i:1;i:237;i:-1;i:238;i:1;i:239;i:1;i:241;i:1;i:244;i:1;i:245;i:1;i:247;i:1;i:248;i:1;i:251;i:1;i:252;i:1;i:253;i:1;i:255;i:1;i:257;i:1;i:258;i:1;i:260;i:1;i:261;i:1;i:262;i:1;i:265;i:1;i:266;i:1;i:267;i:1;i:269;i:1;i:272;i:1;i:273;i:1;i:274;i:1;i:275;i:1;i:276;i:1;i:278;i:1;i:280;i:1;i:281;i:1;i:284;i:1;i:285;i:1;i:286;i:1;i:288;i:1;i:291;i:1;i:292;i:1;i:293;i:1;i:294;i:1;i:295;i:1;i:296;i:1;i:298;i:1;i:300;i:1;i:301;i:1;}s:61:"/home/bjarte/public_html/doctrine/lib/Doctrine/Expression.php";a:37:{i:0;i:1;i:21;i:1;i:34;i:1;i:41;i:1;i:43;i:1;i:44;i:-1;i:45;i:-1;i:46;i:1;i:50;i:1;i:51;i:1;i:52;i:-2;i:54;i:-1;i:55;i:-2;i:59;i:1;i:60;i:1;i:64;i:1;i:65;i:1;i:66;i:1;i:67;i:-2;i:70;i:1;i:71;i:1;i:74;i:1;i:75;i:1;i:76;i:1;i:78;i:1;i:79;i:-2;i:83;i:1;i:85;i:1;i:86;i:1;i:87;i:1;i:89;i:1;i:90;i:-2;i:95;i:1;i:96;i:-2;i:100;i:-1;i:101;i:-2;i:103;i:1;}s:66:"/home/bjarte/public_html/doctrine/lib/Doctrine/Query/Exception.php";a:3:{i:21;i:1;i:33;i:1;i:35;i:1;}s:71:"/home/bjarte/public_html/doctrine/tests/Query/MysqlSubqueryTestCase.php";a:54:{i:37;i:1;i:38;i:1;i:39;i:1;i:43;i:1;i:44;i:1;i:45;i:1;i:46;i:1;i:47;i:1;i:48;i:1;i:50;i:1;i:52;i:1;i:54;i:1;i:55;i:1;i:58;i:1;i:59;i:1;i:60;i:1;i:61;i:1;i:62;i:1;i:63;i:1;i:65;i:1;i:67;i:1;i:69;i:1;i:70;i:1;i:73;i:1;i:74;i:1;i:75;i:1;i:76;i:1;i:77;i:1;i:78;i:1;i:80;i:1;i:82;i:1;i:84;i:1;i:85;i:1;i:88;i:1;i:89;i:1;i:90;i:1;i:91;i:1;i:92;i:1;i:93;i:1;i:94;i:1;i:96;i:1;i:98;i:1;i:100;i:1;i:101;i:1;i:104;i:1;i:105;i:1;i:106;i:1;i:107;i:1;i:108;i:1;i:109;i:1;i:111;i:1;i:113;i:1;i:115;i:1;i:116;i:1;}s:58:"/home/bjarte/public_html/doctrine/tests/SchemaTestCase.php";a:98:{i:14;i:1;i:15;i:1;i:17;i:1;i:18;i:1;i:20;i:1;i:22;i:1;i:24;i:1;i:25;i:1;i:27;i:1;i:28;i:1;i:30;i:1;i:32;i:1;i:34;i:1;i:35;i:1;i:37;i:1;i:38;i:1;i:40;i:1;i:42;i:1;i:44;i:1;i:45;i:1;i:47;i:1;i:48;i:1;i:50;i:1;i:52;i:1;i:54;i:1;i:55;i:1;i:57;i:1;i:58;i:1;i:60;i:1;i:62;i:1;i:63;i:1;i:67;i:1;i:68;i:1;i:70;i:1;i:71;i:1;i:73;i:1;i:75;i:1;i:77;i:1;i:78;i:1;i:80;i:1;i:81;i:1;i:83;i:1;i:85;i:1;i:87;i:1;i:88;i:1;i:90;i:1;i:91;i:1;i:93;i:1;i:95;i:1;i:97;i:1;i:98;i:1;i:100;i:1;i:101;i:1;i:103;i:1;i:105;i:1;i:107;i:1;i:108;i:1;i:110;i:1;i:111;i:1;i:113;i:1;i:115;i:1;i:116;i:1;i:120;i:1;i:122;i:1;i:123;i:1;i:124;i:1;i:125;i:1;i:127;i:1;i:129;i:1;i:131;i:1;i:132;i:1;i:133;i:1;i:136;i:1;i:140;i:1;i:142;i:1;i:143;i:1;i:144;i:1;i:146;i:1;i:148;i:1;i:150;i:1;i:151;i:1;i:152;i:1;i:153;i:1;i:157;i:1;i:159;i:1;i:160;i:1;i:161;i:1;i:162;i:1;i:163;i:1;i:164;i:1;i:168;i:1;i:170;i:1;i:172;i:1;i:173;i:1;i:174;i:1;i:175;i:1;i:179;i:1;i:201;i:1;}}} \ No newline at end of file diff --git a/tests/coverage/Doctrine.html b/tests/coverage/Doctrine.html new file mode 100644 index 000000000..5bc86aae6 --- /dev/null +++ b/tests/coverage/Doctrine.html @@ -0,0 +1,2724 @@ + + + Coverage for Doctrine + + +

Coverage for Doctrine

Back to coverage report

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
1<?php +
2/* +
3 *  $Id: Doctrine.php 2814 2007-10-11 04:24:01Z Jonathan.Wage $ +
4 * +
5 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +
6 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +
7 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +
8 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +
9 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +
10 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +
11 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +
12 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +
13 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +
14 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +
15 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +
16 * +
17 * This software consists of voluntary contributions made by many individuals +
18 * and is licensed under the LGPL. For more information, see +
19 * <http://www.phpdoctrine.com>. +
20 */ +
21 +
22/** +
23 * Doctrine +
24 * the base class of Doctrine framework +
25 * +
26 * @package     Doctrine +
27 * @author      Konsta Vesterinen <kvesteri@cc.hut.fi> +
28 * @author      Lukas Smith <smith@pooteeweet.org> (PEAR MDB2 library) +
29 * @license     http://www.opensource.org/licenses/lgpl-license.php LGPL +
30 * @link        www.phpdoctrine.com +
31 * @since       1.0 +
32 * @version     $Revision: 2814 $ +
33 */ +
34final class Doctrine +
35{ +
36    /** +
37     * ERROR CONSTANTS +
38     */ +
39    const ERR                       = -1; +
40    const ERR_SYNTAX                = -2; +
41    const ERR_CONSTRAINT            = -3; +
42    const ERR_NOT_FOUND             = -4; +
43    const ERR_ALREADY_EXISTS        = -5; +
44    const ERR_UNSUPPORTED           = -6; +
45    const ERR_MISMATCH              = -7; +
46    const ERR_INVALID               = -8; +
47    const ERR_NOT_CAPABLE           = -9; +
48    const ERR_TRUNCATED             = -10; +
49    const ERR_INVALID_NUMBER        = -11; +
50    const ERR_INVALID_DATE          = -12; +
51    const ERR_DIVZERO               = -13; +
52    const ERR_NODBSELECTED          = -14; +
53    const ERR_CANNOT_CREATE         = -15; +
54    const ERR_CANNOT_DELETE         = -16; +
55    const ERR_CANNOT_DROP           = -17; +
56    const ERR_NOSUCHTABLE           = -18; +
57    const ERR_NOSUCHFIELD           = -19; +
58    const ERR_NEED_MORE_DATA        = -20; +
59    const ERR_NOT_LOCKED            = -21; +
60    const ERR_VALUE_COUNT_ON_ROW    = -22; +
61    const ERR_INVALID_DSN           = -23; +
62    const ERR_CONNECT_FAILED        = -24; +
63    const ERR_EXTENSION_NOT_FOUND   = -25; +
64    const ERR_NOSUCHDB              = -26; +
65    const ERR_ACCESS_VIOLATION      = -27; +
66    const ERR_CANNOT_REPLACE        = -28; +
67    const ERR_CONSTRAINT_NOT_NULL   = -29; +
68    const ERR_DEADLOCK              = -30; +
69    const ERR_CANNOT_ALTER          = -31; +
70    const ERR_MANAGER               = -32; +
71    const ERR_MANAGER_PARSE         = -33; +
72    const ERR_LOADMODULE            = -34; +
73    const ERR_INSUFFICIENT_DATA     = -35; +
74    const ERR_CLASS_NAME            = -36; +
75 +
76    /** +
77     * PDO derived constants +
78     */ +
79    const CASE_LOWER = 2; +
80    const CASE_NATURAL = 0; +
81    const CASE_UPPER = 1; +
82    const CURSOR_FWDONLY = 0; +
83    const CURSOR_SCROLL = 1; +
84    const ERRMODE_EXCEPTION = 2; +
85    const ERRMODE_SILENT = 0; +
86    const ERRMODE_WARNING = 1; +
87    const FETCH_ASSOC = 2; +
88    const FETCH_BOTH = 4; +
89    const FETCH_BOUND = 6; +
90    const FETCH_CLASS = 8; +
91    const FETCH_CLASSTYPE = 262144; +
92    const FETCH_COLUMN = 7; +
93    const FETCH_FUNC = 10; +
94    const FETCH_GROUP = 65536; +
95    const FETCH_INTO = 9; +
96    const FETCH_LAZY = 1; +
97    const FETCH_NAMED = 11; +
98    const FETCH_NUM = 3; +
99    const FETCH_OBJ = 5; +
100    const FETCH_ORI_ABS = 4; +
101    const FETCH_ORI_FIRST = 2; +
102    const FETCH_ORI_LAST = 3; +
103    const FETCH_ORI_NEXT = 0; +
104    const FETCH_ORI_PRIOR = 1; +
105    const FETCH_ORI_REL = 5; +
106    const FETCH_SERIALIZE = 524288; +
107    const FETCH_UNIQUE = 196608; +
108    const NULL_EMPTY_STRING = 1; +
109    const NULL_NATURAL = 0; +
110    const NULL_TO_STRING         = NULL; +
111    const PARAM_BOOL = 5; +
112    const PARAM_INPUT_OUTPUT = -2147483648; +
113    const PARAM_INT = 1; +
114    const PARAM_LOB = 3; +
115    const PARAM_NULL = 0; +
116    const PARAM_STMT = 4; +
117    const PARAM_STR = 2; +
118    /** +
119     * ATTRIBUTE CONSTANTS +
120     */ +
121 +
122    /** +
123     * PDO derived attributes +
124     */ +
125    const ATTR_AUTOCOMMIT           = 0; +
126    const ATTR_PREFETCH             = 1; +
127    const ATTR_TIMEOUT              = 2; +
128    const ATTR_ERRMODE              = 3; +
129    const ATTR_SERVER_VERSION       = 4; +
130    const ATTR_CLIENT_VERSION       = 5; +
131    const ATTR_SERVER_INFO          = 6; +
132    const ATTR_CONNECTION_STATUS    = 7; +
133    const ATTR_CASE                 = 8; +
134    const ATTR_CURSOR_NAME          = 9; +
135    const ATTR_CURSOR               = 10; +
136    const ATTR_ORACLE_NULLS         = 11; +
137    const ATTR_PERSISTENT           = 12; +
138    const ATTR_STATEMENT_CLASS      = 13; +
139    const ATTR_FETCH_TABLE_NAMES    = 14; +
140    const ATTR_FETCH_CATALOG_NAMES  = 15; +
141    const ATTR_DRIVER_NAME          = 16; +
142    const ATTR_STRINGIFY_FETCHES    = 17; +
143    const ATTR_MAX_COLUMN_LEN       = 18; +
144 +
145    /** +
146     * Doctrine constants +
147     */ +
148    const ATTR_LISTENER             = 100; +
149    const ATTR_QUOTE_IDENTIFIER     = 101; +
150    const ATTR_FIELD_CASE           = 102; +
151    const ATTR_IDXNAME_FORMAT       = 103; +
152    const ATTR_SEQNAME_FORMAT       = 104; +
153    const ATTR_SEQCOL_NAME          = 105; +
154    const ATTR_CMPNAME_FORMAT       = 118; +
155    const ATTR_DBNAME_FORMAT        = 117; +
156    const ATTR_TBLCLASS_FORMAT      = 119; +
157    const ATTR_EXPORT               = 140; +
158    const ATTR_DECIMAL_PLACES       = 141; +
159 +
160    const ATTR_PORTABILITY          = 106; +
161    const ATTR_VALIDATE             = 107; +
162    const ATTR_COLL_KEY             = 108; +
163    const ATTR_QUERY_LIMIT          = 109; +
164    const ATTR_DEFAULT_TABLE_TYPE   = 112; +
165    const ATTR_DEF_TEXT_LENGTH      = 113; +
166    const ATTR_DEF_VARCHAR_LENGTH   = 114; +
167    const ATTR_DEF_TABLESPACE       = 115; +
168    const ATTR_EMULATE_DATABASE     = 116; +
169    const ATTR_USE_NATIVE_ENUM      = 117; +
170    const ATTR_DEFAULT_SEQUENCE     = 133; +
171 +
172    const ATTR_FETCHMODE            = 118; +
173    const ATTR_NAME_PREFIX          = 121; +
174    const ATTR_CREATE_TABLES        = 122; +
175    const ATTR_COLL_LIMIT           = 123; +
176 +
177    const ATTR_CACHE                = 150; +
178    const ATTR_CACHE_LIFESPAN       = 151; +
179    const ATTR_LOAD_REFERENCES      = 153; +
180    const ATTR_RECORD_LISTENER      = 154; +
181    const ATTR_THROW_EXCEPTIONS     = 155; +
182 +
183 +
184    /** +
185     * LIMIT CONSTANTS +
186     */ +
187 +
188    /** +
189     * constant for row limiting +
190     */ +
191    const LIMIT_ROWS       = 1; +
192    /** +
193     * constant for record limiting +
194     */ +
195    const LIMIT_RECORDS    = 2; +
196 +
197    /** +
198     * FETCHMODE CONSTANTS +
199     */ +
200 +
201    /** +
202     * IMMEDIATE FETCHING +
203     * mode for immediate fetching +
204     */ +
205    const FETCH_IMMEDIATE       = 0; +
206    /** +
207     * BATCH FETCHING +
208     * mode for batch fetching +
209     */ +
210    const FETCH_BATCH           = 1; +
211    /** +
212     * LAZY FETCHING +
213     * mode for offset fetching +
214     */ +
215    const FETCH_OFFSET          = 3; +
216    /** +
217     * LAZY OFFSET FETCHING +
218     * mode for lazy offset fetching +
219     */ +
220    const FETCH_LAZY_OFFSET     = 4; +
221 +
222    /** +
223     * FETCH CONSTANTS +
224     */ +
225 +
226 +
227    /** +
228     * FETCH VALUEHOLDER +
229     */ +
230    const FETCH_VHOLDER         = 1; +
231    /** +
232     * FETCH RECORD +
233     * +
234     * Specifies that the fetch method shall return Doctrine_Record +
235     * objects as the elements of the result set. +
236     * +
237     * This is the default fetchmode. +
238     */ +
239    const FETCH_RECORD          = 2; +
240    /** +
241     * FETCH ARRAY +
242     */ +
243 +
244    const FETCH_ARRAY           = 3; +
245    /** +
246     * PORTABILITY CONSTANTS +
247     */ +
248 +
249    /** +
250     * Portability: turn off all portability features. +
251     * @see Doctrine::ATTR_PORTABILITY +
252     */ +
253    const PORTABILITY_NONE          = 0; +
254    /** +
255     * Portability: convert names of tables and fields to case defined in the +
256     * "field_case" option when using the query*(), fetch*() methods. +
257     * @see Doctrine::ATTR_PORTABILITY +
258     */ +
259    const PORTABILITY_FIX_CASE      = 1; +
260 +
261    /** +
262     * Portability: right trim the data output by query*() and fetch*(). +
263     * @see Doctrine::ATTR_PORTABILITY +
264     */ +
265    const PORTABILITY_RTRIM         = 2; +
266    /** +
267     * Portability: force reporting the number of rows deleted. +
268     * @see Doctrine::ATTR_PORTABILITY +
269     */ +
270    const PORTABILITY_DELETE_COUNT  = 4; +
271    /** +
272     * Portability: convert empty values to null strings in data output by +
273     * query*() and fetch*(). +
274     * @see Doctrine::ATTR_PORTABILITY +
275     */ +
276    const PORTABILITY_EMPTY_TO_NULL = 8; +
277    /** +
278     * Portability: removes database/table qualifiers from associative indexes +
279     * @see Doctrine::ATTR_PORTABILITY +
280     */ +
281    const PORTABILITY_FIX_ASSOC_FIELD_NAMES = 16; +
282    /** +
283     * Portability: makes Doctrine_Expression throw exception for unportable RDBMS expressions +
284     * @see Doctrine::ATTR_PORTABILITY +
285     */ +
286    const PORTABILITY_EXPR          = 32; +
287    /** +
288     * Portability: turn on all portability features. +
289     * @see Doctrine::ATTR_PORTABILITY +
290     */ +
291    const PORTABILITY_ALL           = 63; +
292 +
293    /** +
294     * LOCKMODE CONSTANTS +
295     */ +
296 +
297    /** +
298     * mode for optimistic locking +
299     */ +
300    const LOCK_OPTIMISTIC       = 0; +
301    /** +
302     * mode for pessimistic locking +
303     */ +
304    const LOCK_PESSIMISTIC      = 1; +
305    /** +
306     * EXPORT CONSTANTS +
307     */ +
308 +
309    /** +
310     * turns of exporting +
311     */ +
312    const EXPORT_NONE               = 0; +
313    /** +
314     * export tables +
315     */ +
316    const EXPORT_TABLES             = 1; +
317    /** +
318     * export constraints +
319     */ +
320    const EXPORT_CONSTRAINTS        = 2; +
321    /** +
322     * export plugins +
323     */ +
324    const EXPORT_PLUGINS            = 4; +
325    /** +
326     * export all +
327     */ +
328    const EXPORT_ALL                = 7; +
329     +
330    /** +
331     * HYDRATION CONSTANTS +
332     */ +
333    const HYDRATE_RECORD            = 2; +
334     +
335    const HYDRATE_ARRAY             = 3; +
336 +
337    /** +
338     * VALIDATION CONSTANTS +
339     */ +
340    const VALIDATE_NONE             = 0; +
341 +
342    const VALIDATE_LENGTHS          = 1; +
343     +
344    const VALIDATE_TYPES            = 2; +
345     +
346    const VALIDATE_CONSTRAINTS      = 4; +
347     +
348    const VALIDATE_ALL              = 5; +
349 +
350    /** +
351     * constant for auto_increment identifier +
352     */ +
353    const IDENTIFIER_AUTOINC        = 1; +
354    /** +
355     * constant for sequence identifier +
356     */ +
357    const IDENTIFIER_SEQUENCE       = 2; +
358    /** +
359     * constant for normal identifier +
360     */ +
361    const IDENTIFIER_NATURAL        = 3; +
362    /** +
363     * constant for composite identifier +
364     */ +
365    const IDENTIFIER_COMPOSITE      = 4; +
366    /** +
367     * constructor +
368     */ +
369    public function __construct() +
370    { +
371        throw new Doctrine_Exception('Doctrine is static class. No instances can be created.'); +
372    } +
373    /** +
374     * @var string $path            doctrine root directory +
375     */ +
376    private static $_path; +
377    /** +
378     * @var boolean $_debug +
379     */ +
380    private static $_debug = false; +
381 +
382    public static function debug($bool = null) +
383    { +
384        if ($bool !== null) { +
385            self::$_debug = (bool) $bool; +
386        } +
387        return self::$_debug; +
388    } +
389    /** +
390     * getPath +
391     * returns the doctrine root +
392     * +
393     * @return string +
394     */ +
395    public static function getPath() +
396    { +
397        if ( ! self::$_path) { +
398            self::$_path = dirname(__FILE__); +
399        } +
400        return self::$_path; +
401    } +
402    /** +
403     * loadAll +
404     * loads all runtime classes +
405     * +
406     * @return void +
407     */ +
408    public static function loadAll() +
409    { +
410        $classes = Doctrine_Compiler::getRuntimeClasses(); +
411 +
412        foreach ($classes as $class) { +
413            Doctrine::autoload($class); +
414        } +
415    } +
416    /** +
417     * loadModels +
418     * +
419     * Recursively load all models from a directory or array of directories +
420     *  +
421     * @param string $directory Path to directory of models or array of directory paths +
422     * @return void +
423     */ +
424    public static function loadModels($directory) +
425    { +
426        $declared = get_declared_classes(); +
427         +
428        if ($directory !== null) { +
429            foreach ((array) $directory as $dir) { +
430                $it = new RecursiveIteratorIterator(new RecursiveDirectoryIterator($dir), +
431                                                        RecursiveIteratorIterator::LEAVES_ONLY); +
432 +
433                foreach ($it as $file) { +
434                    $e = explode('.', $file->getFileName()); +
435                    if (end($e) === 'php' && strpos($file->getFileName(), '.inc') === false) { +
436                        require_once $file->getPathName(); +
437                    } +
438                } +
439            } +
440             +
441            $declared = array_diff(get_declared_classes(), $declared); +
442        } +
443         +
444        return self::getLoadedModels($declared); +
445    } +
446    /** +
447     * getLoadedModels +
448     * +
449     * Get all the loaded models, you can provide an array of classes or it will use get_declared_classes() +
450     *  +
451     * @param $classes Array of classes to filter through, otherwise uses get_declared_classes() +
452     * @return void +
453     */ +
454    public static function getLoadedModels($classes = null) +
455    { +
456        if ($classes === null) { +
457            $classes = get_declared_classes(); +
458        } +
459         +
460        $parent = new ReflectionClass('Doctrine_Record'); +
461         +
462        $loadedModels = array(); +
463         +
464        // we iterate trhough the diff of previously declared classes +
465        // and currently declared classes +
466        foreach ($classes as $name) { +
467            $class = new ReflectionClass($name); +
468             +
469            // Skip the following classes +
470            // - abstract classes +
471            // - not a subclass of Doctrine_Record  +
472            // - don't have a setTableDefinition method +
473            if ($class->isAbstract() ||  +
474                !$class->isSubClassOf($parent) ||  +
475                !$class->hasMethod('setTableDefinition')) { +
476                continue; +
477            } +
478             +
479            $loadedModels[] = $name; +
480        } +
481         +
482        return $loadedModels; +
483    } +
484    /** +
485     * getConnectionByTableName +
486     * +
487     * Get the connection object for a table by the actual table name +
488     *  +
489     * @param string $tableName  +
490     * @return void +
491     */ +
492    public static function getConnectionByTableName($tableName) +
493    { +
494        $loadedModels = self::getLoadedModels(); +
495         +
496        foreach ($loadedModels as $name) { +
497            $model = new $name(); +
498            $table = $model->getTable(); +
499             +
500            if ($table->getTableName() == $tableName) { +
501               return $table->getConnection();  +
502            } +
503        } +
504    } +
505    /** +
506     * importSchema +
507     * method for importing existing schema to Doctrine_Record classes +
508     * +
509     * @param string $directory Directory to write your models to +
510     * @param array $databases Array of databases to generate models for +
511     * @return boolean +
512     */ +
513    public static function importSchema($directory, array $databases = array()) +
514    { +
515        return Doctrine_Manager::connection()->import->importSchema($directory, $databases); +
516    } +
517    /** +
518     * generateModelsFromDb +
519     * +
520     * Generate your model definitions from an existing database +
521     * +
522     * @param string $directory Directory to write your models to +
523     * @param string $databases Array of databases to generate models for +
524     * @return void +
525     */ +
526    public static function generateModelsFromDb($directory, array $databases = array()) +
527    { +
528        return self::importSchema($directory, $databases); +
529    } +
530    /** +
531     * generateYamlFromDb +
532     * +
533     * Generates models from database to temporary location then uses those models to generate a yaml schema file. +
534     * This should probably be fixed. We should write something to generate a yaml schema file directly from the database. +
535     * +
536     * @param string $yamlPath Path to write oyur yaml schema file to +
537     * @return void +
538     */ +
539    public static function generateYamlFromDb($yamlPath) +
540    { +
541        $directory = '/tmp/tmp_doctrine_models'; +
542 +
543        Doctrine::generateModelsFromDb($directory); +
544 +
545        $export = new Doctrine_Export_Schema(); +
546         +
547        return $export->exportSchema($yamlPath, 'yml', $directory); +
548    } +
549    /** +
550     * generateModelsFromYaml +
551     * +
552     * Generate a yaml schema file from an existing directory of models +
553     * +
554     * @param string $yamlPath Path to your yaml schema files +
555     * @param string $directory Directory to generate your models in +
556     * @return void +
557     */ +
558    public static function generateModelsFromYaml($yamlPath, $directory) +
559    { +
560        $import = new Doctrine_Import_Schema(); +
561         +
562        return $import->importSchema($yamlPath, 'yml', $directory); +
563    } +
564    /** +
565     * exportSchema +
566     * method for exporting Doctrine_Record classes to a schema +
567     * +
568     * @param string $directory Directory containing your models +
569     * @return void +
570     */ +
571    public static function exportSchema($directory = null) +
572    { +
573        return Doctrine_Manager::connection()->export->exportSchema($directory); +
574    } +
575    /** +
576     * createTablesFromModels +
577     * +
578     * Creates database tables for the models in the specified directory +
579     * +
580     * @param string $directory Directory containing your models +
581     * @return void +
582     */ +
583    public static function createTablesFromModels($directory = null) +
584    { +
585        return self::exportSchema($directory); +
586    } +
587    /** +
588     * generateYamlFromModels +
589     * +
590     * Generate yaml schema file for the models in the specified directory +
591     * +
592     * @param string $yamlPath Path to your yaml schema files +
593     * @param string $directory Directory to generate your models in +
594     * @return void +
595     */ +
596    public static function generateYamlFromModels($yamlPath, $directory) +
597    { +
598        $export = new Doctrine_Export_Schema(); +
599         +
600        return $export->exportSchema($yamlPath, 'yml', $directory); +
601    } +
602    /** +
603     * createDatabases +
604     * +
605     * Creates databases for connections +
606     * +
607     * @param string $specifiedConnections Array of connections you wish to create the database for +
608     * @return void +
609     */ +
610    public static function createDatabases($specifiedConnections) +
611    { +
612        if (!is_array($specifiedConnections)) { +
613            $specifiedConnections = (array) $specifiedConnections; +
614        } +
615         +
616        $connections = Doctrine_Manager::getInstance()->getConnections(); +
617         +
618        foreach ($connections as $name => $connection) { +
619            if (!empty($specifiedConnections) && !in_array($name, $specifiedConnections)) { +
620                continue; +
621            } +
622             +
623            $connection->export->createDatabase($name); +
624        } +
625    } +
626    /** +
627     * dropDatabases +
628     * +
629     * Drops databases for connections +
630     * +
631     * @param string $specifiedConnections Array of connections you wish to drop the database for +
632     * @return void +
633     */ +
634    public static function dropDatabases($specifiedConnections = array()) +
635    { +
636        if (!is_array($specifiedConnections)) { +
637            $specifiedConnections = (array) $specifiedConnections; +
638        } +
639         +
640        $connections = Doctrine_Manager::getInstance()->getConnections(); +
641         +
642        foreach ($connections as $name => $connection) { +
643            if (!empty($specifiedConnections) && !in_array($name, $specifiedConnections)) { +
644                continue; +
645            } +
646             +
647            $connection->export->dropDatabase($name); +
648        } +
649    } +
650    /** +
651     * dumpData +
652     * +
653     * Dump data to a yaml fixtures file +
654     * +
655     * @param string $yamlPath Path to write the yaml data fixtures to +
656     * @param string $individualFiles Whether or not to dump data to individual fixtures files +
657     * @return void +
658     */ +
659    public static function dumpData($yamlPath, $individualFiles = false) +
660    { +
661        $data = new Doctrine_Data(); +
662         +
663        return $data->exportData($yamlPath, 'yml', array(), $individualFiles); +
664    } +
665    /** +
666     * loadData +
667     * +
668     * Load data from a yaml fixtures file. +
669     * The output of dumpData can be fed to loadData +
670     * +
671     * @param string $yamlPath Path to your yaml data fixtures +
672     * @param string $append Whether or not to append the data +
673     * @return void +
674     */ +
675    public static function loadData($yamlPath, $append = false) +
676    { +
677        $delete = isset($append) ? ($append ? false : true) : true; +
678 +
679        if ($delete) +
680        { +
681          $models = Doctrine::getLoadedModels(); +
682 +
683          foreach ($models as $model) +
684          { +
685            $model = new $model(); +
686 +
687            $model->getTable()->createQuery()->delete($model)->execute(); +
688          } +
689        } +
690 +
691        $data = new Doctrine_Data(); +
692         +
693        return $data->importData($yamlPath, 'yml'); +
694    } +
695    /** +
696     * loadDummyData +
697     * +
698     * Populdate your models with dummy data +
699     * +
700     * @param string $append Whether or not to append the data +
701     * @param string $num Number of records to populate +
702     * @return void +
703     */ +
704    public static function loadDummyData($append, $num = 5) +
705    { +
706        $delete = isset($append) ? ($append ? false : true) : true; +
707 +
708        if ($delete) +
709        { +
710          $models = Doctrine::getLoadedModels(); +
711 +
712          foreach ($models as $model) +
713          { +
714            $model = new $model(); +
715 +
716            $model->getTable()->createQuery()->delete($model)->execute(); +
717          } +
718        } +
719         +
720        $data = new Doctrine_Data(); +
721         +
722        return $data->importDummyData($num); +
723    } +
724    /** +
725     * migrate +
726     *  +
727     * Migrate database to specified $to version. Migrates from current to latest if you do not specify. +
728     * +
729     * @param string $directory Directory which contains your migration classes +
730     * @param string $to Version you wish to migrate to. +
731     * @return void +
732     */ +
733    public static function migrate($directory, $to = null) +
734    { +
735        $migration = new Doctrine_Migration($directory); +
736         +
737        return $migration->migrate($to); +
738    } +
739    /** +
740     * generateMigrationClass +
741     * +
742     * Generate new migration class skeleton +
743     * +
744     * @param string $className Name of the Migration class to generate +
745     * @param string $directory Directory which contains your migration classes +
746     * @package default +
747     */ +
748    public static function generateMigrationClass($className, $directory) +
749    { +
750        $migration = new Doctrine_Migration($directory); +
751        $next = (string) $migration->getNextVersion(); +
752         +
753        $fileName = str_repeat('0', (3 - strlen($next))) . $next . '_' . Doctrine::tableize($className) . '.class.php'; +
754        $path = $directory . DIRECTORY_SEPARATOR . $fileName; +
755         +
756        $code  = '<?php' . PHP_EOL; +
757        $code .= "// Automatically generated by Doctrine\n"; +
758        $code .= "class " . $className . " extends Doctrine_Migration\n"; +
759        $code .= "{\n"; +
760        $code .= "\tpublic function up()\n\t{ }\n\n"; +
761        $code .= "\tpublic function down()\n\t{ }\n"; +
762        $code .= "}"; +
763         +
764        file_put_contents($path, $code); +
765    } +
766    /** +
767     * exportSql +
768     * method for exporting Doctrine_Record classes to a schema +
769     * +
770     * @param string $directory +
771     */ +
772    public static function exportSql($directory = null) +
773    { +
774        return Doctrine_Manager::connection()->export->exportSql($directory); +
775    } +
776    /** +
777     * generateSqlFromModels +
778     * +
779     * Generate sql for directory of models +
780     * +
781     * @param string $directory Directory where your models exist +
782     * @return void +
783     */ +
784    public static function generateSqlFromModels($directory) +
785    { +
786        return self::exportSql($directory); +
787    } +
788    /** +
789     * compile +
790     * method for making a single file of most used doctrine runtime components +
791     * including the compiled file instead of multiple files (in worst +
792     * cases dozens of files) can improve performance by an order of magnitude +
793     * +
794     * @param string $target +
795     * +
796     * @throws Doctrine_Exception +
797     * @return void +
798     */ +
799    public static function compile($target = null) +
800    { +
801        Doctrine_Compiler::compile($target); +
802    } +
803    /** +
804     * simple autoload function +
805     * returns true if the class was loaded, otherwise false +
806     * +
807     * @param string $classname +
808     * @return boolean +
809     */ +
810    public static function autoload($classname) +
811    { +
812        if (class_exists($classname, false)) { +
813            return false; +
814        } +
815        if ( ! self::$_path) { +
816            self::$_path = dirname(__FILE__); +
817        } +
818        $class = self::$_path . DIRECTORY_SEPARATOR . str_replace('_', DIRECTORY_SEPARATOR,$classname) . '.php'; +
819 +
820        if ( ! file_exists($class)) { +
821            return false; +
822        } +
823 +
824        require_once($class); +
825 +
826        return true; +
827    } +
828    /** +
829     * dump +
830     * +
831     * dumps a given variable +
832     * +
833     * @param mixed $var        a variable of any type +
834     * @param boolean $output   whether to output the content +
835     * @return void|string +
836     */ +
837    public static function dump($var, $output = true) +
838    { +
839        $ret = array(); +
840        switch (gettype($var)) { +
841            case 'array': +
842                $ret[] = 'Array('; +
843                foreach ($var as $k => $v) { +
844                    $ret[] = $k . ' : ' . Doctrine::dump($v, false); +
845                } +
846                $ret[] = ")"; +
847                break; +
848            case 'object': +
849                $ret[] = 'Object(' . get_class($var) . ')'; +
850                break; +
851            default: +
852                $ret[] = var_export($var, true); +
853        } +
854        if ($output) { +
855            print implode("\n", $ret); +
856        } +
857        return implode("\n", $ret); +
858    } +
859    /** +
860     * returns table name from class name +
861     * +
862     * @param string $classname +
863     * @return string +
864     */ +
865    public static function tableize($classname) +
866    { +
867         return strtolower(preg_replace('~(?<=\\w)([A-Z])~', '_$1', $classname)); +
868    } +
869    /** +
870     * returns class name from table name +
871     * +
872     * @param string $tablename +
873     * @return string +
874     */ +
875    public static function classify($tablename) +
876    { +
877        return preg_replace_callback('~(_?)(_)([\w])~', array("Doctrine", "classifyCallback"), ucfirst($tablename)); +
878    } +
879 +
880    /** +
881     * Callback function to classify a classname propperly.  +
882     * +
883     * @param array $matches An array of matches from a pcre_replace call +
884     * @return string A string with matches 1 and mathces 3 in upper case.  +
885     */ +
886    public static function classifyCallback($matches) +
887    { +
888        return $matches[1] . strtoupper($matches[3]); +
889    } +
890    /** +
891     * checks for valid class name (uses camel case and underscores) +
892     * +
893     * @param string $classname +
894     * @return boolean +
895     */ +
896    public static function isValidClassname($classname) +
897    { +
898        if (preg_match('~(^[a-z])|(_[a-z])|([\W])|(_{2})~', $classname)) { +
899            return false; +
900        } +
901 +
902        return true; +
903    } +
904} +
\ No newline at end of file diff --git a/tests/coverage/Doctrine_Access.html b/tests/coverage/Doctrine_Access.html new file mode 100644 index 000000000..396bc03f2 --- /dev/null +++ b/tests/coverage/Doctrine_Access.html @@ -0,0 +1,435 @@ + + + Coverage for Doctrine_Access + + +

Coverage for Doctrine_Access

Back to coverage report

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
1<?php +
2/* +
3 *  $Id: Access.php 2753 2007-10-07 20:58:08Z zYne $ +
4 * +
5 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +
6 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +
7 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +
8 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +
9 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +
10 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +
11 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +
12 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +
13 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +
14 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +
15 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +
16 * +
17 * This software consists of voluntary contributions made by many individuals +
18 * and is licensed under the LGPL. For more information, see +
19 * <http://www.phpdoctrine.com>. +
20 */ +
21/** +
22 * Doctrine_Access +
23 * +
24 * the purpose of Doctrine_Access is to provice array access +
25 * and property overload interface for subclasses +
26 * +
27 * @package     Doctrine +
28 * @subpackage  Access +
29 * @license     http://www.opensource.org/licenses/lgpl-license.php LGPL +
30 * @link        www.phpdoctrine.com +
31 * @since       1.0 +
32 * @version     $Revision: 2753 $ +
33 * @author      Konsta Vesterinen <kvesteri@cc.hut.fi> +
34 */ +
35abstract class Doctrine_Access extends Doctrine_Locator_Injectable implements ArrayAccess +
36{ +
37    /** +
38     * setArray +
39     * +
40     * @param array $array          an array of key => value pairs +
41     * @since 1.0 +
42     * @return Doctrine_Access +
43     */ +
44    public function setArray(array $array) +
45    { +
46        foreach ($array as $k=>$v) { +
47            $this->set($k,$v); +
48        } +
49 +
50        return $this; +
51    } +
52    /** +
53     * __set        an alias of set() +
54     * +
55     * @see set, offsetSet +
56     * @param $name +
57     * @param $value +
58     * @since 1.0 +
59     * @return void +
60     */ +
61    public function __set($name,$value) +
62    { +
63        $this->set($name,$value); +
64    } +
65    /** +
66     * __get -- an alias of get() +
67     * +
68     * @see get,  offsetGet +
69     * @param mixed $name +
70     * @since 1.0 +
71     * @return mixed +
72     */ +
73    public function __get($name) +
74    { +
75        return $this->get($name); +
76    } +
77    /** +
78     * __isset() +
79     * +
80     * @param string $name +
81     * @since 1.0 +
82     * @return boolean          whether or not this object contains $name +
83     */ +
84    public function __isset($name) +
85    { +
86        return $this->contains($name); +
87    } +
88    /** +
89     * __unset() +
90     * +
91     * @param string $name +
92     * @since 1.0 +
93     * @return void +
94     */ +
95    public function __unset($name) +
96    { +
97        return $this->remove($name); +
98    } +
99    /** +
100     * @param mixed $offset +
101     * @return boolean          whether or not this object contains $offset +
102     */ +
103    public function offsetExists($offset) +
104    { +
105        return $this->contains($offset); +
106    } +
107    /** +
108     * offsetGet    an alias of get() +
109     * @see get,  __get +
110     * @param mixed $offset +
111     * @return mixed +
112     */ +
113    public function offsetGet($offset) +
114    { +
115        return $this->get($offset); +
116    } +
117    /** +
118     * sets $offset to $value +
119     * @see set,  __set +
120     * @param mixed $offset +
121     * @param mixed $value +
122     * @return void +
123     */ +
124    public function offsetSet($offset, $value) +
125    { +
126        if ( ! isset($offset)) { +
127            $this->add($value); +
128        } else { +
129            $this->set($offset, $value); +
130        } +
131    } +
132    /** +
133     * unset a given offset +
134     * @see set, offsetSet, __set +
135     * @param mixed $offset +
136     */ +
137    public function offsetUnset($offset) +
138    { +
139        return $this->remove($offset); +
140    } +
141} +
\ No newline at end of file diff --git a/tests/coverage/Doctrine_Adapter_Mock.html b/tests/coverage/Doctrine_Adapter_Mock.html new file mode 100644 index 000000000..e7a73a9c0 --- /dev/null +++ b/tests/coverage/Doctrine_Adapter_Mock.html @@ -0,0 +1,495 @@ + + + Coverage for Doctrine_Adapter_Mock + + +

Coverage for Doctrine_Adapter_Mock

Back to coverage report

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
1<?php +
2/* +
3 *  $Id: Mock.php 2702 2007-10-03 21:43:22Z Jonathan.Wage $ +
4 * +
5 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +
6 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +
7 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +
8 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +
9 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +
10 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +
11 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +
12 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +
13 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +
14 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +
15 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +
16 * +
17 * This software consists of voluntary contributions made by many individuals +
18 * and is licensed under the LGPL. For more information, see +
19 * <http://www.phpdoctrine.com>. +
20 */ +
21/** +
22 * Doctrine_Adapter_Mock +
23 * This class is used for special testing purposes. +
24 * +
25 * @package     Doctrine +
26 * @subpackage  Adapter +
27 * @author      Konsta Vesterinen <kvesteri@cc.hut.fi> +
28 * @license     http://www.opensource.org/licenses/lgpl-license.php LGPL +
29 * @link        www.phpdoctrine.com +
30 * @since       1.0 +
31 * @version     $Revision: 2702 $ +
32 */ +
33class Doctrine_Adapter_Mock implements Doctrine_Adapter_Interface, Countable +
34{ +
35    private $name; +
36     +
37    private $queries = array(); +
38     +
39    private $exception = array(); +
40     +
41    private $lastInsertIdFail = false; +
42 +
43    public function __construct($name = null)  +
44    { +
45        $this->name = $name; +
46    } +
47    public function getName()  +
48    { +
49        return $this->name; +
50    } +
51    public function pop()  +
52    { +
53        return array_pop($this->queries); +
54    } +
55    public function forceException($name, $message = '', $code = 0)  +
56    { +
57        $this->exception = array($name, $message, $code); +
58    } +
59    public function prepare($query) +
60    { +
61        $mock = new Doctrine_Adapter_Statement_Mock($this, $query); +
62        $mock->queryString = $query; +
63         +
64        return $mock; +
65    } +
66    public function addQuery($query) +
67    { +
68        $this->queries[] = $query; +
69    } +
70    public function query($query)  +
71    { +
72        $this->queries[] = $query; +
73 +
74        $e    = $this->exception; +
75 +
76        if ( ! empty($e)) { +
77            $name = $e[0]; +
78 +
79            $this->exception = array(); +
80 +
81            throw new $name($e[1], $e[2]); +
82        } +
83 +
84        $stmt = new Doctrine_Adapter_Statement_Mock($this, $query); +
85        $stmt->queryString = $query; +
86         +
87        return $stmt; +
88    } +
89    public function getAll()  +
90    { +
91        return $this->queries; +
92    } +
93    public function quote($input)  +
94    { +
95        return "'" . addslashes($input) . "'"; +
96    } +
97    public function exec($statement)  +
98    { +
99        $this->queries[] = $statement; +
100 +
101        $e    = $this->exception; +
102 +
103        if ( ! empty($e)) { +
104            $name = $e[0]; +
105 +
106            $this->exception = array(); +
107 +
108            throw new $name($e[1], $e[2]); +
109        } +
110 +
111        return 0; +
112    } +
113    public function forceLastInsertIdFail($fail = true)  +
114    { +
115        if ($fail) { +
116            $this->lastInsertIdFail = true; +
117        } else { +
118            $this->lastInsertIdFail = false; +
119        } +
120    } +
121    public function lastInsertId() +
122    { +
123        $this->queries[] = 'LAST_INSERT_ID()'; +
124        if ($this->lastInsertIdFail) { +
125            return null; +
126        } else { +
127            return 1; +
128        } +
129    } +
130    public function count()  +
131    { +
132        return count($this->queries);     +
133    } +
134    public function beginTransaction() +
135    { +
136        $this->queries[] = 'BEGIN TRANSACTION'; +
137    } +
138    public function commit() +
139    { +
140        $this->queries[] = 'COMMIT'; +
141    } +
142    public function rollBack()  +
143    { +
144        $this->queries[] = 'ROLLBACK'; +
145    } +
146    public function errorCode()  +
147    { } +
148    public function errorInfo() +
149    { } +
150    public function getAttribute($attribute)  +
151    { +
152        if ($attribute == Doctrine::ATTR_DRIVER_NAME) +
153            return strtolower($this->name); +
154    } +
155    public function setAttribute($attribute, $value)  +
156    { +
157                                        +
158    } +
159    public function sqliteCreateFunction() +
160    { } +
161} +
\ No newline at end of file diff --git a/tests/coverage/Doctrine_Adapter_Statement_Mock.html b/tests/coverage/Doctrine_Adapter_Statement_Mock.html new file mode 100644 index 000000000..952347a59 --- /dev/null +++ b/tests/coverage/Doctrine_Adapter_Statement_Mock.html @@ -0,0 +1,1011 @@ + + + Coverage for Doctrine_Adapter_Statement_Mock + + +

Coverage for Doctrine_Adapter_Statement_Mock

Back to coverage report

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
1<?php +
2/* +
3 *  $Id: Mock.php 2786 2007-10-09 13:24:31Z pookey $ +
4 * +
5 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +
6 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +
7 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +
8 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +
9 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +
10 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +
11 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +
12 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +
13 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +
14 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +
15 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +
16 * +
17 * This software consists of voluntary contributions made by many individuals +
18 * and is licensed under the LGPL. For more information, see +
19 * <http://www.phpdoctrine.com>. +
20 */ +
21/** +
22 * Doctrine_Adapter_Statement_Mock +
23 * This class is used for special testing purposes. +
24 * +
25 * @package     Doctrine +
26 * @subpackage  Adapter +
27 * @author      Konsta Vesterinen <kvesteri@cc.hut.fi> +
28 * @license     http://www.opensource.org/licenses/lgpl-license.php LGPL +
29 * @link        www.phpdoctrine.com +
30 * @since       1.0 +
31 * @version     $Revision: 2786 $ +
32 */ +
33class Doctrine_Adapter_Statement_Mock implements Doctrine_Adapter_Statement_Interface +
34{ +
35    private $mock; +
36     +
37    public $queryString; +
38 +
39    public function __construct($mock) +
40    { +
41        $this->mock  = $mock; +
42    } +
43    /** +
44     * bindColumn +
45     * Bind a column to a PHP variable +
46     * +
47     * @param mixed $column         Number of the column (1-indexed) or name of the column in the result set. +
48     *                              If using the column name, be aware that the name should match +
49     *                              the case of the column, as returned by the driver. +
50     * @param string $param         Name of the PHP variable to which the column will be bound. +
51     * @param integer $type         Data type of the parameter, specified by the Doctrine::PARAM_* constants. +
52     * @return boolean              Returns TRUE on success or FALSE on failure +
53     */ +
54    public function bindColumn($column, $param, $type = null) +
55    { +
56         +
57    } +
58    /** +
59     * bindValue +
60     * Binds a value to a corresponding named or question mark  +
61     * placeholder in the SQL statement that was use to prepare the statement. +
62     * +
63     * @param mixed $param          Parameter identifier. For a prepared statement using named placeholders, +
64     *                              this will be a parameter name of the form :name. For a prepared statement +
65     *                              using question mark placeholders, this will be the 1-indexed position of the parameter +
66     * +
67     * @param mixed $value          The value to bind to the parameter. +
68     * @param integer $type         Explicit data type for the parameter using the Doctrine::PARAM_* constants. +
69     * +
70     * @return boolean              Returns TRUE on success or FALSE on failure. +
71     */ +
72    public function bindValue($param, $value, $type = null) +
73    { +
74         +
75    } +
76    /** +
77     * bindParam +
78     * Binds a PHP variable to a corresponding named or question mark placeholder in the  +
79     * SQL statement that was use to prepare the statement. Unlike Doctrine_Adapter_Statement_Interface->bindValue(), +
80     * the variable is bound as a reference and will only be evaluated at the time  +
81     * that Doctrine_Adapter_Statement_Interface->execute() is called. +
82     * +
83     * Most parameters are input parameters, that is, parameters that are  +
84     * used in a read-only fashion to build up the query. Some drivers support the invocation  +
85     * of stored procedures that return data as output parameters, and some also as input/output +
86     * parameters that both send in data and are updated to receive it. +
87     * +
88     * @param mixed $param          Parameter identifier. For a prepared statement using named placeholders, +
89     *                              this will be a parameter name of the form :name. For a prepared statement +
90     *                              using question mark placeholders, this will be the 1-indexed position of the parameter +
91     * +
92     * @param mixed $variable       Name of the PHP variable to bind to the SQL statement parameter. +
93     * +
94     * @param integer $type         Explicit data type for the parameter using the Doctrine::PARAM_* constants. To return +
95     *                              an INOUT parameter from a stored procedure, use the bitwise OR operator to set the +
96     *                              Doctrine::PARAM_INPUT_OUTPUT bits for the data_type parameter. +
97     * +
98     * @param integer $length       Length of the data type. To indicate that a parameter is an OUT parameter +
99     *                              from a stored procedure, you must explicitly set the length. +
100     * @param mixed $driverOptions +
101     * @return boolean              Returns TRUE on success or FALSE on failure. +
102     */ +
103    public function bindParam($column, &$variable, $type = null, $length = null, $driverOptions = array()) +
104    { +
105         +
106    } +
107    /** +
108     * closeCursor +
109     * Closes the cursor, enabling the statement to be executed again. +
110     * +
111     * @return boolean              Returns TRUE on success or FALSE on failure. +
112     */ +
113    public function closeCursor() +
114    { +
115        return true; +
116    } +
117    /**  +
118     * columnCount +
119     * Returns the number of columns in the result set  +
120     * +
121     * @return integer              Returns the number of columns in the result set represented +
122     *                              by the Doctrine_Adapter_Statement_Interface object. If there is no result set, +
123     *                              this method should return 0. +
124     */ +
125    public function columnCount() +
126    { +
127        return 0;         +
128    } +
129    /** +
130     * errorCode +
131     * Fetch the SQLSTATE associated with the last operation on the statement handle  +
132     * +
133     * @see Doctrine_Adapter_Interface::errorCode() +
134     * @return string       error code string +
135     */ +
136    public function errorCode() +
137    { +
138        return array(); +
139    } +
140    /** +
141     * errorInfo +
142     * Fetch extended error information associated with the last operation on the statement handle +
143     * +
144     * @see Doctrine_Adapter_Interface::errorInfo() +
145     * @return array        error info array +
146     */ +
147    public function errorInfo() +
148    {  +
149        return array(); +
150    } +
151    /** +
152     * fetch +
153     * +
154     * @see Doctrine::FETCH_* constants +
155     * @param integer $fetchStyle           Controls how the next row will be returned to the caller. +
156     *                                      This value must be one of the Doctrine::FETCH_* constants, +
157     *                                      defaulting to Doctrine::FETCH_BOTH +
158     * +
159     * @param integer $cursorOrientation    For a PDOStatement object representing a scrollable cursor,  +
160     *                                      this value determines which row will be returned to the caller.  +
161     *                                      This value must be one of the Doctrine::FETCH_ORI_* constants, defaulting to +
162     *                                      Doctrine::FETCH_ORI_NEXT. To request a scrollable cursor for your  +
163     *                                      Doctrine_Adapter_Statement_Interface object, +
164     *                                      you must set the Doctrine::ATTR_CURSOR attribute to Doctrine::CURSOR_SCROLL when you +
165     *                                      prepare the SQL statement with Doctrine_Adapter_Interface->prepare(). +
166     * +
167     * @param integer $cursorOffset         For a Doctrine_Adapter_Statement_Interface object representing a scrollable cursor for which the +
168     *                                      $cursorOrientation parameter is set to Doctrine::FETCH_ORI_ABS, this value specifies +
169     *                                      the absolute number of the row in the result set that shall be fetched. +
170     *                                       +
171     *                                      For a Doctrine_Adapter_Statement_Interface object representing a scrollable cursor for  +
172     *                                      which the $cursorOrientation parameter is set to Doctrine::FETCH_ORI_REL, this value  +
173     *                                      specifies the row to fetch relative to the cursor position before  +
174     *                                      Doctrine_Adapter_Statement_Interface->fetch() was called. +
175     * +
176     * @return mixed +
177     */ +
178    public function fetch($fetchStyle = Doctrine::FETCH_BOTH, +
179                          $cursorOrientation = Doctrine::FETCH_ORI_NEXT, +
180                          $cursorOffset = null) +
181    { +
182        return array(); +
183    } +
184    /** +
185     * fetchAll +
186     * Returns an array containing all of the result set rows +
187     * +
188     * @param integer $fetchStyle           Controls how the next row will be returned to the caller. +
189     *                                      This value must be one of the Doctrine::FETCH_* constants, +
190     *                                      defaulting to Doctrine::FETCH_BOTH +
191     * +
192     * @param integer $columnIndex          Returns the indicated 0-indexed column when the value of $fetchStyle is +
193     *                                      Doctrine::FETCH_COLUMN. Defaults to 0. +
194     * +
195     * @return array +
196     */ +
197    public function fetchAll($fetchMode = Doctrine::FETCH_BOTH) +
198    { +
199        return array(); +
200    } +
201    /** +
202     * execute +
203     * Executes a prepared statement +
204     * +
205     * If the prepared statement included parameter markers, you must either: +
206     * call PDOStatement->bindParam() to bind PHP variables to the parameter markers: +
207     * bound variables pass their value as input and receive the output value, +
208     * if any, of their associated parameter markers or pass an array of input-only +
209     * parameter values +
210     * +
211     * +
212     * @param array $params             An array of values with as many elements as there are +
213     *                                  bound parameters in the SQL statement being executed. +
214     * @return boolean                  Returns TRUE on success or FALSE on failure. +
215     */ +
216    public function execute($params = null) +
217    { +
218        if (is_object($this->mock)) { +
219            $this->mock->addQuery($this->queryString); +
220        } +
221        return true; +
222    } +
223    /** +
224     * fetchColumn +
225     * Returns a single column from the next row of a +
226     * result set or FALSE if there are no more rows. +
227     * +
228     * @param integer $columnIndex          0-indexed number of the column you wish to retrieve from the row. If no  +
229     *                                      value is supplied, Doctrine_Adapter_Statement_Interface->fetchColumn()  +
230     *                                      fetches the first column. +
231     * +
232     * @return string                       returns a single column in the next row of a result set. +
233     */ +
234    public function fetchColumn($columnIndex = 0) +
235    { +
236        return 0; +
237    } +
238    /** +
239     * fetchObject +
240     * Fetches the next row and returns it as an object. +
241     * +
242     * Fetches the next row and returns it as an object. This function is an alternative to  +
243     * Doctrine_Adapter_Statement_Interface->fetch() with Doctrine::FETCH_CLASS or Doctrine::FETCH_OBJ style. +
244     * +
245     * @param string $className             Name of the created class, defaults to stdClass.  +
246     * @param array $args                   Elements of this array are passed to the constructor. +
247     * +
248     * @return mixed                        an instance of the required class with property names that correspond  +
249     *                                      to the column names or FALSE in case of an error. +
250     */ +
251    public function fetchObject($className = 'stdClass', $args = array())  +
252    { +
253        return new $className(); +
254    } +
255    /** +
256     * nextRowset +
257     * Advances to the next rowset in a multi-rowset statement handle +
258     *  +
259     * Some database servers support stored procedures that return more than one rowset  +
260     * (also known as a result set). The nextRowset() method enables you to access the second  +
261     * and subsequent rowsets associated with a PDOStatement object. Each rowset can have a  +
262     * different set of columns from the preceding rowset. +
263     * +
264     * @return boolean                      Returns TRUE on success or FALSE on failure. +
265     */ +
266    public function nextRowset() +
267    { +
268        return true; +
269    } +
270    /** +
271     * rowCount +
272     * rowCount() returns the number of rows affected by the last DELETE, INSERT, or UPDATE statement  +
273     * executed by the corresponding object. +
274     * +
275     * If the last SQL statement executed by the associated Statement object was a SELECT statement,  +
276     * some databases may return the number of rows returned by that statement. However,  +
277     * this behaviour is not guaranteed for all databases and should not be  +
278     * relied on for portable applications. +
279     * +
280     * @return integer                      Returns the number of rows. +
281     */ +
282    public function rowCount() +
283    {  +
284        return 0; +
285    } +
286    /** +
287     * getColumnMeta +
288     * Returns metadata for a column in a result set +
289     * +
290     * @param integer $column               The 0-indexed column in the result set. +
291     * +
292     * @return array                        Associative meta data array with the following structure: +
293     * +
294     *          native_type                 The PHP native type used to represent the column value. +
295     *          driver:decl_                type The SQL type used to represent the column value in the database. If the column in the result set is the result of a function, this value is not returned by PDOStatement->getColumnMeta(). +
296     *          flags                       Any flags set for this column. +
297     *          name                        The name of this column as returned by the database. +
298     *          len                         The length of this column. Normally -1 for types other than floating point decimals. +
299     *          precision                   The numeric precision of this column. Normally 0 for types other than floating point decimals. +
300     *          pdo_type                    The type of this column as represented by the PDO::PARAM_* constants. +
301     */ +
302    public function getColumnMeta($column) +
303    { } +
304    /** +
305     * getAttribute +
306     * Retrieve a statement attribute  +
307     * +
308     * @param integer $attribute +
309     * @see Doctrine::ATTR_* constants +
310     * @return mixed                        the attribute value +
311     */ +
312    public function getAttribute($attribute) +
313    { } +
314    /** +
315     * setAttribute +
316     * Set a statement attribute +
317     * +
318     * @param integer $attribute +
319     * @param mixed $value                  the value of given attribute +
320     * @return boolean                      Returns TRUE on success or FALSE on failure. +
321     */ +
322    public function setAttribute($attribute, $value) +
323    { } +
324    /** +
325     * setFetchMode +
326     * Set the default fetch mode for this statement +
327     * +
328     * @param integer $mode                 The fetch mode must be one of the Doctrine::FETCH_* constants. +
329     * @return boolean                      Returns 1 on success or FALSE on failure. +
330     */ +
331    public function setFetchMode($mode, $arg1 = null, $arg2 = null) +
332    { } +
333} +
\ No newline at end of file diff --git a/tests/coverage/Doctrine_AuditLog.html b/tests/coverage/Doctrine_AuditLog.html new file mode 100644 index 000000000..72652b43e --- /dev/null +++ b/tests/coverage/Doctrine_AuditLog.html @@ -0,0 +1,345 @@ + + + Coverage for Doctrine_AuditLog + + +

Coverage for Doctrine_AuditLog

Back to coverage report

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
1<?php +
2/* +
3 *  $Id$ +
4 * +
5 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +
6 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +
7 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +
8 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +
9 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +
10 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +
11 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +
12 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +
13 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +
14 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +
15 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +
16 * +
17 * This software consists of voluntary contributions made by many individuals +
18 * and is licensed under the LGPL. For more information, see +
19 * <http://www.phpdoctrine.com>. +
20 */ +
21/** +
22 * Doctrine_AuditLog +
23 * +
24 * @package     Doctrine +
25 * @subpackage  AuditLog +
26 * @license     http://www.opensource.org/licenses/lgpl-license.php LGPL +
27 * @link        www.phpdoctrine.com +
28 * @since       1.0 +
29 * @version     $Revision$ +
30 * @author      Konsta Vesterinen <kvesteri@cc.hut.fi> +
31 */ +
32class Doctrine_AuditLog extends Doctrine_Plugin +
33{ +
34    protected $_options = array( +
35                            'className'     => '%CLASS%Version', +
36                            'versionColumn' => 'version', +
37                            'generateFiles' => false, +
38                            'table'         => false, +
39                            'pluginTable'   => false, +
40                            ); +
41 +
42    protected $_auditTable; +
43 +
44    public function __construct($options) +
45    { +
46        $this->_options = array_merge($this->_options, $options); +
47    } +
48 +
49    public function getVersion(Doctrine_Record $record, $version) +
50    {            +
51        $className = $this->_options['className']; +
52 +
53        $q = new Doctrine_Query(); +
54 +
55        $values = array(); +
56        foreach ((array) $this->_options['table']->getIdentifier() as $id) { +
57            $conditions[] = $className . '.' . $id . ' = ?'; +
58            $values[] = $record->get($id); +
59        } +
60        $where = implode(' AND ', $conditions) . ' AND ' . $className . '.' . $this->_options['versionColumn'] . ' = ?'; +
61         +
62        $values[] = $version; +
63 +
64        $q->from($className) +
65          ->where($where); +
66 +
67        return $q->execute($values, Doctrine::HYDRATE_ARRAY); +
68    } +
69    public function buildDefinition(Doctrine_Table $table) +
70    { +
71        $this->_options['className'] = str_replace('%CLASS%',  +
72                                                   $this->_options['table']->getComponentName(), +
73                                                   $this->_options['className']); +
74 +
75        $name = $table->getComponentName(); +
76 +
77        $className = $name . 'Version'; +
78 +
79        // check that class doesn't exist (otherwise we cannot create it) +
80        if (class_exists($className)) { +
81            return false; +
82        } +
83 +
84        $columns = $table->getColumns(); +
85 +
86        // remove all sequence, autoincrement and unique constraint definitions +
87        foreach ($columns as $column => $definition) { +
88            unset($columns[$column]['autoincrement']); +
89            unset($columns[$column]['sequence']); +
90            unset($columns[$column]['unique']); +
91        } +
92 +
93        // the version column should be part of the primary key definition +
94        $columns[$this->_options['versionColumn']]['primary'] = true; +
95 +
96        $id = $table->getIdentifier(); +
97 +
98        $options = array('className' => $className); +
99         +
100        $relations = array($name => array('local' => $local, +
101                                          'foreign' => $id,  +
102                                          'onDelete' => 'CASCADE', +
103                                          'onUpdate' => 'CASCADE'));                                            +
104 +
105        $this->generateClass($options, $columns, array()); +
106         +
107        $this->_options['pluginTable'] = $table->getConnection()->getTable($this->_options['className']); +
108 +
109        return true; +
110    } +
111} +
\ No newline at end of file diff --git a/tests/coverage/Doctrine_AuditLog_Listener.html b/tests/coverage/Doctrine_AuditLog_Listener.html new file mode 100644 index 000000000..6142e87ad --- /dev/null +++ b/tests/coverage/Doctrine_AuditLog_Listener.html @@ -0,0 +1,273 @@ + + + Coverage for Doctrine_AuditLog_Listener + + +

Coverage for Doctrine_AuditLog_Listener

Back to coverage report

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
1<?php +
2/* +
3 *  $Id$ +
4 * +
5 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +
6 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +
7 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +
8 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +
9 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +
10 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +
11 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +
12 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +
13 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +
14 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +
15 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +
16 * +
17 * This software consists of voluntary contributions made by many individuals +
18 * and is licensed under the LGPL. For more information, see +
19 * <http://www.phpdoctrine.com>. +
20 */ +
21Doctrine::autoload('Doctrine_Record_Listener'); +
22/** +
23 * Doctrine_AuditLog_Listener +
24 * +
25 * @package     Doctrine +
26 * @subpackage  AuditLog +
27 * @license     http://www.opensource.org/licenses/lgpl-license.php LGPL +
28 * @link        www.phpdoctrine.com +
29 * @since       1.0 +
30 * @version     $Revision$ +
31 * @author      Konsta Vesterinen <kvesteri@cc.hut.fi> +
32 */ +
33class Doctrine_AuditLog_Listener extends Doctrine_Record_Listener +
34{ +
35     +
36    protected $_auditLog; +
37 +
38    public function __construct(Doctrine_AuditLog $auditLog) { +
39        $this->_auditLog = $auditLog; +
40    } +
41    public function preInsert(Doctrine_Event $event) +
42    { +
43        $versionColumn = $this->_auditLog->getOption('versionColumn'); +
44 +
45        $event->getInvoker()->set($versionColumn, 1); +
46    } +
47    public function postInsert(Doctrine_Event $event)  +
48    { +
49        $class = $this->_auditLog->getOption('className'); +
50 +
51        $record  = $event->getInvoker(); +
52 +
53        $version = new $class(); +
54        $version->merge($record->toArray()); +
55        $version->save(); +
56    } +
57    public function preDelete(Doctrine_Event $event) +
58    { +
59        $class = $this->_auditLog->getOption('className'); +
60 +
61        $record  = $event->getInvoker(); +
62 +
63        $versionColumn = $this->_auditLog->getOption('versionColumn'); +
64        $version = $record->get($versionColumn); +
65 +
66        $record->set($versionColumn, ++$version); +
67 +
68        $version = new $class(); +
69        $version->merge($record->toArray()); +
70        $version->save(); +
71    } +
72    public function preUpdate(Doctrine_Event $event) +
73    { +
74        $class  = $this->_auditLog->getOption('className'); +
75        $record = $event->getInvoker();  +
76 +
77        $versionColumn = $this->_auditLog->getOption('versionColumn'); +
78 +
79        $version = $record->get($versionColumn); +
80 +
81        $record->set($versionColumn, ++$version); +
82         +
83        $version = new $class(); +
84        $version->merge($record->toArray()); +
85        $version->save(); +
86    } +
87} +
\ No newline at end of file diff --git a/tests/coverage/Doctrine_Cache_Array.html b/tests/coverage/Doctrine_Cache_Array.html new file mode 100644 index 000000000..6a69ad7a7 --- /dev/null +++ b/tests/coverage/Doctrine_Cache_Array.html @@ -0,0 +1,336 @@ + + + Coverage for Doctrine_Cache_Array + + +

Coverage for Doctrine_Cache_Array

Back to coverage report

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
1<?php +
2/* +
3 *  $Id: Array.php 2702 2007-10-03 21:43:22Z Jonathan.Wage $ +
4 * +
5 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +
6 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +
7 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +
8 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +
9 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +
10 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +
11 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +
12 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +
13 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +
14 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +
15 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +
16 * +
17 * This software consists of voluntary contributions made by many individuals +
18 * and is licensed under the LGPL. For more information, see +
19 * <http://www.phpdoctrine.com>. +
20 */ +
21 +
22/** +
23 * Doctrine_Cache_Interface +
24 * +
25 * @package     Doctrine +
26 * @subpackage  Cache +
27 * @license     http://www.opensource.org/licenses/lgpl-license.php LGPL +
28 * @link        www.phpdoctrine.com +
29 * @since       1.0 +
30 * @version     $Revision: 2702 $ +
31 * @author      Konsta Vesterinen <kvesteri@cc.hut.fi> +
32 */ +
33class Doctrine_Cache_Array implements Countable, Doctrine_Cache_Interface +
34{ +
35    /** +
36     * @var array $data         an array of cached data +
37     */ +
38    protected $data; +
39 +
40    /** +
41     * Test if a cache is available for the given id and (if yes) return it (false else) +
42     *  +
43     * Note : return value is always "string" (unserialization is done by the core not by the backend) +
44     *  +
45     * @param string $id cache id +
46     * @param boolean $testCacheValidity        if set to false, the cache validity won't be tested +
47     * @return string cached datas (or false) +
48     */ +
49    public function fetch($id, $testCacheValidity = true)  +
50    { +
51        if (isset($this->data[$id])) { +
52            return $this->data[$id]; +
53        } +
54        return false; +
55    } +
56    /** +
57     * Test if a cache is available or not (for the given id) +
58     * +
59     * @param string $id cache id +
60     * @return mixed false (a cache is not available) or "last modified" timestamp (int) of the available cache record +
61     */ +
62    public function contains($id) +
63    { +
64        return isset($this->data[$id]); +
65    } +
66    /** +
67     * Save some string datas into a cache record +
68     * +
69     * Note : $data is always saved as a string +
70     * +
71     * @param string $data      data to cache +
72     * @param string $id        cache id +
73     * @param int $lifeTime     if != false, set a specific lifetime for this cache record (null => infinite lifeTime) +
74     * @return boolean true if no problem +
75     */ +
76    public function save($id, $data, $lifeTime = false) +
77    { +
78        $this->data[$id] = $data; +
79    } +
80    /** +
81     * Remove a cache record +
82     *  +
83     * @param string $id cache id +
84     * @return boolean true if no problem +
85     */ +
86    public function delete($id) +
87    { +
88        unset($this->data[$id]); +
89    } +
90    /** +
91     * Remove all cache record +
92     *  +
93     * @return boolean true if no problem +
94     */ +
95    public function deleteAll() +
96    { +
97        $this->data = array(); +
98    } +
99    /** +
100     * count +
101     * +
102     * @return integer +
103     */ +
104    public function count()  +
105    { +
106        return count($this->data); +
107    } +
108} +
\ No newline at end of file diff --git a/tests/coverage/Doctrine_Collection.html b/tests/coverage/Doctrine_Collection.html new file mode 100644 index 000000000..3fdaf254d --- /dev/null +++ b/tests/coverage/Doctrine_Collection.html @@ -0,0 +1,2196 @@ + + + Coverage for Doctrine_Collection + + +

Coverage for Doctrine_Collection

Back to coverage report

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
1<?php +
2/* +
3 *  $Id: Collection.php 2761 2007-10-07 23:42:29Z zYne $ +
4 * +
5 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +
6 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +
7 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +
8 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +
9 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +
10 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +
11 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +
12 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +
13 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +
14 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +
15 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +
16 * +
17 * This software consists of voluntary contributions made by many individuals +
18 * and is licensed under the LGPL. For more information, see +
19 * <http://www.phpdoctrine.com>. +
20 */ +
21Doctrine::autoload('Doctrine_Access'); +
22/** +
23 * Doctrine_Collection +
24 * Collection of Doctrine_Record objects. +
25 * +
26 * @package     Doctrine +
27 * @subpackage  Collection +
28 * @license     http://www.opensource.org/licenses/lgpl-license.php LGPL +
29 * @link        www.phpdoctrine.com +
30 * @since       1.0 +
31 * @version     $Revision: 2761 $ +
32 * @author      Konsta Vesterinen <kvesteri@cc.hut.fi> +
33 */ +
34class Doctrine_Collection extends Doctrine_Access implements Countable, IteratorAggregate, Serializable +
35{ +
36    /** +
37     * @var array $data                     an array containing the records of this collection +
38     */ +
39    protected $data = array(); +
40    /** +
41     * @var Doctrine_Table $table           each collection has only records of specified table +
42     */ +
43    protected $_table; +
44    /** +
45     * @var array $_snapshot                a snapshot of the fetched data +
46     */ +
47    protected $_snapshot = array(); +
48    /** +
49     * @var Doctrine_Record $reference      collection can belong to a record +
50     */ +
51    protected $reference; +
52    /** +
53     * @var string $referenceField         the reference field of the collection +
54     */ +
55    protected $referenceField; +
56    /** +
57     * @var Doctrine_Relation               the record this collection is related to, if any +
58     */ +
59    protected $relation; +
60    /** +
61     * @var string $keyColumn               the name of the column that is used for collection key mapping +
62     */ +
63    protected $keyColumn; +
64    /** +
65     * @var Doctrine_Null $null             used for extremely fast null value testing +
66     */ +
67    protected static $null; +
68 +
69 +
70    /** +
71     * constructor +
72     * +
73     * @param Doctrine_Table|string $table +
74     */ +
75    public function __construct($table, $keyColumn = null) +
76    { +
77        if ( ! ($table instanceof Doctrine_Table)) { +
78            $table = Doctrine_Manager::getInstance() +
79                        ->getTable($table); +
80        } +
81        $this->_table = $table; +
82 +
83        if ($keyColumn === null) { +
84            $keyColumn = $table->getBoundQueryPart('indexBy'); +
85        } +
86 +
87        if ($keyColumn !== null) { +
88            $this->keyColumn = $keyColumn; +
89        } +
90    } +
91    /** +
92     * initNullObject +
93     * initializes the null object for this collection +
94     * +
95     * @return void +
96     */ +
97    public static function initNullObject(Doctrine_Null $null) +
98    { +
99        self::$null = $null; +
100    } +
101    /** +
102     * getTable +
103     * returns the table this collection belongs to +
104     * +
105     * @return Doctrine_Table +
106     */ +
107    public function getTable() +
108    { +
109        return $this->_table; +
110    } +
111    /** +
112     * setData +
113     * +
114     * @param array $data +
115     * @return Doctrine_Collection +
116     */ +
117    public function setData(array $data)  +
118    { +
119        $this->data = $data; +
120    } +
121    /** +
122     * this method is automatically called when this Doctrine_Collection is serialized +
123     * +
124     * @return array +
125     */ +
126    public function serialize() +
127    { +
128        $vars = get_object_vars($this); +
129 +
130        unset($vars['reference']); +
131        unset($vars['reference_field']); +
132        unset($vars['relation']); +
133        unset($vars['expandable']); +
134        unset($vars['expanded']); +
135        unset($vars['generator']); +
136 +
137        $vars['_table'] = $vars['_table']->getComponentName(); +
138 +
139        return serialize($vars); +
140    } +
141    /** +
142     * unseralize +
143     * this method is automatically called everytime a Doctrine_Collection object is unserialized +
144     * +
145     * @return void +
146     */ +
147    public function unserialize($serialized) +
148    { +
149        $manager    = Doctrine_Manager::getInstance(); +
150        $connection    = $manager->getCurrentConnection(); +
151 +
152        $array = unserialize($serialized); +
153 +
154        foreach ($array as $name => $values) { +
155            $this->$name = $values; +
156        } +
157 +
158        $this->_table = $connection->getTable($this->_table); +
159 +
160        if ($keyColumn === null) { +
161            $keyColumn = $this->_table->getBoundQueryPart('indexBy'); +
162        } +
163 +
164        if ($keyColumn !== null) { +
165            $this->keyColumn = $keyColumn; +
166        } +
167    } +
168    /** +
169     * setKeyColumn +
170     * sets the key column for this collection +
171     * +
172     * @param string $column +
173     * @return Doctrine_Collection +
174     */ +
175    public function setKeyColumn($column) +
176    { +
177        $this->keyColumn = $column; +
178         +
179        return $this; +
180    } +
181    /** +
182     * getKeyColumn +
183     * returns the name of the key column +
184     * +
185     * @return string +
186     */ +
187    public function getKeyColumn() +
188    { +
189        return $this->column; +
190    } +
191    /** +
192     * getData +
193     * returns all the records as an array +
194     * +
195     * @return array +
196     */ +
197    public function getData() +
198    { +
199        return $this->data; +
200    } +
201    /** +
202     * getFirst +
203     * returns the first record in the collection +
204     * +
205     * @return mixed +
206     */ +
207    public function getFirst() +
208    { +
209        return reset($this->data); +
210    } +
211    /** +
212     * getLast +
213     * returns the last record in the collection +
214     * +
215     * @return mixed +
216     */ +
217    public function getLast() +
218    { +
219        return end($this->data); +
220    } +
221    /** +
222     * setReference +
223     * sets a reference pointer +
224     * +
225     * @return void +
226     */ +
227    public function setReference(Doctrine_Record $record, Doctrine_Relation $relation) +
228    { +
229        $this->reference       = $record; +
230        $this->relation        = $relation; +
231 +
232        if ($relation instanceof Doctrine_Relation_ForeignKey ||  +
233            $relation instanceof Doctrine_Relation_LocalKey) { +
234 +
235            $this->referenceField = $relation->getForeign(); +
236 +
237            $value = $record->get($relation->getLocal()); +
238 +
239            foreach ($this->data as $record) { +
240                if ($value !== null) { +
241                    $record->set($this->referenceField, $value, false); +
242                } else { +
243                    $record->set($this->referenceField, $this->reference, false); +
244                } +
245            } +
246        } elseif ($relation instanceof Doctrine_Relation_Association) { +
247 +
248        } +
249    } +
250    /** +
251     * getReference +
252     * +
253     * @return mixed +
254     */ +
255    public function getReference() +
256    { +
257        return $this->reference; +
258    } +
259    /** +
260     * remove +
261     * removes a specified collection element +
262     * +
263     * @param mixed $key +
264     * @return boolean +
265     */ +
266    public function remove($key) +
267    { +
268        $removed = $this->data[$key]; +
269 +
270        unset($this->data[$key]); +
271        return $removed; +
272    } +
273    /** +
274     * contains +
275     * whether or not this collection contains a specified element +
276     * +
277     * @param mixed $key                    the key of the element +
278     * @return boolean +
279     */ +
280    public function contains($key) +
281    { +
282        return isset($this->data[$key]); +
283    } +
284    public function search(Doctrine_Record $record) +
285    { +
286        return array_search($record, $this->data, true); +
287    } +
288    /** +
289     * get +
290     * returns a record for given key +
291     * +
292     * There are two special cases: +
293     * +
294     * 1. if null is given as a key a new record is created and attached +
295     * at the end of the collection +
296     * +
297     * 2. if given key does not exist, then a new record is create and attached +
298     * to the given key +
299     * +
300     * Collection also maps referential information to newly created records +
301     * +
302     * @param mixed $key                    the key of the element +
303     * @return Doctrine_Record              return a specified record +
304     */ +
305    public function get($key) +
306    { +
307        if ( ! isset($this->data[$key])) { +
308            $record = $this->_table->create(); +
309 +
310            if (isset($this->referenceField)) { +
311                $value = $this->reference->get($this->relation->getLocal()); +
312 +
313                if ($value !== null) { +
314                    $record->set($this->referenceField, $value, false); +
315                } else { +
316                    $record->set($this->referenceField, $this->reference, false); +
317                } +
318            } +
319            if ($key === null) { +
320                $this->data[] = $record; +
321            } else { +
322                $this->data[$key] = $record;       +
323            } +
324 +
325            if (isset($this->keyColumn)) { +
326 +
327                $record->set($this->keyColumn, $key); +
328            } +
329 +
330            return $record; +
331        } +
332 +
333        return $this->data[$key]; +
334    } +
335 +
336    /** +
337     * @return array                an array containing all primary keys +
338     */ +
339    public function getPrimaryKeys() +
340    { +
341        $list = array(); +
342        $name = $this->_table->getIdentifier(); +
343 +
344        foreach ($this->data as $record) { +
345            if (is_array($record) && isset($record[$name])) { +
346                $list[] = $record[$name]; +
347            } else { +
348                $list[] = $record->getIncremented(); +
349            } +
350        } +
351        return $list; +
352    } +
353    /** +
354     * returns all keys +
355     * @return array +
356     */ +
357    public function getKeys() +
358    { +
359        return array_keys($this->data); +
360    } +
361    /** +
362     * count +
363     * this class implements interface countable +
364     * returns the number of records in this collection +
365     * +
366     * @return integer +
367     */ +
368    public function count() +
369    { +
370        return count($this->data); +
371    } +
372    /** +
373     * set +
374     * @param integer $key +
375     * @param Doctrine_Record $record +
376     * @return void +
377     */ +
378    public function set($key, Doctrine_Record $record) +
379    { +
380        if (isset($this->referenceField)) { +
381            $record->set($this->referenceField, $this->reference, false); +
382        } +
383 +
384        $this->data[$key] = $record; +
385    } +
386    /** +
387     * adds a record to collection +
388     * @param Doctrine_Record $record              record to be added +
389     * @param string $key                          optional key for the record +
390     * @return boolean +
391     */ +
392    public function add(Doctrine_Record $record, $key = null) +
393    { +
394        if (isset($this->referenceField)) { +
395            $value = $this->reference->get($this->relation->getLocal()); +
396 +
397            if ($value !== null) { +
398                $record->set($this->referenceField, $value, false); +
399            } else { +
400                $record->set($this->referenceField, $this->reference, false); +
401            } +
402        } +
403        /** +
404         * for some weird reason in_array cannot be used here (php bug ?) +
405         * +
406         * if used it results in fatal error : [ nesting level too deep ] +
407         */ +
408        foreach ($this->data as $val) { +
409            if ($val === $record) { +
410                return false; +
411            } +
412        } +
413 +
414        if (isset($key)) { +
415            if (isset($this->data[$key])) { +
416                return false; +
417            } +
418            $this->data[$key] = $record; +
419            return true; +
420        } +
421 +
422        if (isset($this->keyColumn)) { +
423            $value = $record->get($this->keyColumn); +
424            if ($value === null) { +
425                throw new Doctrine_Collection_Exception("Couldn't create collection index. Record field '".$this->keyColumn."' was null."); +
426            } +
427            $this->data[$value] = $record; +
428        } else { +
429            $this->data[] = $record; +
430        } +
431        return true; +
432    } +
433    /** +
434     * loadRelated +
435     * +
436     * @param mixed $name +
437     * @return boolean +
438     */ +
439    public function loadRelated($name = null) +
440    { +
441        $list = array(); +
442        $query   = new Doctrine_Query($this->_table->getConnection()); +
443 +
444        if ( ! isset($name)) { +
445            foreach ($this->data as $record) { +
446                $value = $record->getIncremented(); +
447                if ($value !== null) { +
448                    $list[] = $value; +
449                } +
450            } +
451            $query->from($this->_table->getComponentName() . '(' . implode(", ",$this->_table->getPrimaryKeys()) . ')'); +
452            $query->where($this->_table->getComponentName() . '.id IN (' . substr(str_repeat("?, ", count($list)),0,-2) . ')'); +
453 +
454            return $query; +
455        } +
456 +
457        $rel     = $this->_table->getRelation($name); +
458 +
459        if ($rel instanceof Doctrine_Relation_LocalKey || $rel instanceof Doctrine_Relation_ForeignKey) { +
460            foreach ($this->data as $record) { +
461                $list[] = $record[$rel->getLocal()]; +
462            } +
463        } else { +
464            foreach ($this->data as $record) { +
465                $value = $record->getIncremented(); +
466                if ($value !== null) { +
467                    $list[] = $value; +
468                } +
469            } +
470        } +
471 +
472        $dql     = $rel->getRelationDql(count($list), 'collection'); +
473 +
474        $coll    = $query->query($dql, $list); +
475 +
476        $this->populateRelated($name, $coll); +
477    } +
478    /** +
479     * populateRelated +
480     * +
481     * @param string $name +
482     * @param Doctrine_Collection $coll +
483     * @return void +
484     */ +
485    public function populateRelated($name, Doctrine_Collection $coll) +
486    { +
487        $rel     = $this->_table->getRelation($name); +
488        $table   = $rel->getTable(); +
489        $foreign = $rel->getForeign(); +
490        $local   = $rel->getLocal(); +
491 +
492        if ($rel instanceof Doctrine_Relation_LocalKey) { +
493            foreach ($this->data as $key => $record) { +
494                foreach ($coll as $k => $related) { +
495                    if ($related[$foreign] == $record[$local]) { +
496                        $this->data[$key]->setRelated($name, $related); +
497                    } +
498                } +
499            } +
500        } elseif ($rel instanceof Doctrine_Relation_ForeignKey) { +
501            foreach ($this->data as $key => $record) { +
502                if ( ! $record->exists()) { +
503                    continue; +
504                } +
505                $sub = new Doctrine_Collection($table); +
506 +
507                foreach ($coll as $k => $related) { +
508                    if ($related[$foreign] == $record[$local]) { +
509                        $sub->add($related); +
510                        $coll->remove($k); +
511                    } +
512                } +
513 +
514                $this->data[$key]->setRelated($name, $sub); +
515            } +
516        } elseif ($rel instanceof Doctrine_Relation_Association) { +
517            $identifier = $this->_table->getIdentifier(); +
518            $asf        = $rel->getAssociationFactory(); +
519            $name       = $table->getComponentName(); +
520 +
521            foreach ($this->data as $key => $record) { +
522                if ( ! $record->exists()) { +
523                    continue; +
524                } +
525                $sub = new Doctrine_Collection($table); +
526                foreach ($coll as $k => $related) { +
527                    if ($related->get($local) == $record[$identifier]) { +
528                        $sub->add($related->get($name)); +
529                    } +
530                } +
531                $this->data[$key]->setRelated($name, $sub); +
532 +
533            } +
534        } +
535    } +
536    /** +
537     * getNormalIterator +
538     * returns normal iterator - an iterator that will not expand this collection +
539     * +
540     * @return Doctrine_Iterator_Normal +
541     */ +
542    public function getNormalIterator() +
543    { +
544        return new Doctrine_Collection_Iterator_Normal($this); +
545    } +
546    /** +
547     * takeSnapshot +
548     * takes a snapshot from this collection +
549     * +
550     * snapshots are used for diff processing, for example +
551     * when a fetched collection has three elements, then two of those +
552     * are being removed the diff would contain one element +
553     * +
554     * Doctrine_Collection::save() attaches the diff with the help of last +
555     * snapshot. +
556     * +
557     * @return Doctrine_Collection +
558     */ +
559    public function takeSnapshot() +
560    { +
561        $this->_snapshot = $this->data; +
562         +
563        return $this; +
564    } +
565    /** +
566     * getSnapshot +
567     * returns the data of the last snapshot +
568     * +
569     * @return array    returns the data in last snapshot +
570     */ +
571    public function getSnapshot() +
572    { +
573        return $this->_snapshot; +
574    } +
575    /** +
576     * processDiff +
577     * processes the difference of the last snapshot and the current data +
578     * +
579     * an example: +
580     * Snapshot with the objects 1, 2 and 4 +
581     * Current data with objects 2, 3 and 5 +
582     * +
583     * The process would remove object 4 +
584     * +
585     * @return Doctrine_Collection +
586     */ +
587    public function processDiff()  +
588    { +
589        foreach (array_udiff($this->_snapshot, $this->data, array($this, "compareRecords")) as $record) { +
590            $record->delete(); +
591        } +
592 +
593        return $this; +
594    } +
595    /** +
596     * toArray +
597     * Mimics the result of a $query->execute(array(), Doctrine::FETCH_ARRAY); +
598     * +
599     * @param boolean $deep +
600     */ +
601    public function toArray($deep = false, $prefixKey = false) +
602    { +
603        $data = array(); +
604        foreach ($this->data as $key => $record) { +
605             +
606            $key = $prefixKey ? get_class($record) . '_' .$key:$key; +
607             +
608            $data[$key] = $record->toArray($deep, $prefixKey); +
609        } +
610         +
611        return $data; +
612    } +
613    public function fromArray($array) +
614    { +
615        $data = array(); +
616        foreach ($array as $row) { +
617            $record = $this->_table->getRecord(); +
618            $record->fromArray($row); +
619             +
620            $data[] = $record; +
621        } +
622         +
623        $this->data = $data; +
624    } +
625    public function exportTo($type, $deep = false) +
626    { +
627        if ($type == 'array') { +
628            return $this->toArray($deep); +
629        } else { +
630            return Doctrine_Parser::dump($this->toArray($deep, true), $type); +
631        } +
632    } +
633    public function importFrom($type, $data) +
634    { +
635        if ($type == 'array') { +
636            return $this->fromArray($data); +
637        } else { +
638            return $this->fromArray(Doctrine_Parser::load($data, $type)); +
639        } +
640    } +
641    public function getDeleteDiff() +
642    { +
643        return array_udiff($this->_snapshot, $this->data, array($this, "compareRecords")); +
644    } +
645    public function getInsertDiff() +
646    { +
647        return array_udiff($this->data, $this->_snapshot, array($this, "compareRecords")); +
648    } +
649    /** +
650     * compareRecords +
651     * Compares two records. To be used on _snapshot diffs using array_udiff +
652     */ +
653    protected function compareRecords($a, $b) +
654    { +
655        if ($a->getOid() == $b->getOid()) return 0; +
656        return ($a->getOid() > $b->getOid()) ? 1 : -1; +
657    } +
658    /** +
659     * save +
660     * saves all records of this collection and processes the  +
661     * difference of the last snapshot and the current data +
662     * +
663     * @param Doctrine_Connection $conn     optional connection parameter +
664     * @return Doctrine_Collection +
665     */ +
666    public function save(Doctrine_Connection $conn = null) +
667    { +
668        if ($conn == null) { +
669            $conn = $this->_table->getConnection(); +
670        } +
671        $conn->beginTransaction(); +
672 +
673        $conn->transaction->addCollection($this); +
674 +
675        $this->processDiff(); +
676 +
677        foreach ($this->getData() as $key => $record) { +
678            $record->save($conn); +
679        } +
680 +
681        $conn->commit(); +
682 +
683        return $this; +
684    } +
685    /** +
686     * delete +
687     * single shot delete +
688     * deletes all records from this collection +
689     * and uses only one database query to perform this operation +
690     * +
691     * @return Doctrine_Collection +
692     */ +
693    public function delete(Doctrine_Connection $conn = null) +
694    { +
695        if ($conn == null) { +
696            $conn = $this->_table->getConnection(); +
697        } +
698 +
699        $conn->beginTransaction(); +
700        $conn->transaction->addCollection($this); +
701 +
702        foreach ($this as $key => $record) { +
703            $record->delete($conn); +
704        } +
705 +
706        $conn->commit(); +
707 +
708        $this->data = array(); +
709         +
710        return $this; +
711    } +
712    /** +
713     * getIterator +
714     * @return object ArrayIterator +
715     */ +
716    public function getIterator() +
717    { +
718        $data = $this->data; +
719        return new ArrayIterator($data); +
720    } +
721    /** +
722     * returns a string representation of this object +
723     */ +
724    public function __toString() +
725    { +
726        return Doctrine_Lib::getCollectionAsString($this); +
727    } +
728} +
\ No newline at end of file diff --git a/tests/coverage/Doctrine_Configurable.html b/tests/coverage/Doctrine_Configurable.html new file mode 100644 index 000000000..2f4c32d74 --- /dev/null +++ b/tests/coverage/Doctrine_Configurable.html @@ -0,0 +1,1044 @@ + + + Coverage for Doctrine_Configurable + + +

Coverage for Doctrine_Configurable

Back to coverage report

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
1<?php +
2/* +
3 *  $Id: Configurable.php 2753 2007-10-07 20:58:08Z zYne $ +
4 * +
5 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +
6 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +
7 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +
8 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +
9 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +
10 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +
11 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +
12 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +
13 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +
14 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +
15 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +
16 * +
17 * This software consists of voluntary contributions made by many individuals +
18 * and is licensed under the LGPL. For more information, see +
19 * <http://www.phpdoctrine.com>. +
20 */ +
21/** +
22 * Doctrine_Configurable +
23 * the base for Doctrine_Table, Doctrine_Manager and Doctrine_Connection +
24 * +
25 * +
26 * @package     Doctrine +
27 * @subpackage  Configurable +
28 * @license     http://www.opensource.org/licenses/lgpl-license.php LGPL +
29 * @link        www.phpdoctrine.com +
30 * @since       1.0 +
31 * @version     $Revision: 2753 $ +
32 * @author      Konsta Vesterinen <kvesteri@cc.hut.fi> +
33 */ +
34abstract class Doctrine_Configurable extends Doctrine_Locator_Injectable +
35{ +
36    /** +
37     * @var array $attributes               an array of containing all attributes +
38     */ +
39    protected $attributes = array(); +
40    /** +
41     * @var Doctrine_Configurable $parent   the parent of this component +
42     */ +
43    protected $parent; +
44    /** +
45     * @var array $_impl                    an array containing concrete implementations for class templates +
46     *                                      keys as template names and values as names of the concrete +
47     *                                      implementation classes +
48     */ +
49    protected $_impl = array(); +
50    /** +
51     * setAttribute +
52     * sets a given attribute +
53     * +
54     * <code> +
55     * $manager->setAttribute(Doctrine::ATTR_PORTABILITY, Doctrine::PORTABILITY_ALL); +
56     * +
57     * // or +
58     * +
59     * $manager->setAttribute('portability', Doctrine::PORTABILITY_ALL); +
60     * </code> +
61     * +
62     * @param mixed $attribute              either a Doctrine::ATTR_* integer constant or a string +
63     *                                      corresponding to a constant +
64     * @param mixed $value                  the value of the attribute +
65     * @see Doctrine::ATTR_* constants +
66     * @throws Doctrine_Exception           if the value is invalid +
67     * @return void +
68     */ +
69    public function setAttribute($attribute,$value) +
70    { +
71        if (is_string($attribute)) { +
72            $upper = strtoupper($attribute); +
73 +
74            $const = 'Doctrine::ATTR_' . $attribute; +
75            if (defined($const)) { +
76                $this->_state = constant($const); +
77            } else { +
78                throw new Doctrine_Exception('Unknown attribute ' . $attribute); +
79            } +
80        } +
81        switch ($attribute) { +
82            case Doctrine::ATTR_FETCHMODE: +
83                throw new Doctrine_Exception('Deprecated attribute. See http://doctrine.pengus.net/doctrine/manual/new/?chapter=configuration'); +
84            case Doctrine::ATTR_LISTENER: +
85                $this->setEventListener($value); +
86                break; +
87            case Doctrine::ATTR_COLL_KEY: +
88                if ( ! ($this instanceof Doctrine_Table)) { +
89                    throw new Doctrine_Exception("This attribute can only be set at table level."); +
90                } +
91                if ($value !== null && ! $this->hasColumn($value)) { +
92                    throw new Doctrine_Exception("Couldn't set collection key attribute. No such column '$value'"); +
93                } +
94                break; +
95            case Doctrine::ATTR_CACHE: +
96                if ($value !== null) { +
97                    if ( ! ($value instanceof Doctrine_Cache_Interface)) { +
98                        throw new Doctrine_Exception('Cache driver should implement Doctrine_Cache_Interface'); +
99                    } +
100                } +
101                break; +
102            case Doctrine::ATTR_VALIDATE: +
103            case Doctrine::ATTR_QUERY_LIMIT: +
104            case Doctrine::ATTR_QUOTE_IDENTIFIER: +
105            case Doctrine::ATTR_PORTABILITY: +
106            case Doctrine::ATTR_DEFAULT_TABLE_TYPE: +
107            case Doctrine::ATTR_EMULATE_DATABASE: +
108            case Doctrine::ATTR_USE_NATIVE_ENUM: +
109            case Doctrine::ATTR_DEFAULT_SEQUENCE: +
110            case Doctrine::ATTR_EXPORT: +
111            case Doctrine::ATTR_DECIMAL_PLACES: +
112            case Doctrine::ATTR_LOAD_REFERENCES: +
113            case Doctrine::ATTR_RECORD_LISTENER: +
114            case Doctrine::ATTR_THROW_EXCEPTIONS: +
115 +
116                break; +
117            case Doctrine::ATTR_SEQCOL_NAME: +
118                if ( ! is_string($value)) { +
119                    throw new Doctrine_Exception('Sequence column name attribute only accepts string values'); +
120                } +
121                break; +
122            case Doctrine::ATTR_FIELD_CASE: +
123                if ($value != 0 && $value != CASE_LOWER && $value != CASE_UPPER) +
124                    throw new Doctrine_Exception('Field case attribute should be either 0, CASE_LOWER or CASE_UPPER constant.'); +
125                break; +
126            case Doctrine::ATTR_SEQNAME_FORMAT: +
127            case Doctrine::ATTR_IDXNAME_FORMAT: +
128                if ($this instanceof Doctrine_Table) { +
129                    throw new Doctrine_Exception('Sequence / index name format attributes cannot be set' +
130                                               . 'at table level (only at connection or global level).'); +
131                } +
132                break; +
133            default: +
134                throw new Doctrine_Exception("Unknown attribute."); +
135        } +
136 +
137        $this->attributes[$attribute] = $value; +
138 +
139    } +
140    /** +
141     * setImpl +
142     * binds given class to given template name +
143     * +
144     * this method is the base of Doctrine dependency injection +
145     * +
146     * @param string $template      name of the class template +
147     * @param string $class         name of the class to be bound +
148     * @return Doctrine_Configurable    this object +
149     */ +
150    public function setImpl($template, $class) +
151    { +
152        $this->_impl[$template] = $class; +
153 +
154        return $this; +
155    } +
156    /** +
157     * getImpl +
158     * returns the implementation for given class +
159     * +
160     * @return string   name of the concrete implementation +
161     */ +
162    public function getImpl($template) +
163    { +
164        if ( ! isset($this->_impl[$template])) { +
165            if (isset($this->parent)) { +
166                return $this->parent->getImpl($template); +
167            } +
168            return null; +
169        } +
170        return $this->_impl[$template]; +
171    } +
172    /** +
173     * getCacheDriver +
174     * +
175     * @return Doctrine_Cache_Interface +
176     */ +
177    public function getCacheDriver() +
178    { +
179        if ( ! isset($this->attributes[Doctrine::ATTR_CACHE])) { +
180            throw new Doctrine_Exception('Cache driver not initialized.'); +
181        } +
182 +
183        return $this->attributes[Doctrine::ATTR_CACHE]; +
184    } +
185    /** +
186     * @param Doctrine_EventListener $listener +
187     * @return void +
188     */ +
189    public function setEventListener($listener) +
190    { +
191        return $this->setListener($listener); +
192    } +
193    /** +
194     * addRecordListener +
195     * +
196     * @param Doctrine_EventListener_Interface|Doctrine_Overloadable $listener +
197     * @return mixed        this object +
198     */ +
199    public function addRecordListener($listener, $name = null) +
200    { +
201        if ( ! isset($this->attributes[Doctrine::ATTR_RECORD_LISTENER]) || +
202             ! ($this->attributes[Doctrine::ATTR_RECORD_LISTENER] instanceof Doctrine_Record_Listener_Chain)) { +
203 +
204            $this->attributes[Doctrine::ATTR_RECORD_LISTENER] = new Doctrine_Record_Listener_Chain(); +
205        } +
206        $this->attributes[Doctrine::ATTR_RECORD_LISTENER]->add($listener, $name); +
207 +
208        return $this; +
209    } +
210    /** +
211     * getListener +
212     * +
213     * @return Doctrine_EventListener_Interface|Doctrine_Overloadable +
214     */ +
215    public function getRecordListener() +
216    { +
217        if ( ! isset($this->attributes[Doctrine::ATTR_RECORD_LISTENER])) { +
218            if (isset($this->parent)) { +
219                return $this->parent->getRecordListener(); +
220            } +
221            return null; +
222        } +
223        return $this->attributes[Doctrine::ATTR_RECORD_LISTENER]; +
224    } +
225    /** +
226     * setListener +
227     * +
228     * @param Doctrine_EventListener_Interface|Doctrine_Overloadable $listener +
229     * @return Doctrine_Configurable        this object +
230     */ +
231    public function setRecordListener($listener) +
232    { +
233        if ( ! ($listener instanceof Doctrine_Record_Listener_Interface) +
234            && ! ($listener instanceof Doctrine_Overloadable) +
235        ) { +
236            throw new Doctrine_Exception("Couldn't set eventlistener. Record listeners should implement either Doctrine_Record_Listener_Interface or Doctrine_Overloadable"); +
237        } +
238        $this->attributes[Doctrine::ATTR_RECORD_LISTENER] = $listener; +
239 +
240        return $this; +
241    } +
242    /** +
243     * addListener +
244     * +
245     * @param Doctrine_EventListener_Interface|Doctrine_Overloadable $listener +
246     * @return mixed        this object +
247     */ +
248    public function addListener($listener, $name = null) +
249    { +
250        if ( ! isset($this->attributes[Doctrine::ATTR_LISTENER]) || +
251             ! ($this->attributes[Doctrine::ATTR_LISTENER] instanceof Doctrine_EventListener_Chain)) { +
252 +
253            $this->attributes[Doctrine::ATTR_LISTENER] = new Doctrine_EventListener_Chain(); +
254        } +
255        $this->attributes[Doctrine::ATTR_LISTENER]->add($listener, $name); +
256 +
257        return $this; +
258    } +
259    /** +
260     * getListener +
261     * +
262     * @return Doctrine_EventListener_Interface|Doctrine_Overloadable +
263     */ +
264    public function getListener() +
265    { +
266        if ( ! isset($this->attributes[Doctrine::ATTR_LISTENER])) { +
267            if (isset($this->parent)) { +
268                return $this->parent->getListener(); +
269            } +
270            return null; +
271        } +
272        return $this->attributes[Doctrine::ATTR_LISTENER]; +
273    } +
274    /** +
275     * setListener +
276     * +
277     * @param Doctrine_EventListener_Interface|Doctrine_Overloadable $listener +
278     * @return Doctrine_Configurable        this object +
279     */ +
280    public function setListener($listener) +
281    { +
282        if ( ! ($listener instanceof Doctrine_EventListener_Interface) +
283            && ! ($listener instanceof Doctrine_Overloadable) +
284        ) { +
285            throw new Doctrine_EventListener_Exception("Couldn't set eventlistener. EventListeners should implement either Doctrine_EventListener_Interface or Doctrine_Overloadable"); +
286        } +
287        $this->attributes[Doctrine::ATTR_LISTENER] = $listener; +
288 +
289        return $this; +
290    } +
291    /** +
292     * returns the value of an attribute +
293     * +
294     * @param integer $attribute +
295     * @return mixed +
296     */ +
297    public function getAttribute($attribute) +
298    { +
299        $attribute = (int) $attribute; +
300 +
301        if ($attribute < 0) { +
302            throw new Doctrine_Exception('Unknown attribute.'); +
303        } +
304 +
305        if ( ! isset($this->attributes[$attribute])) { +
306            if (isset($this->parent)) { +
307                return $this->parent->getAttribute($attribute); +
308            } +
309            return null; +
310        } +
311        return $this->attributes[$attribute]; +
312    } +
313    /** +
314     * getAttributes +
315     * returns all attributes as an array +
316     * +
317     * @return array +
318     */ +
319    public function getAttributes() +
320    { +
321        return $this->attributes; +
322    } +
323    /** +
324     * sets a parent for this configurable component +
325     * the parent must be configurable component itself +
326     * +
327     * @param Doctrine_Configurable $component +
328     * @return void +
329     */ +
330    public function setParent(Doctrine_Configurable $component) +
331    { +
332        $this->parent = $component; +
333    } +
334    /** +
335     * getParent +
336     * returns the parent of this component +
337     * +
338     * @return Doctrine_Configurable +
339     */ +
340    public function getParent() +
341    { +
342        return $this->parent; +
343    } +
344} +
\ No newline at end of file diff --git a/tests/coverage/Doctrine_Connection.html b/tests/coverage/Doctrine_Connection.html new file mode 100644 index 000000000..adb6878a9 --- /dev/null +++ b/tests/coverage/Doctrine_Connection.html @@ -0,0 +1,3441 @@ + + + Coverage for Doctrine_Connection + + +

Coverage for Doctrine_Connection

Back to coverage report

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
1<?php +
2/* +
3 *  $Id: Connection.php 2829 2007-10-13 17:06:26Z zYne $ +
4 * +
5 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +
6 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +
7 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +
8 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +
9 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +
10 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +
11 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +
12 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +
13 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +
14 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +
15 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +
16 * +
17 * This software consists of voluntary contributions made by many individuals +
18 * and is licensed under the LGPL. For more information, see +
19 * <http://www.phpdoctrine.com>. +
20 */ +
21Doctrine::autoload('Doctrine_Configurable'); +
22/** +
23 * Doctrine_Connection +
24 * +
25 * A wrapper layer on top of PDO / Doctrine_Adapter +
26 * +
27 * Doctrine_Connection is the heart of any Doctrine based application. +
28 * +
29 * 1. Event listeners +
30 *    An easy to use, pluggable eventlistener architecture. Aspects such as +
31 *    logging, query profiling and caching can be easily implemented through +
32 *    the use of these listeners +
33 * +
34 * 2. Lazy-connecting +
35 *    Creating an instance of Doctrine_Connection does not connect +
36 *    to database. Connecting to database is only invoked when actually needed +
37 *    (for example when query() is being called)  +
38 * +
39 * 3. Convenience methods +
40 *    Doctrine_Connection provides many convenience methods such as fetchAll(), fetchOne() etc. +
41 * +
42 * 4. Modular structure +
43 *    Higher level functionality such as schema importing, exporting, sequence handling etc. +
44 *    is divided into modules. For a full list of connection modules see  +
45 *    Doctrine_Connection::$_modules +
46 * +
47 * @package     Doctrine +
48 * @subpackage  Connection +
49 * @license     http://www.opensource.org/licenses/lgpl-license.php LGPL +
50 * @link        www.phpdoctrine.com +
51 * @since       1.0 +
52 * @version     $Revision: 2829 $ +
53 * @author      Konsta Vesterinen <kvesteri@cc.hut.fi> +
54 * @author      Lukas Smith <smith@pooteeweet.org> (MDB2 library) +
55 */ +
56abstract class Doctrine_Connection extends Doctrine_Configurable implements Countable, IteratorAggregate +
57{ +
58    /** +
59     * @var $dbh                                the database handler +
60     */ +
61    protected $dbh; +
62    /** +
63     * @var array $tables                       an array containing all the initialized Doctrine_Table objects +
64     *                                          keys representing Doctrine_Table component names and values as Doctrine_Table objects +
65     */ +
66    protected $tables           = array(); +
67    /** +
68     * @var string $driverName                  the name of this connection driver +
69     */ +
70    protected $driverName; +
71    /** +
72     * @var boolean $isConnected                whether or not a connection has been established +
73     */ +
74    protected $isConnected      = false; +
75    /** +
76     * @var array $supported                    an array containing all features this driver supports, +
77     *                                          keys representing feature names and values as +
78     *                                          one of the following (true, false, 'emulated') +
79     */ +
80    protected $supported        = array(); +
81    /** +
82     * @var array $pendingAttributes            An array of pending attributes. When setting attributes +
83     *                                          no connection is needed. When connected all the pending +
84     *                                          attributes are passed to the underlying adapter (usually PDO) instance. +
85     */ +
86    protected $pendingAttributes  = array(); +
87    /** +
88     * @var array $modules                      an array containing all modules +
89     *              transaction                 Doctrine_Transaction driver, handles savepoint and transaction isolation abstraction +
90     * +
91     *              expression                  Doctrine_Expression driver, handles expression abstraction +
92     * +
93     *              dataDict                    Doctrine_DataDict driver, handles datatype abstraction +
94     * +
95     *              export                      Doctrine_Export driver, handles db structure modification abstraction (contains +
96     *                                          methods such as alterTable, createConstraint etc.) +
97     *              import                      Doctrine_Import driver, handles db schema reading +
98     * +
99     *              sequence                    Doctrine_Sequence driver, handles sequential id generation and retrieval +
100     * +
101     *              unitOfWork                  Doctrine_Connection_UnitOfWork handles many orm functionalities such as object +
102     *                                          deletion and saving +
103     * +
104     *              formatter                   Doctrine_Formatter handles data formatting, quoting and escaping +
105     * +
106     * @see Doctrine_Connection::__get() +
107     * @see Doctrine_DataDict +
108     * @see Doctrine_Expression +
109     * @see Doctrine_Export +
110     * @see Doctrine_Transaction +
111     * @see Doctrine_Sequence +
112     * @see Doctrine_Connection_UnitOfWork +
113     * @see Doctrine_Formatter +
114     */ +
115    private $modules = array('transaction' => false, +
116                             'expression'  => false, +
117                             'dataDict'    => false, +
118                             'export'      => false, +
119                             'import'      => false, +
120                             'sequence'    => false, +
121                             'unitOfWork'  => false, +
122                             'formatter'   => false, +
123                             'util'        => false, +
124                             ); +
125    /** +
126     * @var array $properties               an array of connection properties +
127     */ +
128    protected $properties = array('sql_comments'        => array(array('start' => '--', 'end' => "\n", 'escape' => false), +
129                                                                 array('start' => '/*', 'end' => '*/', 'escape' => false)), +
130                                  'identifier_quoting'  => array('start' => '"', 'end' => '"','escape' => '"'), +
131                                  'string_quoting'      => array('start' => "'", +
132                                                                 'end' => "'", +
133                                                                 'escape' => false, +
134                                                                 'escape_pattern' => false), +
135                                  'wildcards'           => array('%', '_'), +
136                                  'varchar_max_length'  => 255, +
137                                  ); +
138    /** +
139     * @var array $serverInfo +
140     */ +
141    protected $serverInfo = array(); +
142     +
143    protected $options    = array(); +
144    /** +
145     * @var array $availableDrivers         an array containing all availible drivers +
146     */ +
147    private static $availableDrivers    = array( +
148                                        'Mysql', +
149                                        'Pgsql', +
150                                        'Oracle', +
151                                        'Informix', +
152                                        'Mssql', +
153                                        'Sqlite', +
154                                        'Firebird' +
155                                        ); +
156    protected $_count = 0; +
157 +
158    /** +
159     * the constructor +
160     * +
161     * @param Doctrine_Manager $manager                 the manager object +
162     * @param PDO|Doctrine_Adapter_Interface $adapter   database driver +
163     */ +
164    public function __construct(Doctrine_Manager $manager, $adapter, $user = null, $pass = null) +
165    { +
166        if (is_object($adapter)) { +
167            if ( ! ($adapter instanceof PDO) && ! in_array('Doctrine_Adapter_Interface', class_implements($adapter))) { +
168                throw new Doctrine_Connection_Exception('First argument should be an instance of PDO or implement Doctrine_Adapter_Interface'); +
169            } +
170            $this->dbh = $adapter; +
171 +
172            $this->isConnected = true; +
173 +
174        } elseif (is_array($adapter)) { +
175            $this->pendingAttributes[Doctrine::ATTR_DRIVER_NAME] = $adapter['scheme']; +
176 +
177            $this->options['dsn']      = $adapter['dsn']; +
178            $this->options['username'] = $adapter['user']; +
179            $this->options['password'] = $adapter['pass']; +
180             +
181            $this->options['other'] = array();   +
182            if (isset($adapter['other'])) { +
183                $this->options['other'] = array(Doctrine::ATTR_PERSISTENT => $adapter['persistent']); +
184            } +
185 +
186        } +
187 +
188        $this->setParent($manager); +
189 +
190        $this->setAttribute(Doctrine::ATTR_CASE, Doctrine::CASE_NATURAL); +
191        $this->setAttribute(Doctrine::ATTR_ERRMODE, Doctrine::ERRMODE_EXCEPTION); +
192 +
193        $this->getAttribute(Doctrine::ATTR_LISTENER)->onOpen($this); +
194    } +
195    /** +
196     * getAttribute +
197     * retrieves a database connection attribute +
198     * +
199     * @param integer $attribute +
200     * @return mixed +
201     */ +
202    public function getAttribute($attribute) +
203    { +
204 +
205        if ($attribute >= 100) { +
206            if ( ! isset($this->attributes[$attribute])) { +
207                return $this->parent->getAttribute($attribute); +
208            } +
209            return $this->attributes[$attribute]; +
210        } +
211 +
212        if ($this->isConnected) { +
213            try { +
214                return $this->dbh->getAttribute($attribute); +
215            } catch(Exception $e) { +
216                throw new Doctrine_Connection_Exception('Attribute ' . $attribute . ' not found.'); +
217            } +
218        } else { +
219            if ( ! isset($this->pendingAttributes[$attribute])) { +
220                $this->connect(); +
221                $this->getAttribute($attribute); +
222            } +
223 +
224            return $this->pendingAttributes[$attribute]; +
225        } +
226    } +
227    /** +
228     * returns an array of available PDO drivers +
229     */ +
230    public static function getAvailableDrivers() +
231    { +
232        return PDO::getAvailableDrivers(); +
233    } +
234    /** +
235     * setAttribute +
236     * sets an attribute +
237     * +
238     * @param integer $attribute +
239     * @param mixed $value +
240     * @return boolean +
241     */ +
242    public function setAttribute($attribute, $value) +
243    { +
244        if ($attribute >= 100) { +
245            parent::setAttribute($attribute, $value); +
246        } else { +
247            if ($this->isConnected) { +
248                $this->dbh->setAttribute($attribute, $value); +
249            } else { +
250                $this->pendingAttributes[$attribute] = $value; +
251            } +
252        } +
253        return $this; +
254    } +
255    /** +
256     * getName +
257     * returns the name of this driver +
258     * +
259     * @return string           the name of this driver +
260     */ +
261    public function getName() +
262    { +
263        return $this->driverName; +
264    } +
265    /** +
266     * __get +
267     * lazy loads given module and returns it +
268     * +
269     * @see Doctrine_DataDict +
270     * @see Doctrine_Expression +
271     * @see Doctrine_Export +
272     * @see Doctrine_Transaction +
273     * @see Doctrine_Connection::$modules       all availible modules +
274     * @param string $name                      the name of the module to get +
275     * @throws Doctrine_Connection_Exception    if trying to get an unknown module +
276     * @return Doctrine_Connection_Module       connection module +
277     */ +
278    public function __get($name) +
279    { +
280        if (isset($this->properties[$name])) { +
281            return $this->properties[$name]; +
282        } +
283 +
284        if ( ! isset($this->modules[$name])) { +
285            throw new Doctrine_Connection_Exception('Unknown module / property ' . $name); +
286        } +
287        if ($this->modules[$name] === false) { +
288            switch ($name) { +
289                case 'unitOfWork': +
290                    $this->modules[$name] = new Doctrine_Connection_UnitOfWork($this); +
291                    break; +
292                case 'formatter': +
293                    $this->modules[$name] = new Doctrine_Formatter($this); +
294                    break; +
295                default: +
296                    $class = 'Doctrine_' . ucwords($name) . '_' . $this->getName(); +
297                    $this->modules[$name] = new $class($this); +
298                } +
299        } +
300 +
301        return $this->modules[$name]; +
302    } +
303    /** +
304     * returns the manager that created this connection +
305     * +
306     * @return Doctrine_Manager +
307     */ +
308    public function getManager() +
309    { +
310        return $this->getParent(); +
311    } +
312    /** +
313     * returns the database handler of which this connection uses +
314     * +
315     * @return PDO              the database handler +
316     */ +
317    public function getDbh() +
318    { +
319        $this->connect(); +
320         +
321        return $this->dbh; +
322    } +
323    /** +
324     * connect +
325     * connects into database +
326     * +
327     * @return boolean +
328     */ +
329    public function connect() +
330    { +
331 +
332        if ($this->isConnected) { +
333            return false; +
334        } +
335 +
336        $event = new Doctrine_Event($this, Doctrine_Event::CONN_CONNECT); +
337 +
338        $this->getListener()->preConnect($event); +
339 +
340        $e     = explode(':', $this->options['dsn']); +
341        $found = false; +
342         +
343        if (extension_loaded('pdo')) { +
344            if (in_array($e[0], PDO::getAvailableDrivers())) { +
345                $this->dbh = new PDO($this->options['dsn'], $this->options['username'],  +
346                                     $this->options['password'], $this->options['other']); +
347                                      +
348                $this->dbh->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); +
349                $found = true; +
350            } +
351        } +
352 +
353        if ( ! $found) { +
354            $class = 'Doctrine_Adapter_' . ucwords($e[0]); +
355 +
356            if (class_exists($class)) { +
357                $this->dbh = new $class($this->options['dsn'], $this->options['username'], $this->options['password']); +
358            } else { +
359                throw new Doctrine_Connection_Exception("Couldn't locate driver named " . $e[0]);           +
360            } +
361        } +
362 +
363        // attach the pending attributes to adapter +
364        foreach($this->pendingAttributes as $attr => $value) { +
365            // some drivers don't support setting this so we just skip it +
366            if ($attr == Doctrine::ATTR_DRIVER_NAME) { +
367                continue; +
368            } +
369            $this->dbh->setAttribute($attr, $value); +
370        } +
371 +
372        $this->isConnected = true; +
373 +
374        $this->getListener()->postConnect($event); +
375        return true; +
376    } +
377     +
378    public function incrementQueryCount()  +
379    { +
380        $this->_count++; +
381    } +
382    /** +
383     * converts given driver name +
384     * +
385     * @param +
386     */ +
387    public function driverName($name) +
388    { +
389    } +
390    /** +
391     * supports +
392     * +
393     * @param string $feature   the name of the feature +
394     * @return boolean          whether or not this drivers supports given feature +
395     */ +
396    public function supports($feature) +
397    { +
398        return (isset($this->supported[$feature]) +
399                  && ($this->supported[$feature] === 'emulated' +
400                   || $this->supported[$feature])); +
401    } +
402    /** +
403     * Execute a SQL REPLACE query. A REPLACE query is identical to a INSERT +
404     * query, except that if there is already a row in the table with the same +
405     * key field values, the REPLACE query just updates its values instead of +
406     * inserting a new row. +
407     * +
408     * The REPLACE type of query does not make part of the SQL standards. Since +
409     * practically only MySQL and SQLIte implement it natively, this type of +
410     * query isemulated through this method for other DBMS using standard types +
411     * of queries inside a transaction to assure the atomicity of the operation. +
412     * +
413     * @param                   string  name of the table on which the REPLACE query will +
414     *                          be executed. +
415     * +
416     * @param   array           an associative array that describes the fields and the +
417     *                          values that will be inserted or updated in the specified table. The +
418     *                          indexes of the array are the names of all the fields of the table. +
419     * +
420     *                          The values of the array are values to be assigned to the specified field. +
421     * +
422     * @param array $keys       an array containing all key fields (primary key fields +
423     *                          or unique index fields) for this table +
424     * +
425     *                          the uniqueness of a row will be determined according to +
426     *                          the provided key fields +
427     * +
428     *                          this method will fail if no key fields are specified +
429     * +
430     * @throws Doctrine_Connection_Exception        if this driver doesn't support replace +
431     * @throws Doctrine_Connection_Exception        if some of the key values was null +
432     * @throws Doctrine_Connection_Exception        if there were no key fields +
433     * @throws PDOException                         if something fails at PDO level +
434     * @return integer                              number of rows affected +
435     */ +
436    public function replace($table, array $fields, array $keys) +
437    { +
438        //if ( ! $this->supports('replace')) +
439        //    throw new Doctrine_Connection_Exception('replace query is not supported'); +
440 +
441        if (empty($keys)) { +
442            throw new Doctrine_Connection_Exception('Not specified which fields are keys'); +
443        } +
444        $condition = $values = array(); +
445 +
446        foreach ($fields as $name => $value) { +
447            $values[$name] = $value; +
448 +
449            if (in_array($name, $keys)) { +
450                if ($value === null) +
451                    throw new Doctrine_Connection_Exception('key value '.$name.' may not be null'); +
452 +
453                $condition[]       = $name . ' = ?'; +
454                $conditionValues[] = $value; +
455            } +
456        } +
457 +
458        $query          = 'DELETE FROM ' . $this->quoteIdentifier($table) . ' WHERE ' . implode(' AND ', $condition); +
459        $affectedRows   = $this->exec($query); +
460 +
461        $this->insert($table, $values); +
462 +
463        $affectedRows++; +
464 +
465 +
466        return $affectedRows; +
467    } +
468    /** +
469     * Inserts a table row with specified data. +
470     * +
471     * @param string $table     The table to insert data into. +
472     * @param array $values     An associateve array containing column-value pairs. +
473     * @return boolean +
474     */ +
475    public function insert($table, array $values = array()) { +
476        if (empty($values)) { +
477            return false; +
478        } +
479 +
480        // column names are specified as array keys +
481        $cols = array(); +
482        // the query VALUES will contain either expresions (eg 'NOW()') or ? +
483        $a = array(); +
484        foreach ($values as $k => $value) { +
485            $cols[] = $this->quoteIdentifier($k); +
486            if ($value instanceof Doctrine_Expression) { +
487                $a[] = $value->getSql(); +
488                unset($values[$k]); +
489            } else { +
490                $a[] = '?'; +
491            } +
492        } +
493 +
494        // build the statement +
495        $query = 'INSERT INTO ' . $this->quoteIdentifier($table)  +
496               . ' (' . implode(', ', $cols) . ') ' +
497               . 'VALUES ('; +
498 +
499        $query .= implode(', ', $a) . ')'; +
500        // prepare and execute the statement +
501 +
502        $this->exec($query, array_values($values)); +
503 +
504        return true; +
505    } +
506    /** +
507     * Set the charset on the current connection +
508     * +
509     * @param string    charset +
510     * +
511     * @return void +
512     */ +
513    public function setCharset($charset) +
514    { +
515 +
516    } +
517    /** +
518     * Quote a string so it can be safely used as a table or column name +
519     * +
520     * Delimiting style depends on which database driver is being used. +
521     * +
522     * NOTE: just because you CAN use delimited identifiers doesn't mean +
523     * you SHOULD use them.  In general, they end up causing way more +
524     * problems than they solve. +
525     * +
526     * Portability is broken by using the following characters inside +
527     * delimited identifiers: +
528     *   + backtick (<kbd>`</kbd>) -- due to MySQL +
529     *   + double quote (<kbd>"</kbd>) -- due to Oracle +
530     *   + brackets (<kbd>[</kbd> or <kbd>]</kbd>) -- due to Access +
531     * +
532     * Delimited identifiers are known to generally work correctly under +
533     * the following drivers: +
534     *   + mssql +
535     *   + mysql +
536     *   + mysqli +
537     *   + oci8 +
538     *   + pgsql +
539     *   + sqlite +
540     * +
541     * InterBase doesn't seem to be able to use delimited identifiers +
542     * via PHP 4.  They work fine under PHP 5. +
543     * +
544     * @param string $str           identifier name to be quoted +
545     * @param bool $checkOption     check the 'quote_identifier' option +
546     * +
547     * @return string               quoted identifier string +
548     */ +
549    public function quoteIdentifier($str, $checkOption = true) +
550    { +
551        // quick fix for the identifiers that contain a dot +
552        if (strpos($str, '.')) { +
553            $e = explode('.', $str); +
554             +
555            return $this->formatter->quoteIdentifier($e[0], $checkOption) . '.'  +
556                 . $this->formatter->quoteIdentifier($e[1], $checkOption); +
557        } +
558        return $this->formatter->quoteIdentifier($str, $checkOption); +
559    } +
560    /** +
561     * convertBooleans +
562     * some drivers need the boolean values to be converted into integers +
563     * when using DQL API +
564     * +
565     * This method takes care of that conversion +
566     * +
567     * @param array $item +
568     * @return void +
569     */ +
570    public function convertBooleans($item) +
571    { +
572        return $this->formatter->convertBooleans($item); +
573    } +
574    /** +
575     * quote +
576     * quotes given input parameter +
577     * +
578     * @param mixed $input      parameter to be quoted +
579     * @param string $type +
580     * @return mixed +
581     */ +
582    public function quote($input, $type = null) +
583    { +
584        return $this->formatter->quote($input, $type); +
585    } +
586    /** +
587     * Set the date/time format for the current connection +
588     * +
589     * @param string    time format +
590     * +
591     * @return void +
592     */ +
593    public function setDateFormat($format = null) +
594    { +
595    } +
596    /** +
597     * fetchAll +
598     * +
599     * @param string $statement         sql query to be executed +
600     * @param array $params             prepared statement params +
601     * @return array +
602     */ +
603    public function fetchAll($statement, array $params = array())  +
604    { +
605        return $this->execute($statement, $params)->fetchAll(Doctrine::FETCH_ASSOC); +
606    } +
607    /** +
608     * fetchOne +
609     * +
610     * @param string $statement         sql query to be executed +
611     * @param array $params             prepared statement params +
612     * @param int $colnum               0-indexed column number to retrieve +
613     * @return mixed +
614     */ +
615    public function fetchOne($statement, array $params = array(), $colnum = 0)  +
616    { +
617        return $this->execute($statement, $params)->fetchColumn($colnum); +
618    } +
619    /** +
620     * fetchRow +
621     * +
622     * @param string $statement         sql query to be executed +
623     * @param array $params             prepared statement params +
624     * @return array +
625     */ +
626    public function fetchRow($statement, array $params = array())  +
627    { +
628        return $this->execute($statement, $params)->fetch(Doctrine::FETCH_ASSOC); +
629    } +
630    /** +
631     * fetchArray +
632     * +
633     * @param string $statement         sql query to be executed +
634     * @param array $params             prepared statement params +
635     * @return array +
636     */ +
637    public function fetchArray($statement, array $params = array())  +
638    { +
639        return $this->execute($statement, $params)->fetch(Doctrine::FETCH_NUM); +
640    } +
641    /** +
642     * fetchColumn +
643     * +
644     * @param string $statement         sql query to be executed +
645     * @param array $params             prepared statement params +
646     * @param int $colnum               0-indexed column number to retrieve +
647     * @return array +
648     */ +
649    public function fetchColumn($statement, array $params = array(), $colnum = 0)  +
650    { +
651        return $this->execute($statement, $params)->fetchAll(Doctrine::FETCH_COLUMN, $colnum); +
652    } +
653    /** +
654     * fetchAssoc +
655     * +
656     * @param string $statement         sql query to be executed +
657     * @param array $params             prepared statement params +
658     * @return array +
659     */ +
660    public function fetchAssoc($statement, array $params = array())  +
661    { +
662        return $this->execute($statement, $params)->fetchAll(Doctrine::FETCH_ASSOC); +
663    } +
664    /** +
665     * fetchBoth +
666     * +
667     * @param string $statement         sql query to be executed +
668     * @param array $params             prepared statement params +
669     * @return array +
670     */ +
671    public function fetchBoth($statement, array $params = array())  +
672    { +
673        return $this->execute($statement, $params)->fetchAll(Doctrine::FETCH_BOTH); +
674    } +
675    /** +
676     * query +
677     * queries the database using Doctrine Query Language +
678     * returns a collection of Doctrine_Record objects +
679     * +
680     * <code> +
681     * $users = $conn->query('SELECT u.* FROM User u'); +
682     * +
683     * $users = $conn->query('SELECT u.* FROM User u WHERE u.name LIKE ?', array('someone')); +
684     * </code> +
685     * +
686     * @param string $query             DQL query +
687     * @param array $params             query parameters +
688     * @param int $hydrationMode        Doctrine::FETCH_ARRAY or Doctrine::FETCH_RECORD +
689     * @see Doctrine_Query +
690     * @return Doctrine_Collection      Collection of Doctrine_Record objects +
691     */ +
692    public function query($query, array $params = array(), $hydrationMode = null) +
693    { +
694        $parser = new Doctrine_Query($this); +
695 +
696        return $parser->query($query, $params, $hydrationMode); +
697    } +
698    /** +
699     * prepare +
700     * +
701     * @param string $statement +
702     */ +
703    public function prepare($statement) +
704    { +
705        $this->connect(); +
706 +
707        try { +
708            $event = new Doctrine_Event($this, Doctrine_Event::CONN_PREPARE, $statement); +
709     +
710            $this->getAttribute(Doctrine::ATTR_LISTENER)->prePrepare($event); +
711 +
712            $stmt = false; +
713     +
714            if ( ! $event->skipOperation) { +
715                $stmt = $this->dbh->prepare($statement); +
716            } +
717     +
718            $this->getAttribute(Doctrine::ATTR_LISTENER)->postPrepare($event); +
719             +
720            return new Doctrine_Connection_Statement($this, $stmt); +
721        } catch(Doctrine_Adapter_Exception $e) { +
722        } catch(PDOException $e) { } +
723 +
724        $this->rethrowException($e, $this); +
725    } +
726    /** +
727     * query +
728     * queries the database using Doctrine Query Language and returns +
729     * the first record found +
730     * +
731     * <code> +
732     * $user = $conn->queryOne('SELECT u.* FROM User u WHERE u.id = ?', array(1)); +
733     * +
734     * $user = $conn->queryOne('SELECT u.* FROM User u WHERE u.name LIKE ? AND u.password = ?', +
735     *         array('someone', 'password') +
736     *         ); +
737     * </code> +
738     * +
739     * @param string $query             DQL query +
740     * @param array $params             query parameters +
741     * @see Doctrine_Query +
742     * @return Doctrine_Record|false    Doctrine_Record object on success, +
743     *                                  boolean false on failure +
744     */ +
745    public function queryOne($query, array $params = array())  +
746    { +
747        $parser = new Doctrine_Query($this); +
748 +
749        $coll = $parser->query($query, $params); +
750        if ( ! $coll->contains(0)) { +
751            return false; +
752        } +
753        return $coll[0]; +
754    } +
755    /** +
756     * queries the database with limit and offset +
757     * added to the query and returns a Doctrine_Connection_Statement object +
758     * +
759     * @param string $query +
760     * @param integer $limit +
761     * @param integer $offset +
762     * @return Doctrine_Connection_Statement +
763     */ +
764    public function select($query, $limit = 0, $offset = 0) +
765    { +
766        if ($limit > 0 || $offset > 0) { +
767            $query = $this->modifyLimitQuery($query, $limit, $offset); +
768        } +
769        return $this->execute($query); +
770    } +
771    /** +
772     * standaloneQuery +
773     * +
774     * @param string $query     sql query +
775     * @param array $params     query parameters +
776     * +
777     * @return PDOStatement|Doctrine_Adapter_Statement +
778     */ +
779    public function standaloneQuery($query, $params = array()) +
780    { +
781        return $this->execute($query, $params); +
782    } +
783    /** +
784     * execute +
785     * @param string $query     sql query +
786     * @param array $params     query parameters +
787     * +
788     * @return PDOStatement|Doctrine_Adapter_Statement +
789     */ +
790    public function execute($query, array $params = array()) +
791    { +
792        $this->connect(); +
793 +
794        try { +
795            if ( ! empty($params)) { +
796                $stmt = $this->prepare($query); +
797                $stmt->execute($params); +
798                return $stmt; +
799            } else { +
800                $event = new Doctrine_Event($this, Doctrine_Event::CONN_QUERY, $query, $params); +
801 +
802                $this->getAttribute(Doctrine::ATTR_LISTENER)->preQuery($event); +
803 +
804                if ( ! $event->skipOperation) { +
805                    $stmt = $this->dbh->query($query); +
806 +
807                    $this->_count++; +
808                } +
809                $this->getAttribute(Doctrine::ATTR_LISTENER)->postQuery($event); +
810 +
811                return $stmt; +
812            } +
813        } catch(Doctrine_Adapter_Exception $e) { +
814        } catch(PDOException $e) { } +
815 +
816        $this->rethrowException($e, $this); +
817    } +
818    /** +
819     * exec +
820     * @param string $query     sql query +
821     * @param array $params     query parameters +
822     * +
823     * @return PDOStatement|Doctrine_Adapter_Statement +
824     */ +
825    public function exec($query, array $params = array()) { +
826        $this->connect(); +
827 +
828        try { +
829            if ( ! empty($params)) { +
830                $stmt = $this->prepare($query); +
831                $stmt->execute($params); +
832 +
833                return $stmt->rowCount(); +
834            } else { +
835                $event = new Doctrine_Event($this, Doctrine_Event::CONN_EXEC, $query, $params); +
836 +
837                $this->getAttribute(Doctrine::ATTR_LISTENER)->preExec($event); +
838 +
839                if ( ! $event->skipOperation) { +
840                    $count = $this->dbh->exec($query); +
841 +
842                    $this->_count++; +
843                } +
844                $this->getAttribute(Doctrine::ATTR_LISTENER)->postExec($event); +
845 +
846                return $count; +
847            } +
848        } catch(Doctrine_Adapter_Exception $e) { +
849        } catch(PDOException $e) { } +
850 +
851        $this->rethrowException($e, $this); +
852    } +
853    /** +
854     * rethrowException +
855     * +
856     * @throws Doctrine_Connection_Exception +
857     */ +
858    public function rethrowException(Exception $e, $invoker) +
859    { +
860        $event = new Doctrine_Event($this, Doctrine_Event::CONN_ERROR); +
861 +
862        $this->getListener()->preError($event); +
863 +
864        $name = 'Doctrine_Connection_' . $this->driverName . '_Exception'; +
865 +
866        $exc  = new $name($e->getMessage(), (int) $e->getCode()); +
867        if ( ! is_array($e->errorInfo)) { +
868            $e->errorInfo = array(null, null, null, null); +
869        } +
870        $exc->processErrorInfo($e->errorInfo); +
871 +
872         if ($this->getAttribute(Doctrine::ATTR_THROW_EXCEPTIONS)) { +
873            throw $exc; +
874        } +
875         +
876        $this->getListener()->postError($event); +
877    } +
878    /** +
879     * hasTable +
880     * whether or not this connection has table $name initialized +
881     * +
882     * @param mixed $name +
883     * @return boolean +
884     */ +
885    public function hasTable($name) +
886    { +
887        return isset($this->tables[$name]); +
888    } +
889    /** +
890     * returns a table object for given component name +
891     * +
892     * @param string $name              component name +
893     * @return object Doctrine_Table +
894     */ +
895    public function getTable($name, $allowExport = true) +
896    { +
897        if (isset($this->tables[$name])) { +
898            return $this->tables[$name]; +
899        } +
900        $class = $name . 'Table'; +
901 +
902        if (class_exists($class) && in_array('Doctrine_Table', class_parents($class))) { +
903            $table = new $class($name, $this); +
904        } else { +
905            $table = new Doctrine_Table($name, $this); +
906        } +
907 +
908        $this->tables[$name] = $table; +
909 +
910 +
911        return $table; +
912    } +
913    /** +
914     * returns an array of all initialized tables +
915     * +
916     * @return array +
917     */ +
918    public function getTables() +
919    { +
920        return $this->tables; +
921    } +
922    /** +
923     * returns an iterator that iterators through all +
924     * initialized table objects +
925     * +
926     * <code> +
927     * foreach ($conn as $index => $table) { +
928     *      print $table;  // get a string representation of each table object +
929     * } +
930     * </code> +
931     * +
932     * @return ArrayIterator        SPL ArrayIterator object +
933     */ +
934    public function getIterator() +
935    { +
936        return new ArrayIterator($this->tables); +
937    } +
938    /** +
939     * returns the count of initialized table objects +
940     * +
941     * @return integer +
942     */ +
943    public function count() +
944    { +
945        return $this->_count; +
946    } +
947    /** +
948     * addTable +
949     * adds a Doctrine_Table object into connection registry +
950     * +
951     * @param $table                a Doctrine_Table object to be added into registry +
952     * @return boolean +
953     */ +
954    public function addTable(Doctrine_Table $table) +
955    { +
956        $name = $table->getComponentName(); +
957 +
958        if (isset($this->tables[$name])) { +
959            return false; +
960        } +
961        $this->tables[$name] = $table; +
962        return true; +
963    } +
964    /** +
965     * create +
966     * creates a record +
967     * +
968     * create                       creates a record +
969     * @param string $name          component name +
970     * @return Doctrine_Record      Doctrine_Record object +
971     */ +
972    public function create($name) +
973    { +
974        return $this->getTable($name)->create(); +
975    } +
976    /** +
977     * flush +
978     * saves all the records from all tables +
979     * this operation is isolated using a transaction +
980     * +
981     * @throws PDOException         if something went wrong at database level +
982     * @return void +
983     */ +
984    public function flush() +
985    { +
986        $this->beginTransaction(); +
987        $this->unitOfWork->saveAll(); +
988        $this->commit(); +
989    } +
990    /** +
991     * clear +
992     * clears all repositories +
993     * +
994     * @return void +
995     */ +
996    public function clear() +
997    { +
998        foreach ($this->tables as $k => $table) { +
999            $table->getRepository()->evictAll(); +
1000            $table->clear(); +
1001        } +
1002    } +
1003    /** +
1004     * evictTables +
1005     * evicts all tables +
1006     * +
1007     * @return void +
1008     */ +
1009    public function evictTables() +
1010    { +
1011        $this->tables = array(); +
1012        $this->exported = array(); +
1013    } +
1014    /** +
1015     * close +
1016     * closes the connection +
1017     * +
1018     * @return void +
1019     */ +
1020    public function close() +
1021    { +
1022        $event = new Doctrine_Event($this, Doctrine_Event::CONN_CLOSE); +
1023 +
1024        $this->getAttribute(Doctrine::ATTR_LISTENER)->preClose($event); +
1025 +
1026        $this->clear(); +
1027         +
1028        unset($this->dbh); +
1029        $this->isConnected = false; +
1030 +
1031        $this->getAttribute(Doctrine::ATTR_LISTENER)->postClose($event); +
1032    } +
1033    /** +
1034     * get the current transaction nesting level +
1035     * +
1036     * @return integer +
1037     */ +
1038    public function getTransactionLevel() +
1039    { +
1040        return $this->transaction->getTransactionLevel(); +
1041    } +
1042    /** +
1043     * errorCode +
1044     * Fetch the SQLSTATE associated with the last operation on the database handle +
1045     * +
1046     * @return integer +
1047     */ +
1048    public function errorCode() +
1049    { +
1050        $this->connect(); +
1051 +
1052        return $this->dbh->errorCode(); +
1053    } +
1054    /** +
1055     * errorInfo +
1056     * Fetch extended error information associated with the last operation on the database handle +
1057     * +
1058     * @return array +
1059     */ +
1060    public function errorInfo() +
1061    { +
1062        $this->connect(); +
1063 +
1064        return $this->dbh->errorInfo(); +
1065    } +
1066    /** +
1067     * lastInsertId +
1068     * +
1069     * Returns the ID of the last inserted row, or the last value from a sequence object, +
1070     * depending on the underlying driver. +
1071     * +
1072     * Note: This method may not return a meaningful or consistent result across different drivers,  +
1073     * because the underlying database may not even support the notion of auto-increment fields or sequences. +
1074     * +
1075     * @param string $table     name of the table into which a new row was inserted +
1076     * @param string $field     name of the field into which a new row was inserted +
1077     */ +
1078    public function lastInsertId($table = null, $field = null) +
1079    { +
1080        return $this->sequence->lastInsertId($table, $field); +
1081    } +
1082    /** +
1083     * beginTransaction +
1084     * Start a transaction or set a savepoint. +
1085     * +
1086     * if trying to set a savepoint and there is no active transaction +
1087     * a new transaction is being started +
1088     * +
1089     * Listeners: onPreTransactionBegin, onTransactionBegin +
1090     * +
1091     * @param string $savepoint                 name of a savepoint to set +
1092     * @throws Doctrine_Transaction_Exception   if the transaction fails at database level +
1093     * @return integer                          current transaction nesting level +
1094     */ +
1095    public function beginTransaction($savepoint = null) +
1096    { +
1097        $this->transaction->beginTransaction($savepoint); +
1098    } +
1099    /** +
1100     * commit +
1101     * Commit the database changes done during a transaction that is in +
1102     * progress or release a savepoint. This function may only be called when +
1103     * auto-committing is disabled, otherwise it will fail. +
1104     * +
1105     * Listeners: onPreTransactionCommit, onTransactionCommit +
1106     * +
1107     * @param string $savepoint                 name of a savepoint to release +
1108     * @throws Doctrine_Transaction_Exception   if the transaction fails at PDO level +
1109     * @throws Doctrine_Validator_Exception     if the transaction fails due to record validations +
1110     * @return boolean                          false if commit couldn't be performed, true otherwise +
1111     */ +
1112    public function commit($savepoint = null) +
1113    { +
1114        $this->transaction->commit($savepoint); +
1115    } +
1116    /** +
1117     * rollback +
1118     * Cancel any database changes done during a transaction or since a specific +
1119     * savepoint that is in progress. This function may only be called when +
1120     * auto-committing is disabled, otherwise it will fail. Therefore, a new +
1121     * transaction is implicitly started after canceling the pending changes. +
1122     * +
1123     * this method can be listened with onPreTransactionRollback and onTransactionRollback +
1124     * eventlistener methods +
1125     * +
1126     * @param string $savepoint                 name of a savepoint to rollback to    +
1127     * @throws Doctrine_Transaction_Exception   if the rollback operation fails at database level +
1128     * @return boolean                          false if rollback couldn't be performed, true otherwise +
1129     */ +
1130    public function rollback($savepoint = null) +
1131    { +
1132        $this->transaction->rollback($savepoint); +
1133    } +
1134 +
1135    /** +
1136     * returns a string representation of this object +
1137     * @return string +
1138     */ +
1139    public function __toString() +
1140    { +
1141        return Doctrine_Lib::getConnectionAsString($this); +
1142    } +
1143} +
\ No newline at end of file diff --git a/tests/coverage/Doctrine_Connection_Common.html b/tests/coverage/Doctrine_Connection_Common.html new file mode 100644 index 000000000..d66b1a23e --- /dev/null +++ b/tests/coverage/Doctrine_Connection_Common.html @@ -0,0 +1,182 @@ + + + Coverage for Doctrine_Connection_Common + + +

Coverage for Doctrine_Connection_Common

Back to coverage report

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
1<?php +
2/* +
3 *  $Id: Common.php 2702 2007-10-03 21:43:22Z Jonathan.Wage $ +
4 * +
5 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +
6 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +
7 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +
8 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +
9 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +
10 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +
11 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +
12 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +
13 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +
14 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +
15 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +
16 * +
17 * This software consists of voluntary contributions made by many individuals +
18 * and is licensed under the LGPL. For more information, see +
19 * <http://www.phpdoctrine.com>. +
20 */ +
21Doctrine::autoload('Doctrine_Connection'); +
22/** +
23 * standard connection, the parent of pgsql, mysql and sqlite +
24 * +
25 * @package     Doctrine +
26 * @subpackage  Connection +
27 * @link        www.phpdoctrine.com +
28 * @license     http://www.opensource.org/licenses/lgpl-license.php LGPL +
29 * @since       1.0 +
30 * @version     $Revision: 2702 $ +
31 * @author      Konsta Vesterinen <kvesteri@cc.hut.fi> +
32 */ +
33class Doctrine_Connection_Common extends Doctrine_Connection +
34{ +
35    /** +
36     * Adds an driver-specific LIMIT clause to the query +
37     * +
38     * @param string $query +
39     * @param mixed $limit +
40     * @param mixed $offset +
41     */ +
42    public function modifyLimitQuery($query, $limit = false,$offset = false,$isManip=false) +
43    { +
44        $limit = (int) $limit; +
45        $offset = (int) $offset; +
46         +
47        if ($limit && $offset) { +
48            $query .= ' LIMIT ' . $limit . ' OFFSET ' . $offset; +
49        } elseif ($limit && ! $offset) { +
50            $query .= ' LIMIT ' . $limit; +
51        } elseif ( ! $limit && $offset) { +
52            $query .= ' LIMIT 999999999999 OFFSET ' . $offset; +
53        } +
54 +
55        return $query; +
56    } +
57}
\ No newline at end of file diff --git a/tests/coverage/Doctrine_Connection_Exception.html b/tests/coverage/Doctrine_Connection_Exception.html new file mode 100644 index 000000000..443c68563 --- /dev/null +++ b/tests/coverage/Doctrine_Connection_Exception.html @@ -0,0 +1,350 @@ + + + Coverage for Doctrine_Connection_Exception + + +

Coverage for Doctrine_Connection_Exception

Back to coverage report

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
1<?php +
2/* +
3 *  $Id: Exception.php 2702 2007-10-03 21:43:22Z Jonathan.Wage $ +
4 * +
5 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +
6 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +
7 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +
8 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +
9 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +
10 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +
11 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +
12 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +
13 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +
14 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +
15 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +
16 * +
17 * This software consists of voluntary contributions made by many individuals +
18 * and is licensed under the LGPL. For more information, see +
19 * <http://www.phpdoctrine.com>. +
20 */ +
21Doctrine::autoload('Doctrine_Exception'); +
22/** +
23 * Doctrine_Exception +
24 * +
25 * @package     Doctrine +
26 * @subpackage  Connection +
27 * @license     http://www.opensource.org/licenses/lgpl-license.php LGPL +
28 * @link        www.phpdoctrine.com +
29 * @since       1.0 +
30 * @version     $Revision: 2702 $ +
31 * @author      Konsta Vesterinen <kvesteri@cc.hut.fi> +
32 */ +
33class Doctrine_Connection_Exception extends Doctrine_Exception +
34{ +
35    /** +
36     * @var array $errorMessages        an array containing messages for portable error codes +
37     */ +
38    static protected $errorMessages = array( +
39                Doctrine::ERR                    => 'unknown error', +
40                Doctrine::ERR_ALREADY_EXISTS     => 'already exists', +
41                Doctrine::ERR_CANNOT_CREATE      => 'can not create', +
42                Doctrine::ERR_CANNOT_ALTER       => 'can not alter', +
43                Doctrine::ERR_CANNOT_REPLACE     => 'can not replace', +
44                Doctrine::ERR_CANNOT_DELETE      => 'can not delete', +
45                Doctrine::ERR_CANNOT_DROP        => 'can not drop', +
46                Doctrine::ERR_CONSTRAINT         => 'constraint violation', +
47                Doctrine::ERR_CONSTRAINT_NOT_NULL=> 'null value violates not-null constraint', +
48                Doctrine::ERR_DIVZERO            => 'division by zero', +
49                Doctrine::ERR_INVALID            => 'invalid', +
50                Doctrine::ERR_INVALID_DATE       => 'invalid date or time', +
51                Doctrine::ERR_INVALID_NUMBER     => 'invalid number', +
52                Doctrine::ERR_MISMATCH           => 'mismatch', +
53                Doctrine::ERR_NODBSELECTED       => 'no database selected', +
54                Doctrine::ERR_NOSUCHFIELD        => 'no such field', +
55                Doctrine::ERR_NOSUCHTABLE        => 'no such table', +
56                Doctrine::ERR_NOT_CAPABLE        => 'Doctrine backend not capable', +
57                Doctrine::ERR_NOT_FOUND          => 'not found', +
58                Doctrine::ERR_NOT_LOCKED         => 'not locked', +
59                Doctrine::ERR_SYNTAX             => 'syntax error', +
60                Doctrine::ERR_UNSUPPORTED        => 'not supported', +
61                Doctrine::ERR_VALUE_COUNT_ON_ROW => 'value count on row', +
62                Doctrine::ERR_INVALID_DSN        => 'invalid DSN', +
63                Doctrine::ERR_CONNECT_FAILED     => 'connect failed', +
64                Doctrine::ERR_NEED_MORE_DATA     => 'insufficient data supplied', +
65                Doctrine::ERR_EXTENSION_NOT_FOUND=> 'extension not found', +
66                Doctrine::ERR_NOSUCHDB           => 'no such database', +
67                Doctrine::ERR_ACCESS_VIOLATION   => 'insufficient permissions', +
68                Doctrine::ERR_LOADMODULE         => 'error while including on demand module', +
69                Doctrine::ERR_TRUNCATED          => 'truncated', +
70                Doctrine::ERR_DEADLOCK           => 'deadlock detected', +
71                ); +
72    /** +
73     * @see Doctrine::ERR_* constants +
74     * @since 1.0 +
75     * @var integer $portableCode           portable error code +
76     */ +
77    protected $portableCode; +
78    /** +
79     * getPortableCode +
80     * returns portable error code +
81     * +
82     * @return integer      portable error code +
83     */ +
84    public function getPortableCode() +
85    { +
86        return $this->portableCode; +
87    } +
88    /** +
89     * getPortableMessage +
90     * returns portable error message +
91     * +
92     * @return string       portable error message +
93     */ +
94    public function getPortableMessage() +
95    { +
96        return self::errorMessage($this->portableCode); +
97    } +
98    /** +
99     * Return a textual error message for a Doctrine error code +
100     * +
101     * @param   int|array   integer error code, +
102     *                           null to get the current error code-message map, +
103     *                           or an array with a new error code-message map +
104     * +
105     * @return  string  error message, or false if the error code was +
106     *                  not recognized +
107     */ +
108    public function errorMessage($value = null) +
109    { +
110        return isset(self::$errorMessages[$value]) ? +
111           self::$errorMessages[$value] : self::$errorMessages[Doctrine::ERR]; +
112    } +
113}
\ No newline at end of file diff --git a/tests/coverage/Doctrine_Connection_Firebird.html b/tests/coverage/Doctrine_Connection_Firebird.html new file mode 100644 index 000000000..b71088dbb --- /dev/null +++ b/tests/coverage/Doctrine_Connection_Firebird.html @@ -0,0 +1,335 @@ + + + Coverage for Doctrine_Connection_Firebird + + +

Coverage for Doctrine_Connection_Firebird

Back to coverage report

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
1<?php +
2/* +
3 *  $Id: Firebird.php 2702 2007-10-03 21:43:22Z Jonathan.Wage $ +
4 * +
5 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +
6 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +
7 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +
8 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +
9 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +
10 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +
11 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +
12 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +
13 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +
14 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +
15 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +
16 * +
17 * This software consists of voluntary contributions made by many individuals +
18 * and is licensed under the LGPL. For more information, see +
19 * <http://www.phpdoctrine.com>. +
20 */ +
21Doctrine::autoload('Doctrine_Connection'); +
22/** +
23 * Doctrine_Connection_Firebird +
24 * +
25 * @package     Doctrine +
26 * @subpackage  Connection +
27 * @license     http://www.opensource.org/licenses/lgpl-license.php LGPL +
28 * @author      Konsta Vesterinen <kvesteri@cc.hut.fi> +
29 * @author      Lukas Smith <smith@pooteeweet.org> (PEAR MDB2 library) +
30 * @author      Lorenzo Alberton <l.alberton@quipo.it> (PEAR MDB2 Interbase driver) +
31 * @version     $Revision: 2702 $ +
32 * @link        www.phpdoctrine.com +
33 * @since       1.0 +
34 */ +
35class Doctrine_Connection_Firebird extends Doctrine_Connection +
36{ +
37    /** +
38     * @var string $driverName                  the name of this connection driver +
39     */ +
40    protected $driverName = 'Firebird'; +
41    /** +
42     * the constructor +
43     * +
44     * @param Doctrine_Manager $manager +
45     * @param PDO $pdo                          database handle +
46     */ +
47    public function __construct(Doctrine_Manager $manager, $adapter) +
48    { +
49 +
50        $this->supported = array( +
51                          'sequences'             => true, +
52                          'indexes'               => true, +
53                          'affected_rows'         => true, +
54                          'summary_functions'     => true, +
55                          'order_by_text'         => true, +
56                          'transactions'          => true, +
57                          'savepoints'            => true, +
58                          'current_id'            => true, +
59                          'limit_queries'         => 'emulated', +
60                          'LOBs'                  => true, +
61                          'replace'               => 'emulated', +
62                          'sub_selects'           => true, +
63                          'auto_increment'        => true, +
64                          'primary_key'           => true, +
65                          'result_introspection'  => true, +
66                          'prepared_statements'   => true, +
67                          'identifier_quoting'    => false, +
68                          'pattern_escaping'      => true +
69                          ); +
70        // initialize all driver options +
71        /** +
72        $this->options['DBA_username'] = false; +
73        $this->options['DBA_password'] = false; +
74        $this->options['database_path'] = ''; +
75        $this->options['database_extension'] = '.gdb'; +
76        $this->options['server_version'] = ''; +
77        */ +
78        parent::__construct($manager, $adapter); +
79    } +
80    /** +
81     * Set the charset on the current connection +
82     * +
83     * @param string    charset +
84     * +
85     * @return void +
86     */ +
87    public function setCharset($charset) +
88    { +
89        $query = 'SET NAMES '.$this->dbh->quote($charset); +
90        $this->exec($query); +
91    } +
92    /** +
93     * Adds an driver-specific LIMIT clause to the query +
94     * +
95     * @param string $query     query to modify +
96     * @param integer $limit    limit the number of rows +
97     * @param integer $offset   start reading from given offset +
98     * @return string modified  query +
99     */ +
100    public function modifyLimitQuery($query, $limit, $offset) +
101    { +
102        if ($limit > 0) { +
103            $query = preg_replace('/^([\s(])*SELECT(?!\s*FIRST\s*\d+)/i', +
104                "SELECT FIRST $limit SKIP $offset", $query); +
105        } +
106        return $query; +
107    } +
108}
\ No newline at end of file diff --git a/tests/coverage/Doctrine_Connection_Firebird_Exception.html b/tests/coverage/Doctrine_Connection_Firebird_Exception.html new file mode 100644 index 000000000..ff0baa1eb --- /dev/null +++ b/tests/coverage/Doctrine_Connection_Firebird_Exception.html @@ -0,0 +1,413 @@ + + + Coverage for Doctrine_Connection_Firebird_Exception + + +

Coverage for Doctrine_Connection_Firebird_Exception

Back to coverage report

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
1<?php +
2/* +
3 *  $Id: Exception.php 2702 2007-10-03 21:43:22Z Jonathan.Wage $ +
4 * +
5 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +
6 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +
7 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +
8 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +
9 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +
10 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +
11 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +
12 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +
13 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +
14 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +
15 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +
16 * +
17 * This software consists of voluntary contributions made by many individuals +
18 * and is licensed under the LGPL. For more information, see +
19 * <http://www.phpdoctrine.com>. +
20 */ +
21Doctrine::autoload('Doctrine_Connection_Exception'); +
22/** +
23 * Doctrine_Connection_Firebird_Exception +
24 * +
25 * @package     Doctrine +
26 * @subpackage  Connection +
27 * @license     http://www.opensource.org/licenses/lgpl-license.php LGPL +
28 * @link        www.phpdoctrine.com +
29 * @since       1.0 +
30 * @version     $Revision: 2702 $ +
31 * @author      Konsta Vesterinen <kvesteri@cc.hut.fi> +
32 * @author      Lorenzo Alberton <l.alberton@quipo.it> (PEAR MDB2 Interbase driver) +
33 * @author      Lukas Smith <smith@pooteeweet.org> (PEAR MDB2 library) +
34 */ +
35class Doctrine_Connection_Firebird_Exception extends Doctrine_Connection_Exception +
36{ +
37    /** +
38     * @var array $errorCodeMap         an array that is used for determining portable +
39     *                                  error code from a native database error code +
40     */ +
41    protected static $errorCodeMap = array( +
42                                    -104 => Doctrine::ERR_SYNTAX, +
43                                    -150 => Doctrine::ERR_ACCESS_VIOLATION, +
44                                    -151 => Doctrine::ERR_ACCESS_VIOLATION, +
45                                    -155 => Doctrine::ERR_NOSUCHTABLE, +
46                                    -157 => Doctrine::ERR_NOSUCHFIELD, +
47                                    -158 => Doctrine::ERR_VALUE_COUNT_ON_ROW, +
48                                    -170 => Doctrine::ERR_MISMATCH, +
49                                    -171 => Doctrine::ERR_MISMATCH, +
50                                    -172 => Doctrine::ERR_INVALID, +
51                                    // -204 =>  // Covers too many errors, need to use regex on msg +
52                                    -205 => Doctrine::ERR_NOSUCHFIELD, +
53                                    -206 => Doctrine::ERR_NOSUCHFIELD, +
54                                    -208 => Doctrine::ERR_INVALID, +
55                                    -219 => Doctrine::ERR_NOSUCHTABLE, +
56                                    -297 => Doctrine::ERR_CONSTRAINT, +
57                                    -303 => Doctrine::ERR_INVALID, +
58                                    -413 => Doctrine::ERR_INVALID_NUMBER, +
59                                    -530 => Doctrine::ERR_CONSTRAINT, +
60                                    -551 => Doctrine::ERR_ACCESS_VIOLATION, +
61                                    -552 => Doctrine::ERR_ACCESS_VIOLATION, +
62                                    // -607 =>  // Covers too many errors, need to use regex on msg +
63                                    -625 => Doctrine::ERR_CONSTRAINT_NOT_NULL, +
64                                    -803 => Doctrine::ERR_CONSTRAINT, +
65                                    -804 => Doctrine::ERR_VALUE_COUNT_ON_ROW, +
66                                    -904 => Doctrine::ERR_CONNECT_FAILED, +
67                                    -922 => Doctrine::ERR_NOSUCHDB, +
68                                    -923 => Doctrine::ERR_CONNECT_FAILED, +
69                                    -924 => Doctrine::ERR_CONNECT_FAILED +
70                                    ); +
71    /** +
72     * @var array $errorRegexps         an array that is used for determining portable +
73     *                                  error code from a native database error message +
74     */ +
75    protected static $errorRegexps = array( +
76                                    '/generator .* is not defined/' +
77                                        => Doctrine::ERR_SYNTAX,  // for compat. w ibase_errcode() +
78                                    '/table.*(not exist|not found|unknown)/i' +
79                                        => Doctrine::ERR_NOSUCHTABLE, +
80                                    '/table .* already exists/i' +
81                                        => Doctrine::ERR_ALREADY_EXISTS, +
82                                    '/unsuccessful metadata update .* failed attempt to store duplicate value/i' +
83                                        => Doctrine::ERR_ALREADY_EXISTS, +
84                                    '/unsuccessful metadata update .* not found/i' +
85                                        => Doctrine::ERR_NOT_FOUND, +
86                                    '/validation error for column .* value "\*\*\* null/i' +
87                                        => Doctrine::ERR_CONSTRAINT_NOT_NULL, +
88                                    '/violation of [\w ]+ constraint/i' +
89                                        => Doctrine::ERR_CONSTRAINT, +
90                                    '/conversion error from string/i' +
91                                        => Doctrine::ERR_INVALID_NUMBER, +
92                                    '/no permission for/i' +
93                                        => Doctrine::ERR_ACCESS_VIOLATION, +
94                                    '/arithmetic exception, numeric overflow, or string truncation/i' +
95                                        => Doctrine::ERR_INVALID, +
96                                    '/table unknown/i' +
97                                        => Doctrine::ERR_NOSUCHTABLE, +
98                                    ); +
99    /** +
100     * This method checks if native error code/message can be +
101     * converted into a portable code and then adds this +
102     * portable error code to errorInfo array and returns the modified array +
103     * +
104     * the portable error code is added at the end of array +
105     * +
106     * @param array $errorInfo      error info array +
107     * @since 1.0 +
108     * @return array +
109     */ +
110    public function processErrorInfo(array $errorInfo) +
111    { +
112            /** +
113            // todo: are the following lines needed? +
114            // memo for the interbase php module hackers: we need something similar +
115            // to mysql_errno() to retrieve error codes instead of this ugly hack +
116            if (preg_match('/^([^0-9\-]+)([0-9\-]+)\s+(.*)$/', $native_msg, $m)) { +
117                $native_code = (int)$m[2]; +
118            } else { +
119                $native_code = null; +
120            } +
121            */ +
122 +
123        foreach (self::$errorRegexps as $regexp => $code) { +
124            if (preg_match($regexp, $errorInfo[2])) { +
125                $errorInfo[3] = $code; +
126                break; +
127            } +
128        } +
129        if (isset(self::$errorCodeMap[$errorInfo[1]])) { +
130            $errorInfo[3] = self::$errorCodeMap[$errorInfo[1]]; +
131        } +
132        return $errorInfo; +
133    } +
134}
\ No newline at end of file diff --git a/tests/coverage/Doctrine_Connection_Module.html b/tests/coverage/Doctrine_Connection_Module.html new file mode 100644 index 000000000..e07228896 --- /dev/null +++ b/tests/coverage/Doctrine_Connection_Module.html @@ -0,0 +1,245 @@ + + + Coverage for Doctrine_Connection_Module + + +

Coverage for Doctrine_Connection_Module

Back to coverage report

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
1<?php +
2/* +
3 *  $Id: Module.php 2702 2007-10-03 21:43:22Z Jonathan.Wage $ +
4 * +
5 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +
6 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +
7 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +
8 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +
9 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +
10 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +
11 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +
12 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +
13 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +
14 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +
15 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +
16 * +
17 * This software consists of voluntary contributions made by many individuals +
18 * and is licensed under the LGPL. For more information, see +
19 * <http://www.phpdoctrine.com>. +
20 */ +
21/** +
22 * Doctrine_Connection_Module +
23 * +
24 * @package     Doctrine +
25 * @subpackage  Connection +
26 * @license     http://www.opensource.org/licenses/lgpl-license.php LGPL +
27 * @link        www.phpdoctrine.com +
28 * @since       1.0 +
29 * @version     $Revision: 2702 $ +
30 * @author      Konsta Vesterinen <kvesteri@cc.hut.fi> +
31 */ +
32class Doctrine_Connection_Module +
33{ +
34    /** +
35     * @var Doctrine_Connection $conn       Doctrine_Connection object, every connection +
36     *                                      module holds an instance of Doctrine_Connection +
37     */ +
38    protected $conn; +
39    /** +
40     * @var string $moduleName              the name of this module +
41     */ +
42    protected $moduleName; +
43    /** +
44     * @param Doctrine_Connection $conn     Doctrine_Connection object, every connection +
45     *                                      module holds an instance of Doctrine_Connection +
46     */ +
47    public function __construct($conn = null) +
48    { +
49        if ( ! ($conn instanceof Doctrine_Connection)) { +
50            $conn = Doctrine_Manager::getInstance()->getCurrentConnection(); +
51        } +
52        $this->conn = $conn; +
53 +
54        $e = explode('_', get_class($this)); +
55 +
56        $this->moduleName = $e[1]; +
57    } +
58    /** +
59     * getConnection +
60     * returns the connection object this module uses +
61     * +
62     * @return Doctrine_Connection +
63     */ +
64    public function getConnection() +
65    { +
66        return $this->conn; +
67    } +
68    /** +
69     * getModuleName +
70     * returns the name of this module +
71     * +
72     * @return string       the name of this module +
73     */ +
74    public function getModuleName() +
75    { +
76        return $this->moduleName; +
77    } +
78}
\ No newline at end of file diff --git a/tests/coverage/Doctrine_Connection_Mssql.html b/tests/coverage/Doctrine_Connection_Mssql.html new file mode 100644 index 000000000..d9f2824a7 --- /dev/null +++ b/tests/coverage/Doctrine_Connection_Mssql.html @@ -0,0 +1,578 @@ + + + Coverage for Doctrine_Connection_Mssql + + +

Coverage for Doctrine_Connection_Mssql

Back to coverage report

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
1<?php +
2/* +
3 *  $Id: Mssql.php 2702 2007-10-03 21:43:22Z Jonathan.Wage $ +
4 * +
5 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +
6 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +
7 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +
8 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +
9 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +
10 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +
11 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +
12 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +
13 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +
14 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +
15 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +
16 * +
17 * This software consists of voluntary contributions made by many individuals +
18 * and is licensed under the LGPL. For more information, see +
19 * <http://www.phpdoctrine.com>. +
20 */ +
21Doctrine::autoload('Doctrine_Connection'); +
22/** +
23 * Doctrine_Connection_Mssql +
24 * +
25 * @package     Doctrine +
26 * @subpackage  Connection +
27 * @license     http://www.opensource.org/licenses/lgpl-license.php LGPL +
28 * @author      Konsta Vesterinen <kvesteri@cc.hut.fi> +
29 * @author      Lukas Smith <smith@pooteeweet.org> (PEAR MDB2 library) +
30 * @version     $Revision: 2702 $ +
31 * @link        www.phpdoctrine.com +
32 * @since       1.0 +
33 */ +
34class Doctrine_Connection_Mssql extends Doctrine_Connection +
35{ +
36    /** +
37     * @var string $driverName                  the name of this connection driver +
38     */ +
39    protected $driverName = 'Mssql'; +
40    /** +
41     * the constructor +
42     * +
43     * @param Doctrine_Manager $manager +
44     * @param PDO $pdo                          database handle +
45     */ +
46    public function __construct(Doctrine_Manager $manager, $adapter) +
47    { +
48        // initialize all driver options +
49        $this->supported = array( +
50                          'sequences'             => 'emulated', +
51                          'indexes'               => true, +
52                          'affected_rows'         => true, +
53                          'transactions'          => true, +
54                          'summary_functions'     => true, +
55                          'order_by_text'         => true, +
56                          'current_id'            => 'emulated', +
57                          'limit_queries'         => 'emulated', +
58                          'LOBs'                  => true, +
59                          'replace'               => 'emulated', +
60                          'sub_selects'           => true, +
61                          'auto_increment'        => true, +
62                          'primary_key'           => true, +
63                          'result_introspection'  => true, +
64                          'prepared_statements'   => 'emulated', +
65                          ); +
66 +
67        parent::__construct($manager, $adapter); +
68    } +
69    /** +
70     * quoteIdentifier +
71     * Quote a string so it can be safely used as a table / column name +
72     * +
73     * Quoting style depends on which database driver is being used. +
74     * +
75     * @param string $identifier    identifier name to be quoted +
76     * @param bool   $checkOption   check the 'quote_identifier' option +
77     * +
78     * @return string  quoted identifier string +
79     */ +
80    public function quoteIdentifier($identifier, $checkOption = false) +
81    { +
82        if ($checkOption && ! $this->getAttribute(Doctrine::ATTR_QUOTE_IDENTIFIER)) { +
83            return $identifier; +
84        } +
85        return '[' . str_replace(']', ']]', $identifier) . ']'; +
86    } +
87    /** +
88     * Adds an adapter-specific LIMIT clause to the SELECT statement. +
89     * [ borrowed from Zend Framework ] +
90     * +
91     * @param string $query +
92     * @param mixed $limit +
93     * @param mixed $offset +
94     * @link http://lists.bestpractical.com/pipermail/rt-devel/2005-June/007339.html +
95     * @return string +
96     */ +
97    public function modifyLimitQuery($query, $limit, $offset, $isManip = false) +
98    { +
99        if ($limit > 0) { +
100            $count = intval($limit); +
101 +
102            $offset = intval($offset); +
103            if ($offset < 0) { +
104                throw new Doctrine_Connection_Exception("LIMIT argument offset=$offset is not valid"); +
105            } +
106     +
107            $orderby = stristr($query, 'ORDER BY'); +
108            if ($orderby !== false) { +
109                $sort = (stripos($orderby, 'desc') !== false) ? 'desc' : 'asc'; +
110                $order = str_ireplace('ORDER BY', '', $orderby); +
111                $order = trim(preg_replace('/ASC|DESC/i', '', $order)); +
112            } +
113     +
114            $query = preg_replace('/^SELECT\s/i', 'SELECT TOP ' . ($count+$offset) . ' ', $query); +
115     +
116            $query = 'SELECT * FROM (SELECT TOP ' . $count . ' * FROM (' . $query . ') AS inner_tbl'; +
117            if ($orderby !== false) { +
118                $query .= ' ORDER BY ' . $order . ' '; +
119                $query .= (stripos($sort, 'asc') !== false) ? 'DESC' : 'ASC'; +
120            } +
121            $query .= ') AS outer_tbl'; +
122            if ($orderby !== false) { +
123                $query .= ' ORDER BY ' . $order . ' ' . $sort; +
124            } +
125     +
126            return $query; +
127 +
128        } +
129 +
130        return $query; +
131    } +
132    /** +
133     * return version information about the server +
134     * +
135     * @param bool   $native  determines if the raw version string should be returned +
136     * @return mixed array/string with version information or MDB2 error object +
137     */ +
138    public function getServerVersion($native = false) +
139    { +
140        if ($this->serverInfo) { +
141            $serverInfo = $this->serverInfo; +
142        } else { +
143            $query      = 'SELECT @@VERSION'; +
144            $serverInfo = $this->fetchOne($query); +
145        } +
146        // cache server_info +
147        $this->serverInfo = $serverInfo; +
148        if ( ! $native) { +
149            if (preg_match('/([0-9]+)\.([0-9]+)\.([0-9]+)/', $serverInfo, $tmp)) { +
150                $serverInfo = array( +
151                    'major' => $tmp[1], +
152                    'minor' => $tmp[2], +
153                    'patch' => $tmp[3], +
154                    'extra' => null, +
155                    'native' => $serverInfo, +
156                ); +
157            } else { +
158                $serverInfo = array( +
159                    'major' => null, +
160                    'minor' => null, +
161                    'patch' => null, +
162                    'extra' => null, +
163                    'native' => $serverInfo, +
164                ); +
165            } +
166        } +
167        return $serverInfo; +
168    } +
169    /** +
170     * Checks if there's a sequence that exists. +
171     * +
172     * @param  string $seq_name     The sequence name to verify. +
173     * @return boolean              The value if the table exists or not +
174     */ +
175    public function checkSequence($seqName) +
176    { +
177        $query = 'SELECT * FROM ' . $seqName; +
178        try { +
179            $this->exec($query); +
180        } catch(Doctrine_Connection_Exception $e) { +
181            if ($e->getPortableCode() == Doctrine::ERR_NOSUCHTABLE) { +
182                return false; +
183            } +
184 +
185            throw $e; +
186        } +
187        return true; +
188    } +
189}
\ No newline at end of file diff --git a/tests/coverage/Doctrine_Connection_Mssql_Exception.html b/tests/coverage/Doctrine_Connection_Mssql_Exception.html new file mode 100644 index 000000000..676fd2a70 --- /dev/null +++ b/tests/coverage/Doctrine_Connection_Mssql_Exception.html @@ -0,0 +1,233 @@ + + + Coverage for Doctrine_Connection_Mssql_Exception + + +

Coverage for Doctrine_Connection_Mssql_Exception

Back to coverage report

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
1<?php +
2/* +
3 *  $Id: Exception.php 2702 2007-10-03 21:43:22Z Jonathan.Wage $ +
4 * +
5 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +
6 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +
7 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +
8 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +
9 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +
10 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +
11 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +
12 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +
13 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +
14 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +
15 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +
16 * +
17 * This software consists of voluntary contributions made by many individuals +
18 * and is licensed under the LGPL. For more information, see +
19 * <http://www.phpdoctrine.com>. +
20 */ +
21Doctrine::autoload('Doctrine_Connection_Exception'); +
22/** +
23 * Doctrine_Connection_Mssql_Exception +
24 * +
25 * @package     Doctrine +
26 * @subpackage  Connection +
27 * @license     http://www.opensource.org/licenses/lgpl-license.php LGPL +
28 * @author      Konsta Vesterinen <kvesteri@cc.hut.fi> +
29 * @author      Lukas Smith <smith@pooteeweet.org> (PEAR MDB2 library) +
30 * @since       1.0 +
31 * @version     $Revision: 2702 $ +
32 * @link        www.phpdoctrine.com +
33 */ +
34class Doctrine_Connection_Mssql_Exception extends Doctrine_Connection_Exception +
35{ +
36    /** +
37     * @var array $errorCodeMap         an array that is used for determining portable +
38     *                                  error code from a native database error code +
39     */ +
40    protected static $errorCodeMap = array( +
41                                      110   => Doctrine::ERR_VALUE_COUNT_ON_ROW, +
42                                      155   => Doctrine::ERR_NOSUCHFIELD, +
43                                      170   => Doctrine::ERR_SYNTAX, +
44                                      207   => Doctrine::ERR_NOSUCHFIELD, +
45                                      208   => Doctrine::ERR_NOSUCHTABLE, +
46                                      245   => Doctrine::ERR_INVALID_NUMBER, +
47                                      515   => Doctrine::ERR_CONSTRAINT_NOT_NULL, +
48                                      547   => Doctrine::ERR_CONSTRAINT, +
49                                      1913  => Doctrine::ERR_ALREADY_EXISTS, +
50                                      2627  => Doctrine::ERR_CONSTRAINT, +
51                                      2714  => Doctrine::ERR_ALREADY_EXISTS, +
52                                      3701  => Doctrine::ERR_NOSUCHTABLE, +
53                                      8134  => Doctrine::ERR_DIVZERO, +
54                                      ); +
55    /** +
56     * This method checks if native error code/message can be +
57     * converted into a portable code and then adds this +
58     * portable error code to $portableCode field +
59     * +
60     * @param array $errorInfo      error info array +
61     * @since 1.0 +
62     * @return boolean              whether or not the error info processing was successfull +
63     *                              (the process is successfull if portable error code was found) +
64     */ +
65    public function processErrorInfo(array $errorInfo) +
66    { +
67        $code = $errorInfo[1]; +
68        if (isset(self::$errorCodeMap[$code])) { +
69            $this->portableCode = self::$errorCodeMap[$code]; +
70            return true; +
71        } +
72        return false; +
73    } +
74}
\ No newline at end of file diff --git a/tests/coverage/Doctrine_Connection_Mysql.html b/tests/coverage/Doctrine_Connection_Mysql.html new file mode 100644 index 000000000..2436ad027 --- /dev/null +++ b/tests/coverage/Doctrine_Connection_Mysql.html @@ -0,0 +1,632 @@ + + + Coverage for Doctrine_Connection_Mysql + + +

Coverage for Doctrine_Connection_Mysql

Back to coverage report

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
1<?php +
2/* +
3 *  $Id: Mysql.php 2702 2007-10-03 21:43:22Z Jonathan.Wage $ +
4 * +
5 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +
6 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +
7 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +
8 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +
9 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +
10 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +
11 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +
12 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +
13 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +
14 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +
15 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +
16 * +
17 * This software consists of voluntary contributions made by many individuals +
18 * and is licensed under the LGPL. For more information, see +
19 * <http://www.phpdoctrine.com>. +
20 */ +
21Doctrine::autoload('Doctrine_Connection_Common'); +
22/** +
23 * Doctrine_Connection_Mysql +
24 * +
25 * @package     Doctrine +
26 * @subpackage  Connection +
27 * @license     http://www.opensource.org/licenses/lgpl-license.php LGPL +
28 * @author      Konsta Vesterinen <kvesteri@cc.hut.fi> +
29 * @author      Lukas Smith <smith@pooteeweet.org> (PEAR MDB2 library) +
30 * @version     $Revision: 2702 $ +
31 * @link        www.phpdoctrine.com +
32 * @since       1.0 +
33 */ +
34class Doctrine_Connection_Mysql extends Doctrine_Connection_Common +
35{ +
36    /** +
37     * @var string $driverName                  the name of this connection driver +
38     */ +
39    protected $driverName = 'Mysql'; +
40    /** +
41     * the constructor +
42     * +
43     * @param Doctrine_Manager $manager +
44     * @param PDO|Doctrine_Adapter $adapter     database handler +
45     */ +
46    public function __construct(Doctrine_Manager $manager, $adapter) +
47    { +
48        $this->setAttribute(PDO::ATTR_EMULATE_PREPARES, true); +
49        $this->setAttribute(Doctrine::ATTR_DEFAULT_TABLE_TYPE, 'INNODB'); +
50 +
51        $this->supported = array( +
52                          'sequences'            => 'emulated', +
53                          'indexes'              => true, +
54                          'affected_rows'        => true, +
55                          'transactions'         => true, +
56                          'savepoints'           => false, +
57                          'summary_functions'    => true, +
58                          'order_by_text'        => true, +
59                          'current_id'           => 'emulated', +
60                          'limit_queries'        => true, +
61                          'LOBs'                 => true, +
62                          'replace'              => true, +
63                          'sub_selects'          => true, +
64                          'auto_increment'       => true, +
65                          'primary_key'          => true, +
66                          'result_introspection' => true, +
67                          'prepared_statements'  => 'emulated', +
68                          'identifier_quoting'   => true, +
69                          'pattern_escaping'     => true +
70                          ); +
71 +
72        $this->properties['string_quoting'] = array('start' => "'", +
73                                                    'end' => "'", +
74                                                    'escape' => '\\', +
75                                                    'escape_pattern' => '\\'); +
76 +
77        $this->properties['identifier_quoting'] = array('start' => '`', +
78                                                        'end' => '`', +
79                                                        'escape' => '`'); +
80 +
81        $this->properties['sql_comments'] = array( +
82                                            array('start' => '-- ', 'end' => "\n", 'escape' => false), +
83                                            array('start' => '#', 'end' => "\n", 'escape' => false), +
84                                            array('start' => '/*', 'end' => '*/', 'escape' => false), +
85                                            ); +
86 +
87        $this->properties['varchar_max_length'] = 255; +
88 +
89        parent::__construct($manager, $adapter); +
90    } +
91    /** +
92     * Set the charset on the current connection +
93     * +
94     * @param string    charset +
95     * +
96     * @return void +
97     */ +
98    public function setCharset($charset) +
99    { +
100        $query = 'SET NAMES '.$this->dbh->quote($charset); +
101        $this->exec($query); +
102    } +
103    /** +
104     * Execute a SQL REPLACE query. A REPLACE query is identical to a INSERT +
105     * query, except that if there is already a row in the table with the same +
106     * key field values, the REPLACE query just updates its values instead of +
107     * inserting a new row. +
108     * +
109     * The REPLACE type of query does not make part of the SQL standards. Since +
110     * practically only MySQL implements it natively, this type of query is +
111     * emulated through this method for other DBMS using standard types of +
112     * queries inside a transaction to assure the atomicity of the operation. +
113     * +
114     * @access public +
115     * +
116     * @param string $table name of the table on which the REPLACE query will +
117     *  be executed. +
118     * @param array $fields associative array that describes the fields and the +
119     *  values that will be inserted or updated in the specified table. The +
120     *  indexes of the array are the names of all the fields of the table. The +
121     *  values of the array are also associative arrays that describe the +
122     *  values and other properties of the table fields. +
123     * +
124     *  Here follows a list of field properties that need to be specified: +
125     * +
126     *    value: +
127     *          Value to be assigned to the specified field. This value may be +
128     *          of specified in database independent type format as this +
129     *          function can perform the necessary datatype conversions. +
130     * +
131     *    Default: +
132     *          this property is required unless the Null property +
133     *          is set to 1. +
134     * +
135     *    type +
136     *          Name of the type of the field. Currently, all types Metabase +
137     *          are supported except for clob and blob. +
138     * +
139     *    Default: no type conversion +
140     * +
141     *    null +
142     *          Boolean property that indicates that the value for this field +
143     *          should be set to null. +
144     * +
145     *          The default value for fields missing in INSERT queries may be +
146     *          specified the definition of a table. Often, the default value +
147     *          is already null, but since the REPLACE may be emulated using +
148     *          an UPDATE query, make sure that all fields of the table are +
149     *          listed in this function argument array. +
150     * +
151     *    Default: 0 +
152     * +
153     *    key +
154     *          Boolean property that indicates that this field should be +
155     *          handled as a primary key or at least as part of the compound +
156     *          unique index of the table that will determine the row that will +
157     *          updated if it exists or inserted a new row otherwise. +
158     * +
159     *          This function will fail if no key field is specified or if the +
160     *          value of a key field is set to null because fields that are +
161     *          part of unique index they may not be null. +
162     * +
163     *    Default: 0 +
164     * +
165     * @return integer      the number of affected rows +
166     */ +
167    public function replace($table, array $fields, array $keys) +
168    { +
169        $count = count($fields); +
170        $query = $values = ''; +
171        $keys = $colnum = 0; +
172 +
173        for (reset($fields); $colnum < $count; next($fields), $colnum++) { +
174            $name = key($fields); +
175 +
176            if ($colnum > 0) { +
177                $query .= ','; +
178                $values.= ','; +
179            } +
180 +
181            $query .= $name; +
182 +
183            if (isset($fields[$name]['null']) && $fields[$name]['null']) { +
184                $value = 'NULL'; +
185            } else { +
186                $type = isset($fields[$name]['type']) ? $fields[$name]['type'] : null; +
187                $value = $this->quote($fields[$name]['value'], $type); +
188            } +
189 +
190            $values .= $value; +
191 +
192            if (isset($fields[$name]['key']) && $fields[$name]['key']) { +
193                if ($value === 'NULL') { +
194                    throw new Doctrine_Connection_Mysql_Exception('key value '.$name.' may not be NULL'); +
195                } +
196                $keys++; +
197            } +
198        } +
199 +
200        if ($keys == 0) { +
201            throw new Doctrine_Connection_Mysql_Exception('not specified which fields are keys'); +
202        } +
203        $query = 'REPLACE INTO ' . $table . ' (' . $query . ') VALUES (' . $values . ')'; +
204 +
205        return $this->exec($query); +
206    } +
207}
\ No newline at end of file diff --git a/tests/coverage/Doctrine_Connection_Mysql_Exception.html b/tests/coverage/Doctrine_Connection_Mysql_Exception.html new file mode 100644 index 000000000..7300171ed --- /dev/null +++ b/tests/coverage/Doctrine_Connection_Mysql_Exception.html @@ -0,0 +1,263 @@ + + + Coverage for Doctrine_Connection_Mysql_Exception + + +

Coverage for Doctrine_Connection_Mysql_Exception

Back to coverage report

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
1<?php +
2/* +
3 *  $Id: Exception.php 2702 2007-10-03 21:43:22Z Jonathan.Wage $ +
4 * +
5 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +
6 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +
7 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +
8 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +
9 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +
10 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +
11 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +
12 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +
13 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +
14 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +
15 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +
16 * +
17 * This software consists of voluntary contributions made by many individuals +
18 * and is licensed under the LGPL. For more information, see +
19 * <http://www.phpdoctrine.com>. +
20 */ +
21Doctrine::autoload('Doctrine_Connection_Exception'); +
22/** +
23 * Doctrine_Connection_Mysql_Exception +
24 * +
25 * @package     Doctrine +
26 * @subpackage  Connection +
27 * @license     http://www.opensource.org/licenses/lgpl-license.php LGPL +
28 * @author      Konsta Vesterinen <kvesteri@cc.hut.fi> +
29 * @author      Lukas Smith <smith@pooteeweet.org> (PEAR MDB2 library) +
30 * @since       1.0 +
31 * @version     $Revision: 2702 $ +
32 * @link        www.phpdoctrine.com +
33 */ +
34class Doctrine_Connection_Mysql_Exception extends Doctrine_Connection_Exception +
35{ +
36    /** +
37     * @var array $errorCodeMap         an array that is used for determining portable +
38     *                                  error code from a native database error code +
39     */ +
40    protected static $errorCodeMap = array( +
41                                      1004 => Doctrine::ERR_CANNOT_CREATE, +
42                                      1005 => Doctrine::ERR_CANNOT_CREATE, +
43                                      1006 => Doctrine::ERR_CANNOT_CREATE, +
44                                      1007 => Doctrine::ERR_ALREADY_EXISTS, +
45                                      1008 => Doctrine::ERR_CANNOT_DROP, +
46                                      1022 => Doctrine::ERR_ALREADY_EXISTS, +
47                                      1044 => Doctrine::ERR_ACCESS_VIOLATION, +
48                                      1046 => Doctrine::ERR_NODBSELECTED, +
49                                      1048 => Doctrine::ERR_CONSTRAINT, +
50                                      1049 => Doctrine::ERR_NOSUCHDB, +
51                                      1050 => Doctrine::ERR_ALREADY_EXISTS, +
52                                      1051 => Doctrine::ERR_NOSUCHTABLE, +
53                                      1054 => Doctrine::ERR_NOSUCHFIELD, +
54                                      1061 => Doctrine::ERR_ALREADY_EXISTS, +
55                                      1062 => Doctrine::ERR_ALREADY_EXISTS, +
56                                      1064 => Doctrine::ERR_SYNTAX, +
57                                      1091 => Doctrine::ERR_NOT_FOUND, +
58                                      1100 => Doctrine::ERR_NOT_LOCKED, +
59                                      1136 => Doctrine::ERR_VALUE_COUNT_ON_ROW, +
60                                      1142 => Doctrine::ERR_ACCESS_VIOLATION, +
61                                      1146 => Doctrine::ERR_NOSUCHTABLE, +
62                                      1216 => Doctrine::ERR_CONSTRAINT, +
63                                      1217 => Doctrine::ERR_CONSTRAINT, +
64                                      ); +
65    /** +
66     * This method checks if native error code/message can be +
67     * converted into a portable code and then adds this +
68     * portable error code to $portableCode field +
69     * +
70     * @param array $errorInfo      error info array +
71     * @since 1.0 +
72     * @return boolean              whether or not the error info processing was successfull +
73     *                              (the process is successfull if portable error code was found) +
74     */ +
75    public function processErrorInfo(array $errorInfo) +
76    { +
77        $code = $errorInfo[1]; +
78        if (isset(self::$errorCodeMap[$code])) { +
79            $this->portableCode = self::$errorCodeMap[$code]; +
80            return true; +
81        } +
82        return false; +
83    } +
84}
\ No newline at end of file diff --git a/tests/coverage/Doctrine_Connection_Oracle.html b/tests/coverage/Doctrine_Connection_Oracle.html new file mode 100644 index 000000000..705bdb87f --- /dev/null +++ b/tests/coverage/Doctrine_Connection_Oracle.html @@ -0,0 +1,359 @@ + + + Coverage for Doctrine_Connection_Oracle + + +

Coverage for Doctrine_Connection_Oracle

Back to coverage report

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
1<?php +
2/* +
3 *  $Id: Oracle.php 2702 2007-10-03 21:43:22Z Jonathan.Wage $ +
4 * +
5 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +
6 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +
7 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +
8 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +
9 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +
10 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +
11 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +
12 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +
13 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +
14 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +
15 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +
16 * +
17 * This software consists of voluntary contributions made by many individuals +
18 * and is licensed under the LGPL. For more information, see +
19 * <http://www.phpdoctrine.com>. +
20 */ +
21Doctrine::autoload('Doctrine_Connection'); +
22/** +
23 * Doctrine_Connection_Oracle +
24 * +
25 * @package     Doctrine +
26 * @subpackage  Connection +
27 * @license     http://www.opensource.org/licenses/lgpl-license.php LGPL +
28 * @link        www.phpdoctrine.com +
29 * @since       1.0 +
30 * @version     $Revision: 2702 $ +
31 * @author      Konsta Vesterinen <kvesteri@cc.hut.fi> +
32 */ +
33class Doctrine_Connection_Oracle extends Doctrine_Connection +
34{ +
35    /** +
36     * @var string $driverName                  the name of this connection driver +
37     */ +
38    protected $driverName = 'Oracle'; +
39 +
40    public function __construct(Doctrine_Manager $manager, $adapter) +
41    { +
42        $this->supported = array( +
43                          'sequences'            => true, +
44                          'indexes'              => true, +
45                          'summary_functions'    => true, +
46                          'order_by_text'        => true, +
47                          'current_id'           => true, +
48                          'affected_rows'        => true, +
49                          'transactions'         => true, +
50                          'savepoints'           => true, +
51                          'limit_queries'        => true, +
52                          'LOBs'                 => true, +
53                          'replace'              => 'emulated', +
54                          'sub_selects'          => true, +
55                          'auto_increment'       => false, // implementation is broken +
56                          'primary_key'          => true, +
57                          'result_introspection' => true, +
58                          'prepared_statements'  => true, +
59                          'identifier_quoting'   => true, +
60                          'pattern_escaping'     => true, +
61                          ); +
62        /** +
63        $this->options['DBA_username'] = false; +
64        $this->options['DBA_password'] = false; +
65        $this->options['database_name_prefix'] = false; +
66        $this->options['emulate_database'] = true; +
67        $this->options['default_tablespace'] = false; +
68        $this->options['default_text_field_length'] = 2000; +
69        $this->options['result_prefetching'] = false; +
70        */ +
71        parent::__construct($manager, $adapter); +
72    } +
73    /** +
74     * Sets up the date/time format +
75     * +
76     */ +
77    public function setDateFormat($format = 'YYYY-MM-DD HH24:MI:SS') +
78    { +
79      $this->exec('ALTER SESSION SET NLS_DATE_FORMAT = "' . $format . '"'); +
80    } +
81    /** +
82     * Adds an driver-specific LIMIT clause to the query +
83     * +
84     * @param string $query         query to modify +
85     * @param integer $limit        limit the number of rows +
86     * @param integer $offset       start reading from given offset +
87     * @return string               the modified query +
88     */ +
89    public function modifyLimitQuery($query, $limit, $offset) +
90    { +
91        /** +
92        $e      = explode("select ",strtolower($query)); +
93        $e2     = explode(" from ",$e[1]); +
94        $fields = $e2[0]; +
95        */ +
96        $limit = (int) $limit; +
97        $offset = (int) $offset; +
98        if (preg_match('/^\s*SELECT/i', $query)) { +
99            if ( ! preg_match('/\sFROM\s/i', $query)) { +
100                $query .= " FROM dual"; +
101            } +
102            if ($limit > 0) { +
103                // taken from http://svn.ez.no/svn/ezcomponents/packages/Database +
104                $max = $offset + $limit; +
105                if ($offset > 0) { +
106                    $min = $offset + 1; +
107                    $query = 'SELECT * FROM (SELECT a.*, ROWNUM dctrn_rownum FROM (' . $query +
108                           . ') a WHERE ROWNUM <= ' . $max . ') WHERE dctrn_rownum >= ' . $min; +
109                } else { +
110                    $query = 'SELECT a.* FROM (' . $query .') a WHERE ROWNUM <= ' . $max; +
111                } +
112            } +
113        } +
114        return $query; +
115    } +
116}
\ No newline at end of file diff --git a/tests/coverage/Doctrine_Connection_Oracle_Exception.html b/tests/coverage/Doctrine_Connection_Oracle_Exception.html new file mode 100644 index 000000000..e1551038d --- /dev/null +++ b/tests/coverage/Doctrine_Connection_Oracle_Exception.html @@ -0,0 +1,248 @@ + + + Coverage for Doctrine_Connection_Oracle_Exception + + +

Coverage for Doctrine_Connection_Oracle_Exception

Back to coverage report

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
1<?php +
2/* +
3 *  $Id: Exception.php 2702 2007-10-03 21:43:22Z Jonathan.Wage $ +
4 * +
5 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +
6 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +
7 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +
8 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +
9 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +
10 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +
11 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +
12 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +
13 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +
14 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +
15 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +
16 * +
17 * This software consists of voluntary contributions made by many individuals +
18 * and is licensed under the LGPL. For more information, see +
19 * <http://www.phpdoctrine.com>. +
20 */ +
21Doctrine::autoload('Doctrine_Connection_Exception'); +
22/** +
23 * Doctrine_Connection_Oracle_Exception +
24 * +
25 * @package     Doctrine +
26 * @subpackage  Connection +
27 * @license     http://www.opensource.org/licenses/lgpl-license.php LGPL +
28 * @author      Konsta Vesterinen <kvesteri@cc.hut.fi> +
29 * @author      Lukas Smith <smith@pooteeweet.org> (PEAR MDB2 library) +
30 * @since       1.0 +
31 * @version     $Revision: 2702 $ +
32 * @link        www.phpdoctrine.com +
33 */ +
34class Doctrine_Connection_Oracle_Exception extends Doctrine_Connection_Exception +
35{ +
36    /** +
37     * @var array $errorCodeMap         an array that is used for determining portable +
38     *                                  error code from a native database error code +
39     */ +
40    protected static $errorCodeMap = array( +
41                                      1    => Doctrine::ERR_CONSTRAINT, +
42                                      900  => Doctrine::ERR_SYNTAX, +
43                                      904  => Doctrine::ERR_NOSUCHFIELD, +
44                                      913  => Doctrine::ERR_VALUE_COUNT_ON_ROW, +
45                                      921  => Doctrine::ERR_SYNTAX, +
46                                      923  => Doctrine::ERR_SYNTAX, +
47                                      942  => Doctrine::ERR_NOSUCHTABLE, +
48                                      955  => Doctrine::ERR_ALREADY_EXISTS, +
49                                      1400 => Doctrine::ERR_CONSTRAINT_NOT_NULL, +
50                                      1401 => Doctrine::ERR_INVALID, +
51                                      1407 => Doctrine::ERR_CONSTRAINT_NOT_NULL, +
52                                      1418 => Doctrine::ERR_NOT_FOUND, +
53                                      1476 => Doctrine::ERR_DIVZERO, +
54                                      1722 => Doctrine::ERR_INVALID_NUMBER, +
55                                      2289 => Doctrine::ERR_NOSUCHTABLE, +
56                                      2291 => Doctrine::ERR_CONSTRAINT, +
57                                      2292 => Doctrine::ERR_CONSTRAINT, +
58                                      2449 => Doctrine::ERR_CONSTRAINT, +
59                                      ); +
60    /** +
61     * This method checks if native error code/message can be +
62     * converted into a portable code and then adds this +
63     * portable error code to $portableCode field +
64     * +
65     * @param array $errorInfo      error info array +
66     * @since 1.0 +
67     * @return boolean              whether or not the error info processing was successfull +
68     *                              (the process is successfull if portable error code was found) +
69     */ +
70    public function processErrorInfo(array $errorInfo) +
71    { +
72        $code = $errorInfo[1]; +
73        if (isset(self::$errorCodeMap[$code])) { +
74            $this->portableCode = self::$errorCodeMap[$code]; +
75            return true; +
76        } +
77        return false; +
78    } +
79}
\ No newline at end of file diff --git a/tests/coverage/Doctrine_Connection_Pgsql.html b/tests/coverage/Doctrine_Connection_Pgsql.html new file mode 100644 index 000000000..449f62089 --- /dev/null +++ b/tests/coverage/Doctrine_Connection_Pgsql.html @@ -0,0 +1,581 @@ + + + Coverage for Doctrine_Connection_Pgsql + + +

Coverage for Doctrine_Connection_Pgsql

Back to coverage report

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
1<?php +
2/* +
3 *  $Id: Pgsql.php 2702 2007-10-03 21:43:22Z Jonathan.Wage $ +
4 * +
5 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +
6 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +
7 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +
8 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +
9 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +
10 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +
11 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +
12 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +
13 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +
14 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +
15 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +
16 * +
17 * This software consists of voluntary contributions made by many individuals +
18 * and is licensed under the LGPL. For more information, see +
19 * <http://www.phpdoctrine.com>. +
20 */ +
21Doctrine::autoload("Doctrine_Connection_Common"); +
22/** +
23 * Doctrine_Connection_Pgsql +
24 * +
25 * @package     Doctrine +
26 * @subpackage  Connection +
27 * @license     http://www.opensource.org/licenses/lgpl-license.php LGPL +
28 * @author      Konsta Vesterinen <kvesteri@cc.hut.fi> +
29 * @author      Lukas Smith <smith@pooteeweet.org> (PEAR MDB2 library) +
30 * @version     $Revision: 2702 $ +
31 * @link        www.phpdoctrine.com +
32 * @since       1.0 +
33 */ +
34class Doctrine_Connection_Pgsql extends Doctrine_Connection_Common +
35{ +
36    /** +
37     * @var string $driverName                  the name of this connection driver +
38     */ +
39    protected $driverName = 'Pgsql'; +
40    /** +
41     * the constructor +
42     * +
43     * @param Doctrine_Manager $manager +
44     * @param PDO $pdo                          database handle +
45     */ +
46    public function __construct(Doctrine_Manager $manager, $adapter) +
47    { +
48        // initialize all driver options +
49        $this->supported = array( +
50                          'sequences'               => true, +
51                          'indexes'                 => true, +
52                          'affected_rows'           => true, +
53                          'summary_functions'       => true, +
54                          'order_by_text'           => true, +
55                          'transactions'            => true, +
56                          'savepoints'              => true, +
57                          'current_id'              => true, +
58                          'limit_queries'           => true, +
59                          'LOBs'                    => true, +
60                          'replace'                 => 'emulated', +
61                          'sub_selects'             => true, +
62                          'auto_increment'          => 'emulated', +
63                          'primary_key'             => true, +
64                          'result_introspection'    => true, +
65                          'prepared_statements'     => true, +
66                          'identifier_quoting'      => true, +
67                          'pattern_escaping'        => true, +
68                          ); +
69 +
70        $this->properties['string_quoting'] = array('start' => "'", +
71                                                    'end' => "'", +
72                                                    'escape' => "'", +
73                                                    'escape_pattern' => '\\'); +
74 +
75        $this->properties['identifier_quoting'] = array('start' => '"', +
76                                                        'end' => '"', +
77                                                        'escape' => '"'); +
78        parent::__construct($manager, $adapter); +
79    } +
80    /** +
81     * Set the charset on the current connection +
82     * +
83     * @param string    charset +
84     * +
85     * @return void +
86     */ +
87    public function setCharset($charset) +
88    { +
89        $query = 'SET NAMES '.$this->dbh->quote($charset); +
90        $this->exec($query); +
91    } +
92    /** +
93     * convertBoolean +
94     * some drivers need the boolean values to be converted into integers +
95     * when using DQL API +
96     * +
97     * This method takes care of that conversion +
98     * +
99     * @param array $item +
100     * @return void +
101     */ +
102    public function convertBooleans($item) +
103    { +
104        if (is_array($item)) { +
105            foreach ($item as $key => $value) { +
106                if (is_bool($value)) { +
107                    $item[$key] = ($value) ? 'true' : 'false'; +
108                } +
109            } +
110        } else { +
111           if (is_bool($item)) { +
112               $item = ($item) ? 'true' : 'false'; +
113           } +
114        } +
115        return $item; +
116    } +
117    /** +
118     * Changes a query string for various DBMS specific reasons +
119     * +
120     * @param string $query         query to modify +
121     * @param integer $limit        limit the number of rows +
122     * @param integer $offset       start reading from given offset +
123     * @param boolean $isManip      if the query is a DML query +
124     * @return string               modified query +
125     */ +
126    public function modifyLimitQuery($query, $limit = false, $offset = false, $isManip = false) +
127    { +
128        if ($limit > 0) { +
129            $query = rtrim($query); +
130 +
131            if (substr($query, -1) == ';') { +
132                $query = substr($query, 0, -1); +
133            } +
134 +
135            if ($isManip) { +
136                $manip = preg_replace('/^(DELETE FROM|UPDATE).*$/', '\\1', $query); +
137                $from  = $match[2]; +
138                $where = $match[3]; +
139                $query = $manip . ' ' . $from . ' WHERE ctid=(SELECT ctid FROM ' +
140                       . $from . ' ' . $where . ' LIMIT ' . $limit . ')'; +
141 +
142            } else { +
143                if ( ! empty($limit)) { +
144                  $query .= ' LIMIT ' . $limit; +
145                } +
146                if ( ! empty($offset)) { +
147                  $query .= ' OFFSET ' . $offset; +
148                } +
149            } +
150        } +
151        return $query; +
152    } +
153    /** +
154     * return version information about the server +
155     * +
156     * @param string $native    determines if the raw version string should be returned +
157     * @return array|string     an array or string with version information +
158     */ +
159    public function getServerVersion($native = false) +
160    { +
161        $query = 'SHOW SERVER_VERSION'; +
162 +
163        $serverInfo = $this->fetchOne($query); +
164 +
165        if ( ! $native) { +
166            $tmp = explode('.', $serverInfo, 3); +
167 +
168            if (empty($tmp[2]) && isset($tmp[1]) +
169                && preg_match('/(\d+)(.*)/', $tmp[1], $tmp2) +
170            ) { +
171                $serverInfo = array( +
172                    'major' => $tmp[0], +
173                    'minor' => $tmp2[1], +
174                    'patch' => null, +
175                    'extra' => $tmp2[2], +
176                    'native' => $serverInfo, +
177                ); +
178            } else { +
179                $serverInfo = array( +
180                    'major' => isset($tmp[0]) ? $tmp[0] : null, +
181                    'minor' => isset($tmp[1]) ? $tmp[1] : null, +
182                    'patch' => isset($tmp[2]) ? $tmp[2] : null, +
183                    'extra' => null, +
184                    'native' => $serverInfo, +
185                ); +
186            } +
187        } +
188        return $serverInfo; +
189    } +
190}
\ No newline at end of file diff --git a/tests/coverage/Doctrine_Connection_Pgsql_Exception.html b/tests/coverage/Doctrine_Connection_Pgsql_Exception.html new file mode 100644 index 000000000..edf682e84 --- /dev/null +++ b/tests/coverage/Doctrine_Connection_Pgsql_Exception.html @@ -0,0 +1,332 @@ + + + Coverage for Doctrine_Connection_Pgsql_Exception + + +

Coverage for Doctrine_Connection_Pgsql_Exception

Back to coverage report

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
1<?php +
2/* +
3 *  $Id: Exception.php 2702 2007-10-03 21:43:22Z Jonathan.Wage $ +
4 * +
5 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +
6 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +
7 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +
8 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +
9 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +
10 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +
11 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +
12 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +
13 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +
14 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +
15 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +
16 * +
17 * This software consists of voluntary contributions made by many individuals +
18 * and is licensed under the LGPL. For more information, see +
19 * <http://www.phpdoctrine.com>. +
20 */ +
21Doctrine::autoload('Doctrine_Connection_Exception'); +
22/** +
23 * Doctrine_Connection_Pgsql_Exception +
24 * +
25 * @package     Doctrine +
26 * @subpackage  Connection +
27 * @license     http://www.opensource.org/licenses/lgpl-license.php LGPL +
28 * @link        www.phpdoctrine.com +
29 * @author      Konsta Vesterinen <kvesteri@cc.hut.fi> +
30 * @author      Paul Cooper <pgc@ucecom.com> (PEAR MDB2 Pgsql driver) +
31 * @author      Lukas Smith <smith@pooteeweet.org> (PEAR MDB2 library) +
32 * @since       1.0 +
33 * @version     $Revision: 2702 $ +
34 */ +
35class Doctrine_Connection_Pgsql_Exception extends Doctrine_Connection_Exception +
36{ +
37    /** +
38     * @var array $errorRegexps         an array that is used for determining portable +
39     *                                  error code from a native database error message +
40     */ +
41    protected static $errorRegexps = array( +
42                                    '/parser: parse error at or near/i' +
43                                        => Doctrine::ERR_SYNTAX, +
44                                    '/syntax error at/' +
45                                        => Doctrine::ERR_SYNTAX, +
46                                    '/column reference .* is ambiguous/i' +
47                                        => Doctrine::ERR_SYNTAX, +
48                                    '/column .* (of relation .*)?does not exist/i' +
49                                        => Doctrine::ERR_NOSUCHFIELD, +
50                                    '/attribute .* not found|relation .* does not have attribute/i' +
51                                        => Doctrine::ERR_NOSUCHFIELD, +
52                                    '/column .* specified in USING clause does not exist in (left|right) table/i' +
53                                        => Doctrine::ERR_NOSUCHFIELD, +
54                                    '/(relation|sequence|table).*does not exist|class .* not found/i' +
55                                        => Doctrine::ERR_NOSUCHTABLE, +
56                                    '/index .* does not exist/' +
57                                        => Doctrine::ERR_NOT_FOUND, +
58                                    '/relation .* already exists/i' +
59                                        => Doctrine::ERR_ALREADY_EXISTS, +
60                                    '/(divide|division) by zero$/i' +
61                                        => Doctrine::ERR_DIVZERO, +
62                                    '/pg_atoi: error in .*: can\'t parse /i' +
63                                        => Doctrine::ERR_INVALID_NUMBER, +
64                                    '/invalid input syntax for( type)? (integer|numeric)/i' +
65                                        => Doctrine::ERR_INVALID_NUMBER, +
66                                    '/value .* is out of range for type \w*int/i' +
67                                        => Doctrine::ERR_INVALID_NUMBER, +
68                                    '/integer out of range/i' +
69                                        => Doctrine::ERR_INVALID_NUMBER, +
70                                    '/value too long for type character/i' +
71                                        => Doctrine::ERR_INVALID, +
72                                    '/permission denied/' +
73                                        => Doctrine::ERR_ACCESS_VIOLATION, +
74                                    '/violates [\w ]+ constraint/' +
75                                        => Doctrine::ERR_CONSTRAINT, +
76                                    '/referential integrity violation/' +
77                                        => Doctrine::ERR_CONSTRAINT, +
78                                    '/violates not-null constraint/' +
79                                        => Doctrine::ERR_CONSTRAINT_NOT_NULL, +
80                                    '/more expressions than target columns/i' +
81                                        => Doctrine::ERR_VALUE_COUNT_ON_ROW, +
82                                ); +
83    /** +
84     * This method checks if native error code/message can be +
85     * converted into a portable code and then adds this +
86     * portable error code to $portableCode field +
87     * +
88     * the portable error code is added at the end of array +
89     * +
90     * @param array $errorInfo      error info array +
91     * @since 1.0 +
92     * @see Doctrine::ERR_* constants +
93     * @see Doctrine_Connection::$portableCode +
94     * @return boolean              whether or not the error info processing was successfull +
95     *                              (the process is successfull if portable error code was found) +
96     */ +
97    public function processErrorInfo(array $errorInfo) +
98    { +
99        foreach (self::$errorRegexps as $regexp => $code) { +
100            if (preg_match($regexp, $errorInfo[2])) { +
101                $this->portableCode = $code; +
102                return true; +
103            } +
104        } +
105        return false; +
106    } +
107}
\ No newline at end of file diff --git a/tests/coverage/Doctrine_Connection_Profiler.html b/tests/coverage/Doctrine_Connection_Profiler.html new file mode 100644 index 000000000..7434341c1 --- /dev/null +++ b/tests/coverage/Doctrine_Connection_Profiler.html @@ -0,0 +1,533 @@ + + + Coverage for Doctrine_Connection_Profiler + + +

Coverage for Doctrine_Connection_Profiler

Back to coverage report

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
1<?php +
2/* +
3 *  $Id$ +
4 * +
5 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +
6 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +
7 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +
8 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +
9 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +
10 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +
11 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +
12 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +
13 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +
14 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +
15 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +
16 * +
17 * This software consists of voluntary contributions made by many individuals +
18 * and is licensed under the LGPL. For more information, see +
19 * <http://www.phpdoctrine.com>. +
20 */ +
21Doctrine::autoload('Doctrine_Overloadable'); +
22/** +
23 * Doctrine_Connection_Profiler +
24 * +
25 * @package     Doctrine +
26 * @subpackage  Connection +
27 * @author      Konsta Vesterinen <kvesteri@cc.hut.fi> +
28 * @license     http://www.opensource.org/licenses/lgpl-license.php LGPL +
29 * @link        www.phpdoctrine.com +
30 * @since       1.0 +
31 * @version     $Revision$ +
32 */ +
33class Doctrine_Connection_Profiler implements Doctrine_Overloadable, IteratorAggregate, Countable +
34{ +
35    /** +
36     * @param array $listeners      an array containing all availible listeners +
37     */ +
38    private $listeners  = array('query', +
39                                'prepare', +
40                                'commit', +
41                                'rollback', +
42                                'connect', +
43                                'begintransaction', +
44                                'exec', +
45                                'execute', +
46                                ); +
47    /** +
48     * @param array $events         an array containing all listened events +
49     */ +
50    private $events     = array(); +
51    /** +
52     * constructor +
53     */ +
54    public function __construct() { +
55 +
56    } +
57    /** +
58     * setFilterQueryType +
59     * +
60     * @param integer $filter +
61     * @return boolean +
62     */ +
63    public function setFilterQueryType() { +
64                                              +
65    }                                          +
66    /** +
67     * method overloader +
68     * this method is used for invoking different listeners, for the full +
69     * list of availible listeners, see Doctrine_EventListener +
70     * +
71     * @param string $m     the name of the method +
72     * @param array $a      method arguments +
73     * @see Doctrine_EventListener +
74     * @return boolean +
75     */ +
76    public function __call($m, $a) +
77    { +
78        // first argument should be an instance of Doctrine_Event +
79        if ( ! ($a[0] instanceof Doctrine_Event)) { +
80            throw new Doctrine_Connection_Profiler_Exception("Couldn't listen event. Event should be an instance of Doctrine_Event."); +
81        } +
82 +
83 +
84        if (substr($m, 0, 3) === 'pre') { +
85            // pre-event listener found +
86            $a[0]->start(); +
87 +
88            if ( ! in_array($a[0], $this->events, true)) { +
89                $this->events[] = $a[0]; +
90            } +
91        } else { +
92            // after-event listener found +
93            $a[0]->end(); +
94        } +
95        /** +
96         * If filtering by query type is enabled, only keep the query if +
97         * it was one of the allowed types. +
98         */ +
99         /** +
100        if ( ! is_null($this->filterTypes)) { +
101            if ( ! ($a[0]->getQueryType() & $this->_filterTypes)) { +
102 +
103            } +
104        } +
105        */ +
106 +
107    } +
108    /** +
109     * get +
110     * +
111     * @param mixed $key +
112     * @return Doctrine_Event +
113     */ +
114    public function get($key)  +
115    { +
116        if (isset($this->events[$key])) { +
117            return $this->events[$key]; +
118        } +
119        return null; +
120    } +
121    /** +
122     * getAll +
123     * returns all profiled events as an array +
124     * +
125     * @return array        all events in an array +
126     */ +
127    public function getAll()  +
128    { +
129        return $this->events; +
130    } +
131    /** +
132     * getIterator +
133     * returns an iterator that iterates through the logged events +
134     * +
135     * @return ArrayIterator +
136     */ +
137    public function getIterator() +
138    { +
139        return new ArrayIterator($this->events); +
140    } +
141    /** +
142     * count +
143     *  +
144     * @return integer +
145     */ +
146    public function count()  +
147    { +
148        return count($this->events); +
149    } +
150    /** +
151     * pop the last event from the event stack +
152     * +
153     * @return Doctrine_Event +
154     */ +
155    public function pop()  +
156    { +
157        return array_pop($this->events); +
158    } +
159    /** +
160     * Get the Doctrine_Event object for the last query that was run, regardless if it has +
161     * ended or not. If the event has not ended, it's end time will be Null. +
162     * +
163     * @return Doctrine_Event +
164     */ +
165    public function lastEvent() +
166    { +
167        if (empty($this->events)) { +
168            return false; +
169        } +
170 +
171        end($this->events); +
172        return current($this->events); +
173    } +
174}
\ No newline at end of file diff --git a/tests/coverage/Doctrine_Connection_Sqlite.html b/tests/coverage/Doctrine_Connection_Sqlite.html new file mode 100644 index 000000000..01e09d0bd --- /dev/null +++ b/tests/coverage/Doctrine_Connection_Sqlite.html @@ -0,0 +1,353 @@ + + + Coverage for Doctrine_Connection_Sqlite + + +

Coverage for Doctrine_Connection_Sqlite

Back to coverage report

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
1<?php +
2/* +
3 *  $Id: Sqlite.php 2702 2007-10-03 21:43:22Z Jonathan.Wage $ +
4 * +
5 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +
6 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +
7 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +
8 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +
9 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +
10 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +
11 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +
12 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +
13 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +
14 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +
15 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +
16 * +
17 * This software consists of voluntary contributions made by many individuals +
18 * and is licensed under the LGPL. For more information, see +
19 * <http://www.phpdoctrine.com>. +
20 */ +
21Doctrine::autoload("Doctrine_Connection_Common"); +
22/** +
23 * Doctrine_Connection_Sqlite +
24 * +
25 * @package     Doctrine +
26 * @subpackage  Connection +
27 * @license     http://www.opensource.org/licenses/lgpl-license.php LGPL +
28 * @author      Konsta Vesterinen <kvesteri@cc.hut.fi> +
29 * @author      Lukas Smith <smith@pooteeweet.org> (PEAR MDB2 library) +
30 * @version     $Revision: 2702 $ +
31 * @link        www.phpdoctrine.com +
32 * @since       1.0 +
33 */ +
34class Doctrine_Connection_Sqlite extends Doctrine_Connection_Common +
35{ +
36    /** +
37     * @var string $driverName                  the name of this connection driver +
38     */ +
39    protected $driverName = 'Sqlite'; +
40    /** +
41     * the constructor +
42     * +
43     * @param Doctrine_Manager $manager +
44     * @param PDO $pdo                          database handle +
45     */ +
46    public function __construct(Doctrine_Manager $manager, $adapter) +
47    { +
48 +
49        $this->supported = array( +
50                          'sequences'            => 'emulated', +
51                          'indexes'              => true, +
52                          'affected_rows'        => true, +
53                          'summary_functions'    => true, +
54                          'order_by_text'        => true, +
55                          'current_id'           => 'emulated', +
56                          'limit_queries'        => true, +
57                          'LOBs'                 => true, +
58                          'replace'              => true, +
59                          'transactions'         => true, +
60                          'savepoints'           => false, +
61                          'sub_selects'          => true, +
62                          'auto_increment'       => true, +
63                          'primary_key'          => true, +
64                          'result_introspection' => false, // not implemented +
65                          'prepared_statements'  => 'emulated', +
66                          'identifier_quoting'   => true, +
67                          'pattern_escaping'     => false, +
68                          ); +
69        /** +
70        $this->options['base_transaction_name'] = '___php_Doctrine_sqlite_auto_commit_off'; +
71        $this->options['fixed_float'] = 0; +
72        $this->options['database_path'] = ''; +
73        $this->options['database_extension'] = ''; +
74        $this->options['server_version'] = ''; +
75        */ +
76        parent::__construct($manager, $adapter); +
77 +
78        if ($this->isConnected) { +
79            $this->dbh->sqliteCreateFunction('mod',    array('Doctrine_Expression_Sqlite', 'modImpl'), 2); +
80            $this->dbh->sqliteCreateFunction('concat', array('Doctrine_Expression_Sqlite', 'concatImpl')); +
81            $this->dbh->sqliteCreateFunction('md5', 'md5', 1); +
82            $this->dbh->sqliteCreateFunction('now', 'time', 0); +
83        } +
84    } +
85    /** +
86     * initializes database functions missing in sqlite +
87     * +
88     * @see Doctrine_Expression +
89     * @return void +
90     */ +
91    public function connect()  +
92    { +
93        if ($this->isConnected) { +
94            return false; +
95        } +
96 +
97        parent::connect(); +
98 +
99        $this->dbh->sqliteCreateFunction('mod',    array('Doctrine_Expression_Sqlite', 'modImpl'), 2); +
100        $this->dbh->sqliteCreateFunction('concat', array('Doctrine_Expression_Sqlite', 'concatImpl')); +
101        $this->dbh->sqliteCreateFunction('md5', 'md5', 1); +
102        $this->dbh->sqliteCreateFunction('now', 'time', 0); +
103    } +
104    /** +
105     * getDatabaseFile +
106     * +
107     * @param string $name      the name of the database +
108     * @return string +
109     */ +
110    public function getDatabaseFile($name) +
111    { +
112        return $name . '.db'; +
113    } +
114}
\ No newline at end of file diff --git a/tests/coverage/Doctrine_Connection_Sqlite_Exception.html b/tests/coverage/Doctrine_Connection_Sqlite_Exception.html new file mode 100644 index 000000000..1b1b5909d --- /dev/null +++ b/tests/coverage/Doctrine_Connection_Sqlite_Exception.html @@ -0,0 +1,242 @@ + + + Coverage for Doctrine_Connection_Sqlite_Exception + + +

Coverage for Doctrine_Connection_Sqlite_Exception

Back to coverage report

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
1<?php +
2/* +
3 *  $Id: Exception.php 2702 2007-10-03 21:43:22Z Jonathan.Wage $ +
4 * +
5 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +
6 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +
7 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +
8 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +
9 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +
10 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +
11 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +
12 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +
13 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +
14 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +
15 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +
16 * +
17 * This software consists of voluntary contributions made by many individuals +
18 * and is licensed under the LGPL. For more information, see +
19 * <http://www.phpdoctrine.com>. +
20 */ +
21Doctrine::autoload('Doctrine_Connection_Exception'); +
22/** +
23 * Doctrine_Connection_Sqlite_Exception +
24 * +
25 * @package     Doctrine +
26 * @subpackage  Connection +
27 * @license     http://www.opensource.org/licenses/lgpl-license.php LGPL +
28 * @author      Konsta Vesterinen <kvesteri@cc.hut.fi> +
29 * @author      Lukas Smith <smith@pooteeweet.org> (PEAR MDB2 library) +
30 * @since       1.0 +
31 * @version     $Revision: 2702 $ +
32 * @link        www.phpdoctrine.com +
33 */ +
34class Doctrine_Connection_Sqlite_Exception extends Doctrine_Connection_Exception +
35{ +
36    /** +
37     * @var array $errorRegexps         an array that is used for determining portable +
38     *                                  error code from a native database error message +
39     */ +
40    protected static $errorRegexps = array( +
41                              '/^no such table:/'                    => Doctrine::ERR_NOSUCHTABLE, +
42                              '/^no such index:/'                    => Doctrine::ERR_NOT_FOUND, +
43                              '/^(table|index) .* already exists$/'  => Doctrine::ERR_ALREADY_EXISTS, +
44                              '/PRIMARY KEY must be unique/i'        => Doctrine::ERR_CONSTRAINT, +
45                              '/is not unique/'                      => Doctrine::ERR_CONSTRAINT, +
46                              '/columns .* are not unique/i'         => Doctrine::ERR_CONSTRAINT, +
47                              '/uniqueness constraint failed/'       => Doctrine::ERR_CONSTRAINT, +
48                              '/may not be NULL/'                    => Doctrine::ERR_CONSTRAINT_NOT_NULL, +
49                              '/^no such column:/'                   => Doctrine::ERR_NOSUCHFIELD, +
50                              '/column not present in both tables/i' => Doctrine::ERR_NOSUCHFIELD, +
51                              '/^near ".*": syntax error$/'          => Doctrine::ERR_SYNTAX, +
52                              '/[0-9]+ values for [0-9]+ columns/i'  => Doctrine::ERR_VALUE_COUNT_ON_ROW, +
53                              ); +
54    /** +
55     * This method checks if native error code/message can be +
56     * converted into a portable code and then adds this +
57     * portable error code to $portableCode field +
58     * +
59     * @param array $errorInfo      error info array +
60     * @since 1.0 +
61     * @see Doctrine::ERR_* constants +
62     * @see Doctrine_Connection::$portableCode +
63     * @return boolean              whether or not the error info processing was successfull +
64     *                              (the process is successfull if portable error code was found) +
65     */ +
66    public function processErrorInfo(array $errorInfo) +
67    { +
68        foreach (self::$errorRegexps as $regexp => $code) { +
69            if (preg_match($regexp, $errorInfo[2])) { +
70 +
71                $this->portableCode = $code; +
72                return true; +
73            } +
74        } +
75        return false; +
76    } +
77}
\ No newline at end of file diff --git a/tests/coverage/Doctrine_Connection_Statement.html b/tests/coverage/Doctrine_Connection_Statement.html new file mode 100644 index 000000000..2ba93a32d --- /dev/null +++ b/tests/coverage/Doctrine_Connection_Statement.html @@ -0,0 +1,1326 @@ + + + Coverage for Doctrine_Connection_Statement + + +

Coverage for Doctrine_Connection_Statement

Back to coverage report

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
1<?php +
2/* +
3 *  $Id: Statement.php 1532 2007-05-31 17:45:07Z zYne $ +
4 * +
5 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +
6 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +
7 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +
8 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +
9 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +
10 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +
11 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +
12 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +
13 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +
14 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +
15 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +
16 * +
17 * This software consists of voluntary contributions made by many individuals +
18 * and is licensed under the LGPL. For more information, see +
19 * <http://www.phpdoctrine.com>. +
20 */ +
21Doctrine::autoload('Doctrine_Adapter_Statement_Interface'); +
22/** +
23 * Doctrine_Connection_Statement +
24 * +
25 * @package     Doctrine +
26 * @subpackage  Connection +
27 * @author      Konsta Vesterinen <kvesteri@cc.hut.fi> +
28 * @license     http://www.opensource.org/licenses/lgpl-license.php LGPL +
29 * @link        www.phpdoctrine.com +
30 * @since       1.0 +
31 * @version     $Revision: 1532 $ +
32 */ +
33class Doctrine_Connection_Statement implements Doctrine_Adapter_Statement_Interface +
34{ +
35    /** +
36     * @var Doctrine_Connection $conn       Doctrine_Connection object, every connection +
37     *                                      statement holds an instance of Doctrine_Connection +
38     */ +
39    protected $_conn; +
40    /** +
41     * @var mixed $_stmt                    PDOStatement object, boolean false or Doctrine_Adapter_Statement object +
42     */ +
43    protected $_stmt; +
44    /** +
45     * constructor +
46     * +
47     * @param Doctrine_Connection $conn     Doctrine_Connection object, every connection +
48     *                                      statement holds an instance of Doctrine_Connection +
49     * @param mixed $stmt +
50     */ +
51    public function __construct(Doctrine_Connection $conn, $stmt) +
52    { +
53        $this->_conn = $conn; +
54        $this->_stmt = $stmt; +
55 +
56        if ($stmt === false) { +
57            throw new Doctrine_Exception('Unknown statement object given.'); +
58        } +
59    } +
60    /** +
61     * getConnection +
62     * returns the connection object this statement uses +
63     * +
64     * @return Doctrine_Connection +
65     */ +
66    public function getConnection() +
67    { +
68        return $this->_conn; +
69    } +
70    public function getStatement() +
71    { +
72        return $this->_stmt; +
73    } +
74    public function getQuery() +
75    { +
76        return $this->_stmt->queryString; +
77    } +
78    /** +
79     * bindColumn +
80     * Bind a column to a PHP variable +
81     * +
82     * @param mixed $column         Number of the column (1-indexed) or name of the column in the result set. +
83     *                              If using the column name, be aware that the name should match +
84     *                              the case of the column, as returned by the driver. +
85     * +
86     * @param string $param         Name of the PHP variable to which the column will be bound. +
87     * @param integer $type         Data type of the parameter, specified by the Doctrine::PARAM_* constants. +
88     * @return boolean              Returns TRUE on success or FALSE on failure +
89     */ +
90    public function bindColumn($column, $param, $type = null) +
91    { +
92        if ($type === null) { +
93            return $this->_stmt->bindColumn($column, $param); +
94        } else { +
95            return $this->_stmt->bindColumn($column, $param, $type); +
96        } +
97    } +
98    /** +
99     * bindValue +
100     * Binds a value to a corresponding named or question mark +
101     * placeholder in the SQL statement that was use to prepare the statement. +
102     * +
103     * @param mixed $param          Parameter identifier. For a prepared statement using named placeholders, +
104     *                              this will be a parameter name of the form :name. For a prepared statement +
105     *                              using question mark placeholders, this will be the 1-indexed position of the parameter +
106     * +
107     * @param mixed $value          The value to bind to the parameter. +
108     * @param integer $type         Explicit data type for the parameter using the Doctrine::PARAM_* constants. +
109     * +
110     * @return boolean              Returns TRUE on success or FALSE on failure. +
111     */ +
112    public function bindValue($param, $value, $type = null) +
113    { +
114        if ($type === null) { +
115            return $this->_stmt->bindValue($param, $value); +
116        } else { +
117            return $this->_stmt->bindValue($param, $value, $type); +
118        } +
119    } +
120    /** +
121     * bindParam +
122     * Binds a PHP variable to a corresponding named or question mark placeholder in the +
123     * SQL statement that was use to prepare the statement. Unlike Doctrine_Adapter_Statement_Interface->bindValue(), +
124     * the variable is bound as a reference and will only be evaluated at the time +
125     * that Doctrine_Adapter_Statement_Interface->execute() is called. +
126     * +
127     * Most parameters are input parameters, that is, parameters that are +
128     * used in a read-only fashion to build up the query. Some drivers support the invocation +
129     * of stored procedures that return data as output parameters, and some also as input/output +
130     * parameters that both send in data and are updated to receive it. +
131     * +
132     * @param mixed $param          Parameter identifier. For a prepared statement using named placeholders, +
133     *                              this will be a parameter name of the form :name. For a prepared statement +
134     *                              using question mark placeholders, this will be the 1-indexed position of the parameter +
135     * +
136     * @param mixed $variable       Name of the PHP variable to bind to the SQL statement parameter. +
137     * +
138     * @param integer $type         Explicit data type for the parameter using the Doctrine::PARAM_* constants. To return +
139     *                              an INOUT parameter from a stored procedure, use the bitwise OR operator to set the +
140     *                              Doctrine::PARAM_INPUT_OUTPUT bits for the data_type parameter. +
141     * +
142     * @param integer $length       Length of the data type. To indicate that a parameter is an OUT parameter +
143     *                              from a stored procedure, you must explicitly set the length. +
144     * @param mixed $driverOptions +
145     * @return boolean              Returns TRUE on success or FALSE on failure. +
146     */ +
147    public function bindParam($column, &$variable, $type = null, $length = null, $driverOptions = array()) +
148    { +
149        if ($type === null) { +
150            return $this->_stmt->bindParam($column, $variable); +
151        } else { +
152            return $this->_stmt->bindParam($column, $variable, $type, $length, $driverOptions); +
153        } +
154    } +
155    /** +
156     * closeCursor +
157     * Closes the cursor, enabling the statement to be executed again. +
158     * +
159     * @return boolean              Returns TRUE on success or FALSE on failure. +
160     */ +
161    public function closeCursor() +
162    { +
163        return $this->_stmt->closeCursor(); +
164    } +
165    /** +
166     * columnCount +
167     * Returns the number of columns in the result set +
168     * +
169     * @return integer              Returns the number of columns in the result set represented +
170     *                              by the Doctrine_Adapter_Statement_Interface object. If there is no result set, +
171     *                              this method should return 0. +
172     */ +
173    public function columnCount() +
174    { +
175        return $this->_stmt->columnCount(); +
176    } +
177    /** +
178     * errorCode +
179     * Fetch the SQLSTATE associated with the last operation on the statement handle +
180     * +
181     * @see Doctrine_Adapter_Interface::errorCode() +
182     * @return string       error code string +
183     */ +
184    public function errorCode() +
185    { +
186        return $this->_stmt->errorCode(); +
187    } +
188    /** +
189     * errorInfo +
190     * Fetch extended error information associated with the last operation on the statement handle +
191     * +
192     * @see Doctrine_Adapter_Interface::errorInfo() +
193     * @return array        error info array +
194     */ +
195    public function errorInfo() +
196    { +
197        return $this->_stmt->errorInfo(); +
198    } +
199    /** +
200     * execute +
201     * Executes a prepared statement +
202     * +
203     * If the prepared statement included parameter markers, you must either: +
204     * call PDOStatement->bindParam() to bind PHP variables to the parameter markers: +
205     * bound variables pass their value as input and receive the output value, +
206     * if any, of their associated parameter markers or pass an array of input-only +
207     * parameter values +
208     * +
209     * +
210     * @param array $params             An array of values with as many elements as there are +
211     *                                  bound parameters in the SQL statement being executed. +
212     * @return boolean                  Returns TRUE on success or FALSE on failure. +
213     */ +
214    public function execute($params = null) +
215    { +
216        try { +
217            $event = new Doctrine_Event($this, Doctrine_Event::STMT_EXECUTE, $this->getQuery(), $params); +
218            $this->_conn->getListener()->preStmtExecute($event); +
219 +
220            $result = true; +
221            if ( ! $event->skipOperation) { +
222                $result = $this->_stmt->execute($params); +
223                $this->_conn->incrementQueryCount(); +
224            } +
225 +
226            $this->_conn->getListener()->postStmtExecute($event); +
227 +
228            return $result; +
229        } catch (PDOException $e) { +
230        } catch (Doctrine_Adapter_Exception $e) { +
231        } +
232 +
233        $this->_conn->rethrowException($e, $this); +
234 +
235        return false; +
236    } +
237    /** +
238     * fetch +
239     * +
240     * @see Doctrine::FETCH_* constants +
241     * @param integer $fetchStyle           Controls how the next row will be returned to the caller. +
242     *                                      This value must be one of the Doctrine::FETCH_* constants, +
243     *                                      defaulting to Doctrine::FETCH_BOTH +
244     * +
245     * @param integer $cursorOrientation    For a PDOStatement object representing a scrollable cursor, +
246     *                                      this value determines which row will be returned to the caller. +
247     *                                      This value must be one of the Doctrine::FETCH_ORI_* constants, defaulting to +
248     *                                      Doctrine::FETCH_ORI_NEXT. To request a scrollable cursor for your +
249     *                                      Doctrine_Adapter_Statement_Interface object, +
250     *                                      you must set the Doctrine::ATTR_CURSOR attribute to Doctrine::CURSOR_SCROLL when you +
251     *                                      prepare the SQL statement with Doctrine_Adapter_Interface->prepare(). +
252     * +
253     * @param integer $cursorOffset         For a Doctrine_Adapter_Statement_Interface object representing a scrollable cursor for which the +
254     *                                      $cursorOrientation parameter is set to Doctrine::FETCH_ORI_ABS, this value specifies +
255     *                                      the absolute number of the row in the result set that shall be fetched. +
256     * +
257     *                                      For a Doctrine_Adapter_Statement_Interface object representing a scrollable cursor for +
258     *                                      which the $cursorOrientation parameter is set to Doctrine::FETCH_ORI_REL, this value +
259     *                                      specifies the row to fetch relative to the cursor position before +
260     *                                      Doctrine_Adapter_Statement_Interface->fetch() was called. +
261     * +
262     * @return mixed +
263     */ +
264    public function fetch($fetchMode = Doctrine::FETCH_BOTH, +
265                          $cursorOrientation = Doctrine::FETCH_ORI_NEXT, +
266                          $cursorOffset = null) +
267    { +
268        $event = new Doctrine_Event($this, Doctrine_Event::STMT_FETCH, $this->getQuery()); +
269 +
270        $event->fetchMode = $fetchMode; +
271        $event->cursorOrientation = $cursorOrientation; +
272        $event->cursorOffset = $cursorOffset; +
273 +
274        $data = $this->_conn->getListener()->preFetch($event); +
275 +
276        if ( ! $event->skipOperation) { +
277            $data = $this->_stmt->fetch($fetchMode, $cursorOrientation, $cursorOffset); +
278        } +
279 +
280        $this->_conn->getListener()->postFetch($event); +
281 +
282        return $data; +
283    } +
284    /** +
285     * fetchAll +
286     * Returns an array containing all of the result set rows +
287     * +
288     * @param integer $fetchMode            Controls how the next row will be returned to the caller. +
289     *                                      This value must be one of the Doctrine::FETCH_* constants, +
290     *                                      defaulting to Doctrine::FETCH_BOTH +
291     * +
292     * @param integer $columnIndex          Returns the indicated 0-indexed column when the value of $fetchStyle is +
293     *                                      Doctrine::FETCH_COLUMN. Defaults to 0. +
294     * +
295     * @return array +
296     */ +
297    public function fetchAll($fetchMode = Doctrine::FETCH_BOTH, +
298                             $columnIndex = null) +
299    { +
300        $event = new Doctrine_Event($this, Doctrine_Event::STMT_FETCHALL, $this->getQuery()); +
301        $event->fetchMode = $fetchMode; +
302        $event->columnIndex = $columnIndex; +
303 +
304        $this->_conn->getListener()->preFetchAll($event); +
305 +
306        if ( ! $event->skipOperation) { +
307            if ($columnIndex !== null) { +
308                $data = $this->_stmt->fetchAll($fetchMode, $columnIndex); +
309            } else { +
310                $data = $this->_stmt->fetchAll($fetchMode); +
311            } +
312 +
313            $event->data = $data; +
314        } +
315 +
316        $this->_conn->getListener()->postFetchAll($event); +
317 +
318        return $data; +
319    } +
320    /** +
321     * fetchColumn +
322     * Returns a single column from the next row of a +
323     * result set or FALSE if there are no more rows. +
324     * +
325     * @param integer $columnIndex          0-indexed number of the column you wish to retrieve from the row. If no +
326     *                                      value is supplied, Doctrine_Adapter_Statement_Interface->fetchColumn() +
327     *                                      fetches the first column. +
328     * +
329     * @return string                       returns a single column in the next row of a result set. +
330     */ +
331    public function fetchColumn($columnIndex = 0) +
332    { +
333        return $this->_stmt->fetchColumn($columnIndex); +
334    } +
335    /** +
336     * fetchObject +
337     * Fetches the next row and returns it as an object. +
338     * +
339     * Fetches the next row and returns it as an object. This function is an alternative to +
340     * Doctrine_Adapter_Statement_Interface->fetch() with Doctrine::FETCH_CLASS or Doctrine::FETCH_OBJ style. +
341     * +
342     * @param string $className             Name of the created class, defaults to stdClass. +
343     * @param array $args                   Elements of this array are passed to the constructor. +
344     * +
345     * @return mixed                        an instance of the required class with property names that correspond +
346     *                                      to the column names or FALSE in case of an error. +
347     */ +
348    public function fetchObject($className = 'stdClass', $args = array()) +
349    { +
350        return $this->_stmt->fetchObject($className, $args); +
351    } +
352    /** +
353     * getAttribute +
354     * Retrieve a statement attribute +
355     * +
356     * @param integer $attribute +
357     * @see Doctrine::ATTR_* constants +
358     * @return mixed                        the attribute value +
359     */ +
360    public function getAttribute($attribute) +
361    { +
362        return $this->_stmt->getAttribute($attribute); +
363    } +
364    /** +
365     * getColumnMeta +
366     * Returns metadata for a column in a result set +
367     * +
368     * @param integer $column               The 0-indexed column in the result set. +
369     * +
370     * @return array                        Associative meta data array with the following structure: +
371     * +
372     *          native_type                 The PHP native type used to represent the column value. +
373     *          driver:decl_                type The SQL type used to represent the column value in the database. If the column in the result set is the result of a function, this value is not returned by PDOStatement->getColumnMeta(). +
374     *          flags                       Any flags set for this column. +
375     *          name                        The name of this column as returned by the database. +
376     *          len                         The length of this column. Normally -1 for types other than floating point decimals. +
377     *          precision                   The numeric precision of this column. Normally 0 for types other than floating point decimals. +
378     *          pdo_type                    The type of this column as represented by the PDO::PARAM_* constants. +
379     */ +
380    public function getColumnMeta($column) +
381    { +
382        return $this->_stmt->getColumnMeta($column); +
383    } +
384    /** +
385     * nextRowset +
386     * Advances to the next rowset in a multi-rowset statement handle +
387     * +
388     * Some database servers support stored procedures that return more than one rowset +
389     * (also known as a result set). The nextRowset() method enables you to access the second +
390     * and subsequent rowsets associated with a PDOStatement object. Each rowset can have a +
391     * different set of columns from the preceding rowset. +
392     * +
393     * @return boolean                      Returns TRUE on success or FALSE on failure. +
394     */ +
395    public function nextRowset() +
396    { +
397        return $this->_stmt->nextRowset(); +
398    } +
399    /** +
400     * rowCount +
401     * rowCount() returns the number of rows affected by the last DELETE, INSERT, or UPDATE statement +
402     * executed by the corresponding object. +
403     * +
404     * If the last SQL statement executed by the associated Statement object was a SELECT statement, +
405     * some databases may return the number of rows returned by that statement. However, +
406     * this behaviour is not guaranteed for all databases and should not be +
407     * relied on for portable applications. +
408     * +
409     * @return integer                      Returns the number of rows. +
410     */ +
411    public function rowCount() +
412    { +
413        return $this->_stmt->rowCount(); +
414    } +
415    /** +
416     * setAttribute +
417     * Set a statement attribute +
418     * +
419     * @param integer $attribute +
420     * @param mixed $value                  the value of given attribute +
421     * @return boolean                      Returns TRUE on success or FALSE on failure. +
422     */ +
423    public function setAttribute($attribute, $value) +
424    { +
425        return $this->_stmt->setAttribute($attribute, $value); +
426    } +
427    /** +
428     * setFetchMode +
429     * Set the default fetch mode for this statement +
430     * +
431     * @param integer $mode                 The fetch mode must be one of the Doctrine::FETCH_* constants. +
432     * @return boolean                      Returns 1 on success or FALSE on failure. +
433     */ +
434    public function setFetchMode($mode, $arg1 = null, $arg2 = null) +
435    { +
436        return $this->_stmt->setFetchMode($mode, $arg1, $arg2); +
437    } +
438} +
\ No newline at end of file diff --git a/tests/coverage/Doctrine_Connection_UnitOfWork.html b/tests/coverage/Doctrine_Connection_UnitOfWork.html new file mode 100644 index 000000000..2044c32ee --- /dev/null +++ b/tests/coverage/Doctrine_Connection_UnitOfWork.html @@ -0,0 +1,1887 @@ + + + Coverage for Doctrine_Connection_UnitOfWork + + +

Coverage for Doctrine_Connection_UnitOfWork

Back to coverage report

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
1<?php +
2/* +
3 *  $Id: UnitOfWork.php 2749 2007-10-06 19:10:14Z zYne $ +
4 * +
5 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +
6 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +
7 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +
8 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +
9 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +
10 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +
11 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +
12 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +
13 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +
14 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +
15 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +
16 * +
17 * This software consists of voluntary contributions made by many individuals +
18 * and is licensed under the LGPL. For more information, see +
19 * <http://www.phpdoctrine.com>. +
20 */ +
21Doctrine::autoload('Doctrine_Connection_Module'); +
22/** +
23 * Doctrine_Connection_UnitOfWork +
24 * +
25 * @package     Doctrine +
26 * @subpackage  Connection +
27 * @license     http://www.opensource.org/licenses/lgpl-license.php LGPL +
28 * @link        www.phpdoctrine.com +
29 * @since       1.0 +
30 * @version     $Revision: 2749 $ +
31 * @author      Konsta Vesterinen <kvesteri@cc.hut.fi> +
32 */ +
33class Doctrine_Connection_UnitOfWork extends Doctrine_Connection_Module +
34{ +
35    /** +
36     * buildFlushTree +
37     * builds a flush tree that is used in transactions +
38     * +
39     * The returned array has all the initialized components in +
40     * 'correct' order. Basically this means that the records of those +
41     * components can be saved safely in the order specified by the returned array. +
42     * +
43     * @param array $tables     an array of Doctrine_Table objects or component names +
44     * @return array            an array of component names in flushing order +
45     */ +
46    public function buildFlushTree(array $tables) +
47    { +
48        $tree = array(); +
49        foreach ($tables as $k => $table) { +
50 +
51            if ( ! ($table instanceof Doctrine_Table)) { +
52                $table = $this->conn->getTable($table, false); +
53            } +
54            $nm     = $table->getComponentName(); +
55 +
56            $index  = array_search($nm, $tree); +
57 +
58            if ($index === false) { +
59                $tree[] = $nm; +
60                $index  = max(array_keys($tree)); +
61            } +
62 +
63            $rels = $table->getRelations(); +
64 +
65            // group relations +
66 +
67            foreach ($rels as $key => $rel) { +
68                if ($rel instanceof Doctrine_Relation_ForeignKey) { +
69                    unset($rels[$key]); +
70                    array_unshift($rels, $rel); +
71                } +
72            } +
73 +
74            foreach ($rels as $rel) { +
75                $name   = $rel->getTable()->getComponentName(); +
76                $index2 = array_search($name,$tree); +
77                $type   = $rel->getType(); +
78 +
79                // skip self-referenced relations +
80                if ($name === $nm) { +
81                    continue; +
82                } +
83 +
84                if ($rel instanceof Doctrine_Relation_ForeignKey) { +
85                    if ($index2 !== false) { +
86                        if ($index2 >= $index) +
87                            continue; +
88 +
89                        unset($tree[$index]); +
90                        array_splice($tree,$index2,0,$nm); +
91                        $index = $index2; +
92                    } else { +
93                        $tree[] = $name; +
94                    } +
95 +
96                } elseif ($rel instanceof Doctrine_Relation_LocalKey) { +
97                    if ($index2 !== false) { +
98                        if ($index2 <= $index) +
99                            continue; +
100 +
101                        unset($tree[$index2]); +
102                        array_splice($tree,$index,0,$name); +
103                    } else { +
104                        array_unshift($tree,$name); +
105                        $index++; +
106                    } +
107                } elseif ($rel instanceof Doctrine_Relation_Association) { +
108                    $t = $rel->getAssociationFactory(); +
109                    $n = $t->getComponentName(); +
110 +
111                    if ($index2 !== false) +
112                        unset($tree[$index2]); +
113 +
114                    array_splice($tree, $index, 0, $name); +
115                    $index++; +
116 +
117                    $index3 = array_search($n, $tree); +
118 +
119                    if ($index3 !== false) { +
120                        if ($index3 >= $index) +
121                            continue; +
122 +
123                        unset($tree[$index]); +
124                        array_splice($tree, $index3, 0, $n); +
125                        $index = $index2; +
126                    } else { +
127                        $tree[] = $n; +
128                    } +
129                } +
130            } +
131        } +
132        return array_values($tree); +
133    } +
134    /** +
135     * saves the given record +
136     * +
137     * @param Doctrine_Record $record +
138     * @return void +
139     */ +
140    public function saveGraph(Doctrine_Record $record) +
141    { +
142        $conn = $this->getConnection(); +
143 +
144        $state = $record->state(); +
145        if ($state === Doctrine_Record::STATE_LOCKED) { +
146            return false; +
147        } +
148 +
149        $record->state(Doctrine_Record::STATE_LOCKED); +
150 +
151        $conn->beginTransaction(); +
152 +
153        $saveLater = $this->saveRelated($record); +
154 +
155        $record->state($state); +
156 +
157        if ($record->isValid()) { +
158            $event = new Doctrine_Event($record, Doctrine_Event::RECORD_SAVE); +
159 +
160            $record->preSave($event); +
161     +
162            $record->getTable()->getRecordListener()->preSave($event); +
163 +
164            if ( ! $event->skipOperation) { +
165                switch ($state) { +
166                    case Doctrine_Record::STATE_TDIRTY: +
167                        $this->insert($record); +
168                        break; +
169                    case Doctrine_Record::STATE_DIRTY: +
170                    case Doctrine_Record::STATE_PROXY: +
171                        $this->update($record); +
172                        break; +
173                    case Doctrine_Record::STATE_CLEAN: +
174                    case Doctrine_Record::STATE_TCLEAN: +
175 +
176                        break; +
177                } +
178            } +
179 +
180            $record->getTable()->getRecordListener()->postSave($event); +
181             +
182            $record->postSave($event); +
183        } else { +
184            $conn->transaction->addInvalid($record); +
185        } +
186 +
187        $state = $record->state(); +
188 +
189        $record->state(Doctrine_Record::STATE_LOCKED); +
190 +
191        foreach ($saveLater as $fk) { +
192            $alias = $fk->getAlias(); +
193 +
194            if ($record->hasReference($alias)) { +
195                $obj = $record->$alias; +
196                 +
197                // check that the related object is not an instance of Doctrine_Null +
198                if ( ! ($obj instanceof Doctrine_Null)) { +
199                    $obj->save($conn); +
200                } +
201            } +
202        } +
203 +
204        // save the MANY-TO-MANY associations +
205        $this->saveAssociations($record); +
206 +
207        $record->state($state); +
208 +
209        $conn->commit(); +
210 +
211        return true; +
212    } +
213    /** +
214     * saves the given record +
215     * +
216     * @param Doctrine_Record $record +
217     * @return void +
218     */ +
219    public function save(Doctrine_Record $record) +
220    { +
221        $event = new Doctrine_Event($record, Doctrine_Event::RECORD_SAVE); +
222 +
223        $record->preSave($event); +
224 +
225        $record->getTable()->getRecordListener()->preSave($event); +
226 +
227        if ( ! $event->skipOperation) { +
228            switch ($record->state()) { +
229                case Doctrine_Record::STATE_TDIRTY: +
230                    $this->insert($record); +
231                    break; +
232                case Doctrine_Record::STATE_DIRTY: +
233                case Doctrine_Record::STATE_PROXY: +
234                    $this->update($record); +
235                    break; +
236                case Doctrine_Record::STATE_CLEAN: +
237                case Doctrine_Record::STATE_TCLEAN: +
238                    // do nothing +
239                    break; +
240            } +
241        } +
242 +
243        $record->getTable()->getRecordListener()->postSave($event); +
244         +
245        $record->postSave($event); +
246    } +
247    /** +
248     * deletes given record and all the related composites +
249     * this operation is isolated by a transaction +
250     * +
251     * this event can be listened by the onPreDelete and onDelete listeners +
252     * +
253     * @return boolean      true on success, false on failure +
254     */ +
255    public function delete(Doctrine_Record $record) +
256    { +
257        if ( ! $record->exists()) { +
258            return false; +
259        } +
260        $this->conn->beginTransaction(); +
261 +
262        $event = new Doctrine_Event($record, Doctrine_Event::RECORD_DELETE); +
263 +
264        $record->preDelete($event); +
265         +
266        $record->getTable()->getRecordListener()->preDelete($event); +
267 +
268        $state = $record->state(); +
269 +
270        $record->state(Doctrine_Record::STATE_LOCKED); +
271 +
272        $this->deleteComposites($record); +
273 +
274        if ( ! $event->skipOperation) { +
275            $record->state(Doctrine_Record::STATE_TDIRTY); +
276 +
277            $this->deleteRecord($record); +
278 +
279            $record->state(Doctrine_Record::STATE_TCLEAN); +
280        } else { +
281            // return to original state    +
282            $record->state($state); +
283        } +
284 +
285 +
286        $record->getTable()->getRecordListener()->postDelete($event); +
287 +
288        $record->postDelete($event); +
289 +
290        $this->conn->commit(); +
291 +
292        return true; +
293    } +
294     +
295    public function deleteRecord(Doctrine_Record $record) +
296    { +
297        $ids = $record->identifier(); +
298        $tmp = array(); +
299         +
300        foreach (array_keys($ids) as $id) { +
301            $tmp[] = $id . ' = ? '; +
302        } +
303         +
304        $params = array_values($ids); +
305 +
306        $query = 'DELETE FROM ' +
307               . $this->conn->quoteIdentifier($record->getTable()->getTableName()) +
308               . ' WHERE ' . implode(' AND ', $tmp); +
309 +
310 +
311        return $this->conn->exec($query, $params); +
312    } +
313    /** +
314     * deleteMultiple +
315     * deletes all records from the pending delete list +
316     * +
317     * @return void +
318     */ +
319    public function deleteMultiple(array $records) +
320    { +
321 +
322        foreach ($this->delete as $name => $deletes) { +
323            $record = false; +
324            $ids    = array(); +
325 +
326            if (is_array($deletes[count($deletes)-1]->getTable()->getIdentifier())) { +
327                if (count($deletes) > 0) { +
328                    $query = 'DELETE FROM ' +
329                           . $this->conn->quoteIdentifier($deletes[0]->getTable()->getTableName()) +
330                           . ' WHERE '; +
331     +
332                    $params = array(); +
333                    $cond = array(); +
334                    foreach ($deletes as $k => $record) { +
335                        $ids = $record->identifier(); +
336                        $tmp = array(); +
337                        foreach (array_keys($ids) as $id) { +
338                            $tmp[] = $id . ' = ? '; +
339                        } +
340                        $params = array_merge($params, array_values($ids)); +
341                        $cond[] = '(' . implode(' AND ', $tmp) . ')'; +
342                    } +
343                    $query .= implode(' OR ', $cond); +
344 +
345                    $this->conn->execute($query, $params); +
346                } +
347            } else { +
348                foreach ($deletes as $k => $record) { +
349                    $ids[] = $record->getIncremented(); +
350                } +
351                if ($record instanceof Doctrine_Record) { +
352                    $params = substr(str_repeat('?, ', count($ids)), 0, -2); +
353     +
354                    $query = 'DELETE FROM ' +
355                           . $this->conn->quoteIdentifier($record->getTable()->getTableName()) +
356                           . ' WHERE ' +
357                           . $record->getTable()->getIdentifier() +
358                           . ' IN(' . $params . ')'; +
359         +
360                    $this->conn->execute($query, $ids); +
361                } +
362            } +
363        } +
364    } +
365    /** +
366     * saveRelated +
367     * saves all related records to $record +
368     * +
369     * @throws PDOException         if something went wrong at database level +
370     * @param Doctrine_Record $record +
371     */ +
372    public function saveRelated(Doctrine_Record $record) +
373    { +
374        $saveLater = array(); +
375        foreach ($record->getReferences() as $k => $v) { +
376            $rel = $record->getTable()->getRelation($k); +
377 +
378            $local = $rel->getLocal(); +
379            $foreign = $rel->getForeign(); +
380 +
381            if ($rel instanceof Doctrine_Relation_ForeignKey) { +
382                $saveLater[$k] = $rel; +
383            } elseif ($rel instanceof Doctrine_Relation_LocalKey) { +
384                // ONE-TO-ONE relationship +
385                $obj = $record->get($rel->getAlias()); +
386 +
387                // Protection against infinite function recursion before attempting to save +
388                if ($obj instanceof Doctrine_Record && +
389                    $obj->isModified()) { +
390                    $obj->save($this->conn); +
391                    /** +
392                    $id = array_values($obj->identifier()); +
393 +
394                    foreach ((array) $rel->getLocal() as $k => $field) { +
395                        $record->set($field, $id[$k]); +
396                    } +
397                    */ +
398                } +
399            } +
400        } +
401 +
402        return $saveLater; +
403    } +
404    /** +
405     * saveAssociations +
406     * +
407     * this method takes a diff of one-to-many / many-to-many original and +
408     * current collections and applies the changes +
409     * +
410     * for example if original many-to-many related collection has records with +
411     * primary keys 1,2 and 3 and the new collection has records with primary keys +
412     * 3, 4 and 5, this method would first destroy the associations to 1 and 2 and then +
413     * save new associations to 4 and 5 +
414     * +
415     * @throws Doctrine_Connection_Exception         if something went wrong at database level +
416     * @param Doctrine_Record $record +
417     * @return void +
418     */ +
419    public function saveAssociations(Doctrine_Record $record) +
420    { +
421        foreach ($record->getReferences() as $k => $v) { +
422            $rel = $record->getTable()->getRelation($k); +
423             +
424            if ($rel instanceof Doctrine_Relation_Association) {    +
425                $v->save($this->conn); +
426 +
427                $assocTable = $rel->getAssociationTable(); +
428                foreach ($v->getDeleteDiff() as $r) { +
429                    $query = 'DELETE FROM ' . $assocTable->getTableName() +
430                           . ' WHERE ' . $rel->getForeign() . ' = ?' +
431                           . ' AND ' . $rel->getLocal() . ' = ?'; +
432 +
433                    $this->conn->execute($query, array($r->getIncremented(), $record->getIncremented())); +
434                } +
435 +
436                foreach ($v->getInsertDiff() as $r) { +
437                    $assocRecord = $assocTable->create(); +
438                    $assocRecord->set($rel->getForeign(), $r); +
439                    $assocRecord->set($rel->getLocal(), $record); +
440 +
441                    $this->saveGraph($assocRecord); +
442                } +
443            } +
444        } +
445    } +
446    /** +
447     * deletes all related composites +
448     * this method is always called internally when a record is deleted +
449     * +
450     * @throws PDOException         if something went wrong at database level +
451     * @return void +
452     */ +
453    public function deleteComposites(Doctrine_Record $record) +
454    { +
455        foreach ($record->getTable()->getRelations() as $fk) { +
456            if ($fk->isComposite()) { +
457                $obj = $record->get($fk->getAlias()); +
458                if ( $obj instanceof Doctrine_Record &&  +
459                     $obj->state() != Doctrine_Record::STATE_LOCKED)  { +
460 +
461                    $obj->delete($this->conn); +
462 +
463                } +
464            } +
465        } +
466    } +
467    /** +
468     * saveAll +
469     * persists all the pending records from all tables +
470     * +
471     * @throws PDOException         if something went wrong at database level +
472     * @return void +
473     */ +
474    public function saveAll() +
475    { +
476        // get the flush tree +
477        $tree = $this->buildFlushTree($this->conn->getTables()); +
478 +
479        // save all records +
480        foreach ($tree as $name) { +
481            $table = $this->conn->getTable($name); +
482 +
483            foreach ($table->getRepository() as $record) { +
484                $this->save($record); +
485            } +
486        } +
487 +
488        // save all associations +
489        foreach ($tree as $name) { +
490            $table = $this->conn->getTable($name); +
491 +
492            foreach ($table->getRepository() as $record) { +
493                $this->saveAssociations($record); +
494            } +
495        } +
496    } +
497    /** +
498     * update +
499     * updates the given record +
500     * +
501     * @param Doctrine_Record $record   record to be updated +
502     * @return boolean                  whether or not the update was successful +
503     */ +
504    public function update(Doctrine_Record $record) +
505    { +
506        $event = new Doctrine_Event($record, Doctrine_Event::RECORD_UPDATE); +
507 +
508        $record->preUpdate($event); +
509 +
510        $record->getTable()->getRecordListener()->preUpdate($event); +
511 +
512        if ( ! $event->skipOperation) { +
513            $array = $record->getPrepared(); +
514 +
515            if (empty($array)) { +
516                return false; +
517            } +
518            $set = array(); +
519            foreach ($array as $name => $value) { +
520                if ($value instanceof Doctrine_Expression) { +
521                    $set[] = $value->getSql(); +
522                    unset($array[$name]); +
523                } else { +
524 +
525                    $set[] = $name . ' = ?'; +
526     +
527                    if ($value instanceof Doctrine_Record) { +
528                        if ( ! $value->exists()) { +
529                            $record->save($this->conn); +
530                        } +
531                        $array[$name] = $value->getIncremented(); +
532                        $record->set($name, $value->getIncremented()); +
533                    } +
534                } +
535            } +
536 +
537            $params = array_values($array); +
538            $id     = $record->identifier(); +
539     +
540            if ( ! is_array($id)) { +
541                $id = array($id); +
542            } +
543            $id     = array_values($id); +
544            $params = array_merge($params, $id); +
545     +
546            $sql  = 'UPDATE ' . $this->conn->quoteIdentifier($record->getTable()->getTableName()) +
547                  . ' SET ' . implode(', ', $set) +
548                  . ' WHERE ' . implode(' = ? AND ', (array) $record->getTable()->getIdentifier()) +
549                  . ' = ?'; +
550     +
551            $stmt = $this->conn->prepare($sql); +
552            $stmt->execute($params); +
553     +
554            $record->assignIdentifier(true); +
555        } +
556         +
557        $record->getTable()->getRecordListener()->postUpdate($event); +
558 +
559        $record->postUpdate($event); +
560 +
561        return true; +
562    } +
563    /** +
564     * inserts a record into database +
565     * +
566     * @param Doctrine_Record $record   record to be inserted +
567     * @return boolean +
568     */ +
569    public function insert(Doctrine_Record $record) +
570    { +
571         // listen the onPreInsert event +
572        $event = new Doctrine_Event($record, Doctrine_Event::RECORD_INSERT); +
573 +
574        $record->preInsert($event); +
575         +
576        $record->getTable()->getRecordListener()->preInsert($event); +
577 +
578        if ( ! $event->skipOperation) { +
579            $array = $record->getPrepared(); +
580     +
581            if (empty($array)) { +
582                return false; +
583            } +
584            $table     = $record->getTable(); +
585            $keys      = (array) $table->getIdentifier(); +
586     +
587            $seq       = $record->getTable()->sequenceName; +
588     +
589            if ( ! empty($seq)) { +
590                $id             = $this->conn->sequence->nextId($seq); +
591                $name           = $record->getTable()->getIdentifier(); +
592                $array[$name]   = $id; +
593     +
594                $record->assignIdentifier($id); +
595            } +
596     +
597            $this->conn->insert($table->getTableName(), $array); +
598     +
599            if (empty($seq) && count($keys) == 1 && $keys[0] == $table->getIdentifier() && +
600                $table->getIdentifierType() != Doctrine::IDENTIFIER_NATURAL) { +
601     +
602                if (strtolower($this->conn->getName()) == 'pgsql') { +
603                    $seq = $table->getTableName() . '_' . $keys[0]; +
604                } +
605     +
606                $id = $this->conn->sequence->lastInsertId($seq); +
607     +
608                if ( ! $id) { +
609                    throw new Doctrine_Connection_Exception("Couldn't get last insert identifier."); +
610                } +
611     +
612                $record->assignIdentifier($id); +
613            } else { +
614                $record->assignIdentifier(true); +
615            } +
616        } +
617        $record->getTable()->addRecord($record); +
618 +
619        $record->getTable()->getRecordListener()->postInsert($event); +
620 +
621        $record->postInsert($event); +
622 +
623        return true; +
624    } +
625} +
\ No newline at end of file diff --git a/tests/coverage/Doctrine_DataDict.html b/tests/coverage/Doctrine_DataDict.html new file mode 100644 index 000000000..d630b85f0 --- /dev/null +++ b/tests/coverage/Doctrine_DataDict.html @@ -0,0 +1,293 @@ + + + Coverage for Doctrine_DataDict + + +

Coverage for Doctrine_DataDict

Back to coverage report

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
1<?php +
2/* +
3 *  $Id: DataDict.php 2702 2007-10-03 21:43:22Z Jonathan.Wage $ +
4 * +
5 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +
6 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +
7 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +
8 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +
9 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +
10 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +
11 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +
12 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +
13 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +
14 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +
15 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +
16 * +
17 * This software consists of voluntary contributions made by many individuals +
18 * and is licensed under the LGPL. For more information, see +
19 * <http://www.phpdoctrine.com>. +
20 */ +
21/** +
22 * Doctrine_DataDict +
23 * +
24 * @package     Doctrine +
25 * @subpackage  DataDict +
26 * @license     http://www.opensource.org/licenses/lgpl-license.php LGPL +
27 * @link        www.phpdoctrine.com +
28 * @since       1.0 +
29 * @version     $Revision: 2702 $ +
30 * @author      Konsta Vesterinen <kvesteri@cc.hut.fi> +
31 * @author      Lukas Smith <smith@pooteeweet.org> (PEAR MDB2 library) +
32 */ +
33class Doctrine_DataDict extends Doctrine_Connection_Module +
34{ +
35    /** +
36     * Obtain an array of changes that may need to applied +
37     * +
38     * @param array $current new definition +
39     * @param array  $previous old definition +
40     * @return array  containing all changes that will need to be applied +
41     */ +
42    public function compareDefinition($current, $previous) +
43    { +
44        $type = !empty($current['type']) ? $current['type'] : null; +
45 +
46        if ( ! method_exists($this, "_compare{$type}Definition")) { +
47            throw new Doctrine_DataDict_Exception('type "'.$current['type'].'" is not yet supported'); +
48        } +
49 +
50        if (empty($previous['type']) || $previous['type'] != $type) { +
51            return $current; +
52        } +
53 +
54        $change = $this->{"_compare{$type}Definition"}($current, $previous); +
55 +
56        if ($previous['type'] != $type) { +
57            $change['type'] = true; +
58        } +
59 +
60        $previous_notnull = !empty($previous['notnull']) ? $previous['notnull'] : false; +
61        $notnull = !empty($current['notnull']) ? $current['notnull'] : false; +
62        if ($previous_notnull != $notnull) { +
63            $change['notnull'] = true; +
64        } +
65 +
66        $previous_default = array_key_exists('default', $previous) ? $previous['default'] : +
67            ($previous_notnull ? '' : null); +
68        $default = array_key_exists('default', $current) ? $current['default'] : +
69            ($notnull ? '' : null); +
70        if ($previous_default !== $default) { +
71            $change['default'] = true; +
72        } +
73 +
74        return $change; +
75    } +
76    /** +
77     * parseBoolean +
78     * parses a literal boolean value and returns  +
79     * proper sql equivalent +
80     * +
81     * @param string $value     boolean value to be parsed +
82     * @return string           parsed boolean value +
83     */ +
84    public function parseBoolean($value) +
85    { +
86        // parse booleans +
87        if ($value == 'true') { +
88            $value = 1; +
89        } elseif ($value == 'false') { +
90            $value = 0; +
91        } +
92        return $value; +
93    } +
94}
\ No newline at end of file diff --git a/tests/coverage/Doctrine_DataDict_Exception.html b/tests/coverage/Doctrine_DataDict_Exception.html new file mode 100644 index 000000000..905c16c42 --- /dev/null +++ b/tests/coverage/Doctrine_DataDict_Exception.html @@ -0,0 +1,113 @@ + + + Coverage for Doctrine_DataDict_Exception + + +

Coverage for Doctrine_DataDict_Exception

Back to coverage report

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
1<?php +
2/* +
3 *  $Id: Exception.php 2702 2007-10-03 21:43:22Z Jonathan.Wage $ +
4 * +
5 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +
6 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +
7 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +
8 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +
9 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +
10 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +
11 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +
12 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +
13 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +
14 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +
15 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +
16 * +
17 * This software consists of voluntary contributions made by many individuals +
18 * and is licensed under the LGPL. For more information, see +
19 * <http://www.phpdoctrine.com>. +
20 */ +
21Doctrine::autoload('Doctrine_Exception'); +
22/** +
23 * Doctrine_DataDict_Exception +
24 * +
25 * @package     Doctrine +
26 * @subpackage  DataDict +
27 * @license     http://www.opensource.org/licenses/lgpl-license.php LGPL +
28 * @link        www.phpdoctrine.com +
29 * @since       1.0 +
30 * @version     $Revision: 2702 $ +
31 * @author      Konsta Vesterinen <kvesteri@cc.hut.fi> +
32 */ +
33class Doctrine_DataDict_Exception extends Doctrine_Exception +
34{ }
\ No newline at end of file diff --git a/tests/coverage/Doctrine_DataDict_Firebird.html b/tests/coverage/Doctrine_DataDict_Firebird.html new file mode 100644 index 000000000..e2d6ef1a5 --- /dev/null +++ b/tests/coverage/Doctrine_DataDict_Firebird.html @@ -0,0 +1,656 @@ + + + Coverage for Doctrine_DataDict_Firebird + + +

Coverage for Doctrine_DataDict_Firebird

Back to coverage report

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
1<?php +
2/* +
3 *  $Id: Firebird.php 2702 2007-10-03 21:43:22Z Jonathan.Wage $ +
4 * +
5 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +
6 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +
7 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +
8 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +
9 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +
10 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +
11 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +
12 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +
13 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +
14 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +
15 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +
16 * +
17 * This software consists of voluntary contributions made by many individuals +
18 * and is licensed under the LGPL. For more information, see +
19 * <http://www.phpdoctrine.com>. +
20 */ +
21Doctrine::autoload('Doctrine_DataDict'); +
22/** +
23 * @package     Doctrine +
24 * @subpackage  DataDict +
25 * @license     http://www.opensource.org/licenses/lgpl-license.php LGPL +
26 * @author      Konsta Vesterinen <kvesteri@cc.hut.fi> +
27 * @author      Lorenzo Alberton <l.alberton@quipo.it> (PEAR MDB2 Interbase driver) +
28 * @author      Lukas Smith <smith@pooteeweet.org> (PEAR MDB2 library) +
29 * @version     $Revision: 2702 $ +
30 * @link        www.phpdoctrine.com +
31 * @since       1.0 +
32 */ +
33class Doctrine_DataDict_Firebird extends Doctrine_DataDict +
34{ +
35    /** +
36     * Obtain DBMS specific SQL code portion needed to declare an text type +
37     * field to be used in statements like CREATE TABLE. +
38     * +
39     * @param array $field  associative array with the name of the properties +
40     *      of the field being declared as array indexes. Currently, the types +
41     *      of supported field properties are as follows: +
42     * +
43     *      length +
44     *          Integer value that determines the maximum length of the text +
45     *          field. If this argument is missing the field should be +
46     *          declared to have the longest length allowed by the DBMS. +
47     * +
48     *      default +
49     *          Text value to be used as default for this field. +
50     * +
51     *      notnull +
52     *          Boolean flag that indicates whether this field is constrained +
53     *          to not be set to null. +
54     * @return string  DBMS specific SQL code portion that should be used to +
55     *      declare the specified field. +
56     */ +
57    public function getNativeDeclaration($field) +
58    { +
59        if ( ! isset($field['type'])) { +
60            throw new Doctrine_DataDict_Exception('Missing column type.'); +
61        } +
62        switch ($field['type']) { +
63            case 'varchar': +
64            case 'string': +
65            case 'array': +
66            case 'object': +
67            case 'char': +
68            case 'text': +
69            case 'gzip': +
70                $length = !empty($field['length']) +
71                    ? $field['length'] : 16777215; // TODO: $this->conn->options['default_text_field_length']; +
72 +
73                $fixed  = ((isset($field['fixed']) && $field['fixed']) || $field['type'] == 'char') ? true : false; +
74 +
75                return $fixed ? 'CHAR('.$length.')' : 'VARCHAR('.$length.')'; +
76            case 'clob': +
77                return 'BLOB SUB_TYPE 1'; +
78            case 'blob': +
79                return 'BLOB SUB_TYPE 0'; +
80            case 'integer': +
81            case 'enum': +
82            case 'int': +
83                return 'INT'; +
84            case 'boolean': +
85                return 'SMALLINT'; +
86            case 'date': +
87                return 'DATE'; +
88            case 'time': +
89                return 'TIME'; +
90            case 'timestamp': +
91                return 'TIMESTAMP'; +
92            case 'float': +
93                return 'DOUBLE PRECISION'; +
94            case 'decimal': +
95                $length = !empty($field['length']) ? $field['length'] : 18; +
96                $scale = !empty($field['scale']) ? $field['scale'] : $this->conn->getAttribute(Doctrine::ATTR_DECIMAL_PLACES); +
97                return 'DECIMAL('.$length.','.$scale.')'; +
98        } +
99 +
100        throw new Doctrine_DataDict_Exception('Unknown field type \'' . $field['type'] .  '\'.'); +
101    } +
102    /** +
103     * Maps a native array description of a field to a Doctrine datatype and length +
104     * +
105     * @param array  $field native field description +
106     * @return array containing the various possible types, length, sign, fixed +
107     */ +
108    public function getPortableDeclaration($field) +
109    { +
110        $length  = (isset($field['length']) && $field['length'] > 0) ? $field['length'] : null; +
111 +
112        $type = array(); +
113        $unsigned = $fixed = null; +
114        $dbType = strtolower($field['type']); +
115        $field['field_sub_type'] = !empty($field['field_sub_type']) +
116            ? strtolower($field['field_sub_type']) : null; +
117 +
118        if ( ! isset($field['name'])) { +
119            $field['name'] = ''; +
120        } +
121 +
122        switch ($dbType) { +
123            case 'smallint': +
124            case 'integer': +
125            case 'int64': +
126                //these may be 'numeric' or 'decimal' +
127                if (isset($field['field_sub_type'])) { +
128                    $field['type'] = $field['field_sub_type']; +
129                    return $this->getPortableDeclaration($field); +
130                } +
131            case 'bigint': +
132            case 'quad': +
133                $type[] = 'integer'; +
134                if ($length == '1') { +
135                    $type[] = 'boolean'; +
136                    if (preg_match('/^(is|has)/', $field['name'])) { +
137                        $type = array_reverse($type); +
138                    } +
139                } +
140                break; +
141            case 'varchar': +
142                $fixed = false; +
143            case 'char': +
144            case 'cstring': +
145                $type[] = 'string'; +
146                if ($length == '1') { +
147                    $type[] = 'boolean'; +
148                    if (preg_match('/^(is|has)/', $field['name'])) { +
149                        $type = array_reverse($type); +
150                    } +
151                } +
152                if ($fixed !== false) { +
153                    $fixed = true; +
154                } +
155                break; +
156            case 'date': +
157                $type[] = 'date'; +
158                $length = null; +
159                break; +
160            case 'timestamp': +
161                $type[] = 'timestamp'; +
162                $length = null; +
163                break; +
164            case 'time': +
165                $type[] = 'time'; +
166                $length = null; +
167                break; +
168            case 'float': +
169            case 'double': +
170            case 'double precision': +
171            case 'd_float': +
172                $type[] = 'float'; +
173                break; +
174            case 'decimal': +
175            case 'numeric': +
176                $type[] = 'decimal'; +
177                break; +
178            case 'blob': +
179                $type[] = ($field['field_sub_type'] == 'text') ? 'clob' : 'blob'; +
180                $length = null; +
181                break; +
182            default: +
183                throw new Doctrine_DataDict_Exception('unknown database attribute type: '.$dbType); +
184        } +
185 +
186        return array('type'     => $type, +
187                     'length'   => $length, +
188                     'unsigned' => $unsigned, +
189                     'fixed'    => $fixed); +
190    } +
191    /** +
192     * Obtain DBMS specific SQL code portion needed to set the CHARACTER SET +
193     * of a field declaration to be used in statements like CREATE TABLE. +
194     * +
195     * @param string $charset   name of the charset +
196     * @return string  DBMS specific SQL code portion needed to set the CHARACTER SET +
197     *                 of a field declaration. +
198     */ +
199    public function getCharsetFieldDeclaration($charset) +
200    { +
201        return 'CHARACTER SET ' . $charset; +
202    } +
203    /** +
204     * Obtain DBMS specific SQL code portion needed to set the COLLATION +
205     * of a field declaration to be used in statements like CREATE TABLE. +
206     * +
207     * @param string $collation   name of the collation +
208     * @return string  DBMS specific SQL code portion needed to set the COLLATION +
209     *                 of a field declaration. +
210     */ +
211    public function getCollationFieldDeclaration($collation) +
212    { +
213        return 'COLLATE ' . $collation; +
214    } +
215}
\ No newline at end of file diff --git a/tests/coverage/Doctrine_DataDict_Mssql.html b/tests/coverage/Doctrine_DataDict_Mssql.html new file mode 100644 index 000000000..6b2a1f162 --- /dev/null +++ b/tests/coverage/Doctrine_DataDict_Mssql.html @@ -0,0 +1,576 @@ + + + Coverage for Doctrine_DataDict_Mssql + + +

Coverage for Doctrine_DataDict_Mssql

Back to coverage report

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
1<?php +
2/* +
3 *  $Id: Mssql.php 2702 2007-10-03 21:43:22Z Jonathan.Wage $ +
4 * +
5 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +
6 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +
7 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +
8 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +
9 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +
10 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +
11 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +
12 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +
13 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +
14 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +
15 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +
16 * +
17 * This software consists of voluntary contributions made by many individuals +
18 * and is licensed under the LGPL. For more information, see +
19 * <http://www.phpdoctrine.com>. +
20 */ +
21Doctrine::autoload('Doctrine_DataDict'); +
22/** +
23 * @package     Doctrine +
24 * @subpackage  DataDict +
25 * @license     http://www.opensource.org/licenses/lgpl-license.php LGPL +
26 * @author      Konsta Vesterinen <kvesteri@cc.hut.fi> +
27 * @author      Lukas Smith <smith@pooteeweet.org> (PEAR MDB2 library) +
28 * @author      Frank M. Kromann <frank@kromann.info> (PEAR MDB2 Mssql driver) +
29 * @author      David Coallier <davidc@php.net> (PEAR MDB2 Mssql driver) +
30 * @version     $Revision: 2702 $ +
31 * @link        www.phpdoctrine.com +
32 * @since       1.0 +
33 */ +
34class Doctrine_DataDict_Mssql extends Doctrine_DataDict +
35{ +
36    /** +
37     * Obtain DBMS specific SQL code portion needed to declare an text type +
38     * field to be used in statements like CREATE TABLE. +
39     * +
40     * @param array $field  associative array with the name of the properties +
41     *      of the field being declared as array indexes. Currently, the types +
42     *      of supported field properties are as follows: +
43     * +
44     *      length +
45     *          Integer value that determines the maximum length of the text +
46     *          field. If this argument is missing the field should be +
47     *          declared to have the longest length allowed by the DBMS. +
48     * +
49     *      default +
50     *          Text value to be used as default for this field. +
51     * +
52     *      notnull +
53     *          Boolean flag that indicates whether this field is constrained +
54     *          to not be set to null. +
55     * +
56     * @return      string      DBMS specific SQL code portion that should be used to +
57     *                          declare the specified field. +
58     */ +
59    public function getNativeDeclaration($field) +
60    { +
61        if ( ! isset($field['type'])) { +
62            throw new Doctrine_DataDict_Exception('Missing column type.'); +
63        } +
64        switch ($field['type']) { +
65            case 'array': +
66            case 'object': +
67            case 'text': +
68            case 'char': +
69            case 'varchar': +
70            case 'string': +
71            case 'gzip': +
72                $length = !empty($field['length']) +
73                    ? $field['length'] : false; +
74 +
75                $fixed  = ((isset($field['fixed']) && $field['fixed']) || $field['type'] == 'char') ? true : false; +
76 +
77                return $fixed ? ($length ? 'CHAR('.$length.')' : 'CHAR('.$this->conn->options['default_text_field_length'].')') +
78                    : ($length ? 'VARCHAR('.$length.')' : 'TEXT'); +
79            case 'clob': +
80                if ( ! empty($field['length'])) { +
81                    $length = $field['length']; +
82                    if ($length <= 8000) { +
83                        return 'VARCHAR('.$length.')'; +
84                    } +
85                 } +
86                 return 'TEXT'; +
87            case 'blob': +
88                if ( ! empty($field['length'])) { +
89                    $length = $field['length']; +
90                    if ($length <= 8000) { +
91                        return "VARBINARY($length)"; +
92                    } +
93                } +
94                return 'IMAGE'; +
95            case 'integer': +
96            case 'enum': +
97            case 'int': +
98                return 'INT'; +
99            case 'boolean': +
100                return 'BIT'; +
101            case 'date': +
102                return 'CHAR(' . strlen('YYYY-MM-DD') . ')'; +
103            case 'time': +
104                return 'CHAR(' . strlen('HH:MM:SS') . ')'; +
105            case 'timestamp': +
106                return 'CHAR(' . strlen('YYYY-MM-DD HH:MM:SS') . ')'; +
107            case 'float': +
108                return 'FLOAT'; +
109            case 'decimal': +
110                $length = !empty($field['length']) ? $field['length'] : 18; +
111                $scale = !empty($field['scale']) ? $field['scale'] : $this->conn->getAttribute(Doctrine::ATTR_DECIMAL_PLACES); +
112                return 'DECIMAL('.$length.','.$scale.')'; +
113        } +
114 +
115        throw new Doctrine_DataDict_Exception('Unknown field type \'' . $field['type'] .  '\'.'); +
116    } +
117    /** +
118     * Maps a native array description of a field to a MDB2 datatype and length +
119     * +
120     * @param   array           $field native field description +
121     * @return  array           containing the various possible types, length, sign, fixed +
122     */ +
123    public function getPortableDeclaration($field) +
124    { +
125        $db_type = preg_replace('/\d/','', strtolower($field['type']) ); +
126        $length  = (isset($field['length']) && $field['length'] > 0) ? $field['length'] : null; +
127 +
128        $type = array(); +
129        // todo: unsigned handling seems to be missing +
130        $unsigned = $fixed = null; +
131 +
132        if ( ! isset($field['name'])) +
133            $field['name'] = ''; +
134 +
135        switch ($db_type) { +
136            case 'bit': +
137                $type[0] = 'boolean'; +
138            break; +
139            case 'int': +
140                $type[0] = 'integer'; +
141                if ($length == 1) { +
142                    $type[] = 'boolean'; +
143                } +
144            break; +
145            case 'datetime': +
146                $type[0] = 'timestamp'; +
147            break; +
148            case 'float': +
149            case 'real': +
150            case 'numeric': +
151                $type[0] = 'float'; +
152            break; +
153            case 'decimal': +
154            case 'money': +
155                $type[0] = 'decimal'; +
156            break; +
157            case 'text': +
158            case 'varchar': +
159                $fixed = false; +
160            case 'char': +
161                $type[0] = 'string'; +
162                if ($length == '1') { +
163                    $type[] = 'boolean'; +
164                    if (preg_match('/^[is|has]/', $field['name'])) { +
165                        $type = array_reverse($type); +
166                    } +
167                } elseif (strstr($db_type, 'text')) { +
168                    $type[] = 'clob'; +
169                } +
170                if ($fixed !== false) { +
171                    $fixed = true; +
172                } +
173            break; +
174            case 'image': +
175            case 'varbinary': +
176                $type[] = 'blob'; +
177                $length = null; +
178            break; +
179            default: +
180                throw new Doctrine_DataDict_Exception('unknown database attribute type: '.$db_type); +
181        } +
182 +
183        return array('type'     => $type, +
184                     'length'   => $length, +
185                     'unsigned' => $unsigned, +
186                     'fixed'    => $fixed); +
187    } +
188} +
\ No newline at end of file diff --git a/tests/coverage/Doctrine_DataDict_Mysql.html b/tests/coverage/Doctrine_DataDict_Mysql.html new file mode 100644 index 000000000..393734d0d --- /dev/null +++ b/tests/coverage/Doctrine_DataDict_Mysql.html @@ -0,0 +1,1397 @@ + + + Coverage for Doctrine_DataDict_Mysql + + +

Coverage for Doctrine_DataDict_Mysql

Back to coverage report

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
1<?php +
2/* +
3 *  $Id: Mysql.php 2702 2007-10-03 21:43:22Z Jonathan.Wage $ +
4 * +
5 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +
6 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +
7 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +
8 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +
9 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +
10 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +
11 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +
12 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +
13 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +
14 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +
15 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +
16 * +
17 * This software consists of voluntary contributions made by many individuals +
18 * and is licensed under the LGPL. For more information, see +
19 * <http://www.phpdoctrine.com>. +
20 */ +
21Doctrine::autoload('Doctrine_DataDict'); +
22/** +
23 * @package     Doctrine +
24 * @subpackage  DataDict +
25 * @license     http://www.opensource.org/licenses/lgpl-license.php LGPL +
26 * @author      Konsta Vesterinen <kvesteri@cc.hut.fi> +
27 * @author      Lukas Smith <smith@pooteeweet.org> (PEAR MDB2 library) +
28 * @version     $Revision: 2702 $ +
29 * @link        www.phpdoctrine.com +
30 * @since       1.0 +
31 */ +
32class Doctrine_DataDict_Mysql extends Doctrine_DataDict +
33{ +
34    protected $keywords = array( +
35                          'ADD', 'ALL', 'ALTER', +
36                          'ANALYZE', 'AND', 'AS', +
37                          'ASC', 'ASENSITIVE', 'BEFORE', +
38                          'BETWEEN', 'BIGINT', 'BINARY', +
39                          'BLOB', 'BOTH', 'BY', +
40                          'CALL', 'CASCADE', 'CASE', +
41                          'CHANGE', 'CHAR', 'CHARACTER', +
42                          'CHECK', 'COLLATE', 'COLUMN', +
43                          'CONDITION', 'CONNECTION', 'CONSTRAINT', +
44                          'CONTINUE', 'CONVERT', 'CREATE', +
45                          'CROSS', 'CURRENT_DATE', 'CURRENT_TIME', +
46                          'CURRENT_TIMESTAMP', 'CURRENT_USER', 'CURSOR', +
47                          'DATABASE', 'DATABASES', 'DAY_HOUR', +
48                          'DAY_MICROSECOND', 'DAY_MINUTE', 'DAY_SECOND', +
49                          'DEC', 'DECIMAL', 'DECLARE', +
50                          'DEFAULT', 'DELAYED', 'DELETE', +
51                          'DESC', 'DESCRIBE', 'DETERMINISTIC', +
52                          'DISTINCT', 'DISTINCTROW', 'DIV', +
53                          'DOUBLE', 'DROP', 'DUAL', +
54                          'EACH', 'ELSE', 'ELSEIF', +
55                          'ENCLOSED', 'ESCAPED', 'EXISTS', +
56                          'EXIT', 'EXPLAIN', 'FALSE', +
57                          'FETCH', 'FLOAT', 'FLOAT4', +
58                          'FLOAT8', 'FOR', 'FORCE', +
59                          'FOREIGN', 'FROM', 'FULLTEXT', +
60                          'GRANT', 'GROUP', 'HAVING', +
61                          'HIGH_PRIORITY', 'HOUR_MICROSECOND', 'HOUR_MINUTE', +
62                          'HOUR_SECOND', 'IF', 'IGNORE', +
63                          'IN', 'INDEX', 'INFILE', +
64                          'INNER', 'INOUT', 'INSENSITIVE', +
65                          'INSERT', 'INT', 'INT1', +
66                          'INT2', 'INT3', 'INT4', +
67                          'INT8', 'INTEGER', 'INTERVAL', +
68                          'INTO', 'IS', 'ITERATE', +
69                          'JOIN', 'KEY', 'KEYS', +
70                          'KILL', 'LEADING', 'LEAVE', +
71                          'LEFT', 'LIKE', 'LIMIT', +
72                          'LINES', 'LOAD', 'LOCALTIME', +
73                          'LOCALTIMESTAMP', 'LOCK', 'LONG', +
74                          'LONGBLOB', 'LONGTEXT', 'LOOP', +
75                          'LOW_PRIORITY', 'MATCH', 'MEDIUMBLOB', +
76                          'MEDIUMINT', 'MEDIUMTEXT', 'MIDDLEINT', +
77                          'MINUTE_MICROSECOND', 'MINUTE_SECOND', 'MOD', +
78                          'MODIFIES', 'NATURAL', 'NOT', +
79                          'NO_WRITE_TO_BINLOG', 'NULL', 'NUMERIC', +
80                          'ON', 'OPTIMIZE', 'OPTION', +
81                          'OPTIONALLY', 'OR', 'ORDER', +
82                          'OUT', 'OUTER', 'OUTFILE', +
83                          'PRECISION', 'PRIMARY', 'PROCEDURE', +
84                          'PURGE', 'RAID0', 'READ', +
85                          'READS', 'REAL', 'REFERENCES', +
86                          'REGEXP', 'RELEASE', 'RENAME', +
87                          'REPEAT', 'REPLACE', 'REQUIRE', +
88                          'RESTRICT', 'RETURN', 'REVOKE', +
89                          'RIGHT', 'RLIKE', 'SCHEMA', +
90                          'SCHEMAS', 'SECOND_MICROSECOND', 'SELECT', +
91                          'SENSITIVE', 'SEPARATOR', 'SET', +
92                          'SHOW', 'SMALLINT', 'SONAME', +
93                          'SPATIAL', 'SPECIFIC', 'SQL', +
94                          'SQLEXCEPTION', 'SQLSTATE', 'SQLWARNING', +
95                          'SQL_BIG_RESULT', 'SQL_CALC_FOUND_ROWS', 'SQL_SMALL_RESULT', +
96                          'SSL', 'STARTING', 'STRAIGHT_JOIN', +
97                          'TABLE', 'TERMINATED', 'THEN', +
98                          'TINYBLOB', 'TINYINT', 'TINYTEXT', +
99                          'TO', 'TRAILING', 'TRIGGER', +
100                          'TRUE', 'UNDO', 'UNION', +
101                          'UNIQUE', 'UNLOCK', 'UNSIGNED', +
102                          'UPDATE', 'USAGE', 'USE', +
103                          'USING', 'UTC_DATE', 'UTC_TIME', +
104                          'UTC_TIMESTAMP', 'VALUES', 'VARBINARY', +
105                          'VARCHAR', 'VARCHARACTER', 'VARYING', +
106                          'WHEN', 'WHERE', 'WHILE', +
107                          'WITH', 'WRITE', 'X509', +
108                          'XOR', 'YEAR_MONTH', 'ZEROFILL' +
109                          ); +
110 +
111    /** +
112     * Obtain DBMS specific SQL code portion needed to declare an text type +
113     * field to be used in statements like CREATE TABLE. +
114     * +
115     * @param array $field  associative array with the name of the properties +
116     *      of the field being declared as array indexes. Currently, the types +
117     *      of supported field properties are as follows: +
118     * +
119     *      length +
120     *          Integer value that determines the maximum length of the text +
121     *          field. If this argument is missing the field should be +
122     *          declared to have the longest length allowed by the DBMS. +
123     * +
124     *      default +
125     *          Text value to be used as default for this field. +
126     * +
127     *      notnull +
128     *          Boolean flag that indicates whether this field is constrained +
129     *          to not be set to null. +
130     * +
131     * @return string  DBMS specific SQL code portion that should be used to +
132     *      declare the specified field. +
133     */ +
134    public function getNativeDeclaration($field) +
135    { +
136        if ( ! isset($field['type'])) { +
137            throw new Doctrine_DataDict_Exception('Missing column type.'); +
138        } +
139 +
140        switch ($field['type']) { +
141            case 'char': +
142                $length = ( ! empty($field['length'])) ? $field['length'] : false; +
143 +
144                return $length ? 'CHAR('.$length.')' : 'CHAR(255)'; +
145            case 'varchar': +
146            case 'array': +
147            case 'object': +
148            case 'string': +
149            case 'gzip': +
150                if ( ! isset($field['length'])) { +
151                    if (array_key_exists('default', $field)) { +
152                        $field['length'] = $this->conn->varchar_max_length; +
153                    } else { +
154                        $field['length'] = false; +
155                    } +
156                } +
157 +
158                $length = ($field['length'] <= $this->conn->varchar_max_length) ? $field['length'] : false; +
159                $fixed  = (isset($field['fixed'])) ? $field['fixed'] : false; +
160 +
161                return $fixed ? ($length ? 'CHAR(' . $length . ')' : 'CHAR(255)') +
162                    : ($length ? 'VARCHAR(' . $length . ')' : 'TEXT'); +
163            case 'clob': +
164                if ( ! empty($field['length'])) { +
165                    $length = $field['length']; +
166                    if ($length <= 255) { +
167                        return 'TINYTEXT'; +
168                    } elseif ($length <= 65532) { +
169                        return 'TEXT'; +
170                    } elseif ($length <= 16777215) { +
171                        return 'MEDIUMTEXT'; +
172                    } +
173                } +
174                return 'LONGTEXT'; +
175            case 'blob': +
176                if ( ! empty($field['length'])) { +
177                    $length = $field['length']; +
178                    if ($length <= 255) { +
179                        return 'TINYBLOB'; +
180                    } elseif ($length <= 65532) { +
181                        return 'BLOB'; +
182                    } elseif ($length <= 16777215) { +
183                        return 'MEDIUMBLOB'; +
184                    } +
185                } +
186                return 'LONGBLOB'; +
187            case 'enum': +
188                if ($this->conn->getAttribute(Doctrine::ATTR_USE_NATIVE_ENUM)) { +
189                    $values = array(); +
190                    foreach ($field['values'] as $value) { +
191                      $values[] = $this->conn->quote($value, 'varchar'); +
192                    } +
193                    return 'ENUM('.implode(', ', $values).')'; +
194                } +
195                // fall back to integer +
196            case 'integer': +
197            case 'int': +
198                if ( ! empty($field['length'])) { +
199                    $length = $field['length']; +
200                    if ($length <= 1) { +
201                        return 'TINYINT'; +
202                    } elseif ($length == 2) { +
203                        return 'SMALLINT'; +
204                    } elseif ($length == 3) { +
205                        return 'MEDIUMINT'; +
206                    } elseif ($length == 4) { +
207                        return 'INT'; +
208                    } elseif ($length > 4) { +
209                        return 'BIGINT'; +
210                    } +
211                } +
212                return 'INT'; +
213            case 'boolean': +
214                return 'TINYINT(1)'; +
215            case 'date': +
216                return 'DATE'; +
217            case 'time': +
218                return 'TIME'; +
219            case 'timestamp': +
220                return 'DATETIME'; +
221            case 'float': +
222            case 'double': +
223                return 'DOUBLE'; +
224            case 'decimal': +
225                $length = !empty($field['length']) ? $field['length'] : 18; +
226                $scale = !empty($field['scale']) ? $field['scale'] : $this->conn->getAttribute(Doctrine::ATTR_DECIMAL_PLACES); +
227                return 'DECIMAL('.$length.','.$scale.')'; +
228        } +
229        throw new Doctrine_DataDict_Exception('Unknown field type \'' . $field['type'] .  '\'.'); +
230    } +
231    /** +
232     * Maps a native array description of a field to a MDB2 datatype and length +
233     * +
234     * @param array  $field native field description +
235     * @return array containing the various possible types, length, sign, fixed +
236     */ +
237    public function getPortableDeclaration(array $field) +
238    { +
239        $dbType = strtolower($field['type']); +
240        $dbType = strtok($dbType, '(), '); +
241        if ($dbType == 'national') { +
242            $dbType = strtok('(), '); +
243        } +
244        if (isset($field['length'])) { +
245            $length = $field['length']; +
246            $decimal = ''; +
247        } else { +
248            $length = strtok('(), '); +
249            $decimal = strtok('(), '); +
250        } +
251        $type = array(); +
252        $unsigned = $fixed = null; +
253 +
254        if ( ! isset($field['name'])) { +
255            $field['name'] = ''; +
256        } +
257 +
258        $values = null; +
259 +
260        switch ($dbType) { +
261            case 'tinyint': +
262                $type[] = 'integer'; +
263                $type[] = 'boolean'; +
264                if (preg_match('/^(is|has)/', $field['name'])) { +
265                    $type = array_reverse($type); +
266                } +
267                $unsigned = preg_match('/ unsigned/i', $field['type']); +
268                $length = 1; +
269            break; +
270            case 'smallint': +
271                $type[] = 'integer'; +
272                $unsigned = preg_match('/ unsigned/i', $field['type']); +
273                $length = 2; +
274            break; +
275            case 'mediumint': +
276                $type[] = 'integer'; +
277                $unsigned = preg_match('/ unsigned/i', $field['type']); +
278                $length = 3; +
279            break; +
280            case 'int': +
281            case 'integer': +
282                $type[] = 'integer'; +
283                $unsigned = preg_match('/ unsigned/i', $field['type']); +
284                $length = 4; +
285            break; +
286            case 'bigint': +
287                $type[] = 'integer'; +
288                $unsigned = preg_match('/ unsigned/i', $field['type']); +
289                $length = 8; +
290            break; +
291            case 'tinytext': +
292            case 'mediumtext': +
293            case 'longtext': +
294            case 'text': +
295            case 'text': +
296            case 'varchar': +
297                $fixed = false; +
298            case 'string': +
299            case 'char': +
300                $type[] = 'string'; +
301                if ($length == '1') { +
302                    $type[] = 'boolean'; +
303                    if (preg_match('/^(is|has)/', $field['name'])) { +
304                        $type = array_reverse($type); +
305                    } +
306                } elseif (strstr($dbType, 'text')) { +
307                    $type[] = 'clob'; +
308                    if ($decimal == 'binary') { +
309                        $type[] = 'blob'; +
310                    } +
311                } +
312                if ($fixed !== false) { +
313                    $fixed = true; +
314                } +
315            break; +
316            case 'enum': +
317                $type[] = 'enum'; +
318                preg_match_all('/\'.+\'/U', $field['type'], $matches); +
319                $length = 0; +
320                $fixed = false; +
321                if (is_array($matches)) { +
322                    foreach ($matches[0] as $value) { +
323                        $length = max($length, strlen($value)-2); +
324                    } +
325                    if ($length == '1' && count($matches[0]) == 2) { +
326                        $type[] = 'boolean'; +
327                        if (preg_match('/^(is|has)/', $field['name'])) { +
328                            $type = array_reverse($type); +
329                        } +
330                    } else { +
331                        $values = $matches[0]; +
332                    } +
333                } +
334                $type[] = 'integer'; +
335            case 'set': +
336                $fixed = false; +
337                $type[] = 'text'; +
338                $type[] = 'integer'; +
339            break; +
340            case 'date': +
341                $type[] = 'date'; +
342                $length = null; +
343            break; +
344            case 'datetime': +
345            case 'timestamp': +
346                $type[] = 'timestamp'; +
347                $length = null; +
348            break; +
349            case 'time': +
350                $type[] = 'time'; +
351                $length = null; +
352            break; +
353            case 'float': +
354            case 'double': +
355            case 'real': +
356                $type[] = 'float'; +
357                $unsigned = preg_match('/ unsigned/i', $field['type']); +
358            break; +
359            case 'unknown': +
360            case 'decimal': +
361            case 'numeric': +
362                $type[] = 'decimal'; +
363                $unsigned = preg_match('/ unsigned/i', $field['type']); +
364            break; +
365            case 'tinyblob': +
366            case 'mediumblob': +
367            case 'longblob': +
368            case 'blob': +
369                $type[] = 'blob'; +
370                $length = null; +
371            break; +
372            case 'year': +
373                $type[] = 'integer'; +
374                $type[] = 'date'; +
375                $length = null; +
376            break; +
377            default: +
378                throw new Doctrine_DataDict_Exception('unknown database attribute type: ' . $dbType); +
379        } +
380 +
381        $length = ((int) $length == 0) ? null : (int) $length; +
382 +
383        if ($values === null) { +
384            return array('type' => $type, 'length' => $length, 'unsigned' => $unsigned, 'fixed' => $fixed); +
385        } else { +
386            return array('type' => $type, 'length' => $length, 'unsigned' => $unsigned, 'fixed' => $fixed, 'values' => $values); +
387        } +
388    } +
389    /** +
390     * Obtain DBMS specific SQL code portion needed to set the CHARACTER SET +
391     * of a field declaration to be used in statements like CREATE TABLE. +
392     * +
393     * @param string $charset   name of the charset +
394     * @return string  DBMS specific SQL code portion needed to set the CHARACTER SET +
395     *                 of a field declaration. +
396     */ +
397    public function getCharsetFieldDeclaration($charset) +
398    { +
399        return 'CHARACTER SET ' . $charset; +
400    } +
401    /** +
402     * Obtain DBMS specific SQL code portion needed to set the COLLATION +
403     * of a field declaration to be used in statements like CREATE TABLE. +
404     * +
405     * @param string $collation   name of the collation +
406     * @return string  DBMS specific SQL code portion needed to set the COLLATION +
407     *                 of a field declaration. +
408     */ +
409    public function getCollationFieldDeclaration($collation) +
410    { +
411        return 'COLLATE ' . $collation; +
412    } +
413    /** +
414     * Obtain DBMS specific SQL code portion needed to declare an integer type +
415     * field to be used in statements like CREATE TABLE. +
416     * +
417     * @param string  $name   name the field to be declared. +
418     * @param string  $field  associative array with the name of the properties +
419     *                        of the field being declared as array indexes. +
420     *                        Currently, the types of supported field +
421     *                        properties are as follows: +
422     * +
423     *                       unsigned +
424     *                        Boolean flag that indicates whether the field +
425     *                        should be declared as unsigned integer if +
426     *                        possible. +
427     * +
428     *                       default +
429     *                        Integer value to be used as default for this +
430     *                        field. +
431     * +
432     *                       notnull +
433     *                        Boolean flag that indicates whether this field is +
434     *                        constrained to not be set to null. +
435     * @return string  DBMS specific SQL code portion that should be used to +
436     *                 declare the specified field. +
437     */ +
438    public function getIntegerDeclaration($name, $field) +
439    { +
440        $default = $autoinc = ''; +
441        if ( ! empty($field['autoincrement'])) { +
442            $autoinc = ' AUTO_INCREMENT'; +
443        } elseif (array_key_exists('default', $field)) { +
444            if ($field['default'] === '') { +
445                $field['default'] = empty($field['notnull']) ? null : 0; +
446            } +
447            $default = ' DEFAULT '.$this->conn->quote($field['default']); +
448        } +
449        /** +
450        elseif (empty($field['notnull'])) { +
451            $default = ' DEFAULT NULL'; +
452        } +
453        */ +
454 +
455        $notnull  = (isset($field['notnull'])  && $field['notnull'])  ? ' NOT NULL' : ''; +
456        $unsigned = (isset($field['unsigned']) && $field['unsigned']) ? ' UNSIGNED' : ''; +
457 +
458        $name = $this->conn->quoteIdentifier($name, true); +
459 +
460        return $name . ' ' . $this->getNativeDeclaration($field) . $unsigned . $default . $notnull . $autoinc; +
461    } +
462}
\ No newline at end of file diff --git a/tests/coverage/Doctrine_DataDict_Oracle.html b/tests/coverage/Doctrine_DataDict_Oracle.html new file mode 100644 index 000000000..f437a030b --- /dev/null +++ b/tests/coverage/Doctrine_DataDict_Oracle.html @@ -0,0 +1,593 @@ + + + Coverage for Doctrine_DataDict_Oracle + + +

Coverage for Doctrine_DataDict_Oracle

Back to coverage report

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
1<?php +
2/* +
3 *  $Id: Oracle.php 2702 2007-10-03 21:43:22Z Jonathan.Wage $ +
4 * +
5 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +
6 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +
7 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +
8 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +
9 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +
10 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +
11 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +
12 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +
13 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +
14 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +
15 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +
16 * +
17 * This software consists of voluntary contributions made by many individuals +
18 * and is licensed under the LGPL. For more information, see +
19 * <http://www.phpdoctrine.com>. +
20 */ +
21Doctrine::autoload('Doctrine_DataDict'); +
22/** +
23 * @package     Doctrine +
24 * @subpackage  DataDict +
25 * @license     http://www.opensource.org/licenses/lgpl-license.php LGPL +
26 * @author      Konsta Vesterinen <kvesteri@cc.hut.fi> +
27 * @version     $Revision: 2702 $ +
28 * @link        www.phpdoctrine.com +
29 * @since       1.0 +
30 */ +
31class Doctrine_DataDict_Oracle extends Doctrine_DataDict +
32{ +
33    /** +
34     * Obtain DBMS specific SQL code portion needed to declare an text type +
35     * field to be used in statements like CREATE TABLE. +
36     * +
37     * @param array $field  associative array with the name of the properties +
38     *      of the field being declared as array indexes. Currently, the types +
39     *      of supported field properties are as follows: +
40     * +
41     *      length +
42     *          Integer value that determines the maximum length of the text +
43     *          field. If this argument is missing the field should be +
44     *          declared to have the longest length allowed by the DBMS. +
45     * +
46     *      default +
47     *          Text value to be used as default for this field. +
48     * +
49     *      notnull +
50     *          Boolean flag that indicates whether this field is constrained +
51     *          to not be set to null. +
52     * @return string  DBMS specific SQL code portion that should be used to +
53     *      declare the specified field. +
54     */ +
55    public function getNativeDeclaration(array $field) +
56    { +
57        if ( ! isset($field['type'])) { +
58            throw new Doctrine_DataDict_Exception('Missing column type.'); +
59        } +
60        switch ($field['type']) { +
61            case 'string': +
62            case 'array': +
63            case 'object': +
64            case 'gzip': +
65            case 'char': +
66            case 'varchar': +
67                $length = !empty($field['length']) +
68                    ? $field['length'] : 16777215; // TODO: $this->conn->options['default_text_field_length']; +
69 +
70                $fixed  = ((isset($field['fixed']) && $field['fixed']) || $field['type'] == 'char') ? true : false; +
71 +
72                return $fixed ? 'CHAR('.$length.')' : 'VARCHAR2('.$length.')'; +
73            case 'clob': +
74                return 'CLOB'; +
75            case 'blob': +
76                return 'BLOB'; +
77            case 'integer': +
78            case 'enum': +
79            case 'int': +
80                if ( ! empty($field['length'])) { +
81                    return 'NUMBER('.$field['length'].')'; +
82                } +
83                return 'INT'; +
84            case 'boolean': +
85                return 'NUMBER(1)'; +
86            case 'date': +
87            case 'time': +
88            case 'timestamp': +
89                return 'DATE'; +
90            case 'float': +
91            case 'double': +
92                return 'NUMBER'; +
93            case 'decimal': +
94                $scale = !empty($field['scale']) ? $field['scale'] : $this->conn->getAttribute(Doctrine::ATTR_DECIMAL_PLACES); +
95                return 'NUMBER(*,'.$scale.')'; +
96            default: +
97        } +
98        throw new Doctrine_DataDict_Exception('Unknown field type \'' . $field['type'] .  '\'.'); +
99    } +
100    /** +
101     * Maps a native array description of a field to a doctrine datatype and length +
102     * +
103     * @param array  $field native field description +
104     * @return array containing the various possible types, length, sign, fixed +
105     * @throws Doctrine_DataDict_Oracle_Exception +
106     */ +
107    public function getPortableDeclaration(array $field) +
108    { +
109        $dbType = strtolower($field['type']); +
110        $type = array(); +
111        $length = $unsigned = $fixed = null; +
112        if ( ! empty($field['length'])) { +
113            $length = $field['length']; +
114        } +
115 +
116        if ( ! isset($field['name'])) { +
117            $field['name'] = ''; +
118        } +
119 +
120        switch ($dbType) { +
121            case 'integer': +
122            case 'pls_integer': +
123            case 'binary_integer': +
124                $type[] = 'integer'; +
125                if ($length == '1') { +
126                    $type[] = 'boolean'; +
127                    if (preg_match('/^(is|has)/', $field['name'])) { +
128                        $type = array_reverse($type); +
129                    } +
130                } +
131                break; +
132            case 'varchar': +
133            case 'varchar2': +
134            case 'nvarchar2': +
135                $fixed = false; +
136            case 'char': +
137            case 'nchar': +
138                $type[] = 'string'; +
139                if ($length == '1') { +
140                    $type[] = 'boolean'; +
141                    if (preg_match('/^(is|has)/', $field['name'])) { +
142                        $type = array_reverse($type); +
143                    } +
144                } +
145                if ($fixed !== false) { +
146                    $fixed = true; +
147                } +
148                break; +
149            case 'date': +
150            case 'timestamp': +
151                $type[] = 'timestamp'; +
152                $length = null; +
153                break; +
154            case 'float': +
155                $type[] = 'float'; +
156                break; +
157            case 'number': +
158                if ( ! empty($field['scale'])) { +
159                    $type[] = 'decimal'; +
160                } else { +
161                    $type[] = 'integer'; +
162                    if ($length == '1') { +
163                        $type[] = 'boolean'; +
164                        if (preg_match('/^(is|has)/', $field['name'])) { +
165                            $type = array_reverse($type); +
166                        } +
167                    } +
168                } +
169                break; +
170            case 'long': +
171                $type[] = 'string'; +
172            case 'clob': +
173            case 'nclob': +
174                $type[] = 'clob'; +
175                break; +
176            case 'blob': +
177            case 'raw': +
178            case 'long raw': +
179            case 'bfile': +
180                $type[] = 'blob'; +
181                $length = null; +
182            break; +
183            case 'rowid': +
184            case 'urowid': +
185            default: +
186                throw new Doctrine_DataDict_Exception('unknown database attribute type: ' . $dbType); +
187        } +
188 +
189        return array('type'     => $type, +
190                     'length'   => $length, +
191                     'unsigned' => $unsigned, +
192                     'fixed'    => $fixed); +
193    } +
194}
\ No newline at end of file diff --git a/tests/coverage/Doctrine_DataDict_Pgsql.html b/tests/coverage/Doctrine_DataDict_Pgsql.html new file mode 100644 index 000000000..fc1f27273 --- /dev/null +++ b/tests/coverage/Doctrine_DataDict_Pgsql.html @@ -0,0 +1,1875 @@ + + + Coverage for Doctrine_DataDict_Pgsql + + +

Coverage for Doctrine_DataDict_Pgsql

Back to coverage report

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
1<?php +
2/* +
3 *  $Id: Pgsql.php 2762 2007-10-07 23:43:26Z zYne $ +
4 * +
5 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +
6 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +
7 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +
8 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +
9 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +
10 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +
11 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +
12 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +
13 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +
14 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +
15 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +
16 * +
17 * This software consists of voluntary contributions made by many individuals +
18 * and is licensed under the LGPL. For more information, see +
19 * <http://www.phpdoctrine.com>. +
20 */ +
21Doctrine::autoload('Doctrine_DataDict'); +
22/** +
23 * @package     Doctrine +
24 * @subpackage  DataDict +
25 * @license     http://www.opensource.org/licenses/lgpl-license.php LGPL +
26 * @author      Konsta Vesterinen <kvesteri@cc.hut.fi> +
27 * @author      Paul Cooper <pgc@ucecom.com> +
28 * @author      Lukas Smith <smith@pooteeweet.org> (PEAR MDB2 library) +
29 * @version     $Revision: 2762 $ +
30 * @link        www.phpdoctrine.com +
31 * @since       1.0 +
32 */ +
33class Doctrine_DataDict_Pgsql extends Doctrine_DataDict +
34{ +
35    /** +
36     * @param array $reservedKeyWords     an array of reserved keywords by pgsql +
37     */ +
38    protected static $reservedKeyWords = array( +
39                                        'abort', +
40                                        'absolute', +
41                                        'access', +
42                                        'action', +
43                                        'add', +
44                                        'after', +
45                                        'aggregate', +
46                                        'all', +
47                                        'alter', +
48                                        'analyse', +
49                                        'analyze', +
50                                        'and', +
51                                        'any', +
52                                        'as', +
53                                        'asc', +
54                                        'assertion', +
55                                        'assignment', +
56                                        'at', +
57                                        'authorization', +
58                                        'backward', +
59                                        'before', +
60                                        'begin', +
61                                        'between', +
62                                        'bigint', +
63                                        'binary', +
64                                        'bit', +
65                                        'boolean', +
66                                        'both', +
67                                        'by', +
68                                        'cache', +
69                                        'called', +
70                                        'cascade', +
71                                        'case', +
72                                        'cast', +
73                                        'chain', +
74                                        'char', +
75                                        'character', +
76                                        'characteristics', +
77                                        'check', +
78                                        'checkpoint', +
79                                        'class', +
80                                        'close', +
81                                        'cluster', +
82                                        'coalesce', +
83                                        'collate', +
84                                        'column', +
85                                        'comment', +
86                                        'commit', +
87                                        'committed', +
88                                        'constraint', +
89                                        'constraints', +
90                                        'conversion', +
91                                        'convert', +
92                                        'copy', +
93                                        'create', +
94                                        'createdb', +
95                                        'createuser', +
96                                        'cross', +
97                                        'current_date', +
98                                        'current_time', +
99                                        'current_timestamp', +
100                                        'current_user', +
101                                        'cursor', +
102                                        'cycle', +
103                                        'database', +
104                                        'day', +
105                                        'deallocate', +
106                                        'dec', +
107                                        'decimal', +
108                                        'declare', +
109                                        'default', +
110                                        'deferrable', +
111                                        'deferred', +
112                                        'definer', +
113                                        'delete', +
114                                        'delimiter', +
115                                        'delimiters', +
116                                        'desc', +
117                                        'distinct', +
118                                        'do', +
119                                        'domain', +
120                                        'double', +
121                                        'drop', +
122                                        'each', +
123                                        'else', +
124                                        'encoding', +
125                                        'encrypted', +
126                                        'end', +
127                                        'escape', +
128                                        'except', +
129                                        'exclusive', +
130                                        'execute', +
131                                        'exists', +
132                                        'explain', +
133                                        'external', +
134                                        'extract', +
135                                        'false', +
136                                        'fetch', +
137                                        'float', +
138                                        'for', +
139                                        'force', +
140                                        'foreign', +
141                                        'forward', +
142                                        'freeze', +
143                                        'from', +
144                                        'full', +
145                                        'function', +
146                                        'get', +
147                                        'global', +
148                                        'grant', +
149                                        'group', +
150                                        'handler', +
151                                        'having', +
152                                        'hour', +
153                                        'ilike', +
154                                        'immediate', +
155                                        'immutable', +
156                                        'implicit', +
157                                        'in', +
158                                        'increment', +
159                                        'index', +
160                                        'inherits', +
161                                        'initially', +
162                                        'inner', +
163                                        'inout', +
164                                        'input', +
165                                        'insensitive', +
166                                        'insert', +
167                                        'instead', +
168                                        'int', +
169                                        'integer', +
170                                        'intersect', +
171                                        'interval', +
172                                        'into', +
173                                        'invoker', +
174                                        'is', +
175                                        'isnull', +
176                                        'isolation', +
177                                        'join', +
178                                        'key', +
179                                        'lancompiler', +
180                                        'language', +
181                                        'leading', +
182                                        'left', +
183                                        'level', +
184                                        'like', +
185                                        'limit', +
186                                        'listen', +
187                                        'load', +
188                                        'local', +
189                                        'localtime', +
190                                        'localtimestamp', +
191                                        'location', +
192                                        'lock', +
193                                        'match', +
194                                        'maxvalue', +
195                                        'minute', +
196                                        'minvalue', +
197                                        'mode', +
198                                        'month', +
199                                        'move', +
200                                        'names', +
201                                        'national', +
202                                        'natural', +
203                                        'nchar', +
204                                        'new', +
205                                        'next', +
206                                        'no', +
207                                        'nocreatedb', +
208                                        'nocreateuser', +
209                                        'none', +
210                                        'not', +
211                                        'nothing', +
212                                        'notify', +
213                                        'notnull', +
214                                        'null', +
215                                        'nullif', +
216                                        'numeric', +
217                                        'of', +
218                                        'off', +
219                                        'offset', +
220                                        'oids', +
221                                        'old', +
222                                        'on', +
223                                        'only', +
224                                        'operator', +
225                                        'option', +
226                                        'or', +
227                                        'order', +
228                                        'out', +
229                                        'outer', +
230                                        'overlaps', +
231                                        'overlay', +
232                                        'owner', +
233                                        'partial', +
234                                        'password', +
235                                        'path', +
236                                        'pendant', +
237                                        'placing', +
238                                        'position', +
239                                        'precision', +
240                                        'prepare', +
241                                        'primary', +
242                                        'prior', +
243                                        'privileges', +
244                                        'procedural', +
245                                        'procedure', +
246                                        'read', +
247                                        'real', +
248                                        'recheck', +
249                                        'references', +
250                                        'reindex', +
251                                        'relative', +
252                                        'rename', +
253                                        'replace', +
254                                        'reset', +
255                                        'restrict', +
256                                        'returns', +
257                                        'revoke', +
258                                        'right', +
259                                        'rollback', +
260                                        'row', +
261                                        'rule', +
262                                        'schema', +
263                                        'scroll', +
264                                        'second', +
265                                        'security', +
266                                        'select', +
267                                        'sequence', +
268                                        'serializable', +
269                                        'session', +
270                                        'session_user', +
271                                        'set', +
272                                        'setof', +
273                                        'share', +
274                                        'show', +
275                                        'similar', +
276                                        'simple', +
277                                        'smallint', +
278                                        'some', +
279                                        'stable', +
280                                        'start', +
281                                        'statement', +
282                                        'statistics', +
283                                        'stdin', +
284                                        'stdout', +
285                                        'storage', +
286                                        'strict', +
287                                        'substring', +
288                                        'sysid', +
289                                        'table', +
290                                        'temp', +
291                                        'template', +
292                                        'temporary', +
293                                        'then', +
294                                        'time', +
295                                        'timestamp', +
296                                        'to', +
297                                        'toast', +
298                                        'trailing', +
299                                        'transaction', +
300                                        'treat', +
301                                        'trigger', +
302                                        'trim', +
303                                        'true', +
304                                        'truncate', +
305                                        'trusted', +
306                                        'type', +
307                                        'unencrypted', +
308                                        'union', +
309                                        'unique', +
310                                        'unknown', +
311                                        'unlisten', +
312                                        'until', +
313                                        'update', +
314                                        'usage', +
315                                        'user', +
316                                        'using', +
317                                        'vacuum', +
318                                        'valid', +
319                                        'validator', +
320                                        'values', +
321                                        'varchar', +
322                                        'varying', +
323                                        'verbose', +
324                                        'version', +
325                                        'view', +
326                                        'volatile', +
327                                        'when', +
328                                        'where', +
329                                        'with', +
330                                        'without', +
331                                        'work', +
332                                        'write', +
333                                        'year', +
334                                        'zone' +
335                                        ); +
336 +
337    /** +
338     * Obtain DBMS specific SQL code portion needed to declare an text type +
339     * field to be used in statements like CREATE TABLE. +
340     * +
341     * @param array $field  associative array with the name of the properties +
342     *      of the field being declared as array indexes. Currently, the types +
343     *      of supported field properties are as follows: +
344     * +
345     *      length +
346     *          Integer value that determines the maximum length of the text +
347     *          field. If this argument is missing the field should be +
348     *          declared to have the longest length allowed by the DBMS. +
349     * +
350     *      default +
351     *          Text value to be used as default for this field. +
352     * +
353     *      notnull +
354     *          Boolean flag that indicates whether this field is constrained +
355     *          to not be set to null. +
356     * +
357     * @return string  DBMS specific SQL code portion that should be used to +
358     *      declare the specified field. +
359     */ +
360    public function getNativeDeclaration(array $field) +
361    { +
362        if ( ! isset($field['type'])) { +
363            throw new Doctrine_DataDict_Exception('Missing column type.'); +
364        } +
365        switch ($field['type']) { +
366            case 'char': +
367            case 'string': +
368            case 'array': +
369            case 'object': +
370            case 'varchar': +
371            case 'gzip': +
372                // TODO: what is the maximum VARCHAR length in pgsql ? +
373                $length = (isset($field['length']) && $field['length'] && $field['length'] < 10000) ? $field['length'] : null; +
374 +
375                $fixed  = ((isset($field['fixed']) && $field['fixed']) || $field['type'] == 'char') ? true : false; +
376 +
377                return $fixed ? ($length ? 'CHAR(' . $length . ')' : 'CHAR('.$this->conn->options['default_text_field_length'].')') +
378                    : ($length ? 'VARCHAR(' .$length . ')' : 'TEXT'); +
379 +
380            case 'clob': +
381                return 'TEXT'; +
382            case 'blob': +
383                return 'BYTEA'; +
384            case 'enum': +
385            case 'integer': +
386            case 'int': +
387                if ( ! empty($field['autoincrement'])) { +
388                    if ( ! empty($field['length'])) { +
389                        $length = $field['length']; +
390                        if ($length > 4) { +
391                            return 'BIGSERIAL'; +
392                        } +
393                    } +
394                    return 'SERIAL'; +
395                } +
396                if ( ! empty($field['length'])) { +
397                    $length = $field['length']; +
398                    if ($length <= 2) { +
399                        return 'SMALLINT'; +
400                    } elseif ($length == 3 || $length == 4) { +
401                        return 'INT'; +
402                    } elseif ($length > 4) { +
403                        return 'BIGINT'; +
404                    } +
405                } +
406                return 'INT'; +
407            case 'boolean': +
408                return 'BOOLEAN'; +
409            case 'date': +
410                return 'DATE'; +
411            case 'time': +
412                return 'TIME without time zone'; +
413            case 'timestamp': +
414                return 'TIMESTAMP without time zone'; +
415            case 'float': +
416            case 'double': +
417                return 'FLOAT8'; +
418            case 'decimal': +
419                $length = !empty($field['length']) ? $field['length'] : 18; +
420                $scale = !empty($field['scale']) ? $field['scale'] : $this->conn->getAttribute(Doctrine::ATTR_DECIMAL_PLACES); +
421                return 'NUMERIC('.$length.','.$scale.')'; +
422        } +
423        throw new Doctrine_DataDict_Exception('Unknown field type \'' . $field['type'] .  '\'.'); +
424    } +
425    /** +
426     * Maps a native array description of a field to a portable Doctrine datatype and length +
427     * +
428     * @param array  $field native field description +
429     * +
430     * @return array containing the various possible types, length, sign, fixed +
431     */ +
432    public function getPortableDeclaration(array $field) +
433    { +
434 +
435        $length = (isset($field['length'])) ? $field['length'] : null; +
436        if ($length == '-1' && isset($field['atttypmod'])) { +
437            $length = $field['atttypmod'] - 4; +
438        } +
439        if ((int)$length <= 0) { +
440            $length = null; +
441        } +
442        $type = array(); +
443        $unsigned = $fixed = null; +
444 +
445        if ( ! isset($field['name'])) { +
446            $field['name'] = ''; +
447        } +
448 +
449        $dbType = strtolower($field['type']); +
450 +
451        switch ($dbType) { +
452            case 'smallint': +
453            case 'int2': +
454                $type[] = 'integer'; +
455                $unsigned = false; +
456                $length = 2; +
457                if ($length == '2') { +
458                    $type[] = 'boolean'; +
459                    if (preg_match('/^(is|has)/', $field['name'])) { +
460                        $type = array_reverse($type); +
461                    } +
462                } +
463                break; +
464            case 'int': +
465            case 'int4': +
466            case 'integer': +
467            case 'serial': +
468            case 'serial4': +
469                $type[] = 'integer'; +
470                $unsigned = false; +
471                $length = 4; +
472                break; +
473            case 'bigint': +
474            case 'int8': +
475            case 'bigserial': +
476            case 'serial8': +
477                $type[] = 'integer'; +
478                $unsigned = false; +
479                $length = 8; +
480                break; +
481            case 'bool': +
482            case 'boolean': +
483                $type[] = 'boolean'; +
484                $length = 1; +
485                break; +
486            case 'text': +
487            case 'varchar': +
488                $fixed = false; +
489            case 'unknown': +
490            case 'char': +
491            case 'bpchar': +
492                $type[] = 'string'; +
493                if ($length == '1') { +
494                    $type[] = 'boolean'; +
495                    if (preg_match('/^(is|has)/', $field['name'])) { +
496                        $type = array_reverse($type); +
497                    } +
498                } elseif (strstr($dbType, 'text')) { +
499                    $type[] = 'clob'; +
500                } +
501                if ($fixed !== false) { +
502                    $fixed = true; +
503                } +
504                break; +
505            case 'date': +
506                $type[] = 'date'; +
507                $length = null; +
508                break; +
509            case 'datetime': +
510            case 'timestamp': +
511                $type[] = 'timestamp'; +
512                $length = null; +
513                break; +
514            case 'time': +
515                $type[] = 'time'; +
516                $length = null; +
517                break; +
518            case 'float': +
519            case 'float4': +
520            case 'double': +
521            case 'real': +
522                $type[] = 'float'; +
523                break; +
524            case 'decimal': +
525            case 'money': +
526            case 'numeric': +
527                $type[] = 'decimal'; +
528                break; +
529            case 'tinyblob': +
530            case 'mediumblob': +
531            case 'longblob': +
532            case 'blob': +
533            case 'bytea': +
534                $type[] = 'blob'; +
535                $length = null; +
536                break; +
537            case 'oid': +
538                $type[] = 'blob'; +
539                $type[] = 'clob'; +
540                $length = null; +
541                break; +
542            case 'year': +
543                $type[] = 'integer'; +
544                $type[] = 'date'; +
545                $length = null; +
546                break; +
547            default: +
548                throw new Doctrine_DataDict_Exception('unknown database attribute type: '.$dbType); +
549        } +
550 +
551        return array('type'     => $type, +
552                     'length'   => $length, +
553                     'unsigned' => $unsigned, +
554                     'fixed'    => $fixed); +
555    } +
556    /** +
557     * Obtain DBMS specific SQL code portion needed to declare an integer type +
558     * field to be used in statements like CREATE TABLE. +
559     * +
560     * @param string $name name the field to be declared. +
561     * @param array $field associative array with the name of the properties +
562     *       of the field being declared as array indexes. Currently, the types +
563     *       of supported field properties are as follows: +
564     * +
565     *       unsigned +
566     *           Boolean flag that indicates whether the field should be +
567     *           declared as unsigned integer if possible. +
568     * +
569     *       default +
570     *           Integer value to be used as default for this field. +
571     * +
572     *       notnull +
573     *           Boolean flag that indicates whether this field is constrained +
574     *           to not be set to null. +
575     * @return string DBMS specific SQL code portion that should be used to +
576     *       declare the specified field. +
577     */ +
578    public function getIntegerDeclaration($name, $field) +
579    { +
580        /** +
581        if ( ! empty($field['unsigned'])) { +
582            $this->conn->warnings[] = "unsigned integer field \"$name\" is being declared as signed integer"; +
583        } +
584        */ +
585 +
586        if ( ! empty($field['autoincrement'])) { +
587            $name = $this->conn->quoteIdentifier($name, true); +
588            return $name . ' ' . $this->getNativeDeclaration($field); +
589        } +
590 +
591        $default = ''; +
592        if (array_key_exists('default', $field)) { +
593            if ($field['default'] === '') { +
594                $field['default'] = empty($field['notnull']) ? null : 0; +
595            } +
596            $default = ' DEFAULT '.$this->conn->quote($field['default'], $field['type']); +
597        } +
598        /** +
599        TODO: is this needed ? +
600        elseif (empty($field['notnull'])) { +
601            $default = ' DEFAULT NULL'; +
602        } +
603        */ +
604 +
605        $notnull = empty($field['notnull']) ? '' : ' NOT NULL'; +
606        $name = $this->conn->quoteIdentifier($name, true); +
607        return $name . ' ' . $this->getNativeDeclaration($field) . $default . $notnull; +
608    } +
609    /** +
610     * parseBoolean +
611     * parses a literal boolean value and returns +
612     * proper sql equivalent +
613     * +
614     * @param string $value     boolean value to be parsed +
615     * @return string           parsed boolean value +
616     */ +
617    public function parseBoolean($value) +
618    { +
619        return $value; +
620    } +
621} +
\ No newline at end of file diff --git a/tests/coverage/Doctrine_DataDict_Sqlite.html b/tests/coverage/Doctrine_DataDict_Sqlite.html new file mode 100644 index 000000000..9b98c698d --- /dev/null +++ b/tests/coverage/Doctrine_DataDict_Sqlite.html @@ -0,0 +1,905 @@ + + + Coverage for Doctrine_DataDict_Sqlite + + +

Coverage for Doctrine_DataDict_Sqlite

Back to coverage report

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
1<?php +
2/* +
3 *  $Id: Sqlite.php 2702 2007-10-03 21:43:22Z Jonathan.Wage $ +
4 * +
5 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +
6 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +
7 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +
8 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +
9 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +
10 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +
11 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +
12 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +
13 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +
14 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +
15 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +
16 * +
17 * This software consists of voluntary contributions made by many individuals +
18 * and is licensed under the LGPL. For more information, see +
19 * <http://www.phpdoctrine.com>. +
20 */ +
21Doctrine::autoload('Doctrine_DataDict'); +
22/** +
23 * @package     Doctrine +
24 * @subpackage  DataDict +
25 * @license     http://www.opensource.org/licenses/lgpl-license.php LGPL +
26 * @author      Konsta Vesterinen <kvesteri@cc.hut.fi> +
27 * @author      Lukas Smith <smith@pooteeweet.org> (PEAR MDB2 library) +
28 * @version     $Revision: 2702 $ +
29 * @link        www.phpdoctrine.com +
30 * @since       1.0 +
31 */ +
32class Doctrine_DataDict_Sqlite extends Doctrine_DataDict +
33{ +
34    /** +
35     * Obtain DBMS specific SQL code portion needed to declare an text type +
36     * field to be used in statements like CREATE TABLE. +
37     * +
38     * @param array $field  associative array with the name of the properties +
39     *      of the field being declared as array indexes. Currently, the types +
40     *      of supported field properties are as follows: +
41     * +
42     *      length +
43     *          Integer value that determines the maximum length of the text +
44     *          field. If this argument is missing the field should be +
45     *          declared to have the longest length allowed by the DBMS. +
46     * +
47     *      default +
48     *          Text value to be used as default for this field. +
49     * +
50     *      notnull +
51     *          Boolean flag that indicates whether this field is constrained +
52     *          to not be set to null. +
53     * @author Lukas Smith (PEAR MDB2 library) +
54     * @return string  DBMS specific SQL code portion that should be used to +
55     *      declare the specified field. +
56     */ +
57    public function getNativeDeclaration(array $field) +
58    { +
59        if ( ! isset($field['type'])) { +
60            throw new Doctrine_DataDict_Exception('Missing column type.'); +
61        } +
62        switch ($field['type']) { +
63            case 'text': +
64            case 'object': +
65            case 'array': +
66            case 'string': +
67            case 'char': +
68            case 'gzip': +
69            case 'varchar': +
70                $length = (isset($field['length']) && $field['length']) ? $field['length'] : null; +
71 +
72                $fixed  = ((isset($field['fixed']) && $field['fixed']) || $field['type'] == 'char') ? true : false; +
73 +
74                return $fixed ? ($length ? 'CHAR('.$length.')' : 'CHAR('.$this->conn->getAttribute(Doctrine::ATTR_DEFAULT_TEXTFLD_LENGTH).')') +
75                    : ($length ? 'VARCHAR('.$length.')' : 'TEXT'); +
76            case 'clob': +
77                if ( ! empty($field['length'])) { +
78                    $length = $field['length']; +
79                    if ($length <= 255) { +
80                        return 'TINYTEXT'; +
81                    } elseif ($length <= 65535) { +
82                        return 'TEXT'; +
83                    } elseif ($length <= 16777215) { +
84                        return 'MEDIUMTEXT'; +
85                    } +
86                } +
87                return 'LONGTEXT'; +
88            case 'blob': +
89                if ( ! empty($field['length'])) { +
90                    $length = $field['length']; +
91                    if ($length <= 255) { +
92                        return 'TINYBLOB'; +
93                    } elseif ($length <= 65535) { +
94                        return 'BLOB'; +
95                    } elseif ($length <= 16777215) { +
96                        return 'MEDIUMBLOB'; +
97                    } +
98                } +
99                return 'LONGBLOB'; +
100            case 'enum': +
101            case 'integer': +
102            case 'boolean': +
103            case 'int': +
104                return 'INTEGER'; +
105            case 'date': +
106                return 'DATE'; +
107            case 'time': +
108                return 'TIME'; +
109            case 'timestamp': +
110                return 'DATETIME'; +
111            case 'float': +
112            case 'double': +
113                return 'DOUBLE';//($this->conn->options['fixed_float'] ? '('. +
114                    //($this->conn->options['fixed_float']+2).','.$this->conn->options['fixed_float'].')' : ''); +
115            case 'decimal': +
116                $length = !empty($field['length']) ? $field['length'] : 18; +
117                $scale = !empty($field['scale']) ? $field['scale'] : $this->conn->getAttribute(Doctrine::ATTR_DECIMAL_PLACES); +
118                return 'DECIMAL('.$length.','.$scale.')'; +
119        } +
120        throw new Doctrine_DataDict_Exception('Unknown field type \'' . $field['type'] .  '\'.'); +
121    } +
122    /** +
123     * Maps a native array description of a field to Doctrine datatype and length +
124     * +
125     * @param array  $field native field description +
126     * @return array containing the various possible types, length, sign, fixed +
127     */ +
128    public function getPortableDeclaration(array $field) +
129    { +
130        $dbType = strtolower($field['type']); +
131        $length = (isset($field['length'])) ? $field['length'] : null; +
132        $unsigned = (isset($field['unsigned'])) ? $field['unsigned'] : null; +
133        $fixed = null; +
134        $type = array(); +
135 +
136        if ( ! isset($field['name'])) { +
137            $field['name'] = ''; +
138        } +
139 +
140        switch ($dbType) { +
141            case 'boolean': +
142                $type[] = 'boolean'; +
143                break; +
144            case 'tinyint': +
145                $type[] = 'integer'; +
146                $type[] = 'boolean'; +
147                if (preg_match('/^(is|has)/', $field['name'])) { +
148                    $type = array_reverse($type); +
149                } +
150                $unsigned = preg_match('/ unsigned/i', $field['type']); +
151                $length = 1; +
152                break; +
153            case 'smallint': +
154                $type[] = 'integer'; +
155                $unsigned = preg_match('/ unsigned/i', $field['type']); +
156                $length = 2; +
157                break; +
158            case 'mediumint': +
159                $type[] = 'integer'; +
160                $unsigned = preg_match('/ unsigned/i', $field['type']); +
161                $length = 3; +
162                break; +
163            case 'int': +
164            case 'integer': +
165            case 'serial': +
166                $type[] = 'integer'; +
167                $unsigned = preg_match('/ unsigned/i', $field['type']); +
168                $length = 4; +
169                break; +
170            case 'bigint': +
171            case 'bigserial': +
172                $type[] = 'integer'; +
173                $unsigned = preg_match('/ unsigned/i', $field['type']); +
174                $length = 8; +
175                break; +
176            case 'clob': +
177            case 'tinytext': +
178            case 'mediumtext': +
179            case 'longtext': +
180            case 'text': +
181            case 'varchar': +
182            case 'varchar2': +
183                $fixed = false; +
184            case 'char': +
185                $type[] = 'text'; +
186                if ($length == '1') { +
187                    $type[] = 'boolean'; +
188                    if (preg_match('/^(is|has)/', $field['name'])) { +
189                        $type = array_reverse($type); +
190                    } +
191                } elseif (strstr($dbType, 'text')) { +
192                    $type[] = 'clob'; +
193                } +
194                if ($fixed !== false) { +
195                    $fixed = true; +
196                } +
197                break; +
198            case 'date': +
199                $type[] = 'date'; +
200                $length = null; +
201                break; +
202            case 'datetime': +
203            case 'timestamp': +
204                $type[] = 'timestamp'; +
205                $length = null; +
206                break; +
207            case 'time': +
208                $type[] = 'time'; +
209                $length = null; +
210                break; +
211            case 'float': +
212            case 'double': +
213            case 'real': +
214                $type[] = 'float'; +
215                $length = null; +
216                break; +
217            case 'decimal': +
218            case 'numeric': +
219                $type[] = 'decimal'; +
220                $length = null; +
221                break; +
222            case 'tinyblob': +
223            case 'mediumblob': +
224            case 'longblob': +
225            case 'blob': +
226                $type[] = 'blob'; +
227                $length = null; +
228                break; +
229            case 'year': +
230                $type[] = 'integer'; +
231                $type[] = 'date'; +
232                $length = null; +
233                break; +
234            default: +
235                throw new Doctrine_DataDict_Exception('unknown database attribute type: '.$dbType); +
236        } +
237 +
238        return array('type'     => $type, +
239                     'length'   => $length, +
240                     'unsigned' => $unsigned, +
241                     'fixed'    => $fixed); +
242    } +
243    /** +
244     * Obtain DBMS specific SQL code portion needed to declare an integer type +
245     * field to be used in statements like CREATE TABLE. +
246     * +
247     * @param string  $name   name the field to be declared. +
248     * @param array  $field   associative array with the name of the properties +
249     *                        of the field being declared as array indexes. +
250     *                        Currently, the types of supported field +
251     *                        properties are as follows: +
252     * +
253     *                       unsigned +
254     *                        Boolean flag that indicates whether the field +
255     *                        should be declared as unsigned integer if +
256     *                        possible. +
257     * +
258     *                       default +
259     *                        Integer value to be used as default for this +
260     *                        field. +
261     * +
262     *                       notnull +
263     *                        Boolean flag that indicates whether this field is +
264     *                        constrained to not be set to null. +
265     * @return string  DBMS specific SQL code portion that should be used to +
266     *                 declare the specified field. +
267     * @access protected +
268     */ +
269    public function getIntegerDeclaration($name, array $field) +
270    { +
271        $default = $autoinc = ''; +
272        $type    = $this->getNativeDeclaration($field); +
273 +
274        $autoincrement = isset($field['autoincrement']) && $field['autoincrement']; +
275 +
276        if ($autoincrement) { +
277            $autoinc = ' PRIMARY KEY AUTOINCREMENT'; +
278            $type    = 'INTEGER'; +
279        } elseif (array_key_exists('default', $field)) { +
280            if ($field['default'] === '') { +
281                $field['default'] = empty($field['notnull']) ? null : 0; +
282            } +
283            $default = ' DEFAULT ' . $this->conn->quote($field['default'], $field['type']); +
284        }/** +
285        elseif (empty($field['notnull'])) { +
286            $default = ' DEFAULT NULL'; +
287        } +
288        */ +
289 +
290        $notnull  = (isset($field['notnull']) && $field['notnull']) ? ' NOT NULL' : ''; +
291 +
292        // sqlite does not support unsigned attribute for autoinremented fields +
293        $unsigned = (isset($field['unsigned']) && $field['unsigned'] && !$autoincrement) ? ' UNSIGNED' : ''; +
294 +
295        $name = $this->conn->quoteIdentifier($name, true); +
296        return $name . ' ' . $type . $unsigned . $default . $notnull . $autoinc; +
297    } +
298}
\ No newline at end of file diff --git a/tests/coverage/Doctrine_Event.html b/tests/coverage/Doctrine_Event.html new file mode 100644 index 000000000..23af5c105 --- /dev/null +++ b/tests/coverage/Doctrine_Event.html @@ -0,0 +1,933 @@ + + + Coverage for Doctrine_Event + + +

Coverage for Doctrine_Event

Back to coverage report

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
1<?php +
2/* +
3 *  $Id$ +
4 * +
5 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +
6 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +
7 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +
8 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +
9 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +
10 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +
11 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +
12 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +
13 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +
14 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +
15 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +
16 * +
17 * This software consists of voluntary contributions made by many individuals +
18 * and is licensed under the LGPL. For more information, see +
19 * <http://www.phpdoctrine.com>. +
20 */ +
21/** +
22 * Doctrine_Event +
23 * +
24 * @author      Konsta Vesterinen <kvesteri@cc.hut.fi> +
25 * @license     http://www.opensource.org/licenses/lgpl-license.php LGPL +
26 * @package     Doctrine +
27 * @subpackage  Event +
28 * @link        www.phpdoctrine.com +
29 * @since       1.0 +
30 * @version     $Revision$ +
31 */ +
32class Doctrine_Event +
33{ +
34    /** +
35     * CONNECTION EVENT CODES +
36     */ +
37    const CONN_QUERY         = 1; +
38    const CONN_EXEC          = 2; +
39    const CONN_PREPARE       = 3; +
40    const CONN_CONNECT       = 4; +
41    const CONN_CLOSE         = 5; +
42    const CONN_ERROR         = 6; +
43 +
44    const STMT_EXECUTE       = 10; +
45    const STMT_FETCH         = 11; +
46    const STMT_FETCHALL      = 12; +
47 +
48    const TX_BEGIN           = 31; +
49    const TX_COMMIT          = 32; +
50    const TX_ROLLBACK        = 33; +
51    const SAVEPOINT_CREATE   = 34; +
52    const SAVEPOINT_ROLLBACK = 35; +
53    const SAVEPOINT_COMMIT   = 36; +
54 +
55    const HYDRATE            = 40; +
56 +
57    /* +
58     * RECORD EVENT CODES +
59     */ +
60    const RECORD_DELETE      = 21; +
61    const RECORD_SAVE        = 22; +
62    const RECORD_UPDATE      = 23; +
63    const RECORD_INSERT      = 24; +
64    const RECORD_SERIALIZE   = 25; +
65    const RECORD_UNSERIALIZE = 26; +
66    /** +
67     * @var mixed $_invoker             the handler which invoked this event +
68     */ +
69    protected $_invoker; +
70    /** +
71     * @var string $_query              the sql query associated with this event (if any) +
72     */ +
73    protected $_query; +
74    /** +
75     * @var string $_params             the parameters associated with the query (if any) +
76     */ +
77    protected $_params; +
78    /** +
79     * @see Doctrine_Event constants +
80     * @var integer $_code              the event code +
81     */ +
82    protected $_code; +
83    /** +
84     * @var integer $_startedMicrotime  the time point in which this event was started +
85     */ +
86    protected $_startedMicrotime; +
87    /** +
88     * @var integer $_endedMicrotime    the time point in which this event was ended +
89     */ +
90    protected $_endedMicrotime; +
91    /** +
92     * @var array $_options             an array of options +
93     */ +
94    protected $_options = array(); +
95    /** +
96     * constructor +
97     * +
98     * @param Doctrine_Connection|Doctrine_Connection_Statement| +
99              Doctrine_Connection_UnitOfWork|Doctrine_Transaction $invoker   the handler which invoked this event +
100     * @param integer $code                                                  the event code +
101     * @param string $query                                                  the sql query associated with this event (if any) +
102     */ +
103    public function __construct($invoker, $code, $query = null, $params = array()) +
104    { +
105        $this->_invoker = $invoker; +
106        $this->_code    = $code; +
107        $this->_query   = $query; +
108        $this->_params  = $params; +
109    } +
110    /** +
111     * getQuery +
112     * +
113     * @return string       returns the query associated with this event (if any) +
114     */ +
115    public function getQuery() +
116    { +
117        return $this->_query; +
118    } +
119    /** +
120     * getName +
121     * returns the name of this event +
122     * +
123     * @return string       the name of this event +
124     */ +
125    public function getName()  +
126    { +
127        switch ($this->_code) { +
128            case self::CONN_QUERY: +
129                return 'query'; +
130            case self::CONN_EXEC: +
131                return 'exec'; +
132            case self::CONN_PREPARE: +
133                return 'prepare'; +
134            case self::CONN_CONNECT: +
135                return 'connect'; +
136            case self::CONN_CLOSE: +
137                return 'close'; +
138            case self::CONN_ERROR: +
139                return 'error'; +
140 +
141            case self::STMT_EXECUTE: +
142                return 'execute'; +
143            case self::STMT_FETCH: +
144                return 'fetch'; +
145            case self::STMT_FETCHALL: +
146                return 'fetch all'; +
147             +
148            case self::TX_BEGIN: +
149                return 'begin'; +
150            case self::TX_COMMIT: +
151                return 'commit'; +
152            case self::TX_ROLLBACK: +
153                return 'rollback'; +
154 +
155            case self::SAVEPOINT_CREATE: +
156                return 'create savepoint'; +
157            case self::SAVEPOINT_ROLLBACK: +
158                return 'rollback savepoint'; +
159            case self::SAVEPOINT_COMMIT: +
160                return 'commit savepoint'; +
161  +
162            case self::RECORD_DELETE: +
163                return 'delete record'; +
164            case self::RECORD_SAVE: +
165                return 'save record'; +
166            case self::RECORD_UPDATE: +
167                return 'update record'; +
168            case self::RECORD_INSERT: +
169                return 'insert record'; +
170            case self::RECORD_SERIALIZE: +
171                return 'serialize record'; +
172            case self::RECORD_UNSERIALIZE: +
173                return 'unserialize record'; +
174        } +
175    } +
176    /** +
177     * getCode +
178     * +
179     * @return integer      returns the code associated with this event +
180     */ +
181    public function getCode() +
182    { +
183        return $this->_code; +
184    } +
185    /** +
186     * getOption +
187     * returns the value of an option +
188     * +
189     * @param string $option    the name of the option +
190     * @return mixed +
191     */ +
192    public function __get($option) +
193    { +
194        if ( ! isset($this->_options[$option])) { +
195            return null; +
196        } +
197         +
198        return $this->_options[$option]; +
199    } +
200    /** +
201     * skipOperation +
202     * skips the next operation +
203     * an alias for __set('skipOperation', true) +
204     * +
205     * @return Doctrine_Event   this object +
206     */ +
207    public function skipOperation() +
208    { +
209        $this->_options['skipOperation'] = true; +
210     +
211        return $this; +
212    } +
213    /** +
214     * setOption +
215     * sets the value of an option +
216     * +
217     * @param string $option    the name of the option +
218     * @param mixed $value      the value of the given option +
219     * @return Doctrine_Event   this object +
220     */ +
221    public function __set($option, $value) +
222    { +
223        $this->_options[$option] = $value; +
224 +
225        return $this; +
226    } +
227    /** +
228     * setOption +
229     * sets the value of an option by reference +
230     * +
231     * @param string $option    the name of the option +
232     * @param mixed $value      the value of the given option +
233     * @return Doctrine_Event   this object +
234     */ +
235    public function set($option, &$value) +
236    { +
237        $this->_options[$option] =& $value; +
238 +
239        return $this; +
240    } +
241    /** +
242     * start +
243     * starts the internal timer of this event +
244     * +
245     * @return Doctrine_Event   this object +
246     */ +
247    public function start() +
248    { +
249        $this->_startedMicrotime = microtime(true); +
250    } +
251    /** +
252     * hasEnded +
253     * whether or not this event has ended +
254     * +
255     * @return boolean +
256     */ +
257    public function hasEnded() +
258    { +
259        return ($this->_endedMicrotime != null); +
260    } +
261    /** +
262     * end +
263     * ends the internal timer of this event +
264     * +
265     * @return Doctrine_Event   this object +
266     */ +
267    public function end() +
268    { +
269        $this->_endedMicrotime = microtime(true); +
270         +
271        return $this; +
272    } +
273    /** +
274     * getInvoker +
275     * returns the handler that invoked this event +
276     * +
277     * @return Doctrine_Connection|Doctrine_Connection_Statement| +
278     *         Doctrine_Connection_UnitOfWork|Doctrine_Transaction   the handler that invoked this event +
279     */ +
280    public function getInvoker() +
281    { +
282        return $this->_invoker; +
283    } +
284    /** +
285     * getParams +
286     * returns the parameters of the query +
287     * +
288     * @return array   parameters of the query +
289     */ +
290    public function getParams() +
291    { +
292        return $this->_params; +
293    } +
294    /** +
295     * Get the elapsed time (in microseconds) that the event ran.  If the event has +
296     * not yet ended, return false. +
297     * +
298     * @return mixed +
299     */ +
300    public function getElapsedSecs() +
301    { +
302        if (is_null($this->_endedMicrotime)) { +
303            return false; +
304        } +
305        return ($this->_endedMicrotime - $this->_startedMicrotime); +
306    } +
307} +
\ No newline at end of file diff --git a/tests/coverage/Doctrine_EventListener.html b/tests/coverage/Doctrine_EventListener.html new file mode 100644 index 000000000..7eca9e34a --- /dev/null +++ b/tests/coverage/Doctrine_EventListener.html @@ -0,0 +1,372 @@ + + + Coverage for Doctrine_EventListener + + +

Coverage for Doctrine_EventListener

Back to coverage report

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
1<?php +
2/* +
3 *  $Id: EventListener.php 2758 2007-10-07 22:43:33Z zYne $ +
4 * +
5 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +
6 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +
7 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +
8 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +
9 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +
10 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +
11 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +
12 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +
13 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +
14 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +
15 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +
16 * +
17 * This software consists of voluntary contributions made by many individuals +
18 * and is licensed under the LGPL. For more information, see +
19 * <http://www.phpdoctrine.com>. +
20 */ +
21Doctrine::autoload('Doctrine_EventListener_Interface'); +
22/** +
23 * Doctrine_EventListener     all event listeners extend this base class +
24 *                            the empty methods allow child classes to only implement the methods they need to implement +
25 * +
26 * +
27 * @author      Konsta Vesterinen <kvesteri@cc.hut.fi> +
28 * @package     Doctrine +
29 * @subpackage  EventListener +
30 * @license     http://www.opensource.org/licenses/lgpl-license.php LGPL +
31 * @link        www.phpdoctrine.com +
32 * @since       1.0 +
33 * @version     $Revision: 2758 $ +
34 */ +
35class Doctrine_EventListener implements Doctrine_EventListener_Interface +
36{ +
37    public function preClose(Doctrine_Event $event) +
38    { } +
39    public function postClose(Doctrine_Event $event) +
40    { } +
41 +
42    public function onCollectionDelete(Doctrine_Collection $collection) +
43    { } +
44    public function onPreCollectionDelete(Doctrine_Collection $collection) +
45    { } +
46 +
47    public function onOpen(Doctrine_Connection $connection) +
48    { } +
49 +
50    public function preTransactionCommit(Doctrine_Event $event) +
51    { } +
52    public function postTransactionCommit(Doctrine_Event $event) +
53    { } +
54 +
55    public function preTransactionRollback(Doctrine_Event $event) +
56    { } +
57    public function postTransactionRollback(Doctrine_Event $event) +
58    { } +
59 +
60    public function preTransactionBegin(Doctrine_Event $event) +
61    { } +
62    public function postTransactionBegin(Doctrine_Event $event) +
63    { } +
64 +
65 +
66    public function preSavepointCommit(Doctrine_Event $event) +
67    { } +
68    public function postSavepointCommit(Doctrine_Event $event) +
69    { } +
70 +
71    public function preSavepointRollback(Doctrine_Event $event) +
72    { } +
73    public function postSavepointRollback(Doctrine_Event $event) +
74    { } +
75 +
76    public function preSavepointCreate(Doctrine_Event $event) +
77    { } +
78    public function postSavepointCreate(Doctrine_Event $event) +
79    { } +
80 +
81    public function postConnect(Doctrine_Event $event) +
82    { } +
83    public function preConnect(Doctrine_Event $event) +
84    { } +
85 +
86    public function preQuery(Doctrine_Event $event) +
87    { } +
88    public function postQuery(Doctrine_Event $event) +
89    { } +
90 +
91    public function prePrepare(Doctrine_Event $event) +
92    { } +
93    public function postPrepare(Doctrine_Event $event) +
94    { } +
95 +
96    public function preExec(Doctrine_Event $event) +
97    { } +
98    public function postExec(Doctrine_Event $event) +
99    { } +
100 +
101    public function preError(Doctrine_Event $event) +
102    { } +
103    public function postError(Doctrine_Event $event) +
104    { } +
105 +
106    public function preFetch(Doctrine_Event $event) +
107    { } +
108    public function postFetch(Doctrine_Event $event) +
109    { } +
110 +
111    public function preFetchAll(Doctrine_Event $event) +
112    { } +
113    public function postFetchAll(Doctrine_Event $event) +
114    { } +
115 +
116    public function preStmtExecute(Doctrine_Event $event) +
117    { } +
118    public function postStmtExecute(Doctrine_Event $event) +
119    { } +
120} +
\ No newline at end of file diff --git a/tests/coverage/Doctrine_EventListener_Chain.html b/tests/coverage/Doctrine_EventListener_Chain.html new file mode 100644 index 000000000..7de4c5f7e --- /dev/null +++ b/tests/coverage/Doctrine_EventListener_Chain.html @@ -0,0 +1,1176 @@ + + + Coverage for Doctrine_EventListener_Chain + + +

Coverage for Doctrine_EventListener_Chain

Back to coverage report

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
1<?php +
2/* +
3 *  $Id: Chain.php 2757 2007-10-07 22:43:04Z zYne $ +
4 * +
5 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +
6 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +
7 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +
8 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +
9 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +
10 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +
11 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +
12 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +
13 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +
14 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +
15 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +
16 * +
17 * This software consists of voluntary contributions made by many individuals +
18 * and is licensed under the LGPL. For more information, see +
19 * <http://www.phpdoctrine.com>. +
20 */ +
21Doctrine::autoload('Doctrine_Access'); +
22 +
23/** +
24 * Doctrine_EventListener_Chain +
25 * this class represents a chain of different listeners, +
26 * useful for having multiple listeners listening the events at the same time +
27 * +
28 * @author      Konsta Vesterinen <kvesteri@cc.hut.fi> +
29 * @package     Doctrine +
30 * @subpackage  EventListener +
31 * @license     http://www.opensource.org/licenses/lgpl-license.php LGPL +
32 * @link        www.phpdoctrine.com +
33 * @since       1.0 +
34 * @version     $Revision: 2757 $ +
35 */ +
36class Doctrine_EventListener_Chain extends Doctrine_Access implements Doctrine_EventListener_Interface +
37{ +
38    /** +
39     * @var array $listeners        an array containing all listeners +
40     */ +
41    protected $_listeners = array(); +
42    /** +
43     * add +
44     * adds a listener to the chain of listeners +
45     * +
46     * @param object $listener +
47     * @param string $name +
48     * @return void +
49     */ +
50    public function add($listener, $name = null) +
51    { +
52        if ( ! ($listener instanceof Doctrine_EventListener_Interface) && +
53             ! ($listener instanceof Doctrine_Overloadable)) { +
54             +
55            throw new Doctrine_EventListener_Exception("Couldn't add eventlistener. EventListeners should implement either Doctrine_EventListener_Interface or Doctrine_Overloadable"); +
56        } +
57        if ($name === null) { +
58            $this->_listeners[] = $listener; +
59        } else { +
60            $this->_listeners[$name] = $listener; +
61        } +
62    } +
63    /** +
64     * returns a Doctrine_EventListener on success +
65     * and null on failure +
66     * +
67     * @param mixed $key +
68     * @return mixed +
69     */ +
70    public function get($key) +
71    { +
72        if ( ! isset($this->_listeners[$key])) { +
73            return null; +
74        } +
75        return $this->_listeners[$key]; +
76    } +
77    /** +
78     * set +
79     * +
80     * @param mixed $key +
81     * @param Doctrine_EventListener $listener +
82     * @return void +
83     */ +
84    public function set($key, Doctrine_EventListener $listener) +
85    { +
86        $this->_listeners[$key] = $listener; +
87    } +
88    /** +
89     * onLoad +
90     * an event invoked when Doctrine_Record is being loaded from database +
91     * +
92     * @param Doctrine_Record $record +
93     * @return void +
94     */ +
95    public function onLoad(Doctrine_Record $record) +
96    { +
97        foreach ($this->_listeners as $listener) { +
98            $listener->onLoad($record); +
99        } +
100    } +
101    /** +
102     * onPreLoad +
103     * an event invoked when Doctrine_Record is being loaded +
104     * from database but not yet initialized +
105     * +
106     * @param Doctrine_Record $record +
107     * @return void +
108     */ +
109    public function onPreLoad(Doctrine_Record $record) +
110    { +
111        foreach ($this->_listeners as $listener) { +
112            $listener->onPreLoad($record); +
113        } +
114    } +
115    /** +
116     * onSleep +
117     * an event invoked when Doctrine_Record is serialized +
118     * +
119     * @param Doctrine_Record $record +
120     * @return void +
121     */ +
122    public function onSleep(Doctrine_Record $record) +
123    { +
124        foreach ($this->_listeners as $listener) { +
125            $listener->onSleep($record); +
126        } +
127    } +
128    /** +
129     * onWakeUp +
130     * an event invoked when Doctrine_Record is unserialized +
131     * +
132     * @param Doctrine_Record $record +
133     * @return void +
134     */ +
135    public function onWakeUp(Doctrine_Record $record) +
136    { +
137        foreach ($this->_listeners as $listener) { +
138            $listener->onWakeUp($record); +
139        } +
140    } +
141    /** +
142     * postClose +
143     * an event invoked after Doctrine_Connection is closed +
144     * +
145     * @param Doctrine_Event $event +
146     * @return void +
147     */ +
148    public function postClose(Doctrine_Event $event) +
149    { +
150        foreach ($this->_listeners as $listener) { +
151            $listener->postClose($event); +
152        } +
153    } +
154    /** +
155     * preClose +
156     * an event invoked before Doctrine_Connection is closed +
157     * +
158     * @param Doctrine_Event $event +
159     * @return void +
160     */ +
161    public function preClose(Doctrine_Event $event) +
162    { +
163        foreach ($this->_listeners as $listener) { +
164            $listener->preClose($event); +
165        } +
166    } +
167    /** +
168     * onOpen +
169     * an event invoked after Doctrine_Connection is opened +
170     * +
171     * @param Doctrine_Connection $connection +
172     * @return void +
173     */ +
174    public function onOpen(Doctrine_Connection $connection) +
175    { +
176        foreach ($this->_listeners as $listener) { +
177            $listener->onOpen($connection); +
178        } +
179    } +
180    /** +
181     * onTransactionCommit +
182     * an event invoked after a Doctrine_Connection transaction is committed +
183     * +
184     * @param Doctrine_Event $event +
185     * @return void +
186     */ +
187    public function postTransactionCommit(Doctrine_Event $event) +
188    { +
189        foreach ($this->_listeners as $listener) { +
190            $listener->postTransactionCommit($event); +
191        } +
192    } +
193    /** +
194     * onPreTransactionCommit +
195     * an event invoked before a Doctrine_Connection transaction is committed +
196     * +
197     * @param Doctrine_Event $event +
198     * @return void +
199     */ +
200    public function preTransactionCommit(Doctrine_Event $event) +
201    { +
202        foreach ($this->_listeners as $listener) { +
203            $listener->preTransactionCommit($event); +
204        } +
205    } +
206    /** +
207     * onTransactionRollback +
208     * an event invoked after a Doctrine_Connection transaction is being rolled back +
209     * +
210     * @param Doctrine_Event $event +
211     * @return void +
212     */ +
213    public function postTransactionRollback(Doctrine_Event $event) +
214    { +
215        foreach ($this->_listeners as $listener) { +
216            $listener->postTransactionRollback($event); +
217        } +
218    } +
219    /** +
220     * onPreTransactionRollback +
221     * an event invoked before a Doctrine_Connection transaction is being rolled back +
222     * +
223     * @param Doctrine_Event $event +
224     * @return void +
225     */ +
226    public function preTransactionRollback(Doctrine_Event $event) +
227    { +
228        foreach ($this->_listeners as $listener) { +
229            $listener->preTransactionRollback($event); +
230        } +
231    } +
232    /** +
233     * onTransactionBegin +
234     * an event invoked after a Doctrine_Connection transaction has been started +
235     * +
236     * @param Doctrine_Event $event +
237     * @return void +
238     */ +
239    public function postTransactionBegin(Doctrine_Event $event) +
240    { +
241        foreach ($this->_listeners as $listener) { +
242            $listener->postTransactionBegin($event); +
243        } +
244    } +
245    /** +
246     * onTransactionBegin +
247     * an event invoked before a Doctrine_Connection transaction is being started +
248     * +
249     * @param Doctrine_Event $event +
250     * @return void +
251     */ +
252    public function preTransactionBegin(Doctrine_Event $event) +
253    { +
254        foreach ($this->_listeners as $listener) { +
255            $listener->preTransactionBegin($event); +
256        } +
257    } +
258    /** +
259     * onCollectionDelete +
260     * an event invoked after a Doctrine_Collection is being deleted +
261     * +
262     * @param Doctrine_Collection $collection +
263     * @return void +
264     */ +
265    public function onCollectionDelete(Doctrine_Collection $collection) +
266    { +
267        foreach ($this->_listeners as $listener) { +
268            $listener->onCollectionDelete($collection); +
269        } +
270    } +
271    /** +
272     * onCollectionDelete +
273     * an event invoked after a Doctrine_Collection is being deleted +
274     * +
275     * @param Doctrine_Collection $collection +
276     * @return void +
277     */ +
278    public function onPreCollectionDelete(Doctrine_Collection $collection) +
279    { +
280        foreach ($this->_listeners as $listener) { +
281            $listener->onPreCollectionDelete($collection); +
282        } +
283    } +
284    public function postConnect(Doctrine_Event $event) +
285    { +
286        foreach ($this->_listeners as $listener) { +
287            $listener->postConnect($event); +
288        } +
289    } +
290    public function preConnect(Doctrine_Event $event) +
291    { +
292        foreach ($this->_listeners as $listener) { +
293            $listener->preConnect($event); +
294        } +
295    } +
296    public function preQuery(Doctrine_Event $event) +
297    {  +
298        foreach ($this->_listeners as $listener) { +
299            $listener->preQuery($event); +
300        } +
301    } +
302    public function postQuery(Doctrine_Event $event) +
303    { +
304        foreach ($this->_listeners as $listener) { +
305            $listener->postQuery($event); +
306        } +
307    } +
308 +
309    public function prePrepare(Doctrine_Event $event) +
310    {  +
311        foreach ($this->_listeners as $listener) { +
312            $listener->prePrepare($event); +
313        } +
314    } +
315    public function postPrepare(Doctrine_Event $event) +
316    { +
317        foreach ($this->_listeners as $listener) { +
318            $listener->postPrepare($event); +
319        } +
320    } +
321 +
322    public function preExec(Doctrine_Event $event) +
323    { +
324        foreach ($this->_listeners as $listener) { +
325            $listener->preExec($event); +
326        } +
327    } +
328    public function postExec(Doctrine_Event $event) +
329    { +
330        foreach ($this->_listeners as $listener) { +
331            $listener->postExec($event); +
332        } +
333    } +
334 +
335    public function preError(Doctrine_Event $event) +
336    {  +
337        foreach ($this->_listeners as $listener) { +
338            $listener->preError($event); +
339        } +
340    } +
341    public function postError(Doctrine_Event $event) +
342    { +
343        foreach ($this->_listeners as $listener) { +
344            $listener->postError($event); +
345        } +
346    } +
347 +
348    public function preFetch(Doctrine_Event $event) +
349    {  +
350        foreach ($this->_listeners as $listener) { +
351            $listener->preFetch($event); +
352        } +
353    } +
354    public function postFetch(Doctrine_Event $event) +
355    { +
356        foreach ($this->_listeners as $listener) { +
357            $listener->postFetch($event); +
358        } +
359    } +
360 +
361    public function preFetchAll(Doctrine_Event $event) +
362    {  +
363        foreach ($this->_listeners as $listener) { +
364            $listener->preFetchAll($event); +
365        } +
366    } +
367 +
368    public function postFetchAll(Doctrine_Event $event) +
369    { +
370        foreach ($this->_listeners as $listener) { +
371            $listener->postFetchAll($event); +
372        } +
373    } +
374 +
375    public function preStmtExecute(Doctrine_Event $event) +
376    { +
377        foreach ($this->_listeners as $listener) { +
378            $listener->preStmtExecute($event); +
379        } +
380    } +
381 +
382    public function postStmtExecute(Doctrine_Event $event) +
383    { +
384        foreach ($this->_listeners as $listener) { +
385            $listener->postStmtExecute($event); +
386        } +
387    } +
388} +
\ No newline at end of file diff --git a/tests/coverage/Doctrine_Exception.html b/tests/coverage/Doctrine_Exception.html new file mode 100644 index 000000000..65f1328b3 --- /dev/null +++ b/tests/coverage/Doctrine_Exception.html @@ -0,0 +1,282 @@ + + + Coverage for Doctrine_Exception + + +

Coverage for Doctrine_Exception

Back to coverage report

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
1<?php +
2/* +
3 *  $Id: Exception.php 2702 2007-10-03 21:43:22Z Jonathan.Wage $ +
4 * +
5 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +
6 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +
7 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +
8 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +
9 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +
10 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +
11 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +
12 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +
13 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +
14 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +
15 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +
16 * +
17 * This software consists of voluntary contributions made by many individuals +
18 * and is licensed under the LGPL. For more information, see +
19 * <http://www.phpdoctrine.com>. +
20 */ +
21/** +
22 * Doctrine_Exception +
23 * +
24 * @package     Doctrine +
25 * @subpackage  Exception +
26 * @license     http://www.opensource.org/licenses/lgpl-license.php LGPL +
27 * @link        www.phpdoctrine.com +
28 * @since       1.0 +
29 * @version     $Revision: 2702 $ +
30 * @author      Konsta Vesterinen <kvesteri@cc.hut.fi> +
31 */ +
32class Doctrine_Exception extends Exception +
33{  +
34    /** +
35     * @var array $_errorMessages       an array of error messages +
36     */ +
37    protected static $_errorMessages = array( +
38                Doctrine::ERR                    => 'unknown error', +
39                Doctrine::ERR_ALREADY_EXISTS     => 'already exists', +
40                Doctrine::ERR_CANNOT_CREATE      => 'can not create', +
41                Doctrine::ERR_CANNOT_ALTER       => 'can not alter', +
42                Doctrine::ERR_CANNOT_REPLACE     => 'can not replace', +
43                Doctrine::ERR_CANNOT_DELETE      => 'can not delete', +
44                Doctrine::ERR_CANNOT_DROP        => 'can not drop', +
45                Doctrine::ERR_CONSTRAINT         => 'constraint violation', +
46                Doctrine::ERR_CONSTRAINT_NOT_NULL=> 'null value violates not-null constraint', +
47                Doctrine::ERR_DIVZERO            => 'division by zero', +
48                Doctrine::ERR_INVALID            => 'invalid', +
49                Doctrine::ERR_INVALID_DATE       => 'invalid date or time', +
50                Doctrine::ERR_INVALID_NUMBER     => 'invalid number', +
51                Doctrine::ERR_MISMATCH           => 'mismatch', +
52                Doctrine::ERR_NODBSELECTED       => 'no database selected', +
53                Doctrine::ERR_NOSUCHFIELD        => 'no such field', +
54                Doctrine::ERR_NOSUCHTABLE        => 'no such table', +
55                Doctrine::ERR_NOT_CAPABLE        => 'Doctrine backend not capable', +
56                Doctrine::ERR_NOT_FOUND          => 'not found', +
57                Doctrine::ERR_NOT_LOCKED         => 'not locked', +
58                Doctrine::ERR_SYNTAX             => 'syntax error', +
59                Doctrine::ERR_UNSUPPORTED        => 'not supported', +
60                Doctrine::ERR_VALUE_COUNT_ON_ROW => 'value count on row', +
61                Doctrine::ERR_INVALID_DSN        => 'invalid DSN', +
62                Doctrine::ERR_CONNECT_FAILED     => 'connect failed', +
63                Doctrine::ERR_NEED_MORE_DATA     => 'insufficient data supplied', +
64                Doctrine::ERR_EXTENSION_NOT_FOUND=> 'extension not found', +
65                Doctrine::ERR_NOSUCHDB           => 'no such database', +
66                Doctrine::ERR_ACCESS_VIOLATION   => 'insufficient permissions', +
67                Doctrine::ERR_LOADMODULE         => 'error while including on demand module', +
68                Doctrine::ERR_TRUNCATED          => 'truncated', +
69                Doctrine::ERR_DEADLOCK           => 'deadlock detected', +
70            ); +
71    /** +
72     * Return a textual error message for a Doctrine error code +
73     * +
74     * @param   int|array   integer error code, +
75     *                           null to get the current error code-message map, +
76     *                           or an array with a new error code-message map +
77     * +
78     * @return  string  error message +
79     */ +
80    public function errorMessage($value = null) +
81    { +
82        if (is_null($value)) { +
83            return self::$_errorMessages; +
84        } +
85 +
86        return isset(self::$_errorMessages[$value]) ? +
87           self::$_errorMessages[$value] : self::$_errorMessages[Doctrine::ERR]; +
88    } +
89 +
90} +
\ No newline at end of file diff --git a/tests/coverage/Doctrine_Export.html b/tests/coverage/Doctrine_Export.html new file mode 100644 index 000000000..539e04913 --- /dev/null +++ b/tests/coverage/Doctrine_Export.html @@ -0,0 +1,3527 @@ + + + Coverage for Doctrine_Export + + +

Coverage for Doctrine_Export

Back to coverage report

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
1<?php +
2/* +
3 *  $Id: Export.php 2809 2007-10-11 03:23:33Z Jonathan.Wage $ +
4 * +
5 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +
6 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +
7 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +
8 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +
9 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +
10 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +
11 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +
12 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +
13 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +
14 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +
15 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +
16 * +
17 * This software consists of voluntary contributions made by many individuals +
18 * and is licensed under the LGPL. For more information, see +
19 * <http://www.phpdoctrine.com>. +
20 */ +
21Doctrine::autoload('Doctrine_Connection_Module'); +
22/** +
23 * Doctrine_Export +
24 * +
25 * @package     Doctrine +
26 * @subpackage  Export +
27 * @author      Konsta Vesterinen <kvesteri@cc.hut.fi> +
28 * @author      Lukas Smith <smith@pooteeweet.org> (PEAR MDB2 library) +
29 * @license     http://www.opensource.org/licenses/lgpl-license.php LGPL +
30 * @link        www.phpdoctrine.com +
31 * @since       1.0 +
32 * @version     $Revision: 2809 $ +
33 */ +
34class Doctrine_Export extends Doctrine_Connection_Module +
35{ +
36    protected $valid_default_values = array( +
37        'text'      => '', +
38        'boolean'   => true, +
39        'integer'   => 0, +
40        'decimal'   => 0.0, +
41        'float'     => 0.0, +
42        'timestamp' => '1970-01-01 00:00:00', +
43        'time'      => '00:00:00', +
44        'date'      => '1970-01-01', +
45        'clob'      => '', +
46        'blob'      => '', +
47        'string'    => '' +
48    ); +
49 +
50    /** +
51     * drop an existing database +
52     * (this method is implemented by the drivers) +
53     * +
54     * @param string $name name of the database that should be dropped +
55     * @return void +
56     */ +
57    public function dropDatabase($database) +
58    { +
59        $this->conn->execute($this->dropDatabaseSql($database)); +
60    } +
61    /** +
62     * drop an existing database +
63     * (this method is implemented by the drivers) +
64     * +
65     * @param string $name name of the database that should be dropped +
66     * @return void +
67     */ +
68    public function dropDatabaseSql($database) +
69    { +
70        throw new Doctrine_Export_Exception('Drop database not supported by this driver.'); +
71    } +
72    /** +
73     * dropTableSql +
74     * drop an existing table +
75     * +
76     * @param string $table           name of table that should be dropped from the database +
77     * @return string +
78     */ +
79    public function dropTableSql($table) +
80    { +
81        return 'DROP TABLE ' . $this->conn->quoteIdentifier($table); +
82    } +
83    /** +
84     * dropTable +
85     * drop an existing table +
86     * +
87     * @param string $table           name of table that should be dropped from the database +
88     * @return void +
89     */ +
90    public function dropTable($table) +
91    { +
92        $this->conn->execute($this->dropTableSql($table)); +
93    } +
94 +
95    /** +
96     * drop existing index +
97     * +
98     * @param string    $table        name of table that should be used in method +
99     * @param string    $name         name of the index to be dropped +
100     * @return void +
101     */ +
102    public function dropIndex($table, $name) +
103    { +
104        return $this->conn->exec($this->dropIndexSql($table, $name)); +
105    } +
106 +
107    /** +
108     * dropIndexSql +
109     * +
110     * @param string    $table        name of table that should be used in method +
111     * @param string    $name         name of the index to be dropped +
112     * @return string                 SQL that is used for dropping an index +
113     */ +
114    public function dropIndexSql($table, $name) +
115    { +
116        $name = $this->conn->quoteIdentifier($this->conn->formatter->getIndexName($name)); +
117        return 'DROP INDEX ' . $name; +
118    } +
119    /** +
120     * drop existing constraint +
121     * +
122     * @param string    $table        name of table that should be used in method +
123     * @param string    $name         name of the constraint to be dropped +
124     * @param string    $primary      hint if the constraint is primary +
125     * @return void +
126     */ +
127    public function dropConstraint($table, $name, $primary = false) +
128    { +
129        $table = $this->conn->quoteIdentifier($table); +
130        $name  = $this->conn->quoteIdentifier($this->conn->formatter->getIndexName($name)); +
131        return $this->conn->exec('ALTER TABLE ' . $table . ' DROP CONSTRAINT ' . $name); +
132    } +
133    /** +
134     * dropSequenceSql +
135     * drop existing sequence +
136     * (this method is implemented by the drivers) +
137     * +
138     * @throws Doctrine_Connection_Exception     if something fails at database level +
139     * @param string $sequenceName      name of the sequence to be dropped +
140     * @return void +
141     */ +
142    public function dropSequence($sequenceName) +
143    { +
144        $this->conn->exec($this->dropSequenceSql($sequenceName)); +
145    } +
146    /** +
147     * dropSequenceSql +
148     * drop existing sequence +
149     * +
150     * @throws Doctrine_Connection_Exception     if something fails at database level +
151     * @param string $sequenceName name of the sequence to be dropped +
152     * @return void +
153     */ +
154    public function dropSequenceSql($sequenceName) +
155    { +
156        throw new Doctrine_Export_Exception('Drop sequence not supported by this driver.'); +
157    } +
158    /** +
159     * create a new database +
160     * (this method is implemented by the drivers) +
161     * +
162     * @param string $name name of the database that should be created +
163     * @return void +
164     */ +
165    public function createDatabase($database) +
166    { +
167        $this->conn->execute($this->createDatabaseSql($database)); +
168    } +
169    /** +
170     * create a new database +
171     * (this method is implemented by the drivers) +
172     * +
173     * @param string $name name of the database that should be created +
174     * @return string +
175     */ +
176    public function createDatabaseSql($database) +
177    { +
178        throw new Doctrine_Export_Exception('Create database not supported by this driver.'); +
179    } +
180    /** +
181     * create a new table +
182     * +
183     * @param string $name   Name of the database that should be created +
184     * @param array $fields  Associative array that contains the definition of each field of the new table +
185     *                       The indexes of the array entries are the names of the fields of the table an +
186     *                       the array entry values are associative arrays like those that are meant to be +
187     *                       passed with the field definitions to get[Type]Declaration() functions. +
188     *                          array( +
189     *                              'id' => array( +
190     *                                  'type' => 'integer', +
191     *                                  'unsigned' => 1 +
192     *                                  'notnull' => 1 +
193     *                                  'default' => 0 +
194     *                              ), +
195     *                              'name' => array( +
196     *                                  'type' => 'text', +
197     *                                  'length' => 12 +
198     *                              ), +
199     *                              'password' => array( +
200     *                                  'type' => 'text', +
201     *                                  'length' => 12 +
202     *                              ) +
203     *                          ); +
204     * @param array $options  An associative array of table options: +
205     * +
206     * @return string +
207     */ +
208    public function createTableSql($name, array $fields, array $options = array()) +
209    { +
210        if ( ! $name) { +
211            throw new Doctrine_Export_Exception('no valid table name specified'); +
212        } +
213 +
214        if (empty($fields)) { +
215            throw new Doctrine_Export_Exception('no fields specified for table ' . $name); +
216        } +
217 +
218        $queryFields = $this->getFieldDeclarationList($fields); +
219 +
220 +
221        if (isset($options['primary']) && ! empty($options['primary'])) { +
222            $queryFields .= ', PRIMARY KEY(' . implode(', ', array_values($options['primary'])) . ')'; +
223        } +
224 +
225        if (isset($options['indexes']) && ! empty($options['indexes'])) { +
226            foreach($options['indexes'] as $index => $definition) { +
227                $queryFields .= ', ' . $this->getIndexDeclaration($index, $definition); +
228            } +
229        } +
230 +
231        $query = 'CREATE TABLE ' . $this->conn->quoteIdentifier($name, true) . ' (' . $queryFields; +
232 +
233        $check = $this->getCheckDeclaration($fields); +
234 +
235        if ( ! empty($check)) { +
236            $query .= ', ' . $check; +
237        } +
238 +
239        $query .= ')'; +
240 +
241 +
242 +
243        $sql[] = $query; +
244 +
245        if (isset($options['foreignKeys'])) { +
246 +
247            foreach ((array) $options['foreignKeys'] as $k => $definition) { +
248                if (is_array($definition)) { +
249                    $sql[] = $this->createForeignKeySql($name, $definition); +
250                } +
251            } +
252        } +
253        return $sql; +
254    } +
255    /** +
256     * create a new table +
257     * +
258     * @param string $name   Name of the database that should be created +
259     * @param array $fields  Associative array that contains the definition of each field of the new table +
260     * @param array $options  An associative array of table options: +
261     * @see Doctrine_Export::createTableSql() +
262     * +
263     * @return void +
264     */ +
265    public function createTable($name, array $fields, array $options = array()) +
266    { +
267        $sql = (array) $this->createTableSql($name, $fields, $options); +
268 +
269        foreach ($sql as $query) { +
270            $this->conn->execute($query); +
271        } +
272    } +
273    /** +
274     * create sequence +
275     * +
276     * @throws Doctrine_Connection_Exception     if something fails at database level +
277     * @param string    $seqName        name of the sequence to be created +
278     * @param string    $start          start value of the sequence; default is 1 +
279     * @param array     $options  An associative array of table options: +
280     *                          array( +
281     *                              'comment' => 'Foo', +
282     *                              'charset' => 'utf8', +
283     *                              'collate' => 'utf8_unicode_ci', +
284     *                          ); +
285     * @return void +
286     */ +
287    public function createSequence($seqName, $start = 1, array $options = array()) +
288    { +
289        return $this->conn->execute($this->createSequenceSql($seqName, $start = 1, $options)); +
290    } +
291    /** +
292     * return RDBMS specific create sequence statement +
293     * (this method is implemented by the drivers) +
294     * +
295     * @throws Doctrine_Connection_Exception     if something fails at database level +
296     * @param string    $seqName        name of the sequence to be created +
297     * @param string    $start          start value of the sequence; default is 1 +
298     * @param array     $options  An associative array of table options: +
299     *                          array( +
300     *                              'comment' => 'Foo', +
301     *                              'charset' => 'utf8', +
302     *                              'collate' => 'utf8_unicode_ci', +
303     *                          ); +
304     * @return string +
305     */ +
306    public function createSequenceSql($seqName, $start = 1, array $options = array()) +
307    { +
308        throw new Doctrine_Export_Exception('Create sequence not supported by this driver.'); +
309    } +
310    /** +
311     * create a constraint on a table +
312     * +
313     * @param string    $table         name of the table on which the constraint is to be created +
314     * @param string    $name          name of the constraint to be created +
315     * @param array     $definition    associative array that defines properties of the constraint to be created. +
316     *                                 Currently, only one property named FIELDS is supported. This property +
317     *                                 is also an associative with the names of the constraint fields as array +
318     *                                 constraints. Each entry of this array is set to another type of associative +
319     *                                 array that specifies properties of the constraint that are specific to +
320     *                                 each field. +
321     * +
322     *                                 Example +
323     *                                    array( +
324     *                                        'fields' => array( +
325     *                                            'user_name' => array(), +
326     *                                            'last_login' => array() +
327     *                                        ) +
328     *                                    ) +
329     * @return void +
330     */ +
331    public function createConstraint($table, $name, $definition) +
332    { +
333        return $this->conn->exec($this->createConstraintSql($table, $name, $definition)); +
334    } +
335    /** +
336     * create a constraint on a table +
337     * +
338     * @param string    $table         name of the table on which the constraint is to be created +
339     * @param string    $name          name of the constraint to be created +
340     * @param array     $definition    associative array that defines properties of the constraint to be created. +
341     *                                 Currently, only one property named FIELDS is supported. This property +
342     *                                 is also an associative with the names of the constraint fields as array +
343     *                                 constraints. Each entry of this array is set to another type of associative +
344     *                                 array that specifies properties of the constraint that are specific to +
345     *                                 each field. +
346     * +
347     *                                 Example +
348     *                                    array( +
349     *                                        'fields' => array( +
350     *                                            'user_name' => array(), +
351     *                                            'last_login' => array() +
352     *                                        ) +
353     *                                    ) +
354     * @return void +
355     */ +
356    public function createConstraintSql($table, $name, $definition) +
357    { +
358        $table = $this->conn->quoteIdentifier($table); +
359        $name  = $this->conn->quoteIdentifier($this->conn->formatter->getIndexName($name)); +
360        $query = 'ALTER TABLE ' . $table . ' ADD CONSTRAINT ' . $name; +
361 +
362        if (isset($definition['primary']) && $definition['primary']) { +
363            $query .= ' PRIMARY KEY'; +
364        } elseif (isset($definition['unique']) && $definition['unique']) { +
365            $query .= ' UNIQUE'; +
366        } +
367 +
368        $fields = array(); +
369        foreach (array_keys($definition['fields']) as $field) { +
370            $fields[] = $this->conn->quoteIdentifier($field, true); +
371        } +
372        $query .= ' ('. implode(', ', $fields) . ')'; +
373 +
374        return $query; +
375    } +
376    /** +
377     * Get the stucture of a field into an array +
378     * +
379     * @param string    $table         name of the table on which the index is to be created +
380     * @param string    $name          name of the index to be created +
381     * @param array     $definition    associative array that defines properties of the index to be created. +
382     *                                 Currently, only one property named FIELDS is supported. This property +
383     *                                 is also an associative with the names of the index fields as array +
384     *                                 indexes. Each entry of this array is set to another type of associative +
385     *                                 array that specifies properties of the index that are specific to +
386     *                                 each field. +
387     * +
388     *                                 Currently, only the sorting property is supported. It should be used +
389     *                                 to define the sorting direction of the index. It may be set to either +
390     *                                 ascending or descending. +
391     * +
392     *                                 Not all DBMS support index sorting direction configuration. The DBMS +
393     *                                 drivers of those that do not support it ignore this property. Use the +
394     *                                 function supports() to determine whether the DBMS driver can manage indexes. +
395     * +
396     *                                 Example +
397     *                                    array( +
398     *                                        'fields' => array( +
399     *                                            'user_name' => array( +
400     *                                                'sorting' => 'ascending' +
401     *                                            ), +
402     *                                            'last_login' => array() +
403     *                                        ) +
404     *                                    ) +
405     * @return void +
406     */ +
407    public function createIndex($table, $name, array $definition) +
408    { +
409        return $this->conn->execute($this->createIndexSql($table, $name, $definition)); +
410    } +
411    /** +
412     * Get the stucture of a field into an array +
413     * +
414     * @param string    $table         name of the table on which the index is to be created +
415     * @param string    $name          name of the index to be created +
416     * @param array     $definition    associative array that defines properties of the index to be created. +
417     * @see Doctrine_Export::createIndex() +
418     * @return string +
419     */ +
420    public function createIndexSql($table, $name, array $definition) +
421    { +
422        $table  = $this->conn->quoteIdentifier($table); +
423        $name   = $this->conn->quoteIdentifier($name); +
424        $type   = ''; +
425 +
426        if (isset($definition['type'])) { +
427            switch (strtolower($definition['type'])) { +
428                case 'unique': +
429                    $type = strtoupper($definition['type']) . ' '; +
430                break; +
431                default: +
432                    throw new Doctrine_Export_Exception('Unknown index type ' . $definition['type']); +
433            } +
434        } +
435 +
436        $query = 'CREATE ' . $type . 'INDEX ' . $name . ' ON ' . $table; +
437 +
438        $fields = array(); +
439        foreach ($definition['fields'] as $field) { +
440            $fields[] = $this->conn->quoteIdentifier($field); +
441        } +
442        $query .= ' (' . implode(', ', $fields) . ')'; +
443 +
444        return $query; +
445    } +
446    /** +
447     * createForeignKeySql +
448     * +
449     * @param string    $table         name of the table on which the foreign key is to be created +
450     * @param array     $definition    associative array that defines properties of the foreign key to be created. +
451     * @return string +
452     */ +
453    public function createForeignKeySql($table, array $definition) +
454    { +
455        $table = $this->conn->quoteIdentifier($table); +
456 +
457        $query = 'ALTER TABLE ' . $table . ' ADD CONSTRAINT ' . $this->getForeignKeyDeclaration($definition); +
458 +
459        return $query; +
460    } +
461    /** +
462     * alter an existing table +
463     * (this method is implemented by the drivers) +
464     * +
465     * @param string $name         name of the table that is intended to be changed. +
466     * @param array $changes     associative array that contains the details of each type +
467     *                             of change that is intended to be performed. The types of +
468     *                             changes that are currently supported are defined as follows: +
469     * +
470     *                             name +
471     * +
472     *                                New name for the table. +
473     * +
474     *                            add +
475     * +
476     *                                Associative array with the names of fields to be added as +
477     *                                 indexes of the array. The value of each entry of the array +
478     *                                 should be set to another associative array with the properties +
479     *                                 of the fields to be added. The properties of the fields should +
480     *                                 be the same as defined by the MDB2 parser. +
481     * +
482     * +
483     *                            remove +
484     * +
485     *                                Associative array with the names of fields to be removed as indexes +
486     *                                 of the array. Currently the values assigned to each entry are ignored. +
487     *                                 An empty array should be used for future compatibility. +
488     * +
489     *                            rename +
490     * +
491     *                                Associative array with the names of fields to be renamed as indexes +
492     *                                 of the array. The value of each entry of the array should be set to +
493     *                                 another associative array with the entry named name with the new +
494     *                                 field name and the entry named Declaration that is expected to contain +
495     *                                 the portion of the field declaration already in DBMS specific SQL code +
496     *                                 as it is used in the CREATE TABLE statement. +
497     * +
498     *                            change +
499     * +
500     *                                Associative array with the names of the fields to be changed as indexes +
501     *                                 of the array. Keep in mind that if it is intended to change either the +
502     *                                 name of a field and any other properties, the change array entries +
503     *                                 should have the new names of the fields as array indexes. +
504     * +
505     *                                The value of each entry of the array should be set to another associative +
506     *                                 array with the properties of the fields to that are meant to be changed as +
507     *                                 array entries. These entries should be assigned to the new values of the +
508     *                                 respective properties. The properties of the fields should be the same +
509     *                                 as defined by the MDB2 parser. +
510     * +
511     *                            Example +
512     *                                array( +
513     *                                    'name' => 'userlist', +
514     *                                    'add' => array( +
515     *                                        'quota' => array( +
516     *                                            'type' => 'integer', +
517     *                                            'unsigned' => 1 +
518     *                                        ) +
519     *                                    ), +
520     *                                    'remove' => array( +
521     *                                        'file_limit' => array(), +
522     *                                        'time_limit' => array() +
523     *                                    ), +
524     *                                    'change' => array( +
525     *                                        'name' => array( +
526     *                                            'length' => '20', +
527     *                                            'definition' => array( +
528     *                                                'type' => 'text', +
529     *                                                'length' => 20, +
530     *                                            ), +
531     *                                        ) +
532     *                                    ), +
533     *                                    'rename' => array( +
534     *                                        'sex' => array( +
535     *                                            'name' => 'gender', +
536     *                                            'definition' => array( +
537     *                                                'type' => 'text', +
538     *                                                'length' => 1, +
539     *                                                'default' => 'M', +
540     *                                            ), +
541     *                                        ) +
542     *                                    ) +
543     *                                ) +
544     * +
545     * @param boolean $check     indicates whether the function should just check if the DBMS driver +
546     *                             can perform the requested table alterations if the value is true or +
547     *                             actually perform them otherwise. +
548     * @return void +
549     */ +
550    public function alterTable($name, array $changes, $check = false) +
551    { +
552        $sql = $this->alterTableSql($name, $changes, $check); +
553         +
554        if (is_string($sql) && $sql) { +
555            $this->conn->execute($sql); +
556        } +
557    } +
558    /** +
559     * generates the sql for altering an existing table +
560     * (this method is implemented by the drivers) +
561     * +
562     * @param string $name          name of the table that is intended to be changed. +
563     * @param array $changes        associative array that contains the details of each type      * +
564     * @param boolean $check        indicates whether the function should just check if the DBMS driver +
565     *                              can perform the requested table alterations if the value is true or +
566     *                              actually perform them otherwise. +
567     * @see Doctrine_Export::alterTable() +
568     * @return string +
569     */ +
570    public function alterTableSql($name, array $changes, $check = false) +
571    { +
572        throw new Doctrine_Export_Exception('Alter table not supported by this driver.'); +
573    } +
574    /** +
575     * Get declaration of a number of field in bulk +
576     * +
577     * @param array $fields  a multidimensional associative array. +
578     *      The first dimension determines the field name, while the second +
579     *      dimension is keyed with the name of the properties +
580     *      of the field being declared as array indexes. Currently, the types +
581     *      of supported field properties are as follows: +
582     * +
583     *      length +
584     *          Integer value that determines the maximum length of the text +
585     *          field. If this argument is missing the field should be +
586     *          declared to have the longest length allowed by the DBMS. +
587     * +
588     *      default +
589     *          Text value to be used as default for this field. +
590     * +
591     *      notnull +
592     *          Boolean flag that indicates whether this field is constrained +
593     *          to not be set to null. +
594     *      charset +
595     *          Text value with the default CHARACTER SET for this field. +
596     *      collation +
597     *          Text value with the default COLLATION for this field. +
598     *      unique +
599     *          unique constraint +
600     * +
601     * @return string +
602     */ +
603    public function getFieldDeclarationList(array $fields) +
604    { +
605        foreach ($fields as $fieldName => $field) { +
606            $query = $this->getDeclaration($fieldName, $field); +
607 +
608            $queryFields[] = $query; +
609        } +
610        return implode(', ', $queryFields); +
611    } +
612    /** +
613     * Obtain DBMS specific SQL code portion needed to declare a generic type +
614     * field to be used in statements like CREATE TABLE. +
615     * +
616     * @param string $name   name the field to be declared. +
617     * @param array  $field  associative array with the name of the properties +
618     *      of the field being declared as array indexes. Currently, the types +
619     *      of supported field properties are as follows: +
620     * +
621     *      length +
622     *          Integer value that determines the maximum length of the text +
623     *          field. If this argument is missing the field should be +
624     *          declared to have the longest length allowed by the DBMS. +
625     * +
626     *      default +
627     *          Text value to be used as default for this field. +
628     * +
629     *      notnull +
630     *          Boolean flag that indicates whether this field is constrained +
631     *          to not be set to null. +
632     *      charset +
633     *          Text value with the default CHARACTER SET for this field. +
634     *      collation +
635     *          Text value with the default COLLATION for this field. +
636     *      unique +
637     *          unique constraint +
638     *      check +
639     *          column check constraint +
640     * +
641     * @return string  DBMS specific SQL code portion that should be used to +
642     *      declare the specified field. +
643     */ +
644    public function getDeclaration($name, array $field) +
645    { +
646 +
647        $default   = $this->getDefaultFieldDeclaration($field); +
648 +
649        $charset   = (isset($field['charset']) && $field['charset']) ? +
650                    ' ' . $this->getCharsetFieldDeclaration($field['charset']) : ''; +
651 +
652        $collation = (isset($field['collation']) && $field['collation']) ? +
653                    ' ' . $this->getCollationFieldDeclaration($field['collation']) : ''; +
654 +
655        $notnull   = (isset($field['notnull']) && $field['notnull']) ? ' NOT NULL' : ''; +
656 +
657        $unique    = (isset($field['unique']) && $field['unique']) ? +
658                    ' ' . $this->getUniqueFieldDeclaration() : ''; +
659 +
660        $check     = (isset($field['check']) && $field['check']) ? +
661                    ' ' . $field['check'] : ''; +
662 +
663        $method = 'get' . $field['type'] . 'Declaration'; +
664 +
665        if (method_exists($this->conn->dataDict, $method)) { +
666            return $this->conn->dataDict->$method($name, $field); +
667        } else { +
668            $dec = $this->conn->dataDict->getNativeDeclaration($field); +
669        } +
670        return $this->conn->quoteIdentifier($name, true) . ' ' . $dec . $charset . $default . $notnull . $unique . $check . $collation; +
671    } +
672    /** +
673     * getDefaultDeclaration +
674     * Obtain DBMS specific SQL code portion needed to set a default value +
675     * declaration to be used in statements like CREATE TABLE. +
676     * +
677     * @param array $field      field definition array +
678     * @return string           DBMS specific SQL code portion needed to set a default value +
679     */ +
680    public function getDefaultFieldDeclaration($field) +
681    { +
682        $default = ''; +
683        if (isset($field['default'])) { +
684            if ($field['default'] === '') { +
685                $field['default'] = empty($field['notnull']) +
686                    ? null : $this->valid_default_values[$field['type']]; +
687 +
688                if ($field['default'] === '' && +
689                   ($this->conn->getAttribute(Doctrine::ATTR_PORTABILITY) & Doctrine::PORTABILITY_EMPTY_TO_NULL)) { +
690                    $field['default'] = null; +
691                } +
692            } +
693 +
694            if ($field['type'] === 'boolean') { +
695                $fields['default'] = $this->conn->convertBooleans($field['default']); +
696            } +
697            $default = ' DEFAULT ' . $this->conn->quote($field['default'], $field['type']); +
698        } +
699        return $default; +
700    } +
701    /** +
702     * Obtain DBMS specific SQL code portion needed to set a CHECK constraint +
703     * declaration to be used in statements like CREATE TABLE. +
704     * +
705     * @param array $definition     check definition +
706     * @return string               DBMS specific SQL code portion needed to set a CHECK constraint +
707     */ +
708    public function getCheckDeclaration(array $definition) +
709    { +
710        $constraints = array(); +
711        foreach ($definition as $field => $def) { +
712            if (is_string($def)) { +
713                $constraints[] = 'CHECK (' . $def . ')'; +
714            } else { +
715                if (isset($def['min'])) { +
716                    $constraints[] = 'CHECK (' . $field . ' >= ' . $def['min'] . ')'; +
717                } +
718 +
719                if (isset($def['max'])) { +
720                    $constraints[] = 'CHECK (' . $field . ' <= ' . $def['max'] . ')'; +
721                } +
722            } +
723        } +
724 +
725        return implode(', ', $constraints); +
726    } +
727    /** +
728     * Obtain DBMS specific SQL code portion needed to set an index +
729     * declaration to be used in statements like CREATE TABLE. +
730     * +
731     * @param string $name          name of the index +
732     * @param array $definition     index definition +
733     * @return string               DBMS specific SQL code portion needed to set an index +
734     */ +
735    public function getIndexDeclaration($name, array $definition) +
736    { +
737        $name   = $this->conn->quoteIdentifier($name); +
738        $type   = ''; +
739 +
740        if (isset($definition['type'])) { +
741            if (strtolower($definition['type']) == 'unique') { +
742                $type = strtoupper($definition['type']) . ' '; +
743            } else { +
744                throw new Doctrine_Export_Exception('Unknown index type ' . $definition['type']); +
745            } +
746        } +
747 +
748        if ( ! isset($definition['fields']) || ! is_array($definition['fields'])) { +
749            throw new Doctrine_Export_Exception('No index columns given.'); +
750        } +
751 +
752        $query = $type . 'INDEX ' . $name; +
753 +
754        $query .= ' (' . $this->getIndexFieldDeclarationList($definition['fields']) . ')'; +
755 +
756        return $query; +
757    } +
758    /** +
759     * getIndexFieldDeclarationList +
760     * Obtain DBMS specific SQL code portion needed to set an index +
761     * declaration to be used in statements like CREATE TABLE. +
762     * +
763     * @return string +
764     */ +
765    public function getIndexFieldDeclarationList(array $fields) +
766    { +
767        $ret = array(); +
768        foreach ($fields as $field => $definition) { +
769            if (is_array($definition)) { +
770                $ret[] = $this->conn->quoteIdentifier($field); +
771            } else { +
772                $ret[] = $this->conn->quoteIdentifier($definition); +
773            } +
774        } +
775        return implode(', ', $ret); +
776    } +
777    /** +
778     * A method to return the required SQL string that fits between CREATE ... TABLE +
779     * to create the table as a temporary table. +
780     * +
781     * Should be overridden in driver classes to return the correct string for the +
782     * specific database type. +
783     * +
784     * The default is to return the string "TEMPORARY" - this will result in a +
785     * SQL error for any database that does not support temporary tables, or that +
786     * requires a different SQL command from "CREATE TEMPORARY TABLE". +
787     * +
788     * @return string The string required to be placed between "CREATE" and "TABLE" +
789     *                to generate a temporary table, if possible. +
790     */ +
791    public function getTemporaryTableQuery() +
792    { +
793        return 'TEMPORARY'; +
794    } +
795    /** +
796     * getForeignKeyDeclaration +
797     * Obtain DBMS specific SQL code portion needed to set the FOREIGN KEY constraint +
798     * of a field declaration to be used in statements like CREATE TABLE. +
799     * +
800     * @param array $definition         an associative array with the following structure: +
801     *          name                    optional constraint name +
802     * +
803     *          local                   the local field(s) +
804     * +
805     *          foreign                 the foreign reference field(s) +
806     * +
807     *          foreignTable            the name of the foreign table +
808     * +
809     *          onDelete                referential delete action +
810     * +
811     *          onUpdate                referential update action +
812     * +
813     *          deferred                deferred constraint checking +
814     * +
815     * The onDelete and onUpdate keys accept the following values: +
816     * +
817     * CASCADE: Delete or update the row from the parent table and automatically delete or +
818     *          update the matching rows in the child table. Both ON DELETE CASCADE and ON UPDATE CASCADE are supported. +
819     *          Between two tables, you should not define several ON UPDATE CASCADE clauses that act on the same column +
820     *          in the parent table or in the child table. +
821     * +
822     * SET NULL: Delete or update the row from the parent table and set the foreign key column or columns in the +
823     *          child table to NULL. This is valid only if the foreign key columns do not have the NOT NULL qualifier +
824     *          specified. Both ON DELETE SET NULL and ON UPDATE SET NULL clauses are supported. +
825     * +
826     * NO ACTION: In standard SQL, NO ACTION means no action in the sense that an attempt to delete or update a primary +
827     *           key value is not allowed to proceed if there is a related foreign key value in the referenced table. +
828     * +
829     * RESTRICT: Rejects the delete or update operation for the parent table. NO ACTION and RESTRICT are the same as +
830     *           omitting the ON DELETE or ON UPDATE clause. +
831     * +
832     * SET DEFAULT +
833     * +
834     * @return string  DBMS specific SQL code portion needed to set the FOREIGN KEY constraint +
835     *                 of a field declaration. +
836     */ +
837    public function getForeignKeyDeclaration(array $definition) +
838    { +
839        $sql  = $this->getForeignKeyBaseDeclaration($definition); +
840        $sql .= $this->getAdvancedForeignKeyOptions($definition); +
841 +
842        return $sql; +
843    } +
844    /** +
845     * getAdvancedForeignKeyOptions +
846     * Return the FOREIGN KEY query section dealing with non-standard options +
847     * as MATCH, INITIALLY DEFERRED, ON UPDATE, ... +
848     * +
849     * @param array $definition     foreign key definition +
850     * @return string +
851     */ +
852    public function getAdvancedForeignKeyOptions(array $definition) +
853    { +
854        $query = ''; +
855        if ( ! empty($definition['onUpdate'])) { +
856            $query .= ' ON UPDATE ' . $this->getForeignKeyRefentialAction($definition['onUpdate']); +
857        } +
858        if ( ! empty($definition['onDelete'])) { +
859            $query .= ' ON DELETE ' . $this->getForeignKeyRefentialAction($definition['onDelete']); +
860        } +
861        return $query; +
862    } +
863    /** +
864     * getForeignKeyReferentialAction +
865     * +
866     * returns given referential action in uppercase if valid, otherwise throws +
867     * an exception +
868     * +
869     * @throws Doctrine_Exception_Exception     if unknown referential action given +
870     * @param string $action    foreign key referential action +
871     * @param string            foreign key referential action in uppercase +
872     */ +
873    public function getForeignKeyReferentialAction($action) +
874    { +
875        $upper = strtoupper($action); +
876        switch ($upper) { +
877            case 'CASCADE': +
878            case 'SET NULL': +
879            case 'NO ACTION': +
880            case 'RESTRICT': +
881            case 'SET DEFAULT': +
882                return $upper; +
883            break; +
884            default: +
885                throw new Doctrine_Export_Exception('Unknown foreign key referential action \'' . $upper . '\' given.'); +
886        } +
887    } +
888    /** +
889     * getForeignKeyBaseDeclaration +
890     * Obtain DBMS specific SQL code portion needed to set the FOREIGN KEY constraint +
891     * of a field declaration to be used in statements like CREATE TABLE. +
892     * +
893     * @param array $definition +
894     * @return string +
895     */ +
896    public function getForeignKeyBaseDeclaration(array $definition) +
897    { +
898        $sql = ''; +
899        if (isset($definition['name'])) { +
900            $sql .= 'CONSTRAINT ' . $this->conn->quoteIdentifier($definition['name']) . ' '; +
901        } +
902        $sql .= 'FOREIGN KEY ('; +
903 +
904        if ( ! isset($definition['local'])) { +
905            throw new Doctrine_Export_Exception('Local reference field missing from definition.'); +
906        } +
907        if ( ! isset($definition['foreign'])) { +
908            throw new Doctrine_Export_Exception('Foreign reference field missing from definition.'); +
909        } +
910        if ( ! isset($definition['foreignTable'])) { +
911            throw new Doctrine_Export_Exception('Foreign reference table missing from definition.'); +
912        } +
913 +
914        if ( ! is_array($definition['local'])) { +
915            $definition['local'] = array($definition['local']); +
916        } +
917        if ( ! is_array($definition['foreign'])) { +
918            $definition['foreign'] = array($definition['foreign']); +
919        } +
920 +
921        $sql .= implode(', ', array_map(array($this->conn, 'quoteIdentifier'), $definition['local'])) +
922              . ') REFERENCES ' +
923              . $this->conn->quoteIdentifier($definition['foreignTable']) . '(' +
924              . implode(', ', array_map(array($this->conn, 'quoteIdentifier'), $definition['foreign'])) . ')'; +
925 +
926        return $sql; +
927    } +
928    /** +
929     * Obtain DBMS specific SQL code portion needed to set the UNIQUE constraint +
930     * of a field declaration to be used in statements like CREATE TABLE. +
931     * +
932     * @return string  DBMS specific SQL code portion needed to set the UNIQUE constraint +
933     *                 of a field declaration. +
934     */ +
935    public function getUniqueFieldDeclaration() +
936    { +
937        return 'UNIQUE'; +
938    } +
939    /** +
940     * Obtain DBMS specific SQL code portion needed to set the CHARACTER SET +
941     * of a field declaration to be used in statements like CREATE TABLE. +
942     * +
943     * @param string $charset   name of the charset +
944     * @return string  DBMS specific SQL code portion needed to set the CHARACTER SET +
945     *                 of a field declaration. +
946     */ +
947    public function getCharsetFieldDeclaration($charset) +
948    { +
949        return ''; +
950    } +
951    /** +
952     * Obtain DBMS specific SQL code portion needed to set the COLLATION +
953     * of a field declaration to be used in statements like CREATE TABLE. +
954     * +
955     * @param string $collation   name of the collation +
956     * @return string  DBMS specific SQL code portion needed to set the COLLATION +
957     *                 of a field declaration. +
958     */ +
959    public function getCollationFieldDeclaration($collation) +
960    { +
961        return ''; +
962    } +
963    /** +
964     * exportSchema +
965     * method for exporting Doctrine_Record classes to a schema +
966     * +
967     * if the directory parameter is given this method first iterates +
968     * recursively trhough the given directory in order to find any model classes +
969     * +
970     * Then it iterates through all declared classes and creates tables for the ones +
971     * that extend Doctrine_Record and are not abstract classes +
972     * +
973     * @throws Doctrine_Connection_Exception    if some error other than Doctrine::ERR_ALREADY_EXISTS +
974     *                                          occurred during the create table operation +
975     * @param string $directory     optional directory parameter +
976     * @return void +
977     */ +
978    public function exportSchema($directory = null) +
979    { +
980        if ($directory !== null) { +
981            $models = Doctrine::loadModels($directory); +
982        } else { +
983            $models = Doctrine::getLoadedModels(); +
984        } +
985         +
986        $this->exportClasses($models); +
987    } +
988    /** +
989     * exportClasses +
990     * method for exporting Doctrine_Record classes to a schema +
991     * +
992     * @throws Doctrine_Connection_Exception    if some error other than Doctrine::ERR_ALREADY_EXISTS +
993     *                                          occurred during the create table operation +
994     * @param array $classes +
995     * @return void +
996     */ +
997    public function exportClasses(array $classes) +
998    { +
999        $connections = array(); +
1000        foreach ($classes as $class) { +
1001            $record = new $class(); +
1002            $connection = $record->getTable()->getConnection(); +
1003            $connectionName = Doctrine_Manager::getInstance()->getConnectionName($connection); +
1004             +
1005            if (!isset($connections[$connectionName])) { +
1006                $connections[$connectionName] = array(); +
1007                $connections[$connectionName]['creates'] = array(); +
1008                $connections[$connectionName]['alters'] = array(); +
1009            } +
1010             +
1011            $sql = $this->exportClassesSql(array($class)); +
1012            // The create sql query is the first one, and everything else is the alters +
1013            $create = $sql[0]; +
1014             +
1015            // Remove create from the main array +
1016            unset($sql[0]); +
1017             +
1018            // Store the creates and alters individually so we can merge them back together later +
1019            // We need the creates to happen first, then the alters +
1020            $connections[$connectionName]['creates'][] = $create; +
1021            $connections[$connectionName]['alters'] = array_merge($connections[$connectionName]['alters'], $sql); +
1022        } +
1023         +
1024        // Loop over all the sql again to merge the creates and alters in to the same array, but so that the alters are at the bottom +
1025        $build = array(); +
1026        foreach ($connections as $connectionName => $sql) { +
1027            $build[$connectionName] = array_merge($sql['creates'], $sql['alters']); +
1028        } +
1029         +
1030        foreach ($build as $connectionName => $sql) { +
1031            $connection = Doctrine_Manager::getInstance()->getConnection($connectionName); +
1032             +
1033            $connection->beginTransaction(); +
1034             +
1035            foreach ($sql as $query) { +
1036                try { +
1037                    $connection->exec($query); +
1038                } catch (Doctrine_Connection_Exception $e) { +
1039                    // we only want to silence table already exists errors +
1040                    if ($e->getPortableCode() !== Doctrine::ERR_ALREADY_EXISTS) { +
1041                        $connection->rollback(); +
1042                        throw $e; +
1043                    } +
1044                } +
1045            } +
1046             +
1047            $connection->commit(); +
1048        } +
1049    } +
1050    /** +
1051     * exportClassesSql +
1052     * method for exporting Doctrine_Record classes to a schema +
1053     * +
1054     * @throws Doctrine_Connection_Exception    if some error other than Doctrine::ERR_ALREADY_EXISTS +
1055     *                                          occurred during the create table operation +
1056     * @param array $classes +
1057     * @return void +
1058     */ +
1059    public function exportClassesSql(array $classes) +
1060    { +
1061        $models = Doctrine::getLoadedModels($classes); +
1062         +
1063        $sql = array(); +
1064         +
1065        foreach ($models as $name) { +
1066            $record = new $name(); +
1067            $table  = $record->getTable(); +
1068             +
1069            $data = $table->getExportableFormat(); +
1070 +
1071            $query = $this->conn->export->createTableSql($data['tableName'], $data['columns'], $data['options']); +
1072 +
1073            if (is_array($query)) { +
1074                $sql = array_merge($sql, $query); +
1075            } else { +
1076                $sql[] = $query; +
1077            } +
1078             +
1079            if ($table->getAttribute(Doctrine::ATTR_EXPORT) & Doctrine::EXPORT_PLUGINS) { +
1080                $sql = array_merge($sql, $this->exportPluginsSql($table)); +
1081            } +
1082        } +
1083         +
1084        $sql = array_unique($sql); +
1085         +
1086        rsort($sql); +
1087 +
1088        return $sql; +
1089    } +
1090    /** +
1091     * exportPluginsSql +
1092     * exports plugin tables for given table +
1093     * +
1094     * @param Doctrine_Table $table     the table in which the plugins belong to +
1095     * @return array    an array of sql strings +
1096     */ +
1097    public function exportPluginsSql(Doctrine_Table $table) +
1098    { +
1099     $sql = array(); +
1100 +
1101        foreach ($table->getTemplates() as $name => $template) { +
1102            $plugin = $template->getPlugin(); +
1103 +
1104            if ($plugin === null) { +
1105                continue;                      +
1106            } +
1107 +
1108            $table = $plugin->getOption('pluginTable'); +
1109             +
1110            // Make sure plugin has a valid table +
1111            if ($table instanceof Doctrine_Table) { +
1112                $data = $table->getExportableFormat(); +
1113 +
1114                $query = $this->conn->export->createTableSql($data['tableName'], $data['columns'], $data['options']); +
1115 +
1116                $sql = array_merge($sql, (array) $query); +
1117            } +
1118        } +
1119 +
1120        return $sql; +
1121    } +
1122    /** +
1123     * exportSql +
1124     * returns the sql for exporting Doctrine_Record classes to a schema +
1125     * +
1126     * if the directory parameter is given this method first iterates +
1127     * recursively trhough the given directory in order to find any model classes +
1128     * +
1129     * Then it iterates through all declared classes and creates tables for the ones +
1130     * that extend Doctrine_Record and are not abstract classes +
1131     * +
1132     * @throws Doctrine_Connection_Exception    if some error other than Doctrine::ERR_ALREADY_EXISTS +
1133     *                                          occurred during the create table operation +
1134     * @param string $directory     optional directory parameter +
1135     * @return void +
1136     */ +
1137    public function exportSql($directory = null) +
1138    { +
1139        $models = Doctrine::loadModels($directory); +
1140 +
1141        return $this->exportClassesSql($models); +
1142    } +
1143    /** +
1144     * exportTable +
1145     * exports given table into database based on column and option definitions +
1146     * +
1147     * @throws Doctrine_Connection_Exception    if some error other than Doctrine::ERR_ALREADY_EXISTS +
1148     *                                          occurred during the create table operation +
1149     * @return boolean                          whether or not the export operation was successful +
1150     *                                          false if table already existed in the database +
1151     */ +
1152    public function exportTable(Doctrine_Table $table) +
1153    { +
1154        /** +
1155        TODO: maybe there should be portability option for the following check +
1156        if ( ! Doctrine::isValidClassname($table->getOption('declaringClass')->getName())) { +
1157            throw new Doctrine_Export_Exception('Class name not valid.'); +
1158        } +
1159        */ +
1160 +
1161        try { +
1162            $data = $table->getExportableFormat(); +
1163 +
1164            $this->conn->export->createTable($data['tableName'], $data['columns'], $data['options']); +
1165        } catch(Doctrine_Connection_Exception $e) { +
1166            // we only want to silence table already exists errors +
1167            if ($e->getPortableCode() !== Doctrine::ERR_ALREADY_EXISTS) { +
1168                throw $e; +
1169            } +
1170        } +
1171    } +
1172}
\ No newline at end of file diff --git a/tests/coverage/Doctrine_Export_Exception.html b/tests/coverage/Doctrine_Export_Exception.html new file mode 100644 index 000000000..1e38677e3 --- /dev/null +++ b/tests/coverage/Doctrine_Export_Exception.html @@ -0,0 +1,113 @@ + + + Coverage for Doctrine_Export_Exception + + +

Coverage for Doctrine_Export_Exception

Back to coverage report

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
1<?php +
2/* +
3 *  $Id: Exception.php 2702 2007-10-03 21:43:22Z Jonathan.Wage $ +
4 * +
5 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +
6 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +
7 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +
8 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +
9 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +
10 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +
11 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +
12 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +
13 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +
14 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +
15 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +
16 * +
17 * This software consists of voluntary contributions made by many individuals +
18 * and is licensed under the LGPL. For more information, see +
19 * <http://www.phpdoctrine.com>. +
20 */ +
21Doctrine::autoload('Doctrine_Exception'); +
22/** +
23 * Doctrine_Export_Exception +
24 * +
25 * @package     Doctrine +
26 * @subpackage  Export +
27 * @license     http://www.opensource.org/licenses/lgpl-license.php LGPL +
28 * @link        www.phpdoctrine.com +
29 * @since       1.0 +
30 * @version     $Revision: 2702 $ +
31 * @author      Konsta Vesterinen <kvesteri@cc.hut.fi> +
32 */ +
33class Doctrine_Export_Exception extends Doctrine_Exception +
34{ }
\ No newline at end of file diff --git a/tests/coverage/Doctrine_Export_Firebird.html b/tests/coverage/Doctrine_Export_Firebird.html new file mode 100644 index 000000000..f94a09c97 --- /dev/null +++ b/tests/coverage/Doctrine_Export_Firebird.html @@ -0,0 +1,1631 @@ + + + Coverage for Doctrine_Export_Firebird + + +

Coverage for Doctrine_Export_Firebird

Back to coverage report

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
1<?php +
2/* +
3 *  $Id: Firebird.php 2702 2007-10-03 21:43:22Z Jonathan.Wage $ +
4 * +
5 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +
6 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +
7 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +
8 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +
9 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +
10 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +
11 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +
12 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +
13 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +
14 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +
15 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +
16 * +
17 * This software consists of voluntary contributions made by many individuals +
18 * and is licensed under the LGPL. For more information, see +
19 * <http://www.phpdoctrine.com>. +
20 */ +
21Doctrine::autoload('Doctrine_Export'); +
22/** +
23 * Doctrine_Export_Sqlite +
24 * +
25 * @package     Doctrine +
26 * @subpackage  Export +
27 * @author      Konsta Vesterinen <kvesteri@cc.hut.fi> +
28 * @author      Lukas Smith <smith@pooteeweet.org> (PEAR MDB2 library) +
29 * @author      Lorenzo Alberton <l.alberton@quipo.it> (PEAR MDB2 Interbase driver) +
30 * @license     http://www.opensource.org/licenses/lgpl-license.php LGPL +
31 * @link        www.phpdoctrine.com +
32 * @since       1.0 +
33 * @version     $Revision: 2702 $ +
34 */ +
35class Doctrine_Export_Firebird extends Doctrine_Export +
36{ +
37    /** +
38     * create a new database +
39     * +
40     * @param string $name  name of the database that should be created +
41     * @return void +
42     */ +
43    public function createDatabase($name) +
44    { +
45        throw new Doctrine_Export_Exception( +
46                'PHP Interbase API does not support direct queries. You have to ' . +
47                'create the db manually by using isql command or a similar program'); +
48    } +
49    /** +
50     * drop an existing database +
51     * +
52     * @param string $name  name of the database that should be dropped +
53     * @return void +
54     */ +
55    public  function dropDatabase($name) +
56    { +
57        throw new Doctrine_Export_Exception( +
58                'PHP Interbase API does not support direct queries. You have ' . +
59                'to drop the db manually by using isql command or a similar program'); +
60    } +
61    /** +
62     * add an autoincrement sequence + trigger +
63     * +
64     * @param string $name  name of the PK field +
65     * @param string $table name of the table +
66     * @param string $start start value for the sequence +
67     * @return void +
68     */ +
69    public function _makeAutoincrement($name, $table, $start = null) +
70    { +
71        if (is_null($start)) { +
72            $this->conn->beginTransaction(); +
73            $query = 'SELECT MAX(' . $this->conn->quoteIdentifier($name, true) . ') FROM ' . $this->conn->quoteIdentifier($table, true); +
74            $start = $this->conn->fetchOne($query, 'integer'); +
75 +
76            ++$start; +
77            $result = $this->createSequence($table, $start); +
78            $this->conn->commit(); +
79        } else { +
80            $result = $this->createSequence($table, $start); +
81        } +
82 +
83        $sequence_name = $this->conn->formatter->getSequenceName($table); +
84        $trigger_name  = $this->conn->quoteIdentifier($table . '_AUTOINCREMENT_PK', true); +
85 +
86        $table = $this->conn->quoteIdentifier($table, true); +
87        $name  = $this->conn->quoteIdentifier($name,  true); +
88 +
89        $triggerSql = 'CREATE TRIGGER ' . $trigger_name . ' FOR ' . $table . ' +
90                        ACTIVE BEFORE INSERT POSITION 0 +
91                        AS +
92                        BEGIN +
93                        IF (NEW.' . $name . ' IS NULL OR NEW.' . $name . ' = 0) THEN +
94                            NEW.' . $name . ' = GEN_ID('.$sequence_name.', 1); +
95                        END'; +
96        $result = $this->conn->exec($triggerSql); +
97 +
98        // TODO ? $this->_silentCommit(); +
99 +
100        return $result; +
101    } +
102    /** +
103     * drop an existing autoincrement sequence + trigger +
104     * +
105     * @param string $table name of the table +
106     * @return void +
107     */ +
108    public function _dropAutoincrement($table) +
109    { +
110 +
111        $result = $this->dropSequence($table); +
112 +
113        //remove autoincrement trigger associated with the table +
114        $table = $this->conn->quote(strtoupper($table)); +
115        $triggerName = $this->conn->quote(strtoupper($table) . '_AUTOINCREMENT_PK'); +
116 +
117        return $this->conn->exec("DELETE FROM RDB\$TRIGGERS WHERE UPPER(RDB\$RELATION_NAME)=" . $table . " AND UPPER(RDB\$TRIGGER_NAME)=" . $triggerName); +
118    } +
119    /** +
120     * create a new table +
121     * +
122     * @param string $name     Name of the database that should be created +
123     * @param array $fields Associative array that contains the definition of each field of the new table +
124     *                        The indexes of the array entries are the names of the fields of the table an +
125     *                        the array entry values are associative arrays like those that are meant to be +
126     *                         passed with the field definitions to get[Type]Declaration() functions. +
127     * +
128     *                        Example +
129     *                        array( +
130     * +
131     *                            'id' => array( +
132     *                                'type' => 'integer', +
133     *                                'unsigned' => 1, +
134     *                                'notnull' => 1, +
135     *                                'default' => 0, +
136     *                            ), +
137     *                            'name' => array( +
138     *                                'type' => 'text', +
139     *                                'length' => 12, +
140     *                            ), +
141     *                            'description' => array( +
142     *                                'type' => 'text', +
143     *                                'length' => 12, +
144     *                            ) +
145     *                        ); +
146     * @param array $options  An associative array of table options: +
147     * +
148     * @return void +
149     */ +
150    public function createTable($name, array $fields, array $options = array()) { +
151        parent::createTable($name, $fields, $options); +
152 +
153        // TODO ? $this->_silentCommit(); +
154        foreach ($fields as $field_name => $field) { +
155            if ( ! empty($field['autoincrement'])) { +
156                //create PK constraint +
157                $pk_definition = array( +
158                    'fields' => array($field_name => array()), +
159                    'primary' => true, +
160                ); +
161                //$pk_name = $name.'_PK'; +
162                $pk_name = null; +
163                $result = $this->createConstraint($name, $pk_name, $pk_definition); +
164 +
165                //create autoincrement sequence + trigger +
166                return $this->_makeAutoincrement($field_name, $name, 1); +
167            } +
168        } +
169    } +
170    /** +
171     * Check if planned changes are supported +
172     * +
173     * @param string $name name of the database that should be dropped +
174     * @return void +
175     */ +
176    public function checkSupportedChanges(&$changes) +
177    { +
178        foreach ($changes as $change_name => $change) { +
179            switch ($change_name) { +
180                case 'notnull': +
181                    throw new Doctrine_DataDict_Exception('it is not supported changes to field not null constraint'); +
182                case 'default': +
183                    throw new Doctrine_DataDict_Exception('it is not supported changes to field default value'); +
184                case 'length': +
185                    /* +
186                    return throw new Doctrine_DataDict_Firebird_Exception('it is not supported changes to field default length'); +
187                    */ +
188                case 'unsigned': +
189                case 'type': +
190                case 'declaration': +
191                case 'definition': +
192                    break; +
193                default: +
194                    throw new Doctrine_DataDict_Exception('it is not supported change of type' . $change_name); +
195            } +
196        } +
197        return true; +
198    } +
199    /** +
200     * drop an existing table +
201     * +
202     * @param string $name name of the table that should be dropped +
203     * @return mixed MDB2_OK on success, a MDB2 error on failure +
204     * @access public +
205     */ +
206    public function dropTable($name) +
207    { +
208        $result = $this->_dropAutoincrement($name); +
209        $result = parent::dropTable($name); +
210 +
211        //$this->_silentCommit(); +
212 +
213        return $result; +
214    } +
215    /** +
216     * alter an existing table +
217     * +
218     * @param string $name         name of the table that is intended to be changed. +
219     * @param array $changes     associative array that contains the details of each type +
220     *                             of change that is intended to be performed. The types of +
221     *                             changes that are currently supported are defined as follows: +
222     * +
223     *                             name +
224     * +
225     *                                New name for the table. +
226     * +
227     *                            add +
228     * +
229     *                                Associative array with the names of fields to be added as +
230     *                                 indexes of the array. The value of each entry of the array +
231     *                                 should be set to another associative array with the properties +
232     *                                 of the fields to be added. The properties of the fields should +
233     *                                 be the same as defined by the Metabase parser. +
234     * +
235     * +
236     *                            remove +
237     * +
238     *                                Associative array with the names of fields to be removed as indexes +
239     *                                 of the array. Currently the values assigned to each entry are ignored. +
240     *                                 An empty array should be used for future compatibility. +
241     * +
242     *                            rename +
243     * +
244     *                                Associative array with the names of fields to be renamed as indexes +
245     *                                 of the array. The value of each entry of the array should be set to +
246     *                                 another associative array with the entry named name with the new +
247     *                                 field name and the entry named Declaration that is expected to contain +
248     *                                 the portion of the field declaration already in DBMS specific SQL code +
249     *                                 as it is used in the CREATE TABLE statement. +
250     * +
251     *                            change +
252     * +
253     *                                Associative array with the names of the fields to be changed as indexes +
254     *                                 of the array. Keep in mind that if it is intended to change either the +
255     *                                 name of a field and any other properties, the change array entries +
256     *                                 should have the new names of the fields as array indexes. +
257     * +
258     *                                The value of each entry of the array should be set to another associative +
259     *                                 array with the properties of the fields to that are meant to be changed as +
260     *                                 array entries. These entries should be assigned to the new values of the +
261     *                                 respective properties. The properties of the fields should be the same +
262     *                                 as defined by the Metabase parser. +
263     * +
264     *                            Example +
265     *                                array( +
266     *                                    'name' => 'userlist', +
267     *                                    'add' => array( +
268     *                                        'quota' => array( +
269     *                                            'type' => 'integer', +
270     *                                            'unsigned' => 1 +
271     *                                        ) +
272     *                                    ), +
273     *                                    'remove' => array( +
274     *                                        'file_limit' => array(), +
275     *                                        'time_limit' => array() +
276     *                                    ), +
277     *                                    'change' => array( +
278     *                                        'name' => array( +
279     *                                            'length' => '20', +
280     *                                            'definition' => array( +
281     *                                                'type' => 'text', +
282     *                                                'length' => 20, +
283     *                                            ), +
284     *                                        ) +
285     *                                    ), +
286     *                                    'rename' => array( +
287     *                                        'sex' => array( +
288     *                                            'name' => 'gender', +
289     *                                            'definition' => array( +
290     *                                                'type' => 'text', +
291     *                                                'length' => 1, +
292     *                                                'default' => 'M', +
293     *                                            ), +
294     *                                        ) +
295     *                                    ) +
296     *                                ) +
297     * +
298     * @param boolean $check     indicates whether the function should just check if the DBMS driver +
299     *                             can perform the requested table alterations if the value is true or +
300     *                             actually perform them otherwise. +
301     * @return void +
302     */ +
303    public function alterTable($name, array $changes, $check = false) +
304    { +
305        foreach ($changes as $changeName => $change) { +
306            switch ($changeName) { +
307                case 'add': +
308                case 'remove': +
309                case 'rename': +
310                    break; +
311                case 'change': +
312                    foreach ($changes['change'] as $field) { +
313                        $this->checkSupportedChanges($field); +
314                    } +
315                    break; +
316                default: +
317                    throw new Doctrine_DataDict_Exception('change type ' . $changeName . ' not yet supported'); +
318            } +
319        } +
320        if ($check) { +
321            return true; +
322        } +
323        $query = ''; +
324        if ( ! empty($changes['add']) && is_array($changes['add'])) { +
325            foreach ($changes['add'] as $fieldName => $field) { +
326                if ($query) { +
327                    $query.= ', '; +
328                } +
329                $query.= 'ADD ' . $this->getDeclaration($field['type'], $fieldName, $field, $name); +
330            } +
331        } +
332 +
333        if ( ! empty($changes['remove']) && is_array($changes['remove'])) { +
334            foreach ($changes['remove'] as $field_name => $field) { +
335                if ($query) { +
336                    $query.= ', '; +
337                } +
338                $field_name = $this->conn->quoteIdentifier($field_name, true); +
339                $query.= 'DROP ' . $field_name; +
340            } +
341        } +
342 +
343        if ( ! empty($changes['rename']) && is_array($changes['rename'])) { +
344            foreach ($changes['rename'] as $field_name => $field) { +
345                if ($query) { +
346                    $query.= ', '; +
347                } +
348                $field_name = $this->conn->quoteIdentifier($field_name, true); +
349                $query.= 'ALTER ' . $field_name . ' TO ' . $this->conn->quoteIdentifier($field['name'], true); +
350            } +
351        } +
352 +
353        if ( ! empty($changes['change']) && is_array($changes['change'])) { +
354            // missing support to change DEFAULT and NULLability +
355            foreach ($changes['change'] as $fieldName => $field) { +
356                $this->checkSupportedChanges($field); +
357                if ($query) { +
358                    $query.= ', '; +
359                } +
360                $this->conn->loadModule('Datatype', null, true); +
361                $field_name = $this->conn->quoteIdentifier($fieldName, true); +
362                $query.= 'ALTER ' . $field_name.' TYPE ' . $this->getTypeDeclaration($field['definition']); +
363            } +
364        } +
365 +
366        if ( ! strlen($query)) { +
367            return false; +
368        } +
369 +
370        $name = $this->conn->quoteIdentifier($name, true); +
371        $result = $this->conn->exec('ALTER TABLE ' . $name . ' ' . $query); +
372        $this->_silentCommit(); +
373        return $result; +
374    } +
375    /** +
376     * Get the stucture of a field into an array +
377     * +
378     * @param string    $table         name of the table on which the index is to be created +
379     * @param string    $name         name of the index to be created +
380     * @param array     $definition        associative array that defines properties of the index to be created. +
381     *                                 Currently, only one property named FIELDS is supported. This property +
382     *                                 is also an associative with the names of the index fields as array +
383     *                                 indexes. Each entry of this array is set to another type of associative +
384     *                                 array that specifies properties of the index that are specific to +
385     *                                 each field. +
386     * +
387     *                                Currently, only the sorting property is supported. It should be used +
388     *                                 to define the sorting direction of the index. It may be set to either +
389     *                                 ascending or descending. +
390     * +
391     *                                Not all DBMS support index sorting direction configuration. The DBMS +
392     *                                 drivers of those that do not support it ignore this property. Use the +
393     *                                 function support() to determine whether the DBMS driver can manage indexes. +
394 +
395     *                                 Example +
396     *                                    array( +
397     *                                        'fields' => array( +
398     *                                            'user_name' => array( +
399     *                                                'sorting' => 'ascending' +
400     *                                            ), +
401     *                                            'last_login' => array() +
402     *                                        ) +
403     *                                    ) +
404     * @return void +
405     */ +
406    public function createIndexSql($table, $name, array $definition) +
407    { +
408        $query = 'CREATE'; +
409 +
410        $query_sort = ''; +
411        foreach ($definition['fields'] as $field) { +
412            if ( ! strcmp($query_sort, '') && isset($field['sorting'])) { +
413                switch ($field['sorting']) { +
414                    case 'ascending': +
415                        $query_sort = ' ASC'; +
416                        break; +
417                    case 'descending': +
418                        $query_sort = ' DESC'; +
419                        break; +
420                } +
421            } +
422        } +
423        $table = $this->conn->quoteIdentifier($table, true); +
424        $name  = $this->conn->quoteIdentifier($this->conn->formatter->getIndexName($name), true); +
425        $query .= $query_sort. ' INDEX ' . $name . ' ON ' . $table; +
426        $fields = array(); +
427        foreach (array_keys($definition['fields']) as $field) { +
428            $fields[] = $this->conn->quoteIdentifier($field, true); +
429        } +
430        $query .= ' ('.implode(', ', $fields) . ')'; +
431 +
432        return $query; +
433    } +
434    /** +
435     * create a constraint on a table +
436     * +
437     * @param string    $table      name of the table on which the constraint is to be created +
438     * @param string    $name       name of the constraint to be created +
439     * @param array     $definition associative array that defines properties of the constraint to be created. +
440     *                              Currently, only one property named FIELDS is supported. This property +
441     *                              is also an associative with the names of the constraint fields as array +
442     *                              constraints. Each entry of this array is set to another type of associative +
443     *                              array that specifies properties of the constraint that are specific to +
444     *                              each field. +
445     * +
446     *                              Example +
447     *                                  array( +
448     *                                      'fields' => array( +
449     *                                          'user_name' => array(), +
450     *                                          'last_login' => array(), +
451     *                                      ) +
452     *                                  ) +
453     * @return void +
454     */ +
455    public function createConstraint($table, $name, $definition) +
456    { +
457        $table = $this->conn->quoteIdentifier($table, true); +
458 +
459        if ( ! empty($name)) { +
460            $name = $this->conn->quoteIdentifier($this->conn->formatter->getIndexName($name), true); +
461        } +
462        $query = "ALTER TABLE $table ADD"; +
463        if ( ! empty($definition['primary'])) { +
464            if ( ! empty($name)) { +
465                $query.= ' CONSTRAINT '.$name; +
466            } +
467            $query.= ' PRIMARY KEY'; +
468        } else { +
469            $query.= ' CONSTRAINT '. $name; +
470            if ( ! empty($definition['unique'])) { +
471               $query.= ' UNIQUE'; +
472            } +
473        } +
474        $fields = array(); +
475        foreach (array_keys($definition['fields']) as $field) { +
476            $fields[] = $this->conn->quoteIdentifier($field, true); +
477        } +
478        $query .= ' ('. implode(', ', $fields) . ')'; +
479        $result = $this->conn->exec($query); +
480        // TODO ? $this->_silentCommit(); +
481        return $result; +
482    } +
483    /** +
484     * A method to return the required SQL string that fits between CREATE ... TABLE +
485     * to create the table as a temporary table. +
486     * +
487     * @return string The string required to be placed between "CREATE" and "TABLE" +
488     *                to generate a temporary table, if possible. +
489     */ +
490    public function getTemporaryTableQuery() +
491    { +
492        return 'GLOBAL TEMPORARY'; +
493    } +
494    /** +
495     * create sequence +
496     * +
497     * @param string $seqName name of the sequence to be created +
498     * @param string $start start value of the sequence; default is 1 +
499     * @param array     $options  An associative array of table options: +
500     *                          array( +
501     *                              'comment' => 'Foo', +
502     *                              'charset' => 'utf8', +
503     *                              'collate' => 'utf8_unicode_ci', +
504     *                          ); +
505     * @return boolean +
506     */ +
507    public function createSequence($seqName, $start = 1, array $options = array()) +
508    { +
509        $sequenceName = $this->conn->formatter->getSequenceName($seqName); +
510 +
511        $this->conn->exec('CREATE GENERATOR ' . $sequenceName); +
512 +
513        try { +
514            $this->conn->exec('SET GENERATOR ' . $sequenceName . ' TO ' . ($start-1)); +
515             +
516            return true; +
517        } catch (Doctrine_Connection_Exception $e) { +
518            try { +
519                $this->dropSequence($seqName); +
520            } catch(Doctrine_Connection_Exception $e) { +
521                throw new Doctrine_Export_Exception('Could not drop inconsistent sequence table'); +
522            } +
523        } +
524        throw new Doctrine_Export_Exception('could not create sequence table'); +
525    } +
526    /** +
527     * drop existing sequence +
528     * +
529     * @param string $seqName name of the sequence to be dropped +
530     * @return void +
531     */ +
532    public function dropSequenceSql($seqName) +
533    { +
534        $sequenceName = $this->conn->formatter->getSequenceName($seqName); +
535        $sequenceName = $this->conn->quote($sequenceName); +
536        $query = "DELETE FROM RDB\$GENERATORS WHERE UPPER(RDB\$GENERATOR_NAME)=" . $sequenceName; +
537         +
538        return $query; +
539    } +
540}
\ No newline at end of file diff --git a/tests/coverage/Doctrine_Export_Mysql.html b/tests/coverage/Doctrine_Export_Mysql.html new file mode 100644 index 000000000..8c0cede4c --- /dev/null +++ b/tests/coverage/Doctrine_Export_Mysql.html @@ -0,0 +1,1928 @@ + + + Coverage for Doctrine_Export_Mysql + + +

Coverage for Doctrine_Export_Mysql

Back to coverage report

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
1<?php +
2/* +
3 *  $Id: Mysql.php 2702 2007-10-03 21:43:22Z Jonathan.Wage $ +
4 * +
5 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +
6 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +
7 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +
8 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +
9 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +
10 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +
11 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +
12 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +
13 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +
14 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +
15 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +
16 * +
17 * This software consists of voluntary contributions made by many individuals +
18 * and is licensed under the LGPL. For more information, see +
19 * <http://www.phpdoctrine.com>. +
20 */ +
21Doctrine::autoload('Doctrine_Export'); +
22/** +
23 * Doctrine_Export_Mysql +
24 * +
25 * @package     Doctrine +
26 * @subpackage  Export +
27 * @author      Konsta Vesterinen <kvesteri@cc.hut.fi> +
28 * @author      Lukas Smith <smith@pooteeweet.org> (PEAR MDB2 library) +
29 * @license     http://www.opensource.org/licenses/lgpl-license.php LGPL +
30 * @link        www.phpdoctrine.com +
31 * @since       1.0 +
32 * @version     $Revision: 2702 $ +
33 */ +
34class Doctrine_Export_Mysql extends Doctrine_Export +
35{ +
36   /** +
37     * create a new database +
38     * +
39     * @param string $name name of the database that should be created +
40     * @return string +
41     */ +
42    public function createDatabaseSql($name) +
43    { +
44        return 'CREATE DATABASE ' . $this->conn->quoteIdentifier($name, true); +
45    } +
46    /** +
47     * drop an existing database +
48     * +
49     * @param string $name name of the database that should be dropped +
50     * @return string +
51     */ +
52    public function dropDatabaseSql($name) +
53    { +
54        return 'DROP DATABASE ' . $this->conn->quoteIdentifier($name); +
55    } +
56    /** +
57     * create a new table +
58     * +
59     * @param string $name   Name of the database that should be created +
60     * @param array $fields  Associative array that contains the definition of each field of the new table +
61     *                       The indexes of the array entries are the names of the fields of the table an +
62     *                       the array entry values are associative arrays like those that are meant to be +
63     *                       passed with the field definitions to get[Type]Declaration() functions. +
64     *                          array( +
65     *                              'id' => array( +
66     *                                  'type' => 'integer', +
67     *                                  'unsigned' => 1 +
68     *                                  'notnull' => 1 +
69     *                                  'default' => 0 +
70     *                              ), +
71     *                              'name' => array( +
72     *                                  'type' => 'text', +
73     *                                  'length' => 12 +
74     *                              ), +
75     *                              'password' => array( +
76     *                                  'type' => 'text', +
77     *                                  'length' => 12 +
78     *                              ) +
79     *                          ); +
80     * @param array $options  An associative array of table options: +
81     *                          array( +
82     *                              'comment' => 'Foo', +
83     *                              'charset' => 'utf8', +
84     *                              'collate' => 'utf8_unicode_ci', +
85     *                              'type'    => 'innodb', +
86     *                          ); +
87     * +
88     * @return void +
89     */ +
90    public function createTableSql($name, array $fields, array $options = array())  +
91    { +
92        if ( ! $name) +
93            throw new Doctrine_Export_Exception('no valid table name specified'); +
94 +
95        if (empty($fields)) { +
96            throw new Doctrine_Export_Exception('no fields specified for table "'.$name.'"'); +
97        } +
98        $queryFields = $this->getFieldDeclarationList($fields); +
99         +
100        // build indexes for all foreign key fields (needed in MySQL!!) +
101        if (isset($options['foreignKeys'])) { +
102            foreach ($options['foreignKeys'] as $fk) { +
103                $local = $fk['local']; +
104                $found = false; +
105                if (isset($options['indexes'])) { +
106                    foreach ($options['indexes'] as $definition) { +
107                        if (is_string($definition['fields'])) { +
108                            // Check if index already exists on the column                             +
109                            $found = ($local == $definition['fields']);                         +
110                        } else if (in_array($local, $definition['fields']) && count($definition['fields']) === 1) { +
111                            // Index already exists on the column +
112                            $found = true; +
113                        } +
114                    } +
115                } +
116                if (isset($options['primary']) && !empty($options['primary']) && +
117                        in_array($local, $options['primary'])) { +
118                    // field is part of the PK and therefore already indexed +
119                    $found = true; +
120                } +
121                 +
122                if ( ! $found) { +
123                    $options['indexes'][$local] = array('fields' => array($local => array())); +
124                } +
125            } +
126        } +
127 +
128        // add all indexes +
129        if (isset($options['indexes']) && ! empty($options['indexes'])) { +
130            foreach($options['indexes'] as $index => $definition) { +
131                $queryFields .= ', ' . $this->getIndexDeclaration($index, $definition); +
132            } +
133        } +
134 +
135        // attach all primary keys +
136        if (isset($options['primary']) && ! empty($options['primary'])) { +
137            $keyColumns = array_values($options['primary']); +
138            $keyColumns = array_map(array($this->conn, 'quoteIdentifier'), $keyColumns); +
139            $queryFields .= ', PRIMARY KEY(' . implode(', ', $keyColumns) . ')'; +
140        } +
141 +
142        $query = 'CREATE TABLE ' . $this->conn->quoteIdentifier($name, true) . ' (' . $queryFields . ')'; +
143 +
144        $optionStrings = array(); +
145 +
146        if (isset($options['comment'])) { +
147            $optionStrings['comment'] = 'COMMENT = ' . $this->dbh->quote($options['comment'], 'text'); +
148        } +
149        if (isset($options['charset'])) { +
150            $optionStrings['charset'] = 'DEFAULT CHARACTER SET ' . $options['charset']; +
151            if (isset($options['collate'])) { +
152                $optionStrings['charset'] .= ' COLLATE ' . $options['collate']; +
153            } +
154        } +
155 +
156        $type = false; +
157 +
158        // get the type of the table +
159        if (isset($options['type'])) { +
160            $type = $options['type']; +
161        } else { +
162            $type = $this->conn->getAttribute(Doctrine::ATTR_DEFAULT_TABLE_TYPE); +
163        } +
164 +
165        if ($type) { +
166            $optionStrings[] = 'ENGINE = ' . $type; +
167        } +
168 +
169        if ( ! empty($optionStrings)) { +
170            $query.= ' '.implode(' ', $optionStrings); +
171        } +
172        $sql[] = $query; +
173 +
174        if (isset($options['foreignKeys'])) { +
175 +
176            foreach ((array) $options['foreignKeys'] as $k => $definition) { +
177                if (is_array($definition)) { +
178                    $sql[] = $this->createForeignKeySql($name, $definition); +
179                } +
180            } +
181        }    +
182        return $sql; +
183    } +
184    /** +
185     * alter an existing table +
186     * +
187     * @param string $name         name of the table that is intended to be changed. +
188     * @param array $changes     associative array that contains the details of each type +
189     *                             of change that is intended to be performed. The types of +
190     *                             changes that are currently supported are defined as follows: +
191     * +
192     *                             name +
193     * +
194     *                                New name for the table. +
195     * +
196     *                            add +
197     * +
198     *                                Associative array with the names of fields to be added as +
199     *                                 indexes of the array. The value of each entry of the array +
200     *                                 should be set to another associative array with the properties +
201     *                                 of the fields to be added. The properties of the fields should +
202     *                                 be the same as defined by the Metabase parser. +
203     * +
204     * +
205     *                            remove +
206     * +
207     *                                Associative array with the names of fields to be removed as indexes +
208     *                                 of the array. Currently the values assigned to each entry are ignored. +
209     *                                 An empty array should be used for future compatibility. +
210     * +
211     *                            rename +
212     * +
213     *                                Associative array with the names of fields to be renamed as indexes +
214     *                                 of the array. The value of each entry of the array should be set to +
215     *                                 another associative array with the entry named name with the new +
216     *                                 field name and the entry named Declaration that is expected to contain +
217     *                                 the portion of the field declaration already in DBMS specific SQL code +
218     *                                 as it is used in the CREATE TABLE statement. +
219     * +
220     *                            change +
221     * +
222     *                                Associative array with the names of the fields to be changed as indexes +
223     *                                 of the array. Keep in mind that if it is intended to change either the +
224     *                                 name of a field and any other properties, the change array entries +
225     *                                 should have the new names of the fields as array indexes. +
226     * +
227     *                                The value of each entry of the array should be set to another associative +
228     *                                 array with the properties of the fields to that are meant to be changed as +
229     *                                 array entries. These entries should be assigned to the new values of the +
230     *                                 respective properties. The properties of the fields should be the same +
231     *                                 as defined by the Metabase parser. +
232     * +
233     *                            Example +
234     *                                array( +
235     *                                    'name' => 'userlist', +
236     *                                    'add' => array( +
237     *                                        'quota' => array( +
238     *                                            'type' => 'integer', +
239     *                                            'unsigned' => 1 +
240     *                                        ) +
241     *                                    ), +
242     *                                    'remove' => array( +
243     *                                        'file_limit' => array(), +
244     *                                        'time_limit' => array() +
245     *                                    ), +
246     *                                    'change' => array( +
247     *                                        'name' => array( +
248     *                                            'length' => '20', +
249     *                                            'definition' => array( +
250     *                                                'type' => 'text', +
251     *                                                'length' => 20, +
252     *                                            ), +
253     *                                        ) +
254     *                                    ), +
255     *                                    'rename' => array( +
256     *                                        'sex' => array( +
257     *                                            'name' => 'gender', +
258     *                                            'definition' => array( +
259     *                                                'type' => 'text', +
260     *                                                'length' => 1, +
261     *                                                'default' => 'M', +
262     *                                            ), +
263     *                                        ) +
264     *                                    ) +
265     *                                ) +
266     * +
267     * @param boolean $check     indicates whether the function should just check if the DBMS driver +
268     *                           can perform the requested table alterations if the value is true or +
269     *                           actually perform them otherwise. +
270     * @return boolean +
271     */ +
272    public function alterTableSql($name, array $changes, $check = false) +
273    { +
274        if ( ! $name) { +
275            throw new Doctrine_Export_Exception('no valid table name specified'); +
276        } +
277        foreach ($changes as $changeName => $change) { +
278            switch ($changeName) { +
279                case 'add': +
280                case 'remove': +
281                case 'change': +
282                case 'rename': +
283                case 'name': +
284                    break; +
285                default: +
286                    throw new Doctrine_Export_Exception('change type "' . $changeName . '" not yet supported'); +
287            } +
288        } +
289 +
290        if ($check) { +
291            return true; +
292        } +
293 +
294        $query = ''; +
295        if ( ! empty($changes['name'])) { +
296            $change_name = $this->conn->quoteIdentifier($changes['name']); +
297            $query .= 'RENAME TO ' . $change_name; +
298        } +
299 +
300        if ( ! empty($changes['add']) && is_array($changes['add'])) { +
301            foreach ($changes['add'] as $fieldName => $field) { +
302                if ($query) { +
303                    $query.= ', '; +
304                } +
305                $query.= 'ADD ' . $this->getDeclaration($field['type'], $fieldName, $field); +
306            } +
307        } +
308 +
309        if ( ! empty($changes['remove']) && is_array($changes['remove'])) { +
310            foreach ($changes['remove'] as $fieldName => $field) { +
311                if ($query) { +
312                    $query .= ', '; +
313                } +
314                $fieldName = $this->conn->quoteIdentifier($fieldName); +
315                $query .= 'DROP ' . $fieldName; +
316            } +
317        } +
318 +
319        $rename = array(); +
320        if ( ! empty($changes['rename']) && is_array($changes['rename'])) { +
321            foreach ($changes['rename'] as $fieldName => $field) { +
322                $rename[$field['name']] = $fieldName; +
323            } +
324        } +
325 +
326        if ( ! empty($changes['change']) && is_array($changes['change'])) { +
327            foreach ($changes['change'] as $fieldName => $field) { +
328                if ($query) { +
329                    $query.= ', '; +
330                } +
331                if (isset($rename[$fieldName])) { +
332                    $oldFieldName = $rename[$fieldName]; +
333                    unset($rename[$fieldName]); +
334                } else { +
335                    $oldFieldName = $fieldName; +
336                } +
337                $oldFieldName = $this->conn->quoteIdentifier($oldFieldName, true); +
338                $query .= 'CHANGE ' . $oldFieldName . ' '  +
339                        . $this->getDeclaration($field['definition']['type'], $fieldName, $field['definition']); +
340            } +
341        } +
342 +
343        if ( ! empty($rename) && is_array($rename)) { +
344            foreach ($rename as $renameName => $renamedField) { +
345                if ($query) { +
346                    $query.= ', '; +
347                } +
348                $field = $changes['rename'][$renamedField]; +
349                $renamedField = $this->conn->quoteIdentifier($renamedField, true); +
350                $query .= 'CHANGE ' . $renamedField . ' ' +
351                        . $this->getDeclaration($field['definition']['type'], $field['name'], $field['definition']); +
352            } +
353        } +
354 +
355        if ( ! $query) { +
356            return false; +
357        } +
358 +
359        $name = $this->conn->quoteIdentifier($name, true); +
360         +
361        return 'ALTER TABLE ' . $name . ' ' . $query; +
362    } +
363    /** +
364     * create sequence +
365     * +
366     * @param string    $sequenceName name of the sequence to be created +
367     * @param string    $start        start value of the sequence; default is 1 +
368     * @param array     $options  An associative array of table options: +
369     *                          array( +
370     *                              'comment' => 'Foo', +
371     *                              'charset' => 'utf8', +
372     *                              'collate' => 'utf8_unicode_ci', +
373     *                              'type'    => 'innodb', +
374     *                          ); +
375     * @return boolean +
376     */ +
377    public function createSequence($sequenceName, $start = 1, array $options = array()) +
378    { +
379        $sequenceName   = $this->conn->quoteIdentifier($this->conn->getSequenceName($sequenceName), true); +
380        $seqcolName     = $this->conn->quoteIdentifier($this->conn->getAttribute(Doctrine::ATTR_SEQCOL_NAME), true); +
381 +
382        $optionsStrings = array(); +
383 +
384        if (isset($options['comment']) && ! empty($options['comment'])) { +
385            $optionsStrings['comment'] = 'COMMENT = ' . $this->conn->quote($options['comment'], 'string'); +
386        } +
387 +
388        if (isset($options['charset']) && ! empty($options['charset'])) { +
389            $optionsStrings['charset'] = 'DEFAULT CHARACTER SET ' . $options['charset']; +
390 +
391            if (isset($options['collate'])) { +
392                $optionsStrings['collate'] .= ' COLLATE ' . $options['collate']; +
393            } +
394        } +
395 +
396        $type = false; +
397 +
398        if (isset($options['type'])) { +
399            $type = $options['type']; +
400        } else { +
401            $type = $this->conn->default_table_type; +
402        } +
403        if ($type) { +
404            $optionsStrings[] = 'ENGINE = ' . $type; +
405        } +
406 +
407 +
408        try { +
409            $query  = 'CREATE TABLE ' . $sequenceName +
410                    . ' (' . $seqcolName . ' INT NOT NULL AUTO_INCREMENT, PRIMARY KEY (' +
411                    . $seqcolName . '))' +
412                    . strlen($this->conn->default_table_type) ? ' TYPE = ' +
413                    . $this->conn->default_table_type : ''; +
414 +
415            $res    = $this->conn->exec($query); +
416        } catch(Doctrine_Connection_Exception $e) { +
417            throw new Doctrine_Export_Exception('could not create sequence table'); +
418        } +
419 +
420        if ($start == 1) +
421            return true; +
422 +
423        $query  = 'INSERT INTO ' . $sequenceName +
424                . ' (' . $seqcolName . ') VALUES (' . ($start - 1) . ')'; +
425 +
426        $res    = $this->conn->exec($query); +
427 +
428        // Handle error +
429        try { +
430            $result = $this->conn->exec('DROP TABLE ' . $sequenceName); +
431        } catch(Doctrine_Connection_Exception $e) { +
432            throw new Doctrine_Export_Exception('could not drop inconsistent sequence table'); +
433        } +
434 +
435 +
436    } +
437    /** +
438     * Get the stucture of a field into an array +
439     * +
440     * @author Leoncx +
441     * @param string    $table         name of the table on which the index is to be created +
442     * @param string    $name          name of the index to be created +
443     * @param array     $definition    associative array that defines properties of the index to be created. +
444     *                                 Currently, only one property named FIELDS is supported. This property +
445     *                                 is also an associative with the names of the index fields as array +
446     *                                 indexes. Each entry of this array is set to another type of associative +
447     *                                 array that specifies properties of the index that are specific to +
448     *                                 each field. +
449     * +
450     *                                 Currently, only the sorting property is supported. It should be used +
451     *                                 to define the sorting direction of the index. It may be set to either +
452     *                                 ascending or descending. +
453     * +
454     *                                 Not all DBMS support index sorting direction configuration. The DBMS +
455     *                                 drivers of those that do not support it ignore this property. Use the +
456     *                                 function supports() to determine whether the DBMS driver can manage indexes. +
457     * +
458     *                                 Example +
459     *                                    array( +
460     *                                        'fields' => array( +
461     *                                            'user_name' => array( +
462     *                                                'sorting' => 'ASC' +
463     *                                                'length' => 10 +
464     *                                            ), +
465     *                                            'last_login' => array() +
466     *                                        ) +
467     *                                    ) +
468     * @throws PDOException +
469     * @return void +
470     */ +
471    public function createIndexSql($table, $name, array $definition) +
472    { +
473        $table  = $table; +
474        $name   = $this->conn->getIndexName($name); +
475        $name   = $this->conn->quoteIdentifier($name); +
476        $type   = ''; +
477        if (isset($definition['type'])) { +
478            switch (strtolower($definition['type'])) { +
479                case 'fulltext': +
480                case 'unique': +
481                    $type = strtoupper($definition['type']) . ' '; +
482                break; +
483                default: +
484                    throw new Doctrine_Export_Exception('Unknown index type ' . $definition['type']); +
485            } +
486        } +
487        $query  = 'CREATE ' . $type . 'INDEX ' . $name . ' ON ' . $table; +
488        $query .= ' (' . $this->getIndexFieldDeclarationList() . ')'; +
489 +
490        return $query; +
491    } +
492    /**  +
493     * getDefaultDeclaration +
494     * Obtain DBMS specific SQL code portion needed to set a default value +
495     * declaration to be used in statements like CREATE TABLE. +
496     * +
497     * @param array $field      field definition array +
498     * @return string           DBMS specific SQL code portion needed to set a default value +
499     */ +
500    public function getDefaultFieldDeclaration($field) +
501    { +
502        $default = ''; +
503        if (isset($field['default']) && $field['length'] <= 255) { +
504            if ($field['default'] === '') { +
505                $field['default'] = empty($field['notnull']) +
506                    ? null : $this->valid_default_values[$field['type']]; +
507 +
508                if ($field['default'] === '' +
509                    && ($this->conn->getAttribute(Doctrine::ATTR_PORTABILITY) & Doctrine::PORTABILITY_EMPTY_TO_NULL) +
510                ) { +
511                    $field['default'] = ' '; +
512                } +
513            } +
514     +
515            $default = ' DEFAULT ' . $this->conn->quote($field['default'], $field['type']); +
516        } +
517        return $default; +
518    } +
519    /** +
520     * Obtain DBMS specific SQL code portion needed to set an index  +
521     * declaration to be used in statements like CREATE TABLE. +
522     * +
523     * @param string $charset       name of the index +
524     * @param array $definition     index definition +
525     * @return string  DBMS specific SQL code portion needed to set an index +
526     */ +
527    public function getIndexDeclaration($name, array $definition) +
528    { +
529        $name   = $this->conn->formatter->getIndexName($name); +
530        $type   = ''; +
531        if (isset($definition['type'])) { +
532            switch (strtolower($definition['type'])) { +
533                case 'fulltext': +
534                case 'unique': +
535                    $type = strtoupper($definition['type']) . ' '; +
536                break; +
537                default: +
538                    throw new Doctrine_Export_Exception('Unknown index type ' . $definition['type']); +
539            } +
540        } +
541         +
542        if ( ! isset($definition['fields'])) { +
543            throw new Doctrine_Export_Exception('No index columns given.'); +
544        } +
545        if ( ! is_array($definition['fields'])) { +
546            $definition['fields'] = array($definition['fields']); +
547        } +
548 +
549        $query = $type . 'INDEX ' . $this->conn->quoteIdentifier($name); +
550 +
551        $query .= ' (' . $this->getIndexFieldDeclarationList($definition['fields']) . ')'; +
552         +
553        return $query; +
554    } +
555    /** +
556     * getIndexFieldDeclarationList +
557     * Obtain DBMS specific SQL code portion needed to set an index +
558     * declaration to be used in statements like CREATE TABLE. +
559     * +
560     * @return string +
561     */ +
562    public function getIndexFieldDeclarationList(array $fields) +
563    { +
564        $declFields = array(); +
565 +
566        foreach ($fields as $fieldName => $field) { +
567            $fieldString = $this->conn->quoteIdentifier($fieldName); +
568 +
569            if (is_array($field)) { +
570                if (isset($field['length'])) { +
571                    $fieldString .= '(' . $field['length'] . ')'; +
572                } +
573 +
574                if (isset($field['sorting'])) { +
575                    $sort = strtoupper($field['sorting']); +
576                    switch ($sort) { +
577                        case 'ASC': +
578                        case 'DESC': +
579                            $fieldString .= ' ' . $sort; +
580                            break; +
581                        default: +
582                            throw new Doctrine_Export_Exception('Unknown index sorting option given.'); +
583                    } +
584                } +
585            } else { +
586                $fieldString = $this->conn->quoteIdentifier($field); +
587            } +
588            $declFields[] = $fieldString; +
589        } +
590        return implode(', ', $declFields); +
591    } +
592    /** +
593     * getAdvancedForeignKeyOptions +
594     * Return the FOREIGN KEY query section dealing with non-standard options +
595     * as MATCH, INITIALLY DEFERRED, ON UPDATE, ... +
596     * +
597     * @param array $definition +
598     * @return string +
599     */ +
600    public function getAdvancedForeignKeyOptions(array $definition) +
601    { +
602        $query = ''; +
603        if ( ! empty($definition['match'])) { +
604            $query .= ' MATCH ' . $definition['match']; +
605        } +
606        if ( ! empty($definition['onUpdate'])) { +
607            $query .= ' ON UPDATE ' . $this->getForeignKeyReferentialAction($definition['onUpdate']); +
608        } +
609        if ( ! empty($definition['onDelete'])) { +
610            $query .= ' ON DELETE ' . $this->getForeignKeyReferentialAction($definition['onDelete']); +
611        } +
612        return $query; +
613    } +
614    /** +
615     * drop existing index +
616     * +
617     * @param string    $table          name of table that should be used in method +
618     * @param string    $name           name of the index to be dropped +
619     * @return void +
620     */ +
621    public function dropIndexSql($table, $name) +
622    { +
623        $table  = $this->conn->quoteIdentifier($table, true); +
624        $name   = $this->conn->quoteIdentifier($this->conn->formatter->getIndexName($name), true); +
625        return 'DROP INDEX ' . $name . ' ON ' . $table; +
626    } +
627    /** +
628     * dropTable +
629     * +
630     * @param string    $table          name of table that should be dropped from the database +
631     * @throws PDOException +
632     * @return void +
633     */ +
634    public function dropTableSql($table) +
635    { +
636        $table  = $this->conn->quoteIdentifier($table, true); +
637        return 'DROP TABLE ' . $table; +
638    } +
639}
\ No newline at end of file diff --git a/tests/coverage/Doctrine_Export_Oracle.html b/tests/coverage/Doctrine_Export_Oracle.html new file mode 100644 index 000000000..8086ea93c --- /dev/null +++ b/tests/coverage/Doctrine_Export_Oracle.html @@ -0,0 +1,1490 @@ + + + Coverage for Doctrine_Export_Oracle + + +

Coverage for Doctrine_Export_Oracle

Back to coverage report

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
1<?php +
2/* +
3 *  $Id: Oracle.php 2702 2007-10-03 21:43:22Z Jonathan.Wage $ +
4 * +
5 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +
6 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +
7 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +
8 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +
9 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +
10 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +
11 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +
12 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +
13 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +
14 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +
15 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +
16 * +
17 * This software consists of voluntary contributions made by many individuals +
18 * and is licensed under the LGPL. For more information, see +
19 * <http://www.phpdoctrine.com>. +
20 */ +
21Doctrine::autoload('Doctrine_Export'); +
22/** +
23 * Doctrine_Export_Oracle +
24 * +
25 * @package     Doctrine +
26 * @subpackage  Export +
27 * @author      Konsta Vesterinen <kvesteri@cc.hut.fi> +
28 * @author      Lukas Smith <smith@pooteeweet.org> (PEAR MDB2 library) +
29 * @license     http://www.opensource.org/licenses/lgpl-license.php LGPL +
30 * @link        www.phpdoctrine.com +
31 * @since       1.0 +
32 * @version     $Revision: 2702 $ +
33 */ +
34class Doctrine_Export_Oracle extends Doctrine_Export +
35{ +
36    /** +
37     * create a new database +
38     * +
39     * @param object $db database object that is extended by this class +
40     * @param string $name name of the database that should be created +
41     * @return mixed MDB2_OK on success, a MDB2 error on failure +
42     * @access public +
43     */ +
44    public function createDatabase($name) +
45    { +
46        if ( ! $this->conn->getAttribute(Doctrine::ATTR_EMULATE_DATABASE)) +
47            throw new Doctrine_Export_Exception('database creation is only supported if the "emulate_database" attribute is enabled'); +
48 +
49        $username   = sprintf($this->conn->getAttribute(Doctrine::ATTR_DB_NAME_FORMAT), $name); +
50        $password   = $this->conn->dsn['password'] ? $this->conn->dsn['password'] : $name; +
51 +
52        $tablespace = $this->conn->getAttribute(Doctrine::ATTR_DB_NAME_FORMAT) +
53                    ? ' DEFAULT TABLESPACE '.$this->conn->options['default_tablespace'] : ''; +
54 +
55        $query  = 'CREATE USER ' . $username . ' IDENTIFIED BY ' . $password . $tablespace; +
56        $result = $this->conn->exec($query); +
57 +
58        try { +
59            $query = 'GRANT CREATE SESSION, CREATE TABLE, UNLIMITED TABLESPACE, CREATE SEQUENCE, CREATE TRIGGER TO ' . $username; +
60            $result = $this->conn->exec($query); +
61        } catch (Exception $e) { +
62            $query = 'DROP USER '.$username.' CASCADE'; +
63            $result2 = $this->conn->exec($query); +
64        } +
65        return true; +
66    } +
67    /** +
68     * drop an existing database +
69     * +
70     * @param object $this->conn database object that is extended by this class +
71     * @param string $name name of the database that should be dropped +
72     * @return mixed MDB2_OK on success, a MDB2 error on failure +
73     * @access public +
74     */ +
75    public function dropDatabase($name) +
76    { +
77        if ( ! $this->conn->getAttribute(Doctrine::ATTR_EMULATE_DATABASE)) +
78            throw new Doctrine_Export_Exception('database dropping is only supported if the +
79                                                       "emulate_database" option is enabled'); +
80 +
81        $username = sprintf($this->conn->getAttribute(Doctrine::ATTR_DB_NAME_FORMAT), $name); +
82 +
83        return $this->conn->exec('DROP USER ' . $username . ' CASCADE'); +
84    } +
85    /** +
86     * add an autoincrement sequence + trigger +
87     * +
88     * @param string $name  name of the PK field +
89     * @param string $table name of the table +
90     * @param string $start start value for the sequence +
91     * @return mixed        MDB2_OK on success, a MDB2 error on failure +
92     * @access private +
93     */ +
94    public function _makeAutoincrement($name, $table, $start = 1) +
95    { +
96        $sql   = array(); +
97        $table = strtoupper($table); +
98        $indexName  = $table . '_AI_PK'; +
99        $definition = array( +
100            'primary' => true, +
101            'fields' => array($name => true), +
102        ); +
103 +
104        $sql[] = $this->createConstraintSql($table, $indexName, $definition); +
105 +
106        if (is_null($start)) { +
107            $query = 'SELECT MAX(' . $this->conn->quoteIdentifier($name, true) . ') FROM ' . $this->conn->quoteIdentifier($table, true); +
108            $start = $this->conn->fetchOne($query); +
109 +
110            ++$start; +
111        } +
112 +
113        $sql[] = $this->createSequenceSql($table, $start); +
114 +
115        $sequenceName = $this->conn->formatter->getSequenceName($table); +
116        $triggerName  = $this->conn->quoteIdentifier($table . '_AI_PK', true); +
117        $table = $this->conn->quoteIdentifier($table, true); +
118        $name  = $this->conn->quoteIdentifier($name, true); +
119        $sql[] = 'CREATE TRIGGER ' . $triggerName . ' +
120   BEFORE INSERT +
121   ON '.$table.' +
122   FOR EACH ROW +
123DECLARE +
124   last_Sequence NUMBER; +
125   last_InsertID NUMBER; +
126BEGIN +
127   SELECT '.$sequenceName.'.NEXTVAL INTO :NEW.'.$name.' FROM DUAL; +
128   IF (:NEW.'.$name.' IS NULL OR :NEW.'.$name.' = 0) THEN +
129      SELECT '.$sequenceName.'.NEXTVAL INTO :NEW.'.$name.' FROM DUAL; +
130   ELSE +
131      SELECT NVL(Last_Number, 0) INTO last_Sequence +
132        FROM User_Sequences +
133       WHERE UPPER(Sequence_Name) = UPPER(\''.$sequenceName.'\'); +
134      SELECT :NEW.id INTO last_InsertID FROM DUAL; +
135      WHILE (last_InsertID > last_Sequence) LOOP +
136         SELECT ' . $sequenceName . '.NEXTVAL INTO last_Sequence FROM DUAL; +
137      END LOOP; +
138   END IF; +
139END; +
140'; +
141        return $sql; +
142    } +
143    /** +
144     * drop an existing autoincrement sequence + trigger +
145     * +
146     * @param string $table name of the table +
147     * @return void +
148     */ +
149    public function dropAutoincrement($table) +
150    { +
151        $table = strtoupper($table); +
152        $triggerName = $table . '_AI_PK'; +
153        $trigger_name_quoted = $this->conn->quote($triggerName); +
154        $query = 'SELECT trigger_name FROM user_triggers'; +
155        $query.= ' WHERE trigger_name='.$trigger_name_quoted.' OR trigger_name='.strtoupper($trigger_name_quoted); +
156        $trigger = $this->conn->fetchOne($query); +
157 +
158        if ($trigger) { +
159            $trigger_name  = $this->conn->quoteIdentifier($table . '_AI_PK', true); +
160            $trigger_sql = 'DROP TRIGGER ' . $trigger_name; +
161 +
162            // if throws exception, trigger for autoincrement PK could not be dropped +
163            $this->conn->exec($trigger_sql); +
164 +
165            // if throws exception, sequence for autoincrement PK could not be dropped +
166            $this->dropSequence($table); +
167 +
168            $indexName = $table . '_AI_PK'; +
169 +
170            // if throws exception, primary key for autoincrement PK could not be dropped +
171            $this->dropConstraint($table, $indexName); +
172        } +
173    } +
174   /** +
175     * A method to return the required SQL string that fits between CREATE ... TABLE +
176     * to create the table as a temporary table. +
177     * +
178     * @return string The string required to be placed between "CREATE" and "TABLE" +
179     *                to generate a temporary table, if possible. +
180     */ +
181    public function getTemporaryTableQuery() +
182    { +
183        return 'GLOBAL TEMPORARY'; +
184    } +
185    /** +
186     * getAdvancedForeignKeyOptions +
187     * Return the FOREIGN KEY query section dealing with non-standard options +
188     * as MATCH, INITIALLY DEFERRED, ON UPDATE, ... +
189     * +
190     * @param array $definition         foreign key definition +
191     * @return string +
192     * @access protected +
193     */ +
194    public function getAdvancedForeignKeyOptions(array $definition) +
195    { +
196        $query = ''; +
197        if (isset($definition['onDelete'])) { +
198            $query .= ' ON DELETE ' . $definition['onDelete']; +
199        } +
200        if (isset($definition['deferrable'])) { +
201            $query .= ' DEFERRABLE'; +
202        } else { +
203            $query .= ' NOT DEFERRABLE'; +
204        } +
205        if (isset($definition['feferred'])) { +
206            $query .= ' INITIALLY DEFERRED'; +
207        } else { +
208            $query .= ' INITIALLY IMMEDIATE'; +
209        } +
210        return $query; +
211    } +
212 +
213    /** +
214     * create a new table +
215     * +
216     * @param string $name     Name of the database that should be created +
217     * @param array $fields Associative array that contains the definition of each field of the new table +
218     *                        The indexes of the array entries are the names of the fields of the table an +
219     *                        the array entry values are associative arrays like those that are meant to be +
220     *                         passed with the field definitions to get[Type]Declaration() functions. +
221     * +
222     *                        Example +
223     *                        array( +
224     * +
225     *                            'id' => array( +
226     *                                'type' => 'integer', +
227     *                                'unsigned' => 1 +
228     *                                'notnull' => 1 +
229     *                                'default' => 0 +
230     *                            ), +
231     *                            'name' => array( +
232     *                                'type' => 'text', +
233     *                                'length' => 12 +
234     *                            ), +
235     *                            'password' => array( +
236     *                                'type' => 'text', +
237     *                                'length' => 12 +
238     *                            ) +
239     *                        ); +
240     * @param array $options  An associative array of table options: +
241     * +
242     * @return void +
243     */ +
244    public function createTable($name, array $fields, array $options = array()) +
245    { +
246        $this->conn->beginTransaction(); +
247 +
248        foreach ($this->createTableSql($name, $fields, $options) as $sql) { +
249            $this->conn->exec($sql); +
250        } +
251 +
252        $this->conn->commit(); +
253    } +
254 +
255    /** +
256     * create a new table +
257     * +
258     * @param string $name     Name of the database that should be created +
259     * @param array $fields Associative array that contains the definition of each field of the new table +
260     *                        The indexes of the array entries are the names of the fields of the table an +
261     *                        the array entry values are associative arrays like those that are meant to be +
262     *                         passed with the field definitions to get[Type]Declaration() functions. +
263     * +
264     *                        Example +
265     *                        array( +
266     * +
267     *                            'id' => array( +
268     *                                'type' => 'integer', +
269     *                                'unsigned' => 1 +
270     *                                'notnull' => 1 +
271     *                                'default' => 0 +
272     *                            ), +
273     *                            'name' => array( +
274     *                                'type' => 'text', +
275     *                                'length' => 12 +
276     *                            ), +
277     *                            'password' => array( +
278     *                                'type' => 'text', +
279     *                                'length' => 12 +
280     *                            ) +
281     *                        ); +
282     * @param array $options  An associative array of table options: +
283     * +
284     * @return void +
285     */ +
286    public function createTableSql($name, array $fields, array $options = array()) +
287    { +
288        $sql = parent::createTableSql($name, $fields, $options); +
289 +
290        foreach ($fields as $fieldName => $field) { +
291            if (isset($field['autoincrement']) && $field['autoincrement'] || +
292               (isset($field['autoinc']) && $fields['autoinc'])) {            +
293                $sql = array_merge($sql, $this->_makeAutoincrement($fieldName, $name)); +
294            } +
295        } +
296 +
297        return $sql; +
298    } +
299    /** +
300     * drop an existing table +
301     * +
302     * @param string $name name of the table that should be dropped +
303     * @return void +
304     */ +
305    public function dropTable($name) +
306    { +
307        //$this->conn->beginNestedTransaction(); +
308        $result = $this->dropAutoincrement($name); +
309        $result = parent::dropTable($name); +
310        //$this->conn->completeNestedTransaction(); +
311        return $result; +
312    } +
313    /** +
314     * alter an existing table +
315     * +
316     * @param string $name         name of the table that is intended to be changed. +
317     * @param array $changes     associative array that contains the details of each type +
318     *                             of change that is intended to be performed. The types of +
319     *                             changes that are currently supported are defined as follows: +
320     * +
321     *                             name +
322     * +
323     *                                New name for the table. +
324     * +
325     *                            add +
326     * +
327     *                                Associative array with the names of fields to be added as +
328     *                                 indexes of the array. The value of each entry of the array +
329     *                                 should be set to another associative array with the properties +
330     *                                 of the fields to be added. The properties of the fields should +
331     *                                 be the same as defined by the MDB2 parser. +
332     * +
333     * +
334     *                            remove +
335     * +
336     *                                Associative array with the names of fields to be removed as indexes +
337     *                                 of the array. Currently the values assigned to each entry are ignored. +
338     *                                 An empty array should be used for future compatibility. +
339     * +
340     *                            rename +
341     * +
342     *                                Associative array with the names of fields to be renamed as indexes +
343     *                                 of the array. The value of each entry of the array should be set to +
344     *                                 another associative array with the entry named name with the new +
345     *                                 field name and the entry named Declaration that is expected to contain +
346     *                                 the portion of the field declaration already in DBMS specific SQL code +
347     *                                 as it is used in the CREATE TABLE statement. +
348     * +
349     *                            change +
350     * +
351     *                                Associative array with the names of the fields to be changed as indexes +
352     *                                 of the array. Keep in mind that if it is intended to change either the +
353     *                                 name of a field and any other properties, the change array entries +
354     *                                 should have the new names of the fields as array indexes. +
355     * +
356     *                                The value of each entry of the array should be set to another associative +
357     *                                 array with the properties of the fields to that are meant to be changed as +
358     *                                 array entries. These entries should be assigned to the new values of the +
359     *                                 respective properties. The properties of the fields should be the same +
360     *                                 as defined by the MDB2 parser. +
361     * +
362     *                            Example +
363     *                                array( +
364     *                                    'name' => 'userlist', +
365     *                                    'add' => array( +
366     *                                        'quota' => array( +
367     *                                            'type' => 'integer', +
368     *                                            'unsigned' => 1 +
369     *                                        ) +
370     *                                    ), +
371     *                                    'remove' => array( +
372     *                                        'file_limit' => array(), +
373     *                                        'time_limit' => array() +
374     *                                    ), +
375     *                                    'change' => array( +
376     *                                        'name' => array( +
377     *                                            'length' => '20', +
378     *                                            'definition' => array( +
379     *                                                'type' => 'text', +
380     *                                                'length' => 20, +
381     *                                            ), +
382     *                                        ) +
383     *                                    ), +
384     *                                    'rename' => array( +
385     *                                        'sex' => array( +
386     *                                            'name' => 'gender', +
387     *                                            'definition' => array( +
388     *                                                'type' => 'text', +
389     *                                                'length' => 1, +
390     *                                                'default' => 'M', +
391     *                                            ), +
392     *                                        ) +
393     *                                    ) +
394     *                                ) +
395     * +
396     * @param boolean $check     indicates whether the function should just check if the DBMS driver +
397     *                             can perform the requested table alterations if the value is true or +
398     *                             actually perform them otherwise. +
399     * @return void +
400     */ +
401    public function alterTable($name, array $changes, $check = false) +
402    { +
403 +
404        foreach ($changes as $changeName => $change) { +
405            switch ($changeName) { +
406                case 'add': +
407                case 'remove': +
408                case 'change': +
409                case 'name': +
410                case 'rename': +
411                    break; +
412                default: +
413                    throw new Doctrine_Export_Exception('change type "' . $changeName . '" not yet supported'); +
414            } +
415        } +
416 +
417        if ($check) { +
418            return false; +
419        } +
420 +
421        $name = $this->conn->quoteIdentifier($name, true); +
422 +
423        if ( ! empty($changes['add']) && is_array($changes['add'])) { +
424            $fields = array(); +
425            foreach ($changes['add'] as $fieldName => $field) { +
426                $fields[] = $this->conn->getDeclaration($field['type'], $fieldName, $field); +
427            } +
428            $result = $this->conn->exec('ALTER TABLE ' . $name . ' ADD (' . implode(', ', $fields) . ')'); +
429        } +
430 +
431        if ( ! empty($changes['change']) && is_array($changes['change'])) { +
432            $fields = array(); +
433            foreach ($changes['change'] as $fieldName => $field) { +
434                $fields[] = $fieldName. ' ' . $this->conn->getDeclaration($field['definition']['type'], '', $field['definition']); +
435            } +
436            $result = $this->conn->exec('ALTER TABLE ' . $name . ' MODIFY (' . implode(', ', $fields) . ')'); +
437        } +
438 +
439        if ( ! empty($changes['rename']) && is_array($changes['rename'])) { +
440            foreach ($changes['rename'] as $fieldName => $field) { +
441                $query = 'ALTER TABLE ' . $name . ' RENAME COLUMN ' . $this->conn->quoteIdentifier($fieldName, true) +
442                       . ' TO ' . $this->conn->quoteIdentifier($field['name']); +
443 +
444                $result = $this->conn->exec($query); +
445            } +
446        } +
447 +
448        if ( ! empty($changes['remove']) && is_array($changes['remove'])) { +
449            $fields = array(); +
450            foreach ($changes['remove'] as $fieldName => $field) { +
451                $fields[] = $this->conn->quoteIdentifier($fieldName, true); +
452            } +
453            $result = $this->conn->exec('ALTER TABLE ' . $name . ' DROP COLUMN ' . implode(', ', $fields)); +
454        } +
455 +
456        if ( ! empty($changes['name'])) { +
457            $changeName = $this->conn->quoteIdentifier($changes['name'], true); +
458            $result = $this->conn->exec('ALTER TABLE ' . $name . ' RENAME TO ' . $changeName); +
459        } +
460    } +
461    /** +
462     * create sequence +
463     * +
464     * @param string $seqName name of the sequence to be created +
465     * @param string $start start value of the sequence; default is 1 +
466     * @param array     $options  An associative array of table options: +
467     *                          array( +
468     *                              'comment' => 'Foo', +
469     *                              'charset' => 'utf8', +
470     *                              'collate' => 'utf8_unicode_ci', +
471     *                          ); +
472     * @return string +
473     */ +
474    public function createSequenceSql($seqName, $start = 1, array $options = array()) +
475    { +
476        $sequenceName = $this->conn->quoteIdentifier($this->conn->formatter->getSequenceName($seqName), true); +
477        $query  = 'CREATE SEQUENCE ' . $sequenceName . ' START WITH ' . $start . ' INCREMENT BY 1 NOCACHE'; +
478        $query .= ($start < 1 ? ' MINVALUE ' . $start : ''); +
479        return $query; +
480    } +
481    /** +
482     * drop existing sequence +
483     * +
484     * @param object $this->conn database object that is extended by this class +
485     * @param string $seqName name of the sequence to be dropped +
486     * @return string +
487     */ +
488    public function dropSequenceSql($seqName) +
489    { +
490        $sequenceName = $this->conn->quoteIdentifier($this->conn->formatter->getSequenceName($seqName), true); +
491        return 'DROP SEQUENCE ' . $sequenceName; +
492    } +
493}
\ No newline at end of file diff --git a/tests/coverage/Doctrine_Export_Pgsql.html b/tests/coverage/Doctrine_Export_Pgsql.html new file mode 100644 index 000000000..db3de4f7a --- /dev/null +++ b/tests/coverage/Doctrine_Export_Pgsql.html @@ -0,0 +1,1061 @@ + + + Coverage for Doctrine_Export_Pgsql + + +

Coverage for Doctrine_Export_Pgsql

Back to coverage report

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
1<?php +
2/* +
3 *  $Id: Pgsql.php 2702 2007-10-03 21:43:22Z Jonathan.Wage $ +
4 * +
5 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +
6 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +
7 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +
8 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +
9 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +
10 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +
11 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +
12 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +
13 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +
14 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +
15 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +
16 * +
17 * This software consists of voluntary contributions made by many individuals +
18 * and is licensed under the LGPL. For more information, see +
19 * <http://www.phpdoctrine.com>. +
20 */ +
21Doctrine::autoload('Doctrine_Export'); +
22/** +
23 * Doctrine_Export_Pgsql +
24 * +
25 * @package     Doctrine +
26 * @subpackage  Export +
27 * @author      Konsta Vesterinen <kvesteri@cc.hut.fi> +
28 * @author      Lukas Smith <smith@pooteeweet.org> (PEAR MDB2 library) +
29 * @license     http://www.opensource.org/licenses/lgpl-license.php LGPL +
30 * @link        www.phpdoctrine.com +
31 * @since       1.0 +
32 * @version     $Revision: 2702 $ +
33 */ +
34class Doctrine_Export_Pgsql extends Doctrine_Export +
35{ +
36   /** +
37     * create a new database +
38     * +
39     * @param string $name name of the database that should be created +
40     * @throws PDOException +
41     * @return void +
42     */ +
43    public function createDatabaseSql($name) +
44    { +
45        $query  = 'CREATE DATABASE ' . $this->conn->quoteIdentifier($name); +
46         +
47        return $query; +
48    } +
49    /** +
50     * drop an existing database +
51     * +
52     * @param string $name name of the database that should be dropped +
53     * @throws PDOException +
54     * @access public +
55     */ +
56    public function dropDatabaseSql($name) +
57    { +
58        $query  = 'DROP DATABASE ' . $this->conn->quoteIdentifier($name); +
59         +
60        return $query; +
61    } +
62    /** +
63     * getAdvancedForeignKeyOptions +
64     * Return the FOREIGN KEY query section dealing with non-standard options +
65     * as MATCH, INITIALLY DEFERRED, ON UPDATE, ... +
66     * +
67     * @param array $definition         foreign key definition +
68     * @return string +
69     * @access protected +
70     */ +
71    public function getAdvancedForeignKeyOptions(array $definition) +
72    { +
73        $query = ''; +
74        if (isset($definition['match'])) { +
75            $query .= ' MATCH ' . $definition['match']; +
76        } +
77        if (isset($definition['onUpdate'])) { +
78            $query .= ' ON UPDATE ' . $definition['onUpdate']; +
79        } +
80        if (isset($definition['onDelete'])) { +
81            $query .= ' ON DELETE ' . $definition['onDelete']; +
82        } +
83        if (isset($definition['deferrable'])) { +
84            $query .= ' DEFERRABLE'; +
85        } else { +
86            $query .= ' NOT DEFERRABLE'; +
87        } +
88        if (isset($definition['feferred'])) { +
89            $query .= ' INITIALLY DEFERRED'; +
90        } else { +
91            $query .= ' INITIALLY IMMEDIATE'; +
92        } +
93        return $query; +
94    } +
95 +
96    /** +
97     * alter an existing table +
98     * +
99     * @param string $name         name of the table that is intended to be changed. +
100     * @param array $changes     associative array that contains the details of each type +
101     *                             of change that is intended to be performed. The types of +
102     *                             changes that are currently supported are defined as follows: +
103     * +
104     *                             name +
105     * +
106     *                                New name for the table. +
107     * +
108     *                            add +
109     * +
110     *                                Associative array with the names of fields to be added as +
111     *                                 indexes of the array. The value of each entry of the array +
112     *                                 should be set to another associative array with the properties +
113     *                                 of the fields to be added. The properties of the fields should +
114     *                                 be the same as defined by the Metabase parser. +
115     * +
116     * +
117     *                            remove +
118     * +
119     *                                Associative array with the names of fields to be removed as indexes +
120     *                                 of the array. Currently the values assigned to each entry are ignored. +
121     *                                 An empty array should be used for future compatibility. +
122     * +
123     *                            rename +
124     * +
125     *                                Associative array with the names of fields to be renamed as indexes +
126     *                                 of the array. The value of each entry of the array should be set to +
127     *                                 another associative array with the entry named name with the new +
128     *                                 field name and the entry named Declaration that is expected to contain +
129     *                                 the portion of the field declaration already in DBMS specific SQL code +
130     *                                 as it is used in the CREATE TABLE statement. +
131     * +
132     *                            change +
133     * +
134     *                                Associative array with the names of the fields to be changed as indexes +
135     *                                 of the array. Keep in mind that if it is intended to change either the +
136     *                                 name of a field and any other properties, the change array entries +
137     *                                 should have the new names of the fields as array indexes. +
138     * +
139     *                                The value of each entry of the array should be set to another associative +
140     *                                 array with the properties of the fields to that are meant to be changed as +
141     *                                 array entries. These entries should be assigned to the new values of the +
142     *                                 respective properties. The properties of the fields should be the same +
143     *                                 as defined by the Metabase parser. +
144     * +
145     *                            Example +
146     *                                array( +
147     *                                    'name' => 'userlist', +
148     *                                    'add' => array( +
149     *                                        'quota' => array( +
150     *                                            'type' => 'integer', +
151     *                                            'unsigned' => 1 +
152     *                                        ) +
153     *                                    ), +
154     *                                    'remove' => array( +
155     *                                        'file_limit' => array(), +
156     *                                        'time_limit' => array() +
157     *                                    ), +
158     *                                    'change' => array( +
159     *                                        'name' => array( +
160     *                                            'length' => '20', +
161     *                                            'definition' => array( +
162     *                                                'type' => 'text', +
163     *                                                'length' => 20, +
164     *                                            ), +
165     *                                        ) +
166     *                                    ), +
167     *                                    'rename' => array( +
168     *                                        'sex' => array( +
169     *                                            'name' => 'gender', +
170     *                                            'definition' => array( +
171     *                                                'type' => 'text', +
172     *                                                'length' => 1, +
173     *                                                'default' => 'M', +
174     *                                            ), +
175     *                                        ) +
176     *                                    ) +
177     *                                ) +
178     * +
179     * @param boolean $check     indicates whether the function should just check if the DBMS driver +
180     *                             can perform the requested table alterations if the value is true or +
181     *                             actually perform them otherwise. +
182     * @throws Doctrine_Connection_Exception +
183     * @return boolean +
184     */ +
185    public function alterTable($name, array $changes, $check = false) +
186    { +
187        foreach ($changes as $changeName => $change) { +
188            switch ($changeName) { +
189                case 'add': +
190                case 'remove': +
191                case 'change': +
192                case 'name': +
193                case 'rename': +
194                    break; +
195                default: +
196                    throw new Doctrine_Export_Exception('change type "' . $changeName . '\" not yet supported'); +
197            } +
198        } +
199 +
200        if ($check) { +
201            return true; +
202        } +
203 +
204        if (isset($changes['add']) && is_array($changes['add'])) { +
205            foreach ($changes['add'] as $fieldName => $field) { +
206                $query = 'ADD ' . $this->getDeclaration($fieldName, $field); +
207                $this->conn->exec('ALTER TABLE ' . $name . ' ' . $query); +
208            } +
209        } +
210 +
211        if (isset($changes['remove']) && is_array($changes['remove'])) { +
212            foreach ($changes['remove'] as $fieldName => $field) { +
213                $fieldName = $this->conn->quoteIdentifier($fieldName, true); +
214                $query = 'DROP ' . $fieldName; +
215                $this->conn->exec('ALTER TABLE ' . $name . ' ' . $query); +
216            } +
217        } +
218 +
219        if (isset($changes['change']) && is_array($changes['change'])) { +
220            foreach ($changes['change'] as $fieldName => $field) { +
221                $fieldName = $this->conn->quoteIdentifier($fieldName, true); +
222                if (isset($field['type'])) { +
223                    $serverInfo = $this->conn->getServerVersion(); +
224 +
225                    if (is_array($serverInfo) && $serverInfo['major'] < 8) { +
226                        throw new Doctrine_Export_Exception('changing column type for "'.$field['type'].'\" requires PostgreSQL 8.0 or above'); +
227                    } +
228                    $query = 'ALTER ' . $fieldName . ' TYPE ' . $this->conn->datatype->getTypeDeclaration($field['definition']); +
229                    $this->conn->exec('ALTER TABLE ' . $name . ' ' . $query);; +
230                } +
231                if (array_key_exists('default', $field)) { +
232                    $query = 'ALTER ' . $fieldName . ' SET DEFAULT ' . $this->conn->quote($field['definition']['default'], $field['definition']['type']); +
233                    $this->conn->exec('ALTER TABLE ' . $name . ' ' . $query); +
234                } +
235                if ( ! empty($field['notnull'])) { +
236                    $query = 'ALTER ' . $fieldName . ' ' . ($field['definition']['notnull'] ? 'SET' : 'DROP') . ' NOT NULL'; +
237                    $this->conn->exec('ALTER TABLE ' . $name . ' ' . $query); +
238                } +
239            } +
240        } +
241 +
242        if (isset($changes['rename']) && is_array($changes['rename'])) { +
243            foreach ($changes['rename'] as $fieldName => $field) { +
244                $fieldName = $this->conn->quoteIdentifier($fieldName, true); +
245                $this->conn->exec('ALTER TABLE ' . $name . ' RENAME COLUMN ' . $fieldName . ' TO ' . $this->conn->quoteIdentifier($field['name'], true)); +
246            } +
247        } +
248 +
249        $name = $this->conn->quoteIdentifier($name, true); +
250        if (isset($changes['name'])) { +
251            $changeName = $this->conn->quoteIdentifier($changes['name'], true); +
252            $this->conn->exec('ALTER TABLE ' . $name . ' RENAME TO ' . $changeName); +
253        } +
254    } +
255    /** +
256     * return RDBMS specific create sequence statement +
257     * +
258     * @throws Doctrine_Connection_Exception     if something fails at database level +
259     * @param string    $seqName        name of the sequence to be created +
260     * @param string    $start          start value of the sequence; default is 1 +
261     * @param array     $options  An associative array of table options: +
262     *                          array( +
263     *                              'comment' => 'Foo', +
264     *                              'charset' => 'utf8', +
265     *                              'collate' => 'utf8_unicode_ci', +
266     *                          ); +
267     * @return string +
268     */ +
269    public function createSequenceSql($sequenceName, $start = 1, array $options = array()) +
270    { +
271        $sequenceName = $this->conn->quoteIdentifier($this->conn->formatter->getSequenceName($sequenceName), true); +
272        return $this->conn->exec('CREATE SEQUENCE ' . $sequenceName . ' INCREMENT 1' . +
273                    ($start < 1 ? ' MINVALUE ' . $start : '') . ' START ' . $start); +
274    } +
275    /** +
276     * drop existing sequence +
277     * +
278     * @param string $sequenceName name of the sequence to be dropped +
279     */ +
280    public function dropSequenceSql($sequenceName) +
281    { +
282        $sequenceName = $this->conn->quoteIdentifier($this->conn->formatter->getSequenceName($sequenceName), true); +
283        return 'DROP SEQUENCE ' . $sequenceName; +
284    } +
285 +
286    /** +
287     * Creates a table. +
288     * +
289     * @param unknown_type $name +
290     * @param array $fields +
291     * @param array $options +
292     * @return unknown +
293     */ +
294    public function createTableSql($name, array $fields, array $options = array()) +
295    { +
296        if ( ! $name) { +
297            throw new Doctrine_Export_Exception('no valid table name specified'); +
298        } +
299         +
300        if (empty($fields)) { +
301            throw new Doctrine_Export_Exception('no fields specified for table ' . $name); +
302        } +
303 +
304        $queryFields = $this->getFieldDeclarationList($fields); +
305 +
306 +
307        if (isset($options['primary']) && ! empty($options['primary'])) { +
308            $keyColumns = array_values($options['primary']); +
309            $keyColumns = array_map(array($this->conn, 'quoteIdentifier'), $keyColumns); +
310            $queryFields .= ', PRIMARY KEY(' . implode(', ', $keyColumns) . ')'; +
311        } +
312 +
313        $query = 'CREATE TABLE ' . $this->conn->quoteIdentifier($name, true) . ' (' . $queryFields . ')'; +
314 +
315        $sql[] = $query; +
316 +
317        if (isset($options['indexes']) && ! empty($options['indexes'])) { +
318            foreach($options['indexes'] as $index => $definition) { +
319                $sql[] = $this->createIndexSql($name, $index, $definition); +
320            } +
321        } +
322         +
323        if (isset($options['foreignKeys'])) { +
324 +
325            foreach ((array) $options['foreignKeys'] as $k => $definition) { +
326                if (is_array($definition)) { +
327                    $sql[] = $this->createForeignKeySql($name, $definition); +
328                } +
329            } +
330        } +
331         +
332        return $sql; +
333    } +
334     +
335    /** +
336     * createForeignKeySql +
337     * +
338     * @param string    $table         name of the table on which the foreign key is to be created +
339     * @param array     $definition    associative array that defines properties of the foreign key to be created. +
340     * @return string +
341     */ +
342    public function createForeignKeySql($table, array $definition) +
343    { +
344        $table = $this->conn->quoteIdentifier($table); +
345 +
346        $query = 'ALTER TABLE ' . $table . ' ADD ' . $this->getForeignKeyDeclaration($definition); +
347 +
348        return $query; +
349    } +
350}
\ No newline at end of file diff --git a/tests/coverage/Doctrine_Export_Schema.html b/tests/coverage/Doctrine_Export_Schema.html new file mode 100644 index 000000000..ef1f43c97 --- /dev/null +++ b/tests/coverage/Doctrine_Export_Schema.html @@ -0,0 +1,470 @@ + + + Coverage for Doctrine_Export_Schema + + +

Coverage for Doctrine_Export_Schema

Back to coverage report

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
1<?php +
2/* +
3 * $Id: Schema.php 1838 2007-06-26 00:58:21Z nicobn $ +
4 * +
5 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +
6 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +
7 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +
8 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +
9 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +
10 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +
11 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +
12 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +
13 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +
14 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +
15 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +
16 * +
17 * This software consists of voluntary contributions made by many individuals +
18 * and is licensed under the LGPL. For more information, see +
19 * <http://www.phpdoctrine.com>. +
20 */ +
21 +
22/** +
23 * class Doctrine_Export_Schema +
24 * +
25 * Different methods to import a XML schema. The logic behind using two different +
26 * methods is simple. Some people will like the idea of producing Doctrine_Record +
27 * objects directly, which is totally fine. But in fast and growing application, +
28 * table definitions tend to be a little bit more volatile. importArr() can be used +
29 * to output a table definition in a PHP file. This file can then be stored  +
30 * independantly from the object itself. +
31 * +
32 * @package     Doctrine +
33 * @subpackage  Export +
34 * @link        www.phpdoctrine.com +
35 * @license     http://www.opensource.org/licenses/lgpl-license.php LGPL +
36 * @version     $Revision: 1838 $ +
37 * @author      Nicolas Bérard-Nault <nicobn@gmail.com> +
38 */ +
39class Doctrine_Export_Schema +
40{     +
41    /** +
42     * buildSchema +
43     *  +
44     * Build schema array that can be dumped to file +
45     * +
46     * @param string $directory  +
47     * @return void +
48     */ +
49    public function buildSchema($directory = null, $models = array()) +
50    { +
51        $array = array(); +
52         +
53        if ($directory) { +
54            $loadedModels = Doctrine::loadModels($directory); +
55        } else { +
56            $loadedModels = Doctrine::getLoadedModels(); +
57        } +
58         +
59        $parent = new ReflectionClass('Doctrine_Record'); +
60 +
61        $sql = array(); +
62        $fks = array(); +
63 +
64        // we iterate trhough the diff of previously declared classes +
65        // and currently declared classes +
66        foreach ($loadedModels as $name) { +
67            if (!empty($models) && !in_array($name, $models)) { +
68                continue; +
69            } +
70             +
71            $class = new ReflectionClass($name); +
72             +
73            // check if class is an instance of Doctrine_Record and not abstract +
74            // class must have method setTableDefinition (to avoid non-Record subclasses like symfony's sfDoctrineRecord) +
75            // we have to recursively iterate through the class parents just to be sure that the classes using for example +
76            // column aggregation inheritance are properly exported to database +
77            while ($class->isAbstract() || +
78                   ! $class->isSubclassOf($parent) || +
79                   ! $class->hasMethod('setTableDefinition') || +
80                   ( $class->hasMethod('setTableDefinition') && +
81                     $class->getMethod('setTableDefinition')->getDeclaringClass()->getName() !== $class->getName())) { +
82 +
83                $class = $class->getParentClass(); +
84                if ($class === false) { +
85                    break; +
86                } +
87            } +
88 +
89            if ($class === false) { +
90                continue; +
91            } +
92 +
93            $record = new $name(); +
94            $recordTable  = $record->getTable(); +
95             +
96            $data = $recordTable->getExportableFormat(); +
97             +
98            $table = array(); +
99            $table['tableName'] = $data['tableName']; +
100            $table['className'] = get_class($record); +
101             +
102            foreach ($data['columns'] AS $name => $column) { +
103                $data['columns'][$name]['name'] = $name; +
104            } +
105             +
106            $table['columns'] = $data['columns']; +
107             +
108            $relations = $recordTable->getRelations(); +
109            foreach ($relations as $key => $relation) { +
110                $relationData = $relation->toArray(); +
111                 +
112                $relationKey = $relationData['alias']; +
113                 +
114                if (isset($relationData['refTable']) && $relationData['refTable']) { +
115                    $table['relations'][$relationKey]['refClass'] = $relationData['refTable']->getComponentName(); +
116                } +
117                 +
118                if (isset($relationData['class']) && $relationData['class'] && $relation['class'] != $relationKey) { +
119                    $table['relations'][$relationKey]['class'] = $relationData['class']; +
120                } +
121  +
122                $table['relations'][$relationKey]['local'] = $relationData['local']; +
123                $table['relations'][$relationKey]['foreign'] = $relationData['foreign']; +
124                 +
125                if ($relationData['type'] === Doctrine_Relation::ONE) { +
126                    $table['relations'][$relationKey]['type'] = 'one'; +
127                } else if($relationData['type'] === Doctrine_Relation::MANY) { +
128                    $table['relations'][$relationKey]['type'] = 'many'; +
129                } else { +
130                    $table['relations'][$relationKey]['type'] = 'one'; +
131                } +
132            } +
133             +
134            $array[$table['className']] = $table; +
135        } +
136         +
137        return $array; +
138    } +
139     +
140    /** +
141     * exportSchema +
142     * +
143     * @param string $schema  +
144     * @param string $directory  +
145     * @return void +
146     */ +
147    public function exportSchema($schema, $format = 'yml', $directory = null, $models = array()) +
148    { +
149        $array = $this->buildSchema($directory, $models); +
150         +
151        Doctrine_Parser::dump($array, $format, $schema); +
152    } +
153}
\ No newline at end of file diff --git a/tests/coverage/Doctrine_Export_Sqlite.html b/tests/coverage/Doctrine_Export_Sqlite.html new file mode 100644 index 000000000..5722ff2ff --- /dev/null +++ b/tests/coverage/Doctrine_Export_Sqlite.html @@ -0,0 +1,1244 @@ + + + Coverage for Doctrine_Export_Sqlite + + +

Coverage for Doctrine_Export_Sqlite

Back to coverage report

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
1<?php +
2/* +
3 *  $Id: Sqlite.php 2702 2007-10-03 21:43:22Z Jonathan.Wage $ +
4 * +
5 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +
6 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +
7 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +
8 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +
9 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +
10 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +
11 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +
12 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +
13 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +
14 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +
15 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +
16 * +
17 * This software consists of voluntary contributions made by many individuals +
18 * and is licensed under the LGPL. For more information, see +
19 * <http://www.phpdoctrine.com>. +
20 */ +
21Doctrine::autoload('Doctrine_Export'); +
22/** +
23 * Doctrine_Export_Sqlite +
24 * +
25 * @package     Doctrine +
26 * @subpackage  Export +
27 * @author      Konsta Vesterinen <kvesteri@cc.hut.fi> +
28 * @author      Lukas Smith <smith@pooteeweet.org> (PEAR MDB2 library) +
29 * @license     http://www.opensource.org/licenses/lgpl-license.php LGPL +
30 * @link        www.phpdoctrine.com +
31 * @since       1.0 +
32 * @version     $Revision: 2702 $ +
33 */ +
34class Doctrine_Export_Sqlite extends Doctrine_Export +
35{ +
36    /** +
37     * drop an existing database +
38     * +
39     * @param string $name                  name of the database that should be dropped +
40     * @throws Doctrine_Export_Exception    if the database file does not exist +
41     * @throws Doctrine_Export_Exception    if something failed during the removal of the database file +
42     * @return void +
43     */ +
44    public function dropDatabase($name) +
45    { +
46        $databaseFile = $this->conn->getDatabaseFile($name); +
47        if ( ! @file_exists($databaseFile)) { +
48            throw new Doctrine_Export_Exception('database does not exist'); +
49        } +
50        $result = @unlink($databaseFile); +
51        if ( ! $result) { +
52            throw new Doctrine_Export_Exception('could not remove the database file'); +
53        } +
54    } +
55 +
56    /** +
57     * Get the stucture of a field into an array +
58     * +
59     * @param string    $table         name of the table on which the index is to be created +
60     * @param string    $name         name of the index to be created +
61     * @param array     $definition        associative array that defines properties of the index to be created. +
62     *                                 Currently, only one property named FIELDS is supported. This property +
63     *                                 is also an associative with the names of the index fields as array +
64     *                                 indexes. Each entry of this array is set to another type of associative +
65     *                                 array that specifies properties of the index that are specific to +
66     *                                 each field. +
67     * +
68     *                                Currently, only the sorting property is supported. It should be used +
69     *                                 to define the sorting direction of the index. It may be set to either +
70     *                                 ascending or descending. +
71     * +
72     *                                Not all DBMS support index sorting direction configuration. The DBMS +
73     *                                 drivers of those that do not support it ignore this property. Use the +
74     *                                 function support() to determine whether the DBMS driver can manage indexes. +
75 +
76     *                                 Example +
77     *                                    array( +
78     *                                        'fields' => array( +
79     *                                            'user_name' => array( +
80     *                                                'sorting' => 'ascending' +
81     *                                            ), +
82     *                                            'last_login' => array() +
83     *                                        ) +
84     *                                    ) +
85     * @throws PDOException +
86     * @return void +
87     */ +
88    public function createIndexSql($table, $name, array $definition) +
89    { +
90        $name  = $this->conn->formatter->getIndexName($name); +
91        $name  = $this->conn->quoteIdentifier($name); +
92        $query = 'CREATE INDEX ' . $name . ' ON ' . $table; +
93        $query .= ' (' . $this->getIndexFieldDeclarationList($definition['fields']) . ')'; +
94 +
95        return $query; +
96    } +
97    /** +
98     * getIndexFieldDeclarationList +
99     * Obtain DBMS specific SQL code portion needed to set an index +
100     * declaration to be used in statements like CREATE TABLE. +
101     * +
102     * @return string    +
103     */ +
104    public function getIndexFieldDeclarationList(array $fields) +
105    { +
106        $declFields = array(); +
107 +
108        foreach ($fields as $fieldName => $field) { +
109            $fieldString = $this->conn->quoteIdentifier($fieldName); +
110 +
111            if (is_array($field)) { +
112                if (isset($field['sorting'])) { +
113                    $sort = strtoupper($field['sorting']); +
114                    switch ($sort) { +
115                        case 'ASC': +
116                        case 'DESC': +
117                            $fieldString .= ' ' . $sort; +
118                            break; +
119                        default: +
120                            throw new Doctrine_Export_Exception('Unknown index sorting option given.'); +
121                    } +
122                } +
123            } else { +
124                $fieldString = $this->conn->quoteIdentifier($field); +
125            } +
126            $declFields[] = $fieldString; +
127        } +
128        return implode(', ', $declFields); +
129    } +
130    /** +
131     * create a new table +
132     * +
133     * @param string $name   Name of the database that should be created +
134     * @param array $fields  Associative array that contains the definition of each field of the new table +
135     *                       The indexes of the array entries are the names of the fields of the table an +
136     *                       the array entry values are associative arrays like those that are meant to be +
137     *                       passed with the field definitions to get[Type]Declaration() functions. +
138     *                          array( +
139     *                              'id' => array( +
140     *                                  'type' => 'integer', +
141     *                                  'unsigned' => 1 +
142     *                                  'notnull' => 1 +
143     *                                  'default' => 0 +
144     *                              ), +
145     *                              'name' => array( +
146     *                                  'type' => 'text', +
147     *                                  'length' => 12 +
148     *                              ), +
149     *                              'password' => array( +
150     *                                  'type' => 'text', +
151     *                                  'length' => 12 +
152     *                              ) +
153     *                          ); +
154     * @param array $options  An associative array of table options: +
155     * +
156     * @return void +
157     */ +
158    public function createTableSql($name, array $fields, array $options = array()) +
159    { +
160        if ( ! $name) { +
161            throw new Doctrine_Export_Exception('no valid table name specified'); +
162        } +
163         +
164        if (empty($fields)) { +
165            throw new Doctrine_Export_Exception('no fields specified for table '.$name); +
166        } +
167        $queryFields = $this->getFieldDeclarationList($fields); +
168         +
169        $autoinc = false; +
170        foreach($fields as $field) { +
171            if (isset($field['autoincrement']) && $field['autoincrement'] ||  +
172              (isset($field['autoinc']) && $field['autoinc'])) { +
173                $autoinc = true; +
174                break; +
175            } +
176        } +
177 +
178        if ( ! $autoinc && isset($options['primary']) && ! empty($options['primary'])) { +
179            $keyColumns = array_values($options['primary']); +
180            $keyColumns = array_map(array($this->conn, 'quoteIdentifier'), $keyColumns); +
181            $queryFields.= ', PRIMARY KEY('.implode(', ', $keyColumns).')'; +
182        } +
183 +
184        $name  = $this->conn->quoteIdentifier($name, true); +
185        $sql   = 'CREATE TABLE ' . $name . ' (' . $queryFields; +
186 +
187        if ($check = $this->getCheckDeclaration($fields)) { +
188            $sql .= ', ' . $check; +
189        } +
190 +
191        if (isset($options['checks']) && $check = $this->getCheckDeclaration($options['checks'])) { +
192            $sql .= ', ' . $check; +
193        } +
194 +
195        $sql .= ')'; +
196 +
197        $query[] = $sql; +
198 +
199        if (isset($options['indexes']) && ! empty($options['indexes'])) { +
200            foreach ($options['indexes'] as $index => $definition) { +
201                $query[] = $this->createIndexSql($name, $index, $definition); +
202            } +
203        } +
204        return $query; +
205         +
206         +
207        /** +
208        try { +
209 +
210            if ( ! empty($fk)) { +
211                $this->conn->beginTransaction(); +
212            } +
213 +
214            $ret   = $this->conn->exec($query); +
215 +
216            if ( ! empty($fk)) { +
217                foreach ($fk as $definition) { +
218 +
219                    $query = 'CREATE TRIGGER doctrine_' . $name . '_cscd_delete ' +
220                           . 'AFTER DELETE ON ' . $name . ' FOR EACH ROW ' +
221                           . 'BEGIN ' +
222                           . 'DELETE FROM ' . $definition['foreignTable'] . ' WHERE '; +
223 +
224                    $local = (array) $definition['local']; +
225                    foreach((array) $definition['foreign'] as $k => $field) { +
226                        $query .= $field . ' = old.' . $local[$k] . ';'; +
227                    } +
228 +
229                    $query .= 'END;'; +
230 +
231                    $this->conn->exec($query); +
232                } +
233 +
234                $this->conn->commit(); +
235            } +
236 +
237 +
238        } catch(Doctrine_Exception $e) { +
239 +
240            $this->conn->rollback(); +
241 +
242            throw $e; +
243        } +
244        */ +
245    } +
246    /** +
247     * getAdvancedForeignKeyOptions +
248     * Return the FOREIGN KEY query section dealing with non-standard options +
249     * as MATCH, INITIALLY DEFERRED, ON UPDATE, ... +
250     * +
251     * @param array $definition         foreign key definition +
252     * @return string +
253     * @access protected +
254     */ +
255    public function getAdvancedForeignKeyOptions(array $definition) +
256    { +
257        $query = ''; +
258        if (isset($definition['match'])) { +
259            $query .= ' MATCH ' . $definition['match']; +
260        } +
261        if (isset($definition['onUpdate'])) { +
262            $query .= ' ON UPDATE ' . $definition['onUpdate']; +
263        } +
264        if (isset($definition['onDelete'])) { +
265            $query .= ' ON DELETE ' . $definition['onDelete']; +
266        } +
267        if (isset($definition['deferrable'])) { +
268            $query .= ' DEFERRABLE'; +
269        } else { +
270            $query .= ' NOT DEFERRABLE'; +
271        } +
272        if (isset($definition['feferred'])) { +
273            $query .= ' INITIALLY DEFERRED'; +
274        } else { +
275            $query .= ' INITIALLY IMMEDIATE'; +
276        } +
277        return $query; +
278    } +
279    /** +
280     * create sequence +
281     * +
282     * @param string    $seqName        name of the sequence to be created +
283     * @param string    $start          start value of the sequence; default is 1 +
284     * @param array     $options  An associative array of table options: +
285     *                          array( +
286     *                              'comment' => 'Foo', +
287     *                              'charset' => 'utf8', +
288     *                              'collate' => 'utf8_unicode_ci', +
289     *                          ); +
290     * @return boolean +
291     */ +
292    public function createSequence($seqName, $start = 1, array $options = array()) +
293    { +
294        $sequenceName   = $this->conn->quoteIdentifier($this->conn->getSequenceName($seqName), true); +
295        $seqcolName     = $this->conn->quoteIdentifier($this->conn->getAttribute(Doctrine::ATTR_SEQCOL_NAME), true); +
296        $query          = 'CREATE TABLE ' . $sequenceName . ' (' . $seqcolName . ' INTEGER PRIMARY KEY DEFAULT 0 NOT NULL)'; +
297 +
298        $this->conn->exec($query); +
299 +
300        if ($start == 1) { +
301            return true; +
302        } +
303 +
304        try { +
305            $this->conn->exec('INSERT INTO ' . $sequenceName . ' (' . $seqcolName . ') VALUES (' . ($start-1) . ')'); +
306            return true; +
307        } catch(Doctrine_Connection_Exception $e) { +
308            // Handle error     +
309 +
310            try { +
311                $result = $db->exec('DROP TABLE ' . $sequenceName); +
312            } catch(Doctrine_Connection_Exception $e) { +
313                throw new Doctrine_Export_Exception('could not drop inconsistent sequence table'); +
314            } +
315        } +
316        throw new Doctrine_Export_Exception('could not create sequence table'); +
317    } +
318    /** +
319     * drop existing sequence +
320     * +
321     * @param string $sequenceName      name of the sequence to be dropped +
322     * @return string +
323     */ +
324    public function dropSequenceSql($sequenceName) +
325    { +
326        $sequenceName = $this->conn->quoteIdentifier($this->conn->getSequenceName($sequenceName), true); +
327 +
328        return 'DROP TABLE ' . $sequenceName; +
329    } +
330     +
331    public function alterTableSql($name, array $changes, $check = false) +
332    { +
333        if ( ! $name) { +
334            throw new Doctrine_Export_Exception('no valid table name specified'); +
335        } +
336        foreach ($changes as $changeName => $change) { +
337            switch ($changeName) { +
338                case 'add': +
339                case 'change': +
340                case 'rename': +
341                case 'name': +
342                    break; +
343                default: +
344                    throw new Doctrine_Export_Exception('change type "' . $changeName . '" not yet supported'); +
345            } +
346        } +
347 +
348        if ($check) { +
349            return true; +
350        } +
351 +
352        $query = ''; +
353        if ( ! empty($changes['name'])) { +
354            $change_name = $this->conn->quoteIdentifier($changes['name']); +
355            $query .= 'RENAME TO ' . $change_name; +
356        } +
357 +
358        if ( ! empty($changes['add']) && is_array($changes['add'])) { +
359            foreach ($changes['add'] as $fieldName => $field) { +
360                if ($query) { +
361                    $query.= ', '; +
362                } +
363                $query.= 'ADD ' . $this->getDeclaration($field['type'], $fieldName, $field); +
364            } +
365        } +
366 +
367        $rename = array(); +
368        if ( ! empty($changes['rename']) && is_array($changes['rename'])) { +
369            foreach ($changes['rename'] as $fieldName => $field) { +
370                $rename[$field['name']] = $fieldName; +
371            } +
372        } +
373 +
374        if ( ! empty($changes['change']) && is_array($changes['change'])) { +
375            foreach ($changes['change'] as $fieldName => $field) { +
376                if ($query) { +
377                    $query.= ', '; +
378                } +
379                if (isset($rename[$fieldName])) { +
380                    $oldFieldName = $rename[$fieldName]; +
381                    unset($rename[$fieldName]); +
382                } else { +
383                    $oldFieldName = $fieldName; +
384                } +
385                $oldFieldName = $this->conn->quoteIdentifier($oldFieldName, true); +
386                $query .= 'CHANGE ' . $oldFieldName . ' '  +
387                        . $this->getDeclaration($field['definition']['type'], $fieldName, $field['definition']); +
388            } +
389        } +
390 +
391        if ( ! empty($rename) && is_array($rename)) { +
392            foreach ($rename as $renameName => $renamedField) { +
393                if ($query) { +
394                    $query.= ', '; +
395                } +
396                $field = $changes['rename'][$renamedField]; +
397                $renamedField = $this->conn->quoteIdentifier($renamedField, true); +
398                $query .= 'CHANGE ' . $renamedField . ' ' +
399                        . $this->getDeclaration($field['definition']['type'], $field['name'], $field['definition']); +
400            } +
401        } +
402 +
403        if ( ! $query) { +
404            return false; +
405        } +
406 +
407        $name = $this->conn->quoteIdentifier($name, true); +
408         +
409        return 'ALTER TABLE ' . $name . ' ' . $query; +
410    } +
411}
\ No newline at end of file diff --git a/tests/coverage/Doctrine_Expression.html b/tests/coverage/Doctrine_Expression.html new file mode 100644 index 000000000..483931761 --- /dev/null +++ b/tests/coverage/Doctrine_Expression.html @@ -0,0 +1,317 @@ + + + Coverage for Doctrine_Expression + + +

Coverage for Doctrine_Expression

Back to coverage report

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
1<?php +
2/* +
3 *  $Id: Expression.php 2702 2007-10-03 21:43:22Z Jonathan.Wage $ +
4 * +
5 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +
6 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +
7 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +
8 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +
9 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +
10 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +
11 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +
12 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +
13 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +
14 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +
15 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +
16 * +
17 * This software consists of voluntary contributions made by many individuals +
18 * and is licensed under the LGPL. For more information, see +
19 * <http://www.phpdoctrine.com>. +
20 */ +
21Doctrine::autoload('Doctrine_Connection_Module'); +
22/** +
23 * Doctrine_Expression +
24 * +
25 * @package     Doctrine +
26 * @subpackage  Expression +
27 * @license     http://www.opensource.org/licenses/lgpl-license.php LGPL +
28 * @link        www.phpdoctrine.com +
29 * @since       1.0 +
30 * @version     $Revision: 2702 $ +
31 * @author      Konsta Vesterinen <kvesteri@cc.hut.fi> +
32 */ +
33class Doctrine_Expression +
34{ +
35    protected $_expression; +
36     +
37    protected $_conn; +
38 +
39    public function __construct($expr, $conn = null) +
40    { +
41        $this->setExpression($expr); +
42         +
43        if ($conn !== null) { +
44            $this->_conn = $conn; +
45        } +
46    } +
47 +
48    public function getConnection() +
49    { +
50        if ( ! isset($this->_conn)) { +
51            return Doctrine_Manager::connection(); +
52        } +
53 +
54        return $this->_conn; +
55    } +
56 +
57    public function setExpression($clause) +
58    { +
59        $this->_expression = $this->parseClause($clause); +
60    } +
61 +
62    public function parseExpression($expr) +
63    { +
64        $pos  = strpos($expr, '('); +
65        if ($pos === false) { +
66            return $expr; +
67        } +
68 +
69        // get the name of the function +
70        $name   = substr($expr, 0, $pos); +
71        $argStr = substr($expr, ($pos + 1), -1); +
72 +
73        // parse args +
74        foreach (Doctrine_Tokenizer::bracketExplode($argStr, ',') as $arg) { +
75           $args[] = $this->parseClause($arg); +
76        } +
77 +
78        return call_user_func_array(array($this->getConnection()->expression, $name), $args); +
79    } +
80 +
81    public function parseClause($clause) +
82    { +
83        $e = Doctrine_Tokenizer::bracketExplode($clause, ' '); +
84 +
85        foreach ($e as $k => $expr) { +
86            $e[$k] = $this->parseExpression($expr); +
87        } +
88         +
89        return implode(' ', $e); +
90    } +
91 +
92    public function getSql() +
93    { +
94 +
95        return $this->_expression; +
96    } +
97 +
98    public function __toString() +
99    { +
100        return $this->getSql(); +
101    } +
102}
\ No newline at end of file diff --git a/tests/coverage/Doctrine_Expression_Driver.html b/tests/coverage/Doctrine_Expression_Driver.html new file mode 100644 index 000000000..3923add93 --- /dev/null +++ b/tests/coverage/Doctrine_Expression_Driver.html @@ -0,0 +1,2144 @@ + + + Coverage for Doctrine_Expression_Driver + + +

Coverage for Doctrine_Expression_Driver

Back to coverage report

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
1<?php +
2/* +
3 *  $Id$ +
4 * +
5 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +
6 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +
7 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +
8 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +
9 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +
10 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +
11 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +
12 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +
13 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +
14 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +
15 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +
16 * +
17 * This software consists of voluntary contributions made by many individuals +
18 * and is licensed under the LGPL. For more information, see +
19 * <http://www.phpdoctrine.com>. +
20 */ +
21Doctrine::autoload('Doctrine_Connection_Module'); +
22/** +
23 * Doctrine_Expression_Driver +
24 * +
25 * @package     Doctrine +
26 * @subpackage  Expression +
27 * @license     http://www.opensource.org/licenses/lgpl-license.php LGPL +
28 * @link        www.phpdoctrine.com +
29 * @since       1.0 +
30 * @version     $Revision$ +
31 * @author      Konsta Vesterinen <kvesteri@cc.hut.fi> +
32 */ +
33class Doctrine_Expression_Driver extends Doctrine_Connection_Module +
34{ +
35    public function getIdentifier($column) +
36    { +
37        return $column; +
38    } +
39    public function getIdentifiers($columns) +
40    { +
41        return $columns; +
42    } +
43    /** +
44     * regexp +
45     * returns the regular expression operator +
46     * +
47     * @return string +
48     */ +
49    public function regexp() +
50    { +
51        throw new Doctrine_Expression_Exception('Regular expression operator is not supported by this database driver.'); +
52    } +
53    /** +
54     * Returns the average value of a column +
55     * +
56     * @param string $column    the column to use +
57     * @return string           generated sql including an AVG aggregate function +
58     */ +
59    public function avg($column) +
60    { +
61        $column = $this->getIdentifier($column); +
62        return 'AVG(' .  $column . ')'; +
63    } +
64 +
65    /** +
66     * Returns the number of rows (without a NULL value) of a column +
67     * +
68     * If a '*' is used instead of a column the number of selected rows +
69     * is returned. +
70     * +
71     * @param string|integer $column    the column to use +
72     * @return string                   generated sql including a COUNT aggregate function +
73     */ +
74    public function count($column) +
75    { +
76        $column = $this->getIdentifier($column); +
77        return 'COUNT(' . $column . ')'; +
78    } +
79 +
80    /** +
81     * Returns the highest value of a column +
82     * +
83     * @param string $column    the column to use +
84     * @return string           generated sql including a MAX aggregate function +
85     */ +
86    public function max($column) +
87    { +
88        $column = $this->getIdentifier($column); +
89        return 'MAX(' . $column . ')'; +
90    } +
91 +
92    /** +
93     * Returns the lowest value of a column +
94     * +
95     * @param string $column the column to use +
96     * @return string +
97     */ +
98    public function min($column) +
99    { +
100        $column = $this->getIdentifier($column); +
101        return 'MIN(' . $column . ')'; +
102    } +
103 +
104    /** +
105     * Returns the total sum of a column +
106     * +
107     * @param string $column the column to use +
108     * @return string +
109     */ +
110    public function sum($column) +
111    { +
112        $column = $this->getIdentifier($column); +
113        return 'SUM(' . $column . ')'; +
114    } +
115 +
116    // scalar functions +
117 +
118    /** +
119     * Returns the md5 sum of a field. +
120     * +
121     * Note: Not SQL92, but common functionality +
122     * +
123     * @return string +
124     */ +
125    public function md5($column) +
126    { +
127        $column = $this->getIdentifier($column); +
128        return 'MD5(' . $column . ')'; +
129    } +
130 +
131    /** +
132     * Returns the length of a text field. +
133     * +
134     * @param string $expression1 +
135     * @param string $expression2 +
136     * @return string +
137     */ +
138    public function length($column) +
139    { +
140        $column = $this->getIdentifier($column); +
141        return 'LENGTH(' . $column . ')'; +
142    } +
143 +
144    /** +
145     * Rounds a numeric field to the number of decimals specified. +
146     * +
147     * @param string $expression1 +
148     * @param string $expression2 +
149     * @return string +
150     */ +
151    public function round($column, $decimals = 0) +
152    { +
153        $column = $this->getIdentifier($column); +
154 +
155        return 'ROUND(' . $column . ', ' . $decimals . ')'; +
156    } +
157 +
158    /** +
159     * Returns the remainder of the division operation +
160     * $expression1 / $expression2. +
161     * +
162     * @param string $expression1 +
163     * @param string $expression2 +
164     * @return string +
165     */ +
166    public function mod($expression1, $expression2) +
167    { +
168        $expression1 = $this->getIdentifier($expression1); +
169        $expression2 = $this->getIdentifier($expression2); +
170        return 'MOD(' . $expression1 . ', ' . $expression2 . ')'; +
171    } +
172 +
173    /** +
174     * trim +
175     * returns the string $str with leading and proceeding space characters removed +
176     * +
177     * @param string $str       literal string or column name +
178     * @return string +
179     */ +
180    public function trim($str) +
181    { +
182        return 'TRIM(' . $str . ')'; +
183    } +
184 +
185    /** +
186     * rtrim +
187     * returns the string $str with proceeding space characters removed +
188     * +
189     * @param string $str       literal string or column name +
190     * @return string +
191     */ +
192    public function rtrim($str) +
193    { +
194        return 'RTRIM(' . $str . ')'; +
195    } +
196 +
197    /** +
198     * ltrim +
199     * returns the string $str with leading space characters removed +
200     * +
201     * @param string $str       literal string or column name +
202     * @return string +
203     */ +
204    public function ltrim($str) +
205    { +
206        return 'LTRIM(' . $str . ')'; +
207    } +
208    /** +
209     * upper +
210     * Returns the string $str with all characters changed to +
211     * uppercase according to the current character set mapping. +
212     * +
213     * @param string $str       literal string or column name +
214     * @return string +
215     */ +
216    public function upper($str) +
217    { +
218        return 'UPPER(' . $str . ')'; +
219    } +
220    /** +
221     * lower +
222     * Returns the string $str with all characters changed to +
223     * lowercase according to the current character set mapping. +
224     * +
225     * @param string $str       literal string or column name +
226     * @return string +
227     */ +
228    public function lower($str) +
229    { +
230        return 'LOWER(' . $str . ')'; +
231    } +
232    /** +
233     * locate +
234     * returns the position of the first occurrence of substring $substr in string $str +
235     * +
236     * @param string $substr    literal string to find +
237     * @param string $str       literal string +
238     * @return integer +
239     */ +
240    public function locate($str, $substr) +
241    { +
242        return 'LOCATE(' . $str . ', ' . $substr . ')'; +
243    } +
244    /** +
245     * Returns the current system date. +
246     * +
247     * @return string +
248     */ +
249    public function now() +
250    { +
251        return 'NOW()'; +
252    } +
253    /** +
254     * soundex +
255     * Returns a string to call a function to compute the +
256     * soundex encoding of a string +
257     * +
258     * The string "?000" is returned if the argument is NULL. +
259     * +
260     * @param string $value +
261     * @return string   SQL soundex function with given parameter +
262     */ +
263    public function soundex($value) +
264    { +
265        throw new Doctrine_Expression_Exception('SQL soundex function not supported by this driver.'); +
266    } +
267    /** +
268     * return string to call a function to get a substring inside an SQL statement +
269     * +
270     * Note: Not SQL92, but common functionality. +
271     * +
272     * SQLite only supports the 2 parameter variant of this function +
273     * +
274     * @param string $value         an sql string literal or column name/alias +
275     * @param integer $position     where to start the substring portion +
276     * @param integer $length       the substring portion length +
277     * @return string               SQL substring function with given parameters +
278     */ +
279    public function substring($value, $from, $len = null) +
280    { +
281        $value = $this->getIdentifier($value); +
282        if ($len === null) +
283            return 'SUBSTRING(' . $value . ' FROM ' . $from . ')'; +
284        else { +
285            $len = $this->getIdentifier($len); +
286            return 'SUBSTRING(' . $value . ' FROM ' . $from . ' FOR ' . $len . ')'; +
287        } +
288    } +
289    /** +
290     * Returns a series of strings concatinated +
291     * +
292     * concat() accepts an arbitrary number of parameters. Each parameter +
293     * must contain an expression or an array with expressions. +
294     * +
295     * @param string|array(string) strings that will be concatinated. +
296     */ +
297    public function concat() +
298    { +
299        $args = func_get_args(); +
300 +
301        return 'CONCAT(' . join(', ', (array) $args) . ')'; +
302    } +
303    /** +
304     * Returns the SQL for a logical not. +
305     * +
306     * Example: +
307     * <code> +
308     * $q = new Doctrine_Query(); +
309     * $e = $q->expr; +
310     * $q->select('*')->from('table') +
311     *   ->where($e->eq('id', $e->not('null')); +
312     * </code> +
313     * +
314     * @return string a logical expression +
315     */ +
316    public function not($expression) +
317    { +
318        $expression = $this->getIdentifier($expression); +
319        return 'NOT(' . $expression . ')'; +
320    } +
321    /** +
322     * Returns the SQL to perform the same mathematical operation over an array +
323     * of values or expressions. +
324     * +
325     * basicMath() accepts an arbitrary number of parameters. Each parameter +
326     * must contain a value or an expression or an array with values or +
327     * expressions. +
328     * +
329     * @param string $type the type of operation, can be '+', '-', '*' or '/'. +
330     * @param string|array(string) +
331     * @return string an expression +
332     */ +
333    private function basicMath($type, array $args) +
334    { +
335        $elements = $this->getIdentifiers($args); +
336        if (count($elements) < 1) { +
337            return ''; +
338        } +
339        if (count($elements) == 1) { +
340            return $elements[0]; +
341        } else { +
342            return '(' . implode(' ' . $type . ' ', $elements) . ')'; +
343        } +
344    } +
345    /** +
346     * Returns the SQL to add values or expressions together. +
347     * +
348     * add() accepts an arbitrary number of parameters. Each parameter +
349     * must contain a value or an expression or an array with values or +
350     * expressions. +
351     * +
352     * Example: +
353     * <code> +
354     * $q = new Doctrine_Query(); +
355     * $e = $q->expr; +
356     * +
357     * $q->select('u.*') +
358     *   ->from('User u') +
359     *   ->where($e->eq($e->add('id', 2), 12)); +
360     * </code> +
361     * +
362     * @param string|array(string) +
363     * @return string an expression +
364     */ +
365    public function add(array $args) +
366    { +
367        return $this->basicMath('+', $args); +
368    } +
369 +
370    /** +
371     * Returns the SQL to subtract values or expressions from eachother. +
372     * +
373     * subtract() accepts an arbitrary number of parameters. Each parameter +
374     * must contain a value or an expression or an array with values or +
375     * expressions. +
376     * +
377     * Example: +
378     * <code> +
379     * $q = new Doctrine_Query(); +
380     * $e = $q->expr; +
381     * +
382     * $q->select('u.*') +
383     *   ->from('User u') +
384     *   ->where($e->eq($e->sub('id', 2), 12)); +
385     * </code> +
386     * +
387     * @param string|array(string) +
388     * @return string an expression +
389     */ +
390    public function sub(array $args) +
391    { +
392        return $this->basicMath('-', $args ); +
393    } +
394 +
395    /** +
396     * Returns the SQL to multiply values or expressions by eachother. +
397     * +
398     * multiply() accepts an arbitrary number of parameters. Each parameter +
399     * must contain a value or an expression or an array with values or +
400     * expressions. +
401     * +
402     * Example: +
403     * <code> +
404     * $q = new Doctrine_Query(); +
405     * $e = $q->expr; +
406     * +
407     * $q->select('u.*') +
408     *   ->from('User u') +
409     *   ->where($e->eq($e->mul('id', 2), 12)); +
410     * </code> +
411     * +
412     * @param string|array(string) +
413     * @return string an expression +
414     */ +
415    public function mul(array $args) +
416    { +
417        return $this->basicMath('*', $args); +
418    } +
419 +
420    /** +
421     * Returns the SQL to divide values or expressions by eachother. +
422     * +
423     * divide() accepts an arbitrary number of parameters. Each parameter +
424     * must contain a value or an expression or an array with values or +
425     * expressions. +
426     * +
427     * Example: +
428     * <code> +
429     * $q = new Doctrine_Query(); +
430     * $e = $q->expr; +
431     * +
432     * $q->select('u.*') +
433     *   ->from('User u') +
434     *   ->where($e->eq($e->div('id', 2), 12)); +
435     * </code> +
436     * +
437     * @param string|array(string) +
438     * @return string an expression +
439     */ +
440    public function div(array $args) +
441    { +
442        return $this->basicMath('/', $args); +
443    } +
444 +
445    /** +
446     * Returns the SQL to check if two values are equal. +
447     * +
448     * Example: +
449     * <code> +
450     * $q = new Doctrine_Query(); +
451     * $q->select('u.*') +
452     *   ->from('User u') +
453     *   ->where($q->expr->eq('id', 1)); +
454     * </code> +
455     * +
456     * @param string $value1 logical expression to compare +
457     * @param string $value2 logical expression to compare with +
458     * @return string logical expression +
459     */ +
460    public function eq($value1, $value2) +
461    { +
462        $value1 = $this->getIdentifier($value1); +
463        $value2 = $this->getIdentifier($value2); +
464        return $value1 . ' = ' . $value2; +
465    } +
466 +
467    /** +
468     * Returns the SQL to check if two values are unequal. +
469     * +
470     * Example: +
471     * <code> +
472     * $q = new Doctrine_Query(); +
473     * $q->select('u.*') +
474     *   ->from('User u') +
475     *   ->where($q->expr->neq('id', 1)); +
476     * </code> +
477     * +
478     * @param string $value1 logical expression to compare +
479     * @param string $value2 logical expression to compare with +
480     * @return string logical expression +
481     */ +
482    public function neq($value1, $value2) +
483    { +
484        $value1 = $this->getIdentifier($value1); +
485        $value2 = $this->getIdentifier($value2); +
486        return $value1 . ' <> ' . $value2; +
487    } +
488 +
489    /** +
490     * Returns the SQL to check if one value is greater than another value. +
491     * +
492     * Example: +
493     * <code> +
494     * $q = new Doctrine_Query(); +
495     * $q->select('u.*') +
496     *   ->from('User u') +
497     *   ->where($q->expr->gt('id', 1)); +
498     * </code> +
499     * +
500     * @param string $value1 logical expression to compare +
501     * @param string $value2 logical expression to compare with +
502     * @return string logical expression +
503     */ +
504    public function gt($value1, $value2) +
505    { +
506        $value1 = $this->getIdentifier($value1); +
507        $value2 = $this->getIdentifier($value2); +
508        return $value1 . ' > ' . $value2; +
509    } +
510 +
511    /** +
512     * Returns the SQL to check if one value is greater than or equal to +
513     * another value. +
514     * +
515     * Example: +
516     * <code> +
517     * $q = new Doctrine_Query(); +
518     * $q->select('u.*') +
519     *   ->from('User u') +
520     *   ->where($q->expr->gte('id', 1)); +
521     * </code> +
522     * +
523     * @param string $value1 logical expression to compare +
524     * @param string $value2 logical expression to compare with +
525     * @return string logical expression +
526     */ +
527    public function gte($value1, $value2) +
528    { +
529        $value1 = $this->getIdentifier($value1); +
530        $value2 = $this->getIdentifier($value2); +
531        return $value1 . ' >= ' . $value2; +
532    } +
533 +
534    /** +
535     * Returns the SQL to check if one value is less than another value. +
536     * +
537     * Example: +
538     * <code> +
539     * $q = new Doctrine_Query(); +
540     * $q->select('u.*') +
541     *   ->from('User u') +
542     *   ->where($q->expr->lt('id', 1)); +
543     * </code> +
544     * +
545     * @param string $value1        logical expression to compare +
546     * @param string $value2        logical expression to compare with +
547     * @return string logical expression +
548     */ +
549    public function lt($value1, $value2) +
550    { +
551        $value1 = $this->getIdentifier($value1); +
552        $value2 = $this->getIdentifier($value2); +
553        return $value1 . ' < ' . $value2; +
554    } +
555 +
556    /** +
557     * Returns the SQL to check if one value is less than or equal to +
558     * another value. +
559     * +
560     * Example: +
561     * <code> +
562     * $q = new Doctrine_Query(); +
563     * $q->select('u.*') +
564     *   ->from('User u') +
565     *   ->where($q->expr->lte('id', 1)); +
566     * </code> +
567     * +
568     * @param string $value1        logical expression to compare +
569     * @param string $value2        logical expression to compare with +
570     * @return string logical expression +
571     */ +
572    public function lte($value1, $value2) +
573    { +
574        $value1 = $this->getIdentifier($value1); +
575        $value2 = $this->getIdentifier($value2); +
576        return $value1 . ' <= ' . $value2; +
577    } +
578 +
579    /** +
580     * Returns the SQL to check if a value is one in a set of +
581     * given values.. +
582     * +
583     * in() accepts an arbitrary number of parameters. The first parameter +
584     * must always specify the value that should be matched against. Successive +
585     * must contain a logical expression or an array with logical expressions. +
586     * These expressions will be matched against the first parameter. +
587     * +
588     * Example: +
589     * <code> +
590     * $q = new Doctrine_Query(); +
591     * $q->select('u.*') +
592     *   ->from('User u') +
593     *   ->where($q->expr->in( 'id', array(1,2,3))); +
594     * </code> +
595     * +
596     * @param string $column        the value that should be matched against +
597     * @param string|array(string)  values that will be matched against $column +
598     * @return string logical expression +
599     */ +
600    public function in($column, $values) +
601    { +
602        if ( ! is_array($values)) { +
603            $values = array($values); +
604        } +
605        $values = $this->getIdentifiers($values); +
606        $column = $this->getIdentifier($column); +
607 +
608        if (count($values) == 0) { +
609            throw new Doctrine_Expression_Exception('Values array for IN operator should not be empty.'); +
610        } +
611        return $column . ' IN (' . implode(', ', $values) . ')'; +
612    } +
613    /** +
614     * Returns SQL that checks if a expression is null. +
615     * +
616     * Example: +
617     * <code> +
618     * $q = new Doctrine_Query(); +
619     * $q->select('u.*') +
620     *   ->from('User u') +
621     *   ->where($q->expr->isNull('id')); +
622     * </code> +
623     * +
624     * @param string $expression the expression that should be compared to null +
625     * @return string logical expression +
626     */ +
627    public function isNull($expression) +
628    { +
629        $expression = $this->getIdentifier($expression); +
630        return $expression . ' IS NULL'; +
631    } +
632    /** +
633     * Returns SQL that checks if a expression is not null. +
634     * +
635     * Example: +
636     * <code> +
637     * $q = new Doctrine_Query(); +
638     * $q->select('u.*') +
639     *   ->from('User u') +
640     *   ->where($q->expr->isNotNull('id')); +
641     * </code> +
642     * +
643     * @param string $expression the expression that should be compared to null +
644     * @return string logical expression +
645     */ +
646    public function isNotNull($expression) +
647    { +
648        $expression = $this->getIdentifier($expression); +
649        return $expression . ' IS NOT NULL'; +
650    } +
651    /** +
652     * Returns SQL that checks if an expression evaluates to a value between +
653     * two values. +
654     * +
655     * The parameter $expression is checked if it is between $value1 and $value2. +
656     * +
657     * Note: There is a slight difference in the way BETWEEN works on some databases. +
658     * http://www.w3schools.com/sql/sql_between.asp. If you want complete database +
659     * independence you should avoid using between(). +
660     * +
661     * Example: +
662     * <code> +
663     * $q = new Doctrine_Query(); +
664     * $q->select('u.*') +
665     *   ->from('User u') +
666     *   ->where($q->expr->between('id', 1, 5)); +
667     * </code> +
668     * +
669     * @param string $expression the value to compare to +
670     * @param string $value1 the lower value to compare with +
671     * @param string $value2 the higher value to compare with +
672     * @return string logical expression +
673     */ +
674    public function between($expression, $value1, $value2) +
675    { +
676        $expression = $this->getIdentifier($expression); +
677        $value1 = $this->getIdentifier($value1); +
678        $value2 = $this->getIdentifier($value2); +
679        return $expression . ' BETWEEN ' .$value1 . ' AND ' . $value2; +
680    } +
681    /** +
682     * Returns global unique identifier +
683     * +
684     * @return string to get global unique identifier +
685     */ +
686    public function guid() +
687    { +
688        throw new Doctrine_Expression_Exception('method not implemented'); +
689    } +
690    /** +
691     * returns arcus cosine SQL string +
692     * +
693     * @return string +
694     */ +
695    public function acos($value) +
696    { +
697        return 'ACOS(' . $value . ')'; +
698    } +
699    /** +
700     * __call +
701     * +
702     * for all native RDBMS functions the function name itself is returned +
703     */ +
704    public function __call($m, $a)  +
705    { +
706        if ($this->conn->getAttribute(Doctrine::ATTR_PORTABILITY) & Doctrine::PORTABILITY_EXPR) { +
707            throw new Doctrine_Expression_Exception('Unknown expression ' . $m); +
708        } +
709        return $m . '(' . implode(', ', $a) . ')'; +
710    } +
711}
\ No newline at end of file diff --git a/tests/coverage/Doctrine_Expression_Exception.html b/tests/coverage/Doctrine_Expression_Exception.html new file mode 100644 index 000000000..2ec28070d --- /dev/null +++ b/tests/coverage/Doctrine_Expression_Exception.html @@ -0,0 +1,113 @@ + + + Coverage for Doctrine_Expression_Exception + + +

Coverage for Doctrine_Expression_Exception

Back to coverage report

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
1<?php +
2/* +
3 *  $Id: Exception.php 2702 2007-10-03 21:43:22Z Jonathan.Wage $ +
4 * +
5 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +
6 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +
7 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +
8 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +
9 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +
10 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +
11 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +
12 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +
13 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +
14 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +
15 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +
16 * +
17 * This software consists of voluntary contributions made by many individuals +
18 * and is licensed under the LGPL. For more information, see +
19 * <http://www.phpdoctrine.com>. +
20 */ +
21Doctrine::autoload('Doctrine_Exception'); +
22/** +
23 * Doctrine_Expression_Exception +
24 * +
25 * @package     Doctrine +
26 * @subpackage  Expression +
27 * @license     http://www.opensource.org/licenses/lgpl-license.php LGPL +
28 * @link        www.phpdoctrine.com +
29 * @since       1.0 +
30 * @version     $Revision: 2702 $ +
31 * @author      Konsta Vesterinen <kvesteri@cc.hut.fi> +
32 */ +
33class Doctrine_Expression_Exception extends Doctrine_Exception +
34{ }
\ No newline at end of file diff --git a/tests/coverage/Doctrine_Expression_Mock.html b/tests/coverage/Doctrine_Expression_Mock.html new file mode 100644 index 000000000..f709a383b --- /dev/null +++ b/tests/coverage/Doctrine_Expression_Mock.html @@ -0,0 +1,116 @@ + + + Coverage for Doctrine_Expression_Mock + + +

Coverage for Doctrine_Expression_Mock

Back to coverage report

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
1<?php +
2/* +
3 *  $Id$ +
4 * +
5 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +
6 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +
7 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +
8 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +
9 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +
10 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +
11 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +
12 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +
13 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +
14 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +
15 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +
16 * +
17 * This software consists of voluntary contributions made by many individuals +
18 * and is licensed under the LGPL. For more information, see +
19 * <http://www.phpdoctrine.com>. +
20 */ +
21Doctrine::autoload('Doctrine_Connection_Module'); +
22/** +
23 * Doctrine_Expression_Mock +
24 * Mock driver that is used for testing purposes +
25 * +
26 * @package     Doctrine +
27 * @subpackage  Expression +
28 * @license     http://www.opensource.org/licenses/lgpl-license.php LGPL +
29 * @link        www.phpdoctrine.com +
30 * @since       1.0 +
31 * @version     $Revision$ +
32 * @author      Konsta Vesterinen <kvesteri@cc.hut.fi> +
33 */ +
34class Doctrine_Expression_Mock extends Doctrine_Expression_Driver +
35{ }
\ No newline at end of file diff --git a/tests/coverage/Doctrine_Expression_Mysql.html b/tests/coverage/Doctrine_Expression_Mysql.html new file mode 100644 index 000000000..ca7ccf10e --- /dev/null +++ b/tests/coverage/Doctrine_Expression_Mysql.html @@ -0,0 +1,341 @@ + + + Coverage for Doctrine_Expression_Mysql + + +

Coverage for Doctrine_Expression_Mysql

Back to coverage report

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
1<?php +
2/* +
3 *  $Id: Mysql.php 2702 2007-10-03 21:43:22Z Jonathan.Wage $ +
4 * +
5 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +
6 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +
7 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +
8 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +
9 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +
10 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +
11 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +
12 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +
13 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +
14 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +
15 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +
16 * +
17 * This software consists of voluntary contributions made by many individuals +
18 * and is licensed under the LGPL. For more information, see +
19 * <http://www.phpdoctrine.com>. +
20 */ +
21Doctrine::autoload('Doctrine_Expression_Driver'); +
22/** +
23 * Doctrine_Expression_Mysql +
24 * +
25 * @package     Doctrine +
26 * @subpackage  Expression +
27 * @license     http://www.opensource.org/licenses/lgpl-license.php LGPL +
28 * @link        www.phpdoctrine.com +
29 * @since       1.0 +
30 * @version     $Revision: 2702 $ +
31 * @author      Konsta Vesterinen <kvesteri@cc.hut.fi> +
32 */ +
33class Doctrine_Expression_Mysql extends Doctrine_Expression_Driver +
34{ +
35    /** +
36     * returns the regular expression operator +
37     * +
38     * @return string +
39     */ +
40    public function regexp() +
41    { +
42        return 'RLIKE'; +
43    } +
44    /** +
45     * return string to call a function to get random value inside an SQL statement +
46     * +
47     * @return string to generate float between 0 and 1 +
48     */ +
49    public function random() +
50    { +
51        return 'RAND()'; +
52    } +
53    /** +
54     * build a pattern matching string +
55     * +
56     * EXPERIMENTAL +
57     * +
58     * WARNING: this function is experimental and may change signature at +
59     * any time until labelled as non-experimental +
60     * +
61     * @access public +
62     * +
63     * @param array $pattern even keys are strings, odd are patterns (% and _) +
64     * @param string $operator optional pattern operator (LIKE, ILIKE and maybe others in the future) +
65     * @param string $field optional field name that is being matched against +
66     *                  (might be required when emulating ILIKE) +
67     * +
68     * @return string SQL pattern +
69     */ +
70    public function matchPattern($pattern, $operator = null, $field = null) +
71    { +
72        $match = ''; +
73        if ( ! is_null($operator)) { +
74            $field = is_null($field) ? '' : $field.' '; +
75            $operator = strtoupper($operator); +
76            switch ($operator) { +
77                // case insensitive +
78                case 'ILIKE': +
79                    $match = $field.'LIKE '; +
80                    break; +
81                // case sensitive +
82                case 'LIKE': +
83                    $match = $field.'LIKE BINARY '; +
84                    break; +
85                default: +
86                    throw new Doctrine_Expression_Mysql_Exception('not a supported operator type:'. $operator); +
87            } +
88        } +
89        $match.= "'"; +
90        foreach ($pattern as $key => $value) { +
91            if ($key % 2) { +
92                $match .= $value; +
93            } else { +
94                $match .= $this->conn->escapePattern($this->conn->escape($value)); +
95            } +
96        } +
97        $match.= "'"; +
98        $match.= $this->patternEscapeString(); +
99        return $match; +
100    } +
101    /** +
102     * Returns global unique identifier +
103     * +
104     * @return string to get global unique identifier +
105     */ +
106    public function guid() +
107    { +
108        return 'UUID()'; +
109    } +
110}
\ No newline at end of file diff --git a/tests/coverage/Doctrine_Expression_Pgsql.html b/tests/coverage/Doctrine_Expression_Pgsql.html new file mode 100644 index 000000000..8327d2a8a --- /dev/null +++ b/tests/coverage/Doctrine_Expression_Pgsql.html @@ -0,0 +1,683 @@ + + + Coverage for Doctrine_Expression_Pgsql + + +

Coverage for Doctrine_Expression_Pgsql

Back to coverage report

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
1<?php +
2/* +
3 *  $Id: Pgsql.php 2702 2007-10-03 21:43:22Z Jonathan.Wage $ +
4 * +
5 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +
6 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +
7 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +
8 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +
9 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +
10 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +
11 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +
12 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +
13 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +
14 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +
15 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +
16 * +
17 * This software consists of voluntary contributions made by many individuals +
18 * and is licensed under the LGPL. For more information, see +
19 * <http://www.phpdoctrine.com>. +
20 */ +
21Doctrine::autoload('Doctrine_Expression_Driver'); +
22/** +
23 * Doctrine_Expression_Pgsql +
24 * +
25 * @package     Doctrine +
26 * @subpackage  Expression +
27 * @license     http://www.opensource.org/licenses/lgpl-license.php LGPL +
28 * @link        www.phpdoctrine.com +
29 * @since       1.0 +
30 * @version     $Revision: 2702 $ +
31 * @author      Konsta Vesterinen <kvesteri@cc.hut.fi> +
32 */ +
33class Doctrine_Expression_Pgsql extends Doctrine_Expression_Driver +
34{ +
35    /** +
36     * Returns the md5 sum of a field. +
37     * +
38     * Note: Not SQL92, but common functionality +
39     * +
40     * md5() works with the default PostgreSQL 8 versions. +
41     * +
42     * If you are using PostgreSQL 7.x or older you need +
43     * to make sure that the digest procedure is installed. +
44     * If you use RPMS (Redhat and Mandrake) install the postgresql-contrib +
45     * package. You must then install the procedure by running this shell command: +
46     * <code> +
47     * psql [dbname] < /usr/share/pgsql/contrib/pgcrypto.sql +
48     * </code> +
49     * You should make sure you run this as the postgres user. +
50     * +
51     * @return string +
52     */ +
53    public function md5($column) +
54    { +
55        $column = $this->getIdentifier($column); +
56 +
57        if ($this->version > 7) { +
58            return 'MD5(' . $column . ')'; +
59        } else { +
60            return 'encode(digest(' . $column .', md5), hex)'; +
61        } +
62    } +
63 +
64    /** +
65     * Returns part of a string. +
66     * +
67     * Note: Not SQL92, but common functionality. +
68     * +
69     * @param string $value the target $value the string or the string column. +
70     * @param int $from extract from this characeter. +
71     * @param int $len extract this amount of characters. +
72     * @return string sql that extracts part of a string. +
73     */ +
74    public function substring($value, $from, $len = null) +
75    { +
76        $value = $this->getIdentifier($value); +
77 +
78        if ($len === null) { +
79            $len = $this->getIdentifier($len); +
80            return 'SUBSTR(' . $value . ', ' . $from . ')'; +
81        } else { +
82            return 'SUBSTR(' . $value . ', ' . $from . ', ' . $len . ')'; +
83        } +
84    } +
85 +
86    /** +
87     * Returns a series of strings concatinated +
88     * +
89     * concat() accepts an arbitrary number of parameters. Each parameter +
90     * must contain an expression or an array with expressions. +
91     * +
92     * @param string|array(string) strings that will be concatinated. +
93     * @return string +
94     */ +
95 +
96 +
97    /** +
98     * PostgreSQLs AGE(<timestamp1> [, <timestamp2>]) function. +
99     * +
100     * @param string $timestamp1 timestamp to subtract from NOW() +
101     * @param string $timestamp2 optional; if given: subtract arguments +
102     * @return string +
103     */ +
104    public function age($timestamp1, $timestamp2 = null) { +
105        if ( $timestamp2 == null ) { +
106            return 'AGE(' . $timestamp1 . ')'; +
107        } +
108        return 'AGE(' . $timestamp1 . ', ' . $timestamp2 . ')'; +
109    } +
110 +
111    /** +
112     * PostgreSQLs DATE_PART( <text>, <time> ) function. +
113     * +
114     * @param string $text what to extract +
115     * @param string $time timestamp or interval to extract from +
116     * @return string +
117     */ +
118    public function date_part($text, $time) { +
119        return 'DATE_PART(' . $text . ', ' . $time . ')'; +
120    } +
121 +
122 +
123    /** +
124     * PostgreSQLs TO_CHAR( <time>, <text> ) function. +
125     * +
126     * @param string $time timestamp or interval +
127     * @param string $text how to the format the output +
128     * @return string +
129     */ +
130    public function to_char($time, $text) { +
131        return 'TO_CHAR(' . $time . ', ' . $text . ')'; +
132    } +
133 +
134    /** +
135     * PostgreSQLs CONCAT() function +
136     * +
137     * @param  an array of values +
138     * @return string +
139     */ +
140    public function concat() +
141    { +
142        $args = func_get_args(); +
143 +
144        return join(' || ' , $args); +
145    } +
146    /** +
147     * Returns the SQL string to return the current system date and time. +
148     * +
149     * @return string +
150     */ +
151    public function now() +
152    { +
153        return 'LOCALTIMESTAMP(0)'; +
154    } +
155 +
156    /** +
157     * regexp +
158     * +
159     * @return string           the regular expression operator +
160     */ +
161    public function regexp() +
162    { +
163        return 'SIMILAR TO'; +
164    } +
165 +
166    /** +
167     * return string to call a function to get random value inside an SQL statement +
168     * +
169     * @return return string to generate float between 0 and 1 +
170     * @access public +
171     */ +
172    public function random() +
173    { +
174        return 'RANDOM()'; +
175    } +
176    /** +
177     * build a pattern matching string +
178     * +
179     * EXPERIMENTAL +
180     * +
181     * WARNING: this function is experimental and may change signature at +
182     * any time until labelled as non-experimental +
183     * +
184     * @access public +
185     * +
186     * @param array $pattern even keys are strings, odd are patterns (% and _) +
187     * @param string $operator optional pattern operator (LIKE, ILIKE and maybe others in the future) +
188     * @param string $field optional field name that is being matched against +
189     *                  (might be required when emulating ILIKE) +
190     * +
191     * @return string SQL pattern +
192     */ +
193    public function matchPattern($pattern, $operator = null, $field = null) +
194    { +
195        $match = ''; +
196        if ( ! is_null($operator)) { +
197            $field = is_null($field) ? '' : $field.' '; +
198            $operator = strtoupper($operator); +
199            switch ($operator) { +
200                // case insensitive +
201            case 'ILIKE': +
202                $match = $field.'ILIKE '; +
203                break; +
204                // case sensitive +
205            case 'LIKE': +
206                $match = $field.'LIKE '; +
207                break; +
208            default: +
209                throw new Doctrine_Expression_Pgsql_Exception('not a supported operator type:'. $operator); +
210            } +
211        } +
212        $match.= "'"; +
213        foreach ($pattern as $key => $value) { +
214            if ($key % 2) { +
215                $match.= $value; +
216            } else { +
217                $match.= $this->conn->escapePattern($this->conn->escape($value)); +
218            } +
219        } +
220        $match.= "'"; +
221        $match.= $this->patternEscapeString(); +
222        return $match; +
223    } +
224}
\ No newline at end of file diff --git a/tests/coverage/Doctrine_Expression_Sqlite.html b/tests/coverage/Doctrine_Expression_Sqlite.html new file mode 100644 index 000000000..de42845f3 --- /dev/null +++ b/tests/coverage/Doctrine_Expression_Sqlite.html @@ -0,0 +1,506 @@ + + + Coverage for Doctrine_Expression_Sqlite + + +

Coverage for Doctrine_Expression_Sqlite

Back to coverage report

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
1<?php +
2/* +
3 *  $Id: Sqlite.php 2702 2007-10-03 21:43:22Z Jonathan.Wage $ +
4 * +
5 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +
6 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +
7 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +
8 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +
9 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +
10 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +
11 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +
12 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +
13 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +
14 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +
15 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +
16 * +
17 * This software consists of voluntary contributions made by many individuals +
18 * and is licensed under the LGPL. For more information, see +
19 * <http://www.phpdoctrine.com>. +
20 */ +
21Doctrine::autoload('Doctrine_Expression_Driver'); +
22/** +
23 * Doctrine_Expression_Sqlite +
24 * +
25 * @package     Doctrine +
26 * @subpackage  Expression +
27 * @license     http://www.opensource.org/licenses/lgpl-license.php LGPL +
28 * @link        www.phpdoctrine.com +
29 * @since       1.0 +
30 * @version     $Revision: 2702 $ +
31 * @author      Konsta Vesterinen <kvesteri@cc.hut.fi> +
32 */ +
33class Doctrine_Expression_Sqlite extends Doctrine_Expression_Driver +
34{ +
35    /** +
36     * Returns the md5 sum of the data that SQLite's md5() function receives. +
37     * +
38     * @param mixed $data +
39     * @return string +
40     */ +
41    public static function md5Impl($data) +
42    { +
43        return md5($data); +
44    } +
45    /** +
46     * Returns the modules of the data that SQLite's mod() function receives. +
47     * +
48     * @param integer $dividend +
49     * @param integer $divisor +
50     * @return string +
51     */ +
52    public static function modImpl($dividend, $divisor) +
53    { +
54        return $dividend % $divisor; +
55    } +
56 +
57    /** +
58     * Returns a concatenation of the data that SQLite's concat() function receives. +
59     * +
60     * @return string +
61     */ +
62    public static function concatImpl() +
63    { +
64        $args = func_get_args(); +
65        return join('', $args); +
66    } +
67    /** +
68     * locate +
69     * returns the position of the first occurrence of substring $substr in string $str that +
70     * SQLite's locate() function receives +
71     * +
72     * @param string $substr    literal string to find +
73     * @param string $str       literal string +
74     * @return string +
75     */ +
76    public static function locateImpl($substr, $str) +
77    { +
78        return strpos($str, $substr); +
79    } +
80    public static function sha1Impl($str) +
81    { +
82        return sha1($str); +
83    } +
84    public static function ltrimImpl($str) +
85    { +
86        return ltrim($str); +
87    } +
88    public static function rtrimImpl($str) +
89    { +
90        return rtrim($str); +
91    } +
92    public static function trimImpl($str) +
93    { +
94        return trim($str); +
95    } +
96    /** +
97     * returns the regular expression operator +
98     * +
99     * @return string +
100     */ +
101    public function regexp() +
102    { +
103        return 'RLIKE'; +
104    } +
105    /** +
106     * soundex +
107     * Returns a string to call a function to compute the +
108     * soundex encoding of a string +
109     * +
110     * The string "?000" is returned if the argument is NULL. +
111     * +
112     * @param string $value +
113     * @return string   SQL soundex function with given parameter +
114     */ +
115    public function soundex($value) +
116    { +
117        return 'SOUNDEX(' . $value . ')'; +
118    } +
119    /** +
120     * Return string to call a variable with the current timestamp inside an SQL statement +
121     * There are three special variables for current date and time. +
122     * +
123     * @return string       sqlite function as string +
124     */ +
125    public function now($type = 'timestamp') +
126    { +
127        switch ($type) { +
128            case 'time': +
129                return 'time(\'now\')'; +
130            case 'date': +
131                return 'date(\'now\')'; +
132            case 'timestamp': +
133            default: +
134                return 'datetime(\'now\')'; +
135        } +
136    } +
137    /** +
138     * return string to call a function to get random value inside an SQL statement +
139     * +
140     * @return string to generate float between 0 and 1 +
141     */ +
142    public function random() +
143    { +
144        return '((RANDOM() + 2147483648) / 4294967296)'; +
145    } +
146    /** +
147     * return string to call a function to get a substring inside an SQL statement +
148     * +
149     * Note: Not SQL92, but common functionality. +
150     * +
151     * SQLite only supports the 2 parameter variant of this function +
152     * +
153     * @param string $value         an sql string literal or column name/alias +
154     * @param integer $position     where to start the substring portion +
155     * @param integer $length       the substring portion length +
156     * @return string               SQL substring function with given parameters +
157     */ +
158    public function substring($value, $position, $length = null) +
159    { +
160        if ($length !== null) { +
161            return 'SUBSTR(' . $value . ', ' . $position . ', ' . $length . ')'; +
162        } +
163        return 'SUBSTR(' . $value . ', ' . $position . ', LENGTH(' . $value . '))'; +
164    } +
165}
\ No newline at end of file diff --git a/tests/coverage/Doctrine_Formatter.html b/tests/coverage/Doctrine_Formatter.html new file mode 100644 index 000000000..fd6a967a6 --- /dev/null +++ b/tests/coverage/Doctrine_Formatter.html @@ -0,0 +1,677 @@ + + + Coverage for Doctrine_Formatter + + +

Coverage for Doctrine_Formatter

Back to coverage report

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
1<?php +
2/* +
3 *  $Id$ +
4 * +
5 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +
6 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +
7 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +
8 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +
9 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +
10 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +
11 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +
12 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +
13 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +
14 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +
15 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +
16 * +
17 * This software consists of voluntary contributions made by many individuals +
18 * and is licensed under the LGPL. For more information, see +
19 * <http://www.phpdoctrine.com>. +
20 */ +
21Doctrine::autoload('Doctrine_Connection_Module'); +
22/** +
23 * Doctrine_Formatter +
24 * +
25 * @package     Doctrine +
26 * @subpackage  Formatter +
27 * @license     http://www.opensource.org/licenses/lgpl-license.php LGPL +
28 * @link        www.phpdoctrine.com +
29 * @since       1.0 +
30 * @version     $Revision$ +
31 * @author      Konsta Vesterinen <kvesteri@cc.hut.fi> +
32 */ +
33class Doctrine_Formatter extends Doctrine_Connection_Module +
34{ +
35    /** +
36     * Quotes pattern (% and _) characters in a string) +
37     * +
38     * EXPERIMENTAL +
39     * +
40     * WARNING: this function is experimental and may change signature at +
41     * any time until labelled as non-experimental +
42     * +
43     * @param   string  the input string to quote +
44     * +
45     * @return  string  quoted string +
46     */ +
47    public function escapePattern($text) +
48    { +
49        if ($this->string_quoting['escape_pattern']) { +
50            $tmp = $this->conn->string_quoting; +
51 +
52            $text = str_replace($tmp['escape_pattern'],  +
53                                $tmp['escape_pattern'] . +
54                                $tmp['escape_pattern'], $text); +
55 +
56            foreach ($this->wildcards as $wildcard) { +
57                $text = str_replace($wildcard, $tmp['escape_pattern'] . $wildcard, $text); +
58            } +
59        } +
60        return $text; +
61    } +
62    /** +
63     * convertBooleans +
64     * some drivers need the boolean values to be converted into integers +
65     * when using DQL API +
66     * +
67     * This method takes care of that conversion +
68     * +
69     * @param array $item +
70     * @return void +
71     */ +
72    public function convertBooleans($item) +
73    { +
74        if (is_array($item)) { +
75            foreach ($item as $k => $value) { +
76                if (is_bool($value)) { +
77                    $item[$k] = (int) $value; +
78                } +
79            } +
80        } else { +
81            if (is_bool($item)) { +
82                $item = (int) $item; +
83            } +
84        } +
85        return $item; +
86    } +
87    /** +
88     * Quote a string so it can be safely used as a table or column name +
89     * +
90     * Delimiting style depends on which database driver is being used. +
91     * +
92     * NOTE: just because you CAN use delimited identifiers doesn't mean +
93     * you SHOULD use them.  In general, they end up causing way more +
94     * problems than they solve. +
95     * +
96     * Portability is broken by using the following characters inside +
97     * delimited identifiers: +
98     *   + backtick (<kbd>`</kbd>) -- due to MySQL +
99     *   + double quote (<kbd>"</kbd>) -- due to Oracle +
100     *   + brackets (<kbd>[</kbd> or <kbd>]</kbd>) -- due to Access +
101     * +
102     * Delimited identifiers are known to generally work correctly under +
103     * the following drivers: +
104     *   + mssql +
105     *   + mysql +
106     *   + mysqli +
107     *   + oci8 +
108     *   + pgsql +
109     *   + sqlite +
110     * +
111     * InterBase doesn't seem to be able to use delimited identifiers +
112     * via PHP 4.  They work fine under PHP 5. +
113     * +
114     * @param string $str           identifier name to be quoted +
115     * @param bool $checkOption     check the 'quote_identifier' option +
116     * +
117     * @return string               quoted identifier string +
118     */ +
119    public function quoteIdentifier($str, $checkOption = true) +
120    { +
121        if ($checkOption && ! $this->conn->getAttribute(Doctrine::ATTR_QUOTE_IDENTIFIER)) { +
122            return $str; +
123        } +
124        $tmp = $this->conn->identifier_quoting; +
125        $str = str_replace($tmp['end'], +
126                           $tmp['escape'] . +
127                           $tmp['end'], $str); +
128 +
129        return $tmp['start'] . $str . $tmp['end']; +
130    } +
131    /** +
132     * quote +
133     * quotes given input parameter +
134     * +
135     * @param mixed $input      parameter to be quoted +
136     * @param string $type +
137     * @return mixed +
138     */ +
139    public function quote($input, $type = null) +
140    { +
141        if ($type == null) { +
142            $type = gettype($input); +
143        } +
144        switch ($type) { +
145            case 'integer': +
146            case 'enum': +
147            case 'boolean': +
148            case 'double': +
149            case 'float': +
150            case 'bool': +
151            case 'decimal': +
152            case 'int': +
153                return $input; +
154            case 'array': +
155            case 'object': +
156                $input = serialize($input); +
157            case 'string': +
158            case 'char': +
159            case 'varchar': +
160            case 'text': +
161            case 'gzip': +
162            case 'blob': +
163            case 'clob': +
164                $this->conn->connect(); +
165 +
166                return $this->conn->getDbh()->quote($input); +
167        } +
168    } +
169    /** +
170     * Removes any formatting in an sequence name using the 'seqname_format' option +
171     * +
172     * @param string $sqn string that containts name of a potential sequence +
173     * @return string name of the sequence with possible formatting removed +
174     */ +
175    public function fixSequenceName($sqn) +
176    { +
177        $seqPattern = '/^'.preg_replace('/%s/', '([a-z0-9_]+)',  $this->conn->getAttribute(Doctrine::ATTR_SEQNAME_FORMAT)).'$/i'; +
178        $seqName    = preg_replace($seqPattern, '\\1', $sqn); +
179 +
180        if ($seqName && ! strcasecmp($sqn, $this->getSequenceName($seqName))) { +
181            return $seqName; +
182        } +
183        return $sqn; +
184    } +
185    /** +
186     * Removes any formatting in an index name using the 'idxname_format' option +
187     * +
188     * @param string $idx string that containts name of anl index +
189     * @return string name of the index with possible formatting removed +
190     */ +
191    public function fixIndexName($idx) +
192    { +
193        $indexPattern   = '/^'.preg_replace('/%s/', '([a-z0-9_]+)', $this->conn->getAttribute(Doctrine::ATTR_IDXNAME_FORMAT)).'$/i'; +
194        $indexName      = preg_replace($indexPattern, '\\1', $idx); +
195        if ($indexName && ! strcasecmp($idx, $this->getIndexName($indexName))) { +
196            return $indexName; +
197        } +
198        return $idx; +
199    } +
200    /** +
201     * adds sequence name formatting to a sequence name +
202     * +
203     * @param string    name of the sequence +
204     * @return string   formatted sequence name +
205     */ +
206    public function getSequenceName($sqn) +
207    { +
208        return sprintf($this->conn->getAttribute(Doctrine::ATTR_SEQNAME_FORMAT), +
209            preg_replace('/[^a-z0-9_\$.]/i', '_', $sqn)); +
210    } +
211    /** +
212     * adds index name formatting to a index name +
213     * +
214     * @param string    name of the index +
215     * @return string   formatted index name +
216     */ +
217    public function getIndexName($idx) +
218    { +
219        return sprintf($this->conn->getAttribute(Doctrine::ATTR_IDXNAME_FORMAT), +
220                preg_replace('/[^a-z0-9_\$]/i', '_', $idx)); +
221    } +
222}
\ No newline at end of file diff --git a/tests/coverage/Doctrine_Hook.html b/tests/coverage/Doctrine_Hook.html new file mode 100644 index 000000000..7e54f263d --- /dev/null +++ b/tests/coverage/Doctrine_Hook.html @@ -0,0 +1,656 @@ + + + Coverage for Doctrine_Hook + + +

Coverage for Doctrine_Hook

Back to coverage report

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
1<?php +
2/* +
3 *  $Id: Hook.php 2702 2007-10-03 21:43:22Z Jonathan.Wage $ +
4 * +
5 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +
6 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +
7 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +
8 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +
9 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +
10 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +
11 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +
12 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +
13 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +
14 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +
15 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +
16 * +
17 * This software consists of voluntary contributions made by many individuals +
18 * and is licensed under the LGPL. For more information, see +
19 * <http://www.phpdoctrine.com>. +
20 */ +
21 +
22/** +
23 * Doctrine_Hook +
24 * +
25 * @package     Doctrine +
26 * @subpackage  Hook +
27 * @license     http://www.opensource.org/licenses/lgpl-license.php LGPL +
28 * @link        www.phpdoctrine.com +
29 * @since       1.0 +
30 * @version     $Revision: 2702 $ +
31 * @author      Konsta Vesterinen <kvesteri@cc.hut.fi> +
32 */ +
33class Doctrine_Hook +
34{ +
35    /** +
36     * @var Doctrine_Query $query           the base query +
37     */ +
38    protected $query; +
39    /** +
40     * @var array $joins                    the optional joins of the base query +
41     */ +
42    protected $joins; +
43    /** +
44     * @var array $hooks                    hooks array +
45     */ +
46    protected $hooks        = array( +
47                             'where', +
48                             'orderby', +
49                             'limit', +
50                             'offset' +
51                              ); +
52    /** +
53     * @var array $fieldParsers             custom field parsers array +
54     *                                      keys as field names in the format componentAlias.FieldName +
55     *                                      values as parser names / objects +
56     */ +
57    protected $fieldParsers = array(); +
58 +
59    /** +
60     * @var array $typeParsers              type parsers array +
61     *                                      keys as type names and values as parser names / objects +
62     */ +
63    protected $typeParsers  = array( +
64                              'char'      => 'Doctrine_Hook_WordLike', +
65                              'string'    => 'Doctrine_Hook_WordLike', +
66                              'varchar'   => 'Doctrine_Hook_WordLike', +
67                              'integer'   => 'Doctrine_Hook_Integer', +
68                              'enum'      => 'Doctrine_Hook_Integer', +
69                              'time'      => 'Doctrine_Hook_Time', +
70                              'date'      => 'Doctrine_Hook_Date', +
71                              ); +
72 +
73    /** +
74     * @param Doctrine_Query $query         the base query +
75     */ +
76    public function __construct($query) +
77    { +
78        if (is_string($query)) { +
79            $this->query = new Doctrine_Query(); +
80            $this->query->parseQuery($query); +
81        } elseif ($query instanceof Doctrine_Query) { +
82            $this->query = $query; +
83        } else { +
84            throw new Doctrine_Exception('Constructor argument should be either Doctrine_Query object or valid DQL query');           +
85        } +
86         +
87        $this->query->getQuery(); +
88    } +
89    /** +
90     * getQuery +
91     * +
92     * @return Doctrine_Query       returns the query object associated with this hook +
93     */ +
94    public function getQuery() +
95    { +
96        return $this->query; +
97    } +
98    /** +
99     * setTypeParser +
100     * +
101     * @param string $type              type name +
102     * @param string|object $parser     parser name or custom parser object +
103     */ +
104    public function setTypeParser($type, $parser)  +
105    { +
106        $this->typeParsers[$type] = $parser; +
107    } +
108    /** +
109     * setFieldParser +
110     * +
111     * @param string $field             field name +
112     * @param string|object $parser     parser name or custom parser object +
113     */ +
114    public function setFieldParser($field, $parser) +
115    { +
116        $this->fieldParsers[$field] = $parser; +
117    } +
118    /** +
119     * hookWhere +
120     * builds DQL query where part from given parameter array +
121     * +
122     * @param array $params         an associative array containing field +
123     *                              names and their values +
124     * @return boolean              whether or not the hooking was +
125     */ +
126    public function hookWhere($params) +
127    { +
128        if ( ! is_array($params)) { +
129            return false; +
130        } +
131        foreach ($params as $name => $value) { +
132            if ($value === '' || $value === '-') { +
133                continue; +
134            } +
135            $e = explode('.', $name); +
136 +
137            if (count($e) == 2) { +
138                list($alias, $column) = $e; +
139 +
140                $map   = $this->query->getAliasDeclaration($alias); +
141                $table = $map['table']; +
142 +
143                if ( ! $table) { +
144                    throw new Doctrine_Exception('Unknown alias ' . $alias); +
145                } +
146 +
147                if ($def = $table->getDefinitionOf($column)) { +
148 +
149                $def[0] = gettype($value); +
150                    if (isset($this->typeParsers[$def[0]])) { +
151                        $name   = $this->typeParsers[$def[0]]; +
152                        $parser = new $name; +
153                    } +
154 +
155                    $parser->parse($alias, $column, $value); +
156 +
157                    $this->query->addWhere($parser->getCondition(), $parser->getParams()); +
158                } +
159            } +
160        } +
161 +
162        return true; +
163    } +
164    /** +
165     * hookOrderBy +
166     * builds DQL query orderby part from given parameter array +
167     * +
168     * @param array $params         an array containing all fields which the built query +
169     *                              should be ordered by +
170     * @return boolean              whether or not the hooking was successful +
171     */ +
172    public function hookOrderby($params) +
173    { +
174        if ( ! is_array($params)) { +
175            return false; +
176        } +
177        foreach ($params as $name) { +
178            $e = explode(' ', $name); +
179 +
180            $order = 'ASC'; +
181 +
182            if (count($e) > 1) { +
183                $order = ($e[1] == 'DESC') ? 'DESC' : 'ASC'; +
184            } +
185 +
186            $e = explode('.', $e[0]); +
187 +
188            if (count($e) == 2) { +
189                list($alias, $column) = $e; +
190 +
191                $map   = $this->query->getAliasDeclaration($alias); +
192                $table = $map['table']; +
193 +
194                if ($def = $table->getDefinitionOf($column)) {    +
195                    $this->query->addOrderBy($alias . '.' . $column . ' ' . $order); +
196                } +
197            } +
198        } +
199        return true; +
200    } +
201    /** +
202     * @param integer $limit +
203     */ +
204    public function hookLimit($limit) +
205    { +
206        $this->query->limit((int) $limit); +
207    } +
208    /** +
209     * @param integer $offset +
210     */ +
211    public function hookOffset($offset) +
212    { +
213        $this->query->offset((int) $offset); +
214    } +
215}
\ No newline at end of file diff --git a/tests/coverage/Doctrine_Hook_Equal.html b/tests/coverage/Doctrine_Hook_Equal.html new file mode 100644 index 000000000..1acc9b352 --- /dev/null +++ b/tests/coverage/Doctrine_Hook_Equal.html @@ -0,0 +1,167 @@ + + + Coverage for Doctrine_Hook_Equal + + +

Coverage for Doctrine_Hook_Equal

Back to coverage report

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
1<?php +
2/* +
3 *  $Id: Equal.php 2702 2007-10-03 21:43:22Z Jonathan.Wage $ +
4 * +
5 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +
6 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +
7 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +
8 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +
9 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +
10 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +
11 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +
12 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +
13 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +
14 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +
15 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +
16 * +
17 * This software consists of voluntary contributions made by many individuals +
18 * and is licensed under the LGPL. For more information, see +
19 * <http://www.phpdoctrine.com>. +
20 */ +
21Doctrine::autoload('Doctrine_Hook_Parser'); +
22/** +
23 * Doctrine_Hook_Equal +
24 * +
25 * @package     Doctrine +
26 * @subpackage  Hook +
27 * @license     http://www.opensource.org/licenses/lgpl-license.php LGPL +
28 * @link        www.phpdoctrine.com +
29 * @since       1.0 +
30 * @version     $Revision: 2702 $ +
31 * @author      Konsta Vesterinen <kvesteri@cc.hut.fi> +
32 */ +
33class Doctrine_Hook_Equal extends Doctrine_Hook_Parser +
34{ +
35    /** +
36     * parse +
37     * Parses given field and field value to DQL condition +
38     * and parameters. This method should always return +
39     * prepared statement conditions (conditions that use +
40     * placeholders instead of literal values). +
41     * +
42     * @param string $alias     component alias +
43     * @param string $field     the field name +
44     * @param mixed $value      the value of the field +
45     * @return void +
46     */ +
47    public function parse($alias, $field, $value) +
48    { +
49        $this->params    = (array) $value; +
50        $this->condition = $alias . '.' . $field . ' = ?'; +
51    } +
52}
\ No newline at end of file diff --git a/tests/coverage/Doctrine_Hook_Integer.html b/tests/coverage/Doctrine_Hook_Integer.html new file mode 100644 index 000000000..a16f73a2c --- /dev/null +++ b/tests/coverage/Doctrine_Hook_Integer.html @@ -0,0 +1,236 @@ + + + Coverage for Doctrine_Hook_Integer + + +

Coverage for Doctrine_Hook_Integer

Back to coverage report

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
1<?php +
2/* +
3 *  $Id: Integer.php 2702 2007-10-03 21:43:22Z Jonathan.Wage $ +
4 * +
5 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +
6 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +
7 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +
8 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +
9 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +
10 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +
11 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +
12 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +
13 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +
14 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +
15 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +
16 * +
17 * This software consists of voluntary contributions made by many individuals +
18 * and is licensed under the LGPL. For more information, see +
19 * <http://www.phpdoctrine.com>. +
20 */ +
21Doctrine::autoload('Doctrine_Hook_Parser_Complex'); +
22/** +
23 * Doctrine_Hook_Integer +
24 * +
25 * @package     Doctrine +
26 * @subpackage  Hook +
27 * @license     http://www.opensource.org/licenses/lgpl-license.php LGPL +
28 * @link        www.phpdoctrine.com +
29 * @since       1.0 +
30 * @version     $Revision: 2702 $ +
31 * @author      Konsta Vesterinen <kvesteri@cc.hut.fi> +
32 */ +
33class Doctrine_Hook_Integer extends Doctrine_Hook_Parser_Complex +
34{ +
35    /** +
36     * parse +
37     * Parses given field and field value to DQL condition +
38     * and parameters. This method should always return +
39     * prepared statement conditions (conditions that use +
40     * placeholders instead of literal values). +
41     * +
42     * @param string $alias     component alias +
43     * @param string $field     the field name +
44     * @param mixed $value      the value of the field +
45     * @return void +
46     */ +
47    public function parseSingle($alias, $field, $value) +
48    { +
49        $e = explode(' ', $value); +
50 +
51        foreach ($e as $v) { +
52             $v = trim($v); +
53 +
54             $e2   = explode('-', $v); +
55 +
56            $name = $alias. '.' . $field; +
57 +
58             if (count($e2) == 1) { +
59                 // one '-' found +
60 +
61                $a[] = $name . ' = ?'; +
62 +
63                $this->params[] = $v; +
64            } else { +
65                // more than one '-' found +
66 +
67                $a[] = '(' . $name . ' > ? AND ' . $name . ' < ?)'; +
68 +
69                $this->params += array($e2[0], $e2[1]); +
70            } +
71 +
72        } +
73        return implode(' OR ', $a); +
74    } +
75}
\ No newline at end of file diff --git a/tests/coverage/Doctrine_Hook_Parser.html b/tests/coverage/Doctrine_Hook_Parser.html new file mode 100644 index 000000000..7738c6d2b --- /dev/null +++ b/tests/coverage/Doctrine_Hook_Parser.html @@ -0,0 +1,206 @@ + + + Coverage for Doctrine_Hook_Parser + + +

Coverage for Doctrine_Hook_Parser

Back to coverage report

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
1<?php +
2/* +
3 *  $Id: Parser.php 2702 2007-10-03 21:43:22Z Jonathan.Wage $ +
4 * +
5 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +
6 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +
7 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +
8 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +
9 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +
10 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +
11 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +
12 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +
13 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +
14 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +
15 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +
16 * +
17 * This software consists of voluntary contributions made by many individuals +
18 * and is licensed under the LGPL. For more information, see +
19 * <http://www.phpdoctrine.com>. +
20 */ +
21 +
22/** +
23 * Doctrine_Hook_Parser +
24 * +
25 * @package     Doctrine +
26 * @subpackage  Hook +
27 * @license     http://www.opensource.org/licenses/lgpl-license.php LGPL +
28 * @link        www.phpdoctrine.com +
29 * @since       1.0 +
30 * @version     $Revision: 2702 $ +
31 * @author      Konsta Vesterinen <kvesteri@cc.hut.fi> +
32 */ +
33abstract class Doctrine_Hook_Parser +
34{ +
35    protected $condition; +
36    protected $params = array(); +
37 +
38    public function getCondition() +
39    { +
40        return $this->condition; +
41    } +
42    /** +
43     * getParams +
44     * returns the parameters associated with this parser +
45     * +
46     * @return array +
47     */ +
48    public function getParams() +
49    { +
50        return $this->params; +
51    } +
52    /** +
53     * parse +
54     * Parses given field and field value to DQL condition +
55     * and parameters. This method should always return +
56     * prepared statement conditions (conditions that use +
57     * placeholders instead of literal values). +
58     * +
59     * @param string $alias     component alias +
60     * @param string $field     the field name +
61     * @param mixed $value      the value of the field +
62     * @return void +
63     */ +
64    abstract public function parse($alias, $field, $value); +
65}
\ No newline at end of file diff --git a/tests/coverage/Doctrine_Hook_Parser_Complex.html b/tests/coverage/Doctrine_Hook_Parser_Complex.html new file mode 100644 index 000000000..e2229c0fc --- /dev/null +++ b/tests/coverage/Doctrine_Hook_Parser_Complex.html @@ -0,0 +1,296 @@ + + + Coverage for Doctrine_Hook_Parser_Complex + + +

Coverage for Doctrine_Hook_Parser_Complex

Back to coverage report

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
1<?php +
2/* +
3 *  $Id: Complex.php 2702 2007-10-03 21:43:22Z Jonathan.Wage $ +
4 * +
5 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +
6 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +
7 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +
8 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +
9 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +
10 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +
11 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +
12 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +
13 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +
14 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +
15 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +
16 * +
17 * This software consists of voluntary contributions made by many individuals +
18 * and is licensed under the LGPL. For more information, see +
19 * <http://www.phpdoctrine.com>. +
20 */ +
21Doctrine::autoload('Doctrine_Hook_Parser'); +
22/** +
23 * Doctrine_Hook_Parser_Complex +
24 * +
25 * @package     Doctrine +
26 * @subpackage  Hook +
27 * @license     http://www.opensource.org/licenses/lgpl-license.php LGPL +
28 * @link        www.phpdoctrine.com +
29 * @since       1.0 +
30 * @version     $Revision: 2702 $ +
31 * @author      Konsta Vesterinen <kvesteri@cc.hut.fi> +
32 */ +
33abstract class Doctrine_Hook_Parser_Complex extends Doctrine_Hook_Parser +
34{ +
35    /** +
36     * parse +
37     * Parses given field and field value to DQL condition +
38     * and parameters. This method should always return +
39     * prepared statement conditions (conditions that use +
40     * placeholders instead of literal values). +
41     * +
42     * @param string $alias     component alias +
43     * @param string $field     the field name +
44     * @param mixed $value      the value of the field +
45     * @return void +
46     */ +
47    public function parse($alias, $field, $value) +
48    { +
49        $this->condition = $this->parseClause($alias, $field, $value); +
50    } +
51    /** +
52     * parseClause +
53     * +
54     * @param string $alias     component alias +
55     * @param string $field     the field name +
56     * @param mixed $value      the value of the field +
57     * @return void +
58     */ +
59    public function parseClause($alias, $field, $value) +
60    { +
61        $parts = Doctrine_Tokenizer::quoteExplode($value, ' AND '); +
62 +
63        if (count($parts) > 1) { +
64            $ret = array(); +
65            foreach ($parts as $part) { +
66                $ret[] = $this->parseSingle($alias, $field, $part); +
67            } +
68 +
69            $r = implode(' AND ', $ret); +
70        } else { +
71            $parts = Doctrine_Tokenizer::quoteExplode($value, ' OR '); +
72            if (count($parts) > 1) { +
73                $ret = array(); +
74                foreach ($parts as $part) { +
75                    $ret[] = $this->parseClause($alias, $field, $part); +
76                } +
77 +
78                $r = implode(' OR ', $ret); +
79            } else { +
80                $ret = $this->parseSingle($alias, $field, $parts[0]); +
81                return $ret; +
82            } +
83        } +
84        return '(' . $r . ')'; +
85    } +
86    /** +
87     * parseSingle +
88     * +
89     * @param string $alias     component alias +
90     * @param string $field     the field name +
91     * @param mixed $value      the value of the field +
92     * @return void +
93     */ +
94    abstract public function parseSingle($alias, $field, $value); +
95}
\ No newline at end of file diff --git a/tests/coverage/Doctrine_Hook_WordLike.html b/tests/coverage/Doctrine_Hook_WordLike.html new file mode 100644 index 000000000..c17d2b175 --- /dev/null +++ b/tests/coverage/Doctrine_Hook_WordLike.html @@ -0,0 +1,209 @@ + + + Coverage for Doctrine_Hook_WordLike + + +

Coverage for Doctrine_Hook_WordLike

Back to coverage report

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
1<?php +
2/* +
3 *  $Id: WordLike.php 2702 2007-10-03 21:43:22Z Jonathan.Wage $ +
4 * +
5 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +
6 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +
7 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +
8 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +
9 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +
10 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +
11 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +
12 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +
13 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +
14 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +
15 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +
16 * +
17 * This software consists of voluntary contributions made by many individuals +
18 * and is licensed under the LGPL. For more information, see +
19 * <http://www.phpdoctrine.com>. +
20 */ +
21Doctrine::autoload('Doctrine_Hook_Parser'); +
22/** +
23 * Doctrine_Hook_WordLike +
24 * +
25 * @package     Doctrine +
26 * @subpackage  Hook +
27 * @license     http://www.opensource.org/licenses/lgpl-license.php LGPL +
28 * @link        www.phpdoctrine.com +
29 * @since       1.0 +
30 * @version     $Revision: 2702 $ +
31 * @author      Konsta Vesterinen <kvesteri@cc.hut.fi> +
32 */ +
33class Doctrine_Hook_WordLike extends Doctrine_Hook_Parser_Complex +
34{ +
35    /** +
36     * parse +
37     * Parses given field and field value to DQL condition +
38     * and parameters. This method should always return +
39     * prepared statement conditions (conditions that use +
40     * placeholders instead of literal values). +
41     * +
42     * @param string $alias     component alias +
43     * @param string $field     the field name +
44     * @param mixed $value      the value of the field +
45     * @return void +
46     */ +
47    public function parseSingle($alias, $field, $value) +
48    { +
49        if (strpos($value, "'") !== false) { +
50            $value = Doctrine_Tokenizer::bracketTrim($value, "'", "'"); +
51         +
52            $a[]   = $alias . '.' . $field . ' LIKE ?'; +
53            $this->params[] = $value . '%'; +
54 +
55        } else { +
56            $e2 = explode(' ',$value); +
57     +
58            foreach ($e2 as $v) { +
59                $v = trim($v); +
60                $a[] = $alias . '.' . $field . ' LIKE ?'; +
61                $this->params[] = $v . '%'; +
62            } +
63        } +
64        return implode(' OR ', $a); +
65    } +
66}
\ No newline at end of file diff --git a/tests/coverage/Doctrine_Hydrate.html b/tests/coverage/Doctrine_Hydrate.html new file mode 100644 index 000000000..fe7bb428f --- /dev/null +++ b/tests/coverage/Doctrine_Hydrate.html @@ -0,0 +1,3567 @@ + + + Coverage for Doctrine_Hydrate + + +

Coverage for Doctrine_Hydrate

Back to coverage report

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
1<?php +
2/* +
3 *  $Id: Hydrate.php 2832 2007-10-13 19:30:45Z zYne $ +
4 * +
5 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +
6 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +
7 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +
8 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +
9 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +
10 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +
11 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +
12 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +
13 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +
14 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +
15 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +
16 * +
17 * This software consists of voluntary contributions made by many individuals +
18 * and is licensed under the LGPL. For more information, see +
19 * <http://www.phpdoctrine.com>. +
20 */ +
21 +
22/** +
23 * Doctrine_Hydrate is a base class for Doctrine_RawSql and Doctrine_Query. +
24 * Its purpose is to populate object graphs. +
25 * +
26 * +
27 * @package     Doctrine +
28 * @subpackage  Hydrate +
29 * @license     http://www.opensource.org/licenses/lgpl-license.php LGPL +
30 * @link        www.phpdoctrine.com +
31 * @since       1.0 +
32 * @version     $Revision: 2832 $ +
33 * @author      Konsta Vesterinen <kvesteri@cc.hut.fi> +
34 */ +
35class Doctrine_Hydrate extends Doctrine_Locator_Injectable implements Serializable +
36{ +
37    /** +
38     * QUERY TYPE CONSTANTS +
39     */ +
40 +
41    /** +
42     * constant for SELECT queries +
43     */ +
44    const SELECT = 0; +
45    /** +
46     * constant for DELETE queries +
47     */ +
48    const DELETE = 1; +
49    /** +
50     * constant for UPDATE queries +
51     */ +
52    const UPDATE = 2; +
53    /** +
54     * constant for INSERT queries +
55     */ +
56    const INSERT = 3; +
57    /** +
58     * constant for CREATE queries +
59     */ +
60    const CREATE = 4; +
61 +
62    /** +
63     * @var array $params                       query input parameters +
64     */ +
65    protected $_params      = array('where' => array(), +
66                                    'set' => array(), +
67                                    'having' => array()); +
68    /** +
69     * @var Doctrine_Connection $conn           Doctrine_Connection object +
70     */ +
71    protected $_conn; +
72    /** +
73     * @var Doctrine_View $_view                Doctrine_View object, when set this object will use the +
74     *                                          the query given by the view object for object population +
75     */ +
76    protected $_view; +
77    /** +
78     * @var array $_aliasMap                    two dimensional array containing the map for query aliases +
79     *      Main keys are component aliases +
80     * +
81     *          table               table object associated with given alias +
82     * +
83     *          relation            the relation object owned by the parent +
84     * +
85     *          parent              the alias of the parent +
86     * +
87     *          agg                 the aggregates of this component +
88     * +
89     *          map                 the name of the column / aggregate value this +
90     *                              component is mapped to a collection +
91     */ +
92    protected $_aliasMap         = array(); +
93    /** +
94     * +
95     */ +
96    protected $pendingAggregates = array(); +
97    /** +
98     * @var array $aggregateMap             an array containing all aggregate aliases, keys as dql aliases +
99     *                                      and values as sql aliases +
100     */ +
101    protected $aggregateMap      = array(); +
102    /** +
103     * @var array $_options                 an array of options +
104     */ +
105    protected $_options    = array( +
106                            'fetchMode'      => Doctrine::FETCH_RECORD, +
107                            'parserCache'    => false, +
108                            'resultSetCache' => false, +
109                            ); +
110    /** +
111     * @var string $_sql            cached SQL query +
112     */ +
113    protected $_sql; +
114    /** +
115     * @var array $parts            SQL query string parts +
116     */ +
117    protected $parts = array( +
118        'select'    => array(), +
119        'distinct'  => false, +
120        'forUpdate' => false, +
121        'from'      => array(), +
122        'set'       => array(), +
123        'join'      => array(), +
124        'where'     => array(), +
125        'groupby'   => array(), +
126        'having'    => array(), +
127        'orderby'   => array(), +
128        'limit'     => false, +
129        'offset'    => false, +
130        ); +
131    /** +
132     * @var integer $type                   the query type +
133     * +
134     * @see Doctrine_Query::* constants +
135     */ +
136    protected $type            = self::SELECT; +
137    /** +
138     * @var array +
139     */ +
140    protected $_cache; +
141    /** +
142     * The current hydration mode. +
143     */ +
144    protected $_hydrationMode = Doctrine::HYDRATE_RECORD; +
145    /** +
146     * @var boolean $_expireCache           a boolean value that indicates whether or not to force cache expiration +
147     */ +
148    protected $_expireCache     = false; +
149 +
150    protected $_timeToLive; +
151 +
152    protected $_tableAliases    = array(); +
153    /** +
154     * @var array $_tableAliasSeeds         A simple array keys representing table aliases and values +
155     *                                      as table alias seeds. The seeds are used for generating short table +
156     *                                      aliases. +
157     */ +
158    protected $_tableAliasSeeds = array(); +
159    /** +
160     * constructor +
161     * +
162     * @param Doctrine_Connection|null $connection +
163     */ +
164    public function __construct($connection = null) +
165    { +
166        if ( ! ($connection instanceof Doctrine_Connection)) { +
167            $connection = Doctrine_Manager::getInstance()->getCurrentConnection(); +
168        } +
169        $this->_conn = $connection; +
170    } +
171    /** +
172     * getRootAlias +
173     * returns the alias of the the root component +
174     * +
175     * @return array +
176     */ +
177    public function getRootAlias() +
178    { +
179        if ( ! $this->_aliasMap) { +
180          $this->getSql(); +
181        } +
182         +
183        reset($this->_aliasMap); +
184 +
185        return key($this->_aliasMap); +
186    } +
187    /** +
188     * getRootDeclaration +
189     * returns the root declaration +
190     * +
191     * @return array +
192     */ +
193    public function getRootDeclaration() +
194    { +
195        $map = reset($this->_aliasMap); +
196 +
197        return $map; +
198    } +
199    /** +
200     * getRoot +
201     * returns the root component for this object +
202     * +
203     * @return Doctrine_Table       root components table +
204     */ +
205    public function getRoot() +
206    { +
207        $map = reset($this->_aliasMap); +
208 +
209        if ( ! isset($map['table'])) { +
210            throw new Doctrine_Hydrate_Exception('Root component not initialized.'); +
211        } +
212 +
213        return $map['table']; +
214    } +
215    /** +
216     * getSql +
217     * return the sql associated with this object +
218     * +
219     * @return string   sql query string +
220     */ +
221    public function getSql() +
222    { +
223        return $this->getQuery(); +
224    } +
225    /** +
226     * useCache +
227     * +
228     * @param Doctrine_Cache_Interface|bool $driver      cache driver +
229     * @param integer $timeToLive                        how long the cache entry is valid +
230     * @return Doctrine_Hydrate         this object +
231     */ +
232    public function useCache($driver = true, $timeToLive = null) +
233    { +
234        if ($driver !== null) { +
235            if ($driver !== true) { +
236                if ( ! ($driver instanceof Doctrine_Cache_Interface)) { +
237                    $msg = 'First argument should be instance of Doctrine_Cache_Interface or null.'; +
238 +
239                    throw new Doctrine_Hydrate_Exception($msg); +
240                } +
241            } +
242        } +
243        $this->_cache = $driver; +
244 +
245        return $this->setCacheLifeSpan($timeToLive); +
246    } +
247    /** +
248     * expireCache +
249     * +
250     * @param boolean $expire       whether or not to force cache expiration +
251     * @return Doctrine_Hydrate     this object +
252     */ +
253    public function expireCache($expire = true) +
254    { +
255        $this->_expireCache = true; +
256 +
257        return $this; +
258    } +
259    /** +
260     * setCacheLifeSpan +
261     * +
262     * @param integer $timeToLive   how long the cache entry is valid +
263     * @return Doctrine_Hydrate     this object +
264     */ +
265    public function setCacheLifeSpan($timeToLive) +
266    { +
267        if ($timeToLive !== null) { +
268            $timeToLive = (int) $timeToLive; +
269        } +
270        $this->_timeToLive = $timeToLive; +
271 +
272        return $this; +
273    } +
274    /** +
275     * getCacheDriver +
276     * returns the cache driver associated with this object +
277     * +
278     * @return Doctrine_Cache_Interface|boolean|null    cache driver +
279     */ +
280    public function getCacheDriver() +
281    { +
282        if ($this->_cache instanceof Doctrine_Cache_Interface) { +
283            return $this->_cache; +
284        } else { +
285            return $this->_conn->getCacheDriver(); +
286        } +
287    } +
288    /** +
289     * Sets the fetchmode. +
290     * +
291     * @param integer $fetchmode  One of the Doctrine::HYDRATE_* constants. +
292     */ +
293    public function setHydrationMode($hydrationMode) +
294    { +
295        $this->_hydrationMode = $hydrationMode; +
296        return $this; +
297    } +
298    /** +
299     * serialize +
300     * this method is automatically called when this Doctrine_Hydrate is serialized +
301     * +
302     * @return array    an array of serialized properties +
303     */ +
304    public function serialize() +
305    { +
306        $vars = get_object_vars($this); +
307 +
308    } +
309    /** +
310     * unseralize +
311     * this method is automatically called everytime a Doctrine_Hydrate object is unserialized +
312     * +
313     * @param string $serialized                Doctrine_Record as serialized string +
314     * @return void +
315     */ +
316    public function unserialize($serialized) +
317    { +
318 +
319    } +
320    /** +
321     * generateNewTableAlias +
322     * generates a new alias from given table alias +
323     * +
324     * @param string $tableAlias    table alias from which to generate the new alias from +
325     * @return string               the created table alias +
326     */ +
327    public function generateNewTableAlias($tableAlias) +
328    { +
329        if (isset($this->_tableAliases[$tableAlias])) { +
330            // generate a new alias +
331            $name = substr($tableAlias, 0, 1); +
332            $i    = ((int) substr($tableAlias, 1)); +
333 +
334            if ($i == 0) { +
335                $i = 1; +
336            } +
337 +
338            $newIndex  = ($this->_tableAliasSeeds[$name] + $i); +
339 +
340            return $name . $newIndex; +
341        } +
342 +
343        return $tableAlias; +
344    } +
345    /** +
346     * hasTableAlias +
347     * whether or not this object has given tableAlias +
348     * +
349     * @param string $tableAlias    the table alias to be checked +
350     * @return boolean              true if this object has given alias, otherwise false +
351     */ +
352    public function hasTableAlias($tableAlias) +
353    { +
354        return (isset($this->_tableAliases[$tableAlias])); +
355    } +
356    /** +
357     * getComponentAlias +
358     * get component alias associated with given table alias +
359     * +
360     * @param string $tableAlias    the table alias that identifies the component alias +
361     * @return string               component alias +
362     */ +
363    public function getComponentAlias($tableAlias) +
364    { +
365        if ( ! isset($this->_tableAliases[$tableAlias])) { +
366            throw new Doctrine_Hydrate_Exception('Unknown table alias ' . $tableAlias); +
367        } +
368        return $this->_tableAliases[$tableAlias]; +
369    } +
370    /** +
371     * getTableAliasSeed +
372     * returns the alias seed for given table alias +
373     * +
374     * @param string $tableAlias    table alias that identifies the alias seed +
375     * @return integer              table alias seed +
376     */ +
377    public function getTableAliasSeed($tableAlias) +
378    { +
379        if ( ! isset($this->_tableAliasSeeds[$tableAlias])) { +
380            return 0; +
381        } +
382        return $this->_tableAliasSeeds[$tableAlias]; +
383    } +
384    /** +
385     * generateTableAlias +
386     * generates a table alias from given table name and associates  +
387     * it with given component alias +
388     * +
389     * @param string $componentAlias    the component alias to be associated with generated table alias +
390     * @param string $tableName         the table name from which to generate the table alias +
391     * @return string                   the generated table alias +
392     */ +
393    public function generateTableAlias($componentAlias, $tableName) +
394    { +
395        $char   = strtolower(substr($tableName, 0, 1)); +
396 +
397        $alias  = $char; +
398 +
399        if ( ! isset($this->_tableAliasSeeds[$alias])) { +
400            $this->_tableAliasSeeds[$alias] = 1; +
401        } +
402 +
403        while (isset($this->_tableAliases[$alias])) { +
404            if ( ! isset($this->_tableAliasSeeds[$alias])) { +
405                $this->_tableAliasSeeds[$alias] = 1; +
406            } +
407            $alias = $char . ++$this->_tableAliasSeeds[$alias]; +
408        } +
409 +
410        $this->_tableAliases[$alias] = $componentAlias; +
411 +
412        return $alias; +
413    } +
414    /** +
415     * getTableAliases +
416     * returns all table aliases +
417     * +
418     * @return array        table aliases as an array +
419     */ +
420    public function getTableAliases() +
421    { +
422        return $this->_tableAliases; +
423    } +
424    /**  +
425     * addTableAlias +
426     * adds an alias for table and associates it with given component alias +
427     * +
428     * @param string $componentAlias    the alias for the query component associated with given tableAlias +
429     * @param string $tableAlias        the table alias to be added +
430     * @return Doctrine_Hydrate +
431     */ +
432    public function addTableAlias($tableAlias, $componentAlias) +
433    { +
434        $this->_tableAliases[$tableAlias] = $componentAlias; +
435 +
436        return $this; +
437    } +
438    /** +
439     * getTableAlias +
440     * some database such as Oracle need the identifier lengths to be < ~30 chars +
441     * hence Doctrine creates as short identifier aliases as possible +
442     * +
443     * this method is used for the creation of short table aliases, its also +
444     * smart enough to check if an alias already exists for given component (componentAlias) +
445     * +
446     * @param string $componentAlias    the alias for the query component to search table alias for +
447     * @param string $tableName         the table name from which the table alias is being created +
448     * @return string                   the generated / fetched short alias +
449     */ +
450    public function getTableAlias($componentAlias, $tableName = null) +
451    { +
452        $alias = array_search($componentAlias, $this->_tableAliases); +
453 +
454        if ($alias !== false) { +
455            return $alias; +
456        } +
457 +
458        if ($tableName === null) { +
459            throw new Doctrine_Hydrate_Exception("Couldn't get short alias for " . $componentAlias); +
460        } +
461 +
462        return $this->generateTableAlias($componentAlias, $tableName); +
463    } +
464    /** +
465     * addQueryPart +
466     * adds a query part in the query part array +
467     * +
468     * @param string $name          the name of the query part to be added +
469     * @param string $part          query part string +
470     * @throws Doctrine_Hydrate_Exception   if trying to add unknown query part +
471     * @return Doctrine_Hydrate     this object +
472     */ +
473    public function addQueryPart($name, $part) +
474    { +
475        if ( ! isset($this->parts[$name])) { +
476            throw new Doctrine_Hydrate_Exception('Unknown query part ' . $name); +
477        } +
478        if (is_array($part)) { +
479            $this->parts[$name] = array_merge($this->parts[$name], $part); +
480        } else { +
481            $this->parts[$name][] = $part; +
482        } +
483        return $this; +
484    } +
485    /** +
486     * setQueryPart +
487     * sets a query part in the query part array +
488     * +
489     * @param string $name          the name of the query part to be set +
490     * @param string $part          query part string +
491     * @throws Doctrine_Hydrate_Exception   if trying to set unknown query part +
492     * @return Doctrine_Hydrate     this object +
493     */ +
494    public function getQueryPart($part) +
495    { +
496        if ( ! isset($this->parts[$part])) { +
497            throw new Doctrine_Hydrate_Exception('Unknown query part ' . $part); +
498        } +
499 +
500        return $this->parts[$part]; +
501    } +
502    /** +
503     * removeQueryPart +
504     * removes a query part from the query part array +
505     * +
506     * @param string $name          the name of the query part to be removed +
507     * @throws Doctrine_Hydrate_Exception   if trying to remove unknown query part +
508     * @return Doctrine_Hydrate     this object +
509     */ +
510    public function removeQueryPart($name) +
511    { +
512        if (isset($this->parts[$name])) { +
513            if ($name == 'limit' || $name == 'offset') { +
514                $this->parts[$name] = false; +
515            } else { +
516                $this->parts[$name] = array(); +
517            } +
518        } else { +
519            throw new Doctrine_Hydrate_Exception('Unknown query part ' . $name); +
520        } +
521        return $this; +
522    } +
523    /** +
524     * setQueryPart +
525     * sets a query part in the query part array +
526     * +
527     * @param string $name          the name of the query part to be set +
528     * @param string $part          query part string +
529     * @throws Doctrine_Hydrate_Exception   if trying to set unknown query part +
530     * @return Doctrine_Hydrate     this object +
531     */ +
532    public function setQueryPart($name, $part) +
533    { +
534        if ( ! isset($this->parts[$name])) { +
535            throw new Doctrine_Hydrate_Exception('Unknown query part ' . $name); +
536        } +
537 +
538        if ($name !== 'limit' && $name !== 'offset') { +
539            if (is_array($part)) { +
540                $this->parts[$name] = $part; +
541            } else { +
542                $this->parts[$name] = array($part); +
543            } +
544        } else { +
545            $this->parts[$name] = $part; +
546        } +
547 +
548        return $this; +
549    } +
550    /** +
551     * hasAliasDeclaration +
552     * whether or not this object has a declaration for given component alias +
553     * +
554     * @param string $componentAlias    the component alias the retrieve the declaration from +
555     * @return boolean +
556     */ +
557    public function hasAliasDeclaration($componentAlias) +
558    { +
559        return isset($this->_aliasMap[$componentAlias]); +
560    } +
561    /** +
562     * getAliasDeclaration +
563     * get the declaration for given component alias +
564     * +
565     * @param string $componentAlias    the component alias the retrieve the declaration from +
566     * @return array                    the alias declaration +
567     */ +
568    public function getAliasDeclaration($componentAlias) +
569    { +
570        if ( ! isset($this->_aliasMap[$componentAlias])) { +
571            throw new Doctrine_Hydrate_Exception('Unknown component alias ' . $componentAlias); +
572        } +
573 +
574        return $this->_aliasMap[$componentAlias]; +
575    } +
576    /** +
577     * copyAliases +
578     * copy aliases from another Hydrate object +
579     * +
580     * this method is needed by DQL subqueries which need the aliases +
581     * of the parent query +
582     * +
583     * @param Doctrine_Hydrate $query   the query object from which the +
584     *                                  aliases are copied from +
585     * @return Doctrine_Hydrate         this object +
586     */ +
587    public function copyAliases(Doctrine_Hydrate $query) +
588    { +
589        $this->_tableAliases = $query->_tableAliases; +
590        $this->_aliasMap     = $query->_aliasMap; +
591        $this->_tableAliasSeeds = $query->_tableAliasSeeds; +
592        return $this; +
593    } +
594    /** +
595     * createSubquery +
596     * creates a subquery +
597     * +
598     * @return Doctrine_Hydrate +
599     */ +
600    public function createSubquery() +
601    { +
602        $class = get_class($this); +
603        $obj   = new $class(); +
604 +
605        // copy the aliases to the subquery +
606        $obj->copyAliases($this); +
607 +
608        // this prevents the 'id' being selected, re ticket #307 +
609        $obj->isSubquery(true); +
610 +
611        return $obj; +
612    } +
613    /** +
614     * limitSubqueryUsed +
615     * whether or not limit subquery was used +
616     * +
617     * @return boolean +
618     */ +
619    public function isLimitSubqueryUsed() +
620    { +
621        return false; +
622    } +
623    /** +
624     * clear +
625     * resets all the variables +
626     * +
627     * @return void +
628     */ +
629    protected function clear() +
630    { +
631        $this->parts = array( +
632                    'select'    => array(), +
633                    'distinct'  => false, +
634                    'forUpdate' => false, +
635                    'from'      => array(), +
636                    'set'       => array(), +
637                    'join'      => array(), +
638                    'where'     => array(), +
639                    'groupby'   => array(), +
640                    'having'    => array(), +
641                    'orderby'   => array(), +
642                    'limit'     => false, +
643                    'offset'    => false, +
644                    ); +
645        $this->inheritanceApplied = false; +
646    } +
647    /** +
648     * getConnection +
649     * +
650     * @return Doctrine_Connection +
651     */ +
652    public function getConnection() +
653    { +
654        return $this->_conn; +
655    } +
656    /** +
657     * setView +
658     * sets a database view this query object uses +
659     * this method should only be called internally by doctrine +
660     * +
661     * @param Doctrine_View $view       database view +
662     * @return void +
663     */ +
664    public function setView(Doctrine_View $view) +
665    { +
666        $this->_view = $view; +
667    } +
668    /** +
669     * getView +
670     * returns the view associated with this query object (if any) +
671     * +
672     * @return Doctrine_View        the view associated with this query object +
673     */ +
674    public function getView() +
675    { +
676        return $this->_view; +
677    } +
678    /** +
679     * getParams +
680     * +
681     * @return array +
682     */ +
683    public function getParams() +
684    { +
685        return array_merge($this->_params['set'], $this->_params['where'], $this->_params['having']); +
686    } +
687    /** +
688     * setParams +
689     * +
690     * @param array $params +
691     */ +
692    public function setParams(array $params = array()) { +
693        $this->_params = $params; +
694    } +
695    public function convertEnums($params) +
696    { +
697        return $params; +
698    } +
699    /** +
700     * setAliasMap +
701     * sets the whole component alias map +
702     * +
703     * @param array $map            alias map +
704     * @return Doctrine_Hydrate     this object +
705     */ +
706    public function setAliasMap(array $map) +
707    { +
708        $this->_aliasMap = $map; +
709 +
710        return $this; +
711    } +
712    /** +
713     * getAliasMap +
714     * returns the component alias map +
715     * +
716     * @return array    component alias map +
717     */ +
718    public function getAliasMap() +
719    { +
720        return $this->_aliasMap; +
721    } +
722    /** +
723     * getCachedForm +
724     * returns the cached form of this query for given resultSet +
725     * +
726     * @param array $resultSet +
727     * @return string           serialized string representation of this query +
728     */ +
729    public function getCachedForm(array $resultSet) +
730    { +
731        $map = ''; +
732 +
733        foreach ($this->getAliasMap() as $k => $v) { +
734            if ( ! isset($v['parent'])) { +
735                $map[$k][] = $v['table']->getComponentName(); +
736            } else { +
737                $map[$k][] = $v['parent'] . '.' . $v['relation']->getAlias(); +
738            } +
739            if (isset($v['agg'])) { +
740                $map[$k][] = $v['agg']; +
741            } +
742        } +
743 +
744        return serialize(array($resultSet, $map, $this->getTableAliases())); +
745    } +
746    public function _execute($params) +
747    { +
748        $params = $this->_conn->convertBooleans($params); +
749 +
750        if ( ! $this->_view) { +
751            $query = $this->getQuery($params); +
752        } else { +
753            $query = $this->_view->getSelectSql(); +
754        } +
755 +
756        $params = $this->convertEnums($params); +
757 +
758        if ($this->isLimitSubqueryUsed() && +
759            $this->_conn->getAttribute(Doctrine::ATTR_DRIVER_NAME) !== 'mysql') { +
760 +
761            $params = array_merge($params, $params); +
762        } +
763 +
764        if ($this->type !== self::SELECT) { +
765            return $this->_conn->exec($query, $params); +
766        } +
767 +
768        $stmt = $this->_conn->execute($query, $params); +
769        return $stmt; +
770    } +
771    /** +
772     * execute +
773     * executes the query and populates the data set +
774     * +
775     * @param string $params +
776     * @return Doctrine_Collection            the root collection +
777     */ +
778    public function execute($params = array(), $hydrationMode = null) +
779    { +
780        $params = array_merge($this->_params['set'],  +
781                              $this->_params['where'], +
782                              $this->_params['having'],  +
783                              $params); +
784        if ($this->_cache) { +
785            $cacheDriver = $this->getCacheDriver(); +
786 +
787            $dql  = $this->getDql(); +
788            // calculate hash for dql query +
789            $hash = md5($dql . var_export($params, true)); +
790 +
791            $cached = ($this->_expireCache) ? false : $cacheDriver->fetch($hash); +
792 +
793 +
794            if ($cached === false) { +
795                // cache miss +
796                $stmt = $this->_execute($params); +
797                $array = $this->parseData2($stmt, Doctrine::HYDRATE_ARRAY); +
798 +
799                $cached = $this->getCachedForm($array); +
800 +
801                $cacheDriver->save($hash, $cached, $this->_timeToLive); +
802            } else { +
803                $cached = unserialize($cached); +
804                $this->_tableAliases = $cached[2]; +
805                $array = $cached[0]; +
806 +
807                $map   = array(); +
808                foreach ($cached[1] as $k => $v) { +
809                    $e = explode('.', $v[0]); +
810                    if (count($e) === 1) { +
811                        $map[$k]['table'] = $this->_conn->getTable($e[0]); +
812                    } else { +
813                        $map[$k]['parent']   = $e[0]; +
814                        $map[$k]['relation'] = $map[$e[0]]['table']->getRelation($e[1]); +
815                        $map[$k]['table']    = $map[$k]['relation']->getTable(); +
816                    } +
817                    if (isset($v[1])) { +
818                        $map[$k]['agg'] = $v[1]; +
819                    } +
820                } +
821                $this->_aliasMap = $map; +
822            } +
823        } else { +
824            $stmt = $this->_execute($params); +
825 +
826            if (is_integer($stmt)) { +
827                return $stmt; +
828            } +
829 +
830            $array = $this->parseData2($stmt, $hydrationMode); +
831        } +
832        return $array; +
833    } +
834 +
835    /** +
836     * getType +
837     * +
838     * returns the type of this query object +
839     * by default the type is Doctrine_Hydrate::SELECT but if update() or delete() +
840     * are being called the type is Doctrine_Hydrate::UPDATE and Doctrine_Hydrate::DELETE, +
841     * respectively +
842     * +
843     * @see Doctrine_Hydrate::SELECT +
844     * @see Doctrine_Hydrate::UPDATE +
845     * @see Doctrine_Hydrate::DELETE +
846     * +
847     * @return integer      return the query type +
848     */ +
849    public function getType() +
850    { +
851        return $this->type; +
852    } +
853    /** +
854     * applyInheritance +
855     * applies column aggregation inheritance to DQL / SQL query +
856     * +
857     * @return string +
858     */ +
859    public function applyInheritance() +
860    { +
861        // get the inheritance maps +
862        $array = array(); +
863 +
864        foreach ($this->_aliasMap as $componentAlias => $data) { +
865            $tableAlias = $this->getTableAlias($componentAlias); +
866            $array[$tableAlias][] = $data['table']->inheritanceMap; +
867        } +
868 +
869        // apply inheritance maps +
870        $str = ''; +
871        $c = array(); +
872 +
873        $index = 0; +
874        foreach ($array as $tableAlias => $maps) { +
875            $a = array(); +
876 +
877            // don't use table aliases if the query isn't a select query +
878            if ($this->type !== Doctrine_Query::SELECT) { +
879                $tableAlias = ''; +
880            } else { +
881                $tableAlias .= '.'; +
882            } +
883 +
884            foreach ($maps as $map) { +
885                $b = array(); +
886                foreach ($map as $field => $value) { +
887                    $identifier = $this->_conn->quoteIdentifier($tableAlias . $field); +
888 +
889                    if ($index > 0) { +
890                        $b[] = '(' . $identifier . ' = ' . $this->_conn->quote($value) +
891                             . ' OR ' . $identifier . ' IS NULL)'; +
892                    } else { +
893                        $b[] = $identifier . ' = ' . $this->_conn->quote($value); +
894                    } +
895                } +
896 +
897                if ( ! empty($b)) { +
898                    $a[] = implode(' AND ', $b); +
899                } +
900            } +
901 +
902            if ( ! empty($a)) { +
903                $c[] = implode(' AND ', $a); +
904            } +
905            $index++; +
906        } +
907 +
908        $str .= implode(' AND ', $c); +
909 +
910        return $str; +
911    } +
912    /** +
913     * fetchArray +
914     * Convenience method to execute using array fetching as hydration mode. +
915     * +
916     * @param string $params +
917     * @return array +
918     */ +
919    public function fetchArray($params = array()) { +
920        return $this->execute($params, Doctrine::HYDRATE_ARRAY); +
921    } +
922    /** +
923     * fetchOne +
924     * Convenience method to execute the query and return the first item +
925     * of the collection. +
926     * +
927     * @param string $params Parameters +
928     * @param int $hydrationMode Hydration mode +
929     * @return mixed Array or Doctrine_Collection or false if no result. +
930     */ +
931    public function fetchOne($params = array(), $hydrationMode = null) +
932    { +
933        if (is_null($hydrationMode)) { +
934            $hydrationMode = $this->_hydrationMode; +
935        } +
936 +
937        $collection = $this->execute($params, $hydrationMode); +
938 +
939        if (count($collection) === 0) { +
940            return false; +
941        } +
942 +
943        switch ($hydrationMode) { +
944            case Doctrine::HYDRATE_RECORD: +
945                return $collection->getFirst(); +
946            case Doctrine::HYDRATE_ARRAY: +
947                return array_shift($collection); +
948        } +
949 +
950        return false; +
951    } +
952    /** +
953     * parseData +
954     * parses the data returned by statement object +
955     * +
956     * This is method defines the core of Doctrine object population algorithm +
957     * hence this method strives to be as fast as possible +
958     * +
959     * The key idea is the loop over the rowset only once doing all the needed operations +
960     * within this massive loop. +
961     * +
962     * @param mixed $stmt +
963     * @return array +
964     */ +
965    public function parseData2($stmt, $hydrationMode) +
966    { +
967 +
968        $cache = array(); +
969        $rootMap   = reset($this->_aliasMap); +
970        $rootAlias = key($this->_aliasMap); +
971        $componentName = $rootMap['table']->getComponentName(); +
972 +
973        if ($hydrationMode === null) { +
974            $hydrationMode = $this->_hydrationMode; +
975        } +
976 +
977        if ($hydrationMode === Doctrine::HYDRATE_ARRAY) { +
978            $driver = new Doctrine_Hydrate_Array(); +
979        } else { +
980            $driver = new Doctrine_Hydrate_Record(); +
981        } +
982 +
983        $array = $driver->getElementCollection($componentName); +
984 +
985        if ($stmt === false || $stmt === 0) { +
986            return $array; +
987        } +
988 +
989        $event = new Doctrine_Event(Doctrine_Event::HYDRATE, null); +
990 +
991        // for every getRecordListener() there is a little bit  +
992        // logic behind it, hence calling it multiple times on +
993        // large result sets can be quite expensive. +
994        // So for efficiency we use little listener caching here +
995        foreach ($this->_aliasMap as $alias => $data) { +
996            $componentName = $data['table']->getComponentName(); +
997            $listeners[$componentName] = $data['table']->getRecordListener(); +
998        } +
999 +
1000        while ($data = $stmt->fetch(Doctrine::FETCH_ASSOC)) { +
1001            $currData  = array(); +
1002            $identifiable = array(); +
1003 +
1004            foreach ($data as $key => $value) { +
1005 +
1006                // The following little cache solution ensures that field aliases are +
1007                // parsed only once. This increases speed on large result sets by an order +
1008                // of magnitude. +
1009                if ( ! isset($cache[$key])) { +
1010                    $e = explode('__', $key); +
1011                    $cache[$key]['field'] = $field = strtolower(array_pop($e)); +
1012                    $cache[$key]['alias'] = $this->_tableAliases[strtolower(implode('__', $e))]; +
1013                } +
1014 +
1015 +
1016                $map   = $this->_aliasMap[$cache[$key]['alias']]; +
1017                $table = $map['table']; +
1018                $alias = $cache[$key]['alias']; +
1019                $field = $cache[$key]['field']; +
1020 +
1021                if (isset($this->_aliasMap[$alias]['agg'][$field])) { +
1022                    $field = $this->_aliasMap[$alias]['agg'][$field]; +
1023                } +
1024 +
1025 +
1026                if ( ! isset($currData[$alias])) { +
1027                    $currData[$alias] = array(); +
1028                } +
1029 +
1030                if ( ! isset($prev[$alias])) { +
1031                    $prev[$alias] = array(); +
1032                } +
1033 +
1034                $currData[$alias][$field] = $table->prepareValue($field, $value); +
1035                if ($value !== null) { +
1036                    $identifiable[$alias] = true; +
1037                } +
1038            } +
1039 +
1040 +
1041            // dealing with root component +
1042            $table = $this->_aliasMap[$rootAlias]['table']; +
1043            $componentName = $table->getComponentName(); +
1044            $event->set('data', $currData[$rootAlias]); +
1045            $listeners[$componentName]->preHydrate($event); +
1046            $element = $driver->getElement($currData[$rootAlias], $componentName); +
1047 +
1048            $oneToOne = false; +
1049 +
1050            $index = $driver->search($element, $array); +
1051            if ($index === false) { +
1052                $event->set('data', $element); +
1053                $listeners[$componentName]->postHydrate($event); +
1054 +
1055                if (isset($this->_aliasMap[$rootAlias]['map'])) { +
1056                    $key = $this->_aliasMap[$rootAlias]['map']; +
1057 +
1058                    if (isset($array[$key])) { +
1059                        throw new Doctrine_Hydrate_Exception("Couldn't hydrate. Found non-unique key mapping."); +
1060                    } +
1061 +
1062                    if ( ! isset($element[$key])) { +
1063                        throw new Doctrine_Hydrate_Exception("Couldn't hydrate. Found a non-existent key."); +
1064                    } +
1065 +
1066                    $array[$element[$key]] = $element; +
1067                } else { +
1068                    $array[] = $element; +
1069                } +
1070            } +
1071            $this->_setLastElement($prev, $array, $index, $rootAlias, $oneToOne); +
1072            unset($currData[$rootAlias]); +
1073 +
1074            foreach ($currData as $alias => $data) { +
1075                $index = false; +
1076                $map   = $this->_aliasMap[$alias]; +
1077                $table = $this->_aliasMap[$alias]['table']; +
1078                $componentName = $table->getComponentName(); +
1079                $event->set('data', $data); +
1080                $listeners[$componentName]->preHydrate($event); +
1081 +
1082                $element = $driver->getElement($data, $componentName); +
1083 +
1084                $parent   = $map['parent']; +
1085                $relation = $map['relation']; +
1086                $componentAlias = $map['relation']->getAlias(); +
1087 +
1088                if ( ! isset($prev[$parent])) { +
1089                    break; +
1090                } +
1091 +
1092                // check the type of the relation +
1093                if ( ! $relation->isOneToOne()) { +
1094                    // initialize the collection +
1095 +
1096                    if ($driver->initRelated($prev[$parent], $componentAlias)) { +
1097 +
1098                        // append element +
1099                        if (isset($identifiable[$alias])) { +
1100                            $index = $driver->search($element, $prev[$parent][$componentAlias]); +
1101 +
1102                            if ($index === false) { +
1103                                $event->set('data', $element); +
1104                                $listeners[$componentName]->postHydrate($event); +
1105 +
1106                                if (isset($map['map'])) { +
1107                                    $key = $map['map']; +
1108                                    if (isset($prev[$parent][$componentAlias][$key])) { +
1109                                        throw new Doctrine_Hydrate_Exception("Couldn't hydrate. Found non-unique key mapping."); +
1110                                    } +
1111                                    if ( ! isset($element[$key])) { +
1112                                        throw new Doctrine_Hydrate_Exception("Couldn't hydrate. Found a non-existent key."); +
1113                                    } +
1114                                    $prev[$parent][$componentAlias][$element[$key]] = $element; +
1115                                } else { +
1116                                    $prev[$parent][$componentAlias][] = $element; +
1117                                } +
1118                            } +
1119                        } +
1120                        // register collection for later snapshots +
1121                        $driver->registerCollection($prev[$parent][$componentAlias]); +
1122                    } +
1123                } else { +
1124                    if ( ! isset($identifiable[$alias])) { +
1125                        $prev[$parent][$componentAlias] = $driver->getNullPointer(); +
1126                    } else { +
1127                        $prev[$parent][$componentAlias] = $element; +
1128                    } +
1129                    $oneToOne = true; +
1130                } +
1131                $coll =& $prev[$parent][$componentAlias]; +
1132                $this->_setLastElement($prev, $coll, $index, $alias, $oneToOne); +
1133            } +
1134        } +
1135 +
1136        $driver->flush(); +
1137 +
1138        $stmt->closeCursor(); +
1139        return $array; +
1140    } +
1141    /** +
1142     * _setLastElement +
1143     * +
1144     * sets the last element of given data array / collection +
1145     * as previous element +
1146     * +
1147     * @param boolean|integer $index +
1148     * @return void +
1149     */ +
1150    public function _setLastElement(&$prev, &$coll, $index, $alias, $oneToOne) +
1151    { +
1152        if ($coll === self::$_null) { +
1153            return false; +
1154        } +
1155        if ($index !== false) { +
1156            $prev[$alias] =& $coll[$index]; +
1157        } else { +
1158            // first check the count (we do not want to get the last element +
1159            // of an empty collection/array) +
1160            if (count($coll) > 0) { +
1161                if (is_array($coll)) { +
1162                    if ($oneToOne) { +
1163                        $prev[$alias] =& $coll; +
1164                    } else { +
1165                        end($coll); +
1166                        $prev[$alias] =& $coll[key($coll)]; +
1167                    } +
1168                } else { +
1169                    $prev[$alias] = $coll->getLast(); +
1170                } +
1171            } else { +
1172                if (isset($prev[$alias])) { +
1173                    unset($prev[$alias]); +
1174                } +
1175            } +
1176        } +
1177    } +
1178    /** +
1179     * @return string                   returns a string representation of this object +
1180     */ +
1181    public function __toString() +
1182    { +
1183        return Doctrine_Lib::formatSql($this->getQuery()); +
1184    } +
1185} +
\ No newline at end of file diff --git a/tests/coverage/Doctrine_Hydrate_Array.html b/tests/coverage/Doctrine_Hydrate_Array.html new file mode 100644 index 000000000..baa0e0ee0 --- /dev/null +++ b/tests/coverage/Doctrine_Hydrate_Array.html @@ -0,0 +1,257 @@ + + + Coverage for Doctrine_Hydrate_Array + + +

Coverage for Doctrine_Hydrate_Array

Back to coverage report

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
1<?php +
2/* +
3 *  $Id$ +
4 * +
5 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +
6 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +
7 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +
8 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +
9 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +
10 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +
11 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +
12 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +
13 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +
14 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +
15 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +
16 * +
17 * This software consists of voluntary contributions made by many individuals +
18 * and is licensed under the LGPL. For more information, see +
19 * <http://www.phpdoctrine.com>. +
20 */ +
21 +
22/** +
23 * Doctrine_Hydrate_Array +
24 * defines an array fetching strategy for Doctrine_Hydrate +
25 * +
26 * @package     Doctrine +
27 * @subpackage  Hydrate +
28 * @license     http://www.opensource.org/licenses/lgpl-license.php LGPL +
29 * @link        www.phpdoctrine.com +
30 * @since       1.0 +
31 * @version     $Revision$ +
32 * @author      Konsta Vesterinen <kvesteri@cc.hut.fi> +
33 */ +
34class Doctrine_Hydrate_Array +
35{ +
36    public function getElementCollection($component) +
37    { +
38        return array(); +
39    } +
40    public function getElement(array $data, $component) +
41    { +
42        return $data; +
43    } +
44    public function isIdentifiable(array $data, Doctrine_Table $table) +
45    { +
46        return ( ! empty($data)); +
47    } +
48    public function registerCollection($coll) +
49    { +
50 +
51    } +
52    public function initRelated(array &$data, $name) +
53    { +
54        if ( ! isset($data[$name])) { +
55            $data[$name] = array(); +
56        } +
57        return true; +
58    } +
59    public function getNullPointer()  +
60    { +
61        return null;     +
62    } +
63    public function search(array $element, array $data) +
64    { +
65        foreach ($data as $key => $val) { +
66            $found = true; +
67            foreach ($element as $k => $e) { +
68                if (isset($val[$k]) && $val[$k] !== $e) { +
69                    $found = false; +
70                } +
71            } +
72            if ($found) { +
73                return $key; +
74            } +
75        } +
76        return false; +
77    } +
78    public function flush() +
79    { +
80         +
81    } +
82}
\ No newline at end of file diff --git a/tests/coverage/Doctrine_Hydrate_Record.html b/tests/coverage/Doctrine_Hydrate_Record.html new file mode 100644 index 000000000..ee57610dd --- /dev/null +++ b/tests/coverage/Doctrine_Hydrate_Record.html @@ -0,0 +1,378 @@ + + + Coverage for Doctrine_Hydrate_Record + + +

Coverage for Doctrine_Hydrate_Record

Back to coverage report

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
1<?php +
2/* +
3 *  $Id$ +
4 * +
5 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +
6 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +
7 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +
8 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +
9 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +
10 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +
11 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +
12 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +
13 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +
14 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +
15 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +
16 * +
17 * This software consists of voluntary contributions made by many individuals +
18 * and is licensed under the LGPL. For more information, see +
19 * <http://www.phpdoctrine.com>. +
20 */ +
21 +
22/** +
23 * Doctrine_Hydrate_Record  +
24 * defines a record fetching strategy for Doctrine_Hydrate +
25 * +
26 * @package     Doctrine +
27 * @subpackage  Hydrate +
28 * @license     http://www.opensource.org/licenses/lgpl-license.php LGPL +
29 * @link        www.phpdoctrine.com +
30 * @since       1.0 +
31 * @version     $Revision$ +
32 * @author      Konsta Vesterinen <kvesteri@cc.hut.fi> +
33 */ +
34class Doctrine_Hydrate_Record extends Doctrine_Locator_Injectable +
35{ +
36    protected $_collections = array(); +
37     +
38    protected $_records = array(); +
39     +
40    protected $_tables = array(); +
41 +
42    public function getElementCollection($component) +
43    { +
44        $coll = new Doctrine_Collection($component); +
45        $this->_collections[] = $coll; +
46 +
47        return $coll; +
48    } +
49    public function search(Doctrine_Record $record, Doctrine_Collection $coll) +
50    { +
51        return array_search($record, $coll->getData(), true); +
52    } +
53    public function initRelated($record, $name) +
54    { +
55        if ( ! is_array($record)) { +
56            $record[$name]; +
57 +
58            return true; +
59        } +
60        return false; +
61    } +
62    public function registerCollection(Doctrine_Collection $coll) +
63    { +
64        $this->_collections[] = $coll; +
65    } +
66    /** +
67     * isIdentifiable +
68     * returns whether or not a given data row is identifiable (it contains +
69     * all primary key fields specified in the second argument) +
70     * +
71     * @param array $row +
72     * @param Doctrine_Table $table +
73     * @return boolean +
74     */ +
75    public function isIdentifiable(array $row, Doctrine_Table $table) +
76    { +
77        $primaryKeys = $table->getIdentifier(); +
78 +
79        if (is_array($primaryKeys)) { +
80            foreach ($primaryKeys as $id) { +
81                if ( ! isset($row[$id])) { +
82                    return false; +
83                } +
84            } +
85        } else { +
86            if ( ! isset($row[$primaryKeys])) { +
87                return false; +
88            } +
89        } +
90        return true; +
91    } +
92    public function getNullPointer()  +
93    { +
94        return self::$_null; +
95    } +
96    public function getElement(array $data, $component) +
97    { +
98        if ( ! isset($this->_tables[$component])) { +
99            $this->_tables[$component] = Doctrine_Manager::getInstance()->getTable($component); +
100            $this->_tables[$component]->setAttribute(Doctrine::ATTR_LOAD_REFERENCES, false); +
101        } +
102        $this->_tables[$component]->setData($data); +
103        $record = $this->_tables[$component]->getRecord(); +
104 +
105        if ( ! isset($this->_records[$record->getOid()]) ) { +
106            $record->clearRelated(); +
107            $this->_records[$record->getOid()] = $record; +
108        } +
109 +
110        return $record; +
111    } +
112    public function flush() +
113    { +
114        // take snapshots from all initialized collections +
115        foreach ($this->_collections as $key => $coll) { +
116            $coll->takeSnapshot(); +
117        } +
118        foreach ($this->_tables as $table) { +
119            $table->setAttribute(Doctrine::ATTR_LOAD_REFERENCES, true); +
120        } +
121    } +
122} +
\ No newline at end of file diff --git a/tests/coverage/Doctrine_I18n.html b/tests/coverage/Doctrine_I18n.html new file mode 100644 index 000000000..5418bb72e --- /dev/null +++ b/tests/coverage/Doctrine_I18n.html @@ -0,0 +1,363 @@ + + + Coverage for Doctrine_I18n + + +

Coverage for Doctrine_I18n

Back to coverage report

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
1<?php +
2/* +
3 *  $Id$ +
4 * +
5 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +
6 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +
7 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +
8 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +
9 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +
10 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +
11 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +
12 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +
13 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +
14 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +
15 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +
16 * +
17 * This software consists of voluntary contributions made by many individuals +
18 * and is licensed under the LGPL. For more information, see +
19 * <http://www.phpdoctrine.com>. +
20 */ +
21/** +
22 * Doctrine_I18n +
23 * +
24 * @package     Doctrine +
25 * @subpackage  I18n +
26 * @license     http://www.opensource.org/licenses/lgpl-license.php LGPL +
27 * @link        www.phpdoctrine.com +
28 * @since       1.0 +
29 * @version     $Revision$ +
30 * @author      Konsta Vesterinen <kvesteri@cc.hut.fi> +
31 */ +
32class Doctrine_I18n extends Doctrine_Plugin +
33{ +
34    protected $_options = array( +
35                            'className'     => '%CLASS%Translation', +
36                            'fields'        => array(), +
37                            'generateFiles' => false, +
38                            'table'         => false, +
39                            'pluginTable'   => false, +
40                            ); +
41 +
42    protected $_auditTable; +
43 +
44    public function __construct($options) +
45    { +
46        $this->_options = array_merge($this->_options, $options); +
47    } +
48 +
49    public function buildDefinition(Doctrine_Table $table) +
50    { +
51     if (empty($this->_options['fields'])) { +
52         throw new Doctrine_I18n_Exception('Fields not set.'); +
53     } +
54 +
55        $this->_options['className'] = str_replace('%CLASS%', +
56                                                   $this->_options['table']->getComponentName(), +
57                                                   $this->_options['className']); +
58 +
59        $name = $table->getComponentName(); +
60 +
61        if (class_exists($this->_options['className'])) { +
62            return false; +
63        } +
64 +
65        $columns = array(); +
66 +
67        $id = $table->getIdentifier(); +
68 +
69        $options = array('className' => $this->_options['className']); +
70 +
71        $fk = array(); +
72        foreach ((array) $id as $column) { +
73            $def = $table->getDefinitionOf($column); +
74 +
75            unset($def['autoincrement']); +
76            unset($def['sequence']); +
77            unset($def['unique']); +
78 +
79            $fk[$column] = $def; +
80        } +
81 +
82        $cols = $table->getColumns(); +
83 +
84        foreach ($cols as $column => $definition) { +
85            if (in_array($column, $this->_options['fields'])) { +
86                $columns[$column] = $definition; +
87                $table->removeColumn($column); +
88            } +
89        } +
90         +
91        $columns['lang'] = array('type'    => 'string', +
92                                 'length'  => 2, +
93                                 'fixed'   => true, +
94                                 'primary' => true); +
95 +
96        $local = (count($fk) > 1) ? array_keys($fk) : key($fk); +
97 +
98        $relations = array($name => array('local' => $local, +
99                                          'foreign' => $id, +
100                                          'onDelete' => 'CASCADE', +
101                                          'onUpdate' => 'CASCADE')); +
102 +
103 +
104        $columns += $fk; +
105 +
106        $options = array('className' => $this->_options['className'], +
107                         'queryParts' => array('indexBy' => 'lang')); +
108 +
109        $this->generateClass($options, $columns, $relations); +
110 +
111        $this->_options['pluginTable'] = $table->getConnection()->getTable($this->_options['className']); +
112         +
113        $this->_options['pluginTable']->bindQueryPart('indexBy', 'lang'); +
114 +
115        return true; +
116    } +
117} +
\ No newline at end of file diff --git a/tests/coverage/Doctrine_Import.html b/tests/coverage/Doctrine_Import.html new file mode 100644 index 000000000..3fb94eeaf --- /dev/null +++ b/tests/coverage/Doctrine_Import.html @@ -0,0 +1,632 @@ + + + Coverage for Doctrine_Import + + +

Coverage for Doctrine_Import

Back to coverage report

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
1<?php +
2/* +
3 *  $Id: Import.php 2722 2007-10-05 18:56:36Z Jonathan.Wage $ +
4 * +
5 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +
6 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +
7 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +
8 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +
9 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +
10 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +
11 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +
12 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +
13 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +
14 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +
15 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +
16 * +
17 * This software consists of voluntary contributions made by many individuals +
18 * and is licensed under the LGPL. For more information, see +
19 * <http://www.phpdoctrine.com>. +
20 */ +
21Doctrine::autoload('Doctrine_Connection_Module'); +
22/** +
23 * class Doctrine_Import +
24 * Main responsible of performing import operation. Delegates database schema +
25 * reading to a reader object and passes the result to a builder object which +
26 * builds a Doctrine data model. +
27 * +
28 * @package     Doctrine +
29 * @subpackage  Import +
30 * @link        www.phpdoctrine.com +
31 * @license     http://www.opensource.org/licenses/lgpl-license.php LGPL +
32 * @since       1.0 +
33 * @version     $Revision: 2722 $ +
34 * @author      Konsta Vesterinen <kvesteri@cc.hut.fi> +
35 * @author      Jukka Hassinen <Jukka.Hassinen@BrainAlliance.com> +
36 */ +
37class Doctrine_Import extends Doctrine_Connection_Module +
38{ +
39    protected $sql = array(); +
40    /** +
41     * lists all databases +
42     * +
43     * @return array +
44     */ +
45    public function listDatabases() +
46    { +
47        if ( ! isset($this->sql['listDatabases'])) { +
48            throw new Doctrine_Import_Exception(__FUNCTION__ . ' not supported by this driver.'); +
49        } +
50 +
51        return $this->conn->fetchColumn($this->sql['listDatabases']); +
52    } +
53    /** +
54     * lists all availible database functions +
55     * +
56     * @return array +
57     */ +
58    public function listFunctions() +
59    { +
60        if ( ! isset($this->sql['listFunctions'])) { +
61            throw new Doctrine_Import_Exception(__FUNCTION__ . ' not supported by this driver.'); +
62        } +
63 +
64        return $this->conn->fetchColumn($this->sql['listFunctions']); +
65    } +
66    /** +
67     * lists all database triggers +
68     * +
69     * @param string|null $database +
70     * @return array +
71     */ +
72    public function listTriggers($database = null) +
73    { +
74        throw new Doctrine_Import_Exception(__FUNCTION__ . ' not supported by this driver.'); +
75    } +
76    /** +
77     * lists all database sequences +
78     * +
79     * @param string|null $database +
80     * @return array +
81     */ +
82    public function listSequences($database = null) +
83    { +
84        if ( ! isset($this->sql['listSequences'])) { +
85            throw new Doctrine_Import_Exception(__FUNCTION__ . ' not supported by this driver.'); +
86        } +
87 +
88        return $this->conn->fetchColumn($this->sql['listSequences']); +
89    } +
90    /** +
91     * lists table constraints +
92     * +
93     * @param string $table     database table name +
94     * @return array +
95     */ +
96    public function listTableConstraints($table) +
97    { +
98        throw new Doctrine_Import_Exception(__FUNCTION__ . ' not supported by this driver.'); +
99    } +
100    /** +
101     * lists table constraints +
102     * +
103     * @param string $table     database table name +
104     * @return array +
105     */ +
106    public function listTableColumns($table) +
107    { +
108        throw new Doctrine_Import_Exception(__FUNCTION__ . ' not supported by this driver.'); +
109    } +
110    /** +
111     * lists table constraints +
112     * +
113     * @param string $table     database table name +
114     * @return array +
115     */ +
116    public function listTableIndexes($table) +
117    { +
118        throw new Doctrine_Import_Exception(__FUNCTION__ . ' not supported by this driver.'); +
119    } +
120    /** +
121     * lists tables +
122     * +
123     * @param string|null $database +
124     * @return array +
125     */ +
126    public function listTables($database = null) +
127    { +
128        throw new Doctrine_Import_Exception(__FUNCTION__ . ' not supported by this driver.'); +
129    } +
130    /** +
131     * lists table triggers +
132     * +
133     * @param string $table     database table name +
134     * @return array +
135     */ +
136    public function listTableTriggers($table) +
137    { +
138        throw new Doctrine_Import_Exception(__FUNCTION__ . ' not supported by this driver.'); +
139    } +
140    /** +
141     * lists table views +
142     * +
143     * @param string $table     database table name +
144     * @return array +
145     */ +
146    public function listTableViews($table) +
147    { +
148        throw new Doctrine_Import_Exception(__FUNCTION__ . ' not supported by this driver.'); +
149    } +
150    /** +
151     * lists database users +
152     * +
153     * @return array +
154     */ +
155    public function listUsers() +
156    { +
157        if ( ! isset($this->sql['listUsers'])) { +
158            throw new Doctrine_Import_Exception(__FUNCTION__ . ' not supported by this driver.'); +
159        } +
160 +
161        return $this->conn->fetchColumn($this->sql['listUsers']); +
162    } +
163    /** +
164     * lists database views +
165     * +
166     * @param string|null $database +
167     * @return array +
168     */ +
169    public function listViews($database = null) +
170    { +
171        if ( ! isset($this->sql['listViews'])) { +
172            throw new Doctrine_Import_Exception(__FUNCTION__ . ' not supported by this driver.'); +
173        } +
174 +
175        return $this->conn->fetchColumn($this->sql['listViews']); +
176    } +
177    /** +
178     * importSchema +
179     * +
180     * method for importing existing schema to Doctrine_Record classes +
181     * +
182     * @param string $directory +
183     * @param array $databases +
184     * @return array                the names of the imported classes +
185     */ +
186    public function importSchema($directory, array $databases = array()) +
187    { +
188        $connections = Doctrine_Manager::getInstance()->getConnections(); +
189         +
190        foreach ($connections as $connection) { +
191          $builder = new Doctrine_Import_Builder(); +
192          $builder->setTargetPath($directory); +
193 +
194          $classes = array(); +
195          foreach ($connection->import->listTables() as $table) { +
196              $builder->buildRecord(array('tableName' => $table, +
197                                          'className' => Doctrine::classify($table)), +
198                                          $connection->import->listTableColumns($table), +
199                                          array()); +
200         +
201              $classes[] = Doctrine::classify($table); +
202          } +
203        } +
204         +
205        return $classes; +
206    } +
207}
\ No newline at end of file diff --git a/tests/coverage/Doctrine_Import_Builder.html b/tests/coverage/Doctrine_Import_Builder.html new file mode 100644 index 000000000..fafd9c094 --- /dev/null +++ b/tests/coverage/Doctrine_Import_Builder.html @@ -0,0 +1,1112 @@ + + + Coverage for Doctrine_Import_Builder + + +

Coverage for Doctrine_Import_Builder

Back to coverage report

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
1<?php +
2/* +
3 *  $Id: Builder.php 2777 2007-10-08 22:53:28Z Jonathan.Wage $ +
4 * +
5 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +
6 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +
7 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +
8 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +
9 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +
10 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +
11 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +
12 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +
13 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +
14 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +
15 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +
16 * +
17 * This software consists of voluntary contributions made by many individuals +
18 * and is licensed under the LGPL. For more information, see +
19 * <http://www.phpdoctrine.com>. +
20 */ +
21 +
22/** +
23 * Doctrine_Import_Builder +
24 * Import builder is responsible of building Doctrine ActiveRecord classes +
25 * based on a database schema. +
26 * +
27 * @package     Doctrine +
28 * @subpackage  Import +
29 * @link        www.phpdoctrine.com +
30 * @license     http://www.opensource.org/licenses/lgpl-license.php LGPL +
31 * @since       1.0 +
32 * @version     $Revision: 2777 $ +
33 * @author      Konsta Vesterinen <kvesteri@cc.hut.fi> +
34 * @author      Jukka Hassinen <Jukka.Hassinen@BrainAlliance.com> +
35 * @author      Nicolas Bérard-Nault <nicobn@php.net> +
36 */ +
37class Doctrine_Import_Builder +
38{ +
39    /** +
40     * @var string $path    the path where imported files are being generated +
41     */ +
42    private $path = ''; +
43 +
44    private $suffix = '.class.php'; +
45     +
46    private $generateBaseClasses = false; +
47     +
48    private $baseClassesDirectory = 'generated'; +
49     +
50    private static $tpl; +
51     +
52    public function __construct() +
53    { +
54        $this->loadTemplate(); +
55    } +
56 +
57    /** +
58     * setTargetPath +
59     * +
60     * @param string path   the path where imported files are being generated +
61     * @return +
62     */ +
63    public function setTargetPath($path) +
64    { +
65        if ( ! file_exists($path)) { +
66            mkdir($path, 0777); +
67        } +
68 +
69        $this->path = $path; +
70    } +
71     +
72    /** +
73     * generateBaseClasses +
74     * +
75     * Specify whether or not to generate classes which extend from generated base classes +
76     * +
77     * @param string $bool  +
78     * @return void +
79     * @author Jonathan H. Wage +
80     */ +
81    public function generateBaseClasses($bool = null) +
82    { +
83      if ($bool !== null) { +
84        $this->generateBaseClasses = $bool; +
85      } +
86       +
87      return $this->generateBaseClasses; +
88    } +
89     +
90    /** +
91     * getTargetPath +
92     * +
93     * @return string       the path where imported files are being generated +
94     */ +
95    public function getTargetPath() +
96    { +
97        return $this->path; +
98    } +
99 +
100    /** +
101     * This is a template that was previously in Builder/Record.tpl. Due to the fact +
102     * that it was not bundled when compiling, it had to be moved here. +
103     * +
104     * @return void +
105     */ +
106    public function loadTemplate()  +
107    { +
108        if (isset(self::$tpl)) { +
109            return; +
110        } +
111 +
112        self::$tpl =<<<END +
113/** +
114 * This class has been auto-generated by the Doctrine ORM Framework +
115 */ +
116%sclass %s extends %s +
117{ +
118%s +
119%s +
120} +
121END; +
122 +
123    } +
124 +
125    /* +
126     * Build the table definition of a Doctrine_Record object +
127     * +
128     * @param  string $table +
129     * @param  array  $tableColumns +
130     */ +
131    public function buildTableDefinition(array $options, array $columns, array $relations) +
132    { +
133        $ret = array(); +
134         +
135        $i = 0; +
136         +
137        if (isset($options['inheritance']['extends']) && !isset($options['override_parent'])) { +
138            $ret[$i] = "\t\t\t\tparent::setTableDefinition();"; +
139            $i++; +
140        } +
141         +
142        if (isset($options['tableName']) && !empty($options['tableName'])) { +
143            $ret[$i] = str_repeat(' ', 8) . '$this->setTableName(\''. $options['tableName'].'\');'; +
144             +
145            $i++; +
146        } +
147         +
148        foreach ($columns as $name => $column) { +
149            $ret[$i] = '        $this->hasColumn(\'' . $name . '\', \'' . $column['type'] . '\''; +
150             +
151            if ($column['length']) { +
152                $ret[$i] .= ', ' . $column['length']; +
153            } else { +
154                $ret[$i] .= ', null'; +
155            } +
156 +
157            $a = array(); +
158 +
159            if (isset($column['default']) && $column['default']) { +
160                $a[] = '\'default\' => ' . var_export($column['default'], true); +
161            } +
162            if (isset($column['notnull']) && $column['notnull']) { +
163                $a[] = '\'notnull\' => true'; +
164            } +
165            if (isset($column['primary']) && $column['primary']) { +
166                $a[] = '\'primary\' => true'; +
167            } +
168            if ((isset($column['autoinc']) && $column['autoinc']) || isset($column['autoincrement']) && $column['autoincrement']) { +
169                $a[] = '\'autoincrement\' => true'; +
170            } +
171            if (isset($column['unique']) && $column['unique']) { +
172                $a[] = '\'unique\' => true'; +
173            } +
174            if (isset($column['unsigned']) && $column['unsigned']) { +
175                $a[] = '\'unsigned\' => true'; +
176            } +
177            if ($column['type'] == 'enum' && isset($column['values']) ) { +
178                $a[] = '\'values\' => array(\'' . implode('\',\'', $column['values']) . '\')'; +
179            } +
180 +
181            if ( ! empty($a)) { +
182                $ret[$i] .= ', ' . 'array('; +
183                $length = strlen($ret[$i]); +
184                $ret[$i] .= implode(',' . PHP_EOL . str_repeat(' ', $length), $a) . ')'; +
185            } +
186             +
187            $ret[$i] .= ');'; +
188 +
189            if ($i < (count($columns) - 1)) { +
190                $ret[$i] .= PHP_EOL; +
191            } +
192            $i++; +
193        } +
194         +
195        if (!empty($ret)) { +
196          return "\n\tpublic function setTableDefinition()"."\n\t{\n".implode("\n", $ret)."\n\t}"; +
197        } +
198    } +
199    public function buildSetUp(array $options, array $columns, array $relations) +
200    { +
201        $ret = array(); +
202         +
203        $i = 0; +
204         +
205        if (isset($options['inheritance']['extends']) && !isset($options['override_parent'])) { +
206            $ret[$i] = "\t\t\t\tparent::setUp();"; +
207            $i++; +
208        } +
209         +
210        foreach ($relations as $name => $relation) { +
211            $class = isset($relation['class']) ? $relation['class']:$name; +
212            $alias = (isset($relation['alias']) && $relation['alias'] !== $relation['class']) ? ' as ' . $relation['alias'] : ''; +
213 +
214            if ( ! isset($relation['type'])) { +
215                $relation['type'] = Doctrine_Relation::ONE; +
216            } +
217 +
218            if ($relation['type'] === Doctrine_Relation::ONE ||  +
219                $relation['type'] === Doctrine_Relation::ONE_COMPOSITE) { +
220                $ret[$i] = '        $this->hasOne(\'' . $class . $alias . '\''; +
221            } else { +
222                $ret[$i] = '        $this->hasMany(\'' . $class . $alias . '\''; +
223            } +
224             +
225            $a = array(); +
226 +
227            if (isset($relation['refClass'])) { +
228                $a[] = '\'refClass\' => ' . var_export($relation['refClass'], true); +
229            } +
230             +
231            if (isset($relation['deferred']) && $relation['deferred']) { +
232                $a[] = '\'default\' => ' . var_export($relation['deferred'], true); +
233            } +
234             +
235            if (isset($relation['local']) && $relation['local']) { +
236                $a[] = '\'local\' => ' . var_export($relation['local'], true); +
237            } +
238             +
239            if (isset($relation['foreign']) && $relation['foreign']) { +
240                $a[] = '\'foreign\' => ' . var_export($relation['foreign'], true); +
241            } +
242             +
243            if (isset($relation['onDelete']) && $relation['onDelete']) { +
244                $a[] = '\'onDelete\' => ' . var_export($relation['onDelete'], true); +
245            } +
246             +
247            if (isset($relation['onUpdate']) && $relation['onUpdate']) { +
248                $a[] = '\'onUpdate\' => ' . var_export($relation['onUpdate'], true); +
249            } +
250             +
251            if ( ! empty($a)) { +
252                $ret[$i] .= ', ' . 'array('; +
253                $length = strlen($ret[$i]); +
254                $ret[$i] .= implode(',' . PHP_EOL . str_repeat(' ', $length), $a) . ')'; +
255            } +
256             +
257            $ret[$i] .= ');'; +
258            $i++; +
259        } +
260         +
261        if (isset($options['inheritance']['keyField']) && isset($options['inheritance']['keyValue'])) {         +
262            $i++; +
263            $ret[$i] = "\t\t".'$this->setInheritanceMap(array(\''.$options['inheritance']['keyField'].'\' => '.$options['inheritance']['keyValue'].'));'; +
264        } +
265         +
266        if (!empty($ret)) { +
267          return "\n\tpublic function setUp()\n\t{\n".implode("\n", $ret)."\n\t}"; +
268        } +
269    } +
270     +
271    public function buildDefinition(array $options, array $columns, array $relations = array()) +
272    { +
273        if ( ! isset($options['className'])) { +
274            throw new Doctrine_Import_Builder_Exception('Missing class name.'); +
275        } +
276         +
277        $abstract = isset($options['abstract']) ? 'abstract ':null;         +
278        $className = $options['className']; +
279        $extends = isset($options['inheritance']['extends']) ? $options['inheritance']['extends']:'Doctrine_Record'; +
280        $definition = !isset($options['no_definition']) ? $this->buildTableDefinition($options, $columns, $relations):null; +
281        $setUp = !isset($options['no_definition']) ? $this->buildSetUp($options, $columns, $relations):null; +
282         +
283        $content = sprintf(self::$tpl, $abstract, +
284                                       $className, +
285                                       $extends, +
286                                       $definition, +
287                                       $setUp); +
288         +
289        return $content; +
290    } +
291 +
292    public function buildRecord(array $options, array $columns, array $relations = array()) +
293    { +
294        if ( !isset($options['className'])) { +
295            throw new Doctrine_Import_Builder_Exception('Missing class name.'); +
296        } +
297 +
298        if ( !isset($options['fileName'])) { +
299            if (empty($this->path)) { +
300                throw new Doctrine_Import_Builder_Exception('No build target directory set.'); +
301            } +
302             +
303 +
304            if (is_writable($this->path) === false) { +
305                throw new Doctrine_Import_Builder_Exception('Build target directory ' . $this->path . ' is not writable.'); +
306            } +
307 +
308            $options['fileName']  = $this->path . DIRECTORY_SEPARATOR . $options['className'] . $this->suffix; +
309        } +
310         +
311        if ($this->generateBaseClasses()) { +
312           +
313          // We only want to generate this one if it doesn't already exist +
314          if (!file_exists($options['fileName'])) { +
315            $optionsBak = $options; +
316             +
317            unset($options['tableName']); +
318            $options['inheritance']['extends'] = 'Base' . $options['className']; +
319            $options['requires'] = array($this->baseClassesDirectory . DIRECTORY_SEPARATOR  . $options['inheritance']['extends'] . $this->suffix); +
320            $options['no_definition'] = true; +
321             +
322            $this->writeDefinition($options, array(), array()); +
323             +
324            $options = $optionsBak; +
325          } +
326           +
327          $generatedPath = $this->path . DIRECTORY_SEPARATOR . $this->baseClassesDirectory; +
328           +
329          if (!file_exists($generatedPath)) { +
330            mkdir($generatedPath); +
331          } +
332           +
333          $options['className'] = 'Base' . $options['className']; +
334          $options['abstract'] = true; +
335          $options['fileName']  = $generatedPath . DIRECTORY_SEPARATOR . $options['className'] . $this->suffix; +
336           +
337          $this->writeDefinition($options, $columns, $relations); +
338        } else { +
339          $this->writeDefinition($options, $columns, $relations); +
340        } +
341    } +
342     +
343    public function writeDefinition(array $options, array $columns, array $relations = array()) +
344    { +
345      $content = $this->buildDefinition($options, $columns, $relations); +
346       +
347      $code = "<?php\n"; +
348       +
349      if (isset($options['requires'])) { +
350          if (!is_array($options['requires'])) { +
351              $options['requires'] = array($options['requires']); +
352          } +
353           +
354          foreach ($options['requires'] as $require) { +
355              $code .= "require_once('".$require."');"; +
356          } +
357      } +
358       +
359      $code .= PHP_EOL . $content; +
360       +
361      $bytes = file_put_contents($options['fileName'], $code); +
362 +
363      if ($bytes === false) { +
364          throw new Doctrine_Import_Builder_Exception("Couldn't write file " . $options['fileName']); +
365      } +
366    } +
367}
\ No newline at end of file diff --git a/tests/coverage/Doctrine_Import_Firebird.html b/tests/coverage/Doctrine_Import_Firebird.html new file mode 100644 index 000000000..f2449d4ed --- /dev/null +++ b/tests/coverage/Doctrine_Import_Firebird.html @@ -0,0 +1,377 @@ + + + Coverage for Doctrine_Import_Firebird + + +

Coverage for Doctrine_Import_Firebird

Back to coverage report

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
1<?php +
2/* +
3 *  $Id: Firebird.php 2702 2007-10-03 21:43:22Z Jonathan.Wage $ +
4 * +
5 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +
6 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +
7 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +
8 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +
9 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +
10 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +
11 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +
12 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +
13 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +
14 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +
15 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +
16 * +
17 * This software consists of voluntary contributions made by many individuals +
18 * and is licensed under the LGPL. For more information, see +
19 * <http://www.phpdoctrine.com>. +
20 */ +
21Doctrine::autoload('Doctrine_Import'); +
22/** +
23  * @package     Doctrine +
24  * @subpackage  Import +
25 * @license     http://www.opensource.org/licenses/lgpl-license.php LGPL +
26 * @author      Konsta Vesterinen <kvesteri@cc.hut.fi> +
27 * @author      Lorenzo Alberton <l.alberton@quipo.it> (PEAR MDB2 Interbase driver) +
28 * @author      Lukas Smith <smith@pooteeweet.org> (PEAR MDB2 library) +
29 * @version     $Revision: 2702 $ +
30 * @link        www.phpdoctrine.com +
31 * @since       1.0 +
32 */ +
33class Doctrine_Import_Firebird extends Doctrine_Import +
34{ +
35    /** +
36     * list all tables in the current database +
37     * +
38     * @return array        data array +
39     */ +
40    public function listTables($database = null) +
41    { +
42        $query = 'SELECT RDB$RELATION_NAME FROM RDB$RELATIONS WHERE RDB$SYSTEM_FLAG=0 AND RDB$VIEW_BLR IS NULL'; +
43 +
44        return $this->conn->fetchColumn($query); +
45    } +
46    /** +
47     * list all fields in a tables in the current database +
48     * +
49     * @param string $table name of table that should be used in method +
50     * @return mixed data array on success, a MDB2 error on failure +
51     * @access public +
52     */ +
53    public function listTableFields($table) +
54    { +
55        $table = $this->conn->quote(strtoupper($table), 'text'); +
56        $query = 'SELECT RDB$FIELD_NAME FROM RDB$RELATION_FIELDS WHERE UPPER(RDB$RELATION_NAME) = ' . $table; +
57 +
58        return $this->conn->fetchColumn($query); +
59    } +
60    /** +
61     * list all users +
62     * +
63     * @return array            data array containing all database users +
64     */ +
65    public function listUsers() +
66    { +
67        return $this->conn->fetchColumn('SELECT DISTINCT RDB$USER FROM RDB$USER_PRIVILEGES'); +
68    } +
69    /** +
70     * list the views in the database +
71     * +
72     * @return array            data array containing all database views +
73     */ +
74    public function listViews($database = null) +
75    { +
76        return $this->conn->fetchColumn('SELECT DISTINCT RDB$VIEW_NAME FROM RDB$VIEW_RELATIONS'); +
77    } +
78    /** +
79     * list the views in the database that reference a given table +
80     * +
81     * @param string $table     table for which all references views should be found +
82     * @return array            data array containing all views for given table +
83     */ +
84    public function listTableViews($table) +
85    { +
86        $query  = 'SELECT DISTINCT RDB$VIEW_NAME FROM RDB$VIEW_RELATIONS'; +
87        $table  = $this->conn->quote(strtoupper($table), 'text'); +
88        $query .= ' WHERE UPPER(RDB$RELATION_NAME) = ' . $table; +
89 +
90        return $this->conn->fetchColumn($query); +
91    } +
92    /** +
93     * list all functions in the current database +
94     * +
95     * @return array              data array containing all availible functions +
96     */ +
97    public function listFunctions() +
98    { +
99        $query = 'SELECT RDB$FUNCTION_NAME FROM RDB$FUNCTIONS WHERE RDB$SYSTEM_FLAG IS NULL'; +
100 +
101        return $this->conn->fetchColumn($query); +
102    } +
103    /** +
104     * This function will be called to get all triggers of the +
105     * current database ($this->conn->getDatabase()) +
106     * +
107     * @param  string $table      The name of the table from the +
108     *                            previous database to query against. +
109     * @return array              data array containing all triggers for given table +
110     */ +
111    public function listTableTriggers($table) +
112    { +
113        $query = 'SELECT RDB$TRIGGER_NAME FROM RDB$TRIGGERS WHERE RDB$SYSTEM_FLAG IS NULL OR RDB$SYSTEM_FLAG = 0'; +
114 +
115        if ( ! is_null($table)) { +
116            $table = $this->conn->quote(strtoupper($table), 'text'); +
117            $query .= ' WHERE UPPER(RDB$RELATION_NAME) = ' . $table; +
118        } +
119 +
120        return $this->conn->fetchColumn($query); +
121    } +
122}
\ No newline at end of file diff --git a/tests/coverage/Doctrine_Import_Mssql.html b/tests/coverage/Doctrine_Import_Mssql.html new file mode 100644 index 000000000..b08b6913c --- /dev/null +++ b/tests/coverage/Doctrine_Import_Mssql.html @@ -0,0 +1,587 @@ + + + Coverage for Doctrine_Import_Mssql + + +

Coverage for Doctrine_Import_Mssql

Back to coverage report

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
1<?php +
2/* +
3 *  $Id: Mssql.php 2702 2007-10-03 21:43:22Z Jonathan.Wage $ +
4 * +
5 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +
6 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +
7 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +
8 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +
9 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +
10 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +
11 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +
12 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +
13 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +
14 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +
15 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +
16 * +
17 * This software consists of voluntary contributions made by many individuals +
18 * and is licensed under the LGPL. For more information, see +
19 * <http://www.phpdoctrine.com>. +
20 */ +
21Doctrine::autoload('Doctrine_Import'); +
22/** +
23 * @package     Doctrine +
24 * @subpackage  Import +
25 * @license     http://www.opensource.org/licenses/lgpl-license.php LGPL +
26 * @author      Konsta Vesterinen <kvesteri@cc.hut.fi> +
27 * @author      Lukas Smith <smith@pooteeweet.org> (PEAR MDB2 library) +
28 * @author      Frank M. Kromann <frank@kromann.info> (PEAR MDB2 Mssql driver) +
29 * @author      David Coallier <davidc@php.net> (PEAR MDB2 Mssql driver) +
30 * @version     $Revision: 2702 $ +
31 * @link        www.phpdoctrine.com +
32 * @since       1.0 +
33 */ +
34class Doctrine_Import_Mssql extends Doctrine_Import +
35{ +
36    /** +
37     * lists all database sequences +
38     * +
39     * @param string|null $database +
40     * @return array +
41     */ +
42    public function listSequences($database = null) +
43    { +
44        $query = "SELECT name FROM sysobjects WHERE xtype = 'U'"; +
45        $tableNames = $this->conn->fetchColumn($query); +
46 +
47        return array_map(array($this->conn->formatter, 'fixSequenceName'), $tableNames); +
48    } +
49    /** +
50     * lists table constraints +
51     * +
52     * @param string $table     database table name +
53     * @return array +
54     */ +
55    public function listTableColumns($table) +
56    { +
57        $sql     = 'EXEC sp_columns @table_name = ' . $this->conn->quoteIdentifier($table, true); +
58        $result  = $this->conn->fetchAssoc($sql); +
59        $columns = array(); +
60 +
61        foreach ($result as $key => $val) { +
62            $val = array_change_key_case($val, CASE_LOWER); +
63 +
64            if (strstr($val['type_name'], ' ')) { +
65                list($type, $identity) = explode(' ', $val['type_name']); +
66            } else { +
67                $type = $val['type_name']; +
68                $identity = ''; +
69            } +
70 +
71            if ($type == 'varchar') { +
72                $type .= '(' . $val['length'] . ')'; +
73            } +
74 +
75            $decl = $this->conn->dataDict->getPortableDeclaration($val); +
76 +
77            $description  = array( +
78                'name'      => $val['column_name'], +
79                'ntype'     => $type, +
80                'type'      => $decl['type'][0], +
81                'alltypes'  => $decl['type'], +
82                'length'    => $decl['length'], +
83                'fixed'     => $decl['fixed'], +
84                'unsigned'  => $decl['unsigned'], +
85                'notnull'   => (bool) ($val['is_nullable'] === 'NO'), +
86                'default'   => $val['column_def'], +
87                'primary'   => (strtolower($identity) == 'identity'), +
88            ); +
89            $columns[$val['column_name']] = $description; +
90        } +
91 +
92        return $columns; +
93    } +
94    /** +
95     * lists table constraints +
96     * +
97     * @param string $table     database table name +
98     * @return array +
99     */ +
100    public function listTableIndexes($table) +
101    { +
102 +
103    } +
104    /** +
105     * lists tables +
106     * +
107     * @param string|null $database +
108     * @return array +
109     */ +
110    public function listTables($database = null) +
111    { +
112        $sql = "SELECT name FROM sysobjects WHERE type = 'U' ORDER BY name"; +
113 +
114        return $this->conn->fetchColumn($sql); +
115    } +
116    /** +
117     * lists all triggers +
118     * +
119     * @return array +
120     */ +
121    public function listTriggers($database = null) +
122    { +
123        $query = "SELECT name FROM sysobjects WHERE xtype = 'TR'"; +
124 +
125        $result = $this->conn->fetchColumn($query); +
126 +
127        return $result; +
128    } +
129    /** +
130     * lists table triggers +
131     * +
132     * @param string $table     database table name +
133     * @return array +
134     */ +
135    public function listTableTriggers($table) +
136    { +
137        $table = $this->conn->quote($table, 'text'); +
138        $query = "SELECT name FROM sysobjects WHERE xtype = 'TR' AND object_name(parent_obj) = " . $table; +
139 +
140        $result = $this->conn->fetchColumn($query); +
141 +
142        return $result; +
143    } +
144    /** +
145     * lists table views +
146     * +
147     * @param string $table     database table name +
148     * @return array +
149     */ +
150    public function listTableViews($table) +
151    { +
152        $keyName = 'INDEX_NAME'; +
153        $pkName = 'PK_NAME'; +
154        if ($this->conn->options['portability'] & Doctrine::PORTABILITY_FIX_CASE) { +
155            if ($this->conn->options['field_case'] == CASE_LOWER) { +
156                $keyName = strtolower($keyName); +
157                $pkName  = strtolower($pkName); +
158            } else { +
159                $keyName = strtoupper($keyName); +
160                $pkName  = strtoupper($pkName); +
161            } +
162        } +
163        $table = $this->conn->quote($table, 'text'); +
164        $query = 'EXEC sp_statistics @table_name = ' . $table; +
165        $indexes = $this->conn->fetchColumn($query, $keyName); +
166 +
167        $query = 'EXEC sp_pkeys @table_name = ' . $table; +
168        $pkAll = $this->conn->fetchColumn($query, $pkName); +
169 +
170        $result = array(); +
171 +
172        foreach ($indexes as $index) { +
173            if ( ! in_array($index, $pkAll) && $index != null) { +
174                $result[] = $this->conn->formatter->fixIndexName($index); +
175            } +
176        } +
177 +
178        return $result; +
179    } +
180    /** +
181     * lists database views +
182     * +
183     * @param string|null $database +
184     * @return array +
185     */ +
186    public function listViews($database = null) +
187    { +
188        $query = "SELECT name FROM sysobjects WHERE xtype = 'V'"; +
189 +
190        return $this->conn->fetchColumn($query); +
191    } +
192}
\ No newline at end of file diff --git a/tests/coverage/Doctrine_Import_Oracle.html b/tests/coverage/Doctrine_Import_Oracle.html new file mode 100644 index 000000000..c11f9066b --- /dev/null +++ b/tests/coverage/Doctrine_Import_Oracle.html @@ -0,0 +1,686 @@ + + + Coverage for Doctrine_Import_Oracle + + +

Coverage for Doctrine_Import_Oracle

Back to coverage report

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
1<?php +
2/* +
3 *  $Id: Oracle.php 2702 2007-10-03 21:43:22Z Jonathan.Wage $ +
4 * +
5 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +
6 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +
7 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +
8 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +
9 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +
10 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +
11 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +
12 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +
13 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +
14 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +
15 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +
16 * +
17 * This software consists of voluntary contributions made by many individuals +
18 * and is licensed under the LGPL. For more information, see +
19 * <http://www.phpdoctrine.com>. +
20 */ +
21Doctrine::autoload('Doctrine_Import'); +
22/** +
23 * @package     Doctrine +
24 * @subpackage  Import +
25 * @license     http://www.opensource.org/licenses/lgpl-license.php LGPL +
26 * @author      Konsta Vesterinen <kvesteri@cc.hut.fi> +
27 * @version     $Revision: 2702 $ +
28 * @link        www.phpdoctrine.com +
29 * @since       1.0 +
30 */ +
31class Doctrine_Import_Oracle extends Doctrine_Import +
32{ +
33    /** +
34     * lists all databases +
35     * +
36     * @return array +
37     */ +
38    public function listDatabases() +
39    { +
40        if ( ! $this->conn->getAttribute(Doctrine::ATTR_EMULATE_DATABASE)) { +
41            throw new Doctrine_Import_Exception('database listing is only supported if the "emulate_database" option is enabled'); +
42        } +
43        /** +
44        if ($this->conn->options['database_name_prefix']) { +
45            $query = 'SELECT SUBSTR(username, '; +
46            $query.= (strlen($this->conn->getAttribute(['database_name_prefix'])+1); +
47            $query.= ") FROM sys.dba_users WHERE username LIKE '"; +
48            $query.= $this->conn->options['database_name_prefix']."%'"; +
49        } else { +
50        */ +
51        $query   = 'SELECT username FROM sys.dba_users'; +
52 +
53        $result2 = $this->conn->standaloneQuery($query); +
54        $result  = $result2->fetchColumn(); +
55 +
56        return $result; +
57    } +
58    /** +
59     * lists all availible database functions +
60     * +
61     * @return array +
62     */ +
63    public function listFunctions() +
64    { +
65        $query = "SELECT name FROM sys.user_source WHERE line = 1 AND type = 'FUNCTION'"; +
66 +
67        return $this->conn->fetchColumn($query); +
68    } +
69    /** +
70     * lists all database triggers +
71     * +
72     * @param string|null $database +
73     * @return array +
74     */ +
75    public function listTriggers($database = null) +
76    { +
77 +
78    } +
79    /** +
80     * lists all database sequences +
81     * +
82     * @param string|null $database +
83     * @return array +
84     */ +
85    public function listSequences($database = null) +
86    { +
87        $query = "SELECT sequence_name FROM sys.user_sequences"; +
88 +
89        $tableNames = $this->conn->fetchColumn($query); +
90 +
91        return array_map(array($this->conn->formatter, 'fixSequenceName'), $tableNames); +
92    } +
93    /** +
94     * lists table constraints +
95     * +
96     * @param string $table     database table name +
97     * @return array +
98     */ +
99    public function listTableConstraints($table) +
100    { +
101        $table = $this->conn->quote($table, 'text'); +
102 +
103        $query = 'SELECT index_name name FROM user_constraints' +
104               . ' WHERE table_name = ' . $table . ' OR table_name = ' . strtoupper($table); +
105 +
106        $constraints = $this->conn->fetchColumn($query); +
107 +
108        return array_map(array($this->conn->formatter, 'fixIndexName'), $constraints); +
109    } +
110    /** +
111     * lists table constraints +
112     * +
113     * @param string $table     database table name +
114     * @return array +
115     */ +
116    public function listTableColumns($table) +
117    { +
118        $table  = strtoupper($table); +
119        $sql    = "SELECT column_name, data_type, data_length, nullable, data_default, data_scale, data_precision FROM all_tab_columns" +
120                . " WHERE table_name = '" . $table . "' ORDER BY column_name"; +
121 +
122        $result = $this->conn->fetchAssoc($sql); +
123 +
124        foreach($result as $val) { +
125            $val = array_change_key_case($val, CASE_LOWER); +
126            $decl = $this->conn->dataDict->getPortableDeclaration($val); +
127 +
128 +
129            $descr[$val['column_name']] = array( +
130               'name'       => $val['column_name'], +
131               'notnull'    => (bool) ($val['nullable'] === 'N'), +
132               'ntype'      => $val['data_type'], +
133               'type'       => $decl['type'][0], +
134               'alltypes'   => $decl['type'], +
135               'fixed'      => $decl['fixed'], +
136               'unsigned'   => $decl['unsigned'], +
137               'default'    => $val['data_default'], +
138               'length'     => $val['data_length'], +
139               'precision'  => $val['data_precision'], +
140               'scale'      => $val['scale'], +
141            ); +
142        } +
143        return $result; +
144    } +
145    /** +
146     * lists table constraints +
147     * +
148     * @param string $table     database table name +
149     * @return array +
150     */ +
151    public function listTableIndexes($table) +
152    { +
153        $table = $this->conn->quote($table, 'text'); +
154        $query = 'SELECT index_name name FROM user_indexes' +
155               . ' WHERE table_name = ' . $table . ' OR table_name = ' . strtoupper($table) +
156               . ' AND generated = ' . $this->conn->quote('N', 'text'); +
157 +
158        $indexes = $this->conn->fetchColumn($query); +
159 +
160        return array_map(array($this->conn->formatter, 'fixIndexName'), $indexes); +
161    } +
162    /** +
163     * lists tables +
164     * +
165     * @param string|null $database +
166     * @return array +
167     */ +
168    public function listTables($database = null) +
169    { +
170        $query = 'SELECT table_name FROM sys.user_tables'; +
171        return $this->conn->fetchColumn($query); +
172    } +
173    /** +
174     * lists table triggers +
175     * +
176     * @param string $table     database table name +
177     * @return array +
178     */ +
179    public function listTableTriggers($table) +
180    { +
181 +
182    } +
183    /** +
184     * lists table views +
185     * +
186     * @param string $table     database table name +
187     * @return array +
188     */ +
189    public function listTableViews($table) +
190    { +
191 +
192    } +
193    /** +
194     * lists database users +
195     * +
196     * @return array +
197     */ +
198    public function listUsers() +
199    { +
200        /** +
201        if ($this->conn->options['emulate_database'] && $this->conn->options['database_name_prefix']) { +
202            $query = 'SELECT SUBSTR(username, '; +
203            $query.= (strlen($this->conn->options['database_name_prefix'])+1); +
204            $query.= ") FROM sys.dba_users WHERE username NOT LIKE '"; +
205            $query.= $this->conn->options['database_name_prefix']."%'"; +
206        } else { +
207        */ +
208 +
209        $query = 'SELECT username FROM sys.dba_users'; +
210        //} +
211 +
212        return $this->conn->fetchColumn($query); +
213    } +
214    /** +
215     * lists database views +
216     * +
217     * @param string|null $database +
218     * @return array +
219     */ +
220    public function listViews($database = null) +
221    { +
222        $query = 'SELECT view_name FROM sys.user_views'; +
223        return $this->conn->fetchColumn($query); +
224    } +
225}
\ No newline at end of file diff --git a/tests/coverage/Doctrine_Import_Pgsql.html b/tests/coverage/Doctrine_Import_Pgsql.html new file mode 100644 index 000000000..8e9259de6 --- /dev/null +++ b/tests/coverage/Doctrine_Import_Pgsql.html @@ -0,0 +1,713 @@ + + + Coverage for Doctrine_Import_Pgsql + + +

Coverage for Doctrine_Import_Pgsql

Back to coverage report

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
1<?php +
2/* +
3 *  $Id: Pgsql.php 2702 2007-10-03 21:43:22Z Jonathan.Wage $ +
4 * +
5 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +
6 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +
7 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +
8 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +
9 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +
10 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +
11 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +
12 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +
13 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +
14 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +
15 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +
16 * +
17 * This software consists of voluntary contributions made by many individuals +
18 * and is licensed under the LGPL. For more information, see +
19 * <http://www.phpdoctrine.com>. +
20 */ +
21Doctrine::autoload('Doctrine_Import'); +
22/** +
23 * @package     Doctrine +
24 * @subpackage  Import +
25 * @license     http://www.opensource.org/licenses/lgpl-license.php LGPL +
26 * @author      Konsta Vesterinen <kvesteri@cc.hut.fi> +
27 * @author      Paul Cooper <pgc@ucecom.com> +
28 * @author      Lukas Smith <smith@pooteeweet.org> (PEAR MDB2 library) +
29 * @version     $Revision: 2702 $ +
30 * @link        www.phpdoctrine.com +
31 * @since       1.0 +
32 */ +
33class Doctrine_Import_Pgsql extends Doctrine_Import +
34{ +
35 +
36    protected $sql = array( +
37                        'listDatabases' => 'SELECT datname FROM pg_database', +
38                        'listFunctions' => "SELECT +
39                                                proname +
40                                            FROM +
41                                                pg_proc pr, +
42                                                pg_type tp +
43                                            WHERE +
44                                                tp.oid = pr.prorettype +
45                                                AND pr.proisagg = FALSE +
46                                                AND tp.typname <> 'trigger' +
47                                                AND pr.pronamespace IN +
48                                                    (SELECT oid FROM pg_namespace +
49                                                     WHERE nspname NOT LIKE 'pg_%' AND nspname != 'information_schema'", +
50                        'listSequences' => "SELECT +
51                                                relname +
52                                            FROM +
53                                                pg_class +
54                                            WHERE relkind = 'S' AND relnamespace IN +
55                                                (SELECT oid FROM pg_namespace +
56                                                 WHERE nspname NOT LIKE 'pg_%' AND nspname != 'information_schema')", +
57                        'listTables'    => "SELECT +
58                                                c.relname AS table_name +
59                                            FROM pg_class c, pg_user u +
60                                            WHERE c.relowner = u.usesysid +
61                                                AND c.relkind = 'r' +
62                                                AND NOT EXISTS (SELECT 1 FROM pg_views WHERE viewname = c.relname) +
63                                                AND c.relname !~ '^(pg_|sql_)' +
64                                            UNION +
65                                            SELECT c.relname AS table_name +
66                                            FROM pg_class c +
67                                            WHERE c.relkind = 'r' +
68                                                AND NOT EXISTS (SELECT 1 FROM pg_views WHERE viewname = c.relname) +
69                                                AND NOT EXISTS (SELECT 1 FROM pg_user WHERE usesysid = c.relowner) +
70                                                AND c.relname !~ '^pg_'", +
71                        'listViews'     => 'SELECT viewname FROM pg_views', +
72                        'listUsers'     => 'SELECT usename FROM pg_user', +
73                        'listTableConstraints' => "SELECT +
74                                                        relname +
75                                                   FROM +
76                                                        pg_class +
77                                                   WHERE oid IN ( +
78                                                        SELECT indexrelid +
79                                                        FROM pg_index, pg_class +
80                                                        WHERE pg_class.relname = %s +
81                                                            AND pg_class.oid = pg_index.indrelid +
82                                                            AND (indisunique = 't' OR indisprimary = 't') +
83                                                        )", +
84                        'listTableIndexes'     => "SELECT +
85                                                        relname +
86                                                   FROM +
87                                                        pg_class +
88                                                   WHERE oid IN ( +
89                                                        SELECT indexrelid +
90                                                        FROM pg_index, pg_class +
91                                                        WHERE pg_class.relname = %s +
92                                                            AND pg_class.oid=pg_index.indrelid +
93                                                            AND indisunique != 't' +
94                                                            AND indisprimary != 't' +
95                                                        )", +
96                        'listTableColumns'     => "SELECT +
97                                                        a.attnum, +
98                                                        a.attname AS field, +
99                                                        t.typname AS type, +
100                                                        format_type(a.atttypid, a.atttypmod) AS complete_type, +
101                                                        a.attnotnull AS isnotnull, +
102                                                        (SELECT 't' +
103                                                          FROM pg_index +
104                                                          WHERE c.oid = pg_index.indrelid +
105                                                          AND pg_index.indkey[0] = a.attnum +
106                                                          AND pg_index.indisprimary = 't' +
107                                                        ) AS pri, +
108                                                        (SELECT pg_attrdef.adsrc +
109                                                          FROM pg_attrdef +
110                                                          WHERE c.oid = pg_attrdef.adrelid +
111                                                          AND pg_attrdef.adnum=a.attnum +
112                                                        ) AS default +
113                                                  FROM pg_attribute a, pg_class c, pg_type t +
114                                                  WHERE c.relname = %s +
115                                                        AND a.attnum > 0 +
116                                                        AND a.attrelid = c.oid +
117                                                        AND a.atttypid = t.oid +
118                                                  ORDER BY a.attnum", +
119                        ); +
120    /** +
121     * lists all database triggers +
122     * +
123     * @param string|null $database +
124     * @return array +
125     */ +
126    public function listTriggers($database = null) +
127    { +
128 +
129    } +
130    /** +
131     * lists table constraints +
132     * +
133     * @param string $table     database table name +
134     * @return array +
135     */ +
136    public function listTableConstraints($table) +
137    { +
138        $table = $this->conn->quote($table); +
139        $query = sprintf($this->sql['listTableConstraints'], $table); +
140 +
141        return $this->conn->fetchColumn($query); +
142    } +
143    /** +
144     * lists table constraints +
145     * +
146     * @param string $table     database table name +
147     * @return array +
148     */ +
149    public function listTableColumns($table) +
150    { +
151        $table = $this->conn->quote($table); +
152        $query = sprintf($this->sql['listTableColumns'], $table); +
153        $result = $this->conn->fetchAssoc($query); +
154 +
155        $columns     = array(); +
156        foreach ($result as $key => $val) { +
157            $val = array_change_key_case($val, CASE_LOWER); +
158 +
159            if (strtolower($val['type']) === 'varchar') { +
160                // get length from varchar definition +
161                $length = preg_replace('~.*\(([0-9]*)\).*~', '$1', $val['complete_type']); +
162                $val['length'] = $length; +
163            } +
164             +
165            $decl = $this->conn->dataDict->getPortableDeclaration($val); +
166 +
167            $description = array( +
168                'name'      => $val['field'], +
169                'ntype'     => $val['type'], +
170                'type'      => $decl['type'][0], +
171                'alltypes'  => $decl['type'], +
172                'length'    => $decl['length'], +
173                'fixed'     => $decl['fixed'], +
174                'unsigned'  => $decl['unsigned'], +
175                'notnull'   => ($val['isnotnull'] == ''), +
176                'default'   => $val['default'], +
177                'primary'   => ($val['pri'] == 't'), +
178            ); +
179            $columns[$val['field']] = $description; +
180        } +
181        return $columns; +
182    } +
183    /** +
184     * list all indexes in a table +
185     * +
186     * @param string $table     database table name +
187     * @return array +
188     */ +
189    public function listTableIndexes($table) +
190    { +
191        $table = $this->conn->quote($table); +
192        $query = sprintf($this->sql['listTableIndexes'], $table); +
193 +
194        return $this->conn->fetchColumn($query); +
195    } +
196    /** +
197     * lists tables +
198     * +
199     * @param string|null $database +
200     * @return array +
201     */ +
202    public function listTables($database = null) +
203    { +
204        return $this->conn->fetchColumn($this->sql['listTables']); +
205    } +
206    /** +
207     * lists table triggers +
208     * +
209     * @param string $table     database table name +
210     * @return array +
211     */ +
212    public function listTableTriggers($table) +
213    { +
214        $query = 'SELECT trg.tgname AS trigger_name +
215                    FROM pg_trigger trg, +
216                         pg_class tbl +
217                   WHERE trg.tgrelid = tbl.oid'; +
218        if ($table !== null) { +
219            $table = $this->conn->quote(strtoupper($table), 'string'); +
220            $query .= " AND tbl.relname = $table"; +
221        } +
222        return $this->conn->fetchColumn($query); +
223    } +
224    /** +
225     * list the views in the database that reference a given table +
226     * +
227     * @param string $table     database table name +
228     * @return array +
229     */ +
230    public function listTableViews($table) +
231    { +
232        return $this->conn->fetchColumn($query); +
233    } +
234}
\ No newline at end of file diff --git a/tests/coverage/Doctrine_Import_Schema.html b/tests/coverage/Doctrine_Import_Schema.html new file mode 100644 index 000000000..176a4074f --- /dev/null +++ b/tests/coverage/Doctrine_Import_Schema.html @@ -0,0 +1,776 @@ + + + Coverage for Doctrine_Import_Schema + + +

Coverage for Doctrine_Import_Schema

Back to coverage report

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
1<?php +
2/* +
3 * $Id: Schema.php 1838 2007-06-26 00:58:21Z nicobn $ +
4 * +
5 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +
6 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +
7 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +
8 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +
9 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +
10 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +
11 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +
12 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +
13 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +
14 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +
15 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +
16 * +
17 * This software consists of voluntary contributions made by many individuals +
18 * and is licensed under the LGPL. For more information, see +
19 * <http://www.phpdoctrine.com>. +
20 */ +
21 +
22/** +
23 * class Doctrine_Import_Schema +
24 * +
25 * Different methods to import a XML schema. The logic behind using two different +
26 * methods is simple. Some people will like the idea of producing Doctrine_Record +
27 * objects directly, which is totally fine. But in fast and growing application, +
28 * table definitions tend to be a little bit more volatile. importArr() can be used +
29 * to output a table definition in a PHP file. This file can then be stored  +
30 * independantly from the object itself. +
31 * +
32 * @package     Doctrine +
33 * @subpackage  Import +
34 * @link        www.phpdoctrine.com +
35 * @license     http://www.opensource.org/licenses/lgpl-license.php LGPL +
36 * @version     $Revision: 1838 $ +
37 * @author      Nicolas Bérard-Nault <nicobn@gmail.com> +
38 * @author      Jonathan H. Wage <jonwage@gmail.com> +
39 */ +
40class Doctrine_Import_Schema +
41{ +
42    public $relations = array(); +
43    public $generateBaseClasses = false; +
44     +
45    public function generateBaseClasses($bool = null) +
46    { +
47        if ($bool !== null) { +
48            $this->generateBaseClasses = $bool; +
49        } +
50         +
51        return $this->generateBaseClasses; +
52    } +
53    public function buildSchema($schema, $format) +
54    { +
55        $array = array(); +
56        foreach ((array) $schema AS $s) { +
57            $array = array_merge($array, $this->parseSchema($s, $format)); +
58        } +
59 +
60        $this->buildRelationships($array); +
61         +
62        return array('schema' => $array, 'relations' => $this->relations); +
63    } +
64    /** +
65     * importSchema +
66     * +
67     * A method to import a Schema and translate it into a Doctrine_Record object +
68     * +
69     * @param  string $schema       The file containing the XML schema +
70     * @param  string $directory    The directory where the Doctrine_Record class will be written +
71     * @param  array $models        Optional array of models to import +
72     *  +
73     * @access public +
74     */ +
75    public function importSchema($schema, $format = 'yml', $directory = null, $models = array()) +
76    { +
77        $builder = new Doctrine_Import_Builder(); +
78        $builder->setTargetPath($directory); +
79        $builder->generateBaseClasses($this->generateBaseClasses()); +
80         +
81        $schema = $this->buildSchema($schema, $format); +
82         +
83        $array = $schema['schema']; +
84         +
85        foreach ($array as $name => $properties) { +
86            if (!empty($models) && !in_array($properties['className'], $models)) { +
87                continue; +
88            } +
89             +
90            $options = $this->getOptions($properties, $directory); +
91            $columns = $this->getColumns($properties); +
92            $relations = $this->getRelations($properties);             +
93             +
94            $builder->buildRecord($options, $columns, $relations); +
95        } +
96    } +
97     +
98    public function getOptions($properties, $directory) +
99    { +
100      $options = array(); +
101      $options['className'] = $properties['className']; +
102      $options['fileName'] = $directory.DIRECTORY_SEPARATOR.$properties['className'].'.class.php'; +
103      $options['tableName'] = isset($properties['tableName']) ? $properties['tableName']:null; +
104       +
105      if (isset($properties['inheritance'])) { +
106          $options['inheritance'] = $properties['inheritance']; +
107      } +
108       +
109      return $options; +
110    } +
111     +
112    public function getColumns($properties) +
113    { +
114      return isset($properties['columns']) ? $properties['columns']:array(); +
115    } +
116     +
117    public function getRelations($properties) +
118    { +
119      return isset($this->relations[$properties['className']]) ? $this->relations[$properties['className']]:array(); +
120    } +
121     +
122    /** +
123     * parseSchema +
124     * +
125     * A method to parse a Yml Schema and translate it into a property array.  +
126     * The function returns that property array. +
127     * +
128     * @param  string $schema   Path to the file containing the XML schema +
129     * @return array +
130     */ +
131    public function parseSchema($schema, $type) +
132    { +
133        $array = Doctrine_Parser::load($schema, $type); +
134         +
135        $build = array(); +
136         +
137        foreach ($array as $className => $table) { +
138            $columns = array(); +
139             +
140            $className = isset($table['className']) ? (string) $table['className']:(string) $className; +
141            $tableName = isset($table['tableName']) ? (string) $table['tableName']:(string) Doctrine::tableize($className); +
142             +
143            $build[$className]['className'] = $className; +
144             +
145            if (isset($table['columns'])) { +
146                foreach ($table['columns'] as $columnName => $field) { +
147                    $colDesc = array(); +
148                    $colDesc['name'] = isset($field['name']) ? (string) $field['name']:$columnName; +
149                    $colDesc['type'] = isset($field['type']) ? (string) $field['type']:null; +
150                    $colDesc['ptype'] = isset($field['ptype']) ? (string) $field['ptype']:(string) $colDesc['type']; +
151                    $colDesc['length'] = isset($field['length']) ? (int) $field['length']:null; +
152                    $colDesc['fixed'] = isset($field['fixed']) ? (int) $field['fixed']:null; +
153                    $colDesc['unsigned'] = isset($field['unsigned']) ? (bool) $field['unsigned']:null; +
154                    $colDesc['primary'] = isset($field['primary']) ? (bool) (isset($field['primary']) && $field['primary']):null; +
155                    $colDesc['default'] = isset($field['default']) ? (string) $field['default']:null; +
156                    $colDesc['notnull'] = isset($field['notnull']) ? (bool) (isset($field['notnull']) && $field['notnull']):null; +
157                    $colDesc['autoincrement'] = isset($field['autoincrement']) ? (bool) (isset($field['autoincrement']) && $field['autoincrement']):null; +
158                    $colDesc['unique'] = isset($field['unique']) ? (bool) (isset($field['unique']) && $field['unique']):null; +
159                    $colDesc['values'] = isset($field['values']) ? (array) $field['values']: null; +
160 +
161                    $columns[(string) $colDesc['name']] = $colDesc; +
162                } +
163                 +
164                $build[$className]['tableName'] = $tableName; +
165                $build[$className]['columns'] = $columns; +
166                $build[$className]['relations'] = isset($table['relations']) ? $table['relations']:array(); +
167            } +
168             +
169            if (isset($table['inheritance'])) { +
170                $build[$className]['inheritance'] = $table['inheritance']; +
171            } +
172        } +
173         +
174        return $build; +
175    } +
176     +
177    public function buildRelationships(&$array) +
178    { +
179        foreach ($array as $name => $properties) { +
180            if (!isset($properties['relations'])) { +
181                continue; +
182            } +
183             +
184            $className = $properties['className'];      +
185            $relations = $properties['relations']; +
186             +
187            foreach ($relations as $alias => $relation) { +
188  +
189                $class = isset($relation['class']) ? $relation['class']:$alias; +
190                 +
191                $relation['foreign'] = isset($relation['foreign'])?$relation['foreign']:'id';                 +
192                $relation['alias'] = isset($relation['alias']) ? $relation['alias'] : $alias; +
193                $relation['class'] = $class; +
194                 +
195                if (isset($relation['type']) && $relation['type']) { +
196                    $relation['type'] = $relation['type'] === 'one' ? Doctrine_Relation::ONE:Doctrine_Relation::MANY; +
197                } else { +
198                    $relation['type'] = Doctrine_Relation::ONE; +
199                } +
200 +
201                if (isset($relation['foreignType']) && $relation['foreignType']) { +
202                    $relation['foreignType'] = $relation['foreignType'] === 'one' ? Doctrine_Relation::ONE:Doctrine_Relation::MANY; +
203                } +
204                 +
205                if(isset($relation['refClass']) && !empty($relation['refClass'])  && (!isset($array[$relation['refClass']]['relations']) || empty($array[$relation['refClass']]['relations']))) { +
206                    $array[$relation['refClass']]['relations'][$className] = array('local'=>$relation['local'],'foreign'=>$relation['foreign'],'ignore'=>true); +
207                    $array[$relation['refClass']]['relations'][$relation['class']] = array('local'=>$relation['local'],'foreign'=>$relation['foreign'],'ignore'=>true); +
208                     +
209                    if(isset($relation['foreignAlias'])) { +
210                        $array[$relation['class']]['relations'][$relation['foreignAlias']] = array('type'=>$relation['type'],'local'=>$relation['foreign'],'foreign'=>$relation['local'],'refClass'=>$relation['refClass'],'class'=>$className); +
211                    } +
212                } +
213                 +
214                $this->relations[$className][$alias] = $relation; +
215            } +
216        } +
217         +
218        $this->fixRelationships(); +
219    } +
220     +
221    public function fixRelationships() +
222    { +
223        // define both sides of the relationship +
224        foreach($this->relations as $className => $relations) { +
225            foreach ($relations AS $alias => $relation) { +
226                if(isset($relation['ignore']) && $relation['ignore'] || isset($relation['refClass']) || isset($this->relations[$relation['class']]['relations'][$className])) { +
227                    continue; +
228                } +
229                     +
230                $newRelation = array(); +
231                $newRelation['foreign'] = $relation['local']; +
232                $newRelation['local'] = $relation['foreign']; +
233                $newRelation['class'] = $className; +
234                $newRelation['alias'] = isset($relation['foreignAlias'])?$relation['foreignAlias']:$className; +
235                 +
236                if(isset($relation['foreignType'])) { +
237                    $newRelation['type'] = $relation['foreignType']; +
238                } else { +
239                    $newRelation['type'] = $relation['type'] === Doctrine_Relation::ONE ? Doctrine_Relation::MANY:Doctrine_Relation::ONE;  +
240                } +
241                 +
242                if( isset($this->relations[$relation['class']]) && is_array($this->relations[$relation['class']]) ) { +
243                    foreach($this->relations[$relation['class']] as $otherRelation) { +
244                        // skip fully defined m2m relationships +
245                        if(isset($otherRelation['refClass']) && $otherRelation['refClass'] == $className) { +
246                            continue(2); +
247                        } +
248                    } +
249                } +
250                 +
251                $this->relations[$relation['class']][$className] = $newRelation; +
252            } +
253        } +
254    } +
255}
\ No newline at end of file diff --git a/tests/coverage/Doctrine_Import_Sqlite.html b/tests/coverage/Doctrine_Import_Sqlite.html new file mode 100644 index 000000000..853bcbfeb --- /dev/null +++ b/tests/coverage/Doctrine_Import_Sqlite.html @@ -0,0 +1,701 @@ + + + Coverage for Doctrine_Import_Sqlite + + +

Coverage for Doctrine_Import_Sqlite

Back to coverage report

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
1<?php +
2/* +
3 *  $Id: Sqlite.php 2702 2007-10-03 21:43:22Z Jonathan.Wage $ +
4 * +
5 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +
6 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +
7 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +
8 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +
9 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +
10 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +
11 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +
12 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +
13 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +
14 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +
15 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +
16 * +
17 * This software consists of voluntary contributions made by many individuals +
18 * and is licensed under the LGPL. For more information, see +
19 * <http://www.phpdoctrine.com>. +
20 */ +
21Doctrine::autoload('Doctrine_Import'); +
22/** +
23 * @package     Doctrine +
24 * @subpackage  Import +
25 * @license     http://www.opensource.org/licenses/lgpl-license.php LGPL +
26 * @author      Konsta Vesterinen <kvesteri@cc.hut.fi> +
27 * @author      Lukas Smith <smith@pooteeweet.org> (PEAR MDB2 library) +
28 * @version     $Revision: 2702 $ +
29 * @link        www.phpdoctrine.com +
30 * @since       1.0 +
31 */ +
32class Doctrine_Import_Sqlite extends Doctrine_Import +
33{ +
34    /** +
35     * lists all databases +
36     * +
37     * @return array +
38     */ +
39    public function listDatabases() +
40    { +
41 +
42    } +
43    /** +
44     * lists all availible database functions +
45     * +
46     * @return array +
47     */ +
48    public function listFunctions() +
49    { +
50 +
51    } +
52    /** +
53     * lists all database triggers +
54     * +
55     * @param string|null $database +
56     * @return array +
57     */ +
58    public function listTriggers($database = null) +
59    { +
60 +
61    } +
62    /** +
63     * lists all database sequences +
64     * +
65     * @param string|null $database +
66     * @return array +
67     */ +
68    public function listSequences($database = null) +
69    { +
70        $query      = "SELECT name FROM sqlite_master WHERE type='table' AND sql NOT NULL ORDER BY name"; +
71        $tableNames = $this->conn->fetchColumn($query); +
72 +
73        $result = array(); +
74        foreach ($tableNames as $tableName) { +
75            if ($sqn = $this->conn->fixSequenceName($tableName, true)) { +
76                $result[] = $sqn; +
77            } +
78        } +
79        if ($this->conn->getAttribute(Doctrine::ATTR_PORTABILITY) & Doctrine::PORTABILITY_FIX_CASE) { +
80            $result = array_map(($this->conn->getAttribute(Doctrine::ATTR_FIELD_CASE) == CASE_LOWER ? 'strtolower' : 'strtoupper'), $result); +
81        } +
82        return $result; +
83    } +
84    /** +
85     * lists table constraints +
86     * +
87     * @param string $table     database table name +
88     * @return array +
89     */ +
90    public function listTableConstraints($table) +
91    { +
92        $table = $this->conn->quote($table, 'text'); +
93 +
94        $query = "SELECT sql FROM sqlite_master WHERE type='index' AND "; +
95 +
96        if ($this->conn->getAttribute(Doctrine::ATTR_PORTABILITY) & Doctrine::PORTABILITY_FIX_CASE) { +
97            $query .= 'LOWER(tbl_name) = ' . strtolower($table); +
98        } else { +
99            $query .= 'tbl_name = ' . $table; +
100        } +
101        $query  .= ' AND sql NOT NULL ORDER BY name'; +
102        $indexes = $this->conn->fetchColumn($query); +
103 +
104        $result = array(); +
105        foreach ($indexes as $sql) { +
106            if (preg_match("/^create unique index ([^ ]+) on /i", $sql, $tmp)) { +
107                $index = $this->conn->fixIndexName($tmp[1]); +
108                if ( ! empty($index)) { +
109                    $result[$index] = true; +
110                } +
111            } +
112        } +
113 +
114        if ($this->conn->getAttribute(Doctrine::ATTR_PORTABILITY) & Doctrine::PORTABILITY_FIX_CASE) { +
115            $result = array_change_key_case($result, $this->conn->getAttribute(Doctrine::ATTR_FIELD_CASE)); +
116        } +
117        return array_keys($result); +
118    } +
119    /** +
120     * lists table constraints +
121     * +
122     * @param string $table     database table name +
123     * @return array +
124     */ +
125    public function listTableColumns($table) +
126    { +
127        $sql    = 'PRAGMA table_info(' . $table . ')'; +
128        $result = $this->conn->fetchAll($sql); +
129 +
130        $description = array(); +
131        $columns     = array(); +
132        foreach ($result as $key => $val) { +
133            $val = array_change_key_case($val, CASE_LOWER); +
134            $decl = $this->conn->dataDict->getPortableDeclaration($val); +
135 +
136            $description = array( +
137                    'name'      => $val['name'], +
138                    'ntype'     => $val['type'], +
139                    'type'      => $decl['type'][0], +
140                    'alltypes'  => $decl['type'], +
141                    'notnull'   => (bool) $val['notnull'], +
142                    'default'   => $val['dflt_value'], +
143                    'primary'   => (bool) $val['pk'], +
144                    'length'    => null, +
145                    'scale'     => null, +
146                    'precision' => null, +
147                    'unsigned'  => null, +
148                    ); +
149            $columns[$val['name']] = $description; +
150        } +
151        return $columns; +
152    } +
153    /** +
154     * lists table constraints +
155     * +
156     * @param string $table     database table name +
157     * @return array +
158     */ +
159    public function listTableIndexes($table) +
160    { +
161        $sql  = 'PRAGMA index_list(' . $table . ')'; +
162        return $this->conn->fetchColumn($sql); +
163   } +
164    /** +
165     * lists tables +
166     * +
167     * @param string|null $database +
168     * @return array +
169     */ +
170    public function listTables($database = null) +
171    { +
172        $sql = "SELECT name FROM sqlite_master WHERE type = 'table' " +
173             . "UNION ALL SELECT name FROM sqlite_temp_master " +
174             . "WHERE type = 'table' ORDER BY name"; +
175 +
176        return $this->conn->fetchColumn($sql); +
177    } +
178    /** +
179     * lists table triggers +
180     * +
181     * @param string $table     database table name +
182     * @return array +
183     */ +
184    public function listTableTriggers($table) +
185    { +
186 +
187    } +
188    /** +
189     * lists table views +
190     * +
191     * @param string $table     database table name +
192     * @return array +
193     */ +
194    public function listTableViews($table) +
195    { +
196        $query = "SELECT name, sql FROM sqlite_master WHERE type='view' AND sql NOT NULL"; +
197        $views = $db->fetchAll($query); +
198 +
199        $result = array(); +
200        foreach ($views as $row) { +
201            if (preg_match("/^create view .* \bfrom\b\s+\b{$table}\b /i", $row['sql'])) { +
202                if ( ! empty($row['name'])) { +
203                    $result[$row['name']] = true; +
204                } +
205            } +
206        } +
207        return $result; +
208    } +
209    /** +
210     * lists database users +
211     * +
212     * @return array +
213     */ +
214    public function listUsers() +
215    { +
216 +
217    } +
218    /** +
219     * lists database views +
220     * +
221     * @param string|null $database +
222     * @return array +
223     */ +
224    public function listViews($database = null) +
225    { +
226        $query = "SELECT name FROM sqlite_master WHERE type='view' AND sql NOT NULL"; +
227 +
228        return $this->conn->fetchColumn($query); +
229    } +
230}
\ No newline at end of file diff --git a/tests/coverage/Doctrine_Lib.html b/tests/coverage/Doctrine_Lib.html new file mode 100644 index 000000000..a7c3f50f0 --- /dev/null +++ b/tests/coverage/Doctrine_Lib.html @@ -0,0 +1,791 @@ + + + Coverage for Doctrine_Lib + + +

Coverage for Doctrine_Lib

Back to coverage report

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
1<?php +
2/* +
3 *  $Id: Lib.php 2702 2007-10-03 21:43:22Z Jonathan.Wage $ +
4 * +
5 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +
6 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +
7 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +
8 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +
9 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +
10 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +
11 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +
12 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +
13 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +
14 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +
15 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +
16 * +
17 * This software consists of voluntary contributions made by many individuals +
18 * and is licensed under the LGPL. For more information, see +
19 * <http://www.phpdoctrine.com>. +
20 */ +
21/** +
22 * Doctrine_Lib has not commonly used static functions, mostly for debugging purposes +
23 * +
24 * @package     Doctrine +
25 * @subpackage  Lib +
26 * @license     http://www.opensource.org/licenses/lgpl-license.php LGPL +
27 * @link        www.phpdoctrine.com +
28 * @since       1.0 +
29 * @version     $Revision: 2702 $ +
30 * @author      Konsta Vesterinen <kvesteri@cc.hut.fi> +
31 */ +
32class Doctrine_Lib +
33{ +
34    /** +
35     * @param integer $state                the state of record +
36     * @see Doctrine_Record::STATE_* constants +
37     * @return string                       string representation of given state +
38     */ +
39    public static function getRecordStateAsString($state) +
40    { +
41        switch ($state) { +
42        case Doctrine_Record::STATE_PROXY: +
43            return "proxy"; +
44            break; +
45        case Doctrine_Record::STATE_CLEAN: +
46            return "persistent clean"; +
47            break; +
48        case Doctrine_Record::STATE_DIRTY: +
49            return "persistent dirty"; +
50            break; +
51        case Doctrine_Record::STATE_TDIRTY: +
52            return "transient dirty"; +
53            break; +
54        case Doctrine_Record::STATE_TCLEAN: +
55            return "transient clean"; +
56            break; +
57        } +
58    } +
59    /** +
60     * returns a string representation of Doctrine_Record object +
61     * @param Doctrine_Record $record +
62     * @return string +
63     */ +
64    public static function getRecordAsString(Doctrine_Record $record) +
65    { +
66        $r[] = '<pre>'; +
67        $r[] = 'Component  : ' . $record->getTable()->getComponentName(); +
68        $r[] = 'ID         : ' . $record->obtainIdentifier(); +
69        $r[] = 'References : ' . count($record->getReferences()); +
70        $r[] = 'State      : ' . Doctrine_Lib::getRecordStateAsString($record->getState()); +
71        $r[] = 'OID        : ' . $record->getOID(); +
72        $r[] = 'data       : ' . Doctrine::dump($record->getData(), false); +
73        $r[] = '</pre>'; +
74        return implode("\n",$r)."<br />"; +
75    } +
76    /** +
77     * Return an collection of records as XML.  +
78     *  +
79     * @see getRecordAsXml for options to set in the record class to control this. +
80     * +
81     * @param Doctrine_Collection $collection +
82     * @param SimpleXMLElement $xml +
83     * @return string Xml as string  +
84     */ +
85 +
86    public static function getCollectionAsXml(Doctrine_Collection $collection, SimpleXMLElement $incomming_xml = null) { +
87 +
88        $collectionName = Doctrine_Lib::plurelize($collection->getTable()->tableName); +
89        if ( $collection->count != 0) { +
90            $record = $collection[0]; +
91            $xml_options = $record->option("xml"); +
92            if ( isset($xml_options["collection_name"])) { +
93                $collectionName = $xml_options["collection_name"]; +
94            } +
95        } +
96 +
97        if ( ! isset($incomming_xml)) { +
98            $new_xml_string = "<?xml version=\"1.0\" encoding=\"UTF-8\" ?><" . $collectionName . "></" . $collectionName . ">"; +
99            $xml = new SimpleXMLElement($new_xml_string); +
100        } else { +
101            $xml = $incomming_xml->addChild($collectionName); +
102        } +
103        foreach ($collection as $key => $record) { +
104            Doctrine_Lib::getRecordAsXml($record, $xml); +
105        } +
106        return $xml->asXML(); +
107    } +
108 +
109    public static function plurelize($string) { +
110        return $string . "s"; +
111    } +
112 +
113    /** +
114     * Return a recrd as XML.  +
115     * +
116     * In order to control how this is done set the "xml" option in a record.  +
117     * This option is an array that has the keys "ignore_fields" and "include_relations". Both of these are arrays that list the name of fields/relations to include/process.  +
118     * +
119     * If you want to insert this xml as a part inside another xml send a  +
120     * SimpleXMLElement to the function. Because of the nature of SimpleXML the  +
121     * content you add to this element will be avilable after the function is  +
122     * complete. +
123     * +
124     * @param Doctrine_Record $record +
125     * @param SimpleXMLElement $xml +
126     * @return string Xml as string +
127     */ +
128    public static function getRecordAsXml(Doctrine_Record $record, SimpleXMlElement $incomming_xml = NULL) +
129    { +
130        $recordname = $record->getTable()->tableName; +
131        if ( !isset($incomming_xml)) { +
132            $new_xml_string = "<?xml version=\"1.0\" encoding=\"UTF-8\" ?><" . $recordname . "></" . $recordname . ">"; +
133            $xml = new SimpleXMLElement($new_xml_string); +
134        } else { +
135            $xml = $incomming_xml->addChild($recordname); +
136        } +
137        foreach($record->obtainIdentifier() as $pk_field => $pk_value) { +
138            $xml->addChild($pk_field,$pk_value);  +
139        } +
140        $xml_options = $record->option("xml"); +
141        if ( isset($xml_options["record_name"])) { +
142            $recordname = $xml_options["record_name"]; +
143        } +
144        foreach ($record->getData() as $field => $value) { +
145            if ((isset($xml_options["ignore_fields"]) && !in_array($field, $xml_options["ignore_fields"])) || !isset($xml_options["ignore_fields"])) { +
146                if ($value instanceOf Doctrine_Null) { +
147                    $xml->addChild($field); +
148                } else {     +
149                    $xml->addChild($field, $value); +
150                } +
151            } +
152        } +
153        if ( ! isset($xml_options["include_relations"])) { +
154            return $xml->asXML(); +
155        } +
156        $relations = $record->getTable()->getRelations(); +
157        foreach ($relations as $name => $relation) { +
158            if (in_array($name, $xml_options["include_relations"])) { +
159                $relation_type = $relation->getType(); +
160                $related_records = $record->get($name); +
161                if ($relation_type == Doctrine_Relation::ONE && $related_records instanceOf Doctrine_Record) { +
162                    Doctrine_Lib::getRecordAsXml($related_records, $xml); +
163                } else { +
164                    Doctrine_Lib::getCollectionAsXml($related_records, $xml); +
165                } +
166            } +
167        } +
168        return $xml->asXML(); +
169    } +
170 +
171 +
172    /** +
173     * getStateAsString +
174     * returns a given connection state as string +
175     * @param integer $state        connection state +
176     */ +
177    public static function getConnectionStateAsString($state) +
178    { +
179        switch ($state) { +
180        case Doctrine_Transaction::STATE_SLEEP: +
181            return "open"; +
182            break; +
183        case Doctrine_Transaction::STATE_BUSY: +
184            return "busy"; +
185            break; +
186        case Doctrine_Transaction::STATE_ACTIVE: +
187            return "active"; +
188            break; +
189        } +
190    } +
191    /** +
192     * returns a string representation of Doctrine_Connection object +
193     * @param Doctrine_Connection $connection +
194     * @return string +
195     */ +
196    public static function getConnectionAsString(Doctrine_Connection $connection) +
197    { +
198        $r[] = '<pre>'; +
199        $r[] = 'Doctrine_Connection object'; +
200        $r[] = 'State               : ' . Doctrine_Lib::getConnectionStateAsString($connection->transaction->getState()); +
201        $r[] = 'Open Transactions   : ' . $connection->transaction->getTransactionLevel(); +
202        $r[] = 'Table in memory     : ' . $connection->count(); +
203        $r[] = 'Driver name         : ' . $connection->getAttribute(Doctrine::ATTR_DRIVER_NAME); +
204 +
205        $r[] = "</pre>"; +
206        return implode("\n",$r)."<br>"; +
207    } +
208    /** +
209     * returns a string representation of Doctrine_Table object +
210     * @param Doctrine_Table $table +
211     * @return string +
212     */ +
213    public static function getTableAsString(Doctrine_Table $table) +
214    { +
215        $r[] = "<pre>"; +
216        $r[] = "Component   : ".$table->getComponentName(); +
217        $r[] = "Table       : ".$table->getTableName(); +
218        $r[] = "</pre>"; +
219        return implode("\n",$r)."<br>"; +
220    } +
221    /** +
222     * @return string +
223     */ +
224    public static function formatSql($sql) +
225    { +
226        $e = explode("\n",$sql); +
227        $color = "367FAC"; +
228        $l = $sql; +
229        $l = str_replace("SELECT ", "<font color='$color'><b>SELECT </b></font><br \>  ",$l); +
230        $l = str_replace("FROM ", "<font color='$color'><b>FROM </b></font><br \>",$l); +
231        $l = str_replace(" LEFT JOIN ", "<br \><font color='$color'><b> LEFT JOIN </b></font>",$l); +
232        $l = str_replace(" INNER JOIN ", "<br \><font color='$color'><b> INNER JOIN </b></font>",$l); +
233        $l = str_replace(" WHERE ", "<br \><font color='$color'><b> WHERE </b></font>",$l); +
234        $l = str_replace(" GROUP BY ", "<br \><font color='$color'><b> GROUP BY </b></font>",$l); +
235        $l = str_replace(" HAVING ", "<br \><font color='$color'><b> HAVING </b></font>",$l); +
236        $l = str_replace(" AS ", "<font color='$color'><b> AS </b></font><br \>  ",$l); +
237        $l = str_replace(" ON ", "<font color='$color'><b> ON </b></font>",$l); +
238        $l = str_replace(" ORDER BY ", "<font color='$color'><b> ORDER BY </b></font><br \>",$l); +
239        $l = str_replace(" LIMIT ", "<font color='$color'><b> LIMIT </b></font><br \>",$l); +
240        $l = str_replace(" OFFSET ", "<font color='$color'><b> OFFSET </b></font><br \>",$l); +
241        $l = str_replace("  ", "<dd>",$l); +
242 +
243        return $l; +
244    } +
245    /** +
246     * returns a string representation of Doctrine_Collection object +
247     * @param Doctrine_Collection $collection +
248     * @return string +
249     */ +
250    public static function getCollectionAsString(Doctrine_Collection $collection) +
251    { +
252        $r[] = "<pre>"; +
253        $r[] = get_class($collection); +
254        $r[] = 'data : ' . Doctrine::dump($collection->getData(), false); +
255        //$r[] = 'snapshot : ' . Doctrine::dump($collection->getSnapshot()); +
256 +
257        $r[] = "</pre>"; +
258        return implode("\n",$r); +
259    } +
260}
\ No newline at end of file diff --git a/tests/coverage/Doctrine_Locator_Injectable.html b/tests/coverage/Doctrine_Locator_Injectable.html new file mode 100644 index 000000000..b2bb06c20 --- /dev/null +++ b/tests/coverage/Doctrine_Locator_Injectable.html @@ -0,0 +1,438 @@ + + + Coverage for Doctrine_Locator_Injectable + + +

Coverage for Doctrine_Locator_Injectable

Back to coverage report

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
1<?php +
2/** +
3 *  $Id$ +
4 * +
5 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +
6 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +
7 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +
8 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +
9 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +
10 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +
11 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +
12 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +
13 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +
14 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +
15 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +
16 * +
17 * This software consists of voluntary contributions made by many individuals +
18 * and is licensed under the LGPL. For more information, see +
19 * <http://www.phpdoctrine.net>. +
20 */ +
21 +
22/** +
23 * Doctrine_Locator_Injectable +
24 * +
25 * @package     Doctrine +
26 * @subpackage  Doctrine_Locator +
27 * @category    Locator +
28 * @license     http://www.gnu.org/licenses/lgpl.txt LGPL +
29 * @link        http://www.phpdoctrine.net +
30 * @author      Janne Vanhala <jpvanhal@cc.hut.fi> +
31 * @author      Konsta Vesterinen <kvesteri@cc.hut.fi> +
32 * @author      Eevert Saukkokoski <dmnEe0@gmail.com> +
33 * @version     $Revision$ +
34 * @since       1.0 +
35 */ +
36class Doctrine_Locator_Injectable +
37{ +
38    /** +
39     * @var Doctrine_Locator      the locator object +
40     */ +
41    protected $_locator; +
42    /** +
43     * @var array               an array of bound resources +
44     */ +
45    protected $_resources = array(); +
46    /** +
47     * @var Doctrine_Null $null     Doctrine_Null object, used for extremely fast null value checking +
48     */ +
49    protected static $_null; +
50    /** +
51     * setLocator +
52     * this method can be used for setting the locator object locally +
53     * +
54     * @param Doctrine_Locator                the locator object +
55     * @return Doctrine_Locator_Injectable    this instance +
56     */ +
57    public function setLocator(Doctrine_Locator $locator) +
58    { +
59        $this->_locator = $locator; +
60        return $this; +
61    } +
62    /** +
63     * getLocator +
64     * returns the locator associated with this object +
65     *  +
66     * if there are no locator locally associated then +
67     * this method tries to fetch the current global locator +
68     * +
69     * @return Doctrine_Locator +
70     */ +
71    public function getLocator() +
72    { +
73        if ( ! isset($this->_locator)) { +
74            $this->_locator = Doctrine_Locator::instance(); +
75 +
76        } +
77        return $this->_locator; +
78    } +
79    /** +
80     * locate +
81     * locates a resource by given name and returns it +
82     * +
83     * if the resource cannot be found locally this method tries +
84     * to use the global locator for finding the resource +
85     * +
86     * @see Doctrine_Locator::locate() +
87     * @throws Doctrine_Locator_Exception     if the resource could not be found +
88     * @param string $name                  the name of the resource +
89     * @return mixed                        the located resource +
90     */ +
91    public function locate($name) +
92    { +
93        if (isset($this->_resources[$name])) { +
94            if (is_object($this->_resources[$name])) { +
95                return $this->_resources[$name]; +
96            } else { +
97                // get the name of the concrete implementation +
98                $concreteImpl = $this->_resources[$name]; +
99                 +
100                return $this->getLocator()->locate($concreteImpl); +
101            } +
102        } else { +
103            return $this->getLocator()->locate($name); +
104        } +
105    } +
106    /** +
107     * bind +
108     * binds a resource to a name +
109     * +
110     * @param string $name      the name of the resource to bind +
111     * @param mixed $value      the value of the resource +
112     * @return Doctrine_Locator   this object +
113     */ +
114    public function bind($name, $resource) +
115    { +
116        $this->_resources[$name] = $resource; +
117         +
118        return $this;     +
119    } +
120 +
121    /** +
122     * initNullObject +
123     * initializes the null object +
124     * +
125     * @param Doctrine_Null $null +
126     * @return void +
127     */ +
128    public static function initNullObject(Doctrine_Null $null) +
129    { +
130        self::$_null = $null; +
131    } +
132    /** +
133     * getNullObject +
134     * returns the null object associated with this object +
135     * +
136     * @return Doctrine_Null +
137     */ +
138    public static function getNullObject() +
139    { +
140        return self::$_null; +
141    } +
142} +
\ No newline at end of file diff --git a/tests/coverage/Doctrine_Manager.html b/tests/coverage/Doctrine_Manager.html new file mode 100644 index 000000000..b6d44a35b --- /dev/null +++ b/tests/coverage/Doctrine_Manager.html @@ -0,0 +1,1851 @@ + + + Coverage for Doctrine_Manager + + +

Coverage for Doctrine_Manager

Back to coverage report

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
1<?php +
2/* +
3 *  $Id: Manager.php 2820 2007-10-12 13:18:40Z ppetermann $ +
4 * +
5 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +
6 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +
7 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +
8 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +
9 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +
10 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +
11 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +
12 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +
13 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +
14 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +
15 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +
16 * +
17 * This software consists of voluntary contributions made by many individuals +
18 * and is licensed under the LGPL. For more information, see +
19 * <http://www.phpdoctrine.com>. +
20 */ +
21/** +
22 * +
23 * Doctrine_Manager is the base component of all doctrine based projects. +
24 * It opens and keeps track of all connections (database connections). +
25 * +
26 * @package     Doctrine +
27 * @subpackage  Manager +
28 * @license     http://www.opensource.org/licenses/lgpl-license.php LGPL +
29 * @link        www.phpdoctrine.com +
30 * @since       1.0 +
31 * @version     $Revision: 2820 $ +
32 * @author      Konsta Vesterinen <kvesteri@cc.hut.fi> +
33 */ +
34class Doctrine_Manager extends Doctrine_Configurable implements Countable, IteratorAggregate +
35{ +
36    /** +
37     * @var array $connections          an array containing all the opened connections +
38     */ +
39    protected $_connections   = array(); +
40    /** +
41     * @var array $bound                an array containing all components that have a bound connection +
42     */ +
43    protected $_bound         = array(); +
44    /** +
45     * @var integer $index              the incremented index +
46     */ +
47    protected $_index         = 0; +
48    /** +
49     * @var integer $currIndex          the current connection index +
50     */ +
51    protected $_currIndex     = 0; +
52    /** +
53     * @var string $root                root directory +
54     */ +
55    protected $_root; +
56    /** +
57     * @var Doctrine_Query_Registry     the query registry +
58     */ +
59    protected $_queryRegistry; +
60     +
61    protected static $driverMap = array('oci' => 'oracle'); +
62    /** +
63     * constructor +
64     * +
65     * this is private constructor (use getInstance to get an instance of this class) +
66     */ +
67    private function __construct() +
68    { +
69        $this->_root = dirname(__FILE__); +
70 +
71        Doctrine_Locator_Injectable::initNullObject(new Doctrine_Null); +
72    } +
73    /** +
74     * setDefaultAttributes +
75     * sets default attributes +
76     * +
77     * @return boolean +
78     */ +
79    public function setDefaultAttributes() +
80    { +
81        static $init = false; +
82        if ( ! $init) { +
83            $init = true; +
84            $attributes = array( +
85                        Doctrine::ATTR_CACHE            => null, +
86                        Doctrine::ATTR_LOAD_REFERENCES  => true, +
87                        Doctrine::ATTR_LISTENER         => new Doctrine_EventListener(), +
88                        Doctrine::ATTR_RECORD_LISTENER  => new Doctrine_Record_Listener(), +
89                        Doctrine::ATTR_THROW_EXCEPTIONS => true, +
90                        Doctrine::ATTR_VALIDATE         => Doctrine::VALIDATE_NONE, +
91                        Doctrine::ATTR_QUERY_LIMIT      => Doctrine::LIMIT_RECORDS, +
92                        Doctrine::ATTR_IDXNAME_FORMAT   => "%s_idx", +
93                        Doctrine::ATTR_SEQNAME_FORMAT   => "%s_seq", +
94                        Doctrine::ATTR_QUOTE_IDENTIFIER => false, +
95                        Doctrine::ATTR_SEQCOL_NAME      => 'id', +
96                        Doctrine::ATTR_PORTABILITY      => Doctrine::PORTABILITY_ALL, +
97                        Doctrine::ATTR_EXPORT           => Doctrine::EXPORT_ALL, +
98                        Doctrine::ATTR_DECIMAL_PLACES   => 2, +
99                        ); +
100            foreach ($attributes as $attribute => $value) { +
101                $old = $this->getAttribute($attribute); +
102                if ($old === null) { +
103                    $this->setAttribute($attribute,$value); +
104                } +
105            } +
106            return true; +
107        } +
108        return false; +
109    } +
110    /** +
111     * returns the root directory of Doctrine +
112     * +
113     * @return string +
114     */ +
115    final public function getRoot() +
116    { +
117        return $this->_root; +
118    } +
119    /** +
120     * getInstance +
121     * returns an instance of this class +
122     * (this class uses the singleton pattern) +
123     * +
124     * @return Doctrine_Manager +
125     */ +
126    public static function getInstance() +
127    { +
128        static $instance; +
129        if ( ! isset($instance)) { +
130            $instance = new self(); +
131        } +
132        return $instance; +
133    } +
134 +
135    /** +
136     * getQueryRegistry +
137     * lazy-initializes the query registry object and returns it +
138     * +
139     * @return Doctrine_Query_Registry +
140     */ +
141    public function getQueryRegistry() +
142    { +
143     if ( ! isset($this->_queryRegistry)) { +
144        $this->_queryRegistry = new Doctrine_Query_Registry; +
145     } +
146        return $this->_queryRegistry; +
147    } +
148     +
149    /** +
150     * setQueryRegistry +
151     * sets the query registry +
152     * +
153     * @return Doctrine_Manager     this object +
154     */ +
155    public function setQueryRegistry(Doctrine_Query_Registry $registry) +
156    { +
157        $this->_queryRegistry = $registry; +
158         +
159        return $this; +
160    } +
161    /** +
162     * fetch +
163     * fetches data using the provided queryKey and  +
164     * the associated query in the query registry +
165     * +
166     * if no query for given queryKey is being found a  +
167     * Doctrine_Query_Registry exception is being thrown +
168     * +
169     * @param string $queryKey      the query key +
170     * @param array $params         prepared statement params (if any) +
171     * @return mixed                the fetched data +
172     */ +
173    public function find($queryKey, $params = array(), $hydrationMode = Doctrine::HYDRATE_RECORD) +
174    { +
175        return Doctrine_Manager::getInstance() +
176                            ->getQueryRegistry() +
177                            ->get($queryKey) +
178                            ->execute($params, $hydrationMode); +
179    } +
180    /** +
181     * fetchOne +
182     * fetches data using the provided queryKey and  +
183     * the associated query in the query registry +
184     * +
185     * if no query for given queryKey is being found a  +
186     * Doctrine_Query_Registry exception is being thrown +
187     * +
188     * @param string $queryKey      the query key +
189     * @param array $params         prepared statement params (if any) +
190     * @return mixed                the fetched data +
191     */ +
192    public function findOne($queryKey, $params = array(), $hydrationMode = Doctrine::HYDRATE_RECORD) +
193    { +
194        return Doctrine_Manager::getInstance() +
195                            ->getQueryRegistry() +
196                            ->get($queryKey) +
197                            ->fetchOne($params, $hydrationMode); +
198    } +
199    /** +
200     * connection +
201     * +
202     * if the adapter parameter is set this method acts as +
203     * a short cut for Doctrine_Manager::getInstance()->openConnection($adapter, $name); +
204     * +
205     * if the adapter paramater is not set this method acts as +
206     * a short cut for Doctrine_Manager::getInstance()->getCurrentConnection() +
207     * +
208     * @param PDO|Doctrine_Adapter_Interface $adapter   database driver +
209     * @param string $name                              name of the connection, if empty numeric key is used +
210     * @throws Doctrine_Manager_Exception               if trying to bind a connection with an existing name +
211     * @return Doctrine_Connection +
212     */ +
213    public static function connection($adapter = null, $name = null) +
214    { +
215        if ($adapter == null) { +
216            return Doctrine_Manager::getInstance()->getCurrentConnection(); +
217        } else { +
218            return Doctrine_Manager::getInstance()->openConnection($adapter, $name); +
219        } +
220    } +
221    /** +
222     * openConnection +
223     * opens a new connection and saves it to Doctrine_Manager->connections +
224     * +
225     * @param PDO|Doctrine_Adapter_Interface $adapter   database driver +
226     * @param string $name                              name of the connection, if empty numeric key is used +
227     * @throws Doctrine_Manager_Exception               if trying to bind a connection with an existing name +
228     * @throws Doctrine_Manager_Exception               if trying to open connection for unknown driver +
229     * @return Doctrine_Connection +
230     */ +
231    public function openConnection($adapter, $name = null, $setCurrent = true) +
232    { +
233        if (is_object($adapter)) { +
234            if ( ! ($adapter instanceof PDO) && ! in_array('Doctrine_Adapter_Interface', class_implements($adapter))) { +
235                throw new Doctrine_Manager_Exception("First argument should be an instance of PDO or implement Doctrine_Adapter_Interface"); +
236            } +
237 +
238            $driverName = $adapter->getAttribute(Doctrine::ATTR_DRIVER_NAME); +
239        } elseif (is_array($adapter)) { +
240            if ( ! isset($adapter[0])) { +
241                throw new Doctrine_Manager_Exception('Empty data source name given.'); +
242            } +
243            $e = explode(':', $adapter[0]); +
244 +
245            if ($e[0] == 'uri') { +
246                $e[0] = 'odbc'; +
247            } +
248 +
249            $parts['dsn']    = $adapter[0]; +
250            $parts['scheme'] = $e[0]; +
251            $parts['user']   = (isset($adapter[1])) ? $adapter[1] : null; +
252            $parts['pass']   = (isset($adapter[2])) ? $adapter[2] : null; +
253             +
254            $driverName = $e[0]; +
255            $adapter = $parts; +
256        } else { +
257            $parts = $this->parseDsn($adapter); +
258             +
259            $driverName = $parts['scheme']; +
260             +
261            $adapter = $parts; +
262        } +
263 +
264        // initialize the default attributes +
265        $this->setDefaultAttributes(); +
266 +
267        if ($name !== null) { +
268            $name = (string) $name; +
269            if (isset($this->_connections[$name])) { +
270                return $this->_connections[$name]; +
271            } +
272        } else { +
273            $name = $this->_index; +
274            $this->_index++; +
275        } +
276 +
277 +
278        $drivers = array('mysql'    => 'Doctrine_Connection_Mysql', +
279                         'sqlite'   => 'Doctrine_Connection_Sqlite', +
280                         'pgsql'    => 'Doctrine_Connection_Pgsql', +
281                         'oci'      => 'Doctrine_Connection_Oracle', +
282                         'oci8'     => 'Doctrine_Connection_Oracle', +
283                         'oracle'   => 'Doctrine_Connection_Oracle', +
284                         'mssql'    => 'Doctrine_Connection_Mssql', +
285                         'dblib'    => 'Doctrine_Connection_Mssql', +
286                         'firebird' => 'Doctrine_Connection_Firebird', +
287                         'informix' => 'Doctrine_Connection_Informix', +
288                         'mock'     => 'Doctrine_Connection_Mock'); +
289        if ( ! isset($drivers[$driverName])) { +
290            throw new Doctrine_Manager_Exception('Unknown driver ' . $driverName); +
291        } +
292         +
293        $className = $drivers[$driverName]; +
294        $conn = new $className($this, $adapter); +
295 +
296        $this->_connections[$name] = $conn; +
297 +
298        if ($setCurrent) { +
299            $this->_currIndex = $name; +
300        } +
301        return $this->_connections[$name]; +
302    } +
303    /** +
304     * parseDsn +
305     * +
306     * @param string $dsn +
307     * @return array Parsed contents of DSN +
308     */ +
309    public function parseDsn($dsn) +
310    { +
311        // silence any warnings +
312        $parts = @parse_url($dsn); +
313 +
314        $names = array('dsn', 'scheme', 'host', 'port', 'user', 'pass', 'path', 'query', 'fragment'); +
315 +
316        foreach ($names as $name) { +
317            if ( ! isset($parts[$name])) { +
318                $parts[$name] = null; +
319            } +
320        } +
321 +
322        if (count($parts) == 0 || ! isset($parts['scheme'])) { +
323            throw new Doctrine_Manager_Exception('Empty data source name'); +
324        } +
325 +
326        switch ($parts['scheme']) { +
327            case 'sqlite': +
328            case 'sqlite2': +
329            case 'sqlite3': +
330                if (isset($parts['host']) && $parts['host'] == ':memory') { +
331                    $parts['database'] = ':memory:'; +
332                    $parts['dsn']      = 'sqlite::memory:'; +
333                } else { +
334                    $parts['database'] = $parts['path']; +
335                    $parts['dsn'] = $parts['scheme'] . ':' . $parts['path']; +
336                } +
337 +
338                break; +
339             +
340            case 'mssql': +
341            case 'dblib': +
342                if ( ! isset($parts['path']) || $parts['path'] == '/') { +
343                    throw new Doctrine_Manager_Exception('No database available in data source name'); +
344                } +
345                if (isset($parts['path'])) { +
346                    $parts['database'] = substr($parts['path'], 1); +
347                } +
348                if ( ! isset($parts['host'])) { +
349                    throw new Doctrine_Manager_Exception('No hostname set in data source name'); +
350                } +
351                 +
352                if (isset(self::$driverMap[$parts['scheme']])) { +
353                    $parts['scheme'] = self::$driverMap[$parts['scheme']]; +
354                } +
355 +
356                $parts['dsn'] = $parts['scheme'] . ':host=' +
357                              . $parts['host'] . (isset($parts['port']) ? ':' . $parts['port']:null) . ';dbname=' +
358                              . $parts['database']; +
359                 +
360                break; +
361 +
362            case 'mysql': +
363            case 'informix': +
364            case 'oci8': +
365            case 'oci': +
366            case 'firebird': +
367            case 'pgsql': +
368            case 'odbc': +
369            case 'mock': +
370            case 'oracle': +
371                if ( ! isset($parts['path']) || $parts['path'] == '/') { +
372                    throw new Doctrine_Manager_Exception('No database available in data source name'); +
373                } +
374                if (isset($parts['path'])) { +
375                    $parts['database'] = substr($parts['path'], 1); +
376                } +
377                if ( ! isset($parts['host'])) { +
378                    throw new Doctrine_Manager_Exception('No hostname set in data source name'); +
379                } +
380                 +
381                if (isset(self::$driverMap[$parts['scheme']])) { +
382                    $parts['scheme'] = self::$driverMap[$parts['scheme']]; +
383                } +
384 +
385                $parts['dsn'] = $parts['scheme'] . ':host=' +
386                              . $parts['host'] . (isset($parts['port']) ? ';port=' . $parts['port']:null) . ';dbname=' +
387                              . $parts['database']; +
388                 +
389                break; +
390            default: +
391                throw new Doctrine_Manager_Exception('Unknown driver '.$parts['scheme']); +
392        } +
393 +
394 +
395        return $parts; +
396    } +
397    /** +
398     * getConnection +
399     * @param integer $index +
400     * @return object Doctrine_Connection +
401     * @throws Doctrine_Manager_Exception   if trying to get a non-existent connection +
402     */ +
403    public function getConnection($name) +
404    { +
405        if ( ! isset($this->_connections[$name])) { +
406            throw new Doctrine_Manager_Exception('Unknown connection: ' . $name); +
407        } +
408 +
409        return $this->_connections[$name]; +
410    } +
411    /** +
412     * getComponentAlias +
413     * retrieves the alias for given component name +
414     * if the alias couldn't be found, this method returns the given +
415     * component name +
416     * +
417     * @param string $componentName +
418     * @return string                   the component alias +
419     */ +
420    public function getComponentAlias($componentName) +
421    { +
422        if (isset($this->componentAliases[$componentName])) { +
423            return $this->componentAliases[$componentName]; +
424        } +
425 +
426        return $componentName; +
427    } +
428    /** +
429     * sets an alias for given component name +
430     * very useful when building a large framework with a possibility +
431     * to override any given class +
432     * +
433     * @param string $componentName         the name of the component +
434     * @param string $alias +
435     * @return Doctrine_Manager +
436     */ +
437    public function setComponentAlias($componentName, $alias) +
438    { +
439        $this->componentAliases[$componentName] = $alias; +
440 +
441        return $this; +
442    } +
443    /** +
444     * getConnectionName +
445     * +
446     * @param Doctrine_Connection $conn     connection object to be searched for +
447     * @return string                       the name of the connection +
448     */ +
449    public function getConnectionName(Doctrine_Connection $conn) +
450    { +
451        return array_search($conn, $this->_connections, true); +
452    } +
453    /** +
454     * bindComponent +
455     * binds given component to given connection +
456     * this means that when ever the given component uses a connection +
457     * it will be using the bound connection instead of the current connection +
458     * +
459     * @param string $componentName +
460     * @param string $connectionName +
461     * @return boolean +
462     */ +
463    public function bindComponent($componentName, $connectionName) +
464    { +
465        $this->_bound[$componentName] = $connectionName; +
466    } +
467    /** +
468     * getConnectionForComponent +
469     * +
470     * @param string $componentName +
471     * @return Doctrine_Connection +
472     */ +
473    public function getConnectionForComponent($componentName = null) +
474    { +
475        if (isset($this->_bound[$componentName])) { +
476            return $this->getConnection($this->_bound[$componentName]); +
477        } +
478        return $this->getCurrentConnection(); +
479    } +
480    /** +
481     * getTable +
482     * this is the same as Doctrine_Connection::getTable() except +
483     * that it works seamlessly in multi-server/connection environment +
484     * +
485     * @see Doctrine_Connection::getTable() +
486     * @param string $componentName +
487     * @return Doctrine_Table +
488     */ +
489    public function getTable($componentName) +
490    { +
491        return $this->getConnectionForComponent($componentName)->getTable($componentName); +
492    } +
493    /** +
494     * table +
495     * this is the same as Doctrine_Connection::getTable() except +
496     * that it works seamlessly in multi-server/connection environment +
497     * +
498     * @see Doctrine_Connection::getTable() +
499     * @param string $componentName +
500     * @return Doctrine_Table +
501     */ +
502    public static function table($componentName) +
503    { +
504        return Doctrine_Manager::getInstance() +
505               ->getConnectionForComponent($componentName) +
506               ->getTable($componentName); +
507    } +
508    /** +
509     * closes the connection +
510     * +
511     * @param Doctrine_Connection $connection +
512     * @return void +
513     */ +
514    public function closeConnection(Doctrine_Connection $connection) +
515    { +
516        $connection->close(); +
517 +
518        $key = array_search($connection, $this->_connections, true); +
519 +
520        if ($key !== false) { +
521            unset($this->_connections[$key]); +
522        } +
523        $this->_currIndex = key($this->_connections); +
524 +
525        unset($connection); +
526    } +
527    /** +
528     * getConnections +
529     * returns all opened connections +
530     * +
531     * @return array +
532     */ +
533    public function getConnections() +
534    { +
535        return $this->_connections; +
536    } +
537    /** +
538     * setCurrentConnection +
539     * sets the current connection to $key +
540     * +
541     * @param mixed $key                        the connection key +
542     * @throws InvalidKeyException +
543     * @return void +
544     */ +
545    public function setCurrentConnection($key) +
546    { +
547        $key = (string) $key; +
548        if ( ! isset($this->_connections[$key])) { +
549            throw new InvalidKeyException(); +
550        } +
551        $this->_currIndex = $key; +
552    } +
553    /** +
554     * contains +
555     * whether or not the manager contains specified connection +
556     * +
557     * @param mixed $key                        the connection key +
558     * @return boolean +
559     */ +
560    public function contains($key) +
561    { +
562        return isset($this->_connections[$key]); +
563    } +
564    /** +
565     * count +
566     * returns the number of opened connections +
567     * +
568     * @return integer +
569     */ +
570    public function count() +
571    { +
572        return count($this->_connections); +
573    } +
574    /** +
575     * getIterator +
576     * returns an ArrayIterator that iterates through all connections +
577     * +
578     * @return ArrayIterator +
579     */ +
580    public function getIterator() +
581    { +
582        return new ArrayIterator($this->_connections); +
583    } +
584    /** +
585     * getCurrentConnection +
586     * returns the current connection +
587     * +
588     * @throws Doctrine_Connection_Exception       if there are no open connections +
589     * @return Doctrine_Connection +
590     */ +
591    public function getCurrentConnection() +
592    { +
593        $i = $this->_currIndex; +
594        if ( ! isset($this->_connections[$i])) { +
595            throw new Doctrine_Connection_Exception(); +
596        } +
597        return $this->_connections[$i]; +
598    } +
599    /** +
600     * __toString +
601     * returns a string representation of this object +
602     * +
603     * @return string +
604     */ +
605    public function __toString() +
606    { +
607        $r[] = "<pre>"; +
608        $r[] = "Doctrine_Manager"; +
609        $r[] = "Connections : ".count($this->_connections); +
610        $r[] = "</pre>"; +
611        return implode("\n",$r); +
612    } +
613} +
\ No newline at end of file diff --git a/tests/coverage/Doctrine_Manager_Exception.html b/tests/coverage/Doctrine_Manager_Exception.html new file mode 100644 index 000000000..13d895e25 --- /dev/null +++ b/tests/coverage/Doctrine_Manager_Exception.html @@ -0,0 +1,110 @@ + + + Coverage for Doctrine_Manager_Exception + + +

Coverage for Doctrine_Manager_Exception

Back to coverage report

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
1<?php +
2/* +
3 *  $Id: Exception.php 2702 2007-10-03 21:43:22Z Jonathan.Wage $ +
4 * +
5 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +
6 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +
7 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +
8 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +
9 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +
10 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +
11 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +
12 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +
13 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +
14 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +
15 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +
16 * +
17 * This software consists of voluntary contributions made by many individuals +
18 * and is licensed under the LGPL. For more information, see +
19 * <http://www.phpdoctrine.com>. +
20 */ +
21/** +
22 * Doctrine_Manager_Exception +
23 * +
24 * @package     Doctrine +
25 * @subpackage  Manager +
26 * @license     http://www.opensource.org/licenses/lgpl-license.php LGPL +
27 * @link        www.phpdoctrine.com +
28 * @since       1.0 +
29 * @version     $Revision: 2702 $ +
30 * @author      Konsta Vesterinen <kvesteri@cc.hut.fi> +
31 */ +
32class Doctrine_Manager_Exception extends Doctrine_Exception +
33{ }
\ No newline at end of file diff --git a/tests/coverage/Doctrine_Migration.html b/tests/coverage/Doctrine_Migration.html new file mode 100644 index 000000000..5db219cbc --- /dev/null +++ b/tests/coverage/Doctrine_Migration.html @@ -0,0 +1,1463 @@ + + + Coverage for Doctrine_Migration + + +

Coverage for Doctrine_Migration

Back to coverage report

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
1<?php +
2/* +
3 *  $Id: Migration.php 1080 2007-02-10 18:17:08Z jwage $ +
4 * +
5 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +
6 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +
7 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +
8 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +
9 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +
10 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +
11 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +
12 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +
13 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +
14 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +
15 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +
16 * +
17 * This software consists of voluntary contributions made by many individuals +
18 * and is licensed under the LGPL. For more information, see +
19 * <http://www.phpdoctrine.com>. +
20 */ +
21/** +
22 * Doctrine_Migration +
23 * +
24 * this class represents a database view +
25 * +
26 * @package     Doctrine +
27 * @subpackage  Migration +
28 * @license     http://www.opensource.org/licenses/lgpl-license.php LGPL +
29 * @link        www.phpdoctrine.com +
30 * @since       1.0 +
31 * @version     $Revision: 1080 $ +
32 * @author      Jonathan H. Wage <jwage@mac.com> +
33 */ +
34class Doctrine_Migration +
35{ +
36    protected $changes = array('created_tables'    =>  array(), +
37                               'dropped_tables'    =>  array(), +
38                               'renamed_tables'    =>  array(), +
39                               'added_columns'     =>  array(), +
40                               'renamed_columns'   =>  array(), +
41                               'changed_columns'   =>  array(), +
42                               'removed_columns'   =>  array(), +
43                               'added_indexes'     =>  array(), +
44                               'removed_indexes'   =>  array()), +
45              $migrationTableName = 'migration_version', +
46              $migrationClassesDirectory = array(), +
47              $migrationClasses = array(); +
48     +
49    /** +
50     * construct +
51     * +
52     * Specify the path to the directory with the migration classes. +
53     * The classes will be loaded and the migration table will be created if it does not already exist +
54     * +
55     * @param string $directory  +
56     * @return void +
57     */ +
58    public function __construct($directory = null) +
59    { +
60        if ($directory != null) { +
61            $this->migrationClassesDirectory = $directory; +
62             +
63            $this->loadMigrationClasses(); +
64             +
65            $this->createMigrationTable(); +
66        } +
67    } +
68     +
69    /** +
70     * createMigrationTable +
71     *  +
72     * Creates the migration table used to store the current version +
73     * +
74     * @return void +
75     */ +
76    protected function createMigrationTable() +
77    { +
78        $conn = Doctrine_Manager::connection(); +
79         +
80        try { +
81            $conn->export->createTable($this->migrationTableName, array('version' => array('type' => 'integer', 'size' => 11))); +
82             +
83            return true; +
84        } catch(Exception $e) { +
85            return false; +
86        } +
87    } +
88     +
89    /** +
90     * loadMigrationClasses +
91     * +
92     * Loads the migration classes for the directory specified by the constructor +
93     * +
94     * @return void +
95     */ +
96    protected function loadMigrationClasses() +
97    { +
98        if ($this->migrationClasses) { +
99            return $this->migrationClasses; +
100        } +
101         +
102        $directory = $this->migrationClassesDirectory; +
103         +
104        $classes = get_declared_classes(); +
105        $loadedClasses = array(); +
106 +
107        if ($directory !== null) { +
108            foreach ((array) $directory as $dir) { +
109                $it = new RecursiveIteratorIterator(new RecursiveDirectoryIterator($dir), +
110                                                        RecursiveIteratorIterator::LEAVES_ONLY); +
111 +
112                foreach ($it as $file) { +
113                    $e = explode('.', $file->getFileName()); +
114                    if (end($e) === 'php' && strpos($file->getFileName(), '.inc') === false) { +
115                        require_once $file->getPathName(); +
116                        $requiredClass = array_diff(get_declared_classes(), $classes); +
117                        $requiredClass = end($requiredClass); +
118                         +
119                        $loadedClasses[$requiredClass] = $file->getFileName(); +
120                         +
121                    } +
122                } +
123            } +
124        } +
125         +
126        $classes = $loadedClasses; +
127        $parent = new ReflectionClass('Doctrine_Migration'); +
128        $loadedClasses = array(); +
129         +
130        foreach ($classes as $name => $fileName) { +
131            $class = new ReflectionClass($name); +
132             +
133            while ($class->isSubclassOf($parent)) { +
134 +
135                $class = $class->getParentClass(); +
136                if ($class === false) { +
137                    break; +
138                } +
139            } +
140             +
141            if ($class === false) { +
142                continue; +
143            } +
144             +
145            $e = explode('_', $fileName); +
146            $classMigrationNum = (int) $e[0]; +
147             +
148            $loadedClasses[$classMigrationNum] = $fileName; +
149        } +
150         +
151        $this->migrationClasses = $loadedClasses; +
152         +
153        return $this->migrationClasses; +
154    } +
155     +
156    /** +
157     * getMigrationClasses +
158     * +
159     * @return void +
160     * @author Jonathan H. Wage +
161     */ +
162     +
163    public function getMigrationClasses() +
164    { +
165        return $this->migrationClasses; +
166    } +
167     +
168    /** +
169     * setCurrentVersion +
170     * +
171     * Sets the current version in the migration table +
172     * +
173     * @param string $number  +
174     * @return void +
175     */ +
176    protected function setCurrentVersion($number) +
177    { +
178        $conn = Doctrine_Manager::connection(); +
179         +
180        if ($this->hasMigrated()) { +
181            $conn->exec("UPDATE " . $this->migrationTableName . " SET version = $number"); +
182        } else { +
183            $conn->exec("INSERT INTO " . $this->migrationTableName . " (version) VALUES ($number)"); +
184        } +
185    } +
186     +
187    /** +
188     * getCurrentVersion +
189     * +
190     * Get the current version of the database +
191     * +
192     * @return void +
193     */ +
194    public function getCurrentVersion() +
195    { +
196        $conn = Doctrine_Manager::connection(); +
197         +
198        $result = $conn->fetchColumn("SELECT version FROM " . $this->migrationTableName); +
199         +
200        return isset($result[0]) ? $result[0]:0; +
201    } +
202     +
203    /** +
204     * hasMigrated +
205     * +
206     * Returns true/false for whether or not this database has been migrated in the past +
207     * +
208     * @return void +
209     */ +
210    public function hasMigrated() +
211    { +
212        $conn = Doctrine_Manager::connection(); +
213         +
214        $result = $conn->fetchColumn("SELECT version FROM " . $this->migrationTableName); +
215         +
216        return isset($result[0]) ? true:false;  +
217    } +
218     +
219    /** +
220     * getLatestVersion +
221     * +
222     * Gets the latest possible version from the loaded migration classes +
223     * +
224     * @return void +
225     */ +
226    public function getLatestVersion() +
227    { +
228        $this->loadMigrationClasses(); +
229         +
230        $versions = array(); +
231        foreach ($this->migrationClasses as $classMigrationNum => $fileName) { +
232            $versions[$classMigrationNum] = $classMigrationNum; +
233        } +
234         +
235        rsort($versions); +
236         +
237        return isset($versions[0]) ? $versions[0]:0; +
238    } +
239     +
240    public function getNextVersion() +
241    { +
242        return $this->getLatestVersion() + 1; +
243    } +
244     +
245    /** +
246     * getMigrationClass +
247     * +
248     * Get instance of migration class for $num +
249     * +
250     * @param string $num  +
251     * @return void +
252     */ +
253    protected function getMigrationClass($num) +
254    { +
255        foreach ($this->migrationClasses as $classMigrationNum => $fileName) { +
256            if ($classMigrationNum === $num) { +
257                return new $className(); +
258            } +
259        } +
260         +
261        throw new Doctrine_Migration_Exception('Could not find migration class for migration step: '.$num); +
262    } +
263     +
264    /** +
265     * doMigrateStep +
266     * +
267     * Perform migration directory for the specified version. Loads migration classes and performs the migration then processes the changes +
268     * +
269     * @param string $direction  +
270     * @param string $num  +
271     * @return void +
272     */ +
273    protected function doMigrateStep($direction, $num) +
274    { +
275        $migrate = $this->getMigrationClass($num); +
276        $migrate->doMigrate($direction); +
277    } +
278     +
279    /** +
280     * doMigrate +
281     *  +
282     * Perform migration for a migration class. Executes the up or down method then processes the changes +
283     * +
284     * @param string $direction  +
285     * @return void +
286     */ +
287    protected function doMigrate($direction) +
288    { +
289        if (method_exists($this, $direction)) { +
290            $this->$direction(); +
291 +
292            foreach ($this->changes as $type => $changes) { +
293                $process = new Doctrine_Migration_Process(); +
294                $funcName = 'process' . Doctrine::classify($type); +
295 +
296                if (!empty($changes)) { +
297                    $process->$funcName($changes);  +
298                } +
299            } +
300        } +
301    } +
302     +
303    /** +
304     * migrate +
305     * +
306     * Perform a migration chain by specifying the $from and $to. +
307     * If you do not specify a $from or $to then it will attempt to migrate from the current version to the latest version +
308     * +
309     * @param string $from  +
310     * @param string $to  +
311     * @return void +
312     */ +
313    public function migrate($to = null) +
314    { +
315        $from = $this->getCurrentVersion(); +
316         +
317        // If nothing specified then lets assume we are migrating from the current version to the latest version +
318        if ($to === null) { +
319            $to = $this->getLatestVersion(); +
320        } +
321         +
322        if ($from === $to) { +
323            throw new Doctrine_Migration_Exception('Already up-to-date'); +
324        } +
325         +
326        $direction = $from > $to ? 'down':'up'; +
327         +
328        if ($direction === 'up') { +
329            for ($i = $from + 1; $i <= $to; $i++) { +
330                $this->doMigrateStep($direction, $i); +
331            } +
332        } else { +
333            for ($i = $from; $i > $to; $i--) { +
334                $this->doMigrateStep($direction, $i); +
335            } +
336        } +
337         +
338        $this->setCurrentVersion($to); +
339    } +
340     +
341    /** +
342     * addChange +
343     * +
344     * @param string $type  +
345     * @param string $array  +
346     * @return void +
347     */ +
348    protected function addChange($type, array $change = array()) +
349    { +
350        $this->changes[$type][] = $change; +
351    } +
352     +
353    /** +
354     * createTable +
355     * +
356     * @param string $tableName  +
357     * @param string $array  +
358     * @param string $array  +
359     * @return void +
360     */ +
361    public function createTable($tableName, array $fields = array(), array $options = array()) +
362    { +
363        $options = get_defined_vars(); +
364         +
365        $this->addChange('created_tables', $options); +
366    } +
367     +
368    /** +
369     * dropTable +
370     * +
371     * @param string $tableName  +
372     * @return void +
373     */ +
374    public function dropTable($tableName) +
375    { +
376        $options = get_defined_vars(); +
377         +
378        $this->addChange('dropped_tables', $options); +
379    } +
380     +
381    /** +
382     * renameTable +
383     * +
384     * @param string $oldTableName  +
385     * @param string $newTableName  +
386     * @return void +
387     */ +
388    public function renameTable($oldTableName, $newTableName) +
389    { +
390        $options = get_defined_vars(); +
391         +
392        $this->addChange('renamed_tables', $options); +
393    } +
394     +
395    /** +
396     * addColumn +
397     * +
398     * @param string $tableName  +
399     * @param string $columnName  +
400     * @param string $type  +
401     * @param string $array  +
402     * @return void +
403     */ +
404    public function addColumn($tableName, $columnName, $type, array $options = array()) +
405    { +
406        $options = get_defined_vars(); +
407         +
408        $this->addChange('added_columns', $options); +
409    } +
410     +
411    /** +
412     * renameColumn +
413     * +
414     * @param string $tableName  +
415     * @param string $oldColumnName  +
416     * @param string $newColumnName  +
417     * @return void +
418     */ +
419    public function renameColumn($tableName, $oldColumnName, $newColumnName) +
420    { +
421        $options = get_defined_vars(); +
422         +
423        $this->addChange('renamed_columns', $options); +
424    } +
425     +
426    /** +
427     * renameColumn +
428     * +
429     * @param string $tableName  +
430     * @param string $columnName  +
431     * @param string $type  +
432     * @param string $array  +
433     * @return void +
434     */ +
435    public function changeColumn($tableName, $columnName, $type, array $options = array()) +
436    { +
437        $options = get_defined_vars(); +
438         +
439        $this->addChange('changed_columns', $options); +
440    } +
441     +
442    /** +
443     * removeColumn +
444     * +
445     * @param string $tableName  +
446     * @param string $columnName  +
447     * @return void +
448     */ +
449    public function removeColumn($tableName, $columnName) +
450    { +
451        $options = get_defined_vars(); +
452         +
453        $this->addChange('removed_columns', $options); +
454    } +
455     +
456    /** +
457     * addIndex +
458     * +
459     * @param string $tableName  +
460     * @param string $indexName  +
461     * @param string $array  +
462     * @return void +
463     */ +
464    public function addIndex($tableName, $indexName, array $options = array()) +
465    { +
466        $options = get_defined_vars(); +
467         +
468        $this->addChange('added_indexes', $options); +
469    } +
470     +
471    /** +
472     * removeIndex +
473     * +
474     * @param string $tableName  +
475     * @param string $indexName  +
476     * @return void +
477     */ +
478    public function removeIndex($tableName, $indexName) +
479    { +
480        $options = get_defined_vars(); +
481         +
482        $this->addChange('removed_indexes', $options); +
483    } +
484}
\ No newline at end of file diff --git a/tests/coverage/Doctrine_Migration_Exception.html b/tests/coverage/Doctrine_Migration_Exception.html new file mode 100644 index 000000000..449f3031d --- /dev/null +++ b/tests/coverage/Doctrine_Migration_Exception.html @@ -0,0 +1,113 @@ + + + Coverage for Doctrine_Migration_Exception + + +

Coverage for Doctrine_Migration_Exception

Back to coverage report

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
1<?php +
2/* +
3 *  $Id: Exception.php 1080 2007-02-10 18:17:08Z jwage $ +
4 * +
5 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +
6 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +
7 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +
8 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +
9 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +
10 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +
11 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +
12 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +
13 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +
14 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +
15 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +
16 * +
17 * This software consists of voluntary contributions made by many individuals +
18 * and is licensed under the LGPL. For more information, see +
19 * <http://www.phpdoctrine.com>. +
20 */ +
21/** +
22 * Doctrine_Migration_Exception +
23 * +
24 * @package     Doctrine +
25 * @subpackage  Migration +
26 * @license     http://www.opensource.org/licenses/lgpl-license.php LGPL +
27 * @link        www.phpdoctrine.com +
28 * @since       1.0 +
29 * @version     $Revision: 1080 $ +
30 * @author      Jonathan H. Wage <jwage@mac.com> +
31 */ +
32class Doctrine_Migration_Exception extends Doctrine_Exception +
33{ +
34}
\ No newline at end of file diff --git a/tests/coverage/Doctrine_Node.html b/tests/coverage/Doctrine_Node.html new file mode 100644 index 000000000..da58b9fae --- /dev/null +++ b/tests/coverage/Doctrine_Node.html @@ -0,0 +1,551 @@ + + + Coverage for Doctrine_Node + + +

Coverage for Doctrine_Node

Back to coverage report

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
1<?php +
2/* +
3 *  $Id: Node.php 2702 2007-10-03 21:43:22Z Jonathan.Wage $ +
4 * +
5 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +
6 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +
7 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +
8 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +
9 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +
10 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +
11 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +
12 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +
13 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +
14 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +
15 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +
16 * +
17 * This software consists of voluntary contributions made by many individuals +
18 * and is licensed under the LGPL. For more information, see +
19 * <http://www.phpdoctrine.com>. +
20 */ +
21/** +
22 * Doctrine_Node +
23 * +
24 * @package     Doctrine +
25 * @subpackage  Node +
26 * @license     http://www.opensource.org/licenses/lgpl-license.php LGPL +
27 * @link        www.phpdoctrine.com +
28 * @since       1.0 +
29 * @version     $Revision: 2702 $ +
30 * @author      Joe Simms <joe.simms@websites4.com> +
31 */ +
32class Doctrine_Node implements IteratorAggregate +
33{ +
34    /** +
35     * @param object    $record   reference to associated Doctrine_Record instance +
36     */ +
37    protected $record; +
38 +
39    /** +
40     * @param array     $options +
41     */ +
42    protected $options; +
43 +
44    /** +
45     * @param string     $iteratorType  (Pre | Post | Level) +
46     */ +
47    protected $iteratorType; +
48 +
49    /** +
50     * @param array     $iteratorOptions +
51     */ +
52    protected $iteratorOptions; +
53     +
54    /** +
55     * The tree to which the node belongs. +
56     * +
57     * @var unknown_type +
58     */ +
59    protected $_tree; +
60 +
61    /** +
62     * contructor, creates node with reference to record and any options +
63     * +
64     * @param object $record                    instance of Doctrine_Record +
65     * @param array $options                    options +
66     */ +
67    public function __construct(Doctrine_Record $record, $options) +
68    { +
69        $this->record = $record; +
70        $this->options = $options; +
71         +
72        // Make sure that the tree object of the root component is used in the case +
73        // of column aggregation inheritance. +
74        $class = $record->getTable()->getComponentName(); +
75        $table = $record->getTable(); +
76        if ($table->getOption('inheritanceMap')) { +
77            $subclasses = $table->getOption('subclasses'); +
78            while (in_array($class, $subclasses)) { +
79                $class = get_parent_class($class); +
80            } +
81        } +
82        if ($class != $table->getComponentName()) { +
83            $this->_tree = $table->getConnection()->getTable($class)->getTree(); +
84        } else { +
85            $this->_tree = $table->getTree(); +
86        } +
87    } +
88 +
89    /** +
90     * factory method to return node instance based upon chosen implementation +
91     * +
92     * @param object $record                    instance of Doctrine_Record +
93     * @param string $impName                   implementation (NestedSet, AdjacencyList, MaterializedPath) +
94     * @param array $options                    options +
95     * @return object $options                  instance of Doctrine_Node +
96     */ +
97    public static function factory(Doctrine_Record $record, $implName, $options = array()) +
98    { +
99        $class = 'Doctrine_Node_' . $implName; +
100 +
101        if ( ! class_exists($class)) { +
102            throw new Doctrine_Node_Exception("The class $class must exist and extend Doctrine_Node"); +
103        } +
104 +
105        return new $class($record, $options); +
106    } +
107 +
108    /** +
109     * setter for record attribute +
110     * +
111     * @param object $record                    instance of Doctrine_Record +
112     */ +
113    public function setRecord(Doctrine_Record $record) +
114    { +
115        $this->record = $record; +
116    } +
117 +
118    /** +
119     * getter for record attribute +
120     * +
121     * @return object                           instance of Doctrine_Record +
122     */ +
123    public function getRecord() +
124    { +
125        return $this->record; +
126    } +
127 +
128    /** +
129     * convenience function for getIterator +
130     * +
131     * @param string $type                      type of iterator (Pre | Post | Level) +
132     * @param array $options                    options +
133     */ +
134    public function traverse($type = 'Pre', $options = array()) +
135    { +
136        return $this->getIterator($type, $options); +
137    } +
138 +
139    /** +
140     * get iterator +
141     * +
142     * @param string $type                      type of iterator (Pre | Post | Level) +
143     * @param array $options                    options +
144     */ +
145    public function getIterator($type = null, $options = null) +
146    { +
147        if ($type === null) { +
148            $type = (isset($this->iteratorType) ? $this->iteratorType : 'Pre'); +
149        } +
150 +
151        if ($options === null) { +
152            $options = (isset($this->iteratorOptions) ? $this->iteratorOptions : array()); +
153        } +
154 +
155        $implName = $this->record->getTable()->getOption('treeImpl'); +
156        $iteratorClass = 'Doctrine_Node_' . $implName . '_' . ucfirst(strtolower($type)) . 'OrderIterator'; +
157 +
158        return new $iteratorClass($this->record, $options); +
159    } +
160 +
161    /** +
162     * sets node's iterator type +
163     * +
164     * @param int +
165     */ +
166    public function setIteratorType($type) +
167    { +
168        $this->iteratorType = $type; +
169    } +
170 +
171    /** +
172     * sets node's iterator options +
173     * +
174     * @param int +
175     */ +
176    public function setIteratorOptions($options) +
177    { +
178        $this->iteratorOptions = $options; +
179    } +
180}
\ No newline at end of file diff --git a/tests/coverage/Doctrine_Node_NestedSet.html b/tests/coverage/Doctrine_Node_NestedSet.html new file mode 100644 index 000000000..10fb7e27e --- /dev/null +++ b/tests/coverage/Doctrine_Node_NestedSet.html @@ -0,0 +1,2990 @@ + + + Coverage for Doctrine_Node_NestedSet + + +

Coverage for Doctrine_Node_NestedSet

Back to coverage report

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
1<?php +
2/* +
3 *    $Id: NestedSet.php 2702 2007-10-03 21:43:22Z Jonathan.Wage $ +
4 * +
5 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +
6 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +
7 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +
8 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +
9 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +
10 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +
11 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +
12 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +
13 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +
14 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +
15 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +
16 * +
17 * This software consists of voluntary contributions made by many individuals +
18 * and is licensed under the LGPL. For more information, see +
19 * <http://www.phpdoctrine.com>. +
20 */ +
21/** +
22 * Doctrine_Node_NestedSet +
23 * +
24 * @package    Doctrine +
25 * @subpackage Node +
26 * @license    http://www.opensource.org/licenses/lgpl-license.php LGPL +
27 * @link       www.phpdoctrine.com +
28 * @since      1.0 +
29 * @version    $Revision: 2702 $ +
30 * @author     Joe Simms <joe.simms@websites4.com> +
31 * @author     Roman Borschel <roman@code-factory.org>      +
32 */ +
33class Doctrine_Node_NestedSet extends Doctrine_Node implements Doctrine_Node_Interface +
34{ +
35    /** +
36     * test if node has previous sibling +
37     * +
38     * @return bool             +
39     */ +
40    public function hasPrevSibling() +
41    { +
42        return $this->isValidNode($this->getPrevSibling());         +
43    } +
44 +
45    /** +
46     * test if node has next sibling +
47     * +
48     * @return bool             +
49     */  +
50    public function hasNextSibling() +
51    { +
52        return $this->isValidNode($this->getNextSibling());         +
53    } +
54 +
55    /** +
56     * test if node has children +
57     * +
58     * @return bool             +
59     */ +
60    public function hasChildren() +
61    { +
62        return (($this->getRightValue() - $this->getLeftValue() ) >1 );         +
63    } +
64 +
65    /** +
66     * test if node has parent +
67     * +
68     * @return bool             +
69     */ +
70    public function hasParent() +
71    { +
72        return !$this->isRoot(); +
73    } +
74 +
75    /** +
76     * gets record of prev sibling or empty record +
77     * +
78     * @return object     Doctrine_Record             +
79     */ +
80    public function getPrevSibling() +
81    { +
82        $baseAlias = $this->_tree->getBaseAlias(); +
83        $q = $this->_tree->getBaseQuery(); +
84        $q = $q->addWhere("$baseAlias.rgt = ?", $this->getLeftValue() - 1); +
85        $q = $this->_tree->returnQueryWithRootId($q, $this->getRootValue()); +
86        $result = $q->execute(); +
87 +
88        if (count($result) <= 0) { +
89            return false; +
90        } +
91         +
92        if ($result instanceof Doctrine_Collection) { +
93            $sibling = $result->getFirst(); +
94        } else if (is_array($result)) { +
95            $sibling = array_shift($result); +
96        } +
97         +
98        return $sibling; +
99    } +
100 +
101    /** +
102     * gets record of next sibling or empty record +
103     * +
104     * @return object     Doctrine_Record             +
105     */ +
106    public function getNextSibling() +
107    { +
108        $baseAlias = $this->_tree->getBaseAlias(); +
109        $q = $this->_tree->getBaseQuery(); +
110        $q = $q->addWhere("$baseAlias.lft = ?", $this->getRightValue() + 1); +
111        $q = $this->_tree->returnQueryWithRootId($q, $this->getRootValue()); +
112        $result = $q->execute(); +
113 +
114        if (count($result) <= 0) { +
115            return false; +
116        } +
117         +
118        if ($result instanceof Doctrine_Collection) { +
119            $sibling = $result->getFirst(); +
120        } else if (is_array($result)) { +
121            $sibling = array_shift($result); +
122        } +
123         +
124        return $sibling; +
125    } +
126 +
127    /** +
128     * gets siblings for node +
129     * +
130     * @return array     array of sibling Doctrine_Record objects             +
131     */ +
132    public function getSiblings($includeNode = false) +
133    { +
134        $parent = $this->getParent(); +
135        $siblings = array(); +
136        if ($parent->exists()) { +
137            foreach ($parent->getNode()->getChildren() as $child) { +
138                if ($this->isEqualTo($child) && !$includeNode) { +
139                    continue; +
140                } +
141                $siblings[] = $child; +
142            }         +
143        } +
144        return $siblings; +
145    } +
146 +
147    /** +
148     * gets record of first child or empty record +
149     * +
150     * @return object     Doctrine_Record             +
151     */ +
152    public function getFirstChild() +
153    { +
154        $baseAlias = $this->_tree->getBaseAlias(); +
155        $q = $this->_tree->getBaseQuery(); +
156        $q->addWhere("$baseAlias.lft = ?", $this->getLeftValue() + 1); +
157        $this->_tree->returnQueryWithRootId($q, $this->getRootValue()); +
158        $result = $q->execute(); +
159 +
160        if (count($result) <= 0) { +
161            return false; +
162        } +
163         +
164        if ($result instanceof Doctrine_Collection) { +
165            $child = $result->getFirst(); +
166        } else if (is_array($result)) { +
167            $child = array_shift($result); +
168        } +
169         +
170        return $child;        +
171    } +
172 +
173    /** +
174     * gets record of last child or empty record +
175     * +
176     * @return object     Doctrine_Record             +
177     */ +
178    public function getLastChild() +
179    { +
180        $baseAlias = $this->_tree->getBaseAlias(); +
181        $q = $this->_tree->getBaseQuery(); +
182        $q->addWhere("$baseAlias.rgt = ?", $this->getRightValue() - 1); +
183        $this->_tree->returnQueryWithRootId($q, $this->getRootValue()); +
184        $result = $q->execute(); +
185 +
186        if (count($result) <= 0) { +
187            return false; +
188        } +
189         +
190        if ($result instanceof Doctrine_Collection) { +
191            $child = $result->getFirst(); +
192        } else if (is_array($result)) { +
193            $child = array_shift($result); +
194        } +
195         +
196        return $child;       +
197    } +
198 +
199    /** +
200     * gets children for node (direct descendants only) +
201     * +
202     * @return mixed The children of the node or FALSE if the node has no children.                +
203     */ +
204    public function getChildren() +
205    {  +
206        return $this->getDescendants(1); +
207    } +
208 +
209    /** +
210     * gets descendants for node (direct descendants only) +
211     * +
212     * @return mixed  The descendants of the node or FALSE if the node has no descendants. +
213     * @todo Currently all descendants are fetched, no matter the depth. Maybe there is a better +
214     *       solution with less overhead.       +
215     */ +
216    public function getDescendants($depth = null, $includeNode = false) +
217    { +
218        $baseAlias = $this->_tree->getBaseAlias(); +
219        $q = $this->_tree->getBaseQuery(); +
220        $params = array($this->record->get('lft'), $this->record->get('rgt')); +
221         +
222        if ($includeNode) { +
223            $q->addWhere("$baseAlias.lft >= ? AND $baseAlias.rgt <= ?", $params)->addOrderBy("$baseAlias.lft asc"); +
224        } else { +
225            $q->addWhere("$baseAlias.lft > ? AND $baseAlias.rgt < ?", $params)->addOrderBy("$baseAlias.lft asc"); +
226        } +
227         +
228        if ($depth !== null) { +
229            $q->addWhere("$baseAlias.level <= ?", $this->record['level'] + $depth); +
230        } +
231         +
232        $q = $this->_tree->returnQueryWithRootId($q, $this->getRootValue()); +
233        $result = $q->execute(); +
234 +
235        if (count($result) <= 0) { +
236            return false; +
237        } +
238 +
239        return $result; +
240    } +
241 +
242    /** +
243     * gets record of parent or empty record +
244     * +
245     * @return object     Doctrine_Record             +
246     */ +
247    public function getParent() +
248    { +
249        $baseAlias = $this->_tree->getBaseAlias(); +
250        $q = $this->_tree->getBaseQuery(); +
251        $q->addWhere("$baseAlias.lft < ? AND $baseAlias.rgt > ?", array($this->getLeftValue(), $this->getRightValue())) +
252                ->addOrderBy("$baseAlias.rgt asc"); +
253        $q = $this->_tree->returnQueryWithRootId($q, $this->getRootValue()); +
254        $result = $q->execute(); +
255         +
256        if (count($result) <= 0) { +
257            return false; +
258        } +
259                +
260        if ($result instanceof Doctrine_Collection) { +
261            $parent = $result->getFirst(); +
262        } else if (is_array($result)) { +
263            $parent = array_shift($result); +
264        } +
265         +
266        return $parent; +
267    } +
268 +
269    /** +
270     * gets ancestors for node +
271     * +
272     * @param integer $deth  The depth 'upstairs'. +
273     * @return mixed  The ancestors of the node or FALSE if the node has no ancestors (this  +
274     *                basically means it's a root node).                 +
275     */ +
276    public function getAncestors($depth = null) +
277    { +
278        $baseAlias = $this->_tree->getBaseAlias(); +
279        $q = $this->_tree->getBaseQuery(); +
280        $q->addWhere("$baseAlias.lft < ? AND $baseAlias.rgt > ?", array($this->getLeftValue(), $this->getRightValue())) +
281                ->addOrderBy("$baseAlias.lft asc"); +
282        if ($depth !== null) { +
283            $q->addWhere("$baseAlias.level >= ?", $this->record['level'] - $depth); +
284        } +
285        $q = $this->_tree->returnQueryWithRootId($q, $this->getRootValue()); +
286        $ancestors = $q->execute(); +
287        if (count($ancestors) <= 0) { +
288            return false; +
289        } +
290        return $ancestors; +
291    } +
292 +
293    /** +
294     * gets path to node from root, uses record::toString() method to get node names +
295     * +
296     * @param string     $seperator     path seperator +
297     * @param bool     $includeNode     whether or not to include node at end of path +
298     * @return string     string representation of path                 +
299     */      +
300    public function getPath($seperator = ' > ', $includeRecord = false) +
301    { +
302        $path = array(); +
303        $ancestors = $this->getAncestors(); +
304        foreach ($ancestors as $ancestor) { +
305            $path[] = $ancestor->__toString(); +
306        } +
307        if ($includeRecord) { +
308            $path[] = $this->getRecord()->__toString(); +
309        } +
310             +
311        return implode($seperator, $path); +
312    } +
313 +
314    /** +
315     * gets number of children (direct descendants) +
316     * +
317     * @return int             +
318     */      +
319    public function getNumberChildren() +
320    { +
321        return count($this->getChildren()); +
322    } +
323 +
324    /** +
325     * gets number of descendants (children and their children) +
326     * +
327     * @return int             +
328     */ +
329    public function getNumberDescendants() +
330    { +
331        return ($this->getRightValue() - $this->getLeftValue() - 1) / 2; +
332    } +
333 +
334    /** +
335     * inserts node as parent of dest record +
336     * +
337     * @return bool +
338     * @todo Wrap in transaction           +
339     */ +
340    public function insertAsParentOf(Doctrine_Record $dest) +
341    { +
342        // cannot insert a node that has already has a place within the tree +
343        if ($this->isValidNode()) { +
344            return false; +
345        } +
346        // cannot insert as parent of root +
347        if ($dest->getNode()->isRoot()) { +
348            return false; +
349        } +
350        $newRoot = $dest->getNode()->getRootValue(); +
351        $this->shiftRLValues($dest->getNode()->getLeftValue(), 1, $newRoot); +
352        $this->shiftRLValues($dest->getNode()->getRightValue() + 2, 1, $newRoot); +
353         +
354        $newLeft = $dest->getNode()->getLeftValue(); +
355        $newRight = $dest->getNode()->getRightValue() + 2; +
356 +
357        $this->record['level'] = $dest['level'] - 1; +
358        $this->insertNode($newLeft, $newRight, $newRoot); +
359         +
360        return true; +
361    } +
362 +
363    /** +
364     * inserts node as previous sibling of dest record +
365     * +
366     * @return bool +
367     * @todo Wrap in transaction        +
368     */ +
369    public function insertAsPrevSiblingOf(Doctrine_Record $dest) +
370    { +
371        // cannot insert a node that has already has a place within the tree +
372        if ($this->isValidNode()) +
373            return false; +
374 +
375        $newLeft = $dest->getNode()->getLeftValue(); +
376        $newRight = $dest->getNode()->getLeftValue() + 1; +
377        $newRoot = $dest->getNode()->getRootValue(); +
378         +
379        $this->shiftRLValues($newLeft, 2, $newRoot); +
380        $this->record['level'] = $dest['level']; +
381        $this->insertNode($newLeft, $newRight, $newRoot); +
382        // update destination left/right values to prevent a refresh +
383        // $dest->getNode()->setLeftValue($dest->getNode()->getLeftValue() + 2); +
384        // $dest->getNode()->setRightValue($dest->getNode()->getRightValue() + 2); +
385                         +
386        return true; +
387    } +
388 +
389    /** +
390     * inserts node as next sibling of dest record +
391     * +
392     * @return bool +
393     * @todo Wrap in transaction            +
394     */     +
395    public function insertAsNextSiblingOf(Doctrine_Record $dest) +
396    { +
397        // cannot insert a node that has already has a place within the tree +
398        if ($this->isValidNode()) +
399            return false; +
400 +
401        $newLeft = $dest->getNode()->getRightValue() + 1; +
402        $newRight = $dest->getNode()->getRightValue() + 2; +
403        $newRoot = $dest->getNode()->getRootValue(); +
404 +
405        $this->shiftRLValues($newLeft, 2, $newRoot); +
406        $this->record['level'] = $dest['level']; +
407        $this->insertNode($newLeft, $newRight, $newRoot); +
408 +
409        // update destination left/right values to prevent a refresh +
410        // no need, node not affected +
411 +
412        return true; +
413    } +
414 +
415    /** +
416     * inserts node as first child of dest record +
417     * +
418     * @return bool +
419     * @todo Wrap in transaction          +
420     */ +
421    public function insertAsFirstChildOf(Doctrine_Record $dest) +
422    { +
423        // cannot insert a node that has already has a place within the tree +
424        if ($this->isValidNode()) +
425            return false; +
426 +
427        $newLeft = $dest->getNode()->getLeftValue() + 1; +
428        $newRight = $dest->getNode()->getLeftValue() + 2; +
429        $newRoot = $dest->getNode()->getRootValue(); +
430 +
431        $this->shiftRLValues($newLeft, 2, $newRoot); +
432        $this->record['level'] = $dest['level'] + 1; +
433        $this->insertNode($newLeft, $newRight, $newRoot); +
434         +
435        // update destination left/right values to prevent a refresh +
436        // $dest->getNode()->setRightValue($dest->getNode()->getRightValue() + 2); +
437 +
438        return true; +
439    } +
440 +
441    /** +
442     * inserts node as last child of dest record +
443     * +
444     * @return bool +
445     * @todo Wrap in transaction             +
446     */ +
447    public function insertAsLastChildOf(Doctrine_Record $dest) +
448    { +
449        // cannot insert a node that has already has a place within the tree +
450        if ($this->isValidNode()) +
451            return false; +
452 +
453        $newLeft = $dest->getNode()->getRightValue(); +
454        $newRight = $dest->getNode()->getRightValue() + 1; +
455        $newRoot = $dest->getNode()->getRootValue(); +
456 +
457        $this->shiftRLValues($newLeft, 2, $newRoot); +
458        $this->record['level'] = $dest['level'] + 1; +
459        $this->insertNode($newLeft, $newRight, $newRoot); +
460 +
461        // update destination left/right values to prevent a refresh +
462        // $dest->getNode()->setRightValue($dest->getNode()->getRightValue() + 2); +
463         +
464        return true; +
465    } +
466     +
467    /** +
468     * Accomplishes moving of nodes between different trees. +
469     * Used by the move* methods if the root values of the two nodes are different. +
470     * +
471     * @param Doctrine_Record $dest +
472     * @param unknown_type $newLeftValue +
473     * @param unknown_type $moveType +
474     * @todo Better exception handling/wrapping +
475     */ +
476    private function _moveBetweenTrees(Doctrine_Record $dest, $newLeftValue, $moveType) +
477    { +
478        $conn = $this->record->getTable()->getConnection(); +
479             +
480            try { +
481                $conn->beginTransaction(); +
482                 +
483                // Move between trees: Detach from old tree & insert into new tree +
484                $newRoot = $dest->getNode()->getRootValue(); +
485                $oldRoot = $this->getRootValue(); +
486                $oldLft = $this->getLeftValue(); +
487                $oldRgt = $this->getRightValue(); +
488                $oldLevel = $this->record['level']; +
489                 +
490                // Prepare target tree for insertion, make room +
491                $this->shiftRlValues($newLeftValue, $oldRgt - $oldLft - 1, $newRoot); +
492                 +
493                // Set new root id for this node +
494                $this->setRootValue($newRoot); +
495                $this->record->save(); +
496                 +
497                // Close gap in old tree +
498                $first = $oldRgt + 1; +
499                $delta = $oldLft - $oldRgt - 1; +
500                $this->shiftRLValues($first, $delta, $oldRoot); +
501                 +
502                // Insert this node as a new node +
503                $this->setRightValue(0); +
504                $this->setLeftValue(0); +
505                 +
506                switch ($moveType) { +
507                    case 'moveAsPrevSiblingOf': +
508                        $this->insertAsPrevSiblingOf($dest); +
509                    break; +
510                    case 'moveAsFirstChildOf': +
511                        $this->insertAsFirstChildOf($dest); +
512                    break; +
513                    case 'moveAsNextSiblingOf': +
514                        $this->insertAsNextSiblingOf($dest); +
515                    break; +
516                    case 'moveAsLastChildOf': +
517                        $this->insertAsLastChildOf($dest); +
518                    break; +
519                    default: +
520                        throw new Exception("Unknown move operation: $moveType."); +
521                } +
522                 +
523                $diff = $oldRgt - $oldLft; +
524                $this->setRightValue($this->getLeftValue() + ($oldRgt - $oldLft)); +
525                $this->record->save(); +
526                 +
527                $newLevel = $this->record['level']; +
528                $levelDiff = $newLevel - $oldLevel; +
529                 +
530                // Relocate descendants of the node +
531                $diff = $this->getLeftValue() - $oldLft; +
532                $componentName = $this->_tree->getBaseComponent(); +
533                $rootColName = $this->record->getTable()->getTree()->getAttribute('rootColumnName'); +
534 +
535                // Update lft/rgt/root/level for all descendants +
536                $q = new Doctrine_Query($conn); +
537                $q = $q->update($componentName) +
538                        ->set($componentName . '.lft', 'lft + ?', $diff) +
539                        ->set($componentName . '.rgt', 'rgt + ?', $diff) +
540                        ->set($componentName . '.level', 'level + ?', $levelDiff) +
541                        ->set($componentName . '.' . $rootColName, '?', $newRoot) +
542                        ->where($componentName . '.lft > ? AND ' . $componentName . '.rgt < ?', +
543                        array($oldLft, $oldRgt)); +
544                $q = $this->_tree->returnQueryWithRootId($q, $oldRoot); +
545                $q->execute(); +
546                 +
547                $conn->commit(); +
548            } catch (Exception $e) { +
549                $conn->rollback(); +
550                throw $e; +
551            } +
552    } +
553     +
554    /** +
555     * moves node as prev sibling of dest record +
556     *  +
557     */      +
558    public function moveAsPrevSiblingOf(Doctrine_Record $dest) +
559    { +
560        if ($dest->getNode()->getRootValue() != $this->getRootValue()) { +
561            // Move between trees +
562            $this->_moveBetweenTrees($dest, $dest->getNode()->getLeftValue(), __FUNCTION__); +
563        } else { +
564            // Move within the tree +
565            $oldLevel = $this->record['level']; +
566            $this->record['level'] = $dest['level']; +
567            $this->updateNode($dest->getNode()->getLeftValue(), $this->record['level'] - $oldLevel); +
568        } +
569    } +
570 +
571    /** +
572     * moves node as next sibling of dest record +
573     *         +
574     */ +
575    public function moveAsNextSiblingOf(Doctrine_Record $dest) +
576    { +
577        if ($dest->getNode()->getRootValue() != $this->getRootValue()) { +
578            // Move between trees +
579            $this->_moveBetweenTrees($dest, $dest->getNode()->getRightValue() + 1, __FUNCTION__); +
580        } else { +
581            // Move within tree +
582            $oldLevel = $this->record['level']; +
583            $this->record['level'] = $dest['level']; +
584            $this->updateNode($dest->getNode()->getRightValue() + 1, $this->record['level'] - $oldLevel); +
585        } +
586    } +
587 +
588    /** +
589     * moves node as first child of dest record +
590     *             +
591     */ +
592    public function moveAsFirstChildOf(Doctrine_Record $dest) +
593    { +
594        if ($dest->getNode()->getRootValue() != $this->getRootValue()) { +
595            // Move between trees +
596            $this->_moveBetweenTrees($dest, $dest->getNode()->getLeftValue() + 1, __FUNCTION__); +
597        } else { +
598            // Move within tree +
599            $oldLevel = $this->record['level']; +
600            $this->record['level'] = $dest['level'] + 1; +
601            $this->updateNode($dest->getNode()->getLeftValue() + 1, $this->record['level'] - $oldLevel); +
602        } +
603    } +
604 +
605    /** +
606     * moves node as last child of dest record +
607     *         +
608     */ +
609    public function moveAsLastChildOf(Doctrine_Record $dest) +
610    { +
611        if ($dest->getNode()->getRootValue() != $this->getRootValue()) { +
612            // Move between trees +
613            $this->_moveBetweenTrees($dest, $dest->getNode()->getRightValue(), __FUNCTION__); +
614        } else { +
615            // Move within tree +
616            $oldLevel = $this->record['level']; +
617            $this->record['level'] = $dest['level'] + 1; +
618            $this->updateNode($dest->getNode()->getRightValue(), $this->record['level'] - $oldLevel); +
619        } +
620    } +
621     +
622    /** +
623     * Makes this node a root node. Only used in multiple-root trees. +
624     * +
625     * @todo Exception handling/wrapping +
626     */ +
627    public function makeRoot($newRootId) +
628    { +
629        // TODO: throw exception instead? +
630        if ($this->getLeftValue() == 1 || !$this->record->getTable()->getTree()->getAttribute('hasManyRoots')) { +
631            return false; +
632        } +
633         +
634        $oldRgt = $this->getRightValue(); +
635        $oldLft = $this->getLeftValue(); +
636        $oldRoot = $this->getRootValue(); +
637        $oldLevel = $this->record['level']; +
638         +
639        try { +
640            $conn = $this->record->getTable()->getConnection(); +
641            $conn->beginTransaction(); +
642             +
643            // Detach from old tree (close gap in old tree) +
644            $first = $oldRgt + 1; +
645            $delta = $oldLft - $oldRgt - 1; +
646            $this->shiftRLValues($first, $delta, $this->getRootValue()); +
647             +
648            // Set new lft/rgt/root/level values for root node +
649            $this->setLeftValue(1); +
650            $this->setRightValue($oldRgt - $oldLft + 1); +
651            $this->setRootValue($newRootId); +
652            $this->record['level'] = 0; +
653             +
654            // Update descendants lft/rgt/root/level values +
655            $diff = 1 - $oldLft; +
656            $newRoot = $newRootId; +
657            $componentName = $this->_tree->getBaseComponent(); +
658            $rootColName = $this->record->getTable()->getTree()->getAttribute('rootColumnName'); +
659            $q = new Doctrine_Query($conn); +
660            $q = $q->update($componentName) +
661                    ->set($componentName . '.lft', 'lft + ?', $diff) +
662                    ->set($componentName . '.rgt', 'rgt + ?', $diff) +
663                    ->set($componentName . '.level', 'level - ?', $oldLevel) +
664                    ->set($componentName . '.' . $rootColName, '?', $newRoot) +
665                    ->where($componentName . '.lft > ? AND ' . $componentName . '.rgt < ?', +
666                    array($oldLft, $oldRgt)); +
667            $q = $this->_tree->returnQueryWithRootId($q, $oldRoot); +
668            $q->execute(); +
669             +
670            $conn->commit(); +
671             +
672        } catch (Exception $e) { +
673            $conn->rollback(); +
674            throw $e; +
675        } +
676    } +
677 +
678    /** +
679     * adds node as last child of record +
680     *         +
681     */ +
682    public function addChild(Doctrine_Record $record) +
683    { +
684        $record->getNode()->insertAsLastChildOf($this->getRecord()); +
685    } +
686 +
687    /** +
688     * determines if node is leaf +
689     * +
690     * @return bool             +
691     */ +
692    public function isLeaf() +
693    { +
694        return (($this->getRightValue() - $this->getLeftValue()) == 1); +
695    } +
696 +
697    /** +
698     * determines if node is root +
699     * +
700     * @return bool             +
701     */ +
702    public function isRoot() +
703    { +
704        return ($this->getLeftValue() == 1); +
705    } +
706 +
707    /** +
708     * determines if node is equal to subject node +
709     * +
710     * @return bool             +
711     */     +
712    public function isEqualTo(Doctrine_Record $subj) +
713    { +
714        return (($this->getLeftValue() == $subj->getNode()->getLeftValue()) && +
715                ($this->getRightValue() == $subj->getNode()->getRightValue()) &&  +
716                ($this->getRootValue() == $subj->getNode()->getRootValue()) +
717                ); +
718    } +
719 +
720    /** +
721     * determines if node is child of subject node +
722     * +
723     * @return bool +
724     */ +
725    public function isDescendantOf(Doctrine_Record $subj) +
726    { +
727        return (($this->getLeftValue() > $subj->getNode()->getLeftValue()) && +
728                ($this->getRightValue() < $subj->getNode()->getRightValue()) && +
729                ($this->getRootValue() == $subj->getNode()->getRootValue())); +
730    } +
731 +
732    /** +
733     * determines if node is child of or sibling to subject node +
734     * +
735     * @return bool             +
736     */ +
737    public function isDescendantOfOrEqualTo(Doctrine_Record $subj) +
738    { +
739        return (($this->getLeftValue() >= $subj->getNode()->getLeftValue()) && +
740                ($this->getRightValue() <= $subj->getNode()->getRightValue()) && +
741                ($this->getRootValue() == $subj->getNode()->getRootValue())); +
742    } +
743 +
744    /** +
745     * determines if node is valid +
746     * +
747     * @return bool             +
748     */ +
749    public function isValidNode($record = null) +
750    { +
751        if ($record === null) { +
752          return ($this->getRightValue() > $this->getLeftValue()); +
753        } else if ( $record instanceof Doctrine_Record ) { +
754          return ($record->getNode()->getRightValue() > $record->getNode()->getLeftValue()); +
755        } else { +
756          return false; +
757        } +
758    } +
759 +
760    /** +
761     * deletes node and it's descendants +
762     * @todo Delete more efficiently. Wrap in transaction if needed.       +
763     */ +
764    public function delete() +
765    { +
766        // TODO: add the setting whether or not to delete descendants or relocate children +
767        $oldRoot = $this->getRootValue(); +
768        $q = $this->_tree->getBaseQuery(); +
769         +
770        $baseAlias = $this->_tree->getBaseAlias(); +
771        $componentName = $this->_tree->getBaseComponent(); +
772 +
773        $q = $q->addWhere("$baseAlias.lft >= ? AND $baseAlias.rgt <= ?", array($this->getLeftValue(), $this->getRightValue())); +
774 +
775        $q = $this->record->getTable()->getTree()->returnQueryWithRootId($q, $oldRoot); +
776         +
777        $coll = $q->execute(); +
778 +
779        $coll->delete(); +
780 +
781        $first = $this->getRightValue() + 1; +
782        $delta = $this->getLeftValue() - $this->getRightValue() - 1; +
783        $this->shiftRLValues($first, $delta, $oldRoot); +
784         +
785        return true;  +
786    } +
787 +
788    /** +
789     * sets node's left and right values and save's it +
790     * +
791     * @param int     $destLeft     node left value +
792     * @param int        $destRight    node right value +
793     */     +
794    private function insertNode($destLeft = 0, $destRight = 0, $destRoot = 1) +
795    { +
796        $this->setLeftValue($destLeft); +
797        $this->setRightValue($destRight); +
798        $this->setRootValue($destRoot); +
799        $this->record->save();     +
800    } +
801 +
802    /** +
803     * move node's and its children to location $destLeft and updates rest of tree +
804     * +
805     * @param int     $destLeft    destination left value +
806     * @todo Wrap in transaction +
807     */ +
808    private function updateNode($destLeft, $levelDiff) +
809    {  +
810        $componentName = $this->_tree->getBaseComponent(); +
811        $left = $this->getLeftValue(); +
812        $right = $this->getRightValue(); +
813        $rootId = $this->getRootValue(); +
814 +
815        $treeSize = $right - $left + 1; +
816 +
817        // Make room in the new branch +
818        $this->shiftRLValues($destLeft, $treeSize, $rootId); +
819 +
820        if ($left >= $destLeft) { // src was shifted too? +
821            $left += $treeSize; +
822            $right += $treeSize; +
823        } +
824 +
825        // update level for descendants +
826        $q = new Doctrine_Query(); +
827        $q = $q->update($componentName) +
828                ->set($componentName . '.level', 'level + ?') +
829                ->where($componentName . '.lft > ? AND ' . $componentName . '.rgt < ?', +
830                        array($levelDiff, $left, $right)); +
831        $q = $this->_tree->returnQueryWithRootId($q, $rootId); +
832        $q->execute(); +
833         +
834        // now there's enough room next to target to move the subtree +
835        $this->shiftRLRange($left, $right, $destLeft - $left, $rootId); +
836 +
837        // correct values after source (close gap in old tree) +
838        $this->shiftRLValues($right + 1, -$treeSize, $rootId); +
839 +
840        $this->record->save(); +
841        $this->record->refresh(); +
842    } +
843 +
844    /** +
845     * adds '$delta' to all Left and Right values that are >= '$first'. '$delta' can also be negative. +
846     * +
847     * @param int $first         First node to be shifted +
848     * @param int $delta         Value to be shifted by, can be negative +
849     */     +
850    private function shiftRlValues($first, $delta, $rootId = 1) +
851    { +
852        $qLeft  = new Doctrine_Query(); +
853        $qRight = new Doctrine_Query(); +
854 +
855        // shift left columns +
856        $componentName = $this->_tree->getBaseComponent(); +
857        $qLeft = $qLeft->update($componentName) +
858                                ->set($componentName . '.lft', 'lft + ?') +
859                                ->where($componentName . '.lft >= ?', array($delta, $first)); +
860         +
861        $qLeft = $this->record->getTable()->getTree()->returnQueryWithRootId($qLeft, $rootId); +
862         +
863        $resultLeft = $qLeft->execute(); +
864         +
865        // shift right columns +
866        $resultRight = $qRight->update($componentName) +
867                                ->set($componentName . '.rgt', 'rgt + ?') +
868                                ->where($componentName . '.rgt >= ?', array($delta, $first)); +
869 +
870        $qRight = $this->record->getTable()->getTree()->returnQueryWithRootId($qRight, $rootId); +
871 +
872        $resultRight = $qRight->execute(); +
873    } +
874 +
875    /** +
876     * adds '$delta' to all Left and Right values that are >= '$first' and <= '$last'.  +
877     * '$delta' can also be negative. +
878     * +
879     * @param int $first     First node to be shifted (L value) +
880     * @param int $last     Last node to be shifted (L value) +
881     * @param int $delta         Value to be shifted by, can be negative +
882     */  +
883    private function shiftRlRange($first, $last, $delta, $rootId = 1) +
884    { +
885        $qLeft  = new Doctrine_Query(); +
886        $qRight = new Doctrine_Query(); +
887 +
888        // shift left column values +
889        $componentName = $this->_tree->getBaseComponent(); +
890        $qLeft = $qLeft->update($componentName) +
891                                ->set($componentName . '.lft', 'lft + ?') +
892                                ->where($componentName . '.lft >= ? AND ' . $componentName . '.lft <= ?', array($delta, $first, $last)); +
893         +
894        $qLeft = $this->record->getTable()->getTree()->returnQueryWithRootId($qLeft, $rootId); +
895 +
896        $resultLeft = $qLeft->execute(); +
897         +
898        // shift right column values +
899        $qRight = $qRight->update($componentName) +
900                                ->set($componentName . '.rgt', 'rgt + ?') +
901                                ->where($componentName . '.rgt >= ? AND ' . $componentName . '.rgt <= ?', array($delta, $first, $last)); +
902 +
903        $qRight = $this->record->getTable()->getTree()->returnQueryWithRootId($qRight, $rootId); +
904 +
905        $resultRight = $qRight->execute(); +
906    } +
907     +
908    /** +
909     * gets record's left value +
910     * +
911     * @return int             +
912     */      +
913    public function getLeftValue() +
914    { +
915        return $this->record->get('lft'); +
916    } +
917 +
918    /** +
919     * sets record's left value +
920     * +
921     * @param int             +
922     */      +
923    public function setLeftValue($lft) +
924    { +
925        $this->record->set('lft', $lft);         +
926    } +
927 +
928    /** +
929     * gets record's right value +
930     * +
931     * @return int             +
932     */      +
933    public function getRightValue() +
934    { +
935        return $this->record->get('rgt');         +
936    } +
937 +
938    /** +
939     * sets record's right value +
940     * +
941     * @param int             +
942     */     +
943    public function setRightValue($rgt) +
944    { +
945        $this->record->set('rgt', $rgt);          +
946    } +
947 +
948    /** +
949     * gets level (depth) of node in the tree +
950     * +
951     * @return int             +
952     */     +
953    public function getLevel() +
954    { +
955        if ( ! isset($this->record['level'])) { +
956            $baseAlias = $this->_tree->getBaseAlias(); +
957            $componentName = $this->_tree->getBaseComponent(); +
958            $q = $this->_tree->getBaseQuery(); +
959            $q = $q->addWhere("$baseAlias.lft < ? AND $baseAlias.rgt > ?", array($this->getLeftValue(), $this->getRightValue())); +
960 +
961            $q = $this->_tree->returnQueryWithRootId($q, $this->getRootValue()); +
962             +
963            $coll = $q->execute(); +
964 +
965            $this->record['level'] = count($coll) ? count($coll) : 0; +
966        } +
967        return $this->record['level']; +
968    } +
969 +
970    /** +
971     * get records root id value +
972     *             +
973     */      +
974    public function getRootValue() +
975    { +
976        if ($this->_tree->getAttribute('hasManyRoots')) { +
977            return $this->record->get($this->_tree->getAttribute('rootColumnName')); +
978        } +
979        return 1; +
980    } +
981 +
982    /** +
983     * sets records root id value +
984     * +
985     * @param int             +
986     */ +
987    public function setRootValue($value) +
988    { +
989        if ($this->_tree->getAttribute('hasManyRoots')) { +
990            $this->record->set($this->_tree->getAttribute('rootColumnName'), $value);    +
991        }     +
992    } +
993}
\ No newline at end of file diff --git a/tests/coverage/Doctrine_Null.html b/tests/coverage/Doctrine_Null.html new file mode 100644 index 000000000..60661a202 --- /dev/null +++ b/tests/coverage/Doctrine_Null.html @@ -0,0 +1,146 @@ + + + Coverage for Doctrine_Null + + +

Coverage for Doctrine_Null

Back to coverage report

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
1<?php +
2/* +
3 *  $Id: Null.php 2702 2007-10-03 21:43:22Z Jonathan.Wage $ +
4 * +
5 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +
6 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +
7 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +
8 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +
9 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +
10 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +
11 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +
12 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +
13 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +
14 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +
15 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +
16 * +
17 * This software consists of voluntary contributions made by many individuals +
18 * and is licensed under the LGPL. For more information, see +
19 * <http://www.phpdoctrine.com>. +
20 */ +
21/** +
22 * Doctrine_Null +
23 * +
24 * Simple empty class representing a null value +
25 * used for extra fast null value testing with isset() rather than array_key_exists() +
26 * +
27 * @package     Doctrine +
28 * @subpackage  Null +
29 * @license     http://www.opensource.org/licenses/lgpl-license.php LGPL +
30 * @link        www.phpdoctrine.com +
31 * @since       1.0 +
32 * @version     $Revision: 2702 $ +
33 * @author      Konsta Vesterinen <kvesteri@cc.hut.fi> +
34 */ +
35final class Doctrine_Null +
36{  +
37    public function exists() +
38    { +
39        return false;     +
40    } +
41    public function __toString() +
42    { +
43        return ''; +
44    } +
45}
\ No newline at end of file diff --git a/tests/coverage/Doctrine_Parser.html b/tests/coverage/Doctrine_Parser.html new file mode 100644 index 000000000..e85889cc3 --- /dev/null +++ b/tests/coverage/Doctrine_Parser.html @@ -0,0 +1,398 @@ + + + Coverage for Doctrine_Parser + + +

Coverage for Doctrine_Parser

Back to coverage report

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
1<?php +
2/* +
3 *  $Id: Parser.php 1080 2007-02-10 18:17:08Z jwage $ +
4 * +
5 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +
6 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +
7 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +
8 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +
9 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +
10 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +
11 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +
12 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +
13 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +
14 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +
15 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +
16 * +
17 * This software consists of voluntary contributions made by many individuals +
18 * and is licensed under the LGPL. For more information, see +
19 * <http://www.phpdoctrine.com>. +
20 */ +
21/** +
22 * Doctrine_Parser +
23 * +
24 * @package     Doctrine +
25 * @subpackage  Parser +
26 * @license     http://www.opensource.org/licenses/lgpl-license.php LGPL +
27 * @link        www.phpdoctrine.com +
28 * @since       1.0 +
29 * @version     $Revision: 1080 $ +
30 * @author      Jonathan H. Wage <jwage@mac.com> +
31 */ +
32abstract class Doctrine_Parser +
33{ +
34    /** +
35     * loadData +
36     * +
37     * Override in the parser driver +
38     * +
39     * @param string $array  +
40     * @return void +
41     * @author Jonathan H. Wage +
42     */ +
43    abstract public function loadData($array); +
44    /** +
45     * dumpData +
46     * +
47     * Override in the praser driver +
48     * +
49     * @param string $array  +
50     * @param string $path  +
51     * @return void +
52     * @author Jonathan H. Wage +
53     */ +
54    abstract public function dumpData($array, $path = null); +
55    /** +
56     * getParser +
57     * +
58     * Get instance of the specified parser +
59     * +
60     * @param string $type  +
61     * @return void +
62     * @author Jonathan H. Wage +
63     */ +
64    static public function getParser($type) +
65    { +
66        $class = 'Doctrine_Parser_'.ucfirst($type); +
67         +
68        return new $class; +
69    } +
70    /** +
71     * load +
72     * +
73     * Interface for loading and parsing data from a file +
74     * +
75     * @param string $path  +
76     * @param string $type  +
77     * @return void +
78     * @author Jonathan H. Wage +
79     */ +
80    static public function load($path, $type = 'xml') +
81    { +
82        $parser = self::getParser($type); +
83         +
84        return $parser->loadData($path); +
85    } +
86    /** +
87     * dump +
88     * +
89     * Interface for pulling and dumping data to a file +
90     * +
91     * @param string $array  +
92     * @param string $path  +
93     * @param string $type  +
94     * @return void +
95     * @author Jonathan H. Wage +
96     */ +
97    static public function dump($array, $type = 'xml', $path = null) +
98    { +
99        $parser = self::getParser($type); +
100         +
101        return $parser->dumpData($array, $path); +
102    } +
103     +
104    /** +
105     * getContents +
106     * +
107     * Get contents whether it is the path to a file file or a string of txt. +
108     * Either should allow php code in it. +
109     * +
110     * @param string $path  +
111     * @return void +
112     * @author Jonathan H. Wage +
113     */ +
114    public function getContents($path) +
115    { +
116        ob_start(); +
117        if (!file_exists($path)) { +
118            $contents = $path; +
119            $path = '/tmp/dparser_' . microtime(); +
120             +
121            file_put_contents($path, $contents); +
122        } +
123         +
124        include($path); +
125        $contents = ob_get_clean(); +
126         +
127        return $contents; +
128    } +
129}
\ No newline at end of file diff --git a/tests/coverage/Doctrine_Parser_Yml.html b/tests/coverage/Doctrine_Parser_Yml.html new file mode 100644 index 000000000..a7fabc76c --- /dev/null +++ b/tests/coverage/Doctrine_Parser_Yml.html @@ -0,0 +1,243 @@ + + + Coverage for Doctrine_Parser_Yml + + +

Coverage for Doctrine_Parser_Yml

Back to coverage report

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
1<?php +
2require_once('spyc.php'); +
3 +
4/* +
5 *  $Id: Yml.php 1080 2007-02-10 18:17:08Z jwage $ +
6 * +
7 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +
8 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +
9 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +
10 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +
11 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +
12 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +
13 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +
14 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +
15 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +
16 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +
17 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +
18 * +
19 * This software consists of voluntary contributions made by many individuals +
20 * and is licensed under the LGPL. For more information, see +
21 * <http://www.phpdoctrine.com>. +
22 */ +
23/** +
24 * Doctrine_Parser_Yml +
25 * +
26 * @package     Doctrine +
27 * @subpackage  Parser +
28 * @license     http://www.opensource.org/licenses/lgpl-license.php LGPL +
29 * @link        www.phpdoctrine.com +
30 * @since       1.0 +
31 * @version     $Revision: 1080 $ +
32 * @author      Jonathan H. Wage <jwage@mac.com> +
33 */ +
34class Doctrine_Parser_Yml extends Doctrine_Parser +
35{ +
36    /** +
37     * dumpData +
38     * +
39     * Dump an array of data to a specified path or return +
40     *  +
41     * @param string $array  +
42     * @param string $path  +
43     * @return void +
44     * @author Jonathan H. Wage +
45     */ +
46    public function dumpData($array, $path = null) +
47    { +
48        $spyc = new DoctrineSpyc(); +
49         +
50        $yml = $spyc->dump($array, false, false); +
51         +
52        if ($path) { +
53            return file_put_contents($path, $yml); +
54        } else { +
55            return $yml; +
56        } +
57    } +
58    /** +
59     * loadData +
60     * +
61     * Load and parse data from a yml file +
62     *  +
63     * @param string $path  +
64     * @return void +
65     * @author Jonathan H. Wage +
66     */ +
67    public function loadData($path) +
68    { +
69        $contents = $this->getContents($path); +
70 +
71        $spyc = new DoctrineSpyc(); +
72         +
73        $array = $spyc->load($contents); +
74         +
75        return $array; +
76    } +
77} +
\ No newline at end of file diff --git a/tests/coverage/Doctrine_Plugin.html b/tests/coverage/Doctrine_Plugin.html new file mode 100644 index 000000000..f4f4dd399 --- /dev/null +++ b/tests/coverage/Doctrine_Plugin.html @@ -0,0 +1,546 @@ + + + Coverage for Doctrine_Plugin + + +

Coverage for Doctrine_Plugin

Back to coverage report

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
1<?php +
2/* +
3 *  $Id$ +
4 * +
5 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +
6 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +
7 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +
8 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +
9 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +
10 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +
11 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +
12 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +
13 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +
14 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +
15 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +
16 * +
17 * This software consists of voluntary contributions made by many individuals +
18 * and is licensed under the LGPL. For more information, see +
19 * <http://www.phpdoctrine.com>. +
20 */ +
21 +
22/** +
23 * Doctrine_Plugin +
24 * +
25 * @author      Konsta Vesterinen <kvesteri@cc.hut.fi> +
26 * @package     Doctrine +
27 * @subpackage  Plugin +
28 * @license     http://www.opensource.org/licenses/lgpl-license.php LGPL +
29 * @version     $Revision$ +
30 * @link        www.phpdoctrine.com +
31 * @since       1.0 +
32 */ +
33class Doctrine_Plugin  +
34{ +
35    /** +
36     * @var array $_options     an array of plugin specific options +
37     */ +
38    protected $_options = array('generateFiles' => false); +
39    /** +
40     * __get +
41     * an alias for getOption +
42     * +
43     * @param string $option +
44     */ +
45    public function __get($option) +
46    { +
47        if (isset($this->_options[$option])) { +
48            return $this->_options[$option]; +
49        } +
50        return null; +
51    } +
52    /** +
53     * __isset +
54     * +
55     * @param string $option +
56     */ +
57    public function __isset($option)  +
58    { +
59        return isset($this->_options[$option]); +
60    } +
61    /** +
62     * returns the value of an option +
63     * +
64     * @param $option       the name of the option to retrieve +
65     * @return mixed        the value of the option +
66     */ +
67    public function getOption($name) +
68    { +
69        if ( ! isset($this->_options[$name])) { +
70            throw new Doctrine_Plugin_Exception('Unknown option ' . $name); +
71        } +
72         +
73        return $this->_options[$name]; +
74    } +
75    /** +
76     * sets given value to an option +
77     * +
78     * @param $option       the name of the option to be changed +
79     * @param $value        the value of the option +
80     * @return Doctrine_Plugin  this object +
81     */ +
82    public function setOption($name, $value) +
83    { +
84        if ( ! isset($this->_options[$name])) { +
85            throw new Doctrine_Plugin_Exception('Unknown option ' . $name); +
86        } +
87 +
88        $this->_options[$name] = $value; +
89         +
90        return $this; +
91    } +
92    /** +
93     * returns all options and their associated values +
94     * +
95     * @return array    all options as an associative array +
96     */ +
97    public function getOptions() +
98    { +
99        return $this->_options; +
100    } +
101    /** +
102     * generates foreign keys for the plugin table based on the owner table +
103     * +
104     * the foreign keys generated by this method can be used for  +
105     * setting the relations between the owner and the plugin classes +
106     * +
107     * @param Doctrine_Table $table     the table object that owns the plugin +
108     * @return array                    an array of foreign key definitions +
109     */ +
110    public function generateForeignKeys(Doctrine_Table $table) +
111    { +
112        $fk = array(); +
113 +
114        foreach ((array) $table->getIdentifier() as $column) { +
115            $def = $table->getDefinitionOf($column); +
116 +
117            unset($def['autoincrement']); +
118            unset($def['sequence']); +
119            unset($def['primary']); +
120 +
121            $col = $column; +
122 +
123            $def['primary'] = true; +
124            $fk[$col] = $def; +
125        } +
126        return $fk; +
127    } +
128    /** +
129     * generates a relation array to given table +
130     * +
131     * this method can be used for generating the relation from the plugin  +
132     * table to the owner table +
133     * +
134     * @param Doctrine_Table $table     the table object to construct the relation to +
135     * @param array $foreignKeys        an array of foreign keys +
136     * @return array                    the generated relation array +
137     */ +
138    public function generateRelation(Doctrine_Table $table, array $foreignKeys) +
139    { +
140        $local = (count($foreignKeys) > 1) ? array_keys($foreignKeys) : key($foreignKeys); +
141         +
142        $relation = array($table->getComponentName() =>  +
143                        array('local'    => $local, +
144                              'foreign'  => $table->getIdentifier(), +
145                              'onDelete' => 'CASCADE', +
146                              'onUpdate' => 'CASCADE')); +
147 +
148        return $relation; +
149    } +
150    /** +
151     * generates the class definition for plugin class +
152     * +
153     * @param array $options    plugin class options, keys representing the option names  +
154     *                          and values as option values +
155     * @param array $columns    the plugin class columns, keys representing the column names +
156     *                          and values as column definitions +
157     * @param array $relations  the bound relations of the plugin class +
158     * @return void +
159     */ +
160    public function generateClass($options, $columns, $relations) +
161    { +
162        $builder = new Doctrine_Import_Builder(); +
163 +
164        if ($this->_options['generateFiles']) { +
165            if (isset($this->_options['generatePath']) && $this->_options['generatePath']) { +
166                $builder->setTargetPath($this->_options['generatePath']); +
167             +
168                $builder->buildRecord($options, $columns, $relations); +
169            } else { +
170                throw new Doctrine_Plugin_Exception('If you wish to generate files then you must specify the path to generate the files in.'); +
171            } +
172        } else { +
173            $def = $builder->buildDefinition($options, $columns, $relations); +
174           +
175            eval($def); +
176        } +
177    } +
178} +
\ No newline at end of file diff --git a/tests/coverage/Doctrine_Query.html b/tests/coverage/Doctrine_Query.html new file mode 100644 index 000000000..2ff07d267 --- /dev/null +++ b/tests/coverage/Doctrine_Query.html @@ -0,0 +1,5088 @@ + + + Coverage for Doctrine_Query + + +

Coverage for Doctrine_Query

Back to coverage report

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
1<?php +
2/* +
3 *  $Id: Query.php 2735 2007-10-05 21:18:40Z zYne $ +
4 * +
5 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +
6 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +
7 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +
8 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +
9 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +
10 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +
11 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +
12 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +
13 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +
14 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +
15 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +
16 * +
17 * This software consists of voluntary contributions made by many individuals +
18 * and is licensed under the LGPL. For more information, see +
19 * <http://www.phpdoctrine.com>. +
20 */ +
21Doctrine::autoload('Doctrine_Query_Abstract'); +
22/** +
23 * Doctrine_Query +
24 * +
25 * @package     Doctrine +
26 * @subpackage  Query +
27 * @license     http://www.opensource.org/licenses/lgpl-license.php LGPL +
28 * @link        www.phpdoctrine.com +
29 * @since       1.0 +
30 * @version     $Revision: 2735 $ +
31 * @author      Konsta Vesterinen <kvesteri@cc.hut.fi> +
32 */ +
33class Doctrine_Query extends Doctrine_Query_Abstract implements Countable +
34{ +
35    const STATE_CLEAN  = 1; +
36 +
37    const STATE_DIRTY  = 2; +
38 +
39    const STATE_DIRECT = 3; +
40 +
41    const STATE_LOCKED = 4; +
42 +
43 +
44    protected $subqueryAliases   = array(); +
45    /** +
46     * @param boolean $needsSubquery +
47     */ +
48    protected $needsSubquery     = false; +
49    /** +
50     * @param boolean $isSubquery           whether or not this query object is a subquery of another  +
51     *                                      query object +
52     */ +
53    protected $isSubquery; +
54 +
55    protected $isLimitSubqueryUsed = false; +
56    /** +
57     * @var array $_neededTables            an array containing the needed table aliases +
58     */ +
59    protected $_neededTables     = array(); +
60    /** +
61     * @var array $pendingSubqueries        SELECT part subqueries, these are called pending subqueries since +
62     *                                      they cannot be parsed directly (some queries might be correlated) +
63     */ +
64    protected $pendingSubqueries = array(); +
65    /** +
66     * @var array $pendingFields +
67     */ +
68    protected $pendingFields     = array(); +
69    /** +
70     * @var array $_parsers                 an array of parser objects, each DQL query part has its own parser +
71     */ +
72    protected $_parsers    = array(); +
73    /** +
74     * @var array $_enumParams              an array containing the keys of the parameters that should be enumerated +
75     */ +
76    protected $_enumParams = array(); +
77 +
78    /** +
79     * @var array $_dqlParts                an array containing all DQL query parts +
80     */ +
81    protected $_dqlParts   = array( +
82                            'from'      => array(), +
83                            'select'    => array(), +
84                            'forUpdate' => false, +
85                            'set'       => array(), +
86                            'join'      => array(), +
87                            'where'     => array(), +
88                            'groupby'   => array(), +
89                            'having'    => array(), +
90                            'orderby'   => array(), +
91                            'limit'     => array(), +
92                            'offset'    => array(), +
93                            ); +
94    /** +
95     * @var array $_pendingJoinConditions    an array containing pending joins +
96     */ +
97    protected $_pendingJoinConditions = array(); +
98 +
99    protected $_expressionMap = array(); +
100 +
101    protected $_state = Doctrine_Query::STATE_CLEAN; +
102 +
103    /** +
104     * create +
105     * returns a new Doctrine_Query object +
106     * +
107     * @param Doctrine_Connection $conn     optional connection parameter +
108     * @return Doctrine_Query +
109     */ +
110    public static function create($conn = null) +
111    { +
112        return new Doctrine_Query($conn); +
113    } +
114    public function reset() +
115    { +
116        $this->_pendingJoinConditions = array(); +
117        $this->pendingSubqueries = array(); +
118        $this->pendingFields = array(); +
119        $this->_neededTables = array(); +
120        $this->_expressionMap = array(); +
121        $this->subqueryAliases = array(); +
122        $this->needsSubquery = false; +
123        $this->isLimitSubqueryUsed = false; +
124    } +
125    /** +
126     * setOption +
127     * +
128     * @param string $name      option name +
129     * @param string $value     option value +
130     * @return Doctrine_Query   this object +
131     */ +
132    public function setOption($name, $value) +
133    { +
134        if ( ! isset($this->_options[$name])) { +
135            throw new Doctrine_Query_Exception('Unknown option ' . $name); +
136        } +
137        $this->_options[$name] = $value; +
138    } +
139    /** +
140     * addPendingJoinCondition +
141     * +
142     * @param string $componentAlias    component alias +
143     * @param string $joinCondition     dql join condition +
144     * @return Doctrine_Query           this object +
145     */ +
146    public function addPendingJoinCondition($componentAlias, $joinCondition) +
147    { +
148        $this->_pendingJoins[$componentAlias] = $joinCondition; +
149    } +
150    /** +
151     * addEnumParam +
152     * sets input parameter as an enumerated parameter +
153     * +
154     * @param string $key   the key of the input parameter +
155     * @return Doctrine_Query +
156     */ +
157    public function addEnumParam($key, $table = null, $column = null) +
158    { +
159        $array = (isset($table) || isset($column)) ? array($table, $column) : array(); +
160 +
161        if ($key === '?') { +
162            $this->_enumParams[] = $array; +
163        } else { +
164            $this->_enumParams[$key] = $array; +
165        } +
166    } +
167    /** +
168     * getEnumParams +
169     * get all enumerated parameters +
170     * +
171     * @return array    all enumerated parameters +
172     */ +
173    public function getEnumParams() +
174    { +
175        return $this->_enumParams; +
176    } +
177    /** +
178     * limitSubqueryUsed +
179     * +
180     * @return boolean +
181     */ +
182    public function isLimitSubqueryUsed() +
183    { +
184        return $this->isLimitSubqueryUsed; +
185    } +
186    /** +
187     * convertEnums +
188     * convert enum parameters to their integer equivalents +
189     * +
190     * @return array    converted parameter array +
191     */ +
192    public function convertEnums($params) +
193    { +
194        foreach ($this->_enumParams as $key => $values) { +
195            if (isset($params[$key])) { +
196                if ( ! empty($values)) { +
197                    $params[$key] = $values[0]->enumIndex($values[1], $params[$key]); +
198                } +
199            } +
200        } +
201        return $params; +
202    } +
203    /** +
204     * isSubquery +
205     * if $bool parameter is set this method sets the value of +
206     * Doctrine_Query::$isSubquery. If this value is set to true +
207     * the query object will not load the primary key fields of the selected +
208     * components. +
209     * +
210     * If null is given as the first parameter this method retrieves the current +
211     * value of Doctrine_Query::$isSubquery. +
212     * +
213     * @param boolean $bool     whether or not this query acts as a subquery +
214     * @return Doctrine_Query|bool +
215     */ +
216    public function isSubquery($bool = null) +
217    { +
218        if ($bool === null) { +
219            return $this->isSubquery; +
220        } +
221 +
222        $this->isSubquery = (bool) $bool; +
223        return $this; +
224    } +
225    /** +
226     * getAggregateAlias +
227     * +
228     * @param string $dqlAlias      the dql alias of an aggregate value +
229     * @return string +
230     */ +
231    public function getAggregateAlias($dqlAlias) +
232    { +
233        if (isset($this->aggregateMap[$dqlAlias])) { +
234            // mark the expression as used +
235            $this->_expressionMap[$dqlAlias][1] = true; +
236 +
237            return $this->aggregateMap[$dqlAlias]; +
238        } +
239        if ( ! empty($this->pendingAggregates)) { +
240            $this->processPendingAggregates(); +
241 +
242            return $this->getAggregateAlias($dqlAlias); +
243        } +
244        throw new Doctrine_Query_Exception('Unknown aggregate alias ' . $dqlAlias); +
245    } +
246    /** +
247     * getParser +
248     * parser lazy-loader +
249     * +
250     * @throws Doctrine_Query_Exception     if unknown parser name given +
251     * @return Doctrine_Query_Part +
252     */ +
253    public function getParser($name) +
254    { +
255        if ( ! isset($this->_parsers[$name])) { +
256            $class = 'Doctrine_Query_' . ucwords(strtolower($name)); +
257 +
258            Doctrine::autoload($class); +
259 +
260            if ( ! class_exists($class)) { +
261                throw new Doctrine_Query_Exception('Unknown parser ' . $name); +
262            } +
263 +
264            $this->_parsers[$name] = new $class($this); +
265        } +
266 +
267        return $this->_parsers[$name]; +
268    } +
269    /** +
270     * parseQueryPart +
271     * parses given DQL query part +
272     * +
273     * @param string $queryPartName     the name of the query part +
274     * @param string $queryPart         query part to be parsed +
275     * @param boolean $append           whether or not to append the query part to its stack +
276     *                                  if false is given, this method will overwrite  +
277     *                                  the given query part stack with $queryPart +
278     * @return Doctrine_Query           this object +
279     */ +
280    public function parseQueryPart($queryPartName, $queryPart, $append = false)  +
281    { +
282        if ($this->_state === self::STATE_LOCKED) { +
283            throw new Doctrine_Query_Exception('This query object is locked. No query parts can be manipulated.'); +
284        } +
285 +
286        // sanity check +
287        if ($queryPart === '' || $queryPart === null) { +
288            throw new Doctrine_Query_Exception('Empty ' . $queryPartName . ' part given.'); +
289        } +
290 +
291        // add query part to the dql part array +
292        if ($append) { +
293            $this->_dqlParts[$queryPartName][] = $queryPart; +
294        } else { +
295            $this->_dqlParts[$queryPartName] = array($queryPart); +
296        } +
297 +
298        if ($this->_state === self::STATE_DIRECT) { +
299            $parser = $this->getParser($queryPartName); +
300 +
301            $sql = $parser->parse($queryPart); +
302 +
303            if (isset($sql)) { +
304                if ($append) { +
305                    $this->addQueryPart($queryPartName, $sql); +
306                } else { +
307                    $this->setQueryPart($queryPartName, $sql); +
308                } +
309            } +
310        } +
311 +
312        $this->_state = Doctrine_Query::STATE_DIRTY; +
313 +
314        return $this; +
315    } +
316    /** +
317     * getDqlPart +
318     * returns the given DQL query part  +
319     * +
320     * @param string $queryPart     the name of the query part +
321     * @return string   the DQL query part +
322     */ +
323    public function getDqlPart($queryPart) +
324    { +
325        if ( ! isset($this->_dqlParts[$queryPart])) { +
326           throw new Doctrine_Query_Exception('Unknown query part ' . $queryPart); +
327        } +
328 +
329        return $this->_dqlParts[$queryPart]; +
330    } +
331    /** +
332     * getDql +
333     * returns the DQL query associated with this object +
334     * +
335     * the query is built from $_dqlParts +
336     * +
337     * @return string   the DQL query +
338     */ +
339    public function getDql() +
340    { +
341        $q = ''; +
342        $q .= ( ! empty($this->_dqlParts['select']))?  'SELECT '    . implode(', ', $this->_dqlParts['select']) : ''; +
343        $q .= ( ! empty($this->_dqlParts['from']))?    ' FROM '     . implode(' ', $this->_dqlParts['from']) : ''; +
344        $q .= ( ! empty($this->_dqlParts['where']))?   ' WHERE '    . implode(' AND ', $this->_dqlParts['where']) : ''; +
345        $q .= ( ! empty($this->_dqlParts['groupby']))? ' GROUP BY ' . implode(', ', $this->_dqlParts['groupby']) : ''; +
346        $q .= ( ! empty($this->_dqlParts['having']))?  ' HAVING '   . implode(' AND ', $this->_dqlParts['having']) : ''; +
347        $q .= ( ! empty($this->_dqlParts['orderby']))? ' ORDER BY ' . implode(', ', $this->_dqlParts['orderby']) : ''; +
348        $q .= ( ! empty($this->_dqlParts['limit']))?   ' LIMIT '    . implode(' ', $this->_dqlParts['limit']) : ''; +
349        $q .= ( ! empty($this->_dqlParts['offset']))?  ' OFFSET '   . implode(' ', $this->_dqlParts['offset']) : ''; +
350 +
351        return $q; +
352    } +
353    /** +
354     * processPendingFields +
355     * the fields in SELECT clause cannot be parsed until the components +
356     * in FROM clause are parsed, hence this method is called everytime a  +
357     * specific component is being parsed. +
358     * +
359     * @throws Doctrine_Query_Exception     if unknown component alias has been given +
360     * @param string $componentAlias        the alias of the component +
361     * @return void +
362     */ +
363    public function processPendingFields($componentAlias) +
364    { +
365        $tableAlias = $this->getTableAlias($componentAlias); +
366        $table      = $this->_aliasMap[$componentAlias]['table']; +
367 +
368        if (isset($this->pendingFields[$componentAlias])) { +
369            $fields = $this->pendingFields[$componentAlias]; +
370 +
371            // check for wildcards +
372            if (in_array('*', $fields)) { +
373                $fields = $table->getColumnNames(); +
374            } else { +
375                // only auto-add the primary key fields if this query object is not +
376                // a subquery of another query object +
377                if ( ! $this->isSubquery) { +
378                    $fields = array_unique(array_merge((array) $table->getIdentifier(), $fields)); +
379                } +
380            } +
381            $sql = array(); +
382            foreach ($fields as $name) { +
383                $name = $table->getColumnName($name); +
384 +
385                $sql[] = $this->_conn->quoteIdentifier($tableAlias . '.' . $name) +
386                       . ' AS ' +
387                       . $this->_conn->quoteIdentifier($tableAlias . '__' . $name); +
388            } +
389 +
390            $this->_neededTables[] = $tableAlias; +
391 +
392            return implode(', ', $sql); +
393        } +
394    } +
395    /** +
396     * parseSelectField +
397     * +
398     * @throws Doctrine_Query_Exception     if unknown component alias has been given +
399     * @return void +
400     */ +
401    public function parseSelectField($field) +
402    { +
403        $terms = explode('.', $field); +
404 +
405        if (isset($terms[1])) { +
406            $componentAlias = $terms[0]; +
407            $field = $terms[1]; +
408        } else { +
409            reset($this->_aliasMap); +
410            $componentAlias = key($this->_aliasMap); +
411            $fields = $terms[0]; +
412        } +
413 +
414        $tableAlias = $this->getTableAlias($componentAlias); +
415        $table      = $this->_aliasMap[$componentAlias]['table']; +
416 +
417 +
418        // check for wildcards +
419        if ($field === '*') { +
420            $sql = array(); +
421 +
422            foreach ($table->getColumnNames() as $field) { +
423                $sql[] = $this->parseSelectField($componentAlias . '.' . $field); +
424            } +
425 +
426            return implode(', ', $sql); +
427        } else { +
428 +
429        } +
430 +
431        $name = $table->getColumnName($field); +
432 +
433        $this->_neededTables[] = $tableAlias; +
434 +
435        return $this->_conn->quoteIdentifier($tableAlias . '.' . $name) +
436               . ' AS ' +
437               . $this->_conn->quoteIdentifier($tableAlias . '__' . $name); +
438    } +
439    /** +
440     * getExpressionOwner +
441     * returns the component alias for owner of given expression +
442     * +
443     * @param string $expr      expression from which to get to owner from +
444     * @return string           the component alias +
445     */ +
446    public function getExpressionOwner($expr) +
447    { +
448        if (strtoupper(substr(trim($expr, '( '), 0, 6)) !== 'SELECT') { +
449            preg_match_all("/[a-z0-9_]+\.[a-z0-9_]+[\.[a-z0-9]+]*/i", $expr, $matches); +
450 +
451            $match = current($matches); +
452 +
453            if (isset($match[0])) { +
454                $terms = explode('.', $match[0]); +
455 +
456                return $terms[0]; +
457            } +
458        } +
459        return $this->getRootAlias(); +
460 +
461    } +
462    /** +
463     * parseSelect +
464     * parses the query select part and +
465     * adds selected fields to pendingFields array +
466     * +
467     * @param string $dql +
468     */ +
469    public function parseSelect($dql) +
470    { +
471        $refs = Doctrine_Tokenizer::sqlExplode($dql, ','); +
472 +
473        $pos   = strpos(trim($refs[0]), ' '); +
474        $first = substr($refs[0], 0, $pos); +
475 +
476        // check for DISTINCT keyword +
477        if ($first === 'DISTINCT') { +
478            $this->parts['distinct'] = true; +
479 +
480            $refs[0] = substr($refs[0], ++$pos); +
481        } +
482 +
483        $parsedComponents = array(); +
484 +
485        foreach ($refs as $reference) { +
486            $reference = trim($reference); +
487 +
488            if (empty($reference)) { +
489                continue; +
490            } +
491 +
492            $terms = Doctrine_Tokenizer::sqlExplode($reference, ' '); +
493 +
494            $pos   = strpos($terms[0], '('); +
495 +
496            if (count($terms) > 1 || $pos !== false) { +
497                $expression = array_shift($terms); +
498                $alias = array_pop($terms); +
499 +
500                if ( ! $alias) { +
501                    $alias = substr($expression, 0, $pos); +
502                } +
503 +
504                $componentAlias = $this->getExpressionOwner($expression); +
505                $expression = $this->parseClause($expression); +
506 +
507                $tableAlias = $this->getTableAlias($componentAlias); +
508 +
509                $index    = count($this->aggregateMap); +
510 +
511                $sqlAlias = $this->_conn->quoteIdentifier($tableAlias . '__' . $index); +
512 +
513                $this->parts['select'][] = $expression . ' AS ' . $sqlAlias; +
514 +
515                $this->aggregateMap[$alias] = $sqlAlias; +
516                $this->_expressionMap[$alias][0] = $expression; +
517 +
518                $this->_aliasMap[$componentAlias]['agg'][$index] = $alias; +
519 +
520                $this->_neededTables[] = $tableAlias; +
521            } else { +
522                $e = explode('.', $terms[0]); +
523 +
524                if (isset($e[1])) { +
525                    $componentAlias = $e[0]; +
526                    $field = $e[1]; +
527                } else { +
528                    reset($this->_aliasMap); +
529                    $componentAlias = key($this->_aliasMap); +
530                    $field = $e[0]; +
531                } +
532 +
533                $this->pendingFields[$componentAlias][] = $field; +
534            } +
535        } +
536    } +
537    /** +
538     * parseClause +
539     * parses given DQL clause +
540     * +
541     * this method handles five tasks: +
542     * +
543     * 1. Converts all DQL functions to their native SQL equivalents +
544     * 2. Converts all component references to their table alias equivalents +
545     * 3. Converts all column aliases to actual column names +
546     * 4. Quotes all identifiers +
547     * 5. Parses nested clauses and subqueries recursively +
548     * +
549     * @return string   SQL string +
550     */ +
551    public function parseClause($clause)  +
552    { +
553        $terms = Doctrine_Tokenizer::clauseExplode($clause, array(' ', '+', '-', '*', '/')); +
554 +
555        $str = ''; +
556        foreach ($terms as $term) { +
557            $pos = strpos($term[0], '('); +
558 +
559            if ($pos !== false) { +
560                $name = substr($term[0], 0, $pos); +
561                if ($name !== '') { +
562                    $argStr = substr($term[0], ($pos + 1), -1); +
563 +
564                    $args   = array(); +
565                    // parse args +
566 +
567                    foreach (Doctrine_Tokenizer::sqlExplode($argStr, ',') as $expr) { +
568                       $args[] = $this->parseClause($expr); +
569                    } +
570 +
571                    // convert DQL function to its RDBMS specific equivalent +
572                    try { +
573                        $expr = call_user_func_array(array($this->_conn->expression, $name), $args); +
574                    } catch(Doctrine_Expression_Exception $e) { +
575                        throw new Doctrine_Query_Exception('Unknown function ' . $expr . '.'); +
576                    } +
577                    $term[0] = $expr; +
578                } else { +
579                    $trimmed = trim(Doctrine_Tokenizer::bracketTrim($term[0])); +
580 +
581                    // check for possible subqueries +
582                    if (substr($trimmed, 0, 4) == 'FROM' || substr($trimmed, 0, 6) == 'SELECT') { +
583                        // parse subquery +
584                        $trimmed = $this->createSubquery()->parseQuery($trimmed)->getQuery(); +
585                    } else { +
586                        // parse normal clause +
587                        $trimmed = $this->parseClause($trimmed); +
588                    } +
589 +
590                    $term[0] = '(' . $trimmed . ')'; +
591                } +
592            } else { +
593                if (substr($term[0], 0, 1) !== "'" && substr($term[0], -1) !== "'") { +
594                    if (strpos($term[0], '.') !== false) { +
595                        if ( ! is_numeric($term[0])) { +
596                            $e = explode('.', $term[0]); +
597 +
598                            $field = array_pop($e); +
599                            $componentAlias = implode('.', $e); +
600 +
601                            // check the existence of the component alias +
602                            if ( ! isset($this->_aliasMap[$componentAlias])) { +
603                                throw new Doctrine_Query_Exception('Unknown component alias ' . $componentAlias); +
604                            } +
605 +
606                            $table = $this->_aliasMap[$componentAlias]['table']; +
607 +
608                            // get the actual field name from alias +
609                            $field = $table->getColumnName($field); +
610 +
611                            // check column existence +
612                            if ( ! $table->hasColumn($field)) { +
613                                throw new Doctrine_Query_Exception('Unknown column ' . $field); +
614                            } +
615 +
616                            $tableAlias = $this->getTableAlias($componentAlias); +
617 +
618                            // build sql expression +
619                            $term[0] = $this->_conn->quoteIdentifier($tableAlias)  +
620                                     . '.'  +
621                                     . $this->_conn->quoteIdentifier($field); +
622                        } +
623                    } +
624                } +
625            } +
626 +
627            $str .= $term[0] . $term[1]; +
628        } +
629        return $str; +
630    } +
631    /** +
632     * parseAggregateFunction +
633     * parses an aggregate function and returns the parsed form +
634     * +
635     * @see Doctrine_Expression +
636     * @param string $expr                  DQL aggregate function +
637     * @throws Doctrine_Query_Exception     if unknown aggregate function given +
638     * @return array                        parsed form of given function +
639     */ +
640    public function parseAggregateFunction($expr, $nestedCall = false) +
641    { +
642        $e    = Doctrine_Tokenizer::bracketExplode($expr, ' '); +
643        $func = $e[0]; +
644 +
645        $pos  = strpos($func, '('); +
646        if ($pos === false) { +
647            return $expr; +
648        } +
649 +
650        // get the name of the function +
651        $name   = substr($func, 0, $pos); +
652        $argStr = substr($func, ($pos + 1), -1); +
653 +
654        $args   = array(); +
655        // parse args +
656        foreach (Doctrine_Tokenizer::bracketExplode($argStr, ',') as $expr) { +
657           $args[] = $this->parseAggregateFunction($expr, true); +
658        } +
659 +
660        // convert DQL function to its RDBMS specific equivalent +
661        try { +
662            $expr = call_user_func_array(array($this->_conn->expression, $name), $args); +
663        } catch(Doctrine_Expression_Exception $e) { +
664            throw new Doctrine_Query_Exception('Unknown function ' . $func . '.'); +
665        } +
666 +
667        if ( ! $nestedCall) { +
668            // try to find all component references +
669            preg_match_all("/[a-z0-9_]+\.[a-z0-9_]+[\.[a-z0-9]+]*/i", $argStr, $m); +
670 +
671            if (isset($e[1])) { +
672                if (strtoupper($e[1]) === 'AS') { +
673                    if ( ! isset($e[2])) { +
674                        throw new Doctrine_Query_Exception('Missing aggregate function alias.'); +
675                    } +
676                    $alias = $e[2]; +
677                } else { +
678                    $alias = $e[1]; +
679                } +
680            } else { +
681                $alias = substr($expr, 0, strpos($expr, '(')); +
682            } +
683 +
684            $this->pendingAggregates[] = array($expr, $m[0], $alias); +
685        } +
686 +
687        return $expr; +
688    } +
689    /** +
690     * processPendingSubqueries +
691     * processes pending subqueries +
692     * +
693     * subqueries can only be processed when the query is fully constructed +
694     * since some subqueries may be correlated +
695     * +
696     * @return void +
697     */ +
698    public function processPendingSubqueries() +
699    { +
700        foreach ($this->pendingSubqueries as $value) { +
701            list($dql, $alias) = $value; +
702 +
703            $subquery = $this->createSubquery(); +
704 +
705            $sql = $subquery->parseQuery($dql, false)->getQuery(); +
706 +
707            reset($this->_aliasMap); +
708            $componentAlias = key($this->_aliasMap); +
709            $tableAlias = $this->getTableAlias($componentAlias); +
710 +
711            $sqlAlias = $tableAlias . '__' . count($this->aggregateMap); +
712 +
713            $this->parts['select'][] = '(' . $sql . ') AS ' . $this->_conn->quoteIdentifier($sqlAlias); +
714 +
715            $this->aggregateMap[$alias] = $sqlAlias; +
716            $this->_aliasMap[$componentAlias]['agg'][] = $alias; +
717        } +
718        $this->pendingSubqueries = array(); +
719    } +
720    /** +
721     * processPendingAggregates +
722     * processes pending aggregate values for given component alias +
723     * +
724     * @return void +
725     */ +
726    public function processPendingAggregates() +
727    { +
728        // iterate trhough all aggregates +
729        foreach ($this->pendingAggregates as $aggregate) { +
730            list ($expression, $components, $alias) = $aggregate; +
731 +
732            $tableAliases = array(); +
733 +
734            // iterate through the component references within the aggregate function +
735            if ( ! empty ($components)) { +
736                foreach ($components as $component) { +
737 +
738                    if (is_numeric($component)) { +
739                        continue; +
740                    } +
741 +
742                    $e = explode('.', $component); +
743 +
744                    $field = array_pop($e); +
745                    $componentAlias = implode('.', $e); +
746 +
747                    // check the existence of the component alias +
748                    if ( ! isset($this->_aliasMap[$componentAlias])) { +
749                        throw new Doctrine_Query_Exception('Unknown component alias ' . $componentAlias); +
750                    } +
751 +
752                    $table = $this->_aliasMap[$componentAlias]['table']; +
753 +
754                    $field = $table->getColumnName($field); +
755 +
756                    // check column existence +
757                    if ( ! $table->hasColumn($field)) { +
758                        throw new Doctrine_Query_Exception('Unknown column ' . $field); +
759                    } +
760 +
761                    $tableAlias = $this->getTableAlias($componentAlias); +
762 +
763                    $tableAliases[$tableAlias] = true; +
764 +
765                    // build sql expression +
766 +
767                    $identifier = $this->_conn->quoteIdentifier($tableAlias . '.' . $field); +
768                    $expression = str_replace($component, $identifier, $expression); +
769                } +
770            } +
771 +
772            if (count($tableAliases) !== 1) { +
773                $componentAlias = reset($this->tableAliases); +
774                $tableAlias = key($this->tableAliases); +
775            } +
776 +
777            $index    = count($this->aggregateMap); +
778            $sqlAlias = $this->_conn->quoteIdentifier($tableAlias . '__' . $index); +
779 +
780            $this->parts['select'][] = $expression . ' AS ' . $sqlAlias; +
781 +
782            $this->aggregateMap[$alias] = $sqlAlias; +
783            $this->_expressionMap[$alias][0] = $expression; +
784 +
785            $this->_aliasMap[$componentAlias]['agg'][$index] = $alias; +
786 +
787            $this->_neededTables[] = $tableAlias; +
788        } +
789        // reset the state +
790        $this->pendingAggregates = array(); +
791    } +
792    /** +
793     * getQueryBase +
794     * returns the base of the generated sql query +
795     * On mysql driver special strategy has to be used for DELETE statements +
796     * +
797     * @return string       the base of the generated sql query +
798     */ +
799    public function getQueryBase() +
800    { +
801        switch ($this->type) { +
802            case self::DELETE: +
803                $q = 'DELETE FROM '; +
804            break; +
805            case self::UPDATE: +
806                $q = 'UPDATE '; +
807            break; +
808            case self::SELECT: +
809                $distinct = ($this->parts['distinct']) ? 'DISTINCT ' : ''; +
810 +
811                $q = 'SELECT ' . $distinct . implode(', ', $this->parts['select']) . ' FROM '; +
812            break; +
813        } +
814        return $q; +
815    } +
816    /** +
817     * buildFromPart +
818     * builds the from part of the query and returns it +
819     * +
820     * @return string   the query sql from part +
821     */ +
822    public function buildFromPart() +
823    { +
824        $q = ''; +
825        foreach ($this->parts['from'] as $k => $part) { +
826            if ($k === 0) { +
827                $q .= $part; +
828                continue; +
829            } +
830            // preserve LEFT JOINs only if needed +
831 +
832            if (substr($part, 0, 9) === 'LEFT JOIN') { +
833                $e = explode(' ', $part); +
834 +
835                $aliases = array_merge($this->subqueryAliases, +
836                            array_keys($this->_neededTables)); +
837 +
838                if ( ! in_array($e[3], $aliases) && +
839                    ! in_array($e[2], $aliases) && +
840 +
841                    ! empty($this->pendingFields)) { +
842                    continue; +
843                } +
844 +
845            } +
846 +
847            if (isset($this->_pendingJoinConditions[$k])) { +
848                $parser = new Doctrine_Query_JoinCondition($this); +
849 +
850                if (strpos($part, ' ON ') !== false) { +
851                    $part .= ' AND '; +
852                } else { +
853                    $part .= ' ON '; +
854                } +
855                $part .= $parser->parse($this->_pendingJoinConditions[$k]); +
856 +
857                unset($this->_pendingJoinConditions[$k]); +
858            } +
859 +
860            $q .= ' ' . $part; +
861 +
862            $this->parts['from'][$k] = $part; +
863        } +
864        return $q; +
865    } +
866    /** +
867     * preQuery +
868     * +
869     * Empty template method to provide Query subclasses with the possibility +
870     * to hook into the query building procedure, doing any custom / specialized +
871     * query building procedures that are neccessary. +
872     * +
873     * @return void +
874     */ +
875    public function preQuery() +
876    { +
877 +
878    } +
879    /** +
880     * postQuery +
881     * +
882     * Empty template method to provide Query subclasses with the possibility +
883     * to hook into the query building procedure, doing any custom / specialized +
884     * post query procedures (for example logging) that are neccessary. +
885     * +
886     * @return void +
887     */ +
888    public function postQuery() +
889    { +
890 +
891    } +
892    /** +
893     * processQueryPart +
894     * parses given query part +
895     * +
896     * @param string $queryPartName     the name of the query part +
897     * @param array $queryParts         an array containing the query part data +
898     * @return Doctrine_Query           this object +
899     */ +
900    public function processQueryPart($queryPartName, $queryParts) +
901    { +
902        $this->removeQueryPart($queryPartName); +
903 +
904        if (is_array($queryParts) && ! empty($queryParts)) { +
905 +
906            foreach ($queryParts as $queryPart) { +
907                $parser = $this->getParser($queryPartName); +
908 +
909                $sql = $parser->parse($queryPart); +
910 +
911                if (isset($sql)) { +
912                    if ($queryPartName == 'limit' || +
913                        $queryPartName == 'offset') { +
914 +
915                        $this->setQueryPart($queryPartName, $sql); +
916                    } else { +
917                        $this->addQueryPart($queryPartName, $sql); +
918                    } +
919                } +
920            } +
921        } +
922    } +
923    /** +
924     * builds the sql query from the given parameters and applies things such as +
925     * column aggregation inheritance and limit subqueries if needed +
926     * +
927     * @param array $params             an array of prepared statement params (needed only in mysql driver +
928     *                                  when limit subquery algorithm is used) +
929     * @return string                   the built sql query +
930     */ +
931    public function getQuery($params = array()) +
932    { +
933        if ($this->_state !== self::STATE_DIRTY) { +
934           return $this->_sql; +
935        } +
936 +
937        $parts = $this->_dqlParts; +
938 +
939        // reset the state +
940        if ( ! $this->isSubquery()) { +
941            $this->_aliasMap = array(); +
942            $this->pendingAggregates = array(); +
943            $this->aggregateMap = array(); +
944        } +
945        $this->reset();    +
946 +
947        // parse the DQL parts +
948        foreach ($this->_dqlParts as $queryPartName => $queryParts) { +
949            $this->processQueryPart($queryPartName, $queryParts); +
950        } +
951        $params = $this->convertEnums($params); +
952 +
953        $this->_state = self::STATE_DIRECT; +
954 +
955        // invoke the preQuery hook +
956        $this->preQuery();         +
957        $this->_state = self::STATE_CLEAN; +
958 +
959        $this->_dqlParts = $parts; +
960 +
961        if (empty($this->parts['from'])) { +
962            return false; +
963        } +
964 +
965        $needsSubQuery = false; +
966        $subquery = ''; +
967        $map   = reset($this->_aliasMap); +
968        $table = $map['table']; +
969        $rootAlias = key($this->_aliasMap); +
970 +
971        if ( ! empty($this->parts['limit']) && $this->needsSubquery && $table->getAttribute(Doctrine::ATTR_QUERY_LIMIT) == Doctrine::LIMIT_RECORDS) { +
972            $this->isLimitSubqueryUsed = true; +
973            $needsSubQuery = true; +
974        } +
975 +
976        $sql = array(); +
977        foreach ($this->_aliasMap as $alias => $map) { +
978            $fieldSql = $this->processPendingFields($alias); +
979            if ( ! empty($fieldSql)) { +
980                $sql[] = $fieldSql; +
981            } +
982        } +
983        if ( ! empty($sql)) { +
984            array_unshift($this->parts['select'], implode(', ', $sql)); +
985        } +
986 +
987        $this->pendingFields = array(); +
988 +
989        // build the basic query +
990        $q  = $this->getQueryBase(); +
991        $q .= $this->buildFromPart(); +
992 +
993        if ( ! empty($this->parts['set'])) { +
994            $q .= ' SET ' . implode(', ', $this->parts['set']); +
995        } +
996 +
997 +
998        $string = $this->applyInheritance(); +
999 +
1000        // apply inheritance to WHERE part +
1001        if ( ! empty($string)) { +
1002            if (substr($string, 0, 1) === '(' && substr($string, -1) === ')') { +
1003                $this->parts['where'][] = $string; +
1004            } else { +
1005                $this->parts['where'][] = '(' . $string . ')'; +
1006            } +
1007        } +
1008 +
1009 +
1010        $modifyLimit = true; +
1011        if ( ! empty($this->parts['limit']) || ! empty($this->parts['offset'])) { +
1012 +
1013            if ($needsSubQuery) { +
1014                $subquery = $this->getLimitSubquery(); +
1015 +
1016 +
1017                switch (strtolower($this->_conn->getName())) { +
1018                    case 'mysql': +
1019                        // mysql doesn't support LIMIT in subqueries +
1020                        $list     = $this->_conn->execute($subquery, $params)->fetchAll(Doctrine::FETCH_COLUMN); +
1021                        $subquery = implode(', ', array_map(array($this->_conn, 'quote'), $list)); +
1022                        break; +
1023                    case 'pgsql': +
1024                        // pgsql needs special nested LIMIT subquery +
1025                        $subquery = 'SELECT doctrine_subquery_alias.' . $table->getIdentifier(). ' FROM (' . $subquery . ') AS doctrine_subquery_alias'; +
1026                        break; +
1027                } +
1028 +
1029                $field = $this->getTableAlias($rootAlias) . '.' . $table->getIdentifier(); +
1030 +
1031                // only append the subquery if it actually contains something +
1032                if ($subquery !== '') { +
1033                    array_unshift($this->parts['where'], $this->_conn->quoteIdentifier($field) . ' IN (' . $subquery . ')'); +
1034                } +
1035 +
1036                $modifyLimit = false; +
1037            } +
1038        } +
1039 +
1040        $q .= ( ! empty($this->parts['where']))?   ' WHERE '    . implode(' AND ', $this->parts['where']) : ''; +
1041        $q .= ( ! empty($this->parts['groupby']))? ' GROUP BY ' . implode(', ', $this->parts['groupby'])  : ''; +
1042        $q .= ( ! empty($this->parts['having']))?  ' HAVING '   . implode(' AND ', $this->parts['having']): ''; +
1043        $q .= ( ! empty($this->parts['orderby']))? ' ORDER BY ' . implode(', ', $this->parts['orderby'])  : ''; +
1044 +
1045        if ($modifyLimit) { +
1046 +
1047            $q = $this->_conn->modifyLimitQuery($q, $this->parts['limit'], $this->parts['offset']); +
1048        } +
1049 +
1050        // return to the previous state +
1051        if ( ! empty($string)) { +
1052            array_pop($this->parts['where']); +
1053        } +
1054        if ($needsSubQuery) { +
1055            array_shift($this->parts['where']); +
1056        } +
1057        $this->_sql = $q; +
1058 +
1059        return $q; +
1060    } +
1061    /** +
1062     * getLimitSubquery +
1063     * this is method is used by the record limit algorithm +
1064     * +
1065     * when fetching one-to-many, many-to-many associated data with LIMIT clause +
1066     * an additional subquery is needed for limiting the number of returned records instead +
1067     * of limiting the number of sql result set rows +
1068     * +
1069     * @return string       the limit subquery +
1070     */ +
1071    public function getLimitSubquery() +
1072    { +
1073        $map    = reset($this->_aliasMap); +
1074        $table  = $map['table']; +
1075        $componentAlias = key($this->_aliasMap); +
1076 +
1077        // get short alias +
1078        $alias      = $this->getTableAlias($componentAlias); +
1079        $primaryKey = $alias . '.' . $table->getIdentifier(); +
1080 +
1081        // initialize the base of the subquery +
1082        $subquery   = 'SELECT DISTINCT ' . $this->_conn->quoteIdentifier($primaryKey); +
1083 +
1084        $driverName = $this->_conn->getAttribute(Doctrine::ATTR_DRIVER_NAME); +
1085 +
1086 +
1087        // pgsql needs the order by fields to be preserved in select clause +
1088        if ($driverName == 'pgsql') { +
1089            foreach ($this->parts['orderby'] as $part) { +
1090                $part = trim($part); +
1091                $e = Doctrine_Tokenizer::bracketExplode($part, ' '); +
1092                $part = trim($e[0]); +
1093 +
1094                if (strpos($part, '.') === false) { +
1095                    continue; +
1096                } +
1097 +
1098                // don't add functions +
1099                if (strpos($part, '(') !== false) { +
1100                    continue; +
1101                } +
1102 +
1103                // don't add primarykey column (its already in the select clause) +
1104                if ($part !== $primaryKey) { +
1105                    $subquery .= ', ' . $part; +
1106                } +
1107            } +
1108        } +
1109 +
1110        if ($driverName == 'mysql' || $driverName == 'pgsql') { +
1111            foreach ($this->_expressionMap as $dqlAlias => $expr) { +
1112                if (isset($expr[1])) { +
1113                    $subquery .= ', ' . $expr[0] . ' AS ' . $this->aggregateMap[$dqlAlias]; +
1114                } +
1115            } +
1116        } +
1117 +
1118 +
1119        $subquery .= ' FROM'; +
1120 +
1121 +
1122        foreach ($this->parts['from'] as $part) { +
1123            // preserve LEFT JOINs only if needed +
1124            if (substr($part, 0, 9) === 'LEFT JOIN') { +
1125                $e = explode(' ', $part); +
1126 +
1127                if (empty($this->parts['orderby']) && empty($this->parts['where'])) { +
1128                    continue; +
1129                } +
1130            } +
1131 +
1132            $subquery .= ' ' . $part; +
1133        } +
1134 +
1135        // all conditions must be preserved in subquery +
1136        $subquery .= ( ! empty($this->parts['where']))?   ' WHERE '    . implode(' AND ', $this->parts['where'])  : ''; +
1137        $subquery .= ( ! empty($this->parts['groupby']))? ' GROUP BY ' . implode(', ', $this->parts['groupby'])   : ''; +
1138        $subquery .= ( ! empty($this->parts['having']))?  ' HAVING '   . implode(' AND ', $this->parts['having']) : ''; +
1139 +
1140        $subquery .= ( ! empty($this->parts['orderby']))? ' ORDER BY ' . implode(', ', $this->parts['orderby'])   : ''; +
1141 +
1142        // add driver specific limit clause +
1143        $subquery = $this->_conn->modifyLimitQuery($subquery, $this->parts['limit'], $this->parts['offset']); +
1144 +
1145        $parts = Doctrine_Tokenizer::quoteExplode($subquery, ' ', "'", "'"); +
1146 +
1147        foreach ($parts as $k => $part) { +
1148            if (strpos($part, ' ') !== false) { +
1149                continue; +
1150            } +
1151 +
1152            $part = trim($part, "\"'`"); +
1153 +
1154            if ($this->hasTableAlias($part)) { +
1155                $parts[$k] = $this->_conn->quoteIdentifier($this->generateNewTableAlias($part)); +
1156                continue; +
1157            } +
1158 +
1159            if (strpos($part, '.') === false) { +
1160                continue; +
1161            } +
1162            preg_match_all("/[a-zA-Z0-9_]+\.[a-z0-9_]+/i", $part, $m); +
1163 +
1164            foreach ($m[0] as $match) { +
1165                $e = explode('.', $match); +
1166                $e[0] = $this->generateNewTableAlias($e[0]); +
1167 +
1168                $parts[$k] = str_replace($match, implode('.', $e), $parts[$k]); +
1169            } +
1170        } +
1171 +
1172        if ($driverName == 'mysql' || $driverName == 'pgsql') { +
1173            foreach ($parts as $k => $part) { +
1174                if (strpos($part, "'") !== false) { +
1175                    continue; +
1176                } +
1177                if (strpos($part, '__') == false) { +
1178                    continue; +
1179                } +
1180 +
1181                preg_match_all("/[a-zA-Z0-9_]+\_\_[a-z0-9_]+/i", $part, $m); +
1182 +
1183                foreach ($m[0] as $match) { +
1184                    $e = explode('__', $match); +
1185                    $e[0] = $this->generateNewTableAlias($e[0]); +
1186 +
1187                    $parts[$k] = str_replace($match, implode('__', $e), $parts[$k]); +
1188                } +
1189            } +
1190        } +
1191 +
1192        $subquery = implode(' ', $parts); +
1193        return $subquery; +
1194    } +
1195    /** +
1196     * tokenizeQuery +
1197     * splits the given dql query into an array where keys +
1198     * represent different query part names and values are +
1199     * arrays splitted using sqlExplode method +
1200     * +
1201     * example: +
1202     * +
1203     * parameter: +
1204     *      $query = "SELECT u.* FROM User u WHERE u.name LIKE ?" +
1205     * returns: +
1206     *      array('select' => array('u.*'), +
1207     *            'from'   => array('User', 'u'), +
1208     *            'where'  => array('u.name', 'LIKE', '?')) +
1209     * +
1210     * @param string $query                 DQL query +
1211     * @throws Doctrine_Query_Exception     if some generic parsing error occurs +
1212     * @return array                        an array containing the query string parts +
1213     */ +
1214    public function tokenizeQuery($query) +
1215    { +
1216        $e = Doctrine_Tokenizer::sqlExplode($query, ' '); +
1217 +
1218        foreach ($e as $k=>$part) { +
1219            $part = trim($part); +
1220            switch (strtolower($part)) { +
1221                case 'delete': +
1222                case 'update': +
1223                case 'select': +
1224                case 'set': +
1225                case 'from': +
1226                case 'where': +
1227                case 'limit': +
1228                case 'offset': +
1229                case 'having': +
1230                    $p = $part; +
1231                    $parts[$part] = array(); +
1232                break; +
1233                case 'order': +
1234                case 'group': +
1235                    $i = ($k + 1); +
1236                    if (isset($e[$i]) && strtolower($e[$i]) === 'by') { +
1237                        $p = $part; +
1238                        $parts[$part] = array(); +
1239                    } else { +
1240                        $parts[$p][] = $part; +
1241                    } +
1242                break; +
1243                case 'by': +
1244                    continue; +
1245                default: +
1246                    if ( ! isset($p)) { +
1247                        throw new Doctrine_Query_Exception("Couldn't parse query."); +
1248                    } +
1249 +
1250                    $parts[$p][] = $part; +
1251            } +
1252        } +
1253        return $parts; +
1254    } +
1255    /** +
1256     * DQL PARSER +
1257     * parses a DQL query +
1258     * first splits the query in parts and then uses individual +
1259     * parsers for each part +
1260     * +
1261     * @param string $query                 DQL query +
1262     * @param boolean $clear                whether or not to clear the aliases +
1263     * @throws Doctrine_Query_Exception     if some generic parsing error occurs +
1264     * @return Doctrine_Query +
1265     */ +
1266    public function parseQuery($query, $clear = true) +
1267    { +
1268        if ($clear) { +
1269            $this->clear(); +
1270        } +
1271 +
1272        $query = trim($query); +
1273        $query = str_replace("\n", ' ', $query); +
1274        $query = str_replace("\r", ' ', $query); +
1275 +
1276        $parts = $this->tokenizeQuery($query); +
1277 +
1278        foreach($parts as $k => $part) { +
1279            $part = implode(' ', $part); +
1280            $k = strtolower($k); +
1281            switch ($k) { +
1282                case 'create': +
1283                    $this->type = self::CREATE; +
1284                break; +
1285                case 'insert': +
1286                    $this->type = self::INSERT; +
1287                break; +
1288                case 'delete': +
1289                    $this->type = self::DELETE; +
1290                break; +
1291                case 'select': +
1292                    $this->type = self::SELECT; +
1293                    $this->parseQueryPart($k, $part); +
1294                break; +
1295                case 'update': +
1296                    $this->type = self::UPDATE; +
1297                    $k = 'from'; +
1298                case 'from': +
1299                    $this->parseQueryPart($k, $part); +
1300                break; +
1301                case 'set': +
1302                    $this->parseQueryPart($k, $part, true); +
1303                break; +
1304                case 'group': +
1305                case 'order': +
1306                    $k .= 'by'; +
1307                case 'where': +
1308                case 'having': +
1309                case 'limit': +
1310                case 'offset': +
1311                    $this->parseQueryPart($k, $part); +
1312                break; +
1313            } +
1314        } +
1315 +
1316        return $this; +
1317    } +
1318 +
1319    public function load($path, $loadFields = true)  +
1320    { +
1321        $e = Doctrine_Tokenizer::quoteExplode($path, ' INDEXBY '); +
1322 +
1323        $mapWith = null; +
1324        if (count($e) > 1) { +
1325            $mapWith = trim($e[1]); +
1326 +
1327            $path = $e[0]; +
1328        } +
1329 +
1330        // parse custom join conditions +
1331        $e = explode(' ON ', $path); +
1332 +
1333        $joinCondition = ''; +
1334 +
1335        if (count($e) > 1) { +
1336            $joinCondition = $e[1]; +
1337            $overrideJoin = true; +
1338            $path = $e[0]; +
1339        } else { +
1340            $e = explode(' WITH ', $path); +
1341 +
1342            if (count($e) > 1) { +
1343                $joinCondition = $e[1]; +
1344                $path = $e[0]; +
1345            } +
1346            $overrideJoin = false; +
1347        } +
1348 +
1349        $tmp            = explode(' ', $path); +
1350        $componentAlias = $originalAlias = (count($tmp) > 1) ? end($tmp) : null; +
1351 +
1352        $e = preg_split("/[.:]/", $tmp[0], -1); +
1353 +
1354        $fullPath = $tmp[0]; +
1355        $prevPath = ''; +
1356        $fullLength = strlen($fullPath); +
1357 +
1358        if (isset($this->_aliasMap[$e[0]])) { +
1359            $table = $this->_aliasMap[$e[0]]['table']; +
1360            $componentAlias = $e[0]; +
1361 +
1362            $prevPath = $parent = array_shift($e); +
1363        } +
1364 +
1365        foreach ($e as $key => $name) { +
1366            // get length of the previous path +
1367            $length = strlen($prevPath); +
1368 +
1369            // build the current component path +
1370            $prevPath = ($prevPath) ? $prevPath . '.' . $name : $name; +
1371 +
1372            $delimeter = substr($fullPath, $length, 1); +
1373 +
1374            // if an alias is not given use the current path as an alias identifier +
1375            if (strlen($prevPath) === $fullLength && isset($originalAlias)) { +
1376                $componentAlias = $originalAlias; +
1377            } else { +
1378                $componentAlias = $prevPath; +
1379            } +
1380 +
1381            // if the current alias already exists, skip it +
1382            if (isset($this->_aliasMap[$componentAlias])) { +
1383                continue; +
1384            } +
1385 +
1386            if ( ! isset($table)) { +
1387                // process the root of the path +
1388 +
1389                $table = $this->loadRoot($name, $componentAlias); +
1390            } else { +
1391                $join = ($delimeter == ':') ? 'INNER JOIN ' : 'LEFT JOIN '; +
1392 +
1393                $relation = $table->getRelation($name); +
1394                $localTable = $table; +
1395 +
1396                $table    = $relation->getTable(); +
1397                $this->_aliasMap[$componentAlias] = array('table'    => $table, +
1398                                                          'parent'   => $parent, +
1399                                                          'relation' => $relation, +
1400                                                          'map'      => null); +
1401                if ( ! $relation->isOneToOne()) { +
1402                   $this->needsSubquery = true; +
1403                } +
1404 +
1405                $localAlias   = $this->getTableAlias($parent, $table->getTableName()); +
1406                $foreignAlias = $this->getTableAlias($componentAlias, $relation->getTable()->getTableName()); +
1407                $localSql     = $this->_conn->quoteIdentifier($table->getTableName()) +
1408                              . ' ' +
1409                              . $this->_conn->quoteIdentifier($localAlias); +
1410 +
1411                $foreignSql   = $this->_conn->quoteIdentifier($relation->getTable()->getTableName()) +
1412                              . ' ' +
1413                              . $this->_conn->quoteIdentifier($foreignAlias); +
1414 +
1415                $map = $relation->getTable()->inheritanceMap; +
1416 +
1417                if ( ! $loadFields || ! empty($map) || $joinCondition) { +
1418                    $this->subqueryAliases[] = $foreignAlias; +
1419                } +
1420 +
1421                if ($relation instanceof Doctrine_Relation_Association) { +
1422                    $asf = $relation->getAssociationTable(); +
1423 +
1424                    $assocTableName = $asf->getTableName(); +
1425 +
1426                    if ( ! $loadFields || ! empty($map) || $joinCondition) { +
1427                        $this->subqueryAliases[] = $assocTableName; +
1428                    } +
1429 +
1430                    $assocPath = $prevPath . '.' . $asf->getComponentName(); +
1431 +
1432                    $this->_aliasMap[$assocPath] = array('parent' => $prevPath, 'relation' => $relation, 'table' => $asf); +
1433 +
1434                    $assocAlias = $this->getTableAlias($assocPath, $asf->getTableName()); +
1435 +
1436                    $queryPart = $join . $assocTableName . ' ' . $assocAlias; +
1437 +
1438                    $queryPart .= ' ON ' . $localAlias +
1439                                . '.' +
1440                                . $localTable->getIdentifier() +
1441                                . ' = ' +
1442                                . $assocAlias . '.' . $relation->getLocal(); +
1443 +
1444                    if ($relation->isEqual()) { +
1445                        // equal nest relation needs additional condition +
1446                        $queryPart .= ' OR ' . $localAlias +
1447                                    . '.' +
1448                                    . $table->getColumnName($table->getIdentifier()) +
1449                                    . ' = ' +
1450                                    . $assocAlias . '.' . $relation->getForeign(); +
1451                    } +
1452 +
1453                    $this->parts['from'][] = $queryPart; +
1454 +
1455                    $queryPart = $join . $foreignSql; +
1456 +
1457                    if ( ! $overrideJoin) { +
1458                        $queryPart .= ' ON '; +
1459 +
1460                        if ($relation->isEqual()) { +
1461                            $queryPart .= '('; +
1462                        } +
1463 +
1464                        $queryPart .= $this->_conn->quoteIdentifier($foreignAlias . '.' . $relation->getTable()->getIdentifier()) +
1465                                    . ' = ' +
1466                                    . $this->_conn->quoteIdentifier($assocAlias . '.' . $relation->getForeign()); +
1467 +
1468                        if ($relation->isEqual()) { +
1469                            $queryPart .= ' OR ' +
1470                                        . $this->_conn->quoteIdentifier($foreignAlias . '.' . $table->getColumnName($table->getIdentifier())) +
1471                                        . ' = '  +
1472                                        . $this->_conn->quoteIdentifier($assocAlias . '.' . $relation->getLocal()) +
1473                                        . ') AND '  +
1474                                        . $this->_conn->quoteIdentifier($foreignAlias . '.' . $table->getIdentifier()) +
1475                                        . ' != '   +
1476                                        . $this->_conn->quoteIdentifier($localAlias . '.' . $table->getIdentifier()); +
1477                        } +
1478                    } +
1479                } else { +
1480 +
1481                    $queryPart = $join . $foreignSql; +
1482 +
1483                    if ( ! $overrideJoin) { +
1484                        $queryPart .= ' ON ' +
1485                                   . $this->_conn->quoteIdentifier($localAlias . '.' . $relation->getLocal()) +
1486                                   . ' = '  +
1487                                   . $this->_conn->quoteIdentifier($foreignAlias . '.' . $relation->getForeign()); +
1488                    } +
1489 +
1490                } +
1491                $this->parts['from'][$componentAlias] = $queryPart; +
1492                if ( ! empty($joinCondition)) { +
1493                    $this->_pendingJoinConditions[$componentAlias] = $joinCondition; +
1494                } +
1495            } +
1496            if ($loadFields) { +
1497 +
1498                $restoreState = false; +
1499                // load fields if necessary +
1500                if ($loadFields && empty($this->_dqlParts['select'])) { +
1501                    $this->pendingFields[$componentAlias] = array('*'); +
1502                } +
1503            } +
1504            $parent = $prevPath; +
1505        } +
1506         +
1507        $table = $this->_aliasMap[$componentAlias]['table']; +
1508 +
1509        $indexBy = null; +
1510 +
1511        if (isset($mapWith)) { +
1512            $e = explode('.', $mapWith); +
1513 +
1514            if (isset($e[1])) { +
1515                $indexBy = $e[1]; +
1516            } +
1517        } elseif ($table->getBoundQueryPart('indexBy') !== null) { +
1518            $indexBy = $table->getBoundQueryPart('indexBy'); +
1519        } +
1520 +
1521        if ($indexBy !== null) { +
1522            if ( ! $table->hasColumn($indexBy)) { +
1523                throw new Doctrine_Query_Exception("Couldn't use key mapping. Column " . $indexBy . " does not exist."); +
1524            } +
1525     +
1526            $this->_aliasMap[$componentAlias]['map'] = $table->getColumnName($indexBy); +
1527        } +
1528        return $this->_aliasMap[$componentAlias]; +
1529    } +
1530 +
1531    /** +
1532     * loadRoot +
1533     * +
1534     * @param string $name +
1535     * @param string $componentAlias +
1536     */ +
1537    public function loadRoot($name, $componentAlias) +
1538    { +
1539        // get the connection for the component +
1540        $this->_conn = Doctrine_Manager::getInstance() +
1541                      ->getConnectionForComponent($name); +
1542 +
1543        $table = $this->_conn->getTable($name); +
1544        $tableName = $table->getTableName(); +
1545 +
1546        // get the short alias for this table +
1547        $tableAlias = $this->getTableAlias($componentAlias, $tableName); +
1548        // quote table name +
1549        $queryPart = $this->_conn->quoteIdentifier($tableName); +
1550 +
1551        if ($this->type === self::SELECT) { +
1552            $queryPart .= ' ' . $this->_conn->quoteIdentifier($tableAlias); +
1553        } +
1554 +
1555        $this->parts['from'][] = $queryPart; +
1556        $this->tableAliases[$tableAlias]  = $componentAlias; +
1557        $this->_aliasMap[$componentAlias] = array('table' => $table, 'map' => null); +
1558 +
1559        return $table; +
1560    } +
1561    /** +
1562     * count +
1563     * fetches the count of the query +
1564     * +
1565     * This method executes the main query without all the +
1566     * selected fields, ORDER BY part, LIMIT part and OFFSET part. +
1567     * +
1568     * Example: +
1569     * Main query:  +
1570     *      SELECT u.*, p.phonenumber FROM User u +
1571     *          LEFT JOIN u.Phonenumber p  +
1572     *          WHERE p.phonenumber = '123 123' LIMIT 10 +
1573     * +
1574     * The modified DQL query: +
1575     *      SELECT COUNT(DISTINCT u.id) FROM User u +
1576     *          LEFT JOIN u.Phonenumber p +
1577     *          WHERE p.phonenumber = '123 123' +
1578     * +
1579     * @param array $params        an array of prepared statement parameters +
1580     * @return integer             the count of this query +
1581     */ +
1582    public function count($params = array()) +
1583    { +
1584        $this->getQuery(); +
1585 +
1586        // initialize temporary variables +
1587        $where  = $this->parts['where']; +
1588        $having = $this->parts['having']; +
1589        $groupby = $this->parts['groupby']; +
1590        $map    = reset($this->_aliasMap); +
1591        $componentAlias = key($this->_aliasMap); +
1592        $table = $map['table']; +
1593 +
1594        // build the query base +
1595        $q  = 'SELECT COUNT(DISTINCT ' . $this->getTableAlias($componentAlias) +
1596              . '.' . implode(',', (array) $table->getIdentifier()) +
1597              . ') AS num_results'; +
1598 +
1599        foreach ($this->parts['select'] as $field) { +
1600            if (strpos($field, '(') !== false) { +
1601                $q .= ', ' . $field; +
1602            } +
1603        } +
1604 +
1605        $q .= ' FROM ' . $this->buildFromPart(); +
1606 +
1607        // append column aggregation inheritance (if needed) +
1608        $string = $this->applyInheritance(); +
1609 +
1610        if ( ! empty($string)) { +
1611            $where[] = $string; +
1612        } +
1613        // append conditions +
1614        $q .= ( ! empty($where)) ?  ' WHERE '  . implode(' AND ', $where) : ''; +
1615        $q .= ( ! empty($groupby)) ?  ' GROUP BY '  . implode(', ', $groupby) : ''; +
1616        $q .= ( ! empty($having)) ? ' HAVING ' . implode(' AND ', $having): ''; +
1617 +
1618        if ( ! is_array($params)) { +
1619            $params = array($params); +
1620        } +
1621        // append parameters +
1622        $params = array_merge($this->_params['where'], $this->_params['having'], $params); +
1623 +
1624        $results = $this->getConnection()->fetchAll($q, $params); +
1625 +
1626        if (count($results) > 1) { +
1627            $count = 0; +
1628            foreach ($results as $result) { +
1629                $count += $result['num_results']; +
1630            } +
1631        } else { +
1632            $count = isset($results[0]) ? $results[0]['num_results']:0; +
1633        } +
1634 +
1635        return (int) $count; +
1636    } +
1637 +
1638    /** +
1639     * query +
1640     * query the database with DQL (Doctrine Query Language) +
1641     * +
1642     * @param string $query      DQL query +
1643     * @param array $params      prepared statement parameters +
1644     * @param int $hydrationMode Doctrine::FETCH_ARRAY or Doctrine::FETCH_RECORD +
1645     * @see Doctrine::FETCH_* constants +
1646     * @return mixed +
1647     */ +
1648    public function query($query, $params = array(), $hydrationMode = null) +
1649    { +
1650        $this->parseQuery($query); +
1651 +
1652        return $this->execute($params, $hydrationMode); +
1653    } +
1654 +
1655    /** +
1656     * Copies a Doctrine_Query object. +
1657     * +
1658     * @param Doctrine_Query   Doctrine query instance. +
1659     *                         If ommited the instance itself will be used as source. +
1660     * @return Doctrine_Query  Copy of the Doctrine_Query instance. +
1661     */ +
1662    public function copy(Doctrine_Query $query = null) +
1663    { +
1664        if ( ! $query) { +
1665            $query = $this; +
1666        } +
1667 +
1668        $new = new Doctrine_Query(); +
1669        $new->_dqlParts = $query->_dqlParts; +
1670        $new->_params = $query->_params; +
1671        $new->_hydrationMode = $query->_hydrationMode; +
1672 +
1673        return $new; +
1674    } +
1675 +
1676    /** +
1677     * Frees the resources used by the query object. It especially breaks a  +
1678     * cyclic reference between the query object and it's parsers. This enables +
1679     * PHP's current GC to reclaim the memory. +
1680     * This method can therefore be used to reduce memory usage when creating a lot +
1681     * of query objects during a request. +
1682     * +
1683     * @return Doctrine_Query   this object +
1684     */ +
1685    public function free() +
1686    { +
1687        $this->reset(); +
1688        $this->_parsers = array(); +
1689        $this->_dqlParts = array(); +
1690        $this->_enumParams = array(); +
1691    } +
1692} +
\ No newline at end of file diff --git a/tests/coverage/Doctrine_Query_Abstract.html b/tests/coverage/Doctrine_Query_Abstract.html new file mode 100644 index 000000000..843417f05 --- /dev/null +++ b/tests/coverage/Doctrine_Query_Abstract.html @@ -0,0 +1,1082 @@ + + + Coverage for Doctrine_Query_Abstract + + +

Coverage for Doctrine_Query_Abstract

Back to coverage report

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
1<?php +
2/* +
3 *  $Id: Query.php 1393 2007-05-19 17:49:16Z zYne $ +
4 * +
5 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +
6 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +
7 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +
8 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +
9 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +
10 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +
11 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +
12 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +
13 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +
14 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +
15 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +
16 * +
17 * This software consists of voluntary contributions made by many individuals +
18 * and is licensed under the LGPL. For more information, see +
19 * <http://www.phpdoctrine.com>. +
20 */ +
21Doctrine::autoload('Doctrine_Hydrate'); +
22/** +
23 * Doctrine_Query_Abstract +
24 * +
25 * @package     Doctrine +
26 * @subpackage  Query +
27 * @license     http://www.opensource.org/licenses/lgpl-license.php LGPL +
28 * @link        www.phpdoctrine.com +
29 * @since       1.0 +
30 * @version     $Revision: 1393 $ +
31 * @author      Konsta Vesterinen <kvesteri@cc.hut.fi> +
32 */ +
33abstract class Doctrine_Query_Abstract extends Doctrine_Hydrate +
34{ +
35    /** +
36     * addSelect +
37     * adds fields to the SELECT part of the query +
38     * +
39     * @param string $select        Query SELECT part +
40     * @return Doctrine_Query +
41     */ +
42    public function addSelect($select) +
43    { +
44        return $this->parseQueryPart('select', $select, true); +
45    } +
46    /** +
47     * addFrom +
48     * adds fields to the FROM part of the query +
49     * +
50     * @param string $from        Query FROM part +
51     * @return Doctrine_Query +
52     */ +
53    public function addFrom($from) +
54    { +
55        return $this->parseQueryPart('from', $from, true); +
56    } +
57    /** +
58     * addWhere +
59     * adds conditions to the WHERE part of the query +
60     * +
61     * @param string $where         Query WHERE part +
62     * @param mixed $params         an array of parameters or a simple scalar +
63     * @return Doctrine_Query +
64     */ +
65    public function addWhere($where, $params = array()) +
66    { +
67        if (is_array($params)) { +
68            $this->_params['where'] = array_merge($this->_params['where'], $params); +
69        } else { +
70            $this->_params['where'][] = $params; +
71        } +
72        return $this->parseQueryPart('where', $where, true); +
73    } +
74    /** +
75     * whereIn +
76     * adds IN condition to the query WHERE part +
77     * +
78     * @param string $expr +
79     * @param mixed $params         an array of parameters or a simple scalar +
80     * @return Doctrine_Query +
81     */ +
82    public function whereIn($expr, $params = array()) +
83    { +
84        $params = (array) $params; +
85        $a = array(); +
86        foreach ($params as $k => $value) { +
87            if ($value instanceof Doctrine_Expression) { +
88                $value = $value->getSql(); +
89                unset($params[$k]); +
90            } else { +
91                $value = '?';           +
92            } +
93            $a[] = $value; +
94        } +
95 +
96        $this->_params['where'] = array_merge($this->_params['where'], $params); +
97 +
98        $where = $expr . ' IN (' . implode(', ', $a) . ')'; +
99 +
100        return $this->parseQueryPart('where', $where, true); +
101    } +
102    /** +
103     * addGroupBy +
104     * adds fields to the GROUP BY part of the query +
105     * +
106     * @param string $groupby       Query GROUP BY part +
107     * @return Doctrine_Query +
108     */ +
109    public function addGroupBy($groupby) +
110    { +
111        return $this->parseQueryPart('groupby', $groupby, true); +
112    } +
113    /** +
114     * addHaving +
115     * adds conditions to the HAVING part of the query +
116     * +
117     * @param string $having        Query HAVING part +
118     * @param mixed $params         an array of parameters or a simple scalar +
119     * @return Doctrine_Query +
120     */ +
121    public function addHaving($having, $params = array()) +
122    { +
123        if (is_array($params)) { +
124            $this->_params['having'] = array_merge($this->_params['having'], $params); +
125        } else { +
126            $this->_params['having'][] = $params; +
127        } +
128        return $this->parseQueryPart('having', $having, true); +
129    } +
130    /** +
131     * addOrderBy +
132     * adds fields to the ORDER BY part of the query +
133     * +
134     * @param string $orderby       Query ORDER BY part +
135     * @return Doctrine_Query +
136     */ +
137    public function addOrderBy($orderby) +
138    { +
139        return $this->parseQueryPart('orderby', $orderby, true); +
140    } +
141    /** +
142     * select +
143     * sets the SELECT part of the query +
144     * +
145     * @param string $select        Query SELECT part +
146     * @return Doctrine_Query +
147     */ +
148    public function select($select) +
149    { +
150        return $this->parseQueryPart('select', $select); +
151    } +
152    /** +
153     * distinct +
154     * Makes the query SELECT DISTINCT. +
155     * +
156     * @param bool $flag            Whether or not the SELECT is DISTINCT (default true). +
157     * @return Doctrine_Query +
158     */ +
159    public function distinct($flag = true) +
160    {    +
161        $this->parts['distinct'] = (bool) $flag; +
162 +
163        return $this; +
164    } +
165 +
166    /** +
167     * forUpdate +
168     * Makes the query SELECT FOR UPDATE. +
169     * +
170     * @param bool $flag            Whether or not the SELECT is FOR UPDATE (default true). +
171     * @return Doctrine_Query +
172     */ +
173    public function forUpdate($flag = true) +
174    { +
175        $this->parts[self::FOR_UPDATE] = (bool) $flag; +
176 +
177        return $this; +
178    } +
179    /** +
180     * delete +
181     * sets the query type to DELETE +
182     * +
183     * @return Doctrine_Query +
184     */ +
185    public function delete() +
186    { +
187        $this->type = self::DELETE; +
188 +
189        return $this; +
190    } +
191    /** +
192     * update +
193     * sets the UPDATE part of the query +
194     * +
195     * @param string $update        Query UPDATE part +
196     * @return Doctrine_Query +
197     */ +
198    public function update($update) +
199    { +
200        $this->type = self::UPDATE; +
201 +
202        return $this->parseQueryPart('from', $update); +
203    } +
204    /** +
205     * set +
206     * sets the SET part of the query +
207     * +
208     * @param string $update        Query UPDATE part +
209     * @return Doctrine_Query +
210     */ +
211    public function set($key, $value, $params = null) +
212    { +
213        if (is_array($key)) { +
214            foreach ($key as $k => $v) { +
215                $this->set($k, '?', array($v));                                +
216            } +
217            return $this; +
218        } else { +
219            if ($params !== null) { +
220                if (is_array($params)) { +
221                    $this->_params['set'] = array_merge($this->_params['set'], $params); +
222                } else { +
223                    $this->_params['set'][] = $params; +
224                } +
225            } +
226            return $this->parseQueryPart('set', $key . ' = ' . $value, true); +
227        } +
228    } +
229    /** +
230     * from +
231     * sets the FROM part of the query +
232     * +
233     * @param string $from          Query FROM part +
234     * @return Doctrine_Query +
235     */ +
236    public function from($from) +
237    { +
238        return $this->parseQueryPart('from', $from); +
239    } +
240    /** +
241     * innerJoin +
242     * appends an INNER JOIN to the FROM part of the query +
243     * +
244     * @param string $join         Query INNER JOIN +
245     * @return Doctrine_Query +
246     */ +
247    public function innerJoin($join) +
248    { +
249        return $this->parseQueryPart('from', 'INNER JOIN ' . $join, true); +
250    } +
251    /** +
252     * leftJoin +
253     * appends a LEFT JOIN to the FROM part of the query +
254     * +
255     * @param string $join         Query LEFT JOIN +
256     * @return Doctrine_Query +
257     */ +
258    public function leftJoin($join) +
259    { +
260        return $this->parseQueryPart('from', 'LEFT JOIN ' . $join, true); +
261    } +
262    /** +
263     * groupBy +
264     * sets the GROUP BY part of the query +
265     * +
266     * @param string $groupby      Query GROUP BY part +
267     * @return Doctrine_Query +
268     */ +
269    public function groupBy($groupby) +
270    { +
271        return $this->parseQueryPart('groupby', $groupby); +
272    } +
273    /** +
274     * where +
275     * sets the WHERE part of the query +
276     * +
277     * @param string $join         Query WHERE part +
278     * @param mixed $params        an array of parameters or a simple scalar +
279     * @return Doctrine_Query +
280     */ +
281    public function where($where, $params = array()) +
282    { +
283        $this->_params['where'] = array(); +
284        if (is_array($params)) { +
285            $this->_params['where'] = $params; +
286        } else { +
287            $this->_params['where'][] = $params; +
288        } +
289 +
290        return $this->parseQueryPart('where', $where); +
291    } +
292    /** +
293     * having +
294     * sets the HAVING part of the query +
295     * +
296     * @param string $having       Query HAVING part +
297     * @param mixed $params        an array of parameters or a simple scalar +
298     * @return Doctrine_Query +
299     */ +
300    public function having($having, $params = array()) +
301    { +
302        $this->_params['having'] = array(); +
303        if (is_array($params)) { +
304            $this->_params['having'] = $params; +
305        } else { +
306            $this->_params['having'][] = $params; +
307        } +
308         +
309        return $this->parseQueryPart('having', $having); +
310    } +
311    /** +
312     * orderBy +
313     * sets the ORDER BY part of the query +
314     * +
315     * @param string $orderby      Query ORDER BY part +
316     * @return Doctrine_Query +
317     */ +
318    public function orderBy($orderby) +
319    { +
320        return $this->parseQueryPart('orderby', $orderby); +
321    } +
322    /** +
323     * limit +
324     * sets the Query query limit +
325     * +
326     * @param integer $limit        limit to be used for limiting the query results +
327     * @return Doctrine_Query +
328     */ +
329    public function limit($limit) +
330    { +
331        return $this->parseQueryPart('limit', $limit); +
332    } +
333    /** +
334     * offset +
335     * sets the Query query offset +
336     * +
337     * @param integer $offset       offset to be used for paginating the query +
338     * @return Doctrine_Query +
339     */ +
340    public function offset($offset) +
341    { +
342        return $this->parseQueryPart('offset', $offset); +
343    } +
344     +
345    /** +
346     * parseQueryPart +
347     * parses given DQL query part +
348     * +
349     * @param string $queryPartName     the name of the query part +
350     * @param string $queryPart         query part to be parsed +
351     * @param boolean $append           whether or not to append the query part to its stack +
352     *                                  if false is given, this method will overwrite  +
353     *                                  the given query part stack with $queryPart +
354     * @return Doctrine_Query           this object +
355     */ +
356    abstract public function parseQueryPart($queryPartName, $queryPart, $append = false); +
357}
\ No newline at end of file diff --git a/tests/coverage/Doctrine_Query_Check.html b/tests/coverage/Doctrine_Query_Check.html new file mode 100644 index 000000000..01273f3cd --- /dev/null +++ b/tests/coverage/Doctrine_Query_Check.html @@ -0,0 +1,488 @@ + + + Coverage for Doctrine_Query_Check + + +

Coverage for Doctrine_Query_Check

Back to coverage report

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
1<?php +
2/* +
3 *  $Id: From.php 1080 2007-02-10 18:17:08Z romanb $ +
4 * +
5 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +
6 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +
7 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +
8 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +
9 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +
10 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +
11 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +
12 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +
13 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +
14 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +
15 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +
16 * +
17 * This software consists of voluntary contributions made by many individuals +
18 * and is licensed under the LGPL. For more information, see +
19 * <http://www.phpdoctrine.com>. +
20 */ +
21 +
22/** +
23 * Doctrine_Query_Check +
24 * +
25 * @package     Doctrine +
26 * @subpackage  Query +
27 * @license     http://www.opensource.org/licenses/lgpl-license.php LGPL +
28 * @link        www.phpdoctrine.com +
29 * @since       1.0 +
30 * @version     $Revision: 1080 $ +
31 * @author      Konsta Vesterinen <kvesteri@cc.hut.fi> +
32 */ +
33class Doctrine_Query_Check +
34{ +
35    /** +
36     * @var Doctrine_Table $table           Doctrine_Table object +
37     */ +
38    protected $table; +
39    /** +
40     * @var string $sql                     database specific sql CHECK constraint definition  +
41     *                                      parsed from the given dql CHECK definition +
42     */ +
43    protected $sql; +
44    /** +
45     * @param Doctrine_Table|string $table  Doctrine_Table object +
46     */ +
47    public function __construct($table) +
48    { +
49        if ( ! ($table instanceof Doctrine_Table)) { +
50            $table = Doctrine_Manager::getInstance() +
51                        ->getCurrentConnection() +
52                        ->getTable($table); +
53        } +
54        $this->table = $table; +
55    } +
56    /** +
57     * getTable +
58     * returns the table object associated with this object +
59     * +
60     * @return Doctrine_Connection +
61     */ +
62    public function getTable() +
63    { +
64        return $this->table; +
65    } +
66    /** +
67     * parse +
68     * +
69     * @param string $dql       DQL CHECK constraint definition +
70     * @return string +
71     */ +
72    public function parse($dql) +
73    { +
74        $this->sql = $this->parseClause($dql); +
75    } +
76    /** +
77     * parseClause +
78     * +
79     * @param string $alias     component alias +
80     * @param string $field     the field name +
81     * @param mixed $value      the value of the field +
82     * @return void +
83     */ +
84    public function parseClause($dql) +
85    { +
86        $parts = Doctrine_Tokenizer::sqlExplode($dql, ' AND '); +
87 +
88        if (count($parts) > 1) { +
89            $ret = array(); +
90            foreach ($parts as $part) { +
91                $ret[] = $this->parseSingle($part); +
92            } +
93 +
94            $r = implode(' AND ', $ret); +
95        } else { +
96            $parts = Doctrine_Tokenizer::quoteExplode($dql, ' OR '); +
97            if (count($parts) > 1) { +
98                $ret = array(); +
99                foreach ($parts as $part) { +
100                    $ret[] = $this->parseClause($part); +
101                } +
102 +
103                $r = implode(' OR ', $ret); +
104            } else { +
105                $ret = $this->parseSingle($dql); +
106                return $ret; +
107            } +
108        } +
109        return '(' . $r . ')'; +
110    } +
111    public function parseSingle($part) +
112    { +
113        $e = explode(' ', $part); +
114         +
115        $e[0] = $this->parseFunction($e[0]); +
116 +
117        switch ($e[1]) { +
118            case '>': +
119            case '<': +
120            case '=': +
121            case '!=': +
122            case '<>': +
123 +
124            break; +
125            default: +
126                throw new Doctrine_Query_Exception('Unknown operator ' . $e[1]); +
127        } +
128 +
129        return implode(' ', $e); +
130    } +
131    public function parseFunction($dql)  +
132    { +
133        if (($pos = strpos($dql, '(')) !== false) { +
134            $func  = substr($dql, 0, $pos); +
135            $value = substr($dql, ($pos + 1), -1); +
136             +
137            $expr  = $this->table->getConnection()->expression; +
138 +
139            if ( ! method_exists($expr, $func)) { +
140                throw new Doctrine_Query_Exception('Unknown function ' . $func); +
141            } +
142             +
143            $func  = $expr->$func($value); +
144        } +
145        return $func; +
146    } +
147    /** +
148     * getSql +
149     * +
150     * returns database specific sql CHECK constraint definition +
151     * parsed from the given dql CHECK definition +
152     * +
153     * @return string +
154     */ +
155    public function getSql() +
156    { +
157        return $this->sql; +
158    } +
159}
\ No newline at end of file diff --git a/tests/coverage/Doctrine_Query_Condition.html b/tests/coverage/Doctrine_Query_Condition.html new file mode 100644 index 000000000..c2a9cc876 --- /dev/null +++ b/tests/coverage/Doctrine_Query_Condition.html @@ -0,0 +1,347 @@ + + + Coverage for Doctrine_Query_Condition + + +

Coverage for Doctrine_Query_Condition

Back to coverage report

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
1<?php +
2/* +
3 *  $Id: Condition.php 2702 2007-10-03 21:43:22Z Jonathan.Wage $ +
4 * +
5 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +
6 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +
7 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +
8 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +
9 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +
10 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +
11 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +
12 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +
13 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +
14 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +
15 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +
16 * +
17 * This software consists of voluntary contributions made by many individuals +
18 * and is licensed under the LGPL. For more information, see +
19 * <http://www.phpdoctrine.com>. +
20 */ +
21Doctrine::autoload('Doctrine_Query_Part'); +
22/** +
23 * Doctrine_Query_Condition +
24 * +
25 * @package     Doctrine +
26 * @subpackage  Query +
27 * @license     http://www.opensource.org/licenses/lgpl-license.php LGPL +
28 * @link        www.phpdoctrine.com +
29 * @since       1.0 +
30 * @version     $Revision: 2702 $ +
31 * @author      Konsta Vesterinen <kvesteri@cc.hut.fi> +
32 */ +
33abstract class Doctrine_Query_Condition extends Doctrine_Query_Part +
34{ +
35    /** +
36     * DQL CONDITION PARSER +
37     * parses the join condition/where/having part of the query string +
38     * +
39     * @param string $str +
40     * @return string +
41     */ +
42    public function parse($str) +
43    { +
44        $tmp = trim($str); +
45 +
46        $parts = Doctrine_Tokenizer::bracketExplode($str, array(' \&\& ', ' AND '), '(', ')'); +
47 +
48        if (count($parts) > 1) { +
49            $ret = array(); +
50            foreach ($parts as $part) { +
51                $part = Doctrine_Tokenizer::bracketTrim($part, '(', ')'); +
52                $ret[] = $this->parse($part); +
53            } +
54            $r = implode(' AND ', $ret); +
55        } else { +
56 +
57            $parts = Doctrine_Tokenizer::bracketExplode($str, array(' \|\| ', ' OR '), '(', ')'); +
58            if (count($parts) > 1) { +
59                $ret = array(); +
60                foreach ($parts as $part) { +
61                    $part = Doctrine_Tokenizer::bracketTrim($part, '(', ')'); +
62                    $ret[] = $this->parse($part); +
63                } +
64                $r = implode(' OR ', $ret); +
65            } else { +
66                if (substr($parts[0],0,1) == '(' && substr($parts[0], -1) == ')') { +
67                    return $this->parse(substr($parts[0], 1, -1)); +
68                } else { +
69                    return $this->load($parts[0]); +
70                } +
71            } +
72        } +
73 +
74        return '(' . $r . ')'; +
75    } +
76 +
77 +
78 +
79    /** +
80     * parses a literal value and returns the parsed value +
81     * +
82     * boolean literals are parsed to integers +
83     * components are parsed to associated table aliases +
84     * +
85     * @param string $value         literal value to be parsed +
86     * @return string +
87     */ +
88    public function parseLiteralValue($value) +
89    { +
90        // check that value isn't a string +
91        if (strpos($value, '\'') === false) { +
92            // parse booleans +
93            $value = $this->query->getConnection() +
94                     ->dataDict->parseBoolean($value); +
95 +
96            $a = explode('.', $value); +
97 +
98            if (count($a) > 1) { +
99            // either a float or a component.. +
100 +
101                if ( ! is_numeric($a[0])) { +
102                    // a component found +
103                    $value = $this->query->getTableAlias($a[0]). '.' . $a[1]; +
104                } +
105            } +
106        } else { +
107            // string literal found +
108        } +
109 +
110        return $value; +
111    } +
112}
\ No newline at end of file diff --git a/tests/coverage/Doctrine_Query_Exception.html b/tests/coverage/Doctrine_Query_Exception.html new file mode 100644 index 000000000..5cd15a099 --- /dev/null +++ b/tests/coverage/Doctrine_Query_Exception.html @@ -0,0 +1,113 @@ + + + Coverage for Doctrine_Query_Exception + + +

Coverage for Doctrine_Query_Exception

Back to coverage report

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
1<?php +
2/* +
3 *  $Id: Exception.php 2702 2007-10-03 21:43:22Z Jonathan.Wage $ +
4 * +
5 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +
6 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +
7 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +
8 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +
9 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +
10 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +
11 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +
12 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +
13 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +
14 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +
15 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +
16 * +
17 * This software consists of voluntary contributions made by many individuals +
18 * and is licensed under the LGPL. For more information, see +
19 * <http://www.phpdoctrine.com>. +
20 */ +
21Doctrine::autoload('Doctrine_Exception'); +
22/** +
23 * Doctrine_Query_Exception +
24 * +
25 * @package     Doctrine +
26 * @subpackage  Query +
27 * @license     http://www.opensource.org/licenses/lgpl-license.php LGPL +
28 * @link        www.phpdoctrine.com +
29 * @since       1.0 +
30 * @version     $Revision: 2702 $ +
31 * @author      Konsta Vesterinen <kvesteri@cc.hut.fi> +
32 */ +
33class Doctrine_Query_Exception extends Doctrine_Exception +
34{ }
\ No newline at end of file diff --git a/tests/coverage/Doctrine_Query_From.html b/tests/coverage/Doctrine_Query_From.html new file mode 100644 index 000000000..928610da9 --- /dev/null +++ b/tests/coverage/Doctrine_Query_From.html @@ -0,0 +1,281 @@ + + + Coverage for Doctrine_Query_From + + +

Coverage for Doctrine_Query_From

Back to coverage report

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
1<?php +
2/* +
3 *  $Id: From.php 2702 2007-10-03 21:43:22Z Jonathan.Wage $ +
4 * +
5 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +
6 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +
7 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +
8 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +
9 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +
10 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +
11 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +
12 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +
13 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +
14 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +
15 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +
16 * +
17 * This software consists of voluntary contributions made by many individuals +
18 * and is licensed under the LGPL. For more information, see +
19 * <http://www.phpdoctrine.com>. +
20 */ +
21Doctrine::autoload("Doctrine_Query_Part"); +
22/** +
23 * Doctrine_Query_From +
24 * +
25 * @package     Doctrine +
26 * @subpackage  Query +
27 * @license     http://www.opensource.org/licenses/lgpl-license.php LGPL +
28 * @link        www.phpdoctrine.com +
29 * @since       1.0 +
30 * @version     $Revision: 2702 $ +
31 * @author      Konsta Vesterinen <kvesteri@cc.hut.fi> +
32 */ +
33class Doctrine_Query_From extends Doctrine_Query_Part +
34{ +
35    /** +
36     * DQL FROM PARSER +
37     * parses the from part of the query string +
38 +
39     * @param string $str +
40     * @return void +
41     */ +
42    public function parse($str) +
43    { +
44        $str = trim($str); +
45        $parts = Doctrine_Tokenizer::bracketExplode($str, 'JOIN'); +
46 +
47        $operator = false; +
48 +
49        switch (trim($parts[0])) { +
50            case 'INNER': +
51                $operator = ':'; +
52            case 'LEFT': +
53                array_shift($parts); +
54            break; +
55        } +
56 +
57 +
58        $last = ''; +
59 +
60        foreach ($parts as $k => $part) { +
61            $part = trim($part); +
62 +
63            if (empty($part)) { +
64                continue; +
65            } +
66 +
67            $e    = explode(' ', $part); +
68 +
69            if (end($e) == 'INNER' || end($e) == 'LEFT') { +
70                $last = array_pop($e); +
71            } +
72            $part = implode(' ', $e); +
73 +
74            foreach (Doctrine_Tokenizer::bracketExplode($part, ',') as $reference) { +
75                $reference = trim($reference); +
76                $e = explode(' ', $reference); +
77                $e2 = explode('.', $e[0]); +
78 +
79                if ($operator) { +
80                    $e[0] = array_shift($e2) . $operator . implode('.', $e2); +
81                } +
82 +
83                $table = $this->query->load(implode(' ', $e)); +
84            } +
85 +
86            $operator = ($last == 'INNER') ? ':' : '.'; +
87        } +
88        return null; +
89    } +
90}
\ No newline at end of file diff --git a/tests/coverage/Doctrine_Query_Groupby.html b/tests/coverage/Doctrine_Query_Groupby.html new file mode 100644 index 000000000..4d667ab27 --- /dev/null +++ b/tests/coverage/Doctrine_Query_Groupby.html @@ -0,0 +1,197 @@ + + + Coverage for Doctrine_Query_Groupby + + +

Coverage for Doctrine_Query_Groupby

Back to coverage report

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
1<?php +
2/* +
3 *  $Id: Groupby.php 2702 2007-10-03 21:43:22Z Jonathan.Wage $ +
4 * +
5 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +
6 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +
7 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +
8 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +
9 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +
10 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +
11 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +
12 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +
13 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +
14 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +
15 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +
16 * +
17 * This software consists of voluntary contributions made by many individuals +
18 * and is licensed under the LGPL. For more information, see +
19 * <http://www.phpdoctrine.com>. +
20 */ +
21Doctrine::autoload('Doctrine_Query_Part'); +
22/** +
23 * Doctrine_Query_Groupby +
24 * +
25 * @package     Doctrine +
26 * @subpackage  Query +
27 * @license     http://www.opensource.org/licenses/lgpl-license.php LGPL +
28 * @link        www.phpdoctrine.com +
29 * @since       1.0 +
30 * @version     $Revision: 2702 $ +
31 * @author      Konsta Vesterinen <kvesteri@cc.hut.fi> +
32 */ +
33class Doctrine_Query_Groupby extends Doctrine_Query_Part +
34{ +
35    /** +
36     * DQL GROUP BY PARSER +
37     * parses the group by part of the query string +
38     * +
39     * @param string $str +
40     * @return void +
41     */ +
42    public function parse($str, $append = false) +
43    { +
44        $r = array(); +
45        foreach (explode(',', $str) as $reference) { +
46            $reference = trim($reference); +
47            $e     = explode('.', $reference); +
48             +
49            if (count($e) > 1) { +
50                $field = array_pop($e); +
51                $ref   = implode('.', $e); +
52                $this->query->load($ref); +
53     +
54                $r[] = $this->query->getTableAlias($ref) . '.' . $field; +
55            } else { +
56                $alias = end($e); +
57                $r[] = $this->query->getAggregateAlias($alias); +
58            } +
59        } +
60        return implode(', ', $r); +
61    } +
62}
\ No newline at end of file diff --git a/tests/coverage/Doctrine_Query_Having.html b/tests/coverage/Doctrine_Query_Having.html new file mode 100644 index 000000000..1061266e4 --- /dev/null +++ b/tests/coverage/Doctrine_Query_Having.html @@ -0,0 +1,317 @@ + + + Coverage for Doctrine_Query_Having + + +

Coverage for Doctrine_Query_Having

Back to coverage report

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
1<?php +
2/* +
3 *  $Id: Having.php 2702 2007-10-03 21:43:22Z Jonathan.Wage $ +
4 * +
5 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +
6 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +
7 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +
8 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +
9 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +
10 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +
11 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +
12 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +
13 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +
14 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +
15 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +
16 * +
17 * This software consists of voluntary contributions made by many individuals +
18 * and is licensed under the LGPL. For more information, see +
19 * <http://www.phpdoctrine.com>. +
20 */ +
21Doctrine::autoload('Doctrine_Query_Condition'); +
22/** +
23 * Doctrine_Query_Having +
24 * +
25 * @package     Doctrine +
26 * @subpackage  Query +
27 * @license     http://www.opensource.org/licenses/lgpl-license.php LGPL +
28 * @link        www.phpdoctrine.com +
29 * @since       1.0 +
30 * @version     $Revision: 2702 $ +
31 * @author      Konsta Vesterinen <kvesteri@cc.hut.fi> +
32 */ +
33class Doctrine_Query_Having extends Doctrine_Query_Condition +
34{ +
35    /** +
36     * DQL Aggregate Function parser +
37     * +
38     * @param string $func +
39     * @return mixed +
40     */ +
41    private function parseAggregateFunction($func) +
42    { +
43        $pos = strpos($func, '('); +
44 +
45        if ($pos !== false) { +
46            $funcs  = array(); +
47 +
48            $name   = substr($func, 0, $pos); +
49            $func   = substr($func, ($pos + 1), -1); +
50            $params = Doctrine_Tokenizer::bracketExplode($func, ',', '(', ')'); +
51 +
52            foreach ($params as $k => $param) { +
53                $params[$k] = $this->parseAggregateFunction($param); +
54            } +
55 +
56            $funcs = $name . '(' . implode(', ', $params) . ')'; +
57 +
58            return $funcs; +
59 +
60        } else { +
61            if ( ! is_numeric($func)) { +
62                $a = explode('.', $func); +
63 +
64                if (count($a) > 1) { +
65                    $field     = array_pop($a); +
66                    $reference = implode('.', $a); +
67                    $map       = $this->query->load($reference, false); +
68                    $field     = $map['table']->getColumnName($field); +
69                    $func      = $this->query->getTableAlias($reference) . '.' . $field; +
70                } else { +
71                    $field = end($a); +
72                    $func  = $this->query->getAggregateAlias($field); +
73                } +
74                return $func; +
75            } else { +
76                return $func; +
77            } +
78        } +
79    } +
80    /** +
81     * load +
82     * returns the parsed query part +
83     * +
84     * @param string $having +
85     * @return string +
86     */ +
87    final public function load($having) +
88    { +
89        $e = Doctrine_Tokenizer::bracketExplode($having, ' ', '(', ')'); +
90 +
91        $r = array_shift($e); +
92        $t = explode('(', $r); +
93 +
94        $count = count($t); +
95        $r = $this->parseAggregateFunction($r); +
96        $operator  = array_shift($e); +
97        $value     = implode(' ', $e); +
98        $r .= ' ' . $operator . ' ' . $value; +
99 +
100        return $r; +
101    } +
102}
\ No newline at end of file diff --git a/tests/coverage/Doctrine_Query_JoinCondition.html b/tests/coverage/Doctrine_Query_JoinCondition.html new file mode 100644 index 000000000..f389cbb20 --- /dev/null +++ b/tests/coverage/Doctrine_Query_JoinCondition.html @@ -0,0 +1,323 @@ + + + Coverage for Doctrine_Query_JoinCondition + + +

Coverage for Doctrine_Query_JoinCondition

Back to coverage report

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
1<?php +
2/* +
3 *  $Id: JoinCondition.php 2702 2007-10-03 21:43:22Z Jonathan.Wage $ +
4 * +
5 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +
6 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +
7 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +
8 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +
9 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +
10 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +
11 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +
12 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +
13 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +
14 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +
15 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +
16 * +
17 * This software consists of voluntary contributions made by many individuals +
18 * and is licensed under the LGPL. For more information, see +
19 * <http://www.phpdoctrine.com>. +
20 */ +
21Doctrine::autoload('Doctrine_Query_Part'); +
22/** +
23 * Doctrine_Query_JoinCondition +
24 * +
25 * @package     Doctrine +
26 * @subpackage  Query +
27 * @license     http://www.opensource.org/licenses/lgpl-license.php LGPL +
28 * @link        www.phpdoctrine.com +
29 * @since       1.0 +
30 * @version     $Revision: 2702 $ +
31 * @author      Konsta Vesterinen <kvesteri@cc.hut.fi> +
32 */ +
33class Doctrine_Query_JoinCondition extends Doctrine_Query_Condition  +
34{ +
35    public function load($condition)  +
36    { +
37        $condition = trim($condition); +
38 +
39        $e         = Doctrine_Tokenizer::sqlExplode($condition); +
40 +
41        if (count($e) > 2) { +
42            $a         = explode('.', $e[0]); +
43            $field     = array_pop($a); +
44            $reference = implode('.', $a); +
45            $operator  = $e[1]; +
46            $value     = $e[2]; +
47 +
48            $alias     = $this->query->getTableAlias($reference); +
49            $map       = $this->query->getAliasDeclaration($reference); +
50            $table     = $map['table']; +
51            // check if value is enumerated value +
52            $enumIndex = $table->enumIndex($field, trim($value, "'")); +
53 +
54 +
55            if (substr($value, 0, 1) == '(') { +
56                // trim brackets +
57                $trimmed   = Doctrine_Tokenizer::bracketTrim($value); +
58 +
59                if (substr($trimmed, 0, 4) == 'FROM' || substr($trimmed, 0, 6) == 'SELECT') { +
60                    // subquery found +
61                    $q = $this->query->createSubquery(); +
62                    $value = '(' . $q->parseQuery($trimmed)->getQuery() . ')'; +
63                } elseif (substr($trimmed, 0, 4) == 'SQL:') { +
64                    $value = '(' . substr($trimmed, 4) . ')'; +
65                } else { +
66                    // simple in expression found +
67                    $e     = Doctrine_Tokenizer::sqlExplode($trimmed, ','); +
68 +
69                    $value = array(); +
70                    foreach ($e as $part) { +
71                        $index   = $table->enumIndex($field, trim($part, "'")); +
72                        if ($index !== false) { +
73                            $value[] = $index; +
74                        } else { +
75                            $value[] = $this->parseLiteralValue($part); +
76                        } +
77                    } +
78                    $value = '(' . implode(', ', $value) . ')'; +
79                } +
80            } else { +
81                if ($enumIndex !== false) { +
82                    $value = $enumIndex; +
83                } else { +
84                    $value = $this->parseLiteralValue($value); +
85                } +
86            } +
87 +
88            switch ($operator) { +
89                case '<': +
90                case '>': +
91                case '=': +
92                case '!=': +
93                    if ($enumIndex !== false) { +
94                        $value  = $enumIndex; +
95                    } +
96                default: +
97                    $condition  = $alias . '.' . $field . ' ' +
98                                . $operator . ' ' . $value; +
99            } +
100 +
101        } +
102        return $condition; +
103    } +
104}
\ No newline at end of file diff --git a/tests/coverage/Doctrine_Query_Limit.html b/tests/coverage/Doctrine_Query_Limit.html new file mode 100644 index 000000000..c5997d68f --- /dev/null +++ b/tests/coverage/Doctrine_Query_Limit.html @@ -0,0 +1,128 @@ + + + Coverage for Doctrine_Query_Limit + + +

Coverage for Doctrine_Query_Limit

Back to coverage report

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
1<?php +
2/* +
3 *  $Id: Where.php 1352 2007-05-15 10:07:05Z zYne $ +
4 * +
5 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +
6 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +
7 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +
8 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +
9 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +
10 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +
11 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +
12 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +
13 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +
14 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +
15 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +
16 * +
17 * This software consists of voluntary contributions made by many individuals +
18 * and is licensed under the LGPL. For more information, see +
19 * <http://www.phpdoctrine.com>. +
20 */ +
21 +
22/** +
23 * Doctrine_Query_Limit +
24 * +
25 * @package     Doctrine +
26 * @subpackage  Query +
27 * @license     http://www.opensource.org/licenses/lgpl-license.php LGPL +
28 * @link        www.phpdoctrine.com +
29 * @since       1.0 +
30 * @version     $Revision: 1352 $ +
31 * @author      Konsta Vesterinen <kvesteri@cc.hut.fi> +
32 */ +
33class Doctrine_Query_Limit extends Doctrine_Query_Part +
34{ +
35    public function parse($limit)  +
36    { +
37        return (int) $limit; +
38    } +
39}
\ No newline at end of file diff --git a/tests/coverage/Doctrine_Query_Offset.html b/tests/coverage/Doctrine_Query_Offset.html new file mode 100644 index 000000000..a52755c91 --- /dev/null +++ b/tests/coverage/Doctrine_Query_Offset.html @@ -0,0 +1,128 @@ + + + Coverage for Doctrine_Query_Offset + + +

Coverage for Doctrine_Query_Offset

Back to coverage report

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
1<?php +
2/* +
3 *  $Id: Where.php 1352 2007-05-15 10:07:05Z zYne $ +
4 * +
5 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +
6 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +
7 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +
8 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +
9 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +
10 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +
11 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +
12 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +
13 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +
14 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +
15 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +
16 * +
17 * This software consists of voluntary contributions made by many individuals +
18 * and is licensed under the LGPL. For more information, see +
19 * <http://www.phpdoctrine.com>. +
20 */ +
21 +
22/** +
23 * Doctrine_Query_Offset +
24 * +
25 * @package     Doctrine +
26 * @subpackage  Query +
27 * @license     http://www.opensource.org/licenses/lgpl-license.php LGPL +
28 * @link        www.phpdoctrine.com +
29 * @since       1.0 +
30 * @version     $Revision: 1352 $ +
31 * @author      Konsta Vesterinen <kvesteri@cc.hut.fi> +
32 */ +
33class Doctrine_Query_Offset extends Doctrine_Query_Part +
34{ +
35    public function parse($offset) +
36    { +
37        return (int) $offset; +
38    } +
39}
\ No newline at end of file diff --git a/tests/coverage/Doctrine_Query_Orderby.html b/tests/coverage/Doctrine_Query_Orderby.html new file mode 100644 index 000000000..3dce0de05 --- /dev/null +++ b/tests/coverage/Doctrine_Query_Orderby.html @@ -0,0 +1,233 @@ + + + Coverage for Doctrine_Query_Orderby + + +

Coverage for Doctrine_Query_Orderby

Back to coverage report

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
1<?php +
2/* +
3 *  $Id: Orderby.php 2702 2007-10-03 21:43:22Z Jonathan.Wage $ +
4 * +
5 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +
6 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +
7 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +
8 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +
9 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +
10 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +
11 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +
12 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +
13 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +
14 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +
15 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +
16 * +
17 * This software consists of voluntary contributions made by many individuals +
18 * and is licensed under the LGPL. For more information, see +
19 * <http://www.phpdoctrine.com>. +
20 */ +
21Doctrine::autoload('Doctrine_Query_Part'); +
22/** +
23 * Doctrine_Query_Orderby +
24 * +
25 * @package     Doctrine +
26 * @subpackage  Query +
27 * @license     http://www.opensource.org/licenses/lgpl-license.php LGPL +
28 * @link        www.phpdoctrine.com +
29 * @since       1.0 +
30 * @version     $Revision: 2702 $ +
31 * @author      Konsta Vesterinen <kvesteri@cc.hut.fi> +
32 */ +
33class Doctrine_Query_Orderby extends Doctrine_Query_Part +
34{ +
35    /** +
36     * DQL ORDER BY PARSER +
37     * parses the order by part of the query string +
38     * +
39     * @param string $str +
40     * @return void +
41     */ +
42    public function parse($str, $append = false) +
43    { +
44        $ret = array(); +
45 +
46        foreach (explode(',', trim($str)) as $r) { +
47            $r = trim($r); +
48            $e = explode(' ', $r); +
49            $a = explode('.', $e[0]); +
50 +
51            if (count($a) > 1) { +
52                $field     = array_pop($a); +
53                $reference = implode('.', $a); +
54                $name      = end($a); +
55 +
56                $map = $this->query->load($reference, false); +
57                $tableAlias = $this->query->getTableAlias($reference); +
58 +
59                $r = $tableAlias . '.' . $field; +
60 +
61 +
62            } else { +
63                $field = $this->query->getAggregateAlias($e[0]); +
64 +
65                $r = $field; +
66            } +
67            if (isset($e[1])) { +
68                $r .= ' ' . $e[1]; +
69            } +
70            $ret[] = $r; +
71        } +
72        return $ret; +
73    } +
74}
\ No newline at end of file diff --git a/tests/coverage/Doctrine_Query_Part.html b/tests/coverage/Doctrine_Query_Part.html new file mode 100644 index 000000000..23e66e7ef --- /dev/null +++ b/tests/coverage/Doctrine_Query_Part.html @@ -0,0 +1,170 @@ + + + Coverage for Doctrine_Query_Part + + +

Coverage for Doctrine_Query_Part

Back to coverage report

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
1<?php +
2/* +
3 *  $Id: Part.php 2702 2007-10-03 21:43:22Z Jonathan.Wage $ +
4 * +
5 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +
6 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +
7 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +
8 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +
9 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +
10 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +
11 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +
12 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +
13 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +
14 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +
15 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +
16 * +
17 * This software consists of voluntary contributions made by many individuals +
18 * and is licensed under the LGPL. For more information, see +
19 * <http://www.phpdoctrine.com>. +
20 */ +
21 +
22/** +
23 * Doctrine_Query_Part +
24 * +
25 * @package     Doctrine +
26 * @subpackage  Query +
27 * @license     http://www.opensource.org/licenses/lgpl-license.php LGPL +
28 * @link        www.phpdoctrine.com +
29 * @since       1.0 +
30 * @version     $Revision: 2702 $ +
31 * @author      Konsta Vesterinen <kvesteri@cc.hut.fi> +
32 */ +
33abstract class Doctrine_Query_Part +
34{ +
35    /** +
36     * @var Doctrine_Query $query           the query object associated with this parser +
37     */ +
38    protected $query; +
39    /** +
40     * @param Doctrine_Query $query         the query object associated with this parser +
41     */ +
42    public function __construct($query) +
43    { +
44        $this->query = $query; +
45    } +
46    /** +
47     * @return Doctrine_Query $query        the query object associated with this parser +
48     */ +
49    public function getQuery() +
50    { +
51        return $this->query; +
52    } +
53}
\ No newline at end of file diff --git a/tests/coverage/Doctrine_Query_Registry.html b/tests/coverage/Doctrine_Query_Registry.html new file mode 100644 index 000000000..57eeedb40 --- /dev/null +++ b/tests/coverage/Doctrine_Query_Registry.html @@ -0,0 +1,221 @@ + + + Coverage for Doctrine_Query_Registry + + +

Coverage for Doctrine_Query_Registry

Back to coverage report

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
1<?php +
2/* +
3 *  $Id$ +
4 * +
5 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +
6 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +
7 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +
8 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +
9 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +
10 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +
11 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +
12 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +
13 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +
14 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +
15 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +
16 * +
17 * This software consists of voluntary contributions made by many individuals +
18 * and is licensed under the LGPL. For more information, see +
19 * <http://www.phpdoctrine.com>. +
20 */ +
21 +
22/** +
23 * Doctrine_Query_Registry +
24 * +
25 * @package     Doctrine +
26 * @subpackage  Query +
27 * @author      Konsta Vesterinen <kvesteri@cc.hut.fi> +
28 * @license     http://www.opensource.org/licenses/lgpl-license.php LGPL +
29 * @link        www.phpdoctrine.com +
30 * @since       1.0 +
31 * @version     $Revision$ +
32 */ +
33class Doctrine_Query_Registry +
34{ +
35    protected $_queries = array(); +
36 +
37    public function add($key, $query) +
38    { +
39     if (strpos($key, '/') === false) { +
40            $this->_queries[$key] = $query; +
41        } else { +
42            // namespace found +
43             +
44            $e = explode('/', $key); +
45 +
46            $this->_queries[$e[0]][$e[1]] = $query; +
47        } +
48    } +
49     +
50    public function get($key, $namespace = null) +
51    { +
52        if (isset($namespace)) { +
53            if ( ! isset($this->_queries[$namespace][$key])) { +
54                throw new Doctrine_Query_Registry_Exception('A query with the name ' . $namespace . '/' . $key . ' does not exist.'); +
55            } +
56            $query = $this->_queries[$namespace][$key]; +
57        } else { +
58            if ( ! isset($this->_queries[$key])) { +
59                throw new Doctrine_Query_Registry_Exception('A query with the name ' . $key . ' does not exist.'); +
60            } +
61            $query = $this->_queries[$key]; +
62        } +
63         +
64        if ( ! ($query instanceof Doctrine_Query)) { +
65            $query = Doctrine_Query::create()->parseQuery($query); +
66        } +
67         +
68        return $query; +
69    } +
70}
\ No newline at end of file diff --git a/tests/coverage/Doctrine_Query_Select.html b/tests/coverage/Doctrine_Query_Select.html new file mode 100644 index 000000000..31c84bc40 --- /dev/null +++ b/tests/coverage/Doctrine_Query_Select.html @@ -0,0 +1,128 @@ + + + Coverage for Doctrine_Query_Select + + +

Coverage for Doctrine_Query_Select

Back to coverage report

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
1<?php +
2/* +
3 *  $Id: From.php 1080 2007-02-10 18:17:08Z romanb $ +
4 * +
5 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +
6 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +
7 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +
8 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +
9 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +
10 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +
11 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +
12 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +
13 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +
14 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +
15 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +
16 * +
17 * This software consists of voluntary contributions made by many individuals +
18 * and is licensed under the LGPL. For more information, see +
19 * <http://www.phpdoctrine.com>. +
20 */ +
21Doctrine::autoload("Doctrine_Query_Part"); +
22/** +
23 * Doctrine_Query_Select +
24 * +
25 * @package     Doctrine +
26 * @subpackage  Query +
27 * @license     http://www.opensource.org/licenses/lgpl-license.php LGPL +
28 * @link        www.phpdoctrine.com +
29 * @since       1.0 +
30 * @version     $Revision: 1080 $ +
31 * @author      Konsta Vesterinen <kvesteri@cc.hut.fi> +
32 */ +
33class Doctrine_Query_Select extends Doctrine_Query_Part +
34{ +
35    public function parse($dql)  +
36    { +
37        $this->query->parseSelect($dql); +
38    } +
39}
\ No newline at end of file diff --git a/tests/coverage/Doctrine_Query_Set.html b/tests/coverage/Doctrine_Query_Set.html new file mode 100644 index 000000000..0b19d76be --- /dev/null +++ b/tests/coverage/Doctrine_Query_Set.html @@ -0,0 +1,191 @@ + + + Coverage for Doctrine_Query_Set + + +

Coverage for Doctrine_Query_Set

Back to coverage report

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
1<?php +
2/* +
3 *  $Id: Set.php 2702 2007-10-03 21:43:22Z Jonathan.Wage $ +
4 * +
5 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +
6 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +
7 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +
8 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +
9 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +
10 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +
11 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +
12 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +
13 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +
14 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +
15 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +
16 * +
17 * This software consists of voluntary contributions made by many individuals +
18 * and is licensed under the LGPL. For more information, see +
19 * <http://www.phpdoctrine.com>. +
20 */ +
21Doctrine::autoload('Doctrine_Query_Part'); +
22/** +
23 * Doctrine_Query +
24 * +
25 * @package     Doctrine +
26 * @subpackage  Query +
27 * @license     http://www.opensource.org/licenses/lgpl-license.php LGPL +
28 * @link        www.phpdoctrine.com +
29 * @since       1.0 +
30 * @version     $Revision: 2702 $ +
31 * @author      Konsta Vesterinen <kvesteri@cc.hut.fi> +
32 */ +
33class Doctrine_Query_Set extends Doctrine_Query_Part +
34{ +
35    public function parse($dql) +
36    { +
37     $terms = Doctrine_Tokenizer::sqlExplode($dql, ' '); +
38     +
39     foreach ($terms as $term) { +
40 +
41            preg_match_all("/[a-z0-9_]+\.[a-z0-9_]+[\.[a-z0-9]+]*/i", $term, $m); +
42     +
43            if (isset($m[0])) { +
44                foreach ($m[0] as $part) { +
45                    $e   = explode('.', trim($part)); +
46                    $field = array_pop($e); +
47         +
48                    $reference = implode('.', $e); +
49         +
50                    $alias = $this->query->getTableAlias($reference); +
51                    $map   = $this->query->getAliasDeclaration($reference); +
52         +
53                    $dql = str_replace($part, $map['table']->getColumnName($field), $dql); +
54                } +
55            } +
56        } +
57 +
58        return $dql; +
59    } +
60}
\ No newline at end of file diff --git a/tests/coverage/Doctrine_Query_Where.html b/tests/coverage/Doctrine_Query_Where.html new file mode 100644 index 000000000..e6737f389 --- /dev/null +++ b/tests/coverage/Doctrine_Query_Where.html @@ -0,0 +1,539 @@ + + + Coverage for Doctrine_Query_Where + + +

Coverage for Doctrine_Query_Where

Back to coverage report

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
1<?php +
2/* +
3 *  $Id: Where.php 2702 2007-10-03 21:43:22Z Jonathan.Wage $ +
4 * +
5 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +
6 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +
7 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +
8 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +
9 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +
10 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +
11 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +
12 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +
13 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +
14 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +
15 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +
16 * +
17 * This software consists of voluntary contributions made by many individuals +
18 * and is licensed under the LGPL. For more information, see +
19 * <http://www.phpdoctrine.com>. +
20 */ +
21Doctrine::autoload('Doctrine_Query_Condition'); +
22/** +
23 * Doctrine_Query_Where +
24 * +
25 * @package     Doctrine +
26 * @subpackage  Query +
27 * @license     http://www.opensource.org/licenses/lgpl-license.php LGPL +
28 * @link        www.phpdoctrine.com +
29 * @since       1.0 +
30 * @version     $Revision: 2702 $ +
31 * @author      Konsta Vesterinen <kvesteri@cc.hut.fi> +
32 */ +
33class Doctrine_Query_Where extends Doctrine_Query_Condition +
34{ +
35    public function load($where)  +
36    { +
37        $where = Doctrine_Tokenizer::bracketTrim(trim($where)); +
38        $conn  = $this->query->getConnection(); +
39        $terms = Doctrine_Tokenizer::sqlExplode($where);   +
40 +
41        if (count($terms) > 1) { +
42            if (substr($where, 0, 6) == 'EXISTS') { +
43                return $this->parseExists($where, true); +
44            } elseif (substr($where, 0, 10) == 'NOT EXISTS') { +
45                return $this->parseExists($where, false); +
46            } +
47        } +
48 +
49        if (count($terms) < 3) { +
50            $terms = Doctrine_Tokenizer::sqlExplode($where, array('=', '<', '<>', '>', '!=')); +
51        } +
52 +
53        if (count($terms) > 1) { +
54            $first = array_shift($terms); +
55            $value = array_pop($terms); +
56            $operator = trim(substr($where, strlen($first), -strlen($value))); +
57            $table = null; +
58            $field = null; +
59 +
60            if (strpos($first, "'") === false && strpos($first, '(') === false) { +
61                // normal field reference found +
62                $a = explode('.', $first); +
63         +
64                $field = array_pop($a); +
65                $reference = implode('.', $a); +
66                 +
67                if (empty($reference)) { +
68                    $map = $this->query->getRootDeclaration();   +
69                     +
70                    $alias = $this->query->getTableAlias($this->query->getRootAlias()); +
71                    $table = $map['table']; +
72                } else { +
73                    $map = $this->query->load($reference, false); +
74     +
75                    $alias = $this->query->getTableAlias($reference); +
76                    $table = $map['table']; +
77                } +
78                if ($this->query->getType() === Doctrine_Query::SELECT) { +
79                    $first = $conn->quoteIdentifier($alias) +
80                           . '.' +
81                           . $conn->quoteIdentifier($table->getColumnName($field)); +
82                } else { +
83                    $first = $conn->quoteIdentifier($table->getColumnName($field)); +
84                } +
85            } else { +
86                $first = $this->query->parseClause($first); +
87            } +
88            $sql = $first . ' ' . $operator . ' ' . $this->parseValue($value, $table, $field); +
89         +
90            return $sql;   +
91        } else { +
92 +
93        } +
94    } +
95 +
96    public function parseValue($value, Doctrine_Table $table = null, $field = null) +
97    { +
98        if (substr($value, 0, 1) == '(') { +
99            // trim brackets +
100            $trimmed   = Doctrine_Tokenizer::bracketTrim($value); +
101 +
102            if (substr($trimmed, 0, 4) == 'FROM' || +
103                substr($trimmed, 0, 6) == 'SELECT') { +
104 +
105                // subquery found +
106                $q     = new Doctrine_Query(); +
107                $value = '(' . $q->isSubquery(true)->parseQuery($trimmed)->getQuery() . ')'; +
108 +
109            } elseif (substr($trimmed, 0, 4) == 'SQL:') { +
110                $value = '(' . substr($trimmed, 4) . ')'; +
111            } else { +
112                // simple in expression found +
113                $e = Doctrine_Tokenizer::sqlExplode($trimmed, ','); +
114 +
115                $value = array(); +
116 +
117                $index = false; +
118 +
119                foreach ($e as $part) { +
120                    if (isset($table) && isset($field)) { +
121                        $index = $table->enumIndex($field, trim($part, "'")); +
122                    } +
123 +
124                    if ($index !== false) { +
125                        $value[] = $index; +
126                    } else { +
127                        $value[] = $this->parseLiteralValue($part); +
128                    } +
129                } +
130 +
131                $value = '(' . implode(', ', $value) . ')'; +
132            } +
133        } elseif (substr($value, 0, 1) == ':' || $value === '?') { +
134            // placeholder found +
135            if (isset($table) && isset($field) && $table->getTypeOf($field) == 'enum') { +
136                $this->query->addEnumParam($value, $table, $field); +
137            } else { +
138                $this->query->addEnumParam($value, null, null); +
139            } +
140        } else { +
141            $enumIndex = false; +
142            if (isset($table) && isset($field)) { +
143                // check if value is enumerated value +
144                $enumIndex = $table->enumIndex($field, trim($value, "'")); +
145            } +
146 +
147            if ($enumIndex !== false) { +
148                $value = $enumIndex; +
149            } else { +
150                $value = $this->parseLiteralValue($value); +
151            } +
152        } +
153        return $value; +
154    } +
155    /** +
156     * parses an EXISTS expression +
157     * +
158     * @param string $where         query where part to be parsed +
159     * @param boolean $negation     whether or not to use the NOT keyword +
160     * @return string +
161     */ +
162    public function parseExists($where, $negation) +
163    { +
164        $operator = ($negation) ? 'EXISTS' : 'NOT EXISTS'; +
165 +
166        $pos = strpos($where, '('); +
167 +
168        if ($pos == false) { +
169            throw new Doctrine_Query_Exception('Unknown expression, expected a subquery with () -marks'); +
170        } +
171 +
172        $sub = Doctrine_Tokenizer::bracketTrim(substr($where, $pos)); +
173 +
174        return $operator . ' (' . $this->query->createSubquery()->parseQuery($sub, false)->getQuery() . ')'; +
175    } +
176}
\ No newline at end of file diff --git a/tests/coverage/Doctrine_RawSql.html b/tests/coverage/Doctrine_RawSql.html new file mode 100644 index 000000000..2fe800cb3 --- /dev/null +++ b/tests/coverage/Doctrine_RawSql.html @@ -0,0 +1,854 @@ + + + Coverage for Doctrine_RawSql + + +

Coverage for Doctrine_RawSql

Back to coverage report

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
1<?php +
2/* +
3 *  $Id: RawSql.php 2702 2007-10-03 21:43:22Z Jonathan.Wage $ +
4 * +
5 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +
6 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +
7 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +
8 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +
9 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +
10 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +
11 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +
12 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +
13 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +
14 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +
15 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +
16 * +
17 * This software consists of voluntary contributions made by many individuals +
18 * and is licensed under the LGPL. For more information, see +
19 * <http://www.phpdoctrine.com>. +
20 */ +
21Doctrine::autoload('Doctrine_Query_Abstract'); +
22/** +
23 * Doctrine_RawSql +
24 * +
25 * @package     Doctrine +
26 * @subpackage  RawSql +
27 * @license     http://www.opensource.org/licenses/lgpl-license.php LGPL +
28 * @link        www.phpdoctrine.com +
29 * @since       1.0 +
30 * @version     $Revision: 2702 $ +
31 * @author      Konsta Vesterinen <kvesteri@cc.hut.fi> +
32 */ +
33class Doctrine_RawSql extends Doctrine_Query_Abstract +
34{ +
35    /** +
36     * @var array $fields +
37     */ +
38    private $fields = array(); +
39    /** +
40     * parseQueryPart +
41     * parses given query part +
42     * +
43     * @param string $queryPartName     the name of the query part +
44     * @param string $queryPart         query part to be parsed +
45     * @param boolean $append           whether or not to append the query part to its stack +
46     *                                  if false is given, this method will overwrite  +
47     *                                  the given query part stack with $queryPart +
48     * @return Doctrine_Query           this object +
49     */ +
50    public function parseQueryPart($queryPartName, $queryPart, $append = false)  +
51    { +
52        if ($queryPartName == 'select') { +
53            preg_match_all('/{([^}{]*)}/U', $queryPart, $m); +
54 +
55            $this->fields = $m[1]; +
56            $this->parts['select'] = array(); +
57        } else { +
58            if ( ! $append) { +
59                $this->parts[$queryPartName] = array($queryPart); +
60            } else { +
61                $this->parts[$queryPartName][] = $queryPart; +
62            } +
63        } +
64        return $this; +
65    } +
66    /** +
67     * parseQuery +
68     * parses an sql query and adds the parts to internal array +
69     * +
70     * @param string $query         query to be parsed +
71     * @return Doctrine_RawSql      this object +
72     */ +
73    public function parseQuery($query) +
74    { +
75        preg_match_all('/{([^}{]*)}/U', $query, $m); +
76 +
77        $this->fields = $m[1]; +
78        $this->clear(); +
79 +
80        $e = Doctrine_Tokenizer::sqlExplode($query,' '); +
81 +
82        foreach ($e as $k => $part) { +
83            $low = strtolower($part); +
84            switch (strtolower($part)) { +
85                case 'select': +
86                case 'from': +
87                case 'where': +
88                case 'limit': +
89                case 'offset': +
90                case 'having': +
91                    $p = $low; +
92                    if ( ! isset($parts[$low])) { +
93                        $parts[$low] = array(); +
94                    } +
95                    break; +
96                case 'order': +
97                case 'group': +
98                    $i = ($k + 1); +
99                    if (isset($e[$i]) && strtolower($e[$i]) === 'by') { +
100                        $p = $low; +
101                        $p .= 'by'; +
102                        $parts[$low . 'by'] = array(); +
103 +
104                    } else { +
105                        $parts[$p][] = $part; +
106                    } +
107                    break; +
108                case 'by': +
109                    continue; +
110                default: +
111                    if ( ! isset($parts[$p][0])) { +
112                        $parts[$p][0] = $part; +
113                    } else { +
114                        $parts[$p][0] .= ' '.$part; +
115                    } +
116            } +
117        } +
118 +
119        $this->parts = $parts; +
120        $this->parts['select'] = array(); +
121 +
122        return $this; +
123    } +
124    /** +
125     * getQuery +
126     * builds the sql query from the given query parts +
127     * +
128     * @return string       the built sql query +
129     */ +
130    public function getQuery() +
131    { +
132        $select = array(); +
133 +
134        foreach ($this->fields as $field) { +
135            $e = explode('.', $field); +
136            if ( ! isset($e[1])) { +
137                throw new Doctrine_RawSql_Exception('All selected fields in Sql query must be in format tableAlias.fieldName'); +
138            } +
139            // try to auto-add component +
140            if ( ! $this->hasTableAlias($e[0])) { +
141                try { +
142                    $this->addComponent($e[0], ucwords($e[0])); +
143                } catch(Doctrine_Exception $exception) { +
144                    throw new Doctrine_RawSql_Exception('The associated component for table alias ' . $e[0] . ' couldn\'t be found.'); +
145                } +
146            } +
147 +
148            $componentAlias = $this->getComponentAlias($e[0]); +
149             +
150            if ($e[1] == '*') { +
151                foreach ($this->_aliasMap[$componentAlias]['table']->getColumnNames() as $name) { +
152                    $field = $e[0] . '.' . $name; +
153 +
154                    $select[$componentAlias][$field] = $field . ' AS ' . $e[0] . '__' . $name; +
155                } +
156            } else { +
157                $field = $e[0] . '.' . $e[1]; +
158                $select[$componentAlias][$field] = $field . ' AS ' . $e[0] . '__' . $e[1]; +
159            } +
160        } +
161 +
162        // force-add all primary key fields +
163 +
164        foreach ($this->getTableAliases() as $tableAlias => $componentAlias) { +
165            $map = $this->_aliasMap[$componentAlias]; +
166 +
167            foreach ((array) $map['table']->getIdentifier() as $key) { +
168                $field = $tableAlias . '.' . $key; +
169 +
170                if ( ! isset($this->parts['select'][$field])) { +
171                    $select[$componentAlias][$field] = $field . ' AS ' . $tableAlias . '__' . $key; +
172                } +
173            } +
174        } +
175         +
176        // first add the fields of the root component +
177        reset($this->_aliasMap); +
178        $componentAlias = key($this->_aliasMap); +
179 +
180        $q = 'SELECT ' . implode(', ', $select[$componentAlias]); +
181        unset($select[$componentAlias]); +
182 +
183        foreach ($select as $component => $fields) { +
184            if ( ! empty($fields)) { +
185                $q .= ', ' . implode(', ', $fields); +
186            } +
187        } +
188 +
189        $string = $this->applyInheritance(); +
190        if ( ! empty($string)) { +
191            $this->parts['where'][] = $string; +
192        } +
193        $copy = $this->parts; +
194        unset($copy['select']); +
195 +
196        $q .= ( ! empty($this->parts['from']))?    ' FROM '     . implode(' ', $this->parts['from']) : ''; +
197        $q .= ( ! empty($this->parts['where']))?   ' WHERE '    . implode(' AND ', $this->parts['where']) : ''; +
198        $q .= ( ! empty($this->parts['groupby']))? ' GROUP BY ' . implode(', ', $this->parts['groupby']) : ''; +
199        $q .= ( ! empty($this->parts['having']))?  ' HAVING '   . implode(' AND ', $this->parts['having']) : ''; +
200        $q .= ( ! empty($this->parts['orderby']))? ' ORDER BY ' . implode(', ', $this->parts['orderby']) : ''; +
201        $q .= ( ! empty($this->parts['limit']))?   ' LIMIT ' . implode(' ', $this->parts['limit']) : ''; +
202        $q .= ( ! empty($this->parts['offset']))?  ' OFFSET ' . implode(' ', $this->parts['offset']) : ''; +
203 +
204        if ( ! empty($string)) { +
205            array_pop($this->parts['where']); +
206        } +
207        return $q; +
208    } +
209    /** +
210     * getFields +
211     * returns the fields associated with this parser +
212     * +
213     * @return array    all the fields associated with this parser +
214     */ +
215    public function getFields() +
216    { +
217        return $this->fields; +
218    } +
219    /** +
220     * addComponent +
221     * +
222     * @param string $tableAlias +
223     * @param string $componentName +
224     * @return Doctrine_RawSql +
225     */ +
226    public function addComponent($tableAlias, $path) +
227    { +
228        $tmp           = explode(' ', $path); +
229        $originalAlias = (count($tmp) > 1) ? end($tmp) : null; +
230 +
231        $e = explode('.', $tmp[0]); +
232 +
233        $fullPath = $tmp[0]; +
234        $fullLength = strlen($fullPath); +
235 +
236        $table = null; +
237 +
238        $currPath = ''; +
239 +
240        if (isset($this->_aliasMap[$e[0]])) { +
241            $table = $this->_aliasMap[$e[0]]['table']; +
242 +
243            $currPath = $parent = array_shift($e); +
244        } +
245 +
246        foreach ($e as $k => $component) { +
247            // get length of the previous path +
248            $length = strlen($currPath); +
249 +
250            // build the current component path +
251            $currPath = ($currPath) ? $currPath . '.' . $component : $component; +
252 +
253            $delimeter = substr($fullPath, $length, 1); +
254 +
255            // if an alias is not given use the current path as an alias identifier +
256            if (strlen($currPath) === $fullLength && isset($originalAlias)) { +
257                $componentAlias = $originalAlias; +
258            } else { +
259                $componentAlias = $currPath; +
260            } +
261            if ( ! isset($table)) { +
262                $conn = Doctrine_Manager::getInstance() +
263                        ->getConnectionForComponent($component); +
264                         +
265                $table = $conn->getTable($component); +
266                $this->_aliasMap[$componentAlias] = array('table' => $table); +
267            } else { +
268                $relation = $table->getRelation($component); +
269 +
270                $this->_aliasMap[$componentAlias] = array('table'    => $relation->getTable(), +
271                                                          'parent'   => $parent, +
272                                                          'relation' => $relation); +
273            } +
274            $this->addTableAlias($tableAlias, $componentAlias); +
275 +
276            $parent = $currPath; +
277        } +
278 +
279        return $this; +
280    } +
281}
\ No newline at end of file diff --git a/tests/coverage/Doctrine_Record.html b/tests/coverage/Doctrine_Record.html new file mode 100644 index 000000000..c0baa3dd4 --- /dev/null +++ b/tests/coverage/Doctrine_Record.html @@ -0,0 +1,4797 @@ + + + Coverage for Doctrine_Record + + +

Coverage for Doctrine_Record

Back to coverage report

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
1<?php +
2/* +
3 *  $Id: Record.php 2794 2007-10-09 20:51:42Z Jonathan.Wage $ +
4 * +
5 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +
6 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +
7 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +
8 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +
9 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +
10 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +
11 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +
12 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +
13 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +
14 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +
15 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +
16 * +
17 * This software consists of voluntary contributions made by many individuals +
18 * and is licensed under the LGPL. For more information, see +
19 * <http://www.phpdoctrine.com>. +
20 */ +
21Doctrine::autoload('Doctrine_Record_Abstract'); +
22/** +
23 * Doctrine_Record +
24 * All record classes should inherit this super class +
25 * +
26 * @package     Doctrine +
27 * @subpackage  Record +
28 * @author      Konsta Vesterinen <kvesteri@cc.hut.fi> +
29 * @license     http://www.opensource.org/licenses/lgpl-license.php LGPL +
30 * @link        www.phpdoctrine.com +
31 * @since       1.0 +
32 * @version     $Revision: 2794 $ +
33 */ +
34abstract class Doctrine_Record extends Doctrine_Record_Abstract implements Countable, IteratorAggregate, Serializable +
35{ +
36    /** +
37     * STATE CONSTANTS +
38     */ +
39 +
40    /** +
41     * DIRTY STATE +
42     * a Doctrine_Record is in dirty state when its properties are changed +
43     */ +
44    const STATE_DIRTY       = 1; +
45    /** +
46     * TDIRTY STATE +
47     * a Doctrine_Record is in transient dirty state when it is created  +
48     * and some of its fields are modified but it is NOT yet persisted into database +
49     */ +
50    const STATE_TDIRTY      = 2; +
51    /** +
52     * CLEAN STATE +
53     * a Doctrine_Record is in clean state when all of its properties are loaded from the database +
54     * and none of its properties are changed +
55     */ +
56    const STATE_CLEAN       = 3; +
57    /** +
58     * PROXY STATE +
59     * a Doctrine_Record is in proxy state when its properties are not fully loaded +
60     */ +
61    const STATE_PROXY       = 4; +
62    /** +
63     * NEW TCLEAN +
64     * a Doctrine_Record is in transient clean state when it is created and none of its fields are modified +
65     */ +
66    const STATE_TCLEAN      = 5; +
67    /** +
68     * LOCKED STATE +
69     * a Doctrine_Record is temporarily locked during deletes and saves +
70     * +
71     * This state is used internally to ensure that circular deletes +
72     * and saves will not cause infinite loops +
73     */ +
74    const STATE_LOCKED     = 6; +
75 +
76    /** +
77     * @var Doctrine_Node_<TreeImpl>        node object +
78     */ +
79    protected $_node; +
80    /** +
81     * @var integer $_id                    the primary keys of this object +
82     */ +
83    protected $_id           = array(); +
84    /** +
85     * @var array $_data                    the record data +
86     */ +
87    protected $_data         = array(); +
88    /** +
89     * @var array $_values                  the values array, aggregate values and such are mapped into this array +
90     */ +
91    protected $_values       = array(); +
92    /** +
93     * @var integer $_state                 the state of this record +
94     * @see STATE_* constants +
95     */ +
96    protected $_state; +
97    /** +
98     * @var array $_modified                an array containing properties that have been modified +
99     */ +
100    protected $_modified     = array(); +
101    /** +
102     * @var Doctrine_Validator_ErrorStack   error stack object +
103     */ +
104    protected $_errorStack; +
105    /** +
106     * @var array $_references              an array containing all the references +
107     */ +
108    protected $_references     = array(); +
109    /** +
110     * @var integer $index                  this index is used for creating object identifiers +
111     */ +
112    private static $_index = 1; +
113    /** +
114     * @var integer $oid                    object identifier, each Record object has a unique object identifier +
115     */ +
116    private $_oid; +
117 +
118    /** +
119     * constructor +
120     * @param Doctrine_Table|null $table       a Doctrine_Table object or null, +
121     *                                         if null the table object is retrieved from current connection +
122     * +
123     * @param boolean $isNewEntry              whether or not this record is transient +
124     * +
125     * @throws Doctrine_Connection_Exception   if object is created using the new operator and there are no +
126     *                                         open connections +
127     * @throws Doctrine_Record_Exception       if the cleanData operation fails somehow +
128     */ +
129    public function __construct($table = null, $isNewEntry = false) +
130    { +
131        if (isset($table) && $table instanceof Doctrine_Table) { +
132            $this->_table = $table; +
133            $exists = ( ! $isNewEntry); +
134        } else { +
135            $class  = get_class($this); +
136            // get the table of this class +
137            $this->_table = Doctrine_Manager::getInstance() +
138                            ->getTable($class); +
139            $exists = false; +
140        } +
141 +
142        // Check if the current connection has the records table in its registry +
143        // If not this record is only used for creating table definition and setting up +
144        // relations. +
145 +
146        if ($this->_table->getConnection()->hasTable($this->_table->getComponentName())) { +
147            $this->_oid = self::$_index; +
148 +
149            self::$_index++; +
150 +
151            $keys = (array) $this->_table->getIdentifier(); +
152 +
153            // get the data array +
154            $this->_data = $this->_table->getData(); +
155 +
156            // get the column count +
157            $count = count($this->_data); +
158 +
159            $this->_values = $this->cleanData($this->_data); +
160 +
161            $this->prepareIdentifiers($exists); +
162 +
163            if ( ! $exists) { +
164                if ($count > 0) { +
165                    $this->_state = Doctrine_Record::STATE_TDIRTY; +
166                } else { +
167                    $this->_state = Doctrine_Record::STATE_TCLEAN; +
168                } +
169 +
170                // set the default values for this record +
171                $this->assignDefaultValues(); +
172            } else { +
173                $this->_state      = Doctrine_Record::STATE_CLEAN; +
174 +
175                if ($count < $this->_table->getColumnCount()) { +
176                    $this->_state  = Doctrine_Record::STATE_PROXY; +
177                } +
178            } +
179 +
180            $this->_errorStack = new Doctrine_Validator_ErrorStack(get_class($this)); +
181 +
182            $repository = $this->_table->getRepository(); +
183            $repository->add($this); +
184             +
185            $this->construct(); +
186        } +
187         +
188    } +
189    /** +
190     * _index +
191     * +
192     * @return integer +
193     */ +
194    public static function _index() +
195    { +
196        return self::$_index; +
197    } +
198    /** +
199     * setUp +
200     * this method is used for setting up relations and attributes +
201     * it should be implemented by child classes +
202     * +
203     * @return void +
204     */ +
205    public function setUp() +
206    { } +
207    /** +
208     * construct +
209     * Empty template method to provide concrete Record classes with the possibility +
210     * to hook into the constructor procedure +
211     * +
212     * @return void +
213     */ +
214    public function construct() +
215    { } +
216    /** +
217     * getOid +
218     * returns the object identifier +
219     * +
220     * @return integer +
221     */ +
222    public function getOid() +
223    { +
224        return $this->_oid; +
225    } +
226    /** +
227     * isValid +
228     * +
229     * @return boolean                          whether or not this record passes all column validations +
230     */ +
231    public function isValid() +
232    { +
233        if ( ! $this->_table->getAttribute(Doctrine::ATTR_VALIDATE)) { +
234            return true; +
235        } +
236        // Clear the stack from any previous errors. +
237        $this->_errorStack->clear(); +
238 +
239        // Run validation process +
240        $validator = new Doctrine_Validator(); +
241        $validator->validateRecord($this); +
242        $this->validate(); +
243        if ($this->_state == self::STATE_TDIRTY || $this->_state == self::STATE_TCLEAN) { +
244            $this->validateOnInsert(); +
245        } else { +
246            $this->validateOnUpdate(); +
247        } +
248 +
249        return $this->_errorStack->count() == 0 ? true : false; +
250    } +
251    /** +
252     * Empty template method to provide concrete Record classes with the possibility +
253     * to hook into the validation procedure, doing any custom / specialized +
254     * validations that are neccessary. +
255     */ +
256    protected function validate() +
257    { } +
258    /** +
259     * Empty template method to provide concrete Record classes with the possibility +
260     * to hook into the validation procedure only when the record is going to be +
261     * updated. +
262     */ +
263    protected function validateOnUpdate() +
264    { } +
265    /** +
266     * Empty template method to provide concrete Record classes with the possibility +
267     * to hook into the validation procedure only when the record is going to be +
268     * inserted into the data store the first time. +
269     */ +
270    protected function validateOnInsert() +
271    { } +
272    /** +
273     * Empty template method to provide concrete Record classes with the possibility +
274     * to hook into the serializing procedure. +
275     */ +
276    public function preSerialize($event) +
277    { } +
278    /** +
279     * Empty template method to provide concrete Record classes with the possibility +
280     * to hook into the serializing procedure. +
281     */ +
282    public function postSerialize($event) +
283    { } +
284    /** +
285     * Empty template method to provide concrete Record classes with the possibility +
286     * to hook into the serializing procedure. +
287     */ +
288    public function preUnserialize($event) +
289    { } +
290    /** +
291     * Empty template method to provide concrete Record classes with the possibility +
292     * to hook into the serializing procedure. +
293     */ +
294    public function postUnserialize($event) +
295    { } +
296    /** +
297     * Empty template method to provide concrete Record classes with the possibility +
298     * to hook into the saving procedure. +
299     */ +
300    public function preSave($event) +
301    { } +
302    /** +
303     * Empty template method to provide concrete Record classes with the possibility +
304     * to hook into the saving procedure. +
305     */ +
306    public function postSave($event) +
307    { } +
308    /** +
309     * Empty template method to provide concrete Record classes with the possibility +
310     * to hook into the deletion procedure. +
311     */ +
312    public function preDelete($event) +
313    { } +
314    /** +
315     * Empty template method to provide concrete Record classes with the possibility +
316     * to hook into the deletion procedure. +
317     */ +
318    public function postDelete($event) +
319    { } +
320    /** +
321     * Empty template method to provide concrete Record classes with the possibility +
322     * to hook into the saving procedure only when the record is going to be +
323     * updated. +
324     */ +
325    public function preUpdate($event) +
326    { } +
327    /** +
328     * Empty template method to provide concrete Record classes with the possibility +
329     * to hook into the saving procedure only when the record is going to be +
330     * updated. +
331     */ +
332    public function postUpdate($event) +
333    { } +
334    /** +
335     * Empty template method to provide concrete Record classes with the possibility +
336     * to hook into the saving procedure only when the record is going to be +
337     * inserted into the data store the first time. +
338     */ +
339    public function preInsert($event) +
340    { } +
341    /** +
342     * Empty template method to provide concrete Record classes with the possibility +
343     * to hook into the saving procedure only when the record is going to be +
344     * inserted into the data store the first time. +
345     */ +
346    public function postInsert($event) +
347    { } +
348    /** +
349     * getErrorStack +
350     * +
351     * @return Doctrine_Validator_ErrorStack    returns the errorStack associated with this record +
352     */ +
353    public function getErrorStack() +
354    { +
355        return $this->_errorStack; +
356    } +
357    /** +
358     * errorStack +
359     * assigns / returns record errorStack +
360     * +
361     * @param Doctrine_Validator_ErrorStack          errorStack to be assigned for this record +
362     * @return void|Doctrine_Validator_ErrorStack    returns the errorStack associated with this record +
363     */ +
364    public function errorStack($stack = null) +
365    { +
366        if ($stack !== null) { +
367            if ( ! ($stack instanceof Doctrine_Validator_ErrorStack)) { +
368               throw new Doctrine_Record_Exception('Argument should be an instance of Doctrine_Validator_ErrorStack.'); +
369            } +
370            $this->_errorStack = $stack; +
371        } else { +
372            return $this->_errorStack; +
373        } +
374    } +
375    /** +
376     * setDefaultValues +
377     * sets the default values for records internal data +
378     * +
379     * @param boolean $overwrite                whether or not to overwrite the already set values +
380     * @return boolean +
381     */ +
382    public function assignDefaultValues($overwrite = false) +
383    { +
384        if ( ! $this->_table->hasDefaultValues()) { +
385            return false; +
386        } +
387        foreach ($this->_data as $column => $value) { +
388            $default = $this->_table->getDefaultValueOf($column); +
389 +
390            if ($default === null) { +
391                $default = self::$_null; +
392            } +
393 +
394            if ($value === self::$_null || $overwrite) { +
395                $this->_data[$column] = $default; +
396                $this->_modified[]    = $column; +
397                $this->_state = Doctrine_Record::STATE_TDIRTY; +
398            } +
399        } +
400    } +
401    /** +
402     * cleanData +
403     * +
404     * @param array $data       data array to be cleaned +
405     * @return integer +
406     */ +
407    public function cleanData(&$data) +
408    { +
409        $tmp = $data; +
410        $data = array(); +
411 +
412        foreach ($this->getTable()->getColumnNames() as $name) { +
413            if ( ! isset($tmp[$name])) { +
414                $data[$name] = self::$_null; +
415            } else { +
416                $data[$name] = $tmp[$name]; +
417            } +
418            unset($tmp[$name]); +
419        } +
420 +
421        return $tmp; +
422    } +
423    /** +
424     * hydrate +
425     * hydrates this object from given array +
426     * +
427     * @param array $data +
428     * @return boolean +
429     */ +
430    public function hydrate(array $data) +
431    { +
432        $this->_values = $this->cleanData($data); +
433        $this->_data   = array_merge($this->_data, $data); +
434 +
435        $this->prepareIdentifiers(true); +
436    } +
437    /** +
438     * prepareIdentifiers +
439     * prepares identifiers for later use +
440     * +
441     * @param boolean $exists               whether or not this record exists in persistent data store +
442     * @return void +
443     */ +
444    private function prepareIdentifiers($exists = true) +
445    { +
446        switch ($this->_table->getIdentifierType()) { +
447            case Doctrine::IDENTIFIER_AUTOINC: +
448            case Doctrine::IDENTIFIER_SEQUENCE: +
449            case Doctrine::IDENTIFIER_NATURAL: +
450                $name = $this->_table->getIdentifier(); +
451 +
452                if ($exists) { +
453                    if (isset($this->_data[$name]) && $this->_data[$name] !== self::$_null) { +
454                        $this->_id[$name] = $this->_data[$name]; +
455                    } +
456                } +
457                break; +
458            case Doctrine::IDENTIFIER_COMPOSITE: +
459                $names = $this->_table->getIdentifier(); +
460 +
461                foreach ($names as $name) { +
462                    if ($this->_data[$name] === self::$_null) { +
463                        $this->_id[$name] = null; +
464                    } else { +
465                        $this->_id[$name] = $this->_data[$name]; +
466                    } +
467                } +
468                break; +
469        } +
470    } +
471    /** +
472     * serialize +
473     * this method is automatically called when this Doctrine_Record is serialized +
474     * +
475     * @return array +
476     */ +
477    public function serialize() +
478    { +
479        $event = new Doctrine_Event($this, Doctrine_Event::RECORD_SERIALIZE); +
480 +
481        $this->preSerialize($event); +
482 +
483        $vars = get_object_vars($this); +
484 +
485        unset($vars['_references']); +
486        unset($vars['_table']); +
487        unset($vars['_errorStack']); +
488        unset($vars['_filter']); +
489        unset($vars['_node']); +
490 +
491        $name = $this->_table->getIdentifier(); +
492        $this->_data = array_merge($this->_data, $this->_id); +
493 +
494        foreach ($this->_data as $k => $v) { +
495            if ($v instanceof Doctrine_Record && $this->_table->getTypeOf($k) != 'object') { +
496                unset($vars['_data'][$k]); +
497            } elseif ($v === self::$_null) { +
498                unset($vars['_data'][$k]); +
499            } else { +
500                switch ($this->_table->getTypeOf($k)) { +
501                    case 'array': +
502                    case 'object': +
503                        $vars['_data'][$k] = serialize($vars['_data'][$k]); +
504                        break; +
505                    case 'gzip': +
506                        $vars['_data'][$k] = gzcompress($vars['_data'][$k]); +
507                        break; +
508                    case 'enum': +
509                        $vars['_data'][$k] = $this->_table->enumIndex($k, $vars['_data'][$k]); +
510                        break; +
511                } +
512            } +
513        } +
514 +
515        $str = serialize($vars); +
516         +
517        $this->postSerialize($event); +
518 +
519        return $str; +
520    } +
521    /** +
522     * unseralize +
523     * this method is automatically called everytime a Doctrine_Record object is unserialized +
524     * +
525     * @param string $serialized                Doctrine_Record as serialized string +
526     * @throws Doctrine_Record_Exception        if the cleanData operation fails somehow +
527     * @return void +
528     */ +
529    public function unserialize($serialized) +
530    { +
531        $event = new Doctrine_Event($this, Doctrine_Event::RECORD_UNSERIALIZE); +
532 +
533        $this->preUnserialize($event); +
534 +
535        $manager    = Doctrine_Manager::getInstance(); +
536        $connection = $manager->getConnectionForComponent(get_class($this)); +
537 +
538        $this->_oid = self::$_index; +
539        self::$_index++; +
540 +
541        $this->_table = $connection->getTable(get_class($this)); +
542 +
543        $array = unserialize($serialized); +
544 +
545        foreach($array as $k => $v) { +
546            $this->$k = $v; +
547        } +
548 +
549        foreach ($this->_data as $k => $v) { +
550 +
551            switch ($this->_table->getTypeOf($k)) { +
552                case 'array': +
553                case 'object': +
554                    $this->_data[$k] = unserialize($this->_data[$k]); +
555                    break; +
556                case 'gzip': +
557                   $this->_data[$k] = gzuncompress($this->_data[$k]); +
558                    break; +
559                case 'enum': +
560                    $this->_data[$k] = $this->_table->enumValue($k, $this->_data[$k]); +
561                    break; +
562                 +
563            } +
564        } +
565         +
566        $this->_table->getRepository()->add($this); +
567 +
568        $this->cleanData($this->_data); +
569 +
570        $this->prepareIdentifiers($this->exists()); +
571         +
572        $this->postUnserialize($event); +
573    } +
574    /** +
575     * state +
576     * returns / assigns the state of this record +
577     * +
578     * @param integer|string $state                 if set, this method tries to set the record state to $state +
579     * @see Doctrine_Record::STATE_* constants +
580     * +
581     * @throws Doctrine_Record_State_Exception      if trying to set an unknown state +
582     * @return null|integer +
583     */ +
584    public function state($state = null) +
585    { +
586        if ($state == null) { +
587            return $this->_state; +
588        } +
589        $err = false; +
590        if (is_integer($state)) { +
591            if ($state >= 1 && $state <= 6) { +
592                $this->_state = $state; +
593            } else { +
594                $err = true; +
595            } +
596        } elseif (is_string($state)) { +
597            $upper = strtoupper($state); +
598             +
599            $const = 'Doctrine_Record::STATE_' . $upper; +
600            if (defined($const)) { +
601                $this->_state = constant($const);   +
602            } else { +
603                $err = true; +
604            } +
605        } +
606 +
607        if ($this->_state === Doctrine_Record::STATE_TCLEAN || +
608            $this->_state === Doctrine_Record::STATE_CLEAN) { +
609 +
610            $this->_modified = array(); +
611        } +
612 +
613        if ($err) { +
614            throw new Doctrine_Record_State_Exception('Unknown record state ' . $state); +
615        } +
616    } +
617    /** +
618     * refresh +
619     * refresh internal data from the database +
620     * +
621     * @throws Doctrine_Record_Exception        When the refresh operation fails (when the database row +
622     *                                          this record represents does not exist anymore) +
623     * @return boolean +
624     */ +
625    public function refresh() +
626    { +
627        $id = $this->identifier(); +
628        if ( ! is_array($id)) { +
629            $id = array($id); +
630        } +
631        if (empty($id)) { +
632            return false; +
633        } +
634        $id = array_values($id); +
635 +
636        // Use FETCH_ARRAY to avoid clearing object relations +
637        $record = $this->getTable()->find($id, Doctrine::FETCH_ARRAY); +
638 +
639        if ($record === false) { +
640            throw new Doctrine_Record_Exception('Failed to refresh. Record does not exist.'); +
641        } +
642 +
643        $this->hydrate($record); +
644 +
645        $this->_modified = array(); +
646 +
647        $this->prepareIdentifiers(); +
648 +
649        $this->_state    = Doctrine_Record::STATE_CLEAN; +
650 +
651        return $this; +
652    } +
653     +
654    /** +
655     * refresh +
656     * refres data of related objects from the database +
657     * +
658     * @param string $name              name of a related component. +
659     *                                  if set, this method only refreshes the specified related component +
660     * +
661     * @return Doctrine_Record          this object +
662     */ +
663    public function refreshRelated($name = null) +
664    { +
665        if (is_null($name)) { +
666            foreach ($this->_table->getRelations() as $rel) { +
667                $this->_references[$rel->getAlias()] = $rel->fetchRelatedFor($this); +
668            } +
669        } else { +
670            $rel = $this->_table->getRelation($name); +
671            $this->_references[$name] = $rel->fetchRelatedFor($this); +
672        } +
673    } +
674 +
675    /** +
676     * clearRelated +
677     * unsets all the relationships this object has +
678     * +
679     * (references to related objects still remain on Table objects) +
680     */ +
681    public function clearRelated() +
682    { +
683        $this->_references = array(); +
684    } +
685     +
686    /** +
687     * getTable +
688     * returns the table object for this record +
689     * +
690     * @return object Doctrine_Table        a Doctrine_Table object +
691     */ +
692    public function getTable() +
693    { +
694        return $this->_table; +
695    } +
696    /** +
697     * getData +
698     * return all the internal data +
699     * +
700     * @return array                        an array containing all the properties +
701     */ +
702    public function getData() +
703    { +
704        return $this->_data; +
705    } +
706    /** +
707     * rawGet +
708     * returns the value of a property, if the property is not yet loaded +
709     * this method does NOT load it +
710     * +
711     * @param $name                         name of the property +
712     * @throws Doctrine_Record_Exception    if trying to get an unknown property +
713     * @return mixed +
714     */ +
715 +
716    public function rawGet($name) +
717    { +
718        if ( ! isset($this->_data[$name])) { +
719            throw new Doctrine_Record_Exception('Unknown property '. $name); +
720        } +
721        if ($this->_data[$name] === self::$_null) +
722            return null; +
723 +
724        return $this->_data[$name]; +
725    } +
726 +
727    /** +
728     * load +
729     * loads all the unitialized properties from the database +
730     * +
731     * @return boolean +
732     */ +
733    public function load() +
734    { +
735        // only load the data from database if the Doctrine_Record is in proxy state +
736        if ($this->_state == Doctrine_Record::STATE_PROXY) { +
737            $this->refresh(); +
738 +
739            $this->_state = Doctrine_Record::STATE_CLEAN; +
740 +
741            return true; +
742        } +
743        return false; +
744    } +
745    /** +
746     * get +
747     * returns a value of a property or a related component +
748     * +
749     * @param mixed $name                       name of the property or related component +
750     * @param boolean $load                     whether or not to invoke the loading procedure +
751     * @throws Doctrine_Record_Exception        if trying to get a value of unknown property / related component +
752     * @return mixed +
753     */ +
754    public function get($name, $load = true) +
755    { +
756        $value = self::$_null; +
757        $lower = strtolower($name); +
758 +
759        $lower = $this->_table->getColumnName($lower); +
760 +
761        if (isset($this->_data[$lower])) { +
762            // check if the property is null (= it is the Doctrine_Null object located in self::$_null) +
763            if ($this->_data[$lower] === self::$_null && $load) { +
764                $this->load(); +
765            } +
766 +
767            if ($this->_data[$lower] === self::$_null) { +
768                $value = null; +
769            } else { +
770                $value = $this->_data[$lower]; +
771            } +
772            return $value; +
773        } +
774 +
775        if (isset($this->_values[$lower])) { +
776            return $this->_values[$lower]; +
777        } +
778 +
779        try { +
780 +
781            if ( ! isset($this->_references[$name]) && $load) { +
782 +
783                $rel = $this->_table->getRelation($name); +
784 +
785                $this->_references[$name] = $rel->fetchRelatedFor($this); +
786            } +
787            return $this->_references[$name]; +
788 +
789        } catch(Doctrine_Table_Exception $e) {  +
790 +
791            foreach ($this->_table->getFilters() as $filter) { +
792                if (($value = $filter->filterGet($this, $name, $value)) !== null) { +
793                    return $value; +
794                } +
795            } +
796        } +
797    } +
798    /** +
799     * mapValue +
800     * This simple method is used for mapping values to $values property. +
801     * Usually this method is used internally by Doctrine for the mapping of +
802     * aggregate values. +
803     * +
804     * @param string $name                  the name of the mapped value +
805     * @param mixed $value                  mixed value to be mapped +
806     * @return void +
807     */ +
808    public function mapValue($name, $value) +
809    { +
810        $name = strtolower($name); +
811        $this->_values[$name] = $value; +
812    } +
813    /** +
814     * set +
815     * method for altering properties and Doctrine_Record references +
816     * if the load parameter is set to false this method will not try to load uninitialized record data +
817     * +
818     * @param mixed $name                   name of the property or reference +
819     * @param mixed $value                  value of the property or reference +
820     * @param boolean $load                 whether or not to refresh / load the uninitialized record data +
821     * +
822     * @throws Doctrine_Record_Exception    if trying to set a value for unknown property / related component +
823     * @throws Doctrine_Record_Exception    if trying to set a value of wrong type for related component +
824     * +
825     * @return Doctrine_Record +
826     */ +
827    public function set($name, $value, $load = true) +
828    { +
829        $lower = strtolower($name); +
830 +
831        $lower = $this->_table->getColumnName($lower); +
832 +
833        if (isset($this->_data[$lower])) { +
834            if ($value instanceof Doctrine_Record) { +
835                $type = $this->_table->getTypeOf($name); +
836 +
837                $id = $value->getIncremented(); +
838 +
839                if ($id !== null && $type !== 'object') { +
840                    $value = $id; +
841                } +
842            } +
843 +
844            if ($load) { +
845                $old = $this->get($lower, $load); +
846            } else { +
847                $old = $this->_data[$lower]; +
848            } +
849 +
850            if ($old !== $value) { +
851                if ($value === null) { +
852                    $value = self::$_null; +
853                } +
854 +
855                $this->_data[$lower] = $value; +
856                $this->_modified[]   = $lower; +
857                switch ($this->_state) { +
858                    case Doctrine_Record::STATE_CLEAN: +
859                        $this->_state = Doctrine_Record::STATE_DIRTY; +
860                        break; +
861                    case Doctrine_Record::STATE_TCLEAN: +
862                        $this->_state = Doctrine_Record::STATE_TDIRTY; +
863                        break; +
864                } +
865            } +
866        } else { +
867            try { +
868                $this->coreSetRelated($name, $value); +
869            } catch(Doctrine_Table_Exception $e) { +
870                foreach ($this->_table->getFilters() as $filter) { +
871                    if (($value = $filter->filterSet($this, $name, $value)) !== null) { +
872                        return $value; +
873                    } +
874                } +
875            } +
876        } +
877    } +
878 +
879    public function coreSetRelated($name, $value) +
880    { +
881        $rel = $this->_table->getRelation($name); +
882 +
883        // one-to-many or one-to-one relation +
884        if ($rel instanceof Doctrine_Relation_ForeignKey || +
885            $rel instanceof Doctrine_Relation_LocalKey) { +
886            if ( ! $rel->isOneToOne()) { +
887                // one-to-many relation found +
888                if ( ! ($value instanceof Doctrine_Collection)) { +
889                    throw new Doctrine_Record_Exception("Couldn't call Doctrine::set(), second argument should be an instance of Doctrine_Collection when setting one-to-many references."); +
890                } +
891                if (isset($this->_references[$name])) { +
892                    $this->_references[$name]->setData($value->getData()); +
893                    return $this; +
894                } +
895            } else { +
896                if ($value !== self::$_null) { +
897                    // one-to-one relation found +
898                    if ( ! ($value instanceof Doctrine_Record)) { +
899                        throw new Doctrine_Record_Exception("Couldn't call Doctrine::set(), second argument should be an instance of Doctrine_Record or Doctrine_Null when setting one-to-one references."); +
900                    } +
901                    if ($rel instanceof Doctrine_Relation_LocalKey) { +
902                        $foreign = $rel->getForeign(); +
903                        if ( ! empty($foreign) && $foreign != $value->getTable()->getIdentifier()) +
904                          $this->set($rel->getLocal(), $value->rawGet($foreign), false); +
905                        else +
906                          $this->set($rel->getLocal(), $value, false);                           +
907                    } else { +
908                        $value->set($rel->getForeign(), $this, false); +
909                    }                             +
910                } +
911            } +
912 +
913        } elseif ($rel instanceof Doctrine_Relation_Association) { +
914            // join table relation found +
915            if ( ! ($value instanceof Doctrine_Collection)) { +
916                throw new Doctrine_Record_Exception("Couldn't call Doctrine::set(), second argument should be an instance of Doctrine_Collection when setting many-to-many references."); +
917            } +
918        } +
919 +
920        $this->_references[$name] = $value; +
921    } +
922    /** +
923     * contains +
924     * +
925     * @param string $name +
926     * @return boolean +
927     */ +
928    public function contains($name) +
929    { +
930        $lower = strtolower($name); +
931 +
932        if (isset($this->_data[$lower])) { +
933            return true; +
934        } +
935        if (isset($this->_id[$lower])) { +
936            return true; +
937        } +
938        if (isset($this->_values[$lower])) { +
939            return true;                                       +
940        } +
941        if (isset($this->_references[$name]) &&  +
942            $this->_references[$name] !== self::$_null) { +
943 +
944            return true; +
945        } +
946        return false; +
947    } +
948    /** +
949     * @param string $name +
950     * @return void +
951     */ +
952    public function __unset($name) +
953    { +
954        if (isset($this->_data[$name])) { +
955            $this->_data[$name] = array(); +
956        } +
957        // todo: what to do with references ? +
958    } +
959    /** +
960     * applies the changes made to this object into database +
961     * this method is smart enough to know if any changes are made +
962     * and whether to use INSERT or UPDATE statement +
963     * +
964     * this method also saves the related components +
965     * +
966     * @param Doctrine_Connection $conn                 optional connection parameter +
967     * @return void +
968     */ +
969    public function save(Doctrine_Connection $conn = null) +
970    { +
971        if ($conn === null) { +
972            $conn = $this->_table->getConnection(); +
973        } +
974        $conn->unitOfWork->saveGraph($this); +
975    } +
976    /** +
977     * Tries to save the object and all its related components. +
978     * In contrast to Doctrine_Record::save(), this method does not +
979     * throw an exception when validation fails but returns TRUE on +
980     * success or FALSE on failure. +
981     *  +
982     * @param Doctrine_Connection $conn                 optional connection parameter +
983     * @return TRUE if the record was saved sucessfully without errors, FALSE otherwise. +
984     */ +
985    public function trySave(Doctrine_Connection $conn = null) { +
986        try { +
987            $this->save($conn); +
988            return true; +
989        } catch (Doctrine_Validator_Exception $ignored) { +
990            return false; +
991        } +
992    } +
993    /** +
994     * replace +
995     * Execute a SQL REPLACE query. A REPLACE query is identical to a INSERT +
996     * query, except that if there is already a row in the table with the same +
997     * key field values, the REPLACE query just updates its values instead of +
998     * inserting a new row. +
999     * +
1000     * The REPLACE type of query does not make part of the SQL standards. Since +
1001     * practically only MySQL and SQLIte implement it natively, this type of +
1002     * query isemulated through this method for other DBMS using standard types +
1003     * of queries inside a transaction to assure the atomicity of the operation. +
1004     * +
1005     * @param Doctrine_Connection $conn             optional connection parameter +
1006     * @throws Doctrine_Connection_Exception        if some of the key values was null +
1007     * @throws Doctrine_Connection_Exception        if there were no key fields +
1008     * @throws PDOException                         if something fails at PDO level +
1009     * @return integer                              number of rows affected +
1010     */ +
1011    public function replace(Doctrine_Connection $conn = null) +
1012    { +
1013        if ($conn === null) { +
1014            $conn = $this->_table->getConnection(); +
1015        } +
1016 +
1017        return $conn->replace($this->_table->getTableName(), $this->getPrepared(), $this->id); +
1018    } +
1019    /** +
1020     * returns an array of modified fields and associated values +
1021     * @return array +
1022     */ +
1023    public function getModified() +
1024    { +
1025        $a = array(); +
1026 +
1027        foreach ($this->_modified as $k => $v) { +
1028            $a[$v] = $this->_data[$v]; +
1029        } +
1030        return $a; +
1031    } +
1032    /** +
1033     * getPrepared +
1034     * +
1035     * returns an array of modified fields and values with data preparation +
1036     * adds column aggregation inheritance and converts Records into primary key values +
1037     * +
1038     * @param array $array +
1039     * @return array +
1040     */ +
1041    public function getPrepared(array $array = array())  +
1042    { +
1043        $a = array(); +
1044 +
1045        if (empty($array)) { +
1046            $array = $this->_modified; +
1047        } +
1048 +
1049        foreach ($array as $k => $v) { +
1050            $type = $this->_table->getTypeOf($v); +
1051 +
1052            if ($this->_data[$v] === self::$_null) { +
1053                $a[$v] = null; +
1054                continue; +
1055            } +
1056 +
1057            switch ($type) { +
1058                case 'array': +
1059                case 'object': +
1060                    $a[$v] = serialize($this->_data[$v]); +
1061                    break; +
1062                case 'gzip': +
1063                    $a[$v] = gzcompress($this->_data[$v],5); +
1064                    break; +
1065                case 'boolean': +
1066                    $a[$v] = $this->getTable()->getConnection()->convertBooleans($this->_data[$v]); +
1067                break; +
1068                case 'enum': +
1069                    $a[$v] = $this->_table->enumIndex($v, $this->_data[$v]); +
1070                    break; +
1071                default: +
1072                    if ($this->_data[$v] instanceof Doctrine_Record) { +
1073                        $this->_data[$v] = $this->_data[$v]->getIncremented(); +
1074                    } +
1075                    /** TODO: +
1076                    if ($this->_data[$v] === null) { +
1077                        throw new Doctrine_Record_Exception('Unexpected null value.'); +
1078                    } +
1079                    */ +
1080 +
1081                    $a[$v] = $this->_data[$v]; +
1082            } +
1083        } +
1084        $map = $this->_table->inheritanceMap; +
1085        foreach ($map as $k => $v) { +
1086            $old = $this->get($k, false); +
1087 +
1088            if ((string) $old !== (string) $v || $old === null) { +
1089                $a[$k] = $v; +
1090                $this->_data[$k] = $v; +
1091            } +
1092        } +
1093 +
1094        return $a; +
1095    } +
1096    /** +
1097     * count +
1098     * this class implements countable interface +
1099     * +
1100     * @return integer          the number of columns in this record +
1101     */ +
1102    public function count() +
1103    { +
1104        return count($this->_data); +
1105    } +
1106    /** +
1107     * alias for count() +
1108     * +
1109     * @return integer          the number of columns in this record +
1110     */ +
1111    public function columnCount() +
1112    { +
1113        return $this->count(); +
1114    } +
1115    /** +
1116     * toArray +
1117     * returns the record as an array +
1118     * +
1119     * @param boolean $deep - Return also the relations +
1120     * @return array +
1121     */ +
1122    public function toArray($deep = false, $prefixKey = false) +
1123    { +
1124        $a = array(); +
1125 +
1126        foreach ($this as $column => $value) { +
1127            if ($value === self::$_null) { +
1128                $value = null; +
1129            } +
1130            $a[$column] = $value; +
1131        } +
1132        if ($this->_table->getIdentifierType() ==  Doctrine::IDENTIFIER_AUTOINC) { +
1133            $i      = $this->_table->getIdentifier(); +
1134            $a[$i]  = $this->getIncremented(); +
1135        } +
1136        if ($deep) { +
1137            foreach ($this->_references as $key => $relation) { +
1138                if (!$relation instanceof Doctrine_Null) { +
1139                    $a[$key] = $relation->toArray($deep, $prefixKey); +
1140                } +
1141            } +
1142        } +
1143        return array_merge($a, $this->_values); +
1144    } +
1145    public function fromArray($array) +
1146    { +
1147        if (is_array($array)) { +
1148            foreach ($array as $key => $value) { +
1149                if ($this->getTable()->hasRelation($key) && $value) { +
1150                    $this->$key->fromArray($value); +
1151                } else if($this->getTable()->hasColumn($key) && $value) { +
1152                    $this->$key = $value; +
1153                } +
1154            } +
1155        } +
1156    } +
1157    public function exportTo($type, $deep = false) +
1158    { +
1159        if ($type == 'array') { +
1160            return $this->toArray($deep); +
1161        } else { +
1162            return Doctrine_Parser::dump($this->toArray($deep, true), $type); +
1163        } +
1164    } +
1165    public function importFrom($type, $data) +
1166    { +
1167        if ($type == 'array') { +
1168            return $this->fromArray($data); +
1169        } else { +
1170            return $this->fromArray(Doctrine_Parser::load($data, $type)); +
1171        } +
1172    } +
1173    /** +
1174     * exists +
1175     * returns true if this record is persistent, otherwise false +
1176     * +
1177     * @return boolean +
1178     */ +
1179    public function exists() +
1180    { +
1181        return ($this->_state !== Doctrine_Record::STATE_TCLEAN && +
1182                $this->_state !== Doctrine_Record::STATE_TDIRTY); +
1183    } +
1184    /** +
1185     * isModified +
1186     * returns true if this record was modified, otherwise false +
1187     * +
1188     * @return boolean +
1189     */ +
1190    public function isModified() +
1191    { +
1192        return ($this->_state === Doctrine_Record::STATE_DIRTY || +
1193                $this->_state === Doctrine_Record::STATE_TDIRTY); +
1194    } +
1195    /** +
1196     * method for checking existence of properties and Doctrine_Record references +
1197     * @param mixed $name               name of the property or reference +
1198     * @return boolean +
1199     */ +
1200    public function hasRelation($name) +
1201    { +
1202        if (isset($this->_data[$name]) || isset($this->_id[$name])) { +
1203            return true; +
1204        } +
1205        return $this->_table->hasRelation($name); +
1206    } +
1207    /** +
1208     * getIterator +
1209     * @return Doctrine_Record_Iterator     a Doctrine_Record_Iterator that iterates through the data +
1210     */ +
1211    public function getIterator() +
1212    { +
1213        return new Doctrine_Record_Iterator($this); +
1214    } +
1215    /** +
1216     * deletes this data access object and all the related composites +
1217     * this operation is isolated by a transaction +
1218     * +
1219     * this event can be listened by the onPreDelete and onDelete listeners +
1220     * +
1221     * @return boolean      true on success, false on failure +
1222     */ +
1223    public function delete(Doctrine_Connection $conn = null) +
1224    { +
1225        if ($conn == null) { +
1226            $conn = $this->_table->getConnection(); +
1227        } +
1228        return $conn->unitOfWork->delete($this); +
1229    } +
1230    /** +
1231     * copy +
1232     * returns a copy of this object +
1233     * +
1234     * @return Doctrine_Record +
1235     */ +
1236    public function copy() +
1237    { +
1238        $data = $this->_data; +
1239 +
1240        if ($this->_table->getIdentifierType() === Doctrine::IDENTIFIER_AUTOINC) { +
1241            $id = $this->_table->getIdentifier(); +
1242 +
1243            unset($data[$id]); +
1244        } +
1245 +
1246        $ret = $this->_table->create($data); +
1247        $modified = array(); +
1248 +
1249        foreach ($data as $key => $val) { +
1250            if ( ! ($val instanceof Doctrine_Null)) { +
1251                $ret->_modified[] = $key; +
1252            } +
1253        } +
1254         +
1255 +
1256        return $ret; +
1257    } +
1258    /** +
1259     * copyDeep +
1260     * returns a copy of this object and all its related objects +
1261     * +
1262     * @return Doctrine_Record +
1263     */ +
1264    public function copyDeep() { +
1265        $copy = $this->copy(); +
1266 +
1267        foreach ($this->_references as $key => $value) { +
1268            if ($value instanceof Doctrine_Collection) { +
1269                foreach ($value as $record) { +
1270                    $copy->{$key}[] = $record->copyDeep(); +
1271                } +
1272            } else { +
1273                $copy->set($key, $value->copyDeep()); +
1274            } +
1275        } +
1276        return $copy; +
1277    } +
1278     +
1279    /** +
1280     * assignIdentifier +
1281     * +
1282     * @param integer $id +
1283     * @return void +
1284     */ +
1285    public function assignIdentifier($id = false) +
1286    { +
1287        if ($id === false) { +
1288            $this->_id       = array(); +
1289            $this->_data     = $this->cleanData($this->_data); +
1290            $this->_state    = Doctrine_Record::STATE_TCLEAN; +
1291            $this->_modified = array(); +
1292        } elseif ($id === true) { +
1293            $this->prepareIdentifiers(true); +
1294            $this->_state    = Doctrine_Record::STATE_CLEAN; +
1295            $this->_modified = array(); +
1296        } else { +
1297            $name             = $this->_table->getIdentifier();    +
1298            $this->_id[$name] = $id; +
1299            $this->_data[$name] = $id; +
1300            $this->_state     = Doctrine_Record::STATE_CLEAN; +
1301            $this->_modified  = array(); +
1302        } +
1303    } +
1304    /** +
1305     * returns the primary keys of this object +
1306     * +
1307     * @return array +
1308     */ +
1309    public function identifier() +
1310    { +
1311        return $this->_id; +
1312    } +
1313    /** +
1314     * returns the value of autoincremented primary key of this object (if any) +
1315     * +
1316     * @return integer +
1317     */ +
1318    final public function getIncremented() +
1319    { +
1320        $id = current($this->_id); +
1321        if ($id === false) { +
1322            return null; +
1323        } +
1324 +
1325        return $id; +
1326    } +
1327    /** +
1328     * getLast +
1329     * this method is used internally be Doctrine_Query +
1330     * it is needed to provide compatibility between +
1331     * records and collections +
1332     * +
1333     * @return Doctrine_Record +
1334     */ +
1335    public function getLast() +
1336    { +
1337        return $this; +
1338    } +
1339    /** +
1340     * hasRefence +
1341     * @param string $name +
1342     * @return boolean +
1343     */ +
1344    public function hasReference($name) +
1345    { +
1346        return isset($this->_references[$name]); +
1347    } +
1348    /** +
1349     * reference +
1350     * +
1351     * @param string $name +
1352     */ +
1353    public function reference($name) +
1354    { +
1355        if (isset($this->_references[$name])) { +
1356            return $this->_references[$name]; +
1357        } +
1358    } +
1359    /** +
1360     * obtainReference +
1361     * +
1362     * @param string $name +
1363     * @throws Doctrine_Record_Exception        if trying to get an unknown related component +
1364     */ +
1365    public function obtainReference($name) +
1366    { +
1367        if (isset($this->_references[$name])) { +
1368            return $this->_references[$name]; +
1369        } +
1370        throw new Doctrine_Record_Exception("Unknown reference $name"); +
1371    } +
1372    /** +
1373     * getReferences +
1374     * @return array    all references +
1375     */ +
1376    public function getReferences() +
1377    { +
1378        return $this->_references; +
1379    } +
1380    /** +
1381     * setRelated +
1382     * +
1383     * @param string $alias +
1384     * @param Doctrine_Access $coll +
1385     */ +
1386    final public function setRelated($alias, Doctrine_Access $coll) +
1387    { +
1388        $this->_references[$alias] = $coll; +
1389    } +
1390    /** +
1391     * loadReference +
1392     * loads a related component +
1393     * +
1394     * @throws Doctrine_Table_Exception             if trying to load an unknown related component +
1395     * @param string $name +
1396     * @return void +
1397     */ +
1398    public function loadReference($name) +
1399    { +
1400        $rel = $this->_table->getRelation($name); +
1401        $this->_references[$name] = $rel->fetchRelatedFor($this); +
1402    } +
1403 +
1404    /** +
1405     * merge +
1406     * merges this record with an array of values +
1407     * +
1408     * @param array $values +
1409     * @return void +
1410     */ +
1411    public function merge(array $values) +
1412    { +
1413        foreach ($this->_table->getColumnNames() as $value) { +
1414            try { +
1415                if (isset($values[$value])) { +
1416                    $this->set($value, $values[$value]); +
1417                } +
1418            } catch(Exception $e) { +
1419                // silence all exceptions +
1420            } +
1421        } +
1422    } +
1423     +
1424    /** +
1425     * call +
1426     * +
1427     * @param string|array $callback    valid callback +
1428     * @param string $column            column name +
1429     * @param mixed arg1 ... argN       optional callback arguments +
1430     * @return Doctrine_Record +
1431     */ +
1432    public function call($callback, $column) +
1433    { +
1434        $args = func_get_args(); +
1435        array_shift($args); +
1436 +
1437        if (isset($args[0])) { +
1438            $column = $args[0]; +
1439            $args[0] = $this->get($column); +
1440 +
1441            $newvalue = call_user_func_array($callback, $args); +
1442 +
1443            $this->_data[$column] = $newvalue; +
1444        } +
1445        return $this; +
1446    } +
1447    /** +
1448     * getter for node assciated with this record +
1449     * +
1450     * @return mixed if tree returns Doctrine_Node otherwise returns false +
1451     */     +
1452    public function getNode()  +
1453    { +
1454        if ( ! $this->_table->isTree()) { +
1455            return false; +
1456        } +
1457 +
1458        if ( ! isset($this->_node)) { +
1459            $this->_node = Doctrine_Node::factory($this, +
1460                                              $this->getTable()->getOption('treeImpl'), +
1461                                              $this->getTable()->getOption('treeOptions') +
1462                                              ); +
1463        } +
1464         +
1465        return $this->_node; +
1466    } +
1467 +
1468    public function unshiftFilter(Doctrine_Record_Filter $filter) +
1469    { +
1470        return $this->_table->unshiftFilter($filter); +
1471    } +
1472    /** +
1473     * revert +
1474     * reverts this record to given version, this method only works if versioning plugin +
1475     * is enabled +
1476     * +
1477     * @throws Doctrine_Record_Exception    if given version does not exist +
1478     * @param integer $version      an integer > 1 +
1479     * @return Doctrine_Record      this object +
1480     */ +
1481    public function revert($version) +
1482    { +
1483        $data = $this->_table +
1484                ->getTemplate('Doctrine_Template_Versionable') +
1485                ->getAuditLog() +
1486                ->getVersion($this, $version); +
1487 +
1488        if ( ! isset($data[0])) { +
1489            throw new Doctrine_Record_Exception('Version ' . $version . ' does not exist!'); +
1490        } +
1491 +
1492        $this->_data = $data[0]; +
1493 +
1494        return $this; +
1495    } +
1496    /** +
1497     * unlink +
1498     * removes links from this record to given records +
1499     * if no ids are given, it removes all links +
1500     * +
1501     * @param string $alias     related component alias +
1502     * @param array $ids        the identifiers of the related records +
1503     * @return Doctrine_Record  this object +
1504     */ +
1505    public function unlink($alias, $ids = array()) +
1506    { +
1507        $ids = (array) $ids; +
1508         +
1509        $q = new Doctrine_Query(); +
1510 +
1511        $rel = $this->getTable()->getRelation($alias); +
1512 +
1513        if ($rel instanceof Doctrine_Relation_Association) { +
1514            $q->delete() +
1515              ->from($rel->getAssociationTable()->getComponentName()) +
1516              ->where($rel->getLocal() . ' = ?', array_values($this->identifier())); +
1517 +
1518            if (count($ids) > 0) { +
1519                $q->whereIn($rel->getForeign(), $ids); +
1520            } +
1521 +
1522            $q->execute(); +
1523 +
1524 +
1525        } elseif ($rel instanceof Doctrine_Relation_ForeignKey) { +
1526            $q->update($rel->getTable()->getComponentName()) +
1527              ->set($rel->getForeign(), '?', array(null)) +
1528              ->addWhere($rel->getForeign() . ' = ?', array_values($this->identifier())); +
1529 +
1530            if (count($ids) > 0) { +
1531                $q->whereIn($rel->getTable()->getIdentifier(), $ids); +
1532            } +
1533 +
1534            $q->execute(); +
1535        } +
1536        if (isset($this->_references[$alias])) { +
1537            foreach ($this->_references[$alias] as $k => $record) { +
1538                if (in_array(current($record->identifier()), $ids)) { +
1539                    $this->_references[$alias]->remove($k); +
1540                } +
1541            } +
1542            $this->_references[$alias]->takeSnapshot(); +
1543        } +
1544        return $this; +
1545    } +
1546    /** +
1547     * __call +
1548     * this method is a magic method that is being used for method overloading +
1549     * +
1550     * the function of this method is to try to find given method from the templates +
1551     * this record is using and if it finds given method it will execute it +
1552     * +
1553     * So, in sense, this method replicates the usage of mixins (as seen in some programming languages) +
1554     * +
1555     * @param string $method        name of the method +
1556     * @param array $args           method arguments +
1557     * @return mixed                the return value of the given method +
1558     */ +
1559    public function __call($method, $args)  +
1560    { +
1561        if (($template = $this->_table->getMethodOwner($method)) !== false) { +
1562            $template->setInvoker($this); +
1563            return call_user_func_array(array($template, $method), $args); +
1564        } +
1565         +
1566        foreach ($this->_table->getTemplates() as $template) { +
1567            if (method_exists($template, $method)) { +
1568                $template->setInvoker($this); +
1569                $this->_table->setMethodOwner($method, $template); +
1570                 +
1571                return call_user_func_array(array($template, $method), $args); +
1572            } +
1573        } +
1574         +
1575        throw new Doctrine_Record_Exception('Unknown method ' . $method); +
1576    } +
1577    /** +
1578     * used to delete node from tree - MUST BE USE TO DELETE RECORD IF TABLE ACTS AS TREE +
1579     * +
1580     */     +
1581    public function deleteNode() { +
1582        $this->getNode()->delete(); +
1583    } +
1584    public function toString() +
1585    { +
1586        return Doctrine::dump(get_object_vars($this)); +
1587    } +
1588    /** +
1589     * returns a string representation of this object +
1590     */ +
1591    public function __toString() +
1592    { +
1593        return (string) $this->_oid; +
1594    } +
1595} +
\ No newline at end of file diff --git a/tests/coverage/Doctrine_Record_Abstract.html b/tests/coverage/Doctrine_Record_Abstract.html new file mode 100644 index 000000000..b85ebc2d8 --- /dev/null +++ b/tests/coverage/Doctrine_Record_Abstract.html @@ -0,0 +1,975 @@ + + + Coverage for Doctrine_Record_Abstract + + +

Coverage for Doctrine_Record_Abstract

Back to coverage report

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
1<?php +
2/* +
3 *  $Id$ +
4 * +
5 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +
6 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +
7 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +
8 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +
9 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +
10 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +
11 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +
12 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +
13 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +
14 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +
15 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +
16 * +
17 * This software consists of voluntary contributions made by many individuals +
18 * and is licensed under the LGPL. For more information, see +
19 * <http://www.phpdoctrine.com>. +
20 */ +
21Doctrine::autoload('Doctrine_Access'); +
22/** +
23 * Doctrine_Record_Abstract +
24 * +
25 * @package     Doctrine +
26 * @subpackage  Record +
27 * @author      Konsta Vesterinen <kvesteri@cc.hut.fi> +
28 * @license     http://www.opensource.org/licenses/lgpl-license.php LGPL +
29 * @link        www.phpdoctrine.com +
30 * @since       1.0 +
31 * @version     $Revision$ +
32 */ +
33abstract class Doctrine_Record_Abstract extends Doctrine_Access +
34{ +
35    /** +
36     * @param Doctrine_Table $_table     reference to associated Doctrine_Table instance +
37     */ +
38    protected $_table; +
39    /** +
40     * addListener +
41     * +
42     * @param Doctrine_EventListener_Interface|Doctrine_Overloadable $listener +
43     * @return Doctrine_Record +
44     */ +
45    public function addListener($listener, $name = null) +
46    { +
47        $this->_table->addRecordListener($listener, $name = null); +
48 +
49        return $this; +
50    } +
51    /** +
52     * getListener +
53     * +
54     * @return Doctrine_EventListener_Interface|Doctrine_Overloadable +
55     */ +
56    public function getListener() +
57    { +
58        return $this->_table->getRecordListener(); +
59    } +
60    /** +
61     * setListener +
62     * +
63     * @param Doctrine_EventListener_Interface|Doctrine_Overloadable $listener +
64     * @return Doctrine_Record +
65     */ +
66    public function setListener($listener) +
67    { +
68        $this->_table->setRecordListener($listener); +
69 +
70        return $this; +
71    } +
72    /** +
73     * index +
74     * defines or retrieves an index +
75     * if the second parameter is set this method defines an index +
76     * if not this method retrieves index named $name +
77     * +
78     * @param string $name              the name of the index +
79     * @param array $definition         the definition array +
80     * @return mixed +
81     */ +
82    public function index($name, array $definition = array()) +
83    { +
84        if ( ! $definition) { +
85            return $this->_table->getIndex($name); +
86        } else { +
87            return $this->_table->addIndex($name, $definition); +
88        } +
89    } +
90    public function setAttribute($attr, $value) +
91    { +
92        $this->_table->setAttribute($attr, $value); +
93    } +
94    public function setTableName($tableName) +
95    { +
96        $this->_table->setOption('tableName', $tableName); +
97    } +
98    public function setInheritanceMap($map) +
99    { +
100        $this->_table->setOption('inheritanceMap', $map); +
101    } +
102 +
103    public function setSubclasses($map) +
104    { +
105        if (isset($map[get_class($this)])) { +
106            $this->_table->setOption('inheritanceMap', $map[get_class($this)]); +
107            return; +
108        } +
109        $this->_table->setOption('subclasses', array_keys($map)); +
110        $conn = $this->_table->getConnection();  +
111        foreach ($map as $key => $value) { +
112            $table = $conn->getTable($key); +
113            $table->setOption('inheritanceMap', $value); +
114        } +
115    } +
116 +
117    /** +
118     * attribute +
119     * sets or retrieves an option +
120     * +
121     * @see Doctrine::ATTR_* constants   availible attributes +
122     * @param mixed $attr +
123     * @param mixed $value +
124     * @return mixed +
125     */ +
126    public function attribute($attr, $value) +
127    { +
128        if ($value == null) { +
129            if (is_array($attr)) { +
130                foreach ($attr as $k => $v) { +
131                    $this->_table->setAttribute($k, $v); +
132                } +
133            } else { +
134                return $this->_table->getAttribute($attr); +
135            } +
136        } else { +
137            $this->_table->setAttribute($attr, $value); +
138        }     +
139    } +
140    /** +
141     * option +
142     * sets or retrieves an option +
143     * +
144     * @see Doctrine_Table::$options    availible options +
145     * @param mixed $name               the name of the option +
146     * @param mixed $value              options value +
147     * @return mixed +
148     */ +
149    public function option($name, $value = null) +
150    { +
151        if ($value === null) { +
152            if (is_array($name)) { +
153                foreach ($name as $k => $v) { +
154                    $this->_table->setOption($k, $v); +
155                } +
156            } else { +
157                return $this->_table->getOption($name); +
158            } +
159        } else { +
160            $this->_table->setOption($name, $value); +
161        } +
162    } +
163    /** +
164     * ownsOne +
165     * binds One-to-One composite relation +
166     * +
167     * @param string $componentName     the name of the related component +
168     * @param string $options           relation options +
169     * @see Doctrine_Relation::_$definition +
170     * @return Doctrine_Record          this object +
171     */ +
172    public function ownsOne() +
173    { +
174        $this->_table->bind(func_get_args(), Doctrine_Relation::ONE_COMPOSITE); +
175         +
176        return $this; +
177    } +
178    /** +
179     * ownsMany +
180     * binds One-to-Many / Many-to-Many composite relation +
181     * +
182     * @param string $componentName     the name of the related component +
183     * @param string $options           relation options +
184     * @see Doctrine_Relation::_$definition +
185     * @return Doctrine_Record          this object +
186     */ +
187    public function ownsMany() +
188    { +
189        $this->_table->bind(func_get_args(), Doctrine_Relation::MANY_COMPOSITE); +
190        return $this; +
191    } +
192    /** +
193     * hasOne +
194     * binds One-to-One aggregate relation +
195     * +
196     * @param string $componentName     the name of the related component +
197     * @param string $options           relation options +
198     * @see Doctrine_Relation::_$definition +
199     * @return Doctrine_Record          this object +
200     */ +
201    public function hasOne() +
202    { +
203        $this->_table->bind(func_get_args(), Doctrine_Relation::ONE_AGGREGATE); +
204 +
205        return $this; +
206    } +
207    /** +
208     * hasMany +
209     * binds One-to-Many / Many-to-Many aggregate relation +
210     * +
211     * @param string $componentName     the name of the related component +
212     * @param string $options           relation options +
213     * @see Doctrine_Relation::_$definition +
214     * @return Doctrine_Record          this object +
215     */ +
216    public function hasMany() +
217    { +
218        $this->_table->bind(func_get_args(), Doctrine_Relation::MANY_AGGREGATE); +
219 +
220        return $this; +
221    } +
222    /** +
223     * hasColumn +
224     * sets a column definition +
225     * +
226     * @param string $name +
227     * @param string $type +
228     * @param integer $length +
229     * @param mixed $options +
230     * @return void +
231     */ +
232    public function hasColumn($name, $type, $length = 2147483647, $options = "") +
233    { +
234        $this->_table->setColumn($name, $type, $length, $options); +
235    } +
236    public function hasColumns(array $definitions) +
237    { +
238        foreach ($definitions as $name => $options) { +
239            $this->hasColumn($name, $options['type'], $options['length'], $options); +
240        } +
241    }  +
242    /** +
243     * loadTemplate +
244     * +
245     * @param string $template +
246     */ +
247    public function loadTemplate($template, array $options = array()) +
248    { +
249        $this->actAs($template, $options); +
250    } +
251    /** +
252     * bindQueryParts +
253     * binds query parts to given component +
254     * +
255     * @param array $queryParts         an array of pre-bound query parts +
256     * @return Doctrine_Record          this object +
257     */ +
258    public function bindQueryParts(array $queryParts) +
259    { +
260     $this->_table->bindQueryParts($queryParts); +
261 +
262        return $this; +
263    } +
264    /** +
265     * actAs +
266     * loads a given plugin  +
267     * +
268     * @param mixed $tpl +
269     * @param array $options +
270     */ +
271    public function actAs($tpl, array $options = array()) +
272    { +
273 +
274        if ( ! is_object($tpl)) { +
275            if (class_exists($tpl, true)) { +
276                $tpl = new $tpl($options); +
277            } else { +
278                $className = 'Doctrine_Template_' . $tpl; +
279 +
280                if ( ! class_exists($className, true)) { +
281                    throw new Doctrine_Record_Exception("Couldn't load plugin."); +
282                } +
283 +
284 +
285                $tpl = new $className($options); +
286            } +
287        } +
288 +
289        if ( ! ($tpl instanceof Doctrine_Template)) { +
290            throw new Doctrine_Record_Exception('Loaded plugin class is not an istance of Doctrine_Template.'); +
291        } +
292        $className = get_class($tpl); +
293         +
294        $this->_table->addTemplate($className, $tpl); +
295 +
296        $tpl->setTable($this->_table); +
297        $tpl->setUp(); +
298        $tpl->setTableDefinition(); +
299 +
300        return $this; +
301    } +
302    /** +
303     * check +
304     * adds a check constraint +
305     * +
306     * @param mixed $constraint     either a SQL constraint portion or an array of CHECK constraints +
307     * @param string $name          optional constraint name +
308     * @return Doctrine_Record      this object +
309     */ +
310    public function check($constraint, $name = null) +
311    { +
312        if (is_array($constraint)) { +
313            foreach ($constraint as $name => $def) { +
314                $this->_table->addCheckConstraint($def, $name); +
315            } +
316        } else { +
317            $this->_table->addCheckConstraint($constraint, $name); +
318        } +
319        return $this; +
320    } +
321} +
\ No newline at end of file diff --git a/tests/coverage/Doctrine_Record_Exception.html b/tests/coverage/Doctrine_Record_Exception.html new file mode 100644 index 000000000..403625884 --- /dev/null +++ b/tests/coverage/Doctrine_Record_Exception.html @@ -0,0 +1,113 @@ + + + Coverage for Doctrine_Record_Exception + + +

Coverage for Doctrine_Record_Exception

Back to coverage report

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
1<?php +
2/* +
3 *  $Id: Exception.php 2702 2007-10-03 21:43:22Z Jonathan.Wage $ +
4 * +
5 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +
6 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +
7 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +
8 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +
9 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +
10 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +
11 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +
12 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +
13 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +
14 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +
15 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +
16 * +
17 * This software consists of voluntary contributions made by many individuals +
18 * and is licensed under the LGPL. For more information, see +
19 * <http://www.phpdoctrine.com>. +
20 */ +
21Doctrine::autoload('Doctrine_Exception'); +
22/** +
23 * Doctrine_Exception +
24 * +
25 * @package     Doctrine +
26 * @subpackage  Record +
27 * @license     http://www.opensource.org/licenses/lgpl-license.php LGPL +
28 * @link        www.phpdoctrine.com +
29 * @since       1.0 +
30 * @version     $Revision: 2702 $ +
31 * @author      Konsta Vesterinen <kvesteri@cc.hut.fi> +
32 */ +
33class Doctrine_Record_Exception extends Doctrine_Exception +
34{ }
\ No newline at end of file diff --git a/tests/coverage/Doctrine_Record_Filter.html b/tests/coverage/Doctrine_Record_Filter.html new file mode 100644 index 000000000..199986679 --- /dev/null +++ b/tests/coverage/Doctrine_Record_Filter.html @@ -0,0 +1,191 @@ + + + Coverage for Doctrine_Record_Filter + + +

Coverage for Doctrine_Record_Filter

Back to coverage report

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
1<?php +
2/* +
3 *  $Id: Record.php 1298 2007-05-01 19:26:03Z zYne $ +
4 * +
5 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +
6 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +
7 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +
8 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +
9 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +
10 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +
11 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +
12 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +
13 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +
14 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +
15 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +
16 * +
17 * This software consists of voluntary contributions made by many individuals +
18 * and is licensed under the LGPL. For more information, see +
19 * <http://www.phpdoctrine.com>. +
20 */ +
21 +
22/** +
23 * Doctrine_Record_Filter +
24 * Filters the record getters and setters +
25 * +
26 * @package     Doctrine +
27 * @subpackage  Record +
28 * @author      Konsta Vesterinen <kvesteri@cc.hut.fi> +
29 * @license     http://www.opensource.org/licenses/lgpl-license.php LGPL +
30 * @link        www.phpdoctrine.com +
31 * @since       1.0 +
32 * @version     $Revision: 1298 $ +
33 */ +
34abstract class Doctrine_Record_Filter +
35{ +
36    protected $_table; +
37 +
38    public function setTable(Doctrine_Table $table) +
39    { +
40        $this->_table = $table; +
41    } +
42    public function getTable() +
43    { +
44        return $this->_table; +
45    } +
46    /** +
47     * filterSet +
48     * defines an implementation for filtering the set() method of Doctrine_Record +
49     * +
50     * @param mixed $name                       name of the property or related component +
51     */ +
52    abstract public function filterSet(Doctrine_Record $record, $name, $value); +
53    /** +
54     * filterGet +
55     * defines an implementation for filtering the get() method of Doctrine_Record +
56     * +
57     * @param mixed $name                       name of the property or related component +
58     */ +
59    abstract public function filterGet(Doctrine_Record $record, $name); +
60}
\ No newline at end of file diff --git a/tests/coverage/Doctrine_Record_Filter_Compound.html b/tests/coverage/Doctrine_Record_Filter_Compound.html new file mode 100644 index 000000000..5de72a1b4 --- /dev/null +++ b/tests/coverage/Doctrine_Record_Filter_Compound.html @@ -0,0 +1,308 @@ + + + Coverage for Doctrine_Record_Filter_Compound + + +

Coverage for Doctrine_Record_Filter_Compound

Back to coverage report

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
1<?php +
2/* +
3 *  $Id: Record.php 1298 2007-05-01 19:26:03Z zYne $ +
4 * +
5 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +
6 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +
7 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +
8 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +
9 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +
10 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +
11 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +
12 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +
13 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +
14 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +
15 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +
16 * +
17 * This software consists of voluntary contributions made by many individuals +
18 * and is licensed under the LGPL. For more information, see +
19 * <http://www.phpdoctrine.com>. +
20 */ +
21 +
22/** +
23 * Doctrine_Record_Filter_Compound +
24 * +
25 * @package     Doctrine +
26 * @subpackage  Record +
27 * @author      Konsta Vesterinen <kvesteri@cc.hut.fi> +
28 * @license     http://www.opensource.org/licenses/lgpl-license.php LGPL +
29 * @link        www.phpdoctrine.com +
30 * @since       1.0 +
31 * @version     $Revision: 1298 $ +
32 */ +
33class Doctrine_Record_Filter_Compound extends Doctrine_Record_Filter +
34{ +
35    protected $_aliases = array(); +
36 +
37    public function __construct(array $aliases) +
38    { +
39        $this->_aliases = $aliases; +
40    } +
41    public function init() +
42    { +
43     // check that all aliases exist +
44     foreach ($this->_aliases as $alias) { +
45            $this->_table->getRelation($alias); +
46     } +
47    } +
48    /** +
49     * filterSet +
50     * defines an implementation for filtering the set() method of Doctrine_Record +
51     * +
52     * @param mixed $name                       name of the property or related component +
53     */ +
54    public function filterSet(Doctrine_Record $record, $name, $value) +
55    { +
56        foreach ($this->_aliases as $alias) { +
57            if ( ! $record->exists()) { +
58                if (isset($record[$alias][$name])) { +
59                    $record[$alias][$name] = $value; +
60                     +
61                    return $record; +
62                } +
63            } else { +
64                // we do not want to execute N + 1 queries here, hence we cannot use get() +
65                if (($ref = $record->reference($alias)) !== null) { +
66                    if (isset($ref[$name])) { +
67                        $ref[$name] = $value; +
68                    } +
69                     +
70                    return $record; +
71                } +
72            } +
73        } +
74    } +
75 +
76    /** +
77     * filterGet +
78     * defines an implementation for filtering the get() method of Doctrine_Record +
79     * +
80     * @param mixed $name                       name of the property or related component +
81     */ +
82    public function filterGet(Doctrine_Record $record, $name) +
83    { +
84        foreach ($this->_aliases as $alias) { +
85            if ( ! $record->exists()) { +
86                if (isset($record[$alias][$name])) { +
87                    return $record[$alias][$name]; +
88                } +
89            } else { +
90                // we do not want to execute N + 1 queries here, hence we cannot use get() +
91                if (($ref = $record->reference($alias)) !== null) { +
92                    if (isset($ref[$name])) { +
93                        return $ref[$name]; +
94                    } +
95                } +
96            } +
97        } +
98    } +
99}
\ No newline at end of file diff --git a/tests/coverage/Doctrine_Record_Filter_Standard.html b/tests/coverage/Doctrine_Record_Filter_Standard.html new file mode 100644 index 000000000..d32e929fc --- /dev/null +++ b/tests/coverage/Doctrine_Record_Filter_Standard.html @@ -0,0 +1,179 @@ + + + Coverage for Doctrine_Record_Filter_Standard + + +

Coverage for Doctrine_Record_Filter_Standard

Back to coverage report

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
1<?php +
2/* +
3 *  $Id: Record.php 1298 2007-05-01 19:26:03Z zYne $ +
4 * +
5 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +
6 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +
7 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +
8 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +
9 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +
10 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +
11 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +
12 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +
13 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +
14 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +
15 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +
16 * +
17 * This software consists of voluntary contributions made by many individuals +
18 * and is licensed under the LGPL. For more information, see +
19 * <http://www.phpdoctrine.com>. +
20 */ +
21 +
22/** +
23 * Doctrine_Record_Filter_Standard +
24 * Filters the record getters and setters +
25 * +
26 * @package     Doctrine +
27 * @subpackage  Record +
28 * @author      Konsta Vesterinen <kvesteri@cc.hut.fi> +
29 * @license     http://www.opensource.org/licenses/lgpl-license.php LGPL +
30 * @link        www.phpdoctrine.com +
31 * @since       1.0 +
32 * @version     $Revision: 1298 $ +
33 */ +
34class Doctrine_Record_Filter_Standard extends Doctrine_Record_Filter +
35{ +
36    /** +
37     * filterSet +
38     * defines an implementation for filtering the set() method of Doctrine_Record +
39     * +
40     * @param mixed $name                       name of the property or related component +
41     */ +
42    public function filterSet(Doctrine_Record $record, $name, $value) +
43    { +
44        throw new Doctrine_Record_Exception('Unknown record property / related component \'' . $name . '\'.'); +
45    } +
46    /** +
47     * filterGet +
48     * defines an implementation for filtering the get() method of Doctrine_Record +
49     * +
50     * @param mixed $name                       name of the property or related component +
51     */ +
52    public function filterGet(Doctrine_Record $record, $name) +
53    { +
54        throw new Doctrine_Record_Exception('Unknown record property / related component \'' . $name . '\'.'); +
55    } +
56}
\ No newline at end of file diff --git a/tests/coverage/Doctrine_Record_Iterator.html b/tests/coverage/Doctrine_Record_Iterator.html new file mode 100644 index 000000000..b3a2d3116 --- /dev/null +++ b/tests/coverage/Doctrine_Record_Iterator.html @@ -0,0 +1,242 @@ + + + Coverage for Doctrine_Record_Iterator + + +

Coverage for Doctrine_Record_Iterator

Back to coverage report

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
1<?php +
2/* +
3 *  $Id: Iterator.php 2702 2007-10-03 21:43:22Z Jonathan.Wage $ +
4 * +
5 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +
6 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +
7 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +
8 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +
9 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +
10 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +
11 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +
12 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +
13 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +
14 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +
15 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +
16 * +
17 * This software consists of voluntary contributions made by many individuals +
18 * and is licensed under the LGPL. For more information, see +
19 * <http://www.phpdoctrine.com>. +
20 */ +
21 +
22/** +
23 * Doctrine_Record_Iterator +
24 * +
25 * @package     Doctrine +
26 * @subpackage  Record +
27 * @author      Konsta Vesterinen <kvesteri@cc.hut.fi> +
28 * @license     http://www.opensource.org/licenses/lgpl-license.php LGPL +
29 * @link        www.phpdoctrine.com +
30 * @since       1.0 +
31 * @version     $Revision: 2702 $ +
32 */ +
33class Doctrine_Record_Iterator extends ArrayIterator +
34{ +
35    /** +
36     * @var Doctrine_Record $record +
37     */ +
38    private $record; +
39    /** +
40     * @var Doctrine_Null $null +
41     */ +
42    private static $null; +
43    /** +
44     * constructor +
45     * +
46     * @param Doctrine_Record $record +
47     */ +
48    public function __construct(Doctrine_Record $record) +
49    { +
50        $this->record = $record; +
51        parent::__construct($record->getData()); +
52    } +
53    /** +
54     * initNullObject +
55     * +
56     * @param Doctrine_Null $null +
57     */ +
58    public static function initNullObject(Doctrine_Null $null) +
59    { +
60        self::$null = $null; +
61    } +
62    /** +
63     * current +
64     * +
65     * @return mixed +
66     */ +
67    public function current() +
68    { +
69        $value = parent::current(); +
70 +
71        if ($value === self::$null) { +
72            return null; +
73        } else { +
74            return $value; +
75        } +
76    } +
77}
\ No newline at end of file diff --git a/tests/coverage/Doctrine_Record_Listener.html b/tests/coverage/Doctrine_Record_Listener.html new file mode 100644 index 000000000..bc40c65ea --- /dev/null +++ b/tests/coverage/Doctrine_Record_Listener.html @@ -0,0 +1,240 @@ + + + Coverage for Doctrine_Record_Listener + + +

Coverage for Doctrine_Record_Listener

Back to coverage report

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
1<?php +
2/* +
3 *  $Id$ +
4 * +
5 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +
6 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +
7 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +
8 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +
9 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +
10 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +
11 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +
12 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +
13 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +
14 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +
15 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +
16 * +
17 * This software consists of voluntary contributions made by many individuals +
18 * and is licensed under the LGPL. For more information, see +
19 * <http://www.phpdoctrine.com>. +
20 */ +
21 +
22/** +
23 * Doctrine_Record_Listener +
24 * +
25 * @package     Doctrine +
26 * @subpackage  Record +
27 * @author      Konsta Vesterinen <kvesteri@cc.hut.fi> +
28 * @license     http://www.opensource.org/licenses/lgpl-license.php LGPL +
29 * @link        www.phpdoctrine.com +
30 * @since       1.0 +
31 * @version     $Revision$ +
32 */ +
33class Doctrine_Record_Listener implements Doctrine_Record_Listener_Interface +
34{ +
35    public function preSerialize(Doctrine_Event $event) +
36    { } +
37 +
38    public function postSerialize(Doctrine_Event $event) +
39    { } +
40 +
41    public function preUnserialize(Doctrine_Event $event) +
42    { } +
43 +
44    public function postUnserialize(Doctrine_Event $event) +
45    { } +
46 +
47    public function preSave(Doctrine_Event $event) +
48    { } +
49 +
50    public function postSave(Doctrine_Event $event) +
51    { } +
52 +
53    public function preDelete(Doctrine_Event $event) +
54    { } +
55 +
56    public function postDelete(Doctrine_Event $event) +
57    { } +
58 +
59    public function preUpdate(Doctrine_Event $event) +
60    { } +
61 +
62    public function postUpdate(Doctrine_Event $event) +
63    { } +
64 +
65    public function preInsert(Doctrine_Event $event) +
66    { } +
67 +
68    public function postInsert(Doctrine_Event $event) +
69    { } +
70     +
71    public function preHydrate(Doctrine_Event $event) +
72    { } +
73     +
74    public function postHydrate(Doctrine_Event $event) +
75    { } +
76} +
\ No newline at end of file diff --git a/tests/coverage/Doctrine_Record_Listener_Chain.html b/tests/coverage/Doctrine_Record_Listener_Chain.html new file mode 100644 index 000000000..38fc2a69a --- /dev/null +++ b/tests/coverage/Doctrine_Record_Listener_Chain.html @@ -0,0 +1,570 @@ + + + Coverage for Doctrine_Record_Listener_Chain + + +

Coverage for Doctrine_Record_Listener_Chain

Back to coverage report

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
1<?php +
2/* +
3 *  $Id$ +
4 * +
5 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +
6 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +
7 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +
8 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +
9 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +
10 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +
11 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +
12 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +
13 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +
14 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +
15 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +
16 * +
17 * This software consists of voluntary contributions made by many individuals +
18 * and is licensed under the LGPL. For more information, see +
19 * <http://www.phpdoctrine.com>. +
20 */ +
21Doctrine::autoload('Doctrine_Access'); +
22 +
23/** +
24 * Doctrine_Record_Listener_Chain +
25 * this class represents a chain of different listeners, +
26 * useful for having multiple listeners listening the events at the same time +
27 * +
28 * @package     Doctrine +
29 * @subpackage  Record +
30 * @author      Konsta Vesterinen <kvesteri@cc.hut.fi> +
31 * @license     http://www.opensource.org/licenses/lgpl-license.php LGPL +
32 * @link        www.phpdoctrine.com +
33 * @since       1.0 +
34 * @version     $Revision$ +
35 */ +
36class Doctrine_Record_Listener_Chain extends Doctrine_Access implements Doctrine_Record_Listener_Interface +
37{ +
38    /** +
39     * @var array $listeners        an array containing all listeners +
40     */ +
41    protected $_listeners = array(); +
42    /** +
43     * add +
44     * adds a listener to the chain of listeners +
45     * +
46     * @param object $listener +
47     * @param string $name +
48     * @return void +
49     */ +
50    public function add($listener, $name = null) +
51    { +
52        if ( ! ($listener instanceof Doctrine_Record_Listener_Interface) && +
53             ! ($listener instanceof Doctrine_Overloadable)) { +
54             +
55            throw new Doctrine_EventListener_Exception("Couldn't add eventlistener. Record listeners should implement either Doctrine_EventListener_Interface or Doctrine_Overloadable"); +
56        } +
57        if ($name === null) { +
58            $this->_listeners[] = $listener; +
59        } else { +
60            $this->_listeners[$name] = $listener; +
61        } +
62    } +
63    /** +
64     * returns a Doctrine_Record_Listener on success +
65     * and null on failure +
66     * +
67     * @param mixed $key +
68     * @return mixed +
69     */ +
70    public function get($key) +
71    { +
72        if ( ! isset($this->_listeners[$key])) { +
73            return null; +
74        } +
75        return $this->_listeners[$key]; +
76    } +
77    /** +
78     * set +
79     * +
80     * @param mixed $key +
81     * @param Doctrine_Record_Listener $listener    listener to be added +
82     * @return Doctrine_Record_Listener_Chain       this object +
83     */ +
84    public function set($key, Doctrine_EventListener $listener) +
85    { +
86        $this->_listeners[$key] = $listener; +
87    } +
88 +
89    public function preSerialize(Doctrine_Event $event) +
90    {  +
91        foreach ($this->_listeners as $listener) { +
92            $listener->preSerialize($event); +
93        } +
94    } +
95 +
96    public function postSerialize(Doctrine_Event $event) +
97    {  +
98        foreach ($this->_listeners as $listener) { +
99            $listener->preSerialize($event); +
100        } +
101    } +
102 +
103    public function preUnserialize(Doctrine_Event $event) +
104    {  +
105        foreach ($this->_listeners as $listener) { +
106            $listener->preUnserialize($event); +
107        } +
108    } +
109 +
110    public function postUnserialize(Doctrine_Event $event) +
111    {  +
112        foreach ($this->_listeners as $listener) { +
113            $listener->postUnserialize($event); +
114        } +
115    } +
116 +
117    public function preSave(Doctrine_Event $event) +
118    {  +
119        foreach ($this->_listeners as $listener) { +
120            $listener->preSave($event); +
121        } +
122    } +
123 +
124    public function postSave(Doctrine_Event $event) +
125    {  +
126        foreach ($this->_listeners as $listener) { +
127            $listener->postSave($event); +
128        } +
129    } +
130 +
131    public function preDelete(Doctrine_Event $event) +
132    {  +
133        foreach ($this->_listeners as $listener) { +
134            $listener->preDelete($event); +
135        } +
136    } +
137 +
138    public function postDelete(Doctrine_Event $event) +
139    { +
140        foreach ($this->_listeners as $listener) { +
141            $listener->postDelete($event); +
142        } +
143    } +
144 +
145    public function preUpdate(Doctrine_Event $event) +
146    {  +
147        foreach ($this->_listeners as $listener) { +
148            $listener->preUpdate($event); +
149        } +
150    } +
151 +
152    public function postUpdate(Doctrine_Event $event) +
153    {  +
154        foreach ($this->_listeners as $listener) { +
155            $listener->postUpdate($event); +
156        } +
157    } +
158 +
159    public function preInsert(Doctrine_Event $event) +
160    {  +
161        foreach ($this->_listeners as $listener) { +
162            $listener->preInsert($event); +
163        } +
164    } +
165 +
166    public function postInsert(Doctrine_Event $event) +
167    {  +
168        foreach ($this->_listeners as $listener) { +
169            $listener->postInsert($event); +
170        } +
171    } +
172     +
173 +
174    public function preHydrate(Doctrine_Event $event) +
175    {  +
176        foreach ($this->_listeners as $listener) { +
177            $listener->preHydrate($event); +
178        } +
179    } +
180    public function postHydrate(Doctrine_Event $event) +
181    { +
182        foreach ($this->_listeners as $listener) { +
183            $listener->postHydrate($event); +
184        } +
185    } +
186} +
\ No newline at end of file diff --git a/tests/coverage/Doctrine_Relation.html b/tests/coverage/Doctrine_Relation.html new file mode 100644 index 000000000..0e013d3af --- /dev/null +++ b/tests/coverage/Doctrine_Relation.html @@ -0,0 +1,950 @@ + + + Coverage for Doctrine_Relation + + +

Coverage for Doctrine_Relation

Back to coverage report

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
1<?php +
2/* +
3 *  $Id: Relation.php 2702 2007-10-03 21:43:22Z Jonathan.Wage $ +
4 * +
5 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +
6 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +
7 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +
8 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +
9 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +
10 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +
11 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +
12 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +
13 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +
14 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +
15 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +
16 * +
17 * This software consists of voluntary contributions made by many individuals +
18 * and is licensed under the LGPL. For more information, see +
19 * <http://www.phpdoctrine.com>. +
20 */ +
21/** +
22 * Doctrine_Relation +
23 * This class represents a relation between components +
24 * +
25 * @package     Doctrine +
26 * @subpackage  Relation +
27 * @license     http://www.opensource.org/licenses/lgpl-license.php LGPL +
28 * @link        www.phpdoctrine.com +
29 * @since       1.0 +
30 * @version     $Revision: 2702 $ +
31 * @author      Konsta Vesterinen <kvesteri@cc.hut.fi> +
32 */ +
33abstract class Doctrine_Relation implements ArrayAccess +
34{ +
35    /** +
36     * RELATION CONSTANTS +
37     */ +
38 +
39    /** +
40     * constant for ONE_TO_ONE and MANY_TO_ONE aggregate relationships +
41     */ +
42    const ONE_AGGREGATE         = 0; +
43    /** +
44     * constant for ONE_TO_ONE and MANY_TO_ONE composite relationships +
45     */ +
46    const ONE_COMPOSITE         = 1; +
47    /** +
48     * constant for MANY_TO_MANY and ONE_TO_MANY aggregate relationships +
49     */ +
50    const MANY_AGGREGATE        = 2; +
51    /** +
52     * constant for MANY_TO_MANY and ONE_TO_MANY composite relationships +
53     */ +
54    const MANY_COMPOSITE        = 3; +
55 +
56    const ONE   = 0; +
57    const MANY  = 2; +
58     +
59    protected $definition = array('alias'       => true, +
60                                  'foreign'     => true, +
61                                  'local'       => true, +
62                                  'class'       => true, +
63                                  'type'        => true, +
64                                  'table'       => true, +
65                                  'name'        => false, +
66                                  'refTable'    => false, +
67                                  'onDelete'    => false, +
68                                  'onUpdate'    => false, +
69                                  'deferred'    => false, +
70                                  'deferrable'  => false, +
71                                  'constraint'  => false, +
72                                  'equal'       => false, +
73                                  ); +
74    /** +
75     * constructor +
76     * +
77     * @param array $definition         an associative array with the following structure: +
78     *          name                    foreign key constraint name +
79     * +
80     *          local                   the local field(s) +
81     * +
82     *          foreign                 the foreign reference field(s) +
83     * +
84     *          table                   the foreign table object +
85     * +
86     *          refTable                the reference table object (if any) +
87     * +
88     *          onDelete                referential delete action +
89     *   +
90     *          onUpdate                referential update action +
91     * +
92     *          deferred                deferred constraint checking  +
93     * +
94     *          alias                   relation alias +
95     * +
96     *          type                    the relation type, either Doctrine_Relation::ONE or Doctrine_Relation::MANY +
97     * +
98     *          constraint              boolean value, true if the relation has an explicit referential integrity constraint +
99     * +
100     * The onDelete and onUpdate keys accept the following values: +
101     * +
102     * CASCADE: Delete or update the row from the parent table and automatically delete or +
103     *          update the matching rows in the child table. Both ON DELETE CASCADE and ON UPDATE CASCADE are supported. +
104     *          Between two tables, you should not define several ON UPDATE CASCADE clauses that act on the same column +
105     *          in the parent table or in the child table. +
106     * +
107     * SET NULL: Delete or update the row from the parent table and set the foreign key column or columns in the +
108     *          child table to NULL. This is valid only if the foreign key columns do not have the NOT NULL qualifier  +
109     *          specified. Both ON DELETE SET NULL and ON UPDATE SET NULL clauses are supported. +
110     * +
111     * NO ACTION: In standard SQL, NO ACTION means no action in the sense that an attempt to delete or update a primary  +
112     *           key value is not allowed to proceed if there is a related foreign key value in the referenced table. +
113     * +
114     * RESTRICT: Rejects the delete or update operation for the parent table. NO ACTION and RESTRICT are the same as +
115     *           omitting the ON DELETE or ON UPDATE clause. +
116     * +
117     * SET DEFAULT +
118     */ +
119    public function __construct(array $definition) +
120    { +
121        $def = array(); +
122        foreach ($this->definition as $key => $val) { +
123            if ( ! isset($definition[$key]) && $val) { +
124                throw new Doctrine_Exception($key . ' is required!'); +
125            } +
126            if (isset($definition[$key])) { +
127                $def[$key] = $definition[$key]; +
128            } else { +
129                $def[$key] = null;           +
130            } +
131        } +
132 +
133        $this->definition = $def; +
134    } +
135    /** +
136     * hasConstraint +
137     * whether or not this relation has an explicit constraint +
138     * +
139     * @return boolean +
140     */ +
141    public function hasConstraint() +
142    { +
143        return ($this->definition['constraint'] || +
144                ($this->definition['onUpdate']) || +
145                ($this->definition['onDelete'])); +
146    } +
147    public function isDeferred() +
148    { +
149        return $this->definition['deferred']; +
150    } +
151 +
152    public function isDeferrable() +
153    { +
154        return $this->definition['deferrable']; +
155    } +
156    public function isEqual() +
157    { +
158        return $this->definition['equal']; +
159    } +
160 +
161    public function offsetExists($offset) +
162    { +
163        return isset($this->definition[$offset]); +
164    } +
165 +
166    public function offsetGet($offset) +
167    { +
168        if (isset($this->definition[$offset])) { +
169            return $this->definition[$offset]; +
170        } +
171         +
172        return null; +
173    } +
174 +
175    public function offsetSet($offset, $value) +
176    { +
177        if (isset($this->definition[$offset])) { +
178            $this->definition[$offset] = $value; +
179        } +
180    } +
181 +
182    public function offsetUnset($offset) +
183    { +
184        $this->definition[$offset] = false; +
185    } +
186    /** +
187     * toArray +
188     * +
189     * @return array +
190     */ +
191    public function toArray()  +
192    { +
193        return $this->definition; +
194    } +
195    /** +
196     * getAlias +
197     * returns the relation alias +
198     * +
199     * @return string +
200     */ +
201    final public function getAlias() +
202    { +
203        return $this->definition['alias']; +
204    } +
205    /** +
206     * getType +
207     * returns the relation type, either 0 or 1 +
208     * +
209     * @see Doctrine_Relation MANY_* and ONE_* constants +
210     * @return integer +
211     */ +
212    final public function getType() +
213    { +
214        return $this->definition['type']; +
215    } +
216    /** +
217     * getTable +
218     * returns the foreign table object +
219     * +
220     * @return object Doctrine_Table +
221     */ +
222    final public function getTable() +
223    { +
224        return Doctrine_Manager::getInstance() +
225               ->getConnectionForComponent($this->definition['class']) +
226               ->getTable($this->definition['class']); +
227    } +
228    /** +
229     * getLocal +
230     * returns the name of the local column +
231     * +
232     * @return string +
233     */ +
234    final public function getLocal() +
235    { +
236        return $this->definition['local']; +
237    } +
238    /** +
239     * getForeign +
240     * returns the name of the foreignkey column where +
241     * the localkey column is pointing at +
242     * +
243     * @return string +
244     */ +
245    final public function getForeign() +
246    { +
247        return $this->definition['foreign']; +
248    } +
249    /** +
250     * isComposite +
251     * returns whether or not this relation is a composite relation +
252     * +
253     * @return boolean +
254     */ +
255    final public function isComposite() +
256    { +
257        return ($this->definition['type'] == Doctrine_Relation::ONE_COMPOSITE || +
258                $this->definition['type'] == Doctrine_Relation::MANY_COMPOSITE); +
259    } +
260    /** +
261     * isOneToOne +
262     * returns whether or not this relation is a one-to-one relation +
263     * +
264     * @return boolean +
265     */ +
266    final public function isOneToOne() +
267    { +
268        return ($this->definition['type'] == Doctrine_Relation::ONE_AGGREGATE || +
269                $this->definition['type'] == Doctrine_Relation::ONE_COMPOSITE); +
270    } +
271    /** +
272     * getRelationDql +
273     * +
274     * @param integer $count +
275     * @return string +
276     */ +
277    public function getRelationDql($count) +
278    { +
279        $component = $this->getTable()->getComponentName(); +
280 +
281        $dql  = 'FROM ' . $component +
282              . ' WHERE ' . $component . '.' . $this->definition['foreign'] +
283              . ' IN (' . substr(str_repeat('?, ', $count), 0, -2) . ')'; +
284 +
285        return $dql; +
286    } +
287    /** +
288     * fetchRelatedFor +
289     * +
290     * fetches a component related to given record +
291     * +
292     * @param Doctrine_Record $record +
293     * @return Doctrine_Record|Doctrine_Collection +
294     */ +
295    abstract public function fetchRelatedFor(Doctrine_Record $record); +
296    /** +
297     * __toString +
298     * +
299     * @return string +
300     */ +
301    public function __toString() +
302    { +
303        $r[] = "<pre>"; +
304        foreach ($this->definition as $k => $v) { +
305            if (is_object($v)) { +
306                $v = 'Object(' . get_class($v) . ')'; +
307            } +
308            $r[] = $k . ' : ' . $v; +
309        } +
310        $r[] = "</pre>"; +
311        return implode("\n", $r); +
312    } +
313}
\ No newline at end of file diff --git a/tests/coverage/Doctrine_Relation_Association.html b/tests/coverage/Doctrine_Relation_Association.html new file mode 100644 index 000000000..8e8557a6f --- /dev/null +++ b/tests/coverage/Doctrine_Relation_Association.html @@ -0,0 +1,293 @@ + + + Coverage for Doctrine_Relation_Association + + +

Coverage for Doctrine_Relation_Association

Back to coverage report

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
1<?php +
2/* +
3 *  $Id: Association.php 2702 2007-10-03 21:43:22Z Jonathan.Wage $ +
4 * +
5 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +
6 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +
7 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +
8 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +
9 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +
10 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +
11 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +
12 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +
13 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +
14 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +
15 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +
16 * +
17 * This software consists of voluntary contributions made by many individuals +
18 * and is licensed under the LGPL. For more information, see +
19 * <http://www.phpdoctrine.com>. +
20 */ +
21Doctrine::autoload('Doctrine_Relation'); +
22/** +
23 * Doctrine_Relation_Association    this class takes care of association mapping +
24 *                         (= many-to-many relationships, where the relationship is handled with an additional relational table +
25 *                         which holds 2 foreign keys) +
26 * +
27 * +
28 * @package     Doctrine +
29 * @subpackage  Relation +
30 * @license     http://www.opensource.org/licenses/lgpl-license.php LGPL +
31 * @link        www.phpdoctrine.com +
32 * @since       1.0 +
33 * @version     $Revision: 2702 $ +
34 * @author      Konsta Vesterinen <kvesteri@cc.hut.fi> +
35 */ +
36class Doctrine_Relation_Association extends Doctrine_Relation +
37{ +
38    /** +
39     * @return Doctrine_Table +
40     */ +
41    public function getAssociationFactory() +
42    { +
43        return $this->definition['refTable']; +
44    } +
45    public function getAssociationTable() +
46    { +
47        return $this->definition['refTable']; +
48    } +
49    /** +
50     * getRelationDql +
51     * +
52     * @param integer $count +
53     * @return string +
54     */ +
55    public function getRelationDql($count, $context = 'record') +
56    { +
57        $component = $this->definition['refTable']->getComponentName(); +
58        switch ($context) { +
59            case "record": +
60                $sub  = substr(str_repeat("?, ", $count),0,-2); +
61                $dql  = 'FROM ' . $this->getTable()->getComponentName(); +
62                $dql .= '.' . $component; +
63                $dql .= ' WHERE ' . $this->getTable()->getComponentName() +
64                . '.' . $component . '.' . $this->definition['local'] . ' IN (' . $sub . ')'; +
65                break; +
66            case "collection": +
67                $sub  = substr(str_repeat("?, ", $count),0,-2); +
68                $dql  = 'FROM ' . $component . '.' . $this->getTable()->getComponentName(); +
69                $dql .= ' WHERE ' . $component . '.' . $this->definition['local'] . ' IN (' . $sub . ')'; +
70                break; +
71        } +
72 +
73        return $dql; +
74    } +
75    /** +
76     * fetchRelatedFor +
77     * +
78     * fetches a component related to given record +
79     * +
80     * @param Doctrine_Record $record +
81     * @return Doctrine_Record|Doctrine_Collection +
82     */ +
83    public function fetchRelatedFor(Doctrine_Record $record) +
84    { +
85        $id = $record->getIncremented(); +
86        if (empty($id) || ! $this->definition['table']->getAttribute(Doctrine::ATTR_LOAD_REFERENCES)) { +
87            $coll = new Doctrine_Collection($this->getTable()); +
88        } else { +
89            $coll = Doctrine_Query::create()->parseQuery($this->getRelationDql(1))->execute(array($id)); +
90        } +
91        $coll->setReference($record, $this); +
92        return $coll; +
93    } +
94}
\ No newline at end of file diff --git a/tests/coverage/Doctrine_Relation_Exception.html b/tests/coverage/Doctrine_Relation_Exception.html new file mode 100644 index 000000000..47a4d3b61 --- /dev/null +++ b/tests/coverage/Doctrine_Relation_Exception.html @@ -0,0 +1,113 @@ + + + Coverage for Doctrine_Relation_Exception + + +

Coverage for Doctrine_Relation_Exception

Back to coverage report

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
1<?php +
2/* +
3 *  $Id: Exception.php 1344 2007-05-12 23:27:16Z zYne $ +
4 * +
5 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +
6 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +
7 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +
8 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +
9 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +
10 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +
11 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +
12 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +
13 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +
14 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +
15 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +
16 * +
17 * This software consists of voluntary contributions made by many individuals +
18 * and is licensed under the LGPL. For more information, see +
19 * <http://www.phpdoctrine.com>. +
20 */         +
21Doctrine::autoload('Doctrine_Exception'); +
22/** +
23 * Doctrine_Relation_Exception +
24 * +
25 * @package     Doctrine +
26 * @subpackage  Relation +
27 * @license     http://www.opensource.org/licenses/lgpl-license.php LGPL +
28 * @link        www.phpdoctrine.com +
29 * @since       1.0 +
30 * @version     $Revision: 1344 $ +
31 * @author      Konsta Vesterinen <kvesteri@cc.hut.fi> +
32 */ +
33class Doctrine_Relation_Exception extends Doctrine_Exception +
34{ }
\ No newline at end of file diff --git a/tests/coverage/Doctrine_Relation_ForeignKey.html b/tests/coverage/Doctrine_Relation_ForeignKey.html new file mode 100644 index 000000000..ab577e15f --- /dev/null +++ b/tests/coverage/Doctrine_Relation_ForeignKey.html @@ -0,0 +1,305 @@ + + + Coverage for Doctrine_Relation_ForeignKey + + +

Coverage for Doctrine_Relation_ForeignKey

Back to coverage report

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
1<?php +
2/* +
3 *  $Id: ForeignKey.php 2702 2007-10-03 21:43:22Z Jonathan.Wage $ +
4 * +
5 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +
6 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +
7 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +
8 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +
9 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +
10 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +
11 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +
12 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +
13 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +
14 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +
15 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +
16 * +
17 * This software consists of voluntary contributions made by many individuals +
18 * and is licensed under the LGPL. For more information, see +
19 * <http://www.phpdoctrine.com>. +
20 */ +
21Doctrine::autoload('Doctrine_Relation'); +
22/** +
23 * Doctrine_Relation_ForeignKey +
24 * This class represents a foreign key relation +
25 * +
26 * @package     Doctrine +
27 * @subpackage  Relation +
28 * @author      Konsta Vesterinen <kvesteri@cc.hut.fi> +
29 * @license     http://www.opensource.org/licenses/lgpl-license.php LGPL +
30 * @link        www.phpdoctrine.com +
31 * @since       1.0 +
32 * @version     $Revision: 2702 $ +
33 */ +
34class Doctrine_Relation_ForeignKey extends Doctrine_Relation +
35{ +
36    /** +
37     * fetchRelatedFor +
38     * +
39     * fetches a component related to given record +
40     * +
41     * @param Doctrine_Record $record +
42     * @return Doctrine_Record|Doctrine_Collection +
43     */ +
44    public function fetchRelatedFor(Doctrine_Record $record) +
45    { +
46        $id = array(); +
47        foreach ((array) $this->definition['local'] as $local) { +
48           $value = $record->get($local); +
49           if (isset($value)) { +
50               $id[] = $value; +
51           } +
52        } +
53        if ($this->isOneToOne()) { +
54            if ( ! $record->exists() || empty($id) ||  +
55                 ! $this->definition['table']->getAttribute(Doctrine::ATTR_LOAD_REFERENCES)) { +
56                 +
57                $related = $this->getTable()->create(); +
58            } else { +
59                $dql  = 'FROM ' . $this->getTable()->getComponentName() +
60                      . ' WHERE ' . $this->getCondition(); +
61 +
62                $coll = $this->getTable()->getConnection()->query($dql, $id); +
63                $related = $coll[0]; +
64            } +
65 +
66            $related->set($this->definition['foreign'], $record, false); +
67 +
68        } else { +
69 +
70            if ( ! $record->exists() || empty($id) ||  +
71                 ! $this->definition['table']->getAttribute(Doctrine::ATTR_LOAD_REFERENCES)) { +
72                 +
73                $related = new Doctrine_Collection($this->getTable()); +
74            } else { +
75                $query      = $this->getRelationDql(1); +
76                $related    = $this->getTable()->getConnection()->query($query, $id); +
77            } +
78            $related->setReference($record, $this); +
79        } +
80        return $related; +
81    } +
82    /** +
83     * getCondition +
84     * +
85     * @param string $alias +
86     */ +
87    public function getCondition($alias = null) +
88    { +
89        if ( ! $alias) { +
90           $alias = $this->getTable()->getComponentName(); +
91        } +
92        $conditions = array(); +
93        foreach ((array) $this->definition['foreign'] as $foreign) { +
94            $conditions[] = $alias . '.' . $foreign . ' = ?'; +
95        } +
96        return implode(' AND ', $conditions); +
97    } +
98}
\ No newline at end of file diff --git a/tests/coverage/Doctrine_Relation_LocalKey.html b/tests/coverage/Doctrine_Relation_LocalKey.html new file mode 100644 index 000000000..0e3305fb0 --- /dev/null +++ b/tests/coverage/Doctrine_Relation_LocalKey.html @@ -0,0 +1,254 @@ + + + Coverage for Doctrine_Relation_LocalKey + + +

Coverage for Doctrine_Relation_LocalKey

Back to coverage report

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
1<?php +
2/* +
3 *  $Id: LocalKey.php 2702 2007-10-03 21:43:22Z Jonathan.Wage $ +
4 * +
5 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +
6 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +
7 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +
8 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +
9 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +
10 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +
11 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +
12 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +
13 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +
14 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +
15 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +
16 * +
17 * This software consists of voluntary contributions made by many individuals +
18 * and is licensed under the LGPL. For more information, see +
19 * <http://www.phpdoctrine.com>. +
20 */ +
21Doctrine::autoload('Doctrine_Relation'); +
22/** +
23 * Doctrine_Relation_LocalKey +
24 * This class represents a local key relation +
25 * +
26 * @package     Doctrine +
27 * @subpackage  Relation +
28 * @author      Konsta Vesterinen <kvesteri@cc.hut.fi> +
29 * @license     http://www.opensource.org/licenses/lgpl-license.php LGPL +
30 * @link        www.phpdoctrine.com +
31 * @since       1.0 +
32 * @version     $Revision: 2702 $ +
33 */ +
34class Doctrine_Relation_LocalKey extends Doctrine_Relation +
35{ +
36    /** +
37     * fetchRelatedFor +
38     * +
39     * fetches a component related to given record +
40     * +
41     * @param Doctrine_Record $record +
42     * @return Doctrine_Record|Doctrine_Collection +
43     */ +
44    public function fetchRelatedFor(Doctrine_Record $record) +
45    { +
46        $id = $record->get($this->definition['local']); +
47 +
48        if (empty($id) || ! $this->definition['table']->getAttribute(Doctrine::ATTR_LOAD_REFERENCES)) { +
49            $related = $this->getTable()->create(); +
50        } else { +
51            $dql  = 'FROM ' . $this->getTable()->getComponentName() +
52                 . ' WHERE ' . $this->getCondition(); +
53 +
54            $related = $this->getTable() +
55                            ->getConnection() +
56                            ->query($dql, array($id)) +
57                            ->getFirst(); +
58             +
59            if ( ! $related || empty($related)) { +
60                $related = $this->getTable()->create(); +
61            } +
62        } +
63 +
64        $record->set($this->definition['local'], $related, false); +
65 +
66        return $related; +
67    } +
68     +
69    /** +
70     * getCondition +
71     * +
72     * @param string $alias +
73     */ +
74    public function getCondition($alias = null) +
75    { +
76        if ( ! $alias) { +
77           $alias = $this->getTable()->getComponentName(); +
78        } +
79        return $alias . '.' . $this->definition['foreign'] . ' = ?'; +
80    } +
81}
\ No newline at end of file diff --git a/tests/coverage/Doctrine_Relation_Nest.html b/tests/coverage/Doctrine_Relation_Nest.html new file mode 100644 index 000000000..47466d08b --- /dev/null +++ b/tests/coverage/Doctrine_Relation_Nest.html @@ -0,0 +1,437 @@ + + + Coverage for Doctrine_Relation_Nest + + +

Coverage for Doctrine_Relation_Nest

Back to coverage report

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
1<?php +
2/* +
3 *  $Id: Self.php 1434 2007-05-22 15:57:17Z zYne $ +
4 * +
5 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +
6 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +
7 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +
8 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +
9 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +
10 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +
11 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +
12 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +
13 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +
14 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +
15 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +
16 * +
17 * This software consists of voluntary contributions made by many individuals +
18 * and is licensed under the LGPL. For more information, see +
19 * <http://www.phpdoctrine.com>. +
20 */ +
21Doctrine::autoload('Doctrine_Relation_Association'); +
22/** +
23 * Doctrine_Relation_Association_Self +
24 * +
25 * @package     Doctrine +
26 * @subpackage  Relation +
27 * @license     http://www.opensource.org/licenses/lgpl-license.php LGPL +
28 * @link        www.phpdoctrine.com +
29 * @since       1.0 +
30 * @version     $Revision: 1434 $ +
31 * @author      Konsta Vesterinen <kvesteri@cc.hut.fi> +
32 */ +
33class Doctrine_Relation_Nest extends Doctrine_Relation_Association +
34{ +
35    /** +
36     * getRelationDql +
37     * +
38     * @param integer $count +
39     * @return string +
40     */ +
41    public function getRelationDql($count, $context = 'record') +
42    { +
43        switch ($context) { +
44            case 'record': +
45                $sub    = 'SELECT '.$this->definition['foreign']  +
46                        . ' FROM '.$this->definition['refTable']->getTableName() +
47                        . ' WHERE '.$this->definition['local'] +
48                        . ' = ?'; +
49 +
50                $sub2   = 'SELECT '.$this->definition['local'] +
51                        . ' FROM '.$this->definition['refTable']->getTableName() +
52                        . ' WHERE '.$this->definition['foreign'] +
53                        . ' = ?'; +
54 +
55                $dql  = 'FROM ' . $this->definition['table']->getComponentName() +
56                      . '.' . $this->definition['refTable']->getComponentName() +
57                      . ' WHERE ' . $this->definition['table']->getComponentName() +
58                      . '.' . $this->definition['table']->getIdentifier()  +
59                      . ' IN (' . $sub . ')' +
60                      . ' || ' . $this->definition['table']->getComponentName()  +
61                      . '.' . $this->definition['table']->getIdentifier()  +
62                      . ' IN (' . $sub2 . ')'; +
63                break; +
64            case 'collection': +
65                $sub  = substr(str_repeat('?, ', $count),0,-2); +
66                $dql  = 'FROM '.$this->definition['refTable']->getComponentName() +
67                      . '.' . $this->definition['table']->getComponentName() +
68                      . ' WHERE '.$this->definition['refTable']->getComponentName() +
69                      . '.' . $this->definition['local'] . ' IN (' . $sub . ')'; +
70        }; +
71 +
72        return $dql; +
73    } +
74    /** +
75    public function fetchRelatedFor(Doctrine_Record $record) +
76    { +
77        $id = $record->getIncremented(); +
78 +
79        if (empty($id) || ! $this->definition['table']->getAttribute(Doctrine::ATTR_LOAD_REFERENCES)) { +
80            return new Doctrine_Collection($this->getTable()); +
81        } else { +
82            $q = new Doctrine_Query(); +
83             +
84            $c  = $this->getTable()->getComponentName(); +
85            $a  = substr($c, 0, 1); +
86            $c2 = $this->getAssociationTable()->getComponentName(); +
87            $a2 = substr($c2, 0, 1); +
88 +
89            $q->from($c) +
90              ->innerJoin($c . '.' . $c2) +
91 +
92            $sub = 'SELECT ' . $this->getForeign()  +
93                 . ' FROM '  . $c2 +
94                 . ' WHERE ' . $this->getLocal()  +
95                 . ' = ?'; +
96        } +
97    } +
98    */ +
99 +
100    public function fetchRelatedFor(Doctrine_Record $record) +
101    { +
102        $id = $record->getIncremented(); +
103 +
104 +
105        if (empty($id) || ! $this->definition['table']->getAttribute(Doctrine::ATTR_LOAD_REFERENCES)) { +
106            return new Doctrine_Collection($this->getTable()); +
107        } else { +
108            $q = new Doctrine_RawSql(); +
109 +
110            $assocTable = $this->getAssociationFactory()->getTableName(); +
111            $tableName  = $record->getTable()->getTableName(); +
112            $identifier = $record->getTable()->getIdentifier(); +
113     +
114            $sub = 'SELECT ' . $this->getForeign() +
115                 . ' FROM ' . $assocTable  +
116                 . ' WHERE ' . $this->getLocal()  +
117                 . ' = ?'; +
118 +
119            $condition[] = $tableName . '.' . $identifier . ' IN (' . $sub . ')'; +
120            $joinCondition[] = $tableName . '.' . $identifier . ' = ' . $assocTable . '.' . $this->getForeign(); +
121 +
122            if ($this->definition['equal']) { +
123                $sub2   = 'SELECT ' . $this->getLocal() +
124                        . ' FROM '  . $assocTable +
125                        . ' WHERE ' . $this->getForeign() +
126                        . ' = ?'; +
127 +
128                $condition[] = $tableName . '.' . $identifier . ' IN (' . $sub2 . ')'; +
129                $joinCondition[] = $tableName . '.' . $identifier . ' = ' . $assocTable . '.' . $this->getLocal(); +
130            } +
131            $q->select('{'.$tableName.'.*}, {'.$assocTable.'.*}') +
132              ->from($tableName . ' INNER JOIN ' . $assocTable . ' ON ' . implode(' OR ', $joinCondition)) +
133              ->where(implode(' OR ', $condition)); +
134            $q->addComponent($tableName,  $record->getTable()->getComponentName()); +
135            $q->addComponent($assocTable, $record->getTable()->getComponentName(). '.' . $this->getAssociationFactory()->getComponentName()); +
136 +
137            $params = ($this->definition['equal']) ? array($id, $id) : array($id); +
138 +
139            return $q->execute($params); +
140        } +
141    } +
142}
\ No newline at end of file diff --git a/tests/coverage/Doctrine_Relation_Parser.html b/tests/coverage/Doctrine_Relation_Parser.html new file mode 100644 index 000000000..d86fb9cf3 --- /dev/null +++ b/tests/coverage/Doctrine_Relation_Parser.html @@ -0,0 +1,1397 @@ + + + Coverage for Doctrine_Relation_Parser + + +

Coverage for Doctrine_Relation_Parser

Back to coverage report

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
1<?php +
2/* +
3 *  $Id: Table.php 1397 2007-05-19 19:54:15Z zYne $ +
4 * +
5 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +
6 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +
7 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +
8 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +
9 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +
10 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +
11 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +
12 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +
13 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +
14 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +
15 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +
16 * +
17 * This software consists of voluntary contributions made by many individuals +
18 * and is licensed under the LGPL. For more information, see +
19 * <http://www.phpdoctrine.com>. +
20 */ +
21/** +
22 * Doctrine_Relation_Parser +
23 * +
24 * @package     Doctrine +
25 * @subpackage  Relation +
26 * @author      Konsta Vesterinen <kvesteri@cc.hut.fi> +
27 * @license     http://www.opensource.org/licenses/lgpl-license.php LGPL +
28 * @version     $Revision: 1397 $ +
29 * @link        www.phpdoctrine.com +
30 * @since       1.0 +
31 */ +
32class Doctrine_Relation_Parser  +
33{ +
34    /** +
35     * @var Doctrine_Table $_table          the table object this parser belongs to +
36     */ +
37    protected $_table; +
38    /** +
39     * @var array $_relations               an array containing all the Doctrine_Relation objects for this table +
40     */ +
41    protected $_relations = array(); +
42    /** +
43     * @var array $_pending                 relations waiting for parsing +
44     */ +
45    protected $_pending   = array(); +
46    /** +
47     * constructor +
48     * +
49     * @param Doctrine_Table $table         the table object this parser belongs to +
50     */ +
51    public function __construct(Doctrine_Table $table)  +
52    { +
53        $this->_table = $table; +
54    } +
55    /** +
56     * getTable +
57     * +
58     * @return Doctrine_Table   the table object this parser belongs to +
59     */ +
60    public function getTable() +
61    { +
62        return $this->_table; +
63    } +
64    /** +
65     * getPendingRelation +
66     * +
67     * @return array            an array defining a pending relation +
68     */ +
69    public function getPendingRelation($name)  +
70    { +
71        if ( ! isset($this->_pending[$name])) { +
72            throw new Doctrine_Relation_Exception('Unknown pending relation ' . $name); +
73        } +
74         +
75        return $this->_pending[$name]; +
76    } +
77     +
78    public function hasRelation($name) +
79    { +
80        if ( ! isset($this->_pending[$name]) && ! isset($this->_relations[$name])) { +
81            return false; +
82        } +
83         +
84        return true; +
85    } +
86    /** +
87     * binds a relation +
88     * +
89     * @param string $name +
90     * @param string $field +
91     * @return void +
92     */ +
93    public function bind($name, $options = array()) +
94    { +
95        if (isset($this->relations[$name])) { +
96            unset($this->relations[$name]); +
97        } +
98 +
99        $lower = strtolower($name); +
100 +
101        if ($this->_table->hasColumn($lower)) { +
102            throw new Doctrine_Relation_Exception("Couldn't bind relation. Column with name " . $lower . ' already exists!'); +
103        } +
104 +
105        $e    = explode(' as ', $name); +
106        $name = $e[0]; +
107        $alias = isset($e[1]) ? $e[1] : $name; +
108 +
109        if ( ! isset($options['type'])) { +
110            throw new Doctrine_Relation_Exception('Relation type not set.'); +
111        } +
112 +
113        $this->_pending[$alias] = array_merge($options, array('class' => $name, 'alias' => $alias)); +
114        /** +
115        $m = Doctrine_Manager::getInstance(); +
116 +
117        if (isset($options['onDelete'])) { +
118            $m->addDeleteAction($name, $this->_table->getComponentName(), $options['onDelete']); +
119        } +
120        if (isset($options['onUpdate'])) { +
121            $m->addUpdateAction($name, $this->_table->getComponentName(), $options['onUpdate']); +
122        } +
123        */ +
124 +
125        return $this->_pending[$alias]; +
126    } +
127    /** +
128     * getRelation +
129     * +
130     * @param string $alias      relation alias +
131     */ +
132    public function getRelation($alias, $recursive = true) +
133    { +
134        if (isset($this->_relations[$alias])) { +
135            return $this->_relations[$alias]; +
136        } +
137 +
138        if (isset($this->_pending[$alias])) { +
139            $def = $this->_pending[$alias]; +
140         +
141            // check if reference class name exists +
142            // if it does we are dealing with association relation +
143            if (isset($def['refClass'])) { +
144                $def = $this->completeAssocDefinition($def); +
145                $localClasses = array_merge($this->_table->getOption('parents'), array($this->_table->getComponentName())); +
146 +
147                if ( ! isset($this->_pending[$def['refClass']]) &&  +
148                     ! isset($this->_relations[$def['refClass']])) { +
149 +
150                    $parser = $def['refTable']->getRelationParser(); +
151                    if ( ! $parser->hasRelation($this->_table->getComponentName())) { +
152                        $parser->bind($this->_table->getComponentName(), +
153                                      array('type'    => Doctrine_Relation::ONE, +
154                                            'local'   => $def['local'], +
155                                            'foreign' => $this->_table->getIdentifier(), +
156                                            'localKey' => true, +
157                                            )); +
158                    } +
159 +
160                    if ( ! $this->hasRelation($def['refClass'])) { +
161                        $this->bind($def['refClass'], array('type' => Doctrine_Relation::MANY, +
162                                                            'foreign' => $def['local'], +
163                                                            'local'   => $this->_table->getIdentifier())); +
164                    } +
165                } +
166                if (in_array($def['class'], $localClasses)) { +
167                    $rel = new Doctrine_Relation_Nest($def); +
168                } else { +
169                    $rel = new Doctrine_Relation_Association($def); +
170                } +
171            } else { +
172                // simple foreign key relation +
173                $def = $this->completeDefinition($def); +
174 +
175                if (isset($def['localKey'])) { +
176 +
177                    $rel = new Doctrine_Relation_LocalKey($def); +
178                } else { +
179                    $rel = new Doctrine_Relation_ForeignKey($def); +
180                } +
181            } +
182            if (isset($rel)) { +
183                // unset pending relation +
184                unset($this->_pending[$alias]); +
185 +
186                $this->_relations[$alias] = $rel; +
187                return $rel; +
188            } +
189        } +
190        if ($recursive) { +
191            $this->getRelations(); +
192 +
193            return $this->getRelation($alias, false); +
194        } else { +
195            throw new Doctrine_Table_Exception('Unknown relation alias ' . $alias); +
196        } +
197    } +
198    /** +
199     * getRelations +
200     * returns an array containing all relation objects +
201     * +
202     * @return array        an array of Doctrine_Relation objects +
203     */ +
204    public function getRelations() +
205    { +
206        foreach ($this->_pending as $k => $v) { +
207            $this->getRelation($k); +
208        } +
209 +
210        return $this->_relations; +
211    } +
212    /** +
213     * getImpl +
214     * returns the table class of the concrete implementation for given template +
215     * if the given template is not a template then this method just returns the +
216     * table class for the given record +
217     * +
218     * @param string $template +
219     */ +
220    public function getImpl($template) +
221    { +
222        $conn = $this->_table->getConnection(); +
223 +
224        if (in_array('Doctrine_Template', class_parents($template))) { +
225            $impl = $this->_table->getImpl($template); +
226             +
227            if ($impl === null) { +
228                throw new Doctrine_Relation_Parser_Exception("Couldn't find concrete implementation for template " . $template); +
229            } +
230        } else { +
231            $impl = $template; +
232        } +
233 +
234        return $conn->getTable($impl); +
235    } +
236    /** +
237     * Completes the given association definition +
238     * +
239     * @param array $def    definition array to be completed +
240     * @return array        completed definition array +
241     */ +
242    public function completeAssocDefinition($def)  +
243    { +
244        $conn = $this->_table->getConnection(); +
245        $def['table'] = $this->getImpl($def['class']); +
246        $def['class'] = $def['table']->getComponentName(); +
247        $def['refTable'] = $this->getImpl($def['refClass']); +
248 +
249        $id = $def['refTable']->getIdentifier(); +
250 +
251        if (count($id) > 1) { +
252            if ( ! isset($def['foreign'])) { +
253                // foreign key not set +
254                // try to guess the foreign key +
255     +
256                $def['foreign'] = ($def['local'] === $id[0]) ? $id[1] : $id[0]; +
257            } +
258            if ( ! isset($def['local'])) { +
259                // foreign key not set +
260                // try to guess the foreign key +
261 +
262                $def['local'] = ($def['foreign'] === $id[0]) ? $id[1] : $id[0]; +
263            } +
264        } else { +
265 +
266            if ( ! isset($def['foreign'])) { +
267                // foreign key not set +
268                // try to guess the foreign key +
269     +
270                $columns = $this->getIdentifiers($def['table']); +
271     +
272                $def['foreign'] = $columns; +
273            } +
274            if ( ! isset($def['local'])) { +
275                // local key not set +
276                // try to guess the local key +
277                $columns = $this->getIdentifiers($this->_table); +
278     +
279                $def['local'] = $columns; +
280            } +
281        } +
282        return $def; +
283    } +
284    /**  +
285     * getIdentifiers +
286     * gives a list of identifiers from given table +
287     * +
288     * the identifiers are in format: +
289     * [componentName].[identifier] +
290     * +
291     * @param Doctrine_Table $table     table object to retrieve identifiers from +
292     */ +
293    public function getIdentifiers(Doctrine_Table $table) +
294    { +
295        if (is_array($table->getIdentifier())) { +
296            $columns = array(); +
297            foreach((array) $table->getIdentifier() as $identifier) { +
298                $columns[] = strtolower($table->getComponentName()) +
299                           . '_' . $table->getIdentifier(); +
300            } +
301        } else { +
302            $columns = strtolower($table->getComponentName()) +
303                           . '_' . $table->getIdentifier(); +
304        } +
305 +
306        return $columns; +
307    } +
308    /** +
309     * guessColumns +
310     * +
311     * @param array $classes                    an array of class names +
312     * @param Doctrine_Table $foreignTable      foreign table object +
313     * @return array                            an array of column names +
314     */ +
315    public function guessColumns(array $classes, Doctrine_Table $foreignTable) +
316    { +
317        $conn = $this->_table->getConnection(); +
318 +
319        foreach ($classes as $class) { +
320            try { +
321                $table   = $conn->getTable($class); +
322            } catch (Doctrine_Table_Exception $e) { +
323                continue; +
324            } +
325            $columns = $this->getIdentifiers($table); +
326            $found   = true; +
327 +
328            foreach ((array) $columns as $column) { +
329                if ( ! $foreignTable->hasColumn($column)) { +
330                    $found = false; +
331                    break; +
332                } +
333            } +
334            if ($found) { +
335                break; +
336            } +
337        } +
338         +
339        if ( ! $found) { +
340            throw new Doctrine_Relation_Exception("Couldn't find columns."); +
341        } +
342 +
343        return $columns; +
344    } +
345    /** +
346     * Completes the given definition +
347     * +
348     * @param array $def    definition array to be completed +
349     * @return array        completed definition array +
350     */ +
351    public function completeDefinition($def) +
352    { +
353        $conn = $this->_table->getConnection(); +
354        $def['table'] = $this->getImpl($def['class']); +
355        $def['class'] = $def['table']->getComponentName(); +
356 +
357        $foreignClasses = array_merge($def['table']->getOption('parents'), array($def['class'])); +
358        $localClasses   = array_merge($this->_table->getOption('parents'), array($this->_table->getComponentName())); +
359 +
360        if (isset($def['local'])) { +
361            if ( ! isset($def['foreign'])) { +
362                // local key is set, but foreign key is not +
363                // try to guess the foreign key +
364 +
365                if ($def['local'] === $this->_table->getIdentifier()) { +
366                    $def['foreign'] = $this->guessColumns($localClasses, $def['table']); +
367                } else { +
368                    // the foreign field is likely to be the +
369                    // identifier of the foreign class +
370                    $def['foreign'] = $def['table']->getIdentifier(); +
371                    $def['localKey'] = true; +
372                } +
373            } else { +
374                if ($def['local'] !== $this->_table->getIdentifier() &&  +
375                    $def['type'] == Doctrine_Relation::ONE) { +
376                    $def['localKey'] = true; +
377                } +
378            } +
379        } else { +
380            if (isset($def['foreign'])) { +
381                // local key not set, but foreign key is set +
382                // try to guess the local key +
383                if ($def['foreign'] === $def['table']->getIdentifier()) { +
384                    $def['localKey'] = true; +
385                    try { +
386                        $def['local'] = $this->guessColumns($foreignClasses, $this->_table); +
387                    } catch (Doctrine_Relation_Exception $e) { +
388                        $def['local'] = $this->_table->getIdentifier(); +
389                    } +
390                } else { +
391                    $def['local'] = $this->_table->getIdentifier(); +
392                } +
393            } else { +
394                // neither local or foreign key is being set +
395                // try to guess both keys +
396 +
397                $conn = $this->_table->getConnection(); +
398 +
399                // the following loops are needed for covering inheritance +
400                foreach ($localClasses as $class) { +
401                    $table  = $conn->getTable($class); +
402                    $column = strtolower($table->getComponentName()) +
403                            . '_' . $table->getIdentifier(); +
404 +
405                    foreach ($foreignClasses as $class2) { +
406                        $table2 = $conn->getTable($class2); +
407                        if ($table2->hasColumn($column)) { +
408                            $def['foreign'] = $column; +
409                            $def['local']   = $table->getIdentifier(); +
410 +
411                            return $def; +
412                        } +
413                    } +
414                } +
415 +
416                foreach ($foreignClasses as $class) { +
417                    $table  = $conn->getTable($class); +
418                    $column = strtolower($table->getComponentName()) +
419                            . '_' . $table->getIdentifier(); +
420                 +
421                    foreach ($localClasses as $class2) { +
422                        $table2 = $conn->getTable($class2); +
423                        if ($table2->hasColumn($column)) { +
424                            $def['foreign']  = $table->getIdentifier(); +
425                            $def['local']    = $column; +
426                            $def['localKey'] = true; +
427                            return $def; +
428                        } +
429                    } +
430                } +
431 +
432                // auto-add columns and auto-build relation +
433                $columns = array(); +
434                foreach ((array) $this->_table->getIdentifier() as $id) { +
435                    $column = strtolower($table->getComponentName()) +
436                            . '_' . $id; +
437 +
438                    $col = $this->_table->getDefinitionOf($id); +
439                    $type = $col['type']; +
440                    $length = $col['length']; +
441 +
442                    unset($col['type']); +
443                    unset($col['length']); +
444                    unset($col['autoincrement']); +
445                    unset($col['sequence']); +
446                    unset($col['primary']); +
447 +
448                    $def['table']->setColumn($column, $type, $length, $col); +
449                     +
450                    $columns[] = $column; +
451                } +
452                if (count($columns) > 1) { +
453                    $def['foreign'] = $columns; +
454                } else { +
455                    $def['foreign'] = $columns[0]; +
456                } +
457                $def['local'] = $this->_table->getIdentifier(); +
458            } +
459        } +
460        return $def; +
461    } +
462}
\ No newline at end of file diff --git a/tests/coverage/Doctrine_Relation_Parser_Exception.html b/tests/coverage/Doctrine_Relation_Parser_Exception.html new file mode 100644 index 000000000..e4d0d4f7c --- /dev/null +++ b/tests/coverage/Doctrine_Relation_Parser_Exception.html @@ -0,0 +1,113 @@ + + + Coverage for Doctrine_Relation_Parser_Exception + + +

Coverage for Doctrine_Relation_Parser_Exception

Back to coverage report

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
1<?php +
2/* +
3 *  $Id$ +
4 * +
5 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +
6 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +
7 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +
8 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +
9 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +
10 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +
11 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +
12 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +
13 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +
14 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +
15 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +
16 * +
17 * This software consists of voluntary contributions made by many individuals +
18 * and is licensed under the LGPL. For more information, see +
19 * <http://www.phpdoctrine.com>. +
20 */         +
21Doctrine::autoload('Doctrine_Relation_Exception'); +
22/** +
23 * Doctrine_Relation_Parser_Exception +
24 * +
25 * @package     Doctrine +
26 * @subpackage  Relation +
27 * @license     http://www.opensource.org/licenses/lgpl-license.php LGPL +
28 * @link        www.phpdoctrine.com +
29 * @since       1.0 +
30 * @version     $Revision$ +
31 * @author      Konsta Vesterinen <kvesteri@cc.hut.fi> +
32 */ +
33class Doctrine_Relation_Parser_Exception extends Doctrine_Relation_Exception +
34{ }
\ No newline at end of file diff --git a/tests/coverage/Doctrine_Schema.html b/tests/coverage/Doctrine_Schema.html new file mode 100644 index 000000000..6a37b1225 --- /dev/null +++ b/tests/coverage/Doctrine_Schema.html @@ -0,0 +1,246 @@ + + + Coverage for Doctrine_Schema + + +

Coverage for Doctrine_Schema

Back to coverage report

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
1<?php +
2/* +
3 *  $Id: Schema.php 2702 2007-10-03 21:43:22Z Jonathan.Wage $ +
4 * +
5 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +
6 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +
7 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +
8 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +
9 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +
10 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +
11 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +
12 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +
13 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +
14 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +
15 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +
16 * +
17 * This software consists of voluntary contributions made by many individuals +
18 * and is licensed under the LGPL. For more information, see +
19 * <http://www.phpdoctrine.com>. +
20 */ +
21/** +
22 * class Doctrine_Schema +
23 * Holds information on one to many databases +
24 * +
25 * @package     Doctrine +
26 * @subpackage  Schema +
27 * @link        www.phpdoctrine.com +
28 * @license     http://www.opensource.org/licenses/lgpl-license.php LGPL +
29 * @since       1.0 +
30 * @version     $Revision: 2702 $ +
31 * @author      Konsta Vesterinen <kvesteri@cc.hut.fi> +
32 */ +
33class Doctrine_Schema extends Doctrine_Schema_Object implements Countable, IteratorAggregate +
34{ +
35    /** +
36     * Holds any number of databases contained in the schema +
37     * @access private +
38     */ +
39    private $childs; +
40 +
41    /** +
42     * +
43     * @param Doctrine_Schema_Database database      * @return +
44     * @access public +
45     */ +
46    public function addDatabase( Doctrine_Schema_Database $database ) +
47    { +
48         $this->childs[] = $database; +
49    } +
50 +
51    /** +
52     * Return the childs for this schema +
53     * +
54     * @return array of Doctrine_Schema_Database +
55     * +
56     */ +
57    public function getDatabases() { +
58         return $this->childs; +
59    } +
60    /** +
61     * +
62     * @return +
63     * @access public +
64     */ +
65    public function __toString( ) +
66    { +
67 +
68    } +
69    /** +
70     * +
71     * @return bool +
72     * @access public +
73     */ +
74    public function isValid( ) +
75    { +
76 +
77    } +
78} +
\ No newline at end of file diff --git a/tests/coverage/Doctrine_Schema_Column.html b/tests/coverage/Doctrine_Schema_Column.html new file mode 100644 index 000000000..71968ee3e --- /dev/null +++ b/tests/coverage/Doctrine_Schema_Column.html @@ -0,0 +1,237 @@ + + + Coverage for Doctrine_Schema_Column + + +

Coverage for Doctrine_Schema_Column

Back to coverage report

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
1<?php +
2/* +
3 *  $Id: Column.php 2702 2007-10-03 21:43:22Z Jonathan.Wage $ +
4 * +
5 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +
6 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +
7 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +
8 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +
9 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +
10 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +
11 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +
12 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +
13 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +
14 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +
15 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +
16 * +
17 * This software consists of voluntary contributions made by many individuals +
18 * and is licensed under the LGPL. For more information, see +
19 * <http://www.phpdoctrine.com>. +
20 */ +
21Doctrine::autoload('Doctrine_Schema_Object'); +
22/** +
23 * class Doctrine_Schema_Column +
24 * Holds information on a database table field +
25 * +
26 * @package     Doctrine +
27 * @subpackage  Schema +
28 * @link        www.phpdoctrine.com +
29 * @license     http://www.opensource.org/licenses/lgpl-license.php LGPL +
30 * @since       1.0 +
31 * @version     $Revision: 2702 $ +
32 * @author      Konsta Vesterinen <kvesteri@cc.hut.fi> +
33 * @author      Jukka Hassinen <Jukka.Hassinen@BrainAlliance.com> +
34 */ +
35class Doctrine_Schema_Column extends Doctrine_Schema_Object implements IteratorAggregate +
36{ +
37    /** +
38     * column definitions +
39     * @var array $definition +
40     */ +
41    protected $definition = array('name'    => '', +
42                                  'type'    => '', +
43                                  'length'  => null, +
44                                  'unique'  => false, +
45                                  'primary' => false, +
46                                  'notnull' => false, +
47                                  'default' => false, +
48                                  'autoinc' => false +
49                                  ); +
50 +
51    public function getName() +
52    { +
53        return $this->definition['name']; +
54    } +
55    public function getType() +
56    { +
57        return $this->definition['type']; +
58    } +
59    public function isUnique() +
60    { +
61        return $this->definition['unique']; +
62    } +
63    public function isPrimaryKey() +
64    { +
65        return $this->definition['primary']; +
66    } +
67    public function defaultValue() +
68    { +
69        return $this->definition['default']; +
70    } +
71    public function isNotNull() +
72    { +
73        return $this->definition['notnull']; +
74    } +
75} +
\ No newline at end of file diff --git a/tests/coverage/Doctrine_Schema_Database.html b/tests/coverage/Doctrine_Schema_Database.html new file mode 100644 index 000000000..01ed6fc10 --- /dev/null +++ b/tests/coverage/Doctrine_Schema_Database.html @@ -0,0 +1,291 @@ + + + Coverage for Doctrine_Schema_Database + + +

Coverage for Doctrine_Schema_Database

Back to coverage report

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
1<?php +
2/* +
3 *  $Id: Database.php 2702 2007-10-03 21:43:22Z Jonathan.Wage $ +
4 * +
5 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +
6 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +
7 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +
8 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +
9 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +
10 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +
11 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +
12 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +
13 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +
14 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +
15 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +
16 * +
17 * This software consists of voluntary contributions made by many individuals +
18 * and is licensed under the LGPL. For more information, see +
19 * <http://www.phpdoctrine.com>. +
20 */ +
21Doctrine::autoload('Doctrine_Schema_Object'); +
22/** +
23 * class Doctrine_Schema_Database +
24 * Holds information on a database +
25 * +
26 * @package     Doctrine +
27 * @subpackage  Schema +
28 * @link        www.phpdoctrine.com +
29 * @license     http://www.opensource.org/licenses/lgpl-license.php LGPL +
30 * @since       1.0 +
31 * @version     $Revision: 2702 $ +
32 * @author      Konsta Vesterinen <kvesteri@cc.hut.fi> +
33 * @author      Jukka Hassinen <Jukka.Hassinen@BrainAlliance.com> +
34 */ +
35class Doctrine_Schema_Database extends Doctrine_Schema_Object +
36{ +
37 +
38    protected $definition = array('name'        => null, +
39                                  'type'        => null, +
40                                  'charset'     => null, +
41                                  'description' => null, +
42                                  'version'     => null, +
43                                  'engine'      => null); +
44 +
45    private $childs = array(); +
46 +
47    /** +
48     * +
49     * @return +
50     * @access public +
51     */ +
52    public function __clone( ) +
53    { +
54 +
55    } +
56    /** +
57     * +
58     * @return +
59     * @access public +
60     */ +
61    public function __toString( ) +
62    { +
63 +
64    } +
65    /** +
66     * +
67     * @return bool +
68     * @access public +
69     */ +
70    public function isValid( ) +
71    { +
72 +
73    } +
74    /** +
75     * +
76     * @param Doctrine_Schema_Table table      * @return Doctrine_Schema_Table +
77     * @access public +
78     */ +
79    public function addTable( $table = null ) +
80    { +
81        $this->childs[] = $table; +
82    } +
83 +
84    /** +
85     * +
86     * @return array of Doctrine_Schema_Table +
87     * +
88     */ +
89    public function getTables() +
90    { +
91        return $this->childs; +
92    } +
93} +
\ No newline at end of file diff --git a/tests/coverage/Doctrine_Schema_Exception.html b/tests/coverage/Doctrine_Schema_Exception.html new file mode 100644 index 000000000..696d9fb1c --- /dev/null +++ b/tests/coverage/Doctrine_Schema_Exception.html @@ -0,0 +1,117 @@ + + + Coverage for Doctrine_Schema_Exception + + +

Coverage for Doctrine_Schema_Exception

Back to coverage report

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
1<?php +
2/* +
3 *  $Id: Exception.php 2702 2007-10-03 21:43:22Z Jonathan.Wage $ +
4 * +
5 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +
6 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +
7 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +
8 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +
9 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +
10 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +
11 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +
12 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +
13 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +
14 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +
15 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +
16 * +
17 * This software consists of voluntary contributions made by many individuals +
18 * and is licensed under the LGPL. For more information, see +
19 * <http://www.phpdoctrine.com>. +
20 */ +
21Doctrine::autoload('Doctrine_Exception'); +
22/** +
23 * class Doctrine_Schema_Exception +
24 * +
25 * @package     Doctrine +
26 * @subpackage  Schema +
27 * @link        www.phpdoctrine.com +
28 * @license     http://www.opensource.org/licenses/lgpl-license.php LGPL +
29 * @since       1.0 +
30 * @version     $Revision: 2702 $ +
31 * @author      Konsta Vesterinen <kvesteri@cc.hut.fi> +
32 * @author      Jukka Hassinen <Jukka.Hassinen@BrainAlliance.com> +
33 */ +
34class Doctrine_Schema_Exception extends Exception +
35{ } +
\ No newline at end of file diff --git a/tests/coverage/Doctrine_Schema_Object.html b/tests/coverage/Doctrine_Schema_Object.html new file mode 100644 index 000000000..8b96e131a --- /dev/null +++ b/tests/coverage/Doctrine_Schema_Object.html @@ -0,0 +1,318 @@ + + + Coverage for Doctrine_Schema_Object + + +

Coverage for Doctrine_Schema_Object

Back to coverage report

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
1<?php +
2/* +
3 *  $Id: Object.php 2702 2007-10-03 21:43:22Z Jonathan.Wage $ +
4 * +
5 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +
6 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +
7 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +
8 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +
9 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +
10 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +
11 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +
12 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +
13 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +
14 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +
15 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +
16 * +
17 * This software consists of voluntary contributions made by many individuals +
18 * and is licensed under the LGPL. For more information, see +
19 * <http://www.phpdoctrine.com>. +
20 */ +
21Doctrine::autoload('Doctrine_Access'); +
22/** +
23 * class Doctrine_Schema_Object +
24 * Catches any non-property call from child classes and throws an exception. +
25 * +
26 * @package     Doctrine +
27 * @subpackage  Schema +
28 * @link        www.phpdoctrine.com +
29 * @license     http://www.opensource.org/licenses/lgpl-license.php LGPL +
30 * @since       1.0 +
31 * @version     $Revision: 2702 $ +
32 * @author      Konsta Vesterinen <kvesteri@cc.hut.fi> +
33 * @author      Jukka Hassinen <Jukka.Hassinen@BrainAlliance.com> +
34 */ +
35abstract class Doctrine_Schema_Object extends Doctrine_Access implements IteratorAggregate, Countable +
36{ +
37 +
38    protected $children   = array(); +
39 +
40    protected $definition = array('name' => ''); +
41 +
42    public function __construct(array $definition = array()) { +
43        foreach ($this->definition as $key => $val) { +
44            if (isset($definition[$key])) { +
45                $this->definition[$key] = $definition[$key]; +
46            } +
47        } +
48    } +
49 +
50    public function get($name) +
51    { +
52        if ( ! array_key_exists($name, $this->definition)) { +
53            throw new Doctrine_Schema_Exception('Unknown definition '. $name); +
54        } +
55        return $this->definition[$name]; +
56 +
57    } +
58 +
59    public function set($name, $value) +
60    { +
61        if ( ! array_key_exists($name, $this->definition)) { +
62            throw new Doctrine_Schema_Exception('Unknown definition '. $name); +
63        } +
64        $this->definition[$name] = $value; +
65    } +
66 +
67    public function contains($name) +
68    { +
69        return array_key_exists($name, $this->definition); +
70    } +
71 +
72    public function toArray() +
73    { +
74        return $this->definition; +
75    } +
76    /** +
77     * +
78     * @return int +
79     * @access public +
80     */ +
81    public function count() +
82    { +
83        if ( ! empty($this->children)) { +
84            return count($this->children); +
85        } +
86        return count($this->definition); +
87    } +
88 +
89    /** +
90     * getIterator +
91     * +
92     * @return ArrayIterator +
93     * @access public +
94     */ +
95    public function getIterator() +
96    { +
97        if ( ! empty($this->children)) { +
98            return new ArrayIterator($this->children); +
99        } +
100        return new ArrayIterator($this->definition); +
101    } +
102} +
\ No newline at end of file diff --git a/tests/coverage/Doctrine_Schema_Relation.html b/tests/coverage/Doctrine_Schema_Relation.html new file mode 100644 index 000000000..b42b5fd6e --- /dev/null +++ b/tests/coverage/Doctrine_Schema_Relation.html @@ -0,0 +1,375 @@ + + + Coverage for Doctrine_Schema_Relation + + +

Coverage for Doctrine_Schema_Relation

Back to coverage report

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
1<?php +
2/* +
3 *  $Id: Relation.php 2702 2007-10-03 21:43:22Z Jonathan.Wage $ +
4 * +
5 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +
6 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +
7 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +
8 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +
9 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +
10 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +
11 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +
12 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +
13 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +
14 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +
15 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +
16 * +
17 * This software consists of voluntary contributions made by many individuals +
18 * and is licensed under the LGPL. For more information, see +
19 * <http://www.phpdoctrine.com>. +
20 */ +
21Doctrine::autoload('Doctrine_Schema_Object'); +
22/** +
23 * class Doctrine_Schema_Relation +
24 * Holds information on a foreign key relation. +
25 * +
26 * @package     Doctrine +
27 * @subpackage  Schema +
28 * @link        www.phpdoctrine.com +
29 * @license     http://www.opensource.org/licenses/lgpl-license.php LGPL +
30 * @since       1.0 +
31 * @version     $Revision: 2702 $ +
32 * @author      Konsta Vesterinen <kvesteri@cc.hut.fi> +
33 * @author      Jukka Hassinen <Jukka.Hassinen@BrainAlliance.com> +
34 */ +
35class Doctrine_Schema_Relation extends Doctrine_Schema_Object +
36{ +
37 +
38    /** +
39     * Column that refers to another table +
40     * @access public +
41     */ +
42    public $referencingColumn; +
43 +
44    /** +
45     * Column that is referred from another table +
46     * @access public +
47     */ +
48    public $referencedColumn; +
49 +
50    /** +
51     * Table where the referred column lives +
52     * @access public +
53     * +
54    */ +
55    public $referencedTable; +
56 +
57    /** +
58     * ON UPDATE or ON DELETE action +
59     * @static +
60     * @access public +
61     */ +
62    public static $ACTION_RESTRICT = 1; +
63 +
64    /** +
65     * ON UPDATE or ON DELETE action +
66     * @static +
67     * @access public +
68     */ +
69    public static $ACTION_SET_NULL = 2; +
70 +
71    /** +
72     * ON UPDATE or ON DELETE action +
73     * @static +
74     * @access public +
75     */ +
76    public static $ACTION_CASCADE = 3; +
77 +
78    /** +
79     * ON UPDATE or ON DELETE action +
80     * @static +
81     * @access public +
82     */ +
83    public static $ACTION_NO_ACTION = 4; +
84 +
85    /** +
86     * ON UPDATE or ON DELETE action +
87     * @static +
88     * @access public +
89     */ +
90    public static $ACTION_SET_DEFAULT = 5; +
91 +
92    /** +
93     * +
94     * @param Doctrine_Schema_Column referencing +
95     * @param Doctrine_Schema_Table referencedtable +
96     * @param Doctrine_Schema_Column referencedColumn +
97     * @return +
98     * @access public +
99     */ +
100    public function setRelationBetween( $referencingColumn, $referencedTable, $referencedColumn ) +
101    { +
102        $this->referencingColumn = $referencingColumn; +
103        $this->referencedTable = $referencedTable; +
104        $this->referencedColumn = $referencedColumn; +
105    } +
106    /** +
107     * @return string +
108     */ +
109    public function __toString( ) +
110    { +
111        return "Relation between '".$this->referencingColumn."' and '".$this->referencedTable."'.'".$this->referencingColumn."'"; +
112    } +
113    /** +
114     * +
115     * @return bool +
116     */ +
117    public function isValid( ) +
118    { +
119 +
120    } +
121} +
\ No newline at end of file diff --git a/tests/coverage/Doctrine_Schema_Table.html b/tests/coverage/Doctrine_Schema_Table.html new file mode 100644 index 000000000..4c735c5b8 --- /dev/null +++ b/tests/coverage/Doctrine_Schema_Table.html @@ -0,0 +1,330 @@ + + + Coverage for Doctrine_Schema_Table + + +

Coverage for Doctrine_Schema_Table

Back to coverage report

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
1<?php +
2/* +
3 *  $Id: Table.php 2702 2007-10-03 21:43:22Z Jonathan.Wage $ +
4 * +
5 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +
6 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +
7 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +
8 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +
9 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +
10 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +
11 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +
12 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +
13 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +
14 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +
15 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +
16 * +
17 * This software consists of voluntary contributions made by many individuals +
18 * and is licensed under the LGPL. For more information, see +
19 * <http://www.phpdoctrine.com>. +
20 */ +
21Doctrine::autoload('Doctrine_Schema_Object'); +
22/** +
23 * class Doctrine_Schema_Table +
24 * Holds information on a database table +
25 * +
26 * @package     Doctrine +
27 * @subpackage  Schema +
28 * @link        www.phpdoctrine.com +
29 * @license     http://www.opensource.org/licenses/lgpl-license.php LGPL +
30 * @since       1.0 +
31 * @version     $Revision: 2702 $ +
32 * @author      Konsta Vesterinen <kvesteri@cc.hut.fi> +
33 * @author      Jukka Hassinen <Jukka.Hassinen@BrainAlliance.com> +
34 */ +
35class Doctrine_Schema_Table extends Doctrine_Schema_Object implements Countable, IteratorAggregate +
36{ +
37 +
38    protected $definition = array('name'        => '', +
39                                  'check'       => '', +
40                                  'charset'     => '', +
41                                  'description' => ''); +
42    /** +
43     * Relations this table has with others. An array of Doctrine_Schema_Relation +
44     */ +
45    private $relations = array(); +
46    /** +
47     * +
48     * @return bool +
49     * @access public +
50     */ +
51    public function isValid( ) +
52    { +
53 +
54    } +
55    /** +
56     * returns an array of Doctrine_Schema_Column objects +
57     * +
58     * @return array +
59     */ +
60    public function getColumns() +
61    { +
62        return $this->children; +
63    } +
64    /** +
65     * @return Doctrine_Schema_Column|false +
66     */ +
67    public function getColumn($name) +
68    { +
69        if ( ! isset($this->children[$name])) { +
70            return false; +
71        } +
72        return $this->children[$name]; +
73    } +
74    /** +
75     * +
76     * @param Doctrine_Schema_Column column +
77     * @return Doctrine_Schema_Table +
78     * @access public +
79     */ +
80    public function addColumn(Doctrine_Schema_Column $column) +
81    { +
82        $name = $column->get('name'); +
83        $this->children[$name] = $column; +
84 +
85        return $this; +
86    } +
87 +
88    /** +
89     * Adds a relation between a local column and a 2nd table / column +
90     * +
91     * @param Doctrine_Schema_Relation Relation +
92     * +
93    */ +
94    public function setRelation(Doctrine_Schema_Relation $relation) { +
95         $this->relations[] = $relation; +
96    } +
97    /** +
98     * Return all the relations this table has with others +
99     * +
100     * @return array Array of Doctrine_Schema_Relation +
101    */ +
102    public function getRelations() { +
103        return $this->relations; +
104    } +
105 +
106} +
\ No newline at end of file diff --git a/tests/coverage/Doctrine_Search.html b/tests/coverage/Doctrine_Search.html new file mode 100644 index 000000000..8818f3dba --- /dev/null +++ b/tests/coverage/Doctrine_Search.html @@ -0,0 +1,612 @@ + + + Coverage for Doctrine_Search + + +

Coverage for Doctrine_Search

Back to coverage report

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
1<?php +
2/* +
3 *  $Id$ +
4 * +
5 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +
6 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +
7 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +
8 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +
9 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +
10 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +
11 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +
12 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +
13 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +
14 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +
15 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +
16 * +
17 * This software consists of voluntary contributions made by many individuals +
18 * and is licensed under the LGPL. For more information, see +
19 * <http://www.phpdoctrine.com>. +
20 */ +
21 +
22/** +
23 * Doctrine_Search +
24 * +
25 * @package     Doctrine +
26 * @subpackage  Search +
27 * @author      Konsta Vesterinen <kvesteri@cc.hut.fi> +
28 * @license     http://www.opensource.org/licenses/lgpl-license.php LGPL +
29 * @version     $Revision$ +
30 * @link        www.phpdoctrine.com +
31 * @since       1.0 +
32 */ +
33class Doctrine_Search extends Doctrine_Plugin +
34{ +
35    protected $_options = array('generateFiles' => false, +
36                                'className'     => '%CLASS%Index', +
37                                'generatePath'  => false, +
38                                'batchUpdates'  => false, +
39                                'pluginTable'   => false); +
40 +
41     +
42    public function __construct(array $options) +
43    { +
44        $this->_options = array_merge($this->_options, $options); +
45         +
46        if ( ! isset($this->_options['analyzer'])) { +
47            $this->_options['analyzer'] = new Doctrine_Search_Analyzer_Standard(); +
48        } +
49    } +
50 +
51     +
52    public function analyze($text) +
53    { +
54        return $this->_options['analyzer']->analyze($text); +
55    } +
56 +
57    /** +
58     * updateIndex +
59     * updates the index +
60     * +
61     * @param Doctrine_Record $record +
62     * @return integer +
63     */ +
64    public function updateIndex(Doctrine_Record $record)  +
65    { +
66        $fields = $this->getOption('fields'); +
67        $class  = $this->getOption('className'); +
68        $name   = $record->getTable()->getComponentName(); +
69 +
70        if ($this->_options['batchUpdates'] === true) { +
71 +
72            $conn = $record->getTable()->getConnection(); +
73             +
74            $index = new $class();  +
75            foreach ($record->identifier() as $id => $value) { +
76                $index->$id = $value; +
77            } +
78             +
79            $index->save(); +
80        } else { +
81            foreach ($fields as $field) { +
82                $data  = $record->get($field); +
83     +
84                $terms = $this->analyze($data); +
85 +
86                foreach ($terms as $pos => $term) { +
87                    $index = new $class(); +
88     +
89                    $index->keyword = $term; +
90                    $index->position = $pos; +
91                    $index->field = $field; +
92                    $index->$name = $record; +
93 +
94                    $index->save(); +
95                } +
96            } +
97        } +
98    } +
99 +
100    public function processPending($limit = null, $offset = null) +
101    { +
102     $conn      = $this->_options['ownerTable']->getConnection(); +
103        $tableName = $this->_options['ownerTable']->getTableName(); +
104        $component = $this->_options['ownerTable']->getComponentName(); +
105        $id        = $this->_options['ownerTable']->getIdentifier(); +
106        $class     = $this->getOption('className'); +
107        $fields    = $this->getOption('fields'); +
108 +
109        try { +
110 +
111            $conn->beginTransaction(); +
112     +
113            $query = 'SELECT * FROM ' . $conn->quoteIdentifier($tableName) +
114                   . ' WHERE ' . $conn->quoteIdentifier($id) +
115                   . ' IN (SELECT ' . $conn->quoteIdentifier($id) +
116                   . ' FROM ' . $conn->quoteIdentifier($this->_options['pluginTable']->getTableName()) +
117                   . ' WHERE keyword IS NULL)'; +
118     +
119            $rows = $conn->fetchAll($query); +
120     +
121            foreach ($rows as $row) { +
122                foreach ($fields as $field) { +
123                    $data  = $row[$field]; +
124         +
125                    $terms = $this->analyze($data); +
126         +
127                    foreach ($terms as $pos => $term) { +
128                        $index = new $class(); +
129         +
130                        $index->keyword = $term; +
131                        $index->position = $pos; +
132                        $index->field = $field; +
133                         +
134                        foreach ((array) $this->_options['ownerTable']->getIdentifier() as $id) { +
135                            $index->$id = $row[$id]; +
136                        } +
137     +
138                        $index->save(); +
139                    } +
140                } +
141            } +
142 +
143            $conn->commit(); +
144        } catch (Doctrine_Exception $e) { +
145            $conn->rollback(); +
146        } +
147    } +
148    /** +
149     * insertPending +
150     * +
151     * @return integer +
152     */ +
153    public function insertPending($indexTableName, $id, $conn = null) +
154    { +
155        if ( ! ($conn instanceof Doctrine_Connection)) { +
156            $conn = Doctrine_Manager::connection(); +
157        } +
158 +
159        $conn->insert($indexTableName, array('foreign_id' => $id)); +
160    } +
161    public function buildDefinition(Doctrine_Table $table) +
162    { +
163        $name = $table->getComponentName(); +
164 +
165        $className = $this->getOption('className'); +
166         +
167        $this->_options['ownerTable'] = $table; +
168 +
169        if (class_exists($className)) { +
170            return false; +
171        } +
172 +
173        $columns = array('keyword'  => array('type'    => 'string', +
174                                             'length'  => 200, +
175                                             'primary' => true, +
176                                             ), +
177                         'field'    => array('type'    => 'string', +
178                                             'length'  => 50, +
179                                             'primary' => true), +
180                         'position' => array('type'    => 'integer', +
181                                             'length'  => 8, +
182                                             'primary' => true, +
183                                             )); +
184 +
185        $id = $table->getIdentifier(); +
186 +
187        $options = array('className' => $className); +
188 +
189        $fk = $this->generateForeignKeys($table); +
190        $columns += $fk; +
191 +
192        $relations = $this->generateRelation($table, $fk); +
193 +
194        $this->generateClass($options, $columns, $relations); +
195 +
196        $this->_options['pluginTable'] = $table->getConnection()->getTable($this->_options['className']); +
197 +
198        return true; +
199    } +
200} +
\ No newline at end of file diff --git a/tests/coverage/Doctrine_Search_Analyzer_Standard.html b/tests/coverage/Doctrine_Search_Analyzer_Standard.html new file mode 100644 index 000000000..d032ace11 --- /dev/null +++ b/tests/coverage/Doctrine_Search_Analyzer_Standard.html @@ -0,0 +1,884 @@ + + + Coverage for Doctrine_Search_Analyzer_Standard + + +

Coverage for Doctrine_Search_Analyzer_Standard

Back to coverage report

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
1<?php +
2/* +
3 *  $Id$ +
4 * +
5 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +
6 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +
7 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +
8 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +
9 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +
10 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +
11 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +
12 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +
13 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +
14 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +
15 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +
16 * +
17 * This software consists of voluntary contributions made by many individuals +
18 * and is licensed under the LGPL. For more information, see +
19 * <http://www.phpdoctrine.com>. +
20 */ +
21 +
22/** +
23 * Doctrine_Search_Analyzer_Standard +
24 * +
25 * @package     Doctrine +
26 * @subpackage  Search +
27 * @author      Konsta Vesterinen <kvesteri@cc.hut.fi> +
28 * @license     http://www.opensource.org/licenses/lgpl-license.php LGPL +
29 * @version     $Revision$ +
30 * @link        www.phpdoctrine.com +
31 * @since       1.0 +
32 */ +
33class Doctrine_Search_Analyzer_Standard implements Doctrine_Search_Analyzer_Interface +
34{ +
35    protected static $_stopwords = array( +
36                            '0', +
37                            '1', +
38                            '2', +
39                            '3', +
40                            '4', +
41                            '5', +
42                            '6', +
43                            '7', +
44                            '8', +
45                            '9', +
46                            '10', +
47                            'a', +
48                            'about', +
49                            'after', +
50                            'all', +
51                            'almost', +
52                            'along', +
53                            'also', +
54                            'amp', +
55                            'an', +
56                            'and', +
57                            'another', +
58                            'any', +
59                            'are', +
60                            'area', +
61                            'around', +
62                            'as', +
63                            'at', +
64                            'available', +
65                            'back', +
66                            'be', +
67                            'because', +
68                            'been', +
69                            'being', +
70                            'best', +
71                            'better', +
72                            'big', +
73                            'bit', +
74                            'both', +
75                            'but', +
76                            'by', +
77                            'c', +
78                            'came', +
79                            'can', +
80                            'capable', +
81                            'control', +
82                            'could', +
83                            'course', +
84                            'd', +
85                            'dan', +
86                            'day', +
87                            'decided', +
88                            'did', +
89                            'didn', +
90                            'different', +
91                            'div', +
92                            'do', +
93                            'doesn', +
94                            'don', +
95                            'down', +
96                            'drive', +
97                            'e', +
98                            'each', +
99                            'easily', +
100                            'easy', +
101                            'edition', +
102                            'end', +
103                            'enough', +
104                            'even', +
105                            'every', +
106                            'example', +
107                            'few', +
108                            'find', +
109                            'first', +
110                            'for', +
111                            'found', +
112                            'from', +
113                            'get', +
114                            'go', +
115                            'going', +
116                            'good', +
117                            'got', +
118                            'gt', +
119                            'had', +
120                            'hard', +
121                            'has', +
122                            'have', +
123                            'he', +
124                            'her', +
125                            'here', +
126                            'how', +
127                            'i', +
128                            'if', +
129                            'in', +
130                            'into', +
131                            'is', +
132                            'isn', +
133                            'it', +
134                            'just', +
135                            'know', +
136                            'last', +
137                            'left', +
138                            'li', +
139                            'like', +
140                            'little', +
141                            'll', +
142                            'long', +
143                            'look', +
144                            'lot', +
145                            'lt', +
146                            'm', +
147                            'made', +
148                            'make', +
149                            'many', +
150                            'mb', +
151                            'me', +
152                            'menu', +
153                            'might', +
154                            'mm', +
155                            'more', +
156                            'most', +
157                            'much', +
158                            'my', +
159                            'name', +
160                            'nbsp', +
161                            'need', +
162                            'new', +
163                            'no', +
164                            'not', +
165                            'now', +
166                            'number', +
167                            'of', +
168                            'off', +
169                            'old', +
170                            'on', +
171                            'one', +
172                            'only', +
173                            'or', +
174                            'original', +
175                            'other', +
176                            'our', +
177                            'out', +
178                            'over', +
179                            'part', +
180                            'place', +
181                            'point', +
182                            'pretty', +
183                            'probably', +
184                            'problem', +
185                            'put', +
186                            'quite', +
187                            'quot', +
188                            'r', +
189                            're', +
190                            'really', +
191                            'results', +
192                            'right', +
193                            's', +
194                            'same', +
195                            'saw', +
196                            'see', +
197                            'set', +
198                            'several', +
199                            'she', +
200                            'sherree', +
201                            'should', +
202                            'since', +
203                            'size', +
204                            'small', +
205                            'so', +
206                            'some', +
207                            'something', +
208                            'special', +
209                            'still', +
210                            'stuff', +
211                            'such', +
212                            'sure', +
213                            'system', +
214                            't', +
215                            'take', +
216                            'than', +
217                            'that', +
218                            'the', +
219                            'their', +
220                            'them', +
221                            'then', +
222                            'there', +
223                            'these', +
224                            'they', +
225                            'thing', +
226                            'things', +
227                            'think', +
228                            'this', +
229                            'those', +
230                            'though', +
231                            'through', +
232                            'time', +
233                            'to', +
234                            'today', +
235                            'together', +
236                            'too', +
237                            'took', +
238                            'two', +
239                            'up', +
240                            'us', +
241                            'use', +
242                            'used', +
243                            'using', +
244                            've', +
245                            'very', +
246                            'want', +
247                            'was', +
248                            'way', +
249                            'we', +
250                            'well', +
251                            'went', +
252                            'were', +
253                            'what', +
254                            'when', +
255                            'where', +
256                            'which', +
257                            'while', +
258                            'white', +
259                            'who', +
260                            'will', +
261                            'with', +
262                            'would', +
263                            'you', +
264                            'your', +
265                            ); +
266 +
267    public function analyze($text) +
268    { +
269        $text = preg_replace('/[.()&#!,?^£@%&{}+]/', ' ', $text); +
270        $text = str_replace('  ', ' ', $text); +
271 +
272        $terms = explode(' ', $text); +
273         +
274        $ret = array(); +
275        if ( ! empty($terms)) { +
276            foreach ($terms as $i => $term) { +
277                if (empty($term)) { +
278                    continue; +
279                } +
280                $lower = strtolower(trim($term)); +
281 +
282                if (in_array($lower, self::$_stopwords)) { +
283                    continue; +
284                } +
285 +
286                $ret[$i] = $lower; +
287            } +
288        } +
289        return $ret; +
290    } +
291}
\ No newline at end of file diff --git a/tests/coverage/Doctrine_Search_Listener.html b/tests/coverage/Doctrine_Search_Listener.html new file mode 100644 index 000000000..4dde32982 --- /dev/null +++ b/tests/coverage/Doctrine_Search_Listener.html @@ -0,0 +1,179 @@ + + + Coverage for Doctrine_Search_Listener + + +

Coverage for Doctrine_Search_Listener

Back to coverage report

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
1<?php +
2/* +
3 *  $Id$ +
4 * +
5 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +
6 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +
7 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +
8 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +
9 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +
10 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +
11 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +
12 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +
13 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +
14 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +
15 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +
16 * +
17 * This software consists of voluntary contributions made by many individuals +
18 * and is licensed under the LGPL. For more information, see +
19 * <http://www.phpdoctrine.com>. +
20 */ +
21 +
22/** +
23 * Doctrine_Search_Listener +
24 * +
25 * @package     Doctrine +
26 * @subpackage  Search +
27 * @author      Konsta Vesterinen <kvesteri@cc.hut.fi> +
28 * @license     http://www.opensource.org/licenses/lgpl-license.php LGPL +
29 * @version     $Revision$ +
30 * @link        www.phpdoctrine.com +
31 * @since       1.0 +
32 */ +
33class Doctrine_Search_Listener extends Doctrine_Record_Listener  +
34{ +
35    protected $_search; +
36 +
37    public function __construct(Doctrine_Search $search) +
38    { +
39        $this->_search = $search; +
40    } +
41 +
42    public function preUpdate(Doctrine_Event $event) +
43    { +
44    } +
45 +
46    public function postUpdate(Doctrine_Event $event) +
47    { +
48 +
49    } +
50    public function postInsert(Doctrine_Event $event) +
51    { +
52        $record = $event->getInvoker(); +
53         +
54        $this->_search->updateIndex($record); +
55    } +
56}
\ No newline at end of file diff --git a/tests/coverage/Doctrine_Search_Query.html b/tests/coverage/Doctrine_Search_Query.html new file mode 100644 index 000000000..6989bbde9 --- /dev/null +++ b/tests/coverage/Doctrine_Search_Query.html @@ -0,0 +1,722 @@ + + + Coverage for Doctrine_Search_Query + + +

Coverage for Doctrine_Search_Query

Back to coverage report

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
1<?php +
2/* +
3 *  $Id: Hook.php 1939 2007-07-05 23:47:48Z zYne $ +
4 * +
5 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +
6 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +
7 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +
8 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +
9 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +
10 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +
11 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +
12 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +
13 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +
14 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +
15 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +
16 * +
17 * This software consists of voluntary contributions made by many individuals +
18 * and is licensed under the LGPL. For more information, see +
19 * <http://www.phpdoctrine.com>. +
20 */ +
21 +
22/** +
23 * Doctrine_Search_Query +
24 * +
25 * @package     Doctrine +
26 * @subpackage  Search +
27 * @author      Konsta Vesterinen <kvesteri@cc.hut.fi> +
28 * @license     http://www.opensource.org/licenses/lgpl-license.php LGPL +
29 * @version     $Revision$ +
30 * @link        www.phpdoctrine.com +
31 * @since       1.0 +
32 */ +
33class Doctrine_Search_Query +
34{ +
35    /** +
36     * @var Doctrine_Query $query           the base query +
37     */ +
38    protected $_query; +
39    /** +
40     * @var Doctrine_Table $_table          the index table +
41     */ +
42    protected $_table = array(); +
43     +
44    protected $_sql = ''; +
45     +
46    protected $_params = array(); +
47     +
48 +
49    protected $_condition; +
50    /** +
51     * @param octrine_Table $_table         the index table +
52     */ +
53    public function __construct($table) +
54    { +
55        if (is_string($table)) { +
56           $table = Doctrine_Manager::table($table); +
57        } +
58 +
59        $this->_table = $table; +
60 +
61        $this->_query = new Doctrine_Query(); +
62        $foreignId = current(array_diff($this->_table->getColumnNames(), array('keyword', 'field', 'position'))); +
63 +
64        $this->_condition = $foreignId . ' %s (SELECT ' . $foreignId . ' FROM ' . $this->_table->getTableName() . ' WHERE '; +
65    } +
66    /** +
67     * getQuery +
68     * +
69     * @return Doctrine_Query       returns the query object associated with this object +
70     */ +
71    public function getQuery() +
72    { +
73        return $this->_query; +
74    } +
75 +
76    public function search($text) +
77    { +
78        $text = trim($text); +
79         +
80        $foreignId = current(array_diff($this->_table->getColumnNames(), array('keyword', 'field', 'position'))); +
81 +
82        $weighted = false; +
83        if (strpos($text, '^') === false) { +
84            $select = 'SELECT COUNT(keyword) AS relevance, ' . $foreignId; +
85            $from = 'FROM ' . $this->_table->getTableName(); +
86        } else { +
87            // organize terms according weights +
88            $weighted = true; +
89 +
90            $select = 'SELECT SUM(sub_relevance) AS relevance, ' . $foreignId; +
91            $from = 'FROM ' ; +
92        } +
93         +
94        $where = 'WHERE '; +
95        $where .= $this->parseClause($text); +
96 +
97        $groupby = 'GROUP BY ' . $foreignId; +
98        $orderby = 'ORDER BY relevance'; +
99 +
100        $this->_sql = $select . ' ' . $from . ' ' . $where . ' ' . $groupby . ' ' . $orderby; +
101    } +
102 +
103    public function parseClause($originalClause, $recursive = false) +
104    { +
105        $clause = Doctrine_Tokenizer::bracketTrim($originalClause); +
106         +
107        $brackets = false; +
108 +
109        if ($clause !== $originalClause) { +
110            $brackets = true; +
111        } +
112 +
113        $foreignId = current(array_diff($this->_table->getColumnNames(), array('keyword', 'field', 'position'))); +
114         +
115        $terms = Doctrine_Tokenizer::sqlExplode($clause, ' OR ', '(', ')'); +
116 +
117        $ret = array(); +
118 +
119        if (count($terms) > 1) { +
120            $leavesOnly = true; +
121 +
122            foreach ($terms as $k => $term) { +
123                if ($this->isExpression($term)) { +
124                    $ret[$k] = $this->parseClause($term, true); +
125                    $leavesOnly = false; +
126                } else { +
127                    $ret[$k] = $this->parseTerm($term); +
128                } +
129            } +
130 +
131            $return = implode(' OR ', $ret); +
132 +
133            if ($leavesOnly && $recursive) { +
134                $return = sprintf($this->_condition, 'IN') . $return . ')'; +
135                $brackets = false; +
136            } +
137        } else { +
138            $terms = Doctrine_Tokenizer::sqlExplode($clause, ' ', '(', ')'); +
139             +
140            if (count($terms) === 1 && ! $recursive) { +
141                $return = $this->parseTerm($clause); +
142            } else { +
143                foreach ($terms as $k => $term) { +
144                    $term = trim($term); +
145     +
146                    if ($term === 'AND') { +
147                        continue; +
148                    } +
149     +
150                    if (substr($term, 0, 1) === '-') { +
151                        $operator = 'NOT IN'; +
152                        $term = substr($term, 1); +
153                    } else { +
154                        $operator = 'IN'; +
155                    } +
156     +
157                    if ($this->isExpression($term)) { +
158                        $ret[$k] = $this->parseClause($term, true); +
159                    } else { +
160                        $ret[$k] = sprintf($this->_condition, $operator) . $this->parseTerm($term) . ')'; +
161                    } +
162                } +
163                $return = implode(' AND ', $ret); +
164            } +
165        } +
166 +
167        if ($brackets) { +
168            return '(' . $return . ')'; +
169        } else { +
170            return $return; +
171        } +
172    } +
173    public function isExpression($term) +
174    { +
175        if (strpos($term, '(') !== false) { +
176            return true; +
177        } else { +
178            $terms = Doctrine_Tokenizer::quoteExplode($term); +
179             +
180            return (count($terms) > 1); +
181        } +
182    } +
183 +
184    public function parseTerm($term) +
185    { +
186        $negation = false; +
187 +
188        if (strpos($term, "'") === false) { +
189            $where = $this->parseWord($term); +
190        } else { +
191            $term = trim($term, "' "); +
192 +
193            $terms = Doctrine_Tokenizer::quoteExplode($term); +
194            $where = $this->parseWord($terms[0]); +
195 +
196            foreach ($terms as $k => $word) { +
197                if ($k === 0) { +
198                    continue; +
199                } +
200                $where .= ' AND (position + ' . $k . ') = (SELECT position FROM ' . $this->_table->getTableName() . ' WHERE ' . $this->parseWord($word) . ')'; +
201            } +
202        } +
203        return $where; +
204    } +
205    public function parseWord($word)  +
206    { +
207        if (strpos($word, '?') !== false || +
208            strpos($word, '*') !== false) { +
209             +
210            $word = str_replace('*', '%', $word); +
211 +
212            $where = 'keyword LIKE ?'; +
213             +
214            $params = array($word); +
215        } else { +
216            $where = 'keyword = ?'; +
217        } +
218         +
219        $this->_params[] = $word; +
220 +
221        return $where; +
222    } +
223    public function getParams() +
224    { +
225        return $this->_params; +
226    } +
227    public function getSql() +
228    { +
229        return $this->_sql; +
230    } +
231    public function execute() +
232    { +
233        $resultSet = $this->_query->execute();  +
234         +
235        return $resultSet; +
236    } +
237}
\ No newline at end of file diff --git a/tests/coverage/Doctrine_Sequence.html b/tests/coverage/Doctrine_Sequence.html new file mode 100644 index 000000000..589616995 --- /dev/null +++ b/tests/coverage/Doctrine_Sequence.html @@ -0,0 +1,227 @@ + + + Coverage for Doctrine_Sequence + + +

Coverage for Doctrine_Sequence

Back to coverage report

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
1<?php +
2/* +
3 *  $Id: Sequence.php 2702 2007-10-03 21:43:22Z Jonathan.Wage $ +
4 * +
5 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +
6 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +
7 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +
8 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +
9 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +
10 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +
11 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +
12 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +
13 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +
14 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +
15 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +
16 * +
17 * This software consists of voluntary contributions made by many individuals +
18 * and is licensed under the LGPL. For more information, see +
19 * <http://www.phpdoctrine.com>. +
20 */ +
21Doctrine::autoload('Doctrine_Connection_Module'); +
22/** +
23 * Doctrine_Sequence +
24 * The base class for sequence handling drivers. +
25 * +
26 * @package     Doctrine +
27 * @subpackage  Sequence +
28 * @author      Konsta Vesterinen <kvesteri@cc.hut.fi> +
29 * @license     http://www.opensource.org/licenses/lgpl-license.php LGPL +
30 * @link        www.phpdoctrine.com +
31 * @since       1.0 +
32 * @version     $Revision: 2702 $ +
33 */ +
34class Doctrine_Sequence extends Doctrine_Connection_Module +
35{ +
36    /** +
37     * Returns the next free id of a sequence +
38     * +
39     * @param string $seqName   name of the sequence +
40     * @param bool              when true missing sequences are automatic created +
41     * +
42     * @return integer          next id in the given sequence +
43     */ +
44    public function nextId($seqName, $ondemand = true) +
45    { +
46        throw new Doctrine_Sequence_Exception('method not implemented'); +
47    } +
48    /** +
49     * Returns the autoincrement ID if supported or $id or fetches the current +
50     * ID in a sequence called: $table.(empty($field) ? '' : '_'.$field) +
51     * +
52     * @param   string  name of the table into which a new row was inserted +
53     * @param   string  name of the field into which a new row was inserted +
54     */ +
55    public function lastInsertId($table = null, $field = null) +
56    { +
57        throw new Doctrine_Sequence_Exception('method not implemented'); +
58    } +
59    /** +
60     * Returns the current id of a sequence +
61     * +
62     * @param string $seqName   name of the sequence +
63     * +
64     * @return integer          current id in the given sequence +
65     */ +
66    public function currId($seqName) +
67    { +
68        $this->warnings[] = 'database does not support getting current +
69            sequence value, the sequence value was incremented'; +
70        return $this->nextId($seqName); +
71    } +
72}
\ No newline at end of file diff --git a/tests/coverage/Doctrine_Sequence_Firebird.html b/tests/coverage/Doctrine_Sequence_Firebird.html new file mode 100644 index 000000000..7d9920db1 --- /dev/null +++ b/tests/coverage/Doctrine_Sequence_Firebird.html @@ -0,0 +1,326 @@ + + + Coverage for Doctrine_Sequence_Firebird + + +

Coverage for Doctrine_Sequence_Firebird

Back to coverage report

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
1<?php +
2/* +
3 *  $Id: Firebird.php 2702 2007-10-03 21:43:22Z Jonathan.Wage $ +
4 * +
5 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +
6 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +
7 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +
8 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +
9 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +
10 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +
11 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +
12 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +
13 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +
14 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +
15 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +
16 * +
17 * This software consists of voluntary contributions made by many individuals +
18 * and is licensed under the LGPL. For more information, see +
19 * <http://www.phpdoctrine.com>. +
20 */ +
21Doctrine::autoload('Doctrine_Sequence'); +
22/** +
23 * Doctrine_Sequence_Firebird +
24 * +
25 * @package     Doctrine +
26 * @subpackage  Sequence +
27 * @author      Konsta Vesterinen <kvesteri@cc.hut.fi> +
28 * @license     http://www.opensource.org/licenses/lgpl-license.php LGPL +
29 * @link        www.phpdoctrine.com +
30 * @since       1.0 +
31 * @version     $Revision: 2702 $ +
32 */ +
33class Doctrine_Sequence_Firebird extends Doctrine_Sequence +
34{ +
35    /** +
36     * Returns the next free id of a sequence +
37     * +
38     * @param string $seqName   name of the sequence +
39     * @param bool              when true missing sequences are automatic created +
40     * +
41     * @return integer          next id in the given sequence +
42     */ +
43    public function nextID($seqName, $onDemand = true) +
44    { +
45        $sequenceName = $this->conn->quoteIdentifier($this->conn->formatter->getSequenceName($seqName), true); +
46 +
47        $query = 'SELECT GEN_ID(' . $sequenceName . ', 1) as the_value FROM RDB$DATABASE'; +
48        try { +
49         +
50            $result = $this->conn->fetchOne($query); +
51 +
52        } catch(Doctrine_Connection_Exception $e) { +
53            if ($onDemand && $e->getPortableCode() == Doctrine::ERR_NOSUCHTABLE) { +
54                // Since we are creating the sequence on demand +
55                // we know the first id = 1 so initialize the +
56                // sequence at 2 +
57                try { +
58                    $result = $this->conn->export->createSequence($seqName, 2); +
59                } catch(Doctrine_Exception $e) { +
60                    throw new Doctrine_Sequence_Exception('on demand sequence ' . $seqName . ' could not be created'); +
61                } +
62                // First ID of a newly created sequence is 1 +
63                // return 1; +
64                // BUT generators are not always reset, so return the actual value +
65                return $this->currID($seqName); +
66            } +
67            throw $e; +
68        } +
69        return $result; +
70    } +
71    /** +
72     * Returns the autoincrement ID if supported or $id or fetches the current +
73     * ID in a sequence called: $table.(empty($field) ? '' : '_'.$field) +
74     * +
75     * @param   string  name of the table into which a new row was inserted +
76     * @param   string  name of the field into which a new row was inserted +
77     */ +
78    public function lastInsertId($table = null, $field = null) +
79    { +
80        return $this->conn->getDbh()->lastInsertId(); +
81    } +
82    /** +
83     * Returns the current id of a sequence +
84     * +
85     * @param string $seqName   name of the sequence +
86     * +
87     * @return integer          current id in the given sequence +
88     */ +
89    public function currId($seqName) +
90    { +
91        $sequenceName = $this->conn->quoteIdentifier($this->conn->formatter->getSequenceName($seqName), true); +
92         +
93 +
94        $query = 'SELECT GEN_ID(' . $sequenceName . ', 0) as the_value FROM RDB$DATABASE'; +
95        try { +
96            $value = $this->conn->fetchOne($query); +
97        } catch(Doctrine_Connection_Exception $e) { +
98            throw new Doctrine_Sequence_Exception('Unable to select from ' . $seqName); +
99        } +
100        if ( ! is_numeric($value)) { +
101            throw new Doctrine_Sequence_Exception('could not find value in sequence table'); +
102        } +
103        return $value; +
104    } +
105}
\ No newline at end of file diff --git a/tests/coverage/Doctrine_Sequence_Mssql.html b/tests/coverage/Doctrine_Sequence_Mssql.html new file mode 100644 index 000000000..6c3216366 --- /dev/null +++ b/tests/coverage/Doctrine_Sequence_Mssql.html @@ -0,0 +1,476 @@ + + + Coverage for Doctrine_Sequence_Mssql + + +

Coverage for Doctrine_Sequence_Mssql

Back to coverage report

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
1<?php +
2/* +
3 *  $Id: Mssql.php 2702 2007-10-03 21:43:22Z Jonathan.Wage $ +
4 * +
5 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +
6 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +
7 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +
8 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +
9 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +
10 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +
11 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +
12 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +
13 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +
14 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +
15 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +
16 * +
17 * This software consists of voluntary contributions made by many individuals +
18 * and is licensed under the LGPL. For more information, see +
19 * <http://www.phpdoctrine.com>. +
20 */ +
21Doctrine::autoload('Doctrine_Sequence'); +
22/** +
23 * Doctrine_Sequence_Mssql +
24 * +
25 * @package     Doctrine +
26 * @subpackage  Sequence +
27 * @author      Konsta Vesterinen <kvesteri@cc.hut.fi> +
28 * @license     http://www.opensource.org/licenses/lgpl-license.php LGPL +
29 * @link        www.phpdoctrine.com +
30 * @since       1.0 +
31 * @version     $Revision: 2702 $ +
32 */ +
33class Doctrine_Sequence_Mssql extends Doctrine_Sequence +
34{ +
35    /** +
36     * Returns the next free id of a sequence +
37     * +
38     * @param string $seqName   name of the sequence +
39     * @param bool              when true missing sequences are automatic created +
40     * +
41     * @return integer          next id in the given sequence +
42     */ +
43    public function nextId($seqName, $onDemand = true) +
44    { +
45        $sequenceName = $this->conn->quoteIdentifier($this->conn->formatter->getSequenceName($seqName), true); +
46        $seqcolName   = $this->conn->quoteIdentifier($this->conn->getAttribute(Doctrine::ATTR_SEQCOL_NAME), true); +
47 +
48 +
49        if ($this->checkSequence($sequenceName)) { +
50            $query = 'SET IDENTITY_INSERT ' . $sequenceName . ' OFF ' +
51                   . 'INSERT INTO ' . $sequenceName . ' DEFAULT VALUES'; +
52        } else { +
53            $query = 'INSERT INTO ' . $sequenceName . ' (' . $seqcolName . ') VALUES (0)'; +
54        } +
55         +
56        try { +
57 +
58            $this->conn->exec($query); +
59 +
60        } catch(Doctrine_Connection_Exception $e) { +
61            if ($onDemand && $e->getPortableCode() == Doctrine::ERR_NOSUCHTABLE) { +
62                // Since we are creating the sequence on demand +
63                // we know the first id = 1 so initialize the +
64                // sequence at 2 +
65                try { +
66                    $result = $this->conn->export->createSequence($seqName, 2); +
67                } catch(Doctrine_Exception $e) { +
68                    throw new Doctrine_Sequence_Exception('on demand sequence ' . $seqName . ' could not be created'); +
69                } +
70                 +
71                /** +
72                 * This could actually be a table that starts at 18.. oh well.. +
73                 * we will keep the fallback to return 1 in case we skip this.. which +
74                 * should really not happen.. otherwise the returned values is biased. +
75                 */ +
76                if ($this->checkSequence($seqName)) { +
77                    return $this->lastInsertId($seqName); +
78                } +
79                 +
80                return 1; +
81            } +
82            throw $e; +
83        } +
84         +
85        $value = $this->lastInsertId($sequenceName); +
86 +
87        if (is_numeric($value)) { +
88            $query = 'DELETE FROM ' . $sequenceName . ' WHERE ' . $seqcolName . ' < ' . $value; +
89             +
90            try { +
91                $this->conn->exec($query); +
92            } catch (Doctrine_Connection_Exception $e) { +
93                throw new Doctrine_Sequence_Exception('Could not delete previous sequence from ' . $sequenceName .  +
94                                                      ' at ' . __FILE__ . ' in ' . __FUNCTION__ . ' with the message: ' . +
95                                                      $e->getMessage()); +
96            } +
97        } +
98        return $value; +
99    } +
100    /** +
101     * Checks if there's a sequence that exists. +
102     * +
103     * @param  string $seqName     The sequence name to verify. +
104     * @return bool   $tableExists The value if the table exists or not +
105     * @access private +
106     */ +
107    public function checkSequence($seqName) +
108    { +
109        $query = 'SELECT COUNT(1) FROM ' . $seqName; +
110        try { +
111            $this->conn->execute($query); +
112        } catch (Doctrine_Connection_Exception $e) { +
113            if ($e->getPortableCode() == Doctrine::ERR_NOSUCHTABLE) { +
114                return false; +
115            } +
116        } +
117        return true; +
118    } +
119 +
120    /** +
121     * Returns the autoincrement ID if supported or $id or fetches the current +
122     * ID in a sequence called: $table.(empty($field) ? '' : '_'.$field) +
123     * +
124     * @param   string  name of the table into which a new row was inserted +
125     * @param   string  name of the field into which a new row was inserted +
126     */ +
127    public function lastInsertId($table = null, $field = null) +
128    { +
129        $serverInfo = $this->conn->getServerVersion(); +
130        if (is_array($serverInfo) +
131            && ! is_null($serverInfo['major']) +
132            && $serverInfo['major'] >= 8) { +
133 +
134            $query = 'SELECT SCOPE_IDENTITY()'; +
135 +
136        } else { +
137            $query = 'SELECT @@IDENTITY'; +
138        } +
139 +
140        return $this->conn->fetchOne($query); +
141    } +
142    /** +
143     * Returns the current id of a sequence +
144     * +
145     * @param string $seqName   name of the sequence +
146     * +
147     * @return integer          current id in the given sequence +
148     */ +
149    public function currId($seqName) +
150    { +
151        $this->warnings[] = 'database does not support getting current +
152            sequence value, the sequence value was incremented'; +
153        return $this->nextId($seqName); +
154    } +
155}
\ No newline at end of file diff --git a/tests/coverage/Doctrine_Sequence_Mysql.html b/tests/coverage/Doctrine_Sequence_Mysql.html new file mode 100644 index 000000000..07809afa3 --- /dev/null +++ b/tests/coverage/Doctrine_Sequence_Mysql.html @@ -0,0 +1,341 @@ + + + Coverage for Doctrine_Sequence_Mysql + + +

Coverage for Doctrine_Sequence_Mysql

Back to coverage report

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
1<?php +
2/* +
3 *  $Id: Mysql.php 2702 2007-10-03 21:43:22Z Jonathan.Wage $ +
4 * +
5 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +
6 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +
7 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +
8 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +
9 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +
10 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +
11 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +
12 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +
13 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +
14 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +
15 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +
16 * +
17 * This software consists of voluntary contributions made by many individuals +
18 * and is licensed under the LGPL. For more information, see +
19 * <http://www.phpdoctrine.com>. +
20 */ +
21Doctrine::autoload('Doctrine_Sequence'); +
22/** +
23 * Doctrine_Sequence_Mysql +
24 * +
25 * @package     Doctrine +
26 * @subpackage  Sequence +
27 * @author      Konsta Vesterinen <kvesteri@cc.hut.fi> +
28 * @license     http://www.opensource.org/licenses/lgpl-license.php LGPL +
29 * @link        www.phpdoctrine.com +
30 * @since       1.0 +
31 * @version     $Revision: 2702 $ +
32 */ +
33class Doctrine_Sequence_Mysql extends Doctrine_Sequence +
34{ +
35    /** +
36     * Returns the next free id of a sequence +
37     * +
38     * @param string $seqName   name of the sequence +
39     * @param bool              when true missing sequences are automatic created +
40     * +
41     * @return integer          next id in the given sequence +
42     */ +
43    public function nextId($seqName, $onDemand = true) +
44    { +
45        $sequenceName  = $this->conn->quoteIdentifier($this->conn->formatter->getSequenceName($seqName), true); +
46        $seqcolName    = $this->conn->quoteIdentifier($this->conn->getAttribute(Doctrine::ATTR_SEQCOL_NAME), true); +
47        $query         = 'INSERT INTO ' . $sequenceName . ' (' . $seqcolName . ') VALUES (NULL)'; +
48         +
49        try { +
50 +
51            $this->conn->exec($query); +
52 +
53        } catch(Doctrine_Connection_Exception $e) { +
54            if ($onDemand && $e->getPortableCode() == Doctrine::ERR_NOSUCHTABLE) { +
55                // Since we are creating the sequence on demand +
56                // we know the first id = 1 so initialize the +
57                // sequence at 2 +
58                try { +
59                    $result = $this->conn->export->createSequence($seqName, 2); +
60                } catch(Doctrine_Exception $e) { +
61                    throw new Doctrine_Sequence_Exception('on demand sequence ' . $seqName . ' could not be created'); +
62                } +
63                // First ID of a newly created sequence is 1 +
64                return 1; +
65            } +
66            throw $e; +
67        } +
68 +
69        $value = $this->lastInsertId(); +
70 +
71        if (is_numeric($value)) { +
72            $query = 'DELETE FROM ' . $sequenceName . ' WHERE ' . $seqcolName . ' < ' . $value; +
73            $this->conn->exec($query); +
74            /** +
75            TODO: is the following needed ? +
76            if (PEAR::isError($result)) { +
77                $this->warnings[] = 'nextID: could not delete previous sequence table values from '.$seq_name; +
78            } +
79            */ +
80        } +
81        return $value; +
82    } +
83    /** +
84     * Returns the autoincrement ID if supported or $id or fetches the current +
85     * ID in a sequence called: $table.(empty($field) ? '' : '_'.$field) +
86     * +
87     * @param string  name of the table into which a new row was inserted +
88     * @param string  name of the field into which a new row was inserted +
89     * @return integer|boolean +
90     */ +
91    public function lastInsertId($table = null, $field = null) +
92    { +
93        return $this->conn->getDbh()->lastInsertId(); +
94    } +
95    /** +
96     * Returns the current id of a sequence +
97     * +
98     * @param string $seqName   name of the sequence +
99     * +
100     * @return integer          current id in the given sequence +
101     */ +
102    public function currId($seqName) +
103    { +
104        $sequenceName   = $this->conn->quoteIdentifier($this->conn->formatter->getSequenceName($seqName), true); +
105        $seqcolName     = $this->conn->quoteIdentifier($this->conn->getAttribute(Doctrine::ATTR_SEQCOL_NAME), true); +
106        $query          = 'SELECT MAX(' . $seqcolName . ') FROM ' . $sequenceName; +
107 +
108        return (int) $this->conn->fetchOne($query); +
109    } +
110}
\ No newline at end of file diff --git a/tests/coverage/Doctrine_Sequence_Oracle.html b/tests/coverage/Doctrine_Sequence_Oracle.html new file mode 100644 index 000000000..0b44be1ce --- /dev/null +++ b/tests/coverage/Doctrine_Sequence_Oracle.html @@ -0,0 +1,293 @@ + + + Coverage for Doctrine_Sequence_Oracle + + +

Coverage for Doctrine_Sequence_Oracle

Back to coverage report

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
1<?php +
2/* +
3 *  $Id: Oracle.php 2702 2007-10-03 21:43:22Z Jonathan.Wage $ +
4 * +
5 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +
6 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +
7 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +
8 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +
9 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +
10 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +
11 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +
12 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +
13 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +
14 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +
15 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +
16 * +
17 * This software consists of voluntary contributions made by many individuals +
18 * and is licensed under the LGPL. For more information, see +
19 * <http://www.phpdoctrine.com>. +
20 */ +
21Doctrine::autoload('Doctrine_Sequence'); +
22/** +
23 * Doctrine_Sequence_Oracle +
24 * +
25 * @package     Doctrine +
26 * @subpackage  Sequence +
27 * @author      Konsta Vesterinen <kvesteri@cc.hut.fi> +
28 * @license     http://www.opensource.org/licenses/lgpl-license.php LGPL +
29 * @link        www.phpdoctrine.com +
30 * @since       1.0 +
31 * @version     $Revision: 2702 $ +
32 */ +
33class Doctrine_Sequence_Oracle extends Doctrine_Sequence +
34{ +
35    /** +
36     * Returns the next free id of a sequence +
37     * +
38     * @param string $seqName   name of the sequence +
39     * @param bool onDemand     when true missing sequences are automatic created +
40     * +
41     * @return integer          next id in the given sequence +
42     */ +
43    public function nextID($seqName, $onDemand = true) +
44    { +
45        $sequenceName = $this->conn->quoteIdentifier($this->conn->formatter->getSequenceName($seqName), true); +
46        $query        = 'SELECT ' . $sequenceName . '.nextval FROM DUAL'; +
47 +
48        try { +
49            $result = $this->conn->fetchOne($query); +
50        } catch(Doctrine_Connection_Exception $e) { +
51            if ($onDemand && $e->getPortableCode() == Doctrine::ERR_NOSUCHTABLE) { +
52 +
53                try { +
54                    $result = $this->conn->export->createSequence($seqName); +
55                } catch(Doctrine_Exception $e) { +
56                    throw new Doctrine_Sequence_Exception('on demand sequence ' . $seqName . ' could not be created'); +
57                } +
58                return $this->nextId($seqName, false); +
59            } +
60            throw $e; +
61        } +
62        return $result; +
63    } +
64    /** +
65     * Returns the autoincrement ID if supported or $id or fetches the current +
66     * ID in a sequence called: $table.(empty($field) ? '' : '_'.$field) +
67     * +
68     * @param   string  name of the table into which a new row was inserted +
69     * @param   string  name of the field into which a new row was inserted +
70     */ +
71    public function lastInsertID($table = null, $field = null) +
72    { +
73        $seqName = $table . (empty($field) ? '' : '_'.$field); +
74        $sequenceName =  $this->conn->quoteIdentifier($this->conn->formatter->getSequenceName($seqName), true); +
75 +
76        return $this->conn->fetchOne('SELECT ' . $sequenceName . '.currval'); +
77    } +
78    /** +
79     * Returns the current id of a sequence +
80     * +
81     * @param string $seqName   name of the sequence +
82     * +
83     * @return integer          current id in the given sequence +
84     */ +
85    public function currID($seqName) +
86    { +
87        $sequenceName = $this->conn->quoteIdentifier($this->conn->formatter->getSequenceName($seqName), true); +
88        $query   = 'SELECT (last_number-1) FROM user_sequences'; +
89        $query  .= ' WHERE sequence_name=' . $this->conn->quote($sequenceName, 'text'); +
90        $query  .= ' OR sequence_name=' . $this->conn->quote(strtoupper($sequenceName), 'text'); +
91 +
92        return $this->conn->fetchOne($query); +
93    } +
94}
\ No newline at end of file diff --git a/tests/coverage/Doctrine_Sequence_Pgsql.html b/tests/coverage/Doctrine_Sequence_Pgsql.html new file mode 100644 index 000000000..5948f3f47 --- /dev/null +++ b/tests/coverage/Doctrine_Sequence_Pgsql.html @@ -0,0 +1,287 @@ + + + Coverage for Doctrine_Sequence_Pgsql + + +

Coverage for Doctrine_Sequence_Pgsql

Back to coverage report

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
1<?php +
2/* +
3 *  $Id: Pgsql.php 2702 2007-10-03 21:43:22Z Jonathan.Wage $ +
4 * +
5 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +
6 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +
7 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +
8 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +
9 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +
10 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +
11 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +
12 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +
13 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +
14 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +
15 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +
16 * +
17 * This software consists of voluntary contributions made by many individuals +
18 * and is licensed under the LGPL. For more information, see +
19 * <http://www.phpdoctrine.com>. +
20 */ +
21Doctrine::autoload('Doctrine_Sequence'); +
22/** +
23 * Doctrine_Sequence_Pgsql +
24 * +
25 * @package     Doctrine +
26 * @subpackage  Sequence +
27 * @author      Konsta Vesterinen <kvesteri@cc.hut.fi> +
28 * @license     http://www.opensource.org/licenses/lgpl-license.php LGPL +
29 * @link        www.phpdoctrine.com +
30 * @since       1.0 +
31 * @version     $Revision: 2702 $ +
32 */ +
33class Doctrine_Sequence_Pgsql extends Doctrine_Sequence +
34{ +
35    /** +
36     * Returns the next free id of a sequence +
37     * +
38     * @param string $seqName   name of the sequence +
39     * @param bool onDemand     when true missing sequences are automatic created +
40     * +
41     * @return integer          next id in the given sequence +
42     */ +
43    public function nextId($seqName, $onDemand = true) +
44    { +
45        $sequenceName = $this->conn->quoteIdentifier($this->conn->formatter->getSequenceName($seqName), true); +
46 +
47        $query = "SELECT NEXTVAL('" . $sequenceName . "')"; +
48        try { +
49            $result = (int) $this->conn->fetchOne($query); +
50        } catch(Doctrine_Connection_Exception $e) { +
51            if ($onDemand && $e->getPortableCode() == Doctrine::ERR_NOSUCHTABLE) { +
52 +
53                try { +
54                    $result = $this->conn->export->createSequence($seqName); +
55                } catch(Doctrine_Exception $e) { +
56                    throw new Doctrine_Sequence_Exception('on demand sequence ' . $seqName . ' could not be created'); +
57                } +
58                return $this->nextId($seqName, false); +
59            } +
60        } +
61        return $result; +
62    } +
63    /** +
64     * lastInsertId +
65     * +
66     * Returns the autoincrement ID if supported or $id or fetches the current +
67     * ID in a sequence called: $table.(empty($field) ? '' : '_'.$field) +
68     * +
69     * @param   string  name of the table into which a new row was inserted +
70     * @param   string  name of the field into which a new row was inserted +
71     * @return integer      the autoincremented id +
72     */ +
73    public function lastInsertId($table = null, $field = null) +
74    { +
75        $seqName = $table . (empty($field) ? '' : '_' . $field); +
76        $sequenceName = $this->conn->quoteIdentifier($this->conn->formatter->getSequenceName($seqName), true); +
77 +
78        return (int) $this->conn->fetchOne("SELECT CURRVAL('" . $sequenceName . "')"); +
79    } +
80    /** +
81     * Returns the current id of a sequence +
82     * +
83     * @param string $seqName   name of the sequence +
84     * +
85     * @return integer          current id in the given sequence +
86     */ +
87    public function currId($seqName) +
88    { +
89        $sequenceName = $this->conn->quoteIdentifier($this->conn->formatter->getSequenceName($seqName), true); +
90        return (int) $this->conn->fetchOne('SELECT last_value FROM ' . $sequenceName); +
91    } +
92}
\ No newline at end of file diff --git a/tests/coverage/Doctrine_Sequence_Sqlite.html b/tests/coverage/Doctrine_Sequence_Sqlite.html new file mode 100644 index 000000000..b695f1dac --- /dev/null +++ b/tests/coverage/Doctrine_Sequence_Sqlite.html @@ -0,0 +1,347 @@ + + + Coverage for Doctrine_Sequence_Sqlite + + +

Coverage for Doctrine_Sequence_Sqlite

Back to coverage report

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
1<?php +
2/* +
3 *  $Id: Sqlite.php 2702 2007-10-03 21:43:22Z Jonathan.Wage $ +
4 * +
5 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +
6 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +
7 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +
8 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +
9 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +
10 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +
11 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +
12 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +
13 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +
14 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +
15 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +
16 * +
17 * This software consists of voluntary contributions made by many individuals +
18 * and is licensed under the LGPL. For more information, see +
19 * <http://www.phpdoctrine.com>. +
20 */ +
21Doctrine::autoload('Doctrine_Sequence'); +
22/** +
23 * Doctrine_Sequence_Sqlite +
24 * +
25 * @package     Doctrine +
26 * @subpackage  Sequence +
27 * @author      Konsta Vesterinen <kvesteri@cc.hut.fi> +
28 * @license     http://www.opensource.org/licenses/lgpl-license.php LGPL +
29 * @link        www.phpdoctrine.com +
30 * @since       1.0 +
31 * @version     $Revision: 2702 $ +
32 */ +
33class Doctrine_Sequence_Sqlite extends Doctrine_Sequence +
34{ +
35    /** +
36     * Returns the next free id of a sequence +
37     * +
38     * @param string $seqName   name of the sequence +
39     * @param bool $onDemand    when true missing sequences are automatic created +
40     * +
41     * @return integer          next id in the given sequence +
42     */ +
43    public function nextId($seqName, $onDemand = true) +
44    { +
45        $sequenceName = $this->conn->quoteIdentifier($this->conn->formatter->getSequenceName($seqName), true); +
46        $seqcolName   = $this->conn->quoteIdentifier($this->conn->getAttribute(Doctrine::ATTR_SEQCOL_NAME), true); +
47 +
48        $query        = 'INSERT INTO ' . $sequenceName . ' (' . $seqcolName . ') VALUES (NULL)'; +
49 +
50        try { +
51 +
52            $this->conn->exec($query); +
53 +
54        } catch(Doctrine_Connection_Exception $e) { +
55            if ($onDemand && $e->getPortableCode() == Doctrine::ERR_NOSUCHTABLE) { +
56                // Since we are creating the sequence on demand +
57                // we know the first id = 1 so initialize the +
58                // sequence at 2 +
59 +
60                try { +
61                    $result = $this->conn->export->createSequence($seqName, 2); +
62                } catch(Doctrine_Exception $e) { +
63                    throw new Doctrine_Sequence_Exception('on demand sequence ' . $seqName . ' could not be created'); +
64                } +
65                // First ID of a newly created sequence is 1 +
66                return 1; +
67            } +
68            throw $e; +
69        } +
70 +
71        $value = $this->conn->getDbh()->lastInsertId(); +
72 +
73        if (is_numeric($value)) { +
74            $query = 'DELETE FROM ' . $sequenceName . ' WHERE ' . $seqcolName . ' < ' . $value; +
75             +
76            $this->conn->exec($query); +
77            /** +
78            TODO: is the following needed ? +
79            $this->warnings[] = 'nextID: could not delete previous sequence table values from '.$seq_name; +
80            */ +
81        } +
82        return $value; +
83    } +
84    /** +
85     * Returns the autoincrement ID if supported or $id or fetches the current +
86     * ID in a sequence called: $table.(empty($field) ? '' : '_'.$field) +
87     * +
88     * @param   string  name of the table into which a new row was inserted +
89     * @param   string  name of the field into which a new row was inserted +
90     * @return integer|boolean +
91     */ +
92    public function lastInsertId($table = null, $field = null) +
93    { +
94        return $this->conn->getDbh()->lastInsertId(); +
95    } +
96    /** +
97     * Returns the current id of a sequence +
98     * +
99     * @param string $seqName   name of the sequence +
100     * +
101     * @return integer          current id in the given sequence +
102     */ +
103    public function currId($seqName) +
104    { +
105        $sequenceName = $this->conn->quoteIdentifier($this->conn->formatter->getSequenceName($seqName), true); +
106        $seqcolName   = $this->conn->quoteIdentifier($this->conn->getAttribute(Doctrine::ATTR_SEQCOL_NAME), true); +
107 +
108        $query        = 'SELECT MAX(' . $seqcolName . ') FROM ' . $sequenceName; +
109 +
110        return (int) $this->conn->fetchOne($query); +
111    } +
112}
\ No newline at end of file diff --git a/tests/coverage/Doctrine_Table.html b/tests/coverage/Doctrine_Table.html new file mode 100644 index 000000000..ac0749b60 --- /dev/null +++ b/tests/coverage/Doctrine_Table.html @@ -0,0 +1,4314 @@ + + + Coverage for Doctrine_Table + + +

Coverage for Doctrine_Table

Back to coverage report

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
1<?php +
2/* +
3 *  $Id: Table.php 2821 2007-10-12 21:32:26Z zYne $ +
4 * +
5 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +
6 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +
7 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +
8 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +
9 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +
10 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +
11 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +
12 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +
13 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +
14 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +
15 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +
16 * +
17 * This software consists of voluntary contributions made by many individuals +
18 * and is licensed under the LGPL. For more information, see +
19 * <http://www.phpdoctrine.com>. +
20 */ +
21/** +
22 * Doctrine_Table   represents a database table +
23 *                  each Doctrine_Table holds the information of foreignKeys and associations +
24 * +
25 * +
26 * @author      Konsta Vesterinen <kvesteri@cc.hut.fi> +
27 * @package     Doctrine +
28 * @subpackage  Table +
29 * @license     http://www.opensource.org/licenses/lgpl-license.php LGPL +
30 * @version     $Revision: 2821 $ +
31 * @link        www.phpdoctrine.com +
32 * @since       1.0 +
33 */ +
34class Doctrine_Table extends Doctrine_Configurable implements Countable +
35{ +
36    /** +
37     * @var array $data                                 temporary data which is then loaded into Doctrine_Record::$data +
38     */ +
39    private $_data             = array(); +
40    /** +
41     * @var mixed $identifier +
42     */ +
43    private $_identifier; +
44    /** +
45     * @see Doctrine_Identifier constants +
46     * @var integer $identifierType                     the type of identifier this table uses +
47     */ +
48    private $_identifierType; +
49    /** +
50     * @var Doctrine_Connection $conn                   Doctrine_Connection object that created this table +
51     */ +
52    private $_conn; +
53    /** +
54     * @var array $identityMap                          first level cache +
55     */ +
56    private $_identityMap        = array(); +
57    /** +
58     * @var Doctrine_Table_Repository $repository       record repository +
59     */ +
60    private $_repository; +
61    /** +
62     * @var array $columns                  an array of column definitions, +
63     *                                      keys as column names and values as column definitions +
64     * +
65     *                                      the definition array has atleast the following values: +
66     * +
67     *                                      -- type         the column type, eg. 'integer' +
68     *                                      -- length       the column length, eg. 11 +
69     * +
70     *                                      additional keys: +
71     *                                      -- notnull      whether or not the column is marked as notnull +
72     *                                      -- values       enum values +
73     *                                      -- notblank     notblank validator + notnull constraint +
74     *                                      ... many more +
75     */ +
76    protected $_columns          = array(); +
77    /** +
78     * @var array $columnAliases            an array of column aliases +
79     *                                      keys as column aliases and values as column names +
80     */ +
81    protected $_columnAliases    = array(); +
82    /** +
83     * @var integer $columnCount            cached column count, Doctrine_Record uses this column count in when +
84     *                                      determining its state +
85     */ +
86    private $columnCount; +
87    /** +
88     * @var boolean $hasDefaultValues       whether or not this table has default values +
89     */ +
90    private $hasDefaultValues; +
91    /** +
92     * @var array $options                  an array containing all options +
93     * +
94     *      -- name                         name of the component, for example component name of the GroupTable is 'Group' +
95     * +
96     *      -- parents                      the parent classes of this component +
97     * +
98     *      -- declaringClass               name of the table definition declaring class (when using inheritance the class +
99     *                                      that defines the table structure can be any class in the inheritance hierarchy, +
100     *                                      hence we need reflection to check out which class actually calls setTableDefinition) +
101     * +
102     *      -- tableName                    database table name, in most cases this is the same as component name but in some cases +
103     *                                      where one-table-multi-class inheritance is used this will be the name of the inherited table +
104     * +
105     *      -- sequenceName                 Some databases need sequences instead of auto incrementation primary keys, +
106     *                                      you can set specific sequence for your table by calling setOption('sequenceName', $seqName) +
107     *                                      where $seqName is the name of the desired sequence +
108     * +
109     *      -- enumMap                      enum value arrays +
110     * +
111     *      -- inheritanceMap               inheritanceMap is used for inheritance mapping, keys representing columns and values +
112     *                                      the column values that should correspond to child classes +
113     * +
114     *      -- type                         table type (mysql example: INNODB) +
115     * +
116     *      -- charset                      character set +
117     * +
118     *      -- foreignKeys                  the foreign keys of this table +
119     * +
120     *      -- checks                       the check constraints of this table, eg. 'price > dicounted_price' +
121     * +
122     *      -- collation                    collation attribute +
123     * +
124     *      -- indexes                      the index definitions of this table +
125     * +
126     *      -- treeImpl                     the tree implementation of this table (if any) +
127     * +
128     *      -- treeOptions                  the tree options +
129     * +
130     *      -- queryParts                   the bound query parts +
131     * +
132     *      -- versioning +
133     */ +
134    protected $_options      = array('name'           => null, +
135                                     'tableName'      => null, +
136                                     'sequenceName'   => null, +
137                                     'inheritanceMap' => array(), +
138                                     'enumMap'        => array(), +
139                                     'type'           => null, +
140                                     'charset'        => null, +
141                                     'collation'      => null, +
142                                     'treeImpl'       => null, +
143                                     'treeOptions'    => null, +
144                                     'indexes'        => array(), +
145                                     'parents'        => array(), +
146                                     'queryParts'     => array(), +
147                                     'versioning'     => null, +
148                                     ); +
149    /** +
150     * @var Doctrine_Tree $tree                 tree object associated with this table +
151     */ +
152    protected $_tree; +
153    /** +
154     * @var Doctrine_Relation_Parser $_parser   relation parser object +
155     */ +
156    protected $_parser; +
157    /** +
158     * @var array $_templates                   an array containing all templates attached to this table +
159     */ +
160    protected $_templates   = array(); +
161    /** +
162     * @var array $_filters                     an array containing all record filters attached to this table +
163     */ +
164    protected $_filters     = array(); +
165     +
166    protected $_invokedMethods = array(); +
167 +
168 +
169 +
170    /** +
171     * the constructor +
172     * @throws Doctrine_Connection_Exception    if there are no opened connections +
173     * @throws Doctrine_Table_Exception         if there is already an instance of this table +
174     * @return void +
175     */ +
176    public function __construct($name, Doctrine_Connection $conn) +
177    { +
178        $this->_conn = $conn; +
179 +
180        $this->setParent($this->_conn); +
181 +
182        $this->_options['name'] = $name; +
183        $this->_parser = new Doctrine_Relation_Parser($this); +
184 +
185        if ( ! class_exists($name) || empty($name)) { +
186            throw new Doctrine_Exception("Couldn't find class " . $name); +
187        } +
188        $record = new $name($this); +
189 +
190        $names = array(); +
191 +
192        $class = $name; +
193 +
194        // get parent classes +
195 +
196        do { +
197            if ($class === 'Doctrine_Record') { +
198                break; +
199            } +
200 +
201            $name = $class; +
202            $names[] = $name; +
203        } while ($class = get_parent_class($class)); +
204 +
205        if ($class === false) { +
206            throw new Doctrine_Table_Exception('Unknown component.'); +
207        } +
208 +
209        // reverse names +
210        $names = array_reverse($names); +
211        // save parents +
212        array_pop($names); +
213        $this->_options['parents'] = $names; +
214 +
215        // create database table +
216        if (method_exists($record, 'setTableDefinition')) { +
217            $record->setTableDefinition(); +
218            // get the declaring class of setTableDefinition method +
219            $method = new ReflectionMethod($this->_options['name'], 'setTableDefinition'); +
220            $class  = $method->getDeclaringClass(); +
221        } else { +
222            $class = new ReflectionClass($class); +
223        } +
224        $this->_options['declaringClass'] = $class; +
225 +
226        // set the table definition for the given tree implementation +
227        if ($this->isTree()) { +
228            $this->getTree()->setTableDefinition(); +
229        } +
230 +
231        $this->columnCount = count($this->_columns); +
232 +
233        if ( ! isset($this->_options['tableName'])) { +
234            $this->_options['tableName'] = Doctrine::tableize($class->getName()); +
235        } +
236 +
237        switch (count($this->_identifier)) { +
238            case 0: +
239                $this->_columns = array_merge(array('id' => +
240                                              array('type'          => 'integer', +
241                                                    'length'        => 20, +
242                                                    'autoincrement' => true, +
243                                                    'primary'       => true)), $this->_columns); +
244                $this->_identifier = 'id'; +
245                $this->_identifierType = Doctrine::IDENTIFIER_AUTOINC; +
246                $this->columnCount++; +
247                break; +
248            case 1: +
249                foreach ($this->_identifier as $pk) { +
250                    $e = $this->_columns[$pk]; +
251 +
252                    $found = false; +
253 +
254                    foreach ($e as $option => $value) { +
255                        if ($found) +
256                                break; +
257 +
258                        $e2 = explode(':', $option); +
259 +
260                        switch (strtolower($e2[0])) { +
261                            case 'autoincrement': +
262                            case 'autoinc': +
263                                $this->_identifierType = Doctrine::IDENTIFIER_AUTOINC; +
264                                $found = true; +
265                                break; +
266                            case 'seq': +
267                            case 'sequence': +
268                                $this->_identifierType = Doctrine::IDENTIFIER_SEQUENCE; +
269                                $found = true; +
270 +
271                                if ($value) { +
272                                    $this->_options['sequenceName'] = $value; +
273                                } else { +
274                                    if (($sequence = $this->getAttribute(Doctrine::ATTR_DEFAULT_SEQUENCE)) !== null) { +
275                                        $this->_options['sequenceName'] = $sequence; +
276                                    } else { +
277                                        $this->_options['sequenceName'] = $this->_conn->getSequenceName($this->_options['tableName']); +
278                                    } +
279                                } +
280                                break; +
281                        } +
282                    } +
283                    if ( ! isset($this->_identifierType)) { +
284                        $this->_identifierType = Doctrine::IDENTIFIER_NATURAL; +
285                    } +
286                } +
287 +
288                $this->_identifier = $pk; +
289 +
290                break; +
291            default: +
292                $this->_identifierType = Doctrine::IDENTIFIER_COMPOSITE; +
293        } +
294 +
295        $record->setUp(); +
296 +
297        // if tree, set up tree +
298        if ($this->isTree()) { +
299            $this->getTree()->setUp(); +
300        } +
301        $this->_filters[]  = new Doctrine_Record_Filter_Standard(); +
302        $this->_repository = new Doctrine_Table_Repository($this); +
303    } +
304    public function getMethodOwner($method)  +
305    { +
306        return (isset($this->_invokedMethods[$method])) ? +
307                      $this->_invokedMethods[$method] : false; +
308    } +
309     +
310    public function setMethodOwner($method, $class) +
311    { +
312        $this->_invokedMethods[$method] = $class; +
313    } +
314    /** +
315     * getTemplates +
316     * returns all templates attached to this table +
317     * +
318     * @return array     an array containing all templates +
319     */ +
320    public function getTemplates() +
321    { +
322        return $this->_templates; +
323    } +
324    /** +
325     * export +
326     * exports this table to database based on column and option definitions +
327     * +
328     * @throws Doctrine_Connection_Exception    if some error other than Doctrine::ERR_ALREADY_EXISTS +
329     *                                          occurred during the create table operation +
330     * @return boolean                          whether or not the export operation was successful +
331     *                                          false if table already existed in the database +
332     */ +
333    public function export() +
334    { +
335        $this->_conn->export->exportTable($this); +
336    } +
337    /** +
338     * getExportableFormat +
339     * returns exportable presentation of this object +
340     * +
341     * @return array +
342     */ +
343    public function getExportableFormat($parseForeignKeys = true) +
344    { +
345        $columns = array(); +
346        $primary = array(); +
347 +
348        foreach ($this->getColumns() as $name => $column) { +
349            $definition = $column; +
350 +
351            switch ($definition['type']) { +
352                case 'enum': +
353                    if (isset($definition['default'])) { +
354                        $definition['default'] = $this->enumIndex($name, $definition['default']); +
355                    } +
356                    break; +
357                case 'boolean': +
358                    if (isset($definition['default'])) { +
359                        $definition['default'] = $this->getConnection()->convertBooleans($definition['default']); +
360                    } +
361                    break; +
362            } +
363            $columns[$name] = $definition; +
364 +
365            if (isset($definition['primary']) && $definition['primary']) { +
366                $primary[] = $name; +
367            } +
368        } +
369        $options['foreignKeys'] = array(); +
370 +
371        if ($parseForeignKeys) { +
372            if ($this->getAttribute(Doctrine::ATTR_EXPORT) & Doctrine::EXPORT_CONSTRAINTS) { +
373 +
374                $constraints = array(); +
375 +
376                $emptyIntegrity = array('onUpdate' => null, +
377                                        'onDelete' => null); +
378 +
379                foreach ($this->getRelations() as $name => $relation) { +
380                    $fk = $relation->toArray(); +
381                    $fk['foreignTable'] = $relation->getTable()->getTableName(); +
382 +
383                    if ($relation->getTable() === $this && in_array($relation->getLocal(), $primary)) { +
384                        if ($relation->hasConstraint()) { +
385                            throw new Doctrine_Table_Exception("Badly constructed integrity constraints."); +
386                        } +
387 +
388                        continue; +
389                    } +
390 +
391                    $integrity = array('onUpdate' => $fk['onUpdate'], +
392                                       'onDelete' => $fk['onDelete']); +
393 +
394                    if ($relation instanceof Doctrine_Relation_LocalKey) { +
395                        $def = array('local'        => $relation->getLocal(), +
396                                     'foreign'      => $relation->getForeign(), +
397                                     'foreignTable' => $relation->getTable()->getTableName()); +
398 +
399                        if (($key = array_search($def, $options['foreignKeys'])) === false) { +
400                            $options['foreignKeys'][] = $def; +
401 +
402                            $constraints[] = $integrity; +
403                        } else { +
404                            if ($integrity !== $emptyIntegrity) { +
405                                $constraints[$key] = $integrity; +
406                            } +
407                        } +
408                    } +
409                } +
410 +
411                foreach ($constraints as $k => $def) { +
412                    $options['foreignKeys'][$k] = array_merge($options['foreignKeys'][$k], $def); +
413                } +
414 +
415            } +
416        } +
417        $options['primary'] = $primary; +
418 +
419        return array('tableName' => $this->getOption('tableName'), +
420                     'columns'   => $columns, +
421                     'options'   => array_merge($this->getOptions(), $options)); +
422    } +
423    /** +
424     * exportConstraints +
425     * exports the constraints of this table into database based on option definitions +
426     * +
427     * @throws Doctrine_Connection_Exception    if something went wrong on db level +
428     * @return void +
429     */ +
430    public function exportConstraints() +
431    { +
432        try { +
433            $this->_conn->beginTransaction(); +
434 +
435            foreach ($this->_options['index'] as $index => $definition) { +
436                $this->_conn->export->createIndex($this->_options['tableName'], $index, $definition); +
437            } +
438            $this->_conn->commit(); +
439        } catch(Doctrine_Connection_Exception $e) { +
440            $this->_conn->rollback(); +
441 +
442            throw $e; +
443        } +
444    } +
445    /** +
446     * getRelationParser +
447     * return the relation parser associated with this table +
448     * +
449     * @return Doctrine_Relation_Parser     relation parser object +
450     */ +
451    public function getRelationParser() +
452    { +
453        return $this->_parser; +
454    } +
455    /** +
456     * __get +
457     * an alias for getOption +
458     * +
459     * @param string $option +
460     */ +
461    public function __get($option) +
462    { +
463        if (isset($this->_options[$option])) { +
464            return $this->_options[$option]; +
465        } +
466        return null; +
467    } +
468    /** +
469     * __isset +
470     * +
471     * @param string $option +
472     */ +
473    public function __isset($option) +
474    { +
475        return isset($this->_options[$option]); +
476    } +
477    /** +
478     * getOptions +
479     * returns all options of this table and the associated values +
480     * +
481     * @return array    all options and their values +
482     */ +
483    public function getOptions() +
484    { +
485        return $this->_options; +
486    } +
487    /** +
488     * addForeignKey +
489     * +
490     * adds a foreignKey to this table +
491     * +
492     * @return void +
493     */ +
494    public function addForeignKey(array $definition) +
495    { +
496        $this->_options['foreignKeys'][] = $definition; +
497    } +
498    /** +
499     * addCheckConstraint +
500     * +
501     * adds a check constraint to this table +
502     * +
503     * @return void +
504     */ +
505    public function addCheckConstraint($definition, $name) +
506    { +
507        if (is_string($name)) { +
508            $this->_options['checks'][$name] = $definition; +
509        } else { +
510            $this->_options['checks'][] = $definition; +
511        } +
512 +
513        return $this; +
514    } +
515    /** +
516     * addIndex +
517     * +
518     * adds an index to this table +
519     * +
520     * @return void +
521     */ +
522    public function addIndex($index, array $definition) +
523    { +
524        $this->_options['indexes'][$index] = $definition; +
525    } +
526    /** +
527     * getIndex +
528     * +
529     * @return array|boolean        array on success, FALSE on failure +
530     */ +
531    public function getIndex($index) +
532    { +
533        if (isset($this->_options['indexes'][$index])) { +
534            return $this->_options['indexes'][$index]; +
535        } +
536 +
537        return false; +
538    } +
539    public function bind($args, $type) +
540    { +
541        $options = array(); +
542        $options['type'] = $type; +
543 +
544        if ( ! isset($args[1])) { +
545            $args[1] = array(); +
546        } +
547 +
548        // the following is needed for backwards compatibility +
549        if (is_string($args[1])) { +
550            if ( ! isset($args[2])) { +
551                $args[2] = array(); +
552            } elseif (is_string($args[2])) { +
553                $args[2] = (array) $args[2]; +
554            } +
555 +
556            $classes = array_merge($this->_options['parents'], array($this->getComponentName())); +
557 +
558 +
559            $e = explode('.', $args[1]); +
560            if (in_array($e[0], $classes)) { +
561                if ($options['type'] >= Doctrine_Relation::MANY) { +
562                    $options['foreign'] = $e[1]; +
563                } else { +
564                    $options['local'] = $e[1]; +
565                } +
566            } else { +
567                $e2 = explode(' as ', $args[0]); +
568                if ($e[0] !== $e2[0] && ( ! isset($e2[1]) || $e[0] !== $e2[1])) { +
569                    $options['refClass'] = $e[0]; +
570                } +
571 +
572                $options['foreign'] = $e[1]; +
573            } +
574 +
575            $options = array_merge($args[2], $options); +
576 +
577            $this->_parser->bind($args[0], $options); +
578        } else { +
579            $options = array_merge($args[1], $options); +
580            $this->_parser->bind($args[0], $options); +
581        } +
582    } +
583 +
584    /** +
585     * hasRelation +
586     * +
587     * @param string $alias      the relation to check if exists +
588     * @return boolean           true if the relation exists otherwise false +
589     */ +
590    public function hasRelation($alias) +
591    { +
592        return $this->_parser->hasRelation($alias); +
593    } +
594 +
595    /** +
596     * getRelation +
597     * +
598     * @param string $alias      relation alias +
599     */ +
600    public function getRelation($alias, $recursive = true) +
601    { +
602        return $this->_parser->getRelation($alias, $recursive); +
603    } +
604    /** +
605     * getRelations +
606     * returns an array containing all relation objects +
607     * +
608     * @return array        an array of Doctrine_Relation objects +
609     */ +
610    public function getRelations() +
611    { +
612        return $this->_parser->getRelations(); +
613    } +
614    /** +
615     * createQuery +
616     * creates a new Doctrine_Query object and adds the component name +
617     * of this table as the query 'from' part +
618     * +
619     * @param string Optional alias name for component aliasing. +
620     * +
621     * @return Doctrine_Query +
622     */ +
623    public function createQuery($alias = '') +
624    { +
625        if (!empty($alias)) { +
626            $alias = ' ' . trim($alias); +
627        } +
628        return Doctrine_Query::create($this->_conn)->from($this->getComponentName() . $alias); +
629    } +
630    /** +
631     * getRepository +
632     * +
633     * @return Doctrine_Table_Repository +
634     */ +
635    public function getRepository() +
636    { +
637        return $this->_repository; +
638    } +
639    /** +
640     * setOption +
641     * sets an option and returns this object in order to +
642     * allow flexible method chaining +
643     * +
644     * @see Doctrine_Table::$_options   for available options +
645     * @param string $name              the name of the option to set +
646     * @param mixed $value              the value of the option +
647     * @return Doctrine_Table           this object +
648     */ +
649    public function setOption($name, $value) +
650    { +
651        switch ($name) { +
652        case 'name': +
653        case 'tableName': +
654            break; +
655        case 'enumMap': +
656        case 'inheritanceMap': +
657        case 'index': +
658        case 'treeOptions': +
659            if ( ! is_array($value)) { +
660                throw new Doctrine_Table_Exception($name . ' should be an array.'); +
661            } +
662            break; +
663        } +
664        $this->_options[$name] = $value; +
665    } +
666    /** +
667     * getOption +
668     * returns the value of given option +
669     * +
670     * @param string $name  the name of the option +
671     * @return mixed        the value of given option +
672     */ +
673    public function getOption($name) +
674    { +
675        if (isset($this->_options[$name])) { +
676            return $this->_options[$name]; +
677        } +
678        return null; +
679    } +
680    /** +
681     * getColumnName +
682     * +
683     * returns a column name for column alias +
684     * if the actual name for the alias cannot be found +
685     * this method returns the given alias +
686     * +
687     * @param string $alias         column alias +
688     * @return string               column name +
689     */ +
690    public function getColumnName($alias) +
691    { +
692        $alias = strtolower($alias); +
693        if (isset($this->_columnAliases[$alias])) { +
694            return $this->_columnAliases[$alias]; +
695        } +
696 +
697        return $alias; +
698    } +
699    /** +
700     * setColumn +
701     * +
702     * @param string $name +
703     * @param string $type +
704     * @param integer $length +
705     * @param mixed $options +
706     * @throws Doctrine_Table_Exception     if trying use wrongly typed parameter +
707     * @return void +
708     */ +
709    public function setColumn($name, $type, $length = null, $options = array()) +
710    { +
711        if (is_string($options)) { +
712            $options = explode('|', $options); +
713        } +
714 +
715        foreach ($options as $k => $option) { +
716            if (is_numeric($k)) { +
717                if ( ! empty($option)) { +
718                    $options[$option] = true; +
719                } +
720                unset($options[$k]); +
721            } +
722        } +
723 +
724        $name  = strtolower($name); +
725        $parts = explode(' as ', $name); +
726 +
727        if (count($parts) > 1) { +
728            $this->_columnAliases[$parts[1]] = $parts[0]; +
729            $name = $parts[0]; +
730        } +
731 +
732 +
733 +
734        if ($length == null) { +
735            switch ($type) { +
736                case 'string': +
737                case 'clob': +
738                case 'float': +
739                case 'integer': +
740                case 'array': +
741                case 'object': +
742                case 'blob': +
743                case 'gzip': +
744                    // use php int max +
745                    $length = 2147483647; +
746                break; +
747                case 'boolean': +
748                    $length = 1; +
749                case 'date': +
750                    // YYYY-MM-DD ISO 8601 +
751                    $length = 10; +
752                case 'time': +
753                    // HH:NN:SS+00:00 ISO 8601 +
754                    $length = 14; +
755                case 'timestamp': +
756                    // YYYY-MM-DDTHH:MM:SS+00:00 ISO 8601 +
757                    $length = 25; +
758                break; +
759            } +
760        } +
761 +
762        $this->_columns[$name] = $options; +
763        $this->_columns[$name]['type'] = $type; +
764        $this->_columns[$name]['length'] = $length; +
765 +
766        if (isset($options['primary'])) { +
767            $this->_identifier[] = $name; +
768        } +
769        if (isset($options['default'])) { +
770            $this->hasDefaultValues = true; +
771        } +
772    } +
773    /** +
774     * hasDefaultValues +
775     * returns true if this table has default values, otherwise false +
776     * +
777     * @return boolean +
778     */ +
779    public function hasDefaultValues() +
780    { +
781        return $this->hasDefaultValues; +
782    } +
783    /** +
784     * getDefaultValueOf +
785     * returns the default value(if any) for given column +
786     * +
787     * @param string $column +
788     * @return mixed +
789     */ +
790    public function getDefaultValueOf($column) +
791    { +
792        $column = strtolower($column); +
793        if ( ! isset($this->_columns[$column])) { +
794            throw new Doctrine_Table_Exception("Couldn't get default value. Column ".$column." doesn't exist."); +
795        } +
796        if (isset($this->_columns[$column]['default'])) { +
797            return $this->_columns[$column]['default']; +
798        } else { +
799            return null; +
800        } +
801    } +
802    /** +
803     * @return mixed +
804     */ +
805    public function getIdentifier() +
806    { +
807        return $this->_identifier; +
808    } +
809    /** +
810     * @return integer +
811     */ +
812    public function getIdentifierType() +
813    { +
814        return $this->_identifierType; +
815    } +
816    /** +
817     * hasColumn +
818     * @return boolean +
819     */ +
820    public function hasColumn($name) +
821    { +
822        return isset($this->_columns[$name]); +
823    } +
824    /** +
825     * @return Doctrine_Connection +
826     */ +
827    public function getConnection() +
828    { +
829        return $this->_conn; +
830    } +
831    /** +
832     * create +
833     * creates a new record +
834     * +
835     * @param $array                    an array where keys are field names and values representing field values +
836     * @return Doctrine_Record +
837     */ +
838    public function create(array $array = array()) { +
839        $this->_data         = $array; +
840        $record = new $this->_options['name']($this, true); +
841        $this->_data         = array(); +
842        return $record; +
843    } +
844    /** +
845     * finds a record by its identifier +
846     * +
847     * @param $id                       database row id +
848     * @param int $hydrationMode        Doctrine::HYDRATE_ARRAY or Doctrine::HYDRATE_RECORD +
849     * @return mixed                    Array or Doctrine_Record or false if no result +
850     */ +
851    public function find($id, $hydrationMode = null) +
852    { +
853        if (is_null($id)) { +
854            return false; +
855        } +
856 +
857        $id = is_array($id) ? array_values($id) : array($id); +
858 +
859        return $this->createQuery() +
860            ->where(implode(' = ? AND ', (array) $this->_identifier) . ' = ?') +
861            ->fetchOne($id, $hydrationMode); +
862    } +
863    /** +
864     * findAll +
865     * returns a collection of records +
866     * +
867     * @param int $hydrationMode        Doctrine::FETCH_ARRAY or Doctrine::FETCH_RECORD +
868     * @return Doctrine_Collection +
869     */ +
870    public function findAll($hydrationMode = null) +
871    { +
872        return $this->createQuery()->execute(array(), $hydrationMode); +
873    } +
874    /** +
875     * findByDql +
876     * finds records with given DQL where clause +
877     * returns a collection of records +
878     * +
879     * @param string $dql               DQL after WHERE clause +
880     * @param array $params             query parameters +
881     * @param int $hydrationMode        Doctrine::FETCH_ARRAY or Doctrine::FETCH_RECORD +
882     * @return Doctrine_Collection +
883     */ +
884    public function findBySql($dql, array $params = array(), $hydrationMode = null) +
885    { +
886        return $this->createQuery()->where($dql)->execute($params, $hydrationMode); +
887    } +
888 +
889    public function findByDql($dql, array $params = array(), $hydrationMode = null) +
890    { +
891        return $this->findBySql($dql, $params, $hydrationMode); +
892    } +
893     +
894    /** +
895     * execute +
896     * fetches data using the provided queryKey and  +
897     * the associated query in the query registry +
898     * +
899     * if no query for given queryKey is being found a  +
900     * Doctrine_Query_Registry exception is being thrown +
901     * +
902     * @param string $queryKey      the query key +
903     * @param array $params         prepared statement params (if any) +
904     * @return mixed                the fetched data +
905     */ +
906    public function execute($queryKey, $params = array(), $hydrationMode = Doctrine::HYDRATE_RECORD) +
907    { +
908        return Doctrine_Manager::getInstance() +
909                            ->getQueryRegistry() +
910                            ->get($queryKey, $this->getComponentName()) +
911                            ->execute($params, $hydrationMode); +
912    } +
913     +
914    /** +
915     * executeOne +
916     * fetches data using the provided queryKey and  +
917     * the associated query in the query registry +
918     * +
919     * if no query for given queryKey is being found a  +
920     * Doctrine_Query_Registry exception is being thrown +
921     * +
922     * @param string $queryKey      the query key +
923     * @param array $params         prepared statement params (if any) +
924     * @return mixed                the fetched data +
925     */ +
926    public function executeOne($queryKey, $params = array(), $hydrationMode = Doctrine::HYDRATE_RECORD) +
927    { +
928        return Doctrine_Manager::getInstance() +
929                            ->getQueryRegistry() +
930                            ->get($queryKey, $this->getComponentName()) +
931                            ->fetchOne($params, $hydrationMode); +
932    } +
933 +
934    /** +
935     * clear +
936     * clears the first level cache (identityMap) +
937     * +
938     * @return void +
939     */ +
940    public function clear() +
941    { +
942        $this->_identityMap = array(); +
943    } +
944    /** +
945     * addRecord +
946     * adds a record to identity map +
947     * +
948     * @param Doctrine_Record $record       record to be added +
949     * @return boolean +
950     */ +
951    public function addRecord(Doctrine_Record $record) +
952    { +
953        $id = implode(' ', $record->identifier()); +
954 +
955        if (isset($this->_identityMap[$id])) { +
956            return false; +
957        } +
958 +
959        $this->_identityMap[$id] = $record; +
960 +
961        return true; +
962    } +
963    /** +
964     * getRecord +
965     * first checks if record exists in identityMap, if not +
966     * returns a new record +
967     * +
968     * @return Doctrine_Record +
969     */ +
970    public function getRecord() +
971    { +
972        if ( ! empty($this->_data)) { +
973            $this->_data = array_change_key_case($this->_data, CASE_LOWER); +
974 +
975            $key = $this->getIdentifier(); +
976 +
977            if ( ! is_array($key)) { +
978                $key = array($key); +
979            } +
980 +
981            $found = false; +
982            foreach ($key as $k) { +
983                if ( ! isset($this->_data[$k])) { +
984                    // primary key column not found return new record +
985                    $found = true; +
986                    break; +
987                } +
988                $id[] = $this->_data[$k]; +
989            } +
990 +
991            if ($found) { +
992                $recordName = $this->getClassnameToReturn(); +
993                $record = new $recordName($this, true); +
994                $this->_data = array(); +
995 +
996                return $record; +
997            } +
998 +
999 +
1000            $id = implode(' ', $id); +
1001 +
1002            if (isset($this->_identityMap[$id])) { +
1003                $record = $this->_identityMap[$id]; +
1004                $record->hydrate($this->_data); +
1005            } else { +
1006                $recordName = $this->getClassnameToReturn(); +
1007                $record = new $recordName($this); +
1008                $this->_identityMap[$id] = $record; +
1009            } +
1010            $this->_data = array(); +
1011        } else { +
1012            $recordName = $this->getClassnameToReturn(); +
1013            $record = new $recordName($this, true); +
1014        } +
1015 +
1016 +
1017        return $record; +
1018    } +
1019 +
1020    /** +
1021     * Get the classname to return. Most often this is just the options['name'] +
1022     * +
1023     * Check the subclasses option and the inheritanceMap for each subclass to see +
1024     * if all the maps in a subclass is met. If this is the case return that +
1025     * subclass name. If no subclasses match or if there are no subclasses defined +
1026     * return the name of the class for this tables record. +
1027     * +
1028     * @todo this function could use reflection to check the first time it runs +
1029     * if the subclassing option is not set. +
1030     * +
1031     * @return string The name of the class to create +
1032     * +
1033     */ +
1034    public function getClassnameToReturn() +
1035    { +
1036        if ( ! isset($this->_options['subclasses'])) { +
1037            return $this->_options['name']; +
1038        } +
1039        foreach ($this->_options['subclasses'] as $subclass) { +
1040            $table = $this->_conn->getTable($subclass); +
1041            $inheritanceMap = $table->getOption('inheritanceMap'); +
1042            $nomatch = false; +
1043            foreach ($inheritanceMap as $key => $value) { +
1044                if ( ! isset($this->_data[$key]) || $this->_data[$key] != $value) { +
1045                    $nomatch = true; +
1046                    break; +
1047                } +
1048            } +
1049            if ( ! $nomatch) { +
1050                return $table->getComponentName(); +
1051            } +
1052        } +
1053        return $this->_options['name']; +
1054    } +
1055 +
1056    /** +
1057     * @param $id                       database row id +
1058     * @throws Doctrine_Find_Exception +
1059     */ +
1060    final public function getProxy($id = null) +
1061    { +
1062        if ($id !== null) { +
1063            $query = 'SELECT ' . implode(', ', (array) $this->_identifier) +
1064                . ' FROM ' . $this->getTableName() +
1065                . ' WHERE ' . implode(' = ? && ', (array) $this->_identifier) . ' = ?'; +
1066            $query = $this->applyInheritance($query); +
1067 +
1068            $params = array_merge(array($id), array_values($this->_options['inheritanceMap'])); +
1069 +
1070            $this->_data = $this->_conn->execute($query, $params)->fetch(PDO::FETCH_ASSOC); +
1071 +
1072            if ($this->_data === false) +
1073                return false; +
1074        } +
1075        return $this->getRecord(); +
1076    } +
1077    /** +
1078     * applyInheritance +
1079     * @param $where                    query where part to be modified +
1080     * @return string                   query where part with column aggregation inheritance added +
1081     */ +
1082    final public function applyInheritance($where) +
1083    { +
1084        if ( ! empty($this->_options['inheritanceMap'])) { +
1085            $a = array(); +
1086            foreach ($this->_options['inheritanceMap'] as $field => $value) { +
1087                $a[] = $field . ' = ?'; +
1088            } +
1089            $i = implode(' AND ', $a); +
1090            $where .= ' AND ' . $i; +
1091        } +
1092        return $where; +
1093    } +
1094    /** +
1095     * count +
1096     * +
1097     * @return integer +
1098     */ +
1099    public function count() +
1100    { +
1101        $a = $this->_conn->execute('SELECT COUNT(1) FROM ' . $this->_options['tableName'])->fetch(Doctrine::FETCH_NUM); +
1102        return current($a); +
1103    } +
1104    /** +
1105     * @return Doctrine_Query                           a Doctrine_Query object +
1106     */ +
1107    public function getQueryObject() +
1108    { +
1109        $graph = new Doctrine_Query($this->getConnection()); +
1110        $graph->load($this->getComponentName()); +
1111        return $graph; +
1112    } +
1113    /** +
1114     * @param string $field +
1115     * @return array +
1116     */ +
1117    public function getEnumValues($field) +
1118    { +
1119        if (isset($this->_columns[$field]['values'])) { +
1120            return $this->_columns[$field]['values']; +
1121        } else { +
1122            return array(); +
1123        } +
1124    } +
1125    /** +
1126     * enumValue +
1127     * +
1128     * @param string $field +
1129     * @param integer $index +
1130     * @return mixed +
1131     */ +
1132    public function enumValue($field, $index) +
1133    { +
1134        if ($index instanceof Doctrine_Null) { +
1135            return $index; +
1136        } +
1137 +
1138        if (!$this->_conn->getAttribute(Doctrine::ATTR_USE_NATIVE_ENUM) +
1139            && isset($this->_columns[$field]['values'][$index]) +
1140        ) { +
1141            return $this->_columns[$field]['values'][$index]; +
1142        } +
1143 +
1144        return $index; +
1145    } +
1146    /** +
1147     * enumIndex +
1148     * +
1149     * @param string $field +
1150     * @param mixed $value +
1151     * @return mixed +
1152     */ +
1153    public function enumIndex($field, $value) +
1154    { +
1155        $values = $this->getEnumValues($field); +
1156 +
1157        $index = array_search($value, $values); +
1158        if ($index === false || !$this->_conn->getAttribute(Doctrine::ATTR_USE_NATIVE_ENUM)) { +
1159            return $index; +
1160        } +
1161        return $value; +
1162    } +
1163    /* getColumnCount +
1164     * +
1165     * @return integer      the number of columns in this table +
1166     */ +
1167    public function getColumnCount() +
1168    { +
1169        return $this->columnCount; +
1170    } +
1171 +
1172    /** +
1173     * returns all columns and their definitions +
1174     * +
1175     * @return array +
1176     */ +
1177    public function getColumns() +
1178    { +
1179        return $this->_columns; +
1180    } +
1181    /** +
1182     * removeColumn +
1183     * removes given column +
1184     * +
1185     * @return boolean +
1186     */ +
1187    public function removeColumn($column) +
1188    { +
1189        if (isset($this->_columns[$column])) { +
1190            unset($this->_columns[$column]); +
1191 +
1192            return true; +
1193        } +
1194         +
1195        return false; +
1196    } +
1197    /** +
1198     * returns an array containing all the column names +
1199     * +
1200     * @return array +
1201     */ +
1202    public function getColumnNames() +
1203    { +
1204        return array_keys($this->_columns); +
1205    } +
1206    /** +
1207     * getDefinitionOf +
1208     * +
1209     * @return mixed        array on success, false on failure +
1210     */ +
1211    public function getDefinitionOf($column) +
1212    { +
1213        if (isset($this->_columns[$column])) { +
1214            return $this->_columns[$column]; +
1215        } +
1216        return false; +
1217    } +
1218    /** +
1219     * getTypeOf +
1220     * +
1221     * @return mixed        string on success, false on failure +
1222     */ +
1223    public function getTypeOf($column) +
1224    { +
1225        if (isset($this->_columns[$column])) { +
1226            return $this->_columns[$column]['type']; +
1227        } +
1228        return false; +
1229    } +
1230    /** +
1231     * setData +
1232     * doctrine uses this function internally +
1233     * users are strongly discouraged to use this function +
1234     * +
1235     * @param array $data               internal data +
1236     * @return void +
1237     */ +
1238    public function setData(array $data) +
1239    { +
1240        $this->_data = $data; +
1241    } +
1242    /** +
1243     * returns internal data, used by Doctrine_Record instances +
1244     * when retrieving data from database +
1245     * +
1246     * @return array +
1247     */ +
1248    public function getData() +
1249    { +
1250        return $this->_data; +
1251    } +
1252    /** +
1253     * prepareValue +
1254     * this method performs special data preparation depending on +
1255     * the type of the given column +
1256     * +
1257     * 1. It unserializes array and object typed columns +
1258     * 2. Uncompresses gzip typed columns +
1259     * 3. Gets the appropriate enum values for enum typed columns +
1260     * 4. Initializes special null object pointer for null values (for fast column existence checking purposes) +
1261     * +
1262     * example: +
1263     * <code type='php'> +
1264     * $field = 'name'; +
1265     * $value = null; +
1266     * $table->prepareValue($field, $value); // Doctrine_Null +
1267     * </code> +
1268     * +
1269     * @throws Doctrine_Table_Exception     if unserialization of array/object typed column fails or +
1270     * @throws Doctrine_Table_Exception     if uncompression of gzip typed column fails         * +
1271     * @param string $field     the name of the field +
1272     * @param string $value     field value +
1273     * @return mixed            prepared value +
1274     */ +
1275    public function prepareValue($field, $value) +
1276    { +
1277        if ($value === self::$_null) { +
1278            return self::$_null; +
1279        } else if ($value === null) { +
1280            return null; +
1281        } else { +
1282            $type = $this->getTypeOf($field); +
1283 +
1284            switch ($type) { +
1285                case 'array': +
1286                case 'object': +
1287                    if (is_string($value)) { +
1288                        $value = unserialize($value); +
1289 +
1290                        if ($value === false) { +
1291                            throw new Doctrine_Table_Exception('Unserialization of ' . $field . ' failed.'); +
1292                        } +
1293                        return $value; +
1294                    } +
1295                break; +
1296                case 'gzip': +
1297                    $value = gzuncompress($value); +
1298 +
1299                    if ($value === false) { +
1300                        throw new Doctrine_Table_Exception('Uncompressing of ' . $field . ' failed.'); +
1301                    } +
1302                    return $value; +
1303                break; +
1304                case 'enum': +
1305                    return $this->enumValue($field, $value); +
1306                break; +
1307                case 'boolean': +
1308                    return (boolean) $value; +
1309                break; +
1310                case 'integer': +
1311                    // don't do any casting here PHP INT_MAX is smaller than what the databases support +
1312                break; +
1313            } +
1314        } +
1315        return $value; +
1316    } +
1317    /** +
1318     * getter for associated tree +
1319     * +
1320     * @return mixed  if tree return instance of Doctrine_Tree, otherwise returns false +
1321     */ +
1322    public function getTree() { +
1323        if (isset($this->_options['treeImpl'])) { +
1324            if ( ! $this->_tree) { +
1325                $options = isset($this->_options['treeOptions']) ? $this->_options['treeOptions'] : array(); +
1326                $this->_tree = Doctrine_Tree::factory($this, +
1327                    $this->_options['treeImpl'], +
1328                    $options +
1329                ); +
1330            } +
1331            return $this->_tree; +
1332        } +
1333        return false; +
1334    } +
1335    public function getComponentName() +
1336    { +
1337        return $this->_options['name']; +
1338    } +
1339    public function getTableName() +
1340    { +
1341        return $this->_options['tableName']; +
1342    } +
1343    public function setTableName($tableName) +
1344    { +
1345        $this->_options['tableName'] = $tableName; +
1346    } +
1347    /** +
1348     * determine if table acts as tree +
1349     * +
1350     * @return mixed  if tree return true, otherwise returns false +
1351     */ +
1352    public function isTree() { +
1353        return ( ! is_null($this->_options['treeImpl'])) ? true : false; +
1354    } +
1355 +
1356    public function getTemplate($template) +
1357    { +
1358        if ( ! isset($this->_templates[$template])) { +
1359            throw new Doctrine_Table_Exception('Template ' . $template . ' not loaded'); +
1360        } +
1361 +
1362        return $this->_templates[$template]; +
1363    } +
1364     +
1365    public function hasTemplate($template) +
1366    { +
1367        return isset($this->_templates[$template]); +
1368    } +
1369 +
1370    public function addTemplate($template, Doctrine_Template $impl) +
1371    { +
1372        $this->_templates[$template] = $impl; +
1373 +
1374        return $this; +
1375    } +
1376    /** +
1377     * bindQueryParts +
1378     * binds query parts to given component +
1379     * +
1380     * @param array $queryParts         an array of pre-bound query parts +
1381     * @return Doctrine_Record          this object +
1382     */ +
1383    public function bindQueryParts(array $queryParts) +
1384    { +
1385     $this->_options['queryParts'] = $queryParts; +
1386 +
1387        return $this; +
1388    } +
1389    /** +
1390     * bindQueryPart +
1391     * binds given value to given query part +
1392     * +
1393     * @param string $queryPart +
1394     * @param mixed $value +
1395     * @return Doctrine_Record          this object +
1396     */ +
1397    public function bindQueryPart($queryPart, $value) +
1398    { +
1399     $this->_options['queryParts'][$queryPart] = $value; +
1400 +
1401        return $this; +
1402    } +
1403    public function getBoundQueryPart($queryPart) +
1404    { +
1405        if ( ! isset($this->_options['queryParts'][$queryPart])) { +
1406            return null; +
1407        } +
1408 +
1409        return $this->_options['queryParts'][$queryPart]; +
1410    } +
1411    public function unshiftFilter(Doctrine_Record_Filter $filter) +
1412    { +
1413        $filter->setTable($this); +
1414 +
1415        $filter->init(); +
1416 +
1417        array_unshift($this->_filters, $filter); +
1418 +
1419        return $this; +
1420    } +
1421    public function getFilters() +
1422    { +
1423        return $this->_filters; +
1424    } +
1425    /** +
1426     * returns a string representation of this object +
1427     * +
1428     * @return string +
1429     */ +
1430    public function __toString() +
1431    { +
1432        return Doctrine_Lib::getTableAsString($this); +
1433    } +
1434} +
\ No newline at end of file diff --git a/tests/coverage/Doctrine_Table_Exception.html b/tests/coverage/Doctrine_Table_Exception.html new file mode 100644 index 000000000..30bea6337 --- /dev/null +++ b/tests/coverage/Doctrine_Table_Exception.html @@ -0,0 +1,134 @@ + + + Coverage for Doctrine_Table_Exception + + +

Coverage for Doctrine_Table_Exception

Back to coverage report

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
1<?php +
2/* +
3 *  $Id: Exception.php 2702 2007-10-03 21:43:22Z Jonathan.Wage $ +
4 * +
5 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +
6 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +
7 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +
8 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +
9 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +
10 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +
11 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +
12 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +
13 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +
14 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +
15 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +
16 * +
17 * This software consists of voluntary contributions made by many individuals +
18 * and is licensed under the LGPL. For more information, see +
19 * <http://www.phpdoctrine.com>. +
20 */ +
21Doctrine::autoload('Doctrine_Exception'); +
22/** +
23 * thrown when user tries to initialize a new instance of Doctrine_Table, +
24 * while there already exists an instance of that table +
25 * +
26 * @package     Doctrine +
27 * @subpackage  Table +
28 * @license     http://www.opensource.org/licenses/lgpl-license.php LGPL +
29 * @link        www.phpdoctrine.com +
30 * @since       1.0 +
31 * @version     $Revision: 2702 $ +
32 * @author      Konsta Vesterinen <kvesteri@cc.hut.fi> +
33 */ +
34class Doctrine_Table_Exception extends Doctrine_Exception +
35{ +
36    public function __construct($message = "Couldn't initialize table. One instance of this +
37                            table already exists. Always use Doctrine_Session::getTable(\$name) +
38                            to get on instance of a Doctrine_Table.") { +
39        parent::__construct($message); +
40    } +
41}
\ No newline at end of file diff --git a/tests/coverage/Doctrine_Table_Repository.html b/tests/coverage/Doctrine_Table_Repository.html new file mode 100644 index 000000000..6fb2e2cda --- /dev/null +++ b/tests/coverage/Doctrine_Table_Repository.html @@ -0,0 +1,464 @@ + + + Coverage for Doctrine_Table_Repository + + +

Coverage for Doctrine_Table_Repository

Back to coverage report

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
1<?php +
2/* +
3 *  $Id: Repository.php 2703 2007-10-03 21:47:55Z Jonathan.Wage $ +
4 * +
5 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +
6 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +
7 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +
8 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +
9 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +
10 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +
11 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +
12 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +
13 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +
14 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +
15 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +
16 * +
17 * This software consists of voluntary contributions made by many individuals +
18 * and is licensed under the LGPL. For more information, see +
19 * <http://www.phpdoctrine.com>. +
20 */ +
21/** +
22 * Doctrine_Repository +
23 * each record is added into Doctrine_Repository at the same time they are created, +
24 * loaded from the database or retrieved from the cache +
25 * +
26 * @author      Konsta Vesterinen <kvesteri@cc.hut.fi> +
27 * @package     Doctrine +
28 * @subpackage  Table +
29 * @license     http://www.opensource.org/licenses/lgpl-license.php LGPL +
30 * @link        www.phpdoctrine.com +
31 * @since       1.0 +
32 * @version     $Revision: 2703 $ +
33 */ +
34class Doctrine_Table_Repository implements Countable, IteratorAggregate +
35{ +
36    /** +
37     * @var object Doctrine_Table $table +
38     */ +
39    private $table; +
40    /** +
41     * @var array $registry +
42     * an array of all records +
43     * keys representing record object identifiers +
44     */ +
45    private $registry = array(); +
46    /** +
47     * constructor +
48     * +
49     * @param Doctrine_Table $table +
50     */ +
51    public function __construct(Doctrine_Table $table) +
52    { +
53        $this->table = $table; +
54    } +
55    /** +
56     * getTable +
57     * +
58     * @return object Doctrine_Table +
59     */ +
60    public function getTable() +
61    { +
62        return $this->table; +
63    } +
64    /** +
65     * add +
66     * +
67     * @param Doctrine_Record $record       record to be added into registry +
68     * @return boolean +
69     */ +
70    public function add(Doctrine_Record $record) +
71    { +
72        $oid = $record->getOID(); +
73 +
74        if (isset($this->registry[$oid])) { +
75            return false; +
76        } +
77        $this->registry[$oid] = $record; +
78 +
79        return true; +
80    } +
81    /** +
82     * get +
83     * @param integer $oid +
84     * @throws Doctrine_Table_Repository_Exception +
85     */ +
86    public function get($oid) +
87    { +
88        if ( ! isset($this->registry[$oid])) { +
89            throw new Doctrine_Table_Repository_Exception("Unknown object identifier"); +
90        } +
91        return $this->registry[$oid]; +
92    } +
93    /** +
94     * count +
95     * Doctrine_Registry implements interface Countable +
96     * @return integer                      the number of records this registry has +
97     */ +
98    public function count() +
99    { +
100        return count($this->registry); +
101    } +
102    /** +
103     * @param integer $oid                  object identifier +
104     * @return boolean                      whether ot not the operation was successful +
105     */ +
106    public function evict($oid) +
107    { +
108        if ( ! isset($this->registry[$oid])) { +
109            return false; +
110        } +
111        unset($this->registry[$oid]); +
112        return true; +
113    } +
114    /** +
115     * @return integer                      number of records evicted +
116     */ +
117    public function evictAll() +
118    { +
119        $evicted = 0; +
120        foreach ($this->registry as $oid=>$record) { +
121            if ($this->evict($oid)) { +
122                $evicted++; +
123            } +
124        } +
125        return $evicted; +
126    } +
127    /** +
128     * getIterator +
129     * @return ArrayIterator +
130     */ +
131    public function getIterator() +
132    { +
133        return new ArrayIterator($this->registry); +
134    } +
135    /** +
136     * contains +
137     * @param integer $oid                  object identifier +
138     */ +
139    public function contains($oid) +
140    { +
141        return isset($this->registry[$oid]); +
142    } +
143    /** +
144     * loadAll +
145     * @return void +
146     */ +
147    public function loadAll() +
148    { +
149        $this->table->findAll(); +
150    } +
151}
\ No newline at end of file diff --git a/tests/coverage/Doctrine_Template.html b/tests/coverage/Doctrine_Template.html new file mode 100644 index 000000000..ebc866d69 --- /dev/null +++ b/tests/coverage/Doctrine_Template.html @@ -0,0 +1,330 @@ + + + Coverage for Doctrine_Template + + +

Coverage for Doctrine_Template

Back to coverage report

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
1<?php +
2/* +
3 *  $Id$ +
4 * +
5 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +
6 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +
7 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +
8 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +
9 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +
10 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +
11 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +
12 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +
13 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +
14 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +
15 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +
16 * +
17 * This software consists of voluntary contributions made by many individuals +
18 * and is licensed under the LGPL. For more information, see +
19 * <http://www.phpdoctrine.com>. +
20 */ +
21Doctrine::autoload('Doctrine_Record_Abstract'); +
22/** +
23 * Doctrine_Template +
24 * +
25 * @package     Doctrine +
26 * @subpackage  Template +
27 * @license     http://www.opensource.org/licenses/lgpl-license.php LGPL +
28 * @link        www.phpdoctrine.com +
29 * @since       1.0 +
30 * @version     $Revision$ +
31 * @author      Konsta Vesterinen <kvesteri@cc.hut.fi> +
32 */ +
33class Doctrine_Template extends Doctrine_Record_Abstract +
34{ +
35    /** +
36     * @param Doctrine_Record $_invoker     the record that invoked the last delegated call +
37     */ +
38    protected $_invoker; +
39     +
40     +
41    protected $_plugin; +
42    /** +
43     * setTable +
44     * +
45     * @param Doctrine_Table $_table        the table object this Template belongs to +
46     */ +
47    public function setTable(Doctrine_Table $table) +
48    { +
49        $this->_table = $table; +
50    } +
51    /** +
52     * getTable +
53     * returns the associated table object +
54     * +
55     * @return Doctrine_Table               the associated table object +
56     */ +
57    public function getTable() +
58    { +
59        return $this->_table; +
60    } +
61    /** +
62     * setInvoker +
63     * +
64     * sets the last used invoker +
65     * +
66     * @param Doctrine_Record $invoker      the record that invoked the last delegated call +
67     * @return Doctrine_Template            this object +
68     */ +
69    public function setInvoker(Doctrine_Record $invoker) +
70    { +
71        $this->_invoker = $invoker; +
72    } +
73    /** +
74     * setInvoker +
75     * returns the last used invoker +
76     * +
77     * @return Doctrine_Record              the record that invoked the last delegated call +
78     */ +
79    public function getInvoker() +
80    { +
81        return $this->_invoker; +
82    } +
83 +
84    public function getPlugin() +
85    { +
86        return $this->_plugin; +
87    } +
88 +
89    public function get($name)  +
90    { +
91        throw new Doctrine_Exception("Templates doesn't support accessors."); +
92    } +
93    public function set($name, $value) +
94    { +
95        throw new Doctrine_Exception("Templates doesn't support accessors."); +
96    } +
97    public function setUp() +
98    { +
99 +
100    } +
101 +
102    public function setTableDefinition() +
103    { +
104 +
105    } +
106} +
\ No newline at end of file diff --git a/tests/coverage/Doctrine_Template_I18n.html b/tests/coverage/Doctrine_Template_I18n.html new file mode 100644 index 000000000..c2e4faee6 --- /dev/null +++ b/tests/coverage/Doctrine_Template_I18n.html @@ -0,0 +1,227 @@ + + + Coverage for Doctrine_Template_I18n + + +

Coverage for Doctrine_Template_I18n

Back to coverage report

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
1<?php +
2/* +
3 *  $Id$ +
4 * +
5 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +
6 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +
7 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +
8 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +
9 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +
10 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +
11 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +
12 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +
13 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +
14 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +
15 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +
16 * +
17 * This software consists of voluntary contributions made by many individuals +
18 * and is licensed under the LGPL. For more information, see +
19 * <http://www.phpdoctrine.com>. +
20 */ +
21/** +
22 * Doctrine_Template_I18n +
23 * +
24 * @package     Doctrine +
25 * @subpackage  Template +
26 * @license     http://www.opensource.org/licenses/lgpl-license.php LGPL +
27 * @link        www.phpdoctrine.com +
28 * @since       1.0 +
29 * @version     $Revision$ +
30 * @author      Konsta Vesterinen <kvesteri@cc.hut.fi> +
31 */ +
32class Doctrine_Template_I18n extends Doctrine_Template +
33{ +
34    protected $_translation; +
35 +
36 +
37    public function __construct(array $options) +
38    { +
39        $this->_plugin = new Doctrine_I18n($options); +
40    } +
41    /** +
42     * translation +
43     * sets or retrieves the current translation language +
44     * +
45     * @return Doctrine_Record      this object +
46     */ +
47    public function translation($language = null) +
48    { +
49        $this->_translation = $language; +
50    } +
51    public function setUp() +
52    { +
53        $this->_plugin->setOption('table', $this->_table); +
54        $name = $this->_table->getComponentName(); +
55        $className = $this->_plugin->getOption('className'); +
56 +
57        if (strpos($className, '%CLASS%') !== false) { +
58            $this->_plugin->setOption('className', str_replace('%CLASS%', $name, $className)); +
59            $className = $this->_plugin->getOption('className'); +
60        } +
61 +
62        $this->_plugin->buildDefinition($this->_table); +
63         +
64        $id = $this->_table->getIdentifier(); +
65 +
66        $this->hasMany($className . ' as Translation', array('local' => $id, 'foreign' => $id)); +
67    } +
68    public function getI18n() +
69    { +
70        return $this->_plugin; +
71    } +
72}
\ No newline at end of file diff --git a/tests/coverage/Doctrine_Template_NestedSet.html b/tests/coverage/Doctrine_Template_NestedSet.html new file mode 100644 index 000000000..16dfb1d43 --- /dev/null +++ b/tests/coverage/Doctrine_Template_NestedSet.html @@ -0,0 +1,149 @@ + + + Coverage for Doctrine_Template_NestedSet + + +

Coverage for Doctrine_Template_NestedSet

Back to coverage report

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
1<?php +
2/* +
3 *  $Id$ +
4 * +
5 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +
6 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +
7 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +
8 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +
9 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +
10 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +
11 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +
12 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +
13 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +
14 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +
15 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +
16 * +
17 * This software consists of voluntary contributions made by many individuals +
18 * and is licensed under the LGPL. For more information, see +
19 * <http://www.phpdoctrine.com>. +
20 */ +
21/** +
22 * Doctrine_Template_NestedSet +
23 * +
24 * @package     Doctrine +
25 * @subpackage  Template +
26 * @license     http://www.opensource.org/licenses/lgpl-license.php LGPL +
27 * @link        www.phpdoctrine.com +
28 * @since       1.0 +
29 * @version     $Revision$ +
30 * @author      Roman Borschel <roman@code-factory.org> +
31 */ +
32class Doctrine_Template_NestedSet extends Doctrine_Template +
33{ +
34    private $_options; +
35     +
36    public function __construct(array $options) +
37    { +
38        $this->_options = $options; +
39    } +
40     +
41    public function setUp() +
42    { +
43        $this->_table->setOption('treeOptions', $this->_options); +
44        $this->_table->setOption('treeImpl', 'NestedSet'); +
45    } +
46}
\ No newline at end of file diff --git a/tests/coverage/Doctrine_Template_Searchable.html b/tests/coverage/Doctrine_Template_Searchable.html new file mode 100644 index 000000000..5b87ed2cb --- /dev/null +++ b/tests/coverage/Doctrine_Template_Searchable.html @@ -0,0 +1,195 @@ + + + Coverage for Doctrine_Template_Searchable + + +

Coverage for Doctrine_Template_Searchable

Back to coverage report

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
1<?php +
2/* +
3 *  $Id$ +
4 * +
5 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +
6 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +
7 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +
8 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +
9 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +
10 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +
11 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +
12 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +
13 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +
14 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +
15 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +
16 * +
17 * This software consists of voluntary contributions made by many individuals +
18 * and is licensed under the LGPL. For more information, see +
19 * <http://www.phpdoctrine.com>. +
20 */ +
21 +
22/** +
23 * Doctrine_Template_Searchable +
24 * +
25 * @author      Konsta Vesterinen <kvesteri@cc.hut.fi> +
26 * @package     Doctrine +
27 * @subpackage  Template +
28 * @license     http://www.opensource.org/licenses/lgpl-license.php LGPL +
29 * @version     $Revision$ +
30 * @link        www.phpdoctrine.com +
31 * @since       1.0 +
32 */ +
33class Doctrine_Template_Searchable extends Doctrine_Template +
34{      +
35    public function __construct(array $options) +
36    { +
37        $this->_plugin = new Doctrine_Search($options); +
38    } +
39     +
40    public function getPlugin() +
41    { +
42        return $this->_plugin; +
43    } +
44 +
45    public function setUp() +
46    { +
47        $id = $this->_table->getIdentifier(); +
48        $name = $this->_table->getComponentName(); +
49        $className = $this->_plugin->getOption('className'); +
50 +
51        if (strpos($className, '%CLASS%') !== false) { +
52            $this->_plugin->setOption('className', str_replace('%CLASS%', $name, $className)); +
53            $className = $this->_plugin->getOption('className'); +
54        } +
55        $this->_plugin->buildDefinition($this->_table); +
56 +
57        $this->hasMany($className, array('local' => $id, 'foreign' => $id)); +
58 +
59        $this->addListener(new Doctrine_Search_Listener($this->_plugin)); +
60    } +
61} +
\ No newline at end of file diff --git a/tests/coverage/Doctrine_Template_Versionable.html b/tests/coverage/Doctrine_Template_Versionable.html new file mode 100644 index 000000000..9aa491613 --- /dev/null +++ b/tests/coverage/Doctrine_Template_Versionable.html @@ -0,0 +1,164 @@ + + + Coverage for Doctrine_Template_Versionable + + +

Coverage for Doctrine_Template_Versionable

Back to coverage report

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
1<?php +
2/* +
3 *  $Id$ +
4 * +
5 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +
6 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +
7 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +
8 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +
9 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +
10 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +
11 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +
12 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +
13 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +
14 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +
15 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +
16 * +
17 * This software consists of voluntary contributions made by many individuals +
18 * and is licensed under the LGPL. For more information, see +
19 * <http://www.phpdoctrine.com>. +
20 */ +
21/** +
22 * Doctrine_Template_Versionable +
23 * +
24 * @package     Doctrine +
25 * @subpackage  Template +
26 * @license     http://www.opensource.org/licenses/lgpl-license.php LGPL +
27 * @link        www.phpdoctrine.com +
28 * @since       1.0 +
29 * @version     $Revision$ +
30 * @author      Konsta Vesterinen <kvesteri@cc.hut.fi> +
31 */ +
32class Doctrine_Template_Versionable extends Doctrine_Template +
33{ +
34    protected $_auditLog; +
35 +
36    public function __construct(array $options) +
37    { +
38        $this->_auditLog = new Doctrine_AuditLog($options); +
39    } +
40    public function setUp() +
41    { +
42        $this->_auditLog->setOption('table', $this->_table); +
43        $this->_auditLog->buildDefinition($this->_table); +
44 +
45        $this->addListener(new Doctrine_AuditLog_Listener($this->_auditLog)); +
46    } +
47    public function getAuditLog() +
48    { +
49        return $this->_auditLog; +
50    } +
51}
\ No newline at end of file diff --git a/tests/coverage/Doctrine_Tokenizer.html b/tests/coverage/Doctrine_Tokenizer.html new file mode 100644 index 000000000..057aa92ed --- /dev/null +++ b/tests/coverage/Doctrine_Tokenizer.html @@ -0,0 +1,962 @@ + + + Coverage for Doctrine_Tokenizer + + +

Coverage for Doctrine_Tokenizer

Back to coverage report

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
1<?php +
2/* +
3 *  $Id: From.php 1080 2007-02-10 18:17:08Z romanb $ +
4 * +
5 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +
6 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +
7 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +
8 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +
9 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +
10 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +
11 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +
12 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +
13 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +
14 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +
15 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +
16 * +
17 * This software consists of voluntary contributions made by many individuals +
18 * and is licensed under the LGPL. For more information, see +
19 * <http://www.phpdoctrine.com>. +
20 */ +
21 +
22/** +
23 * Doctrine_Tokenizer +
24 * +
25 * @package     Doctrine +
26 * @subpackage  Tokenizer +
27 * @license     http://www.opensource.org/licenses/lgpl-license.php LGPL +
28 * @link        www.phpdoctrine.com +
29 * @since       1.0 +
30 * @version     $Revision: 1080 $ +
31 * @author      Konsta Vesterinen <kvesteri@cc.hut.fi> +
32 */ +
33class Doctrine_Tokenizer  +
34{ +
35    public function __construct()  +
36    { +
37         +
38    } +
39    public function tokenize()  +
40    { +
41 +
42    } +
43    /** +
44     * trims brackets +
45     * +
46     * @param string $str +
47     * @param string $e1        the first bracket, usually '(' +
48     * @param string $e2        the second bracket, usually ')' +
49     */ +
50    public static function bracketTrim($str, $e1 = '(', $e2 = ')') +
51    { +
52        if (substr($str, 0, 1) === $e1 && substr($str, -1) === $e2) { +
53            return substr($str, 1, -1); +
54        } else { +
55            return $str; +
56        } +
57    } +
58    /** +
59     * bracketExplode +
60     * +
61     * example: +
62     * +
63     * parameters: +
64     *      $str = (age < 20 AND age > 18) AND email LIKE 'John@example.com' +
65     *      $d = ' AND ' +
66     *      $e1 = '(' +
67     *      $e2 = ')' +
68     * +
69     * would return an array: +
70     *      array("(age < 20 AND age > 18)", +
71     *            "email LIKE 'John@example.com'") +
72     * +
73     * @param string $str +
74     * @param string $d         the delimeter which explodes the string +
75     * @param string $e1        the first bracket, usually '(' +
76     * @param string $e2        the second bracket, usually ')' +
77     * +
78     */ +
79    public static function bracketExplode($str, $d = ' ', $e1 = '(', $e2 = ')') +
80    { +
81        if (is_array($d)) { +
82            $a = preg_split('/('.implode('|', $d).')/', $str); +
83            $d = stripslashes($d[0]); +
84        } else { +
85            $a = explode($d, $str); +
86        } +
87 +
88        $i = 0; +
89        $term = array(); +
90        foreach($a as $key=>$val) { +
91            if (empty($term[$i])) { +
92                $term[$i] = trim($val); +
93                $s1 = substr_count($term[$i], $e1); +
94                $s2 = substr_count($term[$i], $e2); +
95                 +
96                if ($s1 == $s2) { +
97                    $i++; +
98                } +
99            } else { +
100                $term[$i] .= $d . trim($val); +
101                $c1 = substr_count($term[$i], $e1); +
102                $c2 = substr_count($term[$i], $e2); +
103                 +
104                if ($c1 == $c2) {  +
105                    $i++; +
106                } +
107            } +
108        } +
109        return $term; +
110    } +
111    /** +
112     * quoteExplode +
113     * +
114     * example: +
115     * +
116     * parameters: +
117     *      $str = email LIKE 'John@example.com' +
118     *      $d = ' AND ' +
119     * +
120     * would return an array: +
121     *      array("email", "LIKE", "'John@example.com'") +
122     * +
123     * @param string $str +
124     * @param string $d         the delimeter which explodes the string +
125     */ +
126    public static function quoteExplode($str, $d = ' ') +
127    { +
128        if (is_array($d)) { +
129            $a = preg_split('/('.implode('|', $d).')/', $str); +
130            $d = stripslashes($d[0]); +
131        } else { +
132            $a = explode($d, $str); +
133        } +
134 +
135        $i = 0; +
136        $term = array(); +
137        foreach ($a as $key => $val) { +
138            if (empty($term[$i])) { +
139                $term[$i] = trim($val); +
140 +
141                if ( ! (substr_count($term[$i], "'") & 1)) { +
142                    $i++; +
143                } +
144            } else { +
145                $term[$i] .= $d . trim($val); +
146 +
147                if ( ! (substr_count($term[$i], "'") & 1)) { +
148                    $i++; +
149                } +
150            } +
151        } +
152        return $term; +
153    } +
154    /** +
155     * sqlExplode +
156     * +
157     * explodes a string into array using custom brackets and +
158     * quote delimeters +
159     * +
160     * +
161     * example: +
162     * +
163     * parameters: +
164     *      $str = "(age < 20 AND age > 18) AND name LIKE 'John Doe'" +
165     *      $d   = ' ' +
166     *      $e1  = '(' +
167     *      $e2  = ')' +
168     * +
169     * would return an array: +
170     *      array('(age < 20 AND age > 18)', +
171     *            'name', +
172     *            'LIKE', +
173     *            'John Doe') +
174     * +
175     * @param string $str +
176     * @param string $d         the delimeter which explodes the string +
177     * @param string $e1        the first bracket, usually '(' +
178     * @param string $e2        the second bracket, usually ')' +
179     * +
180     * @return array +
181     */ +
182    public static function sqlExplode($str, $d = ' ', $e1 = '(', $e2 = ')') +
183    { +
184        if ($d == ' ') { +
185            $d = array(' ', '\s'); +
186        } +
187        if (is_array($d)) { +
188            $d = array_map('preg_quote', $d); +
189 +
190            if (in_array(' ', $d)) { +
191                $d[] = '\s'; +
192            } +
193 +
194            $split = '§(' . implode('|', $d) . ')§'; +
195 +
196            $str = preg_split($split, $str); +
197            $d = stripslashes($d[0]); +
198        } else { +
199            $str = explode($d, $str); +
200        } +
201 +
202        $i = 0; +
203        $term = array(); +
204 +
205        foreach ($str as $key => $val) { +
206            if (empty($term[$i])) { +
207                $term[$i] = trim($val); +
208 +
209                $s1 = substr_count($term[$i], $e1); +
210                $s2 = substr_count($term[$i], $e2); +
211 +
212                if (strpos($term[$i], '(') !== false) { +
213                    if ($s1 == $s2) { +
214                        $i++; +
215                    } +
216                } else { +
217                    if ( ! (substr_count($term[$i], "'") & 1) && +
218                         ! (substr_count($term[$i], "\"") & 1)) { +
219                        $i++; +
220                    } +
221                } +
222            } else { +
223                $term[$i] .= $d . trim($val); +
224                $c1 = substr_count($term[$i], $e1); +
225                $c2 = substr_count($term[$i], $e2); +
226 +
227                if (strpos($term[$i], '(') !== false) { +
228                    if ($c1 == $c2) { +
229                        $i++; +
230                    } +
231                } else { +
232                    if ( ! (substr_count($term[$i], "'") & 1) && +
233                         ! (substr_count($term[$i], "\"") & 1)) { +
234                        $i++; +
235                    } +
236                } +
237            } +
238        } +
239        return $term; +
240    } +
241    /** +
242     * clauseExplode +
243     * +
244     * explodes a string into array using custom brackets and +
245     * quote delimeters +
246     * +
247     * +
248     * example: +
249     * +
250     * parameters: +
251     *      $str = "(age < 20 AND age > 18) AND name LIKE 'John Doe'" +
252     *      $d   = ' ' +
253     *      $e1  = '(' +
254     *      $e2  = ')' +
255     * +
256     * would return an array: +
257     *      array('(age < 20 AND age > 18)', +
258     *            'name', +
259     *            'LIKE', +
260     *            'John Doe') +
261     * +
262     * @param string $str +
263     * @param string $d         the delimeter which explodes the string +
264     * @param string $e1        the first bracket, usually '(' +
265     * @param string $e2        the second bracket, usually ')' +
266     * +
267     * @return array +
268     */ +
269    public static function clauseExplode($str, array $d, $e1 = '(', $e2 = ')') +
270    { +
271        if (is_array($d)) { +
272            $d = array_map('preg_quote', $d); +
273 +
274            if (in_array(' ', $d)) { +
275                $d[] = '\s'; +
276            } +
277 +
278            $split = '§(' . implode('|', $d) . ')§'; +
279 +
280            $str = preg_split($split, $str, -1, PREG_SPLIT_DELIM_CAPTURE); +
281        } +
282 +
283        $i = 0; +
284        $term = array(); +
285 +
286        foreach ($str as $key => $val) { +
287            if ($key & 1) { +
288                if (isset($term[($i - 1)]) && ! is_array($term[($i - 1)])) { +
289                    $term[($i - 1)] = array($term[($i - 1)], $val); +
290                } +
291                continue; +
292            } +
293            if (empty($term[$i])) { +
294                $term[$i] = $val; +
295            } else { +
296                $term[$i] .= $str[($key - 1)] . $val; +
297            } +
298 +
299            $c1 = substr_count($term[$i], $e1); +
300            $c2 = substr_count($term[$i], $e2); +
301 +
302            if (strpos($term[$i], '(') !== false) { +
303                if ($c1 == $c2) { +
304                    $i++; +
305                } +
306            } else { +
307                if ( ! (substr_count($term[$i], "'") & 1) && +
308                     ! (substr_count($term[$i], "\"") & 1)) { +
309                    $i++; +
310                } +
311            } +
312        } +
313        $term[$i - 1] = array($term[$i - 1], ''); +
314 +
315        return $term; +
316    } +
317}
\ No newline at end of file diff --git a/tests/coverage/Doctrine_Transaction.html b/tests/coverage/Doctrine_Transaction.html new file mode 100644 index 000000000..bdca131a3 --- /dev/null +++ b/tests/coverage/Doctrine_Transaction.html @@ -0,0 +1,1298 @@ + + + Coverage for Doctrine_Transaction + + +

Coverage for Doctrine_Transaction

Back to coverage report

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
1<?php +
2/* +
3 *  $Id: Transaction.php 2702 2007-10-03 21:43:22Z Jonathan.Wage $ +
4 * +
5 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +
6 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +
7 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +
8 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +
9 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +
10 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +
11 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +
12 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +
13 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +
14 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +
15 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +
16 * +
17 * This software consists of voluntary contributions made by many individuals +
18 * and is licensed under the LGPL. For more information, see +
19 * <http://www.phpdoctrine.com>. +
20 */ +
21Doctrine::autoload('Doctrine_Connection_Module'); +
22/** +
23 * Doctrine_Transaction +
24 * Handles transaction savepoint and isolation abstraction +
25 * +
26 * @author      Konsta Vesterinen <kvesteri@cc.hut.fi> +
27 * @author      Lukas Smith <smith@pooteeweet.org> (PEAR MDB2 library) +
28 * @license     http://www.opensource.org/licenses/lgpl-license.php LGPL +
29 * @package     Doctrine +
30 * @subpackage  Transaction +
31 * @link        www.phpdoctrine.com +
32 * @since       1.0 +
33 * @version     $Revision: 2702 $ +
34 */ +
35class Doctrine_Transaction extends Doctrine_Connection_Module +
36{ +
37    /** +
38     * Doctrine_Transaction is in sleep state when it has no active transactions +
39     */ +
40    const STATE_SLEEP       = 0; +
41    /** +
42     * Doctrine_Transaction is in active state when it has one active transaction +
43     */ +
44    const STATE_ACTIVE      = 1; +
45    /** +
46     * Doctrine_Transaction is in busy state when it has multiple active transactions +
47     */ +
48    const STATE_BUSY        = 2; +
49    /** +
50     * @var integer $transactionLevel      the nesting level of transactions, used by transaction methods +
51     */ +
52    protected $transactionLevel  = 0; +
53    /** +
54     * @var array $invalid                  an array containing all invalid records within this transaction +
55     */ +
56    protected $invalid          = array(); +
57    /** +
58     * @var array $savepoints               an array containing all savepoints +
59     */ +
60    protected $savePoints       = array(); +
61    /** +
62     * @var array $_collections             an array of Doctrine_Collection objects that were affected during the Transaction +
63     */ +
64    protected $_collections     = array(); +
65 +
66    /** +
67     * addCollection +
68     * adds a collection in the internal array of collections +
69     * +
70     * at the end of each commit this array is looped over and +
71     * of every collection Doctrine then takes a snapshot in order +
72     * to keep the collections up to date with the database +
73     * +
74     * @param Doctrine_Collection $coll     a collection to be added +
75     * @return Doctrine_Transaction         this object +
76     */ +
77    public function addCollection(Doctrine_Collection $coll) +
78    { +
79        $this->_collections[] = $coll; +
80 +
81        return $this; +
82    } +
83    /** +
84     * getState +
85     * returns the state of this connection +
86     * +
87     * @see Doctrine_Connection_Transaction::STATE_* constants +
88     * @return integer          the connection state +
89     */ +
90    public function getState() +
91    { +
92        switch ($this->transactionLevel) { +
93            case 0: +
94                return Doctrine_Transaction::STATE_SLEEP; +
95                break; +
96            case 1: +
97                return Doctrine_Transaction::STATE_ACTIVE; +
98                break; +
99            default: +
100                return Doctrine_Transaction::STATE_BUSY; +
101        } +
102    } +
103 +
104    /** +
105     * addInvalid +
106     * adds record into invalid records list +
107     * +
108     * @param Doctrine_Record $record +
109     * @return boolean        false if record already existed in invalid records list, +
110     *                        otherwise true +
111     */ +
112    public function addInvalid(Doctrine_Record $record) +
113    { +
114        if (in_array($record, $this->invalid, true)) { +
115            return false; +
116        } +
117        $this->invalid[] = $record; +
118        return true; +
119    } +
120 +
121    /** +
122     * getTransactionLevel +
123     * get the current transaction nesting level +
124     * +
125     * @return integer +
126     */ +
127    public function getTransactionLevel() +
128    { +
129        return $this->transactionLevel; +
130    } +
131    /** +
132     * getTransactionLevel +
133     * set the current transaction nesting level +
134     * +
135     * @return Doctrine_Transaction     this object +
136     */ +
137    public function setTransactionLevel($level) +
138    { +
139        $this->transactionLevel = $level; +
140 +
141        return $this; +
142    } +
143    /** +
144     * beginTransaction +
145     * Start a transaction or set a savepoint. +
146     * +
147     * if trying to set a savepoint and there is no active transaction +
148     * a new transaction is being started +
149     * +
150     * Listeners: onPreTransactionBegin, onTransactionBegin +
151     * +
152     * @param string $savepoint                 name of a savepoint to set +
153     * @throws Doctrine_Transaction_Exception   if the transaction fails at database level      +
154     * @return integer                          current transaction nesting level +
155     */ +
156    public function beginTransaction($savepoint = null) +
157    { +
158        $this->conn->connect(); +
159         +
160        $listener = $this->conn->getAttribute(Doctrine::ATTR_LISTENER); +
161 +
162        if ( ! is_null($savepoint)) { +
163            $this->savePoints[] = $savepoint; +
164 +
165            $event = new Doctrine_Event($this, Doctrine_Event::SAVEPOINT_CREATE); +
166 +
167            $listener->preSavepointCreate($event); +
168 +
169            if ( ! $event->skipOperation) { +
170                $this->createSavePoint($savepoint); +
171            } +
172 +
173            $listener->postSavepointCreate($event); +
174        } else { +
175            if ($this->transactionLevel == 0) { +
176                $event = new Doctrine_Event($this, Doctrine_Event::TX_BEGIN); +
177 +
178                $listener->preTransactionBegin($event); +
179 +
180                if ( ! $event->skipOperation) { +
181                    try { +
182                        $this->conn->getDbh()->beginTransaction(); +
183                    } catch(Exception $e) { +
184                        throw new Doctrine_Transaction_Exception($e->getMessage()); +
185                    } +
186                } +
187                $listener->postTransactionBegin($event); +
188            } +
189        } +
190 +
191        $level = ++$this->transactionLevel; +
192 +
193        return $level; +
194    } +
195    /** +
196     * commit +
197     * Commit the database changes done during a transaction that is in +
198     * progress or release a savepoint. This function may only be called when +
199     * auto-committing is disabled, otherwise it will fail. +
200     * +
201     * Listeners: preTransactionCommit, postTransactionCommit +
202     * +
203     * @param string $savepoint                 name of a savepoint to release +
204     * @throws Doctrine_Transaction_Exception   if the transaction fails at database level +
205     * @throws Doctrine_Validator_Exception     if the transaction fails due to record validations +
206     * @return boolean                          false if commit couldn't be performed, true otherwise +
207     */ +
208    public function commit($savepoint = null) +
209    { +
210        $this->conn->connect(); +
211 +
212        if ($this->transactionLevel == 0) { +
213            return false; +
214        } +
215 +
216        $listener = $this->conn->getAttribute(Doctrine::ATTR_LISTENER); +
217 +
218        if ( ! is_null($savepoint)) { +
219            $this->transactionLevel -= $this->removeSavePoints($savepoint); +
220 +
221            $event = new Doctrine_Event($this, Doctrine_Event::SAVEPOINT_COMMIT); +
222 +
223            $listener->preSavepointCommit($event); +
224 +
225            if ( ! $event->skipOperation) { +
226                $this->releaseSavePoint($savepoint); +
227            } +
228 +
229            $listener->postSavepointCommit($event); +
230        } else { +
231 +
232            if ($this->transactionLevel == 1) {   +
233                if ( ! empty($this->invalid)) { +
234                    $this->rollback(); +
235 +
236                    $tmp = $this->invalid; +
237                    $this->invalid = array(); +
238 +
239                    throw new Doctrine_Validator_Exception($tmp); +
240                } +
241 +
242                // take snapshots of all collections used within this transaction +
243                foreach ($this->_collections as $coll) { +
244                    $coll->takeSnapshot(); +
245                } +
246                $this->_collections = array(); +
247                 +
248                $event = new Doctrine_Event($this, Doctrine_Event::TX_COMMIT); +
249             +
250                $listener->preTransactionCommit($event); +
251                if ( ! $event->skipOperation) { +
252                    $this->conn->getDbh()->commit(); +
253                } +
254                $listener->postTransactionCommit($event); +
255 +
256            } +
257             +
258            $this->transactionLevel--; +
259        } +
260 +
261        return true; +
262    } +
263 +
264    /** +
265     * rollback +
266     * Cancel any database changes done during a transaction or since a specific +
267     * savepoint that is in progress. This function may only be called when +
268     * auto-committing is disabled, otherwise it will fail. Therefore, a new +
269     * transaction is implicitly started after canceling the pending changes. +
270     * +
271     * this method can be listened with onPreTransactionRollback and onTransactionRollback +
272     * eventlistener methods +
273     * +
274     * @param string $savepoint                 name of a savepoint to rollback to    +
275     * @throws Doctrine_Transaction_Exception   if the rollback operation fails at database level +
276     * @return boolean                          false if rollback couldn't be performed, true otherwise +
277     */ +
278    public function rollback($savepoint = null) +
279    { +
280        $this->conn->connect(); +
281 +
282        if ($this->transactionLevel == 0) { +
283            return false; +
284        } +
285 +
286        $listener = $this->conn->getAttribute(Doctrine::ATTR_LISTENER); +
287 +
288        if ( ! is_null($savepoint)) { +
289            $this->transactionLevel -= $this->removeSavePoints($savepoint); +
290 +
291            $event = new Doctrine_Event($this, Doctrine_Event::SAVEPOINT_ROLLBACK); +
292 +
293            $listener->preSavepointRollback($event); +
294             +
295            if ( ! $event->skipOperation) { +
296                $this->rollbackSavePoint($savepoint); +
297            } +
298 +
299            $listener->postSavepointRollback($event); +
300        } else { +
301            $event = new Doctrine_Event($this, Doctrine_Event::TX_ROLLBACK); +
302     +
303            $listener->preTransactionRollback($event); +
304             +
305            if ( ! $event->skipOperation) { +
306                $this->transactionLevel = 0; +
307                try { +
308                    $this->conn->getDbh()->rollback(); +
309                } catch (Exception $e) { +
310                    throw new Doctrine_Transaction_Exception($e->getMessage()); +
311                } +
312            } +
313 +
314            $listener->postTransactionRollback($event); +
315        } +
316 +
317        return true; +
318    } +
319 +
320    /** +
321     * releaseSavePoint +
322     * creates a new savepoint +
323     * +
324     * @param string $savepoint     name of a savepoint to create +
325     * @return void +
326     */ +
327    protected function createSavePoint($savepoint) +
328    { +
329        throw new Doctrine_Transaction_Exception('Savepoints not supported by this driver.'); +
330    } +
331 +
332    /** +
333     * releaseSavePoint +
334     * releases given savepoint +
335     * +
336     * @param string $savepoint     name of a savepoint to release +
337     * @return void +
338     */ +
339    protected function releaseSavePoint($savepoint) +
340    { +
341        throw new Doctrine_Transaction_Exception('Savepoints not supported by this driver.'); +
342    } +
343 +
344    /** +
345     * rollbackSavePoint +
346     * releases given savepoint +
347     * +
348     * @param string $savepoint     name of a savepoint to rollback to +
349     * @return void +
350     */ +
351    protected function rollbackSavePoint($savepoint) +
352    { +
353        throw new Doctrine_Transaction_Exception('Savepoints not supported by this driver.'); +
354    } +
355 +
356    /** +
357     * removeSavePoints +
358     * removes a savepoint from the internal savePoints array of this transaction object +
359     * and all its children savepoints +
360     * +
361     * @param sring $savepoint      name of the savepoint to remove +
362     * @return integer              removed savepoints +
363     */ +
364    private function removeSavePoints($savepoint) +
365    { +
366        $this->savePoints = array_values($this->savePoints); +
367 +
368        $found = false; +
369        $i = 0; +
370 +
371        foreach ($this->savePoints as $key => $sp) { +
372            if ( ! $found) { +
373                if ($sp === $savepoint) { +
374                    $found = true; +
375                } +
376            } +
377            if ($found) { +
378                $i++; +
379                unset($this->savePoints[$key]); +
380            } +
381        } +
382 +
383        return $i; +
384    } +
385 +
386    /** +
387     * setIsolation +
388     * +
389     * Set the transacton isolation level. +
390     * (implemented by the connection drivers) +
391     * +
392     * example: +
393     * +
394     * <code> +
395     * $tx->setIsolation('READ UNCOMMITTED'); +
396     * </code> +
397     * +
398     * @param   string  standard isolation level +
399     *                  READ UNCOMMITTED (allows dirty reads) +
400     *                  READ COMMITTED (prevents dirty reads) +
401     *                  REPEATABLE READ (prevents nonrepeatable reads) +
402     *                  SERIALIZABLE (prevents phantom reads) +
403     * +
404     * @throws Doctrine_Transaction_Exception           if the feature is not supported by the driver +
405     * @throws PDOException                             if something fails at the PDO level +
406     * @return void +
407     */ +
408    public function setIsolation($isolation) +
409    { +
410        throw new Doctrine_Transaction_Exception('Transaction isolation levels not supported by this driver.'); +
411    } +
412 +
413    /** +
414     * getTransactionIsolation +
415     * +
416     * fetches the current session transaction isolation level +
417     * +
418     * note: some drivers may support setting the transaction isolation level +
419     * but not fetching it +
420     * +
421     * @throws Doctrine_Transaction_Exception           if the feature is not supported by the driver +
422     * @throws PDOException                             if something fails at the PDO level +
423     * @return string                                   returns the current session transaction isolation level +
424     */ +
425    public function getIsolation() +
426    { +
427        throw new Doctrine_Transaction_Exception('Fetching transaction isolation level not supported by this driver.'); +
428    } +
429}
\ No newline at end of file diff --git a/tests/coverage/Doctrine_Transaction_Exception.html b/tests/coverage/Doctrine_Transaction_Exception.html new file mode 100644 index 000000000..14110f9b9 --- /dev/null +++ b/tests/coverage/Doctrine_Transaction_Exception.html @@ -0,0 +1,113 @@ + + + Coverage for Doctrine_Transaction_Exception + + +

Coverage for Doctrine_Transaction_Exception

Back to coverage report

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
1<?php +
2/* +
3 *  $Id: Exception.php 2703 2007-10-03 21:47:55Z Jonathan.Wage $ +
4 * +
5 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +
6 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +
7 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +
8 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +
9 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +
10 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +
11 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +
12 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +
13 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +
14 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +
15 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +
16 * +
17 * This software consists of voluntary contributions made by many individuals +
18 * and is licensed under the LGPL. For more information, see +
19 * <http://www.phpdoctrine.com>. +
20 */ +
21Doctrine::autoload('Doctrine_Exception'); +
22/** +
23 * Doctrine_Transaction_Exception +
24 * +
25 * @package     Doctrine +
26 * @subpackage  Transaction +
27 * @license     http://www.opensource.org/licenses/lgpl-license.php LGPL +
28 * @author      Konsta Vesterinen <kvesteri@cc.hut.fi> +
29 * @since       1.0 +
30 * @version     $Revision: 2703 $ +
31 * @link        www.phpdoctrine.com +
32 */ +
33class Doctrine_Transaction_Exception extends Doctrine_Exception +
34{ }
\ No newline at end of file diff --git a/tests/coverage/Doctrine_Transaction_Firebird.html b/tests/coverage/Doctrine_Transaction_Firebird.html new file mode 100644 index 000000000..607ba4af5 --- /dev/null +++ b/tests/coverage/Doctrine_Transaction_Firebird.html @@ -0,0 +1,422 @@ + + + Coverage for Doctrine_Transaction_Firebird + + +

Coverage for Doctrine_Transaction_Firebird

Back to coverage report

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
1<?php +
2/* +
3 *  $Id: Firebird.php 2702 2007-10-03 21:43:22Z Jonathan.Wage $ +
4 * +
5 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +
6 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +
7 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +
8 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +
9 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +
10 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +
11 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +
12 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +
13 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +
14 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +
15 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +
16 * +
17 * This software consists of voluntary contributions made by many individuals +
18 * and is licensed under the LGPL. For more information, see +
19 * <http://www.phpdoctrine.com>. +
20 */ +
21Doctrine::autoload('Doctrine_Transaction'); +
22/** +
23 * +
24 * @author      Konsta Vesterinen <kvesteri@cc.hut.fi> +
25 * @author      Lukas Smith <smith@pooteeweet.org> (PEAR MDB2 library) +
26 * @license     http://www.opensource.org/licenses/lgpl-license.php LGPL +
27 * @package     Doctrine +
28 * @subpackage  Transaction +
29 * @link        www.phpdoctrine.com +
30 * @since       1.0 +
31 * @version     $Revision: 2702 $ +
32 */ +
33class Doctrine_Transaction_Firebird extends Doctrine_Transaction +
34{ +
35    /** +
36     * createSavepoint +
37     * creates a new savepoint +
38     * +
39     * @param string $savepoint     name of a savepoint to set +
40     * @return void +
41     */ +
42    protected function createSavePoint($savepoint) +
43    { +
44        $query = 'SAVEPOINT ' . $savepoint; +
45 +
46        return $this->conn->execute($query); +
47    } +
48    /** +
49     * releaseSavePoint +
50     * releases given savepoint +
51     * +
52     * @param string $savepoint     name of a savepoint to release +
53     * @return void +
54     */ +
55    protected function releaseSavePoint($savepoint) +
56    { +
57        $query = 'RELEASE SAVEPOINT ' . $savepoint; +
58 +
59        return $this->conn->execute($query); +
60    } +
61    /** +
62     * rollbackSavePoint +
63     * releases given savepoint +
64     * +
65     * @param string $savepoint     name of a savepoint to rollback to +
66     * @return void +
67     */ +
68    protected function rollbackSavePoint($savepoint) +
69    { +
70        $query = 'ROLLBACK TO SAVEPOINT '.$savepoint; +
71 +
72        return $this->conn->execute($query); +
73    } +
74    /** +
75     * Set the transacton isolation level. +
76     * +
77     * @param   string  standard isolation level (SQL-92) +
78     *                  READ UNCOMMITTED (allows dirty reads) +
79     *                  READ COMMITTED (prevents dirty reads) +
80     *                  REPEATABLE READ (prevents nonrepeatable reads) +
81     *                  SERIALIZABLE (prevents phantom reads) +
82     * +
83     * @param   array some transaction options: +
84     *                  'wait' => 'WAIT' | 'NO WAIT' +
85     *                  'rw'   => 'READ WRITE' | 'READ ONLY' +
86     * +
87     * @throws PDOException                         if something fails at the PDO level +
88     * @throws Doctrine_Transaction_Exception       if using unknown isolation level or unknown wait option +
89     * @return void +
90     */ +
91    public function setIsolation($isolation, $options = array()) { +
92        switch ($isolation) { +
93            case 'READ UNCOMMITTED': +
94                $nativeIsolation = 'READ COMMITTED RECORD_VERSION'; +
95                break; +
96            case 'READ COMMITTED': +
97                $nativeIsolation = 'READ COMMITTED NO RECORD_VERSION'; +
98                break; +
99            case 'REPEATABLE READ': +
100                $nativeIsolation = 'SNAPSHOT'; +
101                break; +
102            case 'SERIALIZABLE': +
103                $nativeIsolation = 'SNAPSHOT TABLE STABILITY'; +
104                break; +
105            default: +
106                throw new Doctrine_Transaction_Exception('isolation level is not supported: ' . $isolation); +
107        } +
108 +
109        $rw = $wait = ''; +
110 +
111        if (isset($options['wait'])) { +
112            switch ($options['wait']) { +
113                case 'WAIT': +
114                case 'NO WAIT': +
115                    $wait = ' ' . $options['wait']; +
116                break; +
117                default: +
118                    throw new Doctrine_Transaction_Exception('wait option is not supported: ' . $options['wait']); +
119            } +
120        } +
121 +
122        if (isset($options['rw'])) { +
123            switch ($options['rw']) { +
124                case 'READ ONLY': +
125                case 'READ WRITE': +
126                    $rw = ' ' . $options['rw']; +
127                    break; +
128                default: +
129                    throw new Doctrine_Transaction_Exception('wait option is not supported: ' . $options['rw']); +
130            } +
131        } +
132 +
133        $query = 'SET TRANSACTION' . $rw . $wait .' ISOLATION LEVEL ' . $nativeIsolation; +
134 +
135        $this->conn->execute($query); +
136    } +
137}
\ No newline at end of file diff --git a/tests/coverage/Doctrine_Transaction_Mock.html b/tests/coverage/Doctrine_Transaction_Mock.html new file mode 100644 index 000000000..e185e36c3 --- /dev/null +++ b/tests/coverage/Doctrine_Transaction_Mock.html @@ -0,0 +1,119 @@ + + + Coverage for Doctrine_Transaction_Mock + + +

Coverage for Doctrine_Transaction_Mock

Back to coverage report

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
1<?php +
2/* +
3 *  $Id$ +
4 * +
5 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +
6 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +
7 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +
8 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +
9 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +
10 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +
11 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +
12 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +
13 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +
14 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +
15 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +
16 * +
17 * This software consists of voluntary contributions made by many individuals +
18 * and is licensed under the LGPL. For more information, see +
19 * <http://www.phpdoctrine.com>. +
20 */ +
21Doctrine::autoload('Doctrine_Transaction'); +
22/** +
23 * Doctrine_Transaction_Mock +
24 * This class is used for testing purposes +
25 * +
26 * @author      Konsta Vesterinen <kvesteri@cc.hut.fi> +
27 * @author      Lukas Smith <smith@pooteeweet.org> (PEAR MDB2 library) +
28 * @license     http://www.opensource.org/licenses/lgpl-license.php LGPL +
29 * @package     Doctrine +
30 * @subpackage  Transaction +
31 * @link        www.phpdoctrine.com +
32 * @since       1.0 +
33 * @version     $Revision$ +
34 */ +
35class Doctrine_Transaction_Mock extends Doctrine_Transaction +
36{ }
\ No newline at end of file diff --git a/tests/coverage/Doctrine_Transaction_Mssql.html b/tests/coverage/Doctrine_Transaction_Mssql.html new file mode 100644 index 000000000..3dd4c60ef --- /dev/null +++ b/tests/coverage/Doctrine_Transaction_Mssql.html @@ -0,0 +1,215 @@ + + + Coverage for Doctrine_Transaction_Mssql + + +

Coverage for Doctrine_Transaction_Mssql

Back to coverage report

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
1<?php +
2/* +
3 *  $Id: Mssql.php 2702 2007-10-03 21:43:22Z Jonathan.Wage $ +
4 * +
5 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +
6 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +
7 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +
8 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +
9 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +
10 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +
11 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +
12 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +
13 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +
14 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +
15 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +
16 * +
17 * This software consists of voluntary contributions made by many individuals +
18 * and is licensed under the LGPL. For more information, see +
19 * <http://www.phpdoctrine.com>. +
20 */ +
21Doctrine::autoload('Doctrine_Transaction'); +
22/** +
23 * +
24 * @author      Konsta Vesterinen <kvesteri@cc.hut.fi> +
25 * @author      Lukas Smith <smith@pooteeweet.org> (PEAR MDB2 library) +
26 * @license     http://www.opensource.org/licenses/lgpl-license.php LGPL +
27 * @package     Doctrine +
28 * @subpackage  Transaction +
29 * @link        www.phpdoctrine.com +
30 * @since       1.0 +
31 * @version     $Revision: 2702 $ +
32 */ +
33class Doctrine_Transaction_Mssql extends Doctrine_Transaction +
34{ +
35    /** +
36     * Set the transacton isolation level. +
37     * +
38     * @param   string  standard isolation level (SQL-92) +
39     *      portable modes: +
40     *                  READ UNCOMMITTED (allows dirty reads) +
41     *                  READ COMMITTED (prevents dirty reads) +
42     *                  REPEATABLE READ (prevents nonrepeatable reads) +
43     *                  SERIALIZABLE (prevents phantom reads) +
44     *      mssql specific modes: +
45     *                  SNAPSHOT +
46     * +
47     * @link http://msdn2.microsoft.com/en-us/library/ms173763.aspx +
48     * @throws PDOException                         if something fails at the PDO level +
49     * @throws Doctrine_Transaction_Exception       if using unknown isolation level or unknown wait option +
50     * @return void +
51     */ +
52    public function setIsolation($isolation, $options = array()) { +
53        switch ($isolation) { +
54            case 'READ UNCOMMITTED': +
55            case 'READ COMMITTED': +
56            case 'REPEATABLE READ': +
57            case 'SERIALIZABLE': +
58            case 'SNAPSHOT': +
59                break; +
60            default: +
61                throw new Doctrine_Transaction_Exception('isolation level is not supported: ' . $isolation); +
62        } +
63 +
64        $query = 'SET TRANSACTION ISOLATION LEVEL ' . $isolation; +
65 +
66        $this->conn->execute($query); +
67    } +
68}
\ No newline at end of file diff --git a/tests/coverage/Doctrine_Transaction_Mysql.html b/tests/coverage/Doctrine_Transaction_Mysql.html new file mode 100644 index 000000000..aaa85d979 --- /dev/null +++ b/tests/coverage/Doctrine_Transaction_Mysql.html @@ -0,0 +1,347 @@ + + + Coverage for Doctrine_Transaction_Mysql + + +

Coverage for Doctrine_Transaction_Mysql

Back to coverage report

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
1<?php +
2/* +
3 *  $Id: Mysql.php 2702 2007-10-03 21:43:22Z Jonathan.Wage $ +
4 * +
5 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +
6 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +
7 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +
8 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +
9 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +
10 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +
11 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +
12 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +
13 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +
14 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +
15 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +
16 * +
17 * This software consists of voluntary contributions made by many individuals +
18 * and is licensed under the LGPL. For more information, see +
19 * <http://www.phpdoctrine.com>. +
20 */ +
21Doctrine::autoload('Doctrine_Transaction'); +
22/** +
23 * +
24 * @author      Konsta Vesterinen <kvesteri@cc.hut.fi> +
25 * @author      Lukas Smith <smith@pooteeweet.org> (PEAR MDB2 library) +
26 * @license     http://www.opensource.org/licenses/lgpl-license.php LGPL +
27 * @package     Doctrine +
28 * @subpackage  Transaction +
29 * @link        www.phpdoctrine.com +
30 * @since       1.0 +
31 * @version     $Revision: 2702 $ +
32 */ +
33class Doctrine_Transaction_Mysql extends Doctrine_Transaction +
34{ +
35    /** +
36     * createSavepoint +
37     * creates a new savepoint +
38     * +
39     * @param string $savepoint     name of a savepoint to set +
40     * @return void +
41     */ +
42    protected function createSavePoint($savepoint) +
43    { +
44        $query = 'SAVEPOINT ' . $savepoint; +
45 +
46        return $this->conn->execute($query); +
47    } +
48    /** +
49     * releaseSavePoint +
50     * releases given savepoint +
51     * +
52     * @param string $savepoint     name of a savepoint to release +
53     * @return void +
54     */ +
55    protected function releaseSavePoint($savepoint) +
56    { +
57        $query = 'RELEASE SAVEPOINT ' . $savepoint; +
58 +
59        return $this->conn->execute($query); +
60    } +
61    /** +
62     * rollbackSavePoint +
63     * releases given savepoint +
64     * +
65     * @param string $savepoint     name of a savepoint to rollback to +
66     * @return void +
67     */ +
68    protected function rollbackSavePoint($savepoint) +
69    { +
70        $query = 'ROLLBACK TO SAVEPOINT ' . $savepoint; +
71 +
72        return $this->conn->execute($query); +
73    } +
74    /** +
75     * Set the transacton isolation level. +
76     * +
77     * @param   string  standard isolation level +
78     *                  READ UNCOMMITTED (allows dirty reads) +
79     *                  READ COMMITTED (prevents dirty reads) +
80     *                  REPEATABLE READ (prevents nonrepeatable reads) +
81     *                  SERIALIZABLE (prevents phantom reads) +
82     * +
83     * @throws Doctrine_Transaction_Exception           if using unknown isolation level +
84     * @throws PDOException                             if something fails at the PDO level +
85     * @return void +
86     */ +
87    public function setIsolation($isolation) +
88    { +
89        switch ($isolation) { +
90            case 'READ UNCOMMITTED': +
91            case 'READ COMMITTED': +
92            case 'REPEATABLE READ': +
93            case 'SERIALIZABLE': +
94                break; +
95            default: +
96                throw new Doctrine_Transaction_Exception('Isolation level ' . $isolation . ' is not supported.'); +
97        } +
98 +
99        $query = 'SET SESSION TRANSACTION ISOLATION LEVEL ' . $isolation; +
100 +
101        return $this->conn->execute($query); +
102    } +
103    /** +
104     * getTransactionIsolation +
105     * +
106     * @return string               returns the current session transaction isolation level +
107     */ +
108    public function getIsolation() +
109    { +
110        return $this->conn->fetchOne('SELECT @@tx_isolation'); +
111    } +
112}
\ No newline at end of file diff --git a/tests/coverage/Doctrine_Transaction_Oracle.html b/tests/coverage/Doctrine_Transaction_Oracle.html new file mode 100644 index 000000000..7e4758922 --- /dev/null +++ b/tests/coverage/Doctrine_Transaction_Oracle.html @@ -0,0 +1,320 @@ + + + Coverage for Doctrine_Transaction_Oracle + + +

Coverage for Doctrine_Transaction_Oracle

Back to coverage report

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
1<?php +
2/* +
3 *  $Id: Oracle.php 2702 2007-10-03 21:43:22Z Jonathan.Wage $ +
4 * +
5 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +
6 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +
7 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +
8 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +
9 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +
10 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +
11 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +
12 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +
13 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +
14 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +
15 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +
16 * +
17 * This software consists of voluntary contributions made by many individuals +
18 * and is licensed under the LGPL. For more information, see +
19 * <http://www.phpdoctrine.com>. +
20 */ +
21Doctrine::autoload('Doctrine_Transaction'); +
22/** +
23 * +
24 * @author      Konsta Vesterinen <kvesteri@cc.hut.fi> +
25 * @author      Lukas Smith <smith@pooteeweet.org> (PEAR MDB2 library) +
26 * @license     http://www.opensource.org/licenses/lgpl-license.php LGPL +
27 * @package     Doctrine +
28 * @subpackage  Transaction +
29 * @link        www.phpdoctrine.com +
30 * @since       1.0 +
31 * @version     $Revision: 2702 $ +
32 */ +
33class Doctrine_Transaction_Oracle extends Doctrine_Transaction +
34{ +
35    /** +
36     * createSavepoint +
37     * creates a new savepoint +
38     * +
39     * @param string $savepoint     name of a savepoint to set +
40     * @return void +
41     */ +
42    protected function createSavePoint($savepoint) +
43    { +
44        $query = 'SAVEPOINT ' . $savepoint; +
45 +
46        return $this->conn->execute($query); +
47    } +
48    /** +
49     * releaseSavePoint +
50     * releases given savepoint +
51     * +
52     * @param string $savepoint     name of a savepoint to release +
53     * @return void +
54     */ +
55    protected function releaseSavePoint($savepoint) +
56    { +
57        // oracle doesn't support manual releasing of savepoints +
58        return true; +
59    } +
60    /** +
61     * rollbackSavePoint +
62     * releases given savepoint +
63     * +
64     * @param string $savepoint     name of a savepoint to rollback to +
65     * @return void +
66     */ +
67    protected function rollbackSavePoint($savepoint) +
68    { +
69        $query = 'ROLLBACK TO SAVEPOINT ' . $savepoint; +
70 +
71        return $this->conn->execute($query); +
72    } +
73    /** +
74     * Set the transacton isolation level. +
75     * +
76     * @param   string  standard isolation level +
77     *                  READ UNCOMMITTED (allows dirty reads) +
78     *                  READ COMMITTED (prevents dirty reads) +
79     *                  REPEATABLE READ (prevents nonrepeatable reads) +
80     *                  SERIALIZABLE (prevents phantom reads) +
81     * @throws PDOException                         if something fails at the PDO level +
82     * @throws Doctrine_Transaction_Exception       if using unknown isolation level +
83     * @return void +
84     */ +
85    public function setIsolation($isolation) +
86    { +
87        switch ($isolation) { +
88            case 'READ UNCOMMITTED': +
89                $isolation = 'READ COMMITTED'; +
90                break; +
91            case 'READ COMMITTED': +
92            case 'REPEATABLE READ': +
93            case 'SERIALIZABLE': +
94                $isolation = 'SERIALIZABLE'; +
95                break; +
96            default: +
97                throw new Doctrine_Transaction_Exception('Isolation level ' . $isolation . ' is not supported.'); +
98        } +
99 +
100        $query = 'ALTER SESSION ISOLATION LEVEL ' . $isolation; +
101        return $this->conn->execute($query); +
102    } +
103}
\ No newline at end of file diff --git a/tests/coverage/Doctrine_Transaction_Pgsql.html b/tests/coverage/Doctrine_Transaction_Pgsql.html new file mode 100644 index 000000000..dba1b7cf8 --- /dev/null +++ b/tests/coverage/Doctrine_Transaction_Pgsql.html @@ -0,0 +1,317 @@ + + + Coverage for Doctrine_Transaction_Pgsql + + +

Coverage for Doctrine_Transaction_Pgsql

Back to coverage report

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
1<?php +
2/* +
3 *  $Id: Pgsql.php 2702 2007-10-03 21:43:22Z Jonathan.Wage $ +
4 * +
5 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +
6 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +
7 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +
8 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +
9 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +
10 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +
11 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +
12 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +
13 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +
14 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +
15 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +
16 * +
17 * This software consists of voluntary contributions made by many individuals +
18 * and is licensed under the LGPL. For more information, see +
19 * <http://www.phpdoctrine.com>. +
20 */ +
21Doctrine::autoload('Doctrine_Transaction'); +
22/** +
23 * +
24 * @author      Konsta Vesterinen <kvesteri@cc.hut.fi> +
25 * @author      Paul Cooper <pgc@ucecom.com> (PEAR MDB2 Pgsql driver) +
26 * @author      Lukas Smith <smith@pooteeweet.org> (PEAR MDB2 library) +
27 * @license     http://www.opensource.org/licenses/lgpl-license.php LGPL +
28 * @package     Doctrine +
29 * @subpackage  Transaction +
30 * @link        www.phpdoctrine.com +
31 * @since       1.0 +
32 * @version     $Revision: 2702 $ +
33 */ +
34class Doctrine_Transaction_Pgsql extends Doctrine_Transaction +
35{ +
36    /** +
37     * createSavepoint +
38     * creates a new savepoint +
39     * +
40     * @param string $savepoint     name of a savepoint to set +
41     * @return void +
42     */ +
43    protected function createSavePoint($savepoint) +
44    { +
45        $query = 'SAVEPOINT ' . $savepoint; +
46 +
47        return $this->conn->execute($query); +
48    } +
49    /** +
50     * releaseSavePoint +
51     * releases given savepoint +
52     * +
53     * @param string $savepoint     name of a savepoint to release +
54     * @return void +
55     */ +
56    protected function releaseSavePoint($savepoint) +
57    { +
58        $query = 'RELEASE SAVEPOINT ' . $savepoint; +
59 +
60        return $this->conn->execute($query); +
61    } +
62    /** +
63     * rollbackSavePoint +
64     * releases given savepoint +
65     * +
66     * @param string $savepoint     name of a savepoint to rollback to +
67     * @return void +
68     */ +
69    protected function rollbackSavePoint($savepoint) +
70    { +
71        $query = 'ROLLBACK TO SAVEPOINT ' . $savepoint; +
72 +
73        return $this->conn->execute($query); +
74    } +
75    /** +
76     * Set the transacton isolation level. +
77     * +
78     * @param   string  standard isolation level +
79     *                  READ UNCOMMITTED (allows dirty reads) +
80     *                  READ COMMITTED (prevents dirty reads) +
81     *                  REPEATABLE READ (prevents nonrepeatable reads) +
82     *                  SERIALIZABLE (prevents phantom reads) +
83     * @throws PDOException                         if something fails at the PDO level +
84     * @throws Doctrine_Transaction_Exception       if using unknown isolation level or unknown wait option +
85     * @return void +
86     */ +
87    public function setIsolation($isolation) +
88    { +
89        switch ($isolation) { +
90            case 'READ UNCOMMITTED': +
91            case 'READ COMMITTED': +
92            case 'REPEATABLE READ': +
93            case 'SERIALIZABLE': +
94                break; +
95            default: +
96                throw new Doctrine_Transaction_Exception('Isolation level '.$isolation.' is not supported.'); +
97        } +
98 +
99        $query = 'SET SESSION CHARACTERISTICS AS TRANSACTION ISOLATION LEVEL ' . $isolation; +
100        return $this->conn->execute($query); +
101    } +
102}
\ No newline at end of file diff --git a/tests/coverage/Doctrine_Transaction_Sqlite.html b/tests/coverage/Doctrine_Transaction_Sqlite.html new file mode 100644 index 000000000..8719ba36c --- /dev/null +++ b/tests/coverage/Doctrine_Transaction_Sqlite.html @@ -0,0 +1,209 @@ + + + Coverage for Doctrine_Transaction_Sqlite + + +

Coverage for Doctrine_Transaction_Sqlite

Back to coverage report

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
1<?php +
2/* +
3 *  $Id: Sqlite.php 2702 2007-10-03 21:43:22Z Jonathan.Wage $ +
4 * +
5 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +
6 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +
7 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +
8 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +
9 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +
10 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +
11 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +
12 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +
13 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +
14 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +
15 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +
16 * +
17 * This software consists of voluntary contributions made by many individuals +
18 * and is licensed under the LGPL. For more information, see +
19 * <http://www.phpdoctrine.com>. +
20 */ +
21Doctrine::autoload('Doctrine_Transaction'); +
22/** +
23 * +
24 * @author      Konsta Vesterinen <kvesteri@cc.hut.fi> +
25 * @author      Lukas Smith <smith@pooteeweet.org> (PEAR MDB2 library) +
26 * @license     http://www.opensource.org/licenses/lgpl-license.php LGPL +
27 * @package     Doctrine +
28 * @subpackage  Transaction +
29 * @link        www.phpdoctrine.com +
30 * @since       1.0 +
31 * @version     $Revision: 2702 $ +
32 */ +
33class Doctrine_Transaction_Sqlite extends Doctrine_Transaction +
34{ +
35    /** +
36     * Set the transacton isolation level. +
37     * +
38     * @param   string  standard isolation level +
39     *                  READ UNCOMMITTED (allows dirty reads) +
40     *                  READ COMMITTED (prevents dirty reads) +
41     *                  REPEATABLE READ (prevents nonrepeatable reads) +
42     *                  SERIALIZABLE (prevents phantom reads) +
43     * @throws PDOException                         if something fails at the PDO level +
44     * @throws Doctrine_Transaction_Exception       if using unknown isolation level +
45     * @return void +
46     */ +
47    public function setIsolation($isolation) +
48    { +
49        switch ($isolation) { +
50            case 'READ UNCOMMITTED': +
51                $isolation = 0; +
52                break; +
53            case 'READ COMMITTED': +
54            case 'REPEATABLE READ': +
55            case 'SERIALIZABLE': +
56                $isolation = 1; +
57                break; +
58            default: +
59                throw new Doctrine_Transaction_Exception('Isolation level ' . $isolation . 'is not supported.'); +
60        } +
61 +
62        $query = 'PRAGMA read_uncommitted = ' . $isolation; +
63 +
64        return $this->conn->execute($query); +
65    } +
66}
\ No newline at end of file diff --git a/tests/coverage/Doctrine_Tree.html b/tests/coverage/Doctrine_Tree.html new file mode 100644 index 000000000..be2a5e33f --- /dev/null +++ b/tests/coverage/Doctrine_Tree.html @@ -0,0 +1,401 @@ + + + Coverage for Doctrine_Tree + + +

Coverage for Doctrine_Tree

Back to coverage report

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
1<?php +
2/* +
3 *  $Id: Tree.php 2702 2007-10-03 21:43:22Z Jonathan.Wage $ +
4 * +
5 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +
6 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +
7 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +
8 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +
9 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +
10 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +
11 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +
12 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +
13 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +
14 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +
15 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +
16 * +
17 * This software consists of voluntary contributions made by many individuals +
18 * and is licensed under the LGPL. For more information, see +
19 * <http://www.phpdoctrine.com>. +
20 */                    +
21/** +
22 * Doctrine_Tree +
23 * +
24 * @package     Doctrine +
25 * @subpackage  Tree +
26 * @license     http://www.opensource.org/licenses/lgpl-license.php LGPL +
27 * @link        www.phpdoctrine.com +
28 * @since       1.0 +
29 * @version     $Revision: 2702 $ +
30 * @author      Joe Simms <joe.simms@websites4.com> +
31 */ +
32class Doctrine_Tree +
33{ +
34    /** +
35     * @param object $table   reference to associated Doctrine_Table instance +
36     */ +
37    protected $table; +
38 +
39    /** +
40     * @param array $options +
41     */ +
42    protected $options = array(); +
43     +
44    protected $_baseComponent; +
45 +
46    /** +
47     * constructor, creates tree with reference to table and any options +
48     * +
49     * @param object $table                     instance of Doctrine_Table +
50     * @param array $options                    options +
51     */ +
52    public function __construct(Doctrine_Table $table, $options) +
53    { +
54        $this->table = $table; +
55        $this->options = $options; +
56        $this->_baseComponent = $table->getComponentName(); +
57        $class = $this->_baseComponent; +
58        if ($table->getOption('inheritanceMap')) { +
59            $subclasses = $table->getOption('subclasses'); +
60            while (in_array($class, $subclasses)) { +
61                $class = get_parent_class($class); +
62            } +
63            $this->_baseComponent = $class; +
64        } +
65        //echo $this->_baseComponent; +
66    } +
67 +
68    /** +
69     * Used to define table attributes required for the given implementation +
70     * +
71     * @throws Doctrine_Tree_Exception          if table attributes have not been defined +
72     */ +
73    public function setTableDefinition() +
74    { +
75        throw new Doctrine_Tree_Exception('Table attributes have not been defined for this Tree implementation.'); +
76    } +
77 +
78    /** +
79     * this method is used for setting up relations and attributes and should be used by specific implementations +
80     * +
81     */ +
82    public function setUp() +
83    { +
84    } +
85 +
86    /** +
87     * factory method to return tree instance based upon chosen implementation +
88     * +
89     * @param object $table                     instance of Doctrine_Table +
90     * @param string $impName                   implementation (NestedSet, AdjacencyList, MaterializedPath) +
91     * @param array $options                    options +
92     * @return object $options                  instance of Doctrine_Node +
93     * @throws Doctrine_Exception               if class does not extend Doctrine_Tree +
94     */ +
95    public static function factory(Doctrine_Table $table, $implName, $options = array()) +
96    { +
97        $class = 'Doctrine_Tree_' . $implName; +
98        if ( ! class_exists($class)) { +
99            throw new Doctrine_Exception('The chosen class must extend Doctrine_Tree'); +
100        } +
101        return new $class($table, $options); +
102    } +
103 +
104    /** +
105     * gets tree attribute value +
106     *         +
107     */      +
108    public function getAttribute($name) +
109    { +
110      return isset($this->options[$name]) ? $this->options[$name] : null; +
111    } +
112 +
113    /** +
114     * sets tree attribute value +
115     * +
116     * @param mixed             +
117     */ +
118    public function setAttribute($name, $value) +
119    { +
120      $this->options[$name] = $value; +
121    } +
122     +
123    /** +
124     * Returns the base tree component. +
125     */ +
126    public function getBaseComponent() +
127    { +
128        return $this->_baseComponent; +
129    } +
130}
\ No newline at end of file diff --git a/tests/coverage/Doctrine_Tree_NestedSet.html b/tests/coverage/Doctrine_Tree_NestedSet.html new file mode 100644 index 000000000..74c7d85fe --- /dev/null +++ b/tests/coverage/Doctrine_Tree_NestedSet.html @@ -0,0 +1,1076 @@ + + + Coverage for Doctrine_Tree_NestedSet + + +

Coverage for Doctrine_Tree_NestedSet

Back to coverage report

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
1<?php +
2/* +
3 *  $Id: NestedSet.php 2702 2007-10-03 21:43:22Z Jonathan.Wage $ +
4 * +
5 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +
6 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +
7 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +
8 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +
9 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +
10 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +
11 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +
12 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +
13 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +
14 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +
15 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +
16 * +
17 * This software consists of voluntary contributions made by many individuals +
18 * and is licensed under the LGPL. For more information, see +
19 * <http://www.phpdoctrine.com>. +
20 */ +
21/** +
22 * Doctrine_Tree_NestedSet +
23 * +
24 * @package     Doctrine +
25 * @subpackage  Tree +
26 * @license     http://www.opensource.org/licenses/lgpl-license.php LGPL +
27 * @link        www.phpdoctrine.com +
28 * @since       1.0 +
29 * @version     $Revision: 2702 $ +
30 * @author      Joe Simms <joe.simms@websites4.com> +
31 */ +
32class Doctrine_Tree_NestedSet extends Doctrine_Tree implements Doctrine_Tree_Interface +
33{ +
34    private $_baseQuery; +
35    private $_baseAlias = "base"; +
36     +
37    /** +
38     * constructor, creates tree with reference to table and sets default root options +
39     * +
40     * @param object $table                     instance of Doctrine_Table +
41     * @param array $options                    options +
42     */ +
43    public function __construct(Doctrine_Table $table, $options) +
44    { +
45        // set default many root attributes +
46        $options['hasManyRoots'] = isset($options['hasManyRoots']) ? $options['hasManyRoots'] : false; +
47        if ($options['hasManyRoots']) +
48            $options['rootColumnName'] = isset($options['rootColumnName']) ? $options['rootColumnName'] : 'root_id'; +
49   +
50        parent::__construct($table, $options); +
51    } +
52     +
53    /** +
54     * used to define table attributes required for the NestetSet implementation +
55     * adds lft and rgt columns for corresponding left and right values +
56     * +
57     */ +
58    public function setTableDefinition() +
59    { +
60        if ($root = $this->getAttribute('rootColumnName')) { +
61            $this->table->setColumn($root, 'integer', 4); +
62        } +
63 +
64        $this->table->setColumn('lft', 'integer', 4); +
65        $this->table->setColumn('rgt', 'integer', 4); +
66        $this->table->setColumn('level', 'integer', 2); +
67    } +
68 +
69    /** +
70     * creates root node from given record or from a new record +
71     * +
72     * @param object $record        instance of Doctrine_Record +
73     */ +
74    public function createRoot(Doctrine_Record $record = null) +
75    { +
76        if ( ! $record) { +
77            $record = $this->table->create(); +
78        } +
79 +
80        // if tree is many roots, and no root id has been set, then get next root id +
81        if ($root = $this->getAttribute('hasManyRoots') && $record->getNode()->getRootValue() <= 0) { +
82            $record->getNode()->setRootValue($this->getNextRootId()); +
83        } +
84 +
85        $record->set('lft', '1'); +
86        $record->set('rgt', '2'); +
87        $record->set('level', 0); +
88 +
89        $record->save(); +
90 +
91        return $record; +
92    } +
93 +
94    /** +
95     * returns root node +
96     * +
97     * @return object $record        instance of Doctrine_Record +
98     * @deprecated Use fetchRoot() +
99     */ +
100    public function findRoot($rootId = 1) +
101    { +
102        return $this->fetchRoot($rootId); +
103    } +
104     +
105    /** +
106     * Fetches a/the root node. +
107     * +
108     * @param integer $rootId +
109     */ +
110    public function fetchRoot($rootId = 1) +
111    { +
112        $q = $this->getBaseQuery(); +
113        $q = $q->addWhere($this->_baseAlias . '.lft = ?', 1); +
114         +
115        // if tree has many roots, then specify root id +
116        $q = $this->returnQueryWithRootId($q, $rootId); +
117        $data = $q->execute(); +
118 +
119        if (count($data) <= 0) { +
120            return false; +
121        } +
122 +
123        if ($data instanceof Doctrine_Collection) { +
124            $root = $data->getFirst(); +
125            $root['level'] = 0; +
126        } else if (is_array($data)) { +
127            $root = array_shift($data); +
128            $root['level'] = 0; +
129        } else { +
130            throw new Doctrine_Tree_Exception("Unexpected data structure returned."); +
131        } +
132 +
133        return $root; +
134    } +
135 +
136    /** +
137     * Fetches a tree. +
138     * +
139     * @param array $options  Options +
140     * @return mixed          The tree or FALSE if the tree could not be found. +
141     */ +
142    public function fetchTree($options = array()) +
143    { +
144        // fetch tree +
145        $q = $this->getBaseQuery(); +
146 +
147        $q = $q->addWhere($this->_baseAlias . ".lft >= ?", 1); +
148 +
149        // if tree has many roots, then specify root id +
150        $rootId = isset($options['root_id']) ? $options['root_id'] : '1'; +
151        if (is_array($rootId)) { +
152            $q->addOrderBy($this->_baseAlias . "." . $this->getAttribute('rootColumnName') . +
153                    ", " . $this->_baseAlias . ".lft ASC"); +
154        } else { +
155            $q->addOrderBy($this->_baseAlias . ".lft ASC"); +
156        } +
157         +
158        $q = $this->returnQueryWithRootId($q, $rootId); +
159        $tree = $q->execute(); +
160         +
161        if (count($tree) <= 0) { +
162            return false; +
163        } +
164         +
165        return $tree; +
166    } +
167 +
168    /** +
169     * Fetches a branch of a tree. +
170     * +
171     * @param mixed $pk              primary key as used by table::find() to locate node to traverse tree from +
172     * @param array $options         Options. +
173     * @return mixed                 The branch or FALSE if the branch could not be found. +
174     * @todo Only fetch the lft and rgt values of the initial record. more is not needed. +
175     */ +
176    public function fetchBranch($pk, $options = array()) +
177    { +
178        $record = $this->table->find($pk); +
179        if ( ! ($record instanceof Doctrine_Record) || !$record->exists()) { +
180            // TODO: if record doesn't exist, throw exception or similar? +
181            return false; +
182        } +
183        //$depth = isset($options['depth']) ? $options['depth'] : null; +
184         +
185        $q = $this->getBaseQuery(); +
186        $params = array($record->get('lft'), $record->get('rgt')); +
187        $q->addWhere($this->_baseAlias . ".lft >= ? AND " . $this->_baseAlias . ".rgt <= ?", $params) +
188                ->addOrderBy($this->_baseAlias . ".lft asc"); +
189        $q = $this->returnQueryWithRootId($q, $record->getNode()->getRootValue()); +
190        return $q->execute(); +
191    } +
192 +
193    /** +
194     * Fetches all root nodes. If the tree has only one root this is the same as +
195     * fetchRoot(). +
196     * +
197     * @return mixed  The root nodes. +
198     */ +
199    public function fetchRoots() +
200    { +
201        $q = $this->getBaseQuery(); +
202        $q = $q->addWhere($this->_baseAlias . '.lft = ?', 1); +
203        return $q->execute(); +
204    } +
205 +
206    /** +
207     * calculates the next available root id +
208     * +
209     * @return integer +
210     */ +
211    public function getNextRootId() +
212    { +
213        return $this->getMaxRootId() + 1; +
214    } +
215 +
216    /** +
217     * calculates the current max root id +
218     * +
219     * @return integer +
220     */     +
221    public function getMaxRootId() +
222    {       +
223        $component = $this->table->getComponentName(); +
224        $column    = $this->getAttribute('rootColumnName'); +
225 +
226        // cannot get this dql to work, cannot retrieve result using $coll[0]->max +
227        //$dql = "SELECT MAX(c.$column) FROM $component c"; +
228         +
229        $dql = 'SELECT c.' . $column . ' FROM ' . $component . ' c ORDER BY c.' . $column . ' DESC LIMIT 1'; +
230   +
231        $coll = $this->table->getConnection()->query($dql); +
232   +
233        $max = $coll[0]->get($column); +
234   +
235        $max = !is_null($max) ? $max : 0; +
236   +
237        return $max;       +
238    } +
239 +
240    /** +
241     * returns parsed query with root id where clause added if applicable +
242     * +
243     * @param object    $query    Doctrine_Query +
244     * @param integer   $root_id  id of destination root +
245     * @return object   Doctrine_Query +
246     */ +
247    public function returnQueryWithRootId($query, $rootId = 1) +
248    { +
249        if ($root = $this->getAttribute('rootColumnName')) { +
250            if (is_array($rootId)) { +
251               $query->addWhere($root . ' IN (' . implode(',', array_fill(0, count($rootId), '?')) . ')', +
252                       $rootId); +
253            } else { +
254               $query->addWhere($root . ' = ?', $rootId);  +
255            } +
256        } +
257 +
258        return $query; +
259    } +
260     +
261    /** +
262     * Enter description here... +
263     * +
264     * @param array $options +
265     * @return unknown +
266     */ +
267    public function getBaseQuery() +
268    { +
269        if ( ! isset($this->_baseQuery)) { +
270            $this->_baseQuery = $this->_createBaseQuery(); +
271        } +
272        return $this->_baseQuery->copy(); +
273    } +
274     +
275    /** +
276     * Enter description here... +
277     * +
278     */ +
279    public function getBaseAlias() +
280    { +
281        return $this->_baseAlias; +
282    } +
283     +
284    /** +
285     * Enter description here... +
286     * +
287     */ +
288    private function _createBaseQuery() +
289    { +
290        $this->_baseAlias = "base"; +
291        $q = new Doctrine_Query(); +
292        $q->select($this->_baseAlias . ".*")->from($this->getBaseComponent() . " " . $this->_baseAlias); +
293        return $q; +
294    } +
295     +
296    /** +
297     * Enter description here... +
298     * +
299     * @param Doctrine_Query $query +
300     */ +
301    public function setBaseQuery(Doctrine_Query $query) +
302    { +
303        $this->_baseAlias = $query->getRootAlias(); +
304        $query->addSelect($this->_baseAlias . ".lft, " . $this->_baseAlias . ".rgt, ". $this->_baseAlias . ".level"); +
305        if ($this->getAttribute('rootColumnName')) { +
306            $query->addSelect($this->_baseAlias . "." . $this->getAttribute('rootColumnName')); +
307        } +
308        $this->_baseQuery = $query; +
309    } +
310     +
311    /** +
312     * Enter description here... +
313     * +
314     */ +
315    public function resetBaseQuery() +
316    { +
317        $this->_baseQuery = null; +
318    } +
319     +
320    /** +
321     * Enter description here... +
322     * +
323     * @param unknown_type $graph +
324     */ +
325    /* +
326    public function computeLevels($tree) +
327    { +
328        $right = array(); +
329        $isArray = is_array($tree); +
330        $rootColumnName = $this->getAttribute('rootColumnName'); +
331         +
332        for ($i = 0, $count = count($tree); $i < $count; $i++) { +
333            if ($rootColumnName && $i > 0 && $tree[$i][$rootColumnName] != $tree[$i-1][$rootColumnName]) { +
334                $right = array(); +
335            } +
336             +
337            if (count($right) > 0) { +
338                while (count($right) > 0 && $right[count($right)-1] < $tree[$i]['rgt']) { +
339                    //echo count($right); +
340                    array_pop($right); +
341                } +
342            } +
343      +
344            if ($isArray) { +
345                $tree[$i]['level'] = count($right); +
346            } else { +
347                $tree[$i]->getNode()->setLevel(count($right)); +
348            } +
349     +
350            $right[] = $tree[$i]['rgt']; +
351        } +
352        return $tree; +
353    } +
354    */ +
355}
\ No newline at end of file diff --git a/tests/coverage/Doctrine_Validator.html b/tests/coverage/Doctrine_Validator.html new file mode 100644 index 000000000..82c1ebfea --- /dev/null +++ b/tests/coverage/Doctrine_Validator.html @@ -0,0 +1,972 @@ + + + Coverage for Doctrine_Validator + + +

Coverage for Doctrine_Validator

Back to coverage report

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
1<?php +
2/* +
3 *  $Id: Validator.php 2753 2007-10-07 20:58:08Z zYne $ +
4 * +
5 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +
6 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +
7 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +
8 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +
9 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +
10 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +
11 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +
12 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +
13 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +
14 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +
15 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +
16 * +
17 * This software consists of voluntary contributions made by many individuals +
18 * and is licensed under the LGPL. For more information, see +
19 * <http://www.phpdoctrine.com>. +
20 */ +
21/** +
22 * Doctrine_Validator +
23 * Doctrine_Validator performs validations in record properties +
24 * +
25 * @package     Doctrine +
26 * @subpackage  Validator +
27 * @license     http://www.opensource.org/licenses/lgpl-license.php LGPL +
28 * @link        www.phpdoctrine.com +
29 * @since       1.0 +
30 * @version     $Revision: 2753 $ +
31 * @author      Konsta Vesterinen <kvesteri@cc.hut.fi> +
32 */ +
33class Doctrine_Validator extends Doctrine_Locator_Injectable +
34{ +
35    /** +
36     * @var array $validators           an array of validator objects +
37     */ +
38    private static $validators  = array(); +
39    /** +
40     * returns a validator object +
41     * +
42     * @param string $name +
43     * @return Doctrine_Validator_Interface +
44     */ +
45    public static function getValidator($name) +
46    { +
47        if ( ! isset(self::$validators[$name])) { +
48            $class = 'Doctrine_Validator_' . ucwords(strtolower($name)); +
49            if (class_exists($class)) { +
50                self::$validators[$name] = new $class; +
51            } else { +
52                throw new Doctrine_Exception("Validator named '$name' not available."); +
53            } +
54 +
55        } +
56        return self::$validators[$name]; +
57    } +
58    /** +
59     * validates a given record and saves possible errors +
60     * in Doctrine_Validator::$stack +
61     * +
62     * @param Doctrine_Record $record +
63     * @return void +
64     */ +
65    public function validateRecord(Doctrine_Record $record) +
66    { +
67        $columns   = $record->getTable()->getColumns(); +
68        $component = $record->getTable()->getComponentName(); +
69 +
70        $errorStack = $record->getErrorStack(); +
71 +
72        // if record is transient all fields will be validated +
73        // if record is persistent only the modified fields will be validated +
74        $data = ($record->exists()) ? $record->getModified() : $record->getData(); +
75 +
76        $err      = array(); +
77        foreach ($data as $key => $value) { +
78            if ($value === self::$_null) { +
79                $value = null; +
80            } else if ($value instanceof Doctrine_Record) { +
81                $value = $value->getIncremented(); +
82            } +
83 +
84            $column = $columns[$key]; +
85 +
86            if ($column['type'] == 'enum') { +
87                $value = $record->getTable()->enumIndex($key, $value); +
88 +
89                if ($value === false) { +
90                    $errorStack->add($key, 'enum'); +
91                    continue; +
92                } +
93            } +
94 +
95            if ($record->getTable()->getAttribute(Doctrine::ATTR_VALIDATE) & Doctrine::VALIDATE_LENGTHS) { +
96                if ( ! $this->validateLength($column, $key, $value)) { +
97                    $errorStack->add($key, 'length'); +
98 +
99                    continue; +
100                } +
101            } +
102 +
103            foreach ($column as $name => $args) { +
104                if (empty($name) +
105                    || $name == 'primary' +
106                    || $name == 'protected' +
107                    || $name == 'autoincrement' +
108                    || $name == 'default' +
109                    || $name == 'values' +
110                    || $name == 'sequence' +
111                    || $name == 'zerofill' +
112                    || $name == 'scale') { +
113                    continue; +
114                } +
115 +
116                if (strtolower($name) === 'notnull' && isset($column['autoincrement'])) { +
117                    continue; +
118                } +
119 +
120                if (strtolower($name) == 'length') { +
121                    if ( ! ($record->getTable()->getAttribute(Doctrine::ATTR_VALIDATE) & Doctrine::VALIDATE_LENGTHS)) { +
122                        if ( ! $this->validateLength($column, $key, $value)) { +
123                            $errorStack->add($key, 'length'); +
124                        } +
125                    } +
126                    continue; +
127                } +
128 +
129                if (strtolower($name) == 'type') { +
130                    if ( ! ($record->getTable()->getAttribute(Doctrine::ATTR_VALIDATE) & Doctrine::VALIDATE_TYPES)) { +
131                        if ( ! self::isValidType($value, $column['type'])) { +
132                            $errorStack->add($key, 'type'); +
133                        } +
134                    } +
135                    continue; +
136                } +
137 +
138                $validator = self::getValidator($name); +
139                $validator->invoker = $record; +
140                $validator->field   = $key; +
141                $validator->args    = $args; +
142 +
143                if ( ! $validator->validate($value)) { +
144                    $errorStack->add($key, $name); +
145 +
146                    //$err[$key] = 'not valid'; +
147 +
148                    // errors found quit validation looping for this column +
149                    //break; +
150                } +
151            } +
152 +
153            if ($record->getTable()->getAttribute(Doctrine::ATTR_VALIDATE) & Doctrine::VALIDATE_TYPES) { +
154                if ( ! self::isValidType($value, $column['type'])) { +
155                    $errorStack->add($key, 'type'); +
156                    continue; +
157                } +
158            } +
159        } +
160    } +
161    /** +
162     * Validates the length of a field. +
163     */ +
164    private function validateLength($column, $key, $value) +
165    { +
166        if ($column['type'] == 'timestamp' || $column['type'] == 'integer') { +
167            return true; +
168        } elseif ($column['type'] == 'array' || $column['type'] == 'object') { +
169            $length = strlen(serialize($value)); +
170        } else { +
171            $length = strlen($value); +
172        } +
173 +
174        if ($length > $column['length']) { +
175            return false; +
176        } +
177        return true; +
178    } +
179    /** +
180     * whether or not this validator has errors +
181     * +
182     * @return boolean +
183     */ +
184    public function hasErrors() +
185    { +
186        return (count($this->stack) > 0); +
187    } +
188    /** +
189     * phpType +
190     * converts a doctrine type to native php type +
191     * +
192     * @param $portableType     portable doctrine type +
193     * @return string +
194     *//* +
195    public static function phpType($portableType) +
196    { +
197        switch ($portableType) { +
198            case 'enum': +
199                return 'integer'; +
200            case 'blob': +
201            case 'clob': +
202            case 'mbstring': +
203            case 'timestamp': +
204            case 'date': +
205            case 'gzip': +
206                return 'string'; +
207                break; +
208            default: +
209                return $portableType; +
210        } +
211    }*/ +
212    /** +
213     * returns whether or not the given variable is +
214     * valid type +
215     * +
216     * @param mixed $var +
217     * @param string $type +
218     * @return boolean +
219     */ +
220     /* +
221    public static function isValidType($var, $type) +
222    { +
223        if ($type == 'boolean') { +
224            return true; +
225        } +
226 +
227        $looseType = self::gettype($var); +
228        $type      = self::phpType($type); +
229 +
230        switch ($looseType) { +
231            case 'float': +
232            case 'double': +
233            case 'integer': +
234                if ($type == 'string' || $type == 'float') { +
235                    return true; +
236                } +
237            case 'string': +
238            case 'array': +
239            case 'object': +
240                return ($type === $looseType); +
241                break; +
242            case 'NULL': +
243                return true; +
244                break; +
245        } +
246    }*/ +
247     +
248     +
249    /** +
250     * returns whether or not the given variable is +
251     * valid type +
252     * +
253     * @param mixed $var +
254     * @param string $type +
255     * @return boolean +
256     */ +
257     public static function isValidType($var, $type) +
258     { +
259         if ($var === null) { +
260             return true; +
261         } else if (is_object($var)) { +
262             return $type == 'object'; +
263         } +
264      +
265         switch ($type) { +
266             case 'float': +
267             case 'double': +
268                 return (String)$var == strval(floatval($var)); +
269             case 'integer': +
270                 return (String)$var == strval(intval($var)); +
271             case 'string': +
272                 return is_string($var) || is_int($var) || is_float($var); +
273             case 'blob': +
274             case 'clob': +
275             case 'gzip': +
276                 return is_string($var); +
277             case 'array': +
278                 return is_array($var); +
279             case 'object': +
280                 return is_object($var); +
281             case 'boolean': +
282                 return is_bool($var); +
283             case 'timestamp': +
284                 // todo: validate the timestamp is in YYYY-MM-DD HH:MM:SS format +
285                 return true; +
286             case 'date': +
287                 $validator = self::getValidator('date'); +
288                 return $validator->validate($var); +
289             case 'enum': +
290                 return is_string($var) || is_int($var); +
291             default: +
292                 return false; +
293         } +
294     } +
295     +
296     +
297    /** +
298     * returns the type of loosely typed variable +
299     * +
300     * @param mixed $var +
301     * @return string +
302     *//* +
303    public static function gettype($var) +
304    { +
305        $type = gettype($var); +
306        switch ($type) { +
307            case 'string': +
308                if (preg_match("/^[0-9]+$/",$var)) { +
309                    return 'integer'; +
310                } elseif (is_numeric($var)) { +
311                    return 'float'; +
312                } else { +
313                    return $type; +
314                } +
315                break; +
316            default: +
317                return $type; +
318        } +
319    }*/ +
320} +
\ No newline at end of file diff --git a/tests/coverage/Doctrine_Validator_Date.html b/tests/coverage/Doctrine_Validator_Date.html new file mode 100644 index 000000000..b3f228015 --- /dev/null +++ b/tests/coverage/Doctrine_Validator_Date.html @@ -0,0 +1,170 @@ + + + Coverage for Doctrine_Validator_Date + + +

Coverage for Doctrine_Validator_Date

Back to coverage report

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
1<?php +
2/* +
3 *  $Id: Date.php 2702 2007-10-03 21:43:22Z Jonathan.Wage $ +
4 * +
5 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +
6 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +
7 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +
8 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +
9 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +
10 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +
11 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +
12 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +
13 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +
14 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +
15 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +
16 * +
17 * This software consists of voluntary contributions made by many individuals +
18 * and is licensed under the LGPL. For more information, see +
19 * <http://www.phpdoctrine.com>. +
20 */ +
21 +
22/** +
23 * Doctrine_Validator_Date +
24 * +
25 * @package     Doctrine +
26 * @subpackage  Validator +
27 * @license     http://www.opensource.org/licenses/lgpl-license.php LGPL +
28 * @link        www.phpdoctrine.com +
29 * @since       1.0 +
30 * @version     $Revision: 2702 $ +
31 * @author      Konsta Vesterinen <kvesteri@cc.hut.fi> +
32 */ +
33class Doctrine_Validator_Date +
34{ +
35    /** +
36     * checks if given value is a valid date +
37     * +
38     * @param mixed $value +
39     * @return boolean +
40     */ +
41    public function validate($value) +
42    { +
43        if ($value === null) { +
44            return true; +
45        } +
46        $e = explode('-', $value); +
47 +
48        if (count($e) !== 3) { +
49            return false; +
50        } +
51        return checkdate($e[1], $e[2], $e[0]); +
52    } +
53}
\ No newline at end of file diff --git a/tests/coverage/Doctrine_Validator_Driver.html b/tests/coverage/Doctrine_Validator_Driver.html new file mode 100644 index 000000000..ac8690575 --- /dev/null +++ b/tests/coverage/Doctrine_Validator_Driver.html @@ -0,0 +1,341 @@ + + + Coverage for Doctrine_Validator_Driver + + +

Coverage for Doctrine_Validator_Driver

Back to coverage report

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
1<?php +
2/* +
3 *  $Id: Notnull.php 1080 2007-02-10 18:17:08Z romanb $ +
4 * +
5 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +
6 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +
7 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +
8 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +
9 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +
10 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +
11 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +
12 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +
13 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +
14 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +
15 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +
16 * +
17 * This software consists of voluntary contributions made by many individuals +
18 * and is licensed under the LGPL. For more information, see +
19 * <http://www.phpdoctrine.com>. +
20 */ +
21 +
22/** +
23 * Doctrine_Validator_Driver +
24 * +
25 * @package     Doctrine +
26 * @subpackage  Validator +
27 * @license     http://www.opensource.org/licenses/lgpl-license.php LGPL +
28 * @link        www.phpdoctrine.com +
29 * @since       1.0 +
30 * @version     $Revision: 1080 $ +
31 * @author      Konsta Vesterinen <kvesteri@cc.hut.fi> +
32 */ +
33class Doctrine_Validator_Driver +
34{ +
35    /** +
36     * @var array $_args     an array of plugin specific args +
37     */ +
38    protected $_args = array(); +
39    /** +
40     * __get +
41     * an alias for getOption +
42     * +
43     * @param string $arg +
44     */ +
45    public function __get($arg) +
46    { +
47        if (isset($this->_args[$arg])) { +
48            return $this->_args[$arg]; +
49        } +
50        return null; +
51    } +
52    /** +
53     * __isset +
54     * +
55     * @param string $arg +
56     */ +
57    public function __isset($arg) +
58    { +
59        return isset($this->_args[$arg]); +
60    } +
61    /** +
62     * sets given value to an argument +
63     * +
64     * @param $arg          the name of the option to be changed +
65     * @param $value        the value of the option +
66     * @return Doctrine_Validator_Driver    this object +
67     */ +
68    public function __set($arg, $value) +
69    { +
70        $this->_args[$arg] = $value; +
71         +
72        return $this; +
73    } +
74    /** +
75     * returns the value of an argument +
76     * +
77     * @param $arg          the name of the option to retrieve +
78     * @return mixed        the value of the option +
79     */ +
80    public function getArg($arg) +
81    { +
82        if ( ! isset($this->_args[$arg])) { +
83            throw new Doctrine_Plugin_Exception('Unknown option ' . $arg); +
84        } +
85         +
86        return $this->_args[$arg]; +
87    } +
88    /** +
89     * sets given value to an argument +
90     * +
91     * @param $arg          the name of the option to be changed +
92     * @param $value        the value of the option +
93     * @return Doctrine_Validator_Driver    this object +
94     */ +
95    public function setArg($arg, $value) +
96    { +
97        $this->_args[$arg] = $value; +
98         +
99        return $this; +
100    } +
101    /** +
102     * returns all args and their associated values +
103     * +
104     * @return array    all args as an associative array +
105     */ +
106    public function getArgs() +
107    { +
108        return $this->_args; +
109    } +
110}
\ No newline at end of file diff --git a/tests/coverage/Doctrine_Validator_Email.html b/tests/coverage/Doctrine_Validator_Email.html new file mode 100644 index 000000000..08c7ce8bd --- /dev/null +++ b/tests/coverage/Doctrine_Validator_Email.html @@ -0,0 +1,245 @@ + + + Coverage for Doctrine_Validator_Email + + +

Coverage for Doctrine_Validator_Email

Back to coverage report

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
1<?php +
2/* +
3 *  $Id: Email.php 2702 2007-10-03 21:43:22Z Jonathan.Wage $ +
4 * +
5 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +
6 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +
7 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +
8 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +
9 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +
10 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +
11 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +
12 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +
13 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +
14 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +
15 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +
16 * +
17 * This software consists of voluntary contributions made by many individuals +
18 * and is licensed under the LGPL. For more information, see +
19 * <http://www.phpdoctrine.com>. +
20 */ +
21 +
22/** +
23 * Doctrine_Validator_Email +
24 * +
25 * @package     Doctrine +
26 * @subpackage  Validator +
27 * @license     http://www.opensource.org/licenses/lgpl-license.php LGPL +
28 * @link        www.phpdoctrine.com +
29 * @since       1.0 +
30 * @version     $Revision: 2702 $ +
31 * @author      Konsta Vesterinen <kvesteri@cc.hut.fi> +
32 */ +
33class Doctrine_Validator_Email +
34{ +
35    /** +
36     * checks if given value is a valid email address +
37     * +
38     * @link http://iamcal.com/publish/articles/php/parsing_email/pdf/ +
39     * @param mixed $value +
40     * @return boolean +
41     */ +
42    public function validate($value) +
43    { +
44        if ($value === null) { +
45            return true; +
46        } +
47        if (isset($this->args)) { +
48            $parts = explode('@', $value); +
49            if (isset($parts[1]) && function_exists('checkdnsrr')) { +
50                if ( ! checkdnsrr($parts[1], 'MX')) { +
51                    return false; +
52                } +
53            } +
54        } +
55 +
56        $qtext = '[^\\x0d\\x22\\x5c\\x80-\\xff]'; +
57        $dtext = '[^\\x0d\\x5b-\\x5d\\x80-\\xff]'; +
58        $atom = '[^\\x00-\\x20\\x22\\x28\\x29\\x2c\\x2e\\x3a-\\x3c\\x3e\\x40\\x5b-\\x5d\\x7f-\\xff]+'; +
59        $quotedPair = '\\x5c[\\x00-\\x7f]'; +
60        $domainLiteral = "\\x5b($dtext|$quotedPair)*\\x5d"; +
61        $quotedString = "\\x22($qtext|$quotedPair)*\\x22"; +
62        $domain_ref = $atom; +
63        $subDomain = "($domain_ref|$domainLiteral)"; +
64        $word = "($atom|$quotedString)"; +
65        $domain = "$subDomain(\\x2e$subDomain)+"; +
66        /* +
67          following pseudocode to allow strict checking - ask pookey about this if you're puzzled +
68 +
69          if ($this->getValidationOption('strict_checking') == true) { +
70              $domain = "$sub_domain(\\x2e$sub_domain)*"; +
71          } +
72        */ +
73        $localPart = "$word(\\x2e$word)*"; +
74        $addrSpec = "$localPart\\x40$domain"; +
75 +
76        return (bool) preg_match("!^$addrSpec$!D", $value); +
77    } +
78}
\ No newline at end of file diff --git a/tests/coverage/Doctrine_Validator_ErrorStack.html b/tests/coverage/Doctrine_Validator_ErrorStack.html new file mode 100644 index 000000000..e7645c5db --- /dev/null +++ b/tests/coverage/Doctrine_Validator_ErrorStack.html @@ -0,0 +1,434 @@ + + + Coverage for Doctrine_Validator_ErrorStack + + +

Coverage for Doctrine_Validator_ErrorStack

Back to coverage report

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
1<?php +
2/* +
3 *  $Id: ErrorStack.php 2702 2007-10-03 21:43:22Z Jonathan.Wage $ +
4 * +
5 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +
6 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +
7 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +
8 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +
9 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +
10 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +
11 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +
12 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +
13 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +
14 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +
15 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +
16 * +
17 * This software consists of voluntary contributions made by many individuals +
18 * and is licensed under the LGPL. For more information, see +
19 * <http://www.phpdoctrine.com>. +
20 */ +
21/** +
22 * Doctrine_Validator_ErrorStack +
23 * +
24 * @package     Doctrine +
25 * @subpackage  Validator +
26 * @author      Konsta Vesterinen <kvesteri@cc.hut.fi> +
27 * @author      Roman Borschel <roman@code-factory.org> +
28 * @license     http://www.opensource.org/licenses/lgpl-license.php LGPL +
29 * @link        www.phpdoctrine.com +
30 * @since       1.0 +
31 * @version     $Revision: 2702 $ +
32 */ +
33class Doctrine_Validator_ErrorStack extends Doctrine_Access implements Countable, IteratorAggregate +
34{ +
35 +
36    /** +
37     * The errors of the error stack. +
38     * +
39     * @var array +
40     */ +
41    protected $errors = array(); +
42    protected $classname = ""; +
43 +
44    /** +
45     * Constructor +
46     * +
47     */ +
48    public function __construct($classname = "") +
49    { +
50        $this->classname = $classname; +
51    } +
52 +
53    /** +
54     * Adds an error to the stack. +
55     * +
56     * @param string $invalidFieldName +
57     * @param string $errorType +
58     */ +
59    public function add($invalidFieldName, $errorCode = 'general') +
60    { +
61        $this->errors[$invalidFieldName][] = $errorCode; +
62    } +
63 +
64    /** +
65     * Removes all existing errors for the specified field from the stack. +
66     * +
67     * @param string $fieldName +
68     */ +
69    public function remove($fieldName) +
70    { +
71        if (isset($this->errors[$fieldName])) { +
72            unset($this->errors[$fieldName]); +
73        } +
74    } +
75 +
76    /** +
77     * Enter description here... +
78     * +
79     * @param unknown_type $name +
80     * @return unknown +
81     */ +
82    public function get($fieldName) +
83    { +
84        return isset($this->errors[$fieldName]) ? $this->errors[$fieldName] : null; +
85    } +
86 +
87    /** +
88     * Enter description here... +
89     * +
90     * @param unknown_type $name +
91     */ +
92    public function set($fieldName, $errorCode) +
93    { +
94        $this->add($fieldName, $errorCode); +
95    } +
96 +
97    /** +
98     * Enter description here... +
99     * +
100     * @return unknown +
101     */ +
102    public function contains($fieldName) +
103    { +
104        return array_key_exists($fieldName, $this->errors); +
105    } +
106 +
107    /** +
108     * Removes all errors from the stack. +
109     */ +
110    public function clear() +
111    { +
112        $this->errors = array(); +
113    } +
114 +
115    /** +
116     * Enter description here... +
117     * +
118     * @return unknown +
119     */ +
120    public function getIterator() +
121    { +
122        return new ArrayIterator($this->errors); +
123    } +
124    /** +
125     * Enter description here... +
126     * +
127     * @return unknown +
128     */ +
129    public function count() +
130    { +
131        return count($this->errors); +
132    } +
133 +
134    /** +
135     * Get the classname where the errors occured +
136     * +
137     */ +
138    public function getClassname(){ +
139        return $this->classname; +
140    } +
141}
\ No newline at end of file diff --git a/tests/coverage/Doctrine_Validator_Exception.html b/tests/coverage/Doctrine_Validator_Exception.html new file mode 100644 index 000000000..a13509920 --- /dev/null +++ b/tests/coverage/Doctrine_Validator_Exception.html @@ -0,0 +1,305 @@ + + + Coverage for Doctrine_Validator_Exception + + +

Coverage for Doctrine_Validator_Exception

Back to coverage report

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
1<?php +
2/* +
3 *  $Id: Exception.php 2702 2007-10-03 21:43:22Z Jonathan.Wage $ +
4 * +
5 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +
6 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +
7 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +
8 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +
9 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +
10 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +
11 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +
12 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +
13 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +
14 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +
15 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +
16 * +
17 * This software consists of voluntary contributions made by many individuals +
18 * and is licensed under the LGPL. For more information, see +
19 * <http://www.phpdoctrine.com>. +
20 */ +
21Doctrine::autoload('Doctrine_Exception'); +
22/** +
23 * Doctrine_Validator_Exception +
24 * +
25 * @package     Doctrine +
26 * @subpackage  Validator +
27 * @author      Konsta Vesterinen <kvesteri@cc.hut.fi> +
28 * @license     http://www.opensource.org/licenses/lgpl-license.php LGPL +
29 * @link        www.phpdoctrine.com +
30 * @since       1.0 +
31 * @version     $Revision: 2702 $ +
32 */ +
33class Doctrine_Validator_Exception extends Doctrine_Exception implements Countable, IteratorAggregate +
34{ +
35    /** +
36     * @var array $invalid +
37     */ +
38    private $invalid = array(); +
39    /** +
40     * @param Doctrine_Validator $validator +
41     */ +
42    public function __construct(array $invalid) +
43    { +
44        $this->invalid = $invalid; +
45        parent::__construct($this->generateMessage()); +
46    } +
47 +
48    public function getInvalidRecords() +
49    { +
50        return $this->invalid; +
51    } +
52 +
53    public function getIterator() +
54    { +
55        return new ArrayIterator($this->invalid); +
56    } +
57 +
58    public function count() +
59    { +
60        return count($this->invalid); +
61    } +
62    /** +
63     * __toString +
64     * +
65     * @return string +
66     */ +
67    public function __toString() +
68    { +
69 +
70        return parent::__toString(); +
71    } +
72 +
73    /** +
74     * Generate a message with all classes that have exceptions +
75     */ +
76    private function generateMessage() +
77    { +
78        $message = ""; +
79        foreach ($this->invalid as $record) { +
80           $message .= "Validaton error in class " . get_class($record) . " "; +
81        } +
82        return $message; +
83    } +
84 +
85    /** +
86     * This method will apply the value of the $function variable as a user_func  +
87     * to tall errorstack objects in the exception +
88     * +
89     * @param mixed Either string with function name or array with object,  +
90     * functionname. See call_user_func in php manual for more inforamtion +
91     */ +
92    public function inspect($function) +
93    { +
94        foreach ($this->invalid as $record) { +
95            call_user_func($function, $record->getErrorStack()); +
96        } +
97    } +
98}
\ No newline at end of file diff --git a/tests/coverage/Doctrine_Validator_Future.html b/tests/coverage/Doctrine_Validator_Future.html new file mode 100644 index 000000000..a1b90a0e7 --- /dev/null +++ b/tests/coverage/Doctrine_Validator_Future.html @@ -0,0 +1,248 @@ + + + Coverage for Doctrine_Validator_Future + + +

Coverage for Doctrine_Validator_Future

Back to coverage report

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
1<?php +
2/* +
3 *  $Id$ +
4 * +
5 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +
6 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +
7 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +
8 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +
9 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +
10 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +
11 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +
12 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +
13 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +
14 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +
15 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +
16 * +
17 * This software consists of voluntary contributions made by many individuals +
18 * and is licensed under the LGPL. For more information, see +
19 * <http://www.phpdoctrine.com>. +
20 */ +
21 +
22/** +
23 * Doctrine_Validator_Future +
24 * +
25 * @package     Doctrine +
26 * @subpackage  Validator +
27 * @license     http://www.opensource.org/licenses/lgpl-license.php LGPL +
28 * @link        www.phpdoctrine.com +
29 * @since       1.0 +
30 * @version     $Revision$ +
31 * @author      Roman Borschel <roman@code-factory.org> +
32 */ +
33class Doctrine_Validator_Future +
34{ +
35    /** +
36     * checks if the given value is a valid date in the future. +
37     * +
38     * @param mixed $value +
39     * @return boolean +
40     */ +
41    public function validate($value) +
42    { +
43        if ($value === null) { +
44            return true; +
45        } +
46        $e = explode('-', $value); +
47 +
48        if (count($e) !== 3) { +
49            return false; +
50        } +
51         +
52        if (is_array($this->args) && isset($this->args['timezone'])) { +
53            switch (strtolower($this->args['timezone'])) { +
54                case 'gmt': +
55                    $now = gmdate("U") - date("Z"); +
56                    break; +
57                default: +
58                    $now = getdate(); +
59                    break; +
60            } +
61        } else { +
62            $now = getdate(); +
63        } +
64         +
65        if ($now['year'] > $e[0]) { +
66            return false; +
67        } else if ($now['year'] == $e[0]) { +
68            if ($now['mon'] > $e[1]) { +
69                return false; +
70            } else if ($now['mon'] == $e[1]) { +
71                return $now['mday'] < $e[2]; +
72            } else { +
73                return true; +
74            } +
75        } else { +
76            return true; +
77        } +
78    } +
79}
\ No newline at end of file diff --git a/tests/coverage/Doctrine_Validator_Notblank.html b/tests/coverage/Doctrine_Validator_Notblank.html new file mode 100644 index 000000000..84fafd896 --- /dev/null +++ b/tests/coverage/Doctrine_Validator_Notblank.html @@ -0,0 +1,149 @@ + + + Coverage for Doctrine_Validator_Notblank + + +

Coverage for Doctrine_Validator_Notblank

Back to coverage report

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
1<?php +
2/* +
3 *  $Id: Notblank.php 2702 2007-10-03 21:43:22Z Jonathan.Wage $ +
4 * +
5 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +
6 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +
7 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +
8 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +
9 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +
10 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +
11 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +
12 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +
13 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +
14 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +
15 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +
16 * +
17 * This software consists of voluntary contributions made by many individuals +
18 * and is licensed under the LGPL. For more information, see +
19 * <http://www.phpdoctrine.com>. +
20 */ +
21 +
22/** +
23 * Doctrine_Validator_Notblank +
24 * +
25 * @package     Doctrine +
26 * @subpackage  Validator +
27 * @license     http://www.opensource.org/licenses/lgpl-license.php LGPL +
28 * @link        www.phpdoctrine.com +
29 * @since       1.0 +
30 * @version     $Revision: 2702 $ +
31 * @author      Konsta Vesterinen <kvesteri@cc.hut.fi> +
32 */ +
33class Doctrine_Validator_Notblank extends Doctrine_Validator_Driver +
34{ +
35    /** +
36     * checks that value isn't blank +
37     * a value is blank when its either null or contains only space characters +
38     * +
39     * @param mixed $value +
40     * @return boolean +
41     */ +
42    public function validate($value) +
43    { +
44        return (trim($value) !== '' && $value !== null); +
45    } +
46}
\ No newline at end of file diff --git a/tests/coverage/Doctrine_Validator_Notnull.html b/tests/coverage/Doctrine_Validator_Notnull.html new file mode 100644 index 000000000..24e5b3caa --- /dev/null +++ b/tests/coverage/Doctrine_Validator_Notnull.html @@ -0,0 +1,146 @@ + + + Coverage for Doctrine_Validator_Notnull + + +

Coverage for Doctrine_Validator_Notnull

Back to coverage report

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
1<?php +
2/* +
3 *  $Id: Notnull.php 2702 2007-10-03 21:43:22Z Jonathan.Wage $ +
4 * +
5 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +
6 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +
7 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +
8 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +
9 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +
10 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +
11 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +
12 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +
13 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +
14 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +
15 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +
16 * +
17 * This software consists of voluntary contributions made by many individuals +
18 * and is licensed under the LGPL. For more information, see +
19 * <http://www.phpdoctrine.com>. +
20 */ +
21 +
22/** +
23 * Doctrine_Validator_Notnull +
24 * +
25 * @package     Doctrine +
26 * @subpackage  Validator +
27 * @license     http://www.opensource.org/licenses/lgpl-license.php LGPL +
28 * @link        www.phpdoctrine.com +
29 * @since       1.0 +
30 * @version     $Revision: 2702 $ +
31 * @author      Konsta Vesterinen <kvesteri@cc.hut.fi> +
32 */ +
33class Doctrine_Validator_Notnull extends Doctrine_Validator_Driver +
34{ +
35    /** +
36     * checks that given value isn't null +
37     * +
38     * @param mixed $value +
39     * @return boolean +
40     */ +
41    public function validate($value) +
42    { +
43        return ($value !== null); +
44    } +
45}
\ No newline at end of file diff --git a/tests/coverage/Doctrine_Validator_Past.html b/tests/coverage/Doctrine_Validator_Past.html new file mode 100644 index 000000000..4f89472a0 --- /dev/null +++ b/tests/coverage/Doctrine_Validator_Past.html @@ -0,0 +1,248 @@ + + + Coverage for Doctrine_Validator_Past + + +

Coverage for Doctrine_Validator_Past

Back to coverage report

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
1<?php +
2/* +
3 *  $Id: Date.php 2367 2007-09-02 20:00:27Z zYne $ +
4 * +
5 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +
6 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +
7 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +
8 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +
9 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +
10 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +
11 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +
12 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +
13 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +
14 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +
15 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +
16 * +
17 * This software consists of voluntary contributions made by many individuals +
18 * and is licensed under the LGPL. For more information, see +
19 * <http://www.phpdoctrine.com>. +
20 */ +
21 +
22/** +
23 * Doctrine_Validator_Past +
24 * +
25 * @package     Doctrine +
26 * @subpackage  Validator +
27 * @license     http://www.opensource.org/licenses/lgpl-license.php LGPL +
28 * @link        www.phpdoctrine.com +
29 * @since       1.0 +
30 * @version     $Revision$ +
31 * @author      Roman Borschel <roman@code-factory.org> +
32 */ +
33class Doctrine_Validator_Past +
34{ +
35    /** +
36     * checks if the given value is a valid date in the past. +
37     * +
38     * @param mixed $value +
39     * @return boolean +
40     */ +
41    public function validate($value) +
42    { +
43        if ($value === null) { +
44            return true; +
45        } +
46        $e = explode('-', $value); +
47 +
48        if (count($e) !== 3) { +
49            return false; +
50        } +
51         +
52        if (is_array($this->args) && isset($this->args['timezone'])) { +
53            switch (strtolower($this->args['timezone'])) { +
54                case 'gmt': +
55                    $now = gmdate("U") - date("Z"); +
56                    break; +
57                default: +
58                    $now = getdate(); +
59                    break; +
60            } +
61        } else { +
62            $now = getdate(); +
63        } +
64         +
65        if ($now['year'] < $e[0]) { +
66            return false; +
67        } else if ($now['year'] == $e[0]) { +
68            if ($now['mon'] < $e[1]) { +
69                return false; +
70            } else if ($now['mon'] == $e[1]) { +
71                return $now['mday'] > $e[2]; +
72            } else { +
73                return true; +
74            } +
75        } else { +
76            return true; +
77        } +
78    } +
79}
\ No newline at end of file diff --git a/tests/coverage/Doctrine_Validator_Range.html b/tests/coverage/Doctrine_Validator_Range.html new file mode 100644 index 000000000..11cce7270 --- /dev/null +++ b/tests/coverage/Doctrine_Validator_Range.html @@ -0,0 +1,164 @@ + + + Coverage for Doctrine_Validator_Range + + +

Coverage for Doctrine_Validator_Range

Back to coverage report

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
1<?php +
2/* +
3 *  $Id: Range.php 2702 2007-10-03 21:43:22Z Jonathan.Wage $ +
4 * +
5 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +
6 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +
7 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +
8 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +
9 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +
10 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +
11 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +
12 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +
13 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +
14 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +
15 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +
16 * +
17 * This software consists of voluntary contributions made by many individuals +
18 * and is licensed under the LGPL. For more information, see +
19 * <http://www.phpdoctrine.com>. +
20 */ +
21 +
22/** +
23 * Doctrine_Validator_Range +
24 * +
25 * @package     Doctrine +
26 * @subpackage  Validator +
27 * @license     http://www.opensource.org/licenses/lgpl-license.php LGPL +
28 * @link        www.phpdoctrine.com +
29 * @since       1.0 +
30 * @version     $Revision: 2702 $ +
31 * @author      Konsta Vesterinen <kvesteri@cc.hut.fi> +
32 */ +
33class Doctrine_Validator_Range +
34{ +
35    /** +
36     * checks if value is within given range +
37     * +
38     * @param mixed $value +
39     * @return boolean +
40     */ +
41    public function validate($value) +
42    { +
43        if (isset($this->args[0]) && $value < $this->args[0]) { +
44            return false; +
45        } +
46        if (isset($this->args[1]) && $value > $this->args[1]) { +
47            return false; +
48        } +
49        return true; +
50    } +
51}
\ No newline at end of file diff --git a/tests/coverage/Doctrine_Validator_Regexp.html b/tests/coverage/Doctrine_Validator_Regexp.html new file mode 100644 index 000000000..0ebfdc0c1 --- /dev/null +++ b/tests/coverage/Doctrine_Validator_Regexp.html @@ -0,0 +1,197 @@ + + + Coverage for Doctrine_Validator_Regexp + + +

Coverage for Doctrine_Validator_Regexp

Back to coverage report

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
1<?php +
2/* +
3 *  $Id: Regexp.php 2702 2007-10-03 21:43:22Z Jonathan.Wage $ +
4 * +
5 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +
6 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +
7 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +
8 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +
9 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +
10 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +
11 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +
12 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +
13 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +
14 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +
15 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +
16 * +
17 * This software consists of voluntary contributions made by many individuals +
18 * and is licensed under the LGPL. For more information, see +
19 * <http://www.phpdoctrine.com>. +
20 */ +
21 +
22/** +
23 * Doctrine_Validator_Regexp +
24 * +
25 * @package     Doctrine +
26 * @subpackage  Validator +
27 * @license     http://www.opensource.org/licenses/lgpl-license.php LGPL +
28 * @link        www.phpdoctrine.com +
29 * @since       1.0 +
30 * @version     $Revision: 2702 $ +
31 * @author      Konsta Vesterinen <kvesteri@cc.hut.fi> +
32 */ +
33class Doctrine_Validator_Regexp +
34{ +
35    /** +
36     * checks if given value satisfies a regular expression +
37     * +
38     * @param mixed $value +
39     * @param mixed $args +
40     * @return boolean +
41     */ +
42    public function validate($value) +
43    { +
44        if ( ! isset($this->args)) { +
45           return true; +
46        } +
47        if (is_array($this->args)) { +
48            foreach ($this->args as $regexp) { +
49                if ( ! preg_match($regexp, $value)) { +
50                    return false; +
51                } +
52            } +
53            return true; +
54        } else { +
55            if (preg_match($this->args, $value)) { +
56                return true; +
57            } +
58        } +
59 +
60        return false; +
61    } +
62}
\ No newline at end of file diff --git a/tests/coverage/Doctrine_Validator_Unique.html b/tests/coverage/Doctrine_Validator_Unique.html new file mode 100644 index 000000000..5067b8e6d --- /dev/null +++ b/tests/coverage/Doctrine_Validator_Unique.html @@ -0,0 +1,224 @@ + + + Coverage for Doctrine_Validator_Unique + + +

Coverage for Doctrine_Validator_Unique

Back to coverage report

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
1<?php +
2/* +
3 *  $Id: Unique.php 2702 2007-10-03 21:43:22Z Jonathan.Wage $ +
4 * +
5 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +
6 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +
7 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +
8 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +
9 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +
10 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +
11 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +
12 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +
13 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +
14 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +
15 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +
16 * +
17 * This software consists of voluntary contributions made by many individuals +
18 * and is licensed under the LGPL. For more information, see +
19 * <http://www.phpdoctrine.com>. +
20 */ +
21 +
22/** +
23 * Doctrine_Validator_Unique +
24 * +
25 * @package     Doctrine +
26 * @subpackage  Validator +
27 * @license     http://www.opensource.org/licenses/lgpl-license.php LGPL +
28 * @link        www.phpdoctrine.com +
29 * @since       1.0 +
30 * @version     $Revision: 2702 $ +
31 * @author      Konsta Vesterinen <kvesteri@cc.hut.fi> +
32 */ +
33class Doctrine_Validator_Unique +
34{ +
35    /** +
36     * checks if given value is unique +
37     * +
38     * @param mixed $value +
39     * @return boolean +
40     */ +
41    public function validate($value) +
42    { +
43        $table = $this->invoker->getTable(); +
44        $pks = $table->getIdentifier(); +
45 +
46        if ( is_array($pks) ) { +
47            $pks = join(',', $pks); +
48        } +
49 +
50        $sql   = 'SELECT ' . $pks . ' FROM ' . $table->getTableName() . ' WHERE ' . $this->field . ' = ?'; +
51         +
52        $values = array(); +
53        $values[] = $value; +
54         +
55        // If the record is not new we need to add primary key checks because its ok if the  +
56        // unique value already exists in the database IF the record in the database is the same +
57        // as the one that is validated here. +
58        $state = $this->invoker->state(); +
59        if ( ! ($state == Doctrine_Record::STATE_TDIRTY || $state == Doctrine_Record::STATE_TCLEAN)) { +
60            foreach ((array) $table->getIdentifier() as $pk) { +
61                $sql .= " AND {$pk} != ?"; +
62                $values[] = $this->invoker->$pk; +
63            } +
64        } +
65         +
66        $stmt  = $table->getConnection()->getDbh()->prepare($sql); +
67        $stmt->execute($values); +
68 +
69        return ( ! is_array($stmt->fetch())); +
70    } +
71}
\ No newline at end of file diff --git a/tests/coverage/Doctrine_Validator_Unsigned.html b/tests/coverage/Doctrine_Validator_Unsigned.html new file mode 100644 index 000000000..3adacd1d5 --- /dev/null +++ b/tests/coverage/Doctrine_Validator_Unsigned.html @@ -0,0 +1,161 @@ + + + Coverage for Doctrine_Validator_Unsigned + + +

Coverage for Doctrine_Validator_Unsigned

Back to coverage report

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
1<?php +
2/* +
3 *  $Id: Enum.php 1080 2007-02-10 18:17:08Z romanb $ +
4 * +
5 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +
6 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +
7 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +
8 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +
9 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +
10 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +
11 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +
12 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +
13 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +
14 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +
15 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +
16 * +
17 * This software consists of voluntary contributions made by many individuals +
18 * and is licensed under the LGPL. For more information, see +
19 * <http://www.phpdoctrine.com>. +
20 */ +
21 +
22/** +
23 * Doctrine_Validator_Unsigned +
24 * +
25 * @package     Doctrine +
26 * @subpackage  Validator +
27 * @license     http://www.opensource.org/licenses/lgpl-license.php LGPL +
28 * @link        www.phpdoctrine.com +
29 * @since       1.0 +
30 * @version     $Revision: 1080 $ +
31 * @author      Konsta Vesterinen <kvesteri@cc.hut.fi> +
32 */ +
33class Doctrine_Validator_Unsigned +
34{ +
35    /** +
36     * checks if given value is a valid unsigned integer +
37     * +
38     * @param mixed $value +
39     * @return boolean +
40     */ +
41    public function validate($value) +
42    { +
43        $int = (int) $value; +
44 +
45        if ($int != $value || $int < 0) { +
46            return false; +
47        } +
48        return true; +
49    } +
50}
\ No newline at end of file diff --git a/tests/coverage/Doctrine_Validator_Usstate.html b/tests/coverage/Doctrine_Validator_Usstate.html new file mode 100644 index 000000000..ccdd92a08 --- /dev/null +++ b/tests/coverage/Doctrine_Validator_Usstate.html @@ -0,0 +1,323 @@ + + + Coverage for Doctrine_Validator_Usstate + + +

Coverage for Doctrine_Validator_Usstate

Back to coverage report

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
1<?php +
2/* +
3 *  $Id: Usstate.php 2702 2007-10-03 21:43:22Z Jonathan.Wage $ +
4 * +
5 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +
6 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +
7 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +
8 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +
9 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +
10 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +
11 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +
12 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +
13 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +
14 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +
15 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +
16 * +
17 * This software consists of voluntary contributions made by many individuals +
18 * and is licensed under the LGPL. For more information, see +
19 * <http://www.phpdoctrine.com>. +
20 */ +
21 +
22/** +
23 * Doctrine_Validator_Usstate +
24 * +
25 * @package     Doctrine +
26 * @subpackage  Validator +
27 * @license     http://www.opensource.org/licenses/lgpl-license.php LGPL +
28 * @link        www.phpdoctrine.com +
29 * @since       1.0 +
30 * @version     $Revision: 2702 $ +
31 * @author      Konsta Vesterinen <kvesteri@cc.hut.fi> +
32 */ +
33class Doctrine_Validator_Usstate +
34{ +
35    private static $states = array( +
36                'AK' => true, +
37                'AL' => true, +
38                'AR' => true, +
39                'AZ' => true, +
40                'CA' => true, +
41                'CO' => true, +
42                'CT' => true, +
43                'DC' => true, +
44                'DE' => true, +
45                'FL' => true, +
46                'GA' => true, +
47                'HI' => true, +
48                'IA' => true, +
49                'ID' => true, +
50                'IL' => true, +
51                'IN' => true, +
52                'KS' => true, +
53                'KY' => true, +
54                'LA' => true, +
55                'MA' => true, +
56                'MD' => true, +
57                'ME' => true, +
58                'MI' => true, +
59                'MN' => true, +
60                'MO' => true, +
61                'MS' => true, +
62                'MT' => true, +
63                'NC' => true, +
64                'ND' => true, +
65                'NE' => true, +
66                'NH' => true, +
67                'NJ' => true, +
68                'NM' => true, +
69                'NV' => true, +
70                'NY' => true, +
71                'OH' => true, +
72                'OK' => true, +
73                'OR' => true, +
74                'PA' => true, +
75                'PR' => true, +
76                'RI' => true, +
77                'SC' => true, +
78                'SD' => true, +
79                'TN' => true, +
80                'TX' => true, +
81                'UT' => true, +
82                'VA' => true, +
83                'VI' => true, +
84                'VT' => true, +
85                'WA' => true, +
86                'WI' => true, +
87                'WV' => true, +
88                'WY' => true +
89            ); +
90    public function getStates() +
91    { +
92        return self::$states; +
93    } +
94    /** +
95     * checks if given value is a valid US state code +
96     * +
97     * @param string $args +
98     * @return boolean +
99     */ +
100    public function validate($value) +
101    { +
102        return isset(self::$states[$value]); +
103    } +
104}
\ No newline at end of file diff --git a/tests/coverage/Doctrine_View.html b/tests/coverage/Doctrine_View.html new file mode 100644 index 000000000..551e69042 --- /dev/null +++ b/tests/coverage/Doctrine_View.html @@ -0,0 +1,479 @@ + + + Coverage for Doctrine_View + + +

Coverage for Doctrine_View

Back to coverage report

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
1<?php +
2/* +
3 *  $Id: View.php 2703 2007-10-03 21:47:55Z Jonathan.Wage $ +
4 * +
5 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +
6 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +
7 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +
8 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +
9 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +
10 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +
11 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +
12 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +
13 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +
14 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +
15 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +
16 * +
17 * This software consists of voluntary contributions made by many individuals +
18 * and is licensed under the LGPL. For more information, see +
19 * <http://www.phpdoctrine.com>. +
20 */ +
21/** +
22 * Doctrine_View +
23 * +
24 * this class represents a database view +
25 * +
26 * @author      Konsta Vesterinen <kvesteri@cc.hut.fi> +
27 * @package     Doctrine +
28 * @subpackage  View +
29 * @license     http://www.opensource.org/licenses/lgpl-license.php LGPL +
30 * @link        www.phpdoctrine.com +
31 * @since       1.0 +
32 * @version     $Revision: 2703 $ +
33 */ +
34class Doctrine_View +
35{ +
36    /** +
37     * SQL DROP constant +
38     */ +
39    const DROP   = 'DROP VIEW %s'; +
40    /** +
41     * SQL CREATE constant +
42     */ +
43    const CREATE = 'CREATE VIEW %s AS %s'; +
44    /** +
45     * SQL SELECT constant +
46     */ +
47    const SELECT = 'SELECT * FROM %s'; +
48 +
49    /** +
50     * @var string $name                the name of the view +
51     */ +
52    protected $name; +
53    /** +
54     * @var Doctrine_Query $query       the DQL query object this view is hooked into +
55     */ +
56    protected $query; +
57    /** +
58     * @var Doctrine_Connection $conn   the connection object +
59     */ +
60    protected $conn; +
61 +
62    /** +
63     * constructor +
64     * +
65     * @param Doctrine_Query $query +
66     */ +
67    public function __construct(Doctrine_Query $query, $viewName) +
68    { +
69        $this->name  = $viewName; +
70        $this->query = $query; +
71        $this->query->setView($this); +
72        $this->conn   = $query->getConnection(); +
73    } +
74    /** +
75     * getQuery +
76     * returns the associated query object +
77     * +
78     * @return Doctrine_Query +
79     */ +
80    public function getQuery() +
81    { +
82        return $this->query; +
83    } +
84    /** +
85     * getName +
86     * returns the name of this view +
87     * +
88     * @return string +
89     */ +
90    public function getName() +
91    { +
92        return $this->name; +
93    } +
94    /** +
95     * getConnection +
96     * returns the connection object +
97     * +
98     * @return Doctrine_Connection +
99     */ +
100    public function getConnection() +
101    { +
102        return $this->conn; +
103    } +
104    /** +
105     * create +
106     * creates this view +
107     * +
108     * @throws Doctrine_View_Exception +
109     * @return void +
110     */ +
111    public function create() +
112    { +
113        $sql = sprintf(self::CREATE, $this->name, $this->query->getQuery()); +
114        try { +
115            $this->conn->execute($sql); +
116        } catch(Doctrine_Exception $e) { +
117            throw new Doctrine_View_Exception($e->__toString()); +
118        } +
119    } +
120    /** +
121     * drop +
122     * drops this view from the database +
123     * +
124     * @throws Doctrine_View_Exception +
125     * @return void +
126     */ +
127    public function drop() +
128    { +
129        try { +
130            $this->conn->execute(sprintf(self::DROP, $this->name)); +
131        } catch(Doctrine_Exception $e) { +
132            throw new Doctrine_View_Exception($e->__toString()); +
133        } +
134    } +
135    /** +
136     * execute +
137     * executes the view +
138     * returns a collection of Doctrine_Record objects +
139     * +
140     * @return Doctrine_Collection +
141     */ +
142    public function execute() +
143    { +
144        return $this->query->execute(); +
145    } +
146    /** +
147     * getSelectSql +
148     * returns the select sql for this view +
149     * +
150     * @return string +
151     */ +
152    public function getSelectSql() +
153    { +
154        return sprintf(self::SELECT, $this->name); +
155    } +
156}
\ No newline at end of file diff --git a/tests/coverage/coverage.txt b/tests/coverage/coverage.txt new file mode 100644 index 000000000..8bda77743 --- /dev/null +++ b/tests/coverage/coverage.txt @@ -0,0 +1 @@ +a:4:{s:8:"coverage";a:428:{s:67:"/home/bjartka/public_html/doctrine/lib/Doctrine/Record/Abstract.php";a:101:{i:47;i:1;i:49;i:1;i:50;i:-2;i:58;i:-1;i:59;i:-2;i:68;i:-1;i:70;i:-1;i:71;i:-2;i:84;i:1;i:85;i:-1;i:86;i:-2;i:87;i:1;i:89;i:-2;i:92;i:1;i:93;i:1;i:96;i:1;i:97;i:1;i:100;i:1;i:101;i:1;i:105;i:1;i:106;i:1;i:107;i:1;i:108;i:-2;i:109;i:1;i:110;i:1;i:111;i:1;i:112;i:1;i:113;i:1;i:114;i:1;i:115;i:1;i:128;i:-1;i:129;i:-1;i:130;i:-1;i:131;i:-1;i:132;i:-1;i:133;i:-1;i:134;i:-1;i:136;i:-1;i:137;i:-1;i:139;i:-1;i:151;i:1;i:152;i:-1;i:153;i:-1;i:154;i:-1;i:155;i:-1;i:156;i:-1;i:157;i:-1;i:159;i:-1;i:160;i:1;i:162;i:1;i:174;i:1;i:176;i:1;i:177;i:-2;i:189;i:1;i:190;i:1;i:191;i:-2;i:203;i:1;i:205;i:1;i:206;i:-2;i:218;i:1;i:220;i:1;i:221;i:-2;i:234;i:1;i:235;i:1;i:238;i:-1;i:239;i:-1;i:240;i:-1;i:241;i:-1;i:249;i:1;i:250;i:1;i:260;i:-1;i:262;i:-1;i:263;i:-2;i:274;i:1;i:275;i:1;i:276;i:1;i:277;i:1;i:278;i:1;i:280;i:1;i:281;i:-1;i:282;i:-2;i:285;i:1;i:287;i:1;i:289;i:1;i:290;i:-1;i:291;i:-2;i:292;i:1;i:294;i:1;i:296;i:1;i:297;i:1;i:298;i:1;i:300;i:1;i:301;i:-2;i:312;i:-1;i:313;i:-1;i:314;i:-1;i:315;i:-1;i:316;i:-1;i:317;i:-1;i:319;i:-1;i:320;i:-2;}s:65:"/home/bjartka/public_html/doctrine/lib/Doctrine/Record/Filter.php";a:6:{i:35;i:1;i:40;i:1;i:41;i:1;i:44;i:-1;i:45;i:-2;i:60;i:1;}s:58:"/home/bjartka/public_html/doctrine/models/FooBarRecord.php";a:3:{i:6;i:1;i:7;i:1;i:8;i:1;}s:63:"/home/bjartka/public_html/doctrine/models/FooForeignlyOwned.php";a:3:{i:6;i:1;i:7;i:1;i:8;i:1;}s:64:"/home/bjartka/public_html/doctrine/lib/Doctrine/Import/Mssql.php";a:75:{i:21;i:1;i:34;i:1;i:44;i:1;i:45;i:1;i:47;i:1;i:48;i:-2;i:57;i:1;i:58;i:1;i:59;i:1;i:61;i:1;i:62;i:-1;i:64;i:-1;i:65;i:-1;i:66;i:-1;i:67;i:-1;i:68;i:-1;i:71;i:-1;i:72;i:-1;i:73;i:-1;i:75;i:-1;i:78;i:-1;i:79;i:-1;i:80;i:-1;i:81;i:-1;i:82;i:-1;i:83;i:-1;i:84;i:-1;i:85;i:-1;i:86;i:-1;i:87;i:-1;i:88;i:-1;i:89;i:-1;i:90;i:-1;i:92;i:1;i:93;i:-2;i:103;i:-1;i:112;i:1;i:114;i:1;i:115;i:-2;i:123;i:1;i:125;i:1;i:127;i:1;i:128;i:-2;i:137;i:1;i:138;i:1;i:140;i:1;i:142;i:1;i:143;i:-2;i:152;i:-1;i:153;i:-1;i:154;i:-1;i:155;i:-1;i:156;i:-1;i:157;i:-1;i:158;i:-1;i:159;i:-1;i:160;i:-1;i:162;i:-1;i:163;i:-1;i:164;i:-1;i:165;i:-1;i:167;i:-1;i:168;i:-1;i:170;i:-1;i:172;i:-1;i:173;i:-1;i:174;i:-1;i:175;i:-1;i:176;i:-1;i:178;i:-1;i:179;i:-2;i:188;i:1;i:190;i:1;i:191;i:-2;i:192;i:1;}s:54:"/home/bjartka/public_html/doctrine/models/NestTest.php";a:13:{i:6;i:1;i:7;i:1;i:10;i:1;i:11;i:1;i:12;i:1;i:13;i:1;i:14;i:1;i:15;i:1;i:17;i:1;i:18;i:1;i:19;i:1;i:20;i:1;i:21;i:1;}s:60:"/home/bjartka/public_html/doctrine/models/Record_Country.php";a:4:{i:4;i:1;i:5;i:1;i:7;i:1;i:8;i:1;}s:68:"/home/bjartka/public_html/doctrine/lib/Doctrine/Validator/Unique.php";a:21:{i:34;i:1;i:43;i:1;i:44;i:1;i:46;i:1;i:47;i:-1;i:48;i:-1;i:50;i:1;i:52;i:1;i:53;i:1;i:58;i:1;i:59;i:1;i:60;i:1;i:61;i:1;i:62;i:1;i:63;i:1;i:64;i:1;i:66;i:1;i:67;i:1;i:69;i:1;i:70;i:-2;i:71;i:1;}s:73:"/home/bjartka/public_html/doctrine/tests/Query/ReferenceModelTestCase.php";a:44:{i:35;i:1;i:36;i:1;i:37;i:1;i:38;i:1;i:39;i:1;i:41;i:1;i:42;i:1;i:43;i:1;i:45;i:1;i:48;i:1;i:50;i:1;i:52;i:1;i:53;i:1;i:54;i:1;i:55;i:1;i:56;i:1;i:57;i:1;i:58;i:1;i:60;i:1;i:61;i:1;i:63;i:1;i:65;i:1;i:66;i:1;i:67;i:1;i:68;i:1;i:69;i:1;i:70;i:1;i:71;i:1;i:73;i:1;i:74;i:1;i:77;i:1;i:79;i:1;i:80;i:1;i:82;i:1;i:84;i:1;i:86;i:1;i:87;i:1;i:88;i:1;i:89;i:1;i:90;i:1;i:91;i:1;i:92;i:1;i:94;i:1;i:95;i:1;}s:64:"/home/bjartka/public_html/doctrine/tests/Record/HookTestCase.php";a:41:{i:36;i:1;i:39;i:1;i:41;i:1;i:42;i:1;i:46;i:1;i:48;i:1;i:49;i:1;i:51;i:1;i:52;i:1;i:53;i:1;i:54;i:1;i:55;i:1;i:59;i:1;i:60;i:1;i:62;i:1;i:63;i:1;i:65;i:1;i:66;i:1;i:67;i:1;i:68;i:1;i:69;i:1;i:73;i:1;i:74;i:1;i:76;i:1;i:78;i:1;i:79;i:1;i:80;i:1;i:84;i:1;i:85;i:1;i:86;i:1;i:87;i:1;i:89;i:1;i:90;i:1;i:92;i:1;i:93;i:1;i:96;i:1;i:97;i:1;i:98;i:1;i:99;i:1;i:100;i:-2;i:102;i:1;}s:74:"/home/bjartka/public_html/doctrine/models/NestedSetTest_SingleRootNode.php";a:3:{i:5;i:1;i:6;i:1;i:7;i:1;}s:79:"/home/bjartka/public_html/doctrine/tests/DoctrineTest/Doctrine_UnitTestCase.php";a:170:{i:61;i:-1;i:62;i:-2;i:66;i:1;i:68;i:1;i:69;i:1;i:71;i:1;i:72;i:1;i:73;i:1;i:74;i:1;i:75;i:1;i:76;i:1;i:77;i:1;i:78;i:1;i:79;i:1;i:80;i:1;i:81;i:1;i:82;i:1;i:83;i:1;i:84;i:1;i:85;i:1;i:86;i:1;i:87;i:1;i:88;i:1;i:89;i:1;i:92;i:1;i:93;i:1;i:96;i:1;i:97;i:1;i:99;i:1;i:100;i:1;i:101;i:1;i:102;i:1;i:103;i:1;i:104;i:1;i:105;i:1;i:106;i:1;i:107;i:-1;i:109;i:1;i:111;i:1;i:112;i:1;i:113;i:1;i:114;i:1;i:115;i:1;i:116;i:1;i:117;i:1;i:118;i:1;i:119;i:1;i:120;i:1;i:121;i:1;i:122;i:1;i:123;i:-1;i:124;i:1;i:125;i:1;i:128;i:1;i:129;i:1;i:131;i:1;i:132;i:1;i:133;i:1;i:135;i:1;i:137;i:1;i:138;i:1;i:139;i:1;i:140;i:1;i:141;i:1;i:142;i:1;i:145;i:1;i:147;i:1;i:148;i:1;i:150;i:1;i:152;i:1;i:155;i:1;i:156;i:1;i:158;i:1;i:160;i:1;i:162;i:1;i:163;i:1;i:164;i:1;i:165;i:1;i:166;i:1;i:167;i:1;i:169;i:1;i:170;i:1;i:171;i:1;i:172;i:1;i:173;i:1;i:174;i:-2;i:175;i:1;i:176;i:1;i:177;i:1;i:178;i:1;i:179;i:1;i:181;i:1;i:182;i:1;i:183;i:1;i:184;i:1;i:185;i:1;i:187;i:1;i:188;i:1;i:189;i:1;i:190;i:1;i:192;i:1;i:193;i:1;i:196;i:1;i:197;i:1;i:207;i:1;i:208;i:1;i:211;i:1;i:213;i:1;i:215;i:1;i:218;i:1;i:219;i:1;i:220;i:1;i:222;i:1;i:225;i:1;i:226;i:1;i:227;i:1;i:229;i:1;i:230;i:1;i:231;i:1;i:232;i:1;i:233;i:1;i:234;i:1;i:236;i:1;i:237;i:1;i:238;i:1;i:240;i:1;i:241;i:1;i:242;i:1;i:244;i:1;i:245;i:1;i:246;i:1;i:247;i:1;i:248;i:1;i:250;i:1;i:251;i:1;i:252;i:1;i:254;i:1;i:255;i:1;i:256;i:1;i:257;i:1;i:258;i:1;i:260;i:1;i:261;i:1;i:262;i:1;i:264;i:1;i:265;i:1;i:266;i:1;i:269;i:-1;i:270;i:-2;i:273;i:1;i:275;i:1;i:276;i:1;i:277;i:1;i:279;i:1;i:280;i:1;i:283;i:1;i:284;i:-2;i:287;i:-1;i:288;i:-1;i:289;i:-1;i:290;i:-1;i:291;i:-1;i:294;i:1;i:295;i:1;i:296;i:1;i:297;i:1;i:298;i:1;i:299;i:1;i:301;i:1;i:302;i:1;}s:69:"/home/bjartka/public_html/doctrine/lib/Doctrine/Expression/Driver.php";a:137:{i:0;i:1;i:21;i:1;i:33;i:1;i:37;i:1;i:38;i:-2;i:41;i:1;i:42;i:-2;i:51;i:1;i:52;i:-2;i:61;i:1;i:62;i:1;i:63;i:-2;i:76;i:1;i:77;i:1;i:78;i:-2;i:88;i:1;i:89;i:1;i:90;i:-2;i:100;i:1;i:101;i:1;i:102;i:-2;i:112;i:1;i:113;i:1;i:114;i:-2;i:127;i:-1;i:128;i:-1;i:129;i:-2;i:140;i:1;i:141;i:1;i:142;i:-2;i:153;i:1;i:155;i:1;i:156;i:-2;i:168;i:1;i:169;i:1;i:170;i:1;i:171;i:-2;i:182;i:1;i:183;i:-2;i:194;i:-1;i:195;i:-2;i:206;i:1;i:207;i:-2;i:218;i:1;i:219;i:-2;i:230;i:1;i:231;i:-2;i:242;i:1;i:243;i:-2;i:251;i:1;i:252;i:-2;i:265;i:1;i:266;i:-2;i:281;i:1;i:282;i:1;i:283;i:1;i:285;i:1;i:286;i:1;i:288;i:-2;i:299;i:1;i:301;i:1;i:302;i:-2;i:318;i:1;i:319;i:1;i:320;i:-2;i:335;i:1;i:336;i:1;i:337;i:-1;i:338;i:-2;i:339;i:1;i:340;i:-1;i:341;i:-2;i:342;i:1;i:344;i:-2;i:367;i:1;i:368;i:-2;i:392;i:1;i:393;i:-2;i:417;i:1;i:418;i:-2;i:442;i:1;i:443;i:-2;i:462;i:1;i:463;i:1;i:464;i:1;i:465;i:-2;i:484;i:1;i:485;i:1;i:486;i:1;i:487;i:-2;i:506;i:1;i:507;i:1;i:508;i:1;i:509;i:-2;i:529;i:1;i:530;i:1;i:531;i:1;i:532;i:-2;i:551;i:1;i:552;i:1;i:553;i:1;i:554;i:-2;i:574;i:1;i:575;i:1;i:576;i:1;i:577;i:-2;i:602;i:1;i:603;i:-1;i:604;i:-1;i:605;i:1;i:606;i:1;i:608;i:1;i:609;i:-1;i:610;i:-2;i:611;i:1;i:612;i:-2;i:629;i:1;i:630;i:1;i:631;i:-2;i:648;i:1;i:649;i:1;i:650;i:-2;i:676;i:1;i:677;i:1;i:678;i:1;i:679;i:1;i:680;i:-2;i:688;i:-1;i:689;i:-2;i:697;i:1;i:698;i:-2;i:706;i:1;i:707;i:1;i:708;i:-2;i:709;i:1;i:710;i:-2;i:711;i:1;}s:69:"/home/bjartka/public_html/doctrine/lib/Doctrine/Connection/Module.php";a:13:{i:33;i:1;i:49;i:1;i:50;i:1;i:51;i:1;i:52;i:1;i:54;i:1;i:56;i:1;i:57;i:1;i:66;i:1;i:67;i:-2;i:76;i:-1;i:77;i:-2;i:78;i:1;}s:52:"/home/bjartka/public_html/doctrine/models/Entity.php";a:18:{i:6;i:1;i:7;i:1;i:8;i:1;i:9;i:1;i:10;i:1;i:11;i:1;i:12;i:1;i:13;i:1;i:16;i:1;i:17;i:1;i:18;i:1;i:19;i:1;i:20;i:1;i:21;i:1;i:22;i:1;i:23;i:1;i:24;i:1;i:25;i:1;}s:69:"/home/bjartka/public_html/doctrine/tests/Connection/PgsqlTestCase.php";a:78:{i:38;i:1;i:40;i:1;i:41;i:1;i:45;i:1;i:47;i:1;i:48;i:1;i:52;i:1;i:54;i:1;i:55;i:1;i:59;i:1;i:61;i:1;i:62;i:1;i:66;i:1;i:68;i:1;i:69;i:1;i:73;i:1;i:75;i:1;i:76;i:1;i:80;i:1;i:82;i:1;i:83;i:1;i:87;i:1;i:89;i:1;i:90;i:1;i:94;i:1;i:96;i:1;i:97;i:1;i:101;i:1;i:103;i:1;i:104;i:1;i:108;i:1;i:110;i:1;i:111;i:1;i:115;i:1;i:117;i:1;i:118;i:1;i:122;i:1;i:124;i:1;i:125;i:1;i:129;i:1;i:131;i:1;i:132;i:1;i:136;i:1;i:138;i:1;i:139;i:1;i:143;i:1;i:145;i:1;i:146;i:1;i:150;i:1;i:152;i:1;i:153;i:1;i:157;i:1;i:159;i:1;i:160;i:1;i:164;i:1;i:166;i:1;i:167;i:1;i:171;i:1;i:173;i:1;i:174;i:1;i:178;i:1;i:180;i:1;i:181;i:1;i:185;i:1;i:187;i:1;i:188;i:1;i:192;i:1;i:194;i:1;i:195;i:1;i:199;i:1;i:201;i:1;i:202;i:1;i:206;i:1;i:208;i:1;i:209;i:1;i:213;i:1;i:215;i:1;i:216;i:1;}s:68:"/home/bjartka/public_html/doctrine/lib/Doctrine/Connection/Mysql.php";a:70:{i:21;i:1;i:34;i:1;i:48;i:1;i:49;i:1;i:51;i:-1;i:52;i:1;i:53;i:1;i:54;i:1;i:55;i:1;i:56;i:1;i:57;i:1;i:58;i:1;i:59;i:1;i:60;i:1;i:61;i:1;i:62;i:1;i:63;i:1;i:64;i:1;i:65;i:1;i:66;i:1;i:67;i:1;i:68;i:1;i:70;i:1;i:72;i:1;i:73;i:1;i:74;i:1;i:75;i:1;i:77;i:1;i:78;i:1;i:79;i:1;i:81;i:1;i:82;i:1;i:83;i:1;i:84;i:1;i:87;i:1;i:89;i:1;i:90;i:1;i:100;i:-1;i:101;i:-1;i:102;i:-1;i:169;i:-1;i:170;i:-1;i:171;i:-1;i:173;i:-1;i:174;i:-1;i:176;i:-1;i:177;i:-1;i:178;i:-1;i:179;i:-1;i:181;i:-1;i:183;i:-1;i:184;i:-1;i:185;i:-1;i:186;i:-1;i:187;i:-1;i:190;i:-1;i:192;i:-1;i:193;i:-1;i:194;i:-1;i:195;i:-2;i:196;i:-1;i:197;i:-1;i:198;i:-1;i:200;i:-1;i:201;i:-1;i:202;i:-2;i:203;i:-1;i:205;i:-1;i:206;i:-2;i:207;i:1;}s:70:"/home/bjartka/public_html/doctrine/tests/DataDict/FirebirdTestCase.php";a:145:{i:37;i:1;i:38;i:1;i:41;i:1;i:42;i:1;i:46;i:1;i:47;i:-1;i:48;i:1;i:49;i:1;i:51;i:1;i:54;i:1;i:56;i:1;i:57;i:1;i:58;i:1;i:59;i:1;i:60;i:1;i:63;i:1;i:65;i:1;i:66;i:1;i:67;i:1;i:68;i:1;i:69;i:1;i:72;i:1;i:74;i:1;i:75;i:1;i:76;i:1;i:77;i:1;i:78;i:1;i:81;i:1;i:83;i:1;i:84;i:1;i:85;i:1;i:86;i:1;i:87;i:1;i:90;i:1;i:92;i:1;i:93;i:1;i:94;i:1;i:95;i:1;i:96;i:1;i:98;i:1;i:100;i:1;i:101;i:1;i:102;i:1;i:103;i:1;i:104;i:1;i:107;i:1;i:109;i:1;i:110;i:1;i:111;i:1;i:112;i:1;i:113;i:1;i:116;i:1;i:118;i:1;i:119;i:1;i:120;i:1;i:121;i:1;i:122;i:1;i:125;i:1;i:127;i:1;i:128;i:1;i:129;i:1;i:130;i:1;i:131;i:1;i:134;i:1;i:136;i:1;i:137;i:1;i:138;i:1;i:139;i:1;i:140;i:1;i:143;i:1;i:145;i:1;i:146;i:1;i:147;i:1;i:148;i:1;i:149;i:1;i:152;i:1;i:154;i:1;i:155;i:1;i:156;i:1;i:157;i:1;i:158;i:1;i:161;i:1;i:163;i:1;i:164;i:1;i:165;i:1;i:166;i:1;i:167;i:1;i:170;i:1;i:172;i:1;i:173;i:1;i:174;i:1;i:175;i:1;i:176;i:1;i:179;i:1;i:181;i:1;i:182;i:1;i:183;i:1;i:184;i:1;i:185;i:1;i:188;i:1;i:190;i:1;i:192;i:1;i:194;i:1;i:196;i:1;i:198;i:1;i:199;i:1;i:203;i:1;i:205;i:1;i:206;i:1;i:209;i:1;i:211;i:1;i:212;i:1;i:215;i:1;i:217;i:1;i:218;i:1;i:221;i:1;i:223;i:1;i:224;i:1;i:227;i:1;i:229;i:1;i:230;i:1;i:233;i:1;i:235;i:1;i:236;i:1;i:239;i:1;i:241;i:1;i:242;i:1;i:245;i:1;i:247;i:1;i:248;i:1;i:251;i:1;i:253;i:1;i:254;i:1;i:257;i:1;i:259;i:1;i:260;i:1;i:263;i:1;i:265;i:1;i:266;i:1;i:269;i:1;i:271;i:1;i:272;i:1;i:275;i:1;i:277;i:1;i:278;i:1;}s:67:"/home/bjartka/public_html/doctrine/tests/Sequence/MssqlTestCase.php";a:17:{i:37;i:1;i:39;i:1;i:41;i:1;i:42;i:1;i:43;i:1;i:44;i:1;i:45;i:1;i:48;i:1;i:50;i:1;i:52;i:1;i:53;i:1;i:54;i:1;i:55;i:1;i:56;i:1;i:59;i:1;i:61;i:1;i:62;i:1;}s:73:"/home/bjartka/public_html/doctrine/tests/Relation/ManyToMany2TestCase.php";a:59:{i:37;i:1;i:41;i:1;i:42;i:1;i:43;i:1;i:47;i:1;i:48;i:1;i:49;i:1;i:51;i:1;i:52;i:1;i:53;i:1;i:54;i:1;i:55;i:1;i:56;i:1;i:58;i:1;i:60;i:1;i:61;i:1;i:62;i:1;i:63;i:1;i:64;i:1;i:65;i:1;i:67;i:1;i:68;i:1;i:69;i:1;i:70;i:-2;i:73;i:1;i:76;i:1;i:77;i:1;i:78;i:1;i:79;i:1;i:80;i:1;i:81;i:1;i:83;i:1;i:84;i:1;i:85;i:1;i:86;i:-2;i:88;i:1;i:92;i:1;i:93;i:1;i:94;i:1;i:96;i:1;i:97;i:1;i:98;i:1;i:100;i:1;i:101;i:1;i:102;i:1;i:104;i:1;i:105;i:1;i:109;i:1;i:111;i:1;i:113;i:1;i:115;i:1;i:117;i:1;i:119;i:1;i:121;i:1;i:122;i:1;i:123;i:1;i:125;i:1;i:127;i:1;i:133;i:1;}s:57:"/home/bjartka/public_html/doctrine/models/SelfRefTest.php";a:5:{i:6;i:1;i:7;i:1;i:8;i:1;i:11;i:1;i:12;i:1;}s:56:"/home/bjartka/public_html/doctrine/lib/Doctrine/Hook.php";a:70:{i:34;i:1;i:78;i:1;i:79;i:1;i:80;i:1;i:81;i:1;i:82;i:-1;i:83;i:-1;i:84;i:-1;i:87;i:1;i:88;i:1;i:96;i:1;i:97;i:-2;i:106;i:-1;i:107;i:-1;i:116;i:-1;i:117;i:-1;i:128;i:1;i:129;i:-1;i:130;i:-2;i:131;i:1;i:132;i:1;i:133;i:-1;i:134;i:-2;i:135;i:1;i:137;i:1;i:138;i:1;i:140;i:1;i:141;i:1;i:143;i:1;i:144;i:-1;i:145;i:-2;i:147;i:1;i:149;i:1;i:150;i:1;i:151;i:1;i:152;i:1;i:153;i:1;i:155;i:1;i:157;i:1;i:158;i:1;i:159;i:1;i:160;i:1;i:162;i:1;i:163;i:-2;i:174;i:1;i:175;i:-1;i:176;i:-2;i:177;i:1;i:178;i:1;i:180;i:1;i:182;i:1;i:183;i:1;i:184;i:1;i:186;i:1;i:188;i:1;i:189;i:1;i:191;i:1;i:192;i:1;i:194;i:1;i:195;i:1;i:196;i:1;i:197;i:1;i:198;i:1;i:199;i:1;i:200;i:-2;i:206;i:-1;i:207;i:-1;i:213;i:-1;i:214;i:-1;i:215;i:1;}s:72:"/home/bjartka/public_html/doctrine/tests/Connection/ProfilerTestCase.php";a:87:{i:37;i:-1;i:39;i:-1;i:41;i:1;i:45;i:1;i:47;i:1;i:49;i:1;i:51;i:1;i:53;i:1;i:54;i:1;i:55;i:1;i:56;i:1;i:58;i:1;i:59;i:1;i:64;i:1;i:65;i:1;i:67;i:1;i:68;i:1;i:69;i:1;i:70;i:1;i:72;i:1;i:74;i:1;i:75;i:1;i:76;i:1;i:77;i:1;i:79;i:1;i:80;i:1;i:85;i:1;i:86;i:1;i:87;i:1;i:88;i:1;i:89;i:1;i:91;i:1;i:92;i:1;i:93;i:1;i:94;i:1;i:95;i:1;i:107;i:1;i:112;i:1;i:113;i:1;i:114;i:1;i:115;i:1;i:116;i:1;i:118;i:-2;i:120;i:1;i:121;i:1;i:122;i:1;i:123;i:1;i:125;i:1;i:126;i:1;i:127;i:1;i:128;i:1;i:129;i:1;i:134;i:1;i:135;i:1;i:136;i:1;i:137;i:-2;i:139;i:1;i:140;i:1;i:141;i:1;i:142;i:1;i:145;i:1;i:146;i:1;i:147;i:1;i:148;i:-2;i:151;i:1;i:152;i:1;i:153;i:1;i:154;i:1;i:155;i:1;i:160;i:1;i:161;i:1;i:162;i:1;i:163;i:-2;i:165;i:1;i:166;i:1;i:167;i:1;i:168;i:1;i:171;i:1;i:172;i:1;i:173;i:1;i:174;i:-2;i:175;i:-2;i:178;i:1;i:179;i:1;i:180;i:1;i:181;i:1;i:182;i:1;}s:63:"/home/bjartka/public_html/doctrine/lib/Doctrine/Query/Check.php";a:60:{i:34;i:1;i:49;i:1;i:50;i:1;i:51;i:1;i:52;i:1;i:53;i:1;i:54;i:1;i:55;i:1;i:64;i:-1;i:65;i:-2;i:74;i:1;i:75;i:1;i:86;i:1;i:88;i:1;i:89;i:-1;i:90;i:-1;i:91;i:-1;i:92;i:-1;i:94;i:-1;i:95;i:-1;i:96;i:1;i:97;i:1;i:98;i:-1;i:99;i:-1;i:100;i:-1;i:101;i:-1;i:103;i:-1;i:104;i:-1;i:105;i:1;i:106;i:1;i:109;i:-1;i:110;i:-2;i:113;i:1;i:115;i:1;i:117;i:1;i:118;i:1;i:119;i:1;i:120;i:1;i:121;i:1;i:122;i:1;i:124;i:1;i:125;i:1;i:126;i:1;i:127;i:1;i:129;i:1;i:130;i:-2;i:133;i:1;i:134;i:1;i:135;i:1;i:137;i:1;i:139;i:1;i:140;i:1;i:141;i:-2;i:143;i:1;i:144;i:1;i:145;i:1;i:146;i:-2;i:157;i:1;i:158;i:-2;i:159;i:1;}s:56:"/home/bjartka/public_html/doctrine/models/TestRecord.php";a:2:{i:6;i:1;i:7;i:1;}s:64:"/home/bjartka/public_html/doctrine/tests/ColumnAliasTestCase.php";a:41:{i:36;i:1;i:39;i:1;i:41;i:1;i:42;i:1;i:46;i:1;i:48;i:1;i:49;i:1;i:51;i:1;i:52;i:1;i:53;i:1;i:54;i:-2;i:56;i:1;i:57;i:1;i:60;i:1;i:62;i:1;i:64;i:1;i:66;i:1;i:67;i:1;i:68;i:1;i:71;i:1;i:73;i:1;i:74;i:1;i:75;i:1;i:77;i:1;i:79;i:1;i:80;i:1;i:81;i:1;i:84;i:1;i:86;i:1;i:87;i:1;i:89;i:1;i:91;i:1;i:92;i:1;i:95;i:1;i:97;i:1;i:98;i:1;i:99;i:1;i:100;i:1;i:102;i:1;i:104;i:1;i:105;i:1;}s:76:"/home/bjartka/public_html/doctrine/lib/Doctrine/Search/Analyzer/Standard.php";a:20:{i:33;i:1;i:269;i:1;i:270;i:1;i:272;i:1;i:274;i:1;i:275;i:1;i:276;i:1;i:277;i:1;i:278;i:1;i:279;i:-2;i:280;i:1;i:282;i:1;i:283;i:1;i:284;i:-2;i:286;i:1;i:287;i:1;i:288;i:1;i:289;i:1;i:290;i:-2;i:291;i:1;}s:65:"/home/bjartka/public_html/doctrine/lib/Doctrine/Import/Schema.php";a:131:{i:41;i:1;i:47;i:1;i:48;i:-1;i:49;i:-1;i:51;i:1;i:52;i:-2;i:55;i:1;i:56;i:1;i:57;i:1;i:58;i:1;i:60;i:1;i:62;i:1;i:63;i:-2;i:77;i:1;i:78;i:1;i:79;i:1;i:81;i:1;i:83;i:1;i:85;i:1;i:86;i:1;i:87;i:-1;i:88;i:-2;i:90;i:1;i:91;i:1;i:92;i:1;i:94;i:1;i:95;i:1;i:96;i:1;i:100;i:1;i:101;i:1;i:102;i:1;i:103;i:1;i:105;i:1;i:106;i:-1;i:107;i:-1;i:109;i:1;i:110;i:-2;i:114;i:1;i:115;i:-2;i:119;i:1;i:120;i:-2;i:133;i:1;i:135;i:1;i:137;i:1;i:138;i:1;i:140;i:1;i:141;i:1;i:143;i:1;i:145;i:1;i:146;i:1;i:147;i:1;i:148;i:1;i:149;i:1;i:150;i:1;i:151;i:1;i:152;i:1;i:153;i:1;i:154;i:1;i:155;i:1;i:156;i:1;i:157;i:1;i:158;i:1;i:159;i:1;i:161;i:1;i:162;i:1;i:164;i:1;i:165;i:1;i:166;i:1;i:167;i:1;i:169;i:1;i:170;i:-1;i:171;i:-1;i:172;i:1;i:174;i:1;i:175;i:-2;i:179;i:1;i:180;i:1;i:181;i:-1;i:182;i:-2;i:184;i:1;i:185;i:1;i:187;i:1;i:189;i:-1;i:191;i:-1;i:192;i:-1;i:193;i:-1;i:195;i:-1;i:196;i:-1;i:197;i:-1;i:198;i:-1;i:201;i:-1;i:202;i:-1;i:203;i:-1;i:205;i:-1;i:206;i:-1;i:207;i:-1;i:209;i:-1;i:210;i:-1;i:211;i:-1;i:212;i:-1;i:214;i:-1;i:215;i:-1;i:216;i:1;i:218;i:1;i:219;i:1;i:224;i:1;i:225;i:-1;i:226;i:-1;i:227;i:-1;i:228;i:-2;i:230;i:-1;i:231;i:-1;i:232;i:-1;i:233;i:-1;i:234;i:-1;i:236;i:-1;i:237;i:-1;i:238;i:-1;i:239;i:-1;i:242;i:-1;i:243;i:-1;i:245;i:-1;i:246;i:-1;i:247;i:-2;i:248;i:-1;i:249;i:-1;i:251;i:-1;i:252;i:-1;i:253;i:-1;i:254;i:1;i:255;i:1;}s:51:"/home/bjartka/public_html/doctrine/models/Error.php";a:6:{i:4;i:1;i:5;i:1;i:7;i:1;i:8;i:1;i:9;i:1;i:10;i:1;}s:71:"/home/bjartka/public_html/doctrine/lib/Doctrine/Relation/ForeignKey.php";a:39:{i:21;i:1;i:34;i:1;i:46;i:1;i:47;i:1;i:48;i:1;i:49;i:1;i:50;i:1;i:51;i:1;i:52;i:1;i:53;i:1;i:54;i:1;i:55;i:1;i:57;i:1;i:58;i:1;i:59;i:1;i:60;i:1;i:62;i:1;i:63;i:1;i:66;i:1;i:68;i:1;i:70;i:1;i:71;i:1;i:73;i:1;i:74;i:1;i:75;i:1;i:76;i:1;i:78;i:1;i:80;i:1;i:81;i:-2;i:89;i:1;i:90;i:1;i:91;i:1;i:92;i:1;i:93;i:1;i:94;i:1;i:95;i:1;i:96;i:1;i:97;i:-2;i:98;i:1;}s:61:"/home/bjartka/public_html/doctrine/lib/Doctrine/Formatter.php";a:81:{i:21;i:1;i:33;i:1;i:49;i:-1;i:50;i:-1;i:52;i:-1;i:53;i:-1;i:54;i:-1;i:56;i:-1;i:57;i:-1;i:58;i:-1;i:59;i:-1;i:60;i:-1;i:61;i:-2;i:74;i:1;i:75;i:1;i:76;i:1;i:77;i:1;i:78;i:1;i:79;i:1;i:80;i:1;i:81;i:1;i:82;i:1;i:83;i:1;i:85;i:1;i:86;i:-2;i:121;i:1;i:122;i:1;i:123;i:-2;i:124;i:1;i:125;i:1;i:126;i:1;i:127;i:1;i:129;i:1;i:130;i:-2;i:141;i:1;i:142;i:1;i:143;i:1;i:145;i:1;i:146;i:1;i:147;i:1;i:148;i:1;i:149;i:1;i:150;i:1;i:151;i:1;i:152;i:1;i:153;i:1;i:154;i:1;i:155;i:1;i:156;i:1;i:157;i:1;i:158;i:1;i:159;i:1;i:160;i:1;i:161;i:1;i:162;i:1;i:163;i:1;i:164;i:1;i:166;i:1;i:167;i:-2;i:168;i:-1;i:177;i:-1;i:178;i:-1;i:180;i:-1;i:181;i:-1;i:182;i:-2;i:183;i:-1;i:184;i:-2;i:193;i:-1;i:194;i:-1;i:195;i:-1;i:196;i:-1;i:197;i:-2;i:198;i:-1;i:199;i:-2;i:208;i:1;i:209;i:1;i:210;i:-2;i:219;i:1;i:220;i:1;i:221;i:-2;i:222;i:1;}s:68:"/home/bjartka/public_html/doctrine/lib/Doctrine/Connection/Pgsql.php";a:90:{i:21;i:1;i:34;i:1;i:49;i:-1;i:50;i:1;i:51;i:1;i:52;i:1;i:53;i:1;i:54;i:1;i:55;i:1;i:56;i:1;i:57;i:1;i:58;i:1;i:59;i:1;i:60;i:1;i:61;i:1;i:62;i:1;i:63;i:1;i:64;i:1;i:65;i:1;i:66;i:1;i:67;i:1;i:70;i:1;i:71;i:1;i:72;i:1;i:73;i:1;i:75;i:1;i:76;i:1;i:77;i:1;i:78;i:1;i:79;i:1;i:89;i:-1;i:90;i:-1;i:91;i:-1;i:104;i:1;i:105;i:1;i:106;i:-1;i:107;i:-1;i:108;i:-1;i:109;i:-1;i:110;i:1;i:111;i:-1;i:112;i:-1;i:113;i:-1;i:115;i:1;i:116;i:-2;i:128;i:1;i:129;i:1;i:131;i:1;i:132;i:-1;i:133;i:-1;i:135;i:1;i:136;i:-1;i:137;i:-1;i:138;i:-1;i:139;i:-1;i:140;i:-1;i:142;i:-1;i:143;i:1;i:144;i:1;i:145;i:1;i:146;i:1;i:147;i:-1;i:148;i:-1;i:150;i:1;i:151;i:1;i:152;i:-2;i:161;i:-1;i:163;i:-1;i:165;i:-1;i:166;i:-1;i:168;i:-1;i:169;i:-1;i:170;i:-1;i:172;i:-1;i:173;i:-1;i:174;i:-1;i:175;i:-1;i:176;i:-1;i:177;i:-1;i:178;i:-1;i:180;i:-1;i:181;i:-1;i:182;i:-1;i:183;i:-1;i:184;i:-1;i:185;i:-1;i:187;i:-1;i:188;i:-1;i:189;i:-2;i:190;i:1;}s:69:"/home/bjartka/public_html/doctrine/tests/Connection/MysqlTestCase.php";a:72:{i:35;i:1;i:36;i:1;i:37;i:1;i:39;i:1;i:41;i:1;i:42;i:1;i:44;i:1;i:46;i:1;i:47;i:1;i:49;i:1;i:51;i:1;i:52;i:1;i:54;i:1;i:56;i:1;i:57;i:1;i:59;i:1;i:61;i:1;i:62;i:1;i:64;i:1;i:66;i:1;i:67;i:1;i:69;i:1;i:71;i:1;i:72;i:1;i:74;i:1;i:76;i:1;i:77;i:1;i:79;i:1;i:81;i:1;i:82;i:1;i:84;i:1;i:86;i:1;i:87;i:1;i:89;i:1;i:91;i:1;i:92;i:1;i:94;i:1;i:96;i:1;i:97;i:1;i:99;i:1;i:101;i:1;i:102;i:1;i:104;i:1;i:106;i:1;i:107;i:1;i:109;i:1;i:111;i:1;i:112;i:1;i:114;i:1;i:116;i:1;i:117;i:1;i:119;i:1;i:121;i:1;i:122;i:1;i:124;i:1;i:126;i:1;i:127;i:1;i:129;i:1;i:131;i:1;i:132;i:1;i:134;i:1;i:136;i:1;i:137;i:1;i:139;i:1;i:141;i:1;i:142;i:1;i:144;i:1;i:146;i:1;i:147;i:1;i:149;i:1;i:151;i:1;i:152;i:1;}s:69:"/home/bjartka/public_html/doctrine/lib/Doctrine/DataDict/Firebird.php";a:122:{i:21;i:1;i:33;i:1;i:59;i:1;i:60;i:-1;i:61;i:-2;i:62;i:1;i:63;i:1;i:64;i:1;i:65;i:1;i:66;i:1;i:67;i:1;i:68;i:1;i:69;i:1;i:70;i:1;i:71;i:1;i:73;i:1;i:75;i:1;i:76;i:1;i:77;i:1;i:78;i:1;i:79;i:1;i:80;i:1;i:81;i:1;i:82;i:1;i:83;i:1;i:84;i:1;i:85;i:1;i:86;i:1;i:87;i:1;i:88;i:1;i:89;i:1;i:90;i:1;i:91;i:1;i:92;i:1;i:93;i:1;i:94;i:-1;i:95;i:-1;i:96;i:-1;i:97;i:-1;i:98;i:-1;i:100;i:-1;i:101;i:-2;i:110;i:1;i:112;i:1;i:113;i:1;i:114;i:1;i:115;i:1;i:116;i:1;i:118;i:1;i:119;i:1;i:120;i:1;i:123;i:1;i:124;i:1;i:125;i:1;i:127;i:-1;i:128;i:-1;i:129;i:-1;i:130;i:-2;i:131;i:1;i:132;i:1;i:133;i:1;i:134;i:1;i:135;i:-1;i:136;i:-1;i:137;i:-1;i:138;i:-1;i:139;i:-1;i:140;i:1;i:141;i:1;i:142;i:1;i:143;i:1;i:144;i:1;i:145;i:1;i:146;i:1;i:147;i:-1;i:148;i:-1;i:149;i:-1;i:150;i:-1;i:151;i:-1;i:152;i:1;i:153;i:1;i:154;i:1;i:155;i:1;i:156;i:1;i:157;i:1;i:158;i:1;i:159;i:1;i:160;i:1;i:161;i:1;i:162;i:1;i:163;i:1;i:164;i:1;i:165;i:1;i:166;i:1;i:167;i:1;i:168;i:1;i:169;i:1;i:170;i:1;i:171;i:1;i:172;i:1;i:173;i:1;i:174;i:1;i:175;i:1;i:176;i:1;i:177;i:1;i:178;i:1;i:179;i:1;i:180;i:1;i:181;i:1;i:182;i:1;i:183;i:1;i:184;i:1;i:186;i:1;i:187;i:1;i:188;i:1;i:189;i:1;i:190;i:-2;i:201;i:1;i:202;i:-2;i:213;i:1;i:214;i:-2;i:215;i:1;}s:66:"/home/bjartka/public_html/doctrine/lib/Doctrine/Sequence/Mssql.php";a:53:{i:21;i:1;i:33;i:1;i:45;i:1;i:46;i:1;i:49;i:1;i:50;i:1;i:51;i:1;i:52;i:1;i:53;i:-1;i:58;i:1;i:60;i:1;i:61;i:-2;i:66;i:-2;i:67;i:-2;i:68;i:-2;i:76;i:-2;i:77;i:-2;i:78;i:-2;i:80;i:-2;i:81;i:-2;i:82;i:-2;i:85;i:1;i:87;i:1;i:88;i:1;i:91;i:1;i:92;i:1;i:93;i:-2;i:94;i:-2;i:95;i:-2;i:97;i:1;i:98;i:1;i:99;i:-2;i:109;i:1;i:111;i:1;i:112;i:1;i:113;i:-2;i:114;i:-2;i:115;i:-2;i:117;i:1;i:118;i:-2;i:129;i:1;i:130;i:1;i:131;i:1;i:132;i:1;i:134;i:-1;i:136;i:-1;i:137;i:1;i:140;i:1;i:141;i:-2;i:151;i:1;i:153;i:1;i:154;i:-2;i:155;i:1;}s:74:"/home/bjartka/public_html/doctrine/models/export/Cms_CateogryLanguages.php";a:14:{i:2;i:1;i:6;i:1;i:7;i:1;i:8;i:1;i:12;i:1;i:13;i:1;i:14;i:1;i:15;i:1;i:16;i:1;i:17;i:1;i:18;i:1;i:19;i:1;i:20;i:1;i:22;i:1;}s:70:"/home/bjartka/public_html/doctrine/tests/Expression/DriverTestCase.php";a:73:{i:39;i:1;i:41;i:1;i:42;i:1;i:44;i:1;i:45;i:1;i:47;i:1;i:48;i:1;i:50;i:1;i:51;i:1;i:53;i:1;i:54;i:1;i:58;i:1;i:59;i:-1;i:60;i:1;i:61;i:1;i:63;i:1;i:66;i:1;i:67;i:-1;i:68;i:1;i:69;i:1;i:71;i:1;i:76;i:1;i:77;i:1;i:83;i:1;i:84;i:1;i:86;i:1;i:87;i:1;i:89;i:1;i:90;i:1;i:92;i:1;i:93;i:1;i:95;i:1;i:96;i:1;i:98;i:1;i:99;i:1;i:101;i:1;i:103;i:1;i:104;i:1;i:110;i:1;i:112;i:1;i:113;i:1;i:115;i:1;i:116;i:1;i:118;i:1;i:119;i:1;i:121;i:1;i:122;i:1;i:124;i:1;i:125;i:1;i:127;i:1;i:128;i:1;i:135;i:1;i:136;i:1;i:138;i:1;i:139;i:1;i:141;i:1;i:142;i:1;i:144;i:1;i:145;i:1;i:147;i:1;i:148;i:1;i:150;i:1;i:151;i:1;i:157;i:1;i:158;i:1;i:160;i:1;i:161;i:1;i:163;i:1;i:164;i:1;i:166;i:1;i:167;i:1;i:169;i:1;i:170;i:1;}s:67:"/home/bjartka/public_html/doctrine/lib/Doctrine/Record/Iterator.php";a:14:{i:0;i:1;i:33;i:1;i:50;i:1;i:51;i:1;i:52;i:1;i:60;i:-1;i:61;i:-1;i:69;i:1;i:71;i:1;i:72;i:-1;i:73;i:-2;i:74;i:1;i:76;i:-2;i:77;i:1;}s:71:"/home/bjartka/public_html/doctrine/lib/Doctrine/Connection/Profiler.php";a:36:{i:0;i:1;i:21;i:1;i:33;i:1;i:56;i:1;i:65;i:-1;i:79;i:1;i:80;i:-1;i:81;i:-2;i:84;i:1;i:86;i:1;i:88;i:1;i:89;i:1;i:90;i:1;i:91;i:1;i:93;i:1;i:107;i:1;i:116;i:-1;i:117;i:-1;i:118;i:-2;i:119;i:-1;i:120;i:-2;i:129;i:-1;i:130;i:-2;i:139;i:-1;i:140;i:-2;i:148;i:-1;i:149;i:-2;i:157;i:-1;i:158;i:-2;i:167;i:1;i:168;i:-1;i:169;i:-2;i:171;i:1;i:172;i:1;i:173;i:-2;i:174;i:1;}s:69:"/home/bjartka/public_html/doctrine/tests/DataType/BooleanTestCase.php";a:58:{i:34;i:1;i:36;i:1;i:37;i:1;i:38;i:1;i:41;i:1;i:42;i:1;i:44;i:1;i:45;i:1;i:46;i:1;i:48;i:1;i:49;i:1;i:50;i:1;i:53;i:1;i:54;i:1;i:55;i:1;i:56;i:1;i:58;i:1;i:59;i:1;i:61;i:1;i:63;i:1;i:64;i:1;i:65;i:1;i:67;i:1;i:68;i:1;i:69;i:1;i:71;i:1;i:72;i:1;i:74;i:1;i:75;i:1;i:77;i:1;i:78;i:1;i:79;i:1;i:81;i:1;i:82;i:1;i:83;i:1;i:84;i:1;i:86;i:1;i:87;i:1;i:88;i:1;i:90;i:1;i:91;i:1;i:93;i:1;i:94;i:1;i:97;i:1;i:98;i:1;i:100;i:1;i:101;i:1;i:102;i:1;i:104;i:1;i:105;i:1;i:107;i:1;i:108;i:1;i:110;i:1;i:111;i:1;i:112;i:1;i:114;i:1;i:115;i:1;i:116;i:1;}s:69:"/home/bjartka/public_html/doctrine/lib/Doctrine/Validator/Usstate.php";a:6:{i:34;i:1;i:92;i:-1;i:93;i:-2;i:102;i:1;i:103;i:-2;i:104;i:1;}s:57:"/home/bjartka/public_html/doctrine/tests/HookTestCase.php";a:69:{i:38;i:1;i:40;i:1;i:42;i:1;i:43;i:1;i:44;i:1;i:48;i:1;i:50;i:1;i:52;i:1;i:53;i:1;i:54;i:1;i:58;i:1;i:60;i:1;i:62;i:1;i:63;i:1;i:64;i:1;i:68;i:1;i:70;i:1;i:72;i:1;i:73;i:1;i:74;i:1;i:78;i:1;i:80;i:1;i:82;i:1;i:83;i:1;i:85;i:1;i:86;i:1;i:90;i:1;i:92;i:1;i:93;i:1;i:95;i:1;i:96;i:1;i:97;i:1;i:98;i:1;i:102;i:1;i:104;i:1;i:106;i:1;i:107;i:1;i:108;i:1;i:109;i:1;i:113;i:1;i:115;i:1;i:117;i:1;i:119;i:1;i:120;i:1;i:124;i:1;i:126;i:1;i:128;i:1;i:129;i:1;i:130;i:1;i:134;i:1;i:136;i:1;i:138;i:1;i:139;i:1;i:140;i:1;i:144;i:1;i:146;i:1;i:148;i:1;i:149;i:1;i:150;i:1;i:154;i:1;i:156;i:1;i:158;i:1;i:159;i:1;i:160;i:1;i:164;i:1;i:166;i:1;i:168;i:1;i:169;i:1;i:170;i:1;}s:62:"/home/bjartka/public_html/doctrine/lib/Doctrine/Hook/Equal.php";a:6:{i:21;i:1;i:33;i:1;i:49;i:1;i:50;i:1;i:51;i:1;i:52;i:1;}s:54:"/home/bjartka/public_html/doctrine/models/I18nTest.php";a:5:{i:6;i:1;i:7;i:1;i:8;i:1;i:11;i:1;i:12;i:1;}s:64:"/home/bjartka/public_html/doctrine/tests/Query/CheckTestCase.php";a:18:{i:36;i:1;i:38;i:1;i:41;i:1;i:43;i:1;i:45;i:1;i:46;i:1;i:49;i:1;i:52;i:1;i:53;i:-1;i:54;i:1;i:55;i:1;i:57;i:1;i:60;i:1;i:63;i:1;i:64;i:-1;i:65;i:1;i:66;i:1;i:68;i:1;}s:60:"/home/bjartka/public_html/doctrine/models/RecordHookTest.php";a:20:{i:8;i:1;i:9;i:1;i:12;i:1;i:13;i:1;i:16;i:1;i:17;i:1;i:20;i:1;i:21;i:1;i:24;i:1;i:25;i:1;i:28;i:1;i:29;i:1;i:32;i:1;i:33;i:1;i:36;i:1;i:37;i:1;i:40;i:1;i:41;i:1;i:44;i:1;i:45;i:-2;}s:57:"/home/bjartka/public_html/doctrine/models/NotNullTest.php";a:3:{i:4;i:1;i:5;i:1;i:6;i:1;}s:64:"/home/bjartka/public_html/doctrine/lib/Doctrine/Schema/Table.php";a:19:{i:21;i:1;i:35;i:1;i:54;i:-1;i:62;i:-1;i:63;i:-2;i:69;i:-1;i:70;i:-1;i:71;i:-2;i:72;i:-1;i:73;i:-2;i:82;i:-1;i:83;i:-1;i:85;i:-1;i:86;i:-2;i:95;i:-1;i:96;i:-1;i:103;i:-1;i:104;i:-2;i:107;i:1;}s:59:"/home/bjartka/public_html/doctrine/models/ConcreteGroup.php";a:2:{i:6;i:1;i:7;i:1;}s:56:"/home/bjartka/public_html/doctrine/lib/Doctrine/Node.php";a:43:{i:32;i:1;i:69;i:1;i:70;i:1;i:74;i:1;i:75;i:1;i:76;i:1;i:77;i:-1;i:78;i:-1;i:79;i:-1;i:80;i:-1;i:81;i:-1;i:82;i:1;i:83;i:-1;i:84;i:-1;i:85;i:1;i:87;i:1;i:99;i:1;i:101;i:1;i:102;i:-1;i:103;i:-2;i:105;i:1;i:106;i:-2;i:115;i:-1;i:116;i:-1;i:125;i:-1;i:126;i:-2;i:136;i:-1;i:137;i:-2;i:147;i:-1;i:148;i:-1;i:149;i:-1;i:151;i:-1;i:152;i:-1;i:153;i:-1;i:155;i:-1;i:156;i:-1;i:158;i:-1;i:159;i:-2;i:168;i:-1;i:169;i:-1;i:178;i:-1;i:179;i:-1;i:180;i:1;}s:66:"/home/bjartka/public_html/doctrine/lib/Doctrine/Node/NestedSet.php";a:438:{i:33;i:1;i:42;i:-1;i:43;i:-2;i:52;i:-1;i:53;i:-2;i:62;i:-1;i:63;i:-2;i:72;i:-1;i:73;i:-2;i:82;i:-1;i:83;i:-1;i:84;i:-1;i:85;i:-1;i:86;i:-1;i:88;i:-1;i:89;i:-1;i:90;i:-2;i:92;i:-1;i:93;i:-1;i:94;i:-1;i:95;i:-1;i:96;i:-1;i:98;i:-1;i:99;i:-2;i:108;i:-1;i:109;i:-1;i:110;i:-1;i:111;i:-1;i:112;i:-1;i:114;i:-1;i:115;i:-1;i:116;i:-2;i:118;i:-1;i:119;i:-1;i:120;i:-1;i:121;i:-1;i:122;i:-1;i:124;i:-1;i:125;i:-2;i:134;i:-1;i:135;i:-1;i:136;i:-1;i:137;i:-1;i:138;i:-1;i:139;i:-1;i:140;i:-2;i:141;i:-1;i:142;i:-1;i:143;i:-1;i:144;i:-1;i:145;i:-2;i:154;i:-1;i:155;i:-1;i:156;i:-1;i:157;i:-1;i:158;i:-1;i:160;i:-1;i:161;i:-1;i:162;i:-2;i:164;i:-1;i:165;i:-1;i:166;i:-1;i:167;i:-1;i:168;i:-1;i:170;i:-1;i:171;i:-2;i:180;i:-1;i:181;i:-1;i:182;i:-1;i:183;i:-1;i:184;i:-1;i:186;i:-1;i:187;i:-1;i:188;i:-2;i:190;i:-1;i:191;i:-1;i:192;i:-1;i:193;i:-1;i:194;i:-1;i:196;i:-1;i:197;i:-2;i:206;i:1;i:207;i:-2;i:218;i:1;i:219;i:1;i:220;i:1;i:222;i:1;i:223;i:-1;i:224;i:-1;i:225;i:1;i:228;i:1;i:229;i:1;i:230;i:1;i:232;i:1;i:233;i:1;i:235;i:1;i:236;i:-1;i:237;i:-2;i:239;i:1;i:240;i:-2;i:249;i:-1;i:250;i:-1;i:251;i:-1;i:252;i:-1;i:253;i:-1;i:254;i:-1;i:256;i:-1;i:257;i:-1;i:258;i:-2;i:260;i:-1;i:261;i:-1;i:262;i:-1;i:263;i:-1;i:264;i:-1;i:266;i:-1;i:267;i:-2;i:278;i:1;i:279;i:1;i:280;i:1;i:281;i:1;i:282;i:1;i:283;i:-1;i:284;i:-1;i:285;i:1;i:286;i:1;i:287;i:1;i:288;i:-1;i:289;i:-2;i:290;i:1;i:291;i:-2;i:302;i:-1;i:303;i:-1;i:304;i:-1;i:305;i:-1;i:306;i:-1;i:307;i:-1;i:308;i:-1;i:309;i:-1;i:311;i:-1;i:312;i:-2;i:321;i:1;i:322;i:-2;i:331;i:-1;i:332;i:-2;i:343;i:-1;i:344;i:-1;i:345;i:-2;i:347;i:-1;i:348;i:-1;i:349;i:-2;i:350;i:-1;i:351;i:-1;i:352;i:-1;i:354;i:-1;i:355;i:-1;i:357;i:-1;i:358;i:-1;i:360;i:-1;i:361;i:-2;i:372;i:-1;i:373;i:-1;i:375;i:-1;i:376;i:-1;i:377;i:-1;i:379;i:-1;i:380;i:-1;i:381;i:-1;i:386;i:-1;i:387;i:-2;i:398;i:-1;i:399;i:-1;i:401;i:-1;i:402;i:-1;i:403;i:-1;i:405;i:-1;i:406;i:-1;i:407;i:-1;i:412;i:-1;i:413;i:-2;i:424;i:-1;i:425;i:-1;i:427;i:-1;i:428;i:-1;i:429;i:-1;i:431;i:-1;i:432;i:-1;i:433;i:-1;i:438;i:-1;i:439;i:-2;i:450;i:1;i:451;i:1;i:453;i:1;i:454;i:1;i:455;i:1;i:457;i:1;i:458;i:1;i:459;i:1;i:464;i:1;i:465;i:-2;i:478;i:-1;i:481;i:-1;i:484;i:-1;i:485;i:-1;i:486;i:-1;i:487;i:-1;i:488;i:-1;i:491;i:-1;i:494;i:-1;i:495;i:-1;i:498;i:-1;i:499;i:-1;i:500;i:-1;i:503;i:-1;i:504;i:-1;i:507;i:-1;i:508;i:-1;i:509;i:-1;i:510;i:-1;i:511;i:-1;i:512;i:-1;i:513;i:-1;i:514;i:-1;i:515;i:-1;i:516;i:-1;i:517;i:-1;i:518;i:-1;i:519;i:-1;i:520;i:-1;i:521;i:-1;i:523;i:-1;i:524;i:-1;i:525;i:-1;i:527;i:-1;i:528;i:-1;i:531;i:-1;i:532;i:-1;i:533;i:-1;i:536;i:-1;i:537;i:-1;i:538;i:-1;i:539;i:-1;i:540;i:-1;i:541;i:-1;i:542;i:-1;i:543;i:-1;i:544;i:-1;i:545;i:-1;i:547;i:-1;i:548;i:-1;i:549;i:-1;i:550;i:-1;i:552;i:-1;i:560;i:-1;i:562;i:-1;i:563;i:-1;i:565;i:-1;i:566;i:-1;i:567;i:-1;i:569;i:-1;i:577;i:-1;i:579;i:-1;i:580;i:-1;i:582;i:-1;i:583;i:-1;i:584;i:-1;i:586;i:-1;i:594;i:-1;i:596;i:-1;i:597;i:-1;i:599;i:-1;i:600;i:-1;i:601;i:-1;i:603;i:-1;i:611;i:-1;i:613;i:-1;i:614;i:-1;i:616;i:-1;i:617;i:-1;i:618;i:-1;i:620;i:-1;i:630;i:-1;i:631;i:-1;i:632;i:-2;i:634;i:-1;i:635;i:-1;i:636;i:-1;i:637;i:-1;i:640;i:-1;i:641;i:-1;i:644;i:-1;i:645;i:-1;i:646;i:-1;i:649;i:-1;i:650;i:-1;i:651;i:-1;i:652;i:-1;i:655;i:-1;i:656;i:-1;i:657;i:-1;i:658;i:-1;i:659;i:-1;i:660;i:-1;i:661;i:-1;i:662;i:-1;i:663;i:-1;i:664;i:-1;i:665;i:-1;i:666;i:-1;i:667;i:-1;i:668;i:-1;i:670;i:-1;i:672;i:-1;i:673;i:-2;i:674;i:-2;i:676;i:-1;i:684;i:-1;i:685;i:-1;i:694;i:-1;i:695;i:-2;i:704;i:-1;i:705;i:-2;i:714;i:-1;i:715;i:-1;i:716;i:-1;i:717;i:-1;i:718;i:-2;i:727;i:-1;i:728;i:-1;i:729;i:-1;i:730;i:-2;i:739;i:-1;i:740;i:-1;i:741;i:-1;i:742;i:-2;i:751;i:1;i:752;i:1;i:753;i:-1;i:754;i:-1;i:755;i:-2;i:756;i:-1;i:758;i:-2;i:767;i:-1;i:768;i:-1;i:770;i:-1;i:771;i:-1;i:773;i:-1;i:775;i:-1;i:777;i:-1;i:779;i:-1;i:781;i:-1;i:782;i:-1;i:783;i:-1;i:785;i:-1;i:786;i:-2;i:796;i:1;i:797;i:1;i:798;i:1;i:799;i:1;i:800;i:1;i:810;i:-1;i:811;i:-1;i:812;i:-1;i:813;i:-1;i:815;i:-1;i:818;i:-1;i:820;i:-1;i:821;i:-1;i:822;i:-1;i:823;i:-1;i:826;i:-1;i:827;i:-1;i:828;i:-1;i:829;i:-1;i:830;i:-1;i:831;i:-1;i:832;i:-1;i:835;i:-1;i:838;i:-1;i:840;i:-1;i:841;i:-1;i:842;i:-1;i:852;i:1;i:853;i:1;i:856;i:1;i:857;i:1;i:858;i:1;i:859;i:1;i:861;i:1;i:863;i:1;i:866;i:1;i:867;i:1;i:868;i:1;i:870;i:1;i:872;i:1;i:873;i:1;i:885;i:-1;i:886;i:-1;i:889;i:-1;i:890;i:-1;i:891;i:-1;i:892;i:-1;i:894;i:-1;i:896;i:-1;i:899;i:-1;i:900;i:-1;i:901;i:-1;i:903;i:-1;i:905;i:-1;i:906;i:-1;i:915;i:1;i:916;i:-2;i:925;i:1;i:926;i:1;i:935;i:1;i:936;i:-2;i:945;i:1;i:946;i:1;i:955;i:-1;i:956;i:-1;i:957;i:-1;i:958;i:-1;i:959;i:-1;i:961;i:-1;i:963;i:-1;i:965;i:-1;i:966;i:-1;i:967;i:-1;i:968;i:-2;i:976;i:1;i:977;i:-1;i:978;i:-2;i:979;i:1;i:980;i:-2;i:989;i:1;i:990;i:-1;i:991;i:-1;i:992;i:1;i:993;i:1;}s:56:"/home/bjartka/public_html/doctrine/models/SearchTest.php";a:7:{i:6;i:1;i:7;i:1;i:8;i:1;i:11;i:1;i:12;i:1;i:14;i:1;i:15;i:1;}s:66:"/home/bjartka/public_html/doctrine/tests/Import/SchemaTestCase.php";a:11:{i:37;i:1;i:38;i:1;i:40;i:1;i:41;i:-1;i:42;i:-1;i:43;i:1;i:46;i:1;i:47;i:-1;i:48;i:-1;i:49;i:1;i:51;i:1;}s:51:"/home/bjartka/public_html/doctrine/tests/schema.yml";a:2:{i:25;i:1;i:29;i:1;}s:65:"/home/bjartka/public_html/doctrine/lib/Doctrine/Query/Groupby.php";a:18:{i:21;i:1;i:33;i:1;i:44;i:1;i:45;i:1;i:46;i:1;i:47;i:1;i:49;i:1;i:50;i:1;i:51;i:1;i:52;i:1;i:54;i:1;i:55;i:1;i:56;i:-1;i:57;i:-1;i:59;i:1;i:60;i:1;i:61;i:-2;i:62;i:1;}s:68:"/home/bjartka/public_html/doctrine/lib/Doctrine/Transaction/Mock.php";a:3:{i:21;i:1;i:35;i:1;i:36;i:1;}s:65:"/home/bjartka/public_html/doctrine/models/export/Cms_Cateogry.php";a:13:{i:2;i:1;i:7;i:1;i:8;i:1;i:12;i:1;i:13;i:1;i:14;i:1;i:15;i:1;i:16;i:1;i:17;i:1;i:18;i:1;i:19;i:1;i:20;i:1;i:22;i:1;}s:65:"/home/bjartka/public_html/doctrine/tests/Import/MssqlTestCase.php";a:19:{i:37;i:1;i:39;i:1;i:40;i:1;i:43;i:1;i:44;i:1;i:46;i:1;i:47;i:1;i:50;i:1;i:52;i:1;i:53;i:1;i:56;i:1;i:58;i:1;i:59;i:1;i:62;i:1;i:64;i:1;i:65;i:1;i:68;i:1;i:70;i:1;i:71;i:1;}s:65:"/home/bjartka/public_html/doctrine/lib/Doctrine/Hydrate/Array.php";a:30:{i:35;i:1;i:38;i:1;i:39;i:-2;i:42;i:1;i:43;i:-2;i:46;i:-1;i:47;i:-2;i:51;i:1;i:54;i:1;i:55;i:1;i:56;i:1;i:57;i:1;i:58;i:-2;i:61;i:1;i:62;i:-2;i:65;i:1;i:66;i:1;i:67;i:1;i:68;i:1;i:69;i:1;i:70;i:1;i:71;i:1;i:72;i:1;i:73;i:1;i:74;i:-2;i:75;i:1;i:76;i:1;i:77;i:-2;i:81;i:1;i:82;i:1;}s:61:"/home/bjartka/public_html/doctrine/models/QueryTest_Board.php";a:12:{i:9;i:1;i:10;i:1;i:11;i:1;i:12;i:1;i:13;i:1;i:14;i:1;i:15;i:1;i:16;i:1;i:17;i:1;i:24;i:1;i:25;i:1;i:26;i:1;}s:75:"/home/bjartka/public_html/doctrine/tests/Query/OneToOneFetchingTestCase.php";a:125:{i:36;i:1;i:39;i:1;i:40;i:1;i:41;i:1;i:42;i:1;i:43;i:1;i:44;i:1;i:45;i:1;i:48;i:1;i:50;i:1;i:52;i:1;i:53;i:1;i:54;i:1;i:55;i:1;i:56;i:1;i:58;i:1;i:59;i:1;i:60;i:1;i:61;i:1;i:62;i:1;i:64;i:1;i:65;i:1;i:66;i:1;i:68;i:1;i:69;i:1;i:70;i:1;i:71;i:1;i:74;i:1;i:75;i:1;i:77;i:1;i:78;i:1;i:79;i:1;i:80;i:1;i:81;i:1;i:84;i:1;i:85;i:1;i:87;i:1;i:102;i:1;i:104;i:1;i:105;i:1;i:106;i:1;i:107;i:1;i:108;i:1;i:109;i:1;i:110;i:1;i:115;i:1;i:116;i:1;i:117;i:1;i:120;i:1;i:122;i:1;i:126;i:1;i:127;i:1;i:131;i:1;i:132;i:1;i:136;i:1;i:137;i:1;i:138;i:1;i:140;i:1;i:141;i:-2;i:143;i:1;i:153;i:1;i:154;i:1;i:155;i:1;i:156;i:1;i:158;i:1;i:160;i:1;i:161;i:1;i:162;i:1;i:163;i:1;i:164;i:1;i:165;i:1;i:166;i:1;i:170;i:1;i:171;i:1;i:172;i:1;i:175;i:1;i:177;i:1;i:179;i:1;i:180;i:-2;i:183;i:1;i:184;i:1;i:185;i:1;i:191;i:1;i:193;i:1;i:194;i:1;i:195;i:1;i:196;i:1;i:197;i:1;i:198;i:1;i:199;i:1;i:202;i:1;i:203;i:1;i:206;i:1;i:208;i:1;i:209;i:1;i:211;i:1;i:212;i:1;i:214;i:1;i:215;i:1;i:216;i:1;i:218;i:1;i:219;i:-2;i:221;i:1;i:230;i:1;i:231;i:1;i:232;i:1;i:233;i:1;i:235;i:1;i:237;i:1;i:238;i:1;i:239;i:1;i:240;i:1;i:241;i:1;i:242;i:1;i:243;i:1;i:246;i:1;i:247;i:1;i:248;i:1;i:251;i:1;i:253;i:1;i:255;i:1;i:256;i:-2;i:257;i:-2;i:260;i:1;i:262;i:1;}s:66:"/home/bjartka/public_html/doctrine/tests/Record/FilterTestCase.php";a:34:{i:36;i:1;i:39;i:1;i:41;i:1;i:42;i:1;i:45;i:1;i:48;i:1;i:50;i:-1;i:51;i:1;i:52;i:1;i:54;i:1;i:58;i:1;i:61;i:1;i:63;i:-1;i:64;i:1;i:65;i:1;i:67;i:1;i:71;i:1;i:74;i:1;i:75;i:1;i:77;i:1;i:79;i:1;i:80;i:1;i:81;i:1;i:82;i:1;i:83;i:-2;i:85;i:1;i:91;i:1;i:92;i:1;i:95;i:1;i:97;i:1;i:98;i:1;i:104;i:1;i:105;i:1;i:106;i:1;}s:60:"/home/bjartka/public_html/doctrine/lib/Doctrine/Relation.php";a:72:{i:33;i:1;i:121;i:1;i:122;i:1;i:123;i:1;i:124;i:-1;i:125;i:-2;i:126;i:1;i:127;i:1;i:128;i:1;i:129;i:1;i:131;i:1;i:133;i:1;i:134;i:1;i:143;i:1;i:144;i:1;i:145;i:1;i:146;i:-2;i:149;i:-1;i:150;i:-2;i:154;i:-1;i:155;i:-2;i:158;i:1;i:159;i:-2;i:163;i:-1;i:164;i:-2;i:168;i:-1;i:169;i:-1;i:170;i:-2;i:172;i:-1;i:173;i:-2;i:177;i:-1;i:178;i:-1;i:179;i:-1;i:180;i:-1;i:184;i:-1;i:185;i:-1;i:193;i:1;i:194;i:-2;i:203;i:1;i:204;i:-2;i:214;i:1;i:215;i:-2;i:224;i:1;i:225;i:1;i:226;i:1;i:227;i:-2;i:236;i:1;i:237;i:-2;i:247;i:1;i:248;i:-2;i:257;i:1;i:258;i:1;i:259;i:-2;i:268;i:1;i:269;i:1;i:270;i:-2;i:279;i:1;i:282;i:1;i:283;i:1;i:285;i:1;i:286;i:-2;i:303;i:-1;i:304;i:-1;i:305;i:-1;i:306;i:-1;i:307;i:-1;i:308;i:-1;i:309;i:-1;i:310;i:-1;i:311;i:-1;i:312;i:-2;i:313;i:1;}s:53:"/home/bjartka/public_html/doctrine/models/Element.php";a:6:{i:4;i:1;i:5;i:1;i:6;i:1;i:8;i:1;i:9;i:1;i:10;i:1;}s:67:"/home/bjartka/public_html/doctrine/lib/Doctrine/Sequence/Sqlite.php";a:29:{i:21;i:1;i:33;i:1;i:45;i:1;i:46;i:1;i:48;i:1;i:52;i:1;i:54;i:1;i:55;i:-2;i:61;i:-2;i:62;i:-2;i:63;i:-2;i:66;i:-2;i:67;i:-2;i:68;i:-2;i:71;i:1;i:73;i:1;i:74;i:1;i:76;i:1;i:81;i:1;i:82;i:1;i:83;i:-2;i:94;i:1;i:95;i:-2;i:105;i:1;i:106;i:1;i:108;i:1;i:110;i:1;i:111;i:-2;i:112;i:1;}s:67:"/home/bjartka/public_html/doctrine/lib/Doctrine/Sequence/Oracle.php";a:26:{i:21;i:1;i:33;i:1;i:45;i:1;i:46;i:1;i:49;i:1;i:50;i:1;i:51;i:-2;i:54;i:-2;i:55;i:-2;i:56;i:-2;i:58;i:-2;i:59;i:-2;i:60;i:-2;i:62;i:1;i:63;i:-2;i:73;i:1;i:74;i:1;i:76;i:1;i:77;i:-2;i:87;i:1;i:88;i:1;i:89;i:1;i:90;i:1;i:92;i:1;i:93;i:-2;i:94;i:1;}s:66:"/home/bjartka/public_html/doctrine/tests/Relation/NestTestCase.php";a:120:{i:36;i:1;i:39;i:1;i:41;i:1;i:42;i:1;i:45;i:1;i:46;i:1;i:48;i:1;i:49;i:1;i:51;i:1;i:52;i:1;i:54;i:1;i:55;i:1;i:57;i:1;i:58;i:1;i:60;i:1;i:61;i:1;i:63;i:1;i:64;i:1;i:66;i:1;i:67;i:1;i:69;i:1;i:70;i:1;i:72;i:1;i:73;i:1;i:75;i:1;i:77;i:1;i:79;i:1;i:80;i:1;i:83;i:1;i:85;i:1;i:86;i:1;i:88;i:1;i:89;i:1;i:91;i:1;i:92;i:1;i:94;i:1;i:95;i:1;i:96;i:1;i:98;i:1;i:99;i:1;i:100;i:1;i:102;i:1;i:103;i:1;i:105;i:1;i:107;i:1;i:109;i:1;i:118;i:1;i:120;i:1;i:122;i:1;i:124;i:1;i:126;i:1;i:127;i:1;i:131;i:1;i:133;i:1;i:134;i:1;i:136;i:1;i:137;i:1;i:139;i:1;i:141;i:1;i:142;i:1;i:144;i:1;i:146;i:1;i:147;i:1;i:149;i:1;i:150;i:1;i:151;i:1;i:153;i:1;i:155;i:1;i:157;i:1;i:159;i:1;i:161;i:1;i:162;i:1;i:165;i:1;i:167;i:1;i:169;i:1;i:171;i:1;i:172;i:1;i:173;i:1;i:177;i:1;i:178;i:1;i:179;i:1;i:180;i:1;i:181;i:1;i:182;i:1;i:183;i:1;i:184;i:1;i:185;i:1;i:186;i:1;i:187;i:1;i:189;i:1;i:190;i:1;i:194;i:1;i:196;i:1;i:197;i:1;i:198;i:1;i:199;i:1;i:201;i:1;i:202;i:1;i:205;i:1;i:207;i:1;i:208;i:1;i:211;i:1;i:213;i:1;i:215;i:1;i:217;i:1;i:219;i:1;i:220;i:1;i:223;i:1;i:225;i:1;i:227;i:1;i:229;i:1;i:231;i:1;i:232;i:1;i:236;i:1;i:238;i:1;i:240;i:1;i:242;i:1;i:244;i:1;i:246;i:1;i:247;i:1;}s:71:"/home/bjartka/public_html/doctrine/lib/Doctrine/Validator/Exception.php";a:24:{i:21;i:1;i:33;i:1;i:44;i:1;i:45;i:1;i:46;i:1;i:50;i:1;i:51;i:-2;i:55;i:-1;i:56;i:-2;i:60;i:1;i:61;i:-2;i:70;i:-1;i:71;i:-2;i:78;i:1;i:79;i:1;i:80;i:1;i:81;i:1;i:82;i:1;i:83;i:-2;i:94;i:-1;i:95;i:-1;i:96;i:-1;i:97;i:-1;i:98;i:1;}s:54:"/home/bjartka/public_html/doctrine/models/Phototag.php";a:3:{i:4;i:1;i:5;i:1;i:6;i:1;}s:67:"/home/bjartka/public_html/doctrine/lib/Doctrine/Table/Exception.php";a:5:{i:21;i:1;i:34;i:1;i:39;i:1;i:40;i:1;i:41;i:1;}s:56:"/home/bjartka/public_html/doctrine/lib/Doctrine/Tree.php";a:29:{i:33;i:1;i:54;i:1;i:55;i:1;i:56;i:1;i:57;i:1;i:58;i:1;i:59;i:-1;i:60;i:-1;i:61;i:-1;i:62;i:-1;i:63;i:-1;i:64;i:-1;i:66;i:1;i:75;i:-1;i:76;i:-2;i:84;i:1;i:97;i:1;i:98;i:1;i:99;i:-1;i:100;i:-2;i:101;i:1;i:102;i:-2;i:110;i:1;i:111;i:-2;i:120;i:-1;i:121;i:-1;i:128;i:1;i:129;i:-2;i:130;i:1;}s:66:"/home/bjartka/public_html/doctrine/lib/Doctrine/Tree/NestedSet.php";a:115:{i:32;i:1;i:46;i:1;i:47;i:1;i:48;i:1;i:50;i:1;i:51;i:1;i:60;i:1;i:61;i:-1;i:62;i:-1;i:64;i:1;i:65;i:1;i:66;i:1;i:67;i:1;i:76;i:1;i:77;i:-1;i:78;i:-1;i:81;i:1;i:82;i:-1;i:83;i:-1;i:85;i:1;i:86;i:1;i:87;i:1;i:89;i:1;i:91;i:1;i:92;i:-2;i:102;i:-1;i:103;i:-2;i:112;i:1;i:113;i:1;i:116;i:1;i:117;i:1;i:119;i:1;i:120;i:-1;i:121;i:-2;i:123;i:1;i:124;i:1;i:125;i:1;i:126;i:1;i:127;i:-1;i:128;i:-1;i:129;i:-1;i:130;i:-1;i:133;i:1;i:134;i:-2;i:145;i:-1;i:147;i:-1;i:150;i:-1;i:151;i:-1;i:152;i:-1;i:153;i:-1;i:154;i:-1;i:155;i:-1;i:158;i:-1;i:159;i:-1;i:161;i:-1;i:162;i:-1;i:163;i:-2;i:165;i:-1;i:166;i:-2;i:178;i:-1;i:179;i:-1;i:181;i:-1;i:182;i:-2;i:185;i:-1;i:186;i:-1;i:187;i:-1;i:188;i:-1;i:189;i:-1;i:190;i:-1;i:191;i:-2;i:201;i:-1;i:202;i:-1;i:203;i:-1;i:204;i:-2;i:213;i:-1;i:214;i:-2;i:223;i:-1;i:224;i:-1;i:229;i:-1;i:231;i:-1;i:233;i:-1;i:235;i:-1;i:237;i:-1;i:238;i:-2;i:249;i:1;i:250;i:-1;i:251;i:-1;i:252;i:-1;i:253;i:-1;i:254;i:-1;i:256;i:-1;i:258;i:1;i:259;i:-2;i:269;i:1;i:270;i:1;i:271;i:1;i:272;i:1;i:273;i:-2;i:281;i:1;i:282;i:-2;i:290;i:1;i:291;i:1;i:292;i:1;i:293;i:1;i:294;i:-2;i:303;i:-1;i:304;i:-1;i:305;i:-1;i:306;i:-1;i:307;i:-1;i:308;i:-1;i:309;i:-1;i:317;i:-1;i:318;i:-1;i:355;i:1;}s:67:"/home/bjartka/public_html/doctrine/lib/Doctrine/Cache/Interface.php";a:2:{i:33;i:1;i:74;i:1;}s:64:"/home/bjartka/public_html/doctrine/lib/Doctrine/Configurable.php";a:145:{i:71;i:1;i:72;i:-1;i:74;i:-1;i:75;i:-1;i:76;i:-1;i:77;i:-1;i:78;i:-1;i:80;i:-1;i:82;i:1;i:83;i:-1;i:84;i:1;i:85;i:1;i:86;i:1;i:87;i:1;i:88;i:1;i:89;i:-1;i:90;i:-2;i:91;i:1;i:92;i:-1;i:93;i:-2;i:94;i:1;i:95;i:1;i:96;i:1;i:97;i:1;i:98;i:-1;i:99;i:-2;i:100;i:1;i:101;i:1;i:102;i:1;i:103;i:1;i:104;i:1;i:105;i:1;i:106;i:1;i:107;i:1;i:108;i:1;i:109;i:1;i:110;i:1;i:111;i:1;i:112;i:1;i:113;i:1;i:114;i:1;i:116;i:1;i:117;i:1;i:118;i:1;i:119;i:-1;i:120;i:-2;i:121;i:1;i:122;i:1;i:123;i:-1;i:124;i:-1;i:125;i:-1;i:126;i:1;i:127;i:1;i:128;i:1;i:129;i:-1;i:130;i:-1;i:131;i:-2;i:132;i:1;i:133;i:-1;i:134;i:-1;i:135;i:-1;i:137;i:1;i:139;i:1;i:152;i:1;i:154;i:1;i:155;i:-2;i:164;i:1;i:165;i:1;i:166;i:1;i:167;i:-2;i:168;i:1;i:169;i:-2;i:170;i:1;i:171;i:-2;i:179;i:1;i:180;i:-1;i:181;i:-2;i:183;i:1;i:184;i:-2;i:191;i:1;i:192;i:-2;i:201;i:1;i:202;i:1;i:204;i:1;i:205;i:1;i:206;i:1;i:208;i:1;i:209;i:-2;i:217;i:1;i:218;i:1;i:219;i:1;i:220;i:-2;i:221;i:-1;i:222;i:-2;i:223;i:1;i:224;i:-2;i:233;i:-1;i:234;i:-1;i:235;i:-1;i:236;i:-1;i:237;i:-2;i:238;i:-1;i:240;i:-1;i:241;i:-2;i:250;i:1;i:251;i:1;i:253;i:1;i:254;i:1;i:255;i:1;i:257;i:1;i:258;i:-2;i:266;i:1;i:267;i:1;i:268;i:1;i:269;i:-2;i:270;i:-1;i:271;i:-2;i:272;i:1;i:273;i:-2;i:282;i:1;i:283;i:1;i:284;i:1;i:285;i:-1;i:286;i:-2;i:287;i:1;i:289;i:1;i:290;i:-2;i:299;i:1;i:301;i:1;i:302;i:-1;i:303;i:-2;i:305;i:1;i:306;i:1;i:307;i:1;i:308;i:-2;i:309;i:1;i:310;i:-2;i:311;i:1;i:312;i:-2;i:321;i:-1;i:322;i:-2;i:332;i:1;i:333;i:1;i:342;i:1;i:343;i:-2;}s:51:"/home/bjartka/public_html/doctrine/models/Group.php";a:7:{i:13;i:1;i:14;i:1;i:15;i:1;i:16;i:1;i:17;i:1;i:18;i:1;i:19;i:1;}s:57:"/home/bjartka/public_html/doctrine/models/Phonenumber.php";a:13:{i:6;i:1;i:7;i:1;i:8;i:1;i:11;i:1;i:12;i:1;i:13;i:1;i:15;i:1;i:16;i:1;i:17;i:1;i:19;i:1;i:20;i:1;i:21;i:1;i:22;i:1;}s:72:"/home/bjartka/public_html/doctrine/lib/Doctrine/Validator/ErrorStack.php";a:24:{i:33;i:1;i:50;i:1;i:51;i:1;i:61;i:1;i:62;i:1;i:71;i:-1;i:72;i:-1;i:73;i:-1;i:74;i:-1;i:84;i:1;i:85;i:-2;i:94;i:-1;i:95;i:-1;i:104;i:-1;i:105;i:-2;i:112;i:1;i:113;i:1;i:122;i:-1;i:123;i:-2;i:131;i:1;i:132;i:-2;i:139;i:-1;i:140;i:-2;i:141;i:1;}s:64:"/home/bjartka/public_html/doctrine/tests/TransactionTestCase.php";a:136:{i:37;i:1;i:39;i:1;i:41;i:1;i:42;i:1;i:47;i:1;i:49;i:1;i:50;i:1;i:51;i:-2;i:54;i:1;i:55;i:1;i:56;i:1;i:61;i:1;i:63;i:1;i:64;i:1;i:65;i:-2;i:68;i:1;i:69;i:1;i:70;i:1;i:71;i:1;i:75;i:1;i:76;i:1;i:77;i:1;i:78;i:1;i:79;i:1;i:80;i:1;i:81;i:1;i:82;i:1;i:83;i:1;i:84;i:1;i:85;i:1;i:86;i:1;i:87;i:1;i:88;i:1;i:93;i:1;i:94;i:1;i:96;i:1;i:97;i:1;i:98;i:-2;i:101;i:1;i:102;i:1;i:103;i:1;i:104;i:1;i:105;i:1;i:107;i:1;i:108;i:1;i:109;i:1;i:114;i:1;i:115;i:-1;i:116;i:1;i:117;i:1;i:119;i:1;i:124;i:1;i:126;i:1;i:127;i:-1;i:128;i:1;i:129;i:1;i:131;i:1;i:132;i:1;i:137;i:1;i:139;i:1;i:140;i:-1;i:141;i:1;i:142;i:1;i:144;i:1;i:145;i:1;i:150;i:1;i:151;i:-1;i:152;i:1;i:153;i:1;i:155;i:1;i:160;i:1;i:161;i:-1;i:162;i:1;i:163;i:1;i:165;i:1;i:169;i:1;i:170;i:1;i:174;i:1;i:175;i:1;i:179;i:1;i:180;i:1;i:184;i:1;i:185;i:1;i:189;i:1;i:191;i:1;i:192;i:1;i:196;i:1;i:198;i:1;i:199;i:1;i:202;i:1;i:205;i:1;i:208;i:1;i:209;i:1;i:210;i:1;i:213;i:1;i:214;i:1;i:215;i:1;i:216;i:1;i:218;i:1;i:219;i:1;i:220;i:-2;i:223;i:1;i:224;i:1;i:225;i:1;i:234;i:1;i:236;i:1;i:237;i:1;i:240;i:1;i:241;i:1;i:245;i:-1;i:247;i:-1;i:248;i:-1;i:251;i:-1;i:252;i:-1;i:256;i:1;i:258;i:1;i:259;i:1;i:262;i:1;i:263;i:1;i:268;i:1;i:270;i:1;i:271;i:1;i:274;i:1;i:275;i:1;i:279;i:1;i:281;i:1;i:282;i:1;i:285;i:1;i:286;i:1;i:290;i:1;i:292;i:1;i:293;i:1;i:297;i:1;i:298;i:1;i:302;i:1;i:303;i:-2;}s:59:"/home/bjartka/public_html/doctrine/tests/ExportTestCase.php";a:24:{i:38;i:1;i:40;i:-1;i:41;i:1;i:42;i:1;i:44;i:1;i:48;i:1;i:50;i:-1;i:51;i:1;i:52;i:1;i:54;i:1;i:57;i:1;i:59;i:1;i:60;i:1;i:63;i:1;i:65;i:1;i:66;i:1;i:70;i:1;i:72;i:1;i:73;i:1;i:76;i:1;i:78;i:1;i:79;i:1;i:83;i:1;i:87;i:1;}s:60:"/home/bjartka/public_html/doctrine/models/ForeignKeyTest.php";a:14:{i:6;i:1;i:7;i:1;i:8;i:1;i:9;i:1;i:11;i:1;i:12;i:1;i:13;i:1;i:14;i:1;i:15;i:1;i:16;i:1;i:18;i:1;i:19;i:1;i:21;i:1;i:23;i:1;}s:66:"/home/bjartka/public_html/doctrine/models/MysqlIndexTestRecord.php";a:8:{i:6;i:1;i:7;i:1;i:8;i:1;i:10;i:1;i:11;i:1;i:12;i:1;i:14;i:1;i:16;i:1;}s:66:"/home/bjartka/public_html/doctrine/tests/Import/OracleTestCase.php";a:36:{i:37;i:1;i:39;i:1;i:41;i:1;i:42;i:1;i:45;i:1;i:47;i:1;i:49;i:1;i:50;i:1;i:53;i:1;i:57;i:1;i:59;i:1;i:60;i:1;i:63;i:1;i:65;i:1;i:66;i:1;i:67;i:1;i:70;i:1;i:72;i:1;i:73;i:1;i:74;i:1;i:77;i:1;i:79;i:1;i:80;i:1;i:81;i:1;i:84;i:1;i:86;i:1;i:87;i:1;i:88;i:1;i:91;i:1;i:93;i:1;i:94;i:1;i:95;i:1;i:98;i:1;i:101;i:1;i:103;i:1;i:104;i:1;}s:66:"/home/bjartka/public_html/doctrine/tests/Import/SqliteTestCase.php";a:13:{i:37;i:1;i:39;i:1;i:40;i:1;i:43;i:1;i:45;i:1;i:46;i:1;i:49;i:1;i:51;i:1;i:52;i:1;i:55;i:1;i:57;i:1;i:59;i:1;i:60;i:1;}s:59:"/home/bjartka/public_html/doctrine/tests/AccessTestCase.php";a:51:{i:36;i:1;i:40;i:1;i:41;i:1;i:42;i:1;i:47;i:1;i:50;i:1;i:52;i:1;i:53;i:1;i:55;i:1;i:56;i:1;i:58;i:1;i:60;i:1;i:62;i:1;i:63;i:1;i:65;i:1;i:67;i:1;i:68;i:1;i:72;i:1;i:73;i:1;i:75;i:1;i:76;i:1;i:78;i:1;i:80;i:1;i:81;i:1;i:83;i:1;i:84;i:1;i:85;i:1;i:86;i:1;i:87;i:1;i:91;i:1;i:92;i:1;i:94;i:1;i:96;i:1;i:98;i:1;i:100;i:1;i:101;i:1;i:103;i:1;i:104;i:1;i:105;i:1;i:106;i:1;i:107;i:1;i:110;i:1;i:111;i:1;i:113;i:1;i:114;i:1;i:116;i:1;i:118;i:1;i:120;i:1;i:122;i:1;i:123;i:1;i:124;i:1;}s:55:"/home/bjartka/public_html/doctrine/lib/Doctrine/Lib.php";a:136:{i:33;i:1;i:42;i:1;i:43;i:-1;i:44;i:-2;i:45;i:1;i:46;i:-1;i:47;i:-2;i:48;i:1;i:49;i:-1;i:50;i:-2;i:51;i:1;i:52;i:-1;i:53;i:-2;i:54;i:1;i:55;i:1;i:56;i:-2;i:57;i:-2;i:58;i:-1;i:66;i:-1;i:67;i:-1;i:68;i:-1;i:69;i:-1;i:70;i:-1;i:71;i:-1;i:72;i:-1;i:73;i:-1;i:74;i:-1;i:75;i:-2;i:88;i:-1;i:89;i:-1;i:90;i:-1;i:91;i:-1;i:92;i:-1;i:93;i:-1;i:94;i:-1;i:95;i:-1;i:97;i:-1;i:98;i:-1;i:99;i:-1;i:100;i:-1;i:101;i:-1;i:103;i:-1;i:104;i:-1;i:105;i:-1;i:106;i:-1;i:107;i:-2;i:110;i:-1;i:111;i:-2;i:130;i:-1;i:131;i:-1;i:132;i:-1;i:133;i:-1;i:134;i:-1;i:135;i:-1;i:137;i:-1;i:138;i:-1;i:139;i:-1;i:140;i:-1;i:141;i:-1;i:142;i:-1;i:143;i:-1;i:144;i:-1;i:145;i:-1;i:146;i:-1;i:147;i:-1;i:148;i:-1;i:149;i:-1;i:151;i:-1;i:152;i:-1;i:153;i:-1;i:154;i:-1;i:155;i:-2;i:156;i:-1;i:157;i:-1;i:158;i:-1;i:159;i:-1;i:160;i:-1;i:161;i:-1;i:162;i:-1;i:163;i:-1;i:164;i:-1;i:166;i:-1;i:167;i:-1;i:168;i:-1;i:169;i:-2;i:180;i:1;i:181;i:1;i:182;i:-2;i:183;i:-1;i:184;i:-1;i:185;i:-2;i:186;i:-1;i:187;i:-1;i:188;i:-2;i:189;i:-2;i:190;i:-1;i:198;i:-1;i:199;i:-1;i:200;i:-1;i:201;i:-1;i:202;i:-1;i:203;i:-1;i:205;i:-1;i:206;i:-1;i:207;i:-2;i:215;i:-1;i:216;i:-1;i:217;i:-1;i:218;i:-1;i:219;i:-1;i:220;i:-2;i:226;i:-1;i:227;i:-1;i:228;i:-1;i:229;i:-1;i:230;i:-1;i:231;i:-1;i:232;i:-1;i:233;i:-1;i:234;i:-1;i:235;i:-1;i:236;i:-1;i:237;i:-1;i:238;i:-1;i:239;i:-1;i:240;i:-1;i:241;i:-1;i:243;i:-1;i:244;i:-2;i:252;i:-1;i:253;i:-1;i:254;i:-1;i:257;i:-1;i:258;i:-1;i:259;i:-2;i:260;i:1;}s:61:"/home/bjartka/public_html/doctrine/lib/Doctrine/Query/Set.php";a:19:{i:21;i:1;i:33;i:1;i:37;i:1;i:39;i:1;i:41;i:1;i:43;i:1;i:44;i:1;i:45;i:1;i:46;i:1;i:48;i:1;i:50;i:1;i:51;i:1;i:53;i:1;i:54;i:1;i:55;i:1;i:56;i:1;i:58;i:1;i:59;i:-2;i:60;i:1;}s:66:"/home/bjartka/public_html/doctrine/lib/Doctrine/Validator/Past.php";a:32:{i:34;i:1;i:43;i:1;i:44;i:1;i:45;i:-2;i:46;i:1;i:48;i:1;i:49;i:-1;i:50;i:-2;i:52;i:1;i:53;i:-1;i:54;i:-1;i:55;i:-1;i:56;i:-1;i:57;i:-1;i:58;i:-1;i:59;i:-1;i:60;i:-1;i:61;i:-1;i:62;i:1;i:65;i:1;i:66;i:1;i:67;i:1;i:68;i:1;i:69;i:1;i:70;i:1;i:71;i:1;i:72;i:-2;i:73;i:-1;i:75;i:-2;i:76;i:1;i:78;i:-2;i:79;i:1;}s:68:"/home/bjartka/public_html/doctrine/lib/Doctrine/Expression/Mysql.php";a:34:{i:21;i:1;i:33;i:1;i:42;i:-1;i:43;i:-2;i:51;i:-1;i:52;i:-2;i:72;i:-1;i:73;i:-1;i:74;i:-1;i:75;i:-1;i:78;i:-1;i:79;i:-1;i:80;i:-1;i:82;i:-1;i:83;i:-1;i:84;i:-1;i:85;i:-1;i:86;i:-1;i:87;i:-1;i:88;i:-1;i:89;i:-1;i:90;i:-1;i:91;i:-1;i:92;i:-1;i:93;i:-1;i:94;i:-1;i:96;i:-1;i:97;i:-1;i:98;i:-1;i:99;i:-1;i:100;i:-2;i:108;i:-1;i:109;i:-2;i:110;i:1;}s:59:"/home/bjartka/public_html/doctrine/models/ZeroValueTest.php";a:11:{i:6;i:1;i:7;i:1;i:8;i:1;i:9;i:1;i:10;i:1;i:11;i:1;i:12;i:1;i:13;i:1;i:14;i:1;i:15;i:1;i:18;i:1;}s:80:"/home/bjartka/public_html/doctrine/tests/migration_classes/002_change_column.php";a:6:{i:2;i:1;i:6;i:-1;i:7;i:-1;i:11;i:-1;i:12;i:-1;i:13;i:1;}s:58:"/home/bjartka/public_html/doctrine/lib/Doctrine/Parser.php";a:21:{i:33;i:1;i:66;i:1;i:68;i:1;i:69;i:-2;i:82;i:1;i:84;i:1;i:85;i:-2;i:99;i:1;i:101;i:1;i:102;i:-2;i:116;i:1;i:117;i:1;i:118;i:-1;i:119;i:-1;i:121;i:-1;i:122;i:-1;i:124;i:1;i:125;i:1;i:127;i:1;i:128;i:-2;i:129;i:1;}s:70:"/home/bjartka/public_html/doctrine/tests/DoctrineTest/Reporter/Cli.php";a:12:{i:5;i:1;i:6;i:1;i:7;i:1;i:9;i:1;i:10;i:1;i:11;i:1;i:12;i:1;i:13;i:1;i:14;i:1;i:15;i:1;i:16;i:1;i:17;i:1;}s:58:"/home/bjartka/public_html/doctrine/lib/Doctrine/Export.php";a:338:{i:21;i:1;i:34;i:1;i:59;i:1;i:60;i:1;i:70;i:-1;i:71;i:-2;i:81;i:1;i:82;i:-2;i:92;i:1;i:93;i:1;i:104;i:1;i:105;i:-2;i:116;i:1;i:117;i:1;i:118;i:-2;i:129;i:1;i:130;i:1;i:131;i:1;i:132;i:-2;i:144;i:1;i:145;i:1;i:156;i:-1;i:157;i:-2;i:167;i:1;i:168;i:1;i:178;i:1;i:179;i:-2;i:210;i:1;i:211;i:-1;i:212;i:-2;i:214;i:1;i:215;i:-1;i:216;i:-2;i:218;i:1;i:221;i:1;i:222;i:1;i:223;i:1;i:225;i:1;i:226;i:1;i:227;i:1;i:228;i:1;i:229;i:1;i:231;i:1;i:233;i:1;i:235;i:1;i:236;i:-1;i:237;i:-1;i:239;i:1;i:243;i:1;i:245;i:1;i:247;i:-1;i:248;i:-1;i:249;i:-1;i:250;i:-1;i:251;i:-1;i:252;i:-1;i:253;i:1;i:254;i:-2;i:267;i:1;i:269;i:1;i:270;i:1;i:271;i:1;i:272;i:1;i:289;i:1;i:290;i:-2;i:308;i:-1;i:309;i:-2;i:333;i:-1;i:334;i:-2;i:358;i:1;i:359;i:1;i:360;i:1;i:362;i:1;i:363;i:1;i:364;i:1;i:365;i:-1;i:366;i:-1;i:368;i:1;i:369;i:1;i:370;i:1;i:371;i:1;i:372;i:1;i:374;i:1;i:375;i:-2;i:409;i:1;i:410;i:-2;i:422;i:-1;i:423;i:-1;i:424;i:-1;i:426;i:-1;i:427;i:-1;i:428;i:-1;i:429;i:-1;i:430;i:-1;i:431;i:-1;i:432;i:-1;i:433;i:-1;i:434;i:-1;i:436;i:-1;i:438;i:-1;i:439;i:-1;i:440;i:-1;i:441;i:-1;i:442;i:-1;i:444;i:-1;i:445;i:-2;i:455;i:1;i:457;i:1;i:459;i:1;i:460;i:-2;i:552;i:1;i:554;i:-1;i:555;i:-1;i:556;i:-1;i:557;i:-1;i:572;i:-1;i:573;i:-2;i:605;i:1;i:606;i:1;i:608;i:1;i:609;i:1;i:610;i:1;i:611;i:-2;i:647;i:1;i:649;i:1;i:650;i:1;i:652;i:1;i:653;i:1;i:655;i:1;i:657;i:1;i:658;i:1;i:660;i:1;i:661;i:1;i:663;i:1;i:665;i:1;i:666;i:1;i:667;i:-2;i:668;i:1;i:670;i:1;i:671;i:-2;i:682;i:1;i:683;i:1;i:684;i:1;i:685;i:-1;i:686;i:-1;i:688;i:-1;i:689;i:-1;i:690;i:-1;i:691;i:-1;i:692;i:-1;i:694;i:1;i:695;i:1;i:696;i:1;i:697;i:1;i:698;i:1;i:699;i:1;i:700;i:-2;i:710;i:1;i:711;i:1;i:712;i:1;i:713;i:-1;i:714;i:-1;i:715;i:1;i:716;i:-1;i:717;i:-1;i:719;i:1;i:720;i:-1;i:721;i:-1;i:723;i:1;i:725;i:1;i:726;i:-2;i:737;i:1;i:738;i:1;i:740;i:1;i:741;i:-1;i:742;i:-1;i:743;i:-1;i:744;i:-1;i:746;i:-1;i:748;i:1;i:749;i:-1;i:750;i:-2;i:752;i:1;i:754;i:1;i:756;i:1;i:757;i:-2;i:767;i:1;i:768;i:1;i:769;i:1;i:770;i:-1;i:771;i:-1;i:772;i:1;i:774;i:1;i:775;i:1;i:776;i:-2;i:793;i:-1;i:794;i:-2;i:839;i:1;i:840;i:1;i:842;i:1;i:843;i:-2;i:854;i:-1;i:855;i:-1;i:856;i:-1;i:857;i:-1;i:858;i:-1;i:859;i:-1;i:860;i:-1;i:861;i:-1;i:862;i:-2;i:875;i:1;i:877;i:1;i:878;i:1;i:879;i:1;i:880;i:1;i:881;i:1;i:882;i:1;i:883;i:-2;i:884;i:-1;i:885;i:-1;i:886;i:-1;i:887;i:-2;i:898;i:1;i:899;i:1;i:900;i:-1;i:901;i:-1;i:902;i:1;i:904;i:1;i:905;i:-1;i:906;i:-2;i:907;i:1;i:908;i:-1;i:909;i:-2;i:910;i:1;i:911;i:-1;i:912;i:-2;i:914;i:1;i:915;i:1;i:916;i:1;i:917;i:1;i:918;i:1;i:919;i:1;i:921;i:1;i:923;i:1;i:924;i:1;i:926;i:1;i:927;i:-2;i:937;i:1;i:938;i:-2;i:949;i:-1;i:950;i:-2;i:961;i:-1;i:962;i:-2;i:980;i:1;i:981;i:1;i:982;i:1;i:983;i:-1;i:986;i:1;i:987;i:1;i:999;i:1;i:1000;i:1;i:1001;i:1;i:1002;i:1;i:1003;i:1;i:1005;i:1;i:1006;i:1;i:1007;i:1;i:1008;i:1;i:1009;i:1;i:1011;i:1;i:1013;i:1;i:1016;i:1;i:1020;i:1;i:1021;i:1;i:1022;i:1;i:1025;i:1;i:1026;i:1;i:1027;i:1;i:1028;i:1;i:1030;i:1;i:1031;i:1;i:1033;i:1;i:1035;i:1;i:1037;i:1;i:1038;i:1;i:1040;i:1;i:1041;i:-2;i:1042;i:-2;i:1043;i:-2;i:1045;i:1;i:1047;i:1;i:1048;i:1;i:1049;i:1;i:1061;i:1;i:1063;i:1;i:1065;i:1;i:1066;i:1;i:1067;i:1;i:1069;i:1;i:1071;i:1;i:1073;i:1;i:1074;i:1;i:1075;i:1;i:1076;i:-1;i:1079;i:1;i:1080;i:1;i:1081;i:1;i:1082;i:1;i:1084;i:1;i:1086;i:1;i:1088;i:1;i:1089;i:-2;i:1099;i:1;i:1101;i:1;i:1102;i:1;i:1104;i:1;i:1105;i:1;i:1106;i:-2;i:1108;i:1;i:1111;i:1;i:1112;i:1;i:1114;i:1;i:1116;i:1;i:1117;i:1;i:1118;i:1;i:1120;i:1;i:1121;i:-2;i:1139;i:-1;i:1141;i:-1;i:1142;i:-2;i:1162;i:-1;i:1164;i:-1;i:1165;i:-1;i:1167;i:-2;i:1168;i:-2;i:1169;i:-2;i:1171;i:-1;i:1172;i:1;}s:63:"/home/bjartka/public_html/doctrine/lib/Doctrine/Transaction.php";a:138:{i:21;i:1;i:35;i:1;i:79;i:1;i:81;i:1;i:82;i:-2;i:92;i:1;i:93;i:1;i:94;i:1;i:95;i:-2;i:96;i:1;i:97;i:1;i:98;i:-2;i:99;i:1;i:100;i:1;i:101;i:1;i:102;i:-2;i:114;i:1;i:115;i:-1;i:116;i:-2;i:117;i:1;i:118;i:1;i:119;i:-2;i:129;i:1;i:130;i:-2;i:139;i:1;i:141;i:1;i:142;i:-2;i:158;i:1;i:160;i:1;i:162;i:1;i:163;i:1;i:165;i:1;i:167;i:1;i:169;i:1;i:170;i:1;i:171;i:1;i:173;i:1;i:174;i:1;i:175;i:1;i:176;i:1;i:178;i:1;i:180;i:1;i:182;i:1;i:183;i:1;i:184;i:-2;i:186;i:1;i:187;i:1;i:188;i:1;i:191;i:1;i:193;i:1;i:194;i:-2;i:210;i:1;i:212;i:1;i:213;i:1;i:214;i:-2;i:216;i:1;i:218;i:1;i:219;i:1;i:221;i:1;i:223;i:1;i:225;i:1;i:226;i:1;i:227;i:1;i:229;i:1;i:230;i:1;i:232;i:1;i:233;i:1;i:234;i:1;i:236;i:1;i:237;i:1;i:239;i:1;i:240;i:-2;i:243;i:1;i:244;i:1;i:245;i:1;i:246;i:1;i:248;i:1;i:250;i:1;i:251;i:1;i:252;i:1;i:253;i:1;i:254;i:1;i:256;i:1;i:258;i:1;i:261;i:1;i:262;i:-2;i:280;i:1;i:282;i:1;i:283;i:1;i:284;i:-2;i:286;i:1;i:288;i:1;i:289;i:1;i:291;i:1;i:293;i:1;i:295;i:1;i:296;i:1;i:297;i:1;i:299;i:1;i:300;i:1;i:301;i:1;i:303;i:1;i:305;i:1;i:306;i:1;i:308;i:1;i:309;i:1;i:310;i:-2;i:312;i:1;i:314;i:1;i:317;i:1;i:318;i:-2;i:329;i:1;i:330;i:-2;i:341;i:1;i:342;i:-2;i:353;i:1;i:354;i:-2;i:366;i:1;i:368;i:1;i:369;i:1;i:371;i:1;i:372;i:1;i:373;i:1;i:374;i:1;i:375;i:1;i:376;i:1;i:377;i:1;i:378;i:1;i:379;i:1;i:380;i:1;i:381;i:1;i:383;i:1;i:384;i:-2;i:410;i:1;i:411;i:-2;i:427;i:1;i:428;i:-2;i:429;i:1;}s:58:"/home/bjartka/public_html/doctrine/lib/Doctrine/Access.php";a:25:{i:0;i:1;i:46;i:1;i:47;i:1;i:48;i:1;i:50;i:1;i:51;i:-2;i:63;i:1;i:64;i:1;i:75;i:1;i:76;i:-2;i:86;i:1;i:87;i:-2;i:97;i:-1;i:98;i:-2;i:105;i:1;i:106;i:-2;i:115;i:1;i:116;i:-2;i:126;i:1;i:127;i:1;i:128;i:1;i:129;i:1;i:131;i:1;i:139;i:1;i:140;i:-2;}s:81:"/home/bjartka/public_html/doctrine/lib/Doctrine/Connection/Firebird/Exception.php";a:14:{i:21;i:1;i:35;i:1;i:123;i:-1;i:124;i:-1;i:125;i:-1;i:126;i:-1;i:127;i:-2;i:128;i:-1;i:129;i:-1;i:130;i:-1;i:131;i:-1;i:132;i:-1;i:133;i:-2;i:134;i:1;}s:55:"/home/bjartka/public_html/doctrine/models/BarRecord.php";a:5:{i:6;i:1;i:7;i:1;i:8;i:1;i:11;i:1;i:12;i:1;}s:65:"/home/bjartka/public_html/doctrine/lib/Doctrine/Import/Oracle.php";a:62:{i:21;i:1;i:31;i:1;i:40;i:1;i:41;i:-1;i:42;i:-2;i:51;i:1;i:53;i:1;i:54;i:1;i:56;i:1;i:57;i:-2;i:65;i:1;i:67;i:1;i:68;i:-2;i:78;i:-1;i:87;i:1;i:89;i:1;i:91;i:1;i:92;i:-2;i:101;i:1;i:104;i:1;i:106;i:1;i:108;i:1;i:109;i:-2;i:118;i:1;i:120;i:1;i:122;i:1;i:124;i:1;i:125;i:-1;i:126;i:-1;i:129;i:-1;i:130;i:-1;i:131;i:-1;i:132;i:-1;i:133;i:-1;i:134;i:-1;i:135;i:-1;i:136;i:-1;i:137;i:-1;i:138;i:-1;i:139;i:-1;i:140;i:-1;i:142;i:-1;i:143;i:1;i:144;i:-2;i:153;i:1;i:155;i:1;i:156;i:1;i:158;i:1;i:160;i:1;i:161;i:-2;i:170;i:1;i:171;i:1;i:172;i:-2;i:182;i:-1;i:192;i:-1;i:209;i:1;i:212;i:1;i:213;i:-2;i:222;i:1;i:223;i:1;i:224;i:-2;i:225;i:1;}s:65:"/home/bjartka/public_html/doctrine/lib/Doctrine/Import/Sqlite.php";a:87:{i:21;i:1;i:32;i:1;i:42;i:-1;i:51;i:-1;i:61;i:-1;i:70;i:1;i:71;i:1;i:73;i:1;i:74;i:1;i:75;i:-1;i:76;i:-1;i:77;i:-1;i:78;i:-1;i:79;i:1;i:80;i:1;i:81;i:1;i:82;i:1;i:83;i:-2;i:92;i:-1;i:94;i:-1;i:96;i:-1;i:97;i:-1;i:98;i:-1;i:99;i:-1;i:101;i:-1;i:102;i:-1;i:104;i:-1;i:105;i:-1;i:106;i:-1;i:107;i:-1;i:108;i:-1;i:109;i:-1;i:110;i:-1;i:111;i:-1;i:112;i:-1;i:114;i:-1;i:115;i:-1;i:116;i:-1;i:117;i:-1;i:118;i:-2;i:127;i:1;i:128;i:1;i:130;i:1;i:131;i:1;i:132;i:1;i:133;i:-1;i:134;i:-1;i:137;i:-1;i:138;i:-1;i:139;i:-1;i:140;i:-1;i:141;i:-1;i:142;i:-1;i:143;i:-1;i:144;i:-1;i:145;i:-1;i:146;i:-1;i:147;i:-1;i:148;i:-1;i:149;i:-1;i:150;i:-1;i:151;i:1;i:152;i:-2;i:161;i:1;i:162;i:1;i:163;i:-2;i:174;i:1;i:176;i:1;i:177;i:-2;i:187;i:-1;i:196;i:-1;i:197;i:-1;i:199;i:-1;i:200;i:-1;i:201;i:-1;i:202;i:-1;i:203;i:-1;i:204;i:-1;i:205;i:-1;i:206;i:-1;i:207;i:-1;i:208;i:-2;i:217;i:-1;i:226;i:-1;i:228;i:-1;i:229;i:-2;i:230;i:1;}s:70:"/home/bjartka/public_html/doctrine/tests/Hydrate/FetchModeTestCase.php";a:74:{i:38;i:1;i:40;i:1;i:42;i:1;i:44;i:1;i:46;i:1;i:47;i:1;i:50;i:1;i:52;i:1;i:54;i:1;i:56;i:1;i:58;i:1;i:59;i:1;i:62;i:1;i:64;i:1;i:66;i:1;i:68;i:1;i:70;i:1;i:71;i:1;i:72;i:1;i:75;i:1;i:77;i:1;i:79;i:1;i:81;i:1;i:82;i:1;i:83;i:1;i:86;i:1;i:88;i:1;i:90;i:1;i:92;i:1;i:93;i:1;i:94;i:1;i:98;i:1;i:100;i:1;i:101;i:1;i:102;i:1;i:104;i:1;i:106;i:1;i:107;i:1;i:108;i:1;i:109;i:1;i:110;i:1;i:112;i:1;i:113;i:1;i:115;i:1;i:116;i:1;i:120;i:1;i:122;i:1;i:123;i:1;i:124;i:1;i:126;i:1;i:127;i:1;i:128;i:1;i:129;i:1;i:130;i:1;i:132;i:1;i:133;i:1;i:137;i:1;i:139;i:1;i:140;i:1;i:141;i:1;i:143;i:1;i:144;i:1;i:145;i:1;i:148;i:1;i:149;i:1;i:153;i:1;i:154;i:1;i:155;i:1;i:156;i:1;i:158;i:1;i:159;i:1;i:160;i:1;i:161;i:1;i:162;i:1;}s:67:"/home/bjartka/public_html/doctrine/tests/Validator/PastTestCase.php";a:25:{i:37;i:1;i:38;i:1;i:39;i:1;i:44;i:1;i:48;i:1;i:51;i:1;i:52;i:1;i:53;i:1;i:56;i:1;i:57;i:1;i:58;i:1;i:61;i:1;i:62;i:1;i:64;i:1;i:65;i:1;i:69;i:1;i:71;i:1;i:72;i:1;i:73;i:1;i:75;i:1;i:76;i:1;i:78;i:1;i:79;i:1;i:81;i:1;i:82;i:1;}s:71:"/home/bjartka/public_html/doctrine/lib/Doctrine/Hook/Parser/Complex.php";a:25:{i:21;i:1;i:33;i:1;i:49;i:1;i:50;i:1;i:61;i:1;i:63;i:1;i:64;i:-1;i:65;i:-1;i:66;i:-1;i:67;i:-1;i:69;i:-1;i:70;i:-1;i:71;i:1;i:72;i:1;i:73;i:1;i:74;i:1;i:75;i:1;i:76;i:1;i:78;i:1;i:79;i:1;i:80;i:1;i:81;i:1;i:84;i:1;i:85;i:-2;i:95;i:1;}s:63:"/home/bjartka/public_html/doctrine/tests/Query/JoinTestCase.php";a:98:{i:37;i:1;i:38;i:1;i:40;i:1;i:41;i:1;i:44;i:1;i:48;i:1;i:50;i:1;i:52;i:1;i:53;i:1;i:54;i:1;i:56;i:1;i:57;i:1;i:58;i:1;i:60;i:1;i:62;i:1;i:63;i:1;i:67;i:1;i:69;i:1;i:70;i:1;i:71;i:1;i:73;i:1;i:74;i:1;i:78;i:1;i:80;i:1;i:81;i:1;i:82;i:1;i:84;i:1;i:85;i:1;i:89;i:1;i:91;i:1;i:92;i:1;i:93;i:1;i:95;i:1;i:97;i:1;i:98;i:1;i:99;i:1;i:100;i:1;i:102;i:1;i:103;i:1;i:104;i:1;i:108;i:1;i:110;i:1;i:111;i:1;i:112;i:1;i:114;i:1;i:116;i:1;i:118;i:1;i:119;i:1;i:120;i:1;i:121;i:1;i:123;i:1;i:124;i:1;i:125;i:1;i:129;i:1;i:131;i:1;i:133;i:1;i:134;i:1;i:138;i:1;i:140;i:1;i:142;i:1;i:143;i:1;i:147;i:1;i:148;i:1;i:149;i:1;i:151;i:1;i:153;i:1;i:154;i:1;i:155;i:1;i:156;i:-2;i:158;i:1;i:162;i:1;i:163;i:1;i:164;i:1;i:166;i:1;i:168;i:1;i:169;i:1;i:170;i:1;i:171;i:-2;i:173;i:1;i:177;i:1;i:178;i:1;i:180;i:1;i:181;i:1;i:182;i:1;i:183;i:1;i:187;i:1;i:188;i:1;i:189;i:1;i:191;i:1;i:192;i:1;i:193;i:1;i:194;i:1;i:199;i:1;i:200;i:1;i:202;i:-1;i:203;i:1;i:204;i:1;i:206;i:1;}s:68:"/home/bjartka/public_html/doctrine/lib/Doctrine/Expression/Pgsql.php";a:59:{i:21;i:1;i:33;i:1;i:55;i:-1;i:57;i:-1;i:58;i:-1;i:59;i:-2;i:60;i:-1;i:62;i:-2;i:76;i:-1;i:78;i:-1;i:79;i:-1;i:80;i:-1;i:81;i:-2;i:82;i:-1;i:84;i:-2;i:105;i:-1;i:106;i:-1;i:107;i:-2;i:108;i:-1;i:109;i:-2;i:119;i:-1;i:120;i:-2;i:131;i:-1;i:132;i:-2;i:142;i:-1;i:144;i:-1;i:145;i:-2;i:153;i:-1;i:154;i:-2;i:163;i:-1;i:164;i:-2;i:174;i:-1;i:175;i:-2;i:195;i:-1;i:196;i:-1;i:197;i:-1;i:198;i:-1;i:201;i:-1;i:202;i:-1;i:203;i:-1;i:205;i:-1;i:206;i:-1;i:207;i:-1;i:208;i:-1;i:209;i:-1;i:210;i:-1;i:211;i:-1;i:212;i:-1;i:213;i:-1;i:214;i:-1;i:215;i:-1;i:216;i:-1;i:217;i:-1;i:219;i:-1;i:220;i:-1;i:221;i:-1;i:222;i:-1;i:223;i:-2;i:224;i:1;}s:60:"/home/bjartka/public_html/doctrine/tests/NewCoreTestCase.php";a:7:{i:37;i:1;i:39;i:1;i:41;i:1;i:42;i:1;i:44;i:1;i:46;i:1;i:47;i:1;}s:65:"/home/bjartka/public_html/doctrine/lib/Doctrine/Relation/Nest.php";a:60:{i:21;i:1;i:33;i:1;i:44;i:-1;i:45;i:-1;i:46;i:-1;i:47;i:-1;i:48;i:-1;i:50;i:-1;i:51;i:-1;i:52;i:-1;i:53;i:-1;i:55;i:-1;i:56;i:-1;i:57;i:-1;i:58;i:-1;i:59;i:-1;i:60;i:-1;i:61;i:-1;i:62;i:-1;i:63;i:-1;i:64;i:-1;i:65;i:-1;i:66;i:-1;i:67;i:-1;i:68;i:-1;i:69;i:-1;i:70;i:-1;i:72;i:-1;i:73;i:-2;i:102;i:1;i:105;i:1;i:106;i:1;i:107;i:-2;i:108;i:1;i:110;i:1;i:111;i:1;i:112;i:1;i:114;i:1;i:115;i:1;i:116;i:1;i:117;i:1;i:119;i:1;i:120;i:1;i:122;i:1;i:123;i:1;i:124;i:1;i:125;i:1;i:126;i:1;i:128;i:1;i:129;i:1;i:130;i:1;i:131;i:1;i:132;i:1;i:133;i:1;i:134;i:1;i:135;i:1;i:137;i:1;i:139;i:1;i:141;i:-2;i:142;i:1;}s:66:"/home/bjartka/public_html/doctrine/lib/Doctrine/Query/Abstract.php";a:90:{i:44;i:1;i:45;i:-2;i:55;i:-1;i:56;i:-2;i:67;i:1;i:68;i:1;i:69;i:1;i:70;i:1;i:72;i:1;i:73;i:-2;i:84;i:1;i:85;i:1;i:86;i:1;i:87;i:1;i:88;i:-1;i:89;i:-1;i:90;i:-1;i:91;i:1;i:93;i:1;i:94;i:1;i:96;i:1;i:98;i:1;i:100;i:1;i:101;i:-2;i:111;i:-1;i:112;i:-2;i:123;i:-1;i:124;i:-1;i:125;i:-1;i:126;i:-1;i:128;i:-1;i:129;i:-2;i:139;i:1;i:140;i:-2;i:150;i:1;i:151;i:-2;i:161;i:-1;i:163;i:-1;i:164;i:-2;i:175;i:-1;i:177;i:-1;i:178;i:-2;i:187;i:1;i:189;i:1;i:190;i:-2;i:200;i:1;i:202;i:1;i:203;i:-2;i:213;i:1;i:214;i:-1;i:215;i:-1;i:216;i:-1;i:217;i:-1;i:218;i:-2;i:219;i:1;i:220;i:1;i:221;i:1;i:222;i:1;i:223;i:-1;i:225;i:1;i:226;i:1;i:228;i:-2;i:238;i:1;i:239;i:-2;i:249;i:1;i:250;i:-2;i:260;i:1;i:261;i:-2;i:271;i:1;i:272;i:-2;i:283;i:1;i:284;i:1;i:285;i:1;i:286;i:1;i:287;i:-1;i:290;i:1;i:291;i:-2;i:302;i:1;i:303;i:1;i:304;i:1;i:305;i:1;i:306;i:-1;i:309;i:1;i:310;i:-2;i:320;i:1;i:321;i:-2;i:331;i:1;i:332;i:-2;i:342;i:1;i:343;i:-2;}s:68:"/home/bjartka/public_html/doctrine/tests/Sequence/OracleTestCase.php";a:10:{i:37;i:1;i:38;i:1;i:40;i:1;i:41;i:1;i:44;i:1;i:46;i:1;i:48;i:1;i:51;i:1;i:53;i:1;i:54;i:1;}s:68:"/home/bjartka/public_html/doctrine/tests/Sequence/SqliteTestCase.php";a:14:{i:37;i:1;i:39;i:1;i:41;i:1;i:42;i:1;i:45;i:1;i:47;i:1;i:49;i:1;i:50;i:1;i:51;i:1;i:52;i:1;i:55;i:1;i:57;i:1;i:59;i:1;i:60;i:1;}s:66:"/home/bjartka/public_html/doctrine/tests/Export/RecordTestCase.php";a:40:{i:36;i:-1;i:38;i:-1;i:40;i:1;i:41;i:1;i:42;i:1;i:43;i:1;i:45;i:1;i:46;i:1;i:50;i:1;i:52;i:1;i:53;i:1;i:54;i:1;i:55;i:1;i:56;i:-1;i:58;i:1;i:62;i:1;i:64;i:1;i:65;i:1;i:69;i:1;i:71;i:1;i:72;i:1;i:76;i:1;i:78;i:1;i:79;i:1;i:80;i:1;i:81;i:1;i:82;i:-1;i:84;i:1;i:88;i:1;i:90;i:1;i:92;i:1;i:94;i:1;i:95;i:1;i:99;i:1;i:101;i:1;i:102;i:1;i:103;i:1;i:104;i:1;i:105;i:1;i:106;i:1;}s:61:"/home/bjartka/public_html/doctrine/tests/RelationTestCase.php";a:71:{i:36;i:1;i:39;i:1;i:41;i:1;i:42;i:1;i:46;i:1;i:48;i:1;i:49;i:1;i:50;i:1;i:51;i:1;i:53;i:1;i:54;i:1;i:55;i:1;i:57;i:1;i:59;i:1;i:60;i:1;i:64;i:1;i:66;i:1;i:68;i:1;i:70;i:1;i:72;i:1;i:74;i:1;i:76;i:1;i:78;i:1;i:80;i:1;i:82;i:1;i:83;i:1;i:87;i:1;i:89;i:1;i:91;i:1;i:93;i:1;i:95;i:1;i:97;i:1;i:99;i:1;i:101;i:1;i:103;i:1;i:104;i:1;i:105;i:1;i:106;i:1;i:107;i:1;i:111;i:1;i:114;i:1;i:116;i:1;i:117;i:1;i:119;i:-2;i:121;i:1;i:123;i:1;i:124;i:1;i:125;i:1;i:128;i:1;i:131;i:1;i:132;i:1;i:133;i:1;i:134;i:-2;i:136;i:1;i:137;i:1;i:139;i:1;i:143;i:1;i:144;i:1;i:145;i:1;i:146;i:-2;i:149;i:1;i:150;i:1;i:152;i:1;i:154;i:1;i:155;i:1;i:157;i:1;i:159;i:1;i:160;i:1;i:162;i:1;i:164;i:1;i:165;i:1;}s:66:"/home/bjartka/public_html/doctrine/lib/Doctrine/Validator/Date.php";a:11:{i:34;i:1;i:43;i:1;i:44;i:-1;i:45;i:-2;i:46;i:1;i:48;i:1;i:49;i:-1;i:50;i:-2;i:51;i:1;i:52;i:-2;i:53;i:1;}s:54:"/home/bjartka/public_html/doctrine/models/Location.php";a:5:{i:6;i:1;i:7;i:1;i:8;i:1;i:12;i:1;i:13;i:1;}s:61:"/home/bjartka/public_html/doctrine/models/InheritanceUser.php";a:6:{i:6;i:1;i:8;i:1;i:9;i:1;i:10;i:1;i:14;i:1;i:15;i:1;}s:58:"/home/bjartka/public_html/doctrine/models/ResourceType.php";a:4:{i:4;i:1;i:5;i:1;i:7;i:1;i:8;i:1;}s:60:"/home/bjartka/public_html/doctrine/lib/Doctrine/DataDict.php";a:34:{i:33;i:1;i:44;i:-1;i:46;i:-1;i:47;i:-1;i:48;i:-2;i:50;i:-1;i:51;i:-1;i:52;i:-2;i:54;i:-1;i:56;i:-1;i:57;i:-1;i:58;i:-1;i:60;i:-1;i:61;i:-1;i:62;i:-1;i:63;i:-1;i:64;i:-1;i:66;i:-1;i:67;i:-1;i:68;i:-1;i:69;i:-1;i:70;i:-1;i:71;i:-1;i:72;i:-1;i:74;i:-1;i:75;i:-2;i:87;i:1;i:88;i:1;i:89;i:1;i:90;i:1;i:91;i:1;i:92;i:1;i:93;i:-2;i:94;i:1;}s:57:"/home/bjartka/public_html/doctrine/lib/Doctrine/Query.php";a:854:{i:0;i:1;i:112;i:1;i:113;i:-2;i:116;i:1;i:117;i:1;i:118;i:1;i:119;i:1;i:120;i:1;i:121;i:1;i:122;i:1;i:123;i:1;i:124;i:1;i:134;i:-1;i:135;i:-1;i:136;i:-2;i:137;i:-1;i:138;i:-1;i:148;i:-1;i:149;i:-1;i:159;i:1;i:161;i:1;i:162;i:1;i:163;i:1;i:164;i:1;i:166;i:1;i:175;i:1;i:176;i:-2;i:184;i:1;i:185;i:-2;i:194;i:1;i:195;i:1;i:196;i:1;i:197;i:1;i:198;i:1;i:199;i:1;i:200;i:1;i:201;i:1;i:202;i:-2;i:218;i:1;i:219;i:1;i:220;i:-2;i:222;i:1;i:223;i:1;i:224;i:-2;i:233;i:1;i:235;i:1;i:237;i:1;i:238;i:-2;i:239;i:-1;i:240;i:-1;i:242;i:-1;i:243;i:-2;i:244;i:-1;i:245;i:-2;i:255;i:1;i:256;i:1;i:258;i:1;i:260;i:1;i:261;i:-1;i:262;i:-2;i:264;i:1;i:265;i:1;i:267;i:1;i:268;i:-2;i:282;i:1;i:283;i:-1;i:284;i:-2;i:287;i:1;i:288;i:-1;i:289;i:-2;i:292;i:1;i:293;i:1;i:294;i:1;i:295;i:1;i:298;i:1;i:299;i:1;i:301;i:1;i:303;i:1;i:304;i:1;i:305;i:-1;i:306;i:-1;i:307;i:1;i:309;i:1;i:310;i:1;i:312;i:1;i:314;i:1;i:315;i:-2;i:325;i:-1;i:326;i:-1;i:327;i:-2;i:329;i:-1;i:330;i:-2;i:341;i:1;i:342;i:1;i:343;i:1;i:344;i:1;i:345;i:1;i:346;i:1;i:347;i:1;i:348;i:1;i:349;i:1;i:351;i:1;i:352;i:-2;i:365;i:1;i:366;i:1;i:368;i:1;i:369;i:1;i:372;i:1;i:373;i:1;i:374;i:1;i:377;i:1;i:378;i:1;i:379;i:1;i:381;i:1;i:382;i:1;i:383;i:1;i:385;i:1;i:387;i:1;i:388;i:1;i:390;i:1;i:392;i:1;i:393;i:-2;i:394;i:1;i:403;i:-1;i:405;i:-1;i:406;i:-1;i:407;i:-1;i:408;i:-1;i:409;i:-1;i:410;i:-1;i:411;i:-1;i:414;i:-1;i:415;i:-1;i:419;i:-1;i:420;i:-1;i:422;i:-1;i:423;i:-1;i:424;i:-1;i:426;i:-1;i:427;i:-2;i:431;i:-1;i:433;i:-1;i:435;i:-1;i:437;i:-1;i:438;i:-2;i:448;i:1;i:449;i:1;i:451;i:1;i:453;i:1;i:454;i:1;i:456;i:1;i:457;i:-2;i:458;i:1;i:459;i:1;i:461;i:-2;i:471;i:1;i:473;i:1;i:474;i:1;i:477;i:1;i:478;i:-1;i:480;i:-1;i:481;i:-1;i:483;i:1;i:485;i:1;i:486;i:1;i:488;i:1;i:489;i:-1;i:490;i:-2;i:492;i:1;i:494;i:1;i:496;i:1;i:497;i:1;i:498;i:1;i:500;i:1;i:501;i:1;i:502;i:1;i:504;i:1;i:505;i:1;i:507;i:1;i:509;i:1;i:511;i:1;i:513;i:1;i:515;i:1;i:516;i:1;i:518;i:1;i:520;i:1;i:521;i:1;i:522;i:1;i:524;i:1;i:525;i:1;i:526;i:1;i:527;i:1;i:528;i:-1;i:529;i:-1;i:530;i:-1;i:533;i:1;i:535;i:1;i:536;i:1;i:553;i:1;i:555;i:1;i:556;i:1;i:557;i:1;i:559;i:1;i:560;i:1;i:561;i:1;i:562;i:1;i:564;i:1;i:567;i:1;i:568;i:1;i:569;i:1;i:573;i:1;i:574;i:1;i:575;i:1;i:577;i:1;i:578;i:1;i:579;i:1;i:582;i:1;i:584;i:1;i:585;i:1;i:587;i:1;i:590;i:1;i:592;i:1;i:593;i:1;i:594;i:1;i:595;i:1;i:596;i:1;i:598;i:1;i:599;i:1;i:602;i:1;i:603;i:-1;i:604;i:-2;i:606;i:1;i:609;i:1;i:612;i:1;i:613;i:1;i:614;i:-2;i:616;i:1;i:619;i:1;i:621;i:1;i:622;i:1;i:623;i:1;i:624;i:1;i:627;i:1;i:628;i:1;i:629;i:1;i:630;i:-2;i:642;i:1;i:643;i:1;i:645;i:1;i:646;i:1;i:647;i:1;i:648;i:-2;i:651;i:1;i:652;i:1;i:654;i:1;i:656;i:1;i:657;i:1;i:658;i:1;i:662;i:1;i:663;i:1;i:664;i:-2;i:667;i:1;i:669;i:1;i:671;i:1;i:672;i:-1;i:673;i:-1;i:674;i:-1;i:675;i:-2;i:676;i:-1;i:677;i:-1;i:678;i:-1;i:680;i:-1;i:681;i:1;i:684;i:1;i:685;i:1;i:687;i:1;i:688;i:-2;i:700;i:-1;i:701;i:-1;i:703;i:-1;i:705;i:-1;i:707;i:-1;i:708;i:-1;i:709;i:-1;i:711;i:-1;i:713;i:-1;i:715;i:-1;i:716;i:-1;i:717;i:-1;i:718;i:-1;i:719;i:-1;i:729;i:-1;i:730;i:-1;i:732;i:-1;i:735;i:-1;i:736;i:-1;i:738;i:-1;i:739;i:-1;i:740;i:-2;i:742;i:-1;i:744;i:-1;i:745;i:-1;i:748;i:-1;i:749;i:-1;i:750;i:-2;i:752;i:-1;i:754;i:-1;i:757;i:-1;i:758;i:-1;i:759;i:-2;i:761;i:-1;i:763;i:-1;i:767;i:-1;i:768;i:-1;i:769;i:-1;i:770;i:-1;i:772;i:-1;i:773;i:-1;i:774;i:-1;i:775;i:-1;i:777;i:-1;i:778;i:-1;i:780;i:-1;i:782;i:-1;i:783;i:-1;i:785;i:-1;i:787;i:-1;i:788;i:-1;i:790;i:-1;i:791;i:-1;i:801;i:1;i:802;i:1;i:803;i:1;i:804;i:1;i:805;i:1;i:806;i:1;i:807;i:1;i:808;i:1;i:809;i:1;i:811;i:1;i:812;i:1;i:813;i:-1;i:814;i:1;i:815;i:-2;i:824;i:1;i:825;i:1;i:826;i:1;i:827;i:1;i:828;i:1;i:829;i:-2;i:832;i:1;i:833;i:1;i:835;i:1;i:836;i:1;i:838;i:1;i:839;i:-1;i:841;i:1;i:842;i:-1;i:843;i:-2;i:845;i:1;i:847;i:1;i:848;i:1;i:850;i:1;i:851;i:1;i:852;i:1;i:853;i:1;i:855;i:1;i:857;i:1;i:858;i:1;i:860;i:1;i:862;i:1;i:863;i:1;i:864;i:1;i:865;i:-2;i:878;i:1;i:891;i:-1;i:902;i:1;i:904;i:1;i:906;i:1;i:907;i:1;i:909;i:1;i:911;i:1;i:912;i:1;i:913;i:1;i:915;i:1;i:916;i:1;i:917;i:1;i:919;i:1;i:920;i:1;i:921;i:1;i:922;i:1;i:933;i:1;i:934;i:1;i:935;i:-2;i:937;i:1;i:940;i:1;i:941;i:1;i:942;i:1;i:943;i:1;i:944;i:1;i:945;i:1;i:948;i:1;i:949;i:1;i:950;i:1;i:951;i:1;i:953;i:1;i:956;i:1;i:957;i:1;i:959;i:1;i:961;i:1;i:962;i:-1;i:963;i:-2;i:965;i:1;i:966;i:1;i:967;i:1;i:968;i:1;i:969;i:1;i:971;i:1;i:972;i:1;i:973;i:1;i:974;i:1;i:976;i:1;i:977;i:1;i:978;i:1;i:979;i:1;i:980;i:1;i:981;i:1;i:982;i:1;i:983;i:1;i:984;i:1;i:985;i:1;i:987;i:1;i:990;i:1;i:991;i:1;i:993;i:1;i:994;i:1;i:995;i:1;i:998;i:1;i:1001;i:1;i:1002;i:1;i:1003;i:1;i:1004;i:1;i:1005;i:1;i:1007;i:1;i:1010;i:1;i:1011;i:1;i:1013;i:1;i:1014;i:1;i:1017;i:1;i:1018;i:1;i:1020;i:1;i:1021;i:1;i:1022;i:1;i:1023;i:1;i:1025;i:1;i:1026;i:1;i:1027;i:-1;i:1029;i:1;i:1032;i:1;i:1033;i:1;i:1034;i:1;i:1036;i:1;i:1037;i:1;i:1038;i:1;i:1040;i:1;i:1041;i:1;i:1042;i:1;i:1043;i:1;i:1045;i:1;i:1047;i:1;i:1048;i:1;i:1051;i:1;i:1052;i:1;i:1053;i:1;i:1054;i:1;i:1055;i:1;i:1056;i:1;i:1057;i:1;i:1059;i:1;i:1060;i:-2;i:1073;i:1;i:1074;i:1;i:1075;i:1;i:1078;i:1;i:1079;i:1;i:1082;i:1;i:1084;i:1;i:1088;i:1;i:1089;i:1;i:1090;i:1;i:1091;i:1;i:1092;i:1;i:1094;i:1;i:1095;i:1;i:1096;i:-2;i:1099;i:1;i:1100;i:-1;i:1101;i:-2;i:1104;i:1;i:1105;i:1;i:1106;i:1;i:1107;i:1;i:1108;i:1;i:1110;i:1;i:1111;i:1;i:1112;i:1;i:1113;i:1;i:1114;i:1;i:1115;i:1;i:1116;i:1;i:1119;i:1;i:1122;i:1;i:1124;i:1;i:1125;i:1;i:1127;i:1;i:1128;i:-1;i:1129;i:-2;i:1130;i:1;i:1132;i:1;i:1133;i:1;i:1136;i:1;i:1137;i:1;i:1138;i:1;i:1140;i:1;i:1143;i:1;i:1145;i:1;i:1147;i:1;i:1148;i:1;i:1149;i:-1;i:1150;i:-2;i:1152;i:1;i:1154;i:1;i:1155;i:1;i:1156;i:1;i:1157;i:-2;i:1159;i:1;i:1160;i:1;i:1161;i:-2;i:1162;i:1;i:1164;i:1;i:1165;i:1;i:1166;i:1;i:1168;i:1;i:1169;i:1;i:1170;i:1;i:1172;i:1;i:1173;i:1;i:1174;i:1;i:1175;i:-1;i:1176;i:-2;i:1177;i:1;i:1178;i:1;i:1179;i:-2;i:1181;i:1;i:1183;i:1;i:1184;i:1;i:1185;i:1;i:1187;i:1;i:1188;i:1;i:1189;i:1;i:1190;i:1;i:1192;i:1;i:1193;i:1;i:1194;i:-2;i:1216;i:1;i:1218;i:1;i:1219;i:1;i:1220;i:1;i:1221;i:1;i:1222;i:1;i:1223;i:1;i:1224;i:1;i:1225;i:1;i:1226;i:1;i:1227;i:1;i:1228;i:1;i:1229;i:1;i:1230;i:1;i:1231;i:1;i:1232;i:1;i:1233;i:1;i:1234;i:1;i:1235;i:1;i:1236;i:1;i:1237;i:1;i:1238;i:1;i:1239;i:1;i:1240;i:-1;i:1242;i:1;i:1243;i:1;i:1244;i:1;i:1245;i:1;i:1246;i:1;i:1247;i:-1;i:1248;i:-2;i:1250;i:1;i:1251;i:1;i:1252;i:1;i:1253;i:1;i:1254;i:-2;i:1268;i:1;i:1269;i:1;i:1270;i:1;i:1272;i:1;i:1273;i:1;i:1274;i:1;i:1276;i:1;i:1278;i:1;i:1279;i:1;i:1280;i:1;i:1282;i:1;i:1283;i:-1;i:1284;i:-1;i:1285;i:1;i:1286;i:-1;i:1287;i:-1;i:1288;i:1;i:1289;i:1;i:1290;i:1;i:1291;i:1;i:1292;i:1;i:1293;i:1;i:1294;i:1;i:1295;i:1;i:1296;i:1;i:1297;i:1;i:1298;i:1;i:1299;i:1;i:1300;i:1;i:1301;i:1;i:1302;i:1;i:1303;i:1;i:1304;i:1;i:1305;i:1;i:1306;i:1;i:1307;i:1;i:1308;i:1;i:1309;i:1;i:1310;i:1;i:1311;i:1;i:1312;i:1;i:1313;i:-2;i:1314;i:1;i:1316;i:1;i:1317;i:-2;i:1321;i:1;i:1323;i:1;i:1324;i:1;i:1325;i:1;i:1327;i:1;i:1328;i:1;i:1331;i:1;i:1333;i:1;i:1335;i:1;i:1336;i:1;i:1337;i:1;i:1338;i:1;i:1339;i:1;i:1340;i:1;i:1342;i:1;i:1343;i:1;i:1344;i:1;i:1345;i:1;i:1346;i:1;i:1349;i:1;i:1350;i:1;i:1352;i:1;i:1354;i:1;i:1355;i:1;i:1356;i:1;i:1358;i:1;i:1359;i:1;i:1360;i:1;i:1362;i:1;i:1363;i:1;i:1365;i:1;i:1367;i:1;i:1370;i:1;i:1372;i:1;i:1375;i:1;i:1376;i:1;i:1377;i:1;i:1378;i:1;i:1382;i:1;i:1383;i:1;i:1384;i:-2;i:1386;i:1;i:1389;i:1;i:1390;i:1;i:1391;i:1;i:1393;i:1;i:1394;i:1;i:1396;i:1;i:1397;i:1;i:1398;i:1;i:1399;i:1;i:1400;i:1;i:1401;i:1;i:1402;i:1;i:1403;i:1;i:1405;i:1;i:1406;i:1;i:1407;i:1;i:1409;i:1;i:1411;i:1;i:1413;i:1;i:1415;i:1;i:1417;i:1;i:1418;i:1;i:1419;i:1;i:1421;i:1;i:1422;i:1;i:1424;i:1;i:1426;i:1;i:1427;i:1;i:1428;i:1;i:1430;i:1;i:1432;i:1;i:1434;i:1;i:1436;i:1;i:1439;i:1;i:1440;i:1;i:1441;i:1;i:1442;i:1;i:1444;i:1;i:1447;i:1;i:1448;i:1;i:1449;i:1;i:1450;i:1;i:1451;i:1;i:1453;i:1;i:1455;i:1;i:1457;i:1;i:1458;i:1;i:1460;i:1;i:1461;i:1;i:1462;i:1;i:1464;i:1;i:1466;i:1;i:1468;i:1;i:1470;i:1;i:1471;i:1;i:1472;i:1;i:1473;i:1;i:1474;i:1;i:1475;i:1;i:1476;i:1;i:1477;i:1;i:1478;i:1;i:1479;i:1;i:1481;i:1;i:1483;i:1;i:1485;i:1;i:1486;i:1;i:1487;i:1;i:1488;i:1;i:1491;i:1;i:1492;i:1;i:1493;i:1;i:1494;i:1;i:1496;i:1;i:1498;i:1;i:1500;i:1;i:1501;i:1;i:1502;i:1;i:1503;i:1;i:1504;i:1;i:1505;i:1;i:1507;i:1;i:1509;i:1;i:1511;i:1;i:1512;i:1;i:1514;i:1;i:1515;i:1;i:1516;i:1;i:1517;i:1;i:1518;i:1;i:1519;i:1;i:1521;i:1;i:1522;i:1;i:1523;i:1;i:1524;i:-2;i:1526;i:1;i:1527;i:1;i:1528;i:1;i:1529;i:-2;i:1540;i:1;i:1541;i:1;i:1543;i:1;i:1544;i:1;i:1547;i:1;i:1549;i:1;i:1551;i:1;i:1552;i:1;i:1553;i:1;i:1555;i:1;i:1556;i:1;i:1557;i:1;i:1559;i:1;i:1560;i:-2;i:1584;i:1;i:1587;i:1;i:1588;i:1;i:1589;i:1;i:1590;i:1;i:1591;i:1;i:1592;i:1;i:1595;i:1;i:1596;i:1;i:1597;i:1;i:1599;i:1;i:1600;i:1;i:1601;i:1;i:1602;i:1;i:1603;i:1;i:1605;i:1;i:1608;i:1;i:1610;i:1;i:1611;i:1;i:1612;i:1;i:1614;i:1;i:1615;i:1;i:1616;i:1;i:1618;i:1;i:1619;i:-1;i:1620;i:-1;i:1622;i:1;i:1624;i:1;i:1626;i:1;i:1627;i:-1;i:1628;i:-1;i:1629;i:-1;i:1630;i:-1;i:1631;i:-1;i:1632;i:1;i:1635;i:1;i:1636;i:-2;i:1650;i:1;i:1652;i:1;i:1653;i:-2;i:1664;i:1;i:1665;i:1;i:1666;i:1;i:1668;i:1;i:1669;i:1;i:1670;i:1;i:1671;i:1;i:1673;i:1;i:1674;i:-2;i:1687;i:-1;i:1688;i:-1;i:1689;i:-1;i:1690;i:-1;i:1691;i:-1;}s:69:"/home/bjartka/public_html/doctrine/tests/Connection/MssqlTestCase.php";a:39:{i:35;i:1;i:37;i:1;i:38;i:1;i:40;i:1;i:42;i:1;i:43;i:1;i:45;i:1;i:47;i:1;i:48;i:1;i:50;i:1;i:52;i:1;i:53;i:1;i:55;i:1;i:57;i:1;i:58;i:1;i:60;i:1;i:62;i:1;i:63;i:1;i:65;i:1;i:67;i:1;i:68;i:1;i:70;i:1;i:72;i:1;i:73;i:1;i:75;i:1;i:77;i:1;i:78;i:1;i:80;i:1;i:82;i:1;i:83;i:1;i:85;i:1;i:87;i:1;i:88;i:1;i:90;i:1;i:92;i:1;i:93;i:1;i:95;i:1;i:97;i:1;i:98;i:1;}s:66:"/home/bjartka/public_html/doctrine/lib/Doctrine/Sequence/Mysql.php";a:29:{i:21;i:1;i:33;i:1;i:45;i:1;i:46;i:1;i:47;i:1;i:51;i:1;i:53;i:1;i:54;i:-2;i:59;i:-2;i:60;i:-2;i:61;i:-2;i:64;i:-2;i:65;i:-2;i:66;i:-2;i:69;i:1;i:71;i:1;i:72;i:1;i:73;i:1;i:80;i:1;i:81;i:1;i:82;i:-2;i:93;i:1;i:94;i:-2;i:104;i:1;i:105;i:1;i:106;i:1;i:108;i:1;i:109;i:-2;i:110;i:1;}s:67:"/home/bjartka/public_html/doctrine/tests/Sequence/PgsqlTestCase.php";a:10:{i:37;i:1;i:38;i:1;i:40;i:1;i:41;i:1;i:44;i:1;i:46;i:1;i:48;i:1;i:51;i:1;i:53;i:1;i:54;i:1;}s:72:"/home/bjartka/public_html/doctrine/lib/Doctrine/Expression/Exception.php";a:3:{i:21;i:1;i:33;i:1;i:34;i:1;}s:58:"/home/bjartka/public_html/doctrine/models/Forum_Thread.php";a:7:{i:4;i:1;i:5;i:1;i:6;i:1;i:7;i:1;i:9;i:1;i:10;i:1;i:11;i:1;}s:58:"/home/bjartka/public_html/doctrine/lib/Doctrine/RawSql.php";a:148:{i:21;i:1;i:33;i:1;i:52;i:1;i:53;i:1;i:55;i:1;i:56;i:1;i:57;i:1;i:58;i:1;i:59;i:1;i:60;i:1;i:61;i:-1;i:64;i:1;i:65;i:-2;i:75;i:1;i:77;i:1;i:78;i:1;i:80;i:1;i:82;i:1;i:83;i:1;i:84;i:1;i:85;i:1;i:86;i:1;i:87;i:1;i:88;i:1;i:89;i:1;i:90;i:1;i:91;i:1;i:92;i:1;i:93;i:1;i:94;i:1;i:95;i:1;i:96;i:1;i:97;i:1;i:98;i:1;i:99;i:1;i:100;i:1;i:101;i:1;i:102;i:1;i:104;i:1;i:105;i:-1;i:107;i:1;i:108;i:1;i:109;i:1;i:110;i:1;i:111;i:1;i:112;i:1;i:113;i:1;i:114;i:1;i:116;i:1;i:117;i:1;i:119;i:1;i:120;i:1;i:122;i:1;i:123;i:-2;i:132;i:1;i:134;i:1;i:135;i:1;i:136;i:1;i:137;i:-1;i:138;i:-2;i:140;i:1;i:142;i:1;i:143;i:1;i:144;i:-1;i:146;i:1;i:148;i:1;i:150;i:1;i:151;i:1;i:152;i:1;i:154;i:1;i:155;i:1;i:156;i:1;i:157;i:1;i:158;i:1;i:160;i:1;i:164;i:1;i:165;i:1;i:167;i:1;i:168;i:1;i:170;i:1;i:171;i:1;i:172;i:1;i:173;i:1;i:174;i:1;i:177;i:1;i:178;i:1;i:180;i:1;i:181;i:1;i:183;i:1;i:184;i:1;i:185;i:1;i:186;i:1;i:187;i:1;i:189;i:1;i:190;i:1;i:191;i:1;i:192;i:1;i:193;i:1;i:194;i:1;i:196;i:1;i:197;i:1;i:198;i:1;i:199;i:1;i:200;i:1;i:201;i:1;i:202;i:1;i:204;i:1;i:205;i:1;i:206;i:1;i:207;i:1;i:208;i:-2;i:217;i:1;i:218;i:-2;i:228;i:1;i:229;i:1;i:231;i:1;i:233;i:1;i:234;i:1;i:236;i:1;i:238;i:1;i:240;i:1;i:241;i:1;i:243;i:1;i:244;i:1;i:246;i:1;i:248;i:1;i:251;i:1;i:253;i:1;i:256;i:1;i:257;i:1;i:258;i:1;i:259;i:1;i:261;i:1;i:262;i:1;i:263;i:1;i:265;i:1;i:266;i:1;i:267;i:1;i:268;i:1;i:270;i:1;i:271;i:1;i:272;i:1;i:274;i:1;i:276;i:1;i:277;i:1;i:279;i:1;i:280;i:-2;i:281;i:1;}s:57:"/home/bjartka/public_html/doctrine/models/BooleanTest.php";a:3:{i:4;i:1;i:5;i:1;i:6;i:1;}s:61:"/home/bjartka/public_html/doctrine/tests/AuditLogTestCase.php";a:32:{i:37;i:1;i:41;i:1;i:42;i:1;i:43;i:1;i:45;i:1;i:46;i:1;i:50;i:1;i:52;i:1;i:53;i:1;i:54;i:1;i:56;i:1;i:57;i:1;i:58;i:1;i:60;i:1;i:62;i:1;i:64;i:1;i:65;i:1;i:67;i:1;i:68;i:1;i:70;i:1;i:72;i:1;i:73;i:1;i:75;i:1;i:77;i:1;i:78;i:1;i:80;i:1;i:84;i:1;i:87;i:1;i:88;i:-1;i:89;i:1;i:90;i:1;i:92;i:1;}s:64:"/home/bjartka/public_html/doctrine/lib/Doctrine/Hook/Integer.php";a:17:{i:21;i:1;i:33;i:1;i:49;i:1;i:51;i:1;i:52;i:1;i:54;i:1;i:56;i:1;i:58;i:1;i:61;i:1;i:63;i:1;i:64;i:1;i:67;i:1;i:69;i:1;i:72;i:1;i:73;i:1;i:74;i:-2;i:75;i:1;}s:60:"/home/bjartka/public_html/doctrine/models/QueryTest_User.php";a:7:{i:7;i:1;i:8;i:1;i:9;i:1;i:10;i:1;i:17;i:1;i:18;i:1;i:19;i:1;}s:49:"/home/bjartka/public_html/doctrine/models/Tag.php";a:4:{i:4;i:1;i:5;i:1;i:7;i:1;i:8;i:1;}s:54:"/home/bjartka/public_html/doctrine/models/GzipTest.php";a:2:{i:4;i:1;i:5;i:1;}s:64:"/home/bjartka/public_html/doctrine/tests/Record/LockTestCase.php";a:13:{i:5;i:1;i:6;i:1;i:7;i:1;i:8;i:1;i:10;i:1;i:14;i:1;i:15;i:1;i:16;i:1;i:17;i:1;i:18;i:1;i:20;i:1;i:21;i:1;i:22;i:1;}s:66:"/home/bjartka/public_html/doctrine/lib/Doctrine/Node/Interface.php";a:2:{i:32;i:1;i:267;i:1;}s:64:"/home/bjartka/public_html/doctrine/tests/Query/CacheTestCase.php";a:47:{i:38;i:1;i:40;i:1;i:41;i:1;i:42;i:1;i:44;i:1;i:45;i:1;i:47;i:1;i:49;i:1;i:50;i:1;i:51;i:1;i:55;i:1;i:57;i:1;i:58;i:1;i:59;i:1;i:60;i:1;i:62;i:1;i:63;i:1;i:65;i:1;i:67;i:1;i:68;i:1;i:69;i:1;i:73;i:1;i:75;i:1;i:76;i:1;i:77;i:1;i:78;i:1;i:80;i:1;i:82;i:1;i:83;i:1;i:85;i:1;i:87;i:1;i:88;i:1;i:89;i:1;i:92;i:1;i:94;i:1;i:95;i:1;i:97;i:1;i:98;i:1;i:99;i:1;i:101;i:1;i:103;i:1;i:104;i:1;i:106;i:1;i:108;i:1;i:109;i:1;i:111;i:1;i:112;i:1;}s:69:"/home/bjartka/public_html/doctrine/lib/Doctrine/Manager/Exception.php";a:2:{i:32;i:1;i:33;i:1;}s:69:"/home/bjartka/public_html/doctrine/lib/Doctrine/Expression/Sqlite.php";a:41:{i:0;i:1;i:21;i:1;i:33;i:1;i:43;i:-1;i:44;i:-2;i:54;i:-1;i:55;i:-2;i:64;i:1;i:65;i:1;i:66;i:-2;i:78;i:-1;i:79;i:-2;i:82;i:-1;i:83;i:-2;i:86;i:-1;i:87;i:-2;i:90;i:-1;i:91;i:-2;i:94;i:-1;i:95;i:-2;i:103;i:-1;i:104;i:-2;i:117;i:-1;i:118;i:-2;i:128;i:-1;i:129;i:-1;i:130;i:-1;i:131;i:-1;i:132;i:-1;i:133;i:-1;i:134;i:-1;i:135;i:-1;i:136;i:-2;i:144;i:1;i:145;i:-2;i:160;i:1;i:161;i:1;i:162;i:-2;i:163;i:-1;i:164;i:-2;i:165;i:1;}s:56:"/home/bjartka/public_html/doctrine/models/Assignment.php";a:3:{i:4;i:1;i:5;i:1;i:6;i:1;}s:64:"/home/bjartka/public_html/doctrine/lib/Doctrine/Import/Pgsql.php";a:49:{i:21;i:1;i:33;i:1;i:129;i:-1;i:138;i:1;i:139;i:1;i:141;i:1;i:142;i:-2;i:151;i:1;i:152;i:1;i:153;i:1;i:155;i:1;i:156;i:1;i:157;i:-1;i:159;i:-1;i:161;i:-1;i:162;i:-1;i:163;i:-1;i:165;i:-1;i:168;i:-1;i:169;i:-1;i:170;i:-1;i:171;i:-1;i:172;i:-1;i:173;i:-1;i:174;i:-1;i:175;i:-1;i:176;i:-1;i:177;i:-1;i:178;i:-1;i:179;i:-1;i:180;i:-1;i:181;i:1;i:182;i:-2;i:191;i:1;i:192;i:1;i:194;i:1;i:195;i:-2;i:204;i:1;i:205;i:-2;i:217;i:-1;i:218;i:-1;i:219;i:-1;i:220;i:-1;i:221;i:-1;i:222;i:-1;i:223;i:-2;i:232;i:-1;i:233;i:-2;i:234;i:1;}s:59:"/home/bjartka/public_html/doctrine/models/FieldNameTest.php";a:6:{i:6;i:1;i:7;i:1;i:8;i:1;i:9;i:1;i:10;i:1;i:11;i:1;}s:63:"/home/bjartka/public_html/doctrine/lib/Doctrine/Hook/Parser.php";a:6:{i:34;i:1;i:40;i:1;i:41;i:-2;i:50;i:1;i:51;i:-2;i:65;i:1;}s:64:"/home/bjartka/public_html/doctrine/models/QueryTest_Category.php";a:13:{i:17;i:1;i:18;i:1;i:19;i:1;i:20;i:1;i:21;i:1;i:22;i:1;i:23;i:1;i:24;i:1;i:25;i:1;i:32;i:1;i:33;i:1;i:34;i:1;i:35;i:1;}s:58:"/home/bjartka/public_html/doctrine/models/LocationI18n.php";a:6:{i:6;i:1;i:7;i:1;i:8;i:1;i:9;i:1;i:13;i:1;i:14;i:1;}s:64:"/home/bjartka/public_html/doctrine/tests/Query/WhereTestCase.php";a:154:{i:37;i:1;i:40;i:1;i:41;i:1;i:42;i:1;i:45;i:1;i:47;i:1;i:48;i:1;i:49;i:1;i:51;i:1;i:53;i:1;i:55;i:1;i:57;i:1;i:58;i:1;i:59;i:1;i:63;i:1;i:65;i:1;i:67;i:1;i:69;i:1;i:70;i:1;i:71;i:1;i:72;i:1;i:76;i:1;i:78;i:1;i:79;i:1;i:80;i:1;i:82;i:1;i:84;i:1;i:86;i:1;i:88;i:1;i:89;i:1;i:90;i:1;i:91;i:1;i:95;i:1;i:96;i:1;i:97;i:1;i:99;i:1;i:101;i:1;i:103;i:1;i:105;i:1;i:106;i:1;i:107;i:1;i:108;i:1;i:111;i:1;i:113;i:1;i:115;i:1;i:117;i:1;i:119;i:1;i:120;i:1;i:121;i:1;i:124;i:1;i:126;i:1;i:128;i:1;i:129;i:1;i:130;i:1;i:131;i:1;i:134;i:1;i:136;i:1;i:137;i:1;i:139;i:1;i:140;i:1;i:141;i:1;i:144;i:1;i:146;i:1;i:147;i:1;i:148;i:1;i:149;i:1;i:153;i:1;i:154;i:1;i:155;i:1;i:156;i:-2;i:158;i:1;i:160;i:1;i:161;i:1;i:162;i:1;i:166;i:1;i:170;i:1;i:171;i:1;i:172;i:1;i:173;i:-2;i:175;i:1;i:176;i:1;i:177;i:1;i:178;i:1;i:179;i:1;i:182;i:1;i:184;i:1;i:186;i:1;i:188;i:1;i:189;i:1;i:190;i:1;i:192;i:1;i:195;i:1;i:197;i:1;i:199;i:1;i:201;i:1;i:202;i:1;i:203;i:1;i:206;i:1;i:208;i:1;i:210;i:1;i:211;i:1;i:213;i:1;i:214;i:1;i:217;i:1;i:219;i:1;i:221;i:1;i:222;i:1;i:224;i:1;i:225;i:1;i:228;i:1;i:230;i:1;i:232;i:1;i:233;i:1;i:235;i:1;i:236;i:1;i:239;i:1;i:241;i:1;i:243;i:1;i:244;i:1;i:246;i:1;i:247;i:1;i:250;i:1;i:252;i:1;i:254;i:1;i:255;i:1;i:258;i:1;i:260;i:1;i:262;i:1;i:263;i:1;i:266;i:1;i:267;i:1;i:268;i:1;i:270;i:1;i:272;i:1;i:274;i:1;i:276;i:1;i:278;i:1;i:279;i:1;i:283;i:1;i:285;i:1;i:287;i:1;i:289;i:1;i:290;i:1;i:291;i:1;i:292;i:1;i:293;i:1;i:297;i:1;i:299;i:1;i:301;i:1;i:303;i:1;i:304;i:1;i:305;i:1;i:306;i:1;i:307;i:1;}s:65:"/home/bjartka/public_html/doctrine/lib/Doctrine/Schema/Object.php";a:33:{i:21;i:1;i:35;i:1;i:43;i:1;i:44;i:1;i:45;i:-1;i:46;i:-1;i:47;i:1;i:48;i:1;i:52;i:1;i:53;i:1;i:54;i:-2;i:55;i:1;i:57;i:-2;i:61;i:1;i:62;i:1;i:63;i:-2;i:64;i:1;i:65;i:1;i:69;i:-1;i:70;i:-2;i:74;i:-1;i:75;i:-2;i:83;i:-1;i:84;i:-1;i:85;i:-2;i:86;i:-1;i:87;i:-2;i:97;i:-1;i:98;i:-1;i:99;i:-2;i:100;i:-1;i:101;i:-2;i:103;i:1;}s:69:"/home/bjartka/public_html/doctrine/tests/CustomPrimaryKeyTestCase.php";a:14:{i:36;i:1;i:40;i:1;i:42;i:1;i:43;i:1;i:46;i:1;i:47;i:1;i:49;i:1;i:50;i:1;i:52;i:1;i:53;i:1;i:54;i:1;i:56;i:1;i:58;i:1;i:59;i:1;}s:64:"/home/bjartka/public_html/doctrine/lib/Doctrine/Search/Query.php";a:114:{i:34;i:1;i:55;i:1;i:56;i:1;i:57;i:1;i:59;i:1;i:61;i:1;i:62;i:1;i:64;i:1;i:65;i:1;i:73;i:-1;i:74;i:-2;i:78;i:1;i:80;i:1;i:82;i:1;i:83;i:1;i:84;i:1;i:85;i:1;i:86;i:1;i:88;i:-1;i:90;i:-1;i:91;i:-1;i:94;i:1;i:95;i:1;i:97;i:1;i:98;i:1;i:100;i:1;i:101;i:1;i:105;i:1;i:107;i:1;i:109;i:1;i:110;i:1;i:111;i:1;i:113;i:1;i:115;i:1;i:117;i:1;i:119;i:1;i:120;i:1;i:122;i:1;i:123;i:1;i:124;i:1;i:125;i:1;i:126;i:1;i:127;i:1;i:129;i:1;i:131;i:1;i:133;i:1;i:134;i:1;i:135;i:1;i:136;i:1;i:137;i:1;i:138;i:1;i:140;i:1;i:141;i:1;i:142;i:1;i:143;i:1;i:144;i:1;i:146;i:1;i:147;i:1;i:148;i:-2;i:150;i:1;i:151;i:1;i:152;i:1;i:153;i:1;i:154;i:1;i:157;i:1;i:158;i:1;i:159;i:1;i:160;i:1;i:162;i:1;i:163;i:1;i:167;i:1;i:168;i:1;i:169;i:-2;i:170;i:1;i:172;i:-2;i:175;i:1;i:176;i:1;i:177;i:-2;i:178;i:1;i:180;i:1;i:182;i:-2;i:186;i:1;i:188;i:1;i:189;i:1;i:190;i:1;i:191;i:1;i:193;i:1;i:194;i:1;i:196;i:1;i:197;i:1;i:198;i:1;i:199;i:-2;i:200;i:1;i:201;i:1;i:203;i:1;i:204;i:-2;i:207;i:1;i:208;i:1;i:210;i:1;i:212;i:1;i:214;i:1;i:215;i:1;i:216;i:1;i:219;i:1;i:221;i:1;i:222;i:-2;i:225;i:1;i:226;i:-2;i:229;i:1;i:230;i:-2;i:233;i:-1;i:235;i:-1;i:236;i:-2;i:237;i:1;}s:76:"/home/bjartka/public_html/doctrine/tests/migration_classes/001_add_table.php";a:6:{i:2;i:1;i:6;i:-1;i:7;i:-1;i:11;i:-1;i:12;i:-1;i:13;i:1;}s:61:"/home/bjartka/public_html/doctrine/models/EntityReference.php";a:3:{i:6;i:1;i:7;i:1;i:9;i:1;}s:63:"/home/bjartka/public_html/doctrine/lib/Doctrine/Query/Where.php";a:91:{i:21;i:1;i:33;i:1;i:37;i:1;i:38;i:1;i:39;i:1;i:41;i:1;i:42;i:1;i:43;i:1;i:44;i:1;i:45;i:1;i:46;i:-2;i:47;i:1;i:49;i:1;i:50;i:1;i:51;i:1;i:53;i:1;i:54;i:1;i:55;i:1;i:56;i:1;i:57;i:1;i:58;i:1;i:60;i:1;i:62;i:1;i:64;i:1;i:65;i:1;i:67;i:1;i:68;i:1;i:70;i:1;i:71;i:1;i:72;i:1;i:73;i:1;i:75;i:1;i:76;i:1;i:78;i:1;i:79;i:1;i:81;i:1;i:82;i:1;i:83;i:1;i:85;i:1;i:86;i:1;i:88;i:1;i:90;i:1;i:91;i:-2;i:94;i:-1;i:98;i:1;i:100;i:1;i:102;i:1;i:103;i:1;i:106;i:1;i:107;i:1;i:109;i:1;i:110;i:-1;i:111;i:-1;i:113;i:1;i:115;i:1;i:117;i:1;i:119;i:1;i:120;i:1;i:121;i:1;i:122;i:1;i:124;i:1;i:125;i:1;i:126;i:1;i:127;i:1;i:129;i:1;i:131;i:1;i:133;i:1;i:135;i:1;i:136;i:1;i:137;i:1;i:138;i:1;i:140;i:1;i:141;i:1;i:142;i:1;i:144;i:1;i:145;i:1;i:147;i:1;i:148;i:1;i:149;i:1;i:150;i:1;i:153;i:1;i:154;i:-2;i:164;i:1;i:166;i:1;i:168;i:1;i:169;i:-1;i:170;i:-2;i:172;i:1;i:174;i:1;i:175;i:-2;i:176;i:1;}s:65:"/home/bjartka/public_html/doctrine/tests/Import/PgsqlTestCase.php";a:36:{i:37;i:1;i:39;i:1;i:45;i:1;i:46;i:1;i:49;i:1;i:51;i:1;i:73;i:1;i:74;i:1;i:77;i:1;i:79;i:1;i:90;i:1;i:91;i:1;i:94;i:1;i:109;i:1;i:110;i:1;i:111;i:1;i:114;i:1;i:116;i:1;i:117;i:1;i:118;i:1;i:121;i:1;i:123;i:1;i:124;i:1;i:125;i:1;i:128;i:1;i:130;i:1;i:131;i:1;i:132;i:1;i:135;i:1;i:148;i:1;i:149;i:1;i:150;i:1;i:153;i:1;i:166;i:1;i:167;i:1;i:168;i:1;}s:58:"/home/bjartka/public_html/doctrine/models/RelationTest.php";a:13:{i:6;i:1;i:7;i:1;i:8;i:1;i:15;i:1;i:16;i:1;i:17;i:1;i:18;i:1;i:19;i:1;i:20;i:1;i:21;i:1;i:22;i:1;i:23;i:1;i:24;i:1;}s:57:"/home/bjartka/public_html/doctrine/models/PolicyAsset.php";a:7:{i:6;i:1;i:7;i:1;i:8;i:1;i:12;i:1;i:13;i:1;i:14;i:1;i:15;i:1;}s:55:"/home/bjartka/public_html/doctrine/models/gnatEmail.php";a:2:{i:6;i:1;i:7;i:1;}s:64:"/home/bjartka/public_html/doctrine/lib/Doctrine/Query/Offset.php";a:4:{i:33;i:1;i:37;i:1;i:38;i:-2;i:39;i:1;}s:67:"/home/bjartka/public_html/doctrine/tests/Query/SubqueryTestCase.php";a:50:{i:39;i:1;i:40;i:1;i:42;i:1;i:43;i:1;i:45;i:1;i:47;i:1;i:48;i:1;i:49;i:1;i:53;i:1;i:54;i:1;i:56;i:1;i:57;i:1;i:62;i:1;i:64;i:1;i:66;i:1;i:68;i:1;i:70;i:1;i:72;i:1;i:74;i:1;i:75;i:1;i:76;i:1;i:81;i:1;i:83;i:1;i:85;i:1;i:87;i:1;i:91;i:1;i:92;i:1;i:93;i:1;i:94;i:1;i:95;i:1;i:99;i:1;i:101;i:1;i:103;i:1;i:104;i:1;i:105;i:-2;i:108;i:1;i:109;i:1;i:113;i:1;i:115;i:1;i:116;i:1;i:117;i:1;i:118;i:1;i:119;i:1;i:120;i:1;i:121;i:1;i:124;i:1;i:125;i:1;i:126;i:1;i:127;i:-2;i:129;i:1;}s:65:"/home/bjartka/public_html/doctrine/lib/Doctrine/Schema/Column.php";a:15:{i:21;i:1;i:35;i:1;i:53;i:-1;i:54;i:-2;i:57;i:-1;i:58;i:-2;i:61;i:-1;i:62;i:-2;i:65;i:-1;i:66;i:-2;i:69;i:-1;i:70;i:-2;i:73;i:-1;i:74;i:-2;i:76;i:1;}s:65:"/home/bjartka/public_html/doctrine/tests/Search/QueryTestCase.php";a:146:{i:37;i:1;i:39;i:1;i:40;i:1;i:42;i:1;i:46;i:1;i:48;i:1;i:49;i:1;i:51;i:1;i:53;i:1;i:55;i:1;i:56;i:1;i:58;i:1;i:59;i:1;i:63;i:1;i:64;i:1;i:67;i:1;i:69;i:1;i:70;i:1;i:74;i:1;i:75;i:1;i:77;i:1;i:79;i:1;i:80;i:1;i:84;i:1;i:85;i:1;i:87;i:1;i:89;i:1;i:90;i:1;i:94;i:1;i:95;i:1;i:97;i:1;i:99;i:1;i:100;i:1;i:104;i:1;i:105;i:1;i:107;i:1;i:109;i:1;i:110;i:1;i:114;i:1;i:115;i:1;i:117;i:1;i:119;i:1;i:120;i:1;i:124;i:1;i:125;i:1;i:127;i:1;i:129;i:1;i:130;i:1;i:134;i:1;i:135;i:1;i:137;i:1;i:139;i:1;i:140;i:1;i:144;i:1;i:145;i:1;i:148;i:1;i:150;i:1;i:151;i:1;i:155;i:1;i:156;i:1;i:160;i:1;i:162;i:1;i:163;i:1;i:167;i:1;i:168;i:1;i:172;i:1;i:174;i:1;i:175;i:1;i:179;i:1;i:180;i:1;i:184;i:1;i:185;i:1;i:186;i:1;i:188;i:1;i:189;i:1;i:194;i:1;i:195;i:1;i:199;i:1;i:200;i:1;i:202;i:1;i:203;i:1;i:208;i:1;i:209;i:1;i:212;i:1;i:214;i:1;i:215;i:1;i:216;i:1;i:220;i:1;i:221;i:1;i:225;i:1;i:226;i:1;i:227;i:1;i:229;i:1;i:230;i:1;i:231;i:1;i:235;i:1;i:236;i:1;i:240;i:1;i:241;i:1;i:243;i:1;i:244;i:1;i:245;i:1;i:249;i:1;i:250;i:1;i:254;i:1;i:255;i:1;i:256;i:1;i:258;i:1;i:259;i:1;i:260;i:1;i:264;i:1;i:265;i:1;i:269;i:1;i:270;i:1;i:271;i:1;i:273;i:1;i:274;i:1;i:278;i:1;i:279;i:1;i:283;i:1;i:284;i:1;i:285;i:1;i:287;i:1;i:288;i:1;i:289;i:1;i:292;i:1;i:293;i:1;i:297;i:1;i:298;i:1;i:299;i:1;i:301;i:1;i:302;i:1;i:303;i:1;i:306;i:1;i:307;i:1;i:311;i:1;i:312;i:1;i:313;i:1;i:314;i:1;i:316;i:1;i:317;i:1;i:318;i:1;i:322;i:1;i:323;i:1;i:325;i:1;i:326;i:1;}s:50:"/home/bjartka/public_html/doctrine/models/User.php";a:31:{i:13;i:1;i:14;i:1;i:15;i:1;i:16;i:1;i:17;i:1;i:18;i:1;i:19;i:1;i:20;i:1;i:21;i:1;i:22;i:1;i:23;i:1;i:24;i:1;i:25;i:1;i:26;i:1;i:27;i:1;i:28;i:1;i:29;i:1;i:30;i:1;i:31;i:1;i:36;i:1;i:37;i:1;i:38;i:1;i:39;i:1;i:42;i:1;i:43;i:1;i:44;i:1;i:45;i:1;i:48;i:1;i:49;i:1;i:50;i:1;i:51;i:1;}s:68:"/home/bjartka/public_html/doctrine/lib/Doctrine/Connection/Mssql.php";a:85:{i:21;i:1;i:34;i:1;i:49;i:-1;i:50;i:1;i:51;i:1;i:52;i:1;i:53;i:1;i:54;i:1;i:55;i:1;i:56;i:1;i:57;i:1;i:58;i:1;i:59;i:1;i:60;i:1;i:61;i:1;i:62;i:1;i:63;i:1;i:64;i:1;i:67;i:1;i:68;i:1;i:82;i:1;i:83;i:1;i:84;i:-2;i:85;i:-1;i:86;i:-2;i:99;i:-1;i:100;i:-1;i:102;i:-1;i:103;i:-1;i:104;i:-1;i:105;i:-2;i:107;i:-1;i:108;i:-1;i:109;i:-1;i:110;i:-1;i:111;i:-1;i:112;i:-1;i:114;i:-1;i:116;i:-1;i:117;i:-1;i:118;i:-1;i:119;i:-1;i:120;i:-1;i:121;i:-1;i:122;i:-1;i:123;i:-1;i:124;i:-1;i:126;i:-1;i:128;i:-2;i:130;i:-1;i:131;i:-2;i:140;i:1;i:141;i:-1;i:142;i:-1;i:143;i:1;i:144;i:1;i:147;i:1;i:148;i:1;i:149;i:1;i:151;i:-1;i:152;i:-1;i:153;i:-1;i:154;i:-1;i:155;i:-1;i:156;i:-1;i:157;i:-1;i:159;i:1;i:160;i:1;i:161;i:1;i:162;i:1;i:163;i:1;i:164;i:1;i:166;i:1;i:167;i:1;i:168;i:-2;i:177;i:-1;i:179;i:-1;i:180;i:-1;i:181;i:-2;i:182;i:-2;i:183;i:-2;i:185;i:-2;i:187;i:-1;i:188;i:-2;i:189;i:1;}s:67:"/home/bjartka/public_html/doctrine/tests/Sequence/MysqlTestCase.php";a:13:{i:37;i:1;i:39;i:1;i:40;i:1;i:43;i:1;i:45;i:1;i:47;i:1;i:48;i:1;i:49;i:1;i:50;i:1;i:53;i:1;i:55;i:1;i:57;i:1;i:58;i:1;}s:66:"/home/bjartka/public_html/doctrine/lib/Doctrine/Sequence/Pgsql.php";a:22:{i:21;i:1;i:33;i:1;i:45;i:1;i:47;i:1;i:49;i:1;i:50;i:1;i:51;i:-2;i:54;i:-2;i:55;i:-2;i:56;i:-2;i:58;i:-2;i:59;i:-2;i:61;i:1;i:62;i:-2;i:75;i:1;i:76;i:1;i:78;i:1;i:79;i:-2;i:89;i:1;i:90;i:1;i:91;i:-2;i:92;i:1;}s:60:"/home/bjartka/public_html/doctrine/lib/Doctrine/AuditLog.php";a:42:{i:32;i:1;i:46;i:1;i:47;i:1;i:51;i:1;i:53;i:1;i:55;i:1;i:56;i:1;i:57;i:1;i:58;i:1;i:59;i:1;i:60;i:1;i:62;i:1;i:64;i:1;i:65;i:1;i:67;i:1;i:68;i:-2;i:71;i:1;i:72;i:1;i:73;i:1;i:75;i:1;i:77;i:1;i:80;i:1;i:81;i:-1;i:82;i:-2;i:84;i:1;i:87;i:1;i:88;i:1;i:89;i:1;i:90;i:1;i:91;i:1;i:94;i:1;i:96;i:1;i:98;i:1;i:100;i:1;i:101;i:1;i:102;i:1;i:103;i:1;i:105;i:1;i:107;i:1;i:109;i:1;i:110;i:-2;i:112;i:1;}s:58:"/home/bjartka/public_html/doctrine/lib/Doctrine/Plugin.php";a:53:{i:34;i:1;i:47;i:-1;i:48;i:-1;i:49;i:-2;i:50;i:-1;i:51;i:-2;i:59;i:-1;i:60;i:-2;i:69;i:1;i:70;i:-1;i:71;i:-2;i:73;i:1;i:74;i:-2;i:84;i:1;i:85;i:-1;i:86;i:-2;i:88;i:1;i:90;i:1;i:91;i:-2;i:99;i:-1;i:100;i:-2;i:112;i:1;i:114;i:1;i:115;i:1;i:117;i:1;i:118;i:1;i:119;i:1;i:121;i:1;i:123;i:1;i:124;i:1;i:125;i:1;i:126;i:1;i:127;i:-2;i:140;i:1;i:142;i:1;i:143;i:1;i:144;i:1;i:145;i:1;i:146;i:1;i:148;i:1;i:149;i:-2;i:162;i:1;i:164;i:1;i:165;i:-1;i:166;i:-1;i:168;i:-1;i:169;i:-1;i:170;i:-1;i:172;i:-1;i:173;i:1;i:175;i:1;i:177;i:1;i:179;i:1;}s:65:"/home/bjartka/public_html/doctrine/lib/Doctrine/Hook/WordLike.php";a:16:{i:21;i:1;i:33;i:1;i:49;i:1;i:50;i:1;i:52;i:1;i:53;i:1;i:55;i:1;i:56;i:1;i:58;i:1;i:59;i:1;i:60;i:1;i:61;i:1;i:62;i:1;i:64;i:1;i:65;i:-2;i:66;i:1;}s:58:"/home/bjartka/public_html/doctrine/tests/QueryTestCase.php";a:36:{i:38;i:1;i:40;i:1;i:42;i:1;i:45;i:1;i:46;i:1;i:51;i:1;i:53;i:1;i:55;i:1;i:57;i:1;i:59;i:1;i:60;i:1;i:63;i:1;i:65;i:1;i:67;i:1;i:68;i:1;i:72;i:1;i:74;i:1;i:76;i:1;i:78;i:1;i:80;i:1;i:81;i:1;i:85;i:1;i:87;i:1;i:89;i:1;i:91;i:1;i:93;i:1;i:94;i:1;i:98;i:1;i:99;i:1;i:100;i:1;i:102;i:1;i:103;i:1;i:109;i:1;i:110;i:1;i:111;i:1;i:112;i:1;}s:68:"/home/bjartka/public_html/doctrine/lib/Doctrine/Schema/Exception.php";a:3:{i:21;i:1;i:34;i:1;i:36;i:1;}s:59:"/home/bjartka/public_html/doctrine/tests/RawSqlTestCase.php";a:120:{i:39;i:1;i:40;i:1;i:41;i:1;i:43;i:1;i:46;i:1;i:47;i:1;i:49;i:1;i:50;i:1;i:51;i:1;i:52;i:1;i:57;i:1;i:58;i:1;i:59;i:1;i:61;i:1;i:63;i:1;i:65;i:1;i:67;i:1;i:68;i:1;i:71;i:1;i:72;i:1;i:76;i:1;i:77;i:1;i:79;i:1;i:80;i:1;i:82;i:1;i:84;i:1;i:86;i:1;i:87;i:1;i:88;i:1;i:91;i:1;i:94;i:1;i:95;i:1;i:97;i:1;i:99;i:1;i:101;i:1;i:103;i:1;i:104;i:1;i:105;i:1;i:109;i:1;i:112;i:1;i:114;i:1;i:116;i:1;i:118;i:1;i:119;i:1;i:121;i:1;i:123;i:1;i:124;i:1;i:126;i:1;i:127;i:1;i:128;i:1;i:131;i:1;i:132;i:1;i:134;i:1;i:135;i:1;i:137;i:1;i:139;i:1;i:140;i:1;i:142;i:1;i:144;i:1;i:145;i:1;i:147;i:1;i:148;i:1;i:149;i:1;i:154;i:1;i:156;i:1;i:158;i:1;i:160;i:1;i:161;i:1;i:162;i:1;i:163;i:1;i:164;i:1;i:167;i:1;i:168;i:1;i:169;i:1;i:171;i:1;i:173;i:1;i:174;i:1;i:175;i:1;i:176;i:1;i:177;i:1;i:183;i:1;i:185;i:1;i:186;i:1;i:187;i:1;i:189;i:1;i:190;i:1;i:191;i:1;i:192;i:1;i:193;i:1;i:199;i:1;i:201;i:1;i:202;i:1;i:204;i:1;i:207;i:1;i:209;i:1;i:210;i:1;i:211;i:1;i:212;i:1;i:214;i:1;i:218;i:1;i:220;i:1;i:222;i:1;i:223;i:1;i:224;i:1;i:228;i:1;i:230;i:1;i:231;i:1;i:232;i:1;i:233;i:1;i:234;i:1;i:236;i:1;i:237;i:1;i:241;i:1;i:243;i:1;i:244;i:1;i:245;i:1;i:246;i:1;i:247;i:1;i:249;i:1;i:250;i:1;}s:65:"/home/bjartka/public_html/doctrine/models/InheritanceDealUser.php";a:18:{i:6;i:1;i:8;i:1;i:9;i:1;i:10;i:1;i:11;i:1;i:15;i:1;i:22;i:1;i:24;i:1;i:26;i:1;i:27;i:1;i:28;i:1;i:32;i:1;i:34;i:1;i:35;i:1;i:36;i:1;i:37;i:1;i:38;i:1;i:39;i:1;}s:67:"/home/bjartka/public_html/doctrine/lib/Doctrine/Relation/Parser.php";a:227:{i:33;i:1;i:53;i:1;i:54;i:1;i:62;i:-1;i:63;i:-2;i:71;i:1;i:72;i:-1;i:73;i:-2;i:75;i:1;i:76;i:-2;i:80;i:1;i:81;i:1;i:82;i:-2;i:84;i:1;i:85;i:-2;i:95;i:1;i:96;i:-1;i:97;i:-1;i:99;i:1;i:101;i:1;i:102;i:-1;i:103;i:-2;i:105;i:1;i:106;i:1;i:107;i:1;i:109;i:1;i:110;i:1;i:111;i:-2;i:113;i:1;i:125;i:1;i:126;i:-2;i:134;i:1;i:135;i:1;i:136;i:-2;i:138;i:1;i:139;i:1;i:143;i:1;i:144;i:1;i:145;i:1;i:147;i:1;i:148;i:1;i:150;i:1;i:151;i:1;i:152;i:1;i:153;i:1;i:154;i:1;i:155;i:1;i:156;i:1;i:157;i:1;i:158;i:1;i:160;i:1;i:161;i:1;i:162;i:1;i:163;i:1;i:164;i:1;i:165;i:1;i:166;i:1;i:167;i:1;i:168;i:1;i:169;i:1;i:171;i:1;i:173;i:1;i:175;i:1;i:177;i:1;i:178;i:1;i:179;i:1;i:182;i:1;i:184;i:1;i:186;i:1;i:187;i:1;i:188;i:-2;i:189;i:-1;i:190;i:1;i:191;i:1;i:193;i:1;i:194;i:-2;i:195;i:1;i:197;i:-2;i:206;i:1;i:207;i:1;i:208;i:1;i:210;i:1;i:211;i:-2;i:222;i:1;i:224;i:1;i:225;i:1;i:227;i:1;i:228;i:1;i:229;i:-2;i:230;i:1;i:231;i:1;i:234;i:1;i:235;i:-2;i:244;i:1;i:245;i:1;i:246;i:1;i:247;i:1;i:249;i:1;i:251;i:1;i:252;i:1;i:256;i:-1;i:257;i:-1;i:258;i:1;i:262;i:1;i:263;i:1;i:264;i:1;i:266;i:1;i:270;i:1;i:272;i:1;i:273;i:1;i:274;i:1;i:277;i:1;i:279;i:1;i:280;i:1;i:282;i:1;i:283;i:-2;i:295;i:1;i:296;i:-1;i:297;i:-1;i:298;i:-1;i:299;i:-1;i:300;i:-1;i:301;i:-1;i:302;i:1;i:303;i:1;i:306;i:1;i:307;i:-2;i:317;i:1;i:319;i:1;i:321;i:1;i:322;i:1;i:323;i:-2;i:325;i:1;i:326;i:1;i:328;i:1;i:329;i:1;i:330;i:-1;i:331;i:-1;i:332;i:-2;i:333;i:1;i:334;i:1;i:335;i:1;i:336;i:-2;i:337;i:-1;i:339;i:1;i:340;i:-1;i:341;i:-2;i:343;i:1;i:344;i:-2;i:353;i:1;i:354;i:1;i:355;i:1;i:357;i:1;i:358;i:1;i:360;i:1;i:361;i:1;i:365;i:1;i:366;i:1;i:367;i:1;i:370;i:1;i:371;i:1;i:373;i:1;i:374;i:1;i:375;i:1;i:376;i:1;i:377;i:1;i:379;i:1;i:380;i:1;i:383;i:1;i:384;i:1;i:386;i:1;i:387;i:1;i:388;i:-2;i:390;i:1;i:391;i:1;i:393;i:1;i:397;i:1;i:400;i:1;i:401;i:1;i:402;i:1;i:403;i:1;i:405;i:1;i:406;i:1;i:407;i:1;i:408;i:1;i:409;i:1;i:411;i:1;i:412;i:-2;i:413;i:1;i:414;i:1;i:416;i:1;i:417;i:1;i:418;i:1;i:419;i:1;i:421;i:1;i:422;i:1;i:423;i:1;i:424;i:1;i:425;i:1;i:426;i:1;i:427;i:1;i:428;i:-2;i:429;i:-1;i:430;i:-1;i:433;i:-1;i:434;i:-1;i:435;i:-1;i:436;i:-1;i:438;i:-1;i:439;i:-1;i:440;i:-1;i:442;i:-1;i:443;i:-1;i:444;i:-1;i:445;i:-1;i:446;i:-1;i:448;i:-1;i:450;i:-1;i:451;i:-1;i:452;i:-1;i:453;i:-1;i:454;i:-1;i:455;i:-1;i:457;i:-1;i:460;i:1;i:461;i:-2;i:462;i:1;}s:72:"/home/bjartka/public_html/doctrine/lib/Doctrine/Connection/Exception.php";a:10:{i:21;i:1;i:33;i:1;i:86;i:1;i:87;i:-2;i:96;i:-1;i:97;i:-2;i:110;i:-1;i:111;i:-1;i:112;i:-2;i:113;i:1;}s:53:"/home/bjartka/public_html/doctrine/models/Address.php";a:6:{i:6;i:1;i:7;i:1;i:8;i:1;i:9;i:1;i:11;i:1;i:12;i:1;}s:72:"/home/bjartka/public_html/doctrine/lib/Doctrine/Transaction/Firebird.php";a:51:{i:21;i:1;i:33;i:1;i:44;i:1;i:46;i:1;i:47;i:-2;i:57;i:1;i:59;i:1;i:60;i:-2;i:70;i:1;i:72;i:1;i:73;i:-2;i:93;i:1;i:94;i:1;i:95;i:1;i:96;i:1;i:97;i:1;i:98;i:1;i:99;i:1;i:100;i:1;i:101;i:1;i:102;i:1;i:103;i:1;i:104;i:1;i:105;i:1;i:106;i:1;i:107;i:1;i:109;i:1;i:111;i:1;i:112;i:1;i:113;i:1;i:114;i:1;i:115;i:1;i:116;i:1;i:117;i:1;i:118;i:1;i:119;i:1;i:120;i:1;i:122;i:1;i:123;i:1;i:124;i:1;i:125;i:1;i:126;i:1;i:127;i:1;i:128;i:1;i:129;i:1;i:130;i:1;i:131;i:1;i:133;i:1;i:135;i:1;i:136;i:1;i:137;i:1;}s:67:"/home/bjartka/public_html/doctrine/lib/Doctrine/Export/Firebird.php";a:194:{i:21;i:1;i:35;i:1;i:45;i:1;i:47;i:1;i:48;i:-2;i:57;i:1;i:59;i:1;i:60;i:-2;i:71;i:1;i:72;i:-1;i:73;i:-1;i:74;i:-1;i:76;i:-1;i:77;i:-1;i:78;i:-1;i:79;i:-1;i:80;i:1;i:83;i:1;i:84;i:1;i:86;i:1;i:87;i:1;i:89;i:1;i:93;i:1;i:94;i:1;i:95;i:1;i:96;i:1;i:100;i:1;i:101;i:-2;i:111;i:-1;i:114;i:-1;i:115;i:-1;i:117;i:-1;i:118;i:-2;i:151;i:1;i:154;i:1;i:155;i:1;i:158;i:1;i:159;i:1;i:160;i:1;i:162;i:1;i:163;i:1;i:166;i:1;i:167;i:-2;i:168;i:1;i:169;i:1;i:178;i:-1;i:180;i:-1;i:181;i:-1;i:182;i:-1;i:183;i:-1;i:184;i:-1;i:188;i:-1;i:189;i:-1;i:190;i:-1;i:191;i:-1;i:192;i:-1;i:193;i:-1;i:194;i:-1;i:195;i:-1;i:196;i:-1;i:197;i:-1;i:198;i:-2;i:208;i:-1;i:209;i:-1;i:213;i:-1;i:214;i:-2;i:305;i:-1;i:307;i:-1;i:308;i:-1;i:309;i:-1;i:310;i:-1;i:311;i:-1;i:312;i:-1;i:313;i:-1;i:314;i:-1;i:315;i:-1;i:316;i:-1;i:317;i:-1;i:318;i:-1;i:319;i:-1;i:320;i:-1;i:321;i:-1;i:322;i:-2;i:323;i:-1;i:324;i:-1;i:325;i:-1;i:326;i:-1;i:327;i:-1;i:328;i:-1;i:329;i:-1;i:330;i:-1;i:331;i:-1;i:333;i:-1;i:334;i:-1;i:335;i:-1;i:336;i:-1;i:337;i:-1;i:338;i:-1;i:339;i:-1;i:340;i:-1;i:341;i:-1;i:343;i:-1;i:344;i:-1;i:345;i:-1;i:346;i:-1;i:347;i:-1;i:348;i:-1;i:349;i:-1;i:350;i:-1;i:351;i:-1;i:353;i:-1;i:355;i:-1;i:356;i:-1;i:357;i:-1;i:358;i:-1;i:359;i:-1;i:360;i:-1;i:361;i:-1;i:362;i:-1;i:363;i:-1;i:364;i:-1;i:366;i:-1;i:367;i:-1;i:368;i:-2;i:370;i:-1;i:371;i:-1;i:372;i:-1;i:373;i:-1;i:374;i:-2;i:408;i:-1;i:410;i:-1;i:411;i:-1;i:412;i:-1;i:413;i:-1;i:414;i:-1;i:415;i:-1;i:416;i:-1;i:417;i:-1;i:418;i:-1;i:419;i:-1;i:420;i:-1;i:421;i:-1;i:422;i:-1;i:423;i:-1;i:424;i:-1;i:425;i:-1;i:426;i:-1;i:427;i:-1;i:428;i:-1;i:429;i:-1;i:430;i:-1;i:432;i:-1;i:433;i:-2;i:457;i:1;i:459;i:1;i:460;i:-1;i:461;i:-1;i:462;i:1;i:463;i:1;i:464;i:1;i:465;i:-1;i:466;i:-1;i:467;i:1;i:468;i:1;i:469;i:-1;i:470;i:-1;i:471;i:-1;i:472;i:-1;i:474;i:1;i:475;i:1;i:476;i:1;i:477;i:1;i:478;i:1;i:479;i:1;i:481;i:1;i:482;i:-2;i:492;i:-1;i:493;i:-2;i:509;i:1;i:511;i:1;i:514;i:1;i:516;i:1;i:517;i:-2;i:519;i:-2;i:520;i:-2;i:521;i:-2;i:524;i:-2;i:525;i:-2;i:534;i:-1;i:535;i:-1;i:536;i:-1;i:538;i:-1;i:539;i:-2;i:540;i:1;}s:71:"/home/bjartka/public_html/doctrine/tests/Relation/OneToManyTestCase.php";a:47:{i:36;i:1;i:39;i:1;i:41;i:1;i:42;i:1;i:45;i:1;i:47;i:1;i:49;i:1;i:51;i:1;i:53;i:1;i:54;i:1;i:58;i:1;i:60;i:1;i:62;i:1;i:63;i:1;i:67;i:1;i:69;i:1;i:71;i:1;i:72;i:1;i:75;i:1;i:76;i:1;i:78;i:1;i:79;i:1;i:81;i:1;i:82;i:1;i:84;i:1;i:85;i:1;i:88;i:1;i:89;i:1;i:90;i:1;i:92;i:1;i:93;i:1;i:94;i:1;i:95;i:1;i:96;i:1;i:100;i:1;i:101;i:1;i:102;i:1;i:103;i:1;i:105;i:1;i:106;i:1;i:107;i:1;i:108;i:1;i:110;i:1;i:112;i:1;i:114;i:1;i:116;i:1;i:117;i:1;}s:55:"/home/bjartka/public_html/doctrine/models/EnumTest3.php";a:2:{i:5;i:1;i:6;i:1;}s:57:"/home/bjartka/public_html/doctrine/tests/ViewTestCase.php";a:26:{i:38;i:1;i:39;i:1;i:41;i:1;i:43;i:1;i:45;i:1;i:46;i:1;i:47;i:1;i:49;i:1;i:52;i:1;i:53;i:1;i:54;i:-2;i:56;i:1;i:58;i:1;i:59;i:1;i:60;i:1;i:61;i:1;i:62;i:1;i:63;i:1;i:64;i:1;i:66;i:1;i:68;i:1;i:69;i:1;i:70;i:-2;i:72;i:1;i:73;i:1;i:77;i:1;}s:67:"/home/bjartka/public_html/doctrine/lib/Doctrine/Validator/Range.php";a:10:{i:34;i:1;i:43;i:1;i:44;i:1;i:45;i:-2;i:46;i:-1;i:47;i:-1;i:48;i:-2;i:49;i:-1;i:50;i:-2;i:51;i:1;}s:70:"/home/bjartka/public_html/doctrine/lib/Doctrine/Validator/Notblank.php";a:4:{i:33;i:1;i:44;i:1;i:45;i:-2;i:46;i:1;}s:56:"/home/bjartka/public_html/doctrine/lib/Doctrine/I18n.php";a:49:{i:32;i:1;i:46;i:1;i:47;i:1;i:51;i:1;i:52;i:-1;i:53;i:-2;i:55;i:1;i:56;i:1;i:57;i:1;i:59;i:1;i:61;i:1;i:62;i:-1;i:63;i:-2;i:65;i:1;i:67;i:1;i:69;i:1;i:71;i:1;i:72;i:1;i:73;i:1;i:75;i:1;i:76;i:1;i:77;i:1;i:79;i:1;i:80;i:1;i:82;i:1;i:84;i:1;i:85;i:1;i:86;i:1;i:87;i:1;i:88;i:1;i:89;i:1;i:91;i:1;i:92;i:1;i:93;i:1;i:94;i:1;i:96;i:1;i:98;i:1;i:99;i:1;i:100;i:1;i:101;i:1;i:104;i:1;i:106;i:1;i:107;i:1;i:109;i:1;i:111;i:1;i:113;i:1;i:115;i:1;i:116;i:-2;i:118;i:1;}s:60:"/home/bjartka/public_html/doctrine/models/QueryTest_Item.php";a:3:{i:6;i:1;i:7;i:1;i:8;i:1;}s:65:"/home/bjartka/public_html/doctrine/tests/Query/SelectTestCase.php";a:72:{i:126;i:1;i:129;i:1;i:131;i:1;i:132;i:-1;i:133;i:1;i:134;i:1;i:136;i:1;i:140;i:1;i:142;i:1;i:144;i:1;i:146;i:1;i:148;i:1;i:149;i:1;i:150;i:1;i:151;i:1;i:152;i:1;i:156;i:1;i:158;i:1;i:160;i:1;i:161;i:1;i:164;i:1;i:166;i:1;i:168;i:1;i:169;i:1;i:172;i:1;i:174;i:1;i:176;i:1;i:177;i:1;i:180;i:1;i:182;i:1;i:184;i:1;i:185;i:1;i:189;i:1;i:191;i:1;i:193;i:1;i:195;i:1;i:196;i:1;i:197;i:1;i:198;i:1;i:199;i:1;i:200;i:1;i:203;i:1;i:205;i:1;i:207;i:1;i:208;i:1;i:209;i:1;i:210;i:1;i:211;i:1;i:212;i:1;i:214;i:1;i:215;i:1;i:216;i:1;i:217;i:1;i:218;i:1;i:219;i:1;i:222;i:1;i:224;i:1;i:226;i:1;i:228;i:1;i:230;i:1;i:232;i:1;i:234;i:1;i:235;i:1;i:236;i:1;i:237;i:1;i:238;i:1;i:240;i:1;i:241;i:1;i:242;i:1;i:243;i:1;i:244;i:1;i:245;i:1;}s:59:"/home/bjartka/public_html/doctrine/tests/RecordTestCase.php";a:537:{i:38;i:1;i:39;i:1;i:40;i:1;i:41;i:1;i:42;i:1;i:43;i:1;i:44;i:1;i:48;i:1;i:49;i:1;i:51;i:1;i:53;i:1;i:55;i:1;i:56;i:1;i:57;i:1;i:58;i:1;i:59;i:1;i:60;i:1;i:61;i:1;i:63;i:1;i:64;i:1;i:66;i:1;i:68;i:1;i:69;i:1;i:70;i:1;i:71;i:1;i:72;i:1;i:73;i:1;i:76;i:1;i:77;i:1;i:78;i:1;i:79;i:1;i:80;i:1;i:82;i:1;i:83;i:1;i:84;i:1;i:86;i:1;i:87;i:1;i:88;i:1;i:91;i:1;i:92;i:1;i:95;i:1;i:96;i:1;i:98;i:1;i:99;i:1;i:101;i:1;i:102;i:1;i:103;i:1;i:105;i:1;i:109;i:1;i:110;i:1;i:111;i:1;i:113;i:1;i:115;i:1;i:116;i:1;i:117;i:1;i:118;i:1;i:122;i:1;i:124;i:1;i:126;i:1;i:128;i:1;i:129;i:-1;i:130;i:1;i:131;i:1;i:132;i:1;i:135;i:1;i:139;i:1;i:140;i:1;i:142;i:1;i:143;i:1;i:144;i:1;i:145;i:1;i:146;i:1;i:148;i:1;i:149;i:1;i:150;i:1;i:152;i:1;i:154;i:1;i:155;i:1;i:156;i:1;i:157;i:1;i:158;i:1;i:159;i:1;i:164;i:1;i:166;i:1;i:167;i:1;i:168;i:1;i:169;i:1;i:170;i:1;i:171;i:1;i:176;i:1;i:178;i:1;i:180;i:1;i:181;i:1;i:184;i:1;i:185;i:1;i:186;i:1;i:188;i:1;i:190;i:1;i:192;i:1;i:194;i:1;i:195;i:1;i:196;i:1;i:197;i:1;i:198;i:1;i:200;i:1;i:202;i:1;i:204;i:1;i:205;i:1;i:206;i:1;i:207;i:1;i:208;i:1;i:209;i:1;i:210;i:1;i:212;i:1;i:214;i:1;i:215;i:1;i:216;i:1;i:217;i:1;i:218;i:1;i:219;i:1;i:223;i:1;i:224;i:1;i:225;i:1;i:227;i:1;i:228;i:1;i:232;i:1;i:233;i:1;i:234;i:1;i:236;i:1;i:238;i:1;i:240;i:1;i:242;i:1;i:243;i:1;i:245;i:1;i:249;i:1;i:250;i:1;i:251;i:1;i:253;i:1;i:254;i:1;i:255;i:1;i:259;i:1;i:260;i:1;i:261;i:1;i:262;i:1;i:263;i:1;i:264;i:1;i:265;i:1;i:268;i:1;i:269;i:1;i:270;i:1;i:271;i:1;i:272;i:1;i:274;i:1;i:275;i:1;i:276;i:1;i:277;i:1;i:278;i:1;i:279;i:1;i:281;i:1;i:282;i:1;i:283;i:1;i:284;i:1;i:285;i:1;i:287;i:1;i:288;i:1;i:289;i:1;i:290;i:1;i:292;i:1;i:294;i:1;i:295;i:1;i:296;i:1;i:297;i:1;i:298;i:1;i:299;i:1;i:301;i:1;i:302;i:1;i:303;i:1;i:304;i:1;i:305;i:1;i:306;i:1;i:308;i:1;i:309;i:1;i:310;i:1;i:311;i:1;i:313;i:1;i:314;i:1;i:315;i:1;i:316;i:1;i:317;i:1;i:319;i:1;i:320;i:1;i:321;i:1;i:322;i:1;i:324;i:1;i:325;i:1;i:326;i:1;i:327;i:1;i:328;i:1;i:330;i:1;i:331;i:1;i:332;i:1;i:337;i:1;i:339;i:1;i:340;i:1;i:342;i:1;i:344;i:1;i:345;i:1;i:346;i:1;i:348;i:1;i:349;i:1;i:350;i:1;i:351;i:1;i:354;i:1;i:355;i:1;i:357;i:1;i:358;i:1;i:359;i:1;i:361;i:1;i:362;i:1;i:363;i:1;i:364;i:1;i:366;i:1;i:368;i:1;i:370;i:1;i:371;i:1;i:372;i:1;i:373;i:1;i:375;i:1;i:380;i:1;i:381;i:1;i:382;i:1;i:383;i:1;i:384;i:1;i:385;i:1;i:386;i:1;i:387;i:1;i:388;i:1;i:389;i:1;i:390;i:1;i:391;i:1;i:393;i:1;i:397;i:1;i:399;i:1;i:400;i:1;i:401;i:1;i:402;i:1;i:404;i:1;i:405;i:1;i:406;i:1;i:407;i:1;i:408;i:1;i:409;i:1;i:413;i:1;i:415;i:1;i:416;i:1;i:417;i:1;i:418;i:1;i:419;i:1;i:423;i:1;i:424;i:1;i:425;i:1;i:427;i:1;i:428;i:1;i:430;i:1;i:432;i:1;i:433;i:1;i:434;i:1;i:435;i:1;i:439;i:1;i:440;i:1;i:441;i:1;i:443;i:1;i:444;i:1;i:446;i:1;i:448;i:1;i:449;i:1;i:451;i:1;i:452;i:1;i:455;i:1;i:456;i:1;i:457;i:1;i:458;i:1;i:459;i:1;i:461;i:1;i:465;i:1;i:466;i:1;i:467;i:1;i:468;i:1;i:471;i:1;i:472;i:1;i:473;i:1;i:475;i:1;i:476;i:1;i:477;i:1;i:478;i:1;i:480;i:1;i:481;i:1;i:482;i:1;i:485;i:1;i:486;i:1;i:487;i:1;i:488;i:1;i:489;i:1;i:491;i:1;i:492;i:1;i:493;i:1;i:494;i:1;i:495;i:1;i:496;i:1;i:498;i:1;i:499;i:1;i:500;i:1;i:501;i:1;i:503;i:1;i:505;i:1;i:506;i:1;i:509;i:1;i:510;i:1;i:511;i:1;i:513;i:1;i:514;i:1;i:515;i:1;i:517;i:1;i:518;i:1;i:522;i:1;i:523;i:1;i:524;i:1;i:525;i:1;i:528;i:1;i:529;i:1;i:530;i:1;i:531;i:1;i:533;i:1;i:534;i:1;i:535;i:1;i:536;i:1;i:537;i:1;i:538;i:1;i:542;i:1;i:543;i:1;i:544;i:1;i:546;i:1;i:548;i:1;i:549;i:1;i:551;i:1;i:552;i:1;i:553;i:1;i:557;i:1;i:558;i:1;i:561;i:1;i:564;i:1;i:565;i:1;i:566;i:1;i:570;i:1;i:571;i:1;i:573;i:1;i:574;i:1;i:576;i:1;i:577;i:1;i:578;i:1;i:579;i:1;i:580;i:1;i:581;i:1;i:582;i:1;i:583;i:1;i:587;i:1;i:588;i:1;i:590;i:1;i:591;i:1;i:593;i:1;i:595;i:1;i:596;i:1;i:598;i:1;i:599;i:1;i:601;i:1;i:602;i:1;i:603;i:1;i:604;i:1;i:608;i:1;i:610;i:1;i:611;i:1;i:613;i:1;i:615;i:1;i:616;i:1;i:617;i:1;i:619;i:1;i:621;i:1;i:623;i:1;i:624;i:1;i:626;i:1;i:627;i:1;i:631;i:1;i:633;i:1;i:634;i:1;i:635;i:1;i:637;i:1;i:640;i:1;i:642;i:1;i:643;i:1;i:644;i:1;i:646;i:1;i:647;i:1;i:649;i:1;i:650;i:1;i:651;i:1;i:652;i:1;i:656;i:1;i:658;i:1;i:659;i:1;i:660;i:1;i:661;i:1;i:665;i:1;i:666;i:1;i:667;i:1;i:669;i:1;i:670;i:1;i:671;i:1;i:672;i:1;i:675;i:1;i:676;i:1;i:677;i:1;i:678;i:1;i:679;i:1;i:681;i:1;i:682;i:1;i:683;i:1;i:685;i:1;i:691;i:1;i:692;i:1;i:693;i:1;i:695;i:1;i:697;i:1;i:698;i:1;i:699;i:1;i:701;i:1;i:703;i:1;i:704;i:1;i:705;i:1;i:706;i:1;i:707;i:1;i:711;i:1;i:712;i:1;i:713;i:1;i:715;i:1;i:716;i:1;i:717;i:1;i:718;i:1;i:720;i:1;i:721;i:1;i:722;i:1;i:724;i:1;i:727;i:1;i:731;i:1;i:732;i:1;i:734;i:1;i:735;i:1;i:740;i:1;i:742;i:1;i:744;i:1;i:745;i:1;i:746;i:1;i:752;i:1;i:753;i:1;i:754;i:1;i:755;i:1;i:757;i:1;i:759;i:1;i:760;i:1;i:764;i:1;i:765;i:1;i:766;i:1;i:767;i:1;i:768;i:1;i:770;i:1;i:771;i:1;i:773;i:1;i:774;i:1;i:778;i:1;i:779;i:1;i:780;i:1;i:781;i:1;i:782;i:1;i:786;i:1;i:787;i:1;i:788;i:1;i:789;i:1;i:791;i:1;i:792;i:1;i:793;i:1;i:794;i:1;i:796;i:1;i:797;i:1;i:798;i:1;i:800;i:1;i:801;i:1;i:806;i:1;i:807;i:1;i:809;i:1;i:810;i:1;i:812;i:1;i:813;i:1;i:814;i:1;i:815;i:1;i:816;i:1;i:817;i:1;i:818;i:1;i:820;i:1;i:821;i:1;i:823;i:1;i:825;i:1;i:826;i:1;i:827;i:1;i:829;i:1;i:834;i:1;i:836;i:1;i:837;i:1;i:841;i:1;i:843;i:1;i:844;i:1;i:845;i:1;i:847;i:1;i:848;i:1;i:851;i:1;i:852;i:1;i:853;i:1;i:857;i:1;i:858;i:1;i:859;i:1;i:860;i:1;i:861;i:1;i:862;i:1;i:863;i:1;i:864;i:1;i:865;i:1;i:866;i:1;i:867;i:1;i:868;i:1;}s:61:"/home/bjartka/public_html/doctrine/models/ColumnAliasTest.php";a:4:{i:6;i:1;i:7;i:1;i:8;i:1;i:11;i:1;}s:58:"/home/bjartka/public_html/doctrine/models/ConcreteUser.php";a:2:{i:6;i:1;i:7;i:1;}s:58:"/home/bjartka/public_html/doctrine/lib/Doctrine/Search.php";a:97:{i:33;i:1;i:44;i:1;i:46;i:1;i:47;i:1;i:48;i:1;i:49;i:1;i:54;i:1;i:55;i:-2;i:66;i:1;i:67;i:1;i:68;i:1;i:70;i:1;i:72;i:1;i:74;i:1;i:75;i:1;i:76;i:1;i:77;i:1;i:79;i:1;i:80;i:1;i:81;i:1;i:82;i:1;i:84;i:1;i:86;i:1;i:87;i:1;i:89;i:1;i:90;i:1;i:91;i:1;i:92;i:1;i:94;i:1;i:95;i:1;i:96;i:1;i:98;i:1;i:102;i:1;i:103;i:1;i:104;i:1;i:105;i:1;i:106;i:1;i:107;i:1;i:111;i:1;i:113;i:1;i:114;i:1;i:115;i:1;i:116;i:1;i:117;i:1;i:119;i:1;i:121;i:1;i:122;i:1;i:123;i:1;i:125;i:1;i:127;i:1;i:128;i:1;i:130;i:1;i:131;i:1;i:132;i:1;i:134;i:1;i:135;i:1;i:136;i:1;i:138;i:1;i:139;i:1;i:140;i:1;i:141;i:1;i:143;i:1;i:144;i:1;i:145;i:-2;i:147;i:1;i:155;i:-1;i:156;i:-1;i:157;i:-1;i:159;i:-1;i:160;i:-1;i:163;i:1;i:165;i:1;i:167;i:1;i:169;i:1;i:170;i:1;i:171;i:-2;i:173;i:1;i:174;i:1;i:175;i:1;i:176;i:1;i:177;i:1;i:178;i:1;i:179;i:1;i:180;i:1;i:181;i:1;i:182;i:1;i:183;i:1;i:185;i:1;i:187;i:1;i:189;i:1;i:190;i:1;i:192;i:1;i:194;i:1;i:196;i:1;i:198;i:1;i:199;i:-2;i:201;i:1;}s:51:"/home/bjartka/public_html/doctrine/lib/Doctrine.php";a:191:{i:0;i:1;i:371;i:-1;i:372;i:-2;i:384;i:-1;i:385;i:-1;i:386;i:-1;i:387;i:-1;i:388;i:-2;i:397;i:-1;i:398;i:-1;i:399;i:-1;i:400;i:-1;i:401;i:-2;i:410;i:-1;i:412;i:-1;i:413;i:-1;i:414;i:-1;i:415;i:-1;i:426;i:1;i:428;i:1;i:429;i:1;i:430;i:1;i:431;i:1;i:433;i:1;i:434;i:1;i:435;i:1;i:436;i:1;i:437;i:1;i:438;i:1;i:439;i:1;i:441;i:1;i:442;i:1;i:444;i:1;i:445;i:-2;i:456;i:1;i:457;i:-1;i:458;i:-1;i:460;i:1;i:462;i:1;i:466;i:1;i:467;i:1;i:473;i:1;i:474;i:1;i:475;i:1;i:476;i:-1;i:477;i:-2;i:479;i:1;i:480;i:1;i:482;i:1;i:483;i:-2;i:494;i:-1;i:496;i:-1;i:497;i:-1;i:498;i:-1;i:500;i:-1;i:501;i:-1;i:502;i:-2;i:503;i:-1;i:504;i:-1;i:515;i:-1;i:516;i:-2;i:528;i:-1;i:529;i:-2;i:541;i:-1;i:543;i:-1;i:545;i:-1;i:547;i:-1;i:548;i:-2;i:560;i:-1;i:562;i:-1;i:563;i:-2;i:573;i:1;i:574;i:-2;i:585;i:-1;i:586;i:-2;i:598;i:-1;i:600;i:-1;i:601;i:-2;i:612;i:-1;i:613;i:-1;i:614;i:-1;i:616;i:-1;i:618;i:-1;i:619;i:-1;i:620;i:-1;i:621;i:-2;i:623;i:-1;i:624;i:-1;i:625;i:-1;i:636;i:-1;i:637;i:-1;i:638;i:-1;i:640;i:-1;i:642;i:-1;i:643;i:-1;i:644;i:-1;i:645;i:-2;i:647;i:-1;i:648;i:-1;i:649;i:-1;i:661;i:-1;i:663;i:-1;i:664;i:-2;i:677;i:-1;i:680;i:-1;i:681;i:-1;i:683;i:-1;i:685;i:-1;i:687;i:-1;i:688;i:-1;i:689;i:-1;i:691;i:-1;i:693;i:-1;i:694;i:-2;i:706;i:-1;i:709;i:-1;i:710;i:-1;i:712;i:-1;i:714;i:-1;i:716;i:-1;i:717;i:-1;i:718;i:-1;i:720;i:-1;i:722;i:-1;i:723;i:-2;i:735;i:-1;i:737;i:-1;i:738;i:-2;i:750;i:-1;i:751;i:-1;i:753;i:-1;i:754;i:-1;i:756;i:-1;i:757;i:-1;i:758;i:-1;i:759;i:-1;i:760;i:-1;i:761;i:-1;i:762;i:-1;i:764;i:-1;i:765;i:-1;i:774;i:-1;i:775;i:-2;i:786;i:-1;i:787;i:-2;i:801;i:-1;i:802;i:-1;i:812;i:1;i:813;i:1;i:814;i:-2;i:815;i:1;i:816;i:-1;i:817;i:-1;i:818;i:1;i:820;i:1;i:821;i:1;i:822;i:-2;i:824;i:1;i:826;i:1;i:827;i:-2;i:839;i:-1;i:840;i:-1;i:841;i:-1;i:842;i:-1;i:843;i:-1;i:844;i:-1;i:845;i:-1;i:846;i:-1;i:847;i:-1;i:848;i:-1;i:849;i:-1;i:850;i:-1;i:851;i:-1;i:852;i:-1;i:853;i:-1;i:854;i:-1;i:855;i:-1;i:856;i:-1;i:857;i:-1;i:858;i:-2;i:867;i:1;i:868;i:-2;i:877;i:1;i:878;i:-2;i:888;i:1;i:889;i:-2;i:898;i:-1;i:899;i:-1;i:900;i:-2;i:902;i:-1;i:903;i:-2;}s:69:"/home/bjartka/public_html/doctrine/lib/Doctrine/Connection/Sqlite.php";a:41:{i:21;i:1;i:34;i:1;i:49;i:-1;i:50;i:1;i:51;i:1;i:52;i:1;i:53;i:1;i:54;i:1;i:55;i:1;i:56;i:1;i:57;i:1;i:58;i:1;i:59;i:1;i:60;i:1;i:61;i:1;i:62;i:1;i:63;i:1;i:64;i:1;i:65;i:1;i:66;i:1;i:67;i:1;i:76;i:1;i:78;i:1;i:79;i:1;i:80;i:1;i:81;i:1;i:82;i:1;i:83;i:1;i:84;i:1;i:93;i:1;i:94;i:1;i:95;i:-2;i:97;i:1;i:99;i:1;i:100;i:1;i:101;i:1;i:102;i:1;i:103;i:1;i:112;i:1;i:113;i:-2;i:114;i:1;}s:51:"/home/bjartka/public_html/doctrine/models/Album.php";a:8:{i:6;i:1;i:7;i:1;i:8;i:1;i:9;i:1;i:10;i:1;i:13;i:1;i:14;i:1;i:15;i:1;}s:69:"/home/bjartka/public_html/doctrine/lib/Doctrine/Connection/Oracle.php";a:43:{i:21;i:1;i:33;i:1;i:42;i:-1;i:43;i:1;i:44;i:1;i:45;i:1;i:46;i:1;i:47;i:1;i:48;i:1;i:49;i:1;i:50;i:1;i:51;i:1;i:52;i:1;i:53;i:1;i:54;i:1;i:55;i:1;i:56;i:1;i:57;i:1;i:58;i:1;i:59;i:1;i:60;i:1;i:71;i:1;i:72;i:1;i:79;i:-1;i:80;i:-1;i:96;i:1;i:97;i:1;i:98;i:1;i:99;i:1;i:100;i:-1;i:101;i:-1;i:102;i:1;i:104;i:1;i:105;i:1;i:106;i:1;i:108;i:1;i:109;i:1;i:110;i:1;i:112;i:1;i:113;i:1;i:114;i:1;i:115;i:-2;i:116;i:1;}s:63:"/home/bjartka/public_html/doctrine/models/TestMovieUserVote.php";a:4:{i:5;i:1;i:6;i:1;i:7;i:1;i:8;i:1;}s:55:"/home/bjartka/public_html/doctrine/models/EnumTest2.php";a:3:{i:5;i:1;i:6;i:1;i:7;i:1;}s:72:"/home/bjartka/public_html/doctrine/lib/Doctrine/Template/Versionable.php";a:10:{i:32;i:1;i:38;i:1;i:39;i:1;i:42;i:1;i:43;i:1;i:45;i:1;i:46;i:1;i:49;i:1;i:50;i:-2;i:51;i:1;}s:68:"/home/bjartka/public_html/doctrine/lib/Doctrine/Validator/Driver.php";a:23:{i:0;i:1;i:34;i:1;i:47;i:-1;i:48;i:-1;i:49;i:-2;i:50;i:-1;i:51;i:-2;i:59;i:-1;i:60;i:-2;i:70;i:1;i:72;i:1;i:73;i:-2;i:82;i:-1;i:83;i:-1;i:84;i:-2;i:86;i:-1;i:87;i:-2;i:97;i:-1;i:99;i:-1;i:100;i:-2;i:108;i:-1;i:109;i:-2;i:110;i:1;}s:61:"/home/bjartka/public_html/doctrine/models/QueryTest_Entry.php";a:7:{i:9;i:1;i:10;i:1;i:11;i:1;i:12;i:1;i:13;i:1;i:20;i:1;i:21;i:1;}s:62:"/home/bjartka/public_html/doctrine/tests/MigrationTestCase.php";a:7:{i:38;i:1;i:39;i:1;i:40;i:-1;i:43;i:-1;i:44;i:-1;i:47;i:-1;i:48;i:-1;}s:57:"/home/bjartka/public_html/doctrine/lib/Doctrine/Event.php";a:87:{i:0;i:1;i:33;i:1;i:105;i:1;i:106;i:1;i:107;i:1;i:108;i:1;i:109;i:1;i:117;i:1;i:118;i:-2;i:127;i:-1;i:128;i:-1;i:129;i:-1;i:130;i:-1;i:131;i:-1;i:132;i:-1;i:133;i:-1;i:134;i:-1;i:135;i:-1;i:136;i:-1;i:137;i:-1;i:138;i:-1;i:139;i:-1;i:141;i:-1;i:142;i:-1;i:143;i:-1;i:144;i:-1;i:145;i:-1;i:146;i:-1;i:148;i:-1;i:149;i:-1;i:150;i:-1;i:151;i:-1;i:152;i:-1;i:153;i:-1;i:155;i:-1;i:156;i:-1;i:157;i:-1;i:158;i:-1;i:159;i:-1;i:160;i:-1;i:162;i:-1;i:163;i:-1;i:164;i:-1;i:165;i:-1;i:166;i:-1;i:167;i:-1;i:168;i:-1;i:169;i:-1;i:170;i:-1;i:171;i:-1;i:172;i:-1;i:173;i:-1;i:174;i:-1;i:175;i:-1;i:183;i:1;i:184;i:-2;i:194;i:1;i:195;i:1;i:196;i:-2;i:198;i:1;i:199;i:-2;i:209;i:1;i:211;i:1;i:212;i:-2;i:223;i:1;i:225;i:1;i:226;i:-2;i:237;i:1;i:239;i:1;i:240;i:-2;i:249;i:1;i:250;i:1;i:259;i:1;i:260;i:-2;i:269;i:1;i:271;i:1;i:272;i:-2;i:282;i:1;i:283;i:-2;i:292;i:-1;i:293;i:-2;i:302;i:1;i:303;i:-1;i:304;i:-2;i:305;i:1;i:306;i:-2;i:308;i:1;}s:70:"/home/bjartka/public_html/doctrine/tests/Connection/OracleTestCase.php";a:54:{i:35;i:1;i:37;i:1;i:38;i:1;i:40;i:1;i:42;i:1;i:43;i:1;i:45;i:1;i:47;i:1;i:48;i:1;i:50;i:1;i:52;i:1;i:53;i:1;i:55;i:1;i:57;i:1;i:58;i:1;i:60;i:1;i:62;i:1;i:63;i:1;i:65;i:1;i:67;i:1;i:68;i:1;i:70;i:1;i:72;i:1;i:73;i:1;i:75;i:1;i:77;i:1;i:78;i:1;i:80;i:1;i:82;i:1;i:83;i:1;i:85;i:1;i:87;i:1;i:88;i:1;i:90;i:1;i:92;i:1;i:93;i:1;i:95;i:1;i:97;i:1;i:98;i:1;i:100;i:1;i:102;i:1;i:103;i:1;i:105;i:1;i:107;i:1;i:108;i:1;i:110;i:1;i:112;i:1;i:113;i:1;i:115;i:1;i:117;i:1;i:118;i:1;i:120;i:1;i:122;i:1;i:123;i:1;}s:70:"/home/bjartka/public_html/doctrine/tests/Connection/SqliteTestCase.php";a:33:{i:35;i:1;i:37;i:1;i:38;i:1;i:40;i:1;i:42;i:1;i:43;i:1;i:45;i:1;i:47;i:1;i:48;i:1;i:50;i:1;i:52;i:1;i:53;i:1;i:55;i:1;i:57;i:1;i:58;i:1;i:60;i:1;i:62;i:1;i:63;i:1;i:65;i:1;i:67;i:1;i:68;i:1;i:70;i:1;i:72;i:1;i:73;i:1;i:75;i:1;i:77;i:1;i:78;i:1;i:80;i:1;i:82;i:1;i:83;i:1;i:85;i:1;i:87;i:1;i:88;i:1;}s:50:"/home/bjartka/public_html/doctrine/models/Role.php";a:4:{i:6;i:1;i:7;i:1;i:10;i:1;i:11;i:1;}s:61:"/home/bjartka/public_html/doctrine/models/Record_District.php";a:2:{i:4;i:1;i:5;i:1;}s:68:"/home/bjartka/public_html/doctrine/lib/Doctrine/Validator/Regexp.php";a:18:{i:34;i:1;i:44;i:1;i:45;i:-1;i:46;i:-2;i:47;i:1;i:48;i:-1;i:49;i:-1;i:50;i:-1;i:51;i:-2;i:52;i:-1;i:53;i:-1;i:54;i:-2;i:55;i:1;i:56;i:1;i:57;i:-2;i:60;i:1;i:61;i:-2;i:62;i:1;}s:73:"/home/bjartka/public_html/doctrine/tests/Query/AggregateValueTestCase.php";a:101:{i:37;i:1;i:40;i:1;i:42;i:1;i:43;i:1;i:44;i:1;i:45;i:1;i:47;i:1;i:48;i:1;i:49;i:1;i:50;i:1;i:51;i:1;i:52;i:1;i:54;i:1;i:55;i:1;i:59;i:1;i:62;i:1;i:63;i:-1;i:64;i:1;i:65;i:1;i:68;i:1;i:71;i:1;i:72;i:1;i:73;i:-2;i:75;i:1;i:76;i:1;i:80;i:1;i:82;i:1;i:84;i:1;i:85;i:1;i:87;i:1;i:89;i:1;i:91;i:1;i:92;i:1;i:96;i:1;i:98;i:1;i:100;i:1;i:102;i:1;i:104;i:1;i:105;i:1;i:107;i:1;i:108;i:1;i:109;i:1;i:113;i:1;i:115;i:1;i:117;i:1;i:119;i:1;i:121;i:1;i:122;i:1;i:124;i:1;i:125;i:1;i:126;i:1;i:130;i:1;i:132;i:1;i:134;i:1;i:136;i:1;i:138;i:1;i:139;i:1;i:140;i:1;i:141;i:1;i:142;i:1;i:146;i:1;i:148;i:1;i:150;i:1;i:151;i:1;i:153;i:1;i:154;i:1;i:158;i:1;i:160;i:1;i:162;i:1;i:163;i:1;i:164;i:1;i:165;i:1;i:168;i:1;i:170;i:1;i:172;i:1;i:174;i:1;i:176;i:1;i:177;i:1;i:178;i:1;i:179;i:1;i:182;i:1;i:183;i:1;i:185;i:1;i:186;i:1;i:189;i:1;i:190;i:1;i:192;i:1;i:193;i:1;i:196;i:1;i:197;i:1;i:199;i:1;i:200;i:1;i:203;i:1;i:204;i:1;i:206;i:1;i:207;i:1;i:210;i:1;i:211;i:1;i:212;i:1;i:214;i:1;i:215;i:1;}s:74:"/home/bjartka/public_html/doctrine/lib/Doctrine/Record/Filter/Compound.php";a:36:{i:33;i:1;i:39;i:1;i:40;i:1;i:44;i:1;i:45;i:1;i:46;i:1;i:47;i:1;i:56;i:1;i:57;i:1;i:58;i:1;i:59;i:1;i:61;i:1;i:62;i:-2;i:63;i:-1;i:65;i:-1;i:66;i:-1;i:67;i:-1;i:68;i:-1;i:70;i:-1;i:71;i:-2;i:73;i:-1;i:74;i:-1;i:84;i:1;i:85;i:1;i:86;i:-1;i:87;i:-1;i:88;i:-2;i:89;i:-1;i:91;i:1;i:92;i:1;i:93;i:1;i:94;i:-2;i:95;i:-1;i:97;i:-1;i:98;i:-1;i:99;i:1;}s:66:"/home/bjartka/public_html/doctrine/lib/Doctrine/Tree/Interface.php";a:2:{i:32;i:1;i:64;i:1;}s:61:"/home/bjartka/public_html/doctrine/lib/Doctrine/Migration.php";a:150:{i:35;i:1;i:60;i:1;i:61;i:1;i:63;i:1;i:65;i:1;i:66;i:1;i:67;i:1;i:78;i:1;i:81;i:1;i:83;i:1;i:84;i:-2;i:85;i:-2;i:87;i:-2;i:98;i:1;i:99;i:-1;i:100;i:-2;i:102;i:1;i:104;i:1;i:105;i:1;i:107;i:1;i:108;i:1;i:109;i:1;i:110;i:1;i:112;i:1;i:113;i:1;i:114;i:1;i:115;i:1;i:116;i:1;i:117;i:1;i:119;i:1;i:121;i:1;i:122;i:1;i:123;i:1;i:124;i:1;i:126;i:1;i:127;i:1;i:128;i:1;i:130;i:1;i:131;i:1;i:133;i:1;i:135;i:1;i:136;i:1;i:137;i:-1;i:138;i:-2;i:139;i:1;i:141;i:1;i:142;i:-1;i:143;i:-2;i:145;i:1;i:146;i:1;i:148;i:1;i:149;i:1;i:151;i:1;i:153;i:1;i:154;i:-2;i:165;i:-1;i:166;i:-2;i:178;i:-1;i:180;i:-1;i:181;i:-1;i:182;i:-1;i:183;i:-1;i:185;i:-1;i:196;i:1;i:198;i:1;i:200;i:1;i:201;i:-2;i:212;i:-1;i:214;i:-1;i:216;i:-1;i:217;i:-2;i:228;i:-1;i:230;i:-1;i:231;i:-1;i:232;i:-1;i:233;i:-1;i:235;i:-1;i:237;i:-1;i:238;i:-2;i:242;i:-1;i:243;i:-2;i:255;i:-1;i:256;i:-1;i:257;i:-1;i:258;i:-2;i:259;i:-1;i:261;i:-1;i:262;i:-2;i:275;i:-1;i:276;i:-1;i:277;i:-1;i:289;i:-1;i:290;i:-1;i:292;i:-1;i:293;i:-1;i:294;i:-1;i:296;i:-1;i:297;i:-1;i:298;i:-1;i:299;i:-1;i:300;i:-1;i:301;i:-1;i:315;i:1;i:318;i:1;i:319;i:-1;i:320;i:-1;i:322;i:1;i:323;i:1;i:324;i:-2;i:326;i:-1;i:328;i:-1;i:329;i:-1;i:330;i:-1;i:331;i:-1;i:332;i:-1;i:333;i:-1;i:334;i:-1;i:335;i:-1;i:338;i:-1;i:339;i:-1;i:350;i:-1;i:351;i:-1;i:363;i:-1;i:365;i:-1;i:366;i:-1;i:376;i:-1;i:378;i:-1;i:379;i:-1;i:390;i:-1;i:392;i:-1;i:393;i:-1;i:406;i:-1;i:408;i:-1;i:409;i:-1;i:421;i:-1;i:423;i:-1;i:424;i:-1;i:437;i:-1;i:439;i:-1;i:440;i:-1;i:451;i:-1;i:453;i:-1;i:454;i:-1;i:466;i:-1;i:468;i:-1;i:469;i:-1;i:480;i:-1;i:482;i:-1;i:483;i:-1;i:484;i:1;}s:58:"/home/bjartka/public_html/doctrine/lib/Doctrine/Record.php";a:665:{i:0;i:1;i:131;i:1;i:132;i:1;i:133;i:1;i:134;i:1;i:135;i:1;i:137;i:1;i:138;i:1;i:139;i:1;i:146;i:1;i:147;i:1;i:149;i:1;i:151;i:1;i:154;i:1;i:157;i:1;i:159;i:1;i:161;i:1;i:163;i:1;i:164;i:1;i:165;i:1;i:166;i:1;i:167;i:1;i:171;i:1;i:172;i:1;i:173;i:1;i:175;i:1;i:176;i:1;i:177;i:1;i:180;i:1;i:182;i:1;i:183;i:1;i:185;i:1;i:186;i:1;i:188;i:1;i:196;i:-1;i:197;i:-2;i:206;i:1;i:215;i:1;i:224;i:1;i:225;i:-2;i:233;i:1;i:234;i:1;i:235;i:-2;i:237;i:1;i:240;i:1;i:241;i:1;i:242;i:1;i:243;i:1;i:244;i:1;i:245;i:1;i:246;i:1;i:249;i:1;i:250;i:-2;i:257;i:1;i:264;i:1;i:271;i:1;i:277;i:1;i:283;i:1;i:289;i:1;i:295;i:1;i:301;i:1;i:307;i:1;i:313;i:1;i:319;i:1;i:326;i:1;i:333;i:1;i:340;i:1;i:347;i:1;i:355;i:1;i:356;i:-2;i:366;i:1;i:367;i:-1;i:368;i:-1;i:369;i:-2;i:370;i:-1;i:371;i:-1;i:372;i:1;i:374;i:-1;i:384;i:1;i:385;i:1;i:386;i:-2;i:387;i:1;i:388;i:1;i:390;i:1;i:391;i:1;i:392;i:1;i:394;i:1;i:395;i:1;i:396;i:1;i:397;i:1;i:398;i:1;i:399;i:1;i:400;i:1;i:409;i:1;i:410;i:1;i:412;i:1;i:413;i:1;i:414;i:1;i:415;i:1;i:416;i:1;i:418;i:1;i:419;i:1;i:421;i:1;i:422;i:-2;i:432;i:1;i:433;i:1;i:435;i:1;i:436;i:1;i:446;i:1;i:447;i:1;i:448;i:1;i:449;i:1;i:450;i:1;i:452;i:1;i:453;i:1;i:454;i:1;i:455;i:1;i:456;i:1;i:457;i:1;i:458;i:1;i:459;i:1;i:461;i:1;i:462;i:1;i:463;i:1;i:464;i:1;i:465;i:1;i:467;i:1;i:468;i:1;i:469;i:-1;i:470;i:1;i:479;i:1;i:481;i:1;i:483;i:1;i:485;i:1;i:486;i:1;i:487;i:1;i:488;i:1;i:489;i:1;i:491;i:1;i:492;i:1;i:494;i:1;i:495;i:1;i:496;i:-1;i:497;i:1;i:498;i:1;i:499;i:1;i:500;i:1;i:501;i:1;i:502;i:1;i:503;i:1;i:504;i:1;i:505;i:1;i:506;i:1;i:507;i:1;i:508;i:1;i:509;i:1;i:510;i:1;i:511;i:-1;i:513;i:1;i:515;i:1;i:517;i:1;i:519;i:1;i:520;i:-2;i:531;i:1;i:533;i:1;i:535;i:1;i:536;i:1;i:538;i:1;i:539;i:1;i:541;i:1;i:543;i:1;i:545;i:1;i:546;i:1;i:547;i:1;i:549;i:1;i:551;i:1;i:552;i:1;i:553;i:1;i:554;i:1;i:555;i:1;i:556;i:1;i:557;i:1;i:558;i:1;i:559;i:1;i:560;i:1;i:561;i:1;i:563;i:-1;i:564;i:1;i:566;i:1;i:568;i:1;i:570;i:1;i:572;i:1;i:573;i:1;i:586;i:1;i:587;i:1;i:588;i:-2;i:589;i:1;i:590;i:1;i:591;i:1;i:592;i:1;i:593;i:1;i:594;i:-1;i:596;i:1;i:597;i:-1;i:599;i:-1;i:600;i:-1;i:601;i:-1;i:602;i:-1;i:603;i:-1;i:605;i:-1;i:607;i:1;i:608;i:1;i:610;i:1;i:611;i:1;i:613;i:1;i:614;i:-1;i:615;i:-2;i:616;i:1;i:627;i:1;i:628;i:1;i:629;i:-1;i:630;i:-1;i:631;i:1;i:632;i:-1;i:633;i:-2;i:634;i:1;i:637;i:1;i:639;i:1;i:640;i:1;i:641;i:-2;i:643;i:1;i:645;i:1;i:647;i:1;i:649;i:1;i:651;i:1;i:652;i:-2;i:665;i:1;i:666;i:1;i:667;i:1;i:668;i:1;i:669;i:1;i:670;i:1;i:671;i:1;i:673;i:1;i:683;i:1;i:684;i:1;i:694;i:1;i:695;i:-2;i:704;i:1;i:705;i:-2;i:718;i:1;i:719;i:-1;i:720;i:-2;i:721;i:1;i:722;i:1;i:724;i:1;i:725;i:-2;i:736;i:1;i:737;i:-1;i:739;i:-1;i:741;i:-1;i:742;i:-2;i:743;i:1;i:744;i:-2;i:756;i:1;i:757;i:1;i:759;i:1;i:761;i:1;i:763;i:1;i:764;i:1;i:765;i:1;i:767;i:1;i:768;i:1;i:769;i:1;i:770;i:1;i:772;i:1;i:773;i:-2;i:775;i:1;i:776;i:1;i:777;i:-2;i:781;i:1;i:783;i:1;i:785;i:1;i:786;i:1;i:787;i:1;i:789;i:1;i:791;i:1;i:792;i:1;i:793;i:1;i:794;i:-2;i:795;i:-2;i:797;i:-2;i:810;i:1;i:811;i:1;i:812;i:1;i:829;i:1;i:831;i:1;i:833;i:1;i:834;i:1;i:835;i:1;i:837;i:1;i:839;i:1;i:840;i:1;i:841;i:1;i:842;i:1;i:844;i:1;i:845;i:1;i:846;i:1;i:847;i:1;i:850;i:1;i:851;i:1;i:852;i:1;i:853;i:1;i:855;i:1;i:856;i:1;i:857;i:1;i:858;i:1;i:859;i:1;i:860;i:1;i:861;i:1;i:862;i:1;i:863;i:1;i:864;i:-1;i:865;i:1;i:866;i:1;i:868;i:1;i:869;i:1;i:870;i:1;i:871;i:1;i:872;i:1;i:873;i:-2;i:874;i:-2;i:877;i:1;i:881;i:1;i:884;i:1;i:885;i:1;i:886;i:1;i:888;i:1;i:889;i:-1;i:890;i:-2;i:891;i:1;i:892;i:1;i:893;i:1;i:894;i:-2;i:895;i:-1;i:896;i:1;i:898;i:1;i:899;i:-1;i:900;i:-2;i:901;i:1;i:902;i:1;i:903;i:1;i:904;i:1;i:906;i:1;i:907;i:1;i:908;i:1;i:910;i:1;i:913;i:1;i:915;i:1;i:916;i:-1;i:917;i:-2;i:918;i:1;i:920;i:1;i:921;i:1;i:930;i:1;i:932;i:1;i:933;i:1;i:934;i:-2;i:935;i:1;i:936;i:-1;i:937;i:-2;i:938;i:1;i:939;i:-1;i:940;i:-2;i:941;i:1;i:942;i:1;i:944;i:1;i:945;i:-2;i:946;i:1;i:947;i:-2;i:954;i:-1;i:955;i:-1;i:956;i:-1;i:958;i:-1;i:971;i:1;i:972;i:1;i:973;i:1;i:974;i:1;i:975;i:1;i:987;i:1;i:988;i:1;i:989;i:1;i:990;i:1;i:992;i:-2;i:1013;i:-1;i:1014;i:-1;i:1015;i:-1;i:1017;i:-1;i:1018;i:-2;i:1025;i:1;i:1027;i:1;i:1028;i:1;i:1029;i:1;i:1030;i:1;i:1031;i:-2;i:1043;i:1;i:1045;i:1;i:1046;i:1;i:1047;i:1;i:1049;i:1;i:1050;i:1;i:1052;i:1;i:1053;i:1;i:1054;i:1;i:1055;i:-2;i:1058;i:1;i:1059;i:1;i:1060;i:1;i:1061;i:1;i:1062;i:1;i:1063;i:1;i:1064;i:1;i:1065;i:1;i:1066;i:1;i:1067;i:1;i:1068;i:1;i:1069;i:1;i:1070;i:1;i:1071;i:1;i:1072;i:1;i:1073;i:1;i:1074;i:1;i:1081;i:1;i:1082;i:1;i:1083;i:1;i:1084;i:1;i:1085;i:1;i:1086;i:1;i:1088;i:1;i:1089;i:1;i:1090;i:1;i:1091;i:1;i:1092;i:1;i:1094;i:1;i:1095;i:-2;i:1104;i:1;i:1105;i:-2;i:1113;i:-1;i:1114;i:-2;i:1124;i:1;i:1126;i:1;i:1127;i:1;i:1128;i:1;i:1129;i:1;i:1130;i:1;i:1131;i:1;i:1132;i:1;i:1133;i:1;i:1134;i:1;i:1135;i:1;i:1136;i:1;i:1137;i:-1;i:1138;i:-1;i:1139;i:-1;i:1140;i:-1;i:1141;i:-1;i:1142;i:-1;i:1143;i:1;i:1144;i:-2;i:1147;i:-1;i:1148;i:-1;i:1149;i:-1;i:1150;i:-1;i:1151;i:-1;i:1152;i:-1;i:1153;i:-1;i:1154;i:-1;i:1155;i:-1;i:1156;i:-1;i:1159;i:-1;i:1160;i:-1;i:1161;i:-2;i:1162;i:-1;i:1164;i:-2;i:1167;i:-1;i:1168;i:-1;i:1169;i:-2;i:1170;i:-1;i:1172;i:-2;i:1181;i:1;i:1182;i:1;i:1183;i:-2;i:1192;i:1;i:1193;i:1;i:1194;i:-2;i:1202;i:-1;i:1203;i:-1;i:1204;i:-2;i:1205;i:-1;i:1206;i:-2;i:1213;i:1;i:1214;i:-2;i:1225;i:1;i:1226;i:1;i:1227;i:1;i:1228;i:1;i:1229;i:-2;i:1238;i:1;i:1240;i:1;i:1241;i:1;i:1243;i:1;i:1244;i:1;i:1246;i:1;i:1247;i:1;i:1249;i:1;i:1250;i:1;i:1251;i:1;i:1252;i:1;i:1253;i:1;i:1256;i:1;i:1257;i:-2;i:1265;i:-1;i:1267;i:-1;i:1268;i:-1;i:1269;i:-1;i:1270;i:-1;i:1271;i:-1;i:1272;i:-1;i:1273;i:-1;i:1275;i:-1;i:1276;i:-1;i:1277;i:-2;i:1287;i:1;i:1288;i:-1;i:1289;i:-1;i:1290;i:-1;i:1291;i:-1;i:1292;i:1;i:1293;i:1;i:1294;i:1;i:1295;i:1;i:1296;i:1;i:1297;i:1;i:1298;i:1;i:1299;i:1;i:1300;i:1;i:1301;i:1;i:1303;i:1;i:1311;i:1;i:1312;i:-2;i:1320;i:1;i:1321;i:1;i:1322;i:1;i:1323;i:-2;i:1325;i:1;i:1326;i:-2;i:1337;i:1;i:1338;i:-2;i:1346;i:1;i:1347;i:-2;i:1355;i:1;i:1356;i:1;i:1357;i:-2;i:1358;i:-1;i:1367;i:-1;i:1368;i:-1;i:1369;i:-2;i:1370;i:-1;i:1371;i:-2;i:1378;i:1;i:1379;i:-2;i:1388;i:-1;i:1389;i:-1;i:1400;i:-1;i:1401;i:-1;i:1402;i:-1;i:1413;i:1;i:1415;i:1;i:1416;i:1;i:1417;i:1;i:1418;i:1;i:1421;i:1;i:1422;i:1;i:1434;i:1;i:1435;i:1;i:1437;i:1;i:1438;i:1;i:1439;i:1;i:1441;i:1;i:1443;i:1;i:1444;i:1;i:1445;i:1;i:1446;i:-2;i:1454;i:1;i:1455;i:-1;i:1456;i:-2;i:1458;i:1;i:1459;i:1;i:1460;i:1;i:1461;i:1;i:1462;i:1;i:1463;i:1;i:1465;i:1;i:1466;i:-2;i:1470;i:1;i:1471;i:-2;i:1483;i:1;i:1484;i:1;i:1485;i:1;i:1486;i:1;i:1488;i:1;i:1489;i:1;i:1490;i:-2;i:1492;i:1;i:1494;i:1;i:1495;i:-2;i:1507;i:1;i:1509;i:1;i:1511;i:1;i:1513;i:1;i:1514;i:1;i:1515;i:1;i:1516;i:1;i:1518;i:1;i:1519;i:1;i:1520;i:1;i:1522;i:1;i:1525;i:1;i:1526;i:1;i:1527;i:1;i:1528;i:1;i:1530;i:1;i:1531;i:1;i:1532;i:1;i:1534;i:1;i:1535;i:1;i:1536;i:1;i:1537;i:1;i:1538;i:1;i:1539;i:1;i:1540;i:1;i:1541;i:1;i:1542;i:1;i:1543;i:1;i:1544;i:1;i:1545;i:-2;i:1561;i:1;i:1562;i:-1;i:1563;i:-1;i:1564;i:-2;i:1566;i:1;i:1567;i:1;i:1568;i:1;i:1569;i:1;i:1571;i:1;i:1572;i:-2;i:1573;i:-1;i:1575;i:-1;i:1576;i:-2;i:1582;i:-1;i:1583;i:-1;i:1586;i:-1;i:1587;i:-2;i:1593;i:-1;i:1594;i:-2;}s:50:"/home/bjartka/public_html/doctrine/models/Song.php";a:8:{i:6;i:1;i:7;i:1;i:8;i:1;i:9;i:1;i:12;i:1;i:13;i:1;i:14;i:1;i:15;i:1;}s:64:"/home/bjartka/public_html/doctrine/lib/Doctrine/Query/Select.php";a:5:{i:21;i:1;i:33;i:1;i:37;i:1;i:38;i:1;i:39;i:1;}s:73:"/home/bjartka/public_html/doctrine/tests/Transaction/FirebirdTestCase.php";a:44:{i:37;i:1;i:39;i:1;i:40;i:1;i:43;i:1;i:45;i:1;i:46;i:1;i:49;i:1;i:50;i:1;i:52;i:1;i:53;i:1;i:57;i:1;i:58;i:-1;i:59;i:1;i:60;i:1;i:62;i:1;i:66;i:1;i:67;i:-1;i:68;i:1;i:69;i:1;i:71;i:1;i:75;i:1;i:76;i:-1;i:77;i:1;i:78;i:1;i:80;i:1;i:83;i:1;i:84;i:1;i:85;i:1;i:86;i:1;i:88;i:1;i:89;i:1;i:90;i:1;i:91;i:1;i:92;i:1;i:95;i:1;i:97;i:1;i:99;i:1;i:101;i:1;i:102;i:1;i:105;i:1;i:107;i:1;i:109;i:1;i:111;i:1;i:112;i:1;}s:68:"/home/bjartka/public_html/doctrine/tests/Export/FirebirdTestCase.php";a:31:{i:38;i:1;i:39;i:-1;i:40;i:1;i:41;i:1;i:43;i:1;i:47;i:1;i:48;i:-1;i:49;i:1;i:50;i:1;i:52;i:1;i:55;i:1;i:57;i:1;i:59;i:1;i:61;i:1;i:67;i:1;i:68;i:1;i:71;i:1;i:72;i:1;i:73;i:1;i:74;i:1;i:76;i:1;i:77;i:1;i:79;i:1;i:80;i:1;i:83;i:1;i:84;i:1;i:85;i:1;i:87;i:1;i:88;i:1;i:90;i:1;i:91;i:1;}s:62:"/home/bjartka/public_html/doctrine/models/MysqlGroupMember.php";a:3:{i:6;i:1;i:7;i:1;i:8;i:1;}s:63:"/home/bjartka/public_html/doctrine/tests/UnitOfWorkTestCase.php";a:77:{i:43;i:1;i:45;i:1;i:46;i:1;i:48;i:1;i:49;i:1;i:51;i:1;i:52;i:1;i:54;i:1;i:56;i:1;i:57;i:1;i:59;i:1;i:61;i:1;i:62;i:1;i:63;i:1;i:64;i:1;i:65;i:1;i:67;i:1;i:69;i:1;i:70;i:1;i:71;i:1;i:72;i:1;i:73;i:1;i:75;i:1;i:76;i:1;i:77;i:1;i:78;i:1;i:79;i:1;i:81;i:1;i:82;i:1;i:83;i:1;i:84;i:1;i:85;i:1;i:87;i:1;i:88;i:1;i:89;i:1;i:90;i:1;i:91;i:1;i:93;i:1;i:94;i:1;i:95;i:1;i:96;i:1;i:97;i:1;i:99;i:1;i:100;i:1;i:101;i:1;i:102;i:1;i:103;i:1;i:104;i:1;i:105;i:1;i:107;i:1;i:108;i:1;i:109;i:1;i:110;i:1;i:111;i:1;i:112;i:1;i:113;i:1;i:115;i:1;i:116;i:1;i:117;i:1;i:118;i:1;i:119;i:1;i:120;i:1;i:121;i:1;i:123;i:1;i:124;i:1;i:125;i:1;i:126;i:1;i:127;i:1;i:128;i:1;i:129;i:1;i:131;i:1;i:132;i:1;i:133;i:1;i:134;i:1;i:135;i:1;i:136;i:1;i:137;i:1;}s:52:"/home/bjartka/public_html/doctrine/models/Author.php";a:7:{i:6;i:1;i:7;i:1;i:8;i:1;i:9;i:1;i:12;i:1;i:13;i:1;i:14;i:1;}s:57:"/home/bjartka/public_html/doctrine/models/Record_City.php";a:7:{i:4;i:1;i:5;i:1;i:6;i:1;i:7;i:1;i:9;i:1;i:10;i:1;i:11;i:1;}s:68:"/home/bjartka/public_html/doctrine/tests/Relation/ParserTestCase.php";a:99:{i:37;i:1;i:39;i:1;i:40;i:1;i:42;i:1;i:44;i:1;i:45;i:1;i:46;i:1;i:48;i:1;i:49;i:1;i:52;i:1;i:54;i:1;i:56;i:1;i:57;i:-1;i:58;i:1;i:59;i:1;i:61;i:1;i:64;i:1;i:66;i:1;i:67;i:1;i:68;i:1;i:70;i:1;i:71;i:1;i:74;i:1;i:76;i:1;i:77;i:1;i:78;i:1;i:80;i:1;i:81;i:1;i:84;i:1;i:86;i:1;i:87;i:1;i:88;i:1;i:90;i:1;i:91;i:1;i:94;i:1;i:96;i:1;i:97;i:1;i:98;i:1;i:100;i:1;i:101;i:1;i:104;i:1;i:106;i:1;i:107;i:1;i:109;i:1;i:110;i:1;i:111;i:1;i:115;i:1;i:117;i:1;i:118;i:1;i:120;i:1;i:121;i:1;i:122;i:1;i:125;i:1;i:127;i:1;i:128;i:1;i:129;i:1;i:130;i:1;i:132;i:1;i:133;i:1;i:136;i:1;i:138;i:1;i:139;i:1;i:140;i:1;i:141;i:1;i:143;i:1;i:144;i:1;i:147;i:1;i:148;i:1;i:149;i:1;i:151;i:1;i:153;i:1;i:155;i:1;i:156;i:1;i:159;i:1;i:160;i:1;i:162;i:1;i:164;i:1;i:166;i:1;i:167;i:1;i:170;i:1;i:171;i:1;i:172;i:1;i:174;i:1;i:176;i:1;i:178;i:1;i:179;i:1;i:180;i:1;i:181;i:1;i:184;i:1;i:185;i:1;i:186;i:1;i:187;i:1;i:188;i:1;i:190;i:1;i:192;i:1;i:193;i:1;i:195;i:1;i:196;i:1;i:197;i:1;}s:56:"/home/bjartka/public_html/doctrine/lib/Doctrine/View.php";a:26:{i:35;i:1;i:69;i:1;i:70;i:1;i:71;i:1;i:72;i:1;i:73;i:1;i:82;i:1;i:83;i:-2;i:92;i:1;i:93;i:-2;i:102;i:1;i:103;i:-2;i:113;i:1;i:115;i:1;i:116;i:1;i:117;i:-2;i:119;i:1;i:130;i:1;i:131;i:1;i:132;i:-2;i:134;i:1;i:144;i:1;i:145;i:-2;i:154;i:1;i:155;i:-2;i:156;i:1;}s:74:"/home/bjartka/public_html/doctrine/models/ValidatorTest_FootballPlayer.php";a:4:{i:4;i:1;i:5;i:1;i:6;i:1;i:7;i:1;}s:57:"/home/bjartka/public_html/doctrine/tests/I18nTestCase.php";a:48:{i:37;i:1;i:41;i:1;i:43;i:1;i:44;i:1;i:48;i:1;i:50;i:1;i:51;i:1;i:52;i:1;i:54;i:1;i:56;i:1;i:57;i:1;i:58;i:1;i:59;i:1;i:63;i:1;i:65;i:1;i:67;i:1;i:68;i:1;i:69;i:1;i:73;i:1;i:74;i:1;i:76;i:1;i:77;i:1;i:78;i:1;i:81;i:1;i:82;i:1;i:83;i:1;i:85;i:1;i:87;i:1;i:89;i:1;i:91;i:1;i:92;i:1;i:93;i:1;i:95;i:1;i:99;i:1;i:101;i:1;i:102;i:1;i:103;i:1;i:105;i:1;i:106;i:1;i:107;i:1;i:108;i:1;i:112;i:1;i:114;i:1;i:116;i:1;i:117;i:1;i:121;i:1;i:123;i:1;i:124;i:1;}s:68:"/home/bjartka/public_html/doctrine/tests/Query/MultiJoinTestCase.php";a:107:{i:37;i:1;i:38;i:1;i:39;i:1;i:40;i:1;i:44;i:1;i:46;i:1;i:49;i:1;i:50;i:1;i:52;i:1;i:53;i:1;i:55;i:1;i:56;i:1;i:57;i:1;i:59;i:1;i:62;i:1;i:63;i:1;i:64;i:1;i:65;i:1;i:66;i:1;i:68;i:1;i:70;i:1;i:72;i:1;i:73;i:1;i:76;i:1;i:78;i:1;i:79;i:1;i:80;i:1;i:81;i:1;i:83;i:1;i:85;i:1;i:86;i:1;i:87;i:1;i:90;i:1;i:92;i:1;i:94;i:1;i:96;i:1;i:98;i:1;i:100;i:1;i:101;i:1;i:102;i:1;i:103;i:1;i:104;i:1;i:105;i:1;i:106;i:1;i:107;i:1;i:108;i:1;i:110;i:1;i:111;i:1;i:112;i:1;i:113;i:1;i:114;i:1;i:116;i:1;i:118;i:1;i:119;i:1;i:120;i:1;i:121;i:1;i:125;i:1;i:126;i:1;i:127;i:1;i:128;i:1;i:129;i:1;i:130;i:1;i:131;i:1;i:134;i:1;i:136;i:1;i:137;i:1;i:138;i:1;i:139;i:1;i:140;i:1;i:141;i:1;i:142;i:1;i:143;i:1;i:145;i:1;i:146;i:1;i:149;i:1;i:151;i:1;i:153;i:1;i:155;i:1;i:156;i:1;i:157;i:1;i:158;i:1;i:159;i:1;i:160;i:1;i:161;i:1;i:162;i:1;i:163;i:1;i:164;i:1;i:166;i:1;i:167;i:1;i:168;i:1;i:169;i:1;i:170;i:1;i:172;i:1;i:173;i:1;i:174;i:1;i:175;i:1;i:176;i:1;i:178;i:1;i:179;i:1;i:180;i:1;i:181;i:1;i:182;i:1;i:183;i:1;i:184;i:1;i:188;i:1;i:190;i:1;i:191;i:1;}s:60:"/home/bjartka/public_html/doctrine/models/QueryTest_Rank.php";a:9:{i:9;i:1;i:10;i:1;i:11;i:1;i:12;i:1;i:13;i:1;i:14;i:1;i:15;i:1;i:18;i:1;i:19;i:1;}s:78:"/home/bjartka/public_html/doctrine/tests/Query/MysqlSubqueryHavingTestCase.php";a:25:{i:37;i:1;i:38;i:1;i:39;i:1;i:43;i:1;i:44;i:1;i:45;i:1;i:46;i:1;i:47;i:1;i:48;i:1;i:49;i:1;i:51;i:1;i:53;i:1;i:55;i:1;i:56;i:1;i:60;i:1;i:61;i:1;i:62;i:1;i:63;i:1;i:64;i:1;i:65;i:1;i:66;i:1;i:68;i:1;i:70;i:1;i:71;i:1;i:72;i:1;}s:59:"/home/bjartka/public_html/doctrine/tests/SearchTestCase.php";a:73:{i:37;i:1;i:39;i:1;i:40;i:1;i:42;i:1;i:46;i:1;i:48;i:1;i:50;i:1;i:52;i:1;i:53;i:1;i:54;i:1;i:57;i:1;i:59;i:1;i:60;i:1;i:62;i:1;i:63;i:1;i:67;i:1;i:69;i:1;i:70;i:1;i:71;i:1;i:72;i:1;i:74;i:1;i:76;i:1;i:77;i:1;i:81;i:1;i:83;i:1;i:84;i:1;i:85;i:1;i:86;i:1;i:88;i:1;i:90;i:1;i:91;i:1;i:95;i:1;i:97;i:1;i:98;i:1;i:99;i:1;i:100;i:1;i:102;i:1;i:104;i:1;i:105;i:1;i:109;i:1;i:111;i:1;i:112;i:1;i:113;i:1;i:114;i:1;i:116;i:1;i:118;i:1;i:119;i:1;i:123;i:1;i:124;i:1;i:125;i:1;i:127;i:1;i:128;i:1;i:130;i:1;i:132;i:1;i:133;i:1;i:134;i:1;i:135;i:1;i:136;i:1;i:137;i:1;i:139;i:1;i:140;i:1;i:141;i:1;i:142;i:1;i:143;i:1;i:147;i:1;i:148;i:1;i:150;i:1;i:152;i:1;i:153;i:1;i:154;i:1;i:155;i:1;i:157;i:1;i:160;i:1;}s:66:"/home/bjartka/public_html/doctrine/tests/DoctrineTest/Reporter.php";a:2:{i:9;i:1;i:10;i:1;}s:70:"/home/bjartka/public_html/doctrine/lib/Doctrine/Locator/Injectable.php";a:24:{i:59;i:-1;i:60;i:-1;i:61;i:-2;i:73;i:-1;i:74;i:-1;i:76;i:-1;i:77;i:-1;i:78;i:-2;i:93;i:-1;i:94;i:-1;i:95;i:-1;i:96;i:-2;i:98;i:-1;i:100;i:-1;i:102;i:-2;i:103;i:-1;i:105;i:-2;i:116;i:-1;i:118;i:-1;i:119;i:-2;i:130;i:1;i:131;i:1;i:140;i:1;i:141;i:-2;}s:65:"/home/bjartka/public_html/doctrine/lib/Doctrine/EventListener.php";a:33:{i:38;i:1;i:40;i:1;i:43;i:-1;i:45;i:-1;i:48;i:1;i:51;i:1;i:53;i:1;i:56;i:1;i:58;i:1;i:61;i:1;i:63;i:1;i:67;i:1;i:69;i:1;i:72;i:1;i:74;i:1;i:77;i:1;i:79;i:1;i:82;i:1;i:84;i:1;i:87;i:1;i:89;i:1;i:92;i:1;i:94;i:1;i:97;i:1;i:99;i:1;i:102;i:1;i:104;i:-1;i:107;i:1;i:109;i:1;i:112;i:1;i:114;i:1;i:117;i:1;i:119;i:1;}s:62:"/home/bjartka/public_html/doctrine/lib/Doctrine/Query/Part.php";a:6:{i:34;i:1;i:44;i:1;i:45;i:1;i:51;i:-1;i:52;i:-2;i:53;i:1;}s:64:"/home/bjartka/public_html/doctrine/lib/Doctrine/Adapter/Mock.php";a:66:{i:33;i:1;i:45;i:1;i:46;i:1;i:49;i:-1;i:50;i:-2;i:53;i:1;i:54;i:-2;i:57;i:-1;i:58;i:-1;i:61;i:1;i:62;i:1;i:64;i:1;i:65;i:-2;i:68;i:1;i:69;i:1;i:72;i:1;i:74;i:1;i:76;i:1;i:77;i:-1;i:79;i:-1;i:81;i:-1;i:82;i:-2;i:84;i:1;i:85;i:1;i:87;i:1;i:88;i:-2;i:91;i:-1;i:92;i:-2;i:95;i:1;i:96;i:-2;i:99;i:1;i:101;i:1;i:103;i:1;i:104;i:-1;i:106;i:-1;i:108;i:-1;i:109;i:-2;i:111;i:1;i:112;i:-2;i:115;i:1;i:116;i:1;i:117;i:1;i:118;i:1;i:120;i:1;i:123;i:1;i:124;i:1;i:125;i:1;i:126;i:-2;i:127;i:1;i:129;i:-2;i:132;i:-1;i:133;i:-2;i:136;i:1;i:137;i:1;i:140;i:1;i:141;i:1;i:144;i:-1;i:145;i:-1;i:147;i:-1;i:149;i:-1;i:152;i:1;i:153;i:1;i:154;i:-1;i:158;i:1;i:160;i:1;i:162;i:1;}s:70:"/home/bjartka/public_html/doctrine/tests/Transaction/MysqlTestCase.php";a:21:{i:37;i:1;i:39;i:1;i:40;i:1;i:43;i:1;i:45;i:1;i:46;i:1;i:49;i:1;i:50;i:1;i:52;i:1;i:53;i:1;i:56;i:1;i:58;i:1;i:59;i:1;i:63;i:1;i:64;i:-1;i:65;i:1;i:66;i:1;i:68;i:1;i:71;i:1;i:73;i:1;i:74;i:1;}s:69:"/home/bjartka/public_html/doctrine/lib/Doctrine/Transaction/Pgsql.php";a:23:{i:21;i:1;i:34;i:1;i:45;i:1;i:47;i:1;i:48;i:-2;i:58;i:1;i:60;i:1;i:61;i:-2;i:71;i:1;i:73;i:1;i:74;i:-2;i:90;i:1;i:91;i:1;i:92;i:1;i:93;i:1;i:94;i:1;i:95;i:1;i:96;i:1;i:97;i:1;i:99;i:1;i:100;i:1;i:101;i:-2;i:102;i:1;}s:70:"/home/bjartka/public_html/doctrine/lib/Doctrine/DataDict/Exception.php";a:3:{i:21;i:1;i:33;i:1;i:34;i:1;}s:64:"/home/bjartka/public_html/doctrine/lib/Doctrine/Export/Pgsql.php";a:128:{i:21;i:1;i:34;i:1;i:45;i:1;i:47;i:1;i:48;i:-2;i:58;i:1;i:60;i:1;i:61;i:-2;i:73;i:1;i:74;i:1;i:75;i:-1;i:76;i:-1;i:77;i:1;i:78;i:-1;i:79;i:-1;i:80;i:1;i:81;i:1;i:82;i:1;i:83;i:1;i:84;i:-1;i:85;i:-1;i:86;i:1;i:88;i:1;i:89;i:-1;i:90;i:-1;i:91;i:1;i:93;i:1;i:94;i:-2;i:187;i:-1;i:189;i:-1;i:190;i:-1;i:191;i:-1;i:192;i:-1;i:193;i:-1;i:194;i:-1;i:195;i:-1;i:196;i:-1;i:197;i:-1;i:198;i:-1;i:200;i:-1;i:201;i:-1;i:202;i:-2;i:204;i:-1;i:205;i:-1;i:206;i:-1;i:207;i:-1;i:208;i:-1;i:209;i:-1;i:211;i:-1;i:212;i:-1;i:213;i:-1;i:214;i:-1;i:215;i:-1;i:216;i:-1;i:217;i:-1;i:219;i:-1;i:220;i:-1;i:221;i:-1;i:222;i:-1;i:223;i:-1;i:225;i:-1;i:226;i:-1;i:227;i:-2;i:228;i:-1;i:229;i:-1;i:230;i:-1;i:231;i:-1;i:232;i:-1;i:233;i:-1;i:234;i:-1;i:235;i:-1;i:236;i:-1;i:237;i:-1;i:238;i:-1;i:239;i:-1;i:240;i:-1;i:242;i:-1;i:243;i:-1;i:244;i:-1;i:245;i:-1;i:246;i:-1;i:247;i:-1;i:249;i:-1;i:250;i:-1;i:251;i:-1;i:252;i:-1;i:253;i:-1;i:254;i:-1;i:271;i:-1;i:272;i:-1;i:273;i:-1;i:274;i:-2;i:282;i:-1;i:283;i:-1;i:284;i:-2;i:296;i:1;i:297;i:-1;i:298;i:-2;i:300;i:1;i:301;i:-1;i:302;i:-2;i:304;i:1;i:307;i:1;i:308;i:1;i:309;i:1;i:310;i:1;i:311;i:1;i:313;i:1;i:315;i:1;i:317;i:1;i:318;i:-1;i:319;i:-1;i:320;i:-1;i:321;i:-1;i:323;i:1;i:325;i:1;i:326;i:1;i:327;i:1;i:328;i:1;i:329;i:1;i:330;i:1;i:332;i:1;i:333;i:-2;i:344;i:1;i:346;i:1;i:348;i:1;i:349;i:-2;i:350;i:1;}s:65:"/home/bjartka/public_html/doctrine/tests/Export/MysqlTestCase.php";a:181:{i:36;i:-1;i:38;i:-1;i:43;i:1;i:45;i:-1;i:46;i:1;i:47;i:1;i:49;i:1;i:52;i:1;i:54;i:1;i:55;i:1;i:57;i:1;i:59;i:1;i:60;i:1;i:63;i:1;i:65;i:1;i:67;i:1;i:70;i:1;i:71;i:1;i:74;i:1;i:75;i:1;i:76;i:1;i:78;i:1;i:79;i:1;i:81;i:1;i:82;i:1;i:85;i:1;i:87;i:1;i:88;i:1;i:89;i:1;i:91;i:1;i:93;i:1;i:94;i:1;i:97;i:1;i:99;i:1;i:100;i:1;i:102;i:1;i:104;i:1;i:105;i:1;i:108;i:1;i:110;i:1;i:111;i:1;i:113;i:1;i:115;i:1;i:116;i:1;i:119;i:1;i:121;i:1;i:122;i:1;i:124;i:1;i:126;i:1;i:127;i:1;i:130;i:1;i:132;i:1;i:133;i:1;i:135;i:1;i:137;i:1;i:138;i:1;i:141;i:1;i:143;i:1;i:144;i:1;i:146;i:1;i:148;i:1;i:149;i:1;i:152;i:1;i:154;i:1;i:155;i:1;i:157;i:1;i:159;i:1;i:160;i:1;i:164;i:1;i:166;i:1;i:167;i:1;i:169;i:1;i:171;i:1;i:172;i:1;i:175;i:1;i:177;i:1;i:178;i:1;i:179;i:1;i:180;i:1;i:181;i:1;i:182;i:1;i:183;i:1;i:184;i:1;i:187;i:1;i:189;i:1;i:190;i:1;i:191;i:1;i:194;i:1;i:196;i:1;i:198;i:1;i:199;i:1;i:200;i:1;i:201;i:1;i:202;i:1;i:203;i:1;i:204;i:1;i:205;i:1;i:208;i:1;i:210;i:1;i:211;i:1;i:213;i:1;i:214;i:1;i:217;i:1;i:219;i:1;i:220;i:1;i:221;i:1;i:223;i:1;i:224;i:1;i:225;i:1;i:227;i:1;i:233;i:1;i:235;i:1;i:236;i:1;i:239;i:1;i:241;i:1;i:242;i:1;i:243;i:1;i:244;i:1;i:245;i:1;i:246;i:1;i:247;i:1;i:248;i:1;i:249;i:1;i:252;i:1;i:253;i:1;i:254;i:1;i:255;i:1;i:258;i:1;i:260;i:1;i:261;i:1;i:264;i:1;i:266;i:1;i:267;i:1;i:271;i:1;i:273;i:1;i:274;i:1;i:277;i:1;i:278;i:1;i:281;i:1;i:282;i:-1;i:283;i:1;i:284;i:1;i:286;i:1;i:289;i:1;i:290;i:1;i:292;i:1;i:293;i:1;i:296;i:1;i:297;i:1;i:298;i:1;i:300;i:1;i:302;i:1;i:303;i:1;i:305;i:1;i:306;i:1;i:307;i:1;i:310;i:1;i:311;i:1;i:312;i:1;i:314;i:1;i:317;i:1;i:318;i:1;i:319;i:1;i:320;i:1;i:321;i:1;i:323;i:1;i:325;i:1;i:326;i:1;i:329;i:1;i:330;i:1;i:331;i:1;i:333;i:1;i:336;i:1;i:337;i:1;i:338;i:1;i:339;i:1;i:340;i:1;i:341;i:1;i:343;i:1;i:345;i:1;i:346;i:1;}s:62:"/home/bjartka/public_html/doctrine/lib/Doctrine/Expression.php";a:37:{i:0;i:1;i:21;i:1;i:34;i:1;i:41;i:1;i:43;i:1;i:44;i:-1;i:45;i:-1;i:46;i:1;i:50;i:1;i:51;i:1;i:52;i:-2;i:54;i:-1;i:55;i:-2;i:59;i:1;i:60;i:1;i:64;i:1;i:65;i:1;i:66;i:1;i:67;i:-2;i:70;i:1;i:71;i:1;i:74;i:1;i:75;i:1;i:76;i:1;i:78;i:1;i:79;i:-2;i:83;i:1;i:85;i:1;i:86;i:1;i:87;i:1;i:89;i:1;i:90;i:-2;i:95;i:1;i:96;i:-2;i:100;i:-1;i:101;i:-2;i:102;i:1;}s:67:"/home/bjartka/public_html/doctrine/lib/Doctrine/Query/Exception.php";a:3:{i:21;i:1;i:33;i:1;i:34;i:1;}s:72:"/home/bjartka/public_html/doctrine/tests/Query/MysqlSubqueryTestCase.php";a:54:{i:37;i:1;i:38;i:1;i:39;i:1;i:43;i:1;i:44;i:1;i:45;i:1;i:46;i:1;i:47;i:1;i:48;i:1;i:50;i:1;i:52;i:1;i:54;i:1;i:55;i:1;i:58;i:1;i:59;i:1;i:60;i:1;i:61;i:1;i:62;i:1;i:63;i:1;i:65;i:1;i:67;i:1;i:69;i:1;i:70;i:1;i:73;i:1;i:74;i:1;i:75;i:1;i:76;i:1;i:77;i:1;i:78;i:1;i:80;i:1;i:82;i:1;i:84;i:1;i:85;i:1;i:88;i:1;i:89;i:1;i:90;i:1;i:91;i:1;i:92;i:1;i:93;i:1;i:94;i:1;i:96;i:1;i:98;i:1;i:100;i:1;i:101;i:1;i:104;i:1;i:105;i:1;i:106;i:1;i:107;i:1;i:108;i:1;i:109;i:1;i:111;i:1;i:113;i:1;i:115;i:1;i:116;i:1;}s:59:"/home/bjartka/public_html/doctrine/tests/SchemaTestCase.php";a:98:{i:14;i:1;i:15;i:1;i:17;i:1;i:18;i:1;i:20;i:1;i:22;i:1;i:24;i:1;i:25;i:1;i:27;i:1;i:28;i:1;i:30;i:1;i:32;i:1;i:34;i:1;i:35;i:1;i:37;i:1;i:38;i:1;i:40;i:1;i:42;i:1;i:44;i:1;i:45;i:1;i:47;i:1;i:48;i:1;i:50;i:1;i:52;i:1;i:54;i:1;i:55;i:1;i:57;i:1;i:58;i:1;i:60;i:1;i:62;i:1;i:63;i:1;i:67;i:1;i:68;i:1;i:70;i:1;i:71;i:1;i:73;i:1;i:75;i:1;i:77;i:1;i:78;i:1;i:80;i:1;i:81;i:1;i:83;i:1;i:85;i:1;i:87;i:1;i:88;i:1;i:90;i:1;i:91;i:1;i:93;i:1;i:95;i:1;i:97;i:1;i:98;i:1;i:100;i:1;i:101;i:1;i:103;i:1;i:105;i:1;i:107;i:1;i:108;i:1;i:110;i:1;i:111;i:1;i:113;i:1;i:115;i:1;i:116;i:1;i:120;i:1;i:122;i:1;i:123;i:1;i:124;i:1;i:125;i:1;i:127;i:1;i:129;i:1;i:131;i:1;i:132;i:1;i:133;i:1;i:136;i:1;i:140;i:1;i:142;i:1;i:143;i:1;i:144;i:1;i:146;i:1;i:148;i:1;i:150;i:1;i:151;i:1;i:152;i:1;i:153;i:1;i:157;i:1;i:159;i:1;i:160;i:1;i:161;i:1;i:162;i:1;i:163;i:1;i:164;i:1;i:168;i:1;i:170;i:1;i:172;i:1;i:173;i:1;i:174;i:1;i:175;i:1;i:179;i:1;i:201;i:1;}s:59:"/home/bjartka/public_html/doctrine/lib/Doctrine/Manager.php";a:250:{i:0;i:1;i:34;i:1;i:69;i:1;i:71;i:1;i:72;i:1;i:81;i:1;i:82;i:1;i:83;i:1;i:85;i:1;i:86;i:1;i:87;i:1;i:88;i:1;i:89;i:1;i:90;i:1;i:91;i:1;i:92;i:1;i:93;i:1;i:94;i:1;i:95;i:1;i:96;i:1;i:97;i:1;i:98;i:1;i:99;i:1;i:100;i:1;i:101;i:1;i:102;i:1;i:103;i:1;i:104;i:1;i:105;i:1;i:106;i:1;i:107;i:-2;i:108;i:1;i:109;i:-2;i:117;i:-1;i:118;i:-2;i:128;i:1;i:129;i:1;i:130;i:1;i:131;i:1;i:132;i:1;i:133;i:-2;i:143;i:1;i:144;i:-1;i:145;i:-1;i:146;i:1;i:147;i:-2;i:157;i:1;i:159;i:1;i:160;i:-2;i:175;i:-1;i:176;i:-1;i:177;i:-1;i:178;i:-1;i:179;i:-2;i:194;i:-1;i:195;i:-1;i:196;i:-1;i:197;i:-1;i:198;i:-2;i:215;i:1;i:216;i:1;i:217;i:-2;i:218;i:1;i:220;i:-2;i:233;i:1;i:234;i:1;i:235;i:-1;i:236;i:-2;i:238;i:1;i:239;i:1;i:240;i:1;i:241;i:-1;i:242;i:-2;i:243;i:1;i:245;i:1;i:246;i:-1;i:247;i:-1;i:249;i:1;i:250;i:1;i:251;i:1;i:252;i:1;i:254;i:1;i:255;i:1;i:256;i:1;i:257;i:1;i:259;i:1;i:261;i:1;i:265;i:1;i:267;i:1;i:268;i:1;i:269;i:1;i:270;i:-1;i:271;i:-2;i:272;i:1;i:273;i:1;i:274;i:1;i:278;i:1;i:279;i:1;i:280;i:1;i:281;i:1;i:282;i:1;i:283;i:1;i:284;i:1;i:285;i:1;i:286;i:1;i:287;i:1;i:288;i:1;i:289;i:1;i:290;i:-1;i:291;i:-2;i:293;i:1;i:294;i:1;i:296;i:1;i:298;i:1;i:299;i:1;i:300;i:1;i:301;i:1;i:302;i:-2;i:312;i:1;i:314;i:1;i:316;i:1;i:317;i:1;i:318;i:1;i:319;i:1;i:320;i:1;i:322;i:1;i:323;i:-1;i:324;i:-2;i:326;i:1;i:327;i:1;i:328;i:1;i:329;i:1;i:330;i:1;i:331;i:-1;i:332;i:-1;i:333;i:-1;i:334;i:1;i:335;i:1;i:338;i:1;i:340;i:-1;i:341;i:-1;i:342;i:-1;i:343;i:-1;i:344;i:-2;i:345;i:-1;i:346;i:-1;i:347;i:-1;i:348;i:-1;i:349;i:-1;i:350;i:-2;i:352;i:-1;i:353;i:-1;i:354;i:-1;i:356;i:-1;i:357;i:-1;i:358;i:-1;i:360;i:-1;i:362;i:-1;i:363;i:-1;i:364;i:-1;i:365;i:-1;i:366;i:-1;i:367;i:-1;i:368;i:-1;i:369;i:-1;i:370;i:-1;i:371;i:-1;i:372;i:-1;i:373;i:-2;i:374;i:-1;i:375;i:-1;i:376;i:-1;i:377;i:-1;i:378;i:-1;i:379;i:-2;i:381;i:-1;i:382;i:-1;i:383;i:-1;i:385;i:-1;i:386;i:-1;i:387;i:-1;i:389;i:-1;i:390;i:-1;i:391;i:-1;i:392;i:-1;i:395;i:1;i:396;i:-2;i:405;i:1;i:406;i:1;i:407;i:-2;i:409;i:1;i:410;i:-2;i:422;i:-1;i:423;i:-1;i:424;i:-2;i:426;i:-1;i:427;i:-2;i:439;i:-1;i:441;i:-1;i:442;i:-2;i:451;i:1;i:452;i:-2;i:465;i:-1;i:466;i:-1;i:475;i:1;i:476;i:-1;i:477;i:-2;i:478;i:1;i:479;i:-2;i:491;i:1;i:492;i:-2;i:504;i:1;i:505;i:1;i:506;i:1;i:507;i:-2;i:516;i:-1;i:518;i:-1;i:520;i:-1;i:521;i:-1;i:522;i:-1;i:523;i:-1;i:525;i:-1;i:526;i:-1;i:535;i:1;i:536;i:-2;i:547;i:1;i:548;i:1;i:549;i:-1;i:550;i:-2;i:551;i:1;i:552;i:1;i:562;i:-1;i:563;i:-2;i:572;i:1;i:573;i:-2;i:582;i:1;i:583;i:-2;i:593;i:1;i:594;i:1;i:595;i:-1;i:596;i:-2;i:597;i:1;i:598;i:-2;i:607;i:-1;i:608;i:-1;i:609;i:-1;i:610;i:-1;i:611;i:-1;i:612;i:-2;i:614;i:1;}s:68:"/home/bjartka/public_html/doctrine/lib/Doctrine/Table/Repository.php";a:41:{i:0;i:1;i:34;i:1;i:53;i:1;i:54;i:1;i:62;i:-1;i:63;i:-2;i:72;i:1;i:74;i:1;i:75;i:1;i:76;i:-2;i:77;i:1;i:79;i:1;i:80;i:-2;i:88;i:-1;i:89;i:-1;i:90;i:-2;i:91;i:-1;i:92;i:-2;i:100;i:-1;i:101;i:-2;i:108;i:1;i:109;i:-1;i:110;i:-2;i:111;i:1;i:112;i:1;i:113;i:-2;i:119;i:1;i:120;i:1;i:121;i:1;i:122;i:1;i:123;i:1;i:124;i:1;i:125;i:1;i:126;i:-2;i:133;i:1;i:134;i:-2;i:141;i:-1;i:142;i:-2;i:149;i:-1;i:150;i:-1;i:151;i:1;}s:69:"/home/bjartka/public_html/doctrine/lib/Doctrine/Relation/LocalKey.php";a:24:{i:21;i:1;i:34;i:1;i:46;i:1;i:48;i:1;i:49;i:1;i:50;i:1;i:51;i:1;i:52;i:1;i:54;i:1;i:55;i:1;i:56;i:1;i:57;i:1;i:59;i:1;i:60;i:-1;i:61;i:-1;i:64;i:1;i:66;i:1;i:67;i:-2;i:76;i:1;i:77;i:1;i:78;i:1;i:79;i:1;i:80;i:-2;i:81;i:1;}s:67:"/home/bjartka/public_html/doctrine/lib/Doctrine/DataDict/Sqlite.php";a:189:{i:21;i:1;i:32;i:1;i:59;i:1;i:60;i:-1;i:61;i:-2;i:62;i:1;i:63;i:1;i:64;i:1;i:65;i:1;i:66;i:1;i:67;i:1;i:68;i:1;i:69;i:1;i:70;i:1;i:72;i:1;i:74;i:1;i:75;i:1;i:76;i:1;i:77;i:1;i:78;i:1;i:79;i:1;i:80;i:-1;i:81;i:1;i:82;i:-1;i:83;i:1;i:84;i:-1;i:85;i:-2;i:86;i:1;i:87;i:1;i:88;i:1;i:89;i:1;i:90;i:1;i:91;i:1;i:92;i:-1;i:93;i:1;i:94;i:-1;i:95;i:1;i:96;i:-1;i:97;i:-2;i:98;i:1;i:99;i:1;i:100;i:1;i:101;i:1;i:102;i:1;i:103;i:1;i:104;i:1;i:105;i:1;i:106;i:1;i:107;i:1;i:108;i:1;i:109;i:1;i:110;i:1;i:111;i:1;i:112;i:1;i:113;i:1;i:115;i:-1;i:116;i:-1;i:117;i:-1;i:118;i:-1;i:119;i:-1;i:120;i:-1;i:121;i:-2;i:130;i:1;i:131;i:1;i:132;i:1;i:133;i:1;i:134;i:1;i:136;i:1;i:137;i:-1;i:138;i:-1;i:141;i:1;i:142;i:1;i:143;i:1;i:144;i:1;i:145;i:1;i:146;i:1;i:147;i:1;i:148;i:-1;i:149;i:-1;i:150;i:1;i:151;i:1;i:152;i:1;i:153;i:1;i:154;i:1;i:155;i:1;i:156;i:1;i:157;i:1;i:158;i:1;i:159;i:1;i:160;i:1;i:161;i:1;i:162;i:1;i:163;i:1;i:164;i:1;i:165;i:1;i:166;i:1;i:167;i:1;i:168;i:1;i:169;i:1;i:170;i:1;i:171;i:1;i:172;i:1;i:173;i:1;i:174;i:1;i:175;i:1;i:176;i:1;i:177;i:1;i:178;i:1;i:179;i:1;i:180;i:1;i:181;i:1;i:182;i:1;i:183;i:-1;i:184;i:1;i:185;i:-1;i:186;i:-1;i:187;i:-1;i:188;i:-1;i:189;i:-1;i:190;i:-1;i:191;i:-1;i:192;i:-1;i:193;i:-1;i:194;i:-1;i:195;i:-1;i:196;i:-1;i:197;i:-1;i:198;i:1;i:199;i:-1;i:200;i:-1;i:201;i:-1;i:202;i:1;i:203;i:1;i:204;i:-1;i:205;i:-1;i:206;i:-1;i:207;i:1;i:208;i:-1;i:209;i:-1;i:210;i:-1;i:211;i:1;i:212;i:1;i:213;i:1;i:214;i:1;i:215;i:1;i:216;i:1;i:217;i:1;i:218;i:1;i:219;i:1;i:220;i:1;i:221;i:1;i:222;i:1;i:223;i:1;i:224;i:1;i:225;i:1;i:226;i:1;i:227;i:1;i:228;i:1;i:229;i:1;i:230;i:1;i:231;i:1;i:232;i:1;i:233;i:1;i:234;i:-1;i:235;i:-1;i:236;i:-1;i:238;i:1;i:239;i:1;i:240;i:1;i:241;i:1;i:242;i:-2;i:271;i:1;i:272;i:1;i:274;i:1;i:276;i:1;i:277;i:1;i:278;i:1;i:279;i:1;i:280;i:1;i:281;i:-1;i:282;i:-1;i:283;i:1;i:284;i:1;i:290;i:1;i:293;i:1;i:295;i:1;i:296;i:1;i:297;i:-2;i:298;i:1;}s:62:"/home/bjartka/public_html/doctrine/lib/Doctrine/Query/From.php";a:37:{i:21;i:1;i:33;i:1;i:44;i:1;i:45;i:1;i:47;i:1;i:49;i:1;i:50;i:1;i:51;i:1;i:52;i:1;i:53;i:1;i:54;i:1;i:55;i:-1;i:58;i:1;i:60;i:1;i:61;i:1;i:63;i:1;i:64;i:-1;i:65;i:-2;i:67;i:1;i:69;i:1;i:70;i:1;i:71;i:1;i:72;i:1;i:74;i:1;i:75;i:1;i:76;i:1;i:77;i:1;i:79;i:1;i:80;i:1;i:81;i:1;i:83;i:1;i:84;i:1;i:86;i:1;i:87;i:1;i:88;i:1;i:89;i:-2;i:90;i:1;}s:67:"/home/bjartka/public_html/doctrine/lib/Doctrine/DataDict/Oracle.php";a:124:{i:21;i:1;i:31;i:1;i:57;i:1;i:58;i:-1;i:59;i:-2;i:60;i:1;i:61;i:1;i:62;i:1;i:63;i:1;i:64;i:1;i:65;i:1;i:66;i:1;i:67;i:1;i:68;i:1;i:70;i:1;i:72;i:1;i:73;i:1;i:74;i:1;i:75;i:1;i:76;i:1;i:77;i:1;i:78;i:1;i:79;i:1;i:80;i:1;i:81;i:1;i:82;i:-2;i:83;i:1;i:84;i:1;i:85;i:1;i:86;i:1;i:87;i:1;i:88;i:1;i:89;i:1;i:90;i:1;i:91;i:1;i:92;i:1;i:93;i:-1;i:94;i:-1;i:95;i:-1;i:96;i:-1;i:97;i:-1;i:98;i:-1;i:99;i:-2;i:109;i:1;i:110;i:1;i:111;i:1;i:112;i:1;i:113;i:1;i:114;i:1;i:116;i:1;i:117;i:1;i:118;i:1;i:121;i:1;i:122;i:1;i:123;i:1;i:124;i:1;i:125;i:1;i:126;i:1;i:127;i:1;i:128;i:-1;i:129;i:-1;i:130;i:1;i:131;i:1;i:132;i:1;i:133;i:1;i:134;i:1;i:135;i:1;i:136;i:1;i:137;i:1;i:138;i:1;i:139;i:1;i:140;i:1;i:141;i:1;i:142;i:-1;i:143;i:-1;i:144;i:1;i:145;i:1;i:146;i:1;i:147;i:1;i:148;i:1;i:149;i:1;i:150;i:1;i:151;i:1;i:152;i:1;i:153;i:1;i:154;i:1;i:155;i:1;i:156;i:1;i:157;i:1;i:158;i:1;i:159;i:-1;i:160;i:-1;i:161;i:1;i:162;i:1;i:163;i:1;i:164;i:1;i:165;i:-1;i:166;i:-1;i:167;i:1;i:169;i:1;i:170;i:1;i:171;i:1;i:172;i:1;i:173;i:1;i:174;i:1;i:175;i:1;i:176;i:1;i:177;i:1;i:178;i:1;i:179;i:1;i:180;i:1;i:181;i:1;i:182;i:1;i:183;i:1;i:184;i:1;i:185;i:1;i:186;i:1;i:187;i:1;i:189;i:1;i:190;i:1;i:191;i:1;i:192;i:1;i:193;i:-2;i:194;i:1;}s:55:"/home/bjartka/public_html/doctrine/models/FooRecord.php";a:28:{i:6;i:1;i:8;i:1;i:9;i:1;i:10;i:1;i:11;i:1;i:14;i:1;i:15;i:1;i:16;i:1;i:17;i:1;i:18;i:1;i:20;i:1;i:21;i:1;i:22;i:1;i:23;i:1;i:24;i:1;i:26;i:1;i:27;i:1;i:28;i:1;i:29;i:1;i:31;i:1;i:33;i:1;i:34;i:1;i:35;i:1;i:37;i:1;i:38;i:1;i:39;i:1;i:40;i:1;i:42;i:1;}s:55:"/home/bjartka/public_html/doctrine/models/MysqlUser.php";a:3:{i:6;i:1;i:8;i:1;i:9;i:1;}s:66:"/home/bjartka/public_html/doctrine/lib/Doctrine/Import/Builder.php";a:193:{i:38;i:1;i:54;i:1;i:55;i:1;i:65;i:1;i:66;i:-1;i:67;i:-1;i:69;i:1;i:70;i:1;i:83;i:1;i:84;i:1;i:85;i:1;i:87;i:1;i:88;i:-2;i:97;i:-1;i:98;i:-2;i:108;i:1;i:109;i:1;i:110;i:-2;i:112;i:1;i:113;i:-1;i:120;i:1;i:121;i:1;i:123;i:1;i:133;i:1;i:135;i:1;i:137;i:1;i:138;i:-1;i:139;i:-1;i:140;i:-1;i:142;i:1;i:143;i:1;i:145;i:1;i:146;i:1;i:148;i:1;i:149;i:1;i:151;i:1;i:152;i:1;i:153;i:1;i:154;i:-1;i:157;i:1;i:159;i:1;i:160;i:-1;i:161;i:-1;i:162;i:1;i:163;i:1;i:164;i:1;i:165;i:1;i:166;i:1;i:167;i:1;i:168;i:1;i:169;i:1;i:170;i:1;i:171;i:1;i:172;i:-1;i:173;i:-1;i:174;i:1;i:175;i:-1;i:176;i:-1;i:177;i:1;i:178;i:-1;i:179;i:-1;i:181;i:1;i:182;i:1;i:183;i:1;i:184;i:1;i:185;i:1;i:187;i:1;i:189;i:1;i:190;i:1;i:191;i:1;i:192;i:1;i:193;i:1;i:195;i:1;i:196;i:1;i:197;i:-2;i:198;i:-1;i:201;i:1;i:203;i:1;i:205;i:1;i:206;i:-1;i:207;i:-1;i:208;i:-1;i:210;i:1;i:211;i:1;i:212;i:1;i:214;i:1;i:215;i:1;i:216;i:1;i:218;i:1;i:219;i:1;i:220;i:1;i:221;i:1;i:222;i:-1;i:225;i:1;i:227;i:1;i:228;i:-1;i:229;i:-1;i:231;i:1;i:232;i:-1;i:233;i:-1;i:235;i:1;i:236;i:1;i:237;i:1;i:239;i:1;i:240;i:1;i:241;i:1;i:243;i:1;i:244;i:1;i:245;i:1;i:247;i:1;i:248;i:1;i:249;i:1;i:251;i:1;i:252;i:1;i:253;i:1;i:254;i:1;i:255;i:1;i:257;i:1;i:258;i:1;i:259;i:1;i:261;i:1;i:262;i:-1;i:263;i:-1;i:264;i:-1;i:266;i:1;i:267;i:1;i:268;i:-2;i:269;i:1;i:273;i:1;i:274;i:-1;i:275;i:-2;i:277;i:1;i:278;i:1;i:279;i:1;i:280;i:1;i:281;i:1;i:283;i:1;i:284;i:1;i:285;i:1;i:286;i:1;i:287;i:1;i:289;i:1;i:290;i:-2;i:294;i:1;i:295;i:-1;i:296;i:-2;i:298;i:1;i:299;i:-1;i:300;i:-1;i:301;i:-2;i:304;i:-1;i:305;i:-1;i:306;i:-2;i:308;i:-1;i:309;i:-1;i:311;i:1;i:314;i:-1;i:315;i:-1;i:317;i:-1;i:318;i:-1;i:319;i:-1;i:320;i:-1;i:322;i:-1;i:324;i:-1;i:325;i:-1;i:327;i:-1;i:329;i:-1;i:330;i:-1;i:331;i:-1;i:333;i:-1;i:334;i:-1;i:335;i:-1;i:337;i:-1;i:338;i:-1;i:339;i:1;i:341;i:1;i:345;i:1;i:347;i:1;i:349;i:1;i:350;i:-1;i:351;i:-1;i:352;i:-1;i:354;i:-1;i:355;i:-1;i:356;i:-1;i:357;i:-1;i:359;i:1;i:361;i:1;i:363;i:1;i:364;i:-1;i:365;i:-2;i:366;i:1;i:367;i:1;}s:72:"/home/bjartka/public_html/doctrine/tests/EventListener/ChainTestCase.php";a:7:{i:36;i:1;i:39;i:1;i:40;i:1;i:41;i:1;i:44;i:1;i:45;i:1;i:47;i:1;}s:64:"/home/bjartka/public_html/doctrine/tests/Query/LimitTestCase.php";a:168:{i:39;i:1;i:40;i:1;i:41;i:1;i:43;i:1;i:44;i:1;i:48;i:1;i:49;i:1;i:51;i:1;i:52;i:1;i:53;i:1;i:55;i:1;i:58;i:1;i:59;i:1;i:61;i:1;i:62;i:1;i:63;i:1;i:64;i:1;i:68;i:1;i:69;i:1;i:71;i:1;i:73;i:1;i:74;i:1;i:76;i:1;i:77;i:1;i:78;i:1;i:79;i:1;i:80;i:1;i:82;i:1;i:84;i:1;i:85;i:1;i:86;i:1;i:87;i:1;i:88;i:1;i:89;i:1;i:93;i:1;i:94;i:1;i:96;i:1;i:98;i:1;i:100;i:1;i:101;i:1;i:102;i:1;i:103;i:1;i:104;i:1;i:106;i:1;i:107;i:1;i:108;i:1;i:113;i:1;i:114;i:1;i:117;i:1;i:119;i:1;i:120;i:1;i:121;i:1;i:122;i:1;i:123;i:1;i:125;i:1;i:126;i:1;i:130;i:1;i:131;i:1;i:132;i:1;i:135;i:1;i:137;i:1;i:138;i:1;i:139;i:1;i:140;i:1;i:141;i:1;i:144;i:1;i:146;i:1;i:147;i:1;i:148;i:1;i:149;i:1;i:150;i:1;i:152;i:1;i:153;i:1;i:154;i:1;i:158;i:1;i:159;i:1;i:160;i:1;i:161;i:1;i:162;i:1;i:164;i:1;i:165;i:1;i:166;i:1;i:167;i:1;i:169;i:1;i:170;i:1;i:172;i:1;i:173;i:1;i:174;i:1;i:175;i:1;i:177;i:1;i:178;i:1;i:181;i:1;i:182;i:1;i:183;i:1;i:185;i:1;i:188;i:1;i:189;i:1;i:190;i:1;i:194;i:1;i:195;i:1;i:196;i:1;i:197;i:1;i:199;i:1;i:201;i:1;i:203;i:1;i:206;i:1;i:207;i:1;i:209;i:1;i:211;i:1;i:213;i:1;i:214;i:1;i:215;i:1;i:217;i:1;i:218;i:1;i:220;i:1;i:221;i:1;i:223;i:1;i:224;i:1;i:226;i:1;i:228;i:1;i:229;i:1;i:233;i:1;i:234;i:1;i:237;i:1;i:239;i:1;i:241;i:1;i:242;i:1;i:243;i:1;i:244;i:1;i:246;i:1;i:247;i:1;i:251;i:1;i:253;i:1;i:254;i:1;i:255;i:1;i:256;i:1;i:258;i:1;i:260;i:1;i:261;i:1;i:262;i:1;i:266;i:1;i:267;i:1;i:269;i:1;i:272;i:1;i:273;i:1;i:274;i:1;i:275;i:1;i:276;i:1;i:277;i:1;i:278;i:1;i:279;i:1;i:280;i:1;i:281;i:1;i:282;i:1;i:283;i:1;i:285;i:1;i:286;i:1;i:288;i:1;i:289;i:1;i:290;i:1;i:291;i:1;i:292;i:1;i:296;i:1;i:298;i:1;i:299;i:1;i:300;i:1;i:302;i:1;i:303;i:1;}s:66:"/home/bjartka/public_html/doctrine/tests/Query/OrderbyTestCase.php";a:13:{i:37;i:1;i:39;i:1;i:40;i:1;i:41;i:1;i:43;i:1;i:44;i:1;i:47;i:1;i:49;i:1;i:50;i:1;i:51;i:1;i:52;i:1;i:54;i:1;i:55;i:1;}s:67:"/home/bjartka/public_html/doctrine/tests/Query/RegistryTestCase.php";a:15:{i:37;i:1;i:39;i:1;i:40;i:1;i:42;i:1;i:46;i:1;i:48;i:1;i:50;i:1;i:51;i:1;i:55;i:1;i:57;i:1;i:59;i:1;i:61;i:1;i:63;i:1;i:65;i:1;i:66;i:1;}s:66:"/home/bjartka/public_html/doctrine/models/CategoryWithPosition.php";a:5:{i:4;i:1;i:5;i:1;i:6;i:1;i:8;i:1;i:9;i:1;}s:61:"/home/bjartka/public_html/doctrine/tests/TemplateTestCase.php";a:49:{i:36;i:1;i:38;i:1;i:43;i:1;i:44;i:1;i:45;i:-1;i:46;i:1;i:47;i:1;i:49;i:1;i:53;i:1;i:54;i:1;i:55;i:1;i:56;i:1;i:58;i:1;i:59;i:1;i:61;i:1;i:63;i:1;i:64;i:1;i:68;i:1;i:70;i:1;i:71;i:1;i:75;i:1;i:76;i:1;i:77;i:1;i:86;i:1;i:87;i:1;i:88;i:1;i:91;i:1;i:92;i:1;i:93;i:1;i:94;i:1;i:95;i:1;i:96;i:1;i:100;i:1;i:101;i:-2;i:107;i:1;i:108;i:1;i:109;i:1;i:112;i:1;i:113;i:1;i:114;i:1;i:120;i:1;i:121;i:1;i:124;i:1;i:125;i:1;i:126;i:1;i:127;i:1;i:133;i:1;i:134;i:1;i:135;i:1;}s:59:"/home/bjartka/public_html/doctrine/models/ConcreteEmail.php";a:2:{i:6;i:1;i:7;i:1;}s:70:"/home/bjartka/public_html/doctrine/tests/DoctrineTest/UnitTestCase.php";a:63:{i:12;i:1;i:13;i:1;i:14;i:1;i:15;i:1;i:16;i:1;i:17;i:1;i:18;i:1;i:19;i:1;i:20;i:1;i:22;i:1;i:26;i:1;i:27;i:1;i:28;i:1;i:29;i:-1;i:31;i:1;i:35;i:1;i:36;i:1;i:37;i:1;i:38;i:-1;i:40;i:1;i:43;i:1;i:44;i:1;i:45;i:1;i:46;i:1;i:48;i:1;i:51;i:1;i:52;i:1;i:53;i:1;i:54;i:-1;i:56;i:1;i:59;i:1;i:60;i:1;i:63;i:-1;i:64;i:-1;i:67;i:1;i:68;i:1;i:71;i:1;i:72;i:1;i:73;i:1;i:75;i:1;i:76;i:-1;i:77;i:-1;i:79;i:1;i:80;i:1;i:81;i:1;i:82;i:-2;i:83;i:1;i:84;i:1;i:85;i:1;i:86;i:1;i:89;i:1;i:90;i:1;i:91;i:1;i:93;i:1;i:94;i:1;i:95;i:1;i:96;i:1;i:99;i:1;i:100;i:-2;i:103;i:1;i:104;i:-2;i:107;i:1;i:108;i:-2;}s:72:"/home/bjartka/public_html/doctrine/lib/Doctrine/Relation/Association.php";a:31:{i:21;i:1;i:36;i:1;i:43;i:1;i:44;i:-2;i:47;i:1;i:48;i:-2;i:57;i:1;i:59;i:1;i:60;i:1;i:61;i:1;i:62;i:1;i:63;i:1;i:64;i:1;i:65;i:1;i:66;i:-1;i:67;i:-1;i:68;i:-1;i:69;i:-1;i:70;i:-1;i:71;i:-2;i:73;i:1;i:74;i:-2;i:85;i:1;i:86;i:1;i:87;i:1;i:88;i:1;i:89;i:1;i:91;i:1;i:92;i:1;i:93;i:-2;i:94;i:1;}s:68:"/home/bjartka/public_html/doctrine/tests/DataDict/OracleTestCase.php";a:158:{i:37;i:1;i:38;i:-1;i:39;i:1;i:40;i:1;i:42;i:1;i:45;i:1;i:47;i:1;i:48;i:1;i:49;i:1;i:50;i:1;i:51;i:1;i:54;i:1;i:56;i:1;i:57;i:1;i:58;i:1;i:59;i:1;i:61;i:1;i:63;i:1;i:64;i:1;i:65;i:1;i:66;i:1;i:68;i:1;i:70;i:1;i:71;i:1;i:72;i:1;i:73;i:1;i:74;i:1;i:77;i:1;i:79;i:1;i:80;i:1;i:81;i:1;i:82;i:1;i:84;i:1;i:86;i:1;i:87;i:1;i:88;i:1;i:89;i:1;i:91;i:1;i:93;i:1;i:94;i:1;i:95;i:1;i:96;i:1;i:98;i:1;i:100;i:1;i:101;i:1;i:102;i:1;i:103;i:1;i:105;i:1;i:107;i:1;i:108;i:1;i:109;i:1;i:110;i:1;i:111;i:1;i:114;i:1;i:116;i:1;i:117;i:1;i:118;i:1;i:119;i:1;i:122;i:1;i:124;i:1;i:125;i:1;i:126;i:1;i:127;i:1;i:129;i:1;i:132;i:1;i:134;i:1;i:135;i:1;i:136;i:1;i:137;i:1;i:139;i:1;i:141;i:1;i:142;i:1;i:143;i:1;i:144;i:1;i:145;i:1;i:148;i:1;i:150;i:1;i:151;i:1;i:152;i:1;i:153;i:1;i:155;i:1;i:157;i:1;i:158;i:1;i:159;i:1;i:160;i:1;i:162;i:1;i:164;i:1;i:165;i:1;i:166;i:1;i:167;i:1;i:169;i:1;i:172;i:1;i:174;i:1;i:175;i:1;i:176;i:1;i:177;i:1;i:179;i:1;i:181;i:1;i:182;i:1;i:183;i:1;i:184;i:1;i:186;i:1;i:188;i:1;i:189;i:1;i:190;i:1;i:191;i:1;i:193;i:1;i:195;i:1;i:196;i:1;i:197;i:1;i:198;i:1;i:199;i:1;i:202;i:1;i:204;i:1;i:206;i:1;i:208;i:1;i:210;i:1;i:212;i:1;i:213;i:1;i:217;i:1;i:219;i:1;i:220;i:1;i:223;i:1;i:225;i:1;i:226;i:1;i:229;i:1;i:231;i:1;i:232;i:1;i:235;i:1;i:237;i:1;i:238;i:1;i:241;i:1;i:243;i:1;i:244;i:1;i:247;i:1;i:249;i:1;i:250;i:1;i:253;i:1;i:255;i:1;i:256;i:1;i:259;i:1;i:261;i:1;i:262;i:1;i:265;i:1;i:267;i:1;i:268;i:1;i:271;i:1;i:273;i:1;i:274;i:1;i:277;i:1;i:279;i:1;i:280;i:1;i:283;i:1;i:285;i:1;i:286;i:1;i:289;i:1;i:291;i:1;i:292;i:1;}s:68:"/home/bjartka/public_html/doctrine/tests/DataDict/SqliteTestCase.php";a:71:{i:37;i:1;i:38;i:1;i:41;i:1;i:42;i:1;i:43;i:1;i:44;i:1;i:45;i:1;i:46;i:1;i:47;i:1;i:48;i:1;i:49;i:1;i:52;i:1;i:53;i:1;i:54;i:1;i:55;i:1;i:56;i:1;i:59;i:1;i:60;i:1;i:61;i:1;i:64;i:1;i:65;i:1;i:66;i:1;i:67;i:1;i:70;i:1;i:71;i:1;i:74;i:1;i:76;i:1;i:78;i:1;i:80;i:1;i:82;i:1;i:84;i:1;i:85;i:1;i:89;i:1;i:91;i:1;i:92;i:1;i:95;i:1;i:97;i:1;i:98;i:1;i:101;i:1;i:103;i:1;i:104;i:1;i:107;i:1;i:109;i:1;i:110;i:1;i:113;i:1;i:115;i:1;i:116;i:1;i:119;i:1;i:121;i:1;i:122;i:1;i:125;i:1;i:127;i:1;i:128;i:1;i:131;i:1;i:133;i:1;i:134;i:1;i:137;i:1;i:139;i:1;i:140;i:1;i:143;i:1;i:145;i:1;i:146;i:1;i:149;i:1;i:151;i:1;i:152;i:1;i:155;i:1;i:157;i:1;i:158;i:1;i:161;i:1;i:163;i:1;i:164;i:1;}s:60:"/home/bjartka/public_html/doctrine/tests/ManagerTestCase.php";a:18:{i:35;i:1;i:36;i:1;i:38;i:1;i:39;i:1;i:41;i:1;i:42;i:1;i:44;i:1;i:45;i:1;i:47;i:1;i:48;i:1;i:50;i:1;i:51;i:1;i:53;i:1;i:54;i:1;i:55;i:1;i:58;i:1;i:59;i:1;i:60;i:1;}s:57:"/home/bjartka/public_html/doctrine/models/Forum_Entry.php";a:10:{i:4;i:1;i:5;i:1;i:6;i:1;i:7;i:1;i:8;i:1;i:9;i:1;i:10;i:1;i:12;i:1;i:13;i:1;i:14;i:1;}s:65:"/home/bjartka/public_html/doctrine/lib/Doctrine/Query/Orderby.php";a:25:{i:21;i:1;i:33;i:1;i:44;i:1;i:46;i:1;i:47;i:1;i:48;i:1;i:49;i:1;i:51;i:1;i:52;i:1;i:53;i:1;i:54;i:1;i:56;i:1;i:57;i:1;i:59;i:1;i:62;i:1;i:63;i:1;i:65;i:1;i:67;i:1;i:68;i:1;i:69;i:1;i:70;i:1;i:71;i:1;i:72;i:1;i:73;i:-2;i:74;i:1;}s:66:"/home/bjartka/public_html/doctrine/tests/TreeStructureTestCase.php";a:49:{i:38;i:1;i:39;i:1;i:40;i:1;i:45;i:1;i:49;i:1;i:52;i:1;i:53;i:1;i:54;i:1;i:55;i:1;i:56;i:-2;i:58;i:1;i:61;i:1;i:63;i:1;i:64;i:1;i:65;i:1;i:67;i:1;i:68;i:1;i:69;i:1;i:70;i:1;i:86;i:1;i:87;i:1;i:88;i:1;i:90;i:1;i:91;i:1;i:92;i:1;i:93;i:1;i:95;i:1;i:96;i:1;i:97;i:1;i:98;i:1;i:102;i:1;i:103;i:1;i:104;i:1;i:106;i:1;i:107;i:1;i:108;i:1;i:109;i:1;i:111;i:1;i:112;i:1;i:114;i:1;i:115;i:1;i:116;i:1;i:119;i:1;i:120;i:1;i:121;i:1;i:122;i:1;i:123;i:1;i:125;i:1;i:127;i:1;}s:54:"/home/bjartka/public_html/doctrine/models/TreeLeaf.php";a:6:{i:6;i:1;i:7;i:1;i:8;i:1;i:11;i:1;i:12;i:1;i:13;i:1;}s:71:"/home/bjartka/public_html/doctrine/lib/Doctrine/EventListener/Chain.php";a:143:{i:21;i:1;i:36;i:1;i:52;i:1;i:53;i:1;i:55;i:-1;i:56;i:-2;i:57;i:1;i:58;i:1;i:59;i:1;i:60;i:-1;i:62;i:1;i:72;i:-1;i:73;i:-1;i:74;i:-2;i:75;i:-1;i:76;i:-2;i:86;i:-1;i:87;i:-1;i:97;i:-1;i:98;i:-1;i:99;i:-1;i:100;i:-1;i:111;i:-1;i:112;i:-1;i:113;i:-1;i:114;i:-1;i:124;i:-1;i:125;i:-1;i:126;i:-1;i:127;i:-1;i:137;i:-1;i:138;i:-1;i:139;i:-1;i:140;i:-1;i:150;i:-1;i:151;i:-1;i:152;i:-1;i:153;i:-1;i:163;i:-1;i:164;i:-1;i:165;i:-1;i:166;i:-1;i:176;i:-1;i:177;i:-1;i:178;i:-1;i:179;i:-1;i:189;i:1;i:190;i:1;i:191;i:1;i:192;i:1;i:202;i:1;i:203;i:1;i:204;i:1;i:205;i:1;i:215;i:-1;i:216;i:-1;i:217;i:-1;i:218;i:-1;i:228;i:-1;i:229;i:-1;i:230;i:-1;i:231;i:-1;i:241;i:1;i:242;i:1;i:243;i:1;i:244;i:1;i:254;i:1;i:255;i:1;i:256;i:1;i:257;i:1;i:267;i:-1;i:268;i:-1;i:269;i:-1;i:270;i:-1;i:280;i:-1;i:281;i:-1;i:282;i:-1;i:283;i:-1;i:286;i:-1;i:287;i:-1;i:288;i:-1;i:289;i:-1;i:292;i:-1;i:293;i:-1;i:294;i:-1;i:295;i:-1;i:298;i:-1;i:299;i:-1;i:300;i:-1;i:301;i:-1;i:304;i:-1;i:305;i:-1;i:306;i:-1;i:307;i:-1;i:311;i:1;i:312;i:1;i:313;i:1;i:314;i:1;i:317;i:1;i:318;i:1;i:319;i:1;i:320;i:1;i:324;i:1;i:325;i:1;i:326;i:1;i:327;i:1;i:330;i:1;i:331;i:1;i:332;i:1;i:333;i:1;i:337;i:1;i:338;i:1;i:339;i:1;i:340;i:1;i:343;i:-1;i:344;i:-1;i:345;i:-1;i:346;i:-1;i:350;i:1;i:351;i:1;i:352;i:1;i:353;i:1;i:356;i:1;i:357;i:1;i:358;i:1;i:359;i:1;i:363;i:-1;i:364;i:-1;i:365;i:-1;i:366;i:-1;i:370;i:-1;i:371;i:-1;i:372;i:-1;i:373;i:-1;i:377;i:1;i:378;i:1;i:379;i:1;i:380;i:1;i:384;i:1;i:385;i:1;i:386;i:1;i:387;i:1;i:389;i:1;}s:50:"/home/bjartka/public_html/doctrine/models/Auth.php";a:5:{i:6;i:1;i:7;i:1;i:8;i:1;i:11;i:1;i:12;i:1;}s:63:"/home/bjartka/public_html/doctrine/lib/Doctrine/Query/Limit.php";a:4:{i:33;i:1;i:37;i:1;i:38;i:-2;i:39;i:1;}s:60:"/home/bjartka/public_html/doctrine/lib/Doctrine/Template.php";a:16:{i:49;i:1;i:50;i:1;i:59;i:-1;i:60;i:-2;i:71;i:1;i:72;i:1;i:81;i:-1;i:82;i:-2;i:86;i:1;i:87;i:-2;i:91;i:-1;i:92;i:-2;i:95;i:-1;i:96;i:-2;i:100;i:1;i:105;i:1;}s:79:"/home/bjartka/public_html/doctrine/lib/Doctrine/Plugin.php(175) : eval()'d code";a:13:{i:4;i:1;i:9;i:1;i:11;i:1;i:13;i:1;i:14;i:1;i:15;i:1;i:16;i:1;i:20;i:1;i:21;i:1;i:22;i:1;i:23;i:1;i:24;i:1;i:25;i:1;}s:59:"/home/bjartka/public_html/doctrine/models/ValidatorTest.php";a:10:{i:4;i:1;i:5;i:1;i:6;i:1;i:7;i:1;i:8;i:1;i:9;i:1;i:10;i:1;i:12;i:1;i:13;i:1;i:14;i:1;}s:63:"/home/bjartka/public_html/doctrine/tests/Query/FromTestCase.php";a:40:{i:36;i:1;i:40;i:1;i:42;i:1;i:43;i:1;i:46;i:1;i:48;i:1;i:50;i:1;i:51;i:1;i:55;i:1;i:57;i:1;i:59;i:1;i:60;i:1;i:64;i:1;i:66;i:1;i:68;i:1;i:69;i:1;i:73;i:1;i:75;i:1;i:77;i:1;i:78;i:1;i:81;i:1;i:83;i:1;i:85;i:1;i:86;i:1;i:89;i:1;i:91;i:1;i:93;i:1;i:94;i:1;i:97;i:1;i:99;i:1;i:101;i:1;i:102;i:1;i:105;i:1;i:107;i:1;i:109;i:1;i:110;i:1;i:113;i:1;i:115;i:1;i:117;i:1;i:118;i:1;}s:66:"/home/bjartka/public_html/doctrine/lib/Doctrine/Query/Registry.php";a:23:{i:34;i:1;i:39;i:1;i:40;i:1;i:41;i:1;i:44;i:1;i:46;i:1;i:48;i:1;i:52;i:1;i:53;i:1;i:54;i:-1;i:55;i:-2;i:56;i:1;i:57;i:1;i:58;i:1;i:59;i:-1;i:60;i:-2;i:61;i:1;i:64;i:1;i:65;i:1;i:66;i:1;i:68;i:1;i:69;i:-2;i:70;i:1;}s:54:"/home/bjartka/public_html/doctrine/models/CustomPK.php";a:3:{i:4;i:1;i:5;i:1;i:6;i:1;}s:70:"/home/bjartka/public_html/doctrine/lib/Doctrine/Template/NestedSet.php";a:7:{i:32;i:1;i:38;i:1;i:39;i:1;i:43;i:1;i:44;i:1;i:45;i:1;i:46;i:1;}s:62:"/home/bjartka/public_html/doctrine/lib/Doctrine/Parser/Yml.php";a:15:{i:2;i:1;i:34;i:1;i:48;i:1;i:50;i:1;i:52;i:1;i:53;i:1;i:54;i:-2;i:55;i:-1;i:57;i:-2;i:69;i:1;i:71;i:1;i:73;i:1;i:75;i:1;i:76;i:-2;i:78;i:1;}s:78:"/home/bjartka/public_html/doctrine/lib/Doctrine/Connection/Mssql/Exception.php";a:10:{i:21;i:1;i:34;i:1;i:67;i:1;i:68;i:1;i:69;i:1;i:70;i:1;i:71;i:-2;i:72;i:-1;i:73;i:-2;i:74;i:1;}s:69:"/home/bjartka/public_html/doctrine/lib/Doctrine/Transaction/Mysql.php";a:25:{i:21;i:1;i:33;i:1;i:44;i:1;i:46;i:1;i:47;i:-2;i:57;i:1;i:59;i:1;i:60;i:-2;i:70;i:1;i:72;i:1;i:73;i:-2;i:90;i:1;i:91;i:1;i:92;i:1;i:93;i:1;i:94;i:1;i:95;i:1;i:96;i:1;i:97;i:1;i:99;i:1;i:101;i:1;i:102;i:-2;i:110;i:1;i:111;i:-2;i:112;i:1;}s:70:"/home/bjartka/public_html/doctrine/tests/Transaction/PgsqlTestCase.php";a:18:{i:37;i:1;i:39;i:1;i:40;i:1;i:43;i:1;i:45;i:1;i:46;i:1;i:49;i:1;i:50;i:1;i:52;i:1;i:53;i:1;i:57;i:1;i:58;i:-1;i:59;i:1;i:60;i:1;i:62;i:1;i:65;i:1;i:67;i:1;i:68;i:1;}s:65:"/home/bjartka/public_html/doctrine/tests/Export/PgsqlTestCase.php";a:69:{i:37;i:1;i:38;i:1;i:39;i:1;i:42;i:1;i:44;i:1;i:45;i:1;i:48;i:1;i:50;i:1;i:51;i:1;i:53;i:1;i:55;i:1;i:56;i:1;i:59;i:1;i:61;i:1;i:63;i:1;i:64;i:1;i:66;i:1;i:68;i:1;i:70;i:1;i:71;i:1;i:72;i:1;i:74;i:1;i:75;i:1;i:77;i:1;i:79;i:1;i:80;i:1;i:83;i:1;i:85;i:1;i:87;i:1;i:88;i:1;i:89;i:1;i:90;i:1;i:91;i:1;i:92;i:1;i:93;i:1;i:96;i:1;i:98;i:1;i:99;i:1;i:101;i:1;i:102;i:1;i:105;i:1;i:106;i:1;i:107;i:1;i:108;i:1;i:110;i:1;i:111;i:1;i:113;i:1;i:114;i:1;i:117;i:1;i:118;i:1;i:119;i:1;i:121;i:1;i:122;i:1;i:124;i:1;i:125;i:1;i:128;i:1;i:131;i:1;i:132;i:1;i:133;i:1;i:134;i:1;i:135;i:1;i:136;i:1;i:137;i:1;i:138;i:1;i:139;i:1;i:140;i:1;i:141;i:1;i:142;i:1;i:143;i:1;}s:61:"/home/bjartka/public_html/doctrine/models/FooLocallyOwned.php";a:2:{i:6;i:1;i:7;i:1;}s:64:"/home/bjartka/public_html/doctrine/lib/Doctrine/Export/Mysql.php";a:286:{i:21;i:1;i:34;i:1;i:44;i:1;i:45;i:-2;i:54;i:1;i:55;i:-2;i:92;i:1;i:93;i:1;i:95;i:1;i:96;i:-1;i:97;i:-2;i:98;i:1;i:101;i:1;i:102;i:1;i:103;i:1;i:104;i:1;i:105;i:1;i:106;i:1;i:107;i:1;i:109;i:-1;i:110;i:1;i:112;i:1;i:113;i:1;i:114;i:1;i:115;i:1;i:116;i:1;i:117;i:1;i:119;i:-1;i:120;i:-1;i:122;i:1;i:123;i:1;i:124;i:1;i:125;i:1;i:126;i:1;i:129;i:1;i:130;i:1;i:131;i:1;i:132;i:1;i:133;i:1;i:136;i:1;i:137;i:1;i:138;i:1;i:139;i:1;i:140;i:1;i:142;i:1;i:144;i:1;i:146;i:1;i:147;i:-1;i:148;i:-1;i:149;i:1;i:150;i:1;i:151;i:1;i:152;i:1;i:153;i:1;i:154;i:1;i:156;i:1;i:159;i:1;i:160;i:1;i:161;i:1;i:162;i:1;i:165;i:1;i:166;i:1;i:167;i:1;i:169;i:1;i:170;i:1;i:171;i:1;i:172;i:1;i:174;i:1;i:176;i:1;i:177;i:1;i:178;i:1;i:179;i:1;i:180;i:1;i:181;i:1;i:182;i:1;i:183;i:-2;i:274;i:1;i:275;i:1;i:276;i:-2;i:277;i:-1;i:279;i:-1;i:280;i:-1;i:281;i:-1;i:282;i:-1;i:283;i:-1;i:284;i:-1;i:285;i:-1;i:286;i:-1;i:287;i:-1;i:288;i:-1;i:290;i:-1;i:291;i:-1;i:292;i:-2;i:294;i:-1;i:295;i:-1;i:296;i:-1;i:297;i:-1;i:298;i:-1;i:300;i:-1;i:301;i:-1;i:302;i:-1;i:303;i:-1;i:304;i:-1;i:305;i:-1;i:306;i:-1;i:307;i:-1;i:309;i:-1;i:310;i:-1;i:311;i:-1;i:312;i:-1;i:313;i:-1;i:314;i:-1;i:315;i:-1;i:316;i:-1;i:317;i:-1;i:319;i:-1;i:320;i:-1;i:321;i:-1;i:322;i:-1;i:323;i:-1;i:324;i:-1;i:326;i:-1;i:327;i:-1;i:328;i:-1;i:329;i:-1;i:330;i:-1;i:331;i:-1;i:332;i:-1;i:333;i:-1;i:334;i:-1;i:335;i:-1;i:337;i:-1;i:338;i:-1;i:339;i:-1;i:340;i:-1;i:341;i:-1;i:343;i:-1;i:344;i:-1;i:345;i:-1;i:346;i:-1;i:347;i:-1;i:348;i:-1;i:349;i:-1;i:350;i:-1;i:351;i:-1;i:352;i:-1;i:353;i:-1;i:355;i:-1;i:356;i:-1;i:357;i:-2;i:359;i:-1;i:361;i:-1;i:362;i:-2;i:379;i:-1;i:380;i:-1;i:382;i:-1;i:384;i:-1;i:385;i:-1;i:386;i:-1;i:388;i:-1;i:389;i:-1;i:391;i:-1;i:392;i:-1;i:393;i:-1;i:394;i:-1;i:396;i:-1;i:398;i:-1;i:399;i:-1;i:400;i:-1;i:401;i:-1;i:403;i:-1;i:404;i:-1;i:405;i:-1;i:410;i:-1;i:411;i:-1;i:412;i:-1;i:413;i:-1;i:415;i:-1;i:416;i:-1;i:417;i:-2;i:420;i:-1;i:421;i:-1;i:424;i:-1;i:426;i:-1;i:430;i:-1;i:431;i:-1;i:432;i:-2;i:436;i:-1;i:473;i:-1;i:474;i:-1;i:475;i:-1;i:476;i:-1;i:477;i:-1;i:478;i:-1;i:479;i:-1;i:480;i:-1;i:481;i:-1;i:482;i:-1;i:483;i:-1;i:484;i:-1;i:485;i:-1;i:486;i:-1;i:487;i:-1;i:488;i:-1;i:490;i:-1;i:491;i:-2;i:502;i:1;i:503;i:1;i:504;i:-1;i:505;i:-1;i:506;i:-1;i:508;i:-1;i:509;i:-1;i:510;i:-1;i:511;i:-1;i:512;i:-1;i:513;i:-1;i:515;i:-1;i:516;i:-1;i:517;i:1;i:518;i:-2;i:529;i:1;i:530;i:1;i:531;i:1;i:532;i:1;i:533;i:1;i:534;i:1;i:535;i:1;i:536;i:1;i:537;i:-1;i:538;i:-1;i:539;i:-1;i:540;i:1;i:542;i:1;i:543;i:-1;i:544;i:-2;i:545;i:1;i:546;i:1;i:547;i:1;i:549;i:1;i:551;i:1;i:553;i:1;i:554;i:-2;i:564;i:1;i:566;i:1;i:567;i:1;i:569;i:1;i:570;i:1;i:571;i:1;i:572;i:1;i:574;i:1;i:575;i:1;i:577;i:1;i:578;i:1;i:579;i:1;i:580;i:1;i:581;i:1;i:582;i:1;i:583;i:1;i:584;i:1;i:585;i:1;i:586;i:1;i:588;i:1;i:589;i:1;i:590;i:1;i:591;i:-2;i:602;i:1;i:603;i:1;i:604;i:-1;i:605;i:-1;i:606;i:1;i:607;i:1;i:608;i:1;i:609;i:1;i:610;i:1;i:611;i:1;i:612;i:1;i:613;i:-2;i:623;i:1;i:624;i:1;i:625;i:1;i:626;i:-2;i:636;i:-1;i:637;i:-1;i:638;i:-2;i:639;i:1;}s:63:"/home/bjartka/public_html/doctrine/tests/ExpressionTestCase.php";a:15:{i:37;i:1;i:41;i:1;i:42;i:1;i:44;i:1;i:45;i:1;i:46;i:1;i:47;i:1;i:48;i:1;i:49;i:1;i:53;i:1;i:54;i:1;i:55;i:1;i:59;i:1;i:60;i:1;i:61;i:1;}s:50:"/home/bjartka/public_html/doctrine/models/Book.php";a:8:{i:6;i:1;i:7;i:1;i:8;i:1;i:9;i:1;i:10;i:1;i:13;i:1;i:14;i:1;i:15;i:1;}s:70:"/home/bjartka/public_html/doctrine/tests/Relation/OneToOneTestCase.php";a:41:{i:36;i:1;i:39;i:1;i:41;i:1;i:42;i:1;i:46;i:1;i:47;i:1;i:49;i:1;i:50;i:1;i:54;i:1;i:56;i:1;i:58;i:1;i:59;i:1;i:61;i:1;i:62;i:1;i:64;i:1;i:65;i:1;i:68;i:1;i:70;i:1;i:71;i:1;i:72;i:1;i:73;i:1;i:77;i:1;i:78;i:1;i:79;i:1;i:80;i:1;i:81;i:1;i:82;i:1;i:83;i:1;i:84;i:1;i:85;i:1;i:86;i:1;i:87;i:1;i:91;i:1;i:92;i:1;i:93;i:1;i:94;i:1;i:95;i:1;i:96;i:1;i:97;i:1;i:98;i:1;i:100;i:1;}s:65:"/home/bjartka/public_html/doctrine/lib/Doctrine/Template/I18n.php";a:19:{i:32;i:1;i:39;i:1;i:40;i:1;i:49;i:-1;i:50;i:-1;i:53;i:1;i:54;i:1;i:55;i:1;i:57;i:1;i:58;i:1;i:59;i:1;i:60;i:1;i:62;i:1;i:64;i:1;i:66;i:1;i:67;i:1;i:70;i:-1;i:71;i:-2;i:72;i:1;}s:66:"/home/bjartka/public_html/doctrine/tests/EventListenerTestCase.php";a:21:{i:38;i:1;i:40;i:1;i:41;i:1;i:42;i:1;i:45;i:1;i:47;i:1;i:49;i:1;i:51;i:1;i:52;i:1;i:54;i:1;i:55;i:1;i:183;i:-1;i:184;i:-1;i:186;i:-1;i:187;i:-2;i:189;i:-1;i:190;i:-1;i:192;i:-1;i:193;i:-2;i:195;i:-1;i:196;i:-2;}s:68:"/home/bjartka/public_html/doctrine/models/EventListenerChainTest.php";a:6:{i:5;i:1;i:6;i:1;i:8;i:1;i:9;i:1;i:10;i:1;i:11;i:1;}s:72:"/home/bjartka/public_html/doctrine/tests/Query/PgsqlSubqueryTestCase.php";a:23:{i:37;i:1;i:38;i:1;i:39;i:1;i:43;i:1;i:44;i:1;i:45;i:1;i:46;i:1;i:47;i:1;i:48;i:1;i:50;i:1;i:52;i:1;i:54;i:1;i:55;i:1;i:57;i:1;i:61;i:1;i:62;i:1;i:63;i:1;i:64;i:1;i:65;i:1;i:66;i:1;i:68;i:1;i:70;i:1;i:71;i:1;}s:58:"/home/bjartka/public_html/doctrine/lib/Doctrine/Schema.php";a:8:{i:33;i:1;i:48;i:-1;i:49;i:-1;i:58;i:-1;i:59;i:-2;i:68;i:-1;i:77;i:-1;i:79;i:1;}s:63:"/home/bjartka/public_html/doctrine/models/ConcreteGroupUser.php";a:2:{i:6;i:1;i:7;i:1;}s:63:"/home/bjartka/public_html/doctrine/lib/Doctrine/Parser/spyc.php";a:419:{i:17;i:1;i:47;i:1;i:48;i:1;i:65;i:1;i:83;i:-1;i:84;i:-1;i:85;i:-2;i:108;i:-1;i:109;i:-1;i:110;i:-2;i:130;i:1;i:131;i:1;i:132;i:-1;i:133;i:-1;i:134;i:1;i:137;i:1;i:138;i:1;i:139;i:1;i:140;i:1;i:141;i:1;i:142;i:1;i:143;i:1;i:145;i:1;i:146;i:1;i:149;i:1;i:150;i:-1;i:151;i:-1;i:152;i:-1;i:153;i:-2;i:155;i:1;i:156;i:-1;i:157;i:1;i:158;i:-1;i:159;i:-1;i:160;i:1;i:162;i:1;i:163;i:1;i:165;i:1;i:168;i:1;i:170;i:1;i:171;i:-1;i:172;i:-1;i:173;i:-1;i:175;i:1;i:176;i:1;i:177;i:1;i:179;i:1;i:180;i:1;i:181;i:-1;i:182;i:-1;i:183;i:1;i:185;i:1;i:190;i:1;i:191;i:1;i:192;i:1;i:193;i:1;i:194;i:1;i:195;i:1;i:196;i:1;i:197;i:-1;i:198;i:-1;i:199;i:-1;i:200;i:-1;i:201;i:-1;i:202;i:-1;i:203;i:-1;i:204;i:1;i:205;i:-1;i:206;i:-1;i:207;i:-1;i:208;i:-1;i:209;i:-1;i:210;i:-1;i:211;i:-1;i:212;i:-1;i:213;i:1;i:214;i:1;i:215;i:1;i:217;i:1;i:218;i:-1;i:219;i:-1;i:220;i:-1;i:221;i:-1;i:222;i:-1;i:223;i:-1;i:224;i:-1;i:228;i:1;i:229;i:1;i:230;i:1;i:231;i:1;i:232;i:1;i:233;i:1;i:235;i:1;i:237;i:1;i:239;i:1;i:241;i:1;i:243;i:1;i:245;i:1;i:247;i:1;i:251;i:1;i:252;i:1;i:253;i:1;i:254;i:-1;i:255;i:1;i:256;i:-1;i:257;i:1;i:258;i:1;i:259;i:-1;i:260;i:-1;i:261;i:1;i:262;i:1;i:263;i:1;i:264;i:1;i:266;i:-1;i:267;i:-1;i:268;i:-1;i:269;i:-1;i:270;i:-1;i:271;i:-1;i:272;i:-1;i:273;i:-1;i:274;i:-1;i:275;i:-1;i:276;i:1;i:277;i:1;i:278;i:1;i:279;i:1;i:282;i:1;i:285;i:1;i:286;i:1;i:287;i:-2;i:314;i:1;i:315;i:1;i:316;i:1;i:317;i:-1;i:320;i:1;i:321;i:1;i:322;i:1;i:323;i:-1;i:327;i:1;i:330;i:1;i:331;i:-1;i:332;i:-1;i:333;i:1;i:334;i:-2;i:373;i:-1;i:376;i:-1;i:378;i:-1;i:380;i:-1;i:381;i:-1;i:383;i:-1;i:384;i:-1;i:385;i:-1;i:386;i:-2;i:396;i:-1;i:397;i:-1;i:398;i:-1;i:399;i:-1;i:400;i:-1;i:401;i:-1;i:402;i:-2;i:403;i:-1;i:405;i:-2;i:417;i:-1;i:418;i:-1;i:419;i:-1;i:420;i:-1;i:423;i:-1;i:424;i:-1;i:425;i:-1;i:427;i:-1;i:429;i:-1;i:431;i:-1;i:432;i:-1;i:434;i:-1;i:436;i:-1;i:437;i:-2;i:447;i:-1;i:448;i:-1;i:449;i:-1;i:450;i:-1;i:451;i:-1;i:452;i:-1;i:453;i:-1;i:454;i:-1;i:455;i:-2;i:465;i:-1;i:466;i:-1;i:467;i:-2;i:469;i:-1;i:470;i:-1;i:471;i:-1;i:472;i:-1;i:473;i:-1;i:474;i:-1;i:475;i:-1;i:476;i:-2;i:487;i:1;i:488;i:1;i:489;i:1;i:490;i:1;i:491;i:1;i:493;i:1;i:494;i:-2;i:503;i:1;i:505;i:1;i:507;i:1;i:509;i:-1;i:510;i:-1;i:511;i:1;i:513;i:-1;i:514;i:-1;i:516;i:-1;i:517;i:-1;i:518;i:-1;i:519;i:-1;i:521;i:1;i:524;i:1;i:525;i:-1;i:526;i:-1;i:527;i:-1;i:529;i:1;i:530;i:1;i:531;i:1;i:532;i:1;i:536;i:1;i:537;i:1;i:538;i:-1;i:539;i:-1;i:540;i:1;i:542;i:1;i:543;i:1;i:544;i:-2;i:553;i:1;i:554;i:-1;i:555;i:-1;i:556;i:1;i:560;i:-1;i:563;i:-1;i:564;i:-1;i:565;i:-1;i:566;i:-1;i:567;i:1;i:569;i:-1;i:570;i:-1;i:571;i:-1;i:572;i:-1;i:573;i:-1;i:574;i:-1;i:575;i:1;i:579;i:-1;i:582;i:-1;i:583;i:-1;i:584;i:-1;i:585;i:-1;i:586;i:-1;i:587;i:1;i:588;i:1;i:589;i:1;i:591;i:1;i:592;i:1;i:593;i:1;i:594;i:1;i:595;i:1;i:596;i:1;i:597;i:-1;i:598;i:1;i:599;i:-1;i:600;i:-1;i:602;i:1;i:605;i:1;i:606;i:-2;i:619;i:-1;i:622;i:-1;i:623;i:-1;i:624;i:-1;i:625;i:-1;i:626;i:-1;i:627;i:-1;i:630;i:-1;i:631;i:-1;i:632;i:-1;i:633;i:-1;i:636;i:-1;i:637;i:-1;i:638;i:-1;i:639;i:-1;i:641;i:-1;i:645;i:-1;i:646;i:-1;i:647;i:-1;i:648;i:-1;i:649;i:-1;i:650;i:-1;i:651;i:-1;i:652;i:-1;i:653;i:-1;i:656;i:-1;i:657;i:-1;i:658;i:-1;i:659;i:-1;i:660;i:-1;i:661;i:-1;i:662;i:-1;i:663;i:-1;i:664;i:-1;i:667;i:-1;i:668;i:-1;i:669;i:-1;i:670;i:-1;i:671;i:-1;i:672;i:-1;i:673;i:-1;i:674;i:-1;i:675;i:-1;i:676;i:-1;i:678;i:-1;i:679;i:-2;i:687;i:1;i:689;i:1;i:690;i:-1;i:691;i:-2;i:693;i:1;i:694;i:1;i:695;i:1;i:697;i:1;i:699;i:1;i:700;i:1;i:701;i:1;i:703;i:1;i:704;i:-2;i:712;i:1;i:713;i:-1;i:714;i:-1;i:715;i:-1;i:717;i:-1;i:718;i:-1;i:719;i:-1;i:720;i:-1;i:721;i:-1;i:722;i:-1;i:724;i:-1;i:725;i:-1;i:726;i:-1;i:727;i:1;i:728;i:-2;i:731;i:-1;i:733;i:-1;i:735;i:-1;i:736;i:-1;i:737;i:-1;i:739;i:-1;i:740;i:-1;i:742;i:-1;i:743;i:-1;i:744;i:-1;i:745;i:-1;i:747;i:-1;i:748;i:-1;i:749;i:-1;i:751;i:-1;i:752;i:-1;i:754;i:-1;i:755;i:-1;i:756;i:-1;i:757;i:-1;i:766;i:1;i:767;i:1;i:768;i:1;i:769;i:1;i:770;i:1;i:772;i:1;i:774;i:1;i:777;i:1;i:778;i:1;i:779;i:1;i:780;i:1;i:781;i:-2;i:791;i:1;i:793;i:1;i:795;i:1;i:796;i:1;i:798;i:1;i:799;i:-1;i:800;i:-1;i:801;i:-1;i:802;i:-1;i:804;i:-1;i:805;i:1;i:807;i:1;i:809;i:-1;i:810;i:-1;i:811;i:-1;i:812;i:-1;i:815;i:1;i:816;i:-2;i:826;i:1;i:827;i:-1;i:829;i:-1;i:831;i:1;i:832;i:-1;i:833;i:-1;i:835;i:-1;i:836;i:-1;i:837;i:-1;i:838;i:1;i:839;i:-2;i:856;i:1;i:857;i:1;i:859;i:1;i:860;i:1;i:861;i:1;i:862;i:1;i:863;i:1;i:864;i:1;i:865;i:1;i:866;i:1;i:867;i:-2;i:869;i:1;}s:62:"/home/bjartka/public_html/doctrine/lib/Doctrine/Connection.php";a:329:{i:0;i:1;i:21;i:1;i:56;i:1;i:166;i:1;i:167;i:1;i:168;i:-1;i:169;i:-2;i:170;i:1;i:172;i:1;i:174;i:1;i:175;i:1;i:177;i:1;i:178;i:1;i:179;i:1;i:181;i:1;i:182;i:1;i:183;i:-1;i:184;i:-1;i:186;i:1;i:188;i:1;i:190;i:1;i:191;i:1;i:193;i:1;i:194;i:1;i:205;i:1;i:206;i:1;i:207;i:1;i:208;i:-2;i:209;i:1;i:210;i:-2;i:212;i:1;i:214;i:1;i:215;i:-2;i:216;i:-2;i:218;i:-2;i:219;i:-1;i:220;i:-1;i:221;i:-1;i:222;i:-1;i:224;i:-1;i:226;i:-2;i:232;i:-1;i:233;i:-2;i:244;i:1;i:245;i:1;i:246;i:1;i:247;i:1;i:248;i:1;i:249;i:1;i:250;i:1;i:253;i:1;i:254;i:-2;i:263;i:1;i:264;i:-2;i:280;i:1;i:281;i:1;i:282;i:-2;i:284;i:1;i:285;i:1;i:286;i:-2;i:287;i:1;i:289;i:1;i:290;i:1;i:291;i:1;i:292;i:1;i:293;i:1;i:294;i:1;i:295;i:1;i:296;i:1;i:297;i:1;i:298;i:1;i:299;i:1;i:301;i:1;i:302;i:-2;i:310;i:1;i:311;i:-2;i:319;i:1;i:321;i:1;i:322;i:-2;i:332;i:1;i:333;i:1;i:334;i:-2;i:336;i:1;i:338;i:1;i:340;i:1;i:341;i:1;i:343;i:1;i:344;i:1;i:345;i:1;i:346;i:1;i:348;i:1;i:349;i:1;i:350;i:1;i:351;i:1;i:353;i:1;i:354;i:-1;i:356;i:-1;i:357;i:-1;i:358;i:-1;i:359;i:-1;i:361;i:-1;i:364;i:1;i:366;i:1;i:367;i:1;i:368;i:-2;i:369;i:1;i:370;i:1;i:372;i:1;i:374;i:1;i:375;i:1;i:376;i:-2;i:380;i:1;i:381;i:1;i:389;i:-1;i:398;i:-1;i:399;i:-1;i:400;i:-1;i:401;i:-2;i:441;i:-1;i:442;i:-1;i:443;i:-2;i:444;i:-1;i:446;i:-1;i:447;i:-1;i:449;i:-1;i:450;i:-1;i:451;i:-1;i:453;i:-1;i:454;i:-1;i:455;i:-1;i:456;i:-1;i:458;i:-1;i:459;i:-1;i:461;i:-1;i:463;i:-1;i:466;i:-1;i:467;i:-2;i:476;i:1;i:477;i:-1;i:478;i:-2;i:481;i:1;i:483;i:1;i:484;i:1;i:485;i:1;i:486;i:1;i:487;i:1;i:488;i:1;i:489;i:1;i:490;i:1;i:492;i:1;i:495;i:1;i:496;i:1;i:497;i:1;i:499;i:1;i:502;i:1;i:504;i:1;i:505;i:-2;i:516;i:-1;i:552;i:1;i:553;i:1;i:555;i:1;i:556;i:1;i:557;i:-2;i:558;i:1;i:559;i:-2;i:572;i:1;i:573;i:-2;i:584;i:1;i:585;i:-2;i:595;i:-1;i:605;i:1;i:606;i:-2;i:617;i:1;i:618;i:-2;i:628;i:1;i:629;i:-2;i:639;i:1;i:640;i:-2;i:651;i:1;i:652;i:-2;i:662;i:1;i:663;i:-2;i:673;i:-1;i:674;i:-2;i:694;i:1;i:696;i:1;i:697;i:-2;i:705;i:1;i:708;i:1;i:710;i:1;i:712;i:1;i:714;i:1;i:715;i:1;i:716;i:1;i:718;i:1;i:720;i:1;i:721;i:1;i:722;i:1;i:724;i:1;i:725;i:-2;i:747;i:1;i:749;i:1;i:750;i:1;i:751;i:-1;i:752;i:-2;i:753;i:1;i:754;i:-2;i:766;i:-1;i:767;i:-1;i:768;i:-1;i:769;i:-1;i:770;i:-2;i:781;i:1;i:782;i:-2;i:792;i:1;i:795;i:1;i:796;i:1;i:797;i:1;i:798;i:1;i:799;i:-2;i:800;i:1;i:802;i:1;i:804;i:1;i:805;i:1;i:807;i:1;i:808;i:1;i:809;i:1;i:811;i:1;i:813;i:-2;i:814;i:-2;i:816;i:-2;i:817;i:-2;i:826;i:1;i:829;i:1;i:830;i:1;i:831;i:1;i:833;i:1;i:834;i:-2;i:835;i:1;i:837;i:1;i:839;i:1;i:840;i:1;i:842;i:1;i:843;i:1;i:844;i:1;i:846;i:1;i:848;i:1;i:849;i:1;i:851;i:1;i:852;i:-2;i:860;i:1;i:862;i:1;i:864;i:1;i:866;i:1;i:867;i:1;i:868;i:-1;i:869;i:-1;i:870;i:1;i:872;i:1;i:873;i:1;i:874;i:-2;i:876;i:-1;i:877;i:-1;i:887;i:1;i:888;i:-2;i:897;i:1;i:898;i:1;i:899;i:-2;i:900;i:1;i:902;i:1;i:903;i:1;i:904;i:1;i:905;i:1;i:908;i:1;i:911;i:1;i:912;i:-2;i:920;i:1;i:921;i:-2;i:936;i:1;i:937;i:-2;i:945;i:1;i:946;i:-2;i:956;i:-1;i:958;i:-1;i:959;i:-1;i:960;i:-2;i:961;i:-1;i:962;i:-1;i:963;i:-2;i:974;i:1;i:975;i:-2;i:986;i:1;i:987;i:1;i:988;i:1;i:989;i:1;i:998;i:1;i:999;i:1;i:1000;i:1;i:1001;i:1;i:1002;i:1;i:1011;i:1;i:1012;i:1;i:1013;i:1;i:1022;i:1;i:1024;i:1;i:1026;i:1;i:1028;i:1;i:1029;i:1;i:1031;i:1;i:1032;i:1;i:1040;i:-1;i:1041;i:-2;i:1050;i:-1;i:1052;i:-1;i:1053;i:-2;i:1062;i:-1;i:1064;i:-1;i:1065;i:-2;i:1080;i:-1;i:1081;i:-2;i:1097;i:1;i:1098;i:1;i:1114;i:1;i:1115;i:1;i:1132;i:1;i:1133;i:1;i:1141;i:-1;i:1142;i:-2;i:1144;i:1;}s:74:"/home/bjartka/public_html/doctrine/lib/Doctrine/Record/Filter/Standard.php";a:6:{i:34;i:1;i:44;i:1;i:45;i:-2;i:54;i:1;i:55;i:-2;i:56;i:1;}s:55:"/home/bjartka/public_html/doctrine/models/GroupUser.php";a:7:{i:6;i:1;i:7;i:1;i:8;i:1;i:9;i:1;i:13;i:1;i:14;i:1;i:15;i:1;}s:53:"/home/bjartka/public_html/doctrine/models/PolicyN.php";a:7:{i:5;i:1;i:6;i:1;i:7;i:1;i:8;i:1;i:9;i:1;i:12;i:1;i:13;i:1;}s:67:"/home/bjartka/public_html/doctrine/lib/Doctrine/Query/Condition.php";a:40:{i:21;i:1;i:33;i:1;i:44;i:1;i:46;i:1;i:48;i:1;i:49;i:1;i:50;i:1;i:51;i:1;i:52;i:1;i:53;i:1;i:54;i:1;i:55;i:1;i:57;i:1;i:58;i:1;i:59;i:1;i:60;i:1;i:61;i:1;i:62;i:1;i:63;i:1;i:64;i:1;i:65;i:1;i:66;i:1;i:67;i:1;i:68;i:-2;i:69;i:1;i:74;i:1;i:75;i:-2;i:91;i:1;i:93;i:1;i:94;i:1;i:96;i:1;i:98;i:1;i:101;i:1;i:103;i:1;i:104;i:1;i:105;i:1;i:106;i:1;i:110;i:1;i:111;i:-2;i:112;i:1;}s:62:"/home/bjartka/public_html/doctrine/lib/Doctrine/Collection.php";a:296:{i:0;i:1;i:21;i:1;i:34;i:1;i:77;i:1;i:78;i:1;i:79;i:1;i:80;i:1;i:81;i:1;i:83;i:1;i:84;i:1;i:85;i:1;i:87;i:1;i:88;i:1;i:89;i:1;i:90;i:1;i:99;i:-1;i:100;i:-1;i:109;i:1;i:110;i:-2;i:119;i:1;i:120;i:1;i:128;i:-1;i:130;i:-1;i:131;i:-1;i:132;i:-1;i:133;i:-1;i:134;i:-1;i:135;i:-1;i:137;i:-1;i:139;i:-1;i:140;i:-2;i:149;i:-1;i:150;i:-1;i:152;i:-1;i:154;i:-1;i:155;i:-1;i:156;i:-1;i:158;i:-1;i:160;i:-1;i:161;i:-1;i:162;i:-1;i:164;i:-1;i:165;i:-1;i:166;i:-1;i:167;i:-1;i:177;i:-1;i:179;i:-1;i:180;i:-2;i:189;i:-1;i:190;i:-2;i:199;i:1;i:200;i:-2;i:209;i:1;i:210;i:-2;i:219;i:1;i:220;i:-2;i:229;i:1;i:230;i:1;i:232;i:1;i:233;i:1;i:235;i:1;i:237;i:1;i:239;i:1;i:240;i:1;i:241;i:1;i:242;i:1;i:243;i:-1;i:245;i:1;i:246;i:1;i:248;i:1;i:249;i:1;i:257;i:-1;i:258;i:-2;i:268;i:1;i:270;i:1;i:271;i:1;i:272;i:-2;i:282;i:1;i:283;i:-2;i:286;i:-1;i:287;i:-2;i:307;i:1;i:308;i:1;i:310;i:1;i:311;i:1;i:313;i:1;i:314;i:1;i:315;i:1;i:316;i:1;i:318;i:1;i:319;i:1;i:320;i:1;i:321;i:1;i:322;i:1;i:325;i:1;i:327;i:1;i:328;i:1;i:330;i:1;i:331;i:-2;i:333;i:1;i:334;i:-2;i:341;i:-1;i:342;i:-1;i:344;i:-1;i:345;i:-1;i:346;i:-1;i:347;i:-1;i:348;i:-1;i:350;i:-1;i:351;i:-1;i:352;i:-2;i:359;i:-1;i:360;i:-2;i:370;i:1;i:371;i:-2;i:380;i:1;i:381;i:1;i:382;i:1;i:384;i:1;i:385;i:1;i:394;i:1;i:395;i:1;i:397;i:1;i:398;i:1;i:399;i:1;i:400;i:-1;i:402;i:1;i:408;i:1;i:409;i:1;i:410;i:-1;i:411;i:-2;i:412;i:1;i:414;i:1;i:415;i:-1;i:416;i:-1;i:417;i:-2;i:418;i:-1;i:419;i:-1;i:420;i:-2;i:422;i:1;i:423;i:-1;i:424;i:-1;i:425;i:-1;i:426;i:-2;i:427;i:-1;i:428;i:-1;i:429;i:1;i:431;i:1;i:432;i:-2;i:441;i:-1;i:442;i:-1;i:444;i:-1;i:445;i:-1;i:446;i:-1;i:447;i:-1;i:448;i:-1;i:449;i:-1;i:450;i:-1;i:451;i:-1;i:452;i:-1;i:454;i:-1;i:455;i:-2;i:457;i:-1;i:459;i:-1;i:460;i:-1;i:461;i:-1;i:462;i:-1;i:463;i:-1;i:464;i:-1;i:465;i:-1;i:466;i:-1;i:467;i:-1;i:468;i:-1;i:469;i:-1;i:472;i:-1;i:474;i:-1;i:476;i:-1;i:477;i:-1;i:487;i:-1;i:488;i:-1;i:489;i:-1;i:490;i:-1;i:492;i:-1;i:493;i:-1;i:494;i:-1;i:495;i:-1;i:496;i:-1;i:497;i:-1;i:498;i:-1;i:499;i:-1;i:500;i:-1;i:501;i:-1;i:502;i:-1;i:503;i:-1;i:504;i:-2;i:505;i:-1;i:507;i:-1;i:508;i:-1;i:509;i:-1;i:510;i:-1;i:511;i:-1;i:512;i:-1;i:514;i:-1;i:515;i:-1;i:516;i:-1;i:517;i:-1;i:518;i:-1;i:519;i:-1;i:521;i:-1;i:522;i:-1;i:523;i:-1;i:524;i:-2;i:525;i:-1;i:526;i:-1;i:527;i:-1;i:528;i:-1;i:529;i:-1;i:530;i:-1;i:531;i:-1;i:533;i:-1;i:534;i:-1;i:535;i:-1;i:544;i:-1;i:545;i:-2;i:561;i:1;i:563;i:1;i:564;i:-2;i:573;i:1;i:574;i:-2;i:589;i:1;i:590;i:1;i:591;i:1;i:593;i:1;i:594;i:-2;i:603;i:-1;i:604;i:-1;i:606;i:-1;i:608;i:-1;i:609;i:-1;i:611;i:-1;i:612;i:-2;i:615;i:-1;i:616;i:-1;i:617;i:-1;i:618;i:-1;i:620;i:-1;i:621;i:-1;i:623;i:-1;i:624;i:-1;i:627;i:-1;i:628;i:-1;i:629;i:-2;i:630;i:-1;i:632;i:-2;i:635;i:-1;i:636;i:-1;i:637;i:-2;i:638;i:-1;i:640;i:-2;i:643;i:1;i:644;i:-2;i:647;i:1;i:648;i:-2;i:655;i:1;i:656;i:1;i:657;i:-2;i:668;i:1;i:669;i:1;i:670;i:1;i:671;i:1;i:673;i:1;i:675;i:1;i:677;i:1;i:678;i:1;i:679;i:1;i:681;i:1;i:683;i:1;i:684;i:-2;i:695;i:1;i:696;i:1;i:697;i:1;i:699;i:1;i:700;i:1;i:702;i:1;i:703;i:1;i:704;i:1;i:706;i:1;i:708;i:1;i:710;i:1;i:711;i:-2;i:718;i:1;i:719;i:1;i:720;i:-2;i:726;i:-1;i:727;i:-2;i:729;i:1;}s:63:"/home/bjartka/public_html/doctrine/tests/Ticket/428TestCase.php";a:18:{i:18;i:1;i:24;i:1;i:26;i:1;i:27;i:1;i:28;i:1;i:29;i:1;i:30;i:1;i:31;i:1;i:32;i:1;i:33;i:1;i:37;i:1;i:39;i:1;i:40;i:1;i:43;i:1;i:47;i:1;i:48;i:1;i:49;i:-2;i:51;i:1;}s:67:"/home/bjartka/public_html/doctrine/tests/DataDict/MssqlTestCase.php";a:128:{i:38;i:1;i:39;i:-1;i:40;i:1;i:41;i:1;i:43;i:1;i:46;i:1;i:48;i:1;i:49;i:1;i:50;i:1;i:51;i:1;i:52;i:1;i:55;i:1;i:57;i:1;i:58;i:1;i:59;i:1;i:60;i:1;i:62;i:1;i:64;i:1;i:65;i:1;i:66;i:1;i:67;i:1;i:69;i:1;i:71;i:1;i:72;i:1;i:73;i:1;i:74;i:1;i:75;i:1;i:78;i:1;i:80;i:1;i:81;i:1;i:82;i:1;i:83;i:1;i:85;i:1;i:87;i:1;i:88;i:1;i:89;i:1;i:90;i:1;i:91;i:1;i:94;i:1;i:96;i:1;i:97;i:1;i:98;i:1;i:99;i:1;i:101;i:1;i:103;i:1;i:104;i:1;i:105;i:1;i:106;i:1;i:107;i:1;i:110;i:1;i:112;i:1;i:113;i:1;i:114;i:1;i:115;i:1;i:116;i:1;i:119;i:1;i:121;i:1;i:122;i:1;i:123;i:1;i:124;i:1;i:126;i:1;i:128;i:1;i:129;i:1;i:130;i:1;i:131;i:1;i:132;i:1;i:135;i:1;i:137;i:1;i:138;i:1;i:139;i:1;i:140;i:1;i:142;i:1;i:144;i:1;i:145;i:1;i:146;i:1;i:147;i:1;i:149;i:1;i:151;i:1;i:152;i:1;i:153;i:1;i:154;i:1;i:155;i:1;i:158;i:1;i:160;i:1;i:162;i:1;i:164;i:1;i:166;i:1;i:168;i:1;i:169;i:1;i:173;i:1;i:175;i:1;i:176;i:1;i:179;i:1;i:181;i:1;i:182;i:1;i:185;i:1;i:187;i:1;i:188;i:1;i:191;i:1;i:193;i:1;i:194;i:1;i:197;i:1;i:199;i:1;i:200;i:1;i:203;i:1;i:205;i:1;i:206;i:1;i:209;i:1;i:211;i:1;i:212;i:1;i:215;i:1;i:217;i:1;i:218;i:1;i:221;i:1;i:223;i:1;i:224;i:1;i:227;i:1;i:229;i:1;i:230;i:1;i:233;i:1;i:235;i:1;i:236;i:1;i:239;i:1;i:241;i:1;i:242;i:1;i:245;i:1;i:247;i:1;i:248;i:1;}s:70:"/home/bjartka/public_html/doctrine/tests/Sequence/FirebirdTestCase.php";a:10:{i:37;i:1;i:39;i:1;i:40;i:1;i:43;i:1;i:45;i:1;i:46;i:1;i:49;i:1;i:51;i:1;i:53;i:1;i:54;i:1;}s:72:"/home/bjartka/public_html/doctrine/tests/Collection/SnapshotTestCase.php";a:60:{i:43;i:1;i:45;i:1;i:46;i:1;i:50;i:1;i:52;i:1;i:53;i:1;i:55;i:1;i:56;i:1;i:58;i:1;i:60;i:1;i:61;i:1;i:63;i:1;i:65;i:1;i:67;i:1;i:68;i:1;i:69;i:1;i:70;i:1;i:74;i:1;i:75;i:1;i:76;i:1;i:78;i:1;i:80;i:1;i:82;i:1;i:83;i:1;i:85;i:1;i:86;i:1;i:88;i:1;i:89;i:1;i:91;i:1;i:93;i:1;i:95;i:1;i:96;i:1;i:98;i:1;i:100;i:1;i:102;i:1;i:106;i:1;i:107;i:1;i:108;i:1;i:109;i:1;i:110;i:1;i:112;i:1;i:114;i:1;i:115;i:1;i:117;i:1;i:118;i:1;i:119;i:1;i:120;i:1;i:122;i:1;i:123;i:1;i:125;i:1;i:126;i:1;i:127;i:1;i:129;i:1;i:130;i:1;i:132;i:1;i:134;i:1;i:136;i:1;i:137;i:1;i:139;i:1;i:141;i:1;}s:55:"/home/bjartka/public_html/doctrine/models/TestMovie.php";a:15:{i:7;i:1;i:8;i:1;i:9;i:1;i:11;i:1;i:12;i:1;i:13;i:1;i:14;i:1;i:16;i:1;i:17;i:1;i:18;i:1;i:19;i:1;i:20;i:1;i:24;i:1;i:25;i:1;i:26;i:1;}s:72:"/home/bjartka/public_html/doctrine/models/ValidatorTest_AddressModel.php";a:10:{i:5;i:1;i:7;i:1;i:8;i:1;i:9;i:1;i:10;i:1;i:11;i:1;i:12;i:1;i:13;i:1;i:16;i:1;i:17;i:1;}s:65:"/home/bjartka/public_html/doctrine/tests/Record/StateTestCase.php";a:13:{i:37;i:1;i:39;i:1;i:40;i:1;i:43;i:1;i:47;i:1;i:49;i:1;i:51;i:1;i:53;i:1;i:55;i:1;i:57;i:1;i:59;i:1;i:61;i:1;i:62;i:1;}s:77:"/home/bjartka/public_html/doctrine/lib/Doctrine/Relation/Parser/Exception.php";a:3:{i:21;i:1;i:33;i:1;i:34;i:1;}s:61:"/home/bjartka/public_html/doctrine/lib/Doctrine/Exception.php";a:8:{i:32;i:1;i:82;i:-1;i:83;i:-1;i:84;i:-2;i:86;i:-1;i:87;i:-1;i:88;i:-2;i:91;i:1;}s:73:"/home/bjartka/public_html/doctrine/lib/Doctrine/Connection/UnitOfWork.php";a:338:{i:21;i:1;i:33;i:1;i:48;i:1;i:49;i:1;i:51;i:1;i:52;i:1;i:53;i:1;i:54;i:1;i:56;i:1;i:58;i:1;i:59;i:1;i:60;i:1;i:61;i:1;i:63;i:1;i:67;i:1;i:68;i:1;i:69;i:1;i:70;i:1;i:71;i:1;i:72;i:1;i:74;i:1;i:75;i:1;i:76;i:1;i:77;i:1;i:80;i:1;i:81;i:1;i:82;i:-2;i:84;i:1;i:85;i:1;i:86;i:1;i:87;i:1;i:89;i:1;i:90;i:1;i:91;i:1;i:92;i:1;i:93;i:1;i:96;i:1;i:97;i:1;i:98;i:1;i:99;i:1;i:101;i:1;i:102;i:1;i:103;i:1;i:104;i:1;i:105;i:1;i:107;i:1;i:108;i:1;i:109;i:1;i:111;i:1;i:112;i:1;i:114;i:1;i:115;i:1;i:117;i:1;i:119;i:1;i:120;i:1;i:121;i:1;i:123;i:-1;i:124;i:-1;i:125;i:-1;i:126;i:-1;i:127;i:1;i:129;i:1;i:130;i:1;i:131;i:1;i:132;i:1;i:133;i:-2;i:142;i:1;i:144;i:1;i:145;i:1;i:146;i:1;i:147;i:-2;i:149;i:1;i:151;i:1;i:153;i:1;i:155;i:1;i:157;i:1;i:158;i:1;i:160;i:1;i:162;i:1;i:164;i:1;i:166;i:1;i:167;i:1;i:168;i:1;i:169;i:1;i:170;i:1;i:171;i:1;i:172;i:1;i:173;i:1;i:174;i:1;i:176;i:1;i:177;i:-2;i:178;i:1;i:180;i:1;i:182;i:1;i:183;i:1;i:184;i:1;i:187;i:1;i:189;i:1;i:191;i:1;i:192;i:1;i:194;i:1;i:195;i:1;i:198;i:1;i:199;i:1;i:200;i:1;i:201;i:1;i:202;i:1;i:205;i:1;i:207;i:1;i:209;i:1;i:211;i:1;i:212;i:-2;i:221;i:1;i:223;i:1;i:225;i:1;i:227;i:1;i:228;i:1;i:229;i:1;i:230;i:1;i:231;i:1;i:232;i:1;i:233;i:1;i:234;i:1;i:235;i:1;i:236;i:1;i:237;i:1;i:239;i:1;i:240;i:-1;i:241;i:1;i:243;i:1;i:245;i:1;i:246;i:1;i:257;i:1;i:258;i:1;i:259;i:-2;i:260;i:1;i:262;i:1;i:264;i:1;i:266;i:1;i:268;i:1;i:270;i:1;i:272;i:1;i:274;i:1;i:275;i:1;i:277;i:1;i:279;i:1;i:280;i:1;i:282;i:1;i:286;i:1;i:288;i:1;i:290;i:1;i:292;i:1;i:293;i:-2;i:297;i:1;i:298;i:1;i:300;i:1;i:301;i:1;i:302;i:1;i:304;i:1;i:307;i:1;i:308;i:1;i:311;i:1;i:312;i:-2;i:322;i:-1;i:323;i:-1;i:324;i:-1;i:326;i:-1;i:327;i:-1;i:329;i:-1;i:330;i:-1;i:332;i:-1;i:333;i:-1;i:334;i:-1;i:335;i:-1;i:336;i:-1;i:337;i:-1;i:338;i:-1;i:339;i:-1;i:340;i:-1;i:341;i:-1;i:342;i:-1;i:343;i:-1;i:345;i:-1;i:346;i:-1;i:347;i:-1;i:348;i:-1;i:349;i:-1;i:350;i:-1;i:351;i:-1;i:352;i:-1;i:355;i:-1;i:356;i:-1;i:357;i:-1;i:358;i:-1;i:360;i:-1;i:361;i:-1;i:363;i:-1;i:364;i:-1;i:374;i:1;i:375;i:1;i:376;i:1;i:378;i:1;i:379;i:1;i:381;i:1;i:382;i:1;i:383;i:1;i:385;i:1;i:388;i:1;i:389;i:1;i:390;i:1;i:398;i:1;i:399;i:1;i:400;i:1;i:402;i:1;i:403;i:-2;i:421;i:1;i:422;i:1;i:424;i:1;i:425;i:1;i:427;i:1;i:428;i:1;i:429;i:1;i:430;i:1;i:431;i:1;i:433;i:1;i:434;i:1;i:436;i:1;i:437;i:1;i:438;i:1;i:439;i:1;i:441;i:1;i:442;i:1;i:443;i:1;i:444;i:1;i:445;i:1;i:455;i:1;i:456;i:1;i:457;i:1;i:458;i:1;i:459;i:1;i:461;i:1;i:463;i:1;i:464;i:1;i:465;i:1;i:466;i:1;i:477;i:1;i:480;i:1;i:481;i:1;i:483;i:1;i:484;i:1;i:485;i:1;i:486;i:1;i:489;i:1;i:490;i:1;i:492;i:1;i:493;i:1;i:494;i:1;i:495;i:1;i:496;i:1;i:506;i:1;i:508;i:1;i:510;i:1;i:512;i:1;i:513;i:1;i:515;i:1;i:516;i:-1;i:517;i:-2;i:518;i:1;i:519;i:1;i:520;i:1;i:521;i:-1;i:522;i:-1;i:523;i:-1;i:525;i:1;i:527;i:1;i:528;i:-1;i:529;i:-1;i:530;i:-1;i:531;i:-1;i:532;i:-1;i:533;i:-1;i:535;i:1;i:537;i:1;i:538;i:1;i:540;i:1;i:541;i:-1;i:542;i:-1;i:543;i:1;i:544;i:1;i:546;i:1;i:547;i:1;i:548;i:1;i:549;i:1;i:551;i:1;i:552;i:1;i:554;i:1;i:555;i:1;i:557;i:1;i:559;i:1;i:561;i:1;i:562;i:-2;i:572;i:1;i:574;i:1;i:576;i:1;i:578;i:1;i:579;i:1;i:581;i:1;i:582;i:-1;i:583;i:-2;i:584;i:1;i:585;i:1;i:587;i:1;i:589;i:1;i:590;i:1;i:591;i:1;i:592;i:1;i:594;i:1;i:595;i:1;i:597;i:1;i:599;i:1;i:600;i:1;i:602;i:1;i:603;i:-1;i:604;i:-1;i:606;i:1;i:608;i:1;i:609;i:-1;i:610;i:-2;i:612;i:1;i:613;i:1;i:614;i:1;i:616;i:1;i:617;i:1;i:619;i:1;i:621;i:1;i:623;i:1;i:624;i:-2;i:626;i:1;}s:59:"/home/bjartka/public_html/doctrine/lib/Doctrine/Hydrate.php";a:456:{i:166;i:1;i:167;i:1;i:168;i:1;i:169;i:1;i:170;i:1;i:179;i:1;i:180;i:-1;i:181;i:-1;i:183;i:1;i:185;i:1;i:186;i:-2;i:195;i:1;i:197;i:1;i:198;i:-2;i:207;i:1;i:209;i:1;i:210;i:-1;i:211;i:-2;i:213;i:1;i:214;i:-2;i:223;i:1;i:224;i:-2;i:234;i:1;i:235;i:1;i:236;i:1;i:237;i:-1;i:239;i:-1;i:240;i:-2;i:241;i:1;i:242;i:1;i:243;i:1;i:245;i:1;i:246;i:-2;i:255;i:-1;i:257;i:-1;i:258;i:-2;i:267;i:1;i:268;i:-1;i:269;i:-1;i:270;i:1;i:272;i:1;i:273;i:-2;i:282;i:1;i:283;i:1;i:284;i:-2;i:285;i:1;i:287;i:-2;i:295;i:1;i:296;i:1;i:297;i:-2;i:306;i:-1;i:308;i:-1;i:319;i:-1;i:329;i:1;i:331;i:1;i:332;i:1;i:334;i:1;i:335;i:1;i:336;i:1;i:338;i:1;i:340;i:1;i:341;i:-2;i:343;i:-1;i:344;i:-2;i:354;i:1;i:355;i:-2;i:365;i:1;i:366;i:-1;i:367;i:-2;i:368;i:1;i:369;i:-2;i:379;i:-1;i:380;i:-1;i:381;i:-2;i:382;i:-1;i:383;i:-2;i:395;i:1;i:397;i:1;i:399;i:1;i:400;i:1;i:401;i:1;i:403;i:1;i:404;i:1;i:405;i:-1;i:406;i:-1;i:407;i:1;i:408;i:1;i:410;i:1;i:412;i:1;i:413;i:-2;i:422;i:1;i:423;i:-2;i:434;i:1;i:436;i:1;i:437;i:-2;i:452;i:1;i:454;i:1;i:455;i:1;i:456;i:-2;i:458;i:1;i:459;i:-1;i:460;i:-2;i:462;i:1;i:463;i:-2;i:475;i:1;i:476;i:-1;i:477;i:-2;i:478;i:1;i:479;i:1;i:480;i:1;i:481;i:1;i:483;i:1;i:484;i:-2;i:496;i:1;i:497;i:-1;i:498;i:-2;i:500;i:1;i:501;i:-2;i:512;i:1;i:513;i:1;i:514;i:1;i:515;i:1;i:516;i:1;i:518;i:1;i:519;i:-1;i:521;i:1;i:522;i:-2;i:534;i:1;i:535;i:-1;i:536;i:-2;i:538;i:1;i:539;i:1;i:540;i:-1;i:541;i:-1;i:542;i:1;i:544;i:1;i:545;i:1;i:548;i:1;i:549;i:-2;i:559;i:-1;i:560;i:-2;i:570;i:1;i:571;i:-1;i:572;i:-2;i:574;i:1;i:575;i:-2;i:589;i:1;i:590;i:1;i:591;i:1;i:592;i:1;i:593;i:-2;i:602;i:1;i:603;i:1;i:606;i:1;i:609;i:1;i:611;i:1;i:612;i:-2;i:621;i:1;i:622;i:-2;i:631;i:-1;i:632;i:1;i:633;i:1;i:634;i:1;i:635;i:1;i:636;i:1;i:637;i:1;i:638;i:1;i:639;i:1;i:640;i:1;i:641;i:1;i:642;i:1;i:643;i:1;i:645;i:1;i:646;i:1;i:654;i:1;i:655;i:-2;i:666;i:1;i:667;i:1;i:676;i:1;i:677;i:-2;i:685;i:1;i:686;i:-2;i:693;i:-1;i:694;i:-1;i:697;i:1;i:698;i:-2;i:708;i:-1;i:710;i:-1;i:711;i:-2;i:720;i:1;i:721;i:-2;i:731;i:1;i:733;i:1;i:734;i:1;i:735;i:1;i:736;i:1;i:737;i:1;i:739;i:1;i:740;i:-1;i:741;i:-1;i:742;i:1;i:744;i:1;i:745;i:-2;i:748;i:1;i:750;i:1;i:751;i:1;i:752;i:1;i:753;i:1;i:756;i:1;i:758;i:1;i:759;i:1;i:761;i:1;i:762;i:1;i:764;i:1;i:765;i:1;i:766;i:-2;i:768;i:1;i:769;i:1;i:770;i:-2;i:780;i:1;i:781;i:1;i:782;i:1;i:783;i:1;i:784;i:1;i:785;i:1;i:787;i:1;i:789;i:1;i:791;i:1;i:794;i:1;i:796;i:1;i:797;i:1;i:799;i:1;i:801;i:1;i:802;i:1;i:803;i:1;i:804;i:1;i:805;i:1;i:807;i:1;i:808;i:1;i:809;i:1;i:810;i:1;i:811;i:1;i:812;i:1;i:813;i:1;i:814;i:1;i:815;i:1;i:817;i:1;i:818;i:-1;i:819;i:-1;i:820;i:1;i:821;i:1;i:823;i:1;i:824;i:1;i:826;i:1;i:827;i:1;i:828;i:-2;i:830;i:1;i:832;i:1;i:833;i:-2;i:851;i:1;i:852;i:-2;i:862;i:1;i:864;i:1;i:865;i:1;i:866;i:1;i:867;i:1;i:870;i:1;i:871;i:1;i:873;i:1;i:874;i:1;i:875;i:1;i:878;i:1;i:879;i:1;i:880;i:1;i:881;i:1;i:884;i:1;i:885;i:1;i:886;i:1;i:887;i:1;i:889;i:1;i:890;i:1;i:891;i:1;i:892;i:1;i:893;i:1;i:895;i:1;i:897;i:1;i:898;i:1;i:899;i:1;i:900;i:1;i:902;i:1;i:903;i:1;i:904;i:1;i:905;i:1;i:906;i:1;i:908;i:1;i:910;i:1;i:911;i:-2;i:920;i:1;i:921;i:-2;i:933;i:1;i:934;i:1;i:935;i:1;i:937;i:1;i:939;i:1;i:940;i:1;i:941;i:-2;i:944;i:1;i:945;i:1;i:946;i:1;i:947;i:1;i:948;i:-2;i:950;i:-1;i:951;i:-2;i:968;i:1;i:969;i:1;i:970;i:1;i:971;i:1;i:973;i:1;i:974;i:1;i:975;i:1;i:977;i:1;i:978;i:1;i:979;i:1;i:980;i:1;i:983;i:1;i:985;i:1;i:986;i:-1;i:987;i:-2;i:989;i:1;i:995;i:1;i:996;i:1;i:997;i:1;i:998;i:1;i:1000;i:1;i:1001;i:1;i:1002;i:1;i:1004;i:1;i:1009;i:1;i:1010;i:1;i:1011;i:1;i:1012;i:1;i:1013;i:1;i:1016;i:1;i:1017;i:1;i:1018;i:1;i:1019;i:1;i:1021;i:1;i:1022;i:1;i:1023;i:1;i:1026;i:1;i:1027;i:1;i:1028;i:1;i:1030;i:1;i:1031;i:1;i:1032;i:1;i:1034;i:1;i:1035;i:1;i:1036;i:1;i:1037;i:1;i:1038;i:1;i:1042;i:1;i:1043;i:1;i:1044;i:1;i:1045;i:1;i:1046;i:1;i:1048;i:1;i:1050;i:1;i:1051;i:1;i:1052;i:1;i:1053;i:1;i:1055;i:1;i:1056;i:1;i:1058;i:1;i:1059;i:-1;i:1060;i:-2;i:1062;i:1;i:1063;i:-1;i:1064;i:-2;i:1066;i:1;i:1067;i:1;i:1068;i:1;i:1070;i:1;i:1071;i:1;i:1072;i:1;i:1074;i:1;i:1075;i:1;i:1076;i:1;i:1077;i:1;i:1078;i:1;i:1079;i:1;i:1080;i:1;i:1082;i:1;i:1084;i:1;i:1085;i:1;i:1086;i:1;i:1088;i:1;i:1089;i:1;i:1090;i:-2;i:1093;i:1;i:1096;i:1;i:1099;i:1;i:1100;i:1;i:1102;i:1;i:1103;i:1;i:1104;i:1;i:1106;i:1;i:1107;i:1;i:1108;i:1;i:1109;i:-1;i:1110;i:-2;i:1111;i:1;i:1112;i:-1;i:1113;i:-2;i:1114;i:1;i:1115;i:1;i:1116;i:1;i:1118;i:1;i:1119;i:1;i:1121;i:1;i:1122;i:1;i:1123;i:1;i:1124;i:1;i:1125;i:1;i:1126;i:1;i:1127;i:1;i:1129;i:1;i:1131;i:1;i:1132;i:1;i:1133;i:1;i:1134;i:1;i:1136;i:1;i:1138;i:1;i:1139;i:1;i:1140;i:-2;i:1152;i:1;i:1153;i:1;i:1154;i:-2;i:1155;i:1;i:1156;i:1;i:1157;i:1;i:1160;i:1;i:1161;i:1;i:1162;i:1;i:1163;i:1;i:1164;i:1;i:1165;i:1;i:1166;i:1;i:1168;i:1;i:1169;i:1;i:1171;i:1;i:1172;i:1;i:1173;i:1;i:1174;i:1;i:1177;i:1;i:1183;i:-1;i:1184;i:-2;}s:79:"/home/bjartka/public_html/doctrine/lib/Doctrine/Connection/Sqlite/Exception.php";a:11:{i:21;i:1;i:34;i:1;i:68;i:1;i:69;i:1;i:71;i:1;i:72;i:1;i:73;i:-2;i:74;i:1;i:75;i:-1;i:76;i:-2;i:77;i:1;}s:79:"/home/bjartka/public_html/doctrine/lib/Doctrine/Adapter/Statement/Interface.php";a:2:{i:32;i:1;i:276;i:1;}s:79:"/home/bjartka/public_html/doctrine/lib/Doctrine/Connection/Oracle/Exception.php";a:10:{i:21;i:1;i:34;i:1;i:72;i:1;i:73;i:1;i:74;i:1;i:75;i:1;i:76;i:-2;i:77;i:-1;i:78;i:-2;i:79;i:1;}s:67:"/home/bjartka/public_html/doctrine/lib/Doctrine/Import/Firebird.php";a:29:{i:21;i:1;i:33;i:1;i:42;i:1;i:44;i:1;i:45;i:-2;i:55;i:1;i:56;i:1;i:58;i:1;i:59;i:-2;i:67;i:1;i:68;i:-2;i:76;i:1;i:77;i:-2;i:86;i:1;i:87;i:1;i:88;i:1;i:90;i:1;i:91;i:-2;i:99;i:1;i:101;i:1;i:102;i:-2;i:113;i:1;i:115;i:1;i:116;i:1;i:117;i:1;i:118;i:1;i:120;i:1;i:121;i:-2;i:122;i:1;}s:67:"/home/bjartka/public_html/doctrine/lib/Doctrine/Expression/Mock.php";a:3:{i:21;i:1;i:34;i:1;i:35;i:1;}s:66:"/home/bjartka/public_html/doctrine/tests/DataType/EnumTestCase.php";a:99:{i:36;i:1;i:39;i:1;i:40;i:1;i:41;i:1;i:45;i:1;i:46;i:1;i:47;i:1;i:48;i:1;i:51;i:1;i:52;i:1;i:53;i:1;i:55;i:1;i:56;i:1;i:57;i:-2;i:61;i:1;i:62;i:1;i:63;i:1;i:64;i:1;i:65;i:-2;i:67;i:1;i:74;i:1;i:75;i:1;i:76;i:1;i:77;i:1;i:78;i:-2;i:82;i:1;i:83;i:1;i:84;i:1;i:85;i:1;i:86;i:-2;i:88;i:1;i:93;i:1;i:94;i:1;i:95;i:1;i:96;i:1;i:97;i:-2;i:99;i:1;i:104;i:1;i:105;i:1;i:106;i:1;i:107;i:1;i:108;i:-2;i:110;i:1;i:115;i:1;i:116;i:1;i:117;i:1;i:118;i:1;i:119;i:1;i:120;i:1;i:121;i:1;i:123;i:1;i:125;i:1;i:127;i:1;i:128;i:1;i:129;i:1;i:130;i:1;i:131;i:1;i:132;i:1;i:136;i:1;i:138;i:1;i:140;i:1;i:141;i:1;i:143;i:1;i:144;i:1;i:146;i:1;i:147;i:1;i:149;i:1;i:151;i:1;i:153;i:1;i:154;i:1;i:156;i:1;i:157;i:1;i:159;i:1;i:160;i:1;i:164;i:1;i:166;i:1;i:169;i:1;i:171;i:-1;i:172;i:1;i:173;i:1;i:175;i:1;i:178;i:1;i:179;i:1;i:180;i:1;i:181;i:1;i:182;i:1;i:184;i:1;i:185;i:-1;i:186;i:-1;i:187;i:1;i:192;i:1;i:193;i:1;i:194;i:1;i:195;i:1;i:196;i:1;i:197;i:1;i:198;i:1;i:200;i:1;i:201;i:1;}s:69:"/home/bjartka/public_html/doctrine/tests/Validator/FutureTestCase.php";a:25:{i:37;i:1;i:38;i:1;i:39;i:1;i:44;i:1;i:48;i:1;i:51;i:1;i:52;i:1;i:53;i:1;i:56;i:1;i:57;i:1;i:58;i:1;i:61;i:1;i:62;i:1;i:64;i:1;i:65;i:1;i:69;i:1;i:71;i:1;i:72;i:1;i:73;i:1;i:75;i:1;i:76;i:1;i:78;i:1;i:79;i:1;i:81;i:1;i:82;i:1;}s:65:"/home/bjartka/public_html/doctrine/tests/Query/UpdateTestCase.php";a:22:{i:39;i:1;i:41;i:1;i:43;i:1;i:45;i:1;i:47;i:1;i:49;i:1;i:50;i:1;i:54;i:1;i:56;i:1;i:58;i:1;i:60;i:1;i:62;i:1;i:64;i:1;i:65;i:1;i:69;i:1;i:71;i:1;i:73;i:1;i:74;i:1;i:77;i:1;i:79;i:1;i:81;i:1;i:82;i:1;}s:72:"/home/bjartka/public_html/doctrine/tests/Query/JoinConditionTestCase.php";a:18:{i:36;i:1;i:38;i:1;i:41;i:1;i:43;i:1;i:45;i:1;i:46;i:1;i:49;i:1;i:51;i:1;i:53;i:1;i:54;i:1;i:57;i:1;i:59;i:1;i:61;i:1;i:62;i:1;i:65;i:1;i:67;i:1;i:69;i:1;i:70;i:1;}s:69:"/home/bjartka/public_html/doctrine/lib/Doctrine/Connection/Common.php";a:14:{i:21;i:1;i:33;i:1;i:44;i:1;i:45;i:1;i:47;i:1;i:48;i:1;i:49;i:1;i:50;i:1;i:51;i:1;i:52;i:-1;i:53;i:-1;i:55;i:1;i:56;i:-2;i:57;i:1;}s:65:"/home/bjartka/public_html/doctrine/tests/Ticket/NjeroTestCase.php";a:49:{i:16;i:1;i:19;i:1;i:20;i:1;i:21;i:1;i:22;i:1;i:23;i:1;i:24;i:1;i:25;i:1;i:29;i:1;i:30;i:1;i:31;i:1;i:32;i:1;i:34;i:1;i:35;i:1;i:36;i:1;i:37;i:1;i:39;i:1;i:40;i:1;i:41;i:1;i:42;i:1;i:44;i:1;i:45;i:1;i:46;i:1;i:47;i:1;i:49;i:1;i:50;i:1;i:51;i:1;i:52;i:1;i:53;i:1;i:54;i:1;i:56;i:1;i:57;i:1;i:58;i:1;i:59;i:1;i:61;i:1;i:67;i:1;i:68;i:1;i:70;i:1;i:72;i:1;i:73;i:1;i:74;i:1;i:75;i:1;i:76;i:1;i:78;i:1;i:79;i:1;i:80;i:1;i:82;i:1;i:83;i:1;i:86;i:1;}s:51:"/home/bjartka/public_html/doctrine/models/Email.php";a:2:{i:6;i:1;i:7;i:1;}s:51:"/home/bjartka/public_html/doctrine/models/RateN.php";a:11:{i:5;i:1;i:6;i:1;i:7;i:1;i:8;i:1;i:9;i:1;i:10;i:1;i:11;i:1;i:17;i:1;i:18;i:1;i:19;i:1;i:20;i:1;}s:68:"/home/bjartka/public_html/doctrine/tests/Import/FirebirdTestCase.php";a:21:{i:37;i:1;i:39;i:1;i:40;i:1;i:43;i:1;i:45;i:1;i:46;i:1;i:49;i:1;i:51;i:1;i:52;i:1;i:55;i:1;i:57;i:1;i:58;i:1;i:61;i:1;i:63;i:1;i:64;i:1;i:67;i:1;i:69;i:1;i:70;i:1;i:73;i:1;i:75;i:1;i:76;i:1;}s:60:"/home/bjartka/public_html/doctrine/models/Forum_Category.php";a:9:{i:4;i:1;i:5;i:1;i:6;i:1;i:7;i:1;i:8;i:1;i:10;i:1;i:11;i:1;i:12;i:1;i:13;i:1;}s:60:"/home/bjartka/public_html/doctrine/tests/HydrateTestCase.php";a:23:{i:58;i:1;i:62;i:1;i:63;i:1;i:65;i:1;i:66;i:1;i:68;i:1;i:70;i:1;i:72;i:1;i:73;i:1;i:74;i:1;i:80;i:1;i:81;i:1;i:83;i:1;i:84;i:1;i:87;i:1;i:88;i:1;i:89;i:1;i:90;i:1;i:98;i:-1;i:99;i:-1;i:103;i:-1;i:106;i:-1;i:107;i:-2;}s:60:"/home/bjartka/public_html/doctrine/models/VersioningTest.php";a:5:{i:6;i:1;i:7;i:1;i:8;i:1;i:11;i:1;i:12;i:1;}s:80:"/home/bjartka/public_html/doctrine/models/ValidatorTest_ClientToAddressModel.php";a:5:{i:6;i:1;i:7;i:1;i:8;i:1;i:11;i:1;i:14;i:1;}s:69:"/home/bjartka/public_html/doctrine/models/ValidatorTest_DateModel.php";a:3:{i:4;i:1;i:5;i:1;i:6;i:1;}s:68:"/home/bjartka/public_html/doctrine/lib/Doctrine/Validator/Future.php";a:32:{i:34;i:1;i:43;i:1;i:44;i:1;i:45;i:-2;i:46;i:1;i:48;i:1;i:49;i:-1;i:50;i:-2;i:52;i:1;i:53;i:-1;i:54;i:-1;i:55;i:-1;i:56;i:-1;i:57;i:-1;i:58;i:-1;i:59;i:-1;i:60;i:-1;i:61;i:-1;i:62;i:1;i:65;i:1;i:66;i:1;i:67;i:1;i:68;i:1;i:69;i:-1;i:70;i:1;i:71;i:1;i:72;i:-2;i:73;i:1;i:75;i:-2;i:76;i:1;i:78;i:-2;i:79;i:1;}s:71:"/home/bjartka/public_html/doctrine/tests/Query/ShortAliasesTestCase.php";a:6:{i:13;i:1;i:15;i:1;i:17;i:1;i:19;i:1;i:21;i:1;i:23;i:1;}s:69:"/home/bjartka/public_html/doctrine/tests/Query/ExpressionTestCase.php";a:41:{i:38;i:1;i:41;i:1;i:43;i:1;i:44;i:-1;i:45;i:1;i:46;i:1;i:48;i:1;i:52;i:1;i:55;i:1;i:57;i:1;i:58;i:-1;i:59;i:1;i:60;i:1;i:62;i:1;i:66;i:1;i:68;i:1;i:70;i:1;i:71;i:1;i:75;i:1;i:77;i:1;i:79;i:1;i:80;i:1;i:84;i:1;i:86;i:1;i:88;i:1;i:89;i:1;i:93;i:1;i:95;i:1;i:97;i:1;i:98;i:1;i:99;i:1;i:101;i:1;i:102;i:1;i:103;i:1;i:104;i:1;i:105;i:1;i:106;i:1;i:107;i:1;i:109;i:1;i:111;i:1;i:112;i:1;}s:51:"/home/bjartka/public_html/doctrine/models/Photo.php";a:4:{i:4;i:1;i:5;i:1;i:7;i:1;i:8;i:1;}s:71:"/home/bjartka/public_html/doctrine/lib/Doctrine/Query/JoinCondition.php";a:52:{i:21;i:1;i:33;i:1;i:37;i:1;i:39;i:1;i:41;i:1;i:42;i:1;i:43;i:1;i:44;i:1;i:45;i:1;i:46;i:1;i:48;i:1;i:49;i:1;i:50;i:1;i:52;i:1;i:55;i:1;i:57;i:-1;i:59;i:-1;i:61;i:-1;i:62;i:-1;i:63;i:-1;i:64;i:-1;i:65;i:-1;i:67;i:-1;i:69;i:-1;i:70;i:-1;i:71;i:-1;i:72;i:-1;i:73;i:-1;i:74;i:-1;i:75;i:-1;i:77;i:-1;i:78;i:-1;i:80;i:-1;i:81;i:1;i:82;i:-1;i:83;i:-1;i:84;i:1;i:89;i:1;i:90;i:1;i:91;i:1;i:92;i:1;i:93;i:1;i:94;i:-1;i:95;i:-1;i:96;i:1;i:97;i:1;i:98;i:1;i:99;i:1;i:101;i:1;i:102;i:1;i:103;i:-2;i:104;i:1;}s:71:"/home/bjartka/public_html/doctrine/lib/Doctrine/Migration/Exception.php";a:2:{i:32;i:1;i:34;i:1;}s:50:"/home/bjartka/public_html/doctrine/models/Task.php";a:6:{i:4;i:1;i:5;i:1;i:6;i:1;i:8;i:1;i:9;i:1;i:10;i:1;}s:59:"/home/bjartka/public_html/doctrine/models/CoverageCodeN.php";a:6:{i:5;i:1;i:6;i:1;i:7;i:1;i:8;i:1;i:9;i:1;i:13;i:1;}s:59:"/home/bjartka/public_html/doctrine/models/EntityAddress.php";a:3:{i:6;i:1;i:7;i:1;i:8;i:1;}s:66:"/home/bjartka/public_html/doctrine/lib/Doctrine/Hydrate/Record.php";a:50:{i:34;i:1;i:44;i:1;i:45;i:1;i:47;i:1;i:48;i:-2;i:51;i:1;i:52;i:-2;i:55;i:1;i:56;i:1;i:58;i:1;i:59;i:-2;i:60;i:-1;i:61;i:-2;i:64;i:1;i:65;i:1;i:77;i:-1;i:79;i:-1;i:80;i:-1;i:81;i:-1;i:82;i:-1;i:83;i:-2;i:84;i:-1;i:85;i:-1;i:86;i:-1;i:87;i:-1;i:88;i:-2;i:90;i:-1;i:91;i:-2;i:94;i:1;i:95;i:-2;i:98;i:1;i:99;i:1;i:100;i:1;i:101;i:1;i:102;i:1;i:103;i:1;i:105;i:1;i:106;i:1;i:107;i:1;i:108;i:1;i:110;i:1;i:111;i:-2;i:115;i:1;i:116;i:1;i:117;i:1;i:118;i:1;i:119;i:1;i:120;i:1;i:121;i:1;i:123;i:1;}s:66:"/home/bjartka/public_html/doctrine/lib/Doctrine/DataDict/Mssql.php";a:113:{i:21;i:1;i:34;i:1;i:61;i:1;i:62;i:-1;i:63;i:-2;i:64;i:1;i:65;i:1;i:66;i:1;i:67;i:1;i:68;i:1;i:69;i:1;i:70;i:1;i:71;i:1;i:72;i:1;i:73;i:1;i:75;i:1;i:77;i:1;i:78;i:1;i:79;i:1;i:80;i:1;i:81;i:-1;i:82;i:-1;i:83;i:-1;i:84;i:-2;i:85;i:-1;i:86;i:1;i:87;i:1;i:88;i:1;i:89;i:-1;i:90;i:-1;i:91;i:-1;i:92;i:-2;i:93;i:-1;i:94;i:1;i:95;i:1;i:96;i:1;i:97;i:1;i:98;i:1;i:99;i:1;i:100;i:1;i:101;i:1;i:102;i:1;i:103;i:1;i:104;i:1;i:105;i:1;i:106;i:1;i:107;i:1;i:108;i:1;i:109;i:-1;i:110;i:-1;i:111;i:-1;i:112;i:-1;i:113;i:-1;i:115;i:-1;i:116;i:-2;i:125;i:1;i:126;i:1;i:128;i:1;i:130;i:1;i:132;i:1;i:133;i:1;i:136;i:1;i:137;i:1;i:138;i:1;i:139;i:1;i:140;i:1;i:141;i:1;i:142;i:1;i:143;i:1;i:144;i:1;i:145;i:1;i:146;i:1;i:147;i:1;i:148;i:1;i:149;i:1;i:150;i:1;i:151;i:1;i:152;i:1;i:153;i:1;i:154;i:1;i:155;i:1;i:156;i:1;i:157;i:1;i:158;i:1;i:159;i:1;i:160;i:1;i:161;i:1;i:162;i:1;i:163;i:1;i:164;i:1;i:165;i:-1;i:166;i:-1;i:167;i:1;i:168;i:1;i:169;i:1;i:170;i:1;i:171;i:1;i:172;i:1;i:173;i:1;i:174;i:1;i:175;i:1;i:176;i:1;i:177;i:1;i:178;i:1;i:179;i:1;i:180;i:1;i:181;i:1;i:183;i:1;i:184;i:1;i:185;i:1;i:186;i:1;i:187;i:-2;i:189;i:1;}s:69:"/home/bjartka/public_html/doctrine/lib/Doctrine/Sequence/Firebird.php";a:28:{i:21;i:1;i:33;i:1;i:45;i:1;i:47;i:1;i:50;i:1;i:52;i:1;i:53;i:-2;i:58;i:-2;i:59;i:-2;i:60;i:-2;i:65;i:-2;i:66;i:-2;i:67;i:-2;i:69;i:1;i:70;i:-2;i:80;i:1;i:81;i:-2;i:91;i:1;i:94;i:1;i:96;i:1;i:97;i:1;i:98;i:-2;i:100;i:1;i:101;i:-1;i:102;i:-2;i:103;i:1;i:104;i:-2;i:105;i:1;}s:63:"/home/bjartka/public_html/doctrine/tests/ConnectionTestCase.php";a:122:{i:39;i:1;i:40;i:-1;i:41;i:1;i:42;i:1;i:44;i:1;i:48;i:1;i:50;i:1;i:51;i:1;i:52;i:1;i:53;i:1;i:57;i:1;i:58;i:1;i:60;i:1;i:61;i:1;i:63;i:1;i:66;i:1;i:69;i:1;i:70;i:1;i:71;i:1;i:74;i:1;i:75;i:1;i:76;i:1;i:77;i:1;i:78;i:1;i:82;i:1;i:84;i:1;i:86;i:1;i:88;i:1;i:89;i:1;i:94;i:1;i:96;i:1;i:97;i:1;i:98;i:1;i:99;i:1;i:101;i:1;i:103;i:1;i:104;i:1;i:105;i:1;i:106;i:1;i:110;i:1;i:112;i:1;i:113;i:1;i:114;i:1;i:115;i:1;i:117;i:1;i:119;i:1;i:120;i:1;i:121;i:1;i:122;i:1;i:123;i:1;i:127;i:1;i:129;i:1;i:130;i:1;i:131;i:1;i:132;i:1;i:134;i:1;i:136;i:1;i:137;i:1;i:138;i:1;i:139;i:1;i:140;i:1;i:144;i:1;i:145;i:1;i:149;i:1;i:150;i:1;i:154;i:1;i:155;i:1;i:156;i:1;i:157;i:1;i:161;i:1;i:162;i:1;i:164;i:1;i:165;i:-1;i:166;i:1;i:167;i:1;i:169;i:1;i:171;i:1;i:172;i:1;i:174;i:1;i:178;i:1;i:179;i:1;i:180;i:1;i:184;i:1;i:185;i:1;i:189;i:1;i:190;i:1;i:194;i:1;i:195;i:1;i:199;i:1;i:200;i:1;i:201;i:1;i:205;i:1;i:206;i:1;i:210;i:1;i:211;i:1;i:212;i:1;i:213;i:1;i:214;i:1;i:215;i:1;i:216;i:1;i:220;i:1;i:221;i:1;i:222;i:1;i:223;i:1;i:224;i:1;i:225;i:1;i:226;i:1;i:227;i:1;i:228;i:1;i:229;i:1;i:230;i:1;i:231;i:1;i:232;i:1;i:233;i:1;i:237;i:1;i:240;i:1;i:242;i:1;i:243;i:1;i:244;i:1;i:245;i:-2;i:247;i:1;i:248;i:1;}s:54:"/home/bjartka/public_html/doctrine/models/gnatUser.php";a:6:{i:8;i:1;i:9;i:1;i:10;i:1;i:14;i:1;i:15;i:1;i:16;i:1;}s:68:"/home/bjartka/public_html/doctrine/lib/Doctrine/Record/Exception.php";a:3:{i:21;i:1;i:33;i:1;i:34;i:1;}s:68:"/home/bjartka/public_html/doctrine/tests/Query/ConditionTestCase.php";a:50:{i:35;i:1;i:36;i:1;i:40;i:1;i:41;i:1;i:43;i:1;i:45;i:1;i:48;i:1;i:50;i:1;i:52;i:1;i:53;i:1;i:55;i:1;i:56;i:1;i:58;i:1;i:59;i:1;i:61;i:1;i:62;i:1;i:64;i:1;i:65;i:1;i:67;i:1;i:69;i:1;i:71;i:1;i:73;i:1;i:74;i:1;i:76;i:1;i:77;i:1;i:79;i:1;i:80;i:1;i:82;i:1;i:86;i:1;i:88;i:1;i:90;i:1;i:91;i:1;i:93;i:1;i:94;i:1;i:96;i:1;i:97;i:1;i:99;i:1;i:100;i:1;i:102;i:1;i:103;i:1;i:105;i:1;i:107;i:1;i:109;i:1;i:111;i:1;i:112;i:1;i:114;i:1;i:115;i:1;i:117;i:1;i:118;i:1;i:119;i:1;}s:73:"/home/bjartka/public_html/doctrine/tests/CustomResultSetOrderTestCase.php";a:69:{i:44;i:1;i:45;i:1;i:46;i:1;i:48;i:1;i:49;i:1;i:50;i:1;i:52;i:1;i:53;i:1;i:54;i:1;i:56;i:1;i:57;i:1;i:59;i:1;i:60;i:1;i:62;i:1;i:63;i:1;i:66;i:1;i:67;i:1;i:68;i:1;i:70;i:1;i:71;i:1;i:74;i:1;i:76;i:1;i:77;i:1;i:83;i:1;i:84;i:1;i:85;i:1;i:86;i:1;i:101;i:1;i:103;i:1;i:104;i:1;i:105;i:1;i:106;i:1;i:107;i:1;i:109;i:1;i:112;i:1;i:113;i:1;i:114;i:1;i:117;i:1;i:118;i:1;i:119;i:1;i:121;i:1;i:122;i:1;i:123;i:1;i:126;i:1;i:127;i:1;i:128;i:-1;i:130;i:1;i:131;i:1;i:147;i:1;i:148;i:1;i:149;i:1;i:150;i:1;i:151;i:1;i:152;i:1;i:154;i:1;i:157;i:1;i:159;i:1;i:160;i:1;i:163;i:1;i:164;i:1;i:165;i:1;i:168;i:1;i:169;i:1;i:170;i:1;i:173;i:1;i:174;i:1;i:175;i:-1;i:177;i:1;i:178;i:1;}s:81:"/home/bjartka/public_html/doctrine/tests/ColumnAggregationInheritanceTestCase.php";a:28:{i:40;i:1;i:42;i:1;i:43;i:1;i:44;i:1;i:45;i:1;i:46;i:1;i:47;i:1;i:51;i:1;i:52;i:1;i:53;i:1;i:54;i:1;i:58;i:1;i:59;i:1;i:60;i:1;i:62;i:1;i:63;i:1;i:64;i:1;i:65;i:1;i:68;i:1;i:69;i:1;i:70;i:1;i:71;i:1;i:75;i:1;i:76;i:1;i:77;i:1;i:79;i:1;i:80;i:1;i:81;i:1;}s:66:"/home/bjartka/public_html/doctrine/models/ValidatorTest_Person.php";a:5:{i:4;i:1;i:5;i:1;i:6;i:1;i:9;i:1;i:10;i:1;}s:64:"/home/bjartka/public_html/doctrine/lib/Doctrine/Query/Having.php";a:40:{i:21;i:1;i:33;i:1;i:43;i:1;i:45;i:1;i:46;i:1;i:48;i:1;i:49;i:1;i:50;i:1;i:52;i:1;i:53;i:1;i:54;i:1;i:56;i:1;i:58;i:1;i:60;i:-2;i:61;i:1;i:62;i:1;i:64;i:1;i:65;i:1;i:66;i:1;i:67;i:1;i:68;i:1;i:69;i:1;i:70;i:1;i:71;i:1;i:72;i:1;i:74;i:1;i:75;i:-2;i:76;i:-1;i:79;i:-2;i:89;i:1;i:91;i:1;i:92;i:1;i:94;i:1;i:95;i:1;i:96;i:1;i:97;i:1;i:98;i:1;i:100;i:1;i:101;i:-2;i:102;i:1;}s:80:"/home/bjartka/public_html/doctrine/tests/Record/SerializeUnserializeTestCase.php";a:48:{i:38;i:1;i:40;i:1;i:41;i:1;i:44;i:1;i:48;i:1;i:49;i:1;i:50;i:1;i:51;i:1;i:52;i:1;i:53;i:1;i:54;i:1;i:55;i:1;i:56;i:1;i:57;i:1;i:58;i:1;i:59;i:1;i:60;i:1;i:61;i:1;i:63;i:1;i:65;i:1;i:66;i:1;i:67;i:1;i:69;i:1;i:70;i:1;i:71;i:1;i:72;i:1;i:73;i:1;i:74;i:1;i:75;i:1;i:76;i:1;i:77;i:1;i:78;i:1;i:79;i:1;i:80;i:1;i:81;i:1;i:83;i:1;i:87;i:1;i:88;i:1;i:90;i:1;i:91;i:1;i:93;i:1;i:95;i:1;i:97;i:1;i:98;i:1;i:100;i:1;i:101;i:1;i:112;i:1;i:113;i:1;}s:63:"/home/bjartka/public_html/doctrine/lib/Doctrine/Cache/Array.php";a:17:{i:33;i:1;i:51;i:1;i:52;i:1;i:53;i:-2;i:54;i:1;i:55;i:-2;i:64;i:-1;i:65;i:-2;i:78;i:1;i:79;i:1;i:88;i:-1;i:89;i:-1;i:97;i:-1;i:98;i:-1;i:106;i:1;i:107;i:-2;i:109;i:1;}s:65:"/home/bjartka/public_html/doctrine/lib/Doctrine/Export/Schema.php";a:64:{i:40;i:1;i:51;i:1;i:53;i:1;i:54;i:1;i:55;i:1;i:56;i:-1;i:59;i:1;i:61;i:1;i:62;i:1;i:66;i:1;i:67;i:-1;i:68;i:-1;i:69;i:-2;i:71;i:-1;i:77;i:-1;i:78;i:-1;i:79;i:-1;i:80;i:-1;i:81;i:-1;i:83;i:-1;i:84;i:-1;i:85;i:-1;i:86;i:-2;i:87;i:-1;i:89;i:-1;i:90;i:-1;i:91;i:-2;i:93;i:-1;i:94;i:-1;i:96;i:-1;i:98;i:-1;i:99;i:-1;i:100;i:-1;i:102;i:-1;i:103;i:-1;i:104;i:-1;i:106;i:-1;i:108;i:-1;i:109;i:-1;i:110;i:-1;i:112;i:-1;i:114;i:-1;i:115;i:-1;i:116;i:-1;i:118;i:-1;i:119;i:-1;i:120;i:-1;i:122;i:-1;i:123;i:-1;i:125;i:-1;i:126;i:-1;i:127;i:-1;i:128;i:-1;i:129;i:-1;i:130;i:-1;i:132;i:-1;i:134;i:-1;i:135;i:-1;i:137;i:1;i:138;i:-2;i:149;i:1;i:151;i:1;i:152;i:1;i:153;i:1;}s:57:"/home/bjartka/public_html/doctrine/tests/DoctrineTest.php";a:108:{i:0;i:1;i:48;i:-1;i:49;i:-1;i:50;i:-1;i:61;i:-1;i:62;i:-1;i:63;i:-1;i:74;i:-1;i:75;i:-1;i:76;i:-1;i:77;i:-1;i:78;i:-1;i:79;i:-1;i:80;i:-1;i:81;i:-1;i:82;i:-1;i:83;i:-1;i:84;i:-1;i:88;i:-1;i:89;i:-1;i:90;i:-1;i:91;i:-1;i:92;i:-1;i:93;i:-1;i:94;i:-1;i:95;i:-1;i:96;i:-1;i:98;i:-1;i:99;i:-1;i:101;i:-1;i:102;i:-1;i:103;i:-1;i:104;i:-1;i:107;i:-1;i:108;i:-1;i:109;i:-1;i:110;i:-1;i:111;i:-1;i:112;i:-1;i:113;i:-1;i:114;i:-1;i:115;i:-1;i:116;i:-1;i:117;i:-2;i:120;i:-1;i:121;i:-1;i:122;i:1;i:123;i:1;i:124;i:-1;i:125;i:-1;i:126;i:-1;i:127;i:-1;i:128;i:-1;i:129;i:-1;i:130;i:-1;i:132;i:-1;i:141;i:-1;i:142;i:-1;i:143;i:-1;i:144;i:-1;i:145;i:-1;i:146;i:-1;i:147;i:-1;i:148;i:-1;i:149;i:-1;i:150;i:-1;i:159;i:-1;i:160;i:-1;i:161;i:-1;i:162;i:-1;i:163;i:-1;i:164;i:-1;i:165;i:-1;i:166;i:-1;i:167;i:-1;i:168;i:-1;i:169;i:-1;i:170;i:-1;i:171;i:-1;i:173;i:-1;i:174;i:-1;i:175;i:-2;i:186;i:1;i:187;i:1;i:188;i:-2;i:190;i:-1;i:191;i:-1;i:193;i:-1;i:195;i:-1;i:196;i:-1;i:197;i:-2;i:199;i:-1;i:201;i:-1;i:203;i:-1;i:204;i:-1;i:205;i:-1;i:206;i:-1;i:211;i:-1;i:212;i:-1;i:213;i:-1;i:215;i:-1;i:216;i:-1;i:217;i:-1;i:219;i:-1;i:220;i:-1;i:221;i:-1;i:223;i:-1;i:224;i:-2;}s:56:"/home/bjartka/public_html/doctrine/lib/Doctrine/Null.php";a:7:{i:0;i:1;i:36;i:1;i:39;i:-1;i:40;i:-2;i:43;i:1;i:44;i:-2;i:45;i:1;}s:57:"/home/bjartka/public_html/doctrine/models/PolicyCodeN.php";a:6:{i:5;i:1;i:6;i:1;i:7;i:1;i:8;i:1;i:9;i:1;i:13;i:1;}s:78:"/home/bjartka/public_html/doctrine/lib/Doctrine/Connection/Mysql/Exception.php";a:10:{i:21;i:1;i:34;i:1;i:77;i:1;i:78;i:1;i:79;i:1;i:80;i:1;i:81;i:-2;i:82;i:-1;i:83;i:-2;i:84;i:1;}s:69:"/home/bjartka/public_html/doctrine/lib/Doctrine/Transaction/Mssql.php";a:15:{i:21;i:1;i:33;i:1;i:54;i:1;i:55;i:1;i:56;i:1;i:57;i:1;i:58;i:1;i:59;i:1;i:60;i:1;i:61;i:1;i:62;i:1;i:64;i:1;i:66;i:1;i:67;i:1;i:68;i:1;}s:69:"/home/bjartka/public_html/doctrine/models/FooForeignlyOwnedWithPK.php";a:4:{i:6;i:1;i:7;i:1;i:10;i:1;i:11;i:1;}s:67:"/home/bjartka/public_html/doctrine/models/TestMovieUserBookmark.php";a:3:{i:6;i:1;i:7;i:1;i:8;i:1;}s:70:"/home/bjartka/public_html/doctrine/tests/Record/ZeroValuesTestCase.php";a:24:{i:37;i:1;i:39;i:1;i:40;i:1;i:44;i:1;i:45;i:1;i:46;i:1;i:47;i:1;i:48;i:1;i:49;i:1;i:50;i:1;i:54;i:1;i:56;i:1;i:57;i:1;i:61;i:1;i:62;i:1;i:63;i:1;i:65;i:1;i:67;i:1;i:68;i:1;i:72;i:1;i:73;i:1;i:74;i:1;i:76;i:1;i:77;i:1;}s:67:"/home/bjartka/public_html/doctrine/lib/Doctrine/Schema/Database.php";a:10:{i:21;i:1;i:35;i:1;i:55;i:-1;i:64;i:-1;i:73;i:-1;i:81;i:-1;i:82;i:-1;i:91;i:-1;i:92;i:-2;i:94;i:1;}s:71:"/home/bjartka/public_html/doctrine/lib/Doctrine/Template/Searchable.php";a:17:{i:33;i:1;i:37;i:1;i:38;i:1;i:42;i:1;i:43;i:-2;i:47;i:1;i:48;i:1;i:49;i:1;i:51;i:1;i:52;i:1;i:53;i:1;i:54;i:1;i:55;i:1;i:57;i:1;i:59;i:1;i:60;i:1;i:62;i:1;}s:78:"/home/bjartka/public_html/doctrine/lib/Doctrine/Connection/Pgsql/Exception.php";a:11:{i:21;i:1;i:35;i:1;i:99;i:1;i:100;i:1;i:101;i:1;i:102;i:1;i:103;i:-2;i:104;i:1;i:105;i:-1;i:106;i:-2;i:107;i:1;}s:74:"/home/bjartka/public_html/doctrine/lib/Doctrine/Adapter/Statement/Mock.php";a:36:{i:33;i:1;i:41;i:1;i:42;i:1;i:57;i:-1;i:75;i:-1;i:106;i:-1;i:115;i:1;i:116;i:-2;i:127;i:-1;i:128;i:-2;i:138;i:-1;i:139;i:-2;i:149;i:-1;i:150;i:-2;i:182;i:1;i:183;i:-2;i:199;i:1;i:200;i:-2;i:218;i:1;i:219;i:1;i:220;i:1;i:221;i:1;i:222;i:-2;i:236;i:1;i:237;i:-2;i:253;i:-1;i:254;i:-2;i:268;i:-1;i:269;i:-2;i:284;i:1;i:285;i:-2;i:303;i:-1;i:313;i:-1;i:323;i:-1;i:332;i:-1;i:334;i:1;}s:70:"/home/bjartka/public_html/doctrine/tests/Transaction/MssqlTestCase.php";a:17:{i:38;i:1;i:39;i:-1;i:40;i:1;i:41;i:1;i:43;i:1;i:46;i:1;i:47;i:1;i:48;i:1;i:49;i:1;i:51;i:1;i:52;i:1;i:53;i:1;i:54;i:1;i:55;i:1;i:58;i:1;i:60;i:1;i:61;i:1;}s:64:"/home/bjartka/public_html/doctrine/models/FooReferenceRecord.php";a:4:{i:6;i:1;i:8;i:1;i:9;i:1;i:10;i:1;}s:52:"/home/bjartka/public_html/doctrine/models/Policy.php";a:6:{i:6;i:1;i:7;i:1;i:11;i:1;i:12;i:1;i:13;i:1;i:14;i:1;}s:69:"/home/bjartka/public_html/doctrine/lib/Doctrine/AuditLog/Listener.php";a:32:{i:21;i:1;i:33;i:1;i:39;i:1;i:40;i:1;i:43;i:1;i:45;i:1;i:46;i:1;i:49;i:1;i:51;i:1;i:53;i:1;i:54;i:1;i:55;i:1;i:56;i:1;i:59;i:1;i:61;i:1;i:63;i:1;i:64;i:1;i:66;i:1;i:68;i:1;i:69;i:1;i:70;i:1;i:71;i:1;i:74;i:1;i:75;i:1;i:77;i:1;i:79;i:1;i:81;i:1;i:83;i:1;i:84;i:1;i:85;i:1;i:86;i:1;i:88;i:1;}s:70:"/home/bjartka/public_html/doctrine/lib/Doctrine/Validator/Unsigned.php";a:8:{i:34;i:1;i:43;i:1;i:45;i:1;i:46;i:-1;i:47;i:-2;i:48;i:1;i:49;i:-2;i:50;i:1;}s:65:"/home/bjartka/public_html/doctrine/tests/Query/DriverTestCase.php";a:32:{i:36;i:1;i:38;i:1;i:42;i:1;i:44;i:1;i:46;i:1;i:48;i:1;i:50;i:1;i:51;i:1;i:55;i:1;i:57;i:1;i:59;i:1;i:61;i:1;i:63;i:1;i:64;i:1;i:68;i:1;i:70;i:1;i:72;i:1;i:74;i:1;i:76;i:1;i:77;i:1;i:81;i:1;i:83;i:1;i:85;i:1;i:87;i:1;i:89;i:1;i:90;i:1;i:94;i:1;i:96;i:1;i:98;i:1;i:100;i:1;i:102;i:1;i:103;i:1;}s:59:"/home/bjartka/public_html/doctrine/models/SerializeTest.php";a:20:{i:6;i:1;i:8;i:1;i:9;i:1;i:10;i:1;i:11;i:1;i:12;i:1;i:13;i:1;i:14;i:1;i:15;i:1;i:16;i:1;i:17;i:1;i:18;i:1;i:19;i:1;i:22;i:1;i:23;i:1;i:25;i:1;i:26;i:1;i:27;i:1;i:28;i:1;i:29;i:1;}s:67:"/home/bjartka/public_html/doctrine/lib/Doctrine/Schema/Relation.php";a:10:{i:21;i:1;i:35;i:1;i:102;i:-1;i:103;i:-1;i:104;i:-1;i:105;i:-1;i:111;i:-1;i:112;i:-2;i:120;i:-1;i:122;i:1;}s:61:"/home/bjartka/public_html/doctrine/models/InheritanceDeal.php";a:6:{i:6;i:1;i:8;i:1;i:9;i:1;i:10;i:1;i:14;i:1;i:15;i:1;}s:53:"/home/bjartka/public_html/doctrine/models/Account.php";a:3:{i:6;i:1;i:7;i:1;i:8;i:1;}s:63:"/home/bjartka/public_html/doctrine/models/ResourceReference.php";a:3:{i:4;i:1;i:5;i:1;i:6;i:1;}s:66:"/home/bjartka/public_html/doctrine/models/CustomSequenceRecord.php";a:3:{i:5;i:1;i:6;i:1;i:7;i:1;}s:61:"/home/bjartka/public_html/doctrine/models/MysqlTestRecord.php";a:4:{i:6;i:1;i:7;i:1;i:9;i:1;i:10;i:1;}s:71:"/home/bjartka/public_html/doctrine/models/ValidatorTest_ClientModel.php";a:8:{i:5;i:1;i:6;i:1;i:7;i:1;i:8;i:1;i:9;i:1;i:10;i:1;i:13;i:1;i:14;i:1;}s:65:"/home/bjartka/public_html/doctrine/tests/Query/HavingTestCase.php";a:11:{i:37;i:1;i:39;i:1;i:41;i:1;i:42;i:1;i:45;i:1;i:47;i:1;i:49;i:1;i:50;i:1;i:54;i:1;i:56;i:1;i:57;i:1;}s:60:"/home/bjartka/public_html/doctrine/models/SoftDeleteTest.php";a:9:{i:6;i:1;i:7;i:1;i:8;i:1;i:9;i:1;i:12;i:1;i:13;i:1;i:16;i:1;i:18;i:1;i:19;i:1;}s:63:"/home/bjartka/public_html/doctrine/models/BoardWithPosition.php";a:5:{i:4;i:1;i:5;i:1;i:6;i:1;i:8;i:1;i:9;i:1;}s:66:"/home/bjartka/public_html/doctrine/tests/Export/SchemaTestCase.php";a:3:{i:58;i:1;i:59;i:1;i:60;i:1;}s:57:"/home/bjartka/public_html/doctrine/lib/Doctrine/Table.php";a:583:{i:0;i:1;i:178;i:1;i:180;i:1;i:182;i:1;i:183;i:1;i:185;i:1;i:186;i:1;i:187;i:-2;i:188;i:1;i:190;i:1;i:192;i:1;i:197;i:1;i:198;i:1;i:199;i:-2;i:201;i:1;i:202;i:1;i:203;i:1;i:205;i:1;i:206;i:-1;i:207;i:-2;i:210;i:1;i:212;i:1;i:213;i:1;i:216;i:1;i:217;i:1;i:219;i:1;i:220;i:1;i:221;i:1;i:222;i:1;i:224;i:1;i:227;i:1;i:228;i:1;i:229;i:1;i:231;i:1;i:233;i:1;i:234;i:1;i:235;i:1;i:237;i:1;i:238;i:1;i:239;i:1;i:240;i:1;i:241;i:1;i:242;i:1;i:243;i:1;i:244;i:1;i:245;i:1;i:246;i:1;i:247;i:1;i:248;i:1;i:249;i:1;i:250;i:1;i:252;i:1;i:254;i:1;i:256;i:1;i:258;i:1;i:260;i:1;i:261;i:1;i:262;i:1;i:263;i:1;i:264;i:1;i:265;i:1;i:266;i:1;i:267;i:1;i:268;i:1;i:269;i:1;i:271;i:1;i:272;i:1;i:273;i:1;i:274;i:-1;i:275;i:-1;i:276;i:-1;i:277;i:-1;i:280;i:1;i:281;i:-1;i:282;i:1;i:283;i:1;i:284;i:1;i:285;i:1;i:286;i:1;i:288;i:1;i:290;i:1;i:291;i:1;i:292;i:1;i:293;i:1;i:295;i:1;i:298;i:1;i:299;i:1;i:300;i:1;i:301;i:1;i:302;i:1;i:303;i:1;i:306;i:1;i:307;i:1;i:308;i:-2;i:312;i:1;i:313;i:1;i:322;i:1;i:323;i:-2;i:335;i:-1;i:336;i:-1;i:345;i:1;i:346;i:1;i:348;i:1;i:349;i:1;i:351;i:1;i:352;i:1;i:353;i:1;i:354;i:1;i:355;i:1;i:356;i:1;i:357;i:1;i:358;i:1;i:359;i:1;i:360;i:1;i:361;i:1;i:362;i:-1;i:363;i:1;i:365;i:1;i:366;i:1;i:367;i:1;i:368;i:1;i:369;i:1;i:371;i:1;i:372;i:1;i:374;i:1;i:376;i:1;i:377;i:1;i:379;i:1;i:380;i:1;i:381;i:1;i:383;i:1;i:384;i:1;i:385;i:-1;i:386;i:-2;i:388;i:1;i:389;i:-2;i:391;i:1;i:392;i:1;i:394;i:1;i:395;i:1;i:396;i:1;i:397;i:1;i:399;i:1;i:400;i:1;i:402;i:1;i:403;i:1;i:404;i:1;i:405;i:1;i:406;i:1;i:408;i:1;i:409;i:1;i:411;i:1;i:412;i:1;i:413;i:1;i:415;i:1;i:416;i:1;i:417;i:1;i:419;i:1;i:420;i:1;i:421;i:1;i:422;i:-2;i:433;i:-1;i:435;i:-1;i:436;i:-1;i:437;i:-1;i:438;i:-1;i:439;i:-1;i:440;i:-2;i:442;i:-2;i:444;i:-1;i:453;i:1;i:454;i:-2;i:463;i:1;i:464;i:1;i:465;i:-2;i:466;i:1;i:467;i:-2;i:475;i:-1;i:476;i:-2;i:485;i:1;i:486;i:-2;i:496;i:-1;i:497;i:-1;i:507;i:-1;i:508;i:-1;i:509;i:-1;i:510;i:-1;i:513;i:-1;i:514;i:-2;i:524;i:1;i:525;i:1;i:533;i:-1;i:534;i:-1;i:535;i:-2;i:537;i:-1;i:538;i:-2;i:541;i:1;i:542;i:1;i:544;i:1;i:545;i:-1;i:546;i:-1;i:549;i:1;i:550;i:1;i:551;i:1;i:552;i:1;i:553;i:1;i:554;i:1;i:556;i:1;i:559;i:1;i:560;i:1;i:561;i:1;i:562;i:1;i:563;i:1;i:564;i:1;i:566;i:1;i:567;i:1;i:568;i:1;i:569;i:1;i:570;i:1;i:572;i:1;i:575;i:1;i:577;i:1;i:578;i:1;i:579;i:1;i:580;i:1;i:582;i:1;i:592;i:-1;i:593;i:-2;i:602;i:1;i:603;i:-2;i:612;i:1;i:613;i:-2;i:625;i:1;i:626;i:-1;i:627;i:-1;i:628;i:1;i:629;i:-2;i:637;i:1;i:638;i:-2;i:652;i:1;i:653;i:1;i:654;i:1;i:655;i:1;i:656;i:1;i:657;i:1;i:658;i:1;i:659;i:1;i:660;i:-1;i:661;i:-2;i:662;i:1;i:663;i:-2;i:664;i:1;i:665;i:1;i:675;i:1;i:676;i:1;i:677;i:-2;i:678;i:-1;i:679;i:-2;i:692;i:1;i:693;i:1;i:694;i:1;i:695;i:-2;i:697;i:1;i:698;i:-2;i:711;i:1;i:712;i:1;i:713;i:1;i:715;i:1;i:716;i:1;i:717;i:1;i:718;i:1;i:719;i:1;i:720;i:1;i:721;i:1;i:722;i:1;i:724;i:1;i:725;i:1;i:727;i:1;i:728;i:1;i:729;i:1;i:730;i:1;i:734;i:1;i:736;i:1;i:737;i:1;i:738;i:1;i:739;i:1;i:740;i:1;i:741;i:1;i:742;i:1;i:743;i:1;i:745;i:1;i:746;i:1;i:747;i:1;i:748;i:1;i:749;i:1;i:751;i:1;i:752;i:1;i:754;i:1;i:755;i:1;i:757;i:1;i:758;i:1;i:759;i:-2;i:760;i:1;i:762;i:1;i:763;i:1;i:764;i:1;i:766;i:1;i:767;i:1;i:768;i:1;i:769;i:1;i:770;i:1;i:771;i:1;i:772;i:1;i:781;i:1;i:782;i:-2;i:792;i:1;i:793;i:1;i:794;i:-1;i:795;i:-2;i:796;i:1;i:797;i:1;i:798;i:-2;i:799;i:1;i:801;i:-2;i:807;i:1;i:808;i:-2;i:814;i:1;i:815;i:-2;i:822;i:1;i:823;i:-2;i:829;i:1;i:830;i:-2;i:839;i:1;i:840;i:1;i:841;i:1;i:842;i:1;i:843;i:-2;i:853;i:1;i:854;i:1;i:855;i:-2;i:857;i:1;i:859;i:1;i:860;i:1;i:861;i:1;i:862;i:-2;i:872;i:1;i:873;i:-2;i:886;i:1;i:887;i:-2;i:891;i:1;i:892;i:-2;i:908;i:1;i:909;i:1;i:910;i:1;i:911;i:1;i:912;i:-2;i:928;i:-1;i:929;i:-1;i:930;i:-1;i:931;i:-1;i:932;i:-2;i:942;i:1;i:943;i:1;i:953;i:1;i:955;i:1;i:956;i:-1;i:957;i:-2;i:959;i:1;i:961;i:1;i:962;i:-2;i:972;i:1;i:973;i:1;i:975;i:1;i:977;i:1;i:978;i:1;i:979;i:1;i:981;i:1;i:982;i:1;i:983;i:1;i:985;i:1;i:986;i:1;i:987;i:-2;i:988;i:1;i:989;i:1;i:991;i:1;i:992;i:1;i:993;i:1;i:994;i:1;i:996;i:1;i:997;i:-2;i:1000;i:1;i:1002;i:1;i:1003;i:1;i:1004;i:1;i:1005;i:1;i:1006;i:1;i:1007;i:1;i:1008;i:1;i:1010;i:1;i:1011;i:1;i:1012;i:-1;i:1013;i:-1;i:1017;i:1;i:1018;i:-2;i:1036;i:1;i:1037;i:1;i:1038;i:-2;i:1039;i:1;i:1040;i:1;i:1041;i:1;i:1042;i:1;i:1043;i:1;i:1044;i:1;i:1045;i:1;i:1046;i:1;i:1047;i:-2;i:1048;i:1;i:1049;i:1;i:1050;i:1;i:1051;i:-2;i:1052;i:1;i:1053;i:1;i:1054;i:-2;i:1062;i:1;i:1063;i:1;i:1064;i:1;i:1065;i:1;i:1066;i:1;i:1068;i:1;i:1070;i:1;i:1072;i:1;i:1073;i:1;i:1074;i:1;i:1075;i:1;i:1076;i:-2;i:1084;i:1;i:1085;i:1;i:1086;i:1;i:1087;i:1;i:1088;i:1;i:1089;i:1;i:1090;i:1;i:1091;i:1;i:1092;i:1;i:1093;i:-2;i:1101;i:-1;i:1102;i:-1;i:1103;i:-2;i:1109;i:-1;i:1110;i:-1;i:1111;i:-1;i:1112;i:-2;i:1119;i:1;i:1120;i:1;i:1121;i:-2;i:1122;i:1;i:1124;i:-2;i:1134;i:1;i:1135;i:-1;i:1136;i:-2;i:1138;i:1;i:1139;i:-1;i:1140;i:1;i:1141;i:1;i:1142;i:-2;i:1144;i:-1;i:1145;i:-2;i:1155;i:1;i:1157;i:1;i:1158;i:1;i:1159;i:1;i:1160;i:-2;i:1161;i:-1;i:1162;i:-2;i:1169;i:1;i:1170;i:-2;i:1179;i:1;i:1180;i:-2;i:1189;i:1;i:1190;i:1;i:1192;i:1;i:1193;i:-2;i:1195;i:-1;i:1196;i:-2;i:1204;i:1;i:1205;i:-2;i:1213;i:1;i:1214;i:1;i:1215;i:-2;i:1216;i:1;i:1217;i:-2;i:1225;i:1;i:1226;i:1;i:1227;i:-2;i:1228;i:1;i:1229;i:-2;i:1240;i:1;i:1241;i:1;i:1250;i:1;i:1251;i:-2;i:1277;i:1;i:1278;i:-1;i:1279;i:1;i:1280;i:1;i:1281;i:-2;i:1282;i:1;i:1285;i:1;i:1286;i:1;i:1287;i:1;i:1288;i:1;i:1290;i:1;i:1291;i:-1;i:1292;i:-2;i:1293;i:1;i:1294;i:-2;i:1295;i:-1;i:1296;i:1;i:1297;i:1;i:1299;i:1;i:1300;i:-1;i:1301;i:-2;i:1302;i:1;i:1303;i:-2;i:1304;i:1;i:1305;i:1;i:1306;i:-2;i:1307;i:1;i:1308;i:1;i:1309;i:-2;i:1310;i:1;i:1312;i:1;i:1313;i:-2;i:1315;i:1;i:1316;i:-2;i:1323;i:1;i:1324;i:1;i:1325;i:1;i:1326;i:1;i:1327;i:1;i:1329;i:1;i:1330;i:1;i:1331;i:1;i:1332;i:-2;i:1333;i:-1;i:1334;i:-2;i:1337;i:1;i:1338;i:-2;i:1341;i:1;i:1342;i:-2;i:1345;i:-1;i:1346;i:-1;i:1353;i:1;i:1354;i:-2;i:1358;i:1;i:1359;i:-1;i:1360;i:-2;i:1362;i:1;i:1363;i:-2;i:1367;i:-1;i:1368;i:-2;i:1372;i:1;i:1374;i:1;i:1375;i:-2;i:1385;i:-1;i:1387;i:-1;i:1388;i:-2;i:1399;i:1;i:1401;i:1;i:1402;i:-2;i:1405;i:1;i:1406;i:1;i:1407;i:-2;i:1409;i:1;i:1410;i:-2;i:1413;i:1;i:1415;i:1;i:1417;i:1;i:1419;i:1;i:1420;i:-2;i:1423;i:1;i:1424;i:-2;i:1432;i:-1;i:1433;i:-2;}s:57:"/home/bjartka/public_html/doctrine/models/Description.php";a:3:{i:4;i:1;i:5;i:1;i:6;i:1;}s:71:"/home/bjartka/public_html/doctrine/tests/Transaction/OracleTestCase.php";a:23:{i:37;i:1;i:39;i:1;i:40;i:1;i:43;i:1;i:44;i:1;i:47;i:1;i:48;i:1;i:50;i:1;i:51;i:1;i:55;i:1;i:56;i:-1;i:57;i:1;i:58;i:1;i:60;i:1;i:63;i:1;i:64;i:1;i:65;i:1;i:66;i:1;i:68;i:1;i:69;i:1;i:70;i:1;i:71;i:1;i:72;i:1;}s:71:"/home/bjartka/public_html/doctrine/tests/Transaction/SqliteTestCase.php";a:14:{i:38;i:1;i:39;i:-1;i:40;i:1;i:41;i:1;i:43;i:1;i:46;i:1;i:47;i:1;i:48;i:1;i:49;i:1;i:51;i:1;i:52;i:1;i:53;i:1;i:54;i:1;i:55;i:1;}s:66:"/home/bjartka/public_html/doctrine/tests/Export/OracleTestCase.php";a:71:{i:37;i:1;i:38;i:1;i:39;i:1;i:41;i:1;i:43;i:1;i:44;i:1;i:48;i:1;i:50;i:1;i:52;i:1;i:54;i:1;i:55;i:1;i:58;i:1;i:60;i:1;i:61;i:1;i:63;i:1;i:65;i:1;i:66;i:1;i:67;i:1;i:68;i:1;i:71;i:1;i:72;i:1;i:73;i:1;i:74;i:1;i:76;i:1;i:77;i:1;i:80;i:1;i:81;i:1;i:82;i:1;i:83;i:1;i:86;i:1;i:87;i:1;i:88;i:1;i:90;i:1;i:91;i:1;i:94;i:1;i:95;i:1;i:96;i:1;i:97;i:1;i:100;i:1;i:102;i:1;i:105;i:1;i:107;i:1;i:108;i:1;i:109;i:1;i:110;i:1;i:111;i:1;i:112;i:1;i:113;i:1;i:117;i:1;i:119;i:1;i:121;i:1;i:123;i:1;i:124;i:1;i:125;i:1;i:128;i:1;i:129;i:1;i:130;i:1;i:132;i:1;i:133;i:1;i:135;i:1;i:137;i:1;i:138;i:1;i:141;i:1;i:142;i:1;i:143;i:1;i:145;i:1;i:146;i:1;i:147;i:1;i:149;i:1;i:151;i:1;i:152;i:1;}s:66:"/home/bjartka/public_html/doctrine/tests/Export/SqliteTestCase.php";a:81:{i:38;i:1;i:39;i:-1;i:40;i:1;i:41;i:1;i:43;i:1;i:47;i:1;i:48;i:-1;i:49;i:1;i:50;i:1;i:52;i:1;i:55;i:1;i:57;i:1;i:59;i:1;i:61;i:1;i:62;i:1;i:65;i:1;i:66;i:1;i:67;i:1;i:68;i:1;i:70;i:1;i:71;i:1;i:73;i:1;i:74;i:1;i:77;i:1;i:78;i:1;i:79;i:1;i:81;i:1;i:82;i:1;i:84;i:1;i:85;i:1;i:88;i:1;i:89;i:1;i:90;i:1;i:92;i:1;i:93;i:1;i:94;i:1;i:96;i:1;i:102;i:1;i:104;i:1;i:105;i:1;i:108;i:1;i:110;i:1;i:111;i:1;i:112;i:1;i:114;i:1;i:115;i:1;i:116;i:1;i:118;i:1;i:124;i:1;i:126;i:1;i:128;i:1;i:129;i:1;i:132;i:1;i:134;i:1;i:135;i:1;i:136;i:1;i:138;i:1;i:139;i:1;i:141;i:1;i:143;i:1;i:144;i:1;i:147;i:1;i:148;i:1;i:151;i:1;i:152;i:-1;i:153;i:1;i:154;i:1;i:156;i:1;i:159;i:1;i:160;i:1;i:161;i:1;i:163;i:1;i:166;i:1;i:167;i:1;i:168;i:1;i:169;i:1;i:170;i:1;i:172;i:1;i:177;i:1;i:179;i:1;i:181;i:1;}s:57:"/home/bjartka/public_html/doctrine/models/Forum_Board.php";a:7:{i:4;i:1;i:5;i:1;i:6;i:1;i:7;i:1;i:9;i:1;i:10;i:1;i:11;i:1;}s:73:"/home/bjartka/public_html/doctrine/lib/Doctrine/Record/Listener/Chain.php";a:75:{i:21;i:1;i:36;i:1;i:52;i:1;i:53;i:1;i:55;i:-1;i:56;i:-2;i:57;i:1;i:58;i:1;i:59;i:1;i:60;i:-1;i:62;i:1;i:72;i:-1;i:73;i:-1;i:74;i:-2;i:75;i:-1;i:76;i:-2;i:86;i:-1;i:87;i:-1;i:91;i:-1;i:92;i:-1;i:93;i:-1;i:94;i:-1;i:98;i:-1;i:99;i:-1;i:100;i:-1;i:101;i:-1;i:105;i:-1;i:106;i:-1;i:107;i:-1;i:108;i:-1;i:112;i:-1;i:113;i:-1;i:114;i:-1;i:115;i:-1;i:119;i:1;i:120;i:1;i:121;i:1;i:122;i:1;i:126;i:1;i:127;i:1;i:128;i:1;i:129;i:1;i:133;i:1;i:134;i:1;i:135;i:1;i:136;i:1;i:140;i:1;i:141;i:1;i:142;i:1;i:143;i:1;i:147;i:1;i:148;i:1;i:149;i:1;i:150;i:1;i:154;i:1;i:155;i:1;i:156;i:1;i:157;i:1;i:161;i:1;i:162;i:1;i:163;i:1;i:164;i:1;i:168;i:1;i:169;i:1;i:170;i:1;i:171;i:1;i:176;i:1;i:177;i:1;i:178;i:1;i:179;i:1;i:182;i:1;i:183;i:1;i:184;i:1;i:185;i:1;i:187;i:1;}s:70:"/home/bjartka/public_html/doctrine/lib/Doctrine/Relation/Exception.php";a:3:{i:21;i:1;i:33;i:1;i:34;i:1;}s:61:"/home/bjartka/public_html/doctrine/lib/Doctrine/Validator.php";a:129:{i:33;i:1;i:47;i:1;i:48;i:1;i:49;i:1;i:50;i:1;i:51;i:1;i:52;i:-1;i:55;i:1;i:56;i:1;i:57;i:-2;i:67;i:1;i:68;i:1;i:70;i:1;i:74;i:1;i:76;i:1;i:77;i:1;i:78;i:1;i:79;i:1;i:80;i:1;i:81;i:1;i:82;i:1;i:84;i:1;i:86;i:1;i:87;i:-1;i:89;i:-1;i:90;i:-1;i:91;i:-1;i:92;i:-2;i:93;i:-1;i:95;i:1;i:96;i:1;i:97;i:1;i:99;i:1;i:100;i:-2;i:101;i:1;i:103;i:1;i:104;i:1;i:105;i:-1;i:106;i:1;i:107;i:1;i:108;i:1;i:109;i:1;i:110;i:1;i:111;i:1;i:112;i:1;i:113;i:1;i:114;i:-2;i:116;i:1;i:117;i:1;i:118;i:-2;i:120;i:1;i:121;i:1;i:122;i:1;i:123;i:1;i:124;i:1;i:125;i:1;i:126;i:1;i:127;i:-2;i:129;i:1;i:130;i:1;i:131;i:1;i:132;i:1;i:133;i:1;i:134;i:1;i:135;i:1;i:136;i:-2;i:138;i:1;i:139;i:1;i:140;i:1;i:141;i:1;i:143;i:1;i:144;i:1;i:150;i:1;i:151;i:1;i:153;i:1;i:154;i:-1;i:155;i:-1;i:156;i:-1;i:157;i:-2;i:158;i:-1;i:159;i:1;i:160;i:1;i:166;i:1;i:167;i:1;i:168;i:1;i:169;i:1;i:170;i:1;i:171;i:1;i:174;i:1;i:175;i:1;i:176;i:-2;i:177;i:1;i:178;i:-2;i:186;i:-1;i:187;i:-2;i:259;i:1;i:260;i:1;i:261;i:1;i:262;i:1;i:263;i:-2;i:266;i:1;i:267;i:1;i:268;i:1;i:269;i:1;i:270;i:1;i:271;i:1;i:272;i:1;i:273;i:1;i:274;i:1;i:275;i:1;i:276;i:-1;i:277;i:1;i:278;i:1;i:279;i:1;i:280;i:1;i:281;i:1;i:282;i:-1;i:283;i:1;i:285;i:-1;i:286;i:1;i:287;i:1;i:288;i:1;i:289;i:-1;i:290;i:-1;i:291;i:-1;i:292;i:-1;i:293;i:-1;i:294;i:-2;i:321;i:1;}s:50:"/home/bjartka/public_html/doctrine/models/Rec2.php";a:5:{i:6;i:1;i:7;i:1;i:8;i:1;i:12;i:1;i:13;i:1;}s:75:"/home/bjartka/public_html/doctrine/tests/Query/ApplyInheritanceTestCase.php";a:10:{i:38;i:1;i:42;i:1;i:44;i:1;i:45;i:1;i:49;i:1;i:50;i:1;i:51;i:1;i:53;i:1;i:55;i:1;i:56;i:1;}s:58:"/home/bjartka/public_html/doctrine/models/ResourceTask.php";a:5:{i:4;i:1;i:5;i:1;i:6;i:1;i:8;i:1;i:9;i:1;}s:60:"/home/bjartka/public_html/doctrine/lib/Doctrine/Sequence.php";a:10:{i:21;i:1;i:34;i:1;i:46;i:-1;i:47;i:-2;i:57;i:-1;i:58;i:-2;i:68;i:-1;i:70;i:-1;i:71;i:-2;i:72;i:1;}s:61:"/home/bjartka/public_html/doctrine/lib/Doctrine/Tokenizer.php";a:136:{i:34;i:1;i:38;i:-1;i:42;i:-1;i:52;i:1;i:53;i:1;i:54;i:-2;i:55;i:1;i:57;i:-2;i:81;i:1;i:82;i:1;i:83;i:1;i:84;i:1;i:85;i:1;i:88;i:1;i:89;i:1;i:90;i:1;i:91;i:1;i:92;i:1;i:93;i:1;i:94;i:1;i:96;i:1;i:97;i:1;i:98;i:1;i:99;i:1;i:100;i:1;i:101;i:1;i:102;i:1;i:104;i:1;i:105;i:1;i:106;i:1;i:108;i:1;i:109;i:1;i:110;i:-2;i:128;i:1;i:129;i:-1;i:130;i:-1;i:131;i:-1;i:132;i:1;i:135;i:1;i:136;i:1;i:137;i:1;i:138;i:1;i:139;i:1;i:141;i:1;i:142;i:1;i:143;i:1;i:144;i:1;i:145;i:1;i:147;i:1;i:148;i:1;i:149;i:1;i:151;i:1;i:152;i:1;i:153;i:-2;i:184;i:1;i:185;i:1;i:186;i:1;i:187;i:1;i:188;i:1;i:190;i:1;i:191;i:1;i:192;i:1;i:194;i:1;i:196;i:1;i:197;i:1;i:198;i:1;i:199;i:1;i:202;i:1;i:203;i:1;i:205;i:1;i:206;i:1;i:207;i:1;i:209;i:1;i:210;i:1;i:212;i:1;i:213;i:1;i:214;i:1;i:215;i:1;i:216;i:1;i:217;i:1;i:218;i:1;i:219;i:1;i:220;i:1;i:222;i:1;i:223;i:1;i:224;i:1;i:225;i:1;i:227;i:1;i:228;i:1;i:229;i:1;i:230;i:1;i:231;i:1;i:232;i:1;i:233;i:1;i:234;i:1;i:235;i:1;i:238;i:1;i:239;i:1;i:240;i:-2;i:271;i:1;i:272;i:1;i:274;i:1;i:275;i:1;i:276;i:1;i:278;i:1;i:280;i:1;i:281;i:1;i:283;i:1;i:284;i:1;i:286;i:1;i:287;i:1;i:288;i:1;i:289;i:1;i:290;i:1;i:291;i:1;i:292;i:-2;i:293;i:1;i:294;i:1;i:295;i:1;i:296;i:1;i:299;i:1;i:300;i:1;i:302;i:1;i:303;i:1;i:304;i:1;i:305;i:1;i:306;i:1;i:307;i:1;i:308;i:1;i:309;i:1;i:310;i:1;i:312;i:1;i:313;i:1;i:315;i:1;i:316;i:-2;i:317;i:1;}s:66:"/home/bjartka/public_html/doctrine/lib/Doctrine/DataDict/Mysql.php";a:251:{i:21;i:1;i:32;i:1;i:136;i:1;i:137;i:-1;i:138;i:-2;i:140;i:1;i:141;i:1;i:142;i:1;i:144;i:1;i:145;i:1;i:146;i:1;i:147;i:1;i:148;i:1;i:149;i:1;i:150;i:1;i:151;i:1;i:152;i:-1;i:153;i:-1;i:154;i:1;i:156;i:1;i:158;i:1;i:159;i:1;i:161;i:1;i:162;i:1;i:163;i:1;i:164;i:1;i:165;i:-1;i:166;i:-1;i:167;i:-1;i:168;i:-1;i:169;i:-1;i:170;i:-1;i:171;i:-1;i:172;i:-2;i:173;i:-1;i:174;i:1;i:175;i:1;i:176;i:1;i:177;i:1;i:178;i:1;i:179;i:-1;i:180;i:1;i:181;i:1;i:182;i:-1;i:183;i:-1;i:184;i:-2;i:185;i:-1;i:186;i:1;i:187;i:1;i:188;i:-1;i:189;i:-1;i:190;i:-1;i:191;i:-1;i:192;i:-1;i:193;i:-1;i:194;i:-2;i:196;i:1;i:197;i:1;i:198;i:1;i:199;i:1;i:200;i:1;i:201;i:-1;i:202;i:1;i:203;i:1;i:204;i:1;i:205;i:1;i:206;i:1;i:207;i:1;i:208;i:1;i:209;i:1;i:210;i:-2;i:211;i:-1;i:212;i:1;i:213;i:1;i:214;i:1;i:215;i:1;i:216;i:1;i:217;i:1;i:218;i:1;i:219;i:1;i:220;i:1;i:221;i:1;i:222;i:1;i:223;i:1;i:224;i:-1;i:225;i:-1;i:226;i:-1;i:227;i:-1;i:228;i:-1;i:229;i:-1;i:230;i:-2;i:239;i:1;i:240;i:1;i:241;i:1;i:242;i:-1;i:243;i:-1;i:244;i:1;i:245;i:-1;i:246;i:-1;i:247;i:-1;i:248;i:1;i:249;i:1;i:251;i:1;i:252;i:1;i:254;i:1;i:255;i:1;i:256;i:1;i:258;i:1;i:261;i:1;i:262;i:1;i:263;i:1;i:264;i:1;i:265;i:-1;i:266;i:-1;i:267;i:1;i:268;i:1;i:269;i:1;i:270;i:1;i:271;i:1;i:272;i:1;i:273;i:1;i:274;i:1;i:275;i:1;i:276;i:1;i:277;i:1;i:278;i:1;i:279;i:1;i:280;i:1;i:281;i:1;i:282;i:1;i:283;i:1;i:284;i:1;i:285;i:1;i:286;i:1;i:287;i:1;i:288;i:1;i:289;i:1;i:290;i:1;i:291;i:1;i:292;i:1;i:293;i:1;i:294;i:1;i:295;i:1;i:296;i:1;i:297;i:1;i:298;i:1;i:299;i:1;i:300;i:1;i:301;i:1;i:302;i:1;i:303;i:1;i:304;i:-1;i:305;i:-1;i:306;i:1;i:307;i:1;i:308;i:1;i:309;i:-1;i:310;i:-1;i:311;i:1;i:312;i:1;i:313;i:1;i:314;i:1;i:315;i:1;i:316;i:1;i:317;i:-1;i:318;i:-1;i:319;i:-1;i:320;i:-1;i:321;i:-1;i:322;i:-1;i:323;i:-1;i:324;i:-1;i:325;i:-1;i:326;i:-1;i:327;i:-1;i:328;i:-1;i:329;i:-1;i:330;i:-1;i:331;i:-1;i:333;i:-1;i:334;i:-1;i:335;i:1;i:336;i:-1;i:337;i:-1;i:338;i:-1;i:339;i:-1;i:340;i:1;i:341;i:1;i:342;i:1;i:343;i:1;i:344;i:1;i:345;i:1;i:346;i:1;i:347;i:1;i:348;i:1;i:349;i:1;i:350;i:-1;i:351;i:-1;i:352;i:-1;i:353;i:1;i:354;i:1;i:355;i:1;i:356;i:1;i:357;i:1;i:358;i:1;i:359;i:1;i:360;i:1;i:361;i:1;i:362;i:1;i:363;i:1;i:364;i:1;i:365;i:1;i:366;i:1;i:367;i:1;i:368;i:1;i:369;i:1;i:370;i:1;i:371;i:1;i:372;i:1;i:373;i:1;i:374;i:1;i:375;i:1;i:376;i:1;i:377;i:1;i:378;i:1;i:379;i:1;i:381;i:1;i:383;i:1;i:384;i:1;i:385;i:-2;i:386;i:-1;i:388;i:-2;i:399;i:1;i:400;i:-2;i:411;i:1;i:412;i:-2;i:440;i:1;i:441;i:1;i:442;i:1;i:443;i:1;i:444;i:-1;i:445;i:-1;i:446;i:-1;i:447;i:-1;i:448;i:-1;i:455;i:1;i:456;i:1;i:458;i:1;i:460;i:1;i:461;i:-2;i:462;i:1;}s:67:"/home/bjartka/public_html/doctrine/tests/DataDict/PgsqlTestCase.php";a:194:{i:37;i:1;i:38;i:-2;i:42;i:1;i:43;i:-1;i:44;i:1;i:45;i:1;i:47;i:1;i:50;i:1;i:52;i:1;i:53;i:1;i:54;i:1;i:55;i:1;i:57;i:1;i:59;i:1;i:60;i:1;i:61;i:1;i:62;i:1;i:64;i:1;i:66;i:1;i:67;i:1;i:68;i:1;i:69;i:1;i:71;i:1;i:73;i:1;i:74;i:1;i:75;i:1;i:76;i:1;i:78;i:1;i:80;i:1;i:81;i:1;i:82;i:1;i:83;i:1;i:85;i:1;i:87;i:1;i:88;i:1;i:89;i:1;i:90;i:1;i:91;i:1;i:94;i:1;i:96;i:1;i:97;i:1;i:98;i:1;i:99;i:1;i:101;i:1;i:103;i:1;i:104;i:1;i:105;i:1;i:106;i:1;i:107;i:1;i:110;i:1;i:112;i:1;i:113;i:1;i:114;i:1;i:115;i:1;i:117;i:1;i:119;i:1;i:120;i:1;i:121;i:1;i:122;i:1;i:124;i:1;i:126;i:1;i:127;i:1;i:128;i:1;i:129;i:1;i:130;i:1;i:133;i:1;i:135;i:1;i:136;i:1;i:137;i:1;i:138;i:1;i:140;i:1;i:142;i:1;i:143;i:1;i:144;i:1;i:145;i:1;i:147;i:1;i:149;i:1;i:150;i:1;i:151;i:1;i:152;i:1;i:153;i:1;i:156;i:1;i:158;i:1;i:159;i:1;i:160;i:1;i:161;i:1;i:162;i:1;i:165;i:1;i:167;i:1;i:168;i:1;i:169;i:1;i:170;i:1;i:171;i:1;i:174;i:1;i:176;i:1;i:177;i:1;i:178;i:1;i:179;i:1;i:180;i:1;i:183;i:1;i:185;i:1;i:186;i:1;i:187;i:1;i:188;i:1;i:190;i:1;i:192;i:1;i:193;i:1;i:194;i:1;i:195;i:1;i:197;i:1;i:199;i:1;i:200;i:1;i:201;i:1;i:202;i:1;i:205;i:1;i:207;i:1;i:208;i:1;i:209;i:1;i:210;i:1;i:213;i:1;i:215;i:1;i:216;i:1;i:217;i:1;i:218;i:1;i:220;i:1;i:223;i:1;i:225;i:1;i:226;i:1;i:228;i:1;i:229;i:1;i:230;i:1;i:231;i:1;i:232;i:1;i:234;i:1;i:235;i:1;i:236;i:1;i:237;i:1;i:238;i:1;i:241;i:1;i:242;i:1;i:243;i:1;i:247;i:1;i:249;i:1;i:251;i:1;i:253;i:1;i:255;i:1;i:257;i:1;i:258;i:1;i:261;i:1;i:263;i:1;i:265;i:1;i:267;i:1;i:269;i:1;i:271;i:1;i:272;i:1;i:275;i:1;i:277;i:1;i:278;i:1;i:281;i:1;i:283;i:1;i:284;i:1;i:287;i:1;i:289;i:1;i:290;i:1;i:293;i:1;i:295;i:1;i:296;i:1;i:299;i:1;i:301;i:1;i:302;i:1;i:305;i:1;i:307;i:1;i:308;i:1;i:311;i:1;i:313;i:1;i:314;i:1;i:317;i:1;i:319;i:1;i:320;i:1;i:323;i:1;i:325;i:1;i:326;i:1;i:329;i:1;i:331;i:1;i:332;i:1;i:335;i:1;i:337;i:1;i:338;i:1;i:341;i:1;i:343;i:1;i:344;i:1;i:347;i:1;i:349;i:1;i:350;i:1;}s:54:"/home/bjartka/public_html/doctrine/models/TestUser.php";a:11:{i:6;i:1;i:7;i:1;i:8;i:1;i:9;i:1;i:11;i:1;i:12;i:1;i:13;i:1;i:14;i:1;i:16;i:1;i:19;i:1;i:20;i:1;}s:59:"/home/bjartka/public_html/doctrine/models/NestReference.php";a:3:{i:6;i:1;i:7;i:1;i:8;i:1;}s:69:"/home/bjartka/public_html/doctrine/lib/Doctrine/Validator/Notnull.php";a:4:{i:33;i:1;i:43;i:1;i:44;i:-2;i:45;i:1;}s:69:"/home/bjartka/public_html/doctrine/tests/Query/MultiJoin2TestCase.php";a:56:{i:36;i:1;i:39;i:1;i:41;i:1;i:42;i:1;i:45;i:1;i:47;i:1;i:49;i:1;i:50;i:1;i:51;i:1;i:52;i:1;i:53;i:1;i:55;i:1;i:56;i:1;i:57;i:1;i:58;i:1;i:59;i:1;i:61;i:1;i:62;i:1;i:63;i:1;i:65;i:1;i:66;i:1;i:67;i:1;i:68;i:1;i:70;i:1;i:74;i:1;i:75;i:1;i:77;i:1;i:78;i:1;i:79;i:1;i:80;i:1;i:81;i:1;i:82;i:1;i:83;i:1;i:84;i:1;i:85;i:1;i:87;i:1;i:89;i:1;i:90;i:1;i:91;i:1;i:92;i:-2;i:94;i:1;i:98;i:1;i:99;i:1;i:101;i:1;i:102;i:1;i:103;i:1;i:104;i:1;i:105;i:1;i:106;i:1;i:107;i:1;i:108;i:1;i:109;i:1;i:110;i:1;i:111;i:1;i:112;i:-2;i:114;i:1;}s:73:"/home/bjartka/public_html/doctrine/tests/Query/ComponentAliasTestCase.php";a:53:{i:38;i:1;i:39;i:1;i:41;i:1;i:43;i:1;i:45;i:1;i:47;i:1;i:48;i:1;i:49;i:1;i:50;i:1;i:51;i:1;i:52;i:1;i:56;i:1;i:57;i:1;i:59;i:1;i:61;i:1;i:63;i:1;i:65;i:1;i:66;i:1;i:67;i:1;i:68;i:1;i:69;i:1;i:70;i:1;i:73;i:1;i:74;i:1;i:76;i:1;i:78;i:1;i:80;i:1;i:82;i:1;i:83;i:1;i:84;i:1;i:85;i:1;i:89;i:1;i:90;i:1;i:92;i:1;i:94;i:1;i:96;i:1;i:99;i:1;i:100;i:1;i:101;i:1;i:102;i:1;i:103;i:1;i:104;i:1;i:105;i:1;i:107;i:1;i:108;i:1;i:112;i:1;i:113;i:1;i:115;i:1;i:117;i:1;i:118;i:1;i:119;i:1;i:120;i:1;i:121;i:1;}s:65:"/home/bjartka/public_html/doctrine/tests/Query/DeleteTestCase.php";a:35:{i:38;i:1;i:40;i:1;i:42;i:1;i:44;i:1;i:46;i:1;i:48;i:1;i:49;i:1;i:52;i:1;i:54;i:1;i:56;i:1;i:58;i:1;i:60;i:1;i:62;i:1;i:63;i:1;i:66;i:1;i:68;i:1;i:70;i:1;i:72;i:1;i:74;i:1;i:76;i:1;i:77;i:1;i:80;i:1;i:82;i:1;i:84;i:1;i:86;i:1;i:88;i:1;i:90;i:1;i:91;i:1;i:94;i:1;i:96;i:1;i:98;i:1;i:100;i:1;i:102;i:1;i:104;i:1;i:105;i:1;}s:73:"/home/bjartka/public_html/doctrine/tests/NestedSet/SingleRootTestCase.php";a:39:{i:37;i:1;i:38;i:1;i:39;i:1;i:43;i:1;i:44;i:1;i:45;i:1;i:46;i:1;i:48;i:1;i:49;i:1;i:50;i:1;i:52;i:1;i:53;i:1;i:54;i:1;i:55;i:1;i:59;i:1;i:60;i:1;i:61;i:1;i:62;i:1;i:63;i:1;i:67;i:1;i:68;i:1;i:69;i:1;i:70;i:1;i:71;i:1;i:72;i:1;i:73;i:1;i:74;i:1;i:78;i:1;i:79;i:1;i:80;i:1;i:81;i:1;i:85;i:1;i:86;i:1;i:87;i:1;i:88;i:1;i:89;i:1;i:90;i:1;i:91;i:1;i:92;i:1;}s:67:"/home/bjartka/public_html/doctrine/lib/Doctrine/Search/Listener.php";a:9:{i:33;i:1;i:39;i:1;i:40;i:1;i:44;i:-1;i:49;i:-1;i:52;i:1;i:54;i:1;i:55;i:1;i:56;i:1;}s:60:"/home/bjartka/public_html/doctrine/models/LiabilityCodeN.php";a:6:{i:5;i:1;i:6;i:1;i:7;i:1;i:8;i:1;i:9;i:1;i:13;i:1;}s:67:"/home/bjartka/public_html/doctrine/lib/Doctrine/Record/Listener.php";a:14:{i:36;i:-1;i:39;i:-1;i:42;i:-1;i:45;i:-1;i:48;i:1;i:51;i:1;i:54;i:1;i:57;i:1;i:60;i:1;i:63;i:1;i:66;i:1;i:69;i:1;i:72;i:1;i:75;i:1;}s:72:"/home/bjartka/public_html/doctrine/lib/Doctrine/Connection/Statement.php";a:93:{i:21;i:1;i:33;i:1;i:53;i:1;i:54;i:1;i:56;i:1;i:57;i:-1;i:58;i:-2;i:59;i:1;i:68;i:-1;i:69;i:-2;i:72;i:-1;i:73;i:-2;i:76;i:1;i:77;i:-2;i:92;i:-1;i:93;i:-1;i:94;i:-2;i:95;i:-1;i:97;i:-2;i:114;i:-1;i:115;i:-1;i:116;i:-2;i:117;i:-1;i:119;i:-2;i:149;i:-1;i:150;i:-1;i:151;i:-2;i:152;i:-1;i:154;i:-2;i:163;i:1;i:164;i:-2;i:175;i:-1;i:176;i:-2;i:186;i:-1;i:187;i:-2;i:197;i:-1;i:198;i:-2;i:217;i:1;i:218;i:1;i:220;i:1;i:221;i:1;i:222;i:1;i:223;i:1;i:224;i:1;i:226;i:1;i:228;i:1;i:229;i:-2;i:230;i:-2;i:233;i:-2;i:235;i:-2;i:236;i:-2;i:268;i:1;i:270;i:1;i:271;i:1;i:272;i:1;i:274;i:1;i:276;i:1;i:277;i:1;i:278;i:1;i:280;i:1;i:282;i:1;i:283;i:-2;i:300;i:1;i:301;i:1;i:302;i:1;i:304;i:1;i:306;i:1;i:307;i:1;i:308;i:1;i:309;i:1;i:310;i:-1;i:313;i:1;i:314;i:1;i:316;i:1;i:318;i:1;i:319;i:-2;i:333;i:1;i:334;i:-2;i:350;i:-1;i:351;i:-2;i:362;i:-1;i:363;i:-2;i:382;i:-1;i:383;i:-2;i:397;i:-1;i:398;i:-2;i:413;i:1;i:414;i:-2;i:425;i:-1;i:426;i:-2;i:436;i:-1;i:437;i:-2;i:439;i:1;}s:73:"/home/bjartka/public_html/doctrine/lib/Doctrine/Transaction/Exception.php";a:3:{i:21;i:1;i:33;i:1;i:34;i:1;}s:71:"/home/bjartka/public_html/doctrine/lib/Doctrine/Connection/Firebird.php";a:33:{i:21;i:1;i:35;i:1;i:50;i:-1;i:51;i:1;i:52;i:1;i:53;i:1;i:54;i:1;i:55;i:1;i:56;i:1;i:57;i:1;i:58;i:1;i:59;i:1;i:60;i:1;i:61;i:1;i:62;i:1;i:63;i:1;i:64;i:1;i:65;i:1;i:66;i:1;i:67;i:1;i:69;i:1;i:78;i:1;i:79;i:1;i:89;i:-1;i:90;i:-1;i:91;i:-1;i:102;i:-1;i:103;i:-1;i:104;i:-1;i:105;i:-1;i:106;i:-1;i:107;i:-2;i:108;i:1;}s:67:"/home/bjartka/public_html/doctrine/tests/DataDict/MysqlTestCase.php";a:196:{i:36;i:1;i:37;i:1;i:40;i:1;i:41;i:1;i:45;i:1;i:46;i:-1;i:47;i:1;i:48;i:1;i:50;i:1;i:53;i:1;i:56;i:1;i:57;i:1;i:58;i:1;i:59;i:1;i:60;i:1;i:62;i:1;i:63;i:1;i:64;i:1;i:65;i:1;i:67;i:1;i:69;i:1;i:70;i:1;i:71;i:1;i:72;i:1;i:74;i:1;i:76;i:1;i:77;i:1;i:78;i:1;i:79;i:1;i:81;i:1;i:83;i:1;i:84;i:1;i:85;i:1;i:86;i:1;i:88;i:1;i:90;i:1;i:91;i:1;i:92;i:1;i:93;i:1;i:94;i:1;i:97;i:1;i:99;i:1;i:100;i:1;i:101;i:1;i:102;i:1;i:104;i:1;i:106;i:1;i:107;i:1;i:108;i:1;i:109;i:1;i:111;i:1;i:113;i:1;i:114;i:1;i:115;i:1;i:116;i:1;i:118;i:1;i:120;i:1;i:121;i:1;i:122;i:1;i:123;i:1;i:125;i:1;i:127;i:1;i:128;i:1;i:129;i:1;i:130;i:1;i:132;i:1;i:134;i:1;i:135;i:1;i:136;i:1;i:137;i:1;i:138;i:1;i:141;i:1;i:143;i:1;i:144;i:1;i:145;i:1;i:146;i:1;i:148;i:1;i:150;i:1;i:151;i:1;i:152;i:1;i:153;i:1;i:155;i:1;i:157;i:1;i:158;i:1;i:159;i:1;i:160;i:1;i:161;i:1;i:165;i:1;i:167;i:1;i:168;i:1;i:169;i:1;i:170;i:1;i:171;i:1;i:174;i:1;i:176;i:1;i:177;i:1;i:178;i:1;i:179;i:1;i:181;i:1;i:183;i:1;i:184;i:1;i:185;i:1;i:186;i:1;i:188;i:1;i:190;i:1;i:191;i:1;i:192;i:1;i:193;i:1;i:194;i:1;i:198;i:1;i:200;i:1;i:201;i:1;i:202;i:1;i:203;i:1;i:205;i:1;i:207;i:1;i:208;i:1;i:209;i:1;i:210;i:1;i:211;i:1;i:214;i:1;i:217;i:1;i:218;i:1;i:219;i:1;i:220;i:1;i:221;i:1;i:224;i:1;i:226;i:1;i:227;i:1;i:228;i:1;i:229;i:1;i:231;i:1;i:233;i:1;i:234;i:1;i:235;i:1;i:236;i:1;i:238;i:1;i:240;i:1;i:241;i:1;i:242;i:1;i:243;i:1;i:245;i:1;i:247;i:1;i:248;i:1;i:249;i:1;i:250;i:1;i:251;i:1;i:255;i:1;i:257;i:1;i:259;i:1;i:261;i:1;i:263;i:1;i:265;i:1;i:266;i:1;i:270;i:1;i:272;i:1;i:273;i:1;i:276;i:1;i:278;i:1;i:279;i:1;i:282;i:1;i:284;i:1;i:285;i:1;i:288;i:1;i:290;i:1;i:291;i:1;i:294;i:1;i:296;i:1;i:297;i:1;i:300;i:1;i:302;i:1;i:303;i:1;i:306;i:1;i:308;i:1;i:309;i:1;i:312;i:1;i:314;i:1;i:315;i:1;i:318;i:1;i:320;i:1;i:321;i:1;i:324;i:1;i:326;i:1;i:327;i:1;i:330;i:1;i:332;i:1;i:333;i:1;i:336;i:1;i:338;i:1;i:339;i:1;i:342;i:1;i:344;i:1;i:345;i:1;i:348;i:1;i:350;i:1;i:351;i:1;}s:66:"/home/bjartka/public_html/doctrine/lib/Doctrine/DataDict/Pgsql.php";a:195:{i:21;i:1;i:33;i:1;i:362;i:1;i:363;i:-1;i:364;i:-2;i:365;i:1;i:366;i:1;i:367;i:1;i:368;i:1;i:369;i:1;i:370;i:1;i:371;i:1;i:373;i:1;i:375;i:1;i:377;i:1;i:378;i:1;i:380;i:1;i:381;i:1;i:382;i:1;i:383;i:1;i:384;i:1;i:385;i:1;i:386;i:1;i:387;i:1;i:388;i:1;i:389;i:1;i:390;i:1;i:391;i:1;i:392;i:-2;i:393;i:1;i:394;i:1;i:395;i:-2;i:396;i:1;i:397;i:1;i:398;i:1;i:399;i:1;i:400;i:1;i:401;i:1;i:402;i:1;i:403;i:1;i:404;i:-2;i:405;i:-1;i:406;i:1;i:407;i:1;i:408;i:1;i:409;i:1;i:410;i:1;i:411;i:1;i:412;i:1;i:413;i:1;i:414;i:1;i:415;i:1;i:416;i:1;i:417;i:1;i:418;i:-1;i:419;i:-1;i:420;i:-1;i:421;i:-1;i:422;i:-1;i:423;i:-1;i:424;i:-2;i:435;i:1;i:436;i:1;i:437;i:-1;i:438;i:-1;i:439;i:1;i:440;i:1;i:441;i:1;i:442;i:1;i:443;i:1;i:445;i:1;i:446;i:1;i:447;i:1;i:449;i:1;i:452;i:1;i:453;i:1;i:454;i:1;i:455;i:1;i:456;i:1;i:457;i:1;i:458;i:1;i:459;i:1;i:460;i:-1;i:461;i:-1;i:462;i:1;i:463;i:1;i:464;i:1;i:465;i:1;i:466;i:1;i:467;i:1;i:468;i:1;i:469;i:1;i:470;i:1;i:471;i:1;i:472;i:1;i:473;i:1;i:474;i:1;i:475;i:1;i:476;i:1;i:477;i:1;i:478;i:1;i:479;i:1;i:480;i:1;i:481;i:1;i:482;i:1;i:483;i:1;i:484;i:1;i:485;i:1;i:486;i:1;i:487;i:1;i:488;i:1;i:489;i:1;i:490;i:1;i:491;i:1;i:492;i:1;i:493;i:1;i:494;i:1;i:495;i:1;i:496;i:-1;i:497;i:-1;i:498;i:1;i:499;i:1;i:500;i:1;i:501;i:1;i:502;i:1;i:503;i:1;i:504;i:1;i:505;i:1;i:506;i:1;i:507;i:1;i:508;i:1;i:509;i:1;i:510;i:1;i:511;i:1;i:512;i:1;i:513;i:1;i:514;i:1;i:515;i:1;i:516;i:1;i:517;i:1;i:518;i:1;i:519;i:1;i:520;i:1;i:521;i:1;i:522;i:1;i:523;i:1;i:524;i:1;i:525;i:1;i:526;i:1;i:527;i:1;i:528;i:1;i:529;i:1;i:530;i:1;i:531;i:1;i:532;i:1;i:533;i:1;i:534;i:1;i:535;i:1;i:536;i:1;i:537;i:1;i:538;i:1;i:539;i:1;i:540;i:1;i:541;i:1;i:542;i:1;i:543;i:1;i:544;i:1;i:545;i:1;i:546;i:1;i:547;i:1;i:548;i:1;i:549;i:1;i:551;i:1;i:552;i:1;i:553;i:1;i:554;i:1;i:555;i:-2;i:586;i:1;i:587;i:1;i:588;i:1;i:589;i:-2;i:591;i:1;i:592;i:1;i:593;i:1;i:594;i:-1;i:595;i:-1;i:596;i:1;i:597;i:1;i:605;i:1;i:606;i:1;i:607;i:1;i:608;i:-2;i:619;i:-1;i:620;i:-2;i:622;i:1;}s:61:"/home/bjartka/public_html/doctrine/tests/SequenceTestCase.php";a:7:{i:37;i:-1;i:40;i:-1;i:43;i:1;i:44;i:1;i:45;i:1;i:46;i:1;i:66;i:1;}s:68:"/home/bjartka/public_html/doctrine/lib/Doctrine/Export/Exception.php";a:3:{i:21;i:1;i:33;i:1;i:34;i:1;}s:62:"/home/bjartka/public_html/doctrine/tests/TokenizerTestCase.php";a:52:{i:37;i:1;i:39;i:1;i:43;i:1;i:44;i:1;i:46;i:1;i:48;i:1;i:49;i:1;i:50;i:1;i:52;i:1;i:53;i:1;i:54;i:1;i:56;i:1;i:57;i:1;i:58;i:1;i:60;i:1;i:61;i:1;i:62;i:1;i:64;i:1;i:65;i:1;i:66;i:1;i:68;i:1;i:69;i:1;i:70;i:1;i:72;i:1;i:73;i:1;i:74;i:1;i:76;i:1;i:77;i:1;i:78;i:1;i:80;i:1;i:81;i:1;i:82;i:1;i:84;i:1;i:85;i:1;i:86;i:1;i:88;i:1;i:89;i:1;i:90;i:1;i:92;i:1;i:93;i:1;i:94;i:1;i:96;i:1;i:97;i:1;i:98;i:1;i:100;i:1;i:101;i:1;i:102;i:1;i:103;i:1;i:107;i:1;i:108;i:1;i:110;i:1;i:111;i:1;}s:63:"/home/bjartka/public_html/doctrine/models/EventListenerTest.php";a:8:{i:4;i:1;i:5;i:1;i:6;i:1;i:9;i:1;i:11;i:-1;i:12;i:-2;i:14;i:-1;i:15;i:-2;}s:64:"/home/bjartka/public_html/doctrine/models/QueryTest_UserRank.php";a:3:{i:6;i:1;i:7;i:1;i:8;i:1;}s:81:"/home/bjartka/public_html/doctrine/tests/Query/MultipleAggregateValueTestCase.php";a:40:{i:37;i:1;i:40;i:1;i:41;i:1;i:43;i:1;i:44;i:1;i:45;i:1;i:47;i:1;i:48;i:1;i:49;i:1;i:50;i:1;i:54;i:1;i:55;i:1;i:56;i:1;i:57;i:1;i:58;i:1;i:59;i:1;i:61;i:1;i:64;i:1;i:65;i:1;i:66;i:1;i:67;i:1;i:68;i:-2;i:71;i:1;i:72;i:1;i:73;i:1;i:76;i:1;i:77;i:1;i:78;i:1;i:79;i:1;i:80;i:1;i:81;i:1;i:83;i:1;i:86;i:1;i:87;i:1;i:88;i:1;i:89;i:1;i:90;i:-2;i:93;i:1;i:94;i:1;i:95;i:1;}s:75:"/home/bjartka/public_html/doctrine/tests/Query/SelectExpressionTestCase.php";a:45:{i:37;i:1;i:40;i:1;i:41;i:1;i:42;i:1;i:45;i:1;i:46;i:1;i:47;i:1;i:50;i:1;i:51;i:1;i:52;i:1;i:53;i:-2;i:55;i:1;i:59;i:1;i:60;i:1;i:61;i:1;i:64;i:1;i:65;i:1;i:66;i:1;i:67;i:-2;i:69;i:1;i:73;i:1;i:74;i:1;i:75;i:1;i:78;i:1;i:79;i:1;i:80;i:1;i:81;i:-2;i:83;i:1;i:87;i:1;i:88;i:1;i:89;i:1;i:92;i:1;i:93;i:1;i:94;i:1;i:95;i:-2;i:97;i:1;i:101;i:1;i:102;i:1;i:103;i:1;i:104;i:1;i:107;i:1;i:108;i:1;i:109;i:1;i:110;i:-2;i:112;i:1;}s:67:"/home/bjartka/public_html/doctrine/tests/DoctrineTest/GroupTest.php";a:47:{i:10;i:-1;i:11;i:-1;i:12;i:-1;i:15;i:-1;i:16;i:-2;i:20;i:-1;i:21;i:-1;i:22;i:-1;i:23;i:-1;i:25;i:-1;i:28;i:1;i:29;i:1;i:30;i:-2;i:31;i:-1;i:32;i:-1;i:33;i:-1;i:35;i:-1;i:36;i:-1;i:37;i:-2;i:38;i:-1;i:39;i:-1;i:40;i:-2;i:43;i:1;i:44;i:1;i:45;i:1;i:46;i:-1;i:47;i:-2;i:49;i:1;i:50;i:1;i:51;i:1;i:52;i:1;i:54;i:1;i:55;i:1;i:56;i:1;i:58;i:1;i:59;i:1;i:60;i:1;i:61;i:1;i:62;i:1;i:63;i:1;i:64;i:1;i:66;i:1;i:67;i:1;i:72;i:1;i:73;i:-2;i:76;i:-1;i:77;i:-2;}s:65:"/home/bjartka/public_html/doctrine/lib/Doctrine/Export/Sqlite.php";a:180:{i:21;i:1;i:34;i:1;i:46;i:1;i:47;i:1;i:48;i:1;i:49;i:-2;i:50;i:-1;i:51;i:-1;i:52;i:-1;i:53;i:-2;i:54;i:-1;i:90;i:1;i:91;i:1;i:92;i:1;i:93;i:1;i:95;i:1;i:96;i:-2;i:106;i:1;i:108;i:1;i:109;i:1;i:111;i:1;i:112;i:1;i:113;i:1;i:115;i:1;i:116;i:1;i:117;i:1;i:118;i:1;i:119;i:1;i:120;i:1;i:121;i:1;i:122;i:1;i:123;i:1;i:124;i:1;i:126;i:1;i:127;i:1;i:128;i:1;i:129;i:-2;i:160;i:1;i:161;i:1;i:162;i:-2;i:164;i:1;i:165;i:1;i:166;i:-2;i:167;i:1;i:169;i:1;i:170;i:1;i:171;i:1;i:172;i:1;i:173;i:1;i:174;i:1;i:175;i:-2;i:176;i:1;i:178;i:1;i:179;i:1;i:180;i:1;i:181;i:1;i:182;i:1;i:184;i:1;i:185;i:1;i:187;i:1;i:188;i:-1;i:189;i:-1;i:191;i:1;i:192;i:-1;i:193;i:-1;i:195;i:1;i:197;i:1;i:199;i:1;i:200;i:1;i:201;i:1;i:202;i:1;i:203;i:1;i:204;i:1;i:245;i:-2;i:257;i:-1;i:258;i:-1;i:259;i:-1;i:260;i:-1;i:261;i:-1;i:262;i:-1;i:263;i:-1;i:264;i:-1;i:265;i:-1;i:266;i:-1;i:267;i:-1;i:268;i:-1;i:269;i:-1;i:270;i:-1;i:272;i:-1;i:273;i:-1;i:274;i:-1;i:275;i:-1;i:277;i:-1;i:278;i:-2;i:294;i:-1;i:295;i:-1;i:296;i:-1;i:298;i:-1;i:300;i:-1;i:301;i:-1;i:302;i:-2;i:305;i:-1;i:306;i:-1;i:307;i:-2;i:311;i:-2;i:312;i:-2;i:313;i:-2;i:316;i:-2;i:317;i:-2;i:326;i:-1;i:328;i:-1;i:329;i:-2;i:333;i:-1;i:334;i:-1;i:335;i:-2;i:336;i:-1;i:338;i:-1;i:339;i:-1;i:340;i:-1;i:341;i:-1;i:342;i:-1;i:343;i:-1;i:344;i:-1;i:345;i:-1;i:346;i:-1;i:348;i:-1;i:349;i:-1;i:350;i:-2;i:352;i:-1;i:353;i:-1;i:354;i:-1;i:355;i:-1;i:356;i:-1;i:358;i:-1;i:359;i:-1;i:360;i:-1;i:361;i:-1;i:362;i:-1;i:363;i:-1;i:364;i:-1;i:365;i:-1;i:367;i:-1;i:368;i:-1;i:369;i:-1;i:370;i:-1;i:371;i:-1;i:372;i:-1;i:374;i:-1;i:375;i:-1;i:376;i:-1;i:377;i:-1;i:378;i:-1;i:379;i:-1;i:380;i:-1;i:381;i:-1;i:382;i:-1;i:383;i:-1;i:385;i:-1;i:386;i:-1;i:387;i:-1;i:388;i:-1;i:389;i:-1;i:391;i:-1;i:392;i:-1;i:393;i:-1;i:394;i:-1;i:395;i:-1;i:396;i:-1;i:397;i:-1;i:398;i:-1;i:399;i:-1;i:400;i:-1;i:401;i:-1;i:403;i:-1;i:404;i:-1;i:405;i:-2;i:407;i:-1;i:409;i:-1;i:410;i:-2;i:411;i:1;}s:70:"/home/bjartka/public_html/doctrine/lib/Doctrine/Transaction/Sqlite.php";a:17:{i:21;i:1;i:33;i:1;i:50;i:1;i:51;i:1;i:52;i:1;i:53;i:1;i:54;i:1;i:55;i:1;i:56;i:1;i:57;i:1;i:58;i:1;i:59;i:1;i:60;i:1;i:62;i:1;i:64;i:1;i:65;i:-2;i:66;i:1;}s:69:"/home/bjartka/public_html/doctrine/lib/Doctrine/Adapter/Interface.php";a:2:{i:33;i:1;i:45;i:1;}s:70:"/home/bjartka/public_html/doctrine/lib/Doctrine/Transaction/Oracle.php";a:25:{i:21;i:1;i:33;i:1;i:44;i:1;i:46;i:1;i:47;i:-2;i:58;i:1;i:59;i:-2;i:69;i:1;i:71;i:1;i:72;i:-2;i:88;i:1;i:89;i:1;i:90;i:1;i:91;i:1;i:92;i:1;i:93;i:1;i:94;i:1;i:95;i:1;i:96;i:1;i:97;i:1;i:98;i:1;i:100;i:1;i:101;i:1;i:102;i:-2;i:103;i:1;}s:65:"/home/bjartka/public_html/doctrine/lib/Doctrine/Export/Oracle.php";a:157:{i:21;i:1;i:34;i:1;i:46;i:-1;i:47;i:-1;i:49;i:-1;i:50;i:-1;i:52;i:-1;i:53;i:-1;i:55;i:-1;i:56;i:-1;i:59;i:-1;i:60;i:-1;i:61;i:-1;i:62;i:-1;i:63;i:-1;i:65;i:-1;i:66;i:-2;i:77;i:-1;i:78;i:-1;i:79;i:-1;i:81;i:-1;i:83;i:-1;i:84;i:-2;i:96;i:1;i:97;i:1;i:98;i:1;i:100;i:1;i:101;i:1;i:102;i:1;i:104;i:1;i:106;i:1;i:107;i:-1;i:108;i:-1;i:110;i:-1;i:111;i:-1;i:113;i:1;i:115;i:1;i:116;i:1;i:117;i:1;i:118;i:1;i:119;i:1;i:121;i:1;i:127;i:1;i:128;i:1;i:129;i:1;i:133;i:1;i:136;i:1;i:140;i:1;i:141;i:1;i:142;i:-2;i:151;i:-1;i:152;i:-1;i:153;i:-1;i:154;i:-1;i:155;i:-1;i:156;i:-1;i:158;i:-1;i:159;i:-1;i:160;i:-1;i:163;i:-1;i:166;i:-1;i:168;i:-1;i:171;i:-1;i:172;i:-1;i:173;i:-1;i:183;i:-1;i:184;i:-2;i:196;i:-1;i:197;i:-1;i:198;i:-1;i:199;i:-1;i:200;i:-1;i:201;i:-1;i:202;i:-1;i:203;i:-1;i:205;i:-1;i:206;i:-1;i:207;i:-1;i:208;i:-1;i:210;i:-1;i:211;i:-2;i:246;i:1;i:248;i:1;i:249;i:1;i:250;i:1;i:252;i:1;i:253;i:1;i:288;i:1;i:290;i:1;i:291;i:1;i:292;i:1;i:293;i:1;i:294;i:1;i:295;i:1;i:297;i:1;i:298;i:-2;i:308;i:-1;i:309;i:-1;i:311;i:-1;i:312;i:-2;i:404;i:-1;i:406;i:-1;i:407;i:-1;i:408;i:-1;i:409;i:-1;i:410;i:-1;i:411;i:-1;i:412;i:-1;i:413;i:-1;i:414;i:-1;i:415;i:-1;i:417;i:-1;i:418;i:-1;i:419;i:-2;i:421;i:-1;i:423;i:-1;i:424;i:-1;i:425;i:-1;i:426;i:-1;i:427;i:-1;i:428;i:-1;i:429;i:-1;i:431;i:-1;i:432;i:-1;i:433;i:-1;i:434;i:-1;i:435;i:-1;i:436;i:-1;i:437;i:-1;i:439;i:-1;i:440;i:-1;i:441;i:-1;i:442;i:-1;i:444;i:-1;i:445;i:-1;i:446;i:-1;i:448;i:-1;i:449;i:-1;i:450;i:-1;i:451;i:-1;i:452;i:-1;i:453;i:-1;i:454;i:-1;i:456;i:-1;i:457;i:-1;i:458;i:-1;i:459;i:-1;i:460;i:-1;i:476;i:1;i:477;i:1;i:478;i:1;i:479;i:1;i:480;i:-2;i:490;i:1;i:491;i:1;i:492;i:-2;i:493;i:1;}s:56:"/home/bjartka/public_html/doctrine/models/MysqlGroup.php";a:3:{i:6;i:1;i:8;i:1;i:9;i:1;}s:58:"/home/bjartka/public_html/doctrine/lib/Doctrine/Import.php";a:57:{i:21;i:1;i:37;i:1;i:47;i:1;i:48;i:-1;i:49;i:-2;i:51;i:1;i:52;i:-2;i:60;i:1;i:61;i:-1;i:62;i:-2;i:64;i:1;i:65;i:-2;i:74;i:-1;i:75;i:-2;i:84;i:1;i:85;i:-1;i:86;i:-2;i:88;i:1;i:89;i:-2;i:98;i:-1;i:99;i:-2;i:108;i:-1;i:109;i:-2;i:118;i:-1;i:119;i:-2;i:128;i:-1;i:129;i:-2;i:138;i:-1;i:139;i:-2;i:148;i:-1;i:149;i:-2;i:157;i:1;i:158;i:-1;i:159;i:-2;i:161;i:1;i:162;i:-2;i:171;i:1;i:172;i:-1;i:173;i:-2;i:175;i:1;i:176;i:-2;i:188;i:-1;i:190;i:-1;i:191;i:-1;i:192;i:-1;i:194;i:-1;i:195;i:-1;i:196;i:-1;i:197;i:-1;i:198;i:-1;i:199;i:-1;i:201;i:-1;i:202;i:-1;i:203;i:-1;i:205;i:-1;i:206;i:-2;i:207;i:1;}s:58:"/home/bjartka/public_html/doctrine/tests/TableTestCase.php";a:123:{i:38;i:1;i:39;i:1;i:40;i:1;i:44;i:1;i:46;i:1;i:48;i:1;i:49;i:1;i:50;i:1;i:51;i:1;i:52;i:1;i:53;i:1;i:55;i:1;i:56;i:1;i:57;i:1;i:58;i:1;i:59;i:1;i:61;i:1;i:63;i:1;i:64;i:1;i:65;i:1;i:66;i:1;i:67;i:1;i:69;i:1;i:71;i:1;i:72;i:1;i:73;i:1;i:74;i:1;i:75;i:1;i:77;i:1;i:79;i:1;i:81;i:1;i:82;i:1;i:83;i:1;i:84;i:1;i:85;i:1;i:87;i:1;i:88;i:1;i:92;i:1;i:93;i:1;i:94;i:1;i:95;i:1;i:96;i:1;i:97;i:1;i:99;i:1;i:100;i:1;i:101;i:1;i:102;i:1;i:103;i:1;i:104;i:1;i:107;i:1;i:108;i:1;i:109;i:1;i:110;i:1;i:111;i:1;i:112;i:1;i:115;i:1;i:118;i:1;i:119;i:1;i:123;i:1;i:124;i:1;i:128;i:1;i:129;i:1;i:133;i:1;i:134;i:1;i:138;i:1;i:139;i:1;i:140;i:1;i:141;i:1;i:145;i:1;i:146;i:1;i:147;i:1;i:148;i:1;i:152;i:1;i:153;i:1;i:156;i:1;i:157;i:1;i:158;i:1;i:159;i:-2;i:163;i:1;i:164;i:1;i:165;i:1;i:166;i:1;i:167;i:1;i:168;i:1;i:169;i:1;i:170;i:-2;i:174;i:1;i:175;i:1;i:176;i:1;i:177;i:-2;i:181;i:1;i:182;i:1;i:183;i:1;i:184;i:-2;i:188;i:1;i:189;i:1;i:190;i:1;i:191;i:-2;i:193;i:1;i:197;i:1;i:198;i:1;i:199;i:1;i:201;i:1;i:202;i:1;i:203;i:1;i:204;i:1;i:205;i:1;i:206;i:1;i:210;i:1;i:211;i:1;i:212;i:1;i:213;i:1;i:217;i:1;i:218;i:1;i:221;i:1;i:222;i:1;i:223;i:-2;i:225;i:1;i:229;i:1;i:230;i:1;i:232;i:1;i:236;i:1;i:237;i:1;}s:54:"/home/bjartka/public_html/doctrine/models/EnumTest.php";a:6:{i:5;i:1;i:6;i:1;i:7;i:1;i:9;i:1;i:10;i:1;i:11;i:1;}s:62:"/home/bjartka/public_html/doctrine/tests/ValidatorTestCase.php";a:219:{i:40;i:1;i:41;i:1;i:42;i:1;i:43;i:1;i:44;i:1;i:45;i:1;i:46;i:1;i:47;i:1;i:51;i:1;i:52;i:1;i:53;i:1;i:54;i:1;i:55;i:1;i:56;i:1;i:58;i:1;i:59;i:1;i:60;i:1;i:61;i:1;i:62;i:1;i:63;i:1;i:65;i:1;i:66;i:1;i:67;i:1;i:68;i:1;i:69;i:1;i:70;i:1;i:72;i:1;i:73;i:1;i:74;i:1;i:75;i:1;i:76;i:1;i:77;i:1;i:79;i:1;i:80;i:1;i:81;i:1;i:82;i:1;i:83;i:1;i:84;i:1;i:86;i:1;i:87;i:1;i:88;i:1;i:89;i:1;i:90;i:1;i:91;i:1;i:93;i:1;i:94;i:1;i:95;i:1;i:96;i:1;i:97;i:1;i:98;i:1;i:100;i:1;i:101;i:1;i:102;i:1;i:103;i:1;i:104;i:1;i:105;i:1;i:107;i:1;i:108;i:1;i:109;i:1;i:110;i:1;i:111;i:1;i:112;i:1;i:113;i:1;i:118;i:1;i:119;i:1;i:120;i:1;i:121;i:1;i:123;i:1;i:124;i:1;i:126;i:1;i:128;i:1;i:130;i:1;i:131;i:1;i:132;i:1;i:133;i:1;i:134;i:1;i:137;i:1;i:138;i:1;i:142;i:1;i:144;i:1;i:145;i:1;i:146;i:1;i:147;i:1;i:148;i:1;i:149;i:1;i:150;i:1;i:152;i:1;i:154;i:1;i:155;i:1;i:158;i:1;i:160;i:1;i:161;i:1;i:162;i:1;i:163;i:1;i:165;i:1;i:166;i:1;i:167;i:1;i:168;i:1;i:170;i:1;i:171;i:1;i:173;i:1;i:174;i:1;i:182;i:1;i:184;i:1;i:185;i:1;i:186;i:1;i:187;i:1;i:189;i:1;i:190;i:1;i:191;i:1;i:192;i:1;i:193;i:1;i:200;i:1;i:201;i:1;i:203;i:1;i:204;i:1;i:205;i:1;i:206;i:1;i:207;i:1;i:208;i:1;i:209;i:1;i:210;i:1;i:214;i:1;i:215;i:1;i:216;i:1;i:217;i:1;i:218;i:-1;i:219;i:1;i:220;i:1;i:221;i:1;i:223;i:1;i:225;i:1;i:226;i:1;i:227;i:1;i:228;i:1;i:231;i:1;i:232;i:1;i:240;i:1;i:243;i:1;i:245;i:1;i:246;i:1;i:247;i:1;i:248;i:1;i:249;i:1;i:250;i:1;i:251;i:1;i:253;i:1;i:255;i:1;i:256;i:1;i:257;i:1;i:261;i:1;i:263;i:1;i:264;i:1;i:265;i:1;i:266;i:1;i:267;i:-1;i:268;i:1;i:269;i:1;i:270;i:1;i:272;i:1;i:274;i:1;i:275;i:1;i:278;i:1;i:279;i:1;i:287;i:1;i:289;i:1;i:290;i:1;i:293;i:1;i:294;i:-1;i:295;i:1;i:296;i:1;i:297;i:1;i:300;i:1;i:301;i:1;i:332;i:1;i:334;i:1;i:335;i:1;i:336;i:1;i:338;i:1;i:339;i:1;i:341;i:1;i:343;i:1;i:344;i:-2;i:347;i:1;i:349;i:1;i:350;i:1;i:354;i:1;i:356;i:1;i:357;i:1;i:358;i:1;i:360;i:1;i:361;i:1;i:363;i:1;i:364;i:-1;i:365;i:1;i:366;i:1;i:368;i:1;i:370;i:1;i:371;i:1;i:375;i:1;i:377;i:1;i:378;i:1;i:379;i:1;i:380;i:1;i:381;i:-1;i:382;i:1;i:383;i:1;i:384;i:1;i:385;i:1;i:387;i:1;i:388;i:1;i:389;i:1;i:390;i:1;i:391;i:1;i:392;i:1;i:393;i:1;i:394;i:1;i:397;i:1;i:398;i:1;}s:67:"/home/bjartka/public_html/doctrine/lib/Doctrine/Validator/Email.php";a:27:{i:34;i:1;i:44;i:1;i:45;i:1;i:46;i:-2;i:47;i:1;i:48;i:1;i:49;i:1;i:50;i:1;i:51;i:1;i:52;i:-2;i:53;i:-1;i:54;i:-1;i:56;i:1;i:57;i:1;i:58;i:1;i:59;i:1;i:60;i:1;i:61;i:1;i:62;i:1;i:63;i:1;i:64;i:1;i:65;i:1;i:73;i:1;i:74;i:1;i:76;i:1;i:77;i:-2;i:78;i:1;}s:50:"/home/bjartka/public_html/doctrine/models/Rec1.php";a:4:{i:6;i:1;i:7;i:1;i:11;i:1;i:12;i:1;}s:77:"/home/bjartka/public_html/doctrine/lib/Doctrine/Search/Analyzer/Interface.php";a:2:{i:33;i:1;i:36;i:1;}}s:8:"revision";s:4:"2832";s:6:"totals";a:5:{s:5:"lines";i:16539;s:10:"notcovered";i:7482;s:7:"covered";i:7504;s:5:"maybe";i:1553;s:10:"percentage";d:54.75999999999999801048033987171947956085205078125;}s:4:"data";a:318:{s:8:"Doctrine";a:6:{s:7:"covered";i:38;s:5:"maybe";i:31;s:10:"notcovered";i:121;s:5:"total";i:190;s:10:"percentage";d:36.32000000000000028421709430404007434844970703125;s:4:"type";s:7:"covered";}s:7:"package";a:6:{s:7:"covered";i:0;s:5:"maybe";i:0;s:10:"notcovered";i:5;s:5:"total";i:5;s:10:"percentage";i:0;s:4:"type";s:10:"notcovered";}s:13:"Doctrine_Hook";a:6:{s:7:"covered";i:47;s:5:"maybe";i:7;s:10:"notcovered";i:15;s:5:"total";i:69;s:10:"percentage";d:78.2600000000000051159076974727213382720947265625;s:4:"type";s:7:"covered";}s:24:"Doctrine_Resource_Client";a:6:{s:7:"covered";i:0;s:5:"maybe";i:0;s:10:"notcovered";i:119;s:5:"total";i:119;s:10:"percentage";i:0;s:4:"type";s:10:"notcovered";}s:24:"Doctrine_Resource_Params";a:6:{s:7:"covered";i:0;s:5:"maybe";i:0;s:10:"notcovered";i:22;s:5:"total";i:22;s:10:"percentage";i:0;s:4:"type";s:10:"notcovered";}s:25:"Doctrine_Resource_Request";a:6:{s:7:"covered";i:0;s:5:"maybe";i:0;s:10:"notcovered";i:39;s:5:"total";i:39;s:10:"percentage";i:0;s:4:"type";s:10:"notcovered";}s:24:"Doctrine_Resource_Config";a:6:{s:7:"covered";i:0;s:5:"maybe";i:0;s:10:"notcovered";i:0;s:5:"total";i:0;s:10:"percentage";i:100;s:4:"type";s:10:"notcovered";}s:23:"Doctrine_Resource_Query";a:6:{s:7:"covered";i:0;s:5:"maybe";i:0;s:10:"notcovered";i:126;s:5:"total";i:126;s:10:"percentage";i:0;s:4:"type";s:10:"notcovered";}s:24:"Doctrine_Resource_Server";a:6:{s:7:"covered";i:0;s:5:"maybe";i:0;s:10:"notcovered";i:167;s:5:"total";i:167;s:10:"percentage";i:0;s:4:"type";s:10:"notcovered";}s:24:"Doctrine_Resource_Access";a:6:{s:7:"covered";i:0;s:5:"maybe";i:0;s:10:"notcovered";i:0;s:5:"total";i:0;s:10:"percentage";i:100;s:4:"type";s:10:"notcovered";}s:27:"Doctrine_Resource_Exception";a:6:{s:7:"covered";i:0;s:5:"maybe";i:0;s:10:"notcovered";i:0;s:5:"total";i:0;s:10:"percentage";i:100;s:4:"type";s:10:"notcovered";}s:24:"Doctrine_Resource_Record";a:6:{s:7:"covered";i:0;s:5:"maybe";i:0;s:10:"notcovered";i:203;s:5:"total";i:203;s:10:"percentage";i:0;s:4:"type";s:10:"notcovered";}s:28:"Doctrine_Resource_Collection";a:6:{s:7:"covered";i:0;s:5:"maybe";i:0;s:10:"notcovered";i:66;s:5:"total";i:66;s:10:"percentage";i:0;s:4:"type";s:10:"notcovered";}s:23:"Doctrine_Resource_Table";a:6:{s:7:"covered";i:0;s:5:"maybe";i:0;s:10:"notcovered";i:79;s:5:"total";i:79;s:10:"percentage";i:0;s:4:"type";s:10:"notcovered";}s:20:"Doctrine_Hook_Parser";a:6:{s:7:"covered";i:3;s:5:"maybe";i:2;s:10:"notcovered";i:0;s:5:"total";i:5;s:10:"percentage";d:100;s:4:"type";s:7:"covered";}s:21:"Doctrine_Hook_Integer";a:6:{s:7:"covered";i:15;s:5:"maybe";i:1;s:10:"notcovered";i:0;s:5:"total";i:16;s:10:"percentage";d:100;s:4:"type";s:7:"covered";}s:22:"Doctrine_Hook_WordLike";a:6:{s:7:"covered";i:14;s:5:"maybe";i:1;s:10:"notcovered";i:0;s:5:"total";i:15;s:10:"percentage";d:100;s:4:"type";s:7:"covered";}s:19:"Doctrine_Hook_Equal";a:6:{s:7:"covered";i:5;s:5:"maybe";i:0;s:10:"notcovered";i:0;s:5:"total";i:5;s:10:"percentage";d:100;s:4:"type";s:7:"covered";}s:28:"Doctrine_Hook_Parser_Complex";a:6:{s:7:"covered";i:17;s:5:"maybe";i:1;s:10:"notcovered";i:6;s:5:"total";i:24;s:10:"percentage";d:75;s:4:"type";s:7:"covered";}s:23:"Doctrine_I18n_Exception";a:6:{s:7:"covered";i:0;s:5:"maybe";i:0;s:10:"notcovered";i:0;s:5:"total";i:0;s:10:"percentage";i:100;s:4:"type";s:10:"notcovered";}s:13:"Doctrine_I18n";a:6:{s:7:"covered";i:43;s:5:"maybe";i:3;s:10:"notcovered";i:2;s:5:"total";i:48;s:10:"percentage";d:95.8299999999999982946974341757595539093017578125;s:4:"type";s:7:"covered";}s:15:"Doctrine_Schema";a:6:{s:7:"covered";i:1;s:5:"maybe";i:1;s:10:"notcovered";i:5;s:5:"total";i:7;s:10:"percentage";d:28.57000000000000028421709430404007434844970703125;s:4:"type";s:7:"covered";}s:15:"Doctrine_Column";a:6:{s:7:"covered";i:0;s:5:"maybe";i:0;s:10:"notcovered";i:44;s:5:"total";i:44;s:10:"percentage";i:0;s:4:"type";s:10:"notcovered";}s:17:"Doctrine_Compiler";a:6:{s:7:"covered";i:0;s:5:"maybe";i:0;s:10:"notcovered";i:58;s:5:"total";i:58;s:10:"percentage";i:0;s:4:"type";s:10:"notcovered";}s:11:"Doctrine_Db";a:6:{s:7:"covered";i:0;s:5:"maybe";i:0;s:10:"notcovered";i:3;s:5:"total";i:3;s:10:"percentage";i:0;s:4:"type";s:10:"notcovered";}s:16:"Doctrine_Hydrate";a:6:{s:7:"covered";i:347;s:5:"maybe";i:64;s:10:"notcovered";i:44;s:5:"total";i:455;s:10:"percentage";d:90.3299999999999982946974341757595539093017578125;s:4:"type";s:7:"covered";}s:13:"Doctrine_Null";a:6:{s:7:"covered";i:3;s:5:"maybe";i:2;s:10:"notcovered";i:1;s:5:"total";i:6;s:10:"percentage";d:83.3299999999999982946974341757595539093017578125;s:4:"type";s:7:"covered";}s:22:"Doctrine_Hydrate_Array";a:6:{s:7:"covered";i:21;s:5:"maybe";i:7;s:10:"notcovered";i:1;s:5:"total";i:29;s:10:"percentage";d:96.5499999999999971578290569595992565155029296875;s:4:"type";s:7:"covered";}s:26:"Doctrine_Hydrate_Exception";a:6:{s:7:"covered";i:0;s:5:"maybe";i:0;s:10:"notcovered";i:0;s:5:"total";i:0;s:10:"percentage";i:100;s:4:"type";s:10:"notcovered";}s:23:"Doctrine_Hydrate_Record";a:6:{s:7:"covered";i:29;s:5:"maybe";i:9;s:10:"notcovered";i:11;s:5:"total";i:49;s:10:"percentage";d:77.5499999999999971578290569595992565155029296875;s:4:"type";s:7:"covered";}s:15:"Doctrine_Plugin";a:6:{s:7:"covered";i:29;s:5:"maybe";i:10;s:10:"notcovered";i:13;s:5:"total";i:52;s:10:"percentage";d:75;s:4:"type";s:7:"covered";}s:14:"Doctrine_Cache";a:6:{s:7:"covered";i:0;s:5:"maybe";i:0;s:10:"notcovered";i:206;s:5:"total";i:206;s:10:"percentage";i:0;s:4:"type";s:10:"notcovered";}s:17:"Doctrine_DataType";a:6:{s:7:"covered";i:0;s:5:"maybe";i:0;s:10:"notcovered";i:9;s:5:"total";i:9;s:10:"percentage";i:0;s:4:"type";s:10:"notcovered";}s:21:"Doctrine_Query_Having";a:6:{s:7:"covered";i:34;s:5:"maybe";i:4;s:10:"notcovered";i:1;s:5:"total";i:39;s:10:"percentage";d:97.43999999999999772626324556767940521240234375;s:4:"type";s:7:"covered";}s:20:"Doctrine_Query_Check";a:6:{s:7:"covered";i:39;s:5:"maybe";i:6;s:10:"notcovered";i:14;s:5:"total";i:59;s:10:"percentage";d:76.2699999999999960209606797434389591217041015625;s:4:"type";s:7:"covered";}s:21:"Doctrine_Query_Filter";a:6:{s:7:"covered";i:0;s:5:"maybe";i:0;s:10:"notcovered";i:6;s:5:"total";i:6;s:10:"percentage";i:0;s:4:"type";s:10:"notcovered";}s:33:"Doctrine_Query_Registry_Exception";a:6:{s:7:"covered";i:0;s:5:"maybe";i:0;s:10:"notcovered";i:0;s:5:"total";i:0;s:10:"percentage";i:100;s:4:"type";s:10:"notcovered";}s:21:"Doctrine_Query_Parser";a:6:{s:7:"covered";i:0;s:5:"maybe";i:0;s:10:"notcovered";i:0;s:5:"total";i:0;s:10:"percentage";i:100;s:4:"type";s:10:"notcovered";}s:21:"Doctrine_Query_Offset";a:6:{s:7:"covered";i:2;s:5:"maybe";i:1;s:10:"notcovered";i:0;s:5:"total";i:3;s:10:"percentage";d:100;s:4:"type";s:7:"covered";}s:24:"Doctrine_Query_Exception";a:6:{s:7:"covered";i:2;s:5:"maybe";i:0;s:10:"notcovered";i:0;s:5:"total";i:2;s:10:"percentage";d:100;s:4:"type";s:7:"covered";}s:23:"Doctrine_Query_Abstract";a:6:{s:7:"covered";i:45;s:5:"maybe";i:23;s:10:"notcovered";i:21;s:5:"total";i:89;s:10:"percentage";d:76.400000000000005684341886080801486968994140625;s:4:"type";s:7:"covered";}s:22:"Doctrine_Query_Orderby";a:6:{s:7:"covered";i:23;s:5:"maybe";i:1;s:10:"notcovered";i:0;s:5:"total";i:24;s:10:"percentage";d:100;s:4:"type";s:7:"covered";}s:24:"Doctrine_Query_Condition";a:6:{s:7:"covered";i:36;s:5:"maybe";i:3;s:10:"notcovered";i:0;s:5:"total";i:39;s:10:"percentage";d:100;s:4:"type";s:7:"covered";}s:20:"Doctrine_Query_Where";a:6:{s:7:"covered";i:81;s:5:"maybe";i:5;s:10:"notcovered";i:4;s:5:"total";i:90;s:10:"percentage";d:95.56000000000000227373675443232059478759765625;s:4:"type";s:7:"covered";}s:21:"Doctrine_Query_Select";a:6:{s:7:"covered";i:4;s:5:"maybe";i:0;s:10:"notcovered";i:0;s:5:"total";i:4;s:10:"percentage";d:100;s:4:"type";s:7:"covered";}s:23:"Doctrine_Query_Registry";a:6:{s:7:"covered";i:17;s:5:"maybe";i:3;s:10:"notcovered";i:2;s:5:"total";i:22;s:10:"percentage";d:90.909999999999996589394868351519107818603515625;s:4:"type";s:7:"covered";}s:28:"Doctrine_Query_JoinCondition";a:6:{s:7:"covered";i:28;s:5:"maybe";i:1;s:10:"notcovered";i:22;s:5:"total";i:51;s:10:"percentage";d:56.8599999999999994315658113919198513031005859375;s:4:"type";s:7:"covered";}s:19:"Doctrine_Query_From";a:6:{s:7:"covered";i:32;s:5:"maybe";i:2;s:10:"notcovered";i:2;s:5:"total";i:36;s:10:"percentage";d:94.43999999999999772626324556767940521240234375;s:4:"type";s:7:"covered";}s:19:"Doctrine_Query_Part";a:6:{s:7:"covered";i:3;s:5:"maybe";i:1;s:10:"notcovered";i:1;s:5:"total";i:5;s:10:"percentage";d:80;s:4:"type";s:7:"covered";}s:27:"Doctrine_Query_Filter_Chain";a:6:{s:7:"covered";i:0;s:5:"maybe";i:0;s:10:"notcovered";i:22;s:5:"total";i:22;s:10:"percentage";i:0;s:4:"type";s:10:"notcovered";}s:22:"Doctrine_Query_Groupby";a:6:{s:7:"covered";i:14;s:5:"maybe";i:1;s:10:"notcovered";i:2;s:5:"total";i:17;s:10:"percentage";d:88.2399999999999948840923025272786617279052734375;s:4:"type";s:7:"covered";}s:18:"Doctrine_Query_Set";a:6:{s:7:"covered";i:17;s:5:"maybe";i:1;s:10:"notcovered";i:0;s:5:"total";i:18;s:10:"percentage";d:100;s:4:"type";s:7:"covered";}s:20:"Doctrine_Query_Limit";a:6:{s:7:"covered";i:2;s:5:"maybe";i:1;s:10:"notcovered";i:0;s:5:"total";i:3;s:10:"percentage";d:100;s:4:"type";s:7:"covered";}s:19:"Doctrine_Expression";a:6:{s:7:"covered";i:25;s:5:"maybe";i:7;s:10:"notcovered";i:4;s:5:"total";i:36;s:10:"percentage";d:88.8900000000000005684341886080801486968994140625;s:4:"type";s:7:"covered";}s:18:"Doctrine_Tokenizer";a:6:{s:7:"covered";i:123;s:5:"maybe";i:7;s:10:"notcovered";i:5;s:5:"total";i:135;s:10:"percentage";d:96.2999999999999971578290569595992565155029296875;s:4:"type";s:7:"covered";}s:15:"Doctrine_Config";a:6:{s:7:"covered";i:0;s:5:"maybe";i:0;s:10:"notcovered";i:17;s:5:"total";i:17;s:10:"percentage";i:0;s:4:"type";s:10:"notcovered";}s:13:"Doctrine_Node";a:6:{s:7:"covered";i:12;s:5:"maybe";i:5;s:10:"notcovered";i:25;s:5:"total";i:42;s:10:"percentage";d:40.47999999999999687361196265555918216705322265625;s:4:"type";s:7:"covered";}s:26:"Doctrine_DataDict_Firebird";a:6:{s:7:"covered";i:95;s:5:"maybe";i:6;s:10:"notcovered";i:20;s:5:"total";i:121;s:10:"percentage";d:83.469999999999998863131622783839702606201171875;s:4:"type";s:7:"covered";}s:27:"Doctrine_DataDict_Exception";a:6:{s:7:"covered";i:2;s:5:"maybe";i:0;s:10:"notcovered";i:0;s:5:"total";i:2;s:10:"percentage";d:100;s:4:"type";s:7:"covered";}s:24:"Doctrine_DataDict_Oracle";a:6:{s:7:"covered";i:104;s:5:"maybe";i:4;s:10:"notcovered";i:15;s:5:"total";i:123;s:10:"percentage";d:87.7999999999999971578290569595992565155029296875;s:4:"type";s:7:"covered";}s:23:"Doctrine_DataDict_Mysql";a:6:{s:7:"covered";i:169;s:5:"maybe";i:11;s:10:"notcovered";i:70;s:5:"total";i:250;s:10:"percentage";d:72;s:4:"type";s:7:"covered";}s:23:"Doctrine_DataDict_Pgsql";a:6:{s:7:"covered";i:168;s:5:"maybe";i:9;s:10:"notcovered";i:17;s:5:"total";i:194;s:10:"percentage";d:91.2399999999999948840923025272786617279052734375;s:4:"type";s:7:"covered";}s:26:"Doctrine_DataDict_Informix";a:6:{s:7:"covered";i:0;s:5:"maybe";i:0;s:10:"notcovered";i:52;s:5:"total";i:52;s:10:"percentage";i:0;s:4:"type";s:10:"notcovered";}s:23:"Doctrine_DataDict_Mssql";a:6:{s:7:"covered";i:90;s:5:"maybe";i:5;s:10:"notcovered";i:17;s:5:"total";i:112;s:10:"percentage";d:84.81999999999999317878973670303821563720703125;s:4:"type";s:7:"covered";}s:24:"Doctrine_DataDict_Sqlite";a:6:{s:7:"covered";i:137;s:5:"maybe";i:6;s:10:"notcovered";i:45;s:5:"total";i:188;s:10:"percentage";d:76.06000000000000227373675443232059478759765625;s:4:"type";s:7:"covered";}s:26:"Doctrine_Cli_Task_DumpData";a:6:{s:7:"covered";i:0;s:5:"maybe";i:0;s:10:"notcovered";i:17;s:5:"total";i:17;s:10:"percentage";i:0;s:4:"type";s:10:"notcovered";}s:40:"Doctrine_Cli_Task_GenerateModelsFromYaml";a:6:{s:7:"covered";i:0;s:5:"maybe";i:0;s:10:"notcovered";i:3;s:5:"total";i:3;s:10:"percentage";i:0;s:4:"type";s:10:"notcovered";}s:25:"Doctrine_Cli_Task_Migrate";a:6:{s:7:"covered";i:0;s:5:"maybe";i:0;s:10:"notcovered";i:3;s:5:"total";i:3;s:10:"percentage";i:0;s:4:"type";s:10:"notcovered";}s:31:"Doctrine_Cli_Task_LoadDummyData";a:6:{s:7:"covered";i:0;s:5:"maybe";i:0;s:10:"notcovered";i:4;s:5:"total";i:4;s:10:"percentage";i:0;s:4:"type";s:10:"notcovered";}s:38:"Doctrine_Cli_Task_GenerateModelsFromDb";a:6:{s:7:"covered";i:0;s:5:"maybe";i:0;s:10:"notcovered";i:3;s:5:"total";i:3;s:10:"percentage";i:0;s:4:"type";s:10:"notcovered";}s:29:"Doctrine_Cli_Task_GenerateSql";a:6:{s:7:"covered";i:0;s:5:"maybe";i:0;s:10:"notcovered";i:5;s:5:"total";i:5;s:10:"percentage";i:0;s:4:"type";s:10:"notcovered";}s:35:"Doctrine_Cli_Task_GenerateMigration";a:6:{s:7:"covered";i:0;s:5:"maybe";i:0;s:10:"notcovered";i:3;s:5:"total";i:3;s:10:"percentage";i:0;s:4:"type";s:10:"notcovered";}s:36:"Doctrine_Cli_Task_GenerateYamlFromDb";a:6:{s:7:"covered";i:0;s:5:"maybe";i:0;s:10:"notcovered";i:3;s:5:"total";i:3;s:10:"percentage";i:0;s:4:"type";s:10:"notcovered";}s:26:"Doctrine_Cli_Task_LoadData";a:6:{s:7:"covered";i:0;s:5:"maybe";i:0;s:10:"notcovered";i:4;s:5:"total";i:4;s:10:"percentage";i:0;s:4:"type";s:10:"notcovered";}s:26:"Doctrine_Cli_Task_CreateDb";a:6:{s:7:"covered";i:0;s:5:"maybe";i:0;s:10:"notcovered";i:3;s:5:"total";i:3;s:10:"percentage";i:0;s:4:"type";s:10:"notcovered";}s:40:"Doctrine_Cli_Task_GenerateYamlFromModels";a:6:{s:7:"covered";i:0;s:5:"maybe";i:0;s:10:"notcovered";i:3;s:5:"total";i:3;s:10:"percentage";i:0;s:4:"type";s:10:"notcovered";}s:30:"Doctrine_Cli_Task_CreateTables";a:6:{s:7:"covered";i:0;s:5:"maybe";i:0;s:10:"notcovered";i:3;s:5:"total";i:3;s:10:"percentage";i:0;s:4:"type";s:10:"notcovered";}s:24:"Doctrine_Cli_Task_DropDb";a:6:{s:7:"covered";i:0;s:5:"maybe";i:0;s:10:"notcovered";i:3;s:5:"total";i:3;s:10:"percentage";i:0;s:4:"type";s:10:"notcovered";}s:17:"Doctrine_Cli_Task";a:6:{s:7:"covered";i:0;s:5:"maybe";i:0;s:10:"notcovered";i:50;s:5:"total";i:50;s:10:"percentage";i:0;s:4:"type";s:10:"notcovered";}s:22:"Doctrine_Cli_Exception";a:6:{s:7:"covered";i:0;s:5:"maybe";i:0;s:10:"notcovered";i:0;s:5:"total";i:0;s:10:"percentage";i:100;s:4:"type";s:10:"notcovered";}s:13:"Doctrine_Tree";a:6:{s:7:"covered";i:13;s:5:"maybe";i:5;s:10:"notcovered";i:10;s:5:"total";i:28;s:10:"percentage";d:64.2900000000000062527760746888816356658935546875;s:4:"type";s:7:"covered";}s:14:"Doctrine_Query";a:6:{s:7:"covered";i:661;s:5:"maybe";i:61;s:10:"notcovered";i:131;s:5:"total";i:853;s:10:"percentage";d:84.6400000000000005684341886080801486968994140625;s:4:"type";s:7:"covered";}s:20:"Doctrine_Transaction";a:6:{s:7:"covered";i:114;s:5:"maybe";i:22;s:10:"notcovered";i:1;s:5:"total";i:137;s:10:"percentage";d:99.2699999999999960209606797434389591217041015625;s:4:"type";s:7:"covered";}s:15:"Doctrine_Search";a:6:{s:7:"covered";i:87;s:5:"maybe";i:4;s:10:"notcovered";i:5;s:5:"total";i:96;s:10:"percentage";d:94.7900000000000062527760746888816356658935546875;s:4:"type";s:7:"covered";}s:14:"Doctrine_Event";a:6:{s:7:"covered";i:26;s:5:"maybe";i:13;s:10:"notcovered";i:47;s:5:"total";i:86;s:10:"percentage";d:45.35000000000000142108547152020037174224853515625;s:4:"type";s:7:"covered";}s:17:"Doctrine_Relation";a:6:{s:7:"covered";i:31;s:5:"maybe";i:18;s:10:"notcovered";i:22;s:5:"total";i:71;s:10:"percentage";d:69.0100000000000051159076974727213382720947265625;s:4:"type";s:7:"covered";}s:22:"Doctrine_EventListener";a:6:{s:7:"covered";i:29;s:5:"maybe";i:0;s:10:"notcovered";i:3;s:5:"total";i:32;s:10:"percentage";d:90.6299999999999954525264911353588104248046875;s:4:"type";s:7:"covered";}s:24:"Doctrine_Record_Listener";a:6:{s:7:"covered";i:9;s:5:"maybe";i:0;s:10:"notcovered";i:4;s:5:"total";i:13;s:10:"percentage";d:69.2300000000000039790393202565610408782958984375;s:4:"type";s:7:"covered";}s:30:"Doctrine_Record_Listener_Chain";a:6:{s:7:"covered";i:48;s:5:"maybe";i:3;s:10:"notcovered";i:23;s:5:"total";i:74;s:10:"percentage";d:68.9200000000000017053025658242404460906982421875;s:4:"type";s:7:"covered";}s:22:"Doctrine_Record_Filter";a:6:{s:7:"covered";i:3;s:5:"maybe";i:1;s:10:"notcovered";i:1;s:5:"total";i:5;s:10:"percentage";d:80;s:4:"type";s:7:"covered";}s:25:"Doctrine_Record_Exception";a:6:{s:7:"covered";i:2;s:5:"maybe";i:0;s:10:"notcovered";i:0;s:5:"total";i:2;s:10:"percentage";d:100;s:4:"type";s:7:"covered";}s:24:"Doctrine_Record_Abstract";a:6:{s:7:"covered";i:49;s:5:"maybe";i:15;s:10:"notcovered";i:36;s:5:"total";i:100;s:10:"percentage";d:64;s:4:"type";s:7:"covered";}s:31:"Doctrine_Record_Filter_Standard";a:6:{s:7:"covered";i:3;s:5:"maybe";i:2;s:10:"notcovered";i:0;s:5:"total";i:5;s:10:"percentage";d:100;s:4:"type";s:7:"covered";}s:31:"Doctrine_Record_Filter_Compound";a:6:{s:7:"covered";i:17;s:5:"maybe";i:4;s:10:"notcovered";i:14;s:5:"total";i:35;s:10:"percentage";d:60;s:4:"type";s:7:"covered";}s:24:"Doctrine_Record_Iterator";a:6:{s:7:"covered";i:8;s:5:"maybe";i:2;s:10:"notcovered";i:3;s:5:"total";i:13;s:10:"percentage";d:76.9200000000000017053025658242404460906982421875;s:4:"type";s:7:"covered";}s:31:"Doctrine_Record_State_Exception";a:6:{s:7:"covered";i:0;s:5:"maybe";i:0;s:10:"notcovered";i:0;s:5:"total";i:0;s:10:"percentage";i:100;s:4:"type";s:10:"notcovered";}s:15:"Doctrine_Parser";a:6:{s:7:"covered";i:12;s:5:"maybe";i:4;s:10:"notcovered";i:4;s:5:"total";i:20;s:10:"percentage";d:80;s:4:"type";s:7:"covered";}s:26:"Doctrine_Locator_Exception";a:6:{s:7:"covered";i:0;s:5:"maybe";i:0;s:10:"notcovered";i:0;s:5:"total";i:0;s:10:"percentage";i:100;s:4:"type";s:10:"notcovered";}s:27:"Doctrine_Locator_Injectable";a:6:{s:7:"covered";i:2;s:5:"maybe";i:7;s:10:"notcovered";i:14;s:5:"total";i:23;s:10:"percentage";d:39.13000000000000255795384873636066913604736328125;s:4:"type";s:7:"covered";}s:12:"Doctrine_Cli";a:6:{s:7:"covered";i:0;s:5:"maybe";i:0;s:10:"notcovered";i:149;s:5:"total";i:149;s:10:"percentage";i:0;s:4:"type";s:10:"notcovered";}s:15:"Doctrine_Access";a:6:{s:7:"covered";i:16;s:5:"maybe";i:7;s:10:"notcovered";i:1;s:5:"total";i:24;s:10:"percentage";d:95.8299999999999982946974341757595539093017578125;s:4:"type";s:7:"covered";}s:27:"Doctrine_Compiler_Exception";a:6:{s:7:"covered";i:0;s:5:"maybe";i:0;s:10:"notcovered";i:0;s:5:"total";i:0;s:10:"percentage";i:100;s:4:"type";s:10:"notcovered";}s:18:"Doctrine_Exception";a:6:{s:7:"covered";i:1;s:5:"maybe";i:2;s:10:"notcovered";i:4;s:5:"total";i:7;s:10:"percentage";d:42.8599999999999994315658113919198513031005859375;s:4:"type";s:7:"covered";}s:15:"Doctrine_Import";a:6:{s:7:"covered";i:12;s:5:"maybe";i:18;s:10:"notcovered";i:26;s:5:"total";i:56;s:10:"percentage";d:53.57000000000000028421709430404007434844970703125;s:4:"type";s:7:"covered";}s:25:"Doctrine_Plugin_Exception";a:6:{s:7:"covered";i:0;s:5:"maybe";i:0;s:10:"notcovered";i:0;s:5:"total";i:0;s:10:"percentage";i:100;s:4:"type";s:10:"notcovered";}s:17:"Doctrine_DataDict";a:6:{s:7:"covered";i:7;s:5:"maybe";i:4;s:10:"notcovered";i:22;s:5:"total";i:33;s:10:"percentage";d:33.3299999999999982946974341757595539093017578125;s:4:"type";s:7:"covered";}s:15:"Doctrine_Record";a:6:{s:7:"covered";i:488;s:5:"maybe";i:77;s:10:"notcovered";i:99;s:5:"total";i:664;s:10:"percentage";d:85.090000000000003410605131648480892181396484375;s:4:"type";s:7:"covered";}s:23:"Doctrine_Data_Exception";a:6:{s:7:"covered";i:0;s:5:"maybe";i:0;s:10:"notcovered";i:0;s:5:"total";i:0;s:10:"percentage";i:100;s:4:"type";s:10:"notcovered";}s:20:"Doctrine_Data_Import";a:6:{s:7:"covered";i:0;s:5:"maybe";i:0;s:10:"notcovered";i:199;s:5:"total";i:199;s:10:"percentage";i:0;s:4:"type";s:10:"notcovered";}s:20:"Doctrine_Data_Export";a:6:{s:7:"covered";i:0;s:5:"maybe";i:0;s:10:"notcovered";i:113;s:5:"total";i:113;s:10:"percentage";i:0;s:4:"type";s:10:"notcovered";}s:19:"Doctrine_Collection";a:6:{s:7:"covered";i:111;s:5:"maybe";i:40;s:10:"notcovered";i:144;s:5:"total";i:295;s:10:"percentage";d:51.18999999999999772626324556767940521240234375;s:4:"type";s:7:"covered";}s:15:"Doctrine_RawSql";a:6:{s:7:"covered";i:137;s:5:"maybe";i:6;s:10:"notcovered";i:4;s:5:"total";i:147;s:10:"percentage";d:97.280000000000001136868377216160297393798828125;s:4:"type";s:7:"covered";}s:15:"Doctrine_Export";a:6:{s:7:"covered";i:201;s:5:"maybe";i:48;s:10:"notcovered";i:88;s:5:"total";i:337;s:10:"percentage";d:73.8900000000000005684341886080801486968994140625;s:4:"type";s:7:"covered";}s:25:"Doctrine_Table_Repository";a:6:{s:7:"covered";i:20;s:5:"maybe";i:11;s:10:"notcovered";i:9;s:5:"total";i:40;s:10:"percentage";d:77.5;s:4:"type";s:7:"covered";}s:35:"Doctrine_Table_Repository_Exception";a:6:{s:7:"covered";i:0;s:5:"maybe";i:0;s:10:"notcovered";i:0;s:5:"total";i:0;s:10:"percentage";i:100;s:4:"type";s:10:"notcovered";}s:24:"Doctrine_Table_Exception";a:6:{s:7:"covered";i:4;s:5:"maybe";i:0;s:10:"notcovered";i:0;s:5:"total";i:4;s:10:"percentage";d:100;s:4:"type";s:7:"covered";}s:49:"Doctrine_Migration_IrreversibleMigrationException";a:6:{s:7:"covered";i:0;s:5:"maybe";i:0;s:10:"notcovered";i:0;s:5:"total";i:0;s:10:"percentage";i:100;s:4:"type";s:10:"notcovered";}s:28:"Doctrine_Migration_Exception";a:6:{s:7:"covered";i:1;s:5:"maybe";i:0;s:10:"notcovered";i:0;s:5:"total";i:1;s:10:"percentage";d:100;s:4:"type";s:7:"covered";}s:26:"Doctrine_Migration_Process";a:6:{s:7:"covered";i:0;s:5:"maybe";i:0;s:10:"notcovered";i:74;s:5:"total";i:74;s:10:"percentage";i:0;s:4:"type";s:10:"notcovered";}s:26:"Doctrine_AuditLog_Listener";a:6:{s:7:"covered";i:31;s:5:"maybe";i:0;s:10:"notcovered";i:0;s:5:"total";i:31;s:10:"percentage";d:100;s:4:"type";s:7:"covered";}s:15:"Doctrine_Object";a:6:{s:7:"covered";i:0;s:5:"maybe";i:0;s:10:"notcovered";i:6;s:5:"total";i:6;s:10:"percentage";i:0;s:4:"type";s:10:"notcovered";}s:22:"Doctrine_Template_I18n";a:6:{s:7:"covered";i:14;s:5:"maybe";i:1;s:10:"notcovered";i:3;s:5:"total";i:18;s:10:"percentage";d:83.3299999999999982946974341757595539093017578125;s:4:"type";s:7:"covered";}s:26:"Doctrine_Template_Taggable";a:6:{s:7:"covered";i:0;s:5:"maybe";i:0;s:10:"notcovered";i:0;s:5:"total";i:0;s:10:"percentage";i:100;s:4:"type";s:10:"notcovered";}s:27:"Doctrine_Template_NestedSet";a:6:{s:7:"covered";i:6;s:5:"maybe";i:0;s:10:"notcovered";i:0;s:5:"total";i:6;s:10:"percentage";d:100;s:4:"type";s:7:"covered";}s:28:"Doctrine_Template_Searchable";a:6:{s:7:"covered";i:15;s:5:"maybe";i:1;s:10:"notcovered";i:0;s:5:"total";i:16;s:10:"percentage";d:100;s:4:"type";s:7:"covered";}s:29:"Doctrine_Template_Versionable";a:6:{s:7:"covered";i:8;s:5:"maybe";i:1;s:10:"notcovered";i:0;s:5:"total";i:9;s:10:"percentage";d:100;s:4:"type";s:7:"covered";}s:17:"Doctrine_Template";a:6:{s:7:"covered";i:6;s:5:"maybe";i:5;s:10:"notcovered";i:4;s:5:"total";i:15;s:10:"percentage";d:73.3299999999999982946974341757595539093017578125;s:4:"type";s:7:"covered";}s:26:"Doctrine_Relation_LocalKey";a:6:{s:7:"covered";i:19;s:5:"maybe";i:2;s:10:"notcovered";i:2;s:5:"total";i:23;s:10:"percentage";d:91.2999999999999971578290569595992565155029296875;s:4:"type";s:7:"covered";}s:34:"Doctrine_Relation_Association_Self";a:6:{s:7:"covered";i:0;s:5:"maybe";i:0;s:10:"notcovered";i:64;s:5:"total";i:64;s:10:"percentage";i:0;s:4:"type";s:10:"notcovered";}s:22:"Doctrine_Relation_Nest";a:6:{s:7:"covered";i:30;s:5:"maybe";i:3;s:10:"notcovered";i:26;s:5:"total";i:59;s:10:"percentage";d:55.92999999999999971578290569595992565155029296875;s:4:"type";s:7:"covered";}s:24:"Doctrine_Relation_Parser";a:6:{s:7:"covered";i:160;s:5:"maybe";i:26;s:10:"notcovered";i:40;s:5:"total";i:226;s:10:"percentage";d:82.2999999999999971578290569595992565155029296875;s:4:"type";s:7:"covered";}s:27:"Doctrine_Relation_Exception";a:6:{s:7:"covered";i:2;s:5:"maybe";i:0;s:10:"notcovered";i:0;s:5:"total";i:2;s:10:"percentage";d:100;s:4:"type";s:7:"covered";}s:29:"Doctrine_Relation_Association";a:6:{s:7:"covered";i:20;s:5:"maybe";i:5;s:10:"notcovered";i:5;s:5:"total";i:30;s:10:"percentage";d:83.3299999999999982946974341757595539093017578125;s:4:"type";s:7:"covered";}s:28:"Doctrine_Relation_ForeignKey";a:6:{s:7:"covered";i:36;s:5:"maybe";i:2;s:10:"notcovered";i:0;s:5:"total";i:38;s:10:"percentage";d:100;s:4:"type";s:7:"covered";}s:34:"Doctrine_Relation_Parser_Exception";a:6:{s:7:"covered";i:2;s:5:"maybe";i:0;s:10:"notcovered";i:0;s:5:"total";i:2;s:10:"percentage";d:100;s:4:"type";s:7:"covered";}s:25:"Doctrine_RawSql_Exception";a:6:{s:7:"covered";i:0;s:5:"maybe";i:0;s:10:"notcovered";i:0;s:5:"total";i:0;s:10:"percentage";i:100;s:4:"type";s:10:"notcovered";}s:25:"Doctrine_Transaction_Mock";a:6:{s:7:"covered";i:2;s:5:"maybe";i:0;s:10:"notcovered";i:0;s:5:"total";i:2;s:10:"percentage";d:100;s:4:"type";s:7:"covered";}s:29:"Doctrine_Transaction_Firebird";a:6:{s:7:"covered";i:47;s:5:"maybe";i:3;s:10:"notcovered";i:0;s:5:"total";i:50;s:10:"percentage";d:100;s:4:"type";s:7:"covered";}s:30:"Doctrine_Transaction_Exception";a:6:{s:7:"covered";i:2;s:5:"maybe";i:0;s:10:"notcovered";i:0;s:5:"total";i:2;s:10:"percentage";d:100;s:4:"type";s:7:"covered";}s:27:"Doctrine_Transaction_Oracle";a:6:{s:7:"covered";i:20;s:5:"maybe";i:4;s:10:"notcovered";i:0;s:5:"total";i:24;s:10:"percentage";d:100;s:4:"type";s:7:"covered";}s:26:"Doctrine_Transaction_Mysql";a:6:{s:7:"covered";i:19;s:5:"maybe";i:5;s:10:"notcovered";i:0;s:5:"total";i:24;s:10:"percentage";d:100;s:4:"type";s:7:"covered";}s:26:"Doctrine_Transaction_Pgsql";a:6:{s:7:"covered";i:18;s:5:"maybe";i:4;s:10:"notcovered";i:0;s:5:"total";i:22;s:10:"percentage";d:100;s:4:"type";s:7:"covered";}s:29:"Doctrine_Transaction_Informix";a:6:{s:7:"covered";i:0;s:5:"maybe";i:0;s:10:"notcovered";i:0;s:5:"total";i:0;s:10:"percentage";i:100;s:4:"type";s:10:"notcovered";}s:26:"Doctrine_Transaction_Mssql";a:6:{s:7:"covered";i:14;s:5:"maybe";i:0;s:10:"notcovered";i:0;s:5:"total";i:14;s:10:"percentage";d:100;s:4:"type";s:7:"covered";}s:27:"Doctrine_Transaction_Sqlite";a:6:{s:7:"covered";i:15;s:5:"maybe";i:1;s:10:"notcovered";i:0;s:5:"total";i:16;s:10:"percentage";d:100;s:4:"type";s:7:"covered";}s:21:"Doctrine_Sequence_Db2";a:6:{s:7:"covered";i:0;s:5:"maybe";i:0;s:10:"notcovered";i:47;s:5:"total";i:47;s:10:"percentage";i:0;s:4:"type";s:10:"notcovered";}s:26:"Doctrine_Sequence_Firebird";a:6:{s:7:"covered";i:14;s:5:"maybe";i:12;s:10:"notcovered";i:1;s:5:"total";i:27;s:10:"percentage";d:96.2999999999999971578290569595992565155029296875;s:4:"type";s:7:"covered";}s:27:"Doctrine_Sequence_Exception";a:6:{s:7:"covered";i:0;s:5:"maybe";i:0;s:10:"notcovered";i:0;s:5:"total";i:0;s:10:"percentage";i:100;s:4:"type";s:10:"notcovered";}s:24:"Doctrine_Sequence_Oracle";a:6:{s:7:"covered";i:15;s:5:"maybe";i:10;s:10:"notcovered";i:0;s:5:"total";i:25;s:10:"percentage";d:100;s:4:"type";s:7:"covered";}s:23:"Doctrine_Sequence_Mysql";a:6:{s:7:"covered";i:18;s:5:"maybe";i:10;s:10:"notcovered";i:0;s:5:"total";i:28;s:10:"percentage";d:100;s:4:"type";s:7:"covered";}s:23:"Doctrine_Sequence_Pgsql";a:6:{s:7:"covered";i:12;s:5:"maybe";i:9;s:10:"notcovered";i:0;s:5:"total";i:21;s:10:"percentage";d:100;s:4:"type";s:7:"covered";}s:26:"Doctrine_Sequence_Informix";a:6:{s:7:"covered";i:0;s:5:"maybe";i:0;s:10:"notcovered";i:0;s:5:"total";i:0;s:10:"percentage";i:100;s:4:"type";s:10:"notcovered";}s:23:"Doctrine_Sequence_Mssql";a:6:{s:7:"covered";i:29;s:5:"maybe";i:20;s:10:"notcovered";i:3;s:5:"total";i:52;s:10:"percentage";d:94.2300000000000039790393202565610408782958984375;s:4:"type";s:7:"covered";}s:24:"Doctrine_Sequence_Sqlite";a:6:{s:7:"covered";i:18;s:5:"maybe";i:10;s:10:"notcovered";i:0;s:5:"total";i:28;s:10:"percentage";d:100;s:4:"type";s:7:"covered";}s:23:"Doctrine_Adapter_Mysqli";a:6:{s:7:"covered";i:0;s:5:"maybe";i:0;s:10:"notcovered";i:44;s:5:"total";i:44;s:10:"percentage";i:0;s:4:"type";s:10:"notcovered";}s:21:"Doctrine_Adapter_Mock";a:6:{s:7:"covered";i:37;s:5:"maybe";i:12;s:10:"notcovered";i:16;s:5:"total";i:65;s:10:"percentage";d:75.3799999999999954525264911353588104248046875;s:4:"type";s:7:"covered";}s:20:"Doctrine_Adapter_Db2";a:6:{s:7:"covered";i:0;s:5:"maybe";i:0;s:10:"notcovered";i:159;s:5:"total";i:159;s:10:"percentage";i:0;s:4:"type";s:10:"notcovered";}s:31:"Doctrine_Adapter_Statement_Mock";a:6:{s:7:"covered";i:12;s:5:"maybe";i:11;s:10:"notcovered";i:12;s:5:"total";i:35;s:10:"percentage";d:65.7099999999999937472239253111183643341064453125;s:4:"type";s:7:"covered";}s:26:"Doctrine_Adapter_Exception";a:6:{s:7:"covered";i:0;s:5:"maybe";i:0;s:10:"notcovered";i:0;s:5:"total";i:0;s:10:"percentage";i:100;s:4:"type";s:10:"notcovered";}s:30:"Doctrine_Adapter_Db2_Exception";a:6:{s:7:"covered";i:0;s:5:"maybe";i:0;s:10:"notcovered";i:0;s:5:"total";i:0;s:10:"percentage";i:100;s:4:"type";s:10:"notcovered";}s:23:"Doctrine_Adapter_Oracle";a:6:{s:7:"covered";i:0;s:5:"maybe";i:0;s:10:"notcovered";i:113;s:5:"total";i:113;s:10:"percentage";i:0;s:4:"type";s:10:"notcovered";}s:25:"Doctrine_Adapter_Resource";a:6:{s:7:"covered";i:0;s:5:"maybe";i:0;s:10:"notcovered";i:42;s:5:"total";i:42;s:10:"percentage";i:0;s:4:"type";s:10:"notcovered";}s:26:"Doctrine_Adapter_Statement";a:6:{s:7:"covered";i:0;s:5:"maybe";i:0;s:10:"notcovered";i:18;s:5:"total";i:18;s:10:"percentage";i:0;s:4:"type";s:10:"notcovered";}s:14:"Doctrine_Table";a:6:{s:7:"covered";i:416;s:5:"maybe";i:101;s:10:"notcovered";i:65;s:5:"total";i:582;s:10:"percentage";d:88.8299999999999982946974341757595539093017578125;s:4:"type";s:7:"covered";}s:22:"Doctrine_Export_Schema";a:6:{s:7:"covered";i:13;s:5:"maybe";i:4;s:10:"notcovered";i:46;s:5:"total";i:63;s:10:"percentage";d:26.980000000000000426325641456060111522674560546875;s:4:"type";s:7:"covered";}s:24:"Doctrine_Export_Firebird";a:6:{s:7:"covered";i:47;s:5:"maybe";i:20;s:10:"notcovered";i:126;s:5:"total";i:193;s:10:"percentage";d:34.719999999999998863131622783839702606201171875;s:4:"type";s:7:"covered";}s:25:"Doctrine_Export_Exception";a:6:{s:7:"covered";i:2;s:5:"maybe";i:0;s:10:"notcovered";i:0;s:5:"total";i:2;s:10:"percentage";d:100;s:4:"type";s:7:"covered";}s:22:"Doctrine_Export_Oracle";a:6:{s:7:"covered";i:44;s:5:"maybe";i:10;s:10:"notcovered";i:102;s:5:"total";i:156;s:10:"percentage";d:34.61999999999999744204615126363933086395263671875;s:4:"type";s:7:"covered";}s:21:"Doctrine_Export_Mysql";a:6:{s:7:"covered";i:121;s:5:"maybe";i:18;s:10:"notcovered";i:146;s:5:"total";i:285;s:10:"percentage";d:48.77000000000000312638803734444081783294677734375;s:4:"type";s:7:"covered";}s:21:"Doctrine_Export_Pgsql";a:6:{s:7:"covered";i:39;s:5:"maybe";i:11;s:10:"notcovered";i:77;s:5:"total";i:127;s:10:"percentage";d:39.36999999999999744204615126363933086395263671875;s:4:"type";s:7:"covered";}s:21:"Doctrine_Export_Mssql";a:6:{s:7:"covered";i:0;s:5:"maybe";i:0;s:10:"notcovered";i:84;s:5:"total";i:84;s:10:"percentage";i:0;s:4:"type";s:10:"notcovered";}s:25:"Doctrine_Export_Frontbase";a:6:{s:7:"covered";i:0;s:5:"maybe";i:0;s:10:"notcovered";i:132;s:5:"total";i:132;s:10:"percentage";i:0;s:4:"type";s:10:"notcovered";}s:22:"Doctrine_Export_Sqlite";a:6:{s:7:"covered";i:58;s:5:"maybe";i:21;s:10:"notcovered";i:100;s:5:"total";i:179;s:10:"percentage";d:44.13000000000000255795384873636066913604736328125;s:4:"type";s:7:"covered";}s:24:"Doctrine_Export_Reporter";a:6:{s:7:"covered";i:0;s:5:"maybe";i:0;s:10:"notcovered";i:6;s:5:"total";i:6;s:10:"percentage";i:0;s:4:"type";s:10:"notcovered";}s:13:"Doctrine_Data";a:6:{s:7:"covered";i:0;s:5:"maybe";i:0;s:10:"notcovered";i:63;s:5:"total";i:63;s:10:"percentage";i:0;s:4:"type";s:10:"notcovered";}s:17:"Doctrine_Sequence";a:6:{s:7:"covered";i:2;s:5:"maybe";i:3;s:10:"notcovered";i:4;s:5:"total";i:9;s:10:"percentage";d:55.56000000000000227373675443232059478759765625;s:4:"type";s:7:"covered";}s:23:"Doctrine_Tree_Exception";a:6:{s:7:"covered";i:0;s:5:"maybe";i:0;s:10:"notcovered";i:0;s:5:"total";i:0;s:10:"percentage";i:100;s:4:"type";s:10:"notcovered";}s:23:"Doctrine_Tree_NestedSet";a:6:{s:7:"covered";i:39;s:5:"maybe";i:15;s:10:"notcovered";i:60;s:5:"total";i:114;s:10:"percentage";d:47.36999999999999744204615126363933086395263671875;s:4:"type";s:7:"covered";}s:27:"Doctrine_Tree_AdjacencyList";a:6:{s:7:"covered";i:0;s:5:"maybe";i:0;s:10:"notcovered";i:0;s:5:"total";i:0;s:10:"percentage";i:100;s:4:"type";s:10:"notcovered";}s:30:"Doctrine_Tree_MaterializedPath";a:6:{s:7:"covered";i:0;s:5:"maybe";i:0;s:10:"notcovered";i:0;s:5:"total";i:0;s:10:"percentage";i:100;s:4:"type";s:10:"notcovered";}s:13:"Doctrine_File";a:6:{s:7:"covered";i:0;s:5:"maybe";i:0;s:10:"notcovered";i:15;s:5:"total";i:15;s:10:"percentage";i:0;s:4:"type";s:10:"notcovered";}s:12:"Doctrine_Lib";a:6:{s:7:"covered";i:9;s:5:"maybe";i:19;s:10:"notcovered";i:107;s:5:"total";i:135;s:10:"percentage";d:20.739999999999998436805981327779591083526611328125;s:4:"type";s:7:"covered";}s:24:"Doctrine_Expression_Mock";a:6:{s:7:"covered";i:2;s:5:"maybe";i:0;s:10:"notcovered";i:0;s:5:"total";i:2;s:10:"percentage";d:100;s:4:"type";s:7:"covered";}s:28:"Doctrine_Expression_Firebird";a:6:{s:7:"covered";i:0;s:5:"maybe";i:0;s:10:"notcovered";i:6;s:5:"total";i:6;s:10:"percentage";i:0;s:4:"type";s:10:"notcovered";}s:29:"Doctrine_Expression_Exception";a:6:{s:7:"covered";i:2;s:5:"maybe";i:0;s:10:"notcovered";i:0;s:5:"total";i:2;s:10:"percentage";d:100;s:4:"type";s:7:"covered";}s:26:"Doctrine_Expression_Oracle";a:6:{s:7:"covered";i:0;s:5:"maybe";i:0;s:10:"notcovered";i:26;s:5:"total";i:26;s:10:"percentage";i:0;s:4:"type";s:10:"notcovered";}s:26:"Doctrine_Expression_Driver";a:6:{s:7:"covered";i:82;s:5:"maybe";i:45;s:10:"notcovered";i:9;s:5:"total";i:136;s:10:"percentage";d:93.3799999999999954525264911353588104248046875;s:4:"type";s:7:"covered";}s:25:"Doctrine_Expression_Mysql";a:6:{s:7:"covered";i:2;s:5:"maybe";i:4;s:10:"notcovered";i:27;s:5:"total";i:33;s:10:"percentage";d:18.17999999999999971578290569595992565155029296875;s:4:"type";s:7:"covered";}s:25:"Doctrine_Expression_Pgsql";a:6:{s:7:"covered";i:2;s:5:"maybe";i:13;s:10:"notcovered";i:43;s:5:"total";i:58;s:10:"percentage";d:25.8599999999999994315658113919198513031005859375;s:4:"type";s:7:"covered";}s:28:"Doctrine_Expression_Informix";a:6:{s:7:"covered";i:0;s:5:"maybe";i:0;s:10:"notcovered";i:0;s:5:"total";i:0;s:10:"percentage";i:100;s:4:"type";s:10:"notcovered";}s:25:"Doctrine_Expression_Mssql";a:6:{s:7:"covered";i:0;s:5:"maybe";i:0;s:10:"notcovered";i:22;s:5:"total";i:22;s:10:"percentage";i:0;s:4:"type";s:10:"notcovered";}s:26:"Doctrine_Expression_Sqlite";a:6:{s:7:"covered";i:8;s:5:"maybe";i:14;s:10:"notcovered";i:18;s:5:"total";i:40;s:10:"percentage";d:55;s:4:"type";s:7:"covered";}s:22:"Doctrine_Schema_Column";a:6:{s:7:"covered";i:2;s:5:"maybe";i:6;s:10:"notcovered";i:6;s:5:"total";i:14;s:10:"percentage";d:57.1400000000000005684341886080801486968994140625;s:4:"type";s:7:"covered";}s:24:"Doctrine_Schema_Relation";a:6:{s:7:"covered";i:2;s:5:"maybe";i:1;s:10:"notcovered";i:6;s:5:"total";i:9;s:10:"percentage";d:33.3299999999999982946974341757595539093017578125;s:4:"type";s:7:"covered";}s:24:"Doctrine_Schema_Database";a:6:{s:7:"covered";i:2;s:5:"maybe";i:1;s:10:"notcovered";i:6;s:5:"total";i:9;s:10:"percentage";d:33.3299999999999982946974341757595539093017578125;s:4:"type";s:7:"covered";}s:25:"Doctrine_Schema_Exception";a:6:{s:7:"covered";i:2;s:5:"maybe";i:0;s:10:"notcovered";i:0;s:5:"total";i:2;s:10:"percentage";d:100;s:4:"type";s:7:"covered";}s:22:"Doctrine_Schema_Object";a:6:{s:7:"covered";i:13;s:5:"maybe";i:9;s:10:"notcovered";i:10;s:5:"total";i:32;s:10:"percentage";d:68.75;s:4:"type";s:7:"covered";}s:21:"Doctrine_Schema_Table";a:6:{s:7:"covered";i:2;s:5:"maybe";i:5;s:10:"notcovered";i:11;s:5:"total";i:18;s:10:"percentage";d:38.8900000000000005684341886080801486968994140625;s:4:"type";s:7:"covered";}s:20:"Doctrine_Cache_Array";a:6:{s:7:"covered";i:7;s:5:"maybe";i:4;s:10:"notcovered";i:5;s:5:"total";i:16;s:10:"percentage";d:68.75;s:4:"type";s:7:"covered";}s:17:"Doctrine_Cache_Db";a:6:{s:7:"covered";i:0;s:5:"maybe";i:0;s:10:"notcovered";i:92;s:5:"total";i:92;s:10:"percentage";i:0;s:4:"type";s:10:"notcovered";}s:24:"Doctrine_Cache_Exception";a:6:{s:7:"covered";i:0;s:5:"maybe";i:0;s:10:"notcovered";i:0;s:5:"total";i:0;s:10:"percentage";i:100;s:4:"type";s:10:"notcovered";}s:21:"Doctrine_Cache_Driver";a:6:{s:7:"covered";i:0;s:5:"maybe";i:0;s:10:"notcovered";i:17;s:5:"total";i:17;s:10:"percentage";i:0;s:4:"type";s:10:"notcovered";}s:23:"Doctrine_Cache_Memcache";a:6:{s:7:"covered";i:0;s:5:"maybe";i:0;s:10:"notcovered";i:51;s:5:"total";i:51;s:10:"percentage";i:0;s:4:"type";s:10:"notcovered";}s:18:"Doctrine_Cache_Apc";a:6:{s:7:"covered";i:0;s:5:"maybe";i:0;s:10:"notcovered";i:28;s:5:"total";i:28;s:10:"percentage";i:0;s:4:"type";s:10:"notcovered";}s:16:"Doctrine_Locator";a:6:{s:7:"covered";i:0;s:5:"maybe";i:0;s:10:"notcovered";i:68;s:5:"total";i:68;s:10:"percentage";i:0;s:4:"type";s:10:"notcovered";}s:23:"Doctrine_View_Exception";a:6:{s:7:"covered";i:0;s:5:"maybe";i:0;s:10:"notcovered";i:0;s:5:"total";i:0;s:10:"percentage";i:100;s:4:"type";s:10:"notcovered";}s:32:"Doctrine_EventListener_Exception";a:6:{s:7:"covered";i:0;s:5:"maybe";i:0;s:10:"notcovered";i:0;s:5:"total";i:0;s:10:"percentage";i:100;s:4:"type";s:10:"notcovered";}s:28:"Doctrine_EventListener_Chain";a:6:{s:7:"covered";i:60;s:5:"maybe";i:3;s:10:"notcovered";i:79;s:5:"total";i:142;s:10:"percentage";d:44.36999999999999744204615126363933086395263671875;s:4:"type";s:7:"covered";}s:17:"Doctrine_Resource";a:6:{s:7:"covered";i:0;s:5:"maybe";i:0;s:10:"notcovered";i:23;s:5:"total";i:23;s:10:"percentage";i:0;s:4:"type";s:10:"notcovered";}s:16:"Doctrine_Adapter";a:6:{s:7:"covered";i:0;s:5:"maybe";i:0;s:10:"notcovered";i:0;s:5:"total";i:0;s:10:"percentage";i:100;s:4:"type";s:10:"notcovered";}s:25:"Doctrine_Parser_Serialize";a:6:{s:7:"covered";i:0;s:5:"maybe";i:0;s:10:"notcovered";i:14;s:5:"total";i:14;s:10:"percentage";i:0;s:4:"type";s:10:"notcovered";}s:19:"Doctrine_Parser_Yml";a:6:{s:7:"covered";i:10;s:5:"maybe";i:3;s:10:"notcovered";i:1;s:5:"total";i:14;s:10:"percentage";d:92.8599999999999994315658113919198513031005859375;s:4:"type";s:7:"covered";}s:20:"Doctrine_Parser_Json";a:6:{s:7:"covered";i:0;s:5:"maybe";i:0;s:10:"notcovered";i:29;s:5:"total";i:29;s:10:"percentage";i:0;s:4:"type";s:10:"notcovered";}s:25:"Doctrine_Parser_Exception";a:6:{s:7:"covered";i:0;s:5:"maybe";i:0;s:10:"notcovered";i:0;s:5:"total";i:0;s:10:"percentage";i:100;s:4:"type";s:10:"notcovered";}s:19:"Doctrine_Parser_Xml";a:6:{s:7:"covered";i:0;s:5:"maybe";i:0;s:10:"notcovered";i:68;s:5:"total";i:68;s:10:"percentage";i:0;s:4:"type";s:10:"notcovered";}s:26:"Doctrine_Validator_Notnull";a:6:{s:7:"covered";i:2;s:5:"maybe";i:1;s:10:"notcovered";i:0;s:5:"total";i:3;s:10:"percentage";d:100;s:4:"type";s:7:"covered";}s:24:"Doctrine_Validator_Range";a:6:{s:7:"covered";i:3;s:5:"maybe";i:3;s:10:"notcovered";i:3;s:5:"total";i:9;s:10:"percentage";d:66.6700000000000017053025658242404460906982421875;s:4:"type";s:7:"covered";}s:27:"Doctrine_Validator_Notblank";a:6:{s:7:"covered";i:2;s:5:"maybe";i:1;s:10:"notcovered";i:0;s:5:"total";i:3;s:10:"percentage";d:100;s:4:"type";s:7:"covered";}s:26:"Doctrine_Validator_Country";a:6:{s:7:"covered";i:0;s:5:"maybe";i:0;s:10:"notcovered";i:8;s:5:"total";i:8;s:10:"percentage";i:0;s:4:"type";s:10:"notcovered";}s:26:"Doctrine_Validator_Nospace";a:6:{s:7:"covered";i:0;s:5:"maybe";i:0;s:10:"notcovered";i:3;s:5:"total";i:3;s:10:"percentage";i:0;s:4:"type";s:10:"notcovered";}s:23:"Doctrine_Validator_Past";a:6:{s:7:"covered";i:15;s:5:"maybe";i:5;s:10:"notcovered";i:11;s:5:"total";i:31;s:10:"percentage";d:64.5199999999999960209606797434389591217041015625;s:4:"type";s:7:"covered";}s:25:"Doctrine_Validator_Future";a:6:{s:7:"covered";i:15;s:5:"maybe";i:5;s:10:"notcovered";i:11;s:5:"total";i:31;s:10:"percentage";d:64.5199999999999960209606797434389591217041015625;s:4:"type";s:7:"covered";}s:26:"Doctrine_Validator_Usstate";a:6:{s:7:"covered";i:2;s:5:"maybe";i:2;s:10:"notcovered";i:1;s:5:"total";i:5;s:10:"percentage";d:80;s:4:"type";s:7:"covered";}s:29:"Doctrine_Validator_ErrorStack";a:6:{s:7:"covered";i:9;s:5:"maybe";i:5;s:10:"notcovered";i:9;s:5:"total";i:23;s:10:"percentage";d:60.86999999999999744204615126363933086395263671875;s:4:"type";s:7:"covered";}s:28:"Doctrine_Validator_Exception";a:6:{s:7:"covered";i:12;s:5:"maybe";i:5;s:10:"notcovered";i:6;s:5:"total";i:23;s:10:"percentage";d:73.909999999999996589394868351519107818603515625;s:4:"type";s:7:"covered";}s:24:"Doctrine_Validator_Email";a:6:{s:7:"covered";i:21;s:5:"maybe";i:3;s:10:"notcovered";i:2;s:5:"total";i:26;s:10:"percentage";d:92.31000000000000227373675443232059478759765625;s:4:"type";s:7:"covered";}s:28:"Doctrine_Validator_Htmlcolor";a:6:{s:7:"covered";i:0;s:5:"maybe";i:0;s:10:"notcovered";i:6;s:5:"total";i:6;s:10:"percentage";i:0;s:4:"type";s:10:"notcovered";}s:25:"Doctrine_Validator_Driver";a:6:{s:7:"covered";i:4;s:5:"maybe";i:8;s:10:"notcovered";i:10;s:5:"total";i:22;s:10:"percentage";d:54.5499999999999971578290569595992565155029296875;s:4:"type";s:7:"covered";}s:28:"Doctrine_Validator_Minlength";a:6:{s:7:"covered";i:0;s:5:"maybe";i:0;s:10:"notcovered";i:7;s:5:"total";i:7;s:10:"percentage";i:0;s:4:"type";s:10:"notcovered";}s:25:"Doctrine_Validator_Unique";a:6:{s:7:"covered";i:17;s:5:"maybe";i:1;s:10:"notcovered";i:2;s:5:"total";i:20;s:10:"percentage";d:90;s:4:"type";s:7:"covered";}s:29:"Doctrine_Validator_Creditcard";a:6:{s:7:"covered";i:0;s:5:"maybe";i:0;s:10:"notcovered";i:3;s:5:"total";i:3;s:10:"percentage";i:0;s:4:"type";s:10:"notcovered";}s:23:"Doctrine_Validator_Date";a:6:{s:7:"covered";i:5;s:5:"maybe";i:3;s:10:"notcovered";i:2;s:5:"total";i:10;s:10:"percentage";d:80;s:4:"type";s:7:"covered";}s:27:"Doctrine_Validator_Unsigned";a:6:{s:7:"covered";i:4;s:5:"maybe";i:2;s:10:"notcovered";i:1;s:5:"total";i:7;s:10:"percentage";d:85.7099999999999937472239253111183643341064453125;s:4:"type";s:7:"covered";}s:25:"Doctrine_Validator_Regexp";a:6:{s:7:"covered";i:6;s:5:"maybe";i:5;s:10:"notcovered";i:6;s:5:"total";i:17;s:10:"percentage";d:64.7099999999999937472239253111183643341064453125;s:4:"type";s:7:"covered";}s:21:"Doctrine_Validator_Ip";a:6:{s:7:"covered";i:0;s:5:"maybe";i:0;s:10:"notcovered";i:3;s:5:"total";i:3;s:10:"percentage";i:0;s:4:"type";s:10:"notcovered";}s:18:"Doctrine_Validator";a:6:{s:7:"covered";i:95;s:5:"maybe";i:13;s:10:"notcovered";i:20;s:5:"total";i:128;s:10:"percentage";d:84.3799999999999954525264911353588104248046875;s:4:"type";s:7:"covered";}s:26:"Doctrine_Locking_Exception";a:6:{s:7:"covered";i:0;s:5:"maybe";i:0;s:10:"notcovered";i:0;s:5:"total";i:0;s:10:"percentage";i:100;s:4:"type";s:10:"notcovered";}s:36:"Doctrine_Locking_Manager_Pessimistic";a:6:{s:7:"covered";i:0;s:5:"maybe";i:0;s:10:"notcovered";i:178;s:5:"total";i:178;s:10:"percentage";i:0;s:4:"type";s:10:"notcovered";}s:22:"Doctrine_Import_Reader";a:6:{s:7:"covered";i:0;s:5:"maybe";i:0;s:10:"notcovered";i:0;s:5:"total";i:0;s:10:"percentage";i:100;s:4:"type";s:10:"notcovered";}s:22:"Doctrine_Import_Schema";a:6:{s:7:"covered";i:71;s:5:"maybe";i:10;s:10:"notcovered";i:49;s:5:"total";i:130;s:10:"percentage";d:62.31000000000000227373675443232059478759765625;s:4:"type";s:7:"covered";}s:24:"Doctrine_Import_Firebird";a:6:{s:7:"covered";i:21;s:5:"maybe";i:7;s:10:"notcovered";i:0;s:5:"total";i:28;s:10:"percentage";d:100;s:4:"type";s:7:"covered";}s:25:"Doctrine_Import_Exception";a:6:{s:7:"covered";i:0;s:5:"maybe";i:0;s:10:"notcovered";i:0;s:5:"total";i:0;s:10:"percentage";i:100;s:4:"type";s:10:"notcovered";}s:25:"Doctrine_Import_Reader_Db";a:6:{s:7:"covered";i:0;s:5:"maybe";i:0;s:10:"notcovered";i:33;s:5:"total";i:33;s:10:"percentage";i:0;s:4:"type";s:10:"notcovered";}s:32:"Doctrine_Import_Reader_Exception";a:6:{s:7:"covered";i:0;s:5:"maybe";i:0;s:10:"notcovered";i:0;s:5:"total";i:0;s:10:"percentage";i:100;s:4:"type";s:10:"notcovered";}s:23:"Doctrine_Import_Builder";a:6:{s:7:"covered";i:119;s:5:"maybe";i:11;s:10:"notcovered";i:62;s:5:"total";i:192;s:10:"percentage";d:67.7099999999999937472239253111183643341064453125;s:4:"type";s:7:"covered";}s:22:"Doctrine_Import_Oracle";a:6:{s:7:"covered";i:32;s:5:"maybe";i:10;s:10:"notcovered";i:19;s:5:"total";i:61;s:10:"percentage";d:68.849999999999994315658113919198513031005859375;s:4:"type";s:7:"covered";}s:21:"Doctrine_Import_Mysql";a:6:{s:7:"covered";i:0;s:5:"maybe";i:0;s:10:"notcovered";i:113;s:5:"total";i:113;s:10:"percentage";i:0;s:4:"type";s:10:"notcovered";}s:21:"Doctrine_Import_Pgsql";a:6:{s:7:"covered";i:15;s:5:"maybe";i:6;s:10:"notcovered";i:27;s:5:"total";i:48;s:10:"percentage";d:43.75;s:4:"type";s:7:"covered";}s:33:"Doctrine_Import_Builder_BaseClass";a:6:{s:7:"covered";i:0;s:5:"maybe";i:0;s:10:"notcovered";i:0;s:5:"total";i:0;s:10:"percentage";i:100;s:4:"type";s:10:"notcovered";}s:33:"Doctrine_Import_Builder_Exception";a:6:{s:7:"covered";i:0;s:5:"maybe";i:0;s:10:"notcovered";i:0;s:5:"total";i:0;s:10:"percentage";i:100;s:4:"type";s:10:"notcovered";}s:24:"Doctrine_Import_Informix";a:6:{s:7:"covered";i:0;s:5:"maybe";i:0;s:10:"notcovered";i:0;s:5:"total";i:0;s:10:"percentage";i:100;s:4:"type";s:10:"notcovered";}s:21:"Doctrine_Import_Mssql";a:6:{s:7:"covered";i:21;s:5:"maybe";i:7;s:10:"notcovered";i:46;s:5:"total";i:74;s:10:"percentage";d:37.840000000000003410605131648480892181396484375;s:4:"type";s:7:"covered";}s:22:"Doctrine_Import_Sqlite";a:6:{s:7:"covered";i:20;s:5:"maybe";i:7;s:10:"notcovered";i:59;s:5:"total";i:86;s:10:"percentage";d:31.39999999999999857891452847979962825775146484375;s:4:"type";s:7:"covered";}s:23:"Doctrine_Node_Exception";a:6:{s:7:"covered";i:0;s:5:"maybe";i:0;s:10:"notcovered";i:0;s:5:"total";i:0;s:10:"percentage";i:100;s:4:"type";s:10:"notcovered";}s:23:"Doctrine_Node_NestedSet";a:6:{s:7:"covered";i:64;s:5:"maybe";i:47;s:10:"notcovered";i:326;s:5:"total";i:437;s:10:"percentage";d:25.39999999999999857891452847979962825775146484375;s:4:"type";s:7:"covered";}s:44:"Doctrine_Node_AdjacencyList_PreOrderIterator";a:6:{s:7:"covered";i:0;s:5:"maybe";i:0;s:10:"notcovered";i:0;s:5:"total";i:0;s:10:"percentage";i:100;s:4:"type";s:10:"notcovered";}s:46:"Doctrine_Node_AdjacencyList_LevelOrderIterator";a:6:{s:7:"covered";i:0;s:5:"maybe";i:0;s:10:"notcovered";i:0;s:5:"total";i:0;s:10:"percentage";i:100;s:4:"type";s:10:"notcovered";}s:45:"Doctrine_Node_AdjacencyList_PostOrderIterator";a:6:{s:7:"covered";i:0;s:5:"maybe";i:0;s:10:"notcovered";i:0;s:5:"total";i:0;s:10:"percentage";i:100;s:4:"type";s:10:"notcovered";}s:47:"Doctrine_Node_MaterializedPath_PreOrderIterator";a:6:{s:7:"covered";i:0;s:5:"maybe";i:0;s:10:"notcovered";i:18;s:5:"total";i:18;s:10:"percentage";i:0;s:4:"type";s:10:"notcovered";}s:49:"Doctrine_Node_MaterializedPath_LevelOrderIterator";a:6:{s:7:"covered";i:0;s:5:"maybe";i:0;s:10:"notcovered";i:18;s:5:"total";i:18;s:10:"percentage";i:0;s:4:"type";s:10:"notcovered";}s:48:"Doctrine_Node_MaterializedPath_PostOrderIterator";a:6:{s:7:"covered";i:0;s:5:"maybe";i:0;s:10:"notcovered";i:18;s:5:"total";i:18;s:10:"percentage";i:0;s:4:"type";s:10:"notcovered";}s:40:"Doctrine_Node_NestedSet_PreOrderIterator";a:6:{s:7:"covered";i:0;s:5:"maybe";i:0;s:10:"notcovered";i:73;s:5:"total";i:73;s:10:"percentage";i:0;s:4:"type";s:10:"notcovered";}s:42:"Doctrine_Node_NestedSet_LevelOrderIterator";a:6:{s:7:"covered";i:0;s:5:"maybe";i:0;s:10:"notcovered";i:0;s:5:"total";i:0;s:10:"percentage";i:100;s:4:"type";s:10:"notcovered";}s:41:"Doctrine_Node_NestedSet_PostOrderIterator";a:6:{s:7:"covered";i:0;s:5:"maybe";i:0;s:10:"notcovered";i:0;s:5:"total";i:0;s:10:"percentage";i:100;s:4:"type";s:10:"notcovered";}s:27:"Doctrine_Node_AdjacencyList";a:6:{s:7:"covered";i:0;s:5:"maybe";i:0;s:10:"notcovered";i:0;s:5:"total";i:0;s:10:"percentage";i:100;s:4:"type";s:10:"notcovered";}s:30:"Doctrine_Node_MaterializedPath";a:6:{s:7:"covered";i:0;s:5:"maybe";i:0;s:10:"notcovered";i:0;s:5:"total";i:0;s:10:"percentage";i:100;s:4:"type";s:10:"notcovered";}s:19:"Doctrine_File_Index";a:6:{s:7:"covered";i:0;s:5:"maybe";i:0;s:10:"notcovered";i:19;s:5:"total";i:19;s:10:"percentage";i:0;s:4:"type";s:10:"notcovered";}s:16:"Doctrine_Manager";a:6:{s:7:"covered";i:123;s:5:"maybe";i:39;s:10:"notcovered";i:87;s:5:"total";i:249;s:10:"percentage";d:65.06000000000000227373675443232059478759765625;s:4:"type";s:7:"covered";}s:24:"Doctrine_Search_Analyzer";a:6:{s:7:"covered";i:0;s:5:"maybe";i:0;s:10:"notcovered";i:3;s:5:"total";i:3;s:10:"percentage";i:0;s:4:"type";s:10:"notcovered";}s:24:"Doctrine_Search_Listener";a:6:{s:7:"covered";i:6;s:5:"maybe";i:0;s:10:"notcovered";i:2;s:5:"total";i:8;s:10:"percentage";d:75;s:4:"type";s:7:"covered";}s:21:"Doctrine_Search_Query";a:6:{s:7:"covered";i:95;s:5:"maybe";i:12;s:10:"notcovered";i:6;s:5:"total";i:113;s:10:"percentage";d:94.68999999999999772626324556767940521240234375;s:4:"type";s:7:"covered";}s:22:"Doctrine_Search_Parser";a:6:{s:7:"covered";i:0;s:5:"maybe";i:0;s:10:"notcovered";i:5;s:5:"total";i:5;s:10:"percentage";i:0;s:4:"type";s:10:"notcovered";}s:25:"Doctrine_Search_Exception";a:6:{s:7:"covered";i:0;s:5:"maybe";i:0;s:10:"notcovered";i:0;s:5:"total";i:0;s:10:"percentage";i:100;s:4:"type";s:10:"notcovered";}s:22:"Doctrine_Search_Record";a:6:{s:7:"covered";i:0;s:5:"maybe";i:0;s:10:"notcovered";i:10;s:5:"total";i:10;s:10:"percentage";i:0;s:4:"type";s:10:"notcovered";}s:33:"Doctrine_Search_Analyzer_Standard";a:6:{s:7:"covered";i:16;s:5:"maybe";i:3;s:10:"notcovered";i:0;s:5:"total";i:19;s:10:"percentage";d:100;s:4:"type";s:7:"covered";}s:34:"Doctrine_Search_Analyzer_Exception";a:6:{s:7:"covered";i:0;s:5:"maybe";i:0;s:10:"notcovered";i:0;s:5:"total";i:0;s:10:"percentage";i:100;s:4:"type";s:10:"notcovered";}s:22:"Doctrine_Search_Scorer";a:6:{s:7:"covered";i:0;s:5:"maybe";i:0;s:10:"notcovered";i:19;s:5:"total";i:19;s:10:"percentage";i:0;s:4:"type";s:10:"notcovered";}s:23:"Doctrine_Search_Indexer";a:6:{s:7:"covered";i:0;s:5:"maybe";i:0;s:10:"notcovered";i:39;s:5:"total";i:39;s:10:"percentage";i:0;s:4:"type";s:10:"notcovered";}s:33:"Doctrine_Search_Indexer_Exception";a:6:{s:7:"covered";i:0;s:5:"maybe";i:0;s:10:"notcovered";i:0;s:5:"total";i:0;s:10:"percentage";i:100;s:4:"type";s:10:"notcovered";}s:27:"Doctrine_Search_Indexer_Dir";a:6:{s:7:"covered";i:0;s:5:"maybe";i:0;s:10:"notcovered";i:11;s:5:"total";i:11;s:10:"percentage";i:0;s:4:"type";s:10:"notcovered";}s:24:"Doctrine_IntegrityMapper";a:6:{s:7:"covered";i:0;s:5:"maybe";i:0;s:10:"notcovered";i:103;s:5:"total";i:103;s:10:"percentage";i:0;s:4:"type";s:10:"notcovered";}s:21:"Doctrine_Configurable";a:6:{s:7:"covered";i:82;s:5:"maybe";i:30;s:10:"notcovered";i:32;s:5:"total";i:144;s:10:"percentage";d:77.780000000000001136868377216160297393798828125;s:4:"type";s:7:"covered";}s:17:"Doctrine_AuditLog";a:6:{s:7:"covered";i:37;s:5:"maybe";i:3;s:10:"notcovered";i:1;s:5:"total";i:41;s:10:"percentage";d:97.56000000000000227373675443232059478759765625;s:4:"type";s:7:"covered";}s:19:"Doctrine_Connection";a:6:{s:7:"covered";i:205;s:5:"maybe";i:62;s:10:"notcovered";i:61;s:5:"total";i:328;s:10:"percentage";d:81.400000000000005684341886080801486968994140625;s:4:"type";s:7:"covered";}s:26:"Doctrine_Manager_Exception";a:6:{s:7:"covered";i:1;s:5:"maybe";i:0;s:10:"notcovered";i:0;s:5:"total";i:1;s:10:"percentage";d:100;s:4:"type";s:7:"covered";}s:26:"Doctrine_Collection_Offset";a:6:{s:7:"covered";i:0;s:5:"maybe";i:0;s:10:"notcovered";i:10;s:5:"total";i:10;s:10:"percentage";i:0;s:4:"type";s:10:"notcovered";}s:29:"Doctrine_Collection_Exception";a:6:{s:7:"covered";i:0;s:5:"maybe";i:0;s:10:"notcovered";i:0;s:5:"total";i:0;s:10:"percentage";i:100;s:4:"type";s:10:"notcovered";}s:35:"Doctrine_Collection_Iterator_Normal";a:6:{s:7:"covered";i:0;s:5:"maybe";i:0;s:10:"notcovered";i:3;s:5:"total";i:3;s:10:"percentage";i:0;s:4:"type";s:10:"notcovered";}s:35:"Doctrine_Collection_Iterator_Offset";a:6:{s:7:"covered";i:0;s:5:"maybe";i:0;s:10:"notcovered";i:1;s:5:"total";i:1;s:10:"percentage";i:0;s:4:"type";s:10:"notcovered";}s:39:"Doctrine_Collection_Iterator_Expandable";a:6:{s:7:"covered";i:0;s:5:"maybe";i:0;s:10:"notcovered";i:18;s:5:"total";i:18;s:10:"percentage";i:0;s:4:"type";s:10:"notcovered";}s:28:"Doctrine_Collection_Iterator";a:6:{s:7:"covered";i:0;s:5:"maybe";i:0;s:10:"notcovered";i:25;s:5:"total";i:25;s:10:"percentage";i:0;s:4:"type";s:10:"notcovered";}s:18:"Doctrine_Migration";a:6:{s:7:"covered";i:52;s:5:"maybe";i:15;s:10:"notcovered";i:82;s:5:"total";i:149;s:10:"percentage";d:44.969999999999998863131622783839702606201171875;s:4:"type";s:7:"covered";}s:13:"Doctrine_View";a:6:{s:7:"covered";i:18;s:5:"maybe";i:7;s:10:"notcovered";i:0;s:5:"total";i:25;s:10:"percentage";d:100;s:4:"type";s:7:"covered";}s:18:"Doctrine_Formatter";a:6:{s:7:"covered";i:48;s:5:"maybe";i:11;s:10:"notcovered";i:21;s:5:"total";i:80;s:10:"percentage";d:73.75;s:4:"type";s:7:"covered";}s:13:"Doctrine_Util";a:6:{s:7:"covered";i:0;s:5:"maybe";i:0;s:10:"notcovered";i:0;s:5:"total";i:0;s:10:"percentage";i:100;s:4:"type";s:10:"notcovered";}s:24:"Doctrine_Connection_Mock";a:6:{s:7:"covered";i:0;s:5:"maybe";i:0;s:10:"notcovered";i:3;s:5:"total";i:3;s:10:"percentage";i:0;s:4:"type";s:10:"notcovered";}s:23:"Doctrine_Connection_Db2";a:6:{s:7:"covered";i:0;s:5:"maybe";i:0;s:10:"notcovered";i:20;s:5:"total";i:20;s:10:"percentage";i:0;s:4:"type";s:10:"notcovered";}s:38:"Doctrine_Connection_Informix_Exception";a:6:{s:7:"covered";i:0;s:5:"maybe";i:0;s:10:"notcovered";i:0;s:5:"total";i:0;s:10:"percentage";i:100;s:4:"type";s:10:"notcovered";}s:28:"Doctrine_Connection_Firebird";a:6:{s:7:"covered";i:22;s:5:"maybe";i:1;s:10:"notcovered";i:9;s:5:"total";i:32;s:10:"percentage";d:71.8799999999999954525264911353588104248046875;s:4:"type";s:7:"covered";}s:29:"Doctrine_Connection_Exception";a:6:{s:7:"covered";i:3;s:5:"maybe";i:3;s:10:"notcovered";i:3;s:5:"total";i:9;s:10:"percentage";d:66.6700000000000017053025658242404460906982421875;s:4:"type";s:7:"covered";}s:26:"Doctrine_Connection_Module";a:6:{s:7:"covered";i:9;s:5:"maybe";i:2;s:10:"notcovered";i:1;s:5:"total";i:12;s:10:"percentage";d:91.6700000000000017053025658242404460906982421875;s:4:"type";s:7:"covered";}s:35:"Doctrine_Connection_Mssql_Exception";a:6:{s:7:"covered";i:6;s:5:"maybe";i:2;s:10:"notcovered";i:1;s:5:"total";i:9;s:10:"percentage";d:88.8900000000000005684341886080801486968994140625;s:4:"type";s:7:"covered";}s:26:"Doctrine_Connection_Oracle";a:6:{s:7:"covered";i:36;s:5:"maybe";i:1;s:10:"notcovered";i:5;s:5:"total";i:42;s:10:"percentage";d:88.099999999999994315658113919198513031005859375;s:4:"type";s:7:"covered";}s:25:"Doctrine_Connection_Mysql";a:6:{s:7:"covered";i:36;s:5:"maybe";i:3;s:10:"notcovered";i:30;s:5:"total";i:69;s:10:"percentage";d:56.52000000000000312638803734444081783294677734375;s:4:"type";s:7:"covered";}s:38:"Doctrine_Connection_Profiler_Exception";a:6:{s:7:"covered";i:0;s:5:"maybe";i:0;s:10:"notcovered";i:0;s:5:"total";i:0;s:10:"percentage";i:100;s:4:"type";s:10:"notcovered";}s:25:"Doctrine_Connection_Pgsql";a:6:{s:7:"covered";i:43;s:5:"maybe";i:3;s:10:"notcovered";i:43;s:5:"total";i:89;s:10:"percentage";d:51.68999999999999772626324556767940521240234375;s:4:"type";s:7:"covered";}s:36:"Doctrine_Connection_Oracle_Exception";a:6:{s:7:"covered";i:6;s:5:"maybe";i:2;s:10:"notcovered";i:1;s:5:"total";i:9;s:10:"percentage";d:88.8900000000000005684341886080801486968994140625;s:4:"type";s:7:"covered";}s:28:"Doctrine_Connection_Informix";a:6:{s:7:"covered";i:0;s:5:"maybe";i:0;s:10:"notcovered";i:5;s:5:"total";i:5;s:10:"percentage";i:0;s:4:"type";s:10:"notcovered";}s:30:"Doctrine_Connection_UnitOfWork";a:6:{s:7:"covered";i:267;s:5:"maybe";i:14;s:10:"notcovered";i:56;s:5:"total";i:337;s:10:"percentage";d:83.3799999999999954525264911353588104248046875;s:4:"type";s:7:"covered";}s:35:"Doctrine_Connection_Pgsql_Exception";a:6:{s:7:"covered";i:7;s:5:"maybe";i:2;s:10:"notcovered";i:1;s:5:"total";i:10;s:10:"percentage";d:90;s:4:"type";s:7:"covered";}s:36:"Doctrine_Connection_Sqlite_Exception";a:6:{s:7:"covered";i:7;s:5:"maybe";i:2;s:10:"notcovered";i:1;s:5:"total";i:10;s:10:"percentage";d:90;s:4:"type";s:7:"covered";}s:38:"Doctrine_Connection_Firebird_Exception";a:6:{s:7:"covered";i:2;s:5:"maybe";i:2;s:10:"notcovered";i:9;s:5:"total";i:13;s:10:"percentage";d:30.769999999999999573674358543939888477325439453125;s:4:"type";s:7:"covered";}s:25:"Doctrine_Connection_Mssql";a:6:{s:7:"covered";i:35;s:5:"maybe";i:11;s:10:"notcovered";i:38;s:5:"total";i:84;s:10:"percentage";d:54.75999999999999801048033987171947956085205078125;s:4:"type";s:7:"covered";}s:26:"Doctrine_Connection_Common";a:6:{s:7:"covered";i:10;s:5:"maybe";i:1;s:10:"notcovered";i:2;s:5:"total";i:13;s:10:"percentage";d:84.6200000000000045474735088646411895751953125;s:4:"type";s:7:"covered";}s:28:"Doctrine_Connection_Profiler";a:6:{s:7:"covered";i:16;s:5:"maybe";i:9;s:10:"notcovered";i:10;s:5:"total";i:35;s:10:"percentage";d:71.43000000000000682121026329696178436279296875;s:4:"type";s:7:"covered";}s:26:"Doctrine_Connection_Sqlite";a:6:{s:7:"covered";i:37;s:5:"maybe";i:2;s:10:"notcovered";i:1;s:5:"total";i:40;s:10:"percentage";d:97.5;s:4:"type";s:7:"covered";}s:35:"Doctrine_Connection_Mysql_Exception";a:6:{s:7:"covered";i:6;s:5:"maybe";i:2;s:10:"notcovered";i:1;s:5:"total";i:9;s:10:"percentage";d:88.8900000000000005684341886080801486968994140625;s:4:"type";s:7:"covered";}s:29:"Doctrine_Connection_Statement";a:6:{s:7:"covered";i:41;s:5:"maybe";i:29;s:10:"notcovered";i:22;s:5:"total";i:92;s:10:"percentage";d:76.090000000000003410605131648480892181396484375;s:4:"type";s:7:"covered";}}} \ No newline at end of file diff --git a/tests/coverage/index.php b/tests/coverage/index.php new file mode 100644 index 000000000..45959283c --- /dev/null +++ b/tests/coverage/index.php @@ -0,0 +1,61 @@ +. + */ + +require_once dirname(__FILE__) . '/../../lib/Doctrine.php'; +require_once dirname(__FILE__) . '/../DoctrineTest/Coverage.php'; +$reporter = new DoctrineTest_Coverage(); +$svn_info = explode(" ", exec("svn info | grep Revision")); +$revision = $svn_info[1]; + + +?> + + + + + +

Coverage report for Doctrine

+

Report generated against revision getRevision(); ?> current HEAD revision is .

+ getRevision()){ + echo "

This coverage report is outdated. Please generate a new one by executing the testrunner with the coverage flag

"; + } + ?> +

Default mode shows results sorted by percentage. This can be changed with GET variables:

  • order = covered|total|maybe|notcovered|percentage
  • desc=true

+ + + + + + + + + + + showSummary(); ?> +
PercentageTotalCoveredMaybeNot Covered
+ + diff --git a/tests/run.php b/tests/run.php index e71e546ef..989a1f425 100644 --- a/tests/run.php +++ b/tests/run.php @@ -1,102 +1,23 @@ 3) { - $file = str_replace('_', DIRECTORY_SEPARATOR, $file); - } else { - $file = str_replace('_', '', $file); - } - - // create a test case file if it doesn't exist - - if ( ! file_exists($file)) { - $contents = file_get_contents('template.tpl'); - $contents = sprintf($contents, $class, $class); - - if ( ! file_exists($dir)) { - mkdir($dir, 0777); - } - - file_put_contents($file, $contents); - } - require_once($file); - - return true; -} - -// include doctrine, and register it's autoloader +require_once(dirname(__FILE__) . '/DoctrineTest.php'); require_once dirname(__FILE__) . '/../lib/Doctrine.php'; spl_autoload_register(array('Doctrine', 'autoload')); +spl_autoload_register(array('DoctrineTest','autoload')); -// register the autoloader function above -spl_autoload_register('autoload'); - -// include the models -$models = new DirectoryIterator(dirname(__FILE__) . '/../models/'); -foreach($models as $key => $file) { - if ($file->isFile() && ! $file->isDot()) { - $e = explode('.', $file->getFileName()); - if (end($e) === 'php') { - require_once $file->getPathname(); - } - } -} - -require_once dirname(__FILE__) . '/Test.php'; -require_once dirname(__FILE__) . '/UnitTestCase.php'; - -error_reporting(E_ALL | E_STRICT); - -$test = new GroupTest('Doctrine Framework Unit Tests'); - +$test = new DoctrineTest(); //TICKET test cases -$tickets = new GroupTest('Tickets tests'); +$tickets = new GroupTest('Tickets tests', 'tickets'); $tickets->addTestCase(new Doctrine_Ticket_Njero_TestCase()); $tickets->addTestCase(new Doctrine_Ticket_428_TestCase()); //If you write a ticket testcase add it here like shown above! $test->addTestCase($tickets); // Connection drivers (not yet fully tested) -$driver = new GroupTest("Driver tests"); +$driver = new GroupTest("Driver tests", 'driver'); $driver->addTestCase(new Doctrine_Connection_Pgsql_TestCase()); $driver->addTestCase(new Doctrine_Connection_Oracle_TestCase()); $driver->addTestCase(new Doctrine_Connection_Sqlite_TestCase()); @@ -107,7 +28,7 @@ $driver->addTestCase(new Doctrine_Connection_Informix_TestCase()); $test->addTestCase($driver); // Transaction module (FULLY TESTED) -$transaction = new GroupTest("Transaction tests"); +$transaction = new GroupTest("Transaction tests", 'transaction'); $transaction->addTestCase(new Doctrine_Transaction_TestCase()); $transaction->addTestCase(new Doctrine_Transaction_Firebird_TestCase()); $transaction->addTestCase(new Doctrine_Transaction_Informix_TestCase()); @@ -119,7 +40,7 @@ $transaction->addTestCase(new Doctrine_Transaction_Sqlite_TestCase()); $test->addTestCase($transaction); // DataDict module (FULLY TESTED) -$data_dict = new GroupTest('DataDict tests'); +$data_dict = new GroupTest('DataDict tests', 'data_dict'); $data_dict->addTestCase(new Doctrine_DataDict_TestCase()); $data_dict->addTestCase(new Doctrine_DataDict_Firebird_TestCase()); $data_dict->addTestCase(new Doctrine_DataDict_Informix_TestCase()); @@ -131,7 +52,7 @@ $data_dict->addTestCase(new Doctrine_DataDict_Sqlite_TestCase()); $test->addTestCase($data_dict); // Sequence module (not yet fully tested) -$sequence = new GroupTest('Sequence tests'); +$sequence = new GroupTest('Sequence tests','sequence'); $sequence->addTestCase(new Doctrine_Sequence_TestCase()); $sequence->addTestCase(new Doctrine_Sequence_Firebird_TestCase()); $sequence->addTestCase(new Doctrine_Sequence_Informix_TestCase()); @@ -143,7 +64,7 @@ $sequence->addTestCase(new Doctrine_Sequence_Sqlite_TestCase()); $test->addTestCase($sequence); // Export module (not yet fully tested) -$export = new GroupTest('Export tests'); +$export = new GroupTest('Export tests','export'); //$export->addTestCase(new Doctrine_Export_Reporter_TestCase()); $export->addTestCase(new Doctrine_Export_Firebird_TestCase()); $export->addTestCase(new Doctrine_Export_Informix_TestCase()); @@ -159,7 +80,7 @@ $test->addTestCase($export); //$test->addTestCase(new Doctrine_CascadingDelete_TestCase()); // Import module (not yet fully tested) -$import = new GroupTest('Import tests'); +$import = new GroupTest('Import tests','import'); //$import->addTestCase(new Doctrine_Import_TestCase()); $import->addTestCase(new Doctrine_Import_Firebird_TestCase()); $import->addTestCase(new Doctrine_Import_Informix_TestCase()); @@ -171,7 +92,7 @@ $import->addTestCase(new Doctrine_Import_Sqlite_TestCase()); $test->addTestCase($import); // Expression module (not yet fully tested) -$expression = new GroupTest('Expression tests'); +$expression = new GroupTest('Expression tests','expression'); $expression->addTestCase(new Doctrine_Expression_TestCase()); $expression->addTestCase(new Doctrine_Expression_Driver_TestCase()); $expression->addTestCase(new Doctrine_Expression_Firebird_TestCase()); @@ -184,7 +105,7 @@ $expression->addTestCase(new Doctrine_Expression_Sqlite_TestCase()); $test->addTestCase($expression); // Core -$core = new GroupTest('Core tests: Access, Configurable, Manager, Connection, Table, UnitOfWork, Collection, Hydrate, Tokenizer'); +$core = new GroupTest('Core tests: Access, Configurable, Manager, Connection, Table, UnitOfWork, Collection, Hydrate, Tokenizer','core'); $core->addTestCase(new Doctrine_Access_TestCase()); //$core->addTestCase(new Doctrine_Configurable_TestCase()); $core->addTestCase(new Doctrine_Manager_TestCase()); @@ -201,7 +122,7 @@ $core->addTestCase(new Doctrine_Hydrate_TestCase()); $test->addTestCase($core); // Relation handling -$relation = new GroupTest('Relation tests: includes TreeStructure'); +$relation = new GroupTest('Relation tests: includes TreeStructure','relation'); $relation->addTestCase(new Doctrine_TreeStructure_TestCase()); $relation->addTestCase(new Doctrine_Relation_TestCase()); //$relation->addTestCase(new Doctrine_Relation_Access_TestCase()); @@ -214,13 +135,13 @@ $relation->addTestCase(new Doctrine_Relation_Parser_TestCase()); $test->addTestCase($relation); // Datatypes -$data_types = new GroupTest('DataTypes tests: Enum and Boolean'); +$data_types = new GroupTest('DataTypes tests: Enum and Boolean','data_types'); $data_types->addTestCase(new Doctrine_DataType_Enum_TestCase()); $data_types->addTestCase(new Doctrine_DataType_Boolean_TestCase()); $test->addTestCase($data_types); // Utility components -$plugins = new GroupTest('Plugin tests: View, Validator, Hook'); +$plugins = new GroupTest('Plugin tests: View, Validator, Hook','plugins'); //$utility->addTestCase(new Doctrine_PessimisticLocking_TestCase()); $plugins->addTestCase(new Doctrine_View_TestCase()); $plugins->addTestCase(new Doctrine_AuditLog_TestCase()); @@ -232,19 +153,19 @@ $plugins->addTestCase(new Doctrine_I18n_TestCase()); $test->addTestCase($plugins); // Db component -$db = new GroupTest('Db tests: Db and Profiler'); +$db = new GroupTest('Db tests: Db and Profiler','db'); $db->addTestCase(new Doctrine_Db_TestCase()); $db->addTestCase(new Doctrine_Connection_Profiler_TestCase()); $test->addTestCase($db); // Eventlisteners -$event_listener = new GroupTest('EventListener tests'); +$event_listener = new GroupTest('EventListener tests','event_listener'); $event_listener->addTestCase(new Doctrine_EventListener_TestCase()); $event_listener->addTestCase(new Doctrine_EventListener_Chain_TestCase()); $test->addTestCase($event_listener); // Query tests -$query_tests = new GroupTest('Query tests'); +$query_tests = new GroupTest('Query tests','query_test'); $query_tests->addTestCase(new Doctrine_Query_Condition_TestCase()); $query_tests->addTestCase(new Doctrine_Query_MultiJoin_TestCase()); $query_tests->addTestCase(new Doctrine_Query_MultiJoin2_TestCase()); @@ -279,7 +200,7 @@ $query_tests->addTestCase(new Doctrine_Query_Registry_TestCase()); $test->addTestCase($query_tests); // Record -$record = new GroupTest('Record tests'); +$record = new GroupTest('Record tests','record'); $record->addTestCase(new Doctrine_Record_Filter_TestCase()); $record->addTestCase(new Doctrine_Record_TestCase()); $record->addTestCase(new Doctrine_Record_State_TestCase()); @@ -316,14 +237,14 @@ $test->addTestCase(new Doctrine_Template_TestCase()); $test->addTestCase(new Doctrine_NestedSet_SingleRoot_TestCase()); // Search tests -$search = new GroupTest('Search tests'); +$search = new GroupTest('Search tests','search'); $search->addTestCase(new Doctrine_Search_TestCase()); $search->addTestCase(new Doctrine_Search_Query_TestCase()); $test->addTestCase($search); // Cache tests -$cache = new GroupTest('Cache tests'); +$cache = new GroupTest('Cache tests','cache'); $cache->addTestCase(new Doctrine_Query_Cache_TestCase()); $cache->addTestCase(new Doctrine_Cache_Apc_TestCase()); //$cache->addTestCase(new Doctrine_Cache_Memcache_TestCase()); @@ -335,119 +256,8 @@ $cache->addTestCase(new Doctrine_Cache_Apc_TestCase()); $test->addTestCase($cache); $test->addTestCase(new Doctrine_Query_ApplyInheritance_TestCase()); - $test->addTestCase(new Doctrine_Migration_TestCase()); - $test->addTestCase(new Doctrine_Import_Schema_TestCase()); - $test->addTestCase(new Doctrine_Export_Schema_TestCase()); -class CliReporter extends HtmlReporter{ - public function paintHeader(){ - echo "Doctrine UnitTests\n"; - echo "====================\n"; - } - public function paintFooter(){ - echo "\n"; - foreach ($this->_test->getMessages() as $message) { - print $message . "\n"; - } - echo "====================\n"; - print "Tested: " . $this->_test->getTestCaseCount() . ' test cases' ."\n"; - print "Successes: " . $this->_test->getPassCount() . " passes. \n"; - print "Failures: " . $this->_test->getFailCount() . " fails. \n"; - } -} - -class MyReporter extends HtmlReporter { - public function paintHeader() { -?> - - - Doctrine Unit Tests - - - - - -

Doctrine Unit Tests

-'; - foreach ($this->_test->getMessages() as $message) { - print "

$message

"; - } - print ''; - $colour = ($this->_test->getFailCount() > 0 ? 'red' : 'green'); - print '
'; - print $this->_test->getTestCaseCount() . ' test cases.'; - print '' . $this->_test->getPassCount() . ' passes and '; - print '' . $this->_test->getFailCount() . ' fails.'; - print '
'; - } -} - - -?> -addTestCase(new $group); - } - die($group . " is not a valid group of tests\n"); - } - $testGroup->addTestCase($$group); - } -} else { - $testGroup = $test; -} -$filter = ''; -if (isset($options['filter'])) { - $filter = $options['filter']; -} - -if (isset($options['help'])) { - echo "Doctrine test runner help\n"; - echo "===========================\n"; - echo " To run all tests simply run this script without arguments. \n"; - echo "\n Flags:\n"; - echo " -coverage will generate coverage report data that can be viewed with the cc.php script in this folder. NB! This takes time. You need xdebug to run this\n"; - echo " -group Use this option to run just a group of tests or tests with a given classname. Groups are currently defined as the variable name they are called in this script.\n"; - echo " -filter case insensitive strings that will be applied to the className of the tests. A test_classname must contain all of these strings to be run\n"; - echo "\nAvailable groups:\n tickets, transaction, driver, data_dict, sequence, export, import, expression, core, relation, data_types, utility, db, event_listener, query_tests, record, cache\n"; - die(); -} - -if (isset($options['coverage'])) { - xdebug_start_code_coverage(XDEBUG_CC_UNUSED | XDEBUG_CC_DEAD_CODE); - $testGroup->run($reporter, $filter); - $result['path'] = Doctrine::getPath() . DIRECTORY_SEPARATOR; - $result['coverage'] = xdebug_get_code_coverage(); - xdebug_stop_code_coverage(); - file_put_contents('coverage.txt', serialize($result)); -} else { - $testGroup->run($reporter, $filter); -} +$test->run();