From 27b369a5f322426b44c89e0545aab2ef74b3007b Mon Sep 17 00:00:00 2001 From: "Jonathan.Wage" <Jonathan.Wage@625475ce-881a-0410-a577-b389adb331d8> Date: Sun, 21 Oct 2007 06:23:59 +0000 Subject: [PATCH] Mass search and replace for coding standards changes, doc block formatting, and code spacing. --- draft/DB.php | 28 + draft/EXAMPLE2.tree.php | 2 +- draft/Node.php | 3 +- draft/Node/AdjacencyList.php | 1 + .../Node/AdjacencyList/LevelOrderIterator.php | 1 + .../Node/AdjacencyList/PostOrderIterator.php | 1 + draft/Node/AdjacencyList/PreOrderIterator.php | 1 + draft/Node/Exception.php | 1 + draft/Node/Interface.php | 1 + draft/Node/MaterializedPath.php | 1 + .../MaterializedPath/LevelOrderIterator.php | 1 + .../MaterializedPath/PostOrderIterator.php | 1 + .../MaterializedPath/PreOrderIterator.php | 1 + draft/Node/NestedSet.php | 11 +- draft/Node/NestedSet/LevelOrderIterator.php | 1 + draft/Node/NestedSet/PostOrderIterator.php | 1 + draft/Node/NestedSet/PreOrderIterator.php | 9 +- draft/Query/Where.php | 3 + draft/Table.php | 85 +- draft/Tree.php | 2 +- draft/Tree/AdjacencyList.php | 1 + draft/Tree/Exception.php | 1 + draft/Tree/Interface.php | 1 + draft/Tree/MaterializedPath.php | 1 + draft/Tree/NestedSet.php | 19 +- draft/new-core/Connection.php | 57 + draft/new-core/Hydrate.php | 45 + draft/new-core/QueryApi.php | 15 + draft/new-core/RawSql.php | 6 + draft/new-core/Record.php | 83 +- draft/new-core/Table.php | 82 +- lib/Doctrine.php | 36 +- lib/Doctrine/Access.php | 9 + lib/Doctrine/Adapter/Db2.php | 1 + lib/Doctrine/Adapter/Interface.php | 1 + lib/Doctrine/Adapter/Mock.php | 1 + lib/Doctrine/Adapter/Mysqli.php | 1 + lib/Doctrine/Adapter/Oracle.php | 5 + lib/Doctrine/Adapter/Statement.php | 2 + lib/Doctrine/Adapter/Statement/Interface.php | 18 + lib/Doctrine/Adapter/Statement/Mock.php | 16 + lib/Doctrine/AuditLog.php | 1 + lib/Doctrine/Cache.php | 22 + lib/Doctrine/Cache/Apc.php | 4 + lib/Doctrine/Cache/Array.php | 5 + lib/Doctrine/Cache/Db.php | 11 +- lib/Doctrine/Cache/Driver.php | 4 +- lib/Doctrine/Cache/Memcache.php | 5 + lib/Doctrine/Cli.php | 20 +- lib/Doctrine/Cli/AnsiColorFormatter.php | 8 +- lib/Doctrine/Cli/Formatter.php | 2 +- lib/Doctrine/Collection.php | 38 + lib/Doctrine/Collection/Exception.php | 1 + lib/Doctrine/Collection/Iterator.php | 8 + lib/Doctrine/Collection/Offset.php | 3 + lib/Doctrine/Column.php | 11 + lib/Doctrine/Compiler.php | 7 +- lib/Doctrine/Compiler/Exception.php | 1 + lib/Doctrine/Configurable.php | 18 + lib/Doctrine/Connection.php | 60 + lib/Doctrine/Connection/Exception.php | 4 + lib/Doctrine/Connection/Firebird.php | 3 + .../Connection/Firebird/Exception.php | 2 + lib/Doctrine/Connection/Informix.php | 1 + lib/Doctrine/Connection/Mock.php | 1 + lib/Doctrine/Connection/Module.php | 5 + lib/Doctrine/Connection/Mssql.php | 5 + lib/Doctrine/Connection/Mssql/Exception.php | 1 + lib/Doctrine/Connection/Mysql.php | 3 + lib/Doctrine/Connection/Mysql/Exception.php | 1 + lib/Doctrine/Connection/Oracle.php | 2 + lib/Doctrine/Connection/Oracle/Exception.php | 1 + lib/Doctrine/Connection/Pgsql.php | 5 + lib/Doctrine/Connection/Pgsql/Exception.php | 1 + lib/Doctrine/Connection/Profiler.php | 9 + lib/Doctrine/Connection/Sqlite.php | 3 + lib/Doctrine/Connection/Sqlite/Exception.php | 1 + lib/Doctrine/Connection/Statement.php | 21 + lib/Doctrine/Connection/UnitOfWork.php | 10 + lib/Doctrine/Data.php | 39 +- lib/Doctrine/Data/Export.php | 26 +- lib/Doctrine/Data/Import.php | 24 +- lib/Doctrine/DataDict.php | 2 + lib/Doctrine/DataDict/Firebird.php | 3 + lib/Doctrine/DataDict/Mssql.php | 1 + lib/Doctrine/DataDict/Mysql.php | 4 + lib/Doctrine/DataDict/Oracle.php | 1 + lib/Doctrine/DataDict/Pgsql.php | 3 + lib/Doctrine/DataDict/Sqlite.php | 2 + lib/Doctrine/Db.php | 1 + lib/Doctrine/Event.php | 22 + lib/Doctrine/EventListener/Chain.php | 18 + lib/Doctrine/Exception.php | 2 + lib/Doctrine/Export.php | 42 +- lib/Doctrine/Export/Firebird.php | 12 + lib/Doctrine/Export/Frontbase.php | 6 + lib/Doctrine/Export/Mssql.php | 3 + lib/Doctrine/Export/Mysql.php | 11 + lib/Doctrine/Export/Oracle.php | 8 + lib/Doctrine/Export/Pgsql.php | 4 + lib/Doctrine/Export/Schema.php | 23 +- lib/Doctrine/Export/Sqlite.php | 5 + lib/Doctrine/Expression/Driver.php | 18 + lib/Doctrine/Expression/Firebird.php | 1 + lib/Doctrine/Expression/Mssql.php | 3 + lib/Doctrine/Expression/Mysql.php | 3 + lib/Doctrine/Expression/Oracle.php | 4 + lib/Doctrine/Expression/Pgsql.php | 2 + lib/Doctrine/Expression/Sqlite.php | 7 + lib/Doctrine/FileFinder.php | 32 +- lib/Doctrine/Formatter.php | 7 + lib/Doctrine/Hook.php | 10 + lib/Doctrine/Hook/Parser.php | 2 + lib/Doctrine/Hook/Parser/Complex.php | 2 + lib/Doctrine/Hydrate.php | 62 + lib/Doctrine/Hydrate/Record.php | 1 + lib/Doctrine/I18n.php | 1 + lib/Doctrine/Import.php | 2 +- lib/Doctrine/Import/Builder.php | 124 +- lib/Doctrine/Import/Builder/BaseClass.php | 1 + lib/Doctrine/Import/Builder/Exception.php | 1 + lib/Doctrine/Import/Firebird.php | 6 + lib/Doctrine/Import/Mssql.php | 7 + lib/Doctrine/Import/Mysql.php | 7 + lib/Doctrine/Import/Oracle.php | 11 + lib/Doctrine/Import/Pgsql.php | 7 + lib/Doctrine/Import/Reader.php | 1 + lib/Doctrine/Import/Reader/Exception.php | 1 + lib/Doctrine/Import/Schema.php | 126 +- lib/Doctrine/Import/Sqlite.php | 10 + lib/Doctrine/Lib.php | 8 +- lib/Doctrine/Locator.php | 29 +- lib/Doctrine/Locator/Injectable.php | 7 + lib/Doctrine/Locking/Manager/Pessimistic.php | 2 + lib/Doctrine/Manager.php | 33 +- lib/Doctrine/Manager/Exception.php | 1 + lib/Doctrine/Migration.php | 66 +- lib/Doctrine/Migration/Builder.php | 16 +- lib/Doctrine/Migration/Exception.php | 4 +- .../IrreversibleMigrationException.php | 4 +- lib/Doctrine/Migration/Process.php | 111 +- lib/Doctrine/Node.php | 3 +- lib/Doctrine/Node/AdjacencyList.php | 1 + .../Node/AdjacencyList/LevelOrderIterator.php | 1 + .../Node/AdjacencyList/PostOrderIterator.php | 1 + .../Node/AdjacencyList/PreOrderIterator.php | 1 + lib/Doctrine/Node/Exception.php | 1 + lib/Doctrine/Node/Interface.php | 1 + lib/Doctrine/Node/MaterializedPath.php | 1 + .../MaterializedPath/LevelOrderIterator.php | 1 + .../MaterializedPath/PostOrderIterator.php | 1 + .../MaterializedPath/PreOrderIterator.php | 1 + lib/Doctrine/Node/NestedSet.php | 9 +- .../Node/NestedSet/LevelOrderIterator.php | 1 + .../Node/NestedSet/PostOrderIterator.php | 1 + .../Node/NestedSet/PreOrderIterator.php | 7 + lib/Doctrine/Null.php | 1 + lib/Doctrine/Parser.php | 23 +- lib/Doctrine/Parser/Json.php | 38 +- lib/Doctrine/Parser/Serialize.php | 12 +- lib/Doctrine/Parser/Xml.php | 67 +- lib/Doctrine/Parser/Yml.php | 24 +- lib/Doctrine/Parser/spyc.php | 39 +- lib/Doctrine/Plugin.php | 8 + lib/Doctrine/Query.php | 38 + lib/Doctrine/Query/Abstract.php | 22 +- lib/Doctrine/Query/Check.php | 6 + lib/Doctrine/Query/Filter.php | 1 + lib/Doctrine/Query/Filter/Chain.php | 5 + lib/Doctrine/Query/Having.php | 1 + lib/Doctrine/Query/Part.php | 2 + lib/Doctrine/Query/Where.php | 1 + lib/Doctrine/RawSql.php | 5 + lib/Doctrine/Record.php | 75 +- lib/Doctrine/Record/Abstract.php | 13 + lib/Doctrine/Record/Filter.php | 2 + lib/Doctrine/Record/Filter/Compound.php | 1 + lib/Doctrine/Record/Filter/Standard.php | 1 + lib/Doctrine/Record/Iterator.php | 4 + lib/Doctrine/Record/Listener/Chain.php | 3 + lib/Doctrine/Relation.php | 17 + lib/Doctrine/Relation/Association.php | 2 + lib/Doctrine/Relation/ForeignKey.php | 1 + lib/Doctrine/Relation/LocalKey.php | 2 +- lib/Doctrine/Relation/Nest.php | 1 + lib/Doctrine/Relation/Parser.php | 14 + lib/Doctrine/Resource/Client.php | 6 +- lib/Doctrine/Resource/Collection.php | 6 +- lib/Doctrine/Resource/Query.php | 24 +- lib/Doctrine/Resource/Record.php | 20 +- lib/Doctrine/Resource/Server.php | 16 +- lib/Doctrine/Search/Query.php | 1 + lib/Doctrine/Sequence.php | 2 + lib/Doctrine/Sequence/Firebird.php | 2 + lib/Doctrine/Sequence/Mssql.php | 2 + lib/Doctrine/Sequence/Mysql.php | 2 + lib/Doctrine/Sequence/Oracle.php | 2 + lib/Doctrine/Sequence/Pgsql.php | 2 + lib/Doctrine/Sequence/Sqlite.php | 2 + lib/Doctrine/Table.php | 72 +- lib/Doctrine/Table/Repository.php | 12 + lib/Doctrine/Task.php | 34 +- lib/Doctrine/Task/DumpData.php | 2 +- lib/Doctrine/Template.php | 4 + lib/Doctrine/Template/I18n.php | 2 + lib/Doctrine/Template/NestedSet.php | 1 + lib/Doctrine/Template/Versionable.php | 1 + lib/Doctrine/Tokenizer.php | 5 + lib/Doctrine/Transaction.php | 10 + lib/Doctrine/Transaction/Firebird.php | 3 + lib/Doctrine/Transaction/Mysql.php | 4 + lib/Doctrine/Transaction/Oracle.php | 3 + lib/Doctrine/Transaction/Pgsql.php | 3 + lib/Doctrine/Tree.php | 2 +- lib/Doctrine/Tree/AdjacencyList.php | 1 + lib/Doctrine/Tree/Exception.php | 1 + lib/Doctrine/Tree/Interface.php | 1 + lib/Doctrine/Tree/MaterializedPath.php | 1 + lib/Doctrine/Tree/NestedSet.php | 19 +- lib/Doctrine/Validator.php | 6 + lib/Doctrine/Validator/Country.php | 2 + lib/Doctrine/Validator/Driver.php | 6 + lib/Doctrine/Validator/ErrorStack.php | 2 + lib/Doctrine/Validator/Exception.php | 2 + lib/Doctrine/Validator/Usstate.php | 1 + lib/Doctrine/View.php | 12 + .../Configuration - List of attributes.php | 7 + ...guage) - Operators - Logical operators.php | 2 +- manual/index.php | 8 +- manual/lib/Text/Wiki/Parse/Doc/Code.php | 4 +- manual/lib/highlight.php | 2 +- manual/scripts/mootools.v1.11.js | 2 +- models/QueryTest_Board.php | 2 +- models/QueryTest_Category.php | 4 +- models/QueryTest_Entry.php | 2 +- models/QueryTest_User.php | 2 +- models/User.php | 1 + tests/CustomResultSetOrderTestCase.php | 5 +- tests/DBTestCase.php | 1 + tests/EventListenerTestCase.php | 1 + tests/Export/SqliteTestCase.php | 1 + tests/Expression/DriverTestCase.php | 6 +- tests/PessimisticLockingTestCase.php | 6 +- tests/Query/IdentifierQuotingTestCase.php | 1 + tests/Query/OneToOneFetchingTestCase.php | 3 +- tests/Query/ReferenceModelTestCase.php | 1 + tests/Record/StateTestCase.php | 1 + tests/ValidatorTestCase.php | 2 +- tests/coverage/Doctrine.html | 1808 ++++++++--------- tests/coverage/Doctrine_Export.html | 2 +- tests/coverage/Doctrine_Export_Schema.html | 2 +- tests/coverage/Doctrine_Import_Builder.html | 12 +- tests/coverage/Doctrine_Import_Schema.html | 6 +- tests/coverage/Doctrine_Migration.html | 2 +- tests/coverage/Doctrine_Parser.html | 2 +- tests/coverage/Doctrine_Record.html | 2 +- tests/coverage/Doctrine_Table.html | 4 +- vendor/PEAR.php | 16 +- vendor/Sensei/Sensei.php | 7 +- vendor/Sensei/Sensei/Doc/Renderer/Pdf.php | 2 +- vendor/Sensei/Sensei/Doc/Renderer/Xhtml.php | 6 +- vendor/Sensei/Sensei/Doc/Section.php | 46 +- vendor/Sensei/Sensei/Doc/Toc.php | 6 +- vendor/Text/Wiki.php | 48 +- vendor/Text/Wiki/Parse/Default/Center.php | 2 +- vendor/Text/Wiki/Parse/Default/Code.php | 4 +- vendor/Text/Wiki/Parse/Default/Freelink.php | 2 +- vendor/Text/Wiki/Parse/Default/Heading.php | 4 +- vendor/Text/Wiki/Parse/Default/Image.php | 2 +- vendor/Text/Wiki/Parse/Default/List.php | 4 +- vendor/Text/Wiki/Parse/Default/Wikilink.php | 2 +- vendor/Text/Wiki/Render/Latex/Blockquote.php | 2 +- vendor/Text/Wiki/Render/Latex/Colortext.php | 2 +- vendor/Text/Wiki/Render/Latex/Font.php | 2 +- vendor/Text/Wiki/Render/Latex/Image.php | 2 +- vendor/Text/Wiki/Render/Latex/Phplookup.php | 2 +- vendor/Text/Wiki/Render/Plain/Phplookup.php | 2 +- vendor/Text/Wiki/Render/Xhtml/Colortext.php | 2 +- vendor/Text/Wiki/Render/Xhtml/Image.php | 6 +- vendor/Text/Wiki/Render/Xhtml/Url.php | 2 +- vendor/Text/Wiki/Render/Xhtml/Wikilink.php | 6 +- vendor/spikephpcoverage/CoverageRecorder.php | 8 +- vendor/spikephpcoverage/PEAR.php | 8 +- vendor/spikephpcoverage/XML/Parser.php | 18 +- vendor/spikephpcoverage/XML/Parser/Simple.php | 4 +- vendor/spikephpcoverage/cli/driver.php | 18 +- vendor/spikephpcoverage/cli/instrument.php | 26 +- .../parser/BasicXmlParser.php | 2 +- .../parser/CoverageXmlParser.php | 4 +- vendor/spikephpcoverage/parser/PHPParser.php | 4 +- vendor/spikephpcoverage/parser/Parser.php | 6 +- vendor/spikephpcoverage/phpcoverage.inc.php | 2 +- .../phpcoverage.remote.bottom.inc.php | 4 +- .../phpcoverage.remote.top.inc.php | 10 +- .../remote/RemoteCoverageRecorder.php | 16 +- .../remote/XdebugTraceReader.php | 8 +- .../reporter/CoverageReporter.php | 8 +- .../reporter/HtmlCoverageReporter.php | 12 +- .../spikephpcoverage/util/CoverageLogger.php | 2 +- vendor/spikephpcoverage/util/Utility.php | 6 +- 300 files changed, 3316 insertions(+), 1558 deletions(-) diff --git a/draft/DB.php b/draft/DB.php index e249a3599..9174680c6 100644 --- a/draft/DB.php +++ b/draft/DB.php @@ -66,18 +66,22 @@ class Doctrine_Db2 implements Countable, IteratorAggregate, Doctrine_Adapter_Int const ERR_MANAGER_PARSE = -33; const ERR_LOADMODULE = -34; const ERR_INSUFFICIENT_DATA = -35; + /** * @var array $instances all the instances of this class */ protected static $instances = array(); + /** * @var array $isConnected whether or not a connection has been established */ protected $isConnected = false; + /** * @var PDO $dbh the database handler */ protected $dbh; + /** * @var array $options */ @@ -85,11 +89,13 @@ class Doctrine_Db2 implements Countable, IteratorAggregate, Doctrine_Adapter_Int 'username' => null, 'password' => null, ); + /** * @var Doctrine_Db_EventListener_Interface|Doctrine_Overloadable $listener * listener for listening events */ protected $listener; + /** * @var integer $querySequence */ @@ -125,12 +131,14 @@ class Doctrine_Db2 implements Countable, IteratorAggregate, Doctrine_Adapter_Int public function nextQuerySequence() { return ++$this->querySequence; } + /** * getQuerySequence */ public function getQuerySequence() { return $this->querySequence; } + /** * getDBH */ @@ -143,6 +151,7 @@ class Doctrine_Db2 implements Countable, IteratorAggregate, Doctrine_Adapter_Int return $this->options[$name]; } + /** * addListener * @@ -157,6 +166,7 @@ class Doctrine_Db2 implements Countable, IteratorAggregate, Doctrine_Adapter_Int return $this; } + /** * getListener * @@ -165,6 +175,7 @@ class Doctrine_Db2 implements Countable, IteratorAggregate, Doctrine_Adapter_Int public function getListener() { return $this->listener; } + /** * setListener * @@ -209,6 +220,7 @@ class Doctrine_Db2 implements Countable, IteratorAggregate, Doctrine_Adapter_Int public static function getConnection($dsn = null, $username = null, $password = null) { return new self($dsn, $username, $password); } + /** * driverName * converts a driver name like (oracle) to appropriate PDO @@ -223,6 +235,7 @@ class Doctrine_Db2 implements Countable, IteratorAggregate, Doctrine_Adapter_Int return $name; } + /** * parseDSN * @@ -301,6 +314,7 @@ class Doctrine_Db2 implements Countable, IteratorAggregate, Doctrine_Adapter_Int public function errorCode() { return $this->dbh->errorCode(); } + /** * errorInfo * Fetch extended error information associated with the last operation on the database handle @@ -310,6 +324,7 @@ class Doctrine_Db2 implements Countable, IteratorAggregate, Doctrine_Adapter_Int public function errorInfo() { return $this->dbh->errorInfo(); } + /** * prepare * @@ -330,6 +345,7 @@ class Doctrine_Db2 implements Countable, IteratorAggregate, Doctrine_Adapter_Int return $stmt; } + /** * query * @@ -355,6 +371,7 @@ class Doctrine_Db2 implements Countable, IteratorAggregate, Doctrine_Adapter_Int return $stmt; } + /** * quote * quotes a string for use in a query @@ -367,6 +384,7 @@ class Doctrine_Db2 implements Countable, IteratorAggregate, Doctrine_Adapter_Int return $this->dbh->quote($input); } + /** * exec * executes an SQL statement and returns the number of affected rows @@ -389,6 +407,7 @@ class Doctrine_Db2 implements Countable, IteratorAggregate, Doctrine_Adapter_Int return $rows; } + /** * fetchAll * @@ -418,6 +437,7 @@ class Doctrine_Db2 implements Countable, IteratorAggregate, Doctrine_Adapter_Int public function fetchBoth($statement, array $params = array()) { return $this->query($statement, $params)->fetchAll(PDO::FETCH_BOTH); } + /** * lastInsertId * @@ -428,6 +448,7 @@ class Doctrine_Db2 implements Countable, IteratorAggregate, Doctrine_Adapter_Int return $this->dbh->lastInsertId(); } + /** * begins a transaction * @@ -444,6 +465,7 @@ class Doctrine_Db2 implements Countable, IteratorAggregate, Doctrine_Adapter_Int return $return; } + /** * commits a transaction * @@ -460,6 +482,7 @@ class Doctrine_Db2 implements Countable, IteratorAggregate, Doctrine_Adapter_Int return $return; } + /** * rollBack * @@ -476,6 +499,7 @@ class Doctrine_Db2 implements Countable, IteratorAggregate, Doctrine_Adapter_Int $this->listener->onRollback($event); } + /** * getAttribute * retrieves a database connection attribute @@ -488,12 +512,14 @@ class Doctrine_Db2 implements Countable, IteratorAggregate, Doctrine_Adapter_Int return $this->dbh->getAttribute($attribute); } + /** * returns an array of available PDO drivers */ public static function getAvailableDrivers() { return PDO::getAvailableDrivers(); } + /** * setAttribute * sets an attribute @@ -507,6 +533,7 @@ class Doctrine_Db2 implements Countable, IteratorAggregate, Doctrine_Adapter_Int $this->dbh->setAttribute($attribute, $value); } + /** * getIterator * @@ -516,6 +543,7 @@ class Doctrine_Db2 implements Countable, IteratorAggregate, Doctrine_Adapter_Int if($this->listener instanceof Doctrine_Db_Profiler) return $this->listener; } + /** * count * returns the number of executed queries diff --git a/draft/EXAMPLE2.tree.php b/draft/EXAMPLE2.tree.php index 5f9f5ba06..65f942f96 100644 --- a/draft/EXAMPLE2.tree.php +++ b/draft/EXAMPLE2.tree.php @@ -9,7 +9,7 @@ function __autoload($classname) { if (class_exists($classname)) { return false; } - if (! $path) { + if ( ! $path) { $path = dirname(__FILE__); } $classpath = str_replace('Doctrine_', '',$classname); diff --git a/draft/Node.php b/draft/Node.php index 4ff072bf4..861b93ddc 100644 --- a/draft/Node.php +++ b/draft/Node.php @@ -18,6 +18,7 @@ * and is licensed under the LGPL. For more information, see * <http://www.phpdoctrine.com>. */ + /** * Doctrine_Node * @@ -75,7 +76,7 @@ class Doctrine_Node implements IteratorAggregate { $class = 'Doctrine_Node_' . $implName; - if (!class_exists($class)) { + if ( ! class_exists($class)) { throw new Doctrine_Node_Exception("The class $class must exist and extend Doctrine_Node"); } diff --git a/draft/Node/AdjacencyList.php b/draft/Node/AdjacencyList.php index 8dc1138a6..edf6960ee 100644 --- a/draft/Node/AdjacencyList.php +++ b/draft/Node/AdjacencyList.php @@ -18,6 +18,7 @@ * and is licensed under the LGPL. For more information, see * <http://www.phpdoctrine.com>. */ + /** * Doctrine_Node_AdjacencyList * diff --git a/draft/Node/AdjacencyList/LevelOrderIterator.php b/draft/Node/AdjacencyList/LevelOrderIterator.php index cb0521775..86552feb2 100644 --- a/draft/Node/AdjacencyList/LevelOrderIterator.php +++ b/draft/Node/AdjacencyList/LevelOrderIterator.php @@ -18,6 +18,7 @@ * and is licensed under the LGPL. For more information, see * <http://www.phpdoctrine.com>. */ + /** * Doctrine_Node_AdjacencyList_LevelOrderIterator * diff --git a/draft/Node/AdjacencyList/PostOrderIterator.php b/draft/Node/AdjacencyList/PostOrderIterator.php index 6da50ea39..2d5931f6c 100644 --- a/draft/Node/AdjacencyList/PostOrderIterator.php +++ b/draft/Node/AdjacencyList/PostOrderIterator.php @@ -18,6 +18,7 @@ * and is licensed under the LGPL. For more information, see * <http://www.phpdoctrine.com>. */ + /** * Doctrine_Node_AdjacencyList_PostOrderIterator * diff --git a/draft/Node/AdjacencyList/PreOrderIterator.php b/draft/Node/AdjacencyList/PreOrderIterator.php index 4bf3bd865..89c745bc2 100644 --- a/draft/Node/AdjacencyList/PreOrderIterator.php +++ b/draft/Node/AdjacencyList/PreOrderIterator.php @@ -18,6 +18,7 @@ * and is licensed under the LGPL. For more information, see * <http://www.phpdoctrine.com>. */ + /** * Doctrine_Node_AdjacencyList_PreOrderIterator * diff --git a/draft/Node/Exception.php b/draft/Node/Exception.php index 099bbe673..9b9a6f75f 100644 --- a/draft/Node/Exception.php +++ b/draft/Node/Exception.php @@ -18,6 +18,7 @@ * and is licensed under the LGPL. For more information, see * <http://www.phpdoctrine.com>. */ + /** * Doctrine_Node_Exception * diff --git a/draft/Node/Interface.php b/draft/Node/Interface.php index c6a6ce394..5262aabef 100644 --- a/draft/Node/Interface.php +++ b/draft/Node/Interface.php @@ -18,6 +18,7 @@ * and is licensed under the LGPL. For more information, see * <http://www.phpdoctrine.com>. */ + /** * Doctrine_Node_Interface * diff --git a/draft/Node/MaterializedPath.php b/draft/Node/MaterializedPath.php index 1887bf37d..b521c956a 100644 --- a/draft/Node/MaterializedPath.php +++ b/draft/Node/MaterializedPath.php @@ -18,6 +18,7 @@ * and is licensed under the LGPL. For more information, see * <http://www.phpdoctrine.com>. */ + /** * Doctrine_Node_MaterializedPath * diff --git a/draft/Node/MaterializedPath/LevelOrderIterator.php b/draft/Node/MaterializedPath/LevelOrderIterator.php index fe43dc6c5..f030528a7 100644 --- a/draft/Node/MaterializedPath/LevelOrderIterator.php +++ b/draft/Node/MaterializedPath/LevelOrderIterator.php @@ -18,6 +18,7 @@ * and is licensed under the LGPL. For more information, see * <http://www.phpdoctrine.com>. */ + /** * Doctrine_Node_MaterializedPath_LevelOrderIterator * diff --git a/draft/Node/MaterializedPath/PostOrderIterator.php b/draft/Node/MaterializedPath/PostOrderIterator.php index ae65bd11c..271d706d6 100644 --- a/draft/Node/MaterializedPath/PostOrderIterator.php +++ b/draft/Node/MaterializedPath/PostOrderIterator.php @@ -18,6 +18,7 @@ * and is licensed under the LGPL. For more information, see * <http://www.phpdoctrine.com>. */ + /** * Doctrine_Node_MaterializedPath_PostOrderIterator * diff --git a/draft/Node/MaterializedPath/PreOrderIterator.php b/draft/Node/MaterializedPath/PreOrderIterator.php index e76420d67..b899434f7 100644 --- a/draft/Node/MaterializedPath/PreOrderIterator.php +++ b/draft/Node/MaterializedPath/PreOrderIterator.php @@ -18,6 +18,7 @@ * and is licensed under the LGPL. For more information, see * <http://www.phpdoctrine.com>. */ + /** * Doctrine_Node_MaterializedPath_PreOrderIterator * diff --git a/draft/Node/NestedSet.php b/draft/Node/NestedSet.php index ac6fcb156..26a8d0769 100644 --- a/draft/Node/NestedSet.php +++ b/draft/Node/NestedSet.php @@ -18,6 +18,7 @@ * and is licensed under the LGPL. For more information, see * <http://www.phpdoctrine.com>. */ + /** * Doctrine_Node_NestedSet * @@ -461,7 +462,7 @@ class Doctrine_Node_NestedSet extends Doctrine_Node implements Doctrine_Node_Int return true; } - + /** * Accomplishes moving of nodes between different trees. * Used by the move* methods if the root value of the two nodes are different. @@ -548,7 +549,7 @@ class Doctrine_Node_NestedSet extends Doctrine_Node implements Doctrine_Node_Int throw $e; } } - + /** * moves node as prev sibling of dest record * @@ -616,7 +617,7 @@ class Doctrine_Node_NestedSet extends Doctrine_Node implements Doctrine_Node_Int $this->updateNode($dest->getNode()->getRightValue(), $this->record['level'] - $oldLevel); } } - + /** * Makes this node a root node. Only used in multiple-root trees. * @@ -899,7 +900,7 @@ class Doctrine_Node_NestedSet extends Doctrine_Node implements Doctrine_Node_Int $resultRight = $qRight->execute(); } - + /** * gets record's left value * @@ -947,7 +948,7 @@ class Doctrine_Node_NestedSet extends Doctrine_Node implements Doctrine_Node_Int */ public function getLevel() { - if (!isset($this->level)) { + if ( ! isset($this->level)) { $componentName = $this->record->getTable()->getComponentName(); $q = $this->_tree->getBaseQuery(); $q = $q->where('base.lft < ? AND base.rgt > ?', array($this->getLeftValue(), $this->getRightValue())); diff --git a/draft/Node/NestedSet/LevelOrderIterator.php b/draft/Node/NestedSet/LevelOrderIterator.php index cadaec3e2..7ffc34055 100644 --- a/draft/Node/NestedSet/LevelOrderIterator.php +++ b/draft/Node/NestedSet/LevelOrderIterator.php @@ -18,6 +18,7 @@ * and is licensed under the LGPL. For more information, see * <http://www.phpdoctrine.com>. */ + /** * Doctrine_Node_NestedSet_LevelOrderIterator * diff --git a/draft/Node/NestedSet/PostOrderIterator.php b/draft/Node/NestedSet/PostOrderIterator.php index 12d9d8670..06fd2eb40 100644 --- a/draft/Node/NestedSet/PostOrderIterator.php +++ b/draft/Node/NestedSet/PostOrderIterator.php @@ -18,6 +18,7 @@ * and is licensed under the LGPL. For more information, see * <http://www.phpdoctrine.com>. */ + /** * Doctrine_Node_NestedSet_PostOrderIterator * diff --git a/draft/Node/NestedSet/PreOrderIterator.php b/draft/Node/NestedSet/PreOrderIterator.php index bc2e87d5a..dde5c9e1a 100644 --- a/draft/Node/NestedSet/PreOrderIterator.php +++ b/draft/Node/NestedSet/PreOrderIterator.php @@ -18,6 +18,7 @@ * and is licensed under the LGPL. For more information, see * <http://www.phpdoctrine.com>. */ + /** * Doctrine_Node_NestedSet_PreOrderIterator * @@ -35,26 +36,32 @@ class Doctrine_Node_NestedSet_PreOrderIterator implements Iterator * @var Doctrine_Collection $collection */ protected $collection; + /** * @var array $keys */ protected $keys; + /** * @var mixed $key */ protected $key; + /** * @var integer $index */ protected $index; + /** * @var integer $index */ protected $prevIndex; + /** * @var integer $index */ protected $traverseLevel; + /** * @var integer $count */ @@ -155,7 +162,7 @@ class Doctrine_Node_NestedSet_PreOrderIterator implements Iterator private function updateLevel() { - if (!(isset($this->options['include_record']) && $this->options['include_record'] && $this->index == 0)) { + if ( ! (isset($this->options['include_record']) && $this->options['include_record'] && $this->index == 0)) { $left = $this->collection->get($this->key)->getNode()->getLeftValue(); $this->level += $this->prevLeft - $left + 2; $this->prevLeft = $left; diff --git a/draft/Query/Where.php b/draft/Query/Where.php index e0f2d831e..7fe9313c6 100644 --- a/draft/Query/Where.php +++ b/draft/Query/Where.php @@ -169,6 +169,7 @@ class Doctrine_Query_Where extends Doctrine_Query_Condition } return $where; } + /** * parses an EXISTS expression * @@ -189,6 +190,7 @@ class Doctrine_Query_Where extends Doctrine_Query_Condition return $operator . ' ('.$this->query->createSubquery()->parseQuery($sub, false)->getQuery() . ')'; } + /** * getOperator * @@ -210,6 +212,7 @@ class Doctrine_Query_Where extends Doctrine_Query_Condition } return $operator; } + /** * __toString * return string representation of this object diff --git a/draft/Table.php b/draft/Table.php index 47c5183e1..e6df5ec1a 100644 --- a/draft/Table.php +++ b/draft/Table.php @@ -18,6 +18,7 @@ * and is licensed under the LGPL. For more information, see * <http://www.phpdoctrine.com>. */ + /** * Doctrine_Table represents a database table * each Doctrine_Table holds the information of foreignKeys and associations @@ -36,43 +37,53 @@ class Doctrine_Table extends Doctrine_Configurable implements Countable { * @var array $data temporary data which is then loaded into Doctrine_Record::$data */ private $data = array(); + /** * @var array $relations an array containing all the Doctrine_Relation objects for this table */ private $relations = array(); + /** * @var array $primaryKeys an array containing all primary key column names */ private $primaryKeys = array(); + /** * @var mixed $identifier */ private $identifier; + /** * @see Doctrine_Identifier constants * @var integer $identifierType the type of identifier this table uses */ private $identifierType; + /** * @var string $query cached simple query */ private $query; + /** * @var Doctrine_Connection $conn Doctrine_Connection object that created this table */ private $conn; + /** * @var string $name */ private $name; + /** * @var array $identityMap first level cache */ private $identityMap = array(); + /** * @var Doctrine_Table_Repository $repository record repository */ private $repository; + /** * @var array $columns an array of column definitions, * keys as column names and values as column definitions @@ -90,27 +101,33 @@ class Doctrine_Table extends Doctrine_Configurable implements Countable { * ) */ protected $columns = array(); + /** * @var array $bound bound relations */ private $bound = array(); + /** * @var array $boundAliases bound relation aliases */ private $boundAliases = array(); + /** * @var integer $columnCount cached column count, Doctrine_Record uses this column count in when * determining its state */ private $columnCount; + /** * @var array $parents the parent classes of this component */ private $parents = array(); + /** * @var boolean $hasDefaultValues whether or not this table has default values */ private $hasDefaultValues; + /** * @var array $options an array containing all options * @@ -288,6 +305,7 @@ class Doctrine_Table extends Doctrine_Configurable implements Countable { $this->repository = new Doctrine_Table_Repository($this); } + /** * createQuery * creates a new Doctrine_Query object and adds the component name @@ -298,6 +316,7 @@ class Doctrine_Table extends Doctrine_Configurable implements Countable { public function createQuery() { return Doctrine_Query::create()->from($this->getComponentName()); } + /** * getRepository * @@ -330,6 +349,7 @@ class Doctrine_Table extends Doctrine_Configurable implements Countable { return null; } + /** * setColumn * @param string $name @@ -360,6 +380,7 @@ class Doctrine_Table extends Doctrine_Configurable implements Countable { $this->hasDefaultValues = true; } } + /** * hasDefaultValues * returns true if this table has default values, otherwise false @@ -369,6 +390,7 @@ class Doctrine_Table extends Doctrine_Configurable implements Countable { public function hasDefaultValues() { return $this->hasDefaultValues; } + /** * getDefaultValueOf * returns the default value(if any) for given column @@ -387,18 +409,21 @@ class Doctrine_Table extends Doctrine_Configurable implements Countable { } else return null; } + /** * @return mixed */ final public function getIdentifier() { return $this->identifier; } + /** * @return integer */ final public function getIdentifierType() { return $this->identifierType; } + /** * hasColumn * @return boolean @@ -406,6 +431,7 @@ class Doctrine_Table extends Doctrine_Configurable implements Countable { final public function hasColumn($name) { return isset($this->columns[$name]); } + /** * @param mixed $key * @return void @@ -420,6 +446,7 @@ class Doctrine_Table extends Doctrine_Configurable implements Countable { break; endswitch; } + /** * returns all primary keys * @return array @@ -427,12 +454,14 @@ class Doctrine_Table extends Doctrine_Configurable implements Countable { final public function getPrimaryKeys() { return $this->primaryKeys; } + /** * @return boolean */ final public function hasPrimaryKey($key) { return in_array($key,$this->primaryKeys); } + /** * @param $sequence * @return void @@ -440,30 +469,35 @@ class Doctrine_Table extends Doctrine_Configurable implements Countable { final public function setSequenceName($sequence) { $this->options['sequenceName'] = $sequence; } + /** * @return string sequence name */ final public function getSequenceName() { return $this->options['sequenceName']; } + /** * getParents */ final public function getParents() { return $this->parents; } + /** * @return boolean */ final public function hasInheritanceMap() { return (empty($this->options['inheritanceMap'])); } + /** * @return array inheritance map (array keys as fields) */ final public function getInheritanceMap() { return $this->options['inheritanceMap']; } + /** * return all composite paths in the form [component1].[component2]. . .[componentN] * @return array @@ -493,6 +527,7 @@ class Doctrine_Table extends Doctrine_Configurable implements Countable { } return $array; } + /** * returns all bound relations * @@ -501,6 +536,7 @@ class Doctrine_Table extends Doctrine_Configurable implements Countable { public function getBounds() { return $this->bound; } + /** * returns a bound relation array * @@ -513,6 +549,7 @@ class Doctrine_Table extends Doctrine_Configurable implements Countable { return $this->bound[$name]; } + /** * returns a bound relation array * @@ -530,6 +567,7 @@ class Doctrine_Table extends Doctrine_Configurable implements Countable { } throw new Doctrine_Table_Exception('Unknown bound '.$name); } + /** * returns the alias for given component name * @@ -542,6 +580,7 @@ class Doctrine_Table extends Doctrine_Configurable implements Countable { return $name; } + /** * returns component name for given alias * @@ -554,6 +593,7 @@ class Doctrine_Table extends Doctrine_Configurable implements Countable { return $alias; } + /** * unbinds all relations * @@ -564,6 +604,7 @@ class Doctrine_Table extends Doctrine_Configurable implements Countable { $this->relations = array(); $this->boundAliases = array(); } + /** * unbinds a relation * returns true on success, false on failure @@ -585,6 +626,7 @@ class Doctrine_Table extends Doctrine_Configurable implements Countable { return true; } + /** * binds a relation * @@ -608,6 +650,7 @@ class Doctrine_Table extends Doctrine_Configurable implements Countable { $this->bound[$alias] = array($field, $type, $localKey, $name); } + /** * getComponentName * @return string the component name @@ -615,12 +658,14 @@ class Doctrine_Table extends Doctrine_Configurable implements Countable { public function getComponentName() { return $this->options['name']; } + /** * @return Doctrine_Connection */ public function getConnection() { return $this->conn; } + /** * hasRelatedComponent * @return boolean @@ -628,6 +673,7 @@ class Doctrine_Table extends Doctrine_Configurable implements Countable { final public function hasRelatedComponent($name, $component) { return (strpos($this->bound[$name][0], $component.'.') !== false); } + /** * @param string $name component name of which a foreign key object is bound * @return boolean @@ -643,6 +689,7 @@ class Doctrine_Table extends Doctrine_Configurable implements Countable { } return false; } + /** * getRelation * @@ -749,6 +796,7 @@ class Doctrine_Table extends Doctrine_Configurable implements Countable { throw new Doctrine_Table_Exception($this->options['name'] . " doesn't have a relation to " . $original); } } + /** * returns an array containing all foreign key objects * @@ -762,6 +810,7 @@ class Doctrine_Table extends Doctrine_Configurable implements Countable { return $this->relations; } + /** * sets the database table name * @@ -780,6 +829,7 @@ class Doctrine_Table extends Doctrine_Configurable implements Countable { final public function getTableName() { return $this->options['tableName']; } + /** * create * creates a new record @@ -793,6 +843,7 @@ class Doctrine_Table extends Doctrine_Configurable implements Countable { $this->data = array(); return $record; } + /** * finds a record by its identifier * @@ -823,6 +874,7 @@ class Doctrine_Table extends Doctrine_Configurable implements Countable { } return false; } + /** * applyInheritance * @param $where query where part to be modified @@ -839,6 +891,7 @@ class Doctrine_Table extends Doctrine_Configurable implements Countable { } return $where; } + /** * findAll * returns a collection of records @@ -850,6 +903,7 @@ class Doctrine_Table extends Doctrine_Configurable implements Countable { $users = $graph->query("FROM ".$this->options['name']); return $users; } + /** * findByDql * finds records with given DQL where clause @@ -868,6 +922,7 @@ class Doctrine_Table extends Doctrine_Configurable implements Countable { public function findByDql($dql, array $params = array()) { return $this->findBySql($dql, $params); } + /** * clear * clears the first level cache (identityMap) @@ -877,6 +932,7 @@ class Doctrine_Table extends Doctrine_Configurable implements Countable { public function clear() { $this->identityMap = array(); } + /** * getRecord * first checks if record exists in identityMap, if not @@ -911,6 +967,7 @@ class Doctrine_Table extends Doctrine_Configurable implements Countable { return $record; } + /** * @param $id database row id * @throws Doctrine_Find_Exception @@ -929,6 +986,7 @@ class Doctrine_Table extends Doctrine_Configurable implements Countable { } return $this->getRecord(); } + /** * count * @@ -938,6 +996,7 @@ class Doctrine_Table extends Doctrine_Configurable implements Countable { $a = $this->conn->getDBH()->query("SELECT COUNT(1) FROM ".$this->options['tableName'])->fetch(PDO::FETCH_NUM); return current($a); } + /** * @return Doctrine_Query a Doctrine_Query object */ @@ -946,6 +1005,7 @@ class Doctrine_Table extends Doctrine_Configurable implements Countable { $graph->load($this->getComponentName()); return $graph; } + /** * execute * @param string $query @@ -972,6 +1032,7 @@ class Doctrine_Table extends Doctrine_Configurable implements Countable { } return $coll; } + /** * sets enumerated value array for given field * @@ -982,6 +1043,7 @@ class Doctrine_Table extends Doctrine_Configurable implements Countable { final public function setEnumValues($field, array $values) { $this->options['enumMap'][strtolower($field)] = $values; } + /** * @param string $field * @return array @@ -992,6 +1054,7 @@ class Doctrine_Table extends Doctrine_Configurable implements Countable { else return array(); } + /** * enumValue * @@ -1005,6 +1068,7 @@ class Doctrine_Table extends Doctrine_Configurable implements Countable { return isset($this->options['enumMap'][$field][$index]) ? $this->options['enumMap'][$field][$index] : $index; } + /** * invokeSet * @@ -1015,7 +1079,7 @@ class Doctrine_Table extends Doctrine_Configurable implements Countable { return $value; $prefix = $this->getAttribute(Doctrine::ATTR_ACCESSOR_PREFIX_SET); - if (!$prefix) + if ( ! $prefix) $prefix = 'set'; $method = $prefix . $name; @@ -1026,6 +1090,7 @@ class Doctrine_Table extends Doctrine_Configurable implements Countable { return $value; } + /** * invokeGet * @@ -1036,7 +1101,7 @@ class Doctrine_Table extends Doctrine_Configurable implements Countable { return $value; $prefix = $this->getAttribute(Doctrine::ATTR_ACCESSOR_PREFIX_GET); - if (!$prefix) + if ( ! $prefix) $prefix = 'get'; $method = $prefix . $name; @@ -1047,6 +1112,7 @@ class Doctrine_Table extends Doctrine_Configurable implements Countable { return $value; } + /** * enumIndex * @@ -1062,6 +1128,7 @@ class Doctrine_Table extends Doctrine_Configurable implements Countable { return array_search($value, $values); } + /** * getDefinitionOf * @@ -1073,6 +1140,7 @@ class Doctrine_Table extends Doctrine_Configurable implements Countable { return false; } + /** * getColumnCount * @@ -1090,6 +1158,7 @@ class Doctrine_Table extends Doctrine_Configurable implements Countable { final public function getColumns() { return $this->columns; } + /** * returns an array containing all the column names * @@ -1098,6 +1167,7 @@ class Doctrine_Table extends Doctrine_Configurable implements Countable { public function getColumnNames() { return array_keys($this->columns); } + /** * getDefinitionOf * @@ -1109,6 +1179,7 @@ class Doctrine_Table extends Doctrine_Configurable implements Countable { return false; } + /** * getTypeOf * @@ -1120,6 +1191,7 @@ class Doctrine_Table extends Doctrine_Configurable implements Countable { return false; } + /** * setData * doctrine uses this function internally @@ -1131,6 +1203,7 @@ class Doctrine_Table extends Doctrine_Configurable implements Countable { public function setData(array $data) { $this->data = $data; } + /** * returns the maximum primary key value * @@ -1142,6 +1215,7 @@ class Doctrine_Table extends Doctrine_Configurable implements Countable { $data = $stmt->fetch(PDO::FETCH_NUM); return isset($data[0])?$data[0]:1; } + /** * returns simple cached query * @@ -1150,6 +1224,7 @@ class Doctrine_Table extends Doctrine_Configurable implements Countable { final public function getQuery() { return $this->query; } + /** * returns internal data, used by Doctrine_Record instances * when retrieving data from database @@ -1159,6 +1234,7 @@ class Doctrine_Table extends Doctrine_Configurable implements Countable { final public function getData() { return $this->data; } + /** * returns a string representation of this object * @@ -1167,6 +1243,7 @@ class Doctrine_Table extends Doctrine_Configurable implements Countable { public function __toString() { return Doctrine_Lib::getTableAsString($this); } + /** * returns a string representation of this object * @@ -1181,6 +1258,7 @@ class Doctrine_Table extends Doctrine_Configurable implements Countable { // set the table definition for the given tree implementation $this->_tree->setTableDefinition(); } + /** * getter for associated tree * @@ -1189,6 +1267,7 @@ class Doctrine_Table extends Doctrine_Configurable implements Countable { public function getTree() { return isset($this->_treeImplName) ? $this->_tree : false; } + /** * determine if table acts as tree * @@ -1197,6 +1276,7 @@ class Doctrine_Table extends Doctrine_Configurable implements Countable { public function isTree() { return !is_null($this->_treeImplName) ? true : false; } + /** * getter for tree implementation name * @@ -1205,6 +1285,7 @@ class Doctrine_Table extends Doctrine_Configurable implements Countable { public function getTreeImplName() { return $this->_treeImplName; } + /** * getter for tree options * diff --git a/draft/Tree.php b/draft/Tree.php index 9738d7900..c09c1249e 100644 --- a/draft/Tree.php +++ b/draft/Tree.php @@ -83,7 +83,7 @@ class Doctrine_Tree public static function factory(Doctrine_Table $table, $implName, $options = array()) { $class = 'Doctrine_Tree_' . $implName; - if (!class_exists($class)) { + if ( ! class_exists($class)) { throw new Doctrine_Exception('The chosen class must extend Doctrine_Tree'); } return new $class($table, $options); diff --git a/draft/Tree/AdjacencyList.php b/draft/Tree/AdjacencyList.php index 9ddefbe71..413af6e70 100644 --- a/draft/Tree/AdjacencyList.php +++ b/draft/Tree/AdjacencyList.php @@ -18,6 +18,7 @@ * and is licensed under the LGPL. For more information, see * <http://www.phpdoctrine.com>. */ + /** * Doctrine_Tree_AdjacencyList * diff --git a/draft/Tree/Exception.php b/draft/Tree/Exception.php index 423d0df0c..12a6eebc3 100644 --- a/draft/Tree/Exception.php +++ b/draft/Tree/Exception.php @@ -18,6 +18,7 @@ * and is licensed under the LGPL. For more information, see * <http://www.phpdoctrine.com>. */ + /** * Doctrine_Tree_Exception * diff --git a/draft/Tree/Interface.php b/draft/Tree/Interface.php index 7c365fee5..e966e2216 100644 --- a/draft/Tree/Interface.php +++ b/draft/Tree/Interface.php @@ -18,6 +18,7 @@ * and is licensed under the LGPL. For more information, see * <http://www.phpdoctrine.com>. */ + /** * Doctrine_Tree_Interface * diff --git a/draft/Tree/MaterializedPath.php b/draft/Tree/MaterializedPath.php index dd0609b16..4aacd5ca7 100644 --- a/draft/Tree/MaterializedPath.php +++ b/draft/Tree/MaterializedPath.php @@ -18,6 +18,7 @@ * and is licensed under the LGPL. For more information, see * <http://www.phpdoctrine.com>. */ + /** * Doctrine_Tree_MaterializedPath * diff --git a/draft/Tree/NestedSet.php b/draft/Tree/NestedSet.php index 39e6985ac..9966f4713 100644 --- a/draft/Tree/NestedSet.php +++ b/draft/Tree/NestedSet.php @@ -18,6 +18,7 @@ * and is licensed under the LGPL. For more information, see * <http://www.phpdoctrine.com>. */ + /** * Doctrine_Tree_NestedSet * @@ -32,7 +33,7 @@ class Doctrine_Tree_NestedSet extends Doctrine_Tree implements Doctrine_Tree_Interface { private $_baseQuery; - + /** * constructor, creates tree with reference to table and sets default root options * @@ -48,7 +49,7 @@ class Doctrine_Tree_NestedSet extends Doctrine_Tree implements Doctrine_Tree_Int parent::__construct($table, $options); } - + /** * used to define table attributes required for the NestetSet implementation * adds lft and rgt columns for corresponding left and right values @@ -99,7 +100,7 @@ class Doctrine_Tree_NestedSet extends Doctrine_Tree implements Doctrine_Tree_Int { return $this->fetchRoot($rootId); } - + /** * Fetches a/the root node. * @@ -254,7 +255,7 @@ class Doctrine_Tree_NestedSet extends Doctrine_Tree implements Doctrine_Tree_Int return $query; } - + /** * Enter description here... * @@ -263,12 +264,12 @@ class Doctrine_Tree_NestedSet extends Doctrine_Tree implements Doctrine_Tree_Int */ public function getBaseQuery() { - if (!isset($this->_baseQuery)) { + if ( ! isset($this->_baseQuery)) { $this->_baseQuery = $this->_createBaseQuery(); } return clone $this->_baseQuery; } - + /** * Enter description here... * @@ -279,7 +280,7 @@ class Doctrine_Tree_NestedSet extends Doctrine_Tree implements Doctrine_Tree_Int $q->select("base.*")->from($this->table->getComponentName() . " base"); return $q; } - + /** * Enter description here... * @@ -293,7 +294,7 @@ class Doctrine_Tree_NestedSet extends Doctrine_Tree implements Doctrine_Tree_Int } $this->_baseQuery = $query; } - + /** * Enter description here... * @@ -302,7 +303,7 @@ class Doctrine_Tree_NestedSet extends Doctrine_Tree implements Doctrine_Tree_Int { $this->_baseQuery = null; } - + /** * Enter description here... * diff --git a/draft/new-core/Connection.php b/draft/new-core/Connection.php index 92071914c..d0989fd17 100644 --- a/draft/new-core/Connection.php +++ b/draft/new-core/Connection.php @@ -37,25 +37,30 @@ abstract class Doctrine_Connection extends Doctrine_Configurable implements Coun * @var $dbh the database handler */ protected $dbh; + /** * @var array $tables an array containing all the initialized Doctrine_Table objects * keys representing Doctrine_Table component names and values as Doctrine_Table objects */ protected $tables = array(); + /** * @var array $exported */ protected $exported = array(); + /** * @var string $driverName the name of this connection driver */ protected $driverName; + /** * @var array $supported an array containing all features this driver supports, * keys representing feature names and values as * one of the following (true, false, 'emulated') */ protected $supported = array(); + /** * @var array $modules an array containing all modules * transaction Doctrine_Transaction driver, handles savepoint and transaction isolation abstraction @@ -85,6 +90,7 @@ abstract class Doctrine_Connection extends Doctrine_Configurable implements Coun 'sequence' => false, 'unitOfWork' => false, ); + /** * @var array $properties an array of connection properties */ @@ -103,10 +109,12 @@ abstract class Doctrine_Connection extends Doctrine_Configurable implements Coun 'wildcards' => array('%', '_'), 'varchar_max_length' => 255, ); + /** * @var array $serverInfo */ protected $serverInfo = array(); + /** * @var array $availableDrivers an array containing all availible drivers */ @@ -143,6 +151,7 @@ abstract class Doctrine_Connection extends Doctrine_Configurable implements Coun $this->getAttribute(Doctrine::ATTR_LISTENER)->onOpen($this); } + /** * getName * returns the name of this driver @@ -153,6 +162,7 @@ abstract class Doctrine_Connection extends Doctrine_Configurable implements Coun { return $this->driverName; } + /** * __get * lazy loads given module and returns it @@ -187,6 +197,7 @@ abstract class Doctrine_Connection extends Doctrine_Configurable implements Coun return $this->modules[$name]; } + /** * Quotes pattern (% and _) characters in a string) * @@ -209,6 +220,7 @@ abstract class Doctrine_Connection extends Doctrine_Configurable implements Coun } return $text; } + /** * convertBoolean * some drivers need the boolean values to be converted into integers @@ -232,6 +244,7 @@ abstract class Doctrine_Connection extends Doctrine_Configurable implements Coun } return $item; } + /** * Quote a string so it can be safely used as a table or column name * @@ -276,6 +289,7 @@ abstract class Doctrine_Connection extends Doctrine_Configurable implements Coun return $this->properties['identifier_quoting']['start'] . $str . $this->properties['identifier_quoting']['end']; } + /** * returns the manager that created this connection * @@ -285,6 +299,7 @@ abstract class Doctrine_Connection extends Doctrine_Configurable implements Coun { return $this->getParent(); } + /** * returns the database handler of which this connection uses * @@ -294,6 +309,7 @@ abstract class Doctrine_Connection extends Doctrine_Configurable implements Coun { return $this->dbh; } + /** * converts given driver name * @@ -302,6 +318,7 @@ abstract class Doctrine_Connection extends Doctrine_Configurable implements Coun public function driverName($name) { } + /** * supports * @@ -316,6 +333,7 @@ abstract class Doctrine_Connection extends Doctrine_Configurable implements Coun ) ); } + /** * quote * quotes given input parameter @@ -351,6 +369,7 @@ abstract class Doctrine_Connection extends Doctrine_Configurable implements Coun return $this->dbh->quote($input); } } + /** * Removes any formatting in an sequence name using the 'seqname_format' option * @@ -367,6 +386,7 @@ abstract class Doctrine_Connection extends Doctrine_Configurable implements Coun } return $sqn; } + /** * Removes any formatting in an index name using the 'idxname_format' option * @@ -382,6 +402,7 @@ abstract class Doctrine_Connection extends Doctrine_Configurable implements Coun } return $idx; } + /** * adds sequence name formatting to a sequence name * @@ -393,6 +414,7 @@ abstract class Doctrine_Connection extends Doctrine_Configurable implements Coun return sprintf($this->getAttribute(Doctrine::ATTR_SEQNAME_FORMAT), preg_replace('/[^a-z0-9_\$.]/i', '_', $sqn)); } + /** * adds index name formatting to a index name * @@ -471,6 +493,7 @@ abstract class Doctrine_Connection extends Doctrine_Configurable implements Coun return $affectedRows; } + /** * Inserts a table row with specified data. * @@ -495,6 +518,7 @@ abstract class Doctrine_Connection extends Doctrine_Configurable implements Coun return true; } + /** * Set the charset on the current connection * @@ -506,6 +530,7 @@ abstract class Doctrine_Connection extends Doctrine_Configurable implements Coun { } + /** * Set the date/time format for the current connection * @@ -516,6 +541,7 @@ abstract class Doctrine_Connection extends Doctrine_Configurable implements Coun public function setDateFormat($format = null) { } + /** * fetchAll * @@ -527,6 +553,7 @@ abstract class Doctrine_Connection extends Doctrine_Configurable implements Coun { return $this->execute($statement, $params)->fetchAll(PDO::FETCH_ASSOC); } + /** * fetchOne * @@ -539,6 +566,7 @@ abstract class Doctrine_Connection extends Doctrine_Configurable implements Coun { return $this->execute($statement, $params)->fetchColumn($colnum); } + /** * fetchRow * @@ -550,6 +578,7 @@ abstract class Doctrine_Connection extends Doctrine_Configurable implements Coun { return $this->execute($statement, $params)->fetch(PDO::FETCH_ASSOC); } + /** * fetchArray * @@ -561,6 +590,7 @@ abstract class Doctrine_Connection extends Doctrine_Configurable implements Coun { return $this->execute($statement, $params)->fetch(PDO::FETCH_NUM); } + /** * fetchColumn * @@ -573,6 +603,7 @@ abstract class Doctrine_Connection extends Doctrine_Configurable implements Coun { return $this->execute($statement, $params)->fetchAll(PDO::FETCH_COLUMN, $colnum); } + /** * fetchAssoc * @@ -584,6 +615,7 @@ abstract class Doctrine_Connection extends Doctrine_Configurable implements Coun { return $this->execute($statement, $params)->fetchAll(PDO::FETCH_ASSOC); } + /** * fetchBoth * @@ -595,6 +627,7 @@ abstract class Doctrine_Connection extends Doctrine_Configurable implements Coun { return $this->execute($statement, $params)->fetchAll(PDO::FETCH_BOTH); } + /** * query * queries the database using Doctrine Query Language @@ -617,6 +650,7 @@ abstract class Doctrine_Connection extends Doctrine_Configurable implements Coun return $parser->query($query, $params); } + /** * query * queries the database using Doctrine Query Language and returns @@ -646,6 +680,7 @@ abstract class Doctrine_Connection extends Doctrine_Configurable implements Coun } return $coll[0]; } + /** * queries the database with limit and offset * added to the query and returns a PDOStatement object @@ -662,6 +697,7 @@ abstract class Doctrine_Connection extends Doctrine_Configurable implements Coun } return $this->dbh->query($query); } + /** * standaloneQuery * @@ -674,6 +710,7 @@ abstract class Doctrine_Connection extends Doctrine_Configurable implements Coun { return $this->execute($query, $params); } + /** * execute * @param string $query sql query @@ -696,6 +733,7 @@ abstract class Doctrine_Connection extends Doctrine_Configurable implements Coun $this->rethrowException($e); } + /** * exec * @param string $query sql query @@ -717,6 +755,7 @@ abstract class Doctrine_Connection extends Doctrine_Configurable implements Coun $this->rethrowException($e); } + /** * rethrowException * @@ -734,6 +773,7 @@ abstract class Doctrine_Connection extends Doctrine_Configurable implements Coun throw $exc; } + /** * hasTable * whether or not this connection has table $name initialized @@ -745,6 +785,7 @@ abstract class Doctrine_Connection extends Doctrine_Configurable implements Coun { return isset($this->tables[$name]); } + /** * returns a table object for given component name * @@ -816,6 +857,7 @@ abstract class Doctrine_Connection extends Doctrine_Configurable implements Coun return $table; } + /** * returns an array of all initialized tables * @@ -825,6 +867,7 @@ abstract class Doctrine_Connection extends Doctrine_Configurable implements Coun { return $this->tables; } + /** * returns an iterator that iterators through all * initialized table objects @@ -841,6 +884,7 @@ abstract class Doctrine_Connection extends Doctrine_Configurable implements Coun { return new ArrayIterator($this->tables); } + /** * returns the count of initialized table objects * @@ -850,6 +894,7 @@ abstract class Doctrine_Connection extends Doctrine_Configurable implements Coun { return count($this->tables); } + /** * addTable * adds a Doctrine_Table object into connection registry @@ -867,6 +912,7 @@ abstract class Doctrine_Connection extends Doctrine_Configurable implements Coun $this->tables[$name] = $objTable; return true; } + /** * create * creates a record @@ -879,6 +925,7 @@ abstract class Doctrine_Connection extends Doctrine_Configurable implements Coun { return $this->getTable($name)->create(); } + /** * flush * saves all the records from all tables @@ -893,6 +940,7 @@ abstract class Doctrine_Connection extends Doctrine_Configurable implements Coun $this->unitOfWork->saveAll(); $this->commit(); } + /** * clear * clears all repositories @@ -906,6 +954,7 @@ abstract class Doctrine_Connection extends Doctrine_Configurable implements Coun $table->clear(); } } + /** * evictTables * evicts all tables @@ -917,6 +966,7 @@ abstract class Doctrine_Connection extends Doctrine_Configurable implements Coun $this->tables = array(); $this->exported = array(); } + /** * close * closes the connection @@ -931,6 +981,7 @@ abstract class Doctrine_Connection extends Doctrine_Configurable implements Coun $this->getAttribute(Doctrine::ATTR_LISTENER)->onClose($this); } + /** * get the current transaction nesting level * @@ -940,6 +991,7 @@ abstract class Doctrine_Connection extends Doctrine_Configurable implements Coun { return $this->transaction->getTransactionLevel(); } + /** * beginTransaction * starts a new transaction @@ -953,6 +1005,7 @@ abstract class Doctrine_Connection extends Doctrine_Configurable implements Coun { $this->transaction->beginTransaction(); } + /** * commits the current transaction * if lockmode is optimistic this method starts a transaction @@ -964,6 +1017,7 @@ abstract class Doctrine_Connection extends Doctrine_Configurable implements Coun { $this->transaction->commit(); } + /** * rollback * rolls back all transactions @@ -977,6 +1031,7 @@ abstract class Doctrine_Connection extends Doctrine_Configurable implements Coun { $this->transaction->rollback(); } + /** * saves the given record * @@ -1003,6 +1058,7 @@ abstract class Doctrine_Connection extends Doctrine_Configurable implements Coun $record->getTable()->getAttribute(Doctrine::ATTR_LISTENER)->onSave($record); } + /** * deletes this data access object and all the related composites * this operation is isolated by a transaction @@ -1030,6 +1086,7 @@ abstract class Doctrine_Connection extends Doctrine_Configurable implements Coun return true; } + /** * returns a string representation of this object * @return string diff --git a/draft/new-core/Hydrate.php b/draft/new-core/Hydrate.php index c3827e56c..65e198a5b 100644 --- a/draft/new-core/Hydrate.php +++ b/draft/new-core/Hydrate.php @@ -42,18 +42,22 @@ class Doctrine_Hydrate implements Serializable * constant for SELECT queries */ const SELECT = 0; + /** * constant for DELETE queries */ const DELETE = 1; + /** * constant for UPDATE queries */ const UPDATE = 2; + /** * constant for INSERT queries */ const INSERT = 3; + /** * constant for CREATE queries */ @@ -63,15 +67,18 @@ class Doctrine_Hydrate implements Serializable * @var array $params query input parameters */ protected $_params = array(); + /** * @var Doctrine_Connection $conn Doctrine_Connection object */ protected $_conn; + /** * @var Doctrine_View $_view Doctrine_View object, when set this object will use the * the query given by the view object for object population */ protected $_view; + /** * @var array $_aliasMap two dimensional array containing the map for query aliases * Main keys are component aliases @@ -85,15 +92,18 @@ class Doctrine_Hydrate implements Serializable * agg the aggregates of this component */ protected $_aliasMap = array(); + /** * */ protected $pendingAggregates = array(); + /** * @var array $aggregateMap an array containing all aggregate aliases, keys as dql aliases * and values as sql aliases */ protected $aggregateMap = array(); + /** * @var array $_options an array of options */ @@ -102,6 +112,7 @@ class Doctrine_Hydrate implements Serializable 'parserCache' => false, 'resultSetCache' => false, ); + /** * @var array $parts SQL query string parts */ @@ -119,6 +130,7 @@ class Doctrine_Hydrate implements Serializable 'limit' => false, 'offset' => false, ); + /** * @var integer $type the query type * @@ -129,12 +141,14 @@ class Doctrine_Hydrate implements Serializable protected $_cache; protected $_tableAliases = array(); + /** * @var array $_tableAliasSeeds A simple array keys representing table aliases and values * as table alias seeds. The seeds are used for generating short table * aliases. */ protected $_tableAliasSeeds = array(); + /** * constructor * @@ -160,6 +174,7 @@ class Doctrine_Hydrate implements Serializable { return $this->_cache; } + /** * serialize * this method is automatically called when this Doctrine_Hydrate is serialized @@ -171,6 +186,7 @@ class Doctrine_Hydrate implements Serializable $vars = get_object_vars($this); } + /** * unseralize * this method is automatically called everytime a Doctrine_Hydrate object is unserialized @@ -182,6 +198,7 @@ class Doctrine_Hydrate implements Serializable { } + /** * generateNewTableAlias * generates a new alias from given table alias @@ -207,6 +224,7 @@ class Doctrine_Hydrate implements Serializable return $alias; } + /** * hasTableAlias * whether or not this object has given tableAlias @@ -218,6 +236,7 @@ class Doctrine_Hydrate implements Serializable { return (isset($this->_tableAliases[$tableAlias])); } + /** * getComponentAlias * get component alias associated with given table alias @@ -232,6 +251,7 @@ class Doctrine_Hydrate implements Serializable } return $this->_tableAliases[$tableAlias]; } + /** * getTableAliasSeed * returns the alias seed for given table alias @@ -246,6 +266,7 @@ class Doctrine_Hydrate implements Serializable } return $this->_tableAliasSeeds[$tableAlias]; } + /** * generateTableAlias * generates a table alias from given table name and associates @@ -272,6 +293,7 @@ class Doctrine_Hydrate implements Serializable return $alias; } + /** * getTableAliases * returns all table aliases @@ -282,6 +304,7 @@ class Doctrine_Hydrate implements Serializable { return $this->_tableAliases; } + /** * addTableAlias * adds an alias for table and associates it with given component alias @@ -296,6 +319,7 @@ class Doctrine_Hydrate implements Serializable return $this; } + /** * getTableAlias * some database such as Oracle need the identifier lengths to be < ~30 chars @@ -322,6 +346,7 @@ class Doctrine_Hydrate implements Serializable return $this->generateTableAlias($componentAlias, $tableName); } + /** * addQueryPart * adds a query part in the query part array @@ -340,6 +365,7 @@ class Doctrine_Hydrate implements Serializable return $this; } + /** * setQueryPart * sets a query part in the query part array @@ -357,6 +383,7 @@ class Doctrine_Hydrate implements Serializable return $this->parts[$part]; } + /** * removeQueryPart * removes a query part from the query part array @@ -378,6 +405,7 @@ class Doctrine_Hydrate implements Serializable } return $this; } + /** * setQueryPart * sets a query part in the query part array @@ -401,6 +429,7 @@ class Doctrine_Hydrate implements Serializable return $this; } + /** * getAliasDeclaration * get the declaration for given component alias @@ -416,6 +445,7 @@ class Doctrine_Hydrate implements Serializable return $this->_aliasMap[$componentAlias]; } + /** * copyAliases * copy aliases from another Hydrate object @@ -433,6 +463,7 @@ class Doctrine_Hydrate implements Serializable return $this; } + /** * createSubquery * creates a subquery @@ -452,6 +483,7 @@ class Doctrine_Hydrate implements Serializable return $obj; } + /** * limitSubqueryUsed * whether or not limit subquery was used @@ -462,6 +494,7 @@ class Doctrine_Hydrate implements Serializable { return false; } + /** * clear * resets all the variables @@ -486,6 +519,7 @@ class Doctrine_Hydrate implements Serializable ); $this->inheritanceApplied = false; } + /** * getConnection * @@ -495,6 +529,7 @@ class Doctrine_Hydrate implements Serializable { return $this->_conn; } + /** * setView * sets a database view this query object uses @@ -507,6 +542,7 @@ class Doctrine_Hydrate implements Serializable { $this->_view = $view; } + /** * getView * returns the view associated with this query object (if any) @@ -517,6 +553,7 @@ class Doctrine_Hydrate implements Serializable { return $this->_view; } + /** * getParams * @@ -526,6 +563,7 @@ class Doctrine_Hydrate implements Serializable { return $this->_params; } + /** * setParams * @@ -538,6 +576,7 @@ class Doctrine_Hydrate implements Serializable { return $params; } + /** * setAliasMap * sets the whole component alias map @@ -551,6 +590,7 @@ class Doctrine_Hydrate implements Serializable return $this; } + /** * getAliasMap * returns the component alias map @@ -561,6 +601,7 @@ class Doctrine_Hydrate implements Serializable { return $this->_aliasMap; } + /** * mapAggregateValues * map the aggregate values of given dataset row to a given record @@ -634,6 +675,7 @@ class Doctrine_Hydrate implements Serializable $stmt = $this->_conn->execute($query, $params); return $stmt; } + /** * execute * executes the query and populates the data set @@ -705,6 +747,7 @@ class Doctrine_Hydrate implements Serializable { return $this->type; } + /** * applyInheritance * applies column aggregation inheritance to DQL / SQL query @@ -762,6 +805,7 @@ class Doctrine_Hydrate implements Serializable return $str; } + /** * parseData * parses the data returned by statement object @@ -999,6 +1043,7 @@ class Doctrine_Hydrate implements Serializable $stmt->closeCursor(); return $array; } + /** * @return string returns a string representation of this object */ diff --git a/draft/new-core/QueryApi.php b/draft/new-core/QueryApi.php index d9962327a..e74316e16 100644 --- a/draft/new-core/QueryApi.php +++ b/draft/new-core/QueryApi.php @@ -42,6 +42,7 @@ class Doctrine_Query { return new Doctrine_Query(); } + /** * addSelect * adds fields to the SELECT part of the query @@ -53,6 +54,7 @@ class Doctrine_Query { return $this->getParser('select')->parse($select, true); } + /** * addWhere * adds conditions to the WHERE part of the query @@ -70,6 +72,7 @@ class Doctrine_Query } return $this->getParser('where')->parse($where, true); } + /** * addGroupBy * adds fields to the GROUP BY part of the query @@ -81,6 +84,7 @@ class Doctrine_Query { return $this->getParser('groupby')->parse($groupby, true); } + /** * addHaving * adds conditions to the HAVING part of the query @@ -92,6 +96,7 @@ class Doctrine_Query { return $this->getParser('having')->parse($having, true); } + /** * addOrderBy * adds fields to the ORDER BY part of the query @@ -103,6 +108,7 @@ class Doctrine_Query { return $this->getParser('orderby')->parse($orderby, true); } + /** * select * sets the SELECT part of the query @@ -114,6 +120,7 @@ class Doctrine_Query { return $this->getParser('from')->parse($select); } + /** * from * sets the FROM part of the query @@ -125,6 +132,7 @@ class Doctrine_Query { return $this->getParser('from')->parse($from); } + /** * innerJoin * appends an INNER JOIN to the FROM part of the query @@ -136,6 +144,7 @@ class Doctrine_Query { return $this->getParser('from')->parse('INNER JOIN ' . $join); } + /** * leftJoin * appends a LEFT JOIN to the FROM part of the query @@ -147,6 +156,7 @@ class Doctrine_Query { return $this->getParser('from')->parse('LERT JOIN ' . $join); } + /** * groupBy * sets the GROUP BY part of the query @@ -158,6 +168,7 @@ class Doctrine_Query { return $this->getParser('groupby')->parse($groupby); } + /** * where * sets the WHERE part of the query @@ -175,6 +186,7 @@ class Doctrine_Query } return $this->getParser('where')->parse($where); } + /** * having * sets the HAVING part of the query @@ -192,6 +204,7 @@ class Doctrine_Query } return $this->getParser('having')->parse($having); } + /** * orderBy * sets the ORDER BY part of the query @@ -203,6 +216,7 @@ class Doctrine_Query { return $this->getParser('orderby')->parse($dql); } + /** * limit * sets the DQL query limit @@ -214,6 +228,7 @@ class Doctrine_Query { return $this->getParser('limit')->parse($dql); } + /** * offset * sets the DQL query offset diff --git a/draft/new-core/RawSql.php b/draft/new-core/RawSql.php index ea16fa38b..19781a944 100644 --- a/draft/new-core/RawSql.php +++ b/draft/new-core/RawSql.php @@ -36,6 +36,7 @@ class Doctrine_RawSql extends Doctrine_Hydrate * @var array $fields */ private $fields; + /** * __call * method overloader @@ -59,6 +60,7 @@ class Doctrine_RawSql extends Doctrine_Hydrate } return $this; } + /** * get */ @@ -69,6 +71,7 @@ class Doctrine_RawSql extends Doctrine_Hydrate } return $this->parts[$name]; } + /** * parseQuery * @@ -126,6 +129,7 @@ class Doctrine_RawSql extends Doctrine_Hydrate return $this; } + /** * getQuery * @@ -191,6 +195,7 @@ class Doctrine_RawSql extends Doctrine_Hydrate } return $q; } + /** * getFields * @@ -200,6 +205,7 @@ class Doctrine_RawSql extends Doctrine_Hydrate { return $this->fields; } + /** * addComponent * diff --git a/draft/new-core/Record.php b/draft/new-core/Record.php index 3f6af2d2f..8d7be0c8c 100644 --- a/draft/new-core/Record.php +++ b/draft/new-core/Record.php @@ -42,33 +42,39 @@ abstract class Doctrine_Record2 extends Doctrine_Access implements Countable, It * a Doctrine_Record is in dirty state when its properties are changed */ const STATE_DIRTY = 1; + /** * TDIRTY STATE * a Doctrine_Record is in transient dirty state when it is created and some of its fields are modified * but it is NOT yet persisted into database */ const STATE_TDIRTY = 2; + /** * CLEAN STATE * a Doctrine_Record is in clean state when all of its properties are loaded from the database * and none of its properties are changed */ const STATE_CLEAN = 3; + /** * PROXY STATE * a Doctrine_Record is in proxy state when its properties are not fully loaded */ const STATE_PROXY = 4; + /** * NEW TCLEAN * a Doctrine_Record is in transient clean state when it is created and none of its fields are modified */ const STATE_TCLEAN = 5; + /** * DELETED STATE * a Doctrine_Record turns into deleted state when it is deleted */ const STATE_DELETED = 6; + /** * the following protected variables use '_' prefixes, the reason for this is to allow child * classes call for example $this->id, $this->state for getting the values of columns named 'id' and 'state' @@ -78,48 +84,59 @@ abstract class Doctrine_Record2 extends Doctrine_Access implements Countable, It * @var object Doctrine_Table $_table the factory that created this data access object */ protected $_table; + /** * @var Doctrine_Node_<TreeImpl> node object */ protected $_node; + /** * @var integer $_id the primary keys of this object */ protected $_id = array(); + /** * @var array $_data the record data */ protected $_data = array(); + /** * @var array $_values the values array, aggregate values and such are mapped into this array */ protected $_values = array(); + /** * @var integer $_state the state of this record * @see STATE_* constants */ protected $_state; + /** * @var array $_modified an array containing properties that have been modified */ protected $_modified = array(); + /** * @var Doctrine_Validator_ErrorStack error stack object */ protected $_errorStack; + /** * @var array $references an array containing all the references */ private $references = array(); + /** * @var integer $index this index is used for creating object identifiers */ private static $index = 1; + /** * @var Doctrine_Null $null a Doctrine_Null object used for extremely fast * null value testing */ private static $null; + /** * @var integer $oid object identifier, each Record object has a unique object identifier */ @@ -211,6 +228,7 @@ abstract class Doctrine_Record2 extends Doctrine_Access implements Countable, It } $this->construct(); } + /** * initNullObject * @@ -221,6 +239,7 @@ abstract class Doctrine_Record2 extends Doctrine_Access implements Countable, It { self::$null = $null; } + /** * @return Doctrine_Null */ @@ -228,6 +247,7 @@ abstract class Doctrine_Record2 extends Doctrine_Access implements Countable, It { return self::$null; } + /** * setUp * this method is used for setting up relations and attributes @@ -256,6 +276,7 @@ abstract class Doctrine_Record2 extends Doctrine_Access implements Countable, It { return $this->oid; } + /** * isValid * @@ -281,6 +302,7 @@ abstract class Doctrine_Record2 extends Doctrine_Access implements Countable, It return $this->_errorStack->count() == 0 ? true : false; } + /** * Emtpy template method to provide concrete Record classes with the possibility * to hook into the validation procedure, doing any custom / specialized @@ -311,6 +333,7 @@ abstract class Doctrine_Record2 extends Doctrine_Access implements Countable, It { return $this->_errorStack; } + /** * errorStack * assigns / returns record errorStack @@ -329,6 +352,7 @@ abstract class Doctrine_Record2 extends Doctrine_Access implements Countable, It return $this->_errorStack; } } + /** * setDefaultValues * sets the default values for records internal data @@ -354,6 +378,7 @@ abstract class Doctrine_Record2 extends Doctrine_Access implements Countable, It } } } + /** * cleanData * this method does several things to records internal data @@ -429,6 +454,7 @@ abstract class Doctrine_Record2 extends Doctrine_Access implements Countable, It return $count; } + /** * hydrate * hydrates this object from given array @@ -444,6 +470,7 @@ abstract class Doctrine_Record2 extends Doctrine_Access implements Countable, It $this->cleanData(); $this->prepareIdentifiers(); } + /** * prepareIdentifiers * prepares identifiers for later use @@ -488,6 +515,7 @@ abstract class Doctrine_Record2 extends Doctrine_Access implements Countable, It break; } } + /** * serialize * this method is automatically called when this Doctrine_Record is serialized @@ -525,6 +553,7 @@ abstract class Doctrine_Record2 extends Doctrine_Access implements Countable, It return serialize($vars); } + /** * unseralize * this method is automatically called everytime a Doctrine_Record object is unserialized @@ -557,6 +586,7 @@ abstract class Doctrine_Record2 extends Doctrine_Access implements Countable, It $this->_table->getAttribute(Doctrine::ATTR_LISTENER)->onWakeUp($this); } + /** * getState * returns the current state of the object @@ -568,6 +598,7 @@ abstract class Doctrine_Record2 extends Doctrine_Access implements Countable, It { return $this->_state; } + /** * state * returns / assigns the state of this record @@ -611,6 +642,7 @@ abstract class Doctrine_Record2 extends Doctrine_Access implements Countable, It throw new Doctrine_Record_State_Exception('Unknown record state ' . $state); } } + /** * refresh * refresh internal data from the database @@ -651,6 +683,7 @@ abstract class Doctrine_Record2 extends Doctrine_Access implements Countable, It return true; } + /** * factoryRefresh * refreshes the data from outer source (Doctrine_Table) @@ -676,6 +709,7 @@ abstract class Doctrine_Record2 extends Doctrine_Access implements Countable, It $this->_table->getAttribute(Doctrine::ATTR_LISTENER)->onLoad($this); } + /** * getTable * returns the table object for this record @@ -686,6 +720,7 @@ abstract class Doctrine_Record2 extends Doctrine_Access implements Countable, It { return $this->_table; } + /** * getData * return all the internal data @@ -696,6 +731,7 @@ abstract class Doctrine_Record2 extends Doctrine_Access implements Countable, It { return $this->_data; } + /** * rawGet * returns the value of a property, if the property is not yet loaded @@ -715,6 +751,7 @@ abstract class Doctrine_Record2 extends Doctrine_Access implements Countable, It return $this->_data[$name]; } + /** * load * loads all the unitialized properties from the database @@ -733,6 +770,7 @@ abstract class Doctrine_Record2 extends Doctrine_Access implements Countable, It } return false; } + /** * get * returns a value of a property or a related component @@ -793,6 +831,7 @@ abstract class Doctrine_Record2 extends Doctrine_Access implements Countable, It return $this->references[$name]; } + /** * mapValue * This simple method is used for mapping values to $values property. @@ -808,6 +847,7 @@ abstract class Doctrine_Record2 extends Doctrine_Access implements Countable, It $name = strtolower($name); $this->_values[$name] = $value; } + /** * set * method for altering properties and Doctrine_Record references @@ -905,6 +945,7 @@ abstract class Doctrine_Record2 extends Doctrine_Access implements Countable, It $this->references[$name] = $value; } + /** * contains * @@ -926,6 +967,7 @@ abstract class Doctrine_Record2 extends Doctrine_Access implements Countable, It } return false; } + /** * @param string $name * @return void @@ -937,6 +979,7 @@ abstract class Doctrine_Record2 extends Doctrine_Access implements Countable, It } // todo: what to do with references ? } + /** * applies the changes made to this object into database * this method is smart enough to know if any changes are made @@ -979,6 +1022,7 @@ abstract class Doctrine_Record2 extends Doctrine_Access implements Countable, It $conn->commit(); } + /** * Tries to save the object and all its related components. * In contrast to Doctrine_Record::save(), this method does not @@ -996,6 +1040,7 @@ abstract class Doctrine_Record2 extends Doctrine_Access implements Countable, It return false; } } + /** * replace * Execute a SQL REPLACE query. A REPLACE query is identical to a INSERT @@ -1022,6 +1067,7 @@ abstract class Doctrine_Record2 extends Doctrine_Access implements Countable, It return $conn->replace($this->_table->getTableName(), $this->getPrepared(), $this->id); } + /** * returns an array of modified fields and associated values * @return array @@ -1035,6 +1081,7 @@ abstract class Doctrine_Record2 extends Doctrine_Access implements Countable, It } return $a; } + /** * getPrepared * @@ -1091,6 +1138,7 @@ abstract class Doctrine_Record2 extends Doctrine_Access implements Countable, It return $a; } + /** * count * this class implements countable interface @@ -1101,6 +1149,7 @@ abstract class Doctrine_Record2 extends Doctrine_Access implements Countable, It { return count($this->_data); } + /** * alias for count() * @@ -1110,6 +1159,7 @@ abstract class Doctrine_Record2 extends Doctrine_Access implements Countable, It { return $this->count(); } + /** * toArray * returns the record as an array @@ -1129,6 +1179,7 @@ abstract class Doctrine_Record2 extends Doctrine_Access implements Countable, It } return $a; } + /** * exists * returns true if this record is persistent, otherwise false @@ -1140,6 +1191,7 @@ abstract class Doctrine_Record2 extends Doctrine_Access implements Countable, It return ($this->_state !== Doctrine_Record::STATE_TCLEAN && $this->_state !== Doctrine_Record::STATE_TDIRTY); } + /** * method for checking existence of properties and Doctrine_Record references * @param mixed $name name of the property or reference @@ -1152,6 +1204,7 @@ abstract class Doctrine_Record2 extends Doctrine_Access implements Countable, It } return $this->_table->hasRelation($name); } + /** * getIterator * @return Doctrine_Record_Iterator a Doctrine_Record_Iterator that iterates through the data @@ -1160,6 +1213,7 @@ abstract class Doctrine_Record2 extends Doctrine_Access implements Countable, It { return new Doctrine_Record_Iterator($this); } + /** * deletes this data access object and all the related composites * this operation is isolated by a transaction @@ -1175,6 +1229,7 @@ abstract class Doctrine_Record2 extends Doctrine_Access implements Countable, It } return $conn->delete($this); } + /** * copy * returns a copy of this object @@ -1192,6 +1247,7 @@ abstract class Doctrine_Record2 extends Doctrine_Access implements Countable, It } return $ret; } + /** * copyDeep * returns a copy of this object and all its related objects @@ -1212,7 +1268,7 @@ abstract class Doctrine_Record2 extends Doctrine_Access implements Countable, It } return $copy; } - + /** * assignIdentifier * @@ -1238,6 +1294,7 @@ abstract class Doctrine_Record2 extends Doctrine_Access implements Countable, It $this->_modified = array(); } } + /** * returns the primary keys of this object * @@ -1247,6 +1304,7 @@ abstract class Doctrine_Record2 extends Doctrine_Access implements Countable, It { return $this->_id; } + /** * returns the value of autoincremented primary key of this object (if any) * @@ -1260,6 +1318,7 @@ abstract class Doctrine_Record2 extends Doctrine_Access implements Countable, It return $id; } + /** * getLast * this method is used internally be Doctrine_Query @@ -1272,6 +1331,7 @@ abstract class Doctrine_Record2 extends Doctrine_Access implements Countable, It { return $this; } + /** * hasRefence * @param string $name @@ -1281,6 +1341,7 @@ abstract class Doctrine_Record2 extends Doctrine_Access implements Countable, It { return isset($this->references[$name]); } + /** * obtainReference * @@ -1294,6 +1355,7 @@ abstract class Doctrine_Record2 extends Doctrine_Access implements Countable, It } throw new Doctrine_Record_Exception("Unknown reference $name"); } + /** * initalizes a one-to-many / many-to-many relation * @@ -1319,6 +1381,7 @@ abstract class Doctrine_Record2 extends Doctrine_Access implements Countable, It } return false; } + /** * getReferences * @return array all references @@ -1327,6 +1390,7 @@ abstract class Doctrine_Record2 extends Doctrine_Access implements Countable, It { return $this->references; } + /** * loadReference * loads a related component @@ -1348,6 +1412,7 @@ abstract class Doctrine_Record2 extends Doctrine_Access implements Countable, It $this->references[$name] = $coll; } } + /** * binds One-to-One composite relation * @@ -1359,6 +1424,7 @@ abstract class Doctrine_Record2 extends Doctrine_Access implements Countable, It { $this->_table->bind($componentName, $foreignKey, Doctrine_Relation::ONE_COMPOSITE, $options); } + /** * binds One-to-Many composite relation * @@ -1370,6 +1436,7 @@ abstract class Doctrine_Record2 extends Doctrine_Access implements Countable, It { $this->_table->bind($componentName, $foreignKey, Doctrine_Relation::MANY_COMPOSITE, $options); } + /** * binds One-to-One aggregate relation * @@ -1381,6 +1448,7 @@ abstract class Doctrine_Record2 extends Doctrine_Access implements Countable, It { $this->_table->bind($componentName, $foreignKey, Doctrine_Relation::ONE_AGGREGATE, $options); } + /** * binds One-to-Many aggregate relation * @@ -1392,6 +1460,7 @@ abstract class Doctrine_Record2 extends Doctrine_Access implements Countable, It { $this->_table->bind($componentName, $foreignKey, Doctrine_Relation::MANY_AGGREGATE, $options); } + /** * hasColumn * sets a column definition @@ -1406,6 +1475,7 @@ abstract class Doctrine_Record2 extends Doctrine_Access implements Countable, It { $this->_table->setColumn($name, $type, $length, $options); } + /** * countRelated * @@ -1422,6 +1492,7 @@ abstract class Doctrine_Record2 extends Doctrine_Access implements Countable, It $array = $query->execute(array($this->getIncremented())); return $array[0]['COUNT(1)']; } + /** * merge * merges this record with an array of values @@ -1457,6 +1528,7 @@ abstract class Doctrine_Record2 extends Doctrine_Access implements Countable, It { $this->_table->setEnumValues($column, $values); } + /** * attribute * sets or retrieves an option @@ -1480,6 +1552,7 @@ abstract class Doctrine_Record2 extends Doctrine_Access implements Countable, It $this->_table->setAttribute($attr, $value); } } + /** * option * sets or retrieves an option @@ -1503,6 +1576,7 @@ abstract class Doctrine_Record2 extends Doctrine_Access implements Countable, It $this->_table->setOption($name, $value); } } + /** * index * defines or retrieves an index @@ -1521,6 +1595,7 @@ abstract class Doctrine_Record2 extends Doctrine_Access implements Countable, It return $this->_table->addIndex($name, $definition); } } + /** * addListener * @@ -1532,6 +1607,7 @@ abstract class Doctrine_Record2 extends Doctrine_Access implements Countable, It $this->_table->addListener($listener, $name = null); return $this; } + /** * getListener * @@ -1541,6 +1617,7 @@ abstract class Doctrine_Record2 extends Doctrine_Access implements Countable, It { return $this->_table->getListener(); } + /** * setListener * @@ -1552,6 +1629,7 @@ abstract class Doctrine_Record2 extends Doctrine_Access implements Countable, It $this->_table->setListener($listener); return $this; } + /** * call * @@ -1575,6 +1653,7 @@ abstract class Doctrine_Record2 extends Doctrine_Access implements Countable, It } return $this; } + /** * getter for node assciated with this record * @@ -1595,6 +1674,7 @@ abstract class Doctrine_Record2 extends Doctrine_Access implements Countable, It return $this->_node; } + /** * used to delete node from tree - MUST BE USE TO DELETE RECORD IF TABLE ACTS AS TREE * @@ -1602,6 +1682,7 @@ abstract class Doctrine_Record2 extends Doctrine_Access implements Countable, It public function deleteNode() { $this->getNode()->delete(); } + /** * returns a string representation of this object */ diff --git a/draft/new-core/Table.php b/draft/new-core/Table.php index 7088ef87a..26bf9cc6c 100644 --- a/draft/new-core/Table.php +++ b/draft/new-core/Table.php @@ -18,6 +18,7 @@ * and is licensed under the LGPL. For more information, see * <http://www.phpdoctrine.com>. */ + /** * Doctrine_Table * @@ -39,39 +40,48 @@ class Doctrine_Table extends Doctrine_Configurable implements Countable * @var array $data temporary data which is then loaded into Doctrine_Record::$data */ private $data = array(); + /** * @var array $relations an array containing all the Doctrine_Relation objects for this table */ private $relations = array(); + /** * @var array $primaryKeys an array containing all primary key column names */ private $primaryKeys = array(); + /** * @var mixed $identifier */ private $identifier; + /** * @see Doctrine_Identifier constants * @var integer $identifierType the type of identifier this table uses */ private $identifierType; + /** * @var Doctrine_Connection $conn Doctrine_Connection object that created this table */ private $conn; + /** * @var string $name */ private $name; + /** * @var array $identityMap first level cache */ private $identityMap = array(); + /** * @var Doctrine_Table_Repository $repository record repository */ private $repository; + /** * @var array $columns an array of column definitions, * keys as column names and values as column definitions @@ -89,28 +99,34 @@ class Doctrine_Table extends Doctrine_Configurable implements Countable * ) */ protected $columns = array(); + /** * @var array $columnAliases an array of column aliases * keys as column aliases and values as column names */ protected $columnAliases = array(); + /** * @var array $bound bound relations */ private $bound = array(); + /** * @var array $boundAliases bound relation aliases */ private $boundAliases = array(); + /** * @var integer $columnCount cached column count, Doctrine_Record uses this column count in when * determining its state */ private $columnCount; + /** * @var boolean $hasDefaultValues whether or not this table has default values */ private $hasDefaultValues; + /** * @var array $options an array containing all options * @@ -160,10 +176,12 @@ class Doctrine_Table extends Doctrine_Configurable implements Countable 'treeOptions' => null, 'indexes' => array(), ); + /** * @var Doctrine_Tree $tree tree object associated with this table */ protected $tree; + /** * the constructor * @throws Doctrine_Connection_Exception if there are no opened connections @@ -301,6 +319,7 @@ class Doctrine_Table extends Doctrine_Configurable implements Countable $this->repository = new Doctrine_Table_Repository($this); } + /** * export * exports this table to database based on column and option definitions @@ -373,6 +392,7 @@ class Doctrine_Table extends Doctrine_Configurable implements Countable } } } + /** * exportConstraints * exports the constraints of this table into database based on option definitions @@ -395,6 +415,7 @@ class Doctrine_Table extends Doctrine_Configurable implements Countable throw $e; } } + /** * __get * an alias for getOption @@ -408,6 +429,7 @@ class Doctrine_Table extends Doctrine_Configurable implements Countable } return null; } + /** * __isset * @@ -417,6 +439,7 @@ class Doctrine_Table extends Doctrine_Configurable implements Countable { return isset($this->options[$option]); } + /** * addForeignKey * @@ -428,6 +451,7 @@ class Doctrine_Table extends Doctrine_Configurable implements Countable { $this->options['foreignKeys'][] = $definition; } + /** * addIndex * @@ -440,6 +464,7 @@ class Doctrine_Table extends Doctrine_Configurable implements Countable $index = $this->conn->getIndexName($index); $this->options['indexes'][$index] = $definition; } + /** * getIndex * @@ -453,6 +478,7 @@ class Doctrine_Table extends Doctrine_Configurable implements Countable return false; } + /** * createQuery * creates a new Doctrine_Query object and adds the component name @@ -464,6 +490,7 @@ class Doctrine_Table extends Doctrine_Configurable implements Countable { return Doctrine_Query::create()->from($this->getComponentName()); } + /** * getRepository * @@ -498,6 +525,7 @@ class Doctrine_Table extends Doctrine_Configurable implements Countable } return null; } + /** * getColumnName * @@ -516,6 +544,7 @@ class Doctrine_Table extends Doctrine_Configurable implements Countable return $alias; } + /** * setColumn * @@ -567,6 +596,7 @@ class Doctrine_Table extends Doctrine_Configurable implements Countable $this->hasDefaultValues = true; } } + /** * hasDefaultValues * returns true if this table has default values, otherwise false @@ -577,6 +607,7 @@ class Doctrine_Table extends Doctrine_Configurable implements Countable { return $this->hasDefaultValues; } + /** * getDefaultValueOf * returns the default value(if any) for given column @@ -596,6 +627,7 @@ class Doctrine_Table extends Doctrine_Configurable implements Countable return null; } } + /** * @return mixed */ @@ -603,6 +635,7 @@ class Doctrine_Table extends Doctrine_Configurable implements Countable { return $this->identifier; } + /** * @return integer */ @@ -610,6 +643,7 @@ class Doctrine_Table extends Doctrine_Configurable implements Countable { return $this->identifierType; } + /** * hasColumn * @return boolean @@ -618,6 +652,7 @@ class Doctrine_Table extends Doctrine_Configurable implements Countable { return isset($this->columns[$name]); } + /** * @param mixed $key * @return void @@ -633,6 +668,7 @@ class Doctrine_Table extends Doctrine_Configurable implements Countable break; }; } + /** * returns all primary keys * @return array @@ -641,6 +677,7 @@ class Doctrine_Table extends Doctrine_Configurable implements Countable { return $this->primaryKeys; } + /** * @return boolean */ @@ -648,6 +685,7 @@ class Doctrine_Table extends Doctrine_Configurable implements Countable { return in_array($key,$this->primaryKeys); } + /** * returns all bound relations * @@ -657,6 +695,7 @@ class Doctrine_Table extends Doctrine_Configurable implements Countable { return $this->bound; } + /** * returns a bound relation array * @@ -670,6 +709,7 @@ class Doctrine_Table extends Doctrine_Configurable implements Countable } return $this->bound[$name]; } + /** * returns a bound relation array * @@ -687,6 +727,7 @@ class Doctrine_Table extends Doctrine_Configurable implements Countable } throw new Doctrine_Table_Exception('Unknown bound ' . $name); } + /** * returns the alias for given component name * @@ -700,6 +741,7 @@ class Doctrine_Table extends Doctrine_Configurable implements Countable } return $name; } + /** * returns component name for given alias * @@ -713,6 +755,7 @@ class Doctrine_Table extends Doctrine_Configurable implements Countable } return $alias; } + /** * unbinds all relations * @@ -724,6 +767,7 @@ class Doctrine_Table extends Doctrine_Configurable implements Countable $this->relations = array(); $this->boundAliases = array(); } + /** * unbinds a relation * returns true on success, false on failure @@ -746,6 +790,7 @@ class Doctrine_Table extends Doctrine_Configurable implements Countable } return true; } + /** * binds a relation * @@ -790,6 +835,7 @@ class Doctrine_Table extends Doctrine_Configurable implements Countable $this->bound[$alias] = array_merge($this->bound[$alias], $opt); } } + /** * @return Doctrine_Connection */ @@ -797,6 +843,7 @@ class Doctrine_Table extends Doctrine_Configurable implements Countable { return $this->conn; } + /** * hasRelatedComponent * @return boolean @@ -805,6 +852,7 @@ class Doctrine_Table extends Doctrine_Configurable implements Countable { return (strpos($this->bound[$name]['field'], $component . '.') !== false); } + /** * @param string $name component name of which a foreign key object is bound * @return boolean @@ -821,6 +869,7 @@ class Doctrine_Table extends Doctrine_Configurable implements Countable } return false; } + /** * getRelation * @@ -985,6 +1034,7 @@ class Doctrine_Table extends Doctrine_Configurable implements Countable } } + /** * returns an array containing all foreign key objects * @@ -998,6 +1048,7 @@ class Doctrine_Table extends Doctrine_Configurable implements Countable return $this->relations; } + /** * create * creates a new record @@ -1011,6 +1062,7 @@ class Doctrine_Table extends Doctrine_Configurable implements Countable $this->data = array(); return $record; } + /** * finds a record by its identifier * @@ -1042,6 +1094,7 @@ class Doctrine_Table extends Doctrine_Configurable implements Countable } return false; } + /** * applyInheritance * @param $where query where part to be modified @@ -1059,6 +1112,7 @@ class Doctrine_Table extends Doctrine_Configurable implements Countable } return $where; } + /** * findAll * returns a collection of records @@ -1071,6 +1125,7 @@ class Doctrine_Table extends Doctrine_Configurable implements Countable $users = $graph->query("FROM ".$this->options['name']); return $users; } + /** * findByDql * finds records with given DQL where clause @@ -1089,6 +1144,7 @@ class Doctrine_Table extends Doctrine_Configurable implements Countable public function findByDql($dql, array $params = array()) { return $this->findBySql($dql, $params); } + /** * clear * clears the first level cache (identityMap) @@ -1099,6 +1155,7 @@ class Doctrine_Table extends Doctrine_Configurable implements Countable { $this->identityMap = array(); } + /** * getRecord * first checks if record exists in identityMap, if not @@ -1154,7 +1211,7 @@ class Doctrine_Table extends Doctrine_Configurable implements Countable */ public function getClassnameToReturn() { - if (!isset($this->options['subclasses'])) { + if ( ! isset($this->options['subclasses'])) { return $this->options['name']; } foreach ($this->options['subclasses'] as $subclass) { @@ -1162,7 +1219,7 @@ class Doctrine_Table extends Doctrine_Configurable implements Countable $inheritanceMap = $table->getOption('inheritanceMap'); $nomatch = false; foreach ($inheritanceMap as $key => $value) { - if (!isset($this->data[$key]) || $this->data[$key] != $value) { + if ( ! isset($this->data[$key]) || $this->data[$key] != $value) { $nomatch = true; break; } @@ -1195,6 +1252,7 @@ class Doctrine_Table extends Doctrine_Configurable implements Countable } return $this->getRecord(); } + /** * count * @@ -1205,6 +1263,7 @@ class Doctrine_Table extends Doctrine_Configurable implements Countable $a = $this->conn->getDBH()->query("SELECT COUNT(1) FROM ".$this->options['tableName'])->fetch(PDO::FETCH_NUM); return current($a); } + /** * @return Doctrine_Query a Doctrine_Query object */ @@ -1214,6 +1273,7 @@ class Doctrine_Table extends Doctrine_Configurable implements Countable $graph->load($this->getComponentName()); return $graph; } + /** * execute * @param string $query @@ -1240,6 +1300,7 @@ class Doctrine_Table extends Doctrine_Configurable implements Countable } return $coll; } + /** * @param string $field * @return array @@ -1252,6 +1313,7 @@ class Doctrine_Table extends Doctrine_Configurable implements Countable return array(); } } + /** * enumValue * @@ -1266,6 +1328,7 @@ class Doctrine_Table extends Doctrine_Configurable implements Countable return isset($this->columns[$field][2]['values'][$index]) ? $this->columns[$field][2]['values'][$index] : $index; } + /** * enumIndex * @@ -1279,6 +1342,7 @@ class Doctrine_Table extends Doctrine_Configurable implements Countable return array_search($value, $values); } + /** * invokeSet * @@ -1290,7 +1354,7 @@ class Doctrine_Table extends Doctrine_Configurable implements Countable return $value; } $prefix = $this->getAttribute(Doctrine::ATTR_ACCESSOR_PREFIX_SET); - if (!$prefix) + if ( ! $prefix) $prefix = 'set'; $method = $prefix . $name; @@ -1301,6 +1365,7 @@ class Doctrine_Table extends Doctrine_Configurable implements Countable return $value; } + /** * invokeGet * @@ -1312,7 +1377,7 @@ class Doctrine_Table extends Doctrine_Configurable implements Countable return $value; } $prefix = $this->getAttribute(Doctrine::ATTR_ACCESSOR_PREFIX_GET); - if (!$prefix) + if ( ! $prefix) $prefix = 'get'; $method = $prefix . $name; @@ -1336,6 +1401,7 @@ class Doctrine_Table extends Doctrine_Configurable implements Countable } return false; } + /** * getColumnCount * @@ -1355,6 +1421,7 @@ class Doctrine_Table extends Doctrine_Configurable implements Countable { return $this->columns; } + /** * returns an array containing all the column names * @@ -1377,6 +1444,7 @@ class Doctrine_Table extends Doctrine_Configurable implements Countable } return false; } + /** * getTypeOf * @@ -1389,6 +1457,7 @@ class Doctrine_Table extends Doctrine_Configurable implements Countable } return false; } + /** * setData * doctrine uses this function internally @@ -1401,6 +1470,7 @@ class Doctrine_Table extends Doctrine_Configurable implements Countable { $this->data = $data; } + /** * returns the maximum primary key value * @@ -1413,6 +1483,7 @@ class Doctrine_Table extends Doctrine_Configurable implements Countable $data = $stmt->fetch(PDO::FETCH_NUM); return isset($data[0])?$data[0]:1; } + /** * returns internal data, used by Doctrine_Record instances * when retrieving data from database @@ -1423,6 +1494,7 @@ class Doctrine_Table extends Doctrine_Configurable implements Countable { return $this->data; } + /** * getter for associated tree * @@ -1453,6 +1525,7 @@ class Doctrine_Table extends Doctrine_Configurable implements Countable { $this->options['tableName'] = $tableName; } + /** * determine if table acts as tree * @@ -1461,6 +1534,7 @@ class Doctrine_Table extends Doctrine_Configurable implements Countable public function isTree() { return ( ! is_null($this->options['treeImpl'])) ? true : false; } + /** * returns a string representation of this object * diff --git a/lib/Doctrine.php b/lib/Doctrine.php index ee7c092da..cac854eac 100644 --- a/lib/Doctrine.php +++ b/lib/Doctrine.php @@ -349,7 +349,7 @@ final class Doctrine * HYDRATION CONSTANTS */ const HYDRATE_RECORD = 2; - + /** * HYDRATE_ARRAY */ @@ -736,7 +736,7 @@ final class Doctrine */ public static function createDatabases($specifiedConnections = array()) { - if (!is_array($specifiedConnections)) { + if ( ! is_array($specifiedConnections)) { $specifiedConnections = (array) $specifiedConnections; } @@ -744,7 +744,7 @@ final class Doctrine $connections = $manager->getConnections(); foreach ($connections as $name => $connection) { - if (!empty($specifiedConnections) && !in_array($name, $specifiedConnections)) { + if ( ! empty($specifiedConnections) && !in_array($name, $specifiedConnections)) { continue; } @@ -783,7 +783,7 @@ final class Doctrine */ public static function dropDatabases($specifiedConnections = array()) { - if (!is_array($specifiedConnections)) { + if ( ! is_array($specifiedConnections)) { $specifiedConnections = (array) $specifiedConnections; } @@ -792,7 +792,7 @@ final class Doctrine $connections = $manager->getConnections(); foreach ($connections as $name => $connection) { - if (!empty($specifiedConnections) && !in_array($name, $specifiedConnections)) { + if ( ! empty($specifiedConnections) && !in_array($name, $specifiedConnections)) { continue; } @@ -834,7 +834,7 @@ final class Doctrine { $data = new Doctrine_Data(); - if (!$append) { + if ( ! $append) { $data->purge(); } @@ -854,13 +854,13 @@ final class Doctrine { $data = new Doctrine_Data(); - if (!$append) { + if ( ! $append) { $data->purge(); } return $data->importDummyData($num); } - + /** * migrate * @@ -920,7 +920,7 @@ final class Doctrine return $builder->generateMigrationsFromModels($modelsPath); } - + /** * getTable * @@ -931,7 +931,7 @@ final class Doctrine { return Doctrine_Manager::table($tableName); } - + /** * connection * @@ -943,7 +943,7 @@ final class Doctrine { return Doctrine_Manager::connection($adapter, $name); } - + /** * fileFinder * @@ -954,7 +954,7 @@ final class Doctrine { return Doctrine_FileFinder::type($type); } - + /** * compile * method for making a single file of most used doctrine runtime components @@ -970,7 +970,7 @@ final class Doctrine { return Doctrine_Compiler::compile($target, $includedDrivers); } - + /** * simple autoload function * returns true if the class was loaded, otherwise false @@ -998,7 +998,7 @@ final class Doctrine return true; } - + /** * dump * @@ -1030,7 +1030,7 @@ final class Doctrine } return implode("\n", $ret); } - + /** * returns table name from class name * @@ -1041,7 +1041,7 @@ final class Doctrine { return strtolower(preg_replace('~(?<=\\w)([A-Z])~', '_$1', $classname)); } - + /** * returns class name from table name * @@ -1052,7 +1052,7 @@ final class Doctrine { return preg_replace_callback('~(_?)(_)([\w])~', array("Doctrine", "classifyCallback"), ucfirst($tablename)); } - + /** * Callback function to classify a classname propperly. * @@ -1063,7 +1063,7 @@ final class Doctrine { return $matches[1] . strtoupper($matches[3]); } - + /** * checks for valid class name (uses camel case and underscores) * diff --git a/lib/Doctrine/Access.php b/lib/Doctrine/Access.php index 3be4bcfff..620fab6f4 100644 --- a/lib/Doctrine/Access.php +++ b/lib/Doctrine/Access.php @@ -18,6 +18,7 @@ * and is licensed under the LGPL. For more information, see * <http://www.phpdoctrine.com>. */ + /** * Doctrine_Access * @@ -49,6 +50,7 @@ abstract class Doctrine_Access extends Doctrine_Locator_Injectable implements Ar return $this; } + /** * __set an alias of set() * @@ -62,6 +64,7 @@ abstract class Doctrine_Access extends Doctrine_Locator_Injectable implements Ar { $this->set($name,$value); } + /** * __get -- an alias of get() * @@ -74,6 +77,7 @@ abstract class Doctrine_Access extends Doctrine_Locator_Injectable implements Ar { return $this->get($name); } + /** * __isset() * @@ -85,6 +89,7 @@ abstract class Doctrine_Access extends Doctrine_Locator_Injectable implements Ar { return $this->contains($name); } + /** * __unset() * @@ -96,6 +101,7 @@ abstract class Doctrine_Access extends Doctrine_Locator_Injectable implements Ar { return $this->remove($name); } + /** * @param mixed $offset * @return boolean whether or not this object contains $offset @@ -104,6 +110,7 @@ abstract class Doctrine_Access extends Doctrine_Locator_Injectable implements Ar { return $this->contains($offset); } + /** * offsetGet an alias of get() * @see get, __get @@ -114,6 +121,7 @@ abstract class Doctrine_Access extends Doctrine_Locator_Injectable implements Ar { return $this->get($offset); } + /** * sets $offset to $value * @see set, __set @@ -129,6 +137,7 @@ abstract class Doctrine_Access extends Doctrine_Locator_Injectable implements Ar $this->set($offset, $value); } } + /** * unset a given offset * @see set, offsetSet, __set diff --git a/lib/Doctrine/Adapter/Db2.php b/lib/Doctrine/Adapter/Db2.php index da7e7ee93..4821b0de3 100644 --- a/lib/Doctrine/Adapter/Db2.php +++ b/lib/Doctrine/Adapter/Db2.php @@ -268,6 +268,7 @@ class Doctrine_Adapter_Db2 extends Doctrine_Adapter $identQuote = $info->IDENTIFIER_QUOTE_CHAR; return $identQuote; } + /** * Begin a transaction. * diff --git a/lib/Doctrine/Adapter/Interface.php b/lib/Doctrine/Adapter/Interface.php index 499ad252d..e4e1447c4 100644 --- a/lib/Doctrine/Adapter/Interface.php +++ b/lib/Doctrine/Adapter/Interface.php @@ -18,6 +18,7 @@ * and is licensed under the LGPL. For more information, see * <http://www.phpdoctrine.com>. */ + /** * Doctrine_Adapter_Interface * This adapter interface should be implemented by all custom adapters diff --git a/lib/Doctrine/Adapter/Mock.php b/lib/Doctrine/Adapter/Mock.php index 1d6b4f997..2921a2c6a 100644 --- a/lib/Doctrine/Adapter/Mock.php +++ b/lib/Doctrine/Adapter/Mock.php @@ -18,6 +18,7 @@ * and is licensed under the LGPL. For more information, see * <http://www.phpdoctrine.com>. */ + /** * Doctrine_Adapter_Mock * This class is used for special testing purposes. diff --git a/lib/Doctrine/Adapter/Mysqli.php b/lib/Doctrine/Adapter/Mysqli.php index 25c6c7be8..32091f114 100644 --- a/lib/Doctrine/Adapter/Mysqli.php +++ b/lib/Doctrine/Adapter/Mysqli.php @@ -18,6 +18,7 @@ * and is licensed under the LGPL. For more information, see * <http://www.phpdoctrine.com>. */ + /** * Doctrine_Adapter_Mysqli * This class is used for special testing purposes. diff --git a/lib/Doctrine/Adapter/Oracle.php b/lib/Doctrine/Adapter/Oracle.php index 1666425b6..fc6fc18bc 100644 --- a/lib/Doctrine/Adapter/Oracle.php +++ b/lib/Doctrine/Adapter/Oracle.php @@ -181,6 +181,7 @@ class Doctrine_Adapter_Oracle extends Doctrine_Adapter // Oracle doesn't allow the 'AS' keyword between the table identifier/expression and alias. return $this->_quoteIdentifierAs($ident, $alias, ' '); } + /** * Leave autocommit mode and begin a transaction. * @@ -190,6 +191,7 @@ class Doctrine_Adapter_Oracle extends Doctrine_Adapter { $this->_setExecuteMode(OCI_DEFAULT); } + /** * Commit a transaction and return to autocommit mode. * @@ -203,6 +205,7 @@ class Doctrine_Adapter_Oracle extends Doctrine_Adapter } $this->_setExecuteMode(OCI_COMMIT_ON_SUCCESS); } + /** * Roll back a transaction and return to autocommit mode. * @@ -240,6 +243,7 @@ class Doctrine_Adapter_Oracle extends Doctrine_Adapter break; } } + /** * @param integer $mode * @throws Doctrine_Adapter_Exception @@ -257,6 +261,7 @@ class Doctrine_Adapter_Oracle extends Doctrine_Adapter break; } } + /** * @return */ diff --git a/lib/Doctrine/Adapter/Statement.php b/lib/Doctrine/Adapter/Statement.php index e8e9f19a1..1a706a4bd 100644 --- a/lib/Doctrine/Adapter/Statement.php +++ b/lib/Doctrine/Adapter/Statement.php @@ -18,6 +18,7 @@ * and is licensed under the LGPL. For more information, see * <http://www.phpdoctrine.com>. */ + /** * Doctrine_Adapter_Statement * @@ -34,6 +35,7 @@ abstract class Doctrine_Adapter_Statement public function bindValue($no, $value) { } + /** * fetch * diff --git a/lib/Doctrine/Adapter/Statement/Interface.php b/lib/Doctrine/Adapter/Statement/Interface.php index ee692e6fd..640f8bbae 100644 --- a/lib/Doctrine/Adapter/Statement/Interface.php +++ b/lib/Doctrine/Adapter/Statement/Interface.php @@ -18,6 +18,7 @@ * and is licensed under the LGPL. For more information, see * <http://www.phpdoctrine.com>. */ + /** * Doctrine_Adapter_Statement * @@ -43,6 +44,7 @@ interface Doctrine_Adapter_Statement_Interface * @return boolean Returns TRUE on success or FALSE on failure */ public function bindColumn($column, $param, $type = null); + /** * bindValue * Binds a value to a corresponding named or question mark @@ -58,6 +60,7 @@ interface Doctrine_Adapter_Statement_Interface * @return boolean Returns TRUE on success or FALSE on failure. */ public function bindValue($param, $value, $type = null); + /** * bindParam * Binds a PHP variable to a corresponding named or question mark placeholder in the @@ -86,6 +89,7 @@ interface Doctrine_Adapter_Statement_Interface * @return boolean Returns TRUE on success or FALSE on failure. */ public function bindParam($column, &$variable, $type = null, $length = null, $driverOptions = array()); + /** * closeCursor * Closes the cursor, enabling the statement to be executed again. @@ -93,6 +97,7 @@ interface Doctrine_Adapter_Statement_Interface * @return boolean Returns TRUE on success or FALSE on failure. */ public function closeCursor(); + /** * columnCount * Returns the number of columns in the result set @@ -102,6 +107,7 @@ interface Doctrine_Adapter_Statement_Interface * this method should return 0. */ public function columnCount(); + /** * errorCode * Fetch the SQLSTATE associated with the last operation on the statement handle @@ -110,6 +116,7 @@ interface Doctrine_Adapter_Statement_Interface * @return string error code string */ public function errorCode(); + /** * errorInfo * Fetch extended error information associated with the last operation on the statement handle @@ -118,6 +125,7 @@ interface Doctrine_Adapter_Statement_Interface * @return array error info array */ public function errorInfo(); + /** * execute * Executes a prepared statement @@ -134,6 +142,7 @@ interface Doctrine_Adapter_Statement_Interface * @return boolean Returns TRUE on success or FALSE on failure. */ public function execute($params = null); + /** * fetch * @@ -164,6 +173,7 @@ interface Doctrine_Adapter_Statement_Interface public function fetch($fetchStyle = Doctrine::FETCH_BOTH, $cursorOrientation = Doctrine::FETCH_ORI_NEXT, $cursorOffset = null); + /** * fetchAll * Returns an array containing all of the result set rows @@ -178,6 +188,7 @@ interface Doctrine_Adapter_Statement_Interface * @return array */ public function fetchAll($fetchStyle = Doctrine::FETCH_BOTH); + /** * fetchColumn * Returns a single column from the next row of a @@ -190,6 +201,7 @@ interface Doctrine_Adapter_Statement_Interface * @return string returns a single column in the next row of a result set. */ public function fetchColumn($columnIndex = 0); + /** * fetchObject * Fetches the next row and returns it as an object. @@ -204,6 +216,7 @@ interface Doctrine_Adapter_Statement_Interface * to the column names or FALSE in case of an error. */ public function fetchObject($className = 'stdClass', $args = array()); + /** * getAttribute * Retrieve a statement attribute @@ -213,6 +226,7 @@ interface Doctrine_Adapter_Statement_Interface * @return mixed the attribute value */ public function getAttribute($attribute); + /** * getColumnMeta * Returns metadata for a column in a result set @@ -230,6 +244,7 @@ interface Doctrine_Adapter_Statement_Interface * pdo_type The type of this column as represented by the PDO::PARAM_* constants. */ public function getColumnMeta($column); + /** * nextRowset * Advances to the next rowset in a multi-rowset statement handle @@ -242,6 +257,7 @@ interface Doctrine_Adapter_Statement_Interface * @return boolean Returns TRUE on success or FALSE on failure. */ public function nextRowset(); + /** * rowCount * rowCount() returns the number of rows affected by the last DELETE, INSERT, or UPDATE statement @@ -255,6 +271,7 @@ interface Doctrine_Adapter_Statement_Interface * @return integer Returns the number of rows. */ public function rowCount(); + /** * setAttribute * Set a statement attribute @@ -264,6 +281,7 @@ interface Doctrine_Adapter_Statement_Interface * @return boolean Returns TRUE on success or FALSE on failure. */ public function setAttribute($attribute, $value); + /** * setFetchMode * Set the default fetch mode for this statement diff --git a/lib/Doctrine/Adapter/Statement/Mock.php b/lib/Doctrine/Adapter/Statement/Mock.php index ea4c441c6..e3aa711dc 100644 --- a/lib/Doctrine/Adapter/Statement/Mock.php +++ b/lib/Doctrine/Adapter/Statement/Mock.php @@ -18,6 +18,7 @@ * and is licensed under the LGPL. For more information, see * <http://www.phpdoctrine.com>. */ + /** * Doctrine_Adapter_Statement_Mock * This class is used for special testing purposes. @@ -40,6 +41,7 @@ class Doctrine_Adapter_Statement_Mock implements Doctrine_Adapter_Statement_Inte { $this->mock = $mock; } + /** * bindColumn * Bind a column to a PHP variable @@ -55,6 +57,7 @@ class Doctrine_Adapter_Statement_Mock implements Doctrine_Adapter_Statement_Inte { } + /** * bindValue * Binds a value to a corresponding named or question mark @@ -73,6 +76,7 @@ class Doctrine_Adapter_Statement_Mock implements Doctrine_Adapter_Statement_Inte { } + /** * bindParam * Binds a PHP variable to a corresponding named or question mark placeholder in the @@ -104,6 +108,7 @@ class Doctrine_Adapter_Statement_Mock implements Doctrine_Adapter_Statement_Inte { } + /** * closeCursor * Closes the cursor, enabling the statement to be executed again. @@ -114,6 +119,7 @@ class Doctrine_Adapter_Statement_Mock implements Doctrine_Adapter_Statement_Inte { return true; } + /** * columnCount * Returns the number of columns in the result set @@ -126,6 +132,7 @@ class Doctrine_Adapter_Statement_Mock implements Doctrine_Adapter_Statement_Inte { return 0; } + /** * errorCode * Fetch the SQLSTATE associated with the last operation on the statement handle @@ -137,6 +144,7 @@ class Doctrine_Adapter_Statement_Mock implements Doctrine_Adapter_Statement_Inte { return array(); } + /** * errorInfo * Fetch extended error information associated with the last operation on the statement handle @@ -148,6 +156,7 @@ class Doctrine_Adapter_Statement_Mock implements Doctrine_Adapter_Statement_Inte { return array(); } + /** * fetch * @@ -181,6 +190,7 @@ class Doctrine_Adapter_Statement_Mock implements Doctrine_Adapter_Statement_Inte { return array(); } + /** * fetchAll * Returns an array containing all of the result set rows @@ -198,6 +208,7 @@ class Doctrine_Adapter_Statement_Mock implements Doctrine_Adapter_Statement_Inte { return array(); } + /** * execute * Executes a prepared statement @@ -220,6 +231,7 @@ class Doctrine_Adapter_Statement_Mock implements Doctrine_Adapter_Statement_Inte } return true; } + /** * fetchColumn * Returns a single column from the next row of a @@ -235,6 +247,7 @@ class Doctrine_Adapter_Statement_Mock implements Doctrine_Adapter_Statement_Inte { return 0; } + /** * fetchObject * Fetches the next row and returns it as an object. @@ -252,6 +265,7 @@ class Doctrine_Adapter_Statement_Mock implements Doctrine_Adapter_Statement_Inte { return new $className(); } + /** * nextRowset * Advances to the next rowset in a multi-rowset statement handle @@ -267,6 +281,7 @@ class Doctrine_Adapter_Statement_Mock implements Doctrine_Adapter_Statement_Inte { return true; } + /** * rowCount * rowCount() returns the number of rows affected by the last DELETE, INSERT, or UPDATE statement @@ -283,6 +298,7 @@ class Doctrine_Adapter_Statement_Mock implements Doctrine_Adapter_Statement_Inte { return 0; } + /** * getColumnMeta * Returns metadata for a column in a result set diff --git a/lib/Doctrine/AuditLog.php b/lib/Doctrine/AuditLog.php index 6f15ff4d6..05c885592 100644 --- a/lib/Doctrine/AuditLog.php +++ b/lib/Doctrine/AuditLog.php @@ -18,6 +18,7 @@ * and is licensed under the LGPL. For more information, see * <http://www.phpdoctrine.com>. */ + /** * Doctrine_AuditLog * diff --git a/lib/Doctrine/Cache.php b/lib/Doctrine/Cache.php index 3a7738d38..385f52bdf 100644 --- a/lib/Doctrine/Cache.php +++ b/lib/Doctrine/Cache.php @@ -42,22 +42,27 @@ class Doctrine_Cache extends Doctrine_EventListener implements Countable, Iterat 'cleanPropability' => 0.01, 'statsFile' => '../data/stats.cache', ); + /** * @var array $_queries query stack */ protected $_queries = array(); + /** * @var Doctrine_Cache_Interface $_driver the cache driver object */ protected $_driver; + /** * @var array $data current cache data array */ protected $_data = array(); + /** * @var boolean $success the success of last operation */ protected $_success = false; + /** * constructor * @@ -83,6 +88,7 @@ class Doctrine_Cache extends Doctrine_EventListener implements Countable, Iterat $this->_driver = new $class($options); } } + /** * getDriver * returns the current cache driver @@ -93,6 +99,7 @@ class Doctrine_Cache extends Doctrine_EventListener implements Countable, Iterat { return $this->_driver; } + /** * setOption * @@ -113,6 +120,7 @@ class Doctrine_Cache extends Doctrine_EventListener implements Countable, Iterat } return false; } + /** * getOption * @@ -127,6 +135,7 @@ class Doctrine_Cache extends Doctrine_EventListener implements Countable, Iterat return $this->_options[$option]; } + /** * add * adds a query to internal query stack @@ -143,6 +152,7 @@ class Doctrine_Cache extends Doctrine_EventListener implements Countable, Iterat $this->_queries[] = $query; } } + /** * getQueries * @@ -161,6 +171,7 @@ class Doctrine_Cache extends Doctrine_EventListener implements Countable, Iterat return $this->_queries; } + /** * pop * @@ -171,6 +182,7 @@ class Doctrine_Cache extends Doctrine_EventListener implements Countable, Iterat { return array_pop($this->_queries); } + /** * reset * @@ -181,6 +193,7 @@ class Doctrine_Cache extends Doctrine_EventListener implements Countable, Iterat { $this->_queries = array(); } + /** * count * @@ -190,6 +203,7 @@ class Doctrine_Cache extends Doctrine_EventListener implements Countable, Iterat { return count($this->_queries); } + /** * getIterator * @@ -199,6 +213,7 @@ class Doctrine_Cache extends Doctrine_EventListener implements Countable, Iterat { return new ArrayIterator($this->_queries); } + /** * @return boolean whether or not the last cache operation was successful */ @@ -206,6 +221,7 @@ class Doctrine_Cache extends Doctrine_EventListener implements Countable, Iterat { return $this->_success; } + /** * save * @@ -241,6 +257,7 @@ class Doctrine_Cache extends Doctrine_EventListener implements Countable, Iterat } } } + /** * readStats * @@ -257,6 +274,7 @@ class Doctrine_Cache extends Doctrine_EventListener implements Countable, Iterat } return array(); } + /** * appendStats * @@ -278,6 +296,7 @@ class Doctrine_Cache extends Doctrine_EventListener implements Countable, Iterat } } } + /** * preQuery * listens on the Doctrine_Event preQuery event @@ -322,6 +341,7 @@ class Doctrine_Cache extends Doctrine_EventListener implements Countable, Iterat } return false; } + /** * preFetch * listens the preFetch event of Doctrine_Connection_Statement @@ -337,6 +357,7 @@ class Doctrine_Cache extends Doctrine_EventListener implements Countable, Iterat next($this->_data); return $ret; } + /** * preFetch * listens the preFetchAll event of Doctrine_Connection_Statement @@ -349,6 +370,7 @@ class Doctrine_Cache extends Doctrine_EventListener implements Countable, Iterat { return $this->_data; } + /** * preExecute * listens the preExecute event of Doctrine_Connection_Statement diff --git a/lib/Doctrine/Cache/Apc.php b/lib/Doctrine/Cache/Apc.php index 8117bfcb6..7c8b37f0e 100644 --- a/lib/Doctrine/Cache/Apc.php +++ b/lib/Doctrine/Cache/Apc.php @@ -44,6 +44,7 @@ class Doctrine_Cache_Apc extends Doctrine_Cache_Driver } parent::__construct($options); } + /** * Test if a cache is available for the given id and (if yes) return it (false else) * @@ -61,6 +62,7 @@ class Doctrine_Cache_Apc extends Doctrine_Cache_Driver } return false; } + /** * Test if a cache is available or not (for the given id) * @@ -75,6 +77,7 @@ class Doctrine_Cache_Apc extends Doctrine_Cache_Driver } return false; } + /** * Save some string datas into a cache record * @@ -91,6 +94,7 @@ class Doctrine_Cache_Apc extends Doctrine_Cache_Driver return (bool) apc_store($id, array($data, time()), $lifeTime); } + /** * Remove a cache record * diff --git a/lib/Doctrine/Cache/Array.php b/lib/Doctrine/Cache/Array.php index 6c218018b..3bc2e62f2 100644 --- a/lib/Doctrine/Cache/Array.php +++ b/lib/Doctrine/Cache/Array.php @@ -53,6 +53,7 @@ class Doctrine_Cache_Array implements Countable, Doctrine_Cache_Interface } return false; } + /** * Test if a cache is available or not (for the given id) * @@ -63,6 +64,7 @@ class Doctrine_Cache_Array implements Countable, Doctrine_Cache_Interface { return isset($this->data[$id]); } + /** * Save some string datas into a cache record * @@ -77,6 +79,7 @@ class Doctrine_Cache_Array implements Countable, Doctrine_Cache_Interface { $this->data[$id] = $data; } + /** * Remove a cache record * @@ -87,6 +90,7 @@ class Doctrine_Cache_Array implements Countable, Doctrine_Cache_Interface { unset($this->data[$id]); } + /** * Remove all cache record * @@ -96,6 +100,7 @@ class Doctrine_Cache_Array implements Countable, Doctrine_Cache_Interface { $this->data = array(); } + /** * count * diff --git a/lib/Doctrine/Cache/Db.php b/lib/Doctrine/Cache/Db.php index 0bf1e156a..558cf9762 100644 --- a/lib/Doctrine/Cache/Db.php +++ b/lib/Doctrine/Cache/Db.php @@ -54,6 +54,7 @@ class Doctrine_Cache_Db extends Doctrine_Cache_Driver implements Countable $this->_options = $options; } + /** * getConnection * returns the connection object associated with this cache driver @@ -64,6 +65,7 @@ class Doctrine_Cache_Db extends Doctrine_Cache_Driver implements Countable { return $this->_options['connection']; } + /** * Test if a cache is available for the given id and (if yes) return it (false else) * @@ -90,6 +92,7 @@ class Doctrine_Cache_Db extends Doctrine_Cache_Driver implements Countable return unserialize($result[0]['data']); } + /** * Test if a cache is available or not (for the given id) * @@ -103,6 +106,7 @@ class Doctrine_Cache_Db extends Doctrine_Cache_Driver implements Countable return $this->getConnection()->fetchOne($sql, array($id)); } + /** * Save some string datas into a cache record * @@ -128,6 +132,7 @@ class Doctrine_Cache_Db extends Doctrine_Cache_Driver implements Countable return (bool) $this->getConnection()->exec($sql, $params); } + /** * Remove a cache record * @@ -140,7 +145,7 @@ class Doctrine_Cache_Db extends Doctrine_Cache_Driver implements Countable return (bool) $this->getConnection()->exec($sql, array($id)); } - + /** * Removes all cache records * @@ -152,7 +157,7 @@ class Doctrine_Cache_Db extends Doctrine_Cache_Driver implements Countable return (bool) $this->getConnection()->exec($sql); } - + /** * count * returns the number of cached elements @@ -165,7 +170,7 @@ class Doctrine_Cache_Db extends Doctrine_Cache_Driver implements Countable return (int) $this->getConnection()->fetchOne($sql); } - + /** * Creates the cache table. */ diff --git a/lib/Doctrine/Cache/Driver.php b/lib/Doctrine/Cache/Driver.php index b9ccee062..fc8858bdc 100644 --- a/lib/Doctrine/Cache/Driver.php +++ b/lib/Doctrine/Cache/Driver.php @@ -36,7 +36,7 @@ abstract class Doctrine_Cache_Driver implements Doctrine_Cache_Interface * @var array $_options an array of options */ protected $_options = array(); - + /** * constructor * @@ -46,6 +46,7 @@ abstract class Doctrine_Cache_Driver implements Doctrine_Cache_Interface { $this->_options = $options; } + /** * setOption * @@ -61,6 +62,7 @@ abstract class Doctrine_Cache_Driver implements Doctrine_Cache_Interface } return false; } + /** * getOption * diff --git a/lib/Doctrine/Cache/Memcache.php b/lib/Doctrine/Cache/Memcache.php index df0d33be3..b1b19c863 100644 --- a/lib/Doctrine/Cache/Memcache.php +++ b/lib/Doctrine/Cache/Memcache.php @@ -36,6 +36,7 @@ class Doctrine_Cache_Memcache extends Doctrine_Cache_Driver * @var Memcache $_memcache memcache object */ protected $_memcache = null; + /** * constructor * @@ -69,6 +70,7 @@ class Doctrine_Cache_Memcache extends Doctrine_Cache_Driver $this->_memcache->addServer($server['host'], $server['port'], $server['persistent']); } } + /** * Test if a cache is available for the given id and (if yes) return it (false else) * @@ -88,6 +90,7 @@ class Doctrine_Cache_Memcache extends Doctrine_Cache_Driver return false; } + /** * Test if a cache is available or not (for the given id) * @@ -98,6 +101,7 @@ class Doctrine_Cache_Memcache extends Doctrine_Cache_Driver { return (bool) $this->_memcache->get($id); } + /** * Save some string datas into a cache record * @@ -118,6 +122,7 @@ class Doctrine_Cache_Memcache extends Doctrine_Cache_Driver $result = $this->_memcache->set($id, $data, $flag, $lifeTime); } + /** * Remove a cache record * diff --git a/lib/Doctrine/Cli.php b/lib/Doctrine/Cli.php index eb018aebf..d7bded4c3 100644 --- a/lib/Doctrine/Cli.php +++ b/lib/Doctrine/Cli.php @@ -38,7 +38,7 @@ class Doctrine_Cli $scriptName = null, $message = null, $config = array(); - + /** * __construct * @@ -52,7 +52,7 @@ class Doctrine_Cli $this->loadTasks(); } - + /** * notify * @@ -63,7 +63,7 @@ class Doctrine_Cli { echo $this->formatter->format($this->taskInstance->getTaskName(), 'INFO') . ' - ' . $this->formatter->format($notification, $style) . "\n"; } - + /** * notifyException * @@ -109,7 +109,7 @@ class Doctrine_Cli $arg1 = isset($args[1]) ? $args[1]:null; - if (!$arg1 || $arg1 == 'help') { + if ( ! $arg1 || $arg1 == 'help') { echo $this->printTasks(null, $arg1 == 'help' ? true:false); return; } @@ -121,7 +121,7 @@ class Doctrine_Cli $taskClass = $this->_getTaskClassFromArgs($args); - if (!class_exists($taskClass)) { + if ( ! class_exists($taskClass)) { throw new Doctrine_Cli_Exception('Cli task could not be found: ' . $taskClass); } @@ -183,7 +183,7 @@ class Doctrine_Cli // Now lets fill in the entered arguments to the prepared array $copy = $args; foreach ($prepared as $key => $value) { - if (!$value && !empty($copy)) { + if ( ! $value && !empty($copy)) { $prepared[$key] = $copy[0]; unset($copy[0]); $copy = array_values($copy); @@ -229,7 +229,7 @@ class Doctrine_Cli $requiredArguments = $taskInstance->getRequiredArgumentsDescriptions(); - if (!empty($requiredArguments)) { + if ( ! empty($requiredArguments)) { foreach ($requiredArguments as $name => $description) { $args .= $this->formatter->format($name, "ERROR"); @@ -245,7 +245,7 @@ class Doctrine_Cli $optionalArguments = $taskInstance->getOptionalArgumentsDescriptions(); - if (!empty($optionalArguments)) { + if ( ! empty($optionalArguments)) { foreach ($optionalArguments as $name => $description) { $args .= $name . ' - ' . $description."\n"; } @@ -259,7 +259,7 @@ class Doctrine_Cli echo "\n"; } } - + /** * loadTasks * @@ -286,7 +286,7 @@ class Doctrine_Cli $className = 'Doctrine_Task_' . $e[0]; - if (!class_exists($className)) { + if ( ! class_exists($className)) { require_once($file->getPathName()); $class = new ReflectionClass($className); diff --git a/lib/Doctrine/Cli/AnsiColorFormatter.php b/lib/Doctrine/Cli/AnsiColorFormatter.php index 616611fc2..665759f10 100644 --- a/lib/Doctrine/Cli/AnsiColorFormatter.php +++ b/lib/Doctrine/Cli/AnsiColorFormatter.php @@ -69,17 +69,17 @@ class Doctrine_Cli_AnsiColorFormatter extends Doctrine_Cli_Formatter */ public function format($text = '', $parameters = array(), $stream = STDOUT) { - if (!$this->supportsColors($stream)) + if ( ! $this->supportsColors($stream)) { return $text; } - if (!is_array($parameters) && 'NONE' == $parameters) + if ( ! is_array($parameters) && 'NONE' == $parameters) { return $text; } - if (!is_array($parameters) && isset($this->styles[$parameters])) + if ( ! is_array($parameters) && isset($this->styles[$parameters])) { $parameters = $this->styles[$parameters]; } @@ -128,7 +128,7 @@ class Doctrine_Cli_AnsiColorFormatter extends Doctrine_Cli_Formatter */ public function excerpt($text, $size = null) { - if (!$size) + if ( ! $size) { $size = $this->size; } diff --git a/lib/Doctrine/Cli/Formatter.php b/lib/Doctrine/Cli/Formatter.php index 305979fce..799887245 100644 --- a/lib/Doctrine/Cli/Formatter.php +++ b/lib/Doctrine/Cli/Formatter.php @@ -81,7 +81,7 @@ class Doctrine_Cli_Formatter */ public function excerpt($text, $size = null) { - if (!$size) + if ( ! $size) { $size = $this->size; } diff --git a/lib/Doctrine/Collection.php b/lib/Doctrine/Collection.php index 8f1651c3f..2db1d53d5 100644 --- a/lib/Doctrine/Collection.php +++ b/lib/Doctrine/Collection.php @@ -37,30 +37,37 @@ class Doctrine_Collection extends Doctrine_Access implements Countable, Iterator * @var array $data an array containing the records of this collection */ protected $data = array(); + /** * @var Doctrine_Table $table each collection has only records of specified table */ protected $_table; + /** * @var array $_snapshot a snapshot of the fetched data */ protected $_snapshot = array(); + /** * @var Doctrine_Record $reference collection can belong to a record */ protected $reference; + /** * @var string $referenceField the reference field of the collection */ protected $referenceField; + /** * @var Doctrine_Relation the record this collection is related to, if any */ protected $relation; + /** * @var string $keyColumn the name of the column that is used for collection key mapping */ protected $keyColumn; + /** * @var Doctrine_Null $null used for extremely fast null value testing */ @@ -88,6 +95,7 @@ class Doctrine_Collection extends Doctrine_Access implements Countable, Iterator $this->keyColumn = $keyColumn; } } + /** * initNullObject * initializes the null object for this collection @@ -98,6 +106,7 @@ class Doctrine_Collection extends Doctrine_Access implements Countable, Iterator { self::$null = $null; } + /** * getTable * returns the table this collection belongs to @@ -108,6 +117,7 @@ class Doctrine_Collection extends Doctrine_Access implements Countable, Iterator { return $this->_table; } + /** * setData * @@ -118,6 +128,7 @@ class Doctrine_Collection extends Doctrine_Access implements Countable, Iterator { $this->data = $data; } + /** * this method is automatically called when this Doctrine_Collection is serialized * @@ -138,6 +149,7 @@ class Doctrine_Collection extends Doctrine_Access implements Countable, Iterator return serialize($vars); } + /** * unseralize * this method is automatically called everytime a Doctrine_Collection object is unserialized @@ -165,6 +177,7 @@ class Doctrine_Collection extends Doctrine_Access implements Countable, Iterator $this->keyColumn = $keyColumn; } } + /** * setKeyColumn * sets the key column for this collection @@ -178,6 +191,7 @@ class Doctrine_Collection extends Doctrine_Access implements Countable, Iterator return $this; } + /** * getKeyColumn * returns the name of the key column @@ -188,6 +202,7 @@ class Doctrine_Collection extends Doctrine_Access implements Countable, Iterator { return $this->column; } + /** * getData * returns all the records as an array @@ -198,6 +213,7 @@ class Doctrine_Collection extends Doctrine_Access implements Countable, Iterator { return $this->data; } + /** * getFirst * returns the first record in the collection @@ -208,6 +224,7 @@ class Doctrine_Collection extends Doctrine_Access implements Countable, Iterator { return reset($this->data); } + /** * getLast * returns the last record in the collection @@ -218,6 +235,7 @@ class Doctrine_Collection extends Doctrine_Access implements Countable, Iterator { return end($this->data); } + /** * setReference * sets a reference pointer @@ -247,6 +265,7 @@ class Doctrine_Collection extends Doctrine_Access implements Countable, Iterator } } + /** * getReference * @@ -256,6 +275,7 @@ class Doctrine_Collection extends Doctrine_Access implements Countable, Iterator { return $this->reference; } + /** * remove * removes a specified collection element @@ -270,6 +290,7 @@ class Doctrine_Collection extends Doctrine_Access implements Countable, Iterator unset($this->data[$key]); return $removed; } + /** * contains * whether or not this collection contains a specified element @@ -285,6 +306,7 @@ class Doctrine_Collection extends Doctrine_Access implements Countable, Iterator { return array_search($record, $this->data, true); } + /** * get * returns a record for given key @@ -350,6 +372,7 @@ class Doctrine_Collection extends Doctrine_Access implements Countable, Iterator } return $list; } + /** * returns all keys * @return array @@ -358,6 +381,7 @@ class Doctrine_Collection extends Doctrine_Access implements Countable, Iterator { return array_keys($this->data); } + /** * count * this class implements interface countable @@ -369,6 +393,7 @@ class Doctrine_Collection extends Doctrine_Access implements Countable, Iterator { return count($this->data); } + /** * set * @param integer $key @@ -383,6 +408,7 @@ class Doctrine_Collection extends Doctrine_Access implements Countable, Iterator $this->data[$key] = $record; } + /** * adds a record to collection * @param Doctrine_Record $record record to be added @@ -430,6 +456,7 @@ class Doctrine_Collection extends Doctrine_Access implements Countable, Iterator } return true; } + /** * loadRelated * @@ -475,6 +502,7 @@ class Doctrine_Collection extends Doctrine_Access implements Countable, Iterator $this->populateRelated($name, $coll); } + /** * populateRelated * @@ -533,6 +561,7 @@ class Doctrine_Collection extends Doctrine_Access implements Countable, Iterator } } } + /** * getNormalIterator * returns normal iterator - an iterator that will not expand this collection @@ -543,6 +572,7 @@ class Doctrine_Collection extends Doctrine_Access implements Countable, Iterator { return new Doctrine_Collection_Iterator_Normal($this); } + /** * takeSnapshot * takes a snapshot from this collection @@ -562,6 +592,7 @@ class Doctrine_Collection extends Doctrine_Access implements Countable, Iterator return $this; } + /** * getSnapshot * returns the data of the last snapshot @@ -572,6 +603,7 @@ class Doctrine_Collection extends Doctrine_Access implements Countable, Iterator { return $this->_snapshot; } + /** * processDiff * processes the difference of the last snapshot and the current data @@ -592,6 +624,7 @@ class Doctrine_Collection extends Doctrine_Access implements Countable, Iterator return $this; } + /** * toArray * Mimics the result of a $query->execute(array(), Doctrine::FETCH_ARRAY); @@ -646,6 +679,7 @@ class Doctrine_Collection extends Doctrine_Access implements Countable, Iterator { return array_udiff($this->data, $this->_snapshot, array($this, "compareRecords")); } + /** * compareRecords * Compares two records. To be used on _snapshot diffs using array_udiff @@ -655,6 +689,7 @@ class Doctrine_Collection extends Doctrine_Access implements Countable, Iterator if ($a->getOid() == $b->getOid()) return 0; return ($a->getOid() > $b->getOid()) ? 1 : -1; } + /** * save * saves all records of this collection and processes the @@ -682,6 +717,7 @@ class Doctrine_Collection extends Doctrine_Access implements Countable, Iterator return $this; } + /** * delete * single shot delete @@ -709,6 +745,7 @@ class Doctrine_Collection extends Doctrine_Access implements Countable, Iterator return $this; } + /** * getIterator * @return object ArrayIterator @@ -718,6 +755,7 @@ class Doctrine_Collection extends Doctrine_Access implements Countable, Iterator $data = $this->data; return new ArrayIterator($data); } + /** * returns a string representation of this object */ diff --git a/lib/Doctrine/Collection/Exception.php b/lib/Doctrine/Collection/Exception.php index afcfd6c88..29e3950a3 100644 --- a/lib/Doctrine/Collection/Exception.php +++ b/lib/Doctrine/Collection/Exception.php @@ -18,6 +18,7 @@ * and is licensed under the LGPL. For more information, see * <http://www.phpdoctrine.com>. */ + /** * Doctrine_Collection_Exception * diff --git a/lib/Doctrine/Collection/Iterator.php b/lib/Doctrine/Collection/Iterator.php index 23c0550cd..b0eec1a58 100644 --- a/lib/Doctrine/Collection/Iterator.php +++ b/lib/Doctrine/Collection/Iterator.php @@ -18,6 +18,7 @@ * and is licensed under the LGPL. For more information, see * <http://www.phpdoctrine.com>. */ + /** * Doctrine_Collection_Iterator * iterates through Doctrine_Collection @@ -36,18 +37,22 @@ abstract class Doctrine_Collection_Iterator implements Iterator * @var Doctrine_Collection $collection */ protected $collection; + /** * @var array $keys */ protected $keys; + /** * @var mixed $key */ protected $key; + /** * @var integer $index */ protected $index; + /** * @var integer $count */ @@ -63,6 +68,7 @@ abstract class Doctrine_Collection_Iterator implements Iterator $this->keys = $this->collection->getKeys(); $this->count = $this->collection->count(); } + /** * rewinds the iterator * @@ -86,6 +92,7 @@ abstract class Doctrine_Collection_Iterator implements Iterator { return $this->key; } + /** * returns the current record * @@ -95,6 +102,7 @@ abstract class Doctrine_Collection_Iterator implements Iterator { return $this->collection->get($this->key); } + /** * advances the internal pointer * diff --git a/lib/Doctrine/Collection/Offset.php b/lib/Doctrine/Collection/Offset.php index d4ddcc475..ee6223391 100644 --- a/lib/Doctrine/Collection/Offset.php +++ b/lib/Doctrine/Collection/Offset.php @@ -37,6 +37,7 @@ class Doctrine_Collection_Offset extends Doctrine_Collection * @var integer $limit */ private $limit; + /** * @param Doctrine_Table $table */ @@ -45,6 +46,7 @@ class Doctrine_Collection_Offset extends Doctrine_Collection parent::__construct($table); $this->limit = $table->getAttribute(Doctrine::ATTR_COLL_LIMIT); } + /** * @return integer */ @@ -52,6 +54,7 @@ class Doctrine_Collection_Offset extends Doctrine_Collection { return $this->limit; } + /** * @return Doctrine_Collection_Iterator_Expandable */ diff --git a/lib/Doctrine/Column.php b/lib/Doctrine/Column.php index 341ed2548..3dec8300b 100644 --- a/lib/Doctrine/Column.php +++ b/lib/Doctrine/Column.php @@ -18,6 +18,7 @@ * and is licensed under the LGPL. For more information, see * <http://www.phpdoctrine.com>. */ + /** * Doctrine_Column * This class represents a database column @@ -39,6 +40,7 @@ class Doctrine_Column extends Doctrine_Access implements IteratorAggregate, Coun 'type' => null, 'length' => 0, ); + /** * @var array $definition */ @@ -46,6 +48,7 @@ class Doctrine_Column extends Doctrine_Access implements IteratorAggregate, Coun { $this->_definition = $definition; } + /** * @return array */ @@ -53,6 +56,7 @@ class Doctrine_Column extends Doctrine_Access implements IteratorAggregate, Coun { return $this->_definition; } + /** * contains * @@ -62,6 +66,7 @@ class Doctrine_Column extends Doctrine_Access implements IteratorAggregate, Coun { return isset($this->_definition[$name]); } + /** * get * @@ -76,6 +81,7 @@ class Doctrine_Column extends Doctrine_Access implements IteratorAggregate, Coun return $this->_definition[$name]; } + /** * set * @@ -86,6 +92,7 @@ class Doctrine_Column extends Doctrine_Access implements IteratorAggregate, Coun { $this->_definition[$name] = $value; } + /** * @param string $field * @return array @@ -98,6 +105,7 @@ class Doctrine_Column extends Doctrine_Access implements IteratorAggregate, Coun return array(); } } + /** * enumValue * @@ -113,6 +121,7 @@ class Doctrine_Column extends Doctrine_Access implements IteratorAggregate, Coun return isset($this->_definition['values'][$index]) ? $this->_definition['values'][$index] : $index; } + /** * enumIndex * @@ -126,6 +135,7 @@ class Doctrine_Column extends Doctrine_Access implements IteratorAggregate, Coun return array_search($value, $values); } + /** * count * @@ -135,6 +145,7 @@ class Doctrine_Column extends Doctrine_Access implements IteratorAggregate, Coun { return count($this->_definition); } + /** * getIterator * diff --git a/lib/Doctrine/Compiler.php b/lib/Doctrine/Compiler.php index 4a6ed349c..f8b74c400 100644 --- a/lib/Doctrine/Compiler.php +++ b/lib/Doctrine/Compiler.php @@ -18,6 +18,7 @@ * and is licensed under the LGPL. For more information, see * <http://www.phpdoctrine.com>. */ + /** * Doctrine_Compiler * This class can be used for compiling the entire Doctrine framework into a single file @@ -42,14 +43,14 @@ class Doctrine_Compiler */ public static function compile($target = null, $includedDrivers = array()) { - if (!is_array($includedDrivers)) { + if ( ! is_array($includedDrivers)) { $includedDrivers = array($includedDrivers); } $excludedDrivers = array(); // If we have an array of specified drivers then lets determine which drivers we should exclude - if (!empty($includedDrivers)) { + if ( ! empty($includedDrivers)) { $drivers = array('db2', 'firebird', 'informix', @@ -86,7 +87,7 @@ class Doctrine_Compiler } // Exclude drivers - if (!empty($excludedDrivers)) { + if ( ! empty($excludedDrivers)) { foreach ($excludedDrivers as $excludedDriver) { $excludedDriver = ucfirst($excludedDriver); diff --git a/lib/Doctrine/Compiler/Exception.php b/lib/Doctrine/Compiler/Exception.php index 23ae43241..a84deb24c 100644 --- a/lib/Doctrine/Compiler/Exception.php +++ b/lib/Doctrine/Compiler/Exception.php @@ -18,6 +18,7 @@ * and is licensed under the LGPL. For more information, see * <http://www.phpdoctrine.com>. */ + /** * Doctrine_Compiler_Exception * diff --git a/lib/Doctrine/Configurable.php b/lib/Doctrine/Configurable.php index 924cc60ba..e0e354417 100644 --- a/lib/Doctrine/Configurable.php +++ b/lib/Doctrine/Configurable.php @@ -18,6 +18,7 @@ * and is licensed under the LGPL. For more information, see * <http://www.phpdoctrine.com>. */ + /** * Doctrine_Configurable * the base for Doctrine_Table, Doctrine_Manager and Doctrine_Connection @@ -37,16 +38,19 @@ abstract class Doctrine_Configurable extends Doctrine_Locator_Injectable * @var array $attributes an array of containing all attributes */ protected $attributes = array(); + /** * @var Doctrine_Configurable $parent the parent of this component */ protected $parent; + /** * @var array $_impl an array containing concrete implementations for class templates * keys as template names and values as names of the concrete * implementation classes */ protected $_impl = array(); + /** * setAttribute * sets a given attribute @@ -137,6 +141,7 @@ abstract class Doctrine_Configurable extends Doctrine_Locator_Injectable $this->attributes[$attribute] = $value; } + /** * setImpl * binds given class to given template name @@ -153,6 +158,7 @@ abstract class Doctrine_Configurable extends Doctrine_Locator_Injectable return $this; } + /** * getImpl * returns the implementation for given class @@ -169,6 +175,7 @@ abstract class Doctrine_Configurable extends Doctrine_Locator_Injectable } return $this->_impl[$template]; } + /** * getCacheDriver * @@ -182,6 +189,7 @@ abstract class Doctrine_Configurable extends Doctrine_Locator_Injectable return $this->attributes[Doctrine::ATTR_CACHE]; } + /** * @param Doctrine_EventListener $listener * @return void @@ -190,6 +198,7 @@ abstract class Doctrine_Configurable extends Doctrine_Locator_Injectable { return $this->setListener($listener); } + /** * addRecordListener * @@ -207,6 +216,7 @@ abstract class Doctrine_Configurable extends Doctrine_Locator_Injectable return $this; } + /** * getListener * @@ -222,6 +232,7 @@ abstract class Doctrine_Configurable extends Doctrine_Locator_Injectable } return $this->attributes[Doctrine::ATTR_RECORD_LISTENER]; } + /** * setListener * @@ -239,6 +250,7 @@ abstract class Doctrine_Configurable extends Doctrine_Locator_Injectable return $this; } + /** * addListener * @@ -256,6 +268,7 @@ abstract class Doctrine_Configurable extends Doctrine_Locator_Injectable return $this; } + /** * getListener * @@ -271,6 +284,7 @@ abstract class Doctrine_Configurable extends Doctrine_Locator_Injectable } return $this->attributes[Doctrine::ATTR_LISTENER]; } + /** * setListener * @@ -288,6 +302,7 @@ abstract class Doctrine_Configurable extends Doctrine_Locator_Injectable return $this; } + /** * returns the value of an attribute * @@ -310,6 +325,7 @@ abstract class Doctrine_Configurable extends Doctrine_Locator_Injectable } return $this->attributes[$attribute]; } + /** * getAttributes * returns all attributes as an array @@ -320,6 +336,7 @@ abstract class Doctrine_Configurable extends Doctrine_Locator_Injectable { return $this->attributes; } + /** * sets a parent for this configurable component * the parent must be configurable component itself @@ -331,6 +348,7 @@ abstract class Doctrine_Configurable extends Doctrine_Locator_Injectable { $this->parent = $component; } + /** * getParent * returns the parent of this component diff --git a/lib/Doctrine/Connection.php b/lib/Doctrine/Connection.php index f962f5f9d..4b518937f 100644 --- a/lib/Doctrine/Connection.php +++ b/lib/Doctrine/Connection.php @@ -59,31 +59,37 @@ abstract class Doctrine_Connection extends Doctrine_Configurable implements Coun * @var $dbh the database handler */ protected $dbh; + /** * @var array $tables an array containing all the initialized Doctrine_Table objects * keys representing Doctrine_Table component names and values as Doctrine_Table objects */ protected $tables = array(); + /** * @var string $driverName the name of this connection driver */ protected $driverName; + /** * @var boolean $isConnected whether or not a connection has been established */ protected $isConnected = false; + /** * @var array $supported an array containing all features this driver supports, * keys representing feature names and values as * one of the following (true, false, 'emulated') */ protected $supported = array(); + /** * @var array $pendingAttributes An array of pending attributes. When setting attributes * no connection is needed. When connected all the pending * attributes are passed to the underlying adapter (usually PDO) instance. */ protected $pendingAttributes = array(); + /** * @var array $modules an array containing all modules * transaction Doctrine_Transaction driver, handles savepoint and transaction isolation abstraction @@ -122,6 +128,7 @@ abstract class Doctrine_Connection extends Doctrine_Configurable implements Coun 'formatter' => false, 'util' => false, ); + /** * @var array $properties an array of connection properties */ @@ -135,12 +142,14 @@ abstract class Doctrine_Connection extends Doctrine_Configurable implements Coun 'wildcards' => array('%', '_'), 'varchar_max_length' => 255, ); + /** * @var array $serverInfo */ protected $serverInfo = array(); protected $options = array(); + /** * @var array $availableDrivers an array containing all availible drivers */ @@ -192,6 +201,7 @@ abstract class Doctrine_Connection extends Doctrine_Configurable implements Coun $this->getAttribute(Doctrine::ATTR_LISTENER)->onOpen($this); } + /** * getOption * @@ -206,6 +216,7 @@ abstract class Doctrine_Connection extends Doctrine_Configurable implements Coun return $this->options[$option]; } } + /** * getAttribute * retrieves a database connection attribute @@ -238,6 +249,7 @@ abstract class Doctrine_Connection extends Doctrine_Configurable implements Coun return $this->pendingAttributes[$attribute]; } } + /** * returns an array of available PDO drivers */ @@ -245,6 +257,7 @@ abstract class Doctrine_Connection extends Doctrine_Configurable implements Coun { return PDO::getAvailableDrivers(); } + /** * setAttribute * sets an attribute @@ -266,6 +279,7 @@ abstract class Doctrine_Connection extends Doctrine_Configurable implements Coun } return $this; } + /** * getName * returns the name of this driver @@ -276,6 +290,7 @@ abstract class Doctrine_Connection extends Doctrine_Configurable implements Coun { return $this->driverName; } + /** * __get * lazy loads given module and returns it @@ -314,6 +329,7 @@ abstract class Doctrine_Connection extends Doctrine_Configurable implements Coun return $this->modules[$name]; } + /** * returns the manager that created this connection * @@ -323,6 +339,7 @@ abstract class Doctrine_Connection extends Doctrine_Configurable implements Coun { return $this->getParent(); } + /** * returns the database handler of which this connection uses * @@ -334,6 +351,7 @@ abstract class Doctrine_Connection extends Doctrine_Configurable implements Coun return $this->dbh; } + /** * connect * connects into database @@ -393,6 +411,7 @@ abstract class Doctrine_Connection extends Doctrine_Configurable implements Coun { $this->_count++; } + /** * converts given driver name * @@ -401,6 +420,7 @@ abstract class Doctrine_Connection extends Doctrine_Configurable implements Coun public function driverName($name) { } + /** * supports * @@ -413,6 +433,7 @@ abstract class Doctrine_Connection extends Doctrine_Configurable implements Coun && ($this->supported[$feature] === 'emulated' || $this->supported[$feature])); } + /** * Execute a SQL REPLACE query. A REPLACE query is identical to a INSERT * query, except that if there is already a row in the table with the same @@ -479,6 +500,7 @@ abstract class Doctrine_Connection extends Doctrine_Configurable implements Coun return $affectedRows; } + /** * Inserts a table row with specified data. * @@ -517,6 +539,7 @@ abstract class Doctrine_Connection extends Doctrine_Configurable implements Coun return true; } + /** * Set the charset on the current connection * @@ -528,6 +551,7 @@ abstract class Doctrine_Connection extends Doctrine_Configurable implements Coun { } + /** * Quote a string so it can be safely used as a table or column name * @@ -571,6 +595,7 @@ abstract class Doctrine_Connection extends Doctrine_Configurable implements Coun } return $this->formatter->quoteIdentifier($str, $checkOption); } + /** * convertBooleans * some drivers need the boolean values to be converted into integers @@ -585,6 +610,7 @@ abstract class Doctrine_Connection extends Doctrine_Configurable implements Coun { return $this->formatter->convertBooleans($item); } + /** * quote * quotes given input parameter @@ -597,6 +623,7 @@ abstract class Doctrine_Connection extends Doctrine_Configurable implements Coun { return $this->formatter->quote($input, $type); } + /** * Set the date/time format for the current connection * @@ -607,6 +634,7 @@ abstract class Doctrine_Connection extends Doctrine_Configurable implements Coun public function setDateFormat($format = null) { } + /** * fetchAll * @@ -618,6 +646,7 @@ abstract class Doctrine_Connection extends Doctrine_Configurable implements Coun { return $this->execute($statement, $params)->fetchAll(Doctrine::FETCH_ASSOC); } + /** * fetchOne * @@ -630,6 +659,7 @@ abstract class Doctrine_Connection extends Doctrine_Configurable implements Coun { return $this->execute($statement, $params)->fetchColumn($colnum); } + /** * fetchRow * @@ -641,6 +671,7 @@ abstract class Doctrine_Connection extends Doctrine_Configurable implements Coun { return $this->execute($statement, $params)->fetch(Doctrine::FETCH_ASSOC); } + /** * fetchArray * @@ -652,6 +683,7 @@ abstract class Doctrine_Connection extends Doctrine_Configurable implements Coun { return $this->execute($statement, $params)->fetch(Doctrine::FETCH_NUM); } + /** * fetchColumn * @@ -664,6 +696,7 @@ abstract class Doctrine_Connection extends Doctrine_Configurable implements Coun { return $this->execute($statement, $params)->fetchAll(Doctrine::FETCH_COLUMN, $colnum); } + /** * fetchAssoc * @@ -675,6 +708,7 @@ abstract class Doctrine_Connection extends Doctrine_Configurable implements Coun { return $this->execute($statement, $params)->fetchAll(Doctrine::FETCH_ASSOC); } + /** * fetchBoth * @@ -686,6 +720,7 @@ abstract class Doctrine_Connection extends Doctrine_Configurable implements Coun { return $this->execute($statement, $params)->fetchAll(Doctrine::FETCH_BOTH); } + /** * query * queries the database using Doctrine Query Language @@ -709,6 +744,7 @@ abstract class Doctrine_Connection extends Doctrine_Configurable implements Coun return $parser->query($query, $params, $hydrationMode); } + /** * prepare * @@ -737,6 +773,7 @@ abstract class Doctrine_Connection extends Doctrine_Configurable implements Coun $this->rethrowException($e, $this); } + /** * query * queries the database using Doctrine Query Language and returns @@ -766,6 +803,7 @@ abstract class Doctrine_Connection extends Doctrine_Configurable implements Coun } return $coll[0]; } + /** * queries the database with limit and offset * added to the query and returns a Doctrine_Connection_Statement object @@ -782,6 +820,7 @@ abstract class Doctrine_Connection extends Doctrine_Configurable implements Coun } return $this->execute($query); } + /** * standaloneQuery * @@ -794,6 +833,7 @@ abstract class Doctrine_Connection extends Doctrine_Configurable implements Coun { return $this->execute($query, $params); } + /** * execute * @param string $query sql query @@ -829,6 +869,7 @@ abstract class Doctrine_Connection extends Doctrine_Configurable implements Coun $this->rethrowException($e, $this); } + /** * exec * @param string $query sql query @@ -864,6 +905,7 @@ abstract class Doctrine_Connection extends Doctrine_Configurable implements Coun $this->rethrowException($e, $this); } + /** * rethrowException * @@ -889,6 +931,7 @@ abstract class Doctrine_Connection extends Doctrine_Configurable implements Coun $this->getListener()->postError($event); } + /** * hasTable * whether or not this connection has table $name initialized @@ -900,6 +943,7 @@ abstract class Doctrine_Connection extends Doctrine_Configurable implements Coun { return isset($this->tables[$name]); } + /** * returns a table object for given component name * @@ -923,6 +967,7 @@ abstract class Doctrine_Connection extends Doctrine_Configurable implements Coun return $table; } + /** * returns an array of all initialized tables * @@ -932,6 +977,7 @@ abstract class Doctrine_Connection extends Doctrine_Configurable implements Coun { return $this->tables; } + /** * returns an iterator that iterators through all * initialized table objects @@ -948,6 +994,7 @@ abstract class Doctrine_Connection extends Doctrine_Configurable implements Coun { return new ArrayIterator($this->tables); } + /** * returns the count of initialized table objects * @@ -957,6 +1004,7 @@ abstract class Doctrine_Connection extends Doctrine_Configurable implements Coun { return $this->_count; } + /** * addTable * adds a Doctrine_Table object into connection registry @@ -974,6 +1022,7 @@ abstract class Doctrine_Connection extends Doctrine_Configurable implements Coun $this->tables[$name] = $table; return true; } + /** * create * creates a record @@ -986,6 +1035,7 @@ abstract class Doctrine_Connection extends Doctrine_Configurable implements Coun { return $this->getTable($name)->create(); } + /** * flush * saves all the records from all tables @@ -1000,6 +1050,7 @@ abstract class Doctrine_Connection extends Doctrine_Configurable implements Coun $this->unitOfWork->saveAll(); $this->commit(); } + /** * clear * clears all repositories @@ -1013,6 +1064,7 @@ abstract class Doctrine_Connection extends Doctrine_Configurable implements Coun $table->clear(); } } + /** * evictTables * evicts all tables @@ -1024,6 +1076,7 @@ abstract class Doctrine_Connection extends Doctrine_Configurable implements Coun $this->tables = array(); $this->exported = array(); } + /** * close * closes the connection @@ -1043,6 +1096,7 @@ abstract class Doctrine_Connection extends Doctrine_Configurable implements Coun $this->getAttribute(Doctrine::ATTR_LISTENER)->postClose($event); } + /** * get the current transaction nesting level * @@ -1052,6 +1106,7 @@ abstract class Doctrine_Connection extends Doctrine_Configurable implements Coun { return $this->transaction->getTransactionLevel(); } + /** * errorCode * Fetch the SQLSTATE associated with the last operation on the database handle @@ -1064,6 +1119,7 @@ abstract class Doctrine_Connection extends Doctrine_Configurable implements Coun return $this->dbh->errorCode(); } + /** * errorInfo * Fetch extended error information associated with the last operation on the database handle @@ -1076,6 +1132,7 @@ abstract class Doctrine_Connection extends Doctrine_Configurable implements Coun return $this->dbh->errorInfo(); } + /** * lastInsertId * @@ -1092,6 +1149,7 @@ abstract class Doctrine_Connection extends Doctrine_Configurable implements Coun { return $this->sequence->lastInsertId($table, $field); } + /** * beginTransaction * Start a transaction or set a savepoint. @@ -1109,6 +1167,7 @@ abstract class Doctrine_Connection extends Doctrine_Configurable implements Coun { $this->transaction->beginTransaction($savepoint); } + /** * commit * Commit the database changes done during a transaction that is in @@ -1126,6 +1185,7 @@ abstract class Doctrine_Connection extends Doctrine_Configurable implements Coun { $this->transaction->commit($savepoint); } + /** * rollback * Cancel any database changes done during a transaction or since a specific diff --git a/lib/Doctrine/Connection/Exception.php b/lib/Doctrine/Connection/Exception.php index 1eb538cdf..69d858fa1 100644 --- a/lib/Doctrine/Connection/Exception.php +++ b/lib/Doctrine/Connection/Exception.php @@ -69,12 +69,14 @@ class Doctrine_Connection_Exception extends Doctrine_Exception Doctrine::ERR_TRUNCATED => 'truncated', Doctrine::ERR_DEADLOCK => 'deadlock detected', ); + /** * @see Doctrine::ERR_* constants * @since 1.0 * @var integer $portableCode portable error code */ protected $portableCode; + /** * getPortableCode * returns portable error code @@ -85,6 +87,7 @@ class Doctrine_Connection_Exception extends Doctrine_Exception { return $this->portableCode; } + /** * getPortableMessage * returns portable error message @@ -95,6 +98,7 @@ class Doctrine_Connection_Exception extends Doctrine_Exception { return self::errorMessage($this->portableCode); } + /** * Return a textual error message for a Doctrine error code * diff --git a/lib/Doctrine/Connection/Firebird.php b/lib/Doctrine/Connection/Firebird.php index 03515fb36..9067c4596 100644 --- a/lib/Doctrine/Connection/Firebird.php +++ b/lib/Doctrine/Connection/Firebird.php @@ -38,6 +38,7 @@ class Doctrine_Connection_Firebird extends Doctrine_Connection * @var string $driverName the name of this connection driver */ protected $driverName = 'Firebird'; + /** * the constructor * @@ -77,6 +78,7 @@ class Doctrine_Connection_Firebird extends Doctrine_Connection */ parent::__construct($manager, $adapter); } + /** * Set the charset on the current connection * @@ -89,6 +91,7 @@ class Doctrine_Connection_Firebird extends Doctrine_Connection $query = 'SET NAMES '.$this->dbh->quote($charset); $this->exec($query); } + /** * Adds an driver-specific LIMIT clause to the query * diff --git a/lib/Doctrine/Connection/Firebird/Exception.php b/lib/Doctrine/Connection/Firebird/Exception.php index ac0d7195e..ee5b8e623 100644 --- a/lib/Doctrine/Connection/Firebird/Exception.php +++ b/lib/Doctrine/Connection/Firebird/Exception.php @@ -68,6 +68,7 @@ class Doctrine_Connection_Firebird_Exception extends Doctrine_Connection_Excepti -923 => Doctrine::ERR_CONNECT_FAILED, -924 => Doctrine::ERR_CONNECT_FAILED ); + /** * @var array $errorRegexps an array that is used for determining portable * error code from a native database error message @@ -96,6 +97,7 @@ class Doctrine_Connection_Firebird_Exception extends Doctrine_Connection_Excepti '/table unknown/i' => Doctrine::ERR_NOSUCHTABLE, ); + /** * This method checks if native error code/message can be * converted into a portable code and then adds this diff --git a/lib/Doctrine/Connection/Informix.php b/lib/Doctrine/Connection/Informix.php index 510246ed2..55c442581 100644 --- a/lib/Doctrine/Connection/Informix.php +++ b/lib/Doctrine/Connection/Informix.php @@ -36,6 +36,7 @@ class Doctrine_Connection_Informix extends Doctrine_Connection * @var string $driverName the name of this connection driver */ protected $driverName = 'Informix'; + /** * the constructor * diff --git a/lib/Doctrine/Connection/Mock.php b/lib/Doctrine/Connection/Mock.php index 213ceada0..5bbe5d8b4 100644 --- a/lib/Doctrine/Connection/Mock.php +++ b/lib/Doctrine/Connection/Mock.php @@ -37,6 +37,7 @@ class Doctrine_Connection_Mock extends Doctrine_Connection_Common * @var string $driverName the name of this connection driver */ protected $driverName = 'Mock'; + /** * the constructor * diff --git a/lib/Doctrine/Connection/Module.php b/lib/Doctrine/Connection/Module.php index 6b7a21ca4..78a7f1082 100644 --- a/lib/Doctrine/Connection/Module.php +++ b/lib/Doctrine/Connection/Module.php @@ -18,6 +18,7 @@ * and is licensed under the LGPL. For more information, see * <http://www.phpdoctrine.com>. */ + /** * Doctrine_Connection_Module * @@ -36,10 +37,12 @@ class Doctrine_Connection_Module * module holds an instance of Doctrine_Connection */ protected $conn; + /** * @var string $moduleName the name of this module */ protected $moduleName; + /** * @param Doctrine_Connection $conn Doctrine_Connection object, every connection * module holds an instance of Doctrine_Connection @@ -55,6 +58,7 @@ class Doctrine_Connection_Module $this->moduleName = $e[1]; } + /** * getConnection * returns the connection object this module uses @@ -65,6 +69,7 @@ class Doctrine_Connection_Module { return $this->conn; } + /** * getModuleName * returns the name of this module diff --git a/lib/Doctrine/Connection/Mssql.php b/lib/Doctrine/Connection/Mssql.php index 88c75b9b8..009f4d1a3 100644 --- a/lib/Doctrine/Connection/Mssql.php +++ b/lib/Doctrine/Connection/Mssql.php @@ -37,6 +37,7 @@ class Doctrine_Connection_Mssql extends Doctrine_Connection * @var string $driverName the name of this connection driver */ protected $driverName = 'Mssql'; + /** * the constructor * @@ -66,6 +67,7 @@ class Doctrine_Connection_Mssql extends Doctrine_Connection parent::__construct($manager, $adapter); } + /** * quoteIdentifier * Quote a string so it can be safely used as a table / column name @@ -84,6 +86,7 @@ class Doctrine_Connection_Mssql extends Doctrine_Connection } return '[' . str_replace(']', ']]', $identifier) . ']'; } + /** * Adds an adapter-specific LIMIT clause to the SELECT statement. * [ borrowed from Zend Framework ] @@ -129,6 +132,7 @@ class Doctrine_Connection_Mssql extends Doctrine_Connection return $query; } + /** * return version information about the server * @@ -166,6 +170,7 @@ class Doctrine_Connection_Mssql extends Doctrine_Connection } return $serverInfo; } + /** * Checks if there's a sequence that exists. * diff --git a/lib/Doctrine/Connection/Mssql/Exception.php b/lib/Doctrine/Connection/Mssql/Exception.php index 35f99f6f9..bd2b564b4 100644 --- a/lib/Doctrine/Connection/Mssql/Exception.php +++ b/lib/Doctrine/Connection/Mssql/Exception.php @@ -52,6 +52,7 @@ class Doctrine_Connection_Mssql_Exception extends Doctrine_Connection_Exception 3701 => Doctrine::ERR_NOSUCHTABLE, 8134 => Doctrine::ERR_DIVZERO, ); + /** * This method checks if native error code/message can be * converted into a portable code and then adds this diff --git a/lib/Doctrine/Connection/Mysql.php b/lib/Doctrine/Connection/Mysql.php index cc8400244..dfa58980c 100644 --- a/lib/Doctrine/Connection/Mysql.php +++ b/lib/Doctrine/Connection/Mysql.php @@ -37,6 +37,7 @@ class Doctrine_Connection_Mysql extends Doctrine_Connection_Common * @var string $driverName the name of this connection driver */ protected $driverName = 'Mysql'; + /** * the constructor * @@ -88,6 +89,7 @@ class Doctrine_Connection_Mysql extends Doctrine_Connection_Common parent::__construct($manager, $adapter); } + /** * Set the charset on the current connection * @@ -100,6 +102,7 @@ class Doctrine_Connection_Mysql extends Doctrine_Connection_Common $query = 'SET NAMES '.$this->dbh->quote($charset); $this->exec($query); } + /** * Execute a SQL REPLACE query. A REPLACE query is identical to a INSERT * query, except that if there is already a row in the table with the same diff --git a/lib/Doctrine/Connection/Mysql/Exception.php b/lib/Doctrine/Connection/Mysql/Exception.php index c8fb4d9ce..f751585e8 100644 --- a/lib/Doctrine/Connection/Mysql/Exception.php +++ b/lib/Doctrine/Connection/Mysql/Exception.php @@ -62,6 +62,7 @@ class Doctrine_Connection_Mysql_Exception extends Doctrine_Connection_Exception 1216 => Doctrine::ERR_CONSTRAINT, 1217 => Doctrine::ERR_CONSTRAINT, ); + /** * This method checks if native error code/message can be * converted into a portable code and then adds this diff --git a/lib/Doctrine/Connection/Oracle.php b/lib/Doctrine/Connection/Oracle.php index 3d7ebebfa..4eae7c7f3 100644 --- a/lib/Doctrine/Connection/Oracle.php +++ b/lib/Doctrine/Connection/Oracle.php @@ -70,6 +70,7 @@ class Doctrine_Connection_Oracle extends Doctrine_Connection */ parent::__construct($manager, $adapter); } + /** * Sets up the date/time format * @@ -78,6 +79,7 @@ class Doctrine_Connection_Oracle extends Doctrine_Connection { $this->exec('ALTER SESSION SET NLS_DATE_FORMAT = "' . $format . '"'); } + /** * Adds an driver-specific LIMIT clause to the query * diff --git a/lib/Doctrine/Connection/Oracle/Exception.php b/lib/Doctrine/Connection/Oracle/Exception.php index a9634d41d..c0497bb95 100644 --- a/lib/Doctrine/Connection/Oracle/Exception.php +++ b/lib/Doctrine/Connection/Oracle/Exception.php @@ -57,6 +57,7 @@ class Doctrine_Connection_Oracle_Exception extends Doctrine_Connection_Exception 2292 => Doctrine::ERR_CONSTRAINT, 2449 => Doctrine::ERR_CONSTRAINT, ); + /** * This method checks if native error code/message can be * converted into a portable code and then adds this diff --git a/lib/Doctrine/Connection/Pgsql.php b/lib/Doctrine/Connection/Pgsql.php index 51848b8d5..6643d16d4 100644 --- a/lib/Doctrine/Connection/Pgsql.php +++ b/lib/Doctrine/Connection/Pgsql.php @@ -37,6 +37,7 @@ class Doctrine_Connection_Pgsql extends Doctrine_Connection_Common * @var string $driverName the name of this connection driver */ protected $driverName = 'Pgsql'; + /** * the constructor * @@ -77,6 +78,7 @@ class Doctrine_Connection_Pgsql extends Doctrine_Connection_Common 'escape' => '"'); parent::__construct($manager, $adapter); } + /** * Set the charset on the current connection * @@ -89,6 +91,7 @@ class Doctrine_Connection_Pgsql extends Doctrine_Connection_Common $query = 'SET NAMES '.$this->dbh->quote($charset); $this->exec($query); } + /** * convertBoolean * some drivers need the boolean values to be converted into integers @@ -114,6 +117,7 @@ class Doctrine_Connection_Pgsql extends Doctrine_Connection_Common } return $item; } + /** * Changes a query string for various DBMS specific reasons * @@ -150,6 +154,7 @@ class Doctrine_Connection_Pgsql extends Doctrine_Connection_Common } return $query; } + /** * return version information about the server * diff --git a/lib/Doctrine/Connection/Pgsql/Exception.php b/lib/Doctrine/Connection/Pgsql/Exception.php index 644306cfb..5ebb9aa93 100644 --- a/lib/Doctrine/Connection/Pgsql/Exception.php +++ b/lib/Doctrine/Connection/Pgsql/Exception.php @@ -80,6 +80,7 @@ class Doctrine_Connection_Pgsql_Exception extends Doctrine_Connection_Exception '/more expressions than target columns/i' => Doctrine::ERR_VALUE_COUNT_ON_ROW, ); + /** * This method checks if native error code/message can be * converted into a portable code and then adds this diff --git a/lib/Doctrine/Connection/Profiler.php b/lib/Doctrine/Connection/Profiler.php index 7714e14ac..b6007fe35 100644 --- a/lib/Doctrine/Connection/Profiler.php +++ b/lib/Doctrine/Connection/Profiler.php @@ -44,16 +44,19 @@ class Doctrine_Connection_Profiler implements Doctrine_Overloadable, IteratorAgg 'exec', 'execute', ); + /** * @param array $events an array containing all listened events */ private $events = array(); + /** * constructor */ public function __construct() { } + /** * setFilterQueryType * @@ -105,6 +108,7 @@ class Doctrine_Connection_Profiler implements Doctrine_Overloadable, IteratorAgg */ } + /** * get * @@ -118,6 +122,7 @@ class Doctrine_Connection_Profiler implements Doctrine_Overloadable, IteratorAgg } return null; } + /** * getAll * returns all profiled events as an array @@ -128,6 +133,7 @@ class Doctrine_Connection_Profiler implements Doctrine_Overloadable, IteratorAgg { return $this->events; } + /** * getIterator * returns an iterator that iterates through the logged events @@ -138,6 +144,7 @@ class Doctrine_Connection_Profiler implements Doctrine_Overloadable, IteratorAgg { return new ArrayIterator($this->events); } + /** * count * @@ -147,6 +154,7 @@ class Doctrine_Connection_Profiler implements Doctrine_Overloadable, IteratorAgg { return count($this->events); } + /** * pop the last event from the event stack * @@ -156,6 +164,7 @@ class Doctrine_Connection_Profiler implements Doctrine_Overloadable, IteratorAgg { return array_pop($this->events); } + /** * Get the Doctrine_Event object for the last query that was run, regardless if it has * ended or not. If the event has not ended, it's end time will be Null. diff --git a/lib/Doctrine/Connection/Sqlite.php b/lib/Doctrine/Connection/Sqlite.php index db7d492c6..25e20e0fd 100644 --- a/lib/Doctrine/Connection/Sqlite.php +++ b/lib/Doctrine/Connection/Sqlite.php @@ -37,6 +37,7 @@ class Doctrine_Connection_Sqlite extends Doctrine_Connection_Common * @var string $driverName the name of this connection driver */ protected $driverName = 'Sqlite'; + /** * the constructor * @@ -82,6 +83,7 @@ class Doctrine_Connection_Sqlite extends Doctrine_Connection_Common $this->dbh->sqliteCreateFunction('now', 'time', 0); } } + /** * initializes database functions missing in sqlite * @@ -101,6 +103,7 @@ class Doctrine_Connection_Sqlite extends Doctrine_Connection_Common $this->dbh->sqliteCreateFunction('md5', 'md5', 1); $this->dbh->sqliteCreateFunction('now', 'time', 0); } + /** * getDatabaseFile * diff --git a/lib/Doctrine/Connection/Sqlite/Exception.php b/lib/Doctrine/Connection/Sqlite/Exception.php index 38406086b..3e99d2533 100644 --- a/lib/Doctrine/Connection/Sqlite/Exception.php +++ b/lib/Doctrine/Connection/Sqlite/Exception.php @@ -51,6 +51,7 @@ class Doctrine_Connection_Sqlite_Exception extends Doctrine_Connection_Exception '/^near ".*": syntax error$/' => Doctrine::ERR_SYNTAX, '/[0-9]+ values for [0-9]+ columns/i' => Doctrine::ERR_VALUE_COUNT_ON_ROW, ); + /** * This method checks if native error code/message can be * converted into a portable code and then adds this diff --git a/lib/Doctrine/Connection/Statement.php b/lib/Doctrine/Connection/Statement.php index d4bc4bc0c..e1b43a2c4 100644 --- a/lib/Doctrine/Connection/Statement.php +++ b/lib/Doctrine/Connection/Statement.php @@ -37,10 +37,12 @@ class Doctrine_Connection_Statement implements Doctrine_Adapter_Statement_Interf * statement holds an instance of Doctrine_Connection */ protected $_conn; + /** * @var mixed $_stmt PDOStatement object, boolean false or Doctrine_Adapter_Statement object */ protected $_stmt; + /** * constructor * @@ -57,6 +59,7 @@ class Doctrine_Connection_Statement implements Doctrine_Adapter_Statement_Interf throw new Doctrine_Exception('Unknown statement object given.'); } } + /** * getConnection * returns the connection object this statement uses @@ -75,6 +78,7 @@ class Doctrine_Connection_Statement implements Doctrine_Adapter_Statement_Interf { return $this->_stmt->queryString; } + /** * bindColumn * Bind a column to a PHP variable @@ -95,6 +99,7 @@ class Doctrine_Connection_Statement implements Doctrine_Adapter_Statement_Interf return $this->_stmt->bindColumn($column, $param, $type); } } + /** * bindValue * Binds a value to a corresponding named or question mark @@ -117,6 +122,7 @@ class Doctrine_Connection_Statement implements Doctrine_Adapter_Statement_Interf return $this->_stmt->bindValue($param, $value, $type); } } + /** * bindParam * Binds a PHP variable to a corresponding named or question mark placeholder in the @@ -152,6 +158,7 @@ class Doctrine_Connection_Statement implements Doctrine_Adapter_Statement_Interf return $this->_stmt->bindParam($column, $variable, $type, $length, $driverOptions); } } + /** * closeCursor * Closes the cursor, enabling the statement to be executed again. @@ -162,6 +169,7 @@ class Doctrine_Connection_Statement implements Doctrine_Adapter_Statement_Interf { return $this->_stmt->closeCursor(); } + /** * columnCount * Returns the number of columns in the result set @@ -174,6 +182,7 @@ class Doctrine_Connection_Statement implements Doctrine_Adapter_Statement_Interf { return $this->_stmt->columnCount(); } + /** * errorCode * Fetch the SQLSTATE associated with the last operation on the statement handle @@ -185,6 +194,7 @@ class Doctrine_Connection_Statement implements Doctrine_Adapter_Statement_Interf { return $this->_stmt->errorCode(); } + /** * errorInfo * Fetch extended error information associated with the last operation on the statement handle @@ -196,6 +206,7 @@ class Doctrine_Connection_Statement implements Doctrine_Adapter_Statement_Interf { return $this->_stmt->errorInfo(); } + /** * execute * Executes a prepared statement @@ -234,6 +245,7 @@ class Doctrine_Connection_Statement implements Doctrine_Adapter_Statement_Interf return false; } + /** * fetch * @@ -281,6 +293,7 @@ class Doctrine_Connection_Statement implements Doctrine_Adapter_Statement_Interf return $data; } + /** * fetchAll * Returns an array containing all of the result set rows @@ -317,6 +330,7 @@ class Doctrine_Connection_Statement implements Doctrine_Adapter_Statement_Interf return $data; } + /** * fetchColumn * Returns a single column from the next row of a @@ -332,6 +346,7 @@ class Doctrine_Connection_Statement implements Doctrine_Adapter_Statement_Interf { return $this->_stmt->fetchColumn($columnIndex); } + /** * fetchObject * Fetches the next row and returns it as an object. @@ -349,6 +364,7 @@ class Doctrine_Connection_Statement implements Doctrine_Adapter_Statement_Interf { return $this->_stmt->fetchObject($className, $args); } + /** * getAttribute * Retrieve a statement attribute @@ -361,6 +377,7 @@ class Doctrine_Connection_Statement implements Doctrine_Adapter_Statement_Interf { return $this->_stmt->getAttribute($attribute); } + /** * getColumnMeta * Returns metadata for a column in a result set @@ -381,6 +398,7 @@ class Doctrine_Connection_Statement implements Doctrine_Adapter_Statement_Interf { return $this->_stmt->getColumnMeta($column); } + /** * nextRowset * Advances to the next rowset in a multi-rowset statement handle @@ -396,6 +414,7 @@ class Doctrine_Connection_Statement implements Doctrine_Adapter_Statement_Interf { return $this->_stmt->nextRowset(); } + /** * rowCount * rowCount() returns the number of rows affected by the last DELETE, INSERT, or UPDATE statement @@ -412,6 +431,7 @@ class Doctrine_Connection_Statement implements Doctrine_Adapter_Statement_Interf { return $this->_stmt->rowCount(); } + /** * setAttribute * Set a statement attribute @@ -424,6 +444,7 @@ class Doctrine_Connection_Statement implements Doctrine_Adapter_Statement_Interf { return $this->_stmt->setAttribute($attribute, $value); } + /** * setFetchMode * Set the default fetch mode for this statement diff --git a/lib/Doctrine/Connection/UnitOfWork.php b/lib/Doctrine/Connection/UnitOfWork.php index e679f96b6..96739df4b 100644 --- a/lib/Doctrine/Connection/UnitOfWork.php +++ b/lib/Doctrine/Connection/UnitOfWork.php @@ -131,6 +131,7 @@ class Doctrine_Connection_UnitOfWork extends Doctrine_Connection_Module } return array_values($tree); } + /** * saves the given record * @@ -210,6 +211,7 @@ class Doctrine_Connection_UnitOfWork extends Doctrine_Connection_Module return true; } + /** * saves the given record * @@ -244,6 +246,7 @@ class Doctrine_Connection_UnitOfWork extends Doctrine_Connection_Module $record->postSave($event); } + /** * deletes given record and all the related composites * this operation is isolated by a transaction @@ -310,6 +313,7 @@ class Doctrine_Connection_UnitOfWork extends Doctrine_Connection_Module return $this->conn->exec($query, $params); } + /** * deleteMultiple * deletes all records from the pending delete list @@ -362,6 +366,7 @@ class Doctrine_Connection_UnitOfWork extends Doctrine_Connection_Module } } } + /** * saveRelated * saves all related records to $record @@ -401,6 +406,7 @@ class Doctrine_Connection_UnitOfWork extends Doctrine_Connection_Module return $saveLater; } + /** * saveAssociations * @@ -443,6 +449,7 @@ class Doctrine_Connection_UnitOfWork extends Doctrine_Connection_Module } } } + /** * deletes all related composites * this method is always called internally when a record is deleted @@ -464,6 +471,7 @@ class Doctrine_Connection_UnitOfWork extends Doctrine_Connection_Module } } } + /** * saveAll * persists all the pending records from all tables @@ -494,6 +502,7 @@ class Doctrine_Connection_UnitOfWork extends Doctrine_Connection_Module } } } + /** * update * updates the given record @@ -560,6 +569,7 @@ class Doctrine_Connection_UnitOfWork extends Doctrine_Connection_Module return true; } + /** * inserts a record into database * diff --git a/lib/Doctrine/Data.php b/lib/Doctrine/Data.php index 9868d07a8..8e606e1f6 100644 --- a/lib/Doctrine/Data.php +++ b/lib/Doctrine/Data.php @@ -22,7 +22,8 @@ /** * Doctrine_Data * - * Base Doctrine_Data class + * Base Doctrine_Data class for dumping and loading data to and from fixtures files. + * Support formats are based on what formats are available in Doctrine_Parser such as yaml, xml, json, etc. * * @package Doctrine * @subpackage Data @@ -42,6 +43,7 @@ class Doctrine_Data * @var string */ public $formats = array('csv', 'yml', 'xml'); + /** * format * @@ -50,6 +52,7 @@ class Doctrine_Data * @var string */ public $format = 'yml'; + /** * directory * @@ -58,6 +61,7 @@ class Doctrine_Data * @var string */ public $directory = null; + /** * models * @@ -66,6 +70,7 @@ class Doctrine_Data * @var string */ public $models = array(); + /** * exportIndividualFiles * @@ -74,6 +79,7 @@ class Doctrine_Data * @var string */ public $exportIndividualFiles = false; + /** * setFormat * @@ -81,58 +87,60 @@ class Doctrine_Data * * @param string $format * @return void - * @author Jonathan H. Wage */ public function setFormat($format) { $this->format = $format; } + /** * getFormat * * Get the current format we are working with * * @return void - * @author Jonathan H. Wage */ public function getFormat() { return $this->format; } + /** * getFormats * * Get array of available formats * - * @author Jonathan H. Wage + * @return void */ public function getFormats() { return $this->formats; } + /** * setDirectory * * Set the array/string of directories or yml file paths * - * @author Jonathan H. Wage + * @return void */ public function setDirectory($directory) { $this->directory = $directory; } + /** * getDirectory * - * Get directory to work with + * Get directory for dumping/loading data from and to * * @return void - * @author Jonathan H. Wage */ public function getDirectory() { return $this->directory; } + /** * setModels * @@ -140,30 +148,30 @@ class Doctrine_Data * * @param string $models * @return void - * @author Jonathan H. Wage */ public function setModels($models) { $this->models = $models; } + /** * getModels * * Get the array of specified models to work with * * @return void - * @author Jonathan H. Wage */ public function getModels() { return $this->models; } + /** * exportIndividualFiles * * Set/Get whether or not to export individual files * - * @author Jonathan H. Wage + * @return bool $exportIndividualFiles */ public function exportIndividualFiles($bool = null) { @@ -173,6 +181,7 @@ class Doctrine_Data return $this->exportIndividualFiles; } + /** * exportData * @@ -183,7 +192,6 @@ class Doctrine_Data * @param string $models * @param string $exportIndividualFiles * @return void - * @author Jonathan H. Wage */ public function exportData($directory, $format = 'yml', $models = array(), $exportIndividualFiles = false) { @@ -194,6 +202,7 @@ class Doctrine_Data return $export->doExport(); } + /** * importData * @@ -203,7 +212,6 @@ class Doctrine_Data * @param string $format * @param string $models * @return void - * @author Jonathan H. Wage */ public function importData($directory, $format = 'yml', $models = array()) { @@ -213,6 +221,7 @@ class Doctrine_Data return $import->doImport(); } + /** * importDummyData * @@ -221,7 +230,6 @@ class Doctrine_Data * @param string $num * @param string $models * @return void - * @author Jonathan H. Wage */ public function importDummyData($num = 3, $models = array()) { @@ -230,6 +238,7 @@ class Doctrine_Data return $import->doImportDummyData($num); } + /** * isRelation * @@ -254,7 +263,7 @@ class Doctrine_Data return false; } - + /** * purge * @@ -272,6 +281,6 @@ class Doctrine_Data $model = new $model(); $model->getTable()->createQuery()->delete($model)->execute(); - } + } } } \ No newline at end of file diff --git a/lib/Doctrine/Data/Export.php b/lib/Doctrine/Data/Export.php index f8ab75be5..6a0c5c1a5 100644 --- a/lib/Doctrine/Data/Export.php +++ b/lib/Doctrine/Data/Export.php @@ -37,17 +37,16 @@ class Doctrine_Data_Export extends Doctrine_Data * * @param string $directory * @return void - * @author Jonathan H. Wage */ public function __construct($directory) { $this->setDirectory($directory); } + /** * doExport * * @return void - * @author Jonathan H. Wage */ public function doExport() { @@ -58,15 +57,14 @@ class Doctrine_Data_Export extends Doctrine_Data $outputAll = true; - // for situation when the $models array is empty, but the $specifiedModels array isn't - if (empty($models)) - { + // for situation when the $models array is empty, but the $specifiedModels array isn't + if (empty($models)) { $models = $specifiedModels; } foreach ($models AS $name) { - if (!empty($specifiedModels) AND !in_array($name, $specifiedModels)) { + if ( ! empty($specifiedModels) AND !in_array($name, $specifiedModels)) { continue; } @@ -74,7 +72,7 @@ class Doctrine_Data_Export extends Doctrine_Data $table = $class->getTable(); $result = $table->findAll(); - if (!empty($result)) { + if ( ! empty($result)) { $data[$name] = $result; } } @@ -83,6 +81,7 @@ class Doctrine_Data_Export extends Doctrine_Data return $this->dumpData($data); } + /** * dumpData * @@ -90,7 +89,6 @@ class Doctrine_Data_Export extends Doctrine_Data * * @param string $array * @return void - * @author Jonathan H. Wage */ public function dumpData(array $data) { @@ -101,12 +99,12 @@ class Doctrine_Data_Export extends Doctrine_Data if (is_array($directory)) { throw new Doctrine_Data_Exception('You must specify a single path to a folder in order to export individual files.'); - } else if (!is_dir($directory) && is_file($directory)) { + } else if ( ! is_dir($directory) && is_file($directory)) { $directory = dirname($directory); } foreach ($data as $className => $classData) { - if (!empty($classData)) { + if ( ! empty($classData)) { Doctrine_Parser::dump(array($className => $classData), $format, $directory.DIRECTORY_SEPARATOR.$className.'.'.$format); } } @@ -115,11 +113,12 @@ class Doctrine_Data_Export extends Doctrine_Data throw new Doctrine_Data_Exception('You must specify the path to a '.$format.' file to export. You specified a directory.'); } - if (!empty($data)) { + if ( ! empty($data)) { return Doctrine_Parser::dump($data, $format, $directory); } } } + /** * prepareData * @@ -127,7 +126,6 @@ class Doctrine_Data_Export extends Doctrine_Data * * @param string $data * @return array - * @author Jonathan H. Wage */ public function prepareData($data) { @@ -142,14 +140,14 @@ class Doctrine_Data_Export extends Doctrine_Data $recordData = $record->toArray(); foreach ($recordData as $key => $value) { - if (!$value) { + if ( ! $value) { continue; } // skip single primary keys, we need to maintain composite primary keys $keys = $record->getTable()->getIdentifier(); - if (!is_array($keys)) { + if ( ! is_array($keys)) { $keys = array($keys); } diff --git a/lib/Doctrine/Data/Import.php b/lib/Doctrine/Data/Import.php index 2d609e43f..324041956 100644 --- a/lib/Doctrine/Data/Import.php +++ b/lib/Doctrine/Data/Import.php @@ -37,20 +37,18 @@ class Doctrine_Data_Import extends Doctrine_Data * * @param string $directory * @return void - * @author Jonathan H. Wage */ - public function __construct($directory = null) { if ($directory !== null) { $this->setDirectory($directory); } } + /** * doImport * * @return void - * @author Jonathan H. Wage */ public function doImport() { @@ -82,12 +80,12 @@ class Doctrine_Data_Import extends Doctrine_Data $this->loadData($array); } + /** * loadData * * @param string $array * @return void - * @author Jonathan H. Wage */ protected function loadData(array $array) { @@ -99,7 +97,7 @@ class Doctrine_Data_Import extends Doctrine_Data foreach ($array as $className => $data) { - if (!empty($specifiedModels) && !in_array($className, $specifiedModels)) { + if ( ! empty($specifiedModels) && !in_array($className, $specifiedModels)) { continue; } @@ -149,12 +147,12 @@ class Doctrine_Data_Import extends Doctrine_Data $obj->save(); } } + /** * doImportDummyData * * @param string $num * @return void - * @author Jonathan H. Wage */ public function doImportDummyData($num = 3) { @@ -163,7 +161,7 @@ class Doctrine_Data_Import extends Doctrine_Data $specifiedModels = $this->getModels(); foreach ($models as $name) { - if (!empty($specifiedModels) && !in_array($name, $specifiedModels)) { + if ( ! empty($specifiedModels) && !in_array($name, $specifiedModels)) { continue; } @@ -181,18 +179,24 @@ class Doctrine_Data_Import extends Doctrine_Data public function populateDummyRecord(Doctrine_Record $record) { - $lorem = explode(' ', "Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum."); + $lorem = explode(' ', "Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem + Ipsum has been the industry's standard dummy text ever since the 1500s, when an + unknown printer took a galley of type and scrambled it to make a type specimen book. + It has survived not only five centuries, but also the leap into electronic + typesetting, remaining essentially unchanged. It was popularised in the 1960s with + the release of Letraset sheets containing Lorem Ipsum passages, and more recently + with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum."); $columns = array_keys($record->toArray()); $pks = $record->getTable()->getIdentifier(); - if (!is_array($pks)) { + if ( ! is_array($pks)) { $pks = array($pks); } foreach ($columns as $column) { - if (!in_array($column, $pks)) { + if ( ! in_array($column, $pks)) { if ($relation = $this->isRelation($record, $column)) { $alias = $relation['alias']; $relationObj = $record->$alias; diff --git a/lib/Doctrine/DataDict.php b/lib/Doctrine/DataDict.php index 3d105d4af..e25c18ded 100644 --- a/lib/Doctrine/DataDict.php +++ b/lib/Doctrine/DataDict.php @@ -18,6 +18,7 @@ * and is licensed under the LGPL. For more information, see * <http://www.phpdoctrine.com>. */ + /** * Doctrine_DataDict * @@ -73,6 +74,7 @@ class Doctrine_DataDict extends Doctrine_Connection_Module return $change; } + /** * parseBoolean * parses a literal boolean value and returns diff --git a/lib/Doctrine/DataDict/Firebird.php b/lib/Doctrine/DataDict/Firebird.php index 5d75d8d29..6f5aa2b69 100644 --- a/lib/Doctrine/DataDict/Firebird.php +++ b/lib/Doctrine/DataDict/Firebird.php @@ -99,6 +99,7 @@ class Doctrine_DataDict_Firebird extends Doctrine_DataDict throw new Doctrine_DataDict_Exception('Unknown field type \'' . $field['type'] . '\'.'); } + /** * Maps a native array description of a field to a Doctrine datatype and length * @@ -188,6 +189,7 @@ class Doctrine_DataDict_Firebird extends Doctrine_DataDict 'unsigned' => $unsigned, 'fixed' => $fixed); } + /** * Obtain DBMS specific SQL code portion needed to set the CHARACTER SET * of a field declaration to be used in statements like CREATE TABLE. @@ -200,6 +202,7 @@ class Doctrine_DataDict_Firebird extends Doctrine_DataDict { return 'CHARACTER SET ' . $charset; } + /** * Obtain DBMS specific SQL code portion needed to set the COLLATION * of a field declaration to be used in statements like CREATE TABLE. diff --git a/lib/Doctrine/DataDict/Mssql.php b/lib/Doctrine/DataDict/Mssql.php index 258022a7a..88650dbf6 100644 --- a/lib/Doctrine/DataDict/Mssql.php +++ b/lib/Doctrine/DataDict/Mssql.php @@ -114,6 +114,7 @@ class Doctrine_DataDict_Mssql extends Doctrine_DataDict throw new Doctrine_DataDict_Exception('Unknown field type \'' . $field['type'] . '\'.'); } + /** * Maps a native array description of a field to a MDB2 datatype and length * diff --git a/lib/Doctrine/DataDict/Mysql.php b/lib/Doctrine/DataDict/Mysql.php index 48380f3b9..830ec2e2a 100644 --- a/lib/Doctrine/DataDict/Mysql.php +++ b/lib/Doctrine/DataDict/Mysql.php @@ -228,6 +228,7 @@ class Doctrine_DataDict_Mysql extends Doctrine_DataDict } throw new Doctrine_DataDict_Exception('Unknown field type \'' . $field['type'] . '\'.'); } + /** * Maps a native array description of a field to a MDB2 datatype and length * @@ -386,6 +387,7 @@ class Doctrine_DataDict_Mysql extends Doctrine_DataDict return array('type' => $type, 'length' => $length, 'unsigned' => $unsigned, 'fixed' => $fixed, 'values' => $values); } } + /** * Obtain DBMS specific SQL code portion needed to set the CHARACTER SET * of a field declaration to be used in statements like CREATE TABLE. @@ -398,6 +400,7 @@ class Doctrine_DataDict_Mysql extends Doctrine_DataDict { return 'CHARACTER SET ' . $charset; } + /** * Obtain DBMS specific SQL code portion needed to set the COLLATION * of a field declaration to be used in statements like CREATE TABLE. @@ -410,6 +413,7 @@ class Doctrine_DataDict_Mysql extends Doctrine_DataDict { return 'COLLATE ' . $collation; } + /** * Obtain DBMS specific SQL code portion needed to declare an integer type * field to be used in statements like CREATE TABLE. diff --git a/lib/Doctrine/DataDict/Oracle.php b/lib/Doctrine/DataDict/Oracle.php index a7edaf4b6..23cc2f2ab 100644 --- a/lib/Doctrine/DataDict/Oracle.php +++ b/lib/Doctrine/DataDict/Oracle.php @@ -97,6 +97,7 @@ class Doctrine_DataDict_Oracle extends Doctrine_DataDict } throw new Doctrine_DataDict_Exception('Unknown field type \'' . $field['type'] . '\'.'); } + /** * Maps a native array description of a field to a doctrine datatype and length * diff --git a/lib/Doctrine/DataDict/Pgsql.php b/lib/Doctrine/DataDict/Pgsql.php index 85477db3b..8776db7a0 100644 --- a/lib/Doctrine/DataDict/Pgsql.php +++ b/lib/Doctrine/DataDict/Pgsql.php @@ -422,6 +422,7 @@ class Doctrine_DataDict_Pgsql extends Doctrine_DataDict } throw new Doctrine_DataDict_Exception('Unknown field type \'' . $field['type'] . '\'.'); } + /** * Maps a native array description of a field to a portable Doctrine datatype and length * @@ -553,6 +554,7 @@ class Doctrine_DataDict_Pgsql extends Doctrine_DataDict 'unsigned' => $unsigned, 'fixed' => $fixed); } + /** * Obtain DBMS specific SQL code portion needed to declare an integer type * field to be used in statements like CREATE TABLE. @@ -606,6 +608,7 @@ class Doctrine_DataDict_Pgsql extends Doctrine_DataDict $name = $this->conn->quoteIdentifier($name, true); return $name . ' ' . $this->getNativeDeclaration($field) . $default . $notnull; } + /** * parseBoolean * parses a literal boolean value and returns diff --git a/lib/Doctrine/DataDict/Sqlite.php b/lib/Doctrine/DataDict/Sqlite.php index 793c347ea..cbca8f614 100644 --- a/lib/Doctrine/DataDict/Sqlite.php +++ b/lib/Doctrine/DataDict/Sqlite.php @@ -119,6 +119,7 @@ class Doctrine_DataDict_Sqlite extends Doctrine_DataDict } throw new Doctrine_DataDict_Exception('Unknown field type \'' . $field['type'] . '\'.'); } + /** * Maps a native array description of a field to Doctrine datatype and length * @@ -240,6 +241,7 @@ class Doctrine_DataDict_Sqlite extends Doctrine_DataDict 'unsigned' => $unsigned, 'fixed' => $fixed); } + /** * Obtain DBMS specific SQL code portion needed to declare an integer type * field to be used in statements like CREATE TABLE. diff --git a/lib/Doctrine/Db.php b/lib/Doctrine/Db.php index 9e77d4140..21c003840 100644 --- a/lib/Doctrine/Db.php +++ b/lib/Doctrine/Db.php @@ -18,6 +18,7 @@ * and is licensed under the LGPL. For more information, see * <http://www.phpdoctrine.com>. */ + /** * Doctrine_Db * diff --git a/lib/Doctrine/Event.php b/lib/Doctrine/Event.php index fb8119690..365b59bee 100644 --- a/lib/Doctrine/Event.php +++ b/lib/Doctrine/Event.php @@ -18,6 +18,7 @@ * and is licensed under the LGPL. For more information, see * <http://www.phpdoctrine.com>. */ + /** * Doctrine_Event * @@ -63,35 +64,43 @@ class Doctrine_Event const RECORD_INSERT = 24; const RECORD_SERIALIZE = 25; const RECORD_UNSERIALIZE = 26; + /** * @var mixed $_invoker the handler which invoked this event */ protected $_invoker; + /** * @var string $_query the sql query associated with this event (if any) */ protected $_query; + /** * @var string $_params the parameters associated with the query (if any) */ protected $_params; + /** * @see Doctrine_Event constants * @var integer $_code the event code */ protected $_code; + /** * @var integer $_startedMicrotime the time point in which this event was started */ protected $_startedMicrotime; + /** * @var integer $_endedMicrotime the time point in which this event was ended */ protected $_endedMicrotime; + /** * @var array $_options an array of options */ protected $_options = array(); + /** * constructor * @@ -107,6 +116,7 @@ class Doctrine_Event $this->_query = $query; $this->_params = $params; } + /** * getQuery * @@ -116,6 +126,7 @@ class Doctrine_Event { return $this->_query; } + /** * getName * returns the name of this event @@ -173,6 +184,7 @@ class Doctrine_Event return 'unserialize record'; } } + /** * getCode * @@ -182,6 +194,7 @@ class Doctrine_Event { return $this->_code; } + /** * getOption * returns the value of an option @@ -197,6 +210,7 @@ class Doctrine_Event return $this->_options[$option]; } + /** * skipOperation * skips the next operation @@ -210,6 +224,7 @@ class Doctrine_Event return $this; } + /** * setOption * sets the value of an option @@ -224,6 +239,7 @@ class Doctrine_Event return $this; } + /** * setOption * sets the value of an option by reference @@ -238,6 +254,7 @@ class Doctrine_Event return $this; } + /** * start * starts the internal timer of this event @@ -248,6 +265,7 @@ class Doctrine_Event { $this->_startedMicrotime = microtime(true); } + /** * hasEnded * whether or not this event has ended @@ -258,6 +276,7 @@ class Doctrine_Event { return ($this->_endedMicrotime != null); } + /** * end * ends the internal timer of this event @@ -270,6 +289,7 @@ class Doctrine_Event return $this; } + /** * getInvoker * returns the handler that invoked this event @@ -281,6 +301,7 @@ class Doctrine_Event { return $this->_invoker; } + /** * getParams * returns the parameters of the query @@ -291,6 +312,7 @@ class Doctrine_Event { return $this->_params; } + /** * Get the elapsed time (in microseconds) that the event ran. If the event has * not yet ended, return false. diff --git a/lib/Doctrine/EventListener/Chain.php b/lib/Doctrine/EventListener/Chain.php index a2fda74f9..5d190c860 100644 --- a/lib/Doctrine/EventListener/Chain.php +++ b/lib/Doctrine/EventListener/Chain.php @@ -39,6 +39,7 @@ class Doctrine_EventListener_Chain extends Doctrine_Access implements Doctrine_E * @var array $listeners an array containing all listeners */ protected $_listeners = array(); + /** * add * adds a listener to the chain of listeners @@ -60,6 +61,7 @@ class Doctrine_EventListener_Chain extends Doctrine_Access implements Doctrine_E $this->_listeners[$name] = $listener; } } + /** * returns a Doctrine_EventListener on success * and null on failure @@ -74,6 +76,7 @@ class Doctrine_EventListener_Chain extends Doctrine_Access implements Doctrine_E } return $this->_listeners[$key]; } + /** * set * @@ -85,6 +88,7 @@ class Doctrine_EventListener_Chain extends Doctrine_Access implements Doctrine_E { $this->_listeners[$key] = $listener; } + /** * onLoad * an event invoked when Doctrine_Record is being loaded from database @@ -98,6 +102,7 @@ class Doctrine_EventListener_Chain extends Doctrine_Access implements Doctrine_E $listener->onLoad($record); } } + /** * onPreLoad * an event invoked when Doctrine_Record is being loaded @@ -112,6 +117,7 @@ class Doctrine_EventListener_Chain extends Doctrine_Access implements Doctrine_E $listener->onPreLoad($record); } } + /** * onSleep * an event invoked when Doctrine_Record is serialized @@ -125,6 +131,7 @@ class Doctrine_EventListener_Chain extends Doctrine_Access implements Doctrine_E $listener->onSleep($record); } } + /** * onWakeUp * an event invoked when Doctrine_Record is unserialized @@ -138,6 +145,7 @@ class Doctrine_EventListener_Chain extends Doctrine_Access implements Doctrine_E $listener->onWakeUp($record); } } + /** * postClose * an event invoked after Doctrine_Connection is closed @@ -151,6 +159,7 @@ class Doctrine_EventListener_Chain extends Doctrine_Access implements Doctrine_E $listener->postClose($event); } } + /** * preClose * an event invoked before Doctrine_Connection is closed @@ -164,6 +173,7 @@ class Doctrine_EventListener_Chain extends Doctrine_Access implements Doctrine_E $listener->preClose($event); } } + /** * onOpen * an event invoked after Doctrine_Connection is opened @@ -177,6 +187,7 @@ class Doctrine_EventListener_Chain extends Doctrine_Access implements Doctrine_E $listener->onOpen($connection); } } + /** * onTransactionCommit * an event invoked after a Doctrine_Connection transaction is committed @@ -190,6 +201,7 @@ class Doctrine_EventListener_Chain extends Doctrine_Access implements Doctrine_E $listener->postTransactionCommit($event); } } + /** * onPreTransactionCommit * an event invoked before a Doctrine_Connection transaction is committed @@ -203,6 +215,7 @@ class Doctrine_EventListener_Chain extends Doctrine_Access implements Doctrine_E $listener->preTransactionCommit($event); } } + /** * onTransactionRollback * an event invoked after a Doctrine_Connection transaction is being rolled back @@ -216,6 +229,7 @@ class Doctrine_EventListener_Chain extends Doctrine_Access implements Doctrine_E $listener->postTransactionRollback($event); } } + /** * onPreTransactionRollback * an event invoked before a Doctrine_Connection transaction is being rolled back @@ -229,6 +243,7 @@ class Doctrine_EventListener_Chain extends Doctrine_Access implements Doctrine_E $listener->preTransactionRollback($event); } } + /** * onTransactionBegin * an event invoked after a Doctrine_Connection transaction has been started @@ -242,6 +257,7 @@ class Doctrine_EventListener_Chain extends Doctrine_Access implements Doctrine_E $listener->postTransactionBegin($event); } } + /** * onTransactionBegin * an event invoked before a Doctrine_Connection transaction is being started @@ -255,6 +271,7 @@ class Doctrine_EventListener_Chain extends Doctrine_Access implements Doctrine_E $listener->preTransactionBegin($event); } } + /** * onCollectionDelete * an event invoked after a Doctrine_Collection is being deleted @@ -268,6 +285,7 @@ class Doctrine_EventListener_Chain extends Doctrine_Access implements Doctrine_E $listener->onCollectionDelete($collection); } } + /** * onCollectionDelete * an event invoked after a Doctrine_Collection is being deleted diff --git a/lib/Doctrine/Exception.php b/lib/Doctrine/Exception.php index bc87eadef..e10b3db0b 100644 --- a/lib/Doctrine/Exception.php +++ b/lib/Doctrine/Exception.php @@ -18,6 +18,7 @@ * and is licensed under the LGPL. For more information, see * <http://www.phpdoctrine.com>. */ + /** * Doctrine_Exception * @@ -68,6 +69,7 @@ class Doctrine_Exception extends Exception Doctrine::ERR_TRUNCATED => 'truncated', Doctrine::ERR_DEADLOCK => 'deadlock detected', ); + /** * Return a textual error message for a Doctrine error code * diff --git a/lib/Doctrine/Export.php b/lib/Doctrine/Export.php index 8e3340add..6b3b2ba5c 100644 --- a/lib/Doctrine/Export.php +++ b/lib/Doctrine/Export.php @@ -58,6 +58,7 @@ class Doctrine_Export extends Doctrine_Connection_Module { $this->conn->execute($this->dropDatabaseSql($database)); } + /** * drop an existing database * (this method is implemented by the drivers) @@ -69,6 +70,7 @@ class Doctrine_Export extends Doctrine_Connection_Module { throw new Doctrine_Export_Exception('Drop database not supported by this driver.'); } + /** * dropTableSql * drop an existing table @@ -80,6 +82,7 @@ class Doctrine_Export extends Doctrine_Connection_Module { return 'DROP TABLE ' . $this->conn->quoteIdentifier($table); } + /** * dropTable * drop an existing table @@ -117,6 +120,7 @@ class Doctrine_Export extends Doctrine_Connection_Module return 'DROP INDEX ' . $name; } + /** * drop existing constraint * @@ -132,6 +136,7 @@ class Doctrine_Export extends Doctrine_Connection_Module return $this->conn->exec('ALTER TABLE ' . $table . ' DROP CONSTRAINT ' . $name); } + /** * drop existing foreign key * @@ -143,6 +148,7 @@ class Doctrine_Export extends Doctrine_Connection_Module { return $this->dropConstraint($table, $name); } + /** * dropSequenceSql * drop existing sequence @@ -156,6 +162,7 @@ class Doctrine_Export extends Doctrine_Connection_Module { $this->conn->exec($this->dropSequenceSql($sequenceName)); } + /** * dropSequenceSql * drop existing sequence @@ -168,6 +175,7 @@ class Doctrine_Export extends Doctrine_Connection_Module { throw new Doctrine_Export_Exception('Drop sequence not supported by this driver.'); } + /** * create a new database * (this method is implemented by the drivers) @@ -179,6 +187,7 @@ class Doctrine_Export extends Doctrine_Connection_Module { $this->conn->execute($this->createDatabaseSql($database)); } + /** * create a new database * (this method is implemented by the drivers) @@ -190,6 +199,7 @@ class Doctrine_Export extends Doctrine_Connection_Module { throw new Doctrine_Export_Exception('Create database not supported by this driver.'); } + /** * create a new table * @@ -265,6 +275,7 @@ class Doctrine_Export extends Doctrine_Connection_Module } return $sql; } + /** * create a new table * @@ -283,6 +294,7 @@ class Doctrine_Export extends Doctrine_Connection_Module $this->conn->execute($query); } } + /** * create sequence * @@ -301,6 +313,7 @@ class Doctrine_Export extends Doctrine_Connection_Module { return $this->conn->execute($this->createSequenceSql($seqName, $start = 1, $options)); } + /** * return RDBMS specific create sequence statement * (this method is implemented by the drivers) @@ -320,6 +333,7 @@ class Doctrine_Export extends Doctrine_Connection_Module { throw new Doctrine_Export_Exception('Create sequence not supported by this driver.'); } + /** * create a constraint on a table * @@ -347,6 +361,7 @@ class Doctrine_Export extends Doctrine_Connection_Module return $this->conn->exec($sql); } + /** * create a constraint on a table * @@ -388,6 +403,7 @@ class Doctrine_Export extends Doctrine_Connection_Module return $query; } + /** * Get the stucture of a field into an array * @@ -423,6 +439,7 @@ class Doctrine_Export extends Doctrine_Connection_Module { return $this->conn->execute($this->createIndexSql($table, $name, $definition)); } + /** * Get the stucture of a field into an array * @@ -473,6 +490,7 @@ class Doctrine_Export extends Doctrine_Connection_Module return $query; } + /** * createForeignKey * @@ -486,6 +504,7 @@ class Doctrine_Export extends Doctrine_Connection_Module return $this->conn->execute($sql); } + /** * alter an existing table * (this method is implemented by the drivers) @@ -583,6 +602,7 @@ class Doctrine_Export extends Doctrine_Connection_Module $this->conn->execute($sql); } } + /** * generates the sql for altering an existing table * (this method is implemented by the drivers) @@ -599,6 +619,7 @@ class Doctrine_Export extends Doctrine_Connection_Module { throw new Doctrine_Export_Exception('Alter table not supported by this driver.'); } + /** * Get declaration of a number of field in bulk * @@ -637,6 +658,7 @@ class Doctrine_Export extends Doctrine_Connection_Module } return implode(', ', $queryFields); } + /** * Obtain DBMS specific SQL code portion needed to declare a generic type * field to be used in statements like CREATE TABLE. @@ -697,6 +719,7 @@ class Doctrine_Export extends Doctrine_Connection_Module } return $this->conn->quoteIdentifier($name, true) . ' ' . $dec . $charset . $default . $notnull . $unique . $check . $collation; } + /** * getDefaultDeclaration * Obtain DBMS specific SQL code portion needed to set a default value @@ -726,6 +749,7 @@ class Doctrine_Export extends Doctrine_Connection_Module } return $default; } + /** * Obtain DBMS specific SQL code portion needed to set a CHECK constraint * declaration to be used in statements like CREATE TABLE. @@ -752,6 +776,7 @@ class Doctrine_Export extends Doctrine_Connection_Module return implode(', ', $constraints); } + /** * Obtain DBMS specific SQL code portion needed to set an index * declaration to be used in statements like CREATE TABLE. @@ -783,6 +808,7 @@ class Doctrine_Export extends Doctrine_Connection_Module return $query; } + /** * getIndexFieldDeclarationList * Obtain DBMS specific SQL code portion needed to set an index @@ -802,6 +828,7 @@ class Doctrine_Export extends Doctrine_Connection_Module } return implode(', ', $ret); } + /** * A method to return the required SQL string that fits between CREATE ... TABLE * to create the table as a temporary table. @@ -820,6 +847,7 @@ class Doctrine_Export extends Doctrine_Connection_Module { return 'TEMPORARY'; } + /** * getForeignKeyDeclaration * Obtain DBMS specific SQL code portion needed to set the FOREIGN KEY constraint @@ -869,6 +897,7 @@ class Doctrine_Export extends Doctrine_Connection_Module return $sql; } + /** * getAdvancedForeignKeyOptions * Return the FOREIGN KEY query section dealing with non-standard options @@ -888,6 +917,7 @@ class Doctrine_Export extends Doctrine_Connection_Module } return $query; } + /** * getForeignKeyReferentialAction * @@ -913,6 +943,7 @@ class Doctrine_Export extends Doctrine_Connection_Module throw new Doctrine_Export_Exception('Unknown foreign key referential action \'' . $upper . '\' given.'); } } + /** * getForeignKeyBaseDeclaration * Obtain DBMS specific SQL code portion needed to set the FOREIGN KEY constraint @@ -953,6 +984,7 @@ class Doctrine_Export extends Doctrine_Connection_Module return $sql; } + /** * Obtain DBMS specific SQL code portion needed to set the UNIQUE constraint * of a field declaration to be used in statements like CREATE TABLE. @@ -964,6 +996,7 @@ class Doctrine_Export extends Doctrine_Connection_Module { return 'UNIQUE'; } + /** * Obtain DBMS specific SQL code portion needed to set the CHARACTER SET * of a field declaration to be used in statements like CREATE TABLE. @@ -976,6 +1009,7 @@ class Doctrine_Export extends Doctrine_Connection_Module { return ''; } + /** * Obtain DBMS specific SQL code portion needed to set the COLLATION * of a field declaration to be used in statements like CREATE TABLE. @@ -988,6 +1022,7 @@ class Doctrine_Export extends Doctrine_Connection_Module { return ''; } + /** * exportSchema * method for exporting Doctrine_Record classes to a schema @@ -1013,6 +1048,7 @@ class Doctrine_Export extends Doctrine_Connection_Module $this->exportClasses($models); } + /** * exportClasses * method for exporting Doctrine_Record classes to a schema @@ -1030,7 +1066,7 @@ class Doctrine_Export extends Doctrine_Connection_Module $connection = $record->getTable()->getConnection(); $connectionName = Doctrine_Manager::getInstance()->getConnectionName($connection); - if (!isset($connections[$connectionName])) { + if ( ! isset($connections[$connectionName])) { $connections[$connectionName] = array(); $connections[$connectionName]['creates'] = array(); $connections[$connectionName]['alters'] = array(); @@ -1075,6 +1111,7 @@ class Doctrine_Export extends Doctrine_Connection_Module $connection->commit(); } } + /** * exportClassesSql * method for exporting Doctrine_Record classes to a schema @@ -1115,6 +1152,7 @@ class Doctrine_Export extends Doctrine_Connection_Module return $sql; } + /** * exportPluginsSql * exports plugin tables for given table @@ -1147,6 +1185,7 @@ class Doctrine_Export extends Doctrine_Connection_Module return $sql; } + /** * exportSql * returns the sql for exporting Doctrine_Record classes to a schema @@ -1172,6 +1211,7 @@ class Doctrine_Export extends Doctrine_Connection_Module return $this->exportClassesSql($models); } + /** * exportTable * exports given table into database based on column and option definitions diff --git a/lib/Doctrine/Export/Firebird.php b/lib/Doctrine/Export/Firebird.php index 6deaf2557..58ca03f56 100644 --- a/lib/Doctrine/Export/Firebird.php +++ b/lib/Doctrine/Export/Firebird.php @@ -46,6 +46,7 @@ class Doctrine_Export_Firebird extends Doctrine_Export 'PHP Interbase API does not support direct queries. You have to ' . 'create the db manually by using isql command or a similar program'); } + /** * drop an existing database * @@ -58,6 +59,7 @@ class Doctrine_Export_Firebird extends Doctrine_Export 'PHP Interbase API does not support direct queries. You have ' . 'to drop the db manually by using isql command or a similar program'); } + /** * add an autoincrement sequence + trigger * @@ -99,6 +101,7 @@ class Doctrine_Export_Firebird extends Doctrine_Export return $result; } + /** * drop an existing autoincrement sequence + trigger * @@ -116,6 +119,7 @@ class Doctrine_Export_Firebird extends Doctrine_Export return $this->conn->exec("DELETE FROM RDB\$TRIGGERS WHERE UPPER(RDB\$RELATION_NAME)=" . $table . " AND UPPER(RDB\$TRIGGER_NAME)=" . $triggerName); } + /** * create a new table * @@ -167,6 +171,7 @@ class Doctrine_Export_Firebird extends Doctrine_Export } } } + /** * Check if planned changes are supported * @@ -196,6 +201,7 @@ class Doctrine_Export_Firebird extends Doctrine_Export } return true; } + /** * drop an existing table * @@ -212,6 +218,7 @@ class Doctrine_Export_Firebird extends Doctrine_Export return $result; } + /** * alter an existing table * @@ -372,6 +379,7 @@ class Doctrine_Export_Firebird extends Doctrine_Export $this->_silentCommit(); return $result; } + /** * Get the stucture of a field into an array * @@ -431,6 +439,7 @@ class Doctrine_Export_Firebird extends Doctrine_Export return $query; } + /** * create a constraint on a table * @@ -480,6 +489,7 @@ class Doctrine_Export_Firebird extends Doctrine_Export // TODO ? $this->_silentCommit(); return $result; } + /** * A method to return the required SQL string that fits between CREATE ... TABLE * to create the table as a temporary table. @@ -491,6 +501,7 @@ class Doctrine_Export_Firebird extends Doctrine_Export { return 'GLOBAL TEMPORARY'; } + /** * create sequence * @@ -523,6 +534,7 @@ class Doctrine_Export_Firebird extends Doctrine_Export } throw new Doctrine_Export_Exception('could not create sequence table'); } + /** * drop existing sequence * diff --git a/lib/Doctrine/Export/Frontbase.php b/lib/Doctrine/Export/Frontbase.php index 8c040a26a..7616eb36a 100644 --- a/lib/Doctrine/Export/Frontbase.php +++ b/lib/Doctrine/Export/Frontbase.php @@ -44,6 +44,7 @@ class Doctrine_Export_Frontbase extends Doctrine_Export $name = $this->conn->quoteIdentifier($name, true); return 'CREATE DATABASE ' . $name; } + /** * drop an existing database * @@ -55,6 +56,7 @@ class Doctrine_Export_Frontbase extends Doctrine_Export $name = $this->conn->quoteIdentifier($name, true); return 'DELETE DATABASE ' . $name; } + /** * drop an existing table * @@ -67,6 +69,7 @@ class Doctrine_Export_Frontbase extends Doctrine_Export $name = $this->conn->quoteIdentifier($name, true); return 'DROP TABLE ' . $name . ' CASCADE'; } + /** * alter an existing table * @@ -242,6 +245,7 @@ class Doctrine_Export_Frontbase extends Doctrine_Export $name = $this->conn->quoteIdentifier($name, true); return $this->conn->exec('ALTER TABLE ' . $name . ' ' . $query); } + /** * create sequence * @@ -281,6 +285,7 @@ class Doctrine_Export_Frontbase extends Doctrine_Export throw new Doctrine_Export_Exception('could not create sequence table'); } } + /** * drop existing sequence * @@ -293,6 +298,7 @@ class Doctrine_Export_Frontbase extends Doctrine_Export return 'DROP TABLE ' . $sequenceName . ' CASCADE'; } + /** * drop existing index * diff --git a/lib/Doctrine/Export/Mssql.php b/lib/Doctrine/Export/Mssql.php index f9afdaa5b..435dc51ec 100644 --- a/lib/Doctrine/Export/Mssql.php +++ b/lib/Doctrine/Export/Mssql.php @@ -51,6 +51,7 @@ class Doctrine_Export_Mssql extends Doctrine_Export } return $this->conn->standaloneQuery($query, null, true); } + /** * drop an existing database * @@ -204,6 +205,7 @@ class Doctrine_Export_Mssql extends Doctrine_Export $name = $this->conn->quoteIdentifier($name, true); return $this->conn->exec('ALTER TABLE ' . $name . ' ' . $query); } + /** * create sequence * @@ -239,6 +241,7 @@ class Doctrine_Export_Mssql extends Doctrine_Export } return true; } + /** * This function drops an existing sequence * diff --git a/lib/Doctrine/Export/Mysql.php b/lib/Doctrine/Export/Mysql.php index 5fbd88e35..3e6876b25 100644 --- a/lib/Doctrine/Export/Mysql.php +++ b/lib/Doctrine/Export/Mysql.php @@ -43,6 +43,7 @@ class Doctrine_Export_Mysql extends Doctrine_Export { return 'CREATE DATABASE ' . $this->conn->quoteIdentifier($name, true); } + /** * drop an existing database * @@ -53,6 +54,7 @@ class Doctrine_Export_Mysql extends Doctrine_Export { return 'DROP DATABASE ' . $this->conn->quoteIdentifier($name); } + /** * create a new table * @@ -181,6 +183,7 @@ class Doctrine_Export_Mysql extends Doctrine_Export } return $sql; } + /** * alter an existing table * @@ -360,6 +363,7 @@ class Doctrine_Export_Mysql extends Doctrine_Export return 'ALTER TABLE ' . $name . ' ' . $query; } + /** * create sequence * @@ -434,6 +438,7 @@ class Doctrine_Export_Mysql extends Doctrine_Export } + /** * Get the stucture of a field into an array * @@ -489,6 +494,7 @@ class Doctrine_Export_Mysql extends Doctrine_Export return $query; } + /** * getDefaultDeclaration * Obtain DBMS specific SQL code portion needed to set a default value @@ -516,6 +522,7 @@ class Doctrine_Export_Mysql extends Doctrine_Export } return $default; } + /** * Obtain DBMS specific SQL code portion needed to set an index * declaration to be used in statements like CREATE TABLE. @@ -552,6 +559,7 @@ class Doctrine_Export_Mysql extends Doctrine_Export return $query; } + /** * getIndexFieldDeclarationList * Obtain DBMS specific SQL code portion needed to set an index @@ -589,6 +597,7 @@ class Doctrine_Export_Mysql extends Doctrine_Export } return implode(', ', $declFields); } + /** * getAdvancedForeignKeyOptions * Return the FOREIGN KEY query section dealing with non-standard options @@ -611,6 +620,7 @@ class Doctrine_Export_Mysql extends Doctrine_Export } return $query; } + /** * drop existing index * @@ -624,6 +634,7 @@ class Doctrine_Export_Mysql extends Doctrine_Export $name = $this->conn->quoteIdentifier($this->conn->formatter->getIndexName($name), true); return 'DROP INDEX ' . $name . ' ON ' . $table; } + /** * dropTable * diff --git a/lib/Doctrine/Export/Oracle.php b/lib/Doctrine/Export/Oracle.php index 53a8c00af..c37beec62 100644 --- a/lib/Doctrine/Export/Oracle.php +++ b/lib/Doctrine/Export/Oracle.php @@ -64,6 +64,7 @@ class Doctrine_Export_Oracle extends Doctrine_Export } return true; } + /** * drop an existing database * @@ -82,6 +83,7 @@ class Doctrine_Export_Oracle extends Doctrine_Export return $this->conn->exec('DROP USER ' . $username . ' CASCADE'); } + /** * add an autoincrement sequence + trigger * @@ -140,6 +142,7 @@ END; '; return $sql; } + /** * drop an existing autoincrement sequence + trigger * @@ -182,6 +185,7 @@ END; { return 'GLOBAL TEMPORARY'; } + /** * getAdvancedForeignKeyOptions * Return the FOREIGN KEY query section dealing with non-standard options @@ -296,6 +300,7 @@ END; return $sql; } + /** * drop an existing table * @@ -310,6 +315,7 @@ END; //$this->conn->completeNestedTransaction(); return $result; } + /** * alter an existing table * @@ -458,6 +464,7 @@ END; $result = $this->conn->exec('ALTER TABLE ' . $name . ' RENAME TO ' . $changeName); } } + /** * create sequence * @@ -478,6 +485,7 @@ END; $query .= ($start < 1 ? ' MINVALUE ' . $start : ''); return $query; } + /** * drop existing sequence * diff --git a/lib/Doctrine/Export/Pgsql.php b/lib/Doctrine/Export/Pgsql.php index 6d4cd89c8..cbcfee022 100644 --- a/lib/Doctrine/Export/Pgsql.php +++ b/lib/Doctrine/Export/Pgsql.php @@ -46,6 +46,7 @@ class Doctrine_Export_Pgsql extends Doctrine_Export return $query; } + /** * drop an existing database * @@ -59,6 +60,7 @@ class Doctrine_Export_Pgsql extends Doctrine_Export return $query; } + /** * getAdvancedForeignKeyOptions * Return the FOREIGN KEY query section dealing with non-standard options @@ -252,6 +254,7 @@ class Doctrine_Export_Pgsql extends Doctrine_Export $this->conn->exec('ALTER TABLE ' . $name . ' RENAME TO ' . $changeName); } } + /** * return RDBMS specific create sequence statement * @@ -272,6 +275,7 @@ class Doctrine_Export_Pgsql extends Doctrine_Export return $this->conn->exec('CREATE SEQUENCE ' . $sequenceName . ' INCREMENT 1' . ($start < 1 ? ' MINVALUE ' . $start : '') . ' START ' . $start); } + /** * drop existing sequence * diff --git a/lib/Doctrine/Export/Schema.php b/lib/Doctrine/Export/Schema.php index 4a2f3b488..26a2b5bbf 100644 --- a/lib/Doctrine/Export/Schema.php +++ b/lib/Doctrine/Export/Schema.php @@ -20,14 +20,9 @@ */ /** - * class Doctrine_Export_Schema - * - * Different methods to import a XML schema. The logic behind using two different - * methods is simple. Some people will like the idea of producing Doctrine_Record - * objects directly, which is totally fine. But in fast and growing application, - * table definitions tend to be a little bit more volatile. importArr() can be used - * to output a table definition in a PHP file. This file can then be stored - * independantly from the object itself. + * Doctrine_Export_Schema + * + * Used for exporting a schema to a yaml file * * @package Doctrine * @subpackage Export @@ -35,6 +30,7 @@ * @license http://www.opensource.org/licenses/lgpl-license.php LGPL * @version $Revision: 1838 $ * @author Nicolas Bérard-Nault <nicobn@gmail.com> + * @author Jonathan H. Wage <jwage@mac.com> */ class Doctrine_Export_Schema { @@ -64,7 +60,7 @@ class Doctrine_Export_Schema // we iterate trhough the diff of previously declared classes // and currently declared classes foreach ($loadedModels as $name) { - if (!empty($models) && !in_array($name, $models)) { + if ( ! empty($models) && !in_array($name, $models)) { continue; } @@ -114,18 +110,19 @@ class Doctrine_Export_Schema return $array; } - + /** * exportSchema * - * @param string $schema - * @param string $directory + * @param string $schema + * @param string $directory + * @return string $string of data in the specified format * @return void */ public function exportSchema($schema, $format = 'yml', $directory = null, $models = array()) { $array = $this->buildSchema($directory, $models); - Doctrine_Parser::dump($array, $format, $schema); + return Doctrine_Parser::dump($array, $format, $schema); } } \ No newline at end of file diff --git a/lib/Doctrine/Export/Sqlite.php b/lib/Doctrine/Export/Sqlite.php index ca3a95b37..60096fcbf 100644 --- a/lib/Doctrine/Export/Sqlite.php +++ b/lib/Doctrine/Export/Sqlite.php @@ -94,6 +94,7 @@ class Doctrine_Export_Sqlite extends Doctrine_Export return $query; } + /** * getIndexFieldDeclarationList * Obtain DBMS specific SQL code portion needed to set an index @@ -127,6 +128,7 @@ class Doctrine_Export_Sqlite extends Doctrine_Export } return implode(', ', $declFields); } + /** * create a new table * @@ -243,6 +245,7 @@ class Doctrine_Export_Sqlite extends Doctrine_Export } */ } + /** * getAdvancedForeignKeyOptions * Return the FOREIGN KEY query section dealing with non-standard options @@ -276,6 +279,7 @@ class Doctrine_Export_Sqlite extends Doctrine_Export } return $query; } + /** * create sequence * @@ -315,6 +319,7 @@ class Doctrine_Export_Sqlite extends Doctrine_Export } throw new Doctrine_Export_Exception('could not create sequence table'); } + /** * drop existing sequence * diff --git a/lib/Doctrine/Expression/Driver.php b/lib/Doctrine/Expression/Driver.php index b58165466..6cbc3f111 100644 --- a/lib/Doctrine/Expression/Driver.php +++ b/lib/Doctrine/Expression/Driver.php @@ -40,6 +40,7 @@ class Doctrine_Expression_Driver extends Doctrine_Connection_Module { return $columns; } + /** * regexp * returns the regular expression operator @@ -50,6 +51,7 @@ class Doctrine_Expression_Driver extends Doctrine_Connection_Module { throw new Doctrine_Expression_Exception('Regular expression operator is not supported by this database driver.'); } + /** * Returns the average value of a column * @@ -205,6 +207,7 @@ class Doctrine_Expression_Driver extends Doctrine_Connection_Module { return 'LTRIM(' . $str . ')'; } + /** * upper * Returns the string $str with all characters changed to @@ -217,6 +220,7 @@ class Doctrine_Expression_Driver extends Doctrine_Connection_Module { return 'UPPER(' . $str . ')'; } + /** * lower * Returns the string $str with all characters changed to @@ -229,6 +233,7 @@ class Doctrine_Expression_Driver extends Doctrine_Connection_Module { return 'LOWER(' . $str . ')'; } + /** * locate * returns the position of the first occurrence of substring $substr in string $str @@ -241,6 +246,7 @@ class Doctrine_Expression_Driver extends Doctrine_Connection_Module { return 'LOCATE(' . $str . ', ' . $substr . ')'; } + /** * Returns the current system date. * @@ -250,6 +256,7 @@ class Doctrine_Expression_Driver extends Doctrine_Connection_Module { return 'NOW()'; } + /** * soundex * Returns a string to call a function to compute the @@ -264,6 +271,7 @@ class Doctrine_Expression_Driver extends Doctrine_Connection_Module { throw new Doctrine_Expression_Exception('SQL soundex function not supported by this driver.'); } + /** * return string to call a function to get a substring inside an SQL statement * @@ -286,6 +294,7 @@ class Doctrine_Expression_Driver extends Doctrine_Connection_Module return 'SUBSTRING(' . $value . ' FROM ' . $from . ' FOR ' . $len . ')'; } } + /** * Returns a series of strings concatinated * @@ -300,6 +309,7 @@ class Doctrine_Expression_Driver extends Doctrine_Connection_Module return 'CONCAT(' . join(', ', (array) $args) . ')'; } + /** * Returns the SQL for a logical not. * @@ -318,6 +328,7 @@ class Doctrine_Expression_Driver extends Doctrine_Connection_Module $expression = $this->getIdentifier($expression); return 'NOT(' . $expression . ')'; } + /** * Returns the SQL to perform the same mathematical operation over an array * of values or expressions. @@ -342,6 +353,7 @@ class Doctrine_Expression_Driver extends Doctrine_Connection_Module return '(' . implode(' ' . $type . ' ', $elements) . ')'; } } + /** * Returns the SQL to add values or expressions together. * @@ -610,6 +622,7 @@ class Doctrine_Expression_Driver extends Doctrine_Connection_Module } return $column . ' IN (' . implode(', ', $values) . ')'; } + /** * Returns SQL that checks if a expression is null. * @@ -629,6 +642,7 @@ class Doctrine_Expression_Driver extends Doctrine_Connection_Module $expression = $this->getIdentifier($expression); return $expression . ' IS NULL'; } + /** * Returns SQL that checks if a expression is not null. * @@ -648,6 +662,7 @@ class Doctrine_Expression_Driver extends Doctrine_Connection_Module $expression = $this->getIdentifier($expression); return $expression . ' IS NOT NULL'; } + /** * Returns SQL that checks if an expression evaluates to a value between * two values. @@ -678,6 +693,7 @@ class Doctrine_Expression_Driver extends Doctrine_Connection_Module $value2 = $this->getIdentifier($value2); return $expression . ' BETWEEN ' .$value1 . ' AND ' . $value2; } + /** * Returns global unique identifier * @@ -687,6 +703,7 @@ class Doctrine_Expression_Driver extends Doctrine_Connection_Module { throw new Doctrine_Expression_Exception('method not implemented'); } + /** * returns arcus cosine SQL string * @@ -696,6 +713,7 @@ class Doctrine_Expression_Driver extends Doctrine_Connection_Module { return 'ACOS(' . $value . ')'; } + /** * __call * diff --git a/lib/Doctrine/Expression/Firebird.php b/lib/Doctrine/Expression/Firebird.php index eadc6ac7b..1014bb317 100644 --- a/lib/Doctrine/Expression/Firebird.php +++ b/lib/Doctrine/Expression/Firebird.php @@ -44,6 +44,7 @@ class Doctrine_Expression_Firebird extends Doctrine_Expression_Driver { return ' FROM RDB$DATABASE'; } + /** * build string to define escape pattern string * diff --git a/lib/Doctrine/Expression/Mssql.php b/lib/Doctrine/Expression/Mssql.php index 97124a387..105cd80be 100644 --- a/lib/Doctrine/Expression/Mssql.php +++ b/lib/Doctrine/Expression/Mssql.php @@ -52,6 +52,7 @@ class Doctrine_Expression_Mssql extends Doctrine_Expression_Driver return 'GETDATE()'; } } + /** * return string to call a function to get a substring inside an SQL statement * @@ -64,6 +65,7 @@ class Doctrine_Expression_Mssql extends Doctrine_Expression_Driver } return 'SUBSTRING(' . $value . ', ' . $position . ', LEN(' . $value . ') - ' . $position . ' + 1)'; } + /** * Returns string to concatenate two or more string parameters * @@ -77,6 +79,7 @@ class Doctrine_Expression_Mssql extends Doctrine_Expression_Driver $args = func_get_args(); return '(' . implode(' + ', $args) . ')'; } + /** * Returns global unique identifier * diff --git a/lib/Doctrine/Expression/Mysql.php b/lib/Doctrine/Expression/Mysql.php index 755f63e82..08c8e9398 100644 --- a/lib/Doctrine/Expression/Mysql.php +++ b/lib/Doctrine/Expression/Mysql.php @@ -41,6 +41,7 @@ class Doctrine_Expression_Mysql extends Doctrine_Expression_Driver { return 'RLIKE'; } + /** * return string to call a function to get random value inside an SQL statement * @@ -50,6 +51,7 @@ class Doctrine_Expression_Mysql extends Doctrine_Expression_Driver { return 'RAND()'; } + /** * build a pattern matching string * @@ -98,6 +100,7 @@ class Doctrine_Expression_Mysql extends Doctrine_Expression_Driver $match.= $this->patternEscapeString(); return $match; } + /** * Returns global unique identifier * diff --git a/lib/Doctrine/Expression/Oracle.php b/lib/Doctrine/Expression/Oracle.php index c649c5b1d..4cd1c6ff5 100644 --- a/lib/Doctrine/Expression/Oracle.php +++ b/lib/Doctrine/Expression/Oracle.php @@ -47,6 +47,7 @@ class Doctrine_Expression_Oracle extends Doctrine_Expression_Driver return join(' || ' , $args); } + /** * return string to call a function to get a substring inside an SQL statement * @@ -64,6 +65,7 @@ class Doctrine_Expression_Oracle extends Doctrine_Expression_Driver return "SUBSTR($value, $position)"; } + /** * Return string to call a variable with the current timestamp inside an SQL statement * There are three special variables for current date and time: @@ -83,6 +85,7 @@ class Doctrine_Expression_Oracle extends Doctrine_Expression_Driver return 'TO_CHAR(CURRENT_TIMESTAMP, \'YYYY-MM-DD HH24:MI:SS\')'; } } + /** * random * @@ -92,6 +95,7 @@ class Doctrine_Expression_Oracle extends Doctrine_Expression_Driver { return 'dbms_random.value'; } + /** * Returns global unique identifier * diff --git a/lib/Doctrine/Expression/Pgsql.php b/lib/Doctrine/Expression/Pgsql.php index 845279bf5..2451906b5 100644 --- a/lib/Doctrine/Expression/Pgsql.php +++ b/lib/Doctrine/Expression/Pgsql.php @@ -143,6 +143,7 @@ class Doctrine_Expression_Pgsql extends Doctrine_Expression_Driver return join(' || ' , $args); } + /** * Returns the SQL string to return the current system date and time. * @@ -173,6 +174,7 @@ class Doctrine_Expression_Pgsql extends Doctrine_Expression_Driver { return 'RANDOM()'; } + /** * build a pattern matching string * diff --git a/lib/Doctrine/Expression/Sqlite.php b/lib/Doctrine/Expression/Sqlite.php index 7bf2d8c84..9983ec9ec 100644 --- a/lib/Doctrine/Expression/Sqlite.php +++ b/lib/Doctrine/Expression/Sqlite.php @@ -42,6 +42,7 @@ class Doctrine_Expression_Sqlite extends Doctrine_Expression_Driver { return md5($data); } + /** * Returns the modules of the data that SQLite's mod() function receives. * @@ -64,6 +65,7 @@ class Doctrine_Expression_Sqlite extends Doctrine_Expression_Driver $args = func_get_args(); return join('', $args); } + /** * locate * returns the position of the first occurrence of substring $substr in string $str that @@ -93,6 +95,7 @@ class Doctrine_Expression_Sqlite extends Doctrine_Expression_Driver { return trim($str); } + /** * returns the regular expression operator * @@ -102,6 +105,7 @@ class Doctrine_Expression_Sqlite extends Doctrine_Expression_Driver { return 'RLIKE'; } + /** * soundex * Returns a string to call a function to compute the @@ -116,6 +120,7 @@ class Doctrine_Expression_Sqlite extends Doctrine_Expression_Driver { return 'SOUNDEX(' . $value . ')'; } + /** * Return string to call a variable with the current timestamp inside an SQL statement * There are three special variables for current date and time. @@ -134,6 +139,7 @@ class Doctrine_Expression_Sqlite extends Doctrine_Expression_Driver return 'datetime(\'now\')'; } } + /** * return string to call a function to get random value inside an SQL statement * @@ -143,6 +149,7 @@ class Doctrine_Expression_Sqlite extends Doctrine_Expression_Driver { return '((RANDOM() + 2147483648) / 4294967296)'; } + /** * return string to call a function to get a substring inside an SQL statement * diff --git a/lib/Doctrine/FileFinder.php b/lib/Doctrine/FileFinder.php index 303e94f9f..a9f5d63ce 100644 --- a/lib/Doctrine/FileFinder.php +++ b/lib/Doctrine/FileFinder.php @@ -287,7 +287,7 @@ class Doctrine_FileFinder { throw new Doctrine_Exception(sprintf('method "%s" does not exist for object "%s".', $args[$i][1], $args[$i][0])); } - else if (!is_array($args[$i]) && !function_exists($args[$i])) + else if ( ! is_array($args[$i]) && !function_exists($args[$i])) { throw new Doctrine_Exception(sprintf('function "%s" does not exist.', $args[$i])); } @@ -346,7 +346,7 @@ class Doctrine_FileFinder $real_dir = realpath($arg_list[$i]); // absolute path? - if (!self::isPathAbsolute($real_dir)) + if ( ! self::isPathAbsolute($real_dir)) { $dir = $here_dir.DIRECTORY_SEPARATOR.$real_dir; } @@ -355,7 +355,7 @@ class Doctrine_FileFinder $dir = $real_dir; } - if (!is_dir($real_dir)) + if ( ! is_dir($real_dir)) { continue; } @@ -407,7 +407,7 @@ class Doctrine_FileFinder $files[] = realpath($current_entry); } - if (!$this->is_pruned($dir, $entryname)) + if ( ! $this->is_pruned($dir, $entryname)) { $files = array_merge($files, $this->search_in($current_entry, $depth + 1)); } @@ -428,7 +428,7 @@ class Doctrine_FileFinder protected function match_names($dir, $entry) { - if (!count($this->names)) return true; + if ( ! count($this->names)) return true; // we must match one "not_name" rules to be ko $one_not_name_rule = false; @@ -450,7 +450,7 @@ class Doctrine_FileFinder foreach ($this->names as $args) { list($not, $regex) = $args; - if (!$not) + if ( ! $not) { $one_name_rule = true; if (preg_match($regex, $entry)) @@ -480,14 +480,14 @@ class Doctrine_FileFinder protected function size_ok($dir, $entry) { - if (!count($this->sizes)) return true; + if ( ! count($this->sizes)) return true; - if (!is_file($dir.DIRECTORY_SEPARATOR.$entry)) return true; + if ( ! is_file($dir.DIRECTORY_SEPARATOR.$entry)) return true; $filesize = filesize($dir.DIRECTORY_SEPARATOR.$entry); foreach ($this->sizes as $number_compare) { - if (!$number_compare->test($filesize)) return false; + if ( ! $number_compare->test($filesize)) return false; } return true; @@ -495,7 +495,7 @@ class Doctrine_FileFinder protected function is_pruned($dir, $entry) { - if (!count($this->prunes)) return false; + if ( ! count($this->prunes)) return false; foreach ($this->prunes as $args) { @@ -508,7 +508,7 @@ class Doctrine_FileFinder protected function is_discarded($dir, $entry) { - if (!count($this->discards)) return false; + if ( ! count($this->discards)) return false; foreach ($this->discards as $args) { @@ -521,11 +521,11 @@ class Doctrine_FileFinder protected function exec_ok($dir, $entry) { - if (!count($this->execs)) return true; + if ( ! count($this->execs)) return true; foreach ($this->execs as $exec) { - if (!call_user_func_array($exec, array($dir, $entry))) return false; + if ( ! call_user_func_array($exec, array($dir, $entry))) return false; } return true; @@ -632,12 +632,12 @@ class Doctrine_GlobToRegex else if ($car == '{') { $regex .= ($escaping ? "\\{" : "("); - if (!$escaping) ++$in_curlies; + if ( ! $escaping) ++$in_curlies; } else if ($car == '}' && $in_curlies) { $regex .= ($escaping ? "}" : ")"); - if (!$escaping) --$in_curlies; + if ( ! $escaping) --$in_curlies; } else if ($car == ',' && $in_curlies) { @@ -705,7 +705,7 @@ class Doctrine_NumberCompare public function test($number) { - if (!preg_match('{^([<>]=?)?(.*?)([kmg]i?)?$}i', $this->test, $matches)) + if ( ! preg_match('{^([<>]=?)?(.*?)([kmg]i?)?$}i', $this->test, $matches)) { throw new Doctrine_Exception(sprintf('don\'t understand "%s" as a test.', $this->test)); } diff --git a/lib/Doctrine/Formatter.php b/lib/Doctrine/Formatter.php index adea6ef7b..311f23098 100644 --- a/lib/Doctrine/Formatter.php +++ b/lib/Doctrine/Formatter.php @@ -59,6 +59,7 @@ class Doctrine_Formatter extends Doctrine_Connection_Module } return $text; } + /** * convertBooleans * some drivers need the boolean values to be converted into integers @@ -84,6 +85,7 @@ class Doctrine_Formatter extends Doctrine_Connection_Module } return $item; } + /** * Quote a string so it can be safely used as a table or column name * @@ -128,6 +130,7 @@ class Doctrine_Formatter extends Doctrine_Connection_Module return $tmp['start'] . $str . $tmp['end']; } + /** * quote * quotes given input parameter @@ -166,6 +169,7 @@ class Doctrine_Formatter extends Doctrine_Connection_Module return $this->conn->getDbh()->quote($input); } } + /** * Removes any formatting in an sequence name using the 'seqname_format' option * @@ -182,6 +186,7 @@ class Doctrine_Formatter extends Doctrine_Connection_Module } return $sqn; } + /** * Removes any formatting in an index name using the 'idxname_format' option * @@ -197,6 +202,7 @@ class Doctrine_Formatter extends Doctrine_Connection_Module } return $idx; } + /** * adds sequence name formatting to a sequence name * @@ -208,6 +214,7 @@ class Doctrine_Formatter extends Doctrine_Connection_Module return sprintf($this->conn->getAttribute(Doctrine::ATTR_SEQNAME_FORMAT), preg_replace('/[^a-z0-9_\$.]/i', '_', $sqn)); } + /** * adds index name formatting to a index name * diff --git a/lib/Doctrine/Hook.php b/lib/Doctrine/Hook.php index 81b84df84..334e4fa30 100644 --- a/lib/Doctrine/Hook.php +++ b/lib/Doctrine/Hook.php @@ -36,10 +36,12 @@ class Doctrine_Hook * @var Doctrine_Query $query the base query */ protected $query; + /** * @var array $joins the optional joins of the base query */ protected $joins; + /** * @var array $hooks hooks array */ @@ -49,6 +51,7 @@ class Doctrine_Hook 'limit', 'offset' ); + /** * @var array $fieldParsers custom field parsers array * keys as field names in the format componentAlias.FieldName @@ -86,6 +89,7 @@ class Doctrine_Hook $this->query->getQuery(); } + /** * getQuery * @@ -95,6 +99,7 @@ class Doctrine_Hook { return $this->query; } + /** * setTypeParser * @@ -105,6 +110,7 @@ class Doctrine_Hook { $this->typeParsers[$type] = $parser; } + /** * setFieldParser * @@ -115,6 +121,7 @@ class Doctrine_Hook { $this->fieldParsers[$field] = $parser; } + /** * hookWhere * builds DQL query where part from given parameter array @@ -161,6 +168,7 @@ class Doctrine_Hook return true; } + /** * hookOrderBy * builds DQL query orderby part from given parameter array @@ -198,6 +206,7 @@ class Doctrine_Hook } return true; } + /** * @param integer $limit */ @@ -205,6 +214,7 @@ class Doctrine_Hook { $this->query->limit((int) $limit); } + /** * @param integer $offset */ diff --git a/lib/Doctrine/Hook/Parser.php b/lib/Doctrine/Hook/Parser.php index 13adc6d61..7a7f16036 100644 --- a/lib/Doctrine/Hook/Parser.php +++ b/lib/Doctrine/Hook/Parser.php @@ -39,6 +39,7 @@ abstract class Doctrine_Hook_Parser { return $this->condition; } + /** * getParams * returns the parameters associated with this parser @@ -49,6 +50,7 @@ abstract class Doctrine_Hook_Parser { return $this->params; } + /** * parse * Parses given field and field value to DQL condition diff --git a/lib/Doctrine/Hook/Parser/Complex.php b/lib/Doctrine/Hook/Parser/Complex.php index 36dda756b..259208865 100644 --- a/lib/Doctrine/Hook/Parser/Complex.php +++ b/lib/Doctrine/Hook/Parser/Complex.php @@ -48,6 +48,7 @@ abstract class Doctrine_Hook_Parser_Complex extends Doctrine_Hook_Parser { $this->condition = $this->parseClause($alias, $field, $value); } + /** * parseClause * @@ -83,6 +84,7 @@ abstract class Doctrine_Hook_Parser_Complex extends Doctrine_Hook_Parser } return '(' . $r . ')'; } + /** * parseSingle * diff --git a/lib/Doctrine/Hydrate.php b/lib/Doctrine/Hydrate.php index cdcf42816..f51ffe961 100644 --- a/lib/Doctrine/Hydrate.php +++ b/lib/Doctrine/Hydrate.php @@ -42,18 +42,22 @@ class Doctrine_Hydrate extends Doctrine_Locator_Injectable implements Serializab * constant for SELECT queries */ const SELECT = 0; + /** * constant for DELETE queries */ const DELETE = 1; + /** * constant for UPDATE queries */ const UPDATE = 2; + /** * constant for INSERT queries */ const INSERT = 3; + /** * constant for CREATE queries */ @@ -65,15 +69,18 @@ class Doctrine_Hydrate extends Doctrine_Locator_Injectable implements Serializab protected $_params = array('where' => array(), 'set' => array(), 'having' => array()); + /** * @var Doctrine_Connection $conn Doctrine_Connection object */ protected $_conn; + /** * @var Doctrine_View $_view Doctrine_View object, when set this object will use the * the query given by the view object for object population */ protected $_view; + /** * @var array $_aliasMap two dimensional array containing the map for query aliases * Main keys are component aliases @@ -90,15 +97,18 @@ class Doctrine_Hydrate extends Doctrine_Locator_Injectable implements Serializab * component is mapped to a collection */ protected $_aliasMap = array(); + /** * */ protected $pendingAggregates = array(); + /** * @var array $aggregateMap an array containing all aggregate aliases, keys as dql aliases * and values as sql aliases */ protected $aggregateMap = array(); + /** * @var array $_options an array of options */ @@ -107,10 +117,12 @@ class Doctrine_Hydrate extends Doctrine_Locator_Injectable implements Serializab 'parserCache' => false, 'resultSetCache' => false, ); + /** * @var string $_sql cached SQL query */ protected $_sql; + /** * @var array $parts SQL query string parts */ @@ -128,20 +140,24 @@ class Doctrine_Hydrate extends Doctrine_Locator_Injectable implements Serializab 'limit' => false, 'offset' => false, ); + /** * @var integer $type the query type * * @see Doctrine_Query::* constants */ protected $type = self::SELECT; + /** * @var array */ protected $_cache; + /** * The current hydration mode. */ protected $_hydrationMode = Doctrine::HYDRATE_RECORD; + /** * @var boolean $_expireCache a boolean value that indicates whether or not to force cache expiration */ @@ -150,12 +166,14 @@ class Doctrine_Hydrate extends Doctrine_Locator_Injectable implements Serializab protected $_timeToLive; protected $_tableAliases = array(); + /** * @var array $_tableAliasSeeds A simple array keys representing table aliases and values * as table alias seeds. The seeds are used for generating short table * aliases. */ protected $_tableAliasSeeds = array(); + /** * constructor * @@ -168,6 +186,7 @@ class Doctrine_Hydrate extends Doctrine_Locator_Injectable implements Serializab } $this->_conn = $connection; } + /** * getRootAlias * returns the alias of the the root component @@ -184,6 +203,7 @@ class Doctrine_Hydrate extends Doctrine_Locator_Injectable implements Serializab return key($this->_aliasMap); } + /** * getRootDeclaration * returns the root declaration @@ -196,6 +216,7 @@ class Doctrine_Hydrate extends Doctrine_Locator_Injectable implements Serializab return $map; } + /** * getRoot * returns the root component for this object @@ -212,6 +233,7 @@ class Doctrine_Hydrate extends Doctrine_Locator_Injectable implements Serializab return $map['table']; } + /** * getSql * return the sql associated with this object @@ -222,6 +244,7 @@ class Doctrine_Hydrate extends Doctrine_Locator_Injectable implements Serializab { return $this->getQuery(); } + /** * useCache * @@ -244,6 +267,7 @@ class Doctrine_Hydrate extends Doctrine_Locator_Injectable implements Serializab return $this->setCacheLifeSpan($timeToLive); } + /** * expireCache * @@ -256,6 +280,7 @@ class Doctrine_Hydrate extends Doctrine_Locator_Injectable implements Serializab return $this; } + /** * setCacheLifeSpan * @@ -271,6 +296,7 @@ class Doctrine_Hydrate extends Doctrine_Locator_Injectable implements Serializab return $this; } + /** * getCacheDriver * returns the cache driver associated with this object @@ -285,6 +311,7 @@ class Doctrine_Hydrate extends Doctrine_Locator_Injectable implements Serializab return $this->_conn->getCacheDriver(); } } + /** * Sets the fetchmode. * @@ -295,6 +322,7 @@ class Doctrine_Hydrate extends Doctrine_Locator_Injectable implements Serializab $this->_hydrationMode = $hydrationMode; return $this; } + /** * serialize * this method is automatically called when this Doctrine_Hydrate is serialized @@ -306,6 +334,7 @@ class Doctrine_Hydrate extends Doctrine_Locator_Injectable implements Serializab $vars = get_object_vars($this); } + /** * unseralize * this method is automatically called everytime a Doctrine_Hydrate object is unserialized @@ -317,6 +346,7 @@ class Doctrine_Hydrate extends Doctrine_Locator_Injectable implements Serializab { } + /** * generateNewTableAlias * generates a new alias from given table alias @@ -342,6 +372,7 @@ class Doctrine_Hydrate extends Doctrine_Locator_Injectable implements Serializab return $tableAlias; } + /** * hasTableAlias * whether or not this object has given tableAlias @@ -353,6 +384,7 @@ class Doctrine_Hydrate extends Doctrine_Locator_Injectable implements Serializab { return (isset($this->_tableAliases[$tableAlias])); } + /** * getComponentAlias * get component alias associated with given table alias @@ -367,6 +399,7 @@ class Doctrine_Hydrate extends Doctrine_Locator_Injectable implements Serializab } return $this->_tableAliases[$tableAlias]; } + /** * getTableAliasSeed * returns the alias seed for given table alias @@ -381,6 +414,7 @@ class Doctrine_Hydrate extends Doctrine_Locator_Injectable implements Serializab } return $this->_tableAliasSeeds[$tableAlias]; } + /** * generateTableAlias * generates a table alias from given table name and associates @@ -411,6 +445,7 @@ class Doctrine_Hydrate extends Doctrine_Locator_Injectable implements Serializab return $alias; } + /** * getTableAliases * returns all table aliases @@ -421,6 +456,7 @@ class Doctrine_Hydrate extends Doctrine_Locator_Injectable implements Serializab { return $this->_tableAliases; } + /** * addTableAlias * adds an alias for table and associates it with given component alias @@ -435,6 +471,7 @@ class Doctrine_Hydrate extends Doctrine_Locator_Injectable implements Serializab return $this; } + /** * getTableAlias * some database such as Oracle need the identifier lengths to be < ~30 chars @@ -461,6 +498,7 @@ class Doctrine_Hydrate extends Doctrine_Locator_Injectable implements Serializab return $this->generateTableAlias($componentAlias, $tableName); } + /** * addQueryPart * adds a query part in the query part array @@ -482,6 +520,7 @@ class Doctrine_Hydrate extends Doctrine_Locator_Injectable implements Serializab } return $this; } + /** * setQueryPart * sets a query part in the query part array @@ -499,6 +538,7 @@ class Doctrine_Hydrate extends Doctrine_Locator_Injectable implements Serializab return $this->parts[$part]; } + /** * removeQueryPart * removes a query part from the query part array @@ -520,6 +560,7 @@ class Doctrine_Hydrate extends Doctrine_Locator_Injectable implements Serializab } return $this; } + /** * setQueryPart * sets a query part in the query part array @@ -547,6 +588,7 @@ class Doctrine_Hydrate extends Doctrine_Locator_Injectable implements Serializab return $this; } + /** * hasAliasDeclaration * whether or not this object has a declaration for given component alias @@ -558,6 +600,7 @@ class Doctrine_Hydrate extends Doctrine_Locator_Injectable implements Serializab { return isset($this->_aliasMap[$componentAlias]); } + /** * getAliasDeclaration * get the declaration for given component alias @@ -573,6 +616,7 @@ class Doctrine_Hydrate extends Doctrine_Locator_Injectable implements Serializab return $this->_aliasMap[$componentAlias]; } + /** * copyAliases * copy aliases from another Hydrate object @@ -591,6 +635,7 @@ class Doctrine_Hydrate extends Doctrine_Locator_Injectable implements Serializab $this->_tableAliasSeeds = $query->_tableAliasSeeds; return $this; } + /** * createSubquery * creates a subquery @@ -610,6 +655,7 @@ class Doctrine_Hydrate extends Doctrine_Locator_Injectable implements Serializab return $obj; } + /** * limitSubqueryUsed * whether or not limit subquery was used @@ -620,6 +666,7 @@ class Doctrine_Hydrate extends Doctrine_Locator_Injectable implements Serializab { return false; } + /** * clear * resets all the variables @@ -644,6 +691,7 @@ class Doctrine_Hydrate extends Doctrine_Locator_Injectable implements Serializab ); $this->inheritanceApplied = false; } + /** * getConnection * @@ -653,6 +701,7 @@ class Doctrine_Hydrate extends Doctrine_Locator_Injectable implements Serializab { return $this->_conn; } + /** * setView * sets a database view this query object uses @@ -665,6 +714,7 @@ class Doctrine_Hydrate extends Doctrine_Locator_Injectable implements Serializab { $this->_view = $view; } + /** * getView * returns the view associated with this query object (if any) @@ -675,6 +725,7 @@ class Doctrine_Hydrate extends Doctrine_Locator_Injectable implements Serializab { return $this->_view; } + /** * getParams * @@ -684,6 +735,7 @@ class Doctrine_Hydrate extends Doctrine_Locator_Injectable implements Serializab { return array_merge($this->_params['set'], $this->_params['where'], $this->_params['having']); } + /** * setParams * @@ -696,6 +748,7 @@ class Doctrine_Hydrate extends Doctrine_Locator_Injectable implements Serializab { return $params; } + /** * setAliasMap * sets the whole component alias map @@ -709,6 +762,7 @@ class Doctrine_Hydrate extends Doctrine_Locator_Injectable implements Serializab return $this; } + /** * getAliasMap * returns the component alias map @@ -719,6 +773,7 @@ class Doctrine_Hydrate extends Doctrine_Locator_Injectable implements Serializab { return $this->_aliasMap; } + /** * getCachedForm * returns the cached form of this query for given resultSet @@ -768,6 +823,7 @@ class Doctrine_Hydrate extends Doctrine_Locator_Injectable implements Serializab $stmt = $this->_conn->execute($query, $params); return $stmt; } + /** * execute * executes the query and populates the data set @@ -850,6 +906,7 @@ class Doctrine_Hydrate extends Doctrine_Locator_Injectable implements Serializab { return $this->type; } + /** * applyInheritance * applies column aggregation inheritance to DQL / SQL query @@ -909,6 +966,7 @@ class Doctrine_Hydrate extends Doctrine_Locator_Injectable implements Serializab return $str; } + /** * fetchArray * Convenience method to execute using array fetching as hydration mode. @@ -919,6 +977,7 @@ class Doctrine_Hydrate extends Doctrine_Locator_Injectable implements Serializab public function fetchArray($params = array()) { return $this->execute($params, Doctrine::HYDRATE_ARRAY); } + /** * fetchOne * Convenience method to execute the query and return the first item @@ -949,6 +1008,7 @@ class Doctrine_Hydrate extends Doctrine_Locator_Injectable implements Serializab return false; } + /** * parseData * parses the data returned by statement object @@ -1138,6 +1198,7 @@ class Doctrine_Hydrate extends Doctrine_Locator_Injectable implements Serializab $stmt->closeCursor(); return $array; } + /** * _setLastElement * @@ -1175,6 +1236,7 @@ class Doctrine_Hydrate extends Doctrine_Locator_Injectable implements Serializab } } } + /** * @return string returns a string representation of this object */ diff --git a/lib/Doctrine/Hydrate/Record.php b/lib/Doctrine/Hydrate/Record.php index e1819b2c5..52fa8ba4e 100644 --- a/lib/Doctrine/Hydrate/Record.php +++ b/lib/Doctrine/Hydrate/Record.php @@ -63,6 +63,7 @@ class Doctrine_Hydrate_Record extends Doctrine_Locator_Injectable { $this->_collections[] = $coll; } + /** * isIdentifiable * returns whether or not a given data row is identifiable (it contains diff --git a/lib/Doctrine/I18n.php b/lib/Doctrine/I18n.php index 1cdd6dc1a..7bafe7f11 100644 --- a/lib/Doctrine/I18n.php +++ b/lib/Doctrine/I18n.php @@ -18,6 +18,7 @@ * and is licensed under the LGPL. For more information, see * <http://www.phpdoctrine.com>. */ + /** * Doctrine_I18n * diff --git a/lib/Doctrine/Import.php b/lib/Doctrine/Import.php index 73e49adee..993c43239 100644 --- a/lib/Doctrine/Import.php +++ b/lib/Doctrine/Import.php @@ -203,7 +203,7 @@ class Doctrine_Import extends Doctrine_Connection_Module foreach ($connections as $name => $connection) { // Limit the databases to the ones specified by $databases. // Check only happens if array is not empty - if (!empty($databases) && !in_array($name, $databases)) { + if ( ! empty($databases) && !in_array($name, $databases)) { continue; } diff --git a/lib/Doctrine/Import/Builder.php b/lib/Doctrine/Import/Builder.php index 1221cfd41..3b32d47ae 100644 --- a/lib/Doctrine/Import/Builder.php +++ b/lib/Doctrine/Import/Builder.php @@ -21,7 +21,8 @@ /** * Doctrine_Import_Builder - * Import builder is responsible of building Doctrine ActiveRecord classes + * + * Import builder is responsible of building Doctrine_Record classes * based on a database schema. * * @package Doctrine @@ -33,6 +34,7 @@ * @author Konsta Vesterinen <kvesteri@cc.hut.fi> * @author Jukka Hassinen <Jukka.Hassinen@BrainAlliance.com> * @author Nicolas Bérard-Nault <nicobn@php.net> + * @author Jonathan H. Wage <jwage@mac.com> */ class Doctrine_Import_Builder { @@ -53,7 +55,7 @@ class Doctrine_Import_Builder * @var string $suffix */ private $suffix = '.class.php'; - + /** * generateBaseClasses * @@ -62,7 +64,7 @@ class Doctrine_Import_Builder * @var string $suffix */ private $generateBaseClasses = false; - + /** * baseClassesDirectory * @@ -71,7 +73,7 @@ class Doctrine_Import_Builder * @var string $suffix */ private $baseClassesDirectory = 'generated'; - + /** * tpl * @@ -80,7 +82,7 @@ class Doctrine_Import_Builder * @var $tpl */ private static $tpl; - + /** * __construct * @@ -105,7 +107,7 @@ class Doctrine_Import_Builder $this->path = $path; } - + /** * generateBaseClasses * @@ -123,7 +125,7 @@ class Doctrine_Import_Builder return $this->generateBaseClasses; } - + /** * getTargetPath * @@ -267,11 +269,17 @@ END; $ret[$i] = $this->buildActAs($actAs); - if (!empty($ret)) { + if ( ! empty($ret)) { return "\n\tpublic function setTableDefinition()"."\n\t{\n".implode("\n", $ret)."\n\t}"; } } - + + /** + * buildTemplates + * + * @param string $array + * @return void + */ public function buildTemplates(array $templates) { $build = ''; @@ -292,7 +300,13 @@ END; return $build; } - + + /** + * buildActAs + * + * @param string $array + * @return void + */ public function buildActAs(array $actAs) { $build = ''; @@ -312,7 +326,13 @@ END; return $build; } - + + /** + * arrayToPhp + * + * @param string $array + * @return void + */ protected function arrayToPhp(array $array) { ob_start(); @@ -322,12 +342,18 @@ END; return $php; } - + + /** + * buildAttributes + * + * @param string $array + * @return void + */ public function buildAttributes(array $attributes) { $build = "\n"; foreach ($attributes as $key => $value) { - if (!is_array($value)) { + if ( ! is_array($value)) { $value = array($value); } @@ -344,7 +370,13 @@ END; return $build; } - + + /** + * buildIndexes + * + * @param string $array + * @return void + */ public function buildIndexes(array $indexes) { $build = ''; @@ -394,7 +426,7 @@ END; } // add extra ) if type definition is not declared - if (!isset($definitions['type'])) { + if ( ! isset($definitions['type'])) { $build .= ')'; } } @@ -404,13 +436,21 @@ END; return $build; } - + + /** + * buildSetUp + * + * @param array $options + * @param array $columns + * @param array $relations + * @return string + */ public function buildSetUp(array $options, array $columns, array $relations) { $ret = array(); $i = 0; - if (! (isset($options['override_parent']) && $options['override_parent'] === true)) { + if ( ! (isset($options['override_parent']) && $options['override_parent'] === true)) { $ret[$i] = "\t\tparent::setUp();"; $i++; } @@ -475,11 +515,23 @@ END; $ret[$i] = "\t\t".'$this->setInheritanceMap(array(\''.$options['inheritance']['keyField'].'\' => '.$options['inheritance']['keyValue'].'));'; } - if (!empty($ret)) { + if ( ! empty($ret)) { return "\n\tpublic function setUp()\n\t{\n".implode("\n", $ret)."\n\t}"; } } - + + /** + * buildDefinition + * + * @param array $options + * @param array $columns + * @param array $relations + * @param array $indexes + * @param array $attributes + * @param array $templates + * @param array $actAs + * @return string + */ public function buildDefinition(array $options, array $columns, array $relations = array(), array $indexes = array(), $attributes = array(), array $templates = array(), array $actAs = array()) { if ( ! isset($options['className'])) { @@ -490,7 +542,7 @@ END; $className = $options['className']; $extends = isset($options['inheritance']['extends']) ? $options['inheritance']['extends']:'Doctrine_Record'; - if (!(isset($options['no_definition']) && $options['no_definition'] === true)) { + if ( ! (isset($options['no_definition']) && $options['no_definition'] === true)) { $definition = $this->buildTableDefinition($options, $columns, $relations, $indexes, $attributes, $templates, $actAs); $setUp = $this->buildSetUp($options, $columns, $relations); } else { @@ -510,6 +562,18 @@ END; return $content; } + /** + * buildRecord + * + * @param array $options + * @param array $columns + * @param array $relations + * @param array $indexes + * @param array $attributes + * @param array $templates + * @param array $actAs + * @return void= + */ public function buildRecord(array $options, array $columns, array $relations = array(), array $indexes = array(), array $attributes = array(), array $templates = array(), array $actAs = array()) { if ( !isset($options['className'])) { @@ -532,7 +596,7 @@ END; if ($this->generateBaseClasses()) { // We only want to generate this one if it doesn't already exist - if (!file_exists($options['fileName'])) { + if ( ! file_exists($options['fileName'])) { $optionsBak = $options; unset($options['tableName']); @@ -547,7 +611,7 @@ END; $generatedPath = $this->path . DIRECTORY_SEPARATOR . $this->baseClassesDirectory; - if (!file_exists($generatedPath)) { + if ( ! file_exists($generatedPath)) { mkdir($generatedPath); } @@ -561,14 +625,26 @@ END; $this->writeDefinition($options, $columns, $relations, $indexes, $attributes, $templates, $actAs); } } - + + /** + * writeDefinition + * + * @param array $options + * @param array $columns + * @param array $relations + * @param array $indexes + * @param array $attributes + * @param array $templates + * @param array $actAs + * @return void + */ public function writeDefinition(array $options, array $columns = array(), array $relations = array(), array $indexes = array(), array $attributes = array(), array $templates = array(), array $actAs = array()) { $content = $this->buildDefinition($options, $columns, $relations, $indexes, $attributes, $templates, $actAs); $code = "<?php\n"; if (isset($options['requires'])) { - if (!is_array($options['requires'])) { + if ( ! is_array($options['requires'])) { $options['requires'] = array($options['requires']); } diff --git a/lib/Doctrine/Import/Builder/BaseClass.php b/lib/Doctrine/Import/Builder/BaseClass.php index a306ef096..3ac5bc539 100644 --- a/lib/Doctrine/Import/Builder/BaseClass.php +++ b/lib/Doctrine/Import/Builder/BaseClass.php @@ -26,6 +26,7 @@ Doctrine::autoload('Doctrine_Import_Builder'); * @author Jukka Hassinen <Jukka.Hassinen@BrainAlliance.com> * @version $Id$ */ + /** * class Doctrine_Import_Builder_BaseClass * Builds a Doctrine_Record base class definition based on a schema. diff --git a/lib/Doctrine/Import/Builder/Exception.php b/lib/Doctrine/Import/Builder/Exception.php index 2c1592663..7c0ff34b0 100644 --- a/lib/Doctrine/Import/Builder/Exception.php +++ b/lib/Doctrine/Import/Builder/Exception.php @@ -27,6 +27,7 @@ Doctrine::autoload('Doctrine_Import_Exception'); * @author Jukka Hassinen <Jukka.Hassinen@BrainAlliance.com> * @version $Id$ */ + /** * class Doctrine_Import_Builder_Exception * @package Doctrine diff --git a/lib/Doctrine/Import/Firebird.php b/lib/Doctrine/Import/Firebird.php index a3514cf3f..57097a219 100644 --- a/lib/Doctrine/Import/Firebird.php +++ b/lib/Doctrine/Import/Firebird.php @@ -43,6 +43,7 @@ class Doctrine_Import_Firebird extends Doctrine_Import return $this->conn->fetchColumn($query); } + /** * list all fields in a tables in the current database * @@ -57,6 +58,7 @@ class Doctrine_Import_Firebird extends Doctrine_Import return $this->conn->fetchColumn($query); } + /** * list all users * @@ -66,6 +68,7 @@ class Doctrine_Import_Firebird extends Doctrine_Import { return $this->conn->fetchColumn('SELECT DISTINCT RDB$USER FROM RDB$USER_PRIVILEGES'); } + /** * list the views in the database * @@ -75,6 +78,7 @@ class Doctrine_Import_Firebird extends Doctrine_Import { return $this->conn->fetchColumn('SELECT DISTINCT RDB$VIEW_NAME FROM RDB$VIEW_RELATIONS'); } + /** * list the views in the database that reference a given table * @@ -89,6 +93,7 @@ class Doctrine_Import_Firebird extends Doctrine_Import return $this->conn->fetchColumn($query); } + /** * list all functions in the current database * @@ -100,6 +105,7 @@ class Doctrine_Import_Firebird extends Doctrine_Import return $this->conn->fetchColumn($query); } + /** * This function will be called to get all triggers of the * current database ($this->conn->getDatabase()) diff --git a/lib/Doctrine/Import/Mssql.php b/lib/Doctrine/Import/Mssql.php index 618416f3c..b88a477f4 100644 --- a/lib/Doctrine/Import/Mssql.php +++ b/lib/Doctrine/Import/Mssql.php @@ -46,6 +46,7 @@ class Doctrine_Import_Mssql extends Doctrine_Import return array_map(array($this->conn->formatter, 'fixSequenceName'), $tableNames); } + /** * lists table constraints * @@ -91,6 +92,7 @@ class Doctrine_Import_Mssql extends Doctrine_Import return $columns; } + /** * lists table constraints * @@ -101,6 +103,7 @@ class Doctrine_Import_Mssql extends Doctrine_Import { } + /** * lists tables * @@ -113,6 +116,7 @@ class Doctrine_Import_Mssql extends Doctrine_Import return $this->conn->fetchColumn($sql); } + /** * lists all triggers * @@ -126,6 +130,7 @@ class Doctrine_Import_Mssql extends Doctrine_Import return $result; } + /** * lists table triggers * @@ -141,6 +146,7 @@ class Doctrine_Import_Mssql extends Doctrine_Import return $result; } + /** * lists table views * @@ -177,6 +183,7 @@ class Doctrine_Import_Mssql extends Doctrine_Import return $result; } + /** * lists database views * diff --git a/lib/Doctrine/Import/Mysql.php b/lib/Doctrine/Import/Mysql.php index a7b99a7e0..947278076 100644 --- a/lib/Doctrine/Import/Mysql.php +++ b/lib/Doctrine/Import/Mysql.php @@ -39,6 +39,7 @@ class Doctrine_Import_Mysql extends Doctrine_Import 'listUsers' => 'SELECT DISTINCT USER FROM USER', 'listViews' => "SHOW FULL TABLES %sWHERE Table_type = 'VIEW'", ); + /** * lists all database sequences * @@ -55,6 +56,7 @@ class Doctrine_Import_Mysql extends Doctrine_Import return array_map(array($this->conn, 'fixSequenceName'), $tableNames); } + /** * lists table constraints * @@ -94,6 +96,7 @@ class Doctrine_Import_Mysql extends Doctrine_Import } return $result; } + /** * lists table foreign keys * @@ -104,6 +107,7 @@ class Doctrine_Import_Mysql extends Doctrine_Import { $sql = 'SHOW CREATE TABLE ' . $this->conn->quoteIdentifier($table, true); } + /** * lists table constraints * @@ -144,6 +148,7 @@ class Doctrine_Import_Mysql extends Doctrine_Import return $columns; } + /** * lists table constraints * @@ -177,6 +182,7 @@ class Doctrine_Import_Mysql extends Doctrine_Import } return $result; } + /** * lists tables * @@ -187,6 +193,7 @@ class Doctrine_Import_Mysql extends Doctrine_Import { return $this->conn->fetchColumn($this->sql['listTables']); } + /** * lists database views * diff --git a/lib/Doctrine/Import/Oracle.php b/lib/Doctrine/Import/Oracle.php index 23ad73506..3e4f80043 100644 --- a/lib/Doctrine/Import/Oracle.php +++ b/lib/Doctrine/Import/Oracle.php @@ -55,6 +55,7 @@ class Doctrine_Import_Oracle extends Doctrine_Import return $result; } + /** * lists all availible database functions * @@ -66,6 +67,7 @@ class Doctrine_Import_Oracle extends Doctrine_Import return $this->conn->fetchColumn($query); } + /** * lists all database triggers * @@ -76,6 +78,7 @@ class Doctrine_Import_Oracle extends Doctrine_Import { } + /** * lists all database sequences * @@ -90,6 +93,7 @@ class Doctrine_Import_Oracle extends Doctrine_Import return array_map(array($this->conn->formatter, 'fixSequenceName'), $tableNames); } + /** * lists table constraints * @@ -107,6 +111,7 @@ class Doctrine_Import_Oracle extends Doctrine_Import return array_map(array($this->conn->formatter, 'fixIndexName'), $constraints); } + /** * lists table constraints * @@ -142,6 +147,7 @@ class Doctrine_Import_Oracle extends Doctrine_Import } return $result; } + /** * lists table constraints * @@ -159,6 +165,7 @@ class Doctrine_Import_Oracle extends Doctrine_Import return array_map(array($this->conn->formatter, 'fixIndexName'), $indexes); } + /** * lists tables * @@ -170,6 +177,7 @@ class Doctrine_Import_Oracle extends Doctrine_Import $query = 'SELECT table_name FROM sys.user_tables'; return $this->conn->fetchColumn($query); } + /** * lists table triggers * @@ -180,6 +188,7 @@ class Doctrine_Import_Oracle extends Doctrine_Import { } + /** * lists table views * @@ -190,6 +199,7 @@ class Doctrine_Import_Oracle extends Doctrine_Import { } + /** * lists database users * @@ -211,6 +221,7 @@ class Doctrine_Import_Oracle extends Doctrine_Import return $this->conn->fetchColumn($query); } + /** * lists database views * diff --git a/lib/Doctrine/Import/Pgsql.php b/lib/Doctrine/Import/Pgsql.php index 561de2912..ef25b1e38 100644 --- a/lib/Doctrine/Import/Pgsql.php +++ b/lib/Doctrine/Import/Pgsql.php @@ -117,6 +117,7 @@ class Doctrine_Import_Pgsql extends Doctrine_Import AND a.atttypid = t.oid ORDER BY a.attnum", ); + /** * lists all database triggers * @@ -127,6 +128,7 @@ class Doctrine_Import_Pgsql extends Doctrine_Import { } + /** * lists table constraints * @@ -140,6 +142,7 @@ class Doctrine_Import_Pgsql extends Doctrine_Import return $this->conn->fetchColumn($query); } + /** * lists table constraints * @@ -180,6 +183,7 @@ class Doctrine_Import_Pgsql extends Doctrine_Import } return $columns; } + /** * list all indexes in a table * @@ -193,6 +197,7 @@ class Doctrine_Import_Pgsql extends Doctrine_Import return $this->conn->fetchColumn($query); } + /** * lists tables * @@ -203,6 +208,7 @@ class Doctrine_Import_Pgsql extends Doctrine_Import { return $this->conn->fetchColumn($this->sql['listTables']); } + /** * lists table triggers * @@ -221,6 +227,7 @@ class Doctrine_Import_Pgsql extends Doctrine_Import } return $this->conn->fetchColumn($query); } + /** * list the views in the database that reference a given table * diff --git a/lib/Doctrine/Import/Reader.php b/lib/Doctrine/Import/Reader.php index 2a1125975..993b7fac8 100644 --- a/lib/Doctrine/Import/Reader.php +++ b/lib/Doctrine/Import/Reader.php @@ -18,6 +18,7 @@ * and is licensed under the LGPL. For more information, see * <http://www.phpdoctrine.com>. */ + /** * class Doctrine_Import_Reader * Is responsible of reading a database definitions from a source and costructing a diff --git a/lib/Doctrine/Import/Reader/Exception.php b/lib/Doctrine/Import/Reader/Exception.php index 7f0392dff..65904cc8f 100644 --- a/lib/Doctrine/Import/Reader/Exception.php +++ b/lib/Doctrine/Import/Reader/Exception.php @@ -18,6 +18,7 @@ * and is licensed under the LGPL. For more information, see * <http://www.phpdoctrine.com>. */ + /** * class Doctrine_Import_Reader_Exception * diff --git a/lib/Doctrine/Import/Schema.php b/lib/Doctrine/Import/Schema.php index 95b8f0615..817762362 100644 --- a/lib/Doctrine/Import/Schema.php +++ b/lib/Doctrine/Import/Schema.php @@ -40,14 +40,17 @@ class Doctrine_Import_Schema { public $relations = array(); - public $indexes = array(); public $generateBaseClasses = false; - + /** * generateBaseClasses * - * @param string $bool - * @return void + * Specify whether or not to generate base classes with the model definition in it. The base is generated everytime + * But another child class that extends the base is only generated once. Allowing you to customize your models + * Without losing the changes when you regenerate + * + * @param string $bool + * @return bool $generateBaseClasses */ public function generateBaseClasses($bool = null) { @@ -57,13 +60,15 @@ class Doctrine_Import_Schema return $this->generateBaseClasses; } - + /** * buildSchema * - * @param string $schema - * @param string $format - * @return void + * Loop throug directories of schema files and part them all in to one complete array of schema information + * + * @param string $schema Array of schema files or single schema file. Array of directories with schema files or single directory + * @param string $format Format of the files we are parsing and building from + * @return array $array */ public function buildSchema($schema, $format) { @@ -87,9 +92,9 @@ class Doctrine_Import_Schema $this->buildRelationships($array); - return array('schema' => $array, 'relations' => $this->relations, 'indexes' => $this->indexes); + return array('schema' => $array, 'relations' => $this->relations); } - + /** * importSchema * @@ -99,7 +104,7 @@ class Doctrine_Import_Schema * @param string $directory The directory where the Doctrine_Record class will be written * @param array $models Optional array of models to import * - * @access public + * @return void */ public function importSchema($schema, $format = 'yml', $directory = null, $models = array()) { @@ -112,7 +117,7 @@ class Doctrine_Import_Schema $array = $schema['schema']; foreach ($array as $name => $properties) { - if (!empty($models) && !in_array($properties['className'], $models)) { + if ( ! empty($models) && !in_array($properties['className'], $models)) { continue; } @@ -127,13 +132,15 @@ class Doctrine_Import_Schema $builder->buildRecord($options, $columns, $relations, $indexes, $attributes, $templates, $actAs); } } - + /** * getOptions * - * @param string $properties - * @param string $directory - * @return void + * FIXME: Directory argument needs to be removed + * + * @param string $properties Array of table properties + * @param string $directory Directory we are writing the class to + * @return array $options Array of options from a parse schemas properties */ public function getOptions($properties, $directory) { @@ -150,81 +157,93 @@ class Doctrine_Import_Schema return $options; } - + /** * getColumns * - * @param string $properties - * @return void + * Get array of columns from table properties + * + * @param string $properties Array of table properties + * @return array $columns Array of columns */ public function getColumns($properties) { return isset($properties['columns']) ? $properties['columns']:array(); } - + /** * getRelations + * + * Get array of relations from table properties * - * @param string $properties - * @return void + * @param string $properties Array of tables properties + * @return array $relations Array of relations */ public function getRelations($properties) { return isset($this->relations[$properties['className']]) ? $this->relations[$properties['className']]:array(); } - + /** * getIndexes * - * @param string $properties - * @return void + * Get array of indexes from table properties + * + * @param string $properties Array of table properties + * @return array $index */ public function getIndexes($properties) { return isset($properties['indexes']) ? $properties['indexes']:array();; } - + /** * getAttributes * - * @param string $properties - * @return void + * Get array of attributes from table properties + * + * @param string $properties Array of tables properties + * @return array $attributes */ public function getAttributes($properties) { return isset($properties['attributes']) ? $properties['attributes']:array(); } - + /** * getTemplates * - * @param string $properties - * @return void + * Get array of templates from table properties + * + * @param string $properties Array of table properties + * @return array $templates Array of table templates */ public function getTemplates($properties) { return isset($properties['templates']) ? $properties['templates']:array(); } - + /** * getActAs * - * @param string $properties - * @return void + * Get array of actAs definitions from table properties + * + * @param string $properties Array of table properties + * @return array $actAs Array of actAs definitions from table properties */ public function getActAs($properties) { return isset($properties['actAs']) ? $properties['actAs']:array(); } - + /** * parseSchema * - * A method to parse a Yml Schema and translate it into a property array. + * A method to parse a Schema and translate it into a property array. * The function returns that property array. * - * @param string $schema Path to the file containing the XML schema - * @return array + * @param string $schema Path to the file containing the schema + * @return array $build Built array of schema information */ public function parseSchema($schema, $type) { @@ -241,7 +260,7 @@ class Doctrine_Import_Schema $columns = isset($table['columns']) ? $table['columns']:array(); $columns = isset($table['fields']) ? $table['fields']:$columns; - if (!empty($columns)) { + if ( ! empty($columns)) { foreach ($columns as $columnName => $field) { $colDesc = array(); $colDesc['name'] = isset($field['name']) ? (string) $field['name']:$columnName; @@ -280,17 +299,20 @@ class Doctrine_Import_Schema return $build; } - + /** * buildRelationships * - * @param string $array + * Loop through an array of schema information and build all the necessary relationship information + * Will attempt to auto complete relationships and simplify the amount of information required for defining a relationship + * + * @param string $array * @return void */ - public function buildRelationships(&$array) + protected function buildRelationships(&$array) { foreach ($array as $name => $properties) { - if (!isset($properties['relations'])) { + if ( ! isset($properties['relations'])) { continue; } @@ -326,23 +348,23 @@ class Doctrine_Import_Schema $relation['foreignType'] = $relation['foreignType'] === 'one' ? Doctrine_Relation::ONE:Doctrine_Relation::MANY; } - if(isset($relation['refClass']) && !empty($relation['refClass']) && (!isset($array[$relation['refClass']]['relations']) || empty($array[$relation['refClass']]['relations']))) { + if(isset($relation['refClass']) && !empty($relation['refClass']) && ( ! isset($array[$relation['refClass']]['relations']) || empty($array[$relation['refClass']]['relations']))) { - if (!isset($array[$relation['refClass']]['relations'][$className]['local'])) { + if ( ! isset($array[$relation['refClass']]['relations'][$className]['local'])) { $array[$relation['refClass']]['relations'][$className]['local'] = $relation['local']; } - if (!isset($array[$relation['refClass']]['relations'][$className]['foreign'])) { + if ( ! isset($array[$relation['refClass']]['relations'][$className]['foreign'])) { $array[$relation['refClass']]['relations'][$className]['foreign'] = $relation['foreign']; } $array[$relation['refClass']]['relations'][$className]['ignore'] = true; - if (!isset($array[$relation['refClass']]['relations'][$relation['class']]['local'])) { + if ( ! isset($array[$relation['refClass']]['relations'][$relation['class']]['local'])) { $array[$relation['refClass']]['relations'][$relation['class']]['local'] = $relation['local']; } - if (!isset($array[$relation['refClass']]['relations'][$relation['class']]['foreign'])) { + if ( ! isset($array[$relation['refClass']]['relations'][$relation['class']]['foreign'])) { $array[$relation['refClass']]['relations'][$relation['class']]['foreign'] = $relation['foreign']; } @@ -357,17 +379,19 @@ class Doctrine_Import_Schema } } + // Now we fix all the relationships and auto-complete opposite ends of relationships $this->fixRelationships(); } - + /** * fixRelationships * + * Loop through all relationships building the opposite ends of each relationship + * * @return void */ - public function fixRelationships() + protected function fixRelationships() { - // define both sides of the relationship foreach($this->relations as $className => $relations) { foreach ($relations AS $alias => $relation) { if(isset($relation['ignore']) && $relation['ignore'] || isset($relation['refClass']) || isset($this->relations[$relation['class']]['relations'][$className])) { diff --git a/lib/Doctrine/Import/Sqlite.php b/lib/Doctrine/Import/Sqlite.php index e935e9002..a7751a721 100644 --- a/lib/Doctrine/Import/Sqlite.php +++ b/lib/Doctrine/Import/Sqlite.php @@ -40,6 +40,7 @@ class Doctrine_Import_Sqlite extends Doctrine_Import { } + /** * lists all availible database functions * @@ -49,6 +50,7 @@ class Doctrine_Import_Sqlite extends Doctrine_Import { } + /** * lists all database triggers * @@ -59,6 +61,7 @@ class Doctrine_Import_Sqlite extends Doctrine_Import { } + /** * lists all database sequences * @@ -81,6 +84,7 @@ class Doctrine_Import_Sqlite extends Doctrine_Import } return $result; } + /** * lists table constraints * @@ -116,6 +120,7 @@ class Doctrine_Import_Sqlite extends Doctrine_Import } return array_keys($result); } + /** * lists table constraints * @@ -150,6 +155,7 @@ class Doctrine_Import_Sqlite extends Doctrine_Import } return $columns; } + /** * lists table constraints * @@ -175,6 +181,7 @@ class Doctrine_Import_Sqlite extends Doctrine_Import return $this->conn->fetchColumn($sql); } + /** * lists table triggers * @@ -185,6 +192,7 @@ class Doctrine_Import_Sqlite extends Doctrine_Import { } + /** * lists table views * @@ -206,6 +214,7 @@ class Doctrine_Import_Sqlite extends Doctrine_Import } return $result; } + /** * lists database users * @@ -215,6 +224,7 @@ class Doctrine_Import_Sqlite extends Doctrine_Import { } + /** * lists database views * diff --git a/lib/Doctrine/Lib.php b/lib/Doctrine/Lib.php index b159336f0..67f06839c 100644 --- a/lib/Doctrine/Lib.php +++ b/lib/Doctrine/Lib.php @@ -18,6 +18,7 @@ * and is licensed under the LGPL. For more information, see * <http://www.phpdoctrine.com>. */ + /** * Doctrine_Lib has not commonly used static functions, mostly for debugging purposes * @@ -56,6 +57,7 @@ class Doctrine_Lib break; } } + /** * returns a string representation of Doctrine_Record object * @param Doctrine_Record $record @@ -73,6 +75,7 @@ class Doctrine_Lib $r[] = '</pre>'; return implode("\n",$r)."<br />"; } + /** * Return an collection of records as XML. * @@ -82,7 +85,6 @@ class Doctrine_Lib * @param SimpleXMLElement $xml * @return string Xml as string */ - public static function getCollectionAsXml(Doctrine_Collection $collection, SimpleXMLElement $incomming_xml = null) { $collectionName = Doctrine_Lib::plurelize($collection->getTable()->tableName); @@ -188,6 +190,7 @@ class Doctrine_Lib break; } } + /** * returns a string representation of Doctrine_Connection object * @param Doctrine_Connection $connection @@ -205,6 +208,7 @@ class Doctrine_Lib $r[] = "</pre>"; return implode("\n",$r)."<br>"; } + /** * returns a string representation of Doctrine_Table object * @param Doctrine_Table $table @@ -218,6 +222,7 @@ class Doctrine_Lib $r[] = "</pre>"; return implode("\n",$r)."<br>"; } + /** * @return string */ @@ -242,6 +247,7 @@ class Doctrine_Lib return $l; } + /** * returns a string representation of Doctrine_Collection object * @param Doctrine_Collection $collection diff --git a/lib/Doctrine/Locator.php b/lib/Doctrine/Locator.php index cb95e656b..a35903a2c 100644 --- a/lib/Doctrine/Locator.php +++ b/lib/Doctrine/Locator.php @@ -39,14 +39,17 @@ class Doctrine_Locator implements Countable, IteratorAggregate * @var array $_resources an array of bound resources */ protected $_resources = array(); + /** * @var string $_classPrefix the default class prefix */ protected $_classPrefix = 'Doctrine_'; + /** * @var array $_instances a pool of this object's instances */ protected static $_instances = array(); + /** * Constructor. Provide an array of resources to set initial contents. * @@ -65,6 +68,7 @@ class Doctrine_Locator implements Countable, IteratorAggregate } self::$_instances[] = $this; } + /** * instance * @@ -77,6 +81,7 @@ class Doctrine_Locator implements Countable, IteratorAggregate } return current(self::$_instances); } + /** * setClassPrefix * @@ -86,6 +91,7 @@ class Doctrine_Locator implements Countable, IteratorAggregate { $this->_classPrefix = $prefix; } + /** * getClassPrefix * @@ -95,6 +101,7 @@ class Doctrine_Locator implements Countable, IteratorAggregate { return $this->_classPrefix; } + /** * contains * checks if a resource exists under the given name @@ -105,6 +112,7 @@ class Doctrine_Locator implements Countable, IteratorAggregate { return isset($this->_resources[$name]); } + /** * bind * binds a resource to a name @@ -119,6 +127,7 @@ class Doctrine_Locator implements Countable, IteratorAggregate return $this; } + /** * locate * locates a resource by given name and returns it @@ -134,15 +143,15 @@ class Doctrine_Locator implements Countable, IteratorAggregate } else { $className = $name; - if ( ! class_exists($className)) { - - $name = explode('.', $name); - $name = array_map('strtolower', $name); - $name = array_map('ucfirst', $name); - $name = implode('_', $name); + if ( ! class_exists($className)) { + + $name = explode('.', $name); + $name = array_map('strtolower', $name); + $name = array_map('ucfirst', $name); + $name = implode('_', $name); + + $className = $this->_classPrefix . $name; - $className = $this->_classPrefix . $name; - if ( ! class_exists($className)) { throw new Doctrine_Locator_Exception("Couldn't locate resource " . $className); } @@ -159,7 +168,7 @@ class Doctrine_Locator implements Countable, IteratorAggregate throw new Doctrine_Locator_Exception("Couldn't locate resource " . $name); } - + /** * count * returns the number of bound resources associated with @@ -172,7 +181,7 @@ class Doctrine_Locator implements Countable, IteratorAggregate { return count($this->_resources); } - + /** * getIterator * returns an ArrayIterator that iterates through all diff --git a/lib/Doctrine/Locator/Injectable.php b/lib/Doctrine/Locator/Injectable.php index 6990c3060..bfcb56da6 100644 --- a/lib/Doctrine/Locator/Injectable.php +++ b/lib/Doctrine/Locator/Injectable.php @@ -39,14 +39,17 @@ class Doctrine_Locator_Injectable * @var Doctrine_Locator the locator object */ protected $_locator; + /** * @var array an array of bound resources */ protected $_resources = array(); + /** * @var Doctrine_Null $null Doctrine_Null object, used for extremely fast null value checking */ protected static $_null; + /** * setLocator * this method can be used for setting the locator object locally @@ -59,6 +62,7 @@ class Doctrine_Locator_Injectable $this->_locator = $locator; return $this; } + /** * getLocator * returns the locator associated with this object @@ -76,6 +80,7 @@ class Doctrine_Locator_Injectable } return $this->_locator; } + /** * locate * locates a resource by given name and returns it @@ -103,6 +108,7 @@ class Doctrine_Locator_Injectable return $this->getLocator()->locate($name); } } + /** * bind * binds a resource to a name @@ -129,6 +135,7 @@ class Doctrine_Locator_Injectable { self::$_null = $null; } + /** * getNullObject * returns the null object associated with this object diff --git a/lib/Doctrine/Locking/Manager/Pessimistic.php b/lib/Doctrine/Locking/Manager/Pessimistic.php index 3c65a200f..cb60b20bd 100644 --- a/lib/Doctrine/Locking/Manager/Pessimistic.php +++ b/lib/Doctrine/Locking/Manager/Pessimistic.php @@ -18,6 +18,7 @@ * and is licensed under the LGPL. For more information, see * <http://www.phpdoctrine.com>. */ + /** * Offline locking of records comes in handy where you need to make sure that * a time-consuming task on a record or many records, which is spread over several @@ -41,6 +42,7 @@ class Doctrine_Locking_Manager_Pessimistic * @var Doctrine_Connection object */ private $conn; + /** * The database table name for the lock tracking */ diff --git a/lib/Doctrine/Manager.php b/lib/Doctrine/Manager.php index ac14122bc..674b96c1c 100644 --- a/lib/Doctrine/Manager.php +++ b/lib/Doctrine/Manager.php @@ -18,6 +18,7 @@ * and is licensed under the LGPL. For more information, see * <http://www.phpdoctrine.com>. */ + /** * * Doctrine_Manager is the base component of all doctrine based projects. @@ -37,28 +38,34 @@ class Doctrine_Manager extends Doctrine_Configurable implements Countable, Itera * @var array $connections an array containing all the opened connections */ protected $_connections = array(); + /** * @var array $bound an array containing all components that have a bound connection */ protected $_bound = array(); + /** * @var integer $index the incremented index */ protected $_index = 0; + /** * @var integer $currIndex the current connection index */ protected $_currIndex = 0; + /** * @var string $root root directory */ protected $_root; + /** * @var Doctrine_Query_Registry the query registry */ protected $_queryRegistry; protected static $driverMap = array('oci' => 'oracle'); + /** * constructor * @@ -70,6 +77,7 @@ class Doctrine_Manager extends Doctrine_Configurable implements Countable, Itera Doctrine_Locator_Injectable::initNullObject(new Doctrine_Null); } + /** * setDefaultAttributes * sets default attributes @@ -107,6 +115,7 @@ class Doctrine_Manager extends Doctrine_Configurable implements Countable, Itera } return false; } + /** * returns the root directory of Doctrine * @@ -116,6 +125,7 @@ class Doctrine_Manager extends Doctrine_Configurable implements Countable, Itera { return $this->_root; } + /** * getInstance * returns an instance of this class @@ -145,7 +155,7 @@ class Doctrine_Manager extends Doctrine_Configurable implements Countable, Itera } return $this->_queryRegistry; } - + /** * setQueryRegistry * sets the query registry @@ -158,6 +168,7 @@ class Doctrine_Manager extends Doctrine_Configurable implements Countable, Itera return $this; } + /** * fetch * fetches data using the provided queryKey and @@ -177,6 +188,7 @@ class Doctrine_Manager extends Doctrine_Configurable implements Countable, Itera ->get($queryKey) ->execute($params, $hydrationMode); } + /** * fetchOne * fetches data using the provided queryKey and @@ -196,6 +208,7 @@ class Doctrine_Manager extends Doctrine_Configurable implements Countable, Itera ->get($queryKey) ->fetchOne($params, $hydrationMode); } + /** * connection * @@ -218,6 +231,7 @@ class Doctrine_Manager extends Doctrine_Configurable implements Countable, Itera return Doctrine_Manager::getInstance()->openConnection($adapter, $name); } } + /** * openConnection * opens a new connection and saves it to Doctrine_Manager->connections @@ -325,6 +339,7 @@ class Doctrine_Manager extends Doctrine_Configurable implements Countable, Itera return $parts; } + /** * parseDsn * @@ -419,6 +434,7 @@ class Doctrine_Manager extends Doctrine_Configurable implements Countable, Itera return $parts; } + /** * getConnection * @param integer $index @@ -433,6 +449,7 @@ class Doctrine_Manager extends Doctrine_Configurable implements Countable, Itera return $this->_connections[$name]; } + /** * getComponentAlias * retrieves the alias for given component name @@ -450,6 +467,7 @@ class Doctrine_Manager extends Doctrine_Configurable implements Countable, Itera return $componentName; } + /** * sets an alias for given component name * very useful when building a large framework with a possibility @@ -465,6 +483,7 @@ class Doctrine_Manager extends Doctrine_Configurable implements Countable, Itera return $this; } + /** * getConnectionName * @@ -475,6 +494,7 @@ class Doctrine_Manager extends Doctrine_Configurable implements Countable, Itera { return array_search($conn, $this->_connections, true); } + /** * bindComponent * binds given component to given connection @@ -489,6 +509,7 @@ class Doctrine_Manager extends Doctrine_Configurable implements Countable, Itera { $this->_bound[$componentName] = $connectionName; } + /** * getConnectionForComponent * @@ -502,6 +523,7 @@ class Doctrine_Manager extends Doctrine_Configurable implements Countable, Itera } return $this->getCurrentConnection(); } + /** * getTable * this is the same as Doctrine_Connection::getTable() except @@ -515,6 +537,7 @@ class Doctrine_Manager extends Doctrine_Configurable implements Countable, Itera { return $this->getConnectionForComponent($componentName)->getTable($componentName); } + /** * table * this is the same as Doctrine_Connection::getTable() except @@ -530,6 +553,7 @@ class Doctrine_Manager extends Doctrine_Configurable implements Countable, Itera ->getConnectionForComponent($componentName) ->getTable($componentName); } + /** * closes the connection * @@ -549,6 +573,7 @@ class Doctrine_Manager extends Doctrine_Configurable implements Countable, Itera unset($connection); } + /** * getConnections * returns all opened connections @@ -559,6 +584,7 @@ class Doctrine_Manager extends Doctrine_Configurable implements Countable, Itera { return $this->_connections; } + /** * setCurrentConnection * sets the current connection to $key @@ -575,6 +601,7 @@ class Doctrine_Manager extends Doctrine_Configurable implements Countable, Itera } $this->_currIndex = $key; } + /** * contains * whether or not the manager contains specified connection @@ -586,6 +613,7 @@ class Doctrine_Manager extends Doctrine_Configurable implements Countable, Itera { return isset($this->_connections[$key]); } + /** * count * returns the number of opened connections @@ -596,6 +624,7 @@ class Doctrine_Manager extends Doctrine_Configurable implements Countable, Itera { return count($this->_connections); } + /** * getIterator * returns an ArrayIterator that iterates through all connections @@ -606,6 +635,7 @@ class Doctrine_Manager extends Doctrine_Configurable implements Countable, Itera { return new ArrayIterator($this->_connections); } + /** * getCurrentConnection * returns the current connection @@ -621,6 +651,7 @@ class Doctrine_Manager extends Doctrine_Configurable implements Countable, Itera } return $this->_connections[$i]; } + /** * __toString * returns a string representation of this object diff --git a/lib/Doctrine/Manager/Exception.php b/lib/Doctrine/Manager/Exception.php index 065fbc978..d3f320c03 100644 --- a/lib/Doctrine/Manager/Exception.php +++ b/lib/Doctrine/Manager/Exception.php @@ -18,6 +18,7 @@ * and is licensed under the LGPL. For more information, see * <http://www.phpdoctrine.com>. */ + /** * Doctrine_Manager_Exception * diff --git a/lib/Doctrine/Migration.php b/lib/Doctrine/Migration.php index 1c10070ff..800e7124a 100644 --- a/lib/Doctrine/Migration.php +++ b/lib/Doctrine/Migration.php @@ -18,6 +18,7 @@ * and is licensed under the LGPL. For more information, see * <http://www.phpdoctrine.com>. */ + /** * Doctrine_Migration * @@ -51,7 +52,7 @@ class Doctrine_Migration $migrationClassesDirectory = array(), $migrationClasses = array(), $loadedMigrations = array(); - + /** * construct * @@ -71,7 +72,7 @@ class Doctrine_Migration $this->createMigrationTable(); } } - + /** * createMigrationTable * @@ -91,7 +92,7 @@ class Doctrine_Migration return false; } } - + /** * loadMigrationClasses * @@ -115,7 +116,7 @@ class Doctrine_Migration foreach ($it as $file) { $e = explode('.', $file->getFileName()); if (end($e) === 'php' && strpos($file->getFileName(), '.inc') === false) { - if (!in_array($file->getFileName(), $this->loadedMigrations)) { + if ( ! in_array($file->getFileName(), $this->loadedMigrations)) { require_once($file->getPathName()); $requiredClass = array_diff(get_declared_classes(), $classes); @@ -155,19 +156,17 @@ class Doctrine_Migration return $this->migrationClasses; } - + /** * getMigrationClasses * * @return void - * @author Jonathan H. Wage */ - public function getMigrationClasses() { return $this->migrationClasses; } - + /** * setCurrentVersion * @@ -186,7 +185,7 @@ class Doctrine_Migration $conn->exec("INSERT INTO " . $this->migrationTableName . " (version) VALUES ($number)"); } } - + /** * getCurrentVersion * @@ -202,7 +201,7 @@ class Doctrine_Migration return isset($result[0]) ? $result[0]:0; } - + /** * hasMigrated * @@ -218,7 +217,7 @@ class Doctrine_Migration return isset($result[0]) ? true:false; } - + /** * getLatestVersion * @@ -239,12 +238,17 @@ class Doctrine_Migration return isset($versions[0]) ? $versions[0]:0; } - + + /** + * getNextVersion + * + * @return integer $nextVersion + */ public function getNextVersion() { return $this->getLatestVersion() + 1; } - + /** * getMigrationClass * @@ -265,7 +269,7 @@ class Doctrine_Migration throw new Doctrine_Migration_Exception('Could not find migration class for migration step: '.$num); } - + /** * doMigrateStep * @@ -281,7 +285,7 @@ class Doctrine_Migration $migrate->doMigrate($direction); } - + /** * doMigrate * @@ -299,13 +303,13 @@ class Doctrine_Migration $process = new Doctrine_Migration_Process(); $funcName = 'process' . Doctrine::classify($type); - if (!empty($changes)) { + if ( ! empty($changes)) { $process->$funcName($changes); } } } } - + /** * migrate * @@ -345,7 +349,7 @@ class Doctrine_Migration return $to; } - + /** * addChange * @@ -357,7 +361,7 @@ class Doctrine_Migration { $this->changes[$type][] = $change; } - + /** * createTable * @@ -372,7 +376,7 @@ class Doctrine_Migration $this->addChange('created_tables', $options); } - + /** * dropTable * @@ -385,7 +389,7 @@ class Doctrine_Migration $this->addChange('dropped_tables', $options); } - + /** * renameTable * @@ -399,7 +403,7 @@ class Doctrine_Migration $this->addChange('renamed_tables', $options); } - + /** * createConstraint * @@ -413,7 +417,7 @@ class Doctrine_Migration $this->addChange('created_constraints', $options); } - + /** * dropConstraint * @@ -427,7 +431,7 @@ class Doctrine_Migration $this->addChange('dropped_constraints', $options); } - + /** * createForeignKey * @@ -441,7 +445,7 @@ class Doctrine_Migration $this->addChange('created_fks', $options); } - + /** * dropForeignKey * @@ -455,7 +459,7 @@ class Doctrine_Migration $this->addChange('dropped_fks', $options); } - + /** * addColumn * @@ -471,7 +475,7 @@ class Doctrine_Migration $this->addChange('added_columns', $options); } - + /** * renameColumn * @@ -486,7 +490,7 @@ class Doctrine_Migration $this->addChange('renamed_columns', $options); } - + /** * renameColumn * @@ -502,7 +506,7 @@ class Doctrine_Migration $this->addChange('changed_columns', $options); } - + /** * removeColumn * @@ -516,7 +520,7 @@ class Doctrine_Migration $this->addChange('removed_columns', $options); } - + /** * addIndex * @@ -531,7 +535,7 @@ class Doctrine_Migration $this->addChange('added_indexes', $options); } - + /** * removeIndex * diff --git a/lib/Doctrine/Migration/Builder.php b/lib/Doctrine/Migration/Builder.php index 2b8f46dab..bbfb49a70 100644 --- a/lib/Doctrine/Migration/Builder.php +++ b/lib/Doctrine/Migration/Builder.php @@ -197,7 +197,7 @@ END; return true; } - + /** * buildCreateForeignKey * @@ -209,7 +209,7 @@ END; { return "\t\t\$this->createForeignKey('" . $tableName . "', " . $this->dataToPhpCode($definition) . ");"; } - + /** * buildDropForeignKey * @@ -221,7 +221,7 @@ END; { return "\t\t\$this->dropForeignKey('" . $tableName . "', '" . $definition['name'] . "');\n"; } - + /** * buildCreateTable * @@ -240,7 +240,7 @@ END; return $code; } - + /** * buildDropTable * @@ -251,7 +251,7 @@ END; { return "\t\t\$this->dropTable('" . $tableData['tableName'] . "');"; } - + /** * dataToPhpCode * @@ -267,7 +267,7 @@ END; return $results; } - + /** * generateMigrationClass * @@ -278,7 +278,7 @@ END; if ($return || !$this->getMigrationsPath()) { return $this->buildMigrationClass($className, null, $options, $up, $down); } else { - if (!$this->getMigrationsPath()) { + if ( ! $this->getMigrationsPath()) { throw new Doctrine_Migration_Exception('You must specify the path to your migrations.'); } @@ -294,7 +294,7 @@ END; file_put_contents($path, $class); } } - + /** * buildMigrationClass * diff --git a/lib/Doctrine/Migration/Exception.php b/lib/Doctrine/Migration/Exception.php index 53f172e75..c2e9d0086 100644 --- a/lib/Doctrine/Migration/Exception.php +++ b/lib/Doctrine/Migration/Exception.php @@ -18,6 +18,7 @@ * and is licensed under the LGPL. For more information, see * <http://www.phpdoctrine.com>. */ + /** * Doctrine_Migration_Exception * @@ -30,5 +31,4 @@ * @author Jonathan H. Wage <jwage@mac.com> */ class Doctrine_Migration_Exception extends Doctrine_Exception -{ -} \ No newline at end of file +{ } \ No newline at end of file diff --git a/lib/Doctrine/Migration/IrreversibleMigrationException.php b/lib/Doctrine/Migration/IrreversibleMigrationException.php index e191b3f1d..a949d6ec9 100644 --- a/lib/Doctrine/Migration/IrreversibleMigrationException.php +++ b/lib/Doctrine/Migration/IrreversibleMigrationException.php @@ -18,6 +18,7 @@ * and is licensed under the LGPL. For more information, see * <http://www.phpdoctrine.com>. */ + /** * Doctrine_Migration_IrreversibleMigration * @@ -30,5 +31,4 @@ * @author Jonathan H. Wage <jwage@mac.com> */ class Doctrine_Migration_IrreversibleMigrationException extends Doctrine_Migration_Exception -{ -} \ No newline at end of file +{ } \ No newline at end of file diff --git a/lib/Doctrine/Migration/Process.php b/lib/Doctrine/Migration/Process.php index 93549710c..5847138dd 100644 --- a/lib/Doctrine/Migration/Process.php +++ b/lib/Doctrine/Migration/Process.php @@ -18,6 +18,7 @@ * and is licensed under the LGPL. For more information, see * <http://www.phpdoctrine.com>. */ + /** * Doctrine_Migration_Process * @@ -31,11 +32,23 @@ */ class Doctrine_Migration_Process { + /** + * getConnection + * + * @param string $tableName + * @return void + */ public function getConnection($tableName) { return Doctrine::getConnectionByTableName($tableName); } - + + /** + * processCreatedTables + * + * @param string $tables + * @return void + */ public function processCreatedTables($tables) { foreach ($tables as $table) { @@ -44,7 +57,13 @@ class Doctrine_Migration_Process $conn->export->createTable($table['tableName'], $table['fields'], $table['options']); } } - + + /** + * processDroppedTables + * + * @param string $tables + * @return void + */ public function processDroppedTables($tables) { foreach ($tables as $table) { @@ -53,7 +72,13 @@ class Doctrine_Migration_Process $conn->export->dropTable($table['tableName']); } } - + + /** + * processRenamedTables + * + * @param string $tables + * @return void + */ public function processRenamedTables($tables) { foreach ($tables as $table) { @@ -62,7 +87,13 @@ class Doctrine_Migration_Process $conn->export->alterTable($table['oldTableName'], array('name' => $table['newTableName'])); } } - + + /** + * processAddedColumns + * + * @param string $columns + * @return void + */ public function processAddedColumns($columns) { foreach ($columns as $column) { @@ -75,7 +106,13 @@ class Doctrine_Migration_Process $conn->export->alterTable($column['tableName'], array('add' => array($column['columnName'] => $options))); } } - + + /** + * processRenamedColumns + * + * @param string $columns + * @return void + */ public function processRenamedColumns($columns) { foreach ($columns as $column) { @@ -84,7 +121,13 @@ class Doctrine_Migration_Process $conn->export->alterTable($column['tableName'], array('rename' => array($column['oldColumnName'] => array('name' => $column['newColumnName'])))); } } - + + /** + * processChangedColumns + * + * @param string $columns + * @return void + */ public function processChangedColumns($columns) { foreach ($columns as $column) { @@ -97,7 +140,13 @@ class Doctrine_Migration_Process $conn->export->alterTable($column['tableName'], array('change' => array($column['columnName'] => array('definition' => $options)))); } } - + + /** + * processRemovedColumns + * + * @param string $columns + * @return void + */ public function processRemovedColumns($columns) { foreach ($columns as $column) { @@ -106,7 +155,13 @@ class Doctrine_Migration_Process $conn->export->alterTable($column['tableName'], array('remove' => array($column['columnName'] => array()))); } } - + + /** + * processAddexIndexes + * + * @param string $indexes + * @return void + */ public function processAddedIndexes($indexes) { foreach ($indexes as $index) { @@ -115,7 +170,13 @@ class Doctrine_Migration_Process $conn->export->createIndex($index['tableName'], $index['indexName'], $index['definition']); } } - + + /** + * processRemovedIndexes + * + * @param string $indexes + * @return void + */ public function processRemovedIndexes($indexes) { foreach ($indexes as $index) { @@ -124,7 +185,13 @@ class Doctrine_Migration_Process $conn->export->dropIndex($index['tableName'], $index['indexName']); } } - + + /** + * processCreatedConstraints + * + * @param string $constraints + * @return void + */ public function processCreatedConstraints($constraints) { foreach ($constraints as $constraint) { @@ -133,7 +200,13 @@ class Doctrine_Migration_Process $constraint['definition']); } } - + + /** + * processDroppedConstraints + * + * @param string $constraints + * @return void + */ public function processDroppedConstraints($constraints) { foreach ($constraints as $constraint) { @@ -142,7 +215,13 @@ class Doctrine_Migration_Process $constraint['primary']); } } - + + /** + * processCreatedFks + * + * @param string $foreignKeys + * @return void + */ public function processCreatedFks($foreignKeys) { foreach ($foreignKeys as $fk) { @@ -150,7 +229,13 @@ class Doctrine_Migration_Process $conn->export->createForeignKey($fk['tableName'], $fk['definition']); } } - + + /** + * processDroppedFks + * + * @param string $foreignKeys + * @return void + */ public function processDroppedFks($foreignKeys) { foreach ($foreignKeys as $fk) { diff --git a/lib/Doctrine/Node.php b/lib/Doctrine/Node.php index 507141131..d4ae2c2e9 100644 --- a/lib/Doctrine/Node.php +++ b/lib/Doctrine/Node.php @@ -18,6 +18,7 @@ * and is licensed under the LGPL. For more information, see * <http://www.phpdoctrine.com>. */ + /** * Doctrine_Node * @@ -50,7 +51,7 @@ class Doctrine_Node implements IteratorAggregate * @param array $iteratorOptions */ protected $iteratorOptions; - + /** * The tree to which the node belongs. * diff --git a/lib/Doctrine/Node/AdjacencyList.php b/lib/Doctrine/Node/AdjacencyList.php index de3c3780f..950fbcc87 100644 --- a/lib/Doctrine/Node/AdjacencyList.php +++ b/lib/Doctrine/Node/AdjacencyList.php @@ -18,6 +18,7 @@ * and is licensed under the LGPL. For more information, see * <http://www.phpdoctrine.com>. */ + /** * Doctrine_Node_AdjacencyList * diff --git a/lib/Doctrine/Node/AdjacencyList/LevelOrderIterator.php b/lib/Doctrine/Node/AdjacencyList/LevelOrderIterator.php index 8c8a658a5..c26331276 100644 --- a/lib/Doctrine/Node/AdjacencyList/LevelOrderIterator.php +++ b/lib/Doctrine/Node/AdjacencyList/LevelOrderIterator.php @@ -18,6 +18,7 @@ * and is licensed under the LGPL. For more information, see * <http://www.phpdoctrine.com>. */ + /** * Doctrine_Node_AdjacencyList_LevelOrderIterator * diff --git a/lib/Doctrine/Node/AdjacencyList/PostOrderIterator.php b/lib/Doctrine/Node/AdjacencyList/PostOrderIterator.php index 2c849534b..15983a4d6 100644 --- a/lib/Doctrine/Node/AdjacencyList/PostOrderIterator.php +++ b/lib/Doctrine/Node/AdjacencyList/PostOrderIterator.php @@ -18,6 +18,7 @@ * and is licensed under the LGPL. For more information, see * <http://www.phpdoctrine.com>. */ + /** * Doctrine_Node_AdjacencyList_PostOrderIterator * diff --git a/lib/Doctrine/Node/AdjacencyList/PreOrderIterator.php b/lib/Doctrine/Node/AdjacencyList/PreOrderIterator.php index 538f9acfe..21045bd25 100644 --- a/lib/Doctrine/Node/AdjacencyList/PreOrderIterator.php +++ b/lib/Doctrine/Node/AdjacencyList/PreOrderIterator.php @@ -18,6 +18,7 @@ * and is licensed under the LGPL. For more information, see * <http://www.phpdoctrine.com>. */ + /** * Doctrine_Node_AdjacencyList_PreOrderIterator * diff --git a/lib/Doctrine/Node/Exception.php b/lib/Doctrine/Node/Exception.php index 6de9e018d..79d32198c 100644 --- a/lib/Doctrine/Node/Exception.php +++ b/lib/Doctrine/Node/Exception.php @@ -18,6 +18,7 @@ * and is licensed under the LGPL. For more information, see * <http://www.phpdoctrine.com>. */ + /** * Doctrine_Node_Exception * diff --git a/lib/Doctrine/Node/Interface.php b/lib/Doctrine/Node/Interface.php index 9c6ee5c51..d0f22aefd 100644 --- a/lib/Doctrine/Node/Interface.php +++ b/lib/Doctrine/Node/Interface.php @@ -18,6 +18,7 @@ * and is licensed under the LGPL. For more information, see * <http://www.phpdoctrine.com>. */ + /** * Doctrine_Node_Interface * diff --git a/lib/Doctrine/Node/MaterializedPath.php b/lib/Doctrine/Node/MaterializedPath.php index 08528b224..b0a87f4be 100644 --- a/lib/Doctrine/Node/MaterializedPath.php +++ b/lib/Doctrine/Node/MaterializedPath.php @@ -18,6 +18,7 @@ * and is licensed under the LGPL. For more information, see * <http://www.phpdoctrine.com>. */ + /** * Doctrine_Node_MaterializedPath * diff --git a/lib/Doctrine/Node/MaterializedPath/LevelOrderIterator.php b/lib/Doctrine/Node/MaterializedPath/LevelOrderIterator.php index 9decbf086..6a987da9b 100644 --- a/lib/Doctrine/Node/MaterializedPath/LevelOrderIterator.php +++ b/lib/Doctrine/Node/MaterializedPath/LevelOrderIterator.php @@ -18,6 +18,7 @@ * and is licensed under the LGPL. For more information, see * <http://www.phpdoctrine.com>. */ + /** * Doctrine_Node_MaterializedPath_LevelOrderIterator * diff --git a/lib/Doctrine/Node/MaterializedPath/PostOrderIterator.php b/lib/Doctrine/Node/MaterializedPath/PostOrderIterator.php index 1a860b3b4..b080b1f4f 100644 --- a/lib/Doctrine/Node/MaterializedPath/PostOrderIterator.php +++ b/lib/Doctrine/Node/MaterializedPath/PostOrderIterator.php @@ -18,6 +18,7 @@ * and is licensed under the LGPL. For more information, see * <http://www.phpdoctrine.com>. */ + /** * Doctrine_Node_MaterializedPath_PostOrderIterator * diff --git a/lib/Doctrine/Node/MaterializedPath/PreOrderIterator.php b/lib/Doctrine/Node/MaterializedPath/PreOrderIterator.php index 2cc4a9b3f..209a601b1 100644 --- a/lib/Doctrine/Node/MaterializedPath/PreOrderIterator.php +++ b/lib/Doctrine/Node/MaterializedPath/PreOrderIterator.php @@ -18,6 +18,7 @@ * and is licensed under the LGPL. For more information, see * <http://www.phpdoctrine.com>. */ + /** * Doctrine_Node_MaterializedPath_PreOrderIterator * diff --git a/lib/Doctrine/Node/NestedSet.php b/lib/Doctrine/Node/NestedSet.php index de4988179..1684e2f0c 100644 --- a/lib/Doctrine/Node/NestedSet.php +++ b/lib/Doctrine/Node/NestedSet.php @@ -18,6 +18,7 @@ * and is licensed under the LGPL. For more information, see * <http://www.phpdoctrine.com>. */ + /** * Doctrine_Node_NestedSet * @@ -463,7 +464,7 @@ class Doctrine_Node_NestedSet extends Doctrine_Node implements Doctrine_Node_Int return true; } - + /** * Accomplishes moving of nodes between different trees. * Used by the move* methods if the root values of the two nodes are different. @@ -550,7 +551,7 @@ class Doctrine_Node_NestedSet extends Doctrine_Node implements Doctrine_Node_Int throw $e; } } - + /** * moves node as prev sibling of dest record * @@ -618,7 +619,7 @@ class Doctrine_Node_NestedSet extends Doctrine_Node implements Doctrine_Node_Int $this->updateNode($dest->getNode()->getRightValue(), $this->record['level'] - $oldLevel); } } - + /** * Makes this node a root node. Only used in multiple-root trees. * @@ -904,7 +905,7 @@ class Doctrine_Node_NestedSet extends Doctrine_Node implements Doctrine_Node_Int $resultRight = $qRight->execute(); } - + /** * gets record's left value * diff --git a/lib/Doctrine/Node/NestedSet/LevelOrderIterator.php b/lib/Doctrine/Node/NestedSet/LevelOrderIterator.php index d56ecbd9f..b3f33a79b 100644 --- a/lib/Doctrine/Node/NestedSet/LevelOrderIterator.php +++ b/lib/Doctrine/Node/NestedSet/LevelOrderIterator.php @@ -18,6 +18,7 @@ * and is licensed under the LGPL. For more information, see * <http://www.phpdoctrine.com>. */ + /** * Doctrine_Node_NestedSet_LevelOrderIterator * diff --git a/lib/Doctrine/Node/NestedSet/PostOrderIterator.php b/lib/Doctrine/Node/NestedSet/PostOrderIterator.php index f8c2a5ef9..0558e162c 100644 --- a/lib/Doctrine/Node/NestedSet/PostOrderIterator.php +++ b/lib/Doctrine/Node/NestedSet/PostOrderIterator.php @@ -18,6 +18,7 @@ * and is licensed under the LGPL. For more information, see * <http://www.phpdoctrine.com>. */ + /** * Doctrine_Node_NestedSet_PostOrderIterator * diff --git a/lib/Doctrine/Node/NestedSet/PreOrderIterator.php b/lib/Doctrine/Node/NestedSet/PreOrderIterator.php index d6e49d198..9d85791ef 100644 --- a/lib/Doctrine/Node/NestedSet/PreOrderIterator.php +++ b/lib/Doctrine/Node/NestedSet/PreOrderIterator.php @@ -18,6 +18,7 @@ * and is licensed under the LGPL. For more information, see * <http://www.phpdoctrine.com>. */ + /** * Doctrine_Node_NestedSet_PreOrderIterator * @@ -35,26 +36,32 @@ class Doctrine_Node_NestedSet_PreOrderIterator implements Iterator * @var Doctrine_Collection $collection */ protected $collection; + /** * @var array $keys */ protected $keys; + /** * @var mixed $key */ protected $key; + /** * @var integer $index */ protected $index; + /** * @var integer $index */ protected $prevIndex; + /** * @var integer $index */ protected $traverseLevel; + /** * @var integer $count */ diff --git a/lib/Doctrine/Null.php b/lib/Doctrine/Null.php index f7efb5539..48f6ce379 100644 --- a/lib/Doctrine/Null.php +++ b/lib/Doctrine/Null.php @@ -18,6 +18,7 @@ * and is licensed under the LGPL. For more information, see * <http://www.phpdoctrine.com>. */ + /** * Doctrine_Null * diff --git a/lib/Doctrine/Parser.php b/lib/Doctrine/Parser.php index 2b4b17b57..ab1788a77 100644 --- a/lib/Doctrine/Parser.php +++ b/lib/Doctrine/Parser.php @@ -18,6 +18,7 @@ * and is licensed under the LGPL. For more information, see * <http://www.phpdoctrine.com>. */ + /** * Doctrine_Parser * @@ -41,6 +42,7 @@ abstract class Doctrine_Parser * @author Jonathan H. Wage */ abstract public function loadData($array); + /** * dumpData * @@ -52,6 +54,7 @@ abstract class Doctrine_Parser * @author Jonathan H. Wage */ abstract public function dumpData($array, $path = null); + /** * getParser * @@ -67,6 +70,7 @@ abstract class Doctrine_Parser return new $class; } + /** * load * @@ -83,6 +87,7 @@ abstract class Doctrine_Parser return $parser->loadData($path); } + /** * dump * @@ -100,21 +105,20 @@ abstract class Doctrine_Parser return $parser->dumpData($array, $path); } - + /** - * getContents + * doLoad * * Get contents whether it is the path to a file file or a string of txt. * Either should allow php code in it. * * @param string $path * @return void - * @author Jonathan H. Wage */ - public function getContents($path) + public function doLoad($path) { ob_start(); - if (!file_exists($path)) { + if ( ! file_exists($path)) { $contents = $path; $path = '/tmp/dparser_' . microtime(); @@ -126,4 +130,13 @@ abstract class Doctrine_Parser return $contents; } + + public function doDump($data, $path) + { + if ($path) { + return file_put_contents($path, $data); + } else { + return $data; + } + } } \ No newline at end of file diff --git a/lib/Doctrine/Parser/Json.php b/lib/Doctrine/Parser/Json.php index 3aeda2c61..eb3351bdf 100644 --- a/lib/Doctrine/Parser/Json.php +++ b/lib/Doctrine/Parser/Json.php @@ -18,6 +18,7 @@ * and is licensed under the LGPL. For more information, see * <http://www.phpdoctrine.com>. */ + /** * Doctrine_Parser_Json * @@ -36,51 +37,32 @@ class Doctrine_Parser_Json extends Doctrine_Parser * * Dump an array of data to a specified path or return * - * @param string $array - * @param string $path + * @param string $array Array of data to dump to json + * @param string $path Path to dump json data to + * @return string $json * @return void - * @author Jonathan H. Wage */ public function dumpData($array, $path = null) { $data = json_encode($array); - if ($path) { - return file_put_contents($path, $data); - } else { - return $data; - } + return $this->doDump($data, $path); } + /** * loadData * * Load and unserialize data from a file or from passed data * - * @param string $path - * @return void - * @author Jonathan H. Wage + * @param string $path Path to dump data to + * @return array $json Array of json objects */ public function loadData($path) { - $contents = $this->getContents($path); + $contents = $this->doLoad($path); $json = json_decode($contents); - return $this->prepareData($json); - } - - public function prepareData($json) - { - $array = array(); - - foreach ($json as $key => $value) { - if (is_object($value) || is_array($value)) { - $array[$key] = $this->prepareData($value); - } else { - $array[$key] = $value; - } - } - - return $array; + return $json } } \ No newline at end of file diff --git a/lib/Doctrine/Parser/Serialize.php b/lib/Doctrine/Parser/Serialize.php index 7a9c1e94b..b9384b36c 100644 --- a/lib/Doctrine/Parser/Serialize.php +++ b/lib/Doctrine/Parser/Serialize.php @@ -18,6 +18,7 @@ * and is licensed under the LGPL. For more information, see * <http://www.phpdoctrine.com>. */ + /** * Doctrine_Parser_Serialize * @@ -39,18 +40,14 @@ class Doctrine_Parser_Serialize extends Doctrine_Parser * @param string $array * @param string $path * @return void - * @author Jonathan H. Wage */ public function dumpData($array, $path = null) { $data = serialize($array); - if ($path) { - return file_put_contents($path, $data); - } else { - return $data; - } + return $this->doDump($data, $path); } + /** * loadData * @@ -58,11 +55,10 @@ class Doctrine_Parser_Serialize extends Doctrine_Parser * * @param string $path * @return void - * @author Jonathan H. Wage */ public function loadData($path) { - $contents = $this->getContents($path); + $contents = $this->doLoad($path); return unserialize($contents); } diff --git a/lib/Doctrine/Parser/Xml.php b/lib/Doctrine/Parser/Xml.php index e81e0d727..ea747a313 100644 --- a/lib/Doctrine/Parser/Xml.php +++ b/lib/Doctrine/Parser/Xml.php @@ -18,6 +18,7 @@ * and is licensed under the LGPL. For more information, see * <http://www.phpdoctrine.com>. */ + /** * Doctrine_Parser_Xml * @@ -31,13 +32,38 @@ */ class Doctrine_Parser_Xml extends Doctrine_Parser { - public function arrayToXml($data, $rootNodeName = 'data', $xml = null) + /** + * dumpData + * + * Convert array to xml and dump to specified path or return the xml + * + * @param string $array Array of data to convert to xml + * @param string $path Path to write xml data to + * @return string $xml + * @return void + */ + public function dumpData($array, $path = null) + { + $data = $this->arrayToXml($array); + + return $this->doDump($data, $path) + } + + /** + * arrayToXml + * + * @param string $array Array to convert to xml + * @param string $rootNodeName Name of the root node + * @param string $xml SimpleXmlElement + * @return string $asXml String of xml built from array + */ + public function arrayToXml($array, $rootNodeName = 'data', $xml = null) { if ($xml === null) { $xml = new SimpleXmlElement("<?xml version=\"1.0\" encoding=\"utf-8\"?><$rootNodeName/>"); } - foreach($data as $key => $value) + foreach($array as $key => $value) { if (is_array($value)) { $node = $xml->addChild($key); @@ -52,27 +78,32 @@ class Doctrine_Parser_Xml extends Doctrine_Parser return $xml->asXML(); } - - public function dumpData($array, $path = null) - { - $xml = $this->arrayToXml($array); - - if ($path) { - return file_put_contents($path, $xml); - } else { - return $xml; - } - } - + + /** + * loadData + * + * Load xml file and return array of data + * + * @param string $path Path to load xml data from + * @return array $array Array of data converted from xml + */ public function loadData($path) { - $contents = $this->getContents($path); + $contents = $this->doLoad($path); $simpleXml = simplexml_load_string($contents); return $this->prepareData($simpleXml); } - + + /** + * prepareData + * + * Prepare simple xml to array for return + * + * @param string $simpleXml + * @return array $return + */ public function prepareData($simpleXml) { if ($simpleXml instanceof SimpleXMLElement) { @@ -87,10 +118,10 @@ class Doctrine_Parser_Xml extends Doctrine_Parser if (count($values) > 0) { $return[$element] = $this->prepareData($value); } else { - if (!isset($return[$element])) { + if ( ! isset($return[$element])) { $return[$element] = (string) $value; } else { - if (!is_array($return[$element])) { + if ( ! is_array($return[$element])) { $return[$element] = array($return[$element], (string) $value); } else { $return[$element][] = (string) $value; diff --git a/lib/Doctrine/Parser/Yml.php b/lib/Doctrine/Parser/Yml.php index cbd5d1d0e..c5e6d27b5 100644 --- a/lib/Doctrine/Parser/Yml.php +++ b/lib/Doctrine/Parser/Yml.php @@ -20,6 +20,7 @@ require_once('spyc.php'); * and is licensed under the LGPL. For more information, see * <http://www.phpdoctrine.com>. */ + /** * Doctrine_Parser_Yml * @@ -38,36 +39,31 @@ class Doctrine_Parser_Yml extends Doctrine_Parser * * Dump an array of data to a specified path or return * - * @param string $array - * @param string $path + * @param string $array Array of data to dump to yaml + * @param string $path Path to dump the yaml to + * @return string $yaml * @return void - * @author Jonathan H. Wage */ public function dumpData($array, $path = null) { $spyc = new Doctrine_Spyc(); - $yml = $spyc->dump($array, false, false); + $data = $spyc->dump($array, false, false); - if ($path) { - return file_put_contents($path, $yml); - } else { - return $yml; - } + return $this->doDump($data, $path); } - + /** * loadData * * Load and parse data from a yml file * - * @param string $path - * @return void - * @author Jonathan H. Wage + * @param string $path Path to load yaml data from + * @return array $array Array of parsed yaml data */ public function loadData($path) { - $contents = $this->getContents($path); + $contents = $this->doLoad($path); $spyc = new Doctrine_Spyc(); diff --git a/lib/Doctrine/Parser/spyc.php b/lib/Doctrine/Parser/spyc.php index d5f0836db..bad48c89b 100644 --- a/lib/Doctrine/Parser/spyc.php +++ b/lib/Doctrine/Parser/spyc.php @@ -16,24 +16,27 @@ * @package Doctrine * @subpackage Spyc */ - class Doctrine_YAMLNode { + class Doctrine_YamlNode { /**#@+ * @access public * @var string */ var $parent; var $id; + /**#@+*/ /** * @access public * @var mixed */ var $data; + /** * @access public * @var int */ var $indent; + /** * @access public * @var bool @@ -45,7 +48,7 @@ * @access public * @return void */ - function Doctrine_YAMLNode($nodeId) { + function Doctrine_YamlNode($nodeId) { $this->id = $nodeId; } } @@ -130,14 +133,14 @@ function load($input) { // See what type of input we're talking about // If it's not a file, assume it's a string - if (!empty($input) && (strpos($input, "\n") === false) + if ( ! empty($input) && (strpos($input, "\n") === false) && file_exists($input)) { $yaml = file($input); } else { $yaml = explode("\n",$input); } // Initiate some objects and values - $base = new Doctrine_YAMLNode (1); + $base = new Doctrine_YamlNode (1); $base->indent = 0; $this->_lastIndent = 0; $this->_lastNode = $base->id; @@ -162,7 +165,7 @@ $last->data[key($last->data)] .= "\n"; } elseif ($ifchk{0} != '#' && substr($ifchk,0,3) != '---') { // Create a new node and get its indent - $node = new Doctrine_YAMLNode ($this->_nodeId); + $node = new Doctrine_YamlNode ($this->_nodeId); $this->_nodeId++; $node->indent = $this->_getIndent($line); @@ -253,7 +256,7 @@ if ( ( (is_array($node->data)) && isset($node->data[key($node->data)]) && - (!is_array($node->data[key($node->data)])) ) + ( ! is_array($node->data[key($node->data)])) ) && ( (preg_match('/^&([^ ]+)/',$node->data[key($node->data)])) || @@ -351,6 +354,7 @@ var $_isInline; var $_dumpIndent; var $_dumpWordWrap; + /**#@+*/ /**** Public Properties ****/ @@ -360,6 +364,7 @@ * @var mixed */ var $_nodeId; + /**#@+*/ /**** Private Methods ****/ @@ -381,7 +386,7 @@ $indent += $this->_dumpIndent; // Yamlize the array $string .= $this->_yamlizeArray($value,$indent); - } elseif (!is_array($value)) { + } elseif ( ! is_array($value)) { // It doesn't have children. Yip. $string = $this->_dumpNode($key,$value,$indent); } @@ -488,7 +493,7 @@ */ function _getIndent($line) { preg_match('/^\s{1,}/',$line,$match); - if (!empty($match[0])) { + if ( ! empty($match[0])) { $indent = substr_count($match[0],' '); } else { $indent = 0; @@ -645,7 +650,7 @@ // Re-add the sequences - if (!empty($seqs)) { + if ( ! empty($seqs)) { $i = 0; foreach ($explode as $key => $value) { if (strpos($value,'YAMLSeq') !== false) { @@ -656,7 +661,7 @@ } // Re-add the mappings - if (!empty($maps)) { + if ( ! empty($maps)) { $i = 0; foreach ($explode as $key => $value) { if (strpos($value,'YAMLMap') !== false) { @@ -667,7 +672,7 @@ } // Re-add the strings - if (!empty($saved_strings)) { + if ( ! empty($saved_strings)) { $i = 0; foreach ($explode as $key => $value) { while (strpos($value,'YAMLString') !== false) { @@ -689,7 +694,7 @@ function _buildArray() { $trunk = array(); - if (!isset($this->_indentSort[0])) { + if ( ! isset($this->_indentSort[0])) { return $trunk; } @@ -714,7 +719,7 @@ function _linkReferences() { if (is_array($this->_haveRefs)) { foreach ($this->_haveRefs as $node) { - if (!empty($node->data)) { + if ( ! empty($node->data)) { $key = key($node->data); // If it's an array, don't check. if (is_array($node->data[$key])) { @@ -744,7 +749,7 @@ // Flag the node as having a reference $this->_allNodes[$n->id]->refKey = $ref; } - } elseif (!empty($k) && !empty($v)) { + } elseif ( ! empty($k) && !empty($v)) { if (preg_match('/^&([^ ]+)/',$v,$matches)) { // Flag the node so we know it's a reference $this->_allNodes[$n->id]->ref = substr($matches[0],1); @@ -807,7 +812,7 @@ } else { $node->data[$key] = $childs; } - } elseif (!is_array($node->data) && $node->children == true) { + } elseif ( ! is_array($node->data) && $node->children == true) { // Same as above, find the children of this node $childs = $this->_gatherChildren($node->id); $node->data = array(); @@ -856,8 +861,8 @@ * @return array */ function _array_kmerge($arr1,$arr2) { - if(!is_array($arr1)) $arr1 = array(); - if(!is_array($arr2)) $arr2 = array(); + if( ! is_array($arr1)) $arr1 = array(); + if( ! is_array($arr2)) $arr2 = array(); $keys = array_merge(array_keys($arr1),array_keys($arr2)); $vals = array_merge(array_values($arr1),array_values($arr2)); diff --git a/lib/Doctrine/Plugin.php b/lib/Doctrine/Plugin.php index 78fdd8939..71a6ab4a8 100644 --- a/lib/Doctrine/Plugin.php +++ b/lib/Doctrine/Plugin.php @@ -37,6 +37,7 @@ class Doctrine_Plugin */ protected $_options = array('generateFiles' => false, 'identifier' => false); + /** * __get * an alias for getOption @@ -50,6 +51,7 @@ class Doctrine_Plugin } return null; } + /** * __isset * @@ -59,6 +61,7 @@ class Doctrine_Plugin { return isset($this->_options[$option]); } + /** * returns the value of an option * @@ -73,6 +76,7 @@ class Doctrine_Plugin return $this->_options[$name]; } + /** * sets given value to an option * @@ -86,6 +90,7 @@ class Doctrine_Plugin return $this; } + /** * returns all options and their associated values * @@ -95,6 +100,7 @@ class Doctrine_Plugin { return $this->_options; } + /** * generates foreign keys for the plugin table based on the owner table * @@ -122,6 +128,7 @@ class Doctrine_Plugin } return $fk; } + /** * generates a relation array to given table * @@ -144,6 +151,7 @@ class Doctrine_Plugin return $relation; } + /** * generates the class definition for plugin class * diff --git a/lib/Doctrine/Query.php b/lib/Doctrine/Query.php index 480488996..4846c7a15 100644 --- a/lib/Doctrine/Query.php +++ b/lib/Doctrine/Query.php @@ -42,10 +42,12 @@ class Doctrine_Query extends Doctrine_Query_Abstract implements Countable protected $subqueryAliases = array(); + /** * @param boolean $needsSubquery */ protected $needsSubquery = false; + /** * @param boolean $isSubquery whether or not this query object is a subquery of another * query object @@ -53,23 +55,28 @@ class Doctrine_Query extends Doctrine_Query_Abstract implements Countable protected $isSubquery; protected $isLimitSubqueryUsed = false; + /** * @var array $_neededTables an array containing the needed table aliases */ protected $_neededTables = array(); + /** * @var array $pendingSubqueries SELECT part subqueries, these are called pending subqueries since * they cannot be parsed directly (some queries might be correlated) */ protected $pendingSubqueries = array(); + /** * @var array $pendingFields */ protected $pendingFields = array(); + /** * @var array $_parsers an array of parser objects, each DQL query part has its own parser */ protected $_parsers = array(); + /** * @var array $_enumParams an array containing the keys of the parameters that should be enumerated */ @@ -91,6 +98,7 @@ class Doctrine_Query extends Doctrine_Query_Abstract implements Countable 'limit' => array(), 'offset' => array(), ); + /** * @var array $_pendingJoinConditions an array containing pending joins */ @@ -122,6 +130,7 @@ class Doctrine_Query extends Doctrine_Query_Abstract implements Countable $this->needsSubquery = false; $this->isLimitSubqueryUsed = false; } + /** * setOption * @@ -136,6 +145,7 @@ class Doctrine_Query extends Doctrine_Query_Abstract implements Countable } $this->_options[$name] = $value; } + /** * addPendingJoinCondition * @@ -147,6 +157,7 @@ class Doctrine_Query extends Doctrine_Query_Abstract implements Countable { $this->_pendingJoins[$componentAlias] = $joinCondition; } + /** * addEnumParam * sets input parameter as an enumerated parameter @@ -164,6 +175,7 @@ class Doctrine_Query extends Doctrine_Query_Abstract implements Countable $this->_enumParams[$key] = $array; } } + /** * getEnumParams * get all enumerated parameters @@ -174,6 +186,7 @@ class Doctrine_Query extends Doctrine_Query_Abstract implements Countable { return $this->_enumParams; } + /** * limitSubqueryUsed * @@ -183,6 +196,7 @@ class Doctrine_Query extends Doctrine_Query_Abstract implements Countable { return $this->isLimitSubqueryUsed; } + /** * convertEnums * convert enum parameters to their integer equivalents @@ -200,6 +214,7 @@ class Doctrine_Query extends Doctrine_Query_Abstract implements Countable } return $params; } + /** * isSubquery * if $bool parameter is set this method sets the value of @@ -222,6 +237,7 @@ class Doctrine_Query extends Doctrine_Query_Abstract implements Countable $this->isSubquery = (bool) $bool; return $this; } + /** * getAggregateAlias * @@ -243,6 +259,7 @@ class Doctrine_Query extends Doctrine_Query_Abstract implements Countable } throw new Doctrine_Query_Exception('Unknown aggregate alias ' . $dqlAlias); } + /** * getParser * parser lazy-loader @@ -266,6 +283,7 @@ class Doctrine_Query extends Doctrine_Query_Abstract implements Countable return $this->_parsers[$name]; } + /** * parseQueryPart * parses given DQL query part @@ -313,6 +331,7 @@ class Doctrine_Query extends Doctrine_Query_Abstract implements Countable return $this; } + /** * getDqlPart * returns the given DQL query part @@ -328,6 +347,7 @@ class Doctrine_Query extends Doctrine_Query_Abstract implements Countable return $this->_dqlParts[$queryPart]; } + /** * getDql * returns the DQL query associated with this object @@ -350,6 +370,7 @@ class Doctrine_Query extends Doctrine_Query_Abstract implements Countable return $q; } + /** * processPendingFields * the fields in SELECT clause cannot be parsed until the components @@ -392,6 +413,7 @@ class Doctrine_Query extends Doctrine_Query_Abstract implements Countable return implode(', ', $sql); } } + /** * parseSelectField * @@ -436,6 +458,7 @@ class Doctrine_Query extends Doctrine_Query_Abstract implements Countable . ' AS ' . $this->_conn->quoteIdentifier($tableAlias . '__' . $name); } + /** * getExpressionOwner * returns the component alias for owner of given expression @@ -459,6 +482,7 @@ class Doctrine_Query extends Doctrine_Query_Abstract implements Countable return $this->getRootAlias(); } + /** * parseSelect * parses the query select part and @@ -534,6 +558,7 @@ class Doctrine_Query extends Doctrine_Query_Abstract implements Countable } } } + /** * parseClause * parses given DQL clause @@ -628,6 +653,7 @@ class Doctrine_Query extends Doctrine_Query_Abstract implements Countable } return $str; } + /** * parseAggregateFunction * parses an aggregate function and returns the parsed form @@ -686,6 +712,7 @@ class Doctrine_Query extends Doctrine_Query_Abstract implements Countable return $expr; } + /** * processPendingSubqueries * processes pending subqueries @@ -717,6 +744,7 @@ class Doctrine_Query extends Doctrine_Query_Abstract implements Countable } $this->pendingSubqueries = array(); } + /** * processPendingAggregates * processes pending aggregate values for given component alias @@ -789,6 +817,7 @@ class Doctrine_Query extends Doctrine_Query_Abstract implements Countable // reset the state $this->pendingAggregates = array(); } + /** * getQueryBase * returns the base of the generated sql query @@ -813,6 +842,7 @@ class Doctrine_Query extends Doctrine_Query_Abstract implements Countable } return $q; } + /** * buildFromPart * builds the from part of the query and returns it @@ -863,6 +893,7 @@ class Doctrine_Query extends Doctrine_Query_Abstract implements Countable } return $q; } + /** * preQuery * @@ -876,6 +907,7 @@ class Doctrine_Query extends Doctrine_Query_Abstract implements Countable { } + /** * postQuery * @@ -889,6 +921,7 @@ class Doctrine_Query extends Doctrine_Query_Abstract implements Countable { } + /** * processQueryPart * parses given query part @@ -920,6 +953,7 @@ class Doctrine_Query extends Doctrine_Query_Abstract implements Countable } } } + /** * builds the sql query from the given parameters and applies things such as * column aggregation inheritance and limit subqueries if needed @@ -1058,6 +1092,7 @@ class Doctrine_Query extends Doctrine_Query_Abstract implements Countable return $q; } + /** * getLimitSubquery * this is method is used by the record limit algorithm @@ -1192,6 +1227,7 @@ class Doctrine_Query extends Doctrine_Query_Abstract implements Countable $subquery = implode(' ', $parts); return $subquery; } + /** * tokenizeQuery * splits the given dql query into an array where keys @@ -1252,6 +1288,7 @@ class Doctrine_Query extends Doctrine_Query_Abstract implements Countable } return $parts; } + /** * DQL PARSER * parses a DQL query @@ -1558,6 +1595,7 @@ class Doctrine_Query extends Doctrine_Query_Abstract implements Countable return $table; } + /** * count * fetches the count of the query diff --git a/lib/Doctrine/Query/Abstract.php b/lib/Doctrine/Query/Abstract.php index ace9280a1..09e0d4e83 100644 --- a/lib/Doctrine/Query/Abstract.php +++ b/lib/Doctrine/Query/Abstract.php @@ -43,6 +43,7 @@ abstract class Doctrine_Query_Abstract extends Doctrine_Hydrate { return $this->parseQueryPart('select', $select, true); } + /** * addFrom * adds fields to the FROM part of the query @@ -54,6 +55,7 @@ abstract class Doctrine_Query_Abstract extends Doctrine_Hydrate { return $this->parseQueryPart('from', $from, true); } + /** * addWhere * adds conditions to the WHERE part of the query @@ -71,6 +73,7 @@ abstract class Doctrine_Query_Abstract extends Doctrine_Hydrate } return $this->parseQueryPart('where', $where, true); } + /** * whereIn * adds IN condition to the query WHERE part @@ -99,6 +102,7 @@ abstract class Doctrine_Query_Abstract extends Doctrine_Hydrate return $this->parseQueryPart('where', $where, true); } + /** * addGroupBy * adds fields to the GROUP BY part of the query @@ -110,6 +114,7 @@ abstract class Doctrine_Query_Abstract extends Doctrine_Hydrate { return $this->parseQueryPart('groupby', $groupby, true); } + /** * addHaving * adds conditions to the HAVING part of the query @@ -127,6 +132,7 @@ abstract class Doctrine_Query_Abstract extends Doctrine_Hydrate } return $this->parseQueryPart('having', $having, true); } + /** * addOrderBy * adds fields to the ORDER BY part of the query @@ -138,6 +144,7 @@ abstract class Doctrine_Query_Abstract extends Doctrine_Hydrate { return $this->parseQueryPart('orderby', $orderby, true); } + /** * select * sets the SELECT part of the query @@ -149,6 +156,7 @@ abstract class Doctrine_Query_Abstract extends Doctrine_Hydrate { return $this->parseQueryPart('select', $select); } + /** * distinct * Makes the query SELECT DISTINCT. @@ -176,6 +184,7 @@ abstract class Doctrine_Query_Abstract extends Doctrine_Hydrate return $this; } + /** * delete * sets the query type to DELETE @@ -188,6 +197,7 @@ abstract class Doctrine_Query_Abstract extends Doctrine_Hydrate return $this; } + /** * update * sets the UPDATE part of the query @@ -201,6 +211,7 @@ abstract class Doctrine_Query_Abstract extends Doctrine_Hydrate return $this->parseQueryPart('from', $update); } + /** * set * sets the SET part of the query @@ -226,6 +237,7 @@ abstract class Doctrine_Query_Abstract extends Doctrine_Hydrate return $this->parseQueryPart('set', $key . ' = ' . $value, true); } } + /** * from * sets the FROM part of the query @@ -237,6 +249,7 @@ abstract class Doctrine_Query_Abstract extends Doctrine_Hydrate { return $this->parseQueryPart('from', $from); } + /** * innerJoin * appends an INNER JOIN to the FROM part of the query @@ -248,6 +261,7 @@ abstract class Doctrine_Query_Abstract extends Doctrine_Hydrate { return $this->parseQueryPart('from', 'INNER JOIN ' . $join, true); } + /** * leftJoin * appends a LEFT JOIN to the FROM part of the query @@ -259,6 +273,7 @@ abstract class Doctrine_Query_Abstract extends Doctrine_Hydrate { return $this->parseQueryPart('from', 'LEFT JOIN ' . $join, true); } + /** * groupBy * sets the GROUP BY part of the query @@ -270,6 +285,7 @@ abstract class Doctrine_Query_Abstract extends Doctrine_Hydrate { return $this->parseQueryPart('groupby', $groupby); } + /** * where * sets the WHERE part of the query @@ -289,6 +305,7 @@ abstract class Doctrine_Query_Abstract extends Doctrine_Hydrate return $this->parseQueryPart('where', $where); } + /** * having * sets the HAVING part of the query @@ -308,6 +325,7 @@ abstract class Doctrine_Query_Abstract extends Doctrine_Hydrate return $this->parseQueryPart('having', $having); } + /** * orderBy * sets the ORDER BY part of the query @@ -319,6 +337,7 @@ abstract class Doctrine_Query_Abstract extends Doctrine_Hydrate { return $this->parseQueryPart('orderby', $orderby); } + /** * limit * sets the Query query limit @@ -330,6 +349,7 @@ abstract class Doctrine_Query_Abstract extends Doctrine_Hydrate { return $this->parseQueryPart('limit', $limit); } + /** * offset * sets the Query query offset @@ -341,7 +361,7 @@ abstract class Doctrine_Query_Abstract extends Doctrine_Hydrate { return $this->parseQueryPart('offset', $offset); } - + /** * parseQueryPart * parses given DQL query part diff --git a/lib/Doctrine/Query/Check.php b/lib/Doctrine/Query/Check.php index 5581a606a..28abcccba 100644 --- a/lib/Doctrine/Query/Check.php +++ b/lib/Doctrine/Query/Check.php @@ -36,11 +36,13 @@ class Doctrine_Query_Check * @var Doctrine_Table $table Doctrine_Table object */ protected $table; + /** * @var string $sql database specific sql CHECK constraint definition * parsed from the given dql CHECK definition */ protected $sql; + /** * @param Doctrine_Table|string $table Doctrine_Table object */ @@ -53,6 +55,7 @@ class Doctrine_Query_Check } $this->table = $table; } + /** * getTable * returns the table object associated with this object @@ -63,6 +66,7 @@ class Doctrine_Query_Check { return $this->table; } + /** * parse * @@ -73,6 +77,7 @@ class Doctrine_Query_Check { $this->sql = $this->parseClause($dql); } + /** * parseClause * @@ -144,6 +149,7 @@ class Doctrine_Query_Check } return $func; } + /** * getSql * diff --git a/lib/Doctrine/Query/Filter.php b/lib/Doctrine/Query/Filter.php index 170462495..3218acdd6 100644 --- a/lib/Doctrine/Query/Filter.php +++ b/lib/Doctrine/Query/Filter.php @@ -45,6 +45,7 @@ class Doctrine_Query_Filter implements Doctrine_Query_Filter_Interface { } + /** * postQuery * diff --git a/lib/Doctrine/Query/Filter/Chain.php b/lib/Doctrine/Query/Filter/Chain.php index e586013bd..14ad9d947 100644 --- a/lib/Doctrine/Query/Filter/Chain.php +++ b/lib/Doctrine/Query/Filter/Chain.php @@ -36,6 +36,7 @@ class Doctrine_Query_Filter_Chain * @var array $_filters an array of Doctrine_Query_Filter objects */ protected $_filters = array(); + /** * add * @@ -46,6 +47,7 @@ class Doctrine_Query_Filter_Chain { $this->_filters[] = $filter; } + /** * returns a Doctrine_Query_Filter on success * and null on failure @@ -60,6 +62,7 @@ class Doctrine_Query_Filter_Chain } return $this->_filters[$key]; } + /** * set * @@ -71,6 +74,7 @@ class Doctrine_Query_Filter_Chain { $this->_filters[$key] = $listener; } + /** * preQuery * @@ -86,6 +90,7 @@ class Doctrine_Query_Filter_Chain $filter->preQuery($query); } } + /** * postQuery * diff --git a/lib/Doctrine/Query/Having.php b/lib/Doctrine/Query/Having.php index 0fa81119b..f7ee95d84 100644 --- a/lib/Doctrine/Query/Having.php +++ b/lib/Doctrine/Query/Having.php @@ -77,6 +77,7 @@ class Doctrine_Query_Having extends Doctrine_Query_Condition } } } + /** * load * returns the parsed query part diff --git a/lib/Doctrine/Query/Part.php b/lib/Doctrine/Query/Part.php index 062f09ba8..4523d0977 100644 --- a/lib/Doctrine/Query/Part.php +++ b/lib/Doctrine/Query/Part.php @@ -36,6 +36,7 @@ abstract class Doctrine_Query_Part * @var Doctrine_Query $query the query object associated with this parser */ protected $query; + /** * @param Doctrine_Query $query the query object associated with this parser */ @@ -43,6 +44,7 @@ abstract class Doctrine_Query_Part { $this->query = $query; } + /** * @return Doctrine_Query $query the query object associated with this parser */ diff --git a/lib/Doctrine/Query/Where.php b/lib/Doctrine/Query/Where.php index 90934eb13..92c505065 100644 --- a/lib/Doctrine/Query/Where.php +++ b/lib/Doctrine/Query/Where.php @@ -152,6 +152,7 @@ class Doctrine_Query_Where extends Doctrine_Query_Condition } return $value; } + /** * parses an EXISTS expression * diff --git a/lib/Doctrine/RawSql.php b/lib/Doctrine/RawSql.php index 48db122fa..f714c4bfc 100644 --- a/lib/Doctrine/RawSql.php +++ b/lib/Doctrine/RawSql.php @@ -36,6 +36,7 @@ class Doctrine_RawSql extends Doctrine_Query_Abstract * @var array $fields */ private $fields = array(); + /** * parseQueryPart * parses given query part @@ -63,6 +64,7 @@ class Doctrine_RawSql extends Doctrine_Query_Abstract } return $this; } + /** * parseQuery * parses an sql query and adds the parts to internal array @@ -121,6 +123,7 @@ class Doctrine_RawSql extends Doctrine_Query_Abstract return $this; } + /** * getQuery * builds the sql query from the given query parts @@ -206,6 +209,7 @@ class Doctrine_RawSql extends Doctrine_Query_Abstract } return $q; } + /** * getFields * returns the fields associated with this parser @@ -216,6 +220,7 @@ class Doctrine_RawSql extends Doctrine_Query_Abstract { return $this->fields; } + /** * addComponent * diff --git a/lib/Doctrine/Record.php b/lib/Doctrine/Record.php index da3ff1427..d2b351c6b 100644 --- a/lib/Doctrine/Record.php +++ b/lib/Doctrine/Record.php @@ -42,28 +42,33 @@ abstract class Doctrine_Record extends Doctrine_Record_Abstract implements Count * a Doctrine_Record is in dirty state when its properties are changed */ const STATE_DIRTY = 1; + /** * TDIRTY STATE * a Doctrine_Record is in transient dirty state when it is created * and some of its fields are modified but it is NOT yet persisted into database */ const STATE_TDIRTY = 2; + /** * CLEAN STATE * a Doctrine_Record is in clean state when all of its properties are loaded from the database * and none of its properties are changed */ const STATE_CLEAN = 3; + /** * PROXY STATE * a Doctrine_Record is in proxy state when its properties are not fully loaded */ const STATE_PROXY = 4; + /** * NEW TCLEAN * a Doctrine_Record is in transient clean state when it is created and none of its fields are modified */ const STATE_TCLEAN = 5; + /** * LOCKED STATE * a Doctrine_Record is temporarily locked during deletes and saves @@ -77,39 +82,48 @@ abstract class Doctrine_Record extends Doctrine_Record_Abstract implements Count * @var Doctrine_Node_<TreeImpl> node object */ protected $_node; + /** * @var integer $_id the primary keys of this object */ protected $_id = array(); + /** * @var array $_data the record data */ protected $_data = array(); + /** * @var array $_values the values array, aggregate values and such are mapped into this array */ protected $_values = array(); + /** * @var integer $_state the state of this record * @see STATE_* constants */ protected $_state; + /** * @var array $_modified an array containing properties that have been modified */ protected $_modified = array(); + /** * @var Doctrine_Validator_ErrorStack error stack object */ protected $_errorStack; + /** * @var array $_references an array containing all the references */ protected $_references = array(); + /** * @var integer $index this index is used for creating object identifiers */ private static $_index = 1; + /** * @var integer $oid object identifier, each Record object has a unique object identifier */ @@ -186,6 +200,7 @@ abstract class Doctrine_Record extends Doctrine_Record_Abstract implements Count } } + /** * _index * @@ -195,6 +210,7 @@ abstract class Doctrine_Record extends Doctrine_Record_Abstract implements Count { return self::$_index; } + /** * setUp * this method is used for setting up relations and attributes @@ -223,6 +239,7 @@ abstract class Doctrine_Record extends Doctrine_Record_Abstract implements Count { return $this->_oid; } + /** * isValid * @@ -248,6 +265,7 @@ abstract class Doctrine_Record extends Doctrine_Record_Abstract implements Count return $this->_errorStack->count() == 0 ? true : false; } + /** * Empty template method to provide concrete Record classes with the possibility * to hook into the validation procedure, doing any custom / specialized @@ -354,6 +372,7 @@ abstract class Doctrine_Record extends Doctrine_Record_Abstract implements Count { return $this->_errorStack; } + /** * errorStack * assigns / returns record errorStack @@ -372,6 +391,7 @@ abstract class Doctrine_Record extends Doctrine_Record_Abstract implements Count return $this->_errorStack; } } + /** * setDefaultValues * sets the default values for records internal data @@ -398,6 +418,7 @@ abstract class Doctrine_Record extends Doctrine_Record_Abstract implements Count } } } + /** * cleanData * @@ -420,6 +441,7 @@ abstract class Doctrine_Record extends Doctrine_Record_Abstract implements Count return $tmp; } + /** * hydrate * hydrates this object from given array @@ -434,6 +456,7 @@ abstract class Doctrine_Record extends Doctrine_Record_Abstract implements Count $this->prepareIdentifiers(true); } + /** * prepareIdentifiers * prepares identifiers for later use @@ -468,6 +491,7 @@ abstract class Doctrine_Record extends Doctrine_Record_Abstract implements Count break; } } + /** * serialize * this method is automatically called when this Doctrine_Record is serialized @@ -518,6 +542,7 @@ abstract class Doctrine_Record extends Doctrine_Record_Abstract implements Count return $str; } + /** * unseralize * this method is automatically called everytime a Doctrine_Record object is unserialized @@ -571,6 +596,7 @@ abstract class Doctrine_Record extends Doctrine_Record_Abstract implements Count $this->postUnserialize($event); } + /** * state * returns / assigns the state of this record @@ -614,6 +640,7 @@ abstract class Doctrine_Record extends Doctrine_Record_Abstract implements Count throw new Doctrine_Record_State_Exception('Unknown record state ' . $state); } } + /** * refresh * refresh internal data from the database @@ -650,7 +677,7 @@ abstract class Doctrine_Record extends Doctrine_Record_Abstract implements Count return $this; } - + /** * refresh * refres data of related objects from the database @@ -682,7 +709,7 @@ abstract class Doctrine_Record extends Doctrine_Record_Abstract implements Count { $this->_references = array(); } - + /** * getTable * returns the table object for this record @@ -693,6 +720,7 @@ abstract class Doctrine_Record extends Doctrine_Record_Abstract implements Count { return $this->_table; } + /** * getData * return all the internal data @@ -703,6 +731,7 @@ abstract class Doctrine_Record extends Doctrine_Record_Abstract implements Count { return $this->_data; } + /** * rawGet * returns the value of a property, if the property is not yet loaded @@ -712,7 +741,6 @@ abstract class Doctrine_Record extends Doctrine_Record_Abstract implements Count * @throws Doctrine_Record_Exception if trying to get an unknown property * @return mixed */ - public function rawGet($name) { if ( ! isset($this->_data[$name])) { @@ -742,6 +770,7 @@ abstract class Doctrine_Record extends Doctrine_Record_Abstract implements Count } return false; } + /** * get * returns a value of a property or a related component @@ -795,6 +824,7 @@ abstract class Doctrine_Record extends Doctrine_Record_Abstract implements Count } } } + /** * mapValue * This simple method is used for mapping values to $values property. @@ -810,6 +840,7 @@ abstract class Doctrine_Record extends Doctrine_Record_Abstract implements Count $name = strtolower($name); $this->_values[$name] = $value; } + /** * set * method for altering properties and Doctrine_Record references @@ -919,6 +950,7 @@ abstract class Doctrine_Record extends Doctrine_Record_Abstract implements Count $this->_references[$name] = $value; } + /** * contains * @@ -945,6 +977,7 @@ abstract class Doctrine_Record extends Doctrine_Record_Abstract implements Count } return false; } + /** * @param string $name * @return void @@ -956,6 +989,7 @@ abstract class Doctrine_Record extends Doctrine_Record_Abstract implements Count } // todo: what to do with references ? } + /** * applies the changes made to this object into database * this method is smart enough to know if any changes are made @@ -973,6 +1007,7 @@ abstract class Doctrine_Record extends Doctrine_Record_Abstract implements Count } $conn->unitOfWork->saveGraph($this); } + /** * Tries to save the object and all its related components. * In contrast to Doctrine_Record::save(), this method does not @@ -990,6 +1025,7 @@ abstract class Doctrine_Record extends Doctrine_Record_Abstract implements Count return false; } } + /** * replace * Execute a SQL REPLACE query. A REPLACE query is identical to a INSERT @@ -1016,6 +1052,7 @@ abstract class Doctrine_Record extends Doctrine_Record_Abstract implements Count return $conn->replace($this->_table->getTableName(), $this->getPrepared(), $this->id); } + /** * returns an array of modified fields and associated values * @return array @@ -1029,6 +1066,7 @@ abstract class Doctrine_Record extends Doctrine_Record_Abstract implements Count } return $a; } + /** * getPrepared * @@ -1093,6 +1131,7 @@ abstract class Doctrine_Record extends Doctrine_Record_Abstract implements Count return $a; } + /** * count * this class implements countable interface @@ -1103,6 +1142,7 @@ abstract class Doctrine_Record extends Doctrine_Record_Abstract implements Count { return count($this->_data); } + /** * alias for count() * @@ -1112,6 +1152,7 @@ abstract class Doctrine_Record extends Doctrine_Record_Abstract implements Count { return $this->count(); } + /** * toArray * returns the record as an array @@ -1135,7 +1176,7 @@ abstract class Doctrine_Record extends Doctrine_Record_Abstract implements Count } if ($deep) { foreach ($this->_references as $key => $relation) { - if (!$relation instanceof Doctrine_Null) { + if ( ! $relation instanceof Doctrine_Null) { $a[$key] = $relation->toArray($deep, $prefixKey); } } @@ -1170,6 +1211,7 @@ abstract class Doctrine_Record extends Doctrine_Record_Abstract implements Count return $this->fromArray(Doctrine_Parser::load($data, $type)); } } + /** * exists * returns true if this record is persistent, otherwise false @@ -1181,6 +1223,7 @@ abstract class Doctrine_Record extends Doctrine_Record_Abstract implements Count return ($this->_state !== Doctrine_Record::STATE_TCLEAN && $this->_state !== Doctrine_Record::STATE_TDIRTY); } + /** * isModified * returns true if this record was modified, otherwise false @@ -1192,6 +1235,7 @@ abstract class Doctrine_Record extends Doctrine_Record_Abstract implements Count return ($this->_state === Doctrine_Record::STATE_DIRTY || $this->_state === Doctrine_Record::STATE_TDIRTY); } + /** * method for checking existence of properties and Doctrine_Record references * @param mixed $name name of the property or reference @@ -1204,6 +1248,7 @@ abstract class Doctrine_Record extends Doctrine_Record_Abstract implements Count } return $this->_table->hasRelation($name); } + /** * getIterator * @return Doctrine_Record_Iterator a Doctrine_Record_Iterator that iterates through the data @@ -1212,6 +1257,7 @@ abstract class Doctrine_Record extends Doctrine_Record_Abstract implements Count { return new Doctrine_Record_Iterator($this); } + /** * deletes this data access object and all the related composites * this operation is isolated by a transaction @@ -1227,6 +1273,7 @@ abstract class Doctrine_Record extends Doctrine_Record_Abstract implements Count } return $conn->unitOfWork->delete($this); } + /** * copy * returns a copy of this object @@ -1255,6 +1302,7 @@ abstract class Doctrine_Record extends Doctrine_Record_Abstract implements Count return $ret; } + /** * copyDeep * returns a copy of this object and all its related objects @@ -1275,7 +1323,7 @@ abstract class Doctrine_Record extends Doctrine_Record_Abstract implements Count } return $copy; } - + /** * assignIdentifier * @@ -1301,6 +1349,7 @@ abstract class Doctrine_Record extends Doctrine_Record_Abstract implements Count $this->_modified = array(); } } + /** * returns the primary keys of this object * @@ -1310,6 +1359,7 @@ abstract class Doctrine_Record extends Doctrine_Record_Abstract implements Count { return $this->_id; } + /** * returns the value of autoincremented primary key of this object (if any) * @@ -1324,6 +1374,7 @@ abstract class Doctrine_Record extends Doctrine_Record_Abstract implements Count return $id; } + /** * getLast * this method is used internally be Doctrine_Query @@ -1336,6 +1387,7 @@ abstract class Doctrine_Record extends Doctrine_Record_Abstract implements Count { return $this; } + /** * hasRefence * @param string $name @@ -1345,6 +1397,7 @@ abstract class Doctrine_Record extends Doctrine_Record_Abstract implements Count { return isset($this->_references[$name]); } + /** * reference * @@ -1356,6 +1409,7 @@ abstract class Doctrine_Record extends Doctrine_Record_Abstract implements Count return $this->_references[$name]; } } + /** * obtainReference * @@ -1369,6 +1423,7 @@ abstract class Doctrine_Record extends Doctrine_Record_Abstract implements Count } throw new Doctrine_Record_Exception("Unknown reference $name"); } + /** * getReferences * @return array all references @@ -1377,6 +1432,7 @@ abstract class Doctrine_Record extends Doctrine_Record_Abstract implements Count { return $this->_references; } + /** * setRelated * @@ -1387,6 +1443,7 @@ abstract class Doctrine_Record extends Doctrine_Record_Abstract implements Count { $this->_references[$alias] = $coll; } + /** * loadReference * loads a related component @@ -1420,7 +1477,7 @@ abstract class Doctrine_Record extends Doctrine_Record_Abstract implements Count } } } - + /** * call * @@ -1444,6 +1501,7 @@ abstract class Doctrine_Record extends Doctrine_Record_Abstract implements Count } return $this; } + /** * getter for node assciated with this record * @@ -1469,6 +1527,7 @@ abstract class Doctrine_Record extends Doctrine_Record_Abstract implements Count { return $this->_table->unshiftFilter($filter); } + /** * revert * reverts this record to given version, this method only works if versioning plugin @@ -1493,6 +1552,7 @@ abstract class Doctrine_Record extends Doctrine_Record_Abstract implements Count return $this; } + /** * unlink * removes links from this record to given records @@ -1543,6 +1603,7 @@ abstract class Doctrine_Record extends Doctrine_Record_Abstract implements Count } return $this; } + /** * __call * this method is a magic method that is being used for method overloading @@ -1574,6 +1635,7 @@ abstract class Doctrine_Record extends Doctrine_Record_Abstract implements Count throw new Doctrine_Record_Exception('Unknown method ' . $method); } + /** * used to delete node from tree - MUST BE USE TO DELETE RECORD IF TABLE ACTS AS TREE * @@ -1585,6 +1647,7 @@ abstract class Doctrine_Record extends Doctrine_Record_Abstract implements Count { return Doctrine::dump(get_object_vars($this)); } + /** * returns a string representation of this object */ diff --git a/lib/Doctrine/Record/Abstract.php b/lib/Doctrine/Record/Abstract.php index 85e5a959c..4ead239b8 100644 --- a/lib/Doctrine/Record/Abstract.php +++ b/lib/Doctrine/Record/Abstract.php @@ -36,6 +36,7 @@ abstract class Doctrine_Record_Abstract extends Doctrine_Access * @param Doctrine_Table $_table reference to associated Doctrine_Table instance */ protected $_table; + /** * addListener * @@ -48,6 +49,7 @@ abstract class Doctrine_Record_Abstract extends Doctrine_Access return $this; } + /** * getListener * @@ -57,6 +59,7 @@ abstract class Doctrine_Record_Abstract extends Doctrine_Access { return $this->_table->getRecordListener(); } + /** * setListener * @@ -69,6 +72,7 @@ abstract class Doctrine_Record_Abstract extends Doctrine_Access return $this; } + /** * index * defines or retrieves an index @@ -137,6 +141,7 @@ abstract class Doctrine_Record_Abstract extends Doctrine_Access $this->_table->setAttribute($attr, $value); } } + /** * option * sets or retrieves an option @@ -160,6 +165,7 @@ abstract class Doctrine_Record_Abstract extends Doctrine_Access $this->_table->setOption($name, $value); } } + /** * ownsOne * binds One-to-One composite relation @@ -175,6 +181,7 @@ abstract class Doctrine_Record_Abstract extends Doctrine_Access return $this; } + /** * ownsMany * binds One-to-Many / Many-to-Many composite relation @@ -189,6 +196,7 @@ abstract class Doctrine_Record_Abstract extends Doctrine_Access $this->_table->bind(func_get_args(), Doctrine_Relation::MANY_COMPOSITE); return $this; } + /** * hasOne * binds One-to-One aggregate relation @@ -204,6 +212,7 @@ abstract class Doctrine_Record_Abstract extends Doctrine_Access return $this; } + /** * hasMany * binds One-to-Many / Many-to-Many aggregate relation @@ -219,6 +228,7 @@ abstract class Doctrine_Record_Abstract extends Doctrine_Access return $this; } + /** * hasColumn * sets a column definition @@ -248,6 +258,7 @@ abstract class Doctrine_Record_Abstract extends Doctrine_Access { $this->actAs($template, $options); } + /** * bindQueryParts * binds query parts to given component @@ -261,6 +272,7 @@ abstract class Doctrine_Record_Abstract extends Doctrine_Access return $this; } + /** * actAs * loads a given plugin @@ -299,6 +311,7 @@ abstract class Doctrine_Record_Abstract extends Doctrine_Access return $this; } + /** * check * adds a check constraint diff --git a/lib/Doctrine/Record/Filter.php b/lib/Doctrine/Record/Filter.php index ffa167453..13a0fa964 100644 --- a/lib/Doctrine/Record/Filter.php +++ b/lib/Doctrine/Record/Filter.php @@ -43,6 +43,7 @@ abstract class Doctrine_Record_Filter { return $this->_table; } + /** * filterSet * defines an implementation for filtering the set() method of Doctrine_Record @@ -50,6 +51,7 @@ abstract class Doctrine_Record_Filter * @param mixed $name name of the property or related component */ abstract public function filterSet(Doctrine_Record $record, $name, $value); + /** * filterGet * defines an implementation for filtering the get() method of Doctrine_Record diff --git a/lib/Doctrine/Record/Filter/Compound.php b/lib/Doctrine/Record/Filter/Compound.php index 032ddc7b9..4106446f7 100644 --- a/lib/Doctrine/Record/Filter/Compound.php +++ b/lib/Doctrine/Record/Filter/Compound.php @@ -45,6 +45,7 @@ class Doctrine_Record_Filter_Compound extends Doctrine_Record_Filter $this->_table->getRelation($alias); } } + /** * filterSet * defines an implementation for filtering the set() method of Doctrine_Record diff --git a/lib/Doctrine/Record/Filter/Standard.php b/lib/Doctrine/Record/Filter/Standard.php index 6e33175d6..91190aa08 100644 --- a/lib/Doctrine/Record/Filter/Standard.php +++ b/lib/Doctrine/Record/Filter/Standard.php @@ -43,6 +43,7 @@ class Doctrine_Record_Filter_Standard extends Doctrine_Record_Filter { throw new Doctrine_Record_Exception('Unknown record property / related component \'' . $name . '\'.'); } + /** * filterGet * defines an implementation for filtering the get() method of Doctrine_Record diff --git a/lib/Doctrine/Record/Iterator.php b/lib/Doctrine/Record/Iterator.php index d62e8b532..4046c6932 100644 --- a/lib/Doctrine/Record/Iterator.php +++ b/lib/Doctrine/Record/Iterator.php @@ -36,10 +36,12 @@ class Doctrine_Record_Iterator extends ArrayIterator * @var Doctrine_Record $record */ private $record; + /** * @var Doctrine_Null $null */ private static $null; + /** * constructor * @@ -50,6 +52,7 @@ class Doctrine_Record_Iterator extends ArrayIterator $this->record = $record; parent::__construct($record->getData()); } + /** * initNullObject * @@ -59,6 +62,7 @@ class Doctrine_Record_Iterator extends ArrayIterator { self::$null = $null; } + /** * current * diff --git a/lib/Doctrine/Record/Listener/Chain.php b/lib/Doctrine/Record/Listener/Chain.php index 3d939484c..279865ab3 100644 --- a/lib/Doctrine/Record/Listener/Chain.php +++ b/lib/Doctrine/Record/Listener/Chain.php @@ -39,6 +39,7 @@ class Doctrine_Record_Listener_Chain extends Doctrine_Access implements Doctrine * @var array $listeners an array containing all listeners */ protected $_listeners = array(); + /** * add * adds a listener to the chain of listeners @@ -60,6 +61,7 @@ class Doctrine_Record_Listener_Chain extends Doctrine_Access implements Doctrine $this->_listeners[$name] = $listener; } } + /** * returns a Doctrine_Record_Listener on success * and null on failure @@ -74,6 +76,7 @@ class Doctrine_Record_Listener_Chain extends Doctrine_Access implements Doctrine } return $this->_listeners[$key]; } + /** * set * diff --git a/lib/Doctrine/Relation.php b/lib/Doctrine/Relation.php index f605fafb4..4bb3ae43a 100644 --- a/lib/Doctrine/Relation.php +++ b/lib/Doctrine/Relation.php @@ -18,6 +18,7 @@ * and is licensed under the LGPL. For more information, see * <http://www.phpdoctrine.com>. */ + /** * Doctrine_Relation * This class represents a relation between components @@ -40,14 +41,17 @@ abstract class Doctrine_Relation implements ArrayAccess * constant for ONE_TO_ONE and MANY_TO_ONE aggregate relationships */ const ONE_AGGREGATE = 0; + /** * constant for ONE_TO_ONE and MANY_TO_ONE composite relationships */ const ONE_COMPOSITE = 1; + /** * constant for MANY_TO_MANY and ONE_TO_MANY aggregate relationships */ const MANY_AGGREGATE = 2; + /** * constant for MANY_TO_MANY and ONE_TO_MANY composite relationships */ @@ -71,6 +75,7 @@ abstract class Doctrine_Relation implements ArrayAccess 'constraint' => false, 'equal' => false, ); + /** * constructor * @@ -132,6 +137,7 @@ abstract class Doctrine_Relation implements ArrayAccess $this->definition = $def; } + /** * hasConstraint * whether or not this relation has an explicit constraint @@ -183,6 +189,7 @@ abstract class Doctrine_Relation implements ArrayAccess { $this->definition[$offset] = false; } + /** * toArray * @@ -192,6 +199,7 @@ abstract class Doctrine_Relation implements ArrayAccess { return $this->definition; } + /** * getAlias * returns the relation alias @@ -202,6 +210,7 @@ abstract class Doctrine_Relation implements ArrayAccess { return $this->definition['alias']; } + /** * getType * returns the relation type, either 0 or 1 @@ -213,6 +222,7 @@ abstract class Doctrine_Relation implements ArrayAccess { return $this->definition['type']; } + /** * getTable * returns the foreign table object @@ -225,6 +235,7 @@ abstract class Doctrine_Relation implements ArrayAccess ->getConnectionForComponent($this->definition['class']) ->getTable($this->definition['class']); } + /** * getLocal * returns the name of the local column @@ -235,6 +246,7 @@ abstract class Doctrine_Relation implements ArrayAccess { return $this->definition['local']; } + /** * getForeign * returns the name of the foreignkey column where @@ -246,6 +258,7 @@ abstract class Doctrine_Relation implements ArrayAccess { return $this->definition['foreign']; } + /** * isComposite * returns whether or not this relation is a composite relation @@ -257,6 +270,7 @@ abstract class Doctrine_Relation implements ArrayAccess return ($this->definition['type'] == Doctrine_Relation::ONE_COMPOSITE || $this->definition['type'] == Doctrine_Relation::MANY_COMPOSITE); } + /** * isOneToOne * returns whether or not this relation is a one-to-one relation @@ -268,6 +282,7 @@ abstract class Doctrine_Relation implements ArrayAccess return ($this->definition['type'] == Doctrine_Relation::ONE_AGGREGATE || $this->definition['type'] == Doctrine_Relation::ONE_COMPOSITE); } + /** * getRelationDql * @@ -284,6 +299,7 @@ abstract class Doctrine_Relation implements ArrayAccess return $dql; } + /** * fetchRelatedFor * @@ -293,6 +309,7 @@ abstract class Doctrine_Relation implements ArrayAccess * @return Doctrine_Record|Doctrine_Collection */ abstract public function fetchRelatedFor(Doctrine_Record $record); + /** * __toString * diff --git a/lib/Doctrine/Relation/Association.php b/lib/Doctrine/Relation/Association.php index 0ac7c2340..371cc8d50 100644 --- a/lib/Doctrine/Relation/Association.php +++ b/lib/Doctrine/Relation/Association.php @@ -46,6 +46,7 @@ class Doctrine_Relation_Association extends Doctrine_Relation { return $this->definition['refTable']; } + /** * getRelationDql * @@ -72,6 +73,7 @@ class Doctrine_Relation_Association extends Doctrine_Relation return $dql; } + /** * fetchRelatedFor * diff --git a/lib/Doctrine/Relation/ForeignKey.php b/lib/Doctrine/Relation/ForeignKey.php index b19cd20b1..911f3f2d0 100644 --- a/lib/Doctrine/Relation/ForeignKey.php +++ b/lib/Doctrine/Relation/ForeignKey.php @@ -79,6 +79,7 @@ class Doctrine_Relation_ForeignKey extends Doctrine_Relation } return $related; } + /** * getCondition * diff --git a/lib/Doctrine/Relation/LocalKey.php b/lib/Doctrine/Relation/LocalKey.php index e5c3b8260..de40593a0 100644 --- a/lib/Doctrine/Relation/LocalKey.php +++ b/lib/Doctrine/Relation/LocalKey.php @@ -65,7 +65,7 @@ class Doctrine_Relation_LocalKey extends Doctrine_Relation return $related; } - + /** * getCondition * diff --git a/lib/Doctrine/Relation/Nest.php b/lib/Doctrine/Relation/Nest.php index 9ad1c5b24..978cca092 100644 --- a/lib/Doctrine/Relation/Nest.php +++ b/lib/Doctrine/Relation/Nest.php @@ -71,6 +71,7 @@ class Doctrine_Relation_Nest extends Doctrine_Relation_Association return $dql; } + /** public function fetchRelatedFor(Doctrine_Record $record) { diff --git a/lib/Doctrine/Relation/Parser.php b/lib/Doctrine/Relation/Parser.php index b1a44db9d..f2b309047 100644 --- a/lib/Doctrine/Relation/Parser.php +++ b/lib/Doctrine/Relation/Parser.php @@ -18,6 +18,7 @@ * and is licensed under the LGPL. For more information, see * <http://www.phpdoctrine.com>. */ + /** * Doctrine_Relation_Parser * @@ -35,14 +36,17 @@ class Doctrine_Relation_Parser * @var Doctrine_Table $_table the table object this parser belongs to */ protected $_table; + /** * @var array $_relations an array containing all the Doctrine_Relation objects for this table */ protected $_relations = array(); + /** * @var array $_pending relations waiting for parsing */ protected $_pending = array(); + /** * constructor * @@ -52,6 +56,7 @@ class Doctrine_Relation_Parser { $this->_table = $table; } + /** * getTable * @@ -61,6 +66,7 @@ class Doctrine_Relation_Parser { return $this->_table; } + /** * getPendingRelation * @@ -83,6 +89,7 @@ class Doctrine_Relation_Parser return true; } + /** * binds a relation * @@ -124,6 +131,7 @@ class Doctrine_Relation_Parser return $this->_pending[$alias]; } + /** * getRelation * @@ -195,6 +203,7 @@ class Doctrine_Relation_Parser throw new Doctrine_Table_Exception('Unknown relation alias ' . $alias); } } + /** * getRelations * returns an array containing all relation objects @@ -209,6 +218,7 @@ class Doctrine_Relation_Parser return $this->_relations; } + /** * getImpl * returns the table class of the concrete implementation for given template @@ -233,6 +243,7 @@ class Doctrine_Relation_Parser return $conn->getTable($impl); } + /** * Completes the given association definition * @@ -281,6 +292,7 @@ class Doctrine_Relation_Parser } return $def; } + /** * getIdentifiers * gives a list of identifiers from given table @@ -305,6 +317,7 @@ class Doctrine_Relation_Parser return $columns; } + /** * guessColumns * @@ -342,6 +355,7 @@ class Doctrine_Relation_Parser return $columns; } + /** * Completes the given definition * diff --git a/lib/Doctrine/Resource/Client.php b/lib/Doctrine/Resource/Client.php index 08bf0e47d..fcf98bc92 100644 --- a/lib/Doctrine/Resource/Client.php +++ b/lib/Doctrine/Resource/Client.php @@ -38,7 +38,7 @@ class Doctrine_Resource_Client extends Doctrine_Resource { static $instance; - if (!$instance) { + if ( ! $instance) { $instance = new Doctrine_Resource_Client($url, $config); if ($instance->loadDoctrine === true) { @@ -80,7 +80,7 @@ class Doctrine_Resource_Client extends Doctrine_Resource $import = new Doctrine_Import_Schema(); $schema = $import->buildSchema($path, Doctrine_Resource::FORMAT); - if (!file_exists($classesPath)) { + if ( ! file_exists($classesPath)) { $build = "<?php\n"; foreach ($schema['schema'] as $className => $details) { $build .= "class " . $className . " extends Doctrine_Resource_Record { protected \$_model = '".$className."'; public function __construct() { parent::__construct(\$this->_model); } }\n"; @@ -106,7 +106,7 @@ class Doctrine_Resource_Client extends Doctrine_Resource { static $instance; - if(!isset($instance[$table])) { + if( ! isset($instance[$table])) { $instance[$table] = new Doctrine_Resource_Table($table); } diff --git a/lib/Doctrine/Resource/Collection.php b/lib/Doctrine/Resource/Collection.php index 303270e67..dad3e08a5 100644 --- a/lib/Doctrine/Resource/Collection.php +++ b/lib/Doctrine/Resource/Collection.php @@ -53,7 +53,7 @@ class Doctrine_Resource_Collection extends Doctrine_Resource_Access implements C public function get($key) { - if (!isset($key) || !isset($this->_data[$key])) { + if ( ! isset($key) || !isset($this->_data[$key])) { return $this->add(); } else { return $this->_data[$key]; @@ -62,7 +62,7 @@ class Doctrine_Resource_Collection extends Doctrine_Resource_Access implements C public function set($key, $value) { - if (!isset($key) || !isset($this->_data[$key])) { + if ( ! isset($key) || !isset($this->_data[$key])) { $this->_data[$key] = $value; } else { $val = $this->add(); @@ -73,7 +73,7 @@ class Doctrine_Resource_Collection extends Doctrine_Resource_Access implements C public function add(Doctrine_Resource_Record $value = null) { - if (!$value) { + if ( ! $value) { $value = new $this->_model; } diff --git a/lib/Doctrine/Resource/Query.php b/lib/Doctrine/Resource/Query.php index 420326f47..44821c3d9 100644 --- a/lib/Doctrine/Resource/Query.php +++ b/lib/Doctrine/Resource/Query.php @@ -59,7 +59,7 @@ class Doctrine_Resource_Query $response = $request->execute(); - if (!empty($response)) { + if ( ! empty($response)) { $collection = new Doctrine_Resource_Collection($this->getModel()); $collection->fromArray($response); @@ -75,7 +75,7 @@ class Doctrine_Resource_Query public function getDql() { - if (!$this->_dql && !empty($this->_parts)) { + if ( ! $this->_dql && !empty($this->_parts)) { $q = ''; $q .= ( ! empty($this->_parts['select']))? 'SELECT ' . implode(', ', $this->_parts['select']) : ''; $q .= ( ! empty($this->_parts['from']))? ' FROM ' . implode(' ', $this->_parts['from']) : ''; @@ -116,7 +116,7 @@ class Doctrine_Resource_Query return $e[0]; } - + /** * addSelect * adds fields to the SELECT part of the query @@ -128,6 +128,7 @@ class Doctrine_Resource_Query { return $this->parseQueryPart('select', $select, true); } + /** * addFrom * adds fields to the FROM part of the query @@ -139,6 +140,7 @@ class Doctrine_Resource_Query { return $this->parseQueryPart('from', $from, true); } + /** * addWhere * adds conditions to the WHERE part of the query @@ -151,6 +153,7 @@ class Doctrine_Resource_Query { return $this->parseQueryPart('where', $where, true); } + /** * addGroupBy * adds fields to the GROUP BY part of the query @@ -162,6 +165,7 @@ class Doctrine_Resource_Query { return $this->parseQueryPart('groupby', $groupby, true); } + /** * addHaving * adds conditions to the HAVING part of the query @@ -174,6 +178,7 @@ class Doctrine_Resource_Query { return $this->parseQueryPart('having', $having, true); } + /** * addOrderBy * adds fields to the ORDER BY part of the query @@ -185,6 +190,7 @@ class Doctrine_Resource_Query { return $this->parseQueryPart('orderby', $orderby, true); } + /** * select * sets the SELECT part of the query @@ -196,6 +202,7 @@ class Doctrine_Resource_Query { return $this->parseQueryPart('select', $select); } + /** * distinct * Makes the query SELECT DISTINCT. @@ -207,6 +214,7 @@ class Doctrine_Resource_Query { $this->parseQueryPart('distinct', (bool) $flag); } + /** * from * sets the FROM part of the query @@ -218,6 +226,7 @@ class Doctrine_Resource_Query { return $this->parseQueryPart('from', $from); } + /** * innerJoin * appends an INNER JOIN to the FROM part of the query @@ -229,6 +238,7 @@ class Doctrine_Resource_Query { return $this->parseQueryPart('from', 'INNER JOIN ' . $join, true); } + /** * leftJoin * appends a LEFT JOIN to the FROM part of the query @@ -240,6 +250,7 @@ class Doctrine_Resource_Query { return $this->parseQueryPart('from', 'LEFT JOIN ' . $join, true); } + /** * groupBy * sets the GROUP BY part of the query @@ -251,6 +262,7 @@ class Doctrine_Resource_Query { return $this->parseQueryPart('groupby', $groupby); } + /** * where * sets the WHERE part of the query @@ -263,6 +275,7 @@ class Doctrine_Resource_Query { return $this->parseQueryPart('where', $where); } + /** * having * sets the HAVING part of the query @@ -275,6 +288,7 @@ class Doctrine_Resource_Query { return $this->parseQueryPart('having', $having); } + /** * orderBy * sets the ORDER BY part of the query @@ -286,6 +300,7 @@ class Doctrine_Resource_Query { return $this->parseQueryPart('orderby', $orderby); } + /** * limit * sets the Query query limit @@ -297,6 +312,7 @@ class Doctrine_Resource_Query { return $this->parseQueryPart('limit', $limit); } + /** * offset * sets the Query query offset @@ -308,7 +324,7 @@ class Doctrine_Resource_Query { return $this->parseQueryPart('offset', $offset); } - + /** * parseQueryPart * parses given DQL query part diff --git a/lib/Doctrine/Resource/Record.php b/lib/Doctrine/Resource/Record.php index c790b3b7b..087c49ca0 100644 --- a/lib/Doctrine/Resource/Record.php +++ b/lib/Doctrine/Resource/Record.php @@ -57,7 +57,7 @@ class Doctrine_Resource_Record extends Doctrine_Resource_Access implements Count $columns = $schema['columns']; foreach ($columns as $column) { - if (!isset($this->_data[$column['name']]) || $this->_data[$column['name']]) { + if ( ! isset($this->_data[$column['name']]) || $this->_data[$column['name']]) { $this->_data[$column['name']] = null; } } @@ -71,15 +71,15 @@ class Doctrine_Resource_Record extends Doctrine_Resource_Access implements Count public function get($key) { - if (!isset($key)) { + if ( ! isset($key)) { return; } - if (!isset($this->_data[$key]) && $this->getTable()->hasRelation($key)) { + if ( ! isset($this->_data[$key]) && $this->getTable()->hasRelation($key)) { $this->_data[$key] = $this->createRelation($key); } - if (!array_key_exists($key, $this->_data)) { + if ( ! array_key_exists($key, $this->_data)) { throw new Doctrine_Resource_Exception('Unknown property / related component: '.$key); } @@ -88,15 +88,15 @@ class Doctrine_Resource_Record extends Doctrine_Resource_Access implements Count public function set($key, $value) { - if (!isset($key)) { + if ( ! isset($key)) { return; } - if (!isset($this->_data[$key]) && $this->getTable()->hasRelation($key)) { + if ( ! isset($this->_data[$key]) && $this->getTable()->hasRelation($key)) { $this->_data[$key] = $this->createRelation($key); } - if (!array_key_exists($key, $this->_data)) { + if ( ! array_key_exists($key, $this->_data)) { throw new Doctrine_Resource_Exception('Unknown property / related component: '.$key); } @@ -135,13 +135,13 @@ class Doctrine_Resource_Record extends Doctrine_Resource_Access implements Count { global $gotten; - if (!$gotten) { + if ( ! $gotten) { $gotten = array(); } $md5Hash = $this->getMd5Hash(); - if (!in_array($md5Hash, $gotten)) { + if ( ! in_array($md5Hash, $gotten)) { $gotten[] = $md5Hash; } @@ -240,7 +240,7 @@ class Doctrine_Resource_Record extends Doctrine_Resource_Access implements Count $identifier = $this->identifier(); foreach ($identifier as $key => $value) { - if (!$value) { + if ( ! $value) { return false; } } diff --git a/lib/Doctrine/Resource/Server.php b/lib/Doctrine/Resource/Server.php index 0608c9452..a41e559c2 100644 --- a/lib/Doctrine/Resource/Server.php +++ b/lib/Doctrine/Resource/Server.php @@ -45,7 +45,7 @@ class Doctrine_Resource_Server extends Doctrine_Resource { static $instance; - if (!$instance) { + if ( ! $instance) { $instance = new Doctrine_Resource_Server($name, $config); } @@ -54,7 +54,7 @@ class Doctrine_Resource_Server extends Doctrine_Resource public function validate($errors) { - if (!empty($errors)) { + if ( ! empty($errors)) { throw new Doctrine_Resource_Exception(count($errors) . ' error(s) occurred: ' . implode('. ', $errors)); } else { return true; @@ -65,11 +65,11 @@ class Doctrine_Resource_Server extends Doctrine_Resource { $errors = array(); - if (!$request->has('model') || !$request->get('model')) { + if ( ! $request->has('model') || !$request->get('model')) { $errors[] = 'You must specify the model/class name you are deleting'; } - if (!$request->has('identifier') || !is_array($request->get('identifier'))) { + if ( ! $request->has('identifier') || !is_array($request->get('identifier'))) { $errors[] = 'You must specify an array containing the identifiers for the model you wish to delete'; } @@ -80,7 +80,7 @@ class Doctrine_Resource_Server extends Doctrine_Resource { $errors = $this->validateOpenRecord($request); - if (!$request->has('data') || !$request->get('data')) { + if ( ! $request->has('data') || !$request->get('data')) { $errors[] = 'You must specify an containing the changed data to save to the model'; } @@ -97,7 +97,7 @@ class Doctrine_Resource_Server extends Doctrine_Resource $existing = true; foreach ($identifier as $key => $value) { - if (!$value) { + if ( ! $value) { $existing = false; } } @@ -139,7 +139,7 @@ class Doctrine_Resource_Server extends Doctrine_Resource { $errors = array(); - if (!$request->has('dql') || !$request->get('dql')) { + if ( ! $request->has('dql') || !$request->get('dql')) { $errors[] = 'You must specify a dql string in order to execute a query'; } @@ -181,7 +181,7 @@ class Doctrine_Resource_Server extends Doctrine_Resource public function execute(array $r) { - if (!isset($r['request'])) { + if ( ! isset($r['request'])) { throw new Doctrine_Resource_Exception('You must specify a request '.$this->getFormat().' string in your request'); } diff --git a/lib/Doctrine/Search/Query.php b/lib/Doctrine/Search/Query.php index 9f4ad861b..0435d0cb5 100644 --- a/lib/Doctrine/Search/Query.php +++ b/lib/Doctrine/Search/Query.php @@ -44,6 +44,7 @@ class Doctrine_Search_Query protected $_condition; + /** * @param Doctrine_Table $_table the index table */ diff --git a/lib/Doctrine/Sequence.php b/lib/Doctrine/Sequence.php index 517a40c88..2fc126c29 100644 --- a/lib/Doctrine/Sequence.php +++ b/lib/Doctrine/Sequence.php @@ -45,6 +45,7 @@ class Doctrine_Sequence extends Doctrine_Connection_Module { throw new Doctrine_Sequence_Exception('method not implemented'); } + /** * Returns the autoincrement ID if supported or $id or fetches the current * ID in a sequence called: $table.(empty($field) ? '' : '_'.$field) @@ -56,6 +57,7 @@ class Doctrine_Sequence extends Doctrine_Connection_Module { throw new Doctrine_Sequence_Exception('method not implemented'); } + /** * Returns the current id of a sequence * diff --git a/lib/Doctrine/Sequence/Firebird.php b/lib/Doctrine/Sequence/Firebird.php index f32bc230b..fb54057b4 100644 --- a/lib/Doctrine/Sequence/Firebird.php +++ b/lib/Doctrine/Sequence/Firebird.php @@ -68,6 +68,7 @@ class Doctrine_Sequence_Firebird extends Doctrine_Sequence } return $result; } + /** * Returns the autoincrement ID if supported or $id or fetches the current * ID in a sequence called: $table.(empty($field) ? '' : '_'.$field) @@ -79,6 +80,7 @@ class Doctrine_Sequence_Firebird extends Doctrine_Sequence { return $this->conn->getDbh()->lastInsertId(); } + /** * Returns the current id of a sequence * diff --git a/lib/Doctrine/Sequence/Mssql.php b/lib/Doctrine/Sequence/Mssql.php index 4daf7c13b..7d333ae0a 100644 --- a/lib/Doctrine/Sequence/Mssql.php +++ b/lib/Doctrine/Sequence/Mssql.php @@ -97,6 +97,7 @@ class Doctrine_Sequence_Mssql extends Doctrine_Sequence } return $value; } + /** * Checks if there's a sequence that exists. * @@ -139,6 +140,7 @@ class Doctrine_Sequence_Mssql extends Doctrine_Sequence return $this->conn->fetchOne($query); } + /** * Returns the current id of a sequence * diff --git a/lib/Doctrine/Sequence/Mysql.php b/lib/Doctrine/Sequence/Mysql.php index 76c208b5b..bfeb5c27e 100644 --- a/lib/Doctrine/Sequence/Mysql.php +++ b/lib/Doctrine/Sequence/Mysql.php @@ -80,6 +80,7 @@ class Doctrine_Sequence_Mysql extends Doctrine_Sequence } return $value; } + /** * Returns the autoincrement ID if supported or $id or fetches the current * ID in a sequence called: $table.(empty($field) ? '' : '_'.$field) @@ -92,6 +93,7 @@ class Doctrine_Sequence_Mysql extends Doctrine_Sequence { return $this->conn->getDbh()->lastInsertId(); } + /** * Returns the current id of a sequence * diff --git a/lib/Doctrine/Sequence/Oracle.php b/lib/Doctrine/Sequence/Oracle.php index be9ca48a7..b89687f02 100644 --- a/lib/Doctrine/Sequence/Oracle.php +++ b/lib/Doctrine/Sequence/Oracle.php @@ -61,6 +61,7 @@ class Doctrine_Sequence_Oracle extends Doctrine_Sequence } return $result; } + /** * Returns the autoincrement ID if supported or $id or fetches the current * ID in a sequence called: $table.(empty($field) ? '' : '_'.$field) @@ -75,6 +76,7 @@ class Doctrine_Sequence_Oracle extends Doctrine_Sequence return $this->conn->fetchOne('SELECT ' . $sequenceName . '.currval'); } + /** * Returns the current id of a sequence * diff --git a/lib/Doctrine/Sequence/Pgsql.php b/lib/Doctrine/Sequence/Pgsql.php index 28b29acc8..c5ea04482 100644 --- a/lib/Doctrine/Sequence/Pgsql.php +++ b/lib/Doctrine/Sequence/Pgsql.php @@ -60,6 +60,7 @@ class Doctrine_Sequence_Pgsql extends Doctrine_Sequence } return $result; } + /** * lastInsertId * @@ -77,6 +78,7 @@ class Doctrine_Sequence_Pgsql extends Doctrine_Sequence return (int) $this->conn->fetchOne("SELECT CURRVAL('" . $sequenceName . "')"); } + /** * Returns the current id of a sequence * diff --git a/lib/Doctrine/Sequence/Sqlite.php b/lib/Doctrine/Sequence/Sqlite.php index 496996d2a..19ca392a9 100644 --- a/lib/Doctrine/Sequence/Sqlite.php +++ b/lib/Doctrine/Sequence/Sqlite.php @@ -81,6 +81,7 @@ class Doctrine_Sequence_Sqlite extends Doctrine_Sequence } return $value; } + /** * Returns the autoincrement ID if supported or $id or fetches the current * ID in a sequence called: $table.(empty($field) ? '' : '_'.$field) @@ -93,6 +94,7 @@ class Doctrine_Sequence_Sqlite extends Doctrine_Sequence { return $this->conn->getDbh()->lastInsertId(); } + /** * Returns the current id of a sequence * diff --git a/lib/Doctrine/Table.php b/lib/Doctrine/Table.php index 4c432492e..ddc68c7e3 100644 --- a/lib/Doctrine/Table.php +++ b/lib/Doctrine/Table.php @@ -18,6 +18,7 @@ * and is licensed under the LGPL. For more information, see * <http://www.phpdoctrine.com>. */ + /** * Doctrine_Table represents a database table * each Doctrine_Table holds the information of foreignKeys and associations @@ -37,27 +38,33 @@ class Doctrine_Table extends Doctrine_Configurable implements Countable * @var array $data temporary data which is then loaded into Doctrine_Record::$data */ protected $_data = array(); + /** * @var mixed $identifier */ protected $_identifier; + /** * @see Doctrine_Identifier constants * @var integer $identifierType the type of identifier this table uses */ protected $_identifierType; + /** * @var Doctrine_Connection $conn Doctrine_Connection object that created this table */ protected $_conn; + /** * @var array $identityMap first level cache */ protected $_identityMap = array(); + /** * @var Doctrine_Table_Repository $repository record repository */ protected $_repository; + /** * @var array $columns an array of column definitions, * keys as column names and values as column definitions @@ -74,20 +81,24 @@ class Doctrine_Table extends Doctrine_Configurable implements Countable * ... many more */ protected $_columns = array(); + /** * @var array $columnAliases an array of column aliases * keys as column aliases and values as column names */ protected $_columnAliases = array(); + /** * @var integer $columnCount cached column count, Doctrine_Record uses this column count in when * determining its state */ protected $columnCount; + /** * @var boolean $hasDefaultValues whether or not this table has default values */ protected $hasDefaultValues; + /** * @var array $options an array containing all options * @@ -146,22 +157,27 @@ class Doctrine_Table extends Doctrine_Configurable implements Countable 'queryParts' => array(), 'versioning' => null, ); + /** * @var Doctrine_Tree $tree tree object associated with this table */ protected $_tree; + /** * @var Doctrine_Relation_Parser $_parser relation parser object */ protected $_parser; + /** * @var array $_templates an array containing all templates attached to this table */ protected $_templates = array(); + /** * @var array $_filters an array containing all record filters attached to this table */ protected $_filters = array(); + /** * @var array $_invokedMethods method invoker cache */ @@ -328,6 +344,7 @@ class Doctrine_Table extends Doctrine_Configurable implements Countable { $this->_invokedMethods[$method] = $class; } + /** * getTemplates * returns all templates attached to this table @@ -338,6 +355,7 @@ class Doctrine_Table extends Doctrine_Configurable implements Countable { return $this->_templates; } + /** * export * exports this table to database based on column and option definitions @@ -351,6 +369,7 @@ class Doctrine_Table extends Doctrine_Configurable implements Countable { $this->_conn->export->exportTable($this); } + /** * getExportableFormat * returns exportable presentation of this object @@ -437,6 +456,7 @@ class Doctrine_Table extends Doctrine_Configurable implements Countable 'columns' => $columns, 'options' => array_merge($this->getOptions(), $options)); } + /** * exportConstraints * exports the constraints of this table into database based on option definitions @@ -459,6 +479,7 @@ class Doctrine_Table extends Doctrine_Configurable implements Countable throw $e; } } + /** * getRelationParser * return the relation parser associated with this table @@ -469,6 +490,7 @@ class Doctrine_Table extends Doctrine_Configurable implements Countable { return $this->_parser; } + /** * __get * an alias for getOption @@ -482,6 +504,7 @@ class Doctrine_Table extends Doctrine_Configurable implements Countable } return null; } + /** * __isset * @@ -491,6 +514,7 @@ class Doctrine_Table extends Doctrine_Configurable implements Countable { return isset($this->_options[$option]); } + /** * getOptions * returns all options of this table and the associated values @@ -501,6 +525,7 @@ class Doctrine_Table extends Doctrine_Configurable implements Countable { return $this->_options; } + /** * addForeignKey * @@ -512,6 +537,7 @@ class Doctrine_Table extends Doctrine_Configurable implements Countable { $this->_options['foreignKeys'][] = $definition; } + /** * addCheckConstraint * @@ -529,6 +555,7 @@ class Doctrine_Table extends Doctrine_Configurable implements Countable return $this; } + /** * addIndex * @@ -540,6 +567,7 @@ class Doctrine_Table extends Doctrine_Configurable implements Countable { $this->_options['indexes'][$index] = $definition; } + /** * getIndex * @@ -618,6 +646,7 @@ class Doctrine_Table extends Doctrine_Configurable implements Countable { return $this->_parser->getRelation($alias, $recursive); } + /** * getRelations * returns an array containing all relation objects @@ -628,6 +657,7 @@ class Doctrine_Table extends Doctrine_Configurable implements Countable { return $this->_parser->getRelations(); } + /** * createQuery * creates a new Doctrine_Query object and adds the component name @@ -639,11 +669,12 @@ class Doctrine_Table extends Doctrine_Configurable implements Countable */ public function createQuery($alias = '') { - if (!empty($alias)) { + if ( ! empty($alias)) { $alias = ' ' . trim($alias); } return Doctrine_Query::create($this->_conn)->from($this->getComponentName() . $alias); } + /** * getRepository * @@ -653,6 +684,7 @@ class Doctrine_Table extends Doctrine_Configurable implements Countable { return $this->_repository; } + /** * setOption * sets an option and returns this object in order to @@ -680,6 +712,7 @@ class Doctrine_Table extends Doctrine_Configurable implements Countable } $this->_options[$name] = $value; } + /** * getOption * returns the value of given option @@ -694,6 +727,7 @@ class Doctrine_Table extends Doctrine_Configurable implements Countable } return null; } + /** * getColumnName * @@ -713,6 +747,7 @@ class Doctrine_Table extends Doctrine_Configurable implements Countable return $alias; } + /** * setColumn * @@ -787,6 +822,7 @@ class Doctrine_Table extends Doctrine_Configurable implements Countable $this->hasDefaultValues = true; } } + /** * hasDefaultValues * returns true if this table has default values, otherwise false @@ -797,6 +833,7 @@ class Doctrine_Table extends Doctrine_Configurable implements Countable { return $this->hasDefaultValues; } + /** * getDefaultValueOf * returns the default value(if any) for given column @@ -816,6 +853,7 @@ class Doctrine_Table extends Doctrine_Configurable implements Countable return null; } } + /** * @return mixed */ @@ -823,6 +861,7 @@ class Doctrine_Table extends Doctrine_Configurable implements Countable { return $this->_identifier; } + /** * @return integer */ @@ -830,6 +869,7 @@ class Doctrine_Table extends Doctrine_Configurable implements Countable { return $this->_identifierType; } + /** * hasColumn * @return boolean @@ -863,6 +903,7 @@ class Doctrine_Table extends Doctrine_Configurable implements Countable { return $this->_conn; } + /** * creates a new record * @@ -878,6 +919,7 @@ class Doctrine_Table extends Doctrine_Configurable implements Countable return $record; } + /** * finds a record by its identifier * @@ -897,6 +939,7 @@ class Doctrine_Table extends Doctrine_Configurable implements Countable ->where(implode(' = ? AND ', (array) $this->_identifier) . ' = ?') ->fetchOne($id, $hydrationMode); } + /** * findAll * returns a collection of records @@ -908,6 +951,7 @@ class Doctrine_Table extends Doctrine_Configurable implements Countable { return $this->createQuery()->execute(array(), $hydrationMode); } + /** * findByDql * finds records with given DQL where clause @@ -927,7 +971,7 @@ class Doctrine_Table extends Doctrine_Configurable implements Countable { return $this->findBySql($dql, $params, $hydrationMode); } - + /** * execute * fetches data using the provided queryKey and @@ -947,7 +991,7 @@ class Doctrine_Table extends Doctrine_Configurable implements Countable ->get($queryKey, $this->getComponentName()) ->execute($params, $hydrationMode); } - + /** * executeOne * fetches data using the provided queryKey and @@ -978,6 +1022,7 @@ class Doctrine_Table extends Doctrine_Configurable implements Countable { $this->_identityMap = array(); } + /** * addRecord * adds a record to identity map @@ -997,6 +1042,7 @@ class Doctrine_Table extends Doctrine_Configurable implements Countable return true; } + /** * getRecord * first checks if record exists in identityMap, if not @@ -1111,6 +1157,7 @@ class Doctrine_Table extends Doctrine_Configurable implements Countable } return $this->getRecord(); } + /** * applyInheritance * @param $where query where part to be modified @@ -1128,6 +1175,7 @@ class Doctrine_Table extends Doctrine_Configurable implements Countable } return $where; } + /** * count * @@ -1138,6 +1186,7 @@ class Doctrine_Table extends Doctrine_Configurable implements Countable $a = $this->_conn->execute('SELECT COUNT(1) FROM ' . $this->_options['tableName'])->fetch(Doctrine::FETCH_NUM); return current($a); } + /** * @return Doctrine_Query a Doctrine_Query object */ @@ -1147,6 +1196,7 @@ class Doctrine_Table extends Doctrine_Configurable implements Countable $graph->load($this->getComponentName()); return $graph; } + /** * @param string $field * @return array @@ -1159,6 +1209,7 @@ class Doctrine_Table extends Doctrine_Configurable implements Countable return array(); } } + /** * enumValue * @@ -1172,7 +1223,7 @@ class Doctrine_Table extends Doctrine_Configurable implements Countable return $index; } - if (!$this->_conn->getAttribute(Doctrine::ATTR_USE_NATIVE_ENUM) + if ( ! $this->_conn->getAttribute(Doctrine::ATTR_USE_NATIVE_ENUM) && isset($this->_columns[$field]['values'][$index]) ) { return $this->_columns[$field]['values'][$index]; @@ -1180,6 +1231,7 @@ class Doctrine_Table extends Doctrine_Configurable implements Countable return $index; } + /** * enumIndex * @@ -1215,6 +1267,7 @@ class Doctrine_Table extends Doctrine_Configurable implements Countable { return $this->_columns; } + /** * removeColumn * removes given column @@ -1231,6 +1284,7 @@ class Doctrine_Table extends Doctrine_Configurable implements Countable return false; } + /** * returns an array containing all the column names * @@ -1240,6 +1294,7 @@ class Doctrine_Table extends Doctrine_Configurable implements Countable { return array_keys($this->_columns); } + /** * getDefinitionOf * @@ -1252,6 +1307,7 @@ class Doctrine_Table extends Doctrine_Configurable implements Countable } return false; } + /** * getTypeOf * @@ -1264,6 +1320,7 @@ class Doctrine_Table extends Doctrine_Configurable implements Countable } return false; } + /** * setData * doctrine uses this function internally @@ -1276,6 +1333,7 @@ class Doctrine_Table extends Doctrine_Configurable implements Countable { $this->_data = $data; } + /** * returns internal data, used by Doctrine_Record instances * when retrieving data from database @@ -1286,6 +1344,7 @@ class Doctrine_Table extends Doctrine_Configurable implements Countable { return $this->_data; } + /** * prepareValue * this method performs special data preparation depending on @@ -1351,6 +1410,7 @@ class Doctrine_Table extends Doctrine_Configurable implements Countable } return $value; } + /** * getter for associated tree * @@ -1381,6 +1441,7 @@ class Doctrine_Table extends Doctrine_Configurable implements Countable { $this->_options['tableName'] = $tableName; } + /** * determine if table acts as tree * @@ -1410,6 +1471,7 @@ class Doctrine_Table extends Doctrine_Configurable implements Countable return $this; } + /** * bindQueryParts * binds query parts to given component @@ -1423,6 +1485,7 @@ class Doctrine_Table extends Doctrine_Configurable implements Countable return $this; } + /** * bindQueryPart * binds given value to given query part @@ -1459,6 +1522,7 @@ class Doctrine_Table extends Doctrine_Configurable implements Countable { return $this->_filters; } + /** * returns a string representation of this object * diff --git a/lib/Doctrine/Table/Repository.php b/lib/Doctrine/Table/Repository.php index 89d3dfeab..4899978df 100644 --- a/lib/Doctrine/Table/Repository.php +++ b/lib/Doctrine/Table/Repository.php @@ -18,6 +18,7 @@ * and is licensed under the LGPL. For more information, see * <http://www.phpdoctrine.com>. */ + /** * Doctrine_Repository * each record is added into Doctrine_Repository at the same time they are created, @@ -37,12 +38,14 @@ class Doctrine_Table_Repository implements Countable, IteratorAggregate * @var object Doctrine_Table $table */ private $table; + /** * @var array $registry * an array of all records * keys representing record object identifiers */ private $registry = array(); + /** * constructor * @@ -52,6 +55,7 @@ class Doctrine_Table_Repository implements Countable, IteratorAggregate { $this->table = $table; } + /** * getTable * @@ -61,6 +65,7 @@ class Doctrine_Table_Repository implements Countable, IteratorAggregate { return $this->table; } + /** * add * @@ -78,6 +83,7 @@ class Doctrine_Table_Repository implements Countable, IteratorAggregate return true; } + /** * get * @param integer $oid @@ -90,6 +96,7 @@ class Doctrine_Table_Repository implements Countable, IteratorAggregate } return $this->registry[$oid]; } + /** * count * Doctrine_Registry implements interface Countable @@ -99,6 +106,7 @@ class Doctrine_Table_Repository implements Countable, IteratorAggregate { return count($this->registry); } + /** * @param integer $oid object identifier * @return boolean whether ot not the operation was successful @@ -111,6 +119,7 @@ class Doctrine_Table_Repository implements Countable, IteratorAggregate unset($this->registry[$oid]); return true; } + /** * @return integer number of records evicted */ @@ -124,6 +133,7 @@ class Doctrine_Table_Repository implements Countable, IteratorAggregate } return $evicted; } + /** * getIterator * @return ArrayIterator @@ -132,6 +142,7 @@ class Doctrine_Table_Repository implements Countable, IteratorAggregate { return new ArrayIterator($this->registry); } + /** * contains * @param integer $oid object identifier @@ -140,6 +151,7 @@ class Doctrine_Table_Repository implements Countable, IteratorAggregate { return isset($this->registry[$oid]); } + /** * loadAll * @return void diff --git a/lib/Doctrine/Task.php b/lib/Doctrine/Task.php index 9eaa88484..86fb9ed50 100644 --- a/lib/Doctrine/Task.php +++ b/lib/Doctrine/Task.php @@ -40,7 +40,7 @@ abstract class Doctrine_Task $arguments = array(), $requiredArguments = array(), $optionalArguments = array(); - + /** * __construct * @@ -55,7 +55,7 @@ abstract class Doctrine_Task $this->taskName = str_replace('_', '-', Doctrine::tableize(str_replace('Doctrine_Task_', '', get_class($this)))); } - + /** * notify * @@ -72,7 +72,7 @@ abstract class Doctrine_Task return $notification; } } - + /** * ask * @@ -88,7 +88,7 @@ abstract class Doctrine_Task return $answer; } - + /** * execute * @@ -98,7 +98,7 @@ abstract class Doctrine_Task * @abstract */ abstract function execute(); - + /** * validate * @@ -111,14 +111,14 @@ abstract class Doctrine_Task $requiredArguments = $this->getRequiredArguments(); foreach ($requiredArguments as $arg) { - if (!isset($this->arguments[$arg])) { + if ( ! isset($this->arguments[$arg])) { return false; } } return true; } - + /** * addArgument * @@ -130,7 +130,7 @@ abstract class Doctrine_Task { $this->arguments[$name] = $value; } - + /** * getArgument * @@ -146,17 +146,17 @@ abstract class Doctrine_Task return $default; } } - + /** * getArguments * - * @return array $this->arguments + * @return array $arguments */ public function getArguments() { return $this->arguments; } - + /** * setArguments * @@ -167,7 +167,7 @@ abstract class Doctrine_Task { $this->arguments = $args; } - + /** * getTaskName * @@ -177,7 +177,7 @@ abstract class Doctrine_Task { return $this->taskName; } - + /** * getDescription * @@ -187,7 +187,7 @@ abstract class Doctrine_Task { return $this->description; } - + /** * getRequiredArguments * @@ -197,7 +197,7 @@ abstract class Doctrine_Task { return array_keys($this->requiredArguments); } - + /** * getOptionalArguments * @@ -207,7 +207,7 @@ abstract class Doctrine_Task { return array_keys($this->optionalArguments); } - + /** * getRequiredArgumentsDescriptions * @@ -217,7 +217,7 @@ abstract class Doctrine_Task { return $this->requiredArguments; } - + /** * getOptionalArgumentsDescriptions * diff --git a/lib/Doctrine/Task/DumpData.php b/lib/Doctrine/Task/DumpData.php index 2c135ef20..f925a6083 100644 --- a/lib/Doctrine/Task/DumpData.php +++ b/lib/Doctrine/Task/DumpData.php @@ -45,7 +45,7 @@ class Doctrine_Task_DumpData extends Doctrine_Task $path = $this->getArgument('data_fixtures_path'); - if (!$individualFiles) { + if ( ! $individualFiles) { $e = explode('.', $this->getArgument('data_fixtures_path')); if (end($e) !== 'yml') { diff --git a/lib/Doctrine/Template.php b/lib/Doctrine/Template.php index e80013fb4..883843dea 100644 --- a/lib/Doctrine/Template.php +++ b/lib/Doctrine/Template.php @@ -39,6 +39,7 @@ class Doctrine_Template extends Doctrine_Record_Abstract protected $_plugin; + /** * setTable * @@ -48,6 +49,7 @@ class Doctrine_Template extends Doctrine_Record_Abstract { $this->_table = $table; } + /** * getTable * returns the associated table object @@ -58,6 +60,7 @@ class Doctrine_Template extends Doctrine_Record_Abstract { return $this->_table; } + /** * setInvoker * @@ -70,6 +73,7 @@ class Doctrine_Template extends Doctrine_Record_Abstract { $this->_invoker = $invoker; } + /** * setInvoker * returns the last used invoker diff --git a/lib/Doctrine/Template/I18n.php b/lib/Doctrine/Template/I18n.php index 6a58a248e..667c61fb9 100644 --- a/lib/Doctrine/Template/I18n.php +++ b/lib/Doctrine/Template/I18n.php @@ -18,6 +18,7 @@ * and is licensed under the LGPL. For more information, see * <http://www.phpdoctrine.com>. */ + /** * Doctrine_Template_I18n * @@ -38,6 +39,7 @@ class Doctrine_Template_I18n extends Doctrine_Template { $this->_plugin = new Doctrine_I18n($options); } + /** * translation * sets or retrieves the current translation language diff --git a/lib/Doctrine/Template/NestedSet.php b/lib/Doctrine/Template/NestedSet.php index a7b2b4346..346bc120a 100644 --- a/lib/Doctrine/Template/NestedSet.php +++ b/lib/Doctrine/Template/NestedSet.php @@ -18,6 +18,7 @@ * and is licensed under the LGPL. For more information, see * <http://www.phpdoctrine.com>. */ + /** * Doctrine_Template_NestedSet * diff --git a/lib/Doctrine/Template/Versionable.php b/lib/Doctrine/Template/Versionable.php index 6d9a332d8..65117a5a4 100644 --- a/lib/Doctrine/Template/Versionable.php +++ b/lib/Doctrine/Template/Versionable.php @@ -18,6 +18,7 @@ * and is licensed under the LGPL. For more information, see * <http://www.phpdoctrine.com>. */ + /** * Doctrine_Template_Versionable * diff --git a/lib/Doctrine/Tokenizer.php b/lib/Doctrine/Tokenizer.php index eaee80ded..5a164d7e5 100644 --- a/lib/Doctrine/Tokenizer.php +++ b/lib/Doctrine/Tokenizer.php @@ -40,6 +40,7 @@ class Doctrine_Tokenizer { } + /** * trims brackets * @@ -55,6 +56,7 @@ class Doctrine_Tokenizer return $str; } } + /** * bracketExplode * @@ -108,6 +110,7 @@ class Doctrine_Tokenizer } return $term; } + /** * quoteExplode * @@ -151,6 +154,7 @@ class Doctrine_Tokenizer } return $term; } + /** * sqlExplode * @@ -238,6 +242,7 @@ class Doctrine_Tokenizer } return $term; } + /** * clauseExplode * diff --git a/lib/Doctrine/Transaction.php b/lib/Doctrine/Transaction.php index b641fc141..5d79b11d4 100644 --- a/lib/Doctrine/Transaction.php +++ b/lib/Doctrine/Transaction.php @@ -38,26 +38,32 @@ class Doctrine_Transaction extends Doctrine_Connection_Module * Doctrine_Transaction is in sleep state when it has no active transactions */ const STATE_SLEEP = 0; + /** * Doctrine_Transaction is in active state when it has one active transaction */ const STATE_ACTIVE = 1; + /** * Doctrine_Transaction is in busy state when it has multiple active transactions */ const STATE_BUSY = 2; + /** * @var integer $transactionLevel the nesting level of transactions, used by transaction methods */ protected $transactionLevel = 0; + /** * @var array $invalid an array containing all invalid records within this transaction */ protected $invalid = array(); + /** * @var array $savepoints an array containing all savepoints */ protected $savePoints = array(); + /** * @var array $_collections an array of Doctrine_Collection objects that were affected during the Transaction */ @@ -80,6 +86,7 @@ class Doctrine_Transaction extends Doctrine_Connection_Module return $this; } + /** * getState * returns the state of this connection @@ -128,6 +135,7 @@ class Doctrine_Transaction extends Doctrine_Connection_Module { return $this->transactionLevel; } + /** * getTransactionLevel * set the current transaction nesting level @@ -140,6 +148,7 @@ class Doctrine_Transaction extends Doctrine_Connection_Module return $this; } + /** * beginTransaction * Start a transaction or set a savepoint. @@ -192,6 +201,7 @@ class Doctrine_Transaction extends Doctrine_Connection_Module return $level; } + /** * commit * Commit the database changes done during a transaction that is in diff --git a/lib/Doctrine/Transaction/Firebird.php b/lib/Doctrine/Transaction/Firebird.php index 50f846425..881176158 100644 --- a/lib/Doctrine/Transaction/Firebird.php +++ b/lib/Doctrine/Transaction/Firebird.php @@ -45,6 +45,7 @@ class Doctrine_Transaction_Firebird extends Doctrine_Transaction return $this->conn->execute($query); } + /** * releaseSavePoint * releases given savepoint @@ -58,6 +59,7 @@ class Doctrine_Transaction_Firebird extends Doctrine_Transaction return $this->conn->execute($query); } + /** * rollbackSavePoint * releases given savepoint @@ -71,6 +73,7 @@ class Doctrine_Transaction_Firebird extends Doctrine_Transaction return $this->conn->execute($query); } + /** * Set the transacton isolation level. * diff --git a/lib/Doctrine/Transaction/Mysql.php b/lib/Doctrine/Transaction/Mysql.php index 0d55b8ab1..e48478895 100644 --- a/lib/Doctrine/Transaction/Mysql.php +++ b/lib/Doctrine/Transaction/Mysql.php @@ -45,6 +45,7 @@ class Doctrine_Transaction_Mysql extends Doctrine_Transaction return $this->conn->execute($query); } + /** * releaseSavePoint * releases given savepoint @@ -58,6 +59,7 @@ class Doctrine_Transaction_Mysql extends Doctrine_Transaction return $this->conn->execute($query); } + /** * rollbackSavePoint * releases given savepoint @@ -71,6 +73,7 @@ class Doctrine_Transaction_Mysql extends Doctrine_Transaction return $this->conn->execute($query); } + /** * Set the transacton isolation level. * @@ -100,6 +103,7 @@ class Doctrine_Transaction_Mysql extends Doctrine_Transaction return $this->conn->execute($query); } + /** * getTransactionIsolation * diff --git a/lib/Doctrine/Transaction/Oracle.php b/lib/Doctrine/Transaction/Oracle.php index 449e84e6a..9f78734d0 100644 --- a/lib/Doctrine/Transaction/Oracle.php +++ b/lib/Doctrine/Transaction/Oracle.php @@ -45,6 +45,7 @@ class Doctrine_Transaction_Oracle extends Doctrine_Transaction return $this->conn->execute($query); } + /** * releaseSavePoint * releases given savepoint @@ -57,6 +58,7 @@ class Doctrine_Transaction_Oracle extends Doctrine_Transaction // oracle doesn't support manual releasing of savepoints return true; } + /** * rollbackSavePoint * releases given savepoint @@ -70,6 +72,7 @@ class Doctrine_Transaction_Oracle extends Doctrine_Transaction return $this->conn->execute($query); } + /** * Set the transacton isolation level. * diff --git a/lib/Doctrine/Transaction/Pgsql.php b/lib/Doctrine/Transaction/Pgsql.php index 77d43f027..91078a1db 100644 --- a/lib/Doctrine/Transaction/Pgsql.php +++ b/lib/Doctrine/Transaction/Pgsql.php @@ -46,6 +46,7 @@ class Doctrine_Transaction_Pgsql extends Doctrine_Transaction return $this->conn->execute($query); } + /** * releaseSavePoint * releases given savepoint @@ -59,6 +60,7 @@ class Doctrine_Transaction_Pgsql extends Doctrine_Transaction return $this->conn->execute($query); } + /** * rollbackSavePoint * releases given savepoint @@ -72,6 +74,7 @@ class Doctrine_Transaction_Pgsql extends Doctrine_Transaction return $this->conn->execute($query); } + /** * Set the transacton isolation level. * diff --git a/lib/Doctrine/Tree.php b/lib/Doctrine/Tree.php index 4e3b927e2..fcea565da 100644 --- a/lib/Doctrine/Tree.php +++ b/lib/Doctrine/Tree.php @@ -119,7 +119,7 @@ class Doctrine_Tree { $this->options[$name] = $value; } - + /** * Returns the base tree component. */ diff --git a/lib/Doctrine/Tree/AdjacencyList.php b/lib/Doctrine/Tree/AdjacencyList.php index 138c9a094..3317ac131 100644 --- a/lib/Doctrine/Tree/AdjacencyList.php +++ b/lib/Doctrine/Tree/AdjacencyList.php @@ -18,6 +18,7 @@ * and is licensed under the LGPL. For more information, see * <http://www.phpdoctrine.com>. */ + /** * Doctrine_Tree_AdjacencyList * diff --git a/lib/Doctrine/Tree/Exception.php b/lib/Doctrine/Tree/Exception.php index 5bba42f31..781a7682f 100644 --- a/lib/Doctrine/Tree/Exception.php +++ b/lib/Doctrine/Tree/Exception.php @@ -18,6 +18,7 @@ * and is licensed under the LGPL. For more information, see * <http://www.phpdoctrine.com>. */ + /** * Doctrine_Tree_Exception * diff --git a/lib/Doctrine/Tree/Interface.php b/lib/Doctrine/Tree/Interface.php index 8feeb4fb7..13fe829d7 100644 --- a/lib/Doctrine/Tree/Interface.php +++ b/lib/Doctrine/Tree/Interface.php @@ -18,6 +18,7 @@ * and is licensed under the LGPL. For more information, see * <http://www.phpdoctrine.com>. */ + /** * Doctrine_Tree_Interface * diff --git a/lib/Doctrine/Tree/MaterializedPath.php b/lib/Doctrine/Tree/MaterializedPath.php index b1fc807b7..b86a06a98 100644 --- a/lib/Doctrine/Tree/MaterializedPath.php +++ b/lib/Doctrine/Tree/MaterializedPath.php @@ -18,6 +18,7 @@ * and is licensed under the LGPL. For more information, see * <http://www.phpdoctrine.com>. */ + /** * Doctrine_Tree_MaterializedPath * diff --git a/lib/Doctrine/Tree/NestedSet.php b/lib/Doctrine/Tree/NestedSet.php index cd7d22f22..5bfd6cdee 100644 --- a/lib/Doctrine/Tree/NestedSet.php +++ b/lib/Doctrine/Tree/NestedSet.php @@ -18,6 +18,7 @@ * and is licensed under the LGPL. For more information, see * <http://www.phpdoctrine.com>. */ + /** * Doctrine_Tree_NestedSet * @@ -33,7 +34,7 @@ class Doctrine_Tree_NestedSet extends Doctrine_Tree implements Doctrine_Tree_Int { private $_baseQuery; private $_baseAlias = "base"; - + /** * constructor, creates tree with reference to table and sets default root options * @@ -49,7 +50,7 @@ class Doctrine_Tree_NestedSet extends Doctrine_Tree implements Doctrine_Tree_Int parent::__construct($table, $options); } - + /** * used to define table attributes required for the NestetSet implementation * adds lft and rgt columns for corresponding left and right values @@ -101,7 +102,7 @@ class Doctrine_Tree_NestedSet extends Doctrine_Tree implements Doctrine_Tree_Int { return $this->fetchRoot($rootId); } - + /** * Fetches a/the root node. * @@ -257,7 +258,7 @@ class Doctrine_Tree_NestedSet extends Doctrine_Tree implements Doctrine_Tree_Int return $query; } - + /** * Enter description here... * @@ -271,7 +272,7 @@ class Doctrine_Tree_NestedSet extends Doctrine_Tree implements Doctrine_Tree_Int } return $this->_baseQuery->copy(); } - + /** * Enter description here... * @@ -280,7 +281,7 @@ class Doctrine_Tree_NestedSet extends Doctrine_Tree implements Doctrine_Tree_Int { return $this->_baseAlias; } - + /** * Enter description here... * @@ -292,7 +293,7 @@ class Doctrine_Tree_NestedSet extends Doctrine_Tree implements Doctrine_Tree_Int $q->select($this->_baseAlias . ".*")->from($this->getBaseComponent() . " " . $this->_baseAlias); return $q; } - + /** * Enter description here... * @@ -307,7 +308,7 @@ class Doctrine_Tree_NestedSet extends Doctrine_Tree implements Doctrine_Tree_Int } $this->_baseQuery = $query; } - + /** * Enter description here... * @@ -316,7 +317,7 @@ class Doctrine_Tree_NestedSet extends Doctrine_Tree implements Doctrine_Tree_Int { $this->_baseQuery = null; } - + /** * Enter description here... * diff --git a/lib/Doctrine/Validator.php b/lib/Doctrine/Validator.php index 271b27e2a..dcdcb684e 100644 --- a/lib/Doctrine/Validator.php +++ b/lib/Doctrine/Validator.php @@ -18,6 +18,7 @@ * and is licensed under the LGPL. For more information, see * <http://www.phpdoctrine.com>. */ + /** * Doctrine_Validator * Doctrine_Validator performs validations in record properties @@ -36,6 +37,7 @@ class Doctrine_Validator extends Doctrine_Locator_Injectable * @var array $validators an array of validator objects */ private static $validators = array(); + /** * returns a validator object * @@ -55,6 +57,7 @@ class Doctrine_Validator extends Doctrine_Locator_Injectable } return self::$validators[$name]; } + /** * validates a given record and saves possible errors * in Doctrine_Validator::$stack @@ -158,6 +161,7 @@ class Doctrine_Validator extends Doctrine_Locator_Injectable } } } + /** * Validates the length of a field. */ @@ -176,6 +180,7 @@ class Doctrine_Validator extends Doctrine_Locator_Injectable } return true; } + /** * whether or not this validator has errors * @@ -185,6 +190,7 @@ class Doctrine_Validator extends Doctrine_Locator_Injectable { return (count($this->stack) > 0); } + /** * phpType * converts a doctrine type to native php type diff --git a/lib/Doctrine/Validator/Country.php b/lib/Doctrine/Validator/Country.php index b88e94db1..afc917426 100644 --- a/lib/Doctrine/Validator/Country.php +++ b/lib/Doctrine/Validator/Country.php @@ -276,6 +276,7 @@ class Doctrine_Validator_Country 'zm' => 'Zambia', 'zr' => 'Zaire', 'zw' => 'Zimbabwe'); + /** * returns all available country codes * @@ -285,6 +286,7 @@ class Doctrine_Validator_Country { return self::$countries; } + /** * checks if given value is a valid country code * diff --git a/lib/Doctrine/Validator/Driver.php b/lib/Doctrine/Validator/Driver.php index a11cff922..ad14d5e20 100644 --- a/lib/Doctrine/Validator/Driver.php +++ b/lib/Doctrine/Validator/Driver.php @@ -36,6 +36,7 @@ class Doctrine_Validator_Driver * @var array $_args an array of plugin specific args */ protected $_args = array(); + /** * __get * an alias for getOption @@ -49,6 +50,7 @@ class Doctrine_Validator_Driver } return null; } + /** * __isset * @@ -58,6 +60,7 @@ class Doctrine_Validator_Driver { return isset($this->_args[$arg]); } + /** * sets given value to an argument * @@ -71,6 +74,7 @@ class Doctrine_Validator_Driver return $this; } + /** * returns the value of an argument * @@ -85,6 +89,7 @@ class Doctrine_Validator_Driver return $this->_args[$arg]; } + /** * sets given value to an argument * @@ -98,6 +103,7 @@ class Doctrine_Validator_Driver return $this; } + /** * returns all args and their associated values * diff --git a/lib/Doctrine/Validator/ErrorStack.php b/lib/Doctrine/Validator/ErrorStack.php index ab0d03fa6..c4e205bcf 100644 --- a/lib/Doctrine/Validator/ErrorStack.php +++ b/lib/Doctrine/Validator/ErrorStack.php @@ -18,6 +18,7 @@ * and is licensed under the LGPL. For more information, see * <http://www.phpdoctrine.com>. */ + /** * Doctrine_Validator_ErrorStack * @@ -121,6 +122,7 @@ class Doctrine_Validator_ErrorStack extends Doctrine_Access implements Countable { return new ArrayIterator($this->errors); } + /** * Enter description here... * diff --git a/lib/Doctrine/Validator/Exception.php b/lib/Doctrine/Validator/Exception.php index 1cd7d3c13..687b680a8 100644 --- a/lib/Doctrine/Validator/Exception.php +++ b/lib/Doctrine/Validator/Exception.php @@ -36,6 +36,7 @@ class Doctrine_Validator_Exception extends Doctrine_Exception implements Countab * @var array $invalid */ private $invalid = array(); + /** * @param Doctrine_Validator $validator */ @@ -59,6 +60,7 @@ class Doctrine_Validator_Exception extends Doctrine_Exception implements Countab { return count($this->invalid); } + /** * __toString * diff --git a/lib/Doctrine/Validator/Usstate.php b/lib/Doctrine/Validator/Usstate.php index 01bebd4bc..2f54de433 100644 --- a/lib/Doctrine/Validator/Usstate.php +++ b/lib/Doctrine/Validator/Usstate.php @@ -91,6 +91,7 @@ class Doctrine_Validator_Usstate { return self::$states; } + /** * checks if given value is a valid US state code * diff --git a/lib/Doctrine/View.php b/lib/Doctrine/View.php index bb7b4a1b4..4647fba2f 100644 --- a/lib/Doctrine/View.php +++ b/lib/Doctrine/View.php @@ -18,6 +18,7 @@ * and is licensed under the LGPL. For more information, see * <http://www.phpdoctrine.com>. */ + /** * Doctrine_View * @@ -37,10 +38,12 @@ class Doctrine_View * SQL DROP constant */ const DROP = 'DROP VIEW %s'; + /** * SQL CREATE constant */ const CREATE = 'CREATE VIEW %s AS %s'; + /** * SQL SELECT constant */ @@ -50,10 +53,12 @@ class Doctrine_View * @var string $name the name of the view */ protected $name; + /** * @var Doctrine_Query $query the DQL query object this view is hooked into */ protected $query; + /** * @var Doctrine_Connection $conn the connection object */ @@ -71,6 +76,7 @@ class Doctrine_View $this->query->setView($this); $this->conn = $query->getConnection(); } + /** * getQuery * returns the associated query object @@ -81,6 +87,7 @@ class Doctrine_View { return $this->query; } + /** * getName * returns the name of this view @@ -91,6 +98,7 @@ class Doctrine_View { return $this->name; } + /** * getConnection * returns the connection object @@ -101,6 +109,7 @@ class Doctrine_View { return $this->conn; } + /** * create * creates this view @@ -117,6 +126,7 @@ class Doctrine_View throw new Doctrine_View_Exception($e->__toString()); } } + /** * drop * drops this view from the database @@ -132,6 +142,7 @@ class Doctrine_View throw new Doctrine_View_Exception($e->__toString()); } } + /** * execute * executes the view @@ -143,6 +154,7 @@ class Doctrine_View { return $this->query->execute(); } + /** * getSelectSql * returns the select sql for this view diff --git a/manual/docs/en/_old-docs/Configuration - List of attributes.php b/manual/docs/en/_old-docs/Configuration - List of attributes.php index ffdd94e75..715d83f24 100644 --- a/manual/docs/en/_old-docs/Configuration - List of attributes.php +++ b/manual/docs/en/_old-docs/Configuration - List of attributes.php @@ -14,30 +14,37 @@ * Doctrine::ATTR_BATCH_SIZE = 8; * Doctrine::ATTR_PK_COLUMNS = 9; + /** * primary key type attribute */ * Doctrine::ATTR_PK_TYPE = 10; + /** * locking attribute */ * Doctrine::ATTR_LOCKMODE = 11; + /** * validatate attribute */ * Doctrine::ATTR_VLD = 12; + /** * name prefix attribute */ * Doctrine::ATTR_NAME_PREFIX = 13; + /** * create tables attribute */ * Doctrine::ATTR_CREATE_TABLES = 14; + /** * collection key attribute */ * Doctrine::ATTR_COLL_KEY = 15; + /** * collection limit attribute */ diff --git a/manual/docs/en/_old-docs/DQL (Doctrine Query Language) - Operators - Logical operators.php b/manual/docs/en/_old-docs/DQL (Doctrine Query Language) - Operators - Logical operators.php index d4325a5a2..4fb406426 100644 --- a/manual/docs/en/_old-docs/DQL (Doctrine Query Language) - Operators - Logical operators.php +++ b/manual/docs/en/_old-docs/DQL (Doctrine Query Language) - Operators - Logical operators.php @@ -38,7 +38,7 @@ NOT, ! The last example produces 1 because the expression evaluates the same way as - (!1)+1. + ( ! 1)+1. * diff --git a/manual/index.php b/manual/index.php index 8ad1df794..ae4ce5816 100644 --- a/manual/index.php +++ b/manual/index.php @@ -43,7 +43,7 @@ function getSvnRevision($file) class Cache { protected $_cache = null; - + /** * Constructs a cache object. * @@ -77,7 +77,7 @@ class Cache $this->_cache = null; } } - + /** * Fetches a cache record from cache. * @@ -96,7 +96,7 @@ class Cache return false; } - + /** * Saves a cache record to cache. * @@ -116,7 +116,7 @@ class Cache return false; } - + /** * Deletes all cached records from cache. * diff --git a/manual/lib/Text/Wiki/Parse/Doc/Code.php b/manual/lib/Text/Wiki/Parse/Doc/Code.php index 007ba2402..fd9b2cb91 100644 --- a/manual/lib/Text/Wiki/Parse/Doc/Code.php +++ b/manual/lib/Text/Wiki/Parse/Doc/Code.php @@ -49,7 +49,7 @@ class Text_Wiki_Parse_Code extends Text_Wiki_Parse { * */ var $regex = ';^<code(\s[^>]*)?>(?:\s*)(.*?)(?:\s*)</code>(\s|$);msi'; - + /** * * Generates a token entry for the matched text. Token options are: @@ -80,7 +80,7 @@ class Text_Wiki_Parse_Code extends Text_Wiki_Parse { $attr = $this->getAttrs($args); // ... and make sure we have a 'type' - if (! isset($attr['type'])) { + if ( ! isset($attr['type'])) { $attr['type'] = ''; } diff --git a/manual/lib/highlight.php b/manual/lib/highlight.php index 9ec761af3..ad984b37e 100644 --- a/manual/lib/highlight.php +++ b/manual/lib/highlight.php @@ -31,7 +31,7 @@ * @version 1.3.0 * @link http://aidanlister.com/repos/v/PHP_Highlight.php */ -if (!defined('T_ML_COMMENT')) { +if ( ! defined('T_ML_COMMENT')) { define('T_ML_COMMENT', T_COMMENT); } else { define('T_DOC_COMMENT', T_ML_COMMENT); diff --git a/manual/scripts/mootools.v1.11.js b/manual/scripts/mootools.v1.11.js index 5e4510db7..136aa9ab7 100644 --- a/manual/scripts/mootools.v1.11.js +++ b/manual/scripts/mootools.v1.11.js @@ -1,3 +1,3 @@ //MooTools, My Object Oriented Javascript Tools. Copyright (c) 2006 Valerio Proietti, <http://mad4milk.net>, MIT Style License. -eval(function(p,a,c,k,e,d){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--){d[e(c)]=k[c]||e(c)}k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1};while(c--){if(k[c]){p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c])}}return p}('m 7X={7Y:\'1.11\'};h $3q(R){c(R!=6N)};h $q(R){k(!$3q(R))c P;k(R.2R)c\'W\';m q=3Q R;k(q==\'2a\'&&R.7W){1C(R.4Z){Q 1:c\'W\';Q 3:c(/\\S/).2e(R.6u)?\'7V\':\'7T\'}}k(q==\'2a\'||q==\'h\'){1C(R.5u){Q 1r:c\'15\';Q 4F:c\'53\';Q 1f:c\'4o\'}k(3Q R.H==\'3U\'){k(R.1V)c\'7U\';k(R.6o)c\'M\'}}c q};h $21(){m 3h={};G(m i=0;i<M.H;i++){G(m t 1g M[i]){m ap=M[i][t];m 3j=3h[t];k(3j&&$q(ap)==\'2a\'&&$q(3j)==\'2a\')3h[t]=$21(3j,ap);T 3h[t]=ap}}c 3h};m $N=h(){m U=M;k(!U[1])U=[7,U[0]];G(m t 1g U[1])U[0][t]=U[1][t];c U[0]};m $2P=h(){G(m i=0,l=M.H;i<l;i++){M[i].N=h(1e){G(m 1j 1g 1e){k(!7.1c[1j])7.1c[1j]=1e[1j];k(!7[1j])7[1j]=$2P.3w(1j)}}}};$2P.3w=h(1j){c h(J){c 7.1c[1j].2O(J,1r.1c.6B.1H(M,1))}};$2P(4q,1r,4L,7c);h $33(R){c!!(R||R===0)};h $49(R,5t){c $3q(R)?R:5t};h $4w(2y,1L){c 1z.7Z(1z.4w()*(1L-2y+1)+2y)};h $28(){c V 5P().5H()};h $4C(1K){80(1K);85(1K);c 1d};m 2s=h(R){R=R||{};R.N=$N;c R};m 86=V 2s(C);m 84=V 2s(F);F.74=F.2n(\'74\')[0];C.2h=!!(F.6l);k(C.83)C.1I=C[C.81?\'82\':\'6F\']=12;T k(F.5U&&!F.7S&&!7R.7H)C.2C=C[C.2h?\'7I\':\'3S\']=12;T k(F.7G!=1d)C.52=12;C.7F=C.2C;7C.N=$N;k(3Q 3g==\'6N\'){m 3g=h(){};k(C.2C)F.7a("7D");3g.1c=(C.2C)?C["[[7E.1c]]"]:{}}3g.1c.2R=h(){};k(C.6F)4U{F.7J("7K",P,12)}4T(e){};m 1f=h(1S){m 3a=h(){c(M[0]!==1d&&7.1O&&$q(7.1O)==\'h\')?7.1O.2O(7,M):7};$N(3a,7);3a.1c=1S;3a.5u=1f;c 3a};1f.2j=h(){};1f.1c={N:h(1S){m 3i=V 7(1d);G(m t 1g 1S){m 6d=3i[t];3i[t]=1f.64(6d,1S[t])}c V 1f(3i)},6r:h(){G(m i=0,l=M.H;i<l;i++)$N(7.1c,M[i])}};1f.64=h(2o,1l){k(2o&&2o!=1l){m q=$q(1l);k(q!=$q(2o))c 1l;1C(q){Q\'h\':m 4n=h(){7.1B=M.6o.1B;c 1l.2O(7,M)};4n.1B=2o;c 4n;Q\'2a\':c $21(2o,1l)}}c 1l};m 6p=V 1f({7P:h(B){7.2t=7.2t||[];7.2t.14(B);c 7},7n:h(){k(7.2t&&7.2t.H)7.2t.6g().1v(10,7)},7Q:h(){7.2t=[]}});m 1T=V 1f({1G:h(q,B){k(B!=1f.2j){7.$K=7.$K||{};7.$K[q]=7.$K[q]||[];7.$K[q].4r(B)}c 7},26:h(q,U,1v){k(7.$K&&7.$K[q]){7.$K[q].1t(h(B){B.1M({\'J\':7,\'1v\':1v,\'M\':U})()},7)}c 7},3V:h(q,B){k(7.$K&&7.$K[q])7.$K[q].2F(B);c 7}});m 6n=V 1f({7h:h(){7.u=$21.2O(1d,[7.u].N(M));k(7.1G){G(m 3c 1g 7.u){k($q(7.u[3c]==\'h\')&&(/^4E[A-Z]/).2e(3c))7.1G(3c,7.u[3c])}}c 7}});1r.N({3H:h(B,J){G(m i=0,j=7.H;i<j;i++)B.1H(J,7[i],i,7)},1X:h(B,J){m 2I=[];G(m i=0,j=7.H;i<j;i++){k(B.1H(J,7[i],i,7))2I.14(7[i])}c 2I},2c:h(B,J){m 2I=[];G(m i=0,j=7.H;i<j;i++)2I[i]=B.1H(J,7[i],i,7);c 2I},3x:h(B,J){G(m i=0,j=7.H;i<j;i++){k(!B.1H(J,7[i],i,7))c P}c 12},7N:h(B,J){G(m i=0,j=7.H;i<j;i++){k(B.1H(J,7[i],i,7))c 12}c P},2B:h(1V,19){m 2J=7.H;G(m i=(19<0)?1z.1L(0,2J+19):19||0;i<2J;i++){k(7[i]===1V)c i}c-1},6R:h(1u,H){1u=1u||0;k(1u<0)1u=7.H+1u;H=H||(7.H-1u);m 4v=[];G(m i=0;i<H;i++)4v[i]=7[1u++];c 4v},2F:h(1V){m i=0;m 2J=7.H;5h(i<2J){k(7[i]===1V){7.3K(i,1);2J--}T{i++}}c 7},Y:h(1V,19){c 7.2B(1V,19)!=-1},7L:h(1k){m R={},H=1z.2y(7.H,1k.H);G(m i=0;i<H;i++)R[1k[i]]=7[i];c R},N:h(15){G(m i=0,j=15.H;i<j;i++)7.14(15[i]);c 7},21:h(15){G(m i=0,l=15.H;i<l;i++)7.4r(15[i]);c 7},4r:h(1V){k(!7.Y(1V))7.14(1V);c 7},7M:h(){c 7[$4w(0,7.H-1)]||1d},62:h(){c 7[7.H-1]||1d}});1r.1c.1t=1r.1c.3H;1r.1t=1r.3H;h $A(15){c 1r.6R(15)};h $1t(2f,B,J){k(2f&&3Q 2f.H==\'3U\'&&$q(2f)!=\'2a\'){1r.3H(2f,B,J)}T{G(m 1q 1g 2f)B.1H(J||2f,2f[1q],1q)}};1r.1c.2e=1r.1c.Y;4L.N({2e:h(3E,6J){c(($q(3E)==\'23\')?V 4F(3E,6J):3E).2e(7)},3p:h(){c 36(7,10)},72:h(){c 4G(7)},4p:h(){c 7.2q(/-\\D/g,h(1D){c 1D.4g(1).6y()})},6E:h(){c 7.2q(/\\w[A-Z]/g,h(1D){c(1D.4g(0)+\'-\'+1D.4g(1).3L())})},71:h(){c 7.2q(/\\b[a-z]/g,h(1D){c 1D.6y()})},57:h(){c 7.2q(/^\\s+|\\s+$/g,\'\')},4K:h(){c 7.2q(/\\s{2,}/g,\' \').57()},3A:h(15){m 1Q=7.1D(/\\d{1,3}/g);c(1Q)?1Q.3A(15):P},4b:h(15){m 2G=7.1D(/^#?(\\w{1,2})(\\w{1,2})(\\w{1,2})$/);c(2G)?2G.6B(1).4b(15):P},Y:h(23,s){c(s)?(s+7+s).2B(s+23+s)>-1:7.2B(23)>-1},7m:h(){c 7.2q(/([.*+?^${}()|[\\]\\/\\\\])/g,\'\\\\$1\')}});1r.N({3A:h(15){k(7.H<3)c P;k(7.H==4&&7[3]==0&&!15)c\'88\';m 2G=[];G(m i=0;i<3;i++){m 2W=(7[i]-0).8u(16);2G.14((2W.H==1)?\'0\'+2W:2W)}c 15?2G:\'#\'+2G.1W(\'\')},4b:h(15){k(7.H!=3)c P;m 1Q=[];G(m i=0;i<3;i++){1Q.14(36((7[i].H==1)?7[i]+7[i]:7[i],16))}c 15?1Q:\'1Q(\'+1Q.1W(\',\')+\')\'}});4q.N({1M:h(u){m B=7;u=$21({\'J\':B,\'r\':P,\'M\':1d,\'1v\':P,\'2x\':P,\'3s\':P},u);k($33(u.M)&&$q(u.M)!=\'15\')u.M=[u.M];c h(r){m U;k(u.r){r=r||C.r;U=[(u.r===12)?r:V u.r(r)];k(u.M)U.N(u.M)}T U=u.M||M;m 25=h(){c B.2O($49(u.J,B),U)};k(u.1v)c 8t(25,u.1v);k(u.2x)c 8s(25,u.2x);k(u.3s)4U{c 25()}4T(8q){c P};c 25()}},8r:h(U,J){c 7.1M({\'M\':U,\'J\':J})},3s:h(U,J){c 7.1M({\'M\':U,\'J\':J,\'3s\':12})()},J:h(J,U){c 7.1M({\'J\':J,\'M\':U})},8w:h(J,U){c 7.1M({\'J\':J,\'r\':12,\'M\':U})},1v:h(1v,J,U){c 7.1M({\'1v\':1v,\'J\':J,\'M\':U})()},2x:h(7l,J,U){c 7.1M({\'2x\':7l,\'J\':J,\'M\':U})()}});7c.N({3p:h(){c 36(7)},72:h(){c 4G(7)},6Q:h(2y,1L){c 1z.2y(1L,1z.1L(2y,7))},4W:h(3e){3e=1z.8x(10,3e||0);c 1z.4W(7*3e)/3e},8D:h(B){G(m i=0;i<7;i++)B(i)}});m v=V 1f({1O:h(o,1e){k($q(o)==\'23\'){k(C.1I&&1e&&(1e.1q||1e.q)){m 1q=(1e.1q)?\' 1q="\'+1e.1q+\'"\':\'\';m q=(1e.q)?\' q="\'+1e.q+\'"\':\'\';4S 1e.1q;4S 1e.q;o=\'<\'+o+1q+q+\'>\'}o=F.7a(o)}o=$(o);c(!1e||!o)?o:o.2r(1e)}});m 1m=V 1f({1O:h(I){c(I)?$N(I,7):7}});1m.N=h(1e){G(m 1j 1g 1e){7.1c[1j]=1e[1j];7[1j]=$2P.3w(1j)}};h $(o){k(!o)c 1d;k(o.2R)c 1s.2U(o);k([C,F].Y(o))c o;m q=$q(o);k(q==\'23\'){o=F.3m(o);q=(o)?\'W\':P}k(q!=\'W\')c 1d;k(o.2R)c 1s.2U(o);k([\'2a\',\'8B\'].Y(o.3l.3L()))c o;$N(o,v.1c);o.2R=h(){};c 1s.2U(o)};F.3k=F.2n;h $$(){m I=[];G(m i=0,j=M.H;i<j;i++){m 1b=M[i];1C($q(1b)){Q\'W\':I.14(1b);Q\'7B\':1i;Q P:1i;Q\'23\':1b=F.3k(1b,12);4D:I.N(1b)}}c $$.3b(I)};$$.3b=h(15){m I=[];G(m i=0,l=15.H;i<l;i++){k(15[i].$3r)6m;m W=$(15[i]);k(W&&!W.$3r){W.$3r=12;I.14(W)}}G(m n=0,d=I.H;n<d;n++)I[n].$3r=1d;c V 1m(I)};1m.5K=h(t){c h(){m U=M;m X=[];m I=12;G(m i=0,j=7.H,25;i<j;i++){25=7[i][t].2O(7[i],U);k($q(25)!=\'W\')I=P;X.14(25)};c(I)?$$.3b(X):X}};v.N=h(1S){G(m t 1g 1S){3g.1c[t]=1S[t];v.1c[t]=1S[t];v[t]=$2P.3w(t);m 5L=(1r.1c[t])?t+\'1m\':t;1m.1c[5L]=1m.5K(t)}};v.N({2r:h(1e){G(m 1j 1g 1e){m 35=1e[1j];1C(1j){Q\'8p\':7.67(35);1i;Q\'K\':k(7.51)7.51(35);1i;Q\'1S\':7.6K(35);1i;4D:7.3v(1j,35)}}c 7},2V:h(o,5G){o=$(o);1C(5G){Q\'5y\':o.1Y.4V(7,o);1i;Q\'5E\':m 30=o.6b();k(!30)o.1Y.4A(7);T o.1Y.4V(7,30);1i;Q\'2d\':m 4M=o.5q;k(4M){o.4V(7,4M);1i}4D:o.4A(7)}c 7},8e:h(o){c 7.2V(o,\'5y\')},8f:h(o){c 7.2V(o,\'5E\')},8d:h(o){c 7.2V(o,\'5j\')},8c:h(o){c 7.2V(o,\'2d\')},89:h(){m I=[];$1t(M,h(5V){I=I.5c(5V)});$$(I).2V(7);c 7},2F:h(){c 7.1Y.7g(7)},8a:h(6h){m o=$(7.8b(6h!==P));k(!o.$K)c o;o.$K={};G(m q 1g 7.$K)o.$K[q]={\'1k\':$A(7.$K[q].1k),\'1o\':$A(7.$K[q].1o)};c o.3F()},8g:h(o){o=$(o);7.1Y.8h(o,7);c o},5z:h(22){7.4A(F.8m(22));c 7},4I:h(17){c 7.17.Y(17,\' \')},6a:h(17){k(!7.4I(17))7.17=(7.17+\' \'+17).4K();c 7},65:h(17){7.17=7.17.2q(V 4F(\'(^|\\\\s)\'+17+\'(?:\\\\s|$)\'),\'$1\').4K();c 7},8n:h(17){c 7.4I(17)?7.65(17):7.6a(17)},6z:h(t,O){1C(t){Q\'1J\':c 7.66(4G(O));Q\'8l\':t=(C.1I)?\'8k\':\'8i\'}t=t.4p();1C($q(O)){Q\'3U\':k(![\'8j\',\'6j\'].Y(t))O+=\'4t\';1i;Q\'15\':O=\'1Q(\'+O.1W(\',\')+\')\'}7.1a[t]=O;c 7},67:h(2g){1C($q(2g)){Q\'2a\':v.3J(7,\'6z\',2g);1i;Q\'23\':7.1a.4j=2g}c 7},66:h(1J){k(1J==0){k(7.1a.3y!="68")7.1a.3y="68"}T{k(7.1a.3y!="6f")7.1a.3y="6f"}k(!7.3z||!7.3z.7u)7.1a.6j=1;k(C.1I)7.1a.1X=(1J==1)?\'\':"7s(1J="+1J*7t+")";7.1a.1J=7.$2i.1J=1J;c 7},2D:h(t){t=t.4p();m 18=7.1a[t];k(!$33(18)){k(t==\'1J\')c 7.$2i.1J;18=[];G(m 1a 1g v.2N){k(t==1a){v.2N[1a].1t(h(s){m 1a=7.2D(s);18.14(36(1a)?1a:\'79\')},7);k(t==\'2p\'){m 3x=18.3x(h(2W){c(2W==18[0])});c(3x)?18[0]:P}c 18.1W(\' \')}}k(t.Y(\'2p\')){k(v.2N.2p.Y(t)){c[\'75\',\'7p\',\'7y\'].2c(h(p){c 7.2D(t+p)},7).1W(\' \')}T k(v.5W.Y(t)){c[\'5I\',\'5O\',\'5w\',\'5D\'].2c(h(p){c 7.2D(\'2p\'+p+t.2q(\'2p\',\'\'))},7).1W(\' \')}}k(F.6I)18=F.6I.7x(7,1d).7v(t.6E());T k(7.3z)18=7.3z[t]}k(C.1I)18=v.7e(t,18,7);k(18&&t.2e(/5d/i)&&18.Y(\'1Q\')){c 18.56(\'1Q\').3K(1,4).2c(h(5d){c 5d.3A()}).1W(\' \')}c 18},7A:h(){c v.4y(7,\'2D\',M)},2Z:h(3B,1u){3B+=\'7r\';m o=(1u)?7[1u]:7[3B];5h(o&&$q(o)!=\'W\')o=o[3B];c $(o)},8J:h(){c 7.2Z(\'2o\')},6b:h(){c 7.2Z(\'30\')},af:h(){c 7.2Z(\'30\',\'5q\')},62:h(){c 7.2Z(\'2o\',\'9F\')},9H:h(){c $(7.1Y)},9K:h(){c $$(7.5U)},4i:h(o){c!!$A(7.2n(\'*\')).Y(o)},3I:h(t){m 29=v.3u[t];k(29)c 7[29];m 5b=v.63[t]||0;k(!C.1I||5b)c 7.a6(t,5b);m 59=7.9U[t];c(59)?59.6u:1d},aB:h(t){m 29=v.3u[t];k(29)7[29]=\'\';T 7.9Y(t);c 7},9X:h(){c v.4y(7,\'3I\',M)},3v:h(t,O){m 29=v.3u[t];k(29)7[29]=O;T 7.9W(t,O);c 7},6K:h(2g){c v.3J(7,\'3v\',2g)},6Z:h(){7.6U=$A(M).1W(\'\');c 7},9V:h(22){m 1R=7.2Y();k([\'1a\',\'2Q\'].Y(1R)){k(C.1I){k(1R==\'1a\')7.5M.4j=22;T k(1R==\'2Q\')7.3v(\'22\',22);c 7}T{7.7g(7.5q);c 7.5z(22)}}7[$3q(7.4c)?\'4c\':\'6Y\']=22;c 7},a0:h(){m 1R=7.2Y();k([\'1a\',\'2Q\'].Y(1R)){k(C.1I){k(1R==\'1a\')c 7.5M.4j;T k(1R==\'2Q\')c 7.3I(\'22\')}T{c 7.6U}}c($49(7.4c,7.6Y))},2Y:h(){c 7.3l.3L()},2j:h(){1s.3C(7.2n(\'*\'));c 7.6Z(\'\')}});v.7e=h(t,18,W){k($33(36(18)))c 18;k([\'5m\',\'34\'].Y(t)){m 1o=(t==\'34\')?[\'2l\',\'5i\']:[\'2d\',\'5j\'];m 2A=0;1o.1t(h(O){2A+=W.2D(\'2p-\'+O+\'-34\').3p()+W.2D(\'4O-\'+O).3p()});c W[\'5g\'+t.71()]-2A+\'4t\'}T k(t.2e(/2p(.+)75|7b|4O/)){c\'79\'}c 18};v.2N={\'2p\':[],\'4O\':[],\'7b\':[]};[\'5I\',\'5O\',\'5w\',\'5D\'].1t(h(5A){G(m 1a 1g v.2N)v.2N[1a].14(1a+5A)});v.5W=[\'a5\',\'a4\',\'a2\'];v.4y=h(o,2w,1k){m 18={};$1t(1k,h(1h){18[1h]=o[2w](1h)});c 18};v.3J=h(o,2w,4H){G(m 1h 1g 4H)o[2w](1h,4H[1h]);c o};v.3u=V 2s({\'4o\':\'17\',\'G\':\'a3\',\'9T\':\'8F\',\'9J\':\'9I\',\'9G\':\'9L\',\'9R\':\'9P\',\'9N\':\'9O\',\'a7\':\'a8\',\'at\':\'as\',\'O\':\'O\',\'5Y\':\'5Y\',\'5X\':\'5X\',\'5Z\':\'5Z\',\'61\':\'61\'});v.63={\'41\':2,\'3Y\':2};v.1P={3t:{2E:h(q,B){k(7.4R)7.4R(q,B,P);T 7.ar(\'4E\'+q,B);c 7},6X:h(q,B){k(7.6c)7.6c(q,B,P);T 7.ao(\'4E\'+q,B);c 7}}};C.N(v.1P.3t);F.N(v.1P.3t);v.N(v.1P.3t);m 1s={I:[],2U:h(o){k(!o.$2i){1s.I.14(o);o.$2i={\'1J\':1}}c o},3C:h(I){G(m i=0,j=I.H,o;i<j;i++){k(!(o=I[i])||!o.$2i)6m;k(o.$K)o.26(\'3C\').3F();G(m p 1g o.$2i)o.$2i[p]=1d;G(m d 1g v.1c)o[d]=1d;1s.I[1s.I.2B(o)]=1d;o.2R=o.$2i=o=1d}1s.I.2F(1d)},2j:h(){1s.2U(C);1s.2U(F);1s.3C(1s.I)}};C.2E(\'6L\',h(){C.2E(\'4f\',1s.2j);k(C.1I)C.2E(\'4f\',av)});m 1E=V 1f({1O:h(r){k(r&&r.$6e)c r;7.$6e=12;r=r||C.r;7.r=r;7.q=r.q;7.1Z=r.1Z||r.aA;k(7.1Z.4Z==3)7.1Z=7.1Z.1Y;7.6g=r.az;7.ay=r.aw;7.ax=r.an;7.am=r.ae;k([\'4e\',\'2S\'].Y(7.q)){7.ac=(r.5C)?r.5C/ab:-(r.a9||0)/3}T k(7.q.Y(\'1h\')){7.3M=r.5N||r.aa;G(m 1q 1g 1E.1k){k(1E.1k[1q]==7.3M){7.1h=1q;1i}}k(7.q==\'6V\'){m 3D=7.3M-ag;k(3D>0&&3D<13)7.1h=\'f\'+3D}7.1h=7.1h||4L.ak(7.3M).3L()}T k(7.q.2e(/(5p|aj|ah)/)){7.ai={\'x\':r.4X||r.5S+F.1F.3d,\'y\':r.4Y||r.5T+F.1F.3f};7.9Q={\'x\':r.4X?r.4X-C.5F:r.5S,\'y\':r.4Y?r.4Y-C.6i:r.5T};7.9D=(r.5N==3)||(r.90==2);1C(7.q){Q\'4d\':7.1n=r.1n||r.9E;1i;Q\'4a\':7.1n=r.1n||r.5k}7.73()}c 7},1U:h(){c 7.3N().3O()},3N:h(){k(7.r.3N)7.r.3N();T 7.r.8Z=12;c 7},3O:h(){k(7.r.3O)7.r.3O();T 7.r.8Y=P;c 7}});1E.3o={1n:h(){k(7.1n&&7.1n.4Z==3)7.1n=7.1n.1Y},70:h(){4U{1E.3o.1n.1H(7)}4T(e){7.1n=7.1Z}}};1E.1c.73=(C.52)?1E.3o.70:1E.3o.1n;1E.1k=V 2s({\'93\':13,\'97\':38,\'95\':40,\'2l\':37,\'5i\':39,\'8L\':27,\'8G\':32,\'8M\':8,\'8S\':9,\'4S\':46});v.1P.1T={1G:h(q,B){7.$K=7.$K||{};7.$K[q]=7.$K[q]||{\'1k\':[],\'1o\':[]};k(7.$K[q].1k.Y(B))c 7;7.$K[q].1k.14(B);m 3P=q;m 1p=v.1T[q];k(1p){k(1p.5l)1p.5l.1H(7,B);k(1p.2c)B=1p.2c;k(1p.q)3P=1p.q}k(!7.4R)B=B.1M({\'J\':7,\'r\':12});7.$K[q].1o.14(B);c(v.4h.Y(3P))?7.2E(3P,B):7},3V:h(q,B){k(!7.$K||!7.$K[q])c 7;m 3R=7.$K[q].1k.2B(B);k(3R==-1)c 7;m 1h=7.$K[q].1k.3K(3R,1)[0];m O=7.$K[q].1o.3K(3R,1)[0];m 1p=v.1T[q];k(1p){k(1p.2F)1p.2F.1H(7,B);k(1p.q)q=1p.q}c(v.4h.Y(q))?7.6X(q,O):7},51:h(2g){c v.3J(7,\'1G\',2g)},3F:h(q){k(!7.$K)c 7;k(!q){G(m 3G 1g 7.$K)7.3F(3G);7.$K=1d}T k(7.$K[q]){7.$K[q].1k.1t(h(B){7.3V(q,B)},7);7.$K[q]=1d}c 7},26:h(q,U,1v){k(7.$K&&7.$K[q]){7.$K[q].1k.1t(h(B){B.1M({\'J\':7,\'1v\':1v,\'M\':U})()},7)}c 7},6H:h(19,q){k(!19.$K)c 7;k(!q){G(m 3G 1g 19.$K)7.6H(19,3G)}T k(19.$K[q]){19.$K[q].1k.1t(h(B){7.1G(q,B)},7)}c 7}};C.N(v.1P.1T);F.N(v.1P.1T);v.N(v.1P.1T);v.1T=V 2s({\'6v\':{q:\'4d\',2c:h(r){r=V 1E(r);k(r.1n!=7&&!7.4i(r.1n))7.26(\'6v\',r)}},\'6x\':{q:\'4a\',2c:h(r){r=V 1E(r);k(r.1n!=7&&!7.4i(r.1n))7.26(\'6x\',r)}},\'2S\':{q:(C.52)?\'4e\':\'2S\'}});v.4h=[\'5p\',\'9v\',\'9t\',\'9r\',\'2S\',\'4e\',\'4d\',\'4a\',\'9w\',\'6V\',\'9x\',\'9B\',\'6D\',\'4f\',\'6L\',\'9A\',\'9y\',\'9z\',\'9p\',\'5J\',\'9o\',\'9f\',\'9g\',\'9e\',\'9d\',\'9b\',\'2M\'];4q.N({6s:h(J,U){c 7.1M({\'J\':J,\'M\':U,\'r\':1E})}});1m.N({9c:h(1R){c V 1m(7.1X(h(o){c(v.2Y(o)==1R)}))},6P:h(17,1w){m I=7.1X(h(o){c(o.17&&o.17.Y(17,\' \'))});c(1w)?I:V 1m(I)},6O:h(2u,1w){m I=7.1X(h(o){c(o.2u==2u)});c(1w)?I:V 1m(I)},6M:h(1q,4l,O,1w){m I=7.1X(h(o){m 1l=v.3I(o,1q);k(!1l)c P;k(!4l)c 12;1C(4l){Q\'=\':c(1l==O);Q\'*=\':c(1l.Y(O));Q\'^=\':c(1l.4u(0,O.H)==O);Q\'$=\':c(1l.4u(1l.H-O.H)==O);Q\'!=\':c(1l!=O);Q\'~=\':c 1l.Y(O,\' \')}c P});c(1w)?I:V 1m(I)}});h $E(1b,1X){c($(1X)||F).5R(1b)};h $9i(1b,1X){c($(1X)||F).3k(1b)};$$.20={\'53\':/^(\\w*|\\*)(?:#([\\w-]+)|\\.([\\w-]+))?(?:\\[(\\w+)(?:([!*^$]?=)["\']?([^"\'\\]]*)["\']?)?])?$/,\'2h\':{5o:h(X,1N,L,i){m 1y=[1N.9m?\'5a:\':\'\',L[1]];k(L[2])1y.14(\'[@2u="\',L[2],\'"]\');k(L[3])1y.14(\'[Y(5c(" ", @4o, " "), " \',L[3],\' ")]\');k(L[4]){k(L[5]&&L[6]){1C(L[5]){Q\'*=\':1y.14(\'[Y(@\',L[4],\', "\',L[6],\'")]\');1i;Q\'^=\':1y.14(\'[9l-9j(@\',L[4],\', "\',L[6],\'")]\');1i;Q\'$=\':1y.14(\'[9k(@\',L[4],\', 23-H(@\',L[4],\') - \',L[6].H,\' + 1) = "\',L[6],\'"]\');1i;Q\'=\':1y.14(\'[@\',L[4],\'="\',L[6],\'"]\');1i;Q\'!=\':1y.14(\'[@\',L[4],\'!="\',L[6],\'"]\')}}T{1y.14(\'[@\',L[4],\']\')}}X.14(1y.1W(\'\'));c X},55:h(X,1N,1w){m I=[];m 2h=F.6l(\'.//\'+X.1W(\'//\'),1N,$$.20.6S,91.9n,1d);G(m i=0,j=2h.9h;i<j;i++)I.14(2h.9q(i));c(1w)?I:V 1m(I.2c($))}},\'7o\':{5o:h(X,1N,L,i){k(i==0){k(L[2]){m o=1N.3m(L[2]);k(!o||((L[1]!=\'*\')&&(v.2Y(o)!=L[1])))c P;X=[o]}T{X=$A(1N.2n(L[1]))}}T{X=$$.20.2n(X,L[1]);k(L[2])X=1m.6O(X,L[2],12)}k(L[3])X=1m.6P(X,L[3],12);k(L[4])X=1m.6M(X,L[4],L[5],L[6],12);c X},55:h(X,1N,1w){c(1w)?X:$$.3b(X)}},6S:h(6T){c(6T==\'5a\')?\'8O://8Q.8R.8T/8N/5a\':P},2n:h(1N,3l){m 58=[];G(m i=0,j=1N.H;i<j;i++)58.N(1N[i].2n(3l));c 58}};$$.20.2w=(C.2h)?\'2h\':\'7o\';v.1P.5f={3n:h(1b,1w){m X=[];1b=1b.57().56(\' \');G(m i=0,j=1b.H;i<j;i++){m 78=1b[i];m L=78.1D($$.20.53);k(!L)1i;L[1]=L[1]||\'*\';m 1y=$$.20[$$.20.2w].5o(X,7,L,i);k(!1y)1i;X=1y}c $$.20[$$.20.2w].55(X,7,1w)},5R:h(1b){c $(7.3n(1b,12)[0]||P)},3k:h(1b,1w){m I=[];1b=1b.56(\',\');G(m i=0,j=1b.H;i<j;i++)I=I.5c(7.3n(1b[i],12));c(1w)?I:$$.3b(I)}};v.N({3m:h(2u){m o=F.3m(2u);k(!o)c P;G(m 1B=o.1Y;1B!=7;1B=1B.1Y){k(!1B)c P}c o},8X:h(17){c 7.3n(\'.\'+17)}});F.N(v.1P.5f);v.N(v.1P.5f);v.N({2k:h(x,y){7.3d=x;7.3f=y},4s:h(){c{\'2M\':{\'x\':7.3d,\'y\':7.3f},\'2A\':{\'x\':7.5s,\'y\':7.4m},\'4k\':{\'x\':7.47,\'y\':7.48}}},2z:h(1x){1x=1x||[];m o=7,2l=0,2d=0;8W{2l+=o.al||0;2d+=o.aq||0;o=o.a1}5h(o);1x.1t(h(W){2l-=W.3d||0;2d-=W.3f||0});c{\'x\':2l,\'y\':2d}},9Z:h(1x){c 7.2z(1x).y},9M:h(1x){c 7.2z(1x).x},9S:h(1x){m 5e=7.2z(1x);m R={\'34\':7.5s,\'5m\':7.4m,\'2l\':5e.x,\'2d\':5e.y};R.5i=R.2l+R.34;R.5j=R.2d+R.5m;c R}});v.1T.5n={5l:h(B){k(C.3T){B.1H(7);c}m 31=h(){k(C.3T)c;C.3T=12;C.1K=$4C(C.1K);7.26(\'5n\')}.J(7);k(F.3W&&C.2C){C.1K=h(){k([\'3T\',\'7j\'].Y(F.3W))31()}.2x(50)}T k(F.3W&&C.1I){k(!$(\'54\')){m 3Y=(C.2K.92==\'98:\')?\'://0\':\'96:94(0)\';F.8V(\'<2Q 2u="54" 8U 3Y="\'+3Y+\'"><\\/2Q>\');$(\'54\').8K=h(){k(7.3W==\'7j\')31()}}}T{C.2E("6D",31);F.2E("8I",31)}}};C.8H=h(B){c 7.1G(\'5n\',B)};C.N({76:h(){k(7.3S)c 7.9s;k(7.5B)c F.45.6G;c F.1F.6G},7k:h(){k(7.3S)c 7.9C;k(7.5B)c F.45.6q;c F.1F.6q},7d:h(){k(7.1I)c 1z.1L(F.1F.5s,F.1F.47);k(7.2C)c F.45.47;c F.1F.47},6C:h(){k(7.1I)c 1z.1L(F.1F.4m,F.1F.48);k(7.2C)c F.45.48;c F.1F.48},6w:h(){c 7.5F||F.1F.3d},6A:h(){c 7.6i||F.1F.3f},4s:h(){c{\'2A\':{\'x\':7.76(),\'y\':7.7k()},\'4k\':{\'x\':7.7d(),\'y\':7.6C()},\'2M\':{\'x\':7.6w(),\'y\':7.6A()}}},2z:h(){c{\'x\':0,\'y\':0}}});m 2H={};2H.4z=V 1f({u:{4J:1f.2j,42:1f.2j,6k:1f.2j,7f:h(p){c-(1z.9u(1z.9a*p)-1)/2},2m:99,8P:\'4t\',4Q:12,5x:50},1O:h(u){7.W=7.W||1d;7.7h(u);k(7.u.1O)7.u.1O.1H(7)},5v:h(){m 28=$28();k(28<7.28+7.u.2m){7.6t=7.u.7f((28-7.28)/7.u.2m);7.4P();7.5r()}T{7.1U(12);7.2r(7.1A);7.26(\'42\',7.W,10);7.7n()}},2r:h(1A){7.2T=1A;7.5r();c 7},4P:h(){7.2T=7.4x(7.19,7.1A)},4x:h(19,1A){c(1A-19)*7.6t+19},1u:h(19,1A){k(!7.u.4Q)7.1U();T k(7.1K)c 7;7.19=19;7.1A=1A;7.5J=7.1A-7.19;7.28=$28();7.1K=7.5v.2x(1z.4W(7i/7.u.5x),7);7.26(\'4J\',7.W);c 7},1U:h(44){k(!7.1K)c 7;7.1K=$4C(7.1K);k(!44)7.26(\'6k\',7.W);c 7},1p:h(19,1A){c 7.1u(19,1A)},au:h(44){c 7.1U(44)}});2H.4z.6r(V 6p,V 1T,V 6n);2H.6W=2H.4z.N({u:{1x:[],5g:{\'x\':0,\'y\':0},69:12},1O:h(W,u){7.2T=[];7.W=$(W);7.4B={\'1U\':7.1U.J(7,P)};7.1B(u);k(7.u.69){7.1G(\'4J\',h(){F.1G(\'2S\',7.4B.1U)}.J(7));7.1G(\'42\',h(){F.3V(\'2S\',7.4B.1U)}.J(7))}},4P:h(){G(m i=0;i<2;i++)7.2T[i]=7.4x(7.19[i],7.1A[i])},2k:h(x,y){k(7.1K&&7.u.4Q)c 7;m o=7.W.4s();m 1o={\'x\':x,\'y\':y};G(m z 1g o.2A){m 1L=o.4k[z]-o.2A[z];k($33(1o[z]))1o[z]=($q(1o[z])==\'3U\')?1o[z].6Q(0,1L):1L;T 1o[z]=o.2M[z];1o[z]+=7.u.5g[z]}c 7.1u([o.2M.x,o.2M.y],[1o.x,1o.y])},ad:h(){c 7.2k(P,0)},8A:h(){c 7.2k(P,\'5Q\')},7z:h(){c 7.2k(0,P)},7w:h(){c 7.2k(\'5Q\',P)},5k:h(o){m 1B=7.W.2z(7.u.1x);m 1Z=$(o).2z(7.u.1x);c 7.2k(1Z.x-1B.x,1Z.y-1B.y)},5r:h(){7.W.2k(7.2T[0],7.2T[1])}});m 7q=V 2s({u:{43:P,3Z:P,2m:P,4N:P},2r:h(1h,O,u){u=$21(7.u,u);O=8E(O);k(u.43)O+=\'; 43=\'+u.43;k(u.3Z)O+=\'; 3Z=\'+u.3Z;k(u.2m){m 3X=V 5P();3X.8o(3X.5H()+u.2m*24*60*60*7i);O+=\'; 8z=\'+3X.8y()}k(u.4N)O+=\'; 4N\';F.2v=1h+\'=\'+O;c $N(u,{\'1h\':1h,\'O\':O})},8C:h(1h){m O=F.2v.1D(\'(?:^|;)\\\\s*\'+1h.7m()+\'=([^;]*)\');c O?8v(O[1]):P},2F:h(2v,u){k($q(2v)==\'2a\')7.2r(2v.1h,\'\',$21(2v,{2m:-1}));T 7.2r(2v,\'\',$21(u,{2m:-1}))}});m 87=2H.6W.N({1O:h(u){7.1B(C,u);7.2X=(7.u.2X)?$$(7.u.2X):$$(F.2X);m 2K=C.2K.41.1D(/^[^#]*/)[0]+\'#\';7.2X.1t(h(2L){k(2L.41.2B(2K)!=0)c;m 2b=2L.41.4u(2K.H);k(2b&&$(2b))7.77(2L,2b)},7);k(!C.3S)7.1G(\'42\',h(){C.2K.7O=7.2b})},77:h(2L,2b){2L.1G(\'5p\',h(r){7.2b=2b;7.5k(2b);r.1U()}.6s(7))}});',62,658,'|||||||this|||||return|||||function|||if||var||el||type|event||property|options|Element||||||fn|window|||document|for|length|elements|bind|events|param|arguments|extend|value|false|case|obj||else|args|new|element|items|contains||||true||push|array||className|result|from|style|selector|prototype|null|props|Class|in|key|break|prop|keys|current|Elements|relatedTarget|values|custom|name|Array|Garbage|each|start|delay|nocash|overflown|temp|Math|to|parent|switch|match|Event|documentElement|addEvent|call|ie|opacity|timer|max|create|context|initialize|Methods|rgb|tag|properties|Events|stop|item|join|filter|parentNode|target|shared|merge|text|string||returns|fireEvent||time|index|object|anchor|map|top|test|iterable|source|xpath|tmp|empty|scrollTo|left|duration|getElementsByTagName|previous|border|replace|set|Abstract|chains|id|cookie|method|periodical|min|getPosition|size|indexOf|webkit|getStyle|addListener|remove|hex|Fx|results|len|location|link|scroll|Styles|apply|native|script|htmlElement|mousewheel|now|collect|inject|bit|links|getTag|walk|next|domReady||chk|width|val|parseInt||||klass|unique|option|scrollLeft|precision|scrollTop|HTMLElement|mix|proto|mp|getElementsBySelector|tagName|getElementById|getElements|fix|toInt|defined|included|attempt|Listeners|Properties|setProperty|generic|every|visibility|currentStyle|rgbToHex|brother|trash|fKey|regex|removeEvents|evType|forEach|getProperty|setMany|splice|toLowerCase|code|stopPropagation|preventDefault|realType|typeof|pos|webkit419|loaded|number|removeEvent|readyState|date|src|path||href|onComplete|domain|end|body||scrollWidth|scrollHeight|pick|mouseout|hexToRgb|innerText|mouseover|DOMMouseScroll|unload|charAt|NativeEvents|hasChild|cssText|scrollSize|operator|offsetHeight|merged|class|camelCase|Function|include|getSize|px|substr|newArray|random|compute|getMany|Base|appendChild|bound|clear|default|on|RegExp|parseFloat|pairs|hasClass|onStart|clean|String|first|secure|padding|setNow|wait|addEventListener|delete|catch|try|insertBefore|round|pageX|pageY|nodeType||addEvents|gecko|regexp|ie_ready|getItems|split|trim|found|node|xhtml|flag|concat|color|position|Dom|offset|while|right|bottom|toElement|add|height|domready|getParam|click|firstChild|increase|offsetWidth|picked|constructor|step|Bottom|fps|before|appendText|direction|opera|wheelDelta|Left|after|pageXOffset|where|getTime|Top|change|Multi|elementsProperty|styleSheet|which|Right|Date|full|getElement|clientX|clientY|childNodes|argument|borderShort|checked|disabled|multiple||selected|getLast|PropertiesIFlag|Merge|removeClass|setOpacity|setStyles|hidden|wheelStops|addClass|getNext|removeEventListener|pp|extended|visible|shift|contents|pageYOffset|zoom|onCancel|evaluate|continue|Options|callee|Chain|clientHeight|implement|bindWithEvent|delta|nodeValue|mouseenter|getScrollLeft|mouseleave|toUpperCase|setStyle|getScrollTop|slice|getScrollHeight|load|hyphenate|ie6|clientWidth|cloneEvents|defaultView|params|setProperties|beforeunload|filterByAttribute|undefined|filterById|filterByClass|limit|copy|resolver|prefix|innerHTML|keydown|Scroll|removeListener|textContent|setHTML|relatedTargetGecko|capitalize|toFloat|fixRelatedTarget|head|Width|getWidth|useLink|sel|0px|createElement|margin|Number|getScrollWidth|fixStyle|transition|removeChild|setOptions|1000|complete|getHeight|interval|escapeRegExp|callChain|normal|Style|Cookie|Sibling|alpha|100|hasLayout|getPropertyValue|toRight|getComputedStyle|Color|toLeft|getStyles|boolean|Object|iframe|DOMElement|khtml|getBoxObjectFor|taintEnabled|webkit420|execCommand|BackgroundImageCache|associate|getRandom|some|hash|chain|clearChain|navigator|all|whitespace|collection|textnode|nodeName|MooTools|version|floor|clearTimeout|XMLHttpRequest|ie7|ActiveXObject|Document|clearInterval|Window|SmoothScroll|transparent|adopt|clone|cloneNode|injectTop|injectInside|injectBefore|injectAfter|replaceWith|replaceChild|cssFloat|zIndex|styleFloat|float|createTextNode|toggleClass|setTime|styles|err|pass|setInterval|setTimeout|toString|decodeURIComponent|bindAsEventListener|pow|toGMTString|expires|toBottom|embed|get|times|encodeURIComponent|colSpan|space|onDomReady|DOMContentLoaded|getPrevious|onreadystatechange|esc|backspace|1999|http|unit|www|w3|tab|org|defer|write|do|getElementsByClassName|returnValue|cancelBubble|button|XPathResult|protocol|enter|void|down|javascript|up|https|500|PI|contextmenu|filterByTag|abort|error|reset|select|snapshotLength|ES|with|substring|starts|namespaceURI|UNORDERED_NODE_SNAPSHOT_TYPE|submit|blur|snapshotItem|mousedown|innerWidth|mouseup|cos|dblclick|mousemove|keypress|move|focus|resize|keyup|innerHeight|rightClick|fromElement|lastChild|accesskey|getParent|rowSpan|rowspan|getChildren|accessKey|getLeft|maxlength|maxLength|tabIndex|client|tabindex|getCoordinates|colspan|attributes|setText|setAttribute|getProperties|removeAttribute|getTop|getText|offsetParent|borderColor|htmlFor|borderStyle|borderWidth|getAttribute|readonly|readOnly|detail|keyCode|120|wheel|toTop|metaKey|getFirst|111|menu|page|mouse|fromCharCode|offsetLeft|meta|altKey|detachEvent||offsetTop|attachEvent|frameBorder|frameborder|clearTimer|CollectGarbage|ctrlKey|alt|control|shiftKey|srcElement|removeProperty'.split('|'),0,{})) +eval(function(p,a,c,k,e,d){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if( ! ''.replace(/^/,String)){while(c--){d[e(c)]=k[c]||e(c)}k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1};while(c--){if(k[c]){p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c])}}return p}('m 7X={7Y:\'1.11\'};h $3q(R){c(R!=6N)};h $q(R){k( ! $3q(R))c P;k(R.2R)c\'W\';m q=3Q R;k(q==\'2a\'&&R.7W){1C(R.4Z){Q 1:c\'W\';Q 3:c(/\\S/).2e(R.6u)?\'7V\':\'7T\'}}k(q==\'2a\'||q==\'h\'){1C(R.5u){Q 1r:c\'15\';Q 4F:c\'53\';Q 1f:c\'4o\'}k(3Q R.H==\'3U\'){k(R.1V)c\'7U\';k(R.6o)c\'M\'}}c q};h $21(){m 3h={};G(m i=0;i<M.H;i++){G(m t 1g M[i]){m ap=M[i][t];m 3j=3h[t];k(3j&&$q(ap)==\'2a\'&&$q(3j)==\'2a\')3h[t]=$21(3j,ap);T 3h[t]=ap}}c 3h};m $N=h(){m U=M;k( ! U[1])U=[7,U[0]];G(m t 1g U[1])U[0][t]=U[1][t];c U[0]};m $2P=h(){G(m i=0,l=M.H;i<l;i++){M[i].N=h(1e){G(m 1j 1g 1e){k( ! 7.1c[1j])7.1c[1j]=1e[1j];k( ! 7[1j])7[1j]=$2P.3w(1j)}}}};$2P.3w=h(1j){c h(J){c 7.1c[1j].2O(J,1r.1c.6B.1H(M,1))}};$2P(4q,1r,4L,7c);h $33(R){c!!(R||R===0)};h $49(R,5t){c $3q(R)?R:5t};h $4w(2y,1L){c 1z.7Z(1z.4w()*(1L-2y+1)+2y)};h $28(){c V 5P().5H()};h $4C(1K){80(1K);85(1K);c 1d};m 2s=h(R){R=R||{};R.N=$N;c R};m 86=V 2s(C);m 84=V 2s(F);F.74=F.2n(\'74\')[0];C.2h=!!(F.6l);k(C.83)C.1I=C[C.81?\'82\':\'6F\']=12;T k(F.5U&&!F.7S&&!7R.7H)C.2C=C[C.2h?\'7I\':\'3S\']=12;T k(F.7G!=1d)C.52=12;C.7F=C.2C;7C.N=$N;k(3Q 3g==\'6N\'){m 3g=h(){};k(C.2C)F.7a("7D");3g.1c=(C.2C)?C["[[7E.1c]]"]:{}}3g.1c.2R=h(){};k(C.6F)4U{F.7J("7K",P,12)}4T(e){};m 1f=h(1S){m 3a=h(){c(M[0]!==1d&&7.1O&&$q(7.1O)==\'h\')?7.1O.2O(7,M):7};$N(3a,7);3a.1c=1S;3a.5u=1f;c 3a};1f.2j=h(){};1f.1c={N:h(1S){m 3i=V 7(1d);G(m t 1g 1S){m 6d=3i[t];3i[t]=1f.64(6d,1S[t])}c V 1f(3i)},6r:h(){G(m i=0,l=M.H;i<l;i++)$N(7.1c,M[i])}};1f.64=h(2o,1l){k(2o&&2o!=1l){m q=$q(1l);k(q!=$q(2o))c 1l;1C(q){Q\'h\':m 4n=h(){7.1B=M.6o.1B;c 1l.2O(7,M)};4n.1B=2o;c 4n;Q\'2a\':c $21(2o,1l)}}c 1l};m 6p=V 1f({7P:h(B){7.2t=7.2t||[];7.2t.14(B);c 7},7n:h(){k(7.2t&&7.2t.H)7.2t.6g().1v(10,7)},7Q:h(){7.2t=[]}});m 1T=V 1f({1G:h(q,B){k(B!=1f.2j){7.$K=7.$K||{};7.$K[q]=7.$K[q]||[];7.$K[q].4r(B)}c 7},26:h(q,U,1v){k(7.$K&&7.$K[q]){7.$K[q].1t(h(B){B.1M({\'J\':7,\'1v\':1v,\'M\':U})()},7)}c 7},3V:h(q,B){k(7.$K&&7.$K[q])7.$K[q].2F(B);c 7}});m 6n=V 1f({7h:h(){7.u=$21.2O(1d,[7.u].N(M));k(7.1G){G(m 3c 1g 7.u){k($q(7.u[3c]==\'h\')&&(/^4E[A-Z]/).2e(3c))7.1G(3c,7.u[3c])}}c 7}});1r.N({3H:h(B,J){G(m i=0,j=7.H;i<j;i++)B.1H(J,7[i],i,7)},1X:h(B,J){m 2I=[];G(m i=0,j=7.H;i<j;i++){k(B.1H(J,7[i],i,7))2I.14(7[i])}c 2I},2c:h(B,J){m 2I=[];G(m i=0,j=7.H;i<j;i++)2I[i]=B.1H(J,7[i],i,7);c 2I},3x:h(B,J){G(m i=0,j=7.H;i<j;i++){k( ! B.1H(J,7[i],i,7))c P}c 12},7N:h(B,J){G(m i=0,j=7.H;i<j;i++){k(B.1H(J,7[i],i,7))c 12}c P},2B:h(1V,19){m 2J=7.H;G(m i=(19<0)?1z.1L(0,2J+19):19||0;i<2J;i++){k(7[i]===1V)c i}c-1},6R:h(1u,H){1u=1u||0;k(1u<0)1u=7.H+1u;H=H||(7.H-1u);m 4v=[];G(m i=0;i<H;i++)4v[i]=7[1u++];c 4v},2F:h(1V){m i=0;m 2J=7.H;5h(i<2J){k(7[i]===1V){7.3K(i,1);2J--}T{i++}}c 7},Y:h(1V,19){c 7.2B(1V,19)!=-1},7L:h(1k){m R={},H=1z.2y(7.H,1k.H);G(m i=0;i<H;i++)R[1k[i]]=7[i];c R},N:h(15){G(m i=0,j=15.H;i<j;i++)7.14(15[i]);c 7},21:h(15){G(m i=0,l=15.H;i<l;i++)7.4r(15[i]);c 7},4r:h(1V){k( ! 7.Y(1V))7.14(1V);c 7},7M:h(){c 7[$4w(0,7.H-1)]||1d},62:h(){c 7[7.H-1]||1d}});1r.1c.1t=1r.1c.3H;1r.1t=1r.3H;h $A(15){c 1r.6R(15)};h $1t(2f,B,J){k(2f&&3Q 2f.H==\'3U\'&&$q(2f)!=\'2a\'){1r.3H(2f,B,J)}T{G(m 1q 1g 2f)B.1H(J||2f,2f[1q],1q)}};1r.1c.2e=1r.1c.Y;4L.N({2e:h(3E,6J){c(($q(3E)==\'23\')?V 4F(3E,6J):3E).2e(7)},3p:h(){c 36(7,10)},72:h(){c 4G(7)},4p:h(){c 7.2q(/-\\D/g,h(1D){c 1D.4g(1).6y()})},6E:h(){c 7.2q(/\\w[A-Z]/g,h(1D){c(1D.4g(0)+\'-\'+1D.4g(1).3L())})},71:h(){c 7.2q(/\\b[a-z]/g,h(1D){c 1D.6y()})},57:h(){c 7.2q(/^\\s+|\\s+$/g,\'\')},4K:h(){c 7.2q(/\\s{2,}/g,\' \').57()},3A:h(15){m 1Q=7.1D(/\\d{1,3}/g);c(1Q)?1Q.3A(15):P},4b:h(15){m 2G=7.1D(/^#?(\\w{1,2})(\\w{1,2})(\\w{1,2})$/);c(2G)?2G.6B(1).4b(15):P},Y:h(23,s){c(s)?(s+7+s).2B(s+23+s)>-1:7.2B(23)>-1},7m:h(){c 7.2q(/([.*+?^${}()|[\\]\\/\\\\])/g,\'\\\\$1\')}});1r.N({3A:h(15){k(7.H<3)c P;k(7.H==4&&7[3]==0&&!15)c\'88\';m 2G=[];G(m i=0;i<3;i++){m 2W=(7[i]-0).8u(16);2G.14((2W.H==1)?\'0\'+2W:2W)}c 15?2G:\'#\'+2G.1W(\'\')},4b:h(15){k(7.H!=3)c P;m 1Q=[];G(m i=0;i<3;i++){1Q.14(36((7[i].H==1)?7[i]+7[i]:7[i],16))}c 15?1Q:\'1Q(\'+1Q.1W(\',\')+\')\'}});4q.N({1M:h(u){m B=7;u=$21({\'J\':B,\'r\':P,\'M\':1d,\'1v\':P,\'2x\':P,\'3s\':P},u);k($33(u.M)&&$q(u.M)!=\'15\')u.M=[u.M];c h(r){m U;k(u.r){r=r||C.r;U=[(u.r===12)?r:V u.r(r)];k(u.M)U.N(u.M)}T U=u.M||M;m 25=h(){c B.2O($49(u.J,B),U)};k(u.1v)c 8t(25,u.1v);k(u.2x)c 8s(25,u.2x);k(u.3s)4U{c 25()}4T(8q){c P};c 25()}},8r:h(U,J){c 7.1M({\'M\':U,\'J\':J})},3s:h(U,J){c 7.1M({\'M\':U,\'J\':J,\'3s\':12})()},J:h(J,U){c 7.1M({\'J\':J,\'M\':U})},8w:h(J,U){c 7.1M({\'J\':J,\'r\':12,\'M\':U})},1v:h(1v,J,U){c 7.1M({\'1v\':1v,\'J\':J,\'M\':U})()},2x:h(7l,J,U){c 7.1M({\'2x\':7l,\'J\':J,\'M\':U})()}});7c.N({3p:h(){c 36(7)},72:h(){c 4G(7)},6Q:h(2y,1L){c 1z.2y(1L,1z.1L(2y,7))},4W:h(3e){3e=1z.8x(10,3e||0);c 1z.4W(7*3e)/3e},8D:h(B){G(m i=0;i<7;i++)B(i)}});m v=V 1f({1O:h(o,1e){k($q(o)==\'23\'){k(C.1I&&1e&&(1e.1q||1e.q)){m 1q=(1e.1q)?\' 1q="\'+1e.1q+\'"\':\'\';m q=(1e.q)?\' q="\'+1e.q+\'"\':\'\';4S 1e.1q;4S 1e.q;o=\'<\'+o+1q+q+\'>\'}o=F.7a(o)}o=$(o);c( ! 1e||!o)?o:o.2r(1e)}});m 1m=V 1f({1O:h(I){c(I)?$N(I,7):7}});1m.N=h(1e){G(m 1j 1g 1e){7.1c[1j]=1e[1j];7[1j]=$2P.3w(1j)}};h $(o){k( ! o)c 1d;k(o.2R)c 1s.2U(o);k([C,F].Y(o))c o;m q=$q(o);k(q==\'23\'){o=F.3m(o);q=(o)?\'W\':P}k(q!=\'W\')c 1d;k(o.2R)c 1s.2U(o);k([\'2a\',\'8B\'].Y(o.3l.3L()))c o;$N(o,v.1c);o.2R=h(){};c 1s.2U(o)};F.3k=F.2n;h $$(){m I=[];G(m i=0,j=M.H;i<j;i++){m 1b=M[i];1C($q(1b)){Q\'W\':I.14(1b);Q\'7B\':1i;Q P:1i;Q\'23\':1b=F.3k(1b,12);4D:I.N(1b)}}c $$.3b(I)};$$.3b=h(15){m I=[];G(m i=0,l=15.H;i<l;i++){k(15[i].$3r)6m;m W=$(15[i]);k(W&&!W.$3r){W.$3r=12;I.14(W)}}G(m n=0,d=I.H;n<d;n++)I[n].$3r=1d;c V 1m(I)};1m.5K=h(t){c h(){m U=M;m X=[];m I=12;G(m i=0,j=7.H,25;i<j;i++){25=7[i][t].2O(7[i],U);k($q(25)!=\'W\')I=P;X.14(25)};c(I)?$$.3b(X):X}};v.N=h(1S){G(m t 1g 1S){3g.1c[t]=1S[t];v.1c[t]=1S[t];v[t]=$2P.3w(t);m 5L=(1r.1c[t])?t+\'1m\':t;1m.1c[5L]=1m.5K(t)}};v.N({2r:h(1e){G(m 1j 1g 1e){m 35=1e[1j];1C(1j){Q\'8p\':7.67(35);1i;Q\'K\':k(7.51)7.51(35);1i;Q\'1S\':7.6K(35);1i;4D:7.3v(1j,35)}}c 7},2V:h(o,5G){o=$(o);1C(5G){Q\'5y\':o.1Y.4V(7,o);1i;Q\'5E\':m 30=o.6b();k( ! 30)o.1Y.4A(7);T o.1Y.4V(7,30);1i;Q\'2d\':m 4M=o.5q;k(4M){o.4V(7,4M);1i}4D:o.4A(7)}c 7},8e:h(o){c 7.2V(o,\'5y\')},8f:h(o){c 7.2V(o,\'5E\')},8d:h(o){c 7.2V(o,\'5j\')},8c:h(o){c 7.2V(o,\'2d\')},89:h(){m I=[];$1t(M,h(5V){I=I.5c(5V)});$$(I).2V(7);c 7},2F:h(){c 7.1Y.7g(7)},8a:h(6h){m o=$(7.8b(6h!==P));k( ! o.$K)c o;o.$K={};G(m q 1g 7.$K)o.$K[q]={\'1k\':$A(7.$K[q].1k),\'1o\':$A(7.$K[q].1o)};c o.3F()},8g:h(o){o=$(o);7.1Y.8h(o,7);c o},5z:h(22){7.4A(F.8m(22));c 7},4I:h(17){c 7.17.Y(17,\' \')},6a:h(17){k( ! 7.4I(17))7.17=(7.17+\' \'+17).4K();c 7},65:h(17){7.17=7.17.2q(V 4F(\'(^|\\\\s)\'+17+\'(?:\\\\s|$)\'),\'$1\').4K();c 7},8n:h(17){c 7.4I(17)?7.65(17):7.6a(17)},6z:h(t,O){1C(t){Q\'1J\':c 7.66(4G(O));Q\'8l\':t=(C.1I)?\'8k\':\'8i\'}t=t.4p();1C($q(O)){Q\'3U\':k( ! [\'8j\',\'6j\'].Y(t))O+=\'4t\';1i;Q\'15\':O=\'1Q(\'+O.1W(\',\')+\')\'}7.1a[t]=O;c 7},67:h(2g){1C($q(2g)){Q\'2a\':v.3J(7,\'6z\',2g);1i;Q\'23\':7.1a.4j=2g}c 7},66:h(1J){k(1J==0){k(7.1a.3y!="68")7.1a.3y="68"}T{k(7.1a.3y!="6f")7.1a.3y="6f"}k( ! 7.3z||!7.3z.7u)7.1a.6j=1;k(C.1I)7.1a.1X=(1J==1)?\'\':"7s(1J="+1J*7t+")";7.1a.1J=7.$2i.1J=1J;c 7},2D:h(t){t=t.4p();m 18=7.1a[t];k( ! $33(18)){k(t==\'1J\')c 7.$2i.1J;18=[];G(m 1a 1g v.2N){k(t==1a){v.2N[1a].1t(h(s){m 1a=7.2D(s);18.14(36(1a)?1a:\'79\')},7);k(t==\'2p\'){m 3x=18.3x(h(2W){c(2W==18[0])});c(3x)?18[0]:P}c 18.1W(\' \')}}k(t.Y(\'2p\')){k(v.2N.2p.Y(t)){c[\'75\',\'7p\',\'7y\'].2c(h(p){c 7.2D(t+p)},7).1W(\' \')}T k(v.5W.Y(t)){c[\'5I\',\'5O\',\'5w\',\'5D\'].2c(h(p){c 7.2D(\'2p\'+p+t.2q(\'2p\',\'\'))},7).1W(\' \')}}k(F.6I)18=F.6I.7x(7,1d).7v(t.6E());T k(7.3z)18=7.3z[t]}k(C.1I)18=v.7e(t,18,7);k(18&&t.2e(/5d/i)&&18.Y(\'1Q\')){c 18.56(\'1Q\').3K(1,4).2c(h(5d){c 5d.3A()}).1W(\' \')}c 18},7A:h(){c v.4y(7,\'2D\',M)},2Z:h(3B,1u){3B+=\'7r\';m o=(1u)?7[1u]:7[3B];5h(o&&$q(o)!=\'W\')o=o[3B];c $(o)},8J:h(){c 7.2Z(\'2o\')},6b:h(){c 7.2Z(\'30\')},af:h(){c 7.2Z(\'30\',\'5q\')},62:h(){c 7.2Z(\'2o\',\'9F\')},9H:h(){c $(7.1Y)},9K:h(){c $$(7.5U)},4i:h(o){c!!$A(7.2n(\'*\')).Y(o)},3I:h(t){m 29=v.3u[t];k(29)c 7[29];m 5b=v.63[t]||0;k( ! C.1I||5b)c 7.a6(t,5b);m 59=7.9U[t];c(59)?59.6u:1d},aB:h(t){m 29=v.3u[t];k(29)7[29]=\'\';T 7.9Y(t);c 7},9X:h(){c v.4y(7,\'3I\',M)},3v:h(t,O){m 29=v.3u[t];k(29)7[29]=O;T 7.9W(t,O);c 7},6K:h(2g){c v.3J(7,\'3v\',2g)},6Z:h(){7.6U=$A(M).1W(\'\');c 7},9V:h(22){m 1R=7.2Y();k([\'1a\',\'2Q\'].Y(1R)){k(C.1I){k(1R==\'1a\')7.5M.4j=22;T k(1R==\'2Q\')7.3v(\'22\',22);c 7}T{7.7g(7.5q);c 7.5z(22)}}7[$3q(7.4c)?\'4c\':\'6Y\']=22;c 7},a0:h(){m 1R=7.2Y();k([\'1a\',\'2Q\'].Y(1R)){k(C.1I){k(1R==\'1a\')c 7.5M.4j;T k(1R==\'2Q\')c 7.3I(\'22\')}T{c 7.6U}}c($49(7.4c,7.6Y))},2Y:h(){c 7.3l.3L()},2j:h(){1s.3C(7.2n(\'*\'));c 7.6Z(\'\')}});v.7e=h(t,18,W){k($33(36(18)))c 18;k([\'5m\',\'34\'].Y(t)){m 1o=(t==\'34\')?[\'2l\',\'5i\']:[\'2d\',\'5j\'];m 2A=0;1o.1t(h(O){2A+=W.2D(\'2p-\'+O+\'-34\').3p()+W.2D(\'4O-\'+O).3p()});c W[\'5g\'+t.71()]-2A+\'4t\'}T k(t.2e(/2p(.+)75|7b|4O/)){c\'79\'}c 18};v.2N={\'2p\':[],\'4O\':[],\'7b\':[]};[\'5I\',\'5O\',\'5w\',\'5D\'].1t(h(5A){G(m 1a 1g v.2N)v.2N[1a].14(1a+5A)});v.5W=[\'a5\',\'a4\',\'a2\'];v.4y=h(o,2w,1k){m 18={};$1t(1k,h(1h){18[1h]=o[2w](1h)});c 18};v.3J=h(o,2w,4H){G(m 1h 1g 4H)o[2w](1h,4H[1h]);c o};v.3u=V 2s({\'4o\':\'17\',\'G\':\'a3\',\'9T\':\'8F\',\'9J\':\'9I\',\'9G\':\'9L\',\'9R\':\'9P\',\'9N\':\'9O\',\'a7\':\'a8\',\'at\':\'as\',\'O\':\'O\',\'5Y\':\'5Y\',\'5X\':\'5X\',\'5Z\':\'5Z\',\'61\':\'61\'});v.63={\'41\':2,\'3Y\':2};v.1P={3t:{2E:h(q,B){k(7.4R)7.4R(q,B,P);T 7.ar(\'4E\'+q,B);c 7},6X:h(q,B){k(7.6c)7.6c(q,B,P);T 7.ao(\'4E\'+q,B);c 7}}};C.N(v.1P.3t);F.N(v.1P.3t);v.N(v.1P.3t);m 1s={I:[],2U:h(o){k( ! o.$2i){1s.I.14(o);o.$2i={\'1J\':1}}c o},3C:h(I){G(m i=0,j=I.H,o;i<j;i++){k( ! (o=I[i])||!o.$2i)6m;k(o.$K)o.26(\'3C\').3F();G(m p 1g o.$2i)o.$2i[p]=1d;G(m d 1g v.1c)o[d]=1d;1s.I[1s.I.2B(o)]=1d;o.2R=o.$2i=o=1d}1s.I.2F(1d)},2j:h(){1s.2U(C);1s.2U(F);1s.3C(1s.I)}};C.2E(\'6L\',h(){C.2E(\'4f\',1s.2j);k(C.1I)C.2E(\'4f\',av)});m 1E=V 1f({1O:h(r){k(r&&r.$6e)c r;7.$6e=12;r=r||C.r;7.r=r;7.q=r.q;7.1Z=r.1Z||r.aA;k(7.1Z.4Z==3)7.1Z=7.1Z.1Y;7.6g=r.az;7.ay=r.aw;7.ax=r.an;7.am=r.ae;k([\'4e\',\'2S\'].Y(7.q)){7.ac=(r.5C)?r.5C/ab:-(r.a9||0)/3}T k(7.q.Y(\'1h\')){7.3M=r.5N||r.aa;G(m 1q 1g 1E.1k){k(1E.1k[1q]==7.3M){7.1h=1q;1i}}k(7.q==\'6V\'){m 3D=7.3M-ag;k(3D>0&&3D<13)7.1h=\'f\'+3D}7.1h=7.1h||4L.ak(7.3M).3L()}T k(7.q.2e(/(5p|aj|ah)/)){7.ai={\'x\':r.4X||r.5S+F.1F.3d,\'y\':r.4Y||r.5T+F.1F.3f};7.9Q={\'x\':r.4X?r.4X-C.5F:r.5S,\'y\':r.4Y?r.4Y-C.6i:r.5T};7.9D=(r.5N==3)||(r.90==2);1C(7.q){Q\'4d\':7.1n=r.1n||r.9E;1i;Q\'4a\':7.1n=r.1n||r.5k}7.73()}c 7},1U:h(){c 7.3N().3O()},3N:h(){k(7.r.3N)7.r.3N();T 7.r.8Z=12;c 7},3O:h(){k(7.r.3O)7.r.3O();T 7.r.8Y=P;c 7}});1E.3o={1n:h(){k(7.1n&&7.1n.4Z==3)7.1n=7.1n.1Y},70:h(){4U{1E.3o.1n.1H(7)}4T(e){7.1n=7.1Z}}};1E.1c.73=(C.52)?1E.3o.70:1E.3o.1n;1E.1k=V 2s({\'93\':13,\'97\':38,\'95\':40,\'2l\':37,\'5i\':39,\'8L\':27,\'8G\':32,\'8M\':8,\'8S\':9,\'4S\':46});v.1P.1T={1G:h(q,B){7.$K=7.$K||{};7.$K[q]=7.$K[q]||{\'1k\':[],\'1o\':[]};k(7.$K[q].1k.Y(B))c 7;7.$K[q].1k.14(B);m 3P=q;m 1p=v.1T[q];k(1p){k(1p.5l)1p.5l.1H(7,B);k(1p.2c)B=1p.2c;k(1p.q)3P=1p.q}k( ! 7.4R)B=B.1M({\'J\':7,\'r\':12});7.$K[q].1o.14(B);c(v.4h.Y(3P))?7.2E(3P,B):7},3V:h(q,B){k( ! 7.$K||!7.$K[q])c 7;m 3R=7.$K[q].1k.2B(B);k(3R==-1)c 7;m 1h=7.$K[q].1k.3K(3R,1)[0];m O=7.$K[q].1o.3K(3R,1)[0];m 1p=v.1T[q];k(1p){k(1p.2F)1p.2F.1H(7,B);k(1p.q)q=1p.q}c(v.4h.Y(q))?7.6X(q,O):7},51:h(2g){c v.3J(7,\'1G\',2g)},3F:h(q){k( ! 7.$K)c 7;k( ! q){G(m 3G 1g 7.$K)7.3F(3G);7.$K=1d}T k(7.$K[q]){7.$K[q].1k.1t(h(B){7.3V(q,B)},7);7.$K[q]=1d}c 7},26:h(q,U,1v){k(7.$K&&7.$K[q]){7.$K[q].1k.1t(h(B){B.1M({\'J\':7,\'1v\':1v,\'M\':U})()},7)}c 7},6H:h(19,q){k( ! 19.$K)c 7;k( ! q){G(m 3G 1g 19.$K)7.6H(19,3G)}T k(19.$K[q]){19.$K[q].1k.1t(h(B){7.1G(q,B)},7)}c 7}};C.N(v.1P.1T);F.N(v.1P.1T);v.N(v.1P.1T);v.1T=V 2s({\'6v\':{q:\'4d\',2c:h(r){r=V 1E(r);k(r.1n!=7&&!7.4i(r.1n))7.26(\'6v\',r)}},\'6x\':{q:\'4a\',2c:h(r){r=V 1E(r);k(r.1n!=7&&!7.4i(r.1n))7.26(\'6x\',r)}},\'2S\':{q:(C.52)?\'4e\':\'2S\'}});v.4h=[\'5p\',\'9v\',\'9t\',\'9r\',\'2S\',\'4e\',\'4d\',\'4a\',\'9w\',\'6V\',\'9x\',\'9B\',\'6D\',\'4f\',\'6L\',\'9A\',\'9y\',\'9z\',\'9p\',\'5J\',\'9o\',\'9f\',\'9g\',\'9e\',\'9d\',\'9b\',\'2M\'];4q.N({6s:h(J,U){c 7.1M({\'J\':J,\'M\':U,\'r\':1E})}});1m.N({9c:h(1R){c V 1m(7.1X(h(o){c(v.2Y(o)==1R)}))},6P:h(17,1w){m I=7.1X(h(o){c(o.17&&o.17.Y(17,\' \'))});c(1w)?I:V 1m(I)},6O:h(2u,1w){m I=7.1X(h(o){c(o.2u==2u)});c(1w)?I:V 1m(I)},6M:h(1q,4l,O,1w){m I=7.1X(h(o){m 1l=v.3I(o,1q);k( ! 1l)c P;k( ! 4l)c 12;1C(4l){Q\'=\':c(1l==O);Q\'*=\':c(1l.Y(O));Q\'^=\':c(1l.4u(0,O.H)==O);Q\'$=\':c(1l.4u(1l.H-O.H)==O);Q\'!=\':c(1l!=O);Q\'~=\':c 1l.Y(O,\' \')}c P});c(1w)?I:V 1m(I)}});h $E(1b,1X){c($(1X)||F).5R(1b)};h $9i(1b,1X){c($(1X)||F).3k(1b)};$$.20={\'53\':/^(\\w*|\\*)(?:#([\\w-]+)|\\.([\\w-]+))?(?:\\[(\\w+)(?:([!*^$]?=)["\']?([^"\'\\]]*)["\']?)?])?$/,\'2h\':{5o:h(X,1N,L,i){m 1y=[1N.9m?\'5a:\':\'\',L[1]];k(L[2])1y.14(\'[@2u="\',L[2],\'"]\');k(L[3])1y.14(\'[Y(5c(" ", @4o, " "), " \',L[3],\' ")]\');k(L[4]){k(L[5]&&L[6]){1C(L[5]){Q\'*=\':1y.14(\'[Y(@\',L[4],\', "\',L[6],\'")]\');1i;Q\'^=\':1y.14(\'[9l-9j(@\',L[4],\', "\',L[6],\'")]\');1i;Q\'$=\':1y.14(\'[9k(@\',L[4],\', 23-H(@\',L[4],\') - \',L[6].H,\' + 1) = "\',L[6],\'"]\');1i;Q\'=\':1y.14(\'[@\',L[4],\'="\',L[6],\'"]\');1i;Q\'!=\':1y.14(\'[@\',L[4],\'!="\',L[6],\'"]\')}}T{1y.14(\'[@\',L[4],\']\')}}X.14(1y.1W(\'\'));c X},55:h(X,1N,1w){m I=[];m 2h=F.6l(\'.//\'+X.1W(\'//\'),1N,$$.20.6S,91.9n,1d);G(m i=0,j=2h.9h;i<j;i++)I.14(2h.9q(i));c(1w)?I:V 1m(I.2c($))}},\'7o\':{5o:h(X,1N,L,i){k(i==0){k(L[2]){m o=1N.3m(L[2]);k( ! o||((L[1]!=\'*\')&&(v.2Y(o)!=L[1])))c P;X=[o]}T{X=$A(1N.2n(L[1]))}}T{X=$$.20.2n(X,L[1]);k(L[2])X=1m.6O(X,L[2],12)}k(L[3])X=1m.6P(X,L[3],12);k(L[4])X=1m.6M(X,L[4],L[5],L[6],12);c X},55:h(X,1N,1w){c(1w)?X:$$.3b(X)}},6S:h(6T){c(6T==\'5a\')?\'8O://8Q.8R.8T/8N/5a\':P},2n:h(1N,3l){m 58=[];G(m i=0,j=1N.H;i<j;i++)58.N(1N[i].2n(3l));c 58}};$$.20.2w=(C.2h)?\'2h\':\'7o\';v.1P.5f={3n:h(1b,1w){m X=[];1b=1b.57().56(\' \');G(m i=0,j=1b.H;i<j;i++){m 78=1b[i];m L=78.1D($$.20.53);k( ! L)1i;L[1]=L[1]||\'*\';m 1y=$$.20[$$.20.2w].5o(X,7,L,i);k( ! 1y)1i;X=1y}c $$.20[$$.20.2w].55(X,7,1w)},5R:h(1b){c $(7.3n(1b,12)[0]||P)},3k:h(1b,1w){m I=[];1b=1b.56(\',\');G(m i=0,j=1b.H;i<j;i++)I=I.5c(7.3n(1b[i],12));c(1w)?I:$$.3b(I)}};v.N({3m:h(2u){m o=F.3m(2u);k( ! o)c P;G(m 1B=o.1Y;1B!=7;1B=1B.1Y){k( ! 1B)c P}c o},8X:h(17){c 7.3n(\'.\'+17)}});F.N(v.1P.5f);v.N(v.1P.5f);v.N({2k:h(x,y){7.3d=x;7.3f=y},4s:h(){c{\'2M\':{\'x\':7.3d,\'y\':7.3f},\'2A\':{\'x\':7.5s,\'y\':7.4m},\'4k\':{\'x\':7.47,\'y\':7.48}}},2z:h(1x){1x=1x||[];m o=7,2l=0,2d=0;8W{2l+=o.al||0;2d+=o.aq||0;o=o.a1}5h(o);1x.1t(h(W){2l-=W.3d||0;2d-=W.3f||0});c{\'x\':2l,\'y\':2d}},9Z:h(1x){c 7.2z(1x).y},9M:h(1x){c 7.2z(1x).x},9S:h(1x){m 5e=7.2z(1x);m R={\'34\':7.5s,\'5m\':7.4m,\'2l\':5e.x,\'2d\':5e.y};R.5i=R.2l+R.34;R.5j=R.2d+R.5m;c R}});v.1T.5n={5l:h(B){k(C.3T){B.1H(7);c}m 31=h(){k(C.3T)c;C.3T=12;C.1K=$4C(C.1K);7.26(\'5n\')}.J(7);k(F.3W&&C.2C){C.1K=h(){k([\'3T\',\'7j\'].Y(F.3W))31()}.2x(50)}T k(F.3W&&C.1I){k( ! $(\'54\')){m 3Y=(C.2K.92==\'98:\')?\'://0\':\'96:94(0)\';F.8V(\'<2Q 2u="54" 8U 3Y="\'+3Y+\'"><\\/2Q>\');$(\'54\').8K=h(){k(7.3W==\'7j\')31()}}}T{C.2E("6D",31);F.2E("8I",31)}}};C.8H=h(B){c 7.1G(\'5n\',B)};C.N({76:h(){k(7.3S)c 7.9s;k(7.5B)c F.45.6G;c F.1F.6G},7k:h(){k(7.3S)c 7.9C;k(7.5B)c F.45.6q;c F.1F.6q},7d:h(){k(7.1I)c 1z.1L(F.1F.5s,F.1F.47);k(7.2C)c F.45.47;c F.1F.47},6C:h(){k(7.1I)c 1z.1L(F.1F.4m,F.1F.48);k(7.2C)c F.45.48;c F.1F.48},6w:h(){c 7.5F||F.1F.3d},6A:h(){c 7.6i||F.1F.3f},4s:h(){c{\'2A\':{\'x\':7.76(),\'y\':7.7k()},\'4k\':{\'x\':7.7d(),\'y\':7.6C()},\'2M\':{\'x\':7.6w(),\'y\':7.6A()}}},2z:h(){c{\'x\':0,\'y\':0}}});m 2H={};2H.4z=V 1f({u:{4J:1f.2j,42:1f.2j,6k:1f.2j,7f:h(p){c-(1z.9u(1z.9a*p)-1)/2},2m:99,8P:\'4t\',4Q:12,5x:50},1O:h(u){7.W=7.W||1d;7.7h(u);k(7.u.1O)7.u.1O.1H(7)},5v:h(){m 28=$28();k(28<7.28+7.u.2m){7.6t=7.u.7f((28-7.28)/7.u.2m);7.4P();7.5r()}T{7.1U(12);7.2r(7.1A);7.26(\'42\',7.W,10);7.7n()}},2r:h(1A){7.2T=1A;7.5r();c 7},4P:h(){7.2T=7.4x(7.19,7.1A)},4x:h(19,1A){c(1A-19)*7.6t+19},1u:h(19,1A){k( ! 7.u.4Q)7.1U();T k(7.1K)c 7;7.19=19;7.1A=1A;7.5J=7.1A-7.19;7.28=$28();7.1K=7.5v.2x(1z.4W(7i/7.u.5x),7);7.26(\'4J\',7.W);c 7},1U:h(44){k( ! 7.1K)c 7;7.1K=$4C(7.1K);k( ! 44)7.26(\'6k\',7.W);c 7},1p:h(19,1A){c 7.1u(19,1A)},au:h(44){c 7.1U(44)}});2H.4z.6r(V 6p,V 1T,V 6n);2H.6W=2H.4z.N({u:{1x:[],5g:{\'x\':0,\'y\':0},69:12},1O:h(W,u){7.2T=[];7.W=$(W);7.4B={\'1U\':7.1U.J(7,P)};7.1B(u);k(7.u.69){7.1G(\'4J\',h(){F.1G(\'2S\',7.4B.1U)}.J(7));7.1G(\'42\',h(){F.3V(\'2S\',7.4B.1U)}.J(7))}},4P:h(){G(m i=0;i<2;i++)7.2T[i]=7.4x(7.19[i],7.1A[i])},2k:h(x,y){k(7.1K&&7.u.4Q)c 7;m o=7.W.4s();m 1o={\'x\':x,\'y\':y};G(m z 1g o.2A){m 1L=o.4k[z]-o.2A[z];k($33(1o[z]))1o[z]=($q(1o[z])==\'3U\')?1o[z].6Q(0,1L):1L;T 1o[z]=o.2M[z];1o[z]+=7.u.5g[z]}c 7.1u([o.2M.x,o.2M.y],[1o.x,1o.y])},ad:h(){c 7.2k(P,0)},8A:h(){c 7.2k(P,\'5Q\')},7z:h(){c 7.2k(0,P)},7w:h(){c 7.2k(\'5Q\',P)},5k:h(o){m 1B=7.W.2z(7.u.1x);m 1Z=$(o).2z(7.u.1x);c 7.2k(1Z.x-1B.x,1Z.y-1B.y)},5r:h(){7.W.2k(7.2T[0],7.2T[1])}});m 7q=V 2s({u:{43:P,3Z:P,2m:P,4N:P},2r:h(1h,O,u){u=$21(7.u,u);O=8E(O);k(u.43)O+=\'; 43=\'+u.43;k(u.3Z)O+=\'; 3Z=\'+u.3Z;k(u.2m){m 3X=V 5P();3X.8o(3X.5H()+u.2m*24*60*60*7i);O+=\'; 8z=\'+3X.8y()}k(u.4N)O+=\'; 4N\';F.2v=1h+\'=\'+O;c $N(u,{\'1h\':1h,\'O\':O})},8C:h(1h){m O=F.2v.1D(\'(?:^|;)\\\\s*\'+1h.7m()+\'=([^;]*)\');c O?8v(O[1]):P},2F:h(2v,u){k($q(2v)==\'2a\')7.2r(2v.1h,\'\',$21(2v,{2m:-1}));T 7.2r(2v,\'\',$21(u,{2m:-1}))}});m 87=2H.6W.N({1O:h(u){7.1B(C,u);7.2X=(7.u.2X)?$$(7.u.2X):$$(F.2X);m 2K=C.2K.41.1D(/^[^#]*/)[0]+\'#\';7.2X.1t(h(2L){k(2L.41.2B(2K)!=0)c;m 2b=2L.41.4u(2K.H);k(2b&&$(2b))7.77(2L,2b)},7);k( ! C.3S)7.1G(\'42\',h(){C.2K.7O=7.2b})},77:h(2L,2b){2L.1G(\'5p\',h(r){7.2b=2b;7.5k(2b);r.1U()}.6s(7))}});',62,658,'|||||||this|||||return|||||function|||if||var||el||type|event||property|options|Element||||||fn|window|||document|for|length|elements|bind|events|param|arguments|extend|value|false|case|obj||else|args|new|element|items|contains||||true||push|array||className|result|from|style|selector|prototype|null|props|Class|in|key|break|prop|keys|current|Elements|relatedTarget|values|custom|name|Array|Garbage|each|start|delay|nocash|overflown|temp|Math|to|parent|switch|match|Event|documentElement|addEvent|call|ie|opacity|timer|max|create|context|initialize|Methods|rgb|tag|properties|Events|stop|item|join|filter|parentNode|target|shared|merge|text|string||returns|fireEvent||time|index|object|anchor|map|top|test|iterable|source|xpath|tmp|empty|scrollTo|left|duration|getElementsByTagName|previous|border|replace|set|Abstract|chains|id|cookie|method|periodical|min|getPosition|size|indexOf|webkit|getStyle|addListener|remove|hex|Fx|results|len|location|link|scroll|Styles|apply|native|script|htmlElement|mousewheel|now|collect|inject|bit|links|getTag|walk|next|domReady||chk|width|val|parseInt||||klass|unique|option|scrollLeft|precision|scrollTop|HTMLElement|mix|proto|mp|getElementsBySelector|tagName|getElementById|getElements|fix|toInt|defined|included|attempt|Listeners|Properties|setProperty|generic|every|visibility|currentStyle|rgbToHex|brother|trash|fKey|regex|removeEvents|evType|forEach|getProperty|setMany|splice|toLowerCase|code|stopPropagation|preventDefault|realType|typeof|pos|webkit419|loaded|number|removeEvent|readyState|date|src|path||href|onComplete|domain|end|body||scrollWidth|scrollHeight|pick|mouseout|hexToRgb|innerText|mouseover|DOMMouseScroll|unload|charAt|NativeEvents|hasChild|cssText|scrollSize|operator|offsetHeight|merged|class|camelCase|Function|include|getSize|px|substr|newArray|random|compute|getMany|Base|appendChild|bound|clear|default|on|RegExp|parseFloat|pairs|hasClass|onStart|clean|String|first|secure|padding|setNow|wait|addEventListener|delete|catch|try|insertBefore|round|pageX|pageY|nodeType||addEvents|gecko|regexp|ie_ready|getItems|split|trim|found|node|xhtml|flag|concat|color|position|Dom|offset|while|right|bottom|toElement|add|height|domready|getParam|click|firstChild|increase|offsetWidth|picked|constructor|step|Bottom|fps|before|appendText|direction|opera|wheelDelta|Left|after|pageXOffset|where|getTime|Top|change|Multi|elementsProperty|styleSheet|which|Right|Date|full|getElement|clientX|clientY|childNodes|argument|borderShort|checked|disabled|multiple||selected|getLast|PropertiesIFlag|Merge|removeClass|setOpacity|setStyles|hidden|wheelStops|addClass|getNext|removeEventListener|pp|extended|visible|shift|contents|pageYOffset|zoom|onCancel|evaluate|continue|Options|callee|Chain|clientHeight|implement|bindWithEvent|delta|nodeValue|mouseenter|getScrollLeft|mouseleave|toUpperCase|setStyle|getScrollTop|slice|getScrollHeight|load|hyphenate|ie6|clientWidth|cloneEvents|defaultView|params|setProperties|beforeunload|filterByAttribute|undefined|filterById|filterByClass|limit|copy|resolver|prefix|innerHTML|keydown|Scroll|removeListener|textContent|setHTML|relatedTargetGecko|capitalize|toFloat|fixRelatedTarget|head|Width|getWidth|useLink|sel|0px|createElement|margin|Number|getScrollWidth|fixStyle|transition|removeChild|setOptions|1000|complete|getHeight|interval|escapeRegExp|callChain|normal|Style|Cookie|Sibling|alpha|100|hasLayout|getPropertyValue|toRight|getComputedStyle|Color|toLeft|getStyles|boolean|Object|iframe|DOMElement|khtml|getBoxObjectFor|taintEnabled|webkit420|execCommand|BackgroundImageCache|associate|getRandom|some|hash|chain|clearChain|navigator|all|whitespace|collection|textnode|nodeName|MooTools|version|floor|clearTimeout|XMLHttpRequest|ie7|ActiveXObject|Document|clearInterval|Window|SmoothScroll|transparent|adopt|clone|cloneNode|injectTop|injectInside|injectBefore|injectAfter|replaceWith|replaceChild|cssFloat|zIndex|styleFloat|float|createTextNode|toggleClass|setTime|styles|err|pass|setInterval|setTimeout|toString|decodeURIComponent|bindAsEventListener|pow|toGMTString|expires|toBottom|embed|get|times|encodeURIComponent|colSpan|space|onDomReady|DOMContentLoaded|getPrevious|onreadystatechange|esc|backspace|1999|http|unit|www|w3|tab|org|defer|write|do|getElementsByClassName|returnValue|cancelBubble|button|XPathResult|protocol|enter|void|down|javascript|up|https|500|PI|contextmenu|filterByTag|abort|error|reset|select|snapshotLength|ES|with|substring|starts|namespaceURI|UNORDERED_NODE_SNAPSHOT_TYPE|submit|blur|snapshotItem|mousedown|innerWidth|mouseup|cos|dblclick|mousemove|keypress|move|focus|resize|keyup|innerHeight|rightClick|fromElement|lastChild|accesskey|getParent|rowSpan|rowspan|getChildren|accessKey|getLeft|maxlength|maxLength|tabIndex|client|tabindex|getCoordinates|colspan|attributes|setText|setAttribute|getProperties|removeAttribute|getTop|getText|offsetParent|borderColor|htmlFor|borderStyle|borderWidth|getAttribute|readonly|readOnly|detail|keyCode|120|wheel|toTop|metaKey|getFirst|111|menu|page|mouse|fromCharCode|offsetLeft|meta|altKey|detachEvent||offsetTop|attachEvent|frameBorder|frameborder|clearTimer|CollectGarbage|ctrlKey|alt|control|shiftKey|srcElement|removeProperty'.split('|'),0,{})) diff --git a/models/QueryTest_Board.php b/models/QueryTest_Board.php index e326c9830..dbee0c97f 100644 --- a/models/QueryTest_Board.php +++ b/models/QueryTest_Board.php @@ -15,7 +15,7 @@ class QueryTest_Board extends Doctrine_Record $this->hasColumn('position as position', 'integer', 4, array('default' => 0, 'notnull')); } - + /** * Initializes the relations. */ diff --git a/models/QueryTest_Category.php b/models/QueryTest_Category.php index 3c2887b8e..f4d837de4 100644 --- a/models/QueryTest_Category.php +++ b/models/QueryTest_Category.php @@ -8,7 +8,7 @@ class QueryTest_Category extends Doctrine_Record * @var integer */ public $depth; - + /** * Table definition. */ @@ -23,7 +23,7 @@ class QueryTest_Category extends Doctrine_Record $this->hasColumn('position as position', 'integer', 4, array('default' => 0, 'notnull')); } - + /** * Relations definition. */ diff --git a/models/QueryTest_Entry.php b/models/QueryTest_Entry.php index 24e9fde89..1f8321e0a 100644 --- a/models/QueryTest_Entry.php +++ b/models/QueryTest_Entry.php @@ -11,7 +11,7 @@ class QueryTest_Entry extends Doctrine_Record $this->hasColumn('date', 'integer', 4, array('notnull')); } - + /** * Runtime definition of the relationships to other entities. */ diff --git a/models/QueryTest_User.php b/models/QueryTest_User.php index 1d3c5e85b..7727360a0 100644 --- a/models/QueryTest_User.php +++ b/models/QueryTest_User.php @@ -8,7 +8,7 @@ class QueryTest_User extends Doctrine_Record array('notnull')); $this->hasColumn('visibleRankId', 'integer', 4); } - + /** * Runtime definition of the relationships to other entities. */ diff --git a/models/User.php b/models/User.php index 16748292e..9cd73295b 100644 --- a/models/User.php +++ b/models/User.php @@ -29,6 +29,7 @@ class User extends Entity 'refClass' => 'Groupuser', )); } + /** Custom validation */ public function validate() { diff --git a/tests/CustomResultSetOrderTestCase.php b/tests/CustomResultSetOrderTestCase.php index f1e6439bf..ab976a224 100644 --- a/tests/CustomResultSetOrderTestCase.php +++ b/tests/CustomResultSetOrderTestCase.php @@ -75,7 +75,7 @@ class Doctrine_CustomResultSetOrder_TestCase extends Doctrine_UnitTestCase { $this->connection->flush(); } - + /** * Prepares the tables. */ @@ -84,6 +84,7 @@ class Doctrine_CustomResultSetOrder_TestCase extends Doctrine_UnitTestCase { $this->tables[] = "BoardWithPosition"; parent::prepareTables(); } + /** * Checks whether the boards are correctly assigned to the categories. * @@ -96,7 +97,6 @@ class Doctrine_CustomResultSetOrder_TestCase extends Doctrine_UnitTestCase { * 1 | 0 | First | 2 | 1 * 3 | 2 | Third | NULL */ - public function testQueryWithOrdering2() { $q = new Doctrine_Query($this->connection); @@ -142,7 +142,6 @@ class Doctrine_CustomResultSetOrder_TestCase extends Doctrine_UnitTestCase { * 1 | 0 | First | 2 | 1 * 3 | 2 | Third | NULL */ - public function testQueryWithOrdering() { $q = new Doctrine_Query($this->connection); $categories = $q->select('c.*, b.*') diff --git a/tests/DBTestCase.php b/tests/DBTestCase.php index 259e64ca5..3d8903d91 100644 --- a/tests/DBTestCase.php +++ b/tests/DBTestCase.php @@ -365,6 +365,7 @@ class Doctrine_Db_TestCase extends Doctrine_UnitTestCase $this->pass(); } } + /** public function testGetConnectionPdoLikeDSN() { diff --git a/tests/EventListenerTestCase.php b/tests/EventListenerTestCase.php index 1d25e203b..2cd57df5e 100644 --- a/tests/EventListenerTestCase.php +++ b/tests/EventListenerTestCase.php @@ -53,6 +53,7 @@ class Doctrine_EventListener_TestCase extends Doctrine_UnitTestCase { $this->assertEqual($e->getTable()->getListener(), $this->logger); } + /** public function testOnLoad() { $this->logger->clear(); diff --git a/tests/Export/SqliteTestCase.php b/tests/Export/SqliteTestCase.php index 1851868e4..4d5b9cbe4 100644 --- a/tests/Export/SqliteTestCase.php +++ b/tests/Export/SqliteTestCase.php @@ -179,6 +179,7 @@ class Doctrine_Export_Sqlite_TestCase extends Doctrine_UnitTestCase $this->assertEqual($this->adapter->pop(), 'CREATE TABLE sometable (id INTEGER PRIMARY KEY AUTOINCREMENT, name VARCHAR(4))'); } + /** public function testExportSupportsEmulationOfCascadingDeletes() { diff --git a/tests/Expression/DriverTestCase.php b/tests/Expression/DriverTestCase.php index da293cfd4..6dcec310b 100644 --- a/tests/Expression/DriverTestCase.php +++ b/tests/Expression/DriverTestCase.php @@ -69,6 +69,7 @@ class Doctrine_Expression_Driver_TestCase extends Doctrine_UnitTestCase { $this->pass(); } } + /** * TIME FUNCTIONS */ @@ -126,11 +127,10 @@ class Doctrine_Expression_Driver_TestCase extends Doctrine_UnitTestCase { public function testDivReturnsValidSql() { $this->assertEqual($this->expr->div(array(2, 3)), '(2 / 3)'); } - + /** * ASSERT OPERATORS */ - public function testEqReturnsValidSql() { $this->assertEqual($this->expr->eq(1, 1), '1 = 1'); } @@ -149,7 +149,7 @@ class Doctrine_Expression_Driver_TestCase extends Doctrine_UnitTestCase { public function testLteReturnsValidSql() { $this->assertEqual($this->expr->lte(1, 1), '1 <= 1'); } - + /** * WHERE OPERATORS */ diff --git a/tests/PessimisticLockingTestCase.php b/tests/PessimisticLockingTestCase.php index ddb0e1ec6..49a81e9fd 100644 --- a/tests/PessimisticLockingTestCase.php +++ b/tests/PessimisticLockingTestCase.php @@ -32,7 +32,7 @@ */ class Doctrine_PessimisticLocking_TestCase extends Doctrine_UnitTestCase { private $lockingManager; - + /** * Sets up everything for the lock testing * @@ -47,7 +47,7 @@ class Doctrine_PessimisticLocking_TestCase extends Doctrine_UnitTestCase { $entry1->topic = 'I love donuts!'; $entry1->save(); } - + /** * Tests the basic locking mechanism * @@ -68,7 +68,7 @@ class Doctrine_PessimisticLocking_TestCase extends Doctrine_UnitTestCase { $released = $this->lockingManager->releaseLock($entries[0], 'romanb'); $this->assertTrue($released); } - + /** * Tests the release mechanism of aged locks * This test implicitly tests getLock(). diff --git a/tests/Query/IdentifierQuotingTestCase.php b/tests/Query/IdentifierQuotingTestCase.php index cf9476c80..ff9ce42c0 100644 --- a/tests/Query/IdentifierQuotingTestCase.php +++ b/tests/Query/IdentifierQuotingTestCase.php @@ -68,6 +68,7 @@ class Doctrine_Query_IdentifierQuoting_TestCase extends Doctrine_UnitTestCase $q->execute(); } + /** public function testQuerySupportsIdentifierQuotingWorksWithinFunctions() { diff --git a/tests/Query/OneToOneFetchingTestCase.php b/tests/Query/OneToOneFetchingTestCase.php index 0bdb92839..bd6c0a7e9 100644 --- a/tests/Query/OneToOneFetchingTestCase.php +++ b/tests/Query/OneToOneFetchingTestCase.php @@ -85,7 +85,7 @@ class Doctrine_Query_OneToOneFetching_TestCase extends Doctrine_UnitTestCase $author->save(); } - + /** * Tests that one-one relations are correctly loaded with array fetching * when the related records EXIST. @@ -146,7 +146,6 @@ class Doctrine_Query_OneToOneFetching_TestCase extends Doctrine_UnitTestCase * Tests that one-one relations are correctly loaded with array fetching * when the related records DONT EXIST. */ - public function testOneToOneArrayFetchingWithEmptyRelations() { // temporarily remove the relation to fake a non-existant one diff --git a/tests/Query/ReferenceModelTestCase.php b/tests/Query/ReferenceModelTestCase.php index 86ffc5c39..f9ae4dabc 100644 --- a/tests/Query/ReferenceModelTestCase.php +++ b/tests/Query/ReferenceModelTestCase.php @@ -93,6 +93,7 @@ class Doctrine_Query_ReferenceModel_TestCase extends Doctrine_UnitTestCase { $this->connection->clear(); } + /** public function testSelfReferencingWithDoubleNesting() { $query = new Doctrine_Query(); diff --git a/tests/Record/StateTestCase.php b/tests/Record/StateTestCase.php index 876ba86f1..681734dd4 100644 --- a/tests/Record/StateTestCase.php +++ b/tests/Record/StateTestCase.php @@ -60,6 +60,7 @@ class Doctrine_Record_State_TestCase extends Doctrine_UnitTestCase $user->save(); } + /** public function testAssignFieldsToProxies() { diff --git a/tests/ValidatorTestCase.php b/tests/ValidatorTestCase.php index 9bf33584c..4eb270247 100644 --- a/tests/ValidatorTestCase.php +++ b/tests/ValidatorTestCase.php @@ -277,7 +277,7 @@ class Doctrine_Validator_TestCase extends Doctrine_UnitTestCase $this->manager->setAttribute(Doctrine::ATTR_VALIDATE, Doctrine::VALIDATE_NONE); } - + /** * Tests whether the validateOnInsert() callback works correctly * in descendants of Doctrine_Record. diff --git a/tests/coverage/Doctrine.html b/tests/coverage/Doctrine.html index 5bc86aae6..869a68998 100644 --- a/tests/coverage/Doctrine.html +++ b/tests/coverage/Doctrine.html @@ -10,2715 +10,2715 @@ </head> <body><h1>Coverage for Doctrine</h1><p><a href="index.php">Back to coverage report</a></p><table> <tr><td>1</td> -<td class="normal"><?php +<td class="normal"><?php </td></tr> <tr><td>2</td> -<td class="normal">/* +<td class="normal">/* </td></tr> <tr><td>3</td> -<td class="normal"> * $Id: Doctrine.php 2814 2007-10-11 04:24:01Z Jonathan.Wage $ +<td class="normal"> * $Id: Doctrine.php 2814 2007-10-11 04:24:01Z Jonathan.Wage $ </td></tr> <tr><td>4</td> -<td class="normal"> * +<td class="normal"> * </td></tr> <tr><td>5</td> -<td class="normal"> * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +<td class="normal"> * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS </td></tr> <tr><td>6</td> -<td class="normal"> * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +<td class="normal"> * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT </td></tr> <tr><td>7</td> -<td class="normal"> * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +<td class="normal"> * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR </td></tr> <tr><td>8</td> -<td class="normal"> * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +<td class="normal"> * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT </td></tr> <tr><td>9</td> -<td class="normal"> * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +<td class="normal"> * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, </td></tr> <tr><td>10</td> -<td class="normal"> * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +<td class="normal"> * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT </td></tr> <tr><td>11</td> -<td class="normal"> * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +<td class="normal"> * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, </td></tr> <tr><td>12</td> -<td class="normal"> * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +<td class="normal"> * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY </td></tr> <tr><td>13</td> -<td class="normal"> * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +<td class="normal"> * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT </td></tr> <tr><td>14</td> -<td class="normal"> * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +<td class="normal"> * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE </td></tr> <tr><td>15</td> -<td class="normal"> * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +<td class="normal"> * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. </td></tr> <tr><td>16</td> -<td class="normal"> * +<td class="normal"> * </td></tr> <tr><td>17</td> -<td class="normal"> * This software consists of voluntary contributions made by many individuals +<td class="normal"> * This software consists of voluntary contributions made by many individuals </td></tr> <tr><td>18</td> -<td class="normal"> * and is licensed under the LGPL. For more information, see +<td class="normal"> * and is licensed under the LGPL. For more information, see </td></tr> <tr><td>19</td> -<td class="normal"> * <http://www.phpdoctrine.com>. +<td class="normal"> * <http://www.phpdoctrine.com>. </td></tr> <tr><td>20</td> -<td class="normal"> */ +<td class="normal"> */ </td></tr> <tr><td>21</td> -<td class="normal"> +<td class="normal"> </td></tr> <tr><td>22</td> -<td class="normal">/** +<td class="normal">/** </td></tr> <tr><td>23</td> -<td class="normal"> * Doctrine +<td class="normal"> * Doctrine </td></tr> <tr><td>24</td> -<td class="normal"> * the base class of Doctrine framework +<td class="normal"> * the base class of Doctrine framework </td></tr> <tr><td>25</td> -<td class="normal"> * +<td class="normal"> * </td></tr> <tr><td>26</td> -<td class="normal"> * @package Doctrine +<td class="normal"> * @package Doctrine </td></tr> <tr><td>27</td> -<td class="normal"> * @author Konsta Vesterinen <kvesteri@cc.hut.fi> +<td class="normal"> * @author Konsta Vesterinen <kvesteri@cc.hut.fi> </td></tr> <tr><td>28</td> -<td class="normal"> * @author Lukas Smith <smith@pooteeweet.org> (PEAR MDB2 library) +<td class="normal"> * @author Lukas Smith <smith@pooteeweet.org> (PEAR MDB2 library) </td></tr> <tr><td>29</td> -<td class="normal"> * @license http://www.opensource.org/licenses/lgpl-license.php LGPL +<td class="normal"> * @license http://www.opensource.org/licenses/lgpl-license.php LGPL </td></tr> <tr><td>30</td> -<td class="normal"> * @link www.phpdoctrine.com +<td class="normal"> * @link www.phpdoctrine.com </td></tr> <tr><td>31</td> -<td class="normal"> * @since 1.0 +<td class="normal"> * @since 1.0 </td></tr> <tr><td>32</td> -<td class="normal"> * @version $Revision: 2814 $ +<td class="normal"> * @version $Revision: 2814 $ </td></tr> <tr><td>33</td> -<td class="normal"> */ +<td class="normal"> */ </td></tr> <tr><td>34</td> -<td class="normal">final class Doctrine +<td class="normal">final class Doctrine </td></tr> <tr><td>35</td> -<td class="normal">{ +<td class="normal">{ </td></tr> <tr><td>36</td> -<td class="normal"> /** +<td class="normal"> /** </td></tr> <tr><td>37</td> -<td class="normal"> * ERROR CONSTANTS +<td class="normal"> * ERROR CONSTANTS </td></tr> <tr><td>38</td> -<td class="normal"> */ +<td class="normal"> */ </td></tr> <tr><td>39</td> -<td class="normal"> const ERR = -1; +<td class="normal"> const ERR = -1; </td></tr> <tr><td>40</td> -<td class="normal"> const ERR_SYNTAX = -2; +<td class="normal"> const ERR_SYNTAX = -2; </td></tr> <tr><td>41</td> -<td class="normal"> const ERR_CONSTRAINT = -3; +<td class="normal"> const ERR_CONSTRAINT = -3; </td></tr> <tr><td>42</td> -<td class="normal"> const ERR_NOT_FOUND = -4; +<td class="normal"> const ERR_NOT_FOUND = -4; </td></tr> <tr><td>43</td> -<td class="normal"> const ERR_ALREADY_EXISTS = -5; +<td class="normal"> const ERR_ALREADY_EXISTS = -5; </td></tr> <tr><td>44</td> -<td class="normal"> const ERR_UNSUPPORTED = -6; +<td class="normal"> const ERR_UNSUPPORTED = -6; </td></tr> <tr><td>45</td> -<td class="normal"> const ERR_MISMATCH = -7; +<td class="normal"> const ERR_MISMATCH = -7; </td></tr> <tr><td>46</td> -<td class="normal"> const ERR_INVALID = -8; +<td class="normal"> const ERR_INVALID = -8; </td></tr> <tr><td>47</td> -<td class="normal"> const ERR_NOT_CAPABLE = -9; +<td class="normal"> const ERR_NOT_CAPABLE = -9; </td></tr> <tr><td>48</td> -<td class="normal"> const ERR_TRUNCATED = -10; +<td class="normal"> const ERR_TRUNCATED = -10; </td></tr> <tr><td>49</td> -<td class="normal"> const ERR_INVALID_NUMBER = -11; +<td class="normal"> const ERR_INVALID_NUMBER = -11; </td></tr> <tr><td>50</td> -<td class="normal"> const ERR_INVALID_DATE = -12; +<td class="normal"> const ERR_INVALID_DATE = -12; </td></tr> <tr><td>51</td> -<td class="normal"> const ERR_DIVZERO = -13; +<td class="normal"> const ERR_DIVZERO = -13; </td></tr> <tr><td>52</td> -<td class="normal"> const ERR_NODBSELECTED = -14; +<td class="normal"> const ERR_NODBSELECTED = -14; </td></tr> <tr><td>53</td> -<td class="normal"> const ERR_CANNOT_CREATE = -15; +<td class="normal"> const ERR_CANNOT_CREATE = -15; </td></tr> <tr><td>54</td> -<td class="normal"> const ERR_CANNOT_DELETE = -16; +<td class="normal"> const ERR_CANNOT_DELETE = -16; </td></tr> <tr><td>55</td> -<td class="normal"> const ERR_CANNOT_DROP = -17; +<td class="normal"> const ERR_CANNOT_DROP = -17; </td></tr> <tr><td>56</td> -<td class="normal"> const ERR_NOSUCHTABLE = -18; +<td class="normal"> const ERR_NOSUCHTABLE = -18; </td></tr> <tr><td>57</td> -<td class="normal"> const ERR_NOSUCHFIELD = -19; +<td class="normal"> const ERR_NOSUCHFIELD = -19; </td></tr> <tr><td>58</td> -<td class="normal"> const ERR_NEED_MORE_DATA = -20; +<td class="normal"> const ERR_NEED_MORE_DATA = -20; </td></tr> <tr><td>59</td> -<td class="normal"> const ERR_NOT_LOCKED = -21; +<td class="normal"> const ERR_NOT_LOCKED = -21; </td></tr> <tr><td>60</td> -<td class="normal"> const ERR_VALUE_COUNT_ON_ROW = -22; +<td class="normal"> const ERR_VALUE_COUNT_ON_ROW = -22; </td></tr> <tr><td>61</td> -<td class="normal"> const ERR_INVALID_DSN = -23; +<td class="normal"> const ERR_INVALID_DSN = -23; </td></tr> <tr><td>62</td> -<td class="normal"> const ERR_CONNECT_FAILED = -24; +<td class="normal"> const ERR_CONNECT_FAILED = -24; </td></tr> <tr><td>63</td> -<td class="normal"> const ERR_EXTENSION_NOT_FOUND = -25; +<td class="normal"> const ERR_EXTENSION_NOT_FOUND = -25; </td></tr> <tr><td>64</td> -<td class="normal"> const ERR_NOSUCHDB = -26; +<td class="normal"> const ERR_NOSUCHDB = -26; </td></tr> <tr><td>65</td> -<td class="normal"> const ERR_ACCESS_VIOLATION = -27; +<td class="normal"> const ERR_ACCESS_VIOLATION = -27; </td></tr> <tr><td>66</td> -<td class="normal"> const ERR_CANNOT_REPLACE = -28; +<td class="normal"> const ERR_CANNOT_REPLACE = -28; </td></tr> <tr><td>67</td> -<td class="normal"> const ERR_CONSTRAINT_NOT_NULL = -29; +<td class="normal"> const ERR_CONSTRAINT_NOT_NULL = -29; </td></tr> <tr><td>68</td> -<td class="normal"> const ERR_DEADLOCK = -30; +<td class="normal"> const ERR_DEADLOCK = -30; </td></tr> <tr><td>69</td> -<td class="normal"> const ERR_CANNOT_ALTER = -31; +<td class="normal"> const ERR_CANNOT_ALTER = -31; </td></tr> <tr><td>70</td> -<td class="normal"> const ERR_MANAGER = -32; +<td class="normal"> const ERR_MANAGER = -32; </td></tr> <tr><td>71</td> -<td class="normal"> const ERR_MANAGER_PARSE = -33; +<td class="normal"> const ERR_MANAGER_PARSE = -33; </td></tr> <tr><td>72</td> -<td class="normal"> const ERR_LOADMODULE = -34; +<td class="normal"> const ERR_LOADMODULE = -34; </td></tr> <tr><td>73</td> -<td class="normal"> const ERR_INSUFFICIENT_DATA = -35; +<td class="normal"> const ERR_INSUFFICIENT_DATA = -35; </td></tr> <tr><td>74</td> -<td class="normal"> const ERR_CLASS_NAME = -36; +<td class="normal"> const ERR_CLASS_NAME = -36; </td></tr> <tr><td>75</td> -<td class="normal"> +<td class="normal"> </td></tr> <tr><td>76</td> -<td class="normal"> /** +<td class="normal"> /** </td></tr> <tr><td>77</td> -<td class="normal"> * PDO derived constants +<td class="normal"> * PDO derived constants </td></tr> <tr><td>78</td> -<td class="normal"> */ +<td class="normal"> */ </td></tr> <tr><td>79</td> -<td class="normal"> const CASE_LOWER = 2; +<td class="normal"> const CASE_LOWER = 2; </td></tr> <tr><td>80</td> -<td class="normal"> const CASE_NATURAL = 0; +<td class="normal"> const CASE_NATURAL = 0; </td></tr> <tr><td>81</td> -<td class="normal"> const CASE_UPPER = 1; +<td class="normal"> const CASE_UPPER = 1; </td></tr> <tr><td>82</td> -<td class="normal"> const CURSOR_FWDONLY = 0; +<td class="normal"> const CURSOR_FWDONLY = 0; </td></tr> <tr><td>83</td> -<td class="normal"> const CURSOR_SCROLL = 1; +<td class="normal"> const CURSOR_SCROLL = 1; </td></tr> <tr><td>84</td> -<td class="normal"> const ERRMODE_EXCEPTION = 2; +<td class="normal"> const ERRMODE_EXCEPTION = 2; </td></tr> <tr><td>85</td> -<td class="normal"> const ERRMODE_SILENT = 0; +<td class="normal"> const ERRMODE_SILENT = 0; </td></tr> <tr><td>86</td> -<td class="normal"> const ERRMODE_WARNING = 1; +<td class="normal"> const ERRMODE_WARNING = 1; </td></tr> <tr><td>87</td> -<td class="normal"> const FETCH_ASSOC = 2; +<td class="normal"> const FETCH_ASSOC = 2; </td></tr> <tr><td>88</td> -<td class="normal"> const FETCH_BOTH = 4; +<td class="normal"> const FETCH_BOTH = 4; </td></tr> <tr><td>89</td> -<td class="normal"> const FETCH_BOUND = 6; +<td class="normal"> const FETCH_BOUND = 6; </td></tr> <tr><td>90</td> -<td class="normal"> const FETCH_CLASS = 8; +<td class="normal"> const FETCH_CLASS = 8; </td></tr> <tr><td>91</td> -<td class="normal"> const FETCH_CLASSTYPE = 262144; +<td class="normal"> const FETCH_CLASSTYPE = 262144; </td></tr> <tr><td>92</td> -<td class="normal"> const FETCH_COLUMN = 7; +<td class="normal"> const FETCH_COLUMN = 7; </td></tr> <tr><td>93</td> -<td class="normal"> const FETCH_FUNC = 10; +<td class="normal"> const FETCH_FUNC = 10; </td></tr> <tr><td>94</td> -<td class="normal"> const FETCH_GROUP = 65536; +<td class="normal"> const FETCH_GROUP = 65536; </td></tr> <tr><td>95</td> -<td class="normal"> const FETCH_INTO = 9; +<td class="normal"> const FETCH_INTO = 9; </td></tr> <tr><td>96</td> -<td class="normal"> const FETCH_LAZY = 1; +<td class="normal"> const FETCH_LAZY = 1; </td></tr> <tr><td>97</td> -<td class="normal"> const FETCH_NAMED = 11; +<td class="normal"> const FETCH_NAMED = 11; </td></tr> <tr><td>98</td> -<td class="normal"> const FETCH_NUM = 3; +<td class="normal"> const FETCH_NUM = 3; </td></tr> <tr><td>99</td> -<td class="normal"> const FETCH_OBJ = 5; +<td class="normal"> const FETCH_OBJ = 5; </td></tr> <tr><td>100</td> -<td class="normal"> const FETCH_ORI_ABS = 4; +<td class="normal"> const FETCH_ORI_ABS = 4; </td></tr> <tr><td>101</td> -<td class="normal"> const FETCH_ORI_FIRST = 2; +<td class="normal"> const FETCH_ORI_FIRST = 2; </td></tr> <tr><td>102</td> -<td class="normal"> const FETCH_ORI_LAST = 3; +<td class="normal"> const FETCH_ORI_LAST = 3; </td></tr> <tr><td>103</td> -<td class="normal"> const FETCH_ORI_NEXT = 0; +<td class="normal"> const FETCH_ORI_NEXT = 0; </td></tr> <tr><td>104</td> -<td class="normal"> const FETCH_ORI_PRIOR = 1; +<td class="normal"> const FETCH_ORI_PRIOR = 1; </td></tr> <tr><td>105</td> -<td class="normal"> const FETCH_ORI_REL = 5; +<td class="normal"> const FETCH_ORI_REL = 5; </td></tr> <tr><td>106</td> -<td class="normal"> const FETCH_SERIALIZE = 524288; +<td class="normal"> const FETCH_SERIALIZE = 524288; </td></tr> <tr><td>107</td> -<td class="normal"> const FETCH_UNIQUE = 196608; +<td class="normal"> const FETCH_UNIQUE = 196608; </td></tr> <tr><td>108</td> -<td class="normal"> const NULL_EMPTY_STRING = 1; +<td class="normal"> const NULL_EMPTY_STRING = 1; </td></tr> <tr><td>109</td> -<td class="normal"> const NULL_NATURAL = 0; +<td class="normal"> const NULL_NATURAL = 0; </td></tr> <tr><td>110</td> -<td class="normal"> const NULL_TO_STRING = NULL; +<td class="normal"> const NULL_TO_STRING = NULL; </td></tr> <tr><td>111</td> -<td class="normal"> const PARAM_BOOL = 5; +<td class="normal"> const PARAM_BOOL = 5; </td></tr> <tr><td>112</td> -<td class="normal"> const PARAM_INPUT_OUTPUT = -2147483648; +<td class="normal"> const PARAM_INPUT_OUTPUT = -2147483648; </td></tr> <tr><td>113</td> -<td class="normal"> const PARAM_INT = 1; +<td class="normal"> const PARAM_INT = 1; </td></tr> <tr><td>114</td> -<td class="normal"> const PARAM_LOB = 3; +<td class="normal"> const PARAM_LOB = 3; </td></tr> <tr><td>115</td> -<td class="normal"> const PARAM_NULL = 0; +<td class="normal"> const PARAM_NULL = 0; </td></tr> <tr><td>116</td> -<td class="normal"> const PARAM_STMT = 4; +<td class="normal"> const PARAM_STMT = 4; </td></tr> <tr><td>117</td> -<td class="normal"> const PARAM_STR = 2; +<td class="normal"> const PARAM_STR = 2; </td></tr> <tr><td>118</td> -<td class="normal"> /** +<td class="normal"> /** </td></tr> <tr><td>119</td> -<td class="normal"> * ATTRIBUTE CONSTANTS +<td class="normal"> * ATTRIBUTE CONSTANTS </td></tr> <tr><td>120</td> -<td class="normal"> */ +<td class="normal"> */ </td></tr> <tr><td>121</td> -<td class="normal"> +<td class="normal"> </td></tr> <tr><td>122</td> -<td class="normal"> /** +<td class="normal"> /** </td></tr> <tr><td>123</td> -<td class="normal"> * PDO derived attributes +<td class="normal"> * PDO derived attributes </td></tr> <tr><td>124</td> -<td class="normal"> */ +<td class="normal"> */ </td></tr> <tr><td>125</td> -<td class="normal"> const ATTR_AUTOCOMMIT = 0; +<td class="normal"> const ATTR_AUTOCOMMIT = 0; </td></tr> <tr><td>126</td> -<td class="normal"> const ATTR_PREFETCH = 1; +<td class="normal"> const ATTR_PREFETCH = 1; </td></tr> <tr><td>127</td> -<td class="normal"> const ATTR_TIMEOUT = 2; +<td class="normal"> const ATTR_TIMEOUT = 2; </td></tr> <tr><td>128</td> -<td class="normal"> const ATTR_ERRMODE = 3; +<td class="normal"> const ATTR_ERRMODE = 3; </td></tr> <tr><td>129</td> -<td class="normal"> const ATTR_SERVER_VERSION = 4; +<td class="normal"> const ATTR_SERVER_VERSION = 4; </td></tr> <tr><td>130</td> -<td class="normal"> const ATTR_CLIENT_VERSION = 5; +<td class="normal"> const ATTR_CLIENT_VERSION = 5; </td></tr> <tr><td>131</td> -<td class="normal"> const ATTR_SERVER_INFO = 6; +<td class="normal"> const ATTR_SERVER_INFO = 6; </td></tr> <tr><td>132</td> -<td class="normal"> const ATTR_CONNECTION_STATUS = 7; +<td class="normal"> const ATTR_CONNECTION_STATUS = 7; </td></tr> <tr><td>133</td> -<td class="normal"> const ATTR_CASE = 8; +<td class="normal"> const ATTR_CASE = 8; </td></tr> <tr><td>134</td> -<td class="normal"> const ATTR_CURSOR_NAME = 9; +<td class="normal"> const ATTR_CURSOR_NAME = 9; </td></tr> <tr><td>135</td> -<td class="normal"> const ATTR_CURSOR = 10; +<td class="normal"> const ATTR_CURSOR = 10; </td></tr> <tr><td>136</td> -<td class="normal"> const ATTR_ORACLE_NULLS = 11; +<td class="normal"> const ATTR_ORACLE_NULLS = 11; </td></tr> <tr><td>137</td> -<td class="normal"> const ATTR_PERSISTENT = 12; +<td class="normal"> const ATTR_PERSISTENT = 12; </td></tr> <tr><td>138</td> -<td class="normal"> const ATTR_STATEMENT_CLASS = 13; +<td class="normal"> const ATTR_STATEMENT_CLASS = 13; </td></tr> <tr><td>139</td> -<td class="normal"> const ATTR_FETCH_TABLE_NAMES = 14; +<td class="normal"> const ATTR_FETCH_TABLE_NAMES = 14; </td></tr> <tr><td>140</td> -<td class="normal"> const ATTR_FETCH_CATALOG_NAMES = 15; +<td class="normal"> const ATTR_FETCH_CATALOG_NAMES = 15; </td></tr> <tr><td>141</td> -<td class="normal"> const ATTR_DRIVER_NAME = 16; +<td class="normal"> const ATTR_DRIVER_NAME = 16; </td></tr> <tr><td>142</td> -<td class="normal"> const ATTR_STRINGIFY_FETCHES = 17; +<td class="normal"> const ATTR_STRINGIFY_FETCHES = 17; </td></tr> <tr><td>143</td> -<td class="normal"> const ATTR_MAX_COLUMN_LEN = 18; +<td class="normal"> const ATTR_MAX_COLUMN_LEN = 18; </td></tr> <tr><td>144</td> -<td class="normal"> +<td class="normal"> </td></tr> <tr><td>145</td> -<td class="normal"> /** +<td class="normal"> /** </td></tr> <tr><td>146</td> -<td class="normal"> * Doctrine constants +<td class="normal"> * Doctrine constants </td></tr> <tr><td>147</td> -<td class="normal"> */ +<td class="normal"> */ </td></tr> <tr><td>148</td> -<td class="normal"> const ATTR_LISTENER = 100; +<td class="normal"> const ATTR_LISTENER = 100; </td></tr> <tr><td>149</td> -<td class="normal"> const ATTR_QUOTE_IDENTIFIER = 101; +<td class="normal"> const ATTR_QUOTE_IDENTIFIER = 101; </td></tr> <tr><td>150</td> -<td class="normal"> const ATTR_FIELD_CASE = 102; +<td class="normal"> const ATTR_FIELD_CASE = 102; </td></tr> <tr><td>151</td> -<td class="normal"> const ATTR_IDXNAME_FORMAT = 103; +<td class="normal"> const ATTR_IDXNAME_FORMAT = 103; </td></tr> <tr><td>152</td> -<td class="normal"> const ATTR_SEQNAME_FORMAT = 104; +<td class="normal"> const ATTR_SEQNAME_FORMAT = 104; </td></tr> <tr><td>153</td> -<td class="normal"> const ATTR_SEQCOL_NAME = 105; +<td class="normal"> const ATTR_SEQCOL_NAME = 105; </td></tr> <tr><td>154</td> -<td class="normal"> const ATTR_CMPNAME_FORMAT = 118; +<td class="normal"> const ATTR_CMPNAME_FORMAT = 118; </td></tr> <tr><td>155</td> -<td class="normal"> const ATTR_DBNAME_FORMAT = 117; +<td class="normal"> const ATTR_DBNAME_FORMAT = 117; </td></tr> <tr><td>156</td> -<td class="normal"> const ATTR_TBLCLASS_FORMAT = 119; +<td class="normal"> const ATTR_TBLCLASS_FORMAT = 119; </td></tr> <tr><td>157</td> -<td class="normal"> const ATTR_EXPORT = 140; +<td class="normal"> const ATTR_EXPORT = 140; </td></tr> <tr><td>158</td> -<td class="normal"> const ATTR_DECIMAL_PLACES = 141; +<td class="normal"> const ATTR_DECIMAL_PLACES = 141; </td></tr> <tr><td>159</td> -<td class="normal"> +<td class="normal"> </td></tr> <tr><td>160</td> -<td class="normal"> const ATTR_PORTABILITY = 106; +<td class="normal"> const ATTR_PORTABILITY = 106; </td></tr> <tr><td>161</td> -<td class="normal"> const ATTR_VALIDATE = 107; +<td class="normal"> const ATTR_VALIDATE = 107; </td></tr> <tr><td>162</td> -<td class="normal"> const ATTR_COLL_KEY = 108; +<td class="normal"> const ATTR_COLL_KEY = 108; </td></tr> <tr><td>163</td> -<td class="normal"> const ATTR_QUERY_LIMIT = 109; +<td class="normal"> const ATTR_QUERY_LIMIT = 109; </td></tr> <tr><td>164</td> -<td class="normal"> const ATTR_DEFAULT_TABLE_TYPE = 112; +<td class="normal"> const ATTR_DEFAULT_TABLE_TYPE = 112; </td></tr> <tr><td>165</td> -<td class="normal"> const ATTR_DEF_TEXT_LENGTH = 113; +<td class="normal"> const ATTR_DEF_TEXT_LENGTH = 113; </td></tr> <tr><td>166</td> -<td class="normal"> const ATTR_DEF_VARCHAR_LENGTH = 114; +<td class="normal"> const ATTR_DEF_VARCHAR_LENGTH = 114; </td></tr> <tr><td>167</td> -<td class="normal"> const ATTR_DEF_TABLESPACE = 115; +<td class="normal"> const ATTR_DEF_TABLESPACE = 115; </td></tr> <tr><td>168</td> -<td class="normal"> const ATTR_EMULATE_DATABASE = 116; +<td class="normal"> const ATTR_EMULATE_DATABASE = 116; </td></tr> <tr><td>169</td> -<td class="normal"> const ATTR_USE_NATIVE_ENUM = 117; +<td class="normal"> const ATTR_USE_NATIVE_ENUM = 117; </td></tr> <tr><td>170</td> -<td class="normal"> const ATTR_DEFAULT_SEQUENCE = 133; +<td class="normal"> const ATTR_DEFAULT_SEQUENCE = 133; </td></tr> <tr><td>171</td> -<td class="normal"> +<td class="normal"> </td></tr> <tr><td>172</td> -<td class="normal"> const ATTR_FETCHMODE = 118; +<td class="normal"> const ATTR_FETCHMODE = 118; </td></tr> <tr><td>173</td> -<td class="normal"> const ATTR_NAME_PREFIX = 121; +<td class="normal"> const ATTR_NAME_PREFIX = 121; </td></tr> <tr><td>174</td> -<td class="normal"> const ATTR_CREATE_TABLES = 122; +<td class="normal"> const ATTR_CREATE_TABLES = 122; </td></tr> <tr><td>175</td> -<td class="normal"> const ATTR_COLL_LIMIT = 123; +<td class="normal"> const ATTR_COLL_LIMIT = 123; </td></tr> <tr><td>176</td> -<td class="normal"> +<td class="normal"> </td></tr> <tr><td>177</td> -<td class="normal"> const ATTR_CACHE = 150; +<td class="normal"> const ATTR_CACHE = 150; </td></tr> <tr><td>178</td> -<td class="normal"> const ATTR_CACHE_LIFESPAN = 151; +<td class="normal"> const ATTR_CACHE_LIFESPAN = 151; </td></tr> <tr><td>179</td> -<td class="normal"> const ATTR_LOAD_REFERENCES = 153; +<td class="normal"> const ATTR_LOAD_REFERENCES = 153; </td></tr> <tr><td>180</td> -<td class="normal"> const ATTR_RECORD_LISTENER = 154; +<td class="normal"> const ATTR_RECORD_LISTENER = 154; </td></tr> <tr><td>181</td> -<td class="normal"> const ATTR_THROW_EXCEPTIONS = 155; +<td class="normal"> const ATTR_THROW_EXCEPTIONS = 155; </td></tr> <tr><td>182</td> -<td class="normal"> +<td class="normal"> </td></tr> <tr><td>183</td> -<td class="normal"> +<td class="normal"> </td></tr> <tr><td>184</td> -<td class="normal"> /** +<td class="normal"> /** </td></tr> <tr><td>185</td> -<td class="normal"> * LIMIT CONSTANTS +<td class="normal"> * LIMIT CONSTANTS </td></tr> <tr><td>186</td> -<td class="normal"> */ +<td class="normal"> */ </td></tr> <tr><td>187</td> -<td class="normal"> +<td class="normal"> </td></tr> <tr><td>188</td> -<td class="normal"> /** +<td class="normal"> /** </td></tr> <tr><td>189</td> -<td class="normal"> * constant for row limiting +<td class="normal"> * constant for row limiting </td></tr> <tr><td>190</td> -<td class="normal"> */ +<td class="normal"> */ </td></tr> <tr><td>191</td> -<td class="normal"> const LIMIT_ROWS = 1; +<td class="normal"> const LIMIT_ROWS = 1; </td></tr> <tr><td>192</td> -<td class="normal"> /** +<td class="normal"> /** </td></tr> <tr><td>193</td> -<td class="normal"> * constant for record limiting +<td class="normal"> * constant for record limiting </td></tr> <tr><td>194</td> -<td class="normal"> */ +<td class="normal"> */ </td></tr> <tr><td>195</td> -<td class="normal"> const LIMIT_RECORDS = 2; +<td class="normal"> const LIMIT_RECORDS = 2; </td></tr> <tr><td>196</td> -<td class="normal"> +<td class="normal"> </td></tr> <tr><td>197</td> -<td class="normal"> /** +<td class="normal"> /** </td></tr> <tr><td>198</td> -<td class="normal"> * FETCHMODE CONSTANTS +<td class="normal"> * FETCHMODE CONSTANTS </td></tr> <tr><td>199</td> -<td class="normal"> */ +<td class="normal"> */ </td></tr> <tr><td>200</td> -<td class="normal"> +<td class="normal"> </td></tr> <tr><td>201</td> -<td class="normal"> /** +<td class="normal"> /** </td></tr> <tr><td>202</td> -<td class="normal"> * IMMEDIATE FETCHING +<td class="normal"> * IMMEDIATE FETCHING </td></tr> <tr><td>203</td> -<td class="normal"> * mode for immediate fetching +<td class="normal"> * mode for immediate fetching </td></tr> <tr><td>204</td> -<td class="normal"> */ +<td class="normal"> */ </td></tr> <tr><td>205</td> -<td class="normal"> const FETCH_IMMEDIATE = 0; +<td class="normal"> const FETCH_IMMEDIATE = 0; </td></tr> <tr><td>206</td> -<td class="normal"> /** +<td class="normal"> /** </td></tr> <tr><td>207</td> -<td class="normal"> * BATCH FETCHING +<td class="normal"> * BATCH FETCHING </td></tr> <tr><td>208</td> -<td class="normal"> * mode for batch fetching +<td class="normal"> * mode for batch fetching </td></tr> <tr><td>209</td> -<td class="normal"> */ +<td class="normal"> */ </td></tr> <tr><td>210</td> -<td class="normal"> const FETCH_BATCH = 1; +<td class="normal"> const FETCH_BATCH = 1; </td></tr> <tr><td>211</td> -<td class="normal"> /** +<td class="normal"> /** </td></tr> <tr><td>212</td> -<td class="normal"> * LAZY FETCHING +<td class="normal"> * LAZY FETCHING </td></tr> <tr><td>213</td> -<td class="normal"> * mode for offset fetching +<td class="normal"> * mode for offset fetching </td></tr> <tr><td>214</td> -<td class="normal"> */ +<td class="normal"> */ </td></tr> <tr><td>215</td> -<td class="normal"> const FETCH_OFFSET = 3; +<td class="normal"> const FETCH_OFFSET = 3; </td></tr> <tr><td>216</td> -<td class="normal"> /** +<td class="normal"> /** </td></tr> <tr><td>217</td> -<td class="normal"> * LAZY OFFSET FETCHING +<td class="normal"> * LAZY OFFSET FETCHING </td></tr> <tr><td>218</td> -<td class="normal"> * mode for lazy offset fetching +<td class="normal"> * mode for lazy offset fetching </td></tr> <tr><td>219</td> -<td class="normal"> */ +<td class="normal"> */ </td></tr> <tr><td>220</td> -<td class="normal"> const FETCH_LAZY_OFFSET = 4; +<td class="normal"> const FETCH_LAZY_OFFSET = 4; </td></tr> <tr><td>221</td> -<td class="normal"> +<td class="normal"> </td></tr> <tr><td>222</td> -<td class="normal"> /** +<td class="normal"> /** </td></tr> <tr><td>223</td> -<td class="normal"> * FETCH CONSTANTS +<td class="normal"> * FETCH CONSTANTS </td></tr> <tr><td>224</td> -<td class="normal"> */ +<td class="normal"> */ </td></tr> <tr><td>225</td> -<td class="normal"> +<td class="normal"> </td></tr> <tr><td>226</td> -<td class="normal"> +<td class="normal"> </td></tr> <tr><td>227</td> -<td class="normal"> /** +<td class="normal"> /** </td></tr> <tr><td>228</td> -<td class="normal"> * FETCH VALUEHOLDER +<td class="normal"> * FETCH VALUEHOLDER </td></tr> <tr><td>229</td> -<td class="normal"> */ +<td class="normal"> */ </td></tr> <tr><td>230</td> -<td class="normal"> const FETCH_VHOLDER = 1; +<td class="normal"> const FETCH_VHOLDER = 1; </td></tr> <tr><td>231</td> -<td class="normal"> /** +<td class="normal"> /** </td></tr> <tr><td>232</td> -<td class="normal"> * FETCH RECORD +<td class="normal"> * FETCH RECORD </td></tr> <tr><td>233</td> -<td class="normal"> * +<td class="normal"> * </td></tr> <tr><td>234</td> -<td class="normal"> * Specifies that the fetch method shall return Doctrine_Record +<td class="normal"> * Specifies that the fetch method shall return Doctrine_Record </td></tr> <tr><td>235</td> -<td class="normal"> * objects as the elements of the result set. +<td class="normal"> * objects as the elements of the result set. </td></tr> <tr><td>236</td> -<td class="normal"> * +<td class="normal"> * </td></tr> <tr><td>237</td> -<td class="normal"> * This is the default fetchmode. +<td class="normal"> * This is the default fetchmode. </td></tr> <tr><td>238</td> -<td class="normal"> */ +<td class="normal"> */ </td></tr> <tr><td>239</td> -<td class="normal"> const FETCH_RECORD = 2; +<td class="normal"> const FETCH_RECORD = 2; </td></tr> <tr><td>240</td> -<td class="normal"> /** +<td class="normal"> /** </td></tr> <tr><td>241</td> -<td class="normal"> * FETCH ARRAY +<td class="normal"> * FETCH ARRAY </td></tr> <tr><td>242</td> -<td class="normal"> */ +<td class="normal"> */ </td></tr> <tr><td>243</td> -<td class="normal"> +<td class="normal"> </td></tr> <tr><td>244</td> -<td class="normal"> const FETCH_ARRAY = 3; +<td class="normal"> const FETCH_ARRAY = 3; </td></tr> <tr><td>245</td> -<td class="normal"> /** +<td class="normal"> /** </td></tr> <tr><td>246</td> -<td class="normal"> * PORTABILITY CONSTANTS +<td class="normal"> * PORTABILITY CONSTANTS </td></tr> <tr><td>247</td> -<td class="normal"> */ +<td class="normal"> */ </td></tr> <tr><td>248</td> -<td class="normal"> +<td class="normal"> </td></tr> <tr><td>249</td> -<td class="normal"> /** +<td class="normal"> /** </td></tr> <tr><td>250</td> -<td class="normal"> * Portability: turn off all portability features. +<td class="normal"> * Portability: turn off all portability features. </td></tr> <tr><td>251</td> -<td class="normal"> * @see Doctrine::ATTR_PORTABILITY +<td class="normal"> * @see Doctrine::ATTR_PORTABILITY </td></tr> <tr><td>252</td> -<td class="normal"> */ +<td class="normal"> */ </td></tr> <tr><td>253</td> -<td class="normal"> const PORTABILITY_NONE = 0; +<td class="normal"> const PORTABILITY_NONE = 0; </td></tr> <tr><td>254</td> -<td class="normal"> /** +<td class="normal"> /** </td></tr> <tr><td>255</td> -<td class="normal"> * Portability: convert names of tables and fields to case defined in the +<td class="normal"> * Portability: convert names of tables and fields to case defined in the </td></tr> <tr><td>256</td> -<td class="normal"> * "field_case" option when using the query*(), fetch*() methods. +<td class="normal"> * "field_case" option when using the query*(), fetch*() methods. </td></tr> <tr><td>257</td> -<td class="normal"> * @see Doctrine::ATTR_PORTABILITY +<td class="normal"> * @see Doctrine::ATTR_PORTABILITY </td></tr> <tr><td>258</td> -<td class="normal"> */ +<td class="normal"> */ </td></tr> <tr><td>259</td> -<td class="normal"> const PORTABILITY_FIX_CASE = 1; +<td class="normal"> const PORTABILITY_FIX_CASE = 1; </td></tr> <tr><td>260</td> -<td class="normal"> +<td class="normal"> </td></tr> <tr><td>261</td> -<td class="normal"> /** +<td class="normal"> /** </td></tr> <tr><td>262</td> -<td class="normal"> * Portability: right trim the data output by query*() and fetch*(). +<td class="normal"> * Portability: right trim the data output by query*() and fetch*(). </td></tr> <tr><td>263</td> -<td class="normal"> * @see Doctrine::ATTR_PORTABILITY +<td class="normal"> * @see Doctrine::ATTR_PORTABILITY </td></tr> <tr><td>264</td> -<td class="normal"> */ +<td class="normal"> */ </td></tr> <tr><td>265</td> -<td class="normal"> const PORTABILITY_RTRIM = 2; +<td class="normal"> const PORTABILITY_RTRIM = 2; </td></tr> <tr><td>266</td> -<td class="normal"> /** +<td class="normal"> /** </td></tr> <tr><td>267</td> -<td class="normal"> * Portability: force reporting the number of rows deleted. +<td class="normal"> * Portability: force reporting the number of rows deleted. </td></tr> <tr><td>268</td> -<td class="normal"> * @see Doctrine::ATTR_PORTABILITY +<td class="normal"> * @see Doctrine::ATTR_PORTABILITY </td></tr> <tr><td>269</td> -<td class="normal"> */ +<td class="normal"> */ </td></tr> <tr><td>270</td> -<td class="normal"> const PORTABILITY_DELETE_COUNT = 4; +<td class="normal"> const PORTABILITY_DELETE_COUNT = 4; </td></tr> <tr><td>271</td> -<td class="normal"> /** +<td class="normal"> /** </td></tr> <tr><td>272</td> -<td class="normal"> * Portability: convert empty values to null strings in data output by +<td class="normal"> * Portability: convert empty values to null strings in data output by </td></tr> <tr><td>273</td> -<td class="normal"> * query*() and fetch*(). +<td class="normal"> * query*() and fetch*(). </td></tr> <tr><td>274</td> -<td class="normal"> * @see Doctrine::ATTR_PORTABILITY +<td class="normal"> * @see Doctrine::ATTR_PORTABILITY </td></tr> <tr><td>275</td> -<td class="normal"> */ +<td class="normal"> */ </td></tr> <tr><td>276</td> -<td class="normal"> const PORTABILITY_EMPTY_TO_NULL = 8; +<td class="normal"> const PORTABILITY_EMPTY_TO_NULL = 8; </td></tr> <tr><td>277</td> -<td class="normal"> /** +<td class="normal"> /** </td></tr> <tr><td>278</td> -<td class="normal"> * Portability: removes database/table qualifiers from associative indexes +<td class="normal"> * Portability: removes database/table qualifiers from associative indexes </td></tr> <tr><td>279</td> -<td class="normal"> * @see Doctrine::ATTR_PORTABILITY +<td class="normal"> * @see Doctrine::ATTR_PORTABILITY </td></tr> <tr><td>280</td> -<td class="normal"> */ +<td class="normal"> */ </td></tr> <tr><td>281</td> -<td class="normal"> const PORTABILITY_FIX_ASSOC_FIELD_NAMES = 16; +<td class="normal"> const PORTABILITY_FIX_ASSOC_FIELD_NAMES = 16; </td></tr> <tr><td>282</td> -<td class="normal"> /** +<td class="normal"> /** </td></tr> <tr><td>283</td> -<td class="normal"> * Portability: makes Doctrine_Expression throw exception for unportable RDBMS expressions +<td class="normal"> * Portability: makes Doctrine_Expression throw exception for unportable RDBMS expressions </td></tr> <tr><td>284</td> -<td class="normal"> * @see Doctrine::ATTR_PORTABILITY +<td class="normal"> * @see Doctrine::ATTR_PORTABILITY </td></tr> <tr><td>285</td> -<td class="normal"> */ +<td class="normal"> */ </td></tr> <tr><td>286</td> -<td class="normal"> const PORTABILITY_EXPR = 32; +<td class="normal"> const PORTABILITY_EXPR = 32; </td></tr> <tr><td>287</td> -<td class="normal"> /** +<td class="normal"> /** </td></tr> <tr><td>288</td> -<td class="normal"> * Portability: turn on all portability features. +<td class="normal"> * Portability: turn on all portability features. </td></tr> <tr><td>289</td> -<td class="normal"> * @see Doctrine::ATTR_PORTABILITY +<td class="normal"> * @see Doctrine::ATTR_PORTABILITY </td></tr> <tr><td>290</td> -<td class="normal"> */ +<td class="normal"> */ </td></tr> <tr><td>291</td> -<td class="normal"> const PORTABILITY_ALL = 63; +<td class="normal"> const PORTABILITY_ALL = 63; </td></tr> <tr><td>292</td> -<td class="normal"> +<td class="normal"> </td></tr> <tr><td>293</td> -<td class="normal"> /** +<td class="normal"> /** </td></tr> <tr><td>294</td> -<td class="normal"> * LOCKMODE CONSTANTS +<td class="normal"> * LOCKMODE CONSTANTS </td></tr> <tr><td>295</td> -<td class="normal"> */ +<td class="normal"> */ </td></tr> <tr><td>296</td> -<td class="normal"> +<td class="normal"> </td></tr> <tr><td>297</td> -<td class="normal"> /** +<td class="normal"> /** </td></tr> <tr><td>298</td> -<td class="normal"> * mode for optimistic locking +<td class="normal"> * mode for optimistic locking </td></tr> <tr><td>299</td> -<td class="normal"> */ +<td class="normal"> */ </td></tr> <tr><td>300</td> -<td class="normal"> const LOCK_OPTIMISTIC = 0; +<td class="normal"> const LOCK_OPTIMISTIC = 0; </td></tr> <tr><td>301</td> -<td class="normal"> /** +<td class="normal"> /** </td></tr> <tr><td>302</td> -<td class="normal"> * mode for pessimistic locking +<td class="normal"> * mode for pessimistic locking </td></tr> <tr><td>303</td> -<td class="normal"> */ +<td class="normal"> */ </td></tr> <tr><td>304</td> -<td class="normal"> const LOCK_PESSIMISTIC = 1; +<td class="normal"> const LOCK_PESSIMISTIC = 1; </td></tr> <tr><td>305</td> -<td class="normal"> /** +<td class="normal"> /** </td></tr> <tr><td>306</td> -<td class="normal"> * EXPORT CONSTANTS +<td class="normal"> * EXPORT CONSTANTS </td></tr> <tr><td>307</td> -<td class="normal"> */ +<td class="normal"> */ </td></tr> <tr><td>308</td> -<td class="normal"> +<td class="normal"> </td></tr> <tr><td>309</td> -<td class="normal"> /** +<td class="normal"> /** </td></tr> <tr><td>310</td> -<td class="normal"> * turns of exporting +<td class="normal"> * turns of exporting </td></tr> <tr><td>311</td> -<td class="normal"> */ +<td class="normal"> */ </td></tr> <tr><td>312</td> -<td class="normal"> const EXPORT_NONE = 0; +<td class="normal"> const EXPORT_NONE = 0; </td></tr> <tr><td>313</td> -<td class="normal"> /** +<td class="normal"> /** </td></tr> <tr><td>314</td> -<td class="normal"> * export tables +<td class="normal"> * export tables </td></tr> <tr><td>315</td> -<td class="normal"> */ +<td class="normal"> */ </td></tr> <tr><td>316</td> -<td class="normal"> const EXPORT_TABLES = 1; +<td class="normal"> const EXPORT_TABLES = 1; </td></tr> <tr><td>317</td> -<td class="normal"> /** +<td class="normal"> /** </td></tr> <tr><td>318</td> -<td class="normal"> * export constraints +<td class="normal"> * export constraints </td></tr> <tr><td>319</td> -<td class="normal"> */ +<td class="normal"> */ </td></tr> <tr><td>320</td> -<td class="normal"> const EXPORT_CONSTRAINTS = 2; +<td class="normal"> const EXPORT_CONSTRAINTS = 2; </td></tr> <tr><td>321</td> -<td class="normal"> /** +<td class="normal"> /** </td></tr> <tr><td>322</td> -<td class="normal"> * export plugins +<td class="normal"> * export plugins </td></tr> <tr><td>323</td> -<td class="normal"> */ +<td class="normal"> */ </td></tr> <tr><td>324</td> -<td class="normal"> const EXPORT_PLUGINS = 4; +<td class="normal"> const EXPORT_PLUGINS = 4; </td></tr> <tr><td>325</td> -<td class="normal"> /** +<td class="normal"> /** </td></tr> <tr><td>326</td> -<td class="normal"> * export all +<td class="normal"> * export all </td></tr> <tr><td>327</td> -<td class="normal"> */ +<td class="normal"> */ </td></tr> <tr><td>328</td> -<td class="normal"> const EXPORT_ALL = 7; +<td class="normal"> const EXPORT_ALL = 7; </td></tr> <tr><td>329</td> -<td class="normal"> +<td class="normal"> </td></tr> <tr><td>330</td> -<td class="normal"> /** +<td class="normal"> /** </td></tr> <tr><td>331</td> -<td class="normal"> * HYDRATION CONSTANTS +<td class="normal"> * HYDRATION CONSTANTS </td></tr> <tr><td>332</td> -<td class="normal"> */ +<td class="normal"> */ </td></tr> <tr><td>333</td> -<td class="normal"> const HYDRATE_RECORD = 2; +<td class="normal"> const HYDRATE_RECORD = 2; </td></tr> <tr><td>334</td> -<td class="normal"> +<td class="normal"> </td></tr> <tr><td>335</td> -<td class="normal"> const HYDRATE_ARRAY = 3; +<td class="normal"> const HYDRATE_ARRAY = 3; </td></tr> <tr><td>336</td> -<td class="normal"> +<td class="normal"> </td></tr> <tr><td>337</td> -<td class="normal"> /** +<td class="normal"> /** </td></tr> <tr><td>338</td> -<td class="normal"> * VALIDATION CONSTANTS +<td class="normal"> * VALIDATION CONSTANTS </td></tr> <tr><td>339</td> -<td class="normal"> */ +<td class="normal"> */ </td></tr> <tr><td>340</td> -<td class="normal"> const VALIDATE_NONE = 0; +<td class="normal"> const VALIDATE_NONE = 0; </td></tr> <tr><td>341</td> -<td class="normal"> +<td class="normal"> </td></tr> <tr><td>342</td> -<td class="normal"> const VALIDATE_LENGTHS = 1; +<td class="normal"> const VALIDATE_LENGTHS = 1; </td></tr> <tr><td>343</td> -<td class="normal"> +<td class="normal"> </td></tr> <tr><td>344</td> -<td class="normal"> const VALIDATE_TYPES = 2; +<td class="normal"> const VALIDATE_TYPES = 2; </td></tr> <tr><td>345</td> -<td class="normal"> +<td class="normal"> </td></tr> <tr><td>346</td> -<td class="normal"> const VALIDATE_CONSTRAINTS = 4; +<td class="normal"> const VALIDATE_CONSTRAINTS = 4; </td></tr> <tr><td>347</td> -<td class="normal"> +<td class="normal"> </td></tr> <tr><td>348</td> -<td class="normal"> const VALIDATE_ALL = 5; +<td class="normal"> const VALIDATE_ALL = 5; </td></tr> <tr><td>349</td> -<td class="normal"> +<td class="normal"> </td></tr> <tr><td>350</td> -<td class="normal"> /** +<td class="normal"> /** </td></tr> <tr><td>351</td> -<td class="normal"> * constant for auto_increment identifier +<td class="normal"> * constant for auto_increment identifier </td></tr> <tr><td>352</td> -<td class="normal"> */ +<td class="normal"> */ </td></tr> <tr><td>353</td> -<td class="normal"> const IDENTIFIER_AUTOINC = 1; +<td class="normal"> const IDENTIFIER_AUTOINC = 1; </td></tr> <tr><td>354</td> -<td class="normal"> /** +<td class="normal"> /** </td></tr> <tr><td>355</td> -<td class="normal"> * constant for sequence identifier +<td class="normal"> * constant for sequence identifier </td></tr> <tr><td>356</td> -<td class="normal"> */ +<td class="normal"> */ </td></tr> <tr><td>357</td> -<td class="normal"> const IDENTIFIER_SEQUENCE = 2; +<td class="normal"> const IDENTIFIER_SEQUENCE = 2; </td></tr> <tr><td>358</td> -<td class="normal"> /** +<td class="normal"> /** </td></tr> <tr><td>359</td> -<td class="normal"> * constant for normal identifier +<td class="normal"> * constant for normal identifier </td></tr> <tr><td>360</td> -<td class="normal"> */ +<td class="normal"> */ </td></tr> <tr><td>361</td> -<td class="normal"> const IDENTIFIER_NATURAL = 3; +<td class="normal"> const IDENTIFIER_NATURAL = 3; </td></tr> <tr><td>362</td> -<td class="normal"> /** +<td class="normal"> /** </td></tr> <tr><td>363</td> -<td class="normal"> * constant for composite identifier +<td class="normal"> * constant for composite identifier </td></tr> <tr><td>364</td> -<td class="normal"> */ +<td class="normal"> */ </td></tr> <tr><td>365</td> -<td class="normal"> const IDENTIFIER_COMPOSITE = 4; +<td class="normal"> const IDENTIFIER_COMPOSITE = 4; </td></tr> <tr><td>366</td> -<td class="normal"> /** +<td class="normal"> /** </td></tr> <tr><td>367</td> -<td class="normal"> * constructor +<td class="normal"> * constructor </td></tr> <tr><td>368</td> -<td class="normal"> */ +<td class="normal"> */ </td></tr> <tr><td>369</td> -<td class="normal"> public function __construct() +<td class="normal"> public function __construct() </td></tr> <tr><td>370</td> -<td class="normal"> { +<td class="normal"> { </td></tr> <tr><td>371</td> -<td class="red"> throw new Doctrine_Exception('Doctrine is static class. No instances can be created.'); +<td class="red"> throw new Doctrine_Exception('Doctrine is static class. No instances can be created.'); </td></tr> <tr><td>372</td> -<td class="orange"> } +<td class="orange"> } </td></tr> <tr><td>373</td> -<td class="normal"> /** +<td class="normal"> /** </td></tr> <tr><td>374</td> -<td class="normal"> * @var string $path doctrine root directory +<td class="normal"> * @var string $path doctrine root directory </td></tr> <tr><td>375</td> -<td class="normal"> */ +<td class="normal"> */ </td></tr> <tr><td>376</td> -<td class="normal"> private static $_path; +<td class="normal"> private static $_path; </td></tr> <tr><td>377</td> -<td class="normal"> /** +<td class="normal"> /** </td></tr> <tr><td>378</td> -<td class="normal"> * @var boolean $_debug +<td class="normal"> * @var boolean $_debug </td></tr> <tr><td>379</td> -<td class="normal"> */ +<td class="normal"> */ </td></tr> <tr><td>380</td> -<td class="normal"> private static $_debug = false; +<td class="normal"> private static $_debug = false; </td></tr> <tr><td>381</td> -<td class="normal"> +<td class="normal"> </td></tr> <tr><td>382</td> -<td class="normal"> public static function debug($bool = null) +<td class="normal"> public static function debug($bool = null) </td></tr> <tr><td>383</td> -<td class="normal"> { +<td class="normal"> { </td></tr> <tr><td>384</td> -<td class="red"> if ($bool !== null) { +<td class="red"> if ($bool !== null) { </td></tr> <tr><td>385</td> -<td class="red"> self::$_debug = (bool) $bool; +<td class="red"> self::$_debug = (bool) $bool; </td></tr> <tr><td>386</td> -<td class="red"> } +<td class="red"> } </td></tr> <tr><td>387</td> -<td class="red"> return self::$_debug; +<td class="red"> return self::$_debug; </td></tr> <tr><td>388</td> -<td class="orange"> } +<td class="orange"> } </td></tr> <tr><td>389</td> -<td class="normal"> /** +<td class="normal"> /** </td></tr> <tr><td>390</td> -<td class="normal"> * getPath +<td class="normal"> * getPath </td></tr> <tr><td>391</td> -<td class="normal"> * returns the doctrine root +<td class="normal"> * returns the doctrine root </td></tr> <tr><td>392</td> -<td class="normal"> * +<td class="normal"> * </td></tr> <tr><td>393</td> -<td class="normal"> * @return string +<td class="normal"> * @return string </td></tr> <tr><td>394</td> -<td class="normal"> */ +<td class="normal"> */ </td></tr> <tr><td>395</td> -<td class="normal"> public static function getPath() +<td class="normal"> public static function getPath() </td></tr> <tr><td>396</td> -<td class="normal"> { +<td class="normal"> { </td></tr> <tr><td>397</td> -<td class="red"> if ( ! self::$_path) { +<td class="red"> if ( ! self::$_path) { </td></tr> <tr><td>398</td> -<td class="red"> self::$_path = dirname(__FILE__); +<td class="red"> self::$_path = dirname(__FILE__); </td></tr> <tr><td>399</td> -<td class="red"> } +<td class="red"> } </td></tr> <tr><td>400</td> -<td class="red"> return self::$_path; +<td class="red"> return self::$_path; </td></tr> <tr><td>401</td> -<td class="orange"> } +<td class="orange"> } </td></tr> <tr><td>402</td> -<td class="normal"> /** +<td class="normal"> /** </td></tr> <tr><td>403</td> -<td class="normal"> * loadAll +<td class="normal"> * loadAll </td></tr> <tr><td>404</td> -<td class="normal"> * loads all runtime classes +<td class="normal"> * loads all runtime classes </td></tr> <tr><td>405</td> -<td class="normal"> * +<td class="normal"> * </td></tr> <tr><td>406</td> -<td class="normal"> * @return void +<td class="normal"> * @return void </td></tr> <tr><td>407</td> -<td class="normal"> */ +<td class="normal"> */ </td></tr> <tr><td>408</td> -<td class="normal"> public static function loadAll() +<td class="normal"> public static function loadAll() </td></tr> <tr><td>409</td> -<td class="normal"> { +<td class="normal"> { </td></tr> <tr><td>410</td> -<td class="red"> $classes = Doctrine_Compiler::getRuntimeClasses(); +<td class="red"> $classes = Doctrine_Compiler::getRuntimeClasses(); </td></tr> <tr><td>411</td> -<td class="normal"> +<td class="normal"> </td></tr> <tr><td>412</td> -<td class="red"> foreach ($classes as $class) { +<td class="red"> foreach ($classes as $class) { </td></tr> <tr><td>413</td> -<td class="red"> Doctrine::autoload($class); +<td class="red"> Doctrine::autoload($class); </td></tr> <tr><td>414</td> -<td class="red"> } +<td class="red"> } </td></tr> <tr><td>415</td> -<td class="red"> } +<td class="red"> } </td></tr> <tr><td>416</td> -<td class="normal"> /** +<td class="normal"> /** </td></tr> <tr><td>417</td> -<td class="normal"> * loadModels +<td class="normal"> * loadModels </td></tr> <tr><td>418</td> -<td class="normal"> * +<td class="normal"> * </td></tr> <tr><td>419</td> -<td class="normal"> * Recursively load all models from a directory or array of directories +<td class="normal"> * Recursively load all models from a directory or array of directories </td></tr> <tr><td>420</td> -<td class="normal"> * +<td class="normal"> * </td></tr> <tr><td>421</td> -<td class="normal"> * @param string $directory Path to directory of models or array of directory paths +<td class="normal"> * @param string $directory Path to directory of models or array of directory paths </td></tr> <tr><td>422</td> -<td class="normal"> * @return void +<td class="normal"> * @return void </td></tr> <tr><td>423</td> -<td class="normal"> */ +<td class="normal"> */ </td></tr> <tr><td>424</td> -<td class="normal"> public static function loadModels($directory) +<td class="normal"> public static function loadModels($directory) </td></tr> <tr><td>425</td> -<td class="normal"> { +<td class="normal"> { </td></tr> <tr><td>426</td> -<td class="covered"> $declared = get_declared_classes(); +<td class="covered"> $declared = get_declared_classes(); </td></tr> <tr><td>427</td> -<td class="normal"> +<td class="normal"> </td></tr> <tr><td>428</td> -<td class="covered"> if ($directory !== null) { +<td class="covered"> if ($directory !== null) { </td></tr> <tr><td>429</td> -<td class="covered"> foreach ((array) $directory as $dir) { +<td class="covered"> foreach ((array) $directory as $dir) { </td></tr> <tr><td>430</td> -<td class="covered"> $it = new RecursiveIteratorIterator(new RecursiveDirectoryIterator($dir), +<td class="covered"> $it = new RecursiveIteratorIterator(new RecursiveDirectoryIterator($dir), </td></tr> <tr><td>431</td> -<td class="covered"> RecursiveIteratorIterator::LEAVES_ONLY); +<td class="covered"> RecursiveIteratorIterator::LEAVES_ONLY); </td></tr> <tr><td>432</td> -<td class="normal"> +<td class="normal"> </td></tr> <tr><td>433</td> -<td class="covered"> foreach ($it as $file) { +<td class="covered"> foreach ($it as $file) { </td></tr> <tr><td>434</td> -<td class="covered"> $e = explode('.', $file->getFileName()); +<td class="covered"> $e = explode('.', $file->getFileName()); </td></tr> <tr><td>435</td> -<td class="covered"> if (end($e) === 'php' && strpos($file->getFileName(), '.inc') === false) { +<td class="covered"> if (end($e) === 'php' && strpos($file->getFileName(), '.inc') === false) { </td></tr> <tr><td>436</td> -<td class="covered"> require_once $file->getPathName(); +<td class="covered"> require_once $file->getPathName(); </td></tr> <tr><td>437</td> -<td class="covered"> } +<td class="covered"> } </td></tr> <tr><td>438</td> -<td class="covered"> } +<td class="covered"> } </td></tr> <tr><td>439</td> -<td class="covered"> } +<td class="covered"> } </td></tr> <tr><td>440</td> -<td class="normal"> +<td class="normal"> </td></tr> <tr><td>441</td> -<td class="covered"> $declared = array_diff(get_declared_classes(), $declared); +<td class="covered"> $declared = array_diff(get_declared_classes(), $declared); </td></tr> <tr><td>442</td> -<td class="covered"> } +<td class="covered"> } </td></tr> <tr><td>443</td> -<td class="normal"> +<td class="normal"> </td></tr> <tr><td>444</td> -<td class="covered"> return self::getLoadedModels($declared); +<td class="covered"> return self::getLoadedModels($declared); </td></tr> <tr><td>445</td> -<td class="orange"> } +<td class="orange"> } </td></tr> <tr><td>446</td> -<td class="normal"> /** +<td class="normal"> /** </td></tr> <tr><td>447</td> -<td class="normal"> * getLoadedModels +<td class="normal"> * getLoadedModels </td></tr> <tr><td>448</td> -<td class="normal"> * +<td class="normal"> * </td></tr> <tr><td>449</td> -<td class="normal"> * Get all the loaded models, you can provide an array of classes or it will use get_declared_classes() +<td class="normal"> * Get all the loaded models, you can provide an array of classes or it will use get_declared_classes() </td></tr> <tr><td>450</td> -<td class="normal"> * +<td class="normal"> * </td></tr> <tr><td>451</td> -<td class="normal"> * @param $classes Array of classes to filter through, otherwise uses get_declared_classes() +<td class="normal"> * @param $classes Array of classes to filter through, otherwise uses get_declared_classes() </td></tr> <tr><td>452</td> -<td class="normal"> * @return void +<td class="normal"> * @return void </td></tr> <tr><td>453</td> -<td class="normal"> */ +<td class="normal"> */ </td></tr> <tr><td>454</td> -<td class="normal"> public static function getLoadedModels($classes = null) +<td class="normal"> public static function getLoadedModels($classes = null) </td></tr> <tr><td>455</td> -<td class="normal"> { +<td class="normal"> { </td></tr> <tr><td>456</td> -<td class="covered"> if ($classes === null) { +<td class="covered"> if ($classes === null) { </td></tr> <tr><td>457</td> -<td class="red"> $classes = get_declared_classes(); +<td class="red"> $classes = get_declared_classes(); </td></tr> <tr><td>458</td> -<td class="red"> } +<td class="red"> } </td></tr> <tr><td>459</td> -<td class="normal"> +<td class="normal"> </td></tr> <tr><td>460</td> -<td class="covered"> $parent = new ReflectionClass('Doctrine_Record'); +<td class="covered"> $parent = new ReflectionClass('Doctrine_Record'); </td></tr> <tr><td>461</td> -<td class="normal"> +<td class="normal"> </td></tr> <tr><td>462</td> -<td class="covered"> $loadedModels = array(); +<td class="covered"> $loadedModels = array(); </td></tr> <tr><td>463</td> -<td class="normal"> +<td class="normal"> </td></tr> <tr><td>464</td> -<td class="normal"> // we iterate trhough the diff of previously declared classes +<td class="normal"> // we iterate trhough the diff of previously declared classes </td></tr> <tr><td>465</td> -<td class="normal"> // and currently declared classes +<td class="normal"> // and currently declared classes </td></tr> <tr><td>466</td> -<td class="covered"> foreach ($classes as $name) { +<td class="covered"> foreach ($classes as $name) { </td></tr> <tr><td>467</td> -<td class="covered"> $class = new ReflectionClass($name); +<td class="covered"> $class = new ReflectionClass($name); </td></tr> <tr><td>468</td> -<td class="normal"> +<td class="normal"> </td></tr> <tr><td>469</td> -<td class="normal"> // Skip the following classes +<td class="normal"> // Skip the following classes </td></tr> <tr><td>470</td> -<td class="normal"> // - abstract classes +<td class="normal"> // - abstract classes </td></tr> <tr><td>471</td> -<td class="normal"> // - not a subclass of Doctrine_Record +<td class="normal"> // - not a subclass of Doctrine_Record </td></tr> <tr><td>472</td> -<td class="normal"> // - don't have a setTableDefinition method +<td class="normal"> // - don't have a setTableDefinition method </td></tr> <tr><td>473</td> -<td class="covered"> if ($class->isAbstract() || +<td class="covered"> if ($class->isAbstract() || </td></tr> <tr><td>474</td> -<td class="covered"> !$class->isSubClassOf($parent) || +<td class="covered"> !$class->isSubClassOf($parent) || </td></tr> <tr><td>475</td> -<td class="covered"> !$class->hasMethod('setTableDefinition')) { +<td class="covered"> !$class->hasMethod('setTableDefinition')) { </td></tr> <tr><td>476</td> -<td class="red"> continue; +<td class="red"> continue; </td></tr> <tr><td>477</td> -<td class="orange"> } +<td class="orange"> } </td></tr> <tr><td>478</td> -<td class="normal"> +<td class="normal"> </td></tr> <tr><td>479</td> -<td class="covered"> $loadedModels[] = $name; +<td class="covered"> $loadedModels[] = $name; </td></tr> <tr><td>480</td> -<td class="covered"> } +<td class="covered"> } </td></tr> <tr><td>481</td> -<td class="normal"> +<td class="normal"> </td></tr> <tr><td>482</td> -<td class="covered"> return $loadedModels; +<td class="covered"> return $loadedModels; </td></tr> <tr><td>483</td> -<td class="orange"> } +<td class="orange"> } </td></tr> <tr><td>484</td> -<td class="normal"> /** +<td class="normal"> /** </td></tr> <tr><td>485</td> -<td class="normal"> * getConnectionByTableName +<td class="normal"> * getConnectionByTableName </td></tr> <tr><td>486</td> -<td class="normal"> * +<td class="normal"> * </td></tr> <tr><td>487</td> -<td class="normal"> * Get the connection object for a table by the actual table name +<td class="normal"> * Get the connection object for a table by the actual table name </td></tr> <tr><td>488</td> -<td class="normal"> * +<td class="normal"> * </td></tr> <tr><td>489</td> -<td class="normal"> * @param string $tableName +<td class="normal"> * @param string $tableName </td></tr> <tr><td>490</td> -<td class="normal"> * @return void +<td class="normal"> * @return void </td></tr> <tr><td>491</td> -<td class="normal"> */ +<td class="normal"> */ </td></tr> <tr><td>492</td> -<td class="normal"> public static function getConnectionByTableName($tableName) +<td class="normal"> public static function getConnectionByTableName($tableName) </td></tr> <tr><td>493</td> -<td class="normal"> { +<td class="normal"> { </td></tr> <tr><td>494</td> -<td class="red"> $loadedModels = self::getLoadedModels(); +<td class="red"> $loadedModels = self::getLoadedModels(); </td></tr> <tr><td>495</td> -<td class="normal"> +<td class="normal"> </td></tr> <tr><td>496</td> -<td class="red"> foreach ($loadedModels as $name) { +<td class="red"> foreach ($loadedModels as $name) { </td></tr> <tr><td>497</td> -<td class="red"> $model = new $name(); +<td class="red"> $model = new $name(); </td></tr> <tr><td>498</td> -<td class="red"> $table = $model->getTable(); +<td class="red"> $table = $model->getTable(); </td></tr> <tr><td>499</td> -<td class="normal"> +<td class="normal"> </td></tr> <tr><td>500</td> -<td class="red"> if ($table->getTableName() == $tableName) { +<td class="red"> if ($table->getTableName() == $tableName) { </td></tr> <tr><td>501</td> -<td class="red"> return $table->getConnection(); +<td class="red"> return $table->getConnection(); </td></tr> <tr><td>502</td> -<td class="orange"> } +<td class="orange"> } </td></tr> <tr><td>503</td> -<td class="red"> } +<td class="red"> } </td></tr> <tr><td>504</td> -<td class="red"> } +<td class="red"> } </td></tr> <tr><td>505</td> -<td class="normal"> /** +<td class="normal"> /** </td></tr> <tr><td>506</td> -<td class="normal"> * importSchema +<td class="normal"> * importSchema </td></tr> <tr><td>507</td> -<td class="normal"> * method for importing existing schema to Doctrine_Record classes +<td class="normal"> * method for importing existing schema to Doctrine_Record classes </td></tr> <tr><td>508</td> -<td class="normal"> * +<td class="normal"> * </td></tr> <tr><td>509</td> -<td class="normal"> * @param string $directory Directory to write your models to +<td class="normal"> * @param string $directory Directory to write your models to </td></tr> <tr><td>510</td> -<td class="normal"> * @param array $databases Array of databases to generate models for +<td class="normal"> * @param array $databases Array of databases to generate models for </td></tr> <tr><td>511</td> -<td class="normal"> * @return boolean +<td class="normal"> * @return boolean </td></tr> <tr><td>512</td> -<td class="normal"> */ +<td class="normal"> */ </td></tr> <tr><td>513</td> -<td class="normal"> public static function importSchema($directory, array $databases = array()) +<td class="normal"> public static function importSchema($directory, array $databases = array()) </td></tr> <tr><td>514</td> -<td class="normal"> { +<td class="normal"> { </td></tr> <tr><td>515</td> -<td class="red"> return Doctrine_Manager::connection()->import->importSchema($directory, $databases); +<td class="red"> return Doctrine_Manager::connection()->import->importSchema($directory, $databases); </td></tr> <tr><td>516</td> -<td class="orange"> } +<td class="orange"> } </td></tr> <tr><td>517</td> -<td class="normal"> /** +<td class="normal"> /** </td></tr> <tr><td>518</td> -<td class="normal"> * generateModelsFromDb +<td class="normal"> * generateModelsFromDb </td></tr> <tr><td>519</td> -<td class="normal"> * +<td class="normal"> * </td></tr> <tr><td>520</td> -<td class="normal"> * Generate your model definitions from an existing database +<td class="normal"> * Generate your model definitions from an existing database </td></tr> <tr><td>521</td> -<td class="normal"> * +<td class="normal"> * </td></tr> <tr><td>522</td> -<td class="normal"> * @param string $directory Directory to write your models to +<td class="normal"> * @param string $directory Directory to write your models to </td></tr> <tr><td>523</td> -<td class="normal"> * @param string $databases Array of databases to generate models for +<td class="normal"> * @param string $databases Array of databases to generate models for </td></tr> <tr><td>524</td> -<td class="normal"> * @return void +<td class="normal"> * @return void </td></tr> <tr><td>525</td> -<td class="normal"> */ +<td class="normal"> */ </td></tr> <tr><td>526</td> -<td class="normal"> public static function generateModelsFromDb($directory, array $databases = array()) +<td class="normal"> public static function generateModelsFromDb($directory, array $databases = array()) </td></tr> <tr><td>527</td> -<td class="normal"> { +<td class="normal"> { </td></tr> <tr><td>528</td> -<td class="red"> return self::importSchema($directory, $databases); +<td class="red"> return self::importSchema($directory, $databases); </td></tr> <tr><td>529</td> -<td class="orange"> } +<td class="orange"> } </td></tr> <tr><td>530</td> -<td class="normal"> /** +<td class="normal"> /** </td></tr> <tr><td>531</td> -<td class="normal"> * generateYamlFromDb +<td class="normal"> * generateYamlFromDb </td></tr> <tr><td>532</td> -<td class="normal"> * +<td class="normal"> * </td></tr> <tr><td>533</td> -<td class="normal"> * Generates models from database to temporary location then uses those models to generate a yaml schema file. +<td class="normal"> * Generates models from database to temporary location then uses those models to generate a yaml schema file. </td></tr> <tr><td>534</td> -<td class="normal"> * This should probably be fixed. We should write something to generate a yaml schema file directly from the database. +<td class="normal"> * This should probably be fixed. We should write something to generate a yaml schema file directly from the database. </td></tr> <tr><td>535</td> -<td class="normal"> * +<td class="normal"> * </td></tr> <tr><td>536</td> -<td class="normal"> * @param string $yamlPath Path to write oyur yaml schema file to +<td class="normal"> * @param string $yamlPath Path to write oyur yaml schema file to </td></tr> <tr><td>537</td> -<td class="normal"> * @return void +<td class="normal"> * @return void </td></tr> <tr><td>538</td> -<td class="normal"> */ +<td class="normal"> */ </td></tr> <tr><td>539</td> -<td class="normal"> public static function generateYamlFromDb($yamlPath) +<td class="normal"> public static function generateYamlFromDb($yamlPath) </td></tr> <tr><td>540</td> -<td class="normal"> { +<td class="normal"> { </td></tr> <tr><td>541</td> -<td class="red"> $directory = '/tmp/tmp_doctrine_models'; +<td class="red"> $directory = '/tmp/tmp_doctrine_models'; </td></tr> <tr><td>542</td> -<td class="normal"> +<td class="normal"> </td></tr> <tr><td>543</td> -<td class="red"> Doctrine::generateModelsFromDb($directory); +<td class="red"> Doctrine::generateModelsFromDb($directory); </td></tr> <tr><td>544</td> -<td class="normal"> +<td class="normal"> </td></tr> <tr><td>545</td> -<td class="red"> $export = new Doctrine_Export_Schema(); +<td class="red"> $export = new Doctrine_Export_Schema(); </td></tr> <tr><td>546</td> -<td class="normal"> +<td class="normal"> </td></tr> <tr><td>547</td> -<td class="red"> return $export->exportSchema($yamlPath, 'yml', $directory); +<td class="red"> return $export->exportSchema($yamlPath, 'yml', $directory); </td></tr> <tr><td>548</td> -<td class="orange"> } +<td class="orange"> } </td></tr> <tr><td>549</td> -<td class="normal"> /** +<td class="normal"> /** </td></tr> <tr><td>550</td> -<td class="normal"> * generateModelsFromYaml +<td class="normal"> * generateModelsFromYaml </td></tr> <tr><td>551</td> -<td class="normal"> * +<td class="normal"> * </td></tr> <tr><td>552</td> -<td class="normal"> * Generate a yaml schema file from an existing directory of models +<td class="normal"> * Generate a yaml schema file from an existing directory of models </td></tr> <tr><td>553</td> -<td class="normal"> * +<td class="normal"> * </td></tr> <tr><td>554</td> -<td class="normal"> * @param string $yamlPath Path to your yaml schema files +<td class="normal"> * @param string $yamlPath Path to your yaml schema files </td></tr> <tr><td>555</td> -<td class="normal"> * @param string $directory Directory to generate your models in +<td class="normal"> * @param string $directory Directory to generate your models in </td></tr> <tr><td>556</td> -<td class="normal"> * @return void +<td class="normal"> * @return void </td></tr> <tr><td>557</td> -<td class="normal"> */ +<td class="normal"> */ </td></tr> <tr><td>558</td> -<td class="normal"> public static function generateModelsFromYaml($yamlPath, $directory) +<td class="normal"> public static function generateModelsFromYaml($yamlPath, $directory) </td></tr> <tr><td>559</td> -<td class="normal"> { +<td class="normal"> { </td></tr> <tr><td>560</td> -<td class="red"> $import = new Doctrine_Import_Schema(); +<td class="red"> $import = new Doctrine_Import_Schema(); </td></tr> <tr><td>561</td> -<td class="normal"> +<td class="normal"> </td></tr> <tr><td>562</td> -<td class="red"> return $import->importSchema($yamlPath, 'yml', $directory); +<td class="red"> return $import->importSchema($yamlPath, 'yml', $directory); </td></tr> <tr><td>563</td> -<td class="orange"> } +<td class="orange"> } </td></tr> <tr><td>564</td> -<td class="normal"> /** +<td class="normal"> /** </td></tr> <tr><td>565</td> -<td class="normal"> * exportSchema +<td class="normal"> * exportSchema </td></tr> <tr><td>566</td> -<td class="normal"> * method for exporting Doctrine_Record classes to a schema +<td class="normal"> * method for exporting Doctrine_Record classes to a schema </td></tr> <tr><td>567</td> -<td class="normal"> * +<td class="normal"> * </td></tr> <tr><td>568</td> -<td class="normal"> * @param string $directory Directory containing your models +<td class="normal"> * @param string $directory Directory containing your models </td></tr> <tr><td>569</td> -<td class="normal"> * @return void +<td class="normal"> * @return void </td></tr> <tr><td>570</td> -<td class="normal"> */ +<td class="normal"> */ </td></tr> <tr><td>571</td> -<td class="normal"> public static function exportSchema($directory = null) +<td class="normal"> public static function exportSchema($directory = null) </td></tr> <tr><td>572</td> -<td class="normal"> { +<td class="normal"> { </td></tr> <tr><td>573</td> -<td class="covered"> return Doctrine_Manager::connection()->export->exportSchema($directory); +<td class="covered"> return Doctrine_Manager::connection()->export->exportSchema($directory); </td></tr> <tr><td>574</td> -<td class="orange"> } +<td class="orange"> } </td></tr> <tr><td>575</td> -<td class="normal"> /** +<td class="normal"> /** </td></tr> <tr><td>576</td> -<td class="normal"> * createTablesFromModels +<td class="normal"> * createTablesFromModels </td></tr> <tr><td>577</td> -<td class="normal"> * +<td class="normal"> * </td></tr> <tr><td>578</td> -<td class="normal"> * Creates database tables for the models in the specified directory +<td class="normal"> * Creates database tables for the models in the specified directory </td></tr> <tr><td>579</td> -<td class="normal"> * +<td class="normal"> * </td></tr> <tr><td>580</td> -<td class="normal"> * @param string $directory Directory containing your models +<td class="normal"> * @param string $directory Directory containing your models </td></tr> <tr><td>581</td> -<td class="normal"> * @return void +<td class="normal"> * @return void </td></tr> <tr><td>582</td> -<td class="normal"> */ +<td class="normal"> */ </td></tr> <tr><td>583</td> -<td class="normal"> public static function createTablesFromModels($directory = null) +<td class="normal"> public static function createTablesFromModels($directory = null) </td></tr> <tr><td>584</td> -<td class="normal"> { +<td class="normal"> { </td></tr> <tr><td>585</td> -<td class="red"> return self::exportSchema($directory); +<td class="red"> return self::exportSchema($directory); </td></tr> <tr><td>586</td> -<td class="orange"> } +<td class="orange"> } </td></tr> <tr><td>587</td> -<td class="normal"> /** +<td class="normal"> /** </td></tr> <tr><td>588</td> -<td class="normal"> * generateYamlFromModels +<td class="normal"> * generateYamlFromModels </td></tr> <tr><td>589</td> -<td class="normal"> * +<td class="normal"> * </td></tr> <tr><td>590</td> -<td class="normal"> * Generate yaml schema file for the models in the specified directory +<td class="normal"> * Generate yaml schema file for the models in the specified directory </td></tr> <tr><td>591</td> -<td class="normal"> * +<td class="normal"> * </td></tr> <tr><td>592</td> -<td class="normal"> * @param string $yamlPath Path to your yaml schema files +<td class="normal"> * @param string $yamlPath Path to your yaml schema files </td></tr> <tr><td>593</td> -<td class="normal"> * @param string $directory Directory to generate your models in +<td class="normal"> * @param string $directory Directory to generate your models in </td></tr> <tr><td>594</td> -<td class="normal"> * @return void +<td class="normal"> * @return void </td></tr> <tr><td>595</td> -<td class="normal"> */ +<td class="normal"> */ </td></tr> <tr><td>596</td> -<td class="normal"> public static function generateYamlFromModels($yamlPath, $directory) +<td class="normal"> public static function generateYamlFromModels($yamlPath, $directory) </td></tr> <tr><td>597</td> -<td class="normal"> { +<td class="normal"> { </td></tr> <tr><td>598</td> -<td class="red"> $export = new Doctrine_Export_Schema(); +<td class="red"> $export = new Doctrine_Export_Schema(); </td></tr> <tr><td>599</td> -<td class="normal"> +<td class="normal"> </td></tr> <tr><td>600</td> -<td class="red"> return $export->exportSchema($yamlPath, 'yml', $directory); +<td class="red"> return $export->exportSchema($yamlPath, 'yml', $directory); </td></tr> <tr><td>601</td> -<td class="orange"> } +<td class="orange"> } </td></tr> <tr><td>602</td> -<td class="normal"> /** +<td class="normal"> /** </td></tr> <tr><td>603</td> -<td class="normal"> * createDatabases +<td class="normal"> * createDatabases </td></tr> <tr><td>604</td> -<td class="normal"> * +<td class="normal"> * </td></tr> <tr><td>605</td> -<td class="normal"> * Creates databases for connections +<td class="normal"> * Creates databases for connections </td></tr> <tr><td>606</td> -<td class="normal"> * +<td class="normal"> * </td></tr> <tr><td>607</td> -<td class="normal"> * @param string $specifiedConnections Array of connections you wish to create the database for +<td class="normal"> * @param string $specifiedConnections Array of connections you wish to create the database for </td></tr> <tr><td>608</td> -<td class="normal"> * @return void +<td class="normal"> * @return void </td></tr> <tr><td>609</td> -<td class="normal"> */ +<td class="normal"> */ </td></tr> <tr><td>610</td> -<td class="normal"> public static function createDatabases($specifiedConnections) +<td class="normal"> public static function createDatabases($specifiedConnections) </td></tr> <tr><td>611</td> -<td class="normal"> { +<td class="normal"> { </td></tr> <tr><td>612</td> -<td class="red"> if (!is_array($specifiedConnections)) { +<td class="red"> if ( ! is_array($specifiedConnections)) { </td></tr> <tr><td>613</td> -<td class="red"> $specifiedConnections = (array) $specifiedConnections; +<td class="red"> $specifiedConnections = (array) $specifiedConnections; </td></tr> <tr><td>614</td> -<td class="red"> } +<td class="red"> } </td></tr> <tr><td>615</td> -<td class="normal"> +<td class="normal"> </td></tr> <tr><td>616</td> -<td class="red"> $connections = Doctrine_Manager::getInstance()->getConnections(); +<td class="red"> $connections = Doctrine_Manager::getInstance()->getConnections(); </td></tr> <tr><td>617</td> -<td class="normal"> +<td class="normal"> </td></tr> <tr><td>618</td> -<td class="red"> foreach ($connections as $name => $connection) { +<td class="red"> foreach ($connections as $name => $connection) { </td></tr> <tr><td>619</td> -<td class="red"> if (!empty($specifiedConnections) && !in_array($name, $specifiedConnections)) { +<td class="red"> if ( ! empty($specifiedConnections) && !in_array($name, $specifiedConnections)) { </td></tr> <tr><td>620</td> -<td class="red"> continue; +<td class="red"> continue; </td></tr> <tr><td>621</td> -<td class="orange"> } +<td class="orange"> } </td></tr> <tr><td>622</td> -<td class="normal"> +<td class="normal"> </td></tr> <tr><td>623</td> -<td class="red"> $connection->export->createDatabase($name); +<td class="red"> $connection->export->createDatabase($name); </td></tr> <tr><td>624</td> -<td class="red"> } +<td class="red"> } </td></tr> <tr><td>625</td> -<td class="red"> } +<td class="red"> } </td></tr> <tr><td>626</td> -<td class="normal"> /** +<td class="normal"> /** </td></tr> <tr><td>627</td> -<td class="normal"> * dropDatabases +<td class="normal"> * dropDatabases </td></tr> <tr><td>628</td> -<td class="normal"> * +<td class="normal"> * </td></tr> <tr><td>629</td> -<td class="normal"> * Drops databases for connections +<td class="normal"> * Drops databases for connections </td></tr> <tr><td>630</td> -<td class="normal"> * +<td class="normal"> * </td></tr> <tr><td>631</td> -<td class="normal"> * @param string $specifiedConnections Array of connections you wish to drop the database for +<td class="normal"> * @param string $specifiedConnections Array of connections you wish to drop the database for </td></tr> <tr><td>632</td> -<td class="normal"> * @return void +<td class="normal"> * @return void </td></tr> <tr><td>633</td> -<td class="normal"> */ +<td class="normal"> */ </td></tr> <tr><td>634</td> -<td class="normal"> public static function dropDatabases($specifiedConnections = array()) +<td class="normal"> public static function dropDatabases($specifiedConnections = array()) </td></tr> <tr><td>635</td> -<td class="normal"> { +<td class="normal"> { </td></tr> <tr><td>636</td> -<td class="red"> if (!is_array($specifiedConnections)) { +<td class="red"> if ( ! is_array($specifiedConnections)) { </td></tr> <tr><td>637</td> -<td class="red"> $specifiedConnections = (array) $specifiedConnections; +<td class="red"> $specifiedConnections = (array) $specifiedConnections; </td></tr> <tr><td>638</td> -<td class="red"> } +<td class="red"> } </td></tr> <tr><td>639</td> -<td class="normal"> +<td class="normal"> </td></tr> <tr><td>640</td> -<td class="red"> $connections = Doctrine_Manager::getInstance()->getConnections(); +<td class="red"> $connections = Doctrine_Manager::getInstance()->getConnections(); </td></tr> <tr><td>641</td> -<td class="normal"> +<td class="normal"> </td></tr> <tr><td>642</td> -<td class="red"> foreach ($connections as $name => $connection) { +<td class="red"> foreach ($connections as $name => $connection) { </td></tr> <tr><td>643</td> -<td class="red"> if (!empty($specifiedConnections) && !in_array($name, $specifiedConnections)) { +<td class="red"> if ( ! empty($specifiedConnections) && !in_array($name, $specifiedConnections)) { </td></tr> <tr><td>644</td> -<td class="red"> continue; +<td class="red"> continue; </td></tr> <tr><td>645</td> -<td class="orange"> } +<td class="orange"> } </td></tr> <tr><td>646</td> -<td class="normal"> +<td class="normal"> </td></tr> <tr><td>647</td> -<td class="red"> $connection->export->dropDatabase($name); +<td class="red"> $connection->export->dropDatabase($name); </td></tr> <tr><td>648</td> -<td class="red"> } +<td class="red"> } </td></tr> <tr><td>649</td> -<td class="red"> } +<td class="red"> } </td></tr> <tr><td>650</td> -<td class="normal"> /** +<td class="normal"> /** </td></tr> <tr><td>651</td> -<td class="normal"> * dumpData +<td class="normal"> * dumpData </td></tr> <tr><td>652</td> -<td class="normal"> * +<td class="normal"> * </td></tr> <tr><td>653</td> -<td class="normal"> * Dump data to a yaml fixtures file +<td class="normal"> * Dump data to a yaml fixtures file </td></tr> <tr><td>654</td> -<td class="normal"> * +<td class="normal"> * </td></tr> <tr><td>655</td> -<td class="normal"> * @param string $yamlPath Path to write the yaml data fixtures to +<td class="normal"> * @param string $yamlPath Path to write the yaml data fixtures to </td></tr> <tr><td>656</td> -<td class="normal"> * @param string $individualFiles Whether or not to dump data to individual fixtures files +<td class="normal"> * @param string $individualFiles Whether or not to dump data to individual fixtures files </td></tr> <tr><td>657</td> -<td class="normal"> * @return void +<td class="normal"> * @return void </td></tr> <tr><td>658</td> -<td class="normal"> */ +<td class="normal"> */ </td></tr> <tr><td>659</td> -<td class="normal"> public static function dumpData($yamlPath, $individualFiles = false) +<td class="normal"> public static function dumpData($yamlPath, $individualFiles = false) </td></tr> <tr><td>660</td> -<td class="normal"> { +<td class="normal"> { </td></tr> <tr><td>661</td> -<td class="red"> $data = new Doctrine_Data(); +<td class="red"> $data = new Doctrine_Data(); </td></tr> <tr><td>662</td> -<td class="normal"> +<td class="normal"> </td></tr> <tr><td>663</td> -<td class="red"> return $data->exportData($yamlPath, 'yml', array(), $individualFiles); +<td class="red"> return $data->exportData($yamlPath, 'yml', array(), $individualFiles); </td></tr> <tr><td>664</td> -<td class="orange"> } +<td class="orange"> } </td></tr> <tr><td>665</td> -<td class="normal"> /** +<td class="normal"> /** </td></tr> <tr><td>666</td> -<td class="normal"> * loadData +<td class="normal"> * loadData </td></tr> <tr><td>667</td> -<td class="normal"> * +<td class="normal"> * </td></tr> <tr><td>668</td> -<td class="normal"> * Load data from a yaml fixtures file. +<td class="normal"> * Load data from a yaml fixtures file. </td></tr> <tr><td>669</td> -<td class="normal"> * The output of dumpData can be fed to loadData +<td class="normal"> * The output of dumpData can be fed to loadData </td></tr> <tr><td>670</td> -<td class="normal"> * +<td class="normal"> * </td></tr> <tr><td>671</td> -<td class="normal"> * @param string $yamlPath Path to your yaml data fixtures +<td class="normal"> * @param string $yamlPath Path to your yaml data fixtures </td></tr> <tr><td>672</td> -<td class="normal"> * @param string $append Whether or not to append the data +<td class="normal"> * @param string $append Whether or not to append the data </td></tr> <tr><td>673</td> -<td class="normal"> * @return void +<td class="normal"> * @return void </td></tr> <tr><td>674</td> -<td class="normal"> */ +<td class="normal"> */ </td></tr> <tr><td>675</td> -<td class="normal"> public static function loadData($yamlPath, $append = false) +<td class="normal"> public static function loadData($yamlPath, $append = false) </td></tr> <tr><td>676</td> -<td class="normal"> { +<td class="normal"> { </td></tr> <tr><td>677</td> -<td class="red"> $delete = isset($append) ? ($append ? false : true) : true; +<td class="red"> $delete = isset($append) ? ($append ? false : true) : true; </td></tr> <tr><td>678</td> -<td class="normal"> +<td class="normal"> </td></tr> <tr><td>679</td> -<td class="normal"> if ($delete) +<td class="normal"> if ($delete) </td></tr> <tr><td>680</td> -<td class="red"> { +<td class="red"> { </td></tr> <tr><td>681</td> -<td class="red"> $models = Doctrine::getLoadedModels(); +<td class="red"> $models = Doctrine::getLoadedModels(); </td></tr> <tr><td>682</td> -<td class="normal"> +<td class="normal"> </td></tr> <tr><td>683</td> -<td class="red"> foreach ($models as $model) +<td class="red"> foreach ($models as $model) </td></tr> <tr><td>684</td> -<td class="normal"> { +<td class="normal"> { </td></tr> <tr><td>685</td> -<td class="red"> $model = new $model(); +<td class="red"> $model = new $model(); </td></tr> <tr><td>686</td> -<td class="normal"> +<td class="normal"> </td></tr> <tr><td>687</td> -<td class="red"> $model->getTable()->createQuery()->delete($model)->execute(); +<td class="red"> $model->getTable()->createQuery()->delete($model)->execute(); </td></tr> <tr><td>688</td> -<td class="red"> } +<td class="red"> } </td></tr> <tr><td>689</td> -<td class="red"> } +<td class="red"> } </td></tr> <tr><td>690</td> -<td class="normal"> +<td class="normal"> </td></tr> <tr><td>691</td> -<td class="red"> $data = new Doctrine_Data(); +<td class="red"> $data = new Doctrine_Data(); </td></tr> <tr><td>692</td> -<td class="normal"> +<td class="normal"> </td></tr> <tr><td>693</td> -<td class="red"> return $data->importData($yamlPath, 'yml'); +<td class="red"> return $data->importData($yamlPath, 'yml'); </td></tr> <tr><td>694</td> -<td class="orange"> } +<td class="orange"> } </td></tr> <tr><td>695</td> -<td class="normal"> /** +<td class="normal"> /** </td></tr> <tr><td>696</td> -<td class="normal"> * loadDummyData +<td class="normal"> * loadDummyData </td></tr> <tr><td>697</td> -<td class="normal"> * +<td class="normal"> * </td></tr> <tr><td>698</td> -<td class="normal"> * Populdate your models with dummy data +<td class="normal"> * Populdate your models with dummy data </td></tr> <tr><td>699</td> -<td class="normal"> * +<td class="normal"> * </td></tr> <tr><td>700</td> -<td class="normal"> * @param string $append Whether or not to append the data +<td class="normal"> * @param string $append Whether or not to append the data </td></tr> <tr><td>701</td> -<td class="normal"> * @param string $num Number of records to populate +<td class="normal"> * @param string $num Number of records to populate </td></tr> <tr><td>702</td> -<td class="normal"> * @return void +<td class="normal"> * @return void </td></tr> <tr><td>703</td> -<td class="normal"> */ +<td class="normal"> */ </td></tr> <tr><td>704</td> -<td class="normal"> public static function loadDummyData($append, $num = 5) +<td class="normal"> public static function loadDummyData($append, $num = 5) </td></tr> <tr><td>705</td> -<td class="normal"> { +<td class="normal"> { </td></tr> <tr><td>706</td> -<td class="red"> $delete = isset($append) ? ($append ? false : true) : true; +<td class="red"> $delete = isset($append) ? ($append ? false : true) : true; </td></tr> <tr><td>707</td> -<td class="normal"> +<td class="normal"> </td></tr> <tr><td>708</td> -<td class="normal"> if ($delete) +<td class="normal"> if ($delete) </td></tr> <tr><td>709</td> -<td class="red"> { +<td class="red"> { </td></tr> <tr><td>710</td> -<td class="red"> $models = Doctrine::getLoadedModels(); +<td class="red"> $models = Doctrine::getLoadedModels(); </td></tr> <tr><td>711</td> -<td class="normal"> +<td class="normal"> </td></tr> <tr><td>712</td> -<td class="red"> foreach ($models as $model) +<td class="red"> foreach ($models as $model) </td></tr> <tr><td>713</td> -<td class="normal"> { +<td class="normal"> { </td></tr> <tr><td>714</td> -<td class="red"> $model = new $model(); +<td class="red"> $model = new $model(); </td></tr> <tr><td>715</td> -<td class="normal"> +<td class="normal"> </td></tr> <tr><td>716</td> -<td class="red"> $model->getTable()->createQuery()->delete($model)->execute(); +<td class="red"> $model->getTable()->createQuery()->delete($model)->execute(); </td></tr> <tr><td>717</td> -<td class="red"> } +<td class="red"> } </td></tr> <tr><td>718</td> -<td class="red"> } +<td class="red"> } </td></tr> <tr><td>719</td> -<td class="normal"> +<td class="normal"> </td></tr> <tr><td>720</td> -<td class="red"> $data = new Doctrine_Data(); +<td class="red"> $data = new Doctrine_Data(); </td></tr> <tr><td>721</td> -<td class="normal"> +<td class="normal"> </td></tr> <tr><td>722</td> -<td class="red"> return $data->importDummyData($num); +<td class="red"> return $data->importDummyData($num); </td></tr> <tr><td>723</td> -<td class="orange"> } +<td class="orange"> } </td></tr> <tr><td>724</td> -<td class="normal"> /** +<td class="normal"> /** </td></tr> <tr><td>725</td> -<td class="normal"> * migrate +<td class="normal"> * migrate </td></tr> <tr><td>726</td> -<td class="normal"> * +<td class="normal"> * </td></tr> <tr><td>727</td> -<td class="normal"> * Migrate database to specified $to version. Migrates from current to latest if you do not specify. +<td class="normal"> * Migrate database to specified $to version. Migrates from current to latest if you do not specify. </td></tr> <tr><td>728</td> -<td class="normal"> * +<td class="normal"> * </td></tr> <tr><td>729</td> -<td class="normal"> * @param string $directory Directory which contains your migration classes +<td class="normal"> * @param string $directory Directory which contains your migration classes </td></tr> <tr><td>730</td> -<td class="normal"> * @param string $to Version you wish to migrate to. +<td class="normal"> * @param string $to Version you wish to migrate to. </td></tr> <tr><td>731</td> -<td class="normal"> * @return void +<td class="normal"> * @return void </td></tr> <tr><td>732</td> -<td class="normal"> */ +<td class="normal"> */ </td></tr> <tr><td>733</td> -<td class="normal"> public static function migrate($directory, $to = null) +<td class="normal"> public static function migrate($directory, $to = null) </td></tr> <tr><td>734</td> -<td class="normal"> { +<td class="normal"> { </td></tr> <tr><td>735</td> -<td class="red"> $migration = new Doctrine_Migration($directory); +<td class="red"> $migration = new Doctrine_Migration($directory); </td></tr> <tr><td>736</td> -<td class="normal"> +<td class="normal"> </td></tr> <tr><td>737</td> -<td class="red"> return $migration->migrate($to); +<td class="red"> return $migration->migrate($to); </td></tr> <tr><td>738</td> -<td class="orange"> } +<td class="orange"> } </td></tr> <tr><td>739</td> -<td class="normal"> /** +<td class="normal"> /** </td></tr> <tr><td>740</td> -<td class="normal"> * generateMigrationClass +<td class="normal"> * generateMigrationClass </td></tr> <tr><td>741</td> -<td class="normal"> * +<td class="normal"> * </td></tr> <tr><td>742</td> -<td class="normal"> * Generate new migration class skeleton +<td class="normal"> * Generate new migration class skeleton </td></tr> <tr><td>743</td> -<td class="normal"> * +<td class="normal"> * </td></tr> <tr><td>744</td> -<td class="normal"> * @param string $className Name of the Migration class to generate +<td class="normal"> * @param string $className Name of the Migration class to generate </td></tr> <tr><td>745</td> -<td class="normal"> * @param string $directory Directory which contains your migration classes +<td class="normal"> * @param string $directory Directory which contains your migration classes </td></tr> <tr><td>746</td> -<td class="normal"> * @package default +<td class="normal"> * @package default </td></tr> <tr><td>747</td> -<td class="normal"> */ +<td class="normal"> */ </td></tr> <tr><td>748</td> -<td class="normal"> public static function generateMigrationClass($className, $directory) +<td class="normal"> public static function generateMigrationClass($className, $directory) </td></tr> <tr><td>749</td> -<td class="normal"> { +<td class="normal"> { </td></tr> <tr><td>750</td> -<td class="red"> $migration = new Doctrine_Migration($directory); +<td class="red"> $migration = new Doctrine_Migration($directory); </td></tr> <tr><td>751</td> -<td class="red"> $next = (string) $migration->getNextVersion(); +<td class="red"> $next = (string) $migration->getNextVersion(); </td></tr> <tr><td>752</td> -<td class="normal"> +<td class="normal"> </td></tr> <tr><td>753</td> -<td class="red"> $fileName = str_repeat('0', (3 - strlen($next))) . $next . '_' . Doctrine::tableize($className) . '.class.php'; +<td class="red"> $fileName = str_repeat('0', (3 - strlen($next))) . $next . '_' . Doctrine::tableize($className) . '.class.php'; </td></tr> <tr><td>754</td> -<td class="red"> $path = $directory . DIRECTORY_SEPARATOR . $fileName; +<td class="red"> $path = $directory . DIRECTORY_SEPARATOR . $fileName; </td></tr> <tr><td>755</td> -<td class="normal"> +<td class="normal"> </td></tr> <tr><td>756</td> -<td class="red"> $code = '<?php' . PHP_EOL; +<td class="red"> $code = '<?php' . PHP_EOL; </td></tr> <tr><td>757</td> -<td class="red"> $code .= "// Automatically generated by Doctrine\n"; +<td class="red"> $code .= "// Automatically generated by Doctrine\n"; </td></tr> <tr><td>758</td> -<td class="red"> $code .= "class " . $className . " extends Doctrine_Migration\n"; +<td class="red"> $code .= "class " . $className . " extends Doctrine_Migration\n"; </td></tr> <tr><td>759</td> -<td class="red"> $code .= "{\n"; +<td class="red"> $code .= "{\n"; </td></tr> <tr><td>760</td> -<td class="red"> $code .= "\tpublic function up()\n\t{ }\n\n"; +<td class="red"> $code .= "\tpublic function up()\n\t{ }\n\n"; </td></tr> <tr><td>761</td> -<td class="red"> $code .= "\tpublic function down()\n\t{ }\n"; +<td class="red"> $code .= "\tpublic function down()\n\t{ }\n"; </td></tr> <tr><td>762</td> -<td class="red"> $code .= "}"; +<td class="red"> $code .= "}"; </td></tr> <tr><td>763</td> -<td class="normal"> +<td class="normal"> </td></tr> <tr><td>764</td> -<td class="red"> file_put_contents($path, $code); +<td class="red"> file_put_contents($path, $code); </td></tr> <tr><td>765</td> -<td class="red"> } +<td class="red"> } </td></tr> <tr><td>766</td> -<td class="normal"> /** +<td class="normal"> /** </td></tr> <tr><td>767</td> -<td class="normal"> * exportSql +<td class="normal"> * exportSql </td></tr> <tr><td>768</td> -<td class="normal"> * method for exporting Doctrine_Record classes to a schema +<td class="normal"> * method for exporting Doctrine_Record classes to a schema </td></tr> <tr><td>769</td> -<td class="normal"> * +<td class="normal"> * </td></tr> <tr><td>770</td> -<td class="normal"> * @param string $directory +<td class="normal"> * @param string $directory </td></tr> <tr><td>771</td> -<td class="normal"> */ +<td class="normal"> */ </td></tr> <tr><td>772</td> -<td class="normal"> public static function exportSql($directory = null) +<td class="normal"> public static function exportSql($directory = null) </td></tr> <tr><td>773</td> -<td class="normal"> { +<td class="normal"> { </td></tr> <tr><td>774</td> -<td class="red"> return Doctrine_Manager::connection()->export->exportSql($directory); +<td class="red"> return Doctrine_Manager::connection()->export->exportSql($directory); </td></tr> <tr><td>775</td> -<td class="orange"> } +<td class="orange"> } </td></tr> <tr><td>776</td> -<td class="normal"> /** +<td class="normal"> /** </td></tr> <tr><td>777</td> -<td class="normal"> * generateSqlFromModels +<td class="normal"> * generateSqlFromModels </td></tr> <tr><td>778</td> -<td class="normal"> * +<td class="normal"> * </td></tr> <tr><td>779</td> -<td class="normal"> * Generate sql for directory of models +<td class="normal"> * Generate sql for directory of models </td></tr> <tr><td>780</td> -<td class="normal"> * +<td class="normal"> * </td></tr> <tr><td>781</td> -<td class="normal"> * @param string $directory Directory where your models exist +<td class="normal"> * @param string $directory Directory where your models exist </td></tr> <tr><td>782</td> -<td class="normal"> * @return void +<td class="normal"> * @return void </td></tr> <tr><td>783</td> -<td class="normal"> */ +<td class="normal"> */ </td></tr> <tr><td>784</td> -<td class="normal"> public static function generateSqlFromModels($directory) +<td class="normal"> public static function generateSqlFromModels($directory) </td></tr> <tr><td>785</td> -<td class="normal"> { +<td class="normal"> { </td></tr> <tr><td>786</td> -<td class="red"> return self::exportSql($directory); +<td class="red"> return self::exportSql($directory); </td></tr> <tr><td>787</td> -<td class="orange"> } +<td class="orange"> } </td></tr> <tr><td>788</td> -<td class="normal"> /** +<td class="normal"> /** </td></tr> <tr><td>789</td> -<td class="normal"> * compile +<td class="normal"> * compile </td></tr> <tr><td>790</td> -<td class="normal"> * method for making a single file of most used doctrine runtime components +<td class="normal"> * method for making a single file of most used doctrine runtime components </td></tr> <tr><td>791</td> -<td class="normal"> * including the compiled file instead of multiple files (in worst +<td class="normal"> * including the compiled file instead of multiple files (in worst </td></tr> <tr><td>792</td> -<td class="normal"> * cases dozens of files) can improve performance by an order of magnitude +<td class="normal"> * cases dozens of files) can improve performance by an order of magnitude </td></tr> <tr><td>793</td> -<td class="normal"> * +<td class="normal"> * </td></tr> <tr><td>794</td> -<td class="normal"> * @param string $target +<td class="normal"> * @param string $target </td></tr> <tr><td>795</td> -<td class="normal"> * +<td class="normal"> * </td></tr> <tr><td>796</td> -<td class="normal"> * @throws Doctrine_Exception +<td class="normal"> * @throws Doctrine_Exception </td></tr> <tr><td>797</td> -<td class="normal"> * @return void +<td class="normal"> * @return void </td></tr> <tr><td>798</td> -<td class="normal"> */ +<td class="normal"> */ </td></tr> <tr><td>799</td> -<td class="normal"> public static function compile($target = null) +<td class="normal"> public static function compile($target = null) </td></tr> <tr><td>800</td> -<td class="normal"> { +<td class="normal"> { </td></tr> <tr><td>801</td> -<td class="red"> Doctrine_Compiler::compile($target); +<td class="red"> Doctrine_Compiler::compile($target); </td></tr> <tr><td>802</td> -<td class="red"> } +<td class="red"> } </td></tr> <tr><td>803</td> -<td class="normal"> /** +<td class="normal"> /** </td></tr> <tr><td>804</td> -<td class="normal"> * simple autoload function +<td class="normal"> * simple autoload function </td></tr> <tr><td>805</td> -<td class="normal"> * returns true if the class was loaded, otherwise false +<td class="normal"> * returns true if the class was loaded, otherwise false </td></tr> <tr><td>806</td> -<td class="normal"> * +<td class="normal"> * </td></tr> <tr><td>807</td> -<td class="normal"> * @param string $classname +<td class="normal"> * @param string $classname </td></tr> <tr><td>808</td> -<td class="normal"> * @return boolean +<td class="normal"> * @return boolean </td></tr> <tr><td>809</td> -<td class="normal"> */ +<td class="normal"> */ </td></tr> <tr><td>810</td> -<td class="normal"> public static function autoload($classname) +<td class="normal"> public static function autoload($classname) </td></tr> <tr><td>811</td> -<td class="normal"> { +<td class="normal"> { </td></tr> <tr><td>812</td> -<td class="covered"> if (class_exists($classname, false)) { +<td class="covered"> if (class_exists($classname, false)) { </td></tr> <tr><td>813</td> -<td class="covered"> return false; +<td class="covered"> return false; </td></tr> <tr><td>814</td> -<td class="orange"> } +<td class="orange"> } </td></tr> <tr><td>815</td> -<td class="covered"> if ( ! self::$_path) { +<td class="covered"> if ( ! self::$_path) { </td></tr> <tr><td>816</td> -<td class="red"> self::$_path = dirname(__FILE__); +<td class="red"> self::$_path = dirname(__FILE__); </td></tr> <tr><td>817</td> -<td class="red"> } +<td class="red"> } </td></tr> <tr><td>818</td> -<td class="covered"> $class = self::$_path . DIRECTORY_SEPARATOR . str_replace('_', DIRECTORY_SEPARATOR,$classname) . '.php'; +<td class="covered"> $class = self::$_path . DIRECTORY_SEPARATOR . str_replace('_', DIRECTORY_SEPARATOR,$classname) . '.php'; </td></tr> <tr><td>819</td> -<td class="normal"> +<td class="normal"> </td></tr> <tr><td>820</td> -<td class="covered"> if ( ! file_exists($class)) { +<td class="covered"> if ( ! file_exists($class)) { </td></tr> <tr><td>821</td> -<td class="covered"> return false; +<td class="covered"> return false; </td></tr> <tr><td>822</td> -<td class="orange"> } +<td class="orange"> } </td></tr> <tr><td>823</td> -<td class="normal"> +<td class="normal"> </td></tr> <tr><td>824</td> -<td class="covered"> require_once($class); +<td class="covered"> require_once($class); </td></tr> <tr><td>825</td> -<td class="normal"> +<td class="normal"> </td></tr> <tr><td>826</td> -<td class="covered"> return true; +<td class="covered"> return true; </td></tr> <tr><td>827</td> -<td class="orange"> } +<td class="orange"> } </td></tr> <tr><td>828</td> -<td class="normal"> /** +<td class="normal"> /** </td></tr> <tr><td>829</td> -<td class="normal"> * dump +<td class="normal"> * dump </td></tr> <tr><td>830</td> -<td class="normal"> * +<td class="normal"> * </td></tr> <tr><td>831</td> -<td class="normal"> * dumps a given variable +<td class="normal"> * dumps a given variable </td></tr> <tr><td>832</td> -<td class="normal"> * +<td class="normal"> * </td></tr> <tr><td>833</td> -<td class="normal"> * @param mixed $var a variable of any type +<td class="normal"> * @param mixed $var a variable of any type </td></tr> <tr><td>834</td> -<td class="normal"> * @param boolean $output whether to output the content +<td class="normal"> * @param boolean $output whether to output the content </td></tr> <tr><td>835</td> -<td class="normal"> * @return void|string +<td class="normal"> * @return void|string </td></tr> <tr><td>836</td> -<td class="normal"> */ +<td class="normal"> */ </td></tr> <tr><td>837</td> -<td class="normal"> public static function dump($var, $output = true) +<td class="normal"> public static function dump($var, $output = true) </td></tr> <tr><td>838</td> -<td class="normal"> { +<td class="normal"> { </td></tr> <tr><td>839</td> -<td class="red"> $ret = array(); +<td class="red"> $ret = array(); </td></tr> <tr><td>840</td> -<td class="red"> switch (gettype($var)) { +<td class="red"> switch (gettype($var)) { </td></tr> <tr><td>841</td> -<td class="red"> case 'array': +<td class="red"> case 'array': </td></tr> <tr><td>842</td> -<td class="red"> $ret[] = 'Array('; +<td class="red"> $ret[] = 'Array('; </td></tr> <tr><td>843</td> -<td class="red"> foreach ($var as $k => $v) { +<td class="red"> foreach ($var as $k => $v) { </td></tr> <tr><td>844</td> -<td class="red"> $ret[] = $k . ' : ' . Doctrine::dump($v, false); +<td class="red"> $ret[] = $k . ' : ' . Doctrine::dump($v, false); </td></tr> <tr><td>845</td> -<td class="red"> } +<td class="red"> } </td></tr> <tr><td>846</td> -<td class="red"> $ret[] = ")"; +<td class="red"> $ret[] = ")"; </td></tr> <tr><td>847</td> -<td class="red"> break; +<td class="red"> break; </td></tr> <tr><td>848</td> -<td class="red"> case 'object': +<td class="red"> case 'object': </td></tr> <tr><td>849</td> -<td class="red"> $ret[] = 'Object(' . get_class($var) . ')'; +<td class="red"> $ret[] = 'Object(' . get_class($var) . ')'; </td></tr> <tr><td>850</td> -<td class="red"> break; +<td class="red"> break; </td></tr> <tr><td>851</td> -<td class="red"> default: +<td class="red"> default: </td></tr> <tr><td>852</td> -<td class="red"> $ret[] = var_export($var, true); +<td class="red"> $ret[] = var_export($var, true); </td></tr> <tr><td>853</td> -<td class="red"> } +<td class="red"> } </td></tr> <tr><td>854</td> -<td class="red"> if ($output) { +<td class="red"> if ($output) { </td></tr> <tr><td>855</td> -<td class="red"> print implode("\n", $ret); +<td class="red"> print implode("\n", $ret); </td></tr> <tr><td>856</td> -<td class="red"> } +<td class="red"> } </td></tr> <tr><td>857</td> -<td class="red"> return implode("\n", $ret); +<td class="red"> return implode("\n", $ret); </td></tr> <tr><td>858</td> -<td class="orange"> } +<td class="orange"> } </td></tr> <tr><td>859</td> -<td class="normal"> /** +<td class="normal"> /** </td></tr> <tr><td>860</td> -<td class="normal"> * returns table name from class name +<td class="normal"> * returns table name from class name </td></tr> <tr><td>861</td> -<td class="normal"> * +<td class="normal"> * </td></tr> <tr><td>862</td> -<td class="normal"> * @param string $classname +<td class="normal"> * @param string $classname </td></tr> <tr><td>863</td> -<td class="normal"> * @return string +<td class="normal"> * @return string </td></tr> <tr><td>864</td> -<td class="normal"> */ +<td class="normal"> */ </td></tr> <tr><td>865</td> -<td class="normal"> public static function tableize($classname) +<td class="normal"> public static function tableize($classname) </td></tr> <tr><td>866</td> -<td class="normal"> { +<td class="normal"> { </td></tr> <tr><td>867</td> -<td class="covered"> return strtolower(preg_replace('~(?<=\\w)([A-Z])~', '_$1', $classname)); +<td class="covered"> return strtolower(preg_replace('~(?<=\\w)([A-Z])~', '_$1', $classname)); </td></tr> <tr><td>868</td> -<td class="orange"> } +<td class="orange"> } </td></tr> <tr><td>869</td> -<td class="normal"> /** +<td class="normal"> /** </td></tr> <tr><td>870</td> -<td class="normal"> * returns class name from table name +<td class="normal"> * returns class name from table name </td></tr> <tr><td>871</td> -<td class="normal"> * +<td class="normal"> * </td></tr> <tr><td>872</td> -<td class="normal"> * @param string $tablename +<td class="normal"> * @param string $tablename </td></tr> <tr><td>873</td> -<td class="normal"> * @return string +<td class="normal"> * @return string </td></tr> <tr><td>874</td> -<td class="normal"> */ +<td class="normal"> */ </td></tr> <tr><td>875</td> -<td class="normal"> public static function classify($tablename) +<td class="normal"> public static function classify($tablename) </td></tr> <tr><td>876</td> -<td class="normal"> { +<td class="normal"> { </td></tr> <tr><td>877</td> -<td class="covered"> return preg_replace_callback('~(_?)(_)([\w])~', array("Doctrine", "classifyCallback"), ucfirst($tablename)); +<td class="covered"> return preg_replace_callback('~(_?)(_)([\w])~', array("Doctrine", "classifyCallback"), ucfirst($tablename)); </td></tr> <tr><td>878</td> -<td class="orange"> } +<td class="orange"> } </td></tr> <tr><td>879</td> -<td class="normal"> +<td class="normal"> </td></tr> <tr><td>880</td> -<td class="normal"> /** +<td class="normal"> /** </td></tr> <tr><td>881</td> -<td class="normal"> * Callback function to classify a classname propperly. +<td class="normal"> * Callback function to classify a classname propperly. </td></tr> <tr><td>882</td> -<td class="normal"> * +<td class="normal"> * </td></tr> <tr><td>883</td> -<td class="normal"> * @param array $matches An array of matches from a pcre_replace call +<td class="normal"> * @param array $matches An array of matches from a pcre_replace call </td></tr> <tr><td>884</td> -<td class="normal"> * @return string A string with matches 1 and mathces 3 in upper case. +<td class="normal"> * @return string A string with matches 1 and mathces 3 in upper case. </td></tr> <tr><td>885</td> -<td class="normal"> */ +<td class="normal"> */ </td></tr> <tr><td>886</td> -<td class="normal"> public static function classifyCallback($matches) +<td class="normal"> public static function classifyCallback($matches) </td></tr> <tr><td>887</td> -<td class="normal"> { +<td class="normal"> { </td></tr> <tr><td>888</td> -<td class="covered"> return $matches[1] . strtoupper($matches[3]); +<td class="covered"> return $matches[1] . strtoupper($matches[3]); </td></tr> <tr><td>889</td> -<td class="orange"> } +<td class="orange"> } </td></tr> <tr><td>890</td> -<td class="normal"> /** +<td class="normal"> /** </td></tr> <tr><td>891</td> -<td class="normal"> * checks for valid class name (uses camel case and underscores) +<td class="normal"> * checks for valid class name (uses camel case and underscores) </td></tr> <tr><td>892</td> -<td class="normal"> * +<td class="normal"> * </td></tr> <tr><td>893</td> -<td class="normal"> * @param string $classname +<td class="normal"> * @param string $classname </td></tr> <tr><td>894</td> -<td class="normal"> * @return boolean +<td class="normal"> * @return boolean </td></tr> <tr><td>895</td> -<td class="normal"> */ +<td class="normal"> */ </td></tr> <tr><td>896</td> -<td class="normal"> public static function isValidClassname($classname) +<td class="normal"> public static function isValidClassname($classname) </td></tr> <tr><td>897</td> -<td class="normal"> { +<td class="normal"> { </td></tr> <tr><td>898</td> -<td class="red"> if (preg_match('~(^[a-z])|(_[a-z])|([\W])|(_{2})~', $classname)) { +<td class="red"> if (preg_match('~(^[a-z])|(_[a-z])|([\W])|(_{2})~', $classname)) { </td></tr> <tr><td>899</td> -<td class="red"> return false; +<td class="red"> return false; </td></tr> <tr><td>900</td> -<td class="orange"> } +<td class="orange"> } </td></tr> <tr><td>901</td> -<td class="normal"> +<td class="normal"> </td></tr> <tr><td>902</td> -<td class="red"> return true; +<td class="red"> return true; </td></tr> <tr><td>903</td> -<td class="orange"> } +<td class="orange"> } </td></tr> <tr><td>904</td> -<td class="normal">} +<td class="normal">} </td></tr> </table></body></html> \ No newline at end of file diff --git a/tests/coverage/Doctrine_Export.html b/tests/coverage/Doctrine_Export.html index 539e04913..b34cd7edd 100644 --- a/tests/coverage/Doctrine_Export.html +++ b/tests/coverage/Doctrine_Export.html @@ -3022,7 +3022,7 @@ <td class="normal"> </td></tr> <tr><td>1005</td> -<td class="covered"> if (!isset($connections[$connectionName])) { +<td class="covered"> if ( ! isset($connections[$connectionName])) { </td></tr> <tr><td>1006</td> <td class="covered"> $connections[$connectionName] = array(); diff --git a/tests/coverage/Doctrine_Export_Schema.html b/tests/coverage/Doctrine_Export_Schema.html index ef1f43c97..020d9331d 100644 --- a/tests/coverage/Doctrine_Export_Schema.html +++ b/tests/coverage/Doctrine_Export_Schema.html @@ -208,7 +208,7 @@ <td class="covered"> foreach ($loadedModels as $name) { </td></tr> <tr><td>67</td> -<td class="red"> if (!empty($models) && !in_array($name, $models)) { +<td class="red"> if ( ! empty($models) && !in_array($name, $models)) { </td></tr> <tr><td>68</td> <td class="red"> continue; diff --git a/tests/coverage/Doctrine_Import_Builder.html b/tests/coverage/Doctrine_Import_Builder.html index de8ebd4ff..066675c16 100644 --- a/tests/coverage/Doctrine_Import_Builder.html +++ b/tests/coverage/Doctrine_Import_Builder.html @@ -727,7 +727,7 @@ <td class="normal"> // add extra ) if type definition is not declared </td></tr> <tr><td>240</td> -<td class="red"> if (!isset($definitions['type'])) { +<td class="red"> if ( ! isset($definitions['type'])) { </td></tr> <tr><td>241</td> <td class="red"> $ret[$i] .= ')'; @@ -754,7 +754,7 @@ <td class="normal"> </td></tr> <tr><td>249</td> -<td class="covered"> if (!empty($ret)) { +<td class="covered"> if ( ! empty($ret)) { </td></tr> <tr><td>250</td> <td class="covered"> return "\n\tpublic function setTableDefinition()"."\n\t{\n".implode("\n", $ret)."\n\t}"; @@ -967,7 +967,7 @@ <td class="normal"> </td></tr> <tr><td>320</td> -<td class="covered"> if (!empty($ret)) { +<td class="covered"> if ( ! empty($ret)) { </td></tr> <tr><td>321</td> <td class="covered"> return "\n\tpublic function setUp()\n\t{\n".implode("\n", $ret)."\n\t}"; @@ -1111,7 +1111,7 @@ <td class="normal"> // We only want to generate this one if it doesn't already exist </td></tr> <tr><td>368</td> -<td class="red"> if (!file_exists($options['fileName'])) { +<td class="red"> if ( ! file_exists($options['fileName'])) { </td></tr> <tr><td>369</td> <td class="red"> $optionsBak = $options; @@ -1156,7 +1156,7 @@ <td class="normal"> </td></tr> <tr><td>383</td> -<td class="red"> if (!file_exists($generatedPath)) { +<td class="red"> if ( ! file_exists($generatedPath)) { </td></tr> <tr><td>384</td> <td class="red"> mkdir($generatedPath); @@ -1219,7 +1219,7 @@ <td class="covered"> if (isset($options['requires'])) { </td></tr> <tr><td>404</td> -<td class="red"> if (!is_array($options['requires'])) { +<td class="red"> if ( ! is_array($options['requires'])) { </td></tr> <tr><td>405</td> <td class="red"> $options['requires'] = array($options['requires']); diff --git a/tests/coverage/Doctrine_Import_Schema.html b/tests/coverage/Doctrine_Import_Schema.html index a0b9d8e25..2df82897b 100644 --- a/tests/coverage/Doctrine_Import_Schema.html +++ b/tests/coverage/Doctrine_Import_Schema.html @@ -268,7 +268,7 @@ <td class="covered"> foreach ($array as $name => $properties) { </td></tr> <tr><td>87</td> -<td class="covered"> if (!empty($models) && !in_array($properties['className'], $models)) { +<td class="covered"> if ( ! empty($models) && !in_array($properties['className'], $models)) { </td></tr> <tr><td>88</td> <td class="red"> continue; @@ -568,7 +568,7 @@ <td class="covered"> foreach ($array as $name => $properties) { </td></tr> <tr><td>187</td> -<td class="covered"> if (!isset($properties['relations'])) { +<td class="covered"> if ( ! isset($properties['relations'])) { </td></tr> <tr><td>188</td> <td class="red"> continue; @@ -643,7 +643,7 @@ <td class="normal"> </td></tr> <tr><td>212</td> -<td class="red"> if(isset($relation['refClass']) && !empty($relation['refClass']) && (!isset($array[$relation['refClass']]['relations']) || empty($array[$relation['refClass']]['relations']))) { +<td class="red"> if(isset($relation['refClass']) && !empty($relation['refClass']) && ( ! isset($array[$relation['refClass']]['relations']) || empty($array[$relation['refClass']]['relations']))) { </td></tr> <tr><td>213</td> <td class="red"> $array[$relation['refClass']]['relations'][$className] = array('local'=>$relation['local'],'foreign'=>$relation['foreign'],'ignore'=>true); diff --git a/tests/coverage/Doctrine_Migration.html b/tests/coverage/Doctrine_Migration.html index 5db219cbc..c84fcd6cc 100644 --- a/tests/coverage/Doctrine_Migration.html +++ b/tests/coverage/Doctrine_Migration.html @@ -895,7 +895,7 @@ <td class="normal"> </td></tr> <tr><td>296</td> -<td class="red"> if (!empty($changes)) { +<td class="red"> if ( ! empty($changes)) { </td></tr> <tr><td>297</td> <td class="red"> $process->$funcName($changes); diff --git a/tests/coverage/Doctrine_Parser.html b/tests/coverage/Doctrine_Parser.html index e85889cc3..a151a22e5 100644 --- a/tests/coverage/Doctrine_Parser.html +++ b/tests/coverage/Doctrine_Parser.html @@ -358,7 +358,7 @@ <td class="covered"> ob_start(); </td></tr> <tr><td>117</td> -<td class="covered"> if (!file_exists($path)) { +<td class="covered"> if ( ! file_exists($path)) { </td></tr> <tr><td>118</td> <td class="red"> $contents = $path; diff --git a/tests/coverage/Doctrine_Record.html b/tests/coverage/Doctrine_Record.html index c0baa3dd4..454bd7142 100644 --- a/tests/coverage/Doctrine_Record.html +++ b/tests/coverage/Doctrine_Record.html @@ -3421,7 +3421,7 @@ <td class="red"> foreach ($this->_references as $key => $relation) { </td></tr> <tr><td>1138</td> -<td class="red"> if (!$relation instanceof Doctrine_Null) { +<td class="red"> if ( ! $relation instanceof Doctrine_Null) { </td></tr> <tr><td>1139</td> <td class="red"> $a[$key] = $relation->toArray($deep, $prefixKey); diff --git a/tests/coverage/Doctrine_Table.html b/tests/coverage/Doctrine_Table.html index ac0749b60..f1aea2a73 100644 --- a/tests/coverage/Doctrine_Table.html +++ b/tests/coverage/Doctrine_Table.html @@ -1882,7 +1882,7 @@ <td class="normal"> { </td></tr> <tr><td>625</td> -<td class="covered"> if (!empty($alias)) { +<td class="covered"> if ( ! empty($alias)) { </td></tr> <tr><td>626</td> <td class="red"> $alias = ' ' . trim($alias); @@ -3421,7 +3421,7 @@ <td class="normal"> </td></tr> <tr><td>1138</td> -<td class="covered"> if (!$this->_conn->getAttribute(Doctrine::ATTR_USE_NATIVE_ENUM) +<td class="covered"> if ( ! $this->_conn->getAttribute(Doctrine::ATTR_USE_NATIVE_ENUM) </td></tr> <tr><td>1139</td> <td class="red"> && isset($this->_columns[$field]['values'][$index]) diff --git a/vendor/PEAR.php b/vendor/PEAR.php index d2d41b274..d87e3d8fd 100644 --- a/vendor/PEAR.php +++ b/vendor/PEAR.php @@ -53,7 +53,7 @@ if (substr(PHP_OS, 0, 3) == 'WIN') { } // instant backwards compatibility -if (!defined('PATH_SEPARATOR')) { +if ( ! defined('PATH_SEPARATOR')) { if (OS_WINDOWS) { define('PATH_SEPARATOR', ';'); } else { @@ -181,7 +181,7 @@ class PEAR if (method_exists($this, $destructor)) { global $_PEAR_destructor_object_list; $_PEAR_destructor_object_list[] = &$this; - if (!isset($GLOBALS['_PEAR_SHUTDOWN_REGISTERED'])) { + if ( ! isset($GLOBALS['_PEAR_SHUTDOWN_REGISTERED'])) { register_shutdown_function("_PEAR_call_destructors"); $GLOBALS['_PEAR_SHUTDOWN_REGISTERED'] = true; } @@ -230,10 +230,10 @@ class PEAR function &getStaticProperty($class, $var) { static $properties; - if (!isset($properties[$class])) { + if ( ! isset($properties[$class])) { $properties[$class] = array(); } - if (!array_key_exists($var, $properties[$class])) { + if ( ! array_key_exists($var, $properties[$class])) { $properties[$class][$var] = null; } return $properties[$class][$var]; @@ -255,7 +255,7 @@ class PEAR { // if we are called statically, there is a potential // that no shutdown func is registered. Bug #6445 - if (!isset($GLOBALS['_PEAR_SHUTDOWN_REGISTERED'])) { + if ( ! isset($GLOBALS['_PEAR_SHUTDOWN_REGISTERED'])) { register_shutdown_function("_PEAR_call_destructors"); $GLOBALS['_PEAR_SHUTDOWN_REGISTERED'] = true; } @@ -468,7 +468,7 @@ class PEAR } } return $deleted ? true : PEAR::raiseError("The expected error you submitted does not exist"); // IMPROVE ME - } elseif (!empty($error_code)) { + } elseif ( ! empty($error_code)) { // $error_code comes alone, trying to unset it if ($this->_checkDelExpect($error_code)) { return true; @@ -740,7 +740,7 @@ class PEAR */ function loadExtension($ext) { - if (!extension_loaded($ext)) { + if ( ! extension_loaded($ext)) { // if either returns true dl() will produce a FATAL error, stop that if ((ini_get('enable_dl') != 1) || (ini_get('safe_mode') == 1)) { return false; @@ -864,7 +864,7 @@ class PEAR_Error $this->code = $code; $this->mode = $mode; $this->userinfo = $userinfo; - if (!PEAR::getStaticProperty('PEAR_Error', 'skiptrace')) { + if ( ! PEAR::getStaticProperty('PEAR_Error', 'skiptrace')) { $this->backtrace = debug_backtrace(); if (isset($this->backtrace[0]) && isset($this->backtrace[0]['object'])) { unset($this->backtrace[0]['object']); diff --git a/vendor/Sensei/Sensei.php b/vendor/Sensei/Sensei.php index e9828771d..8f472a043 100644 --- a/vendor/Sensei/Sensei.php +++ b/vendor/Sensei/Sensei.php @@ -36,6 +36,7 @@ final class Sensei { * @var string $path doctrine root directory */ private static $path; + /** * getPath * returns the doctrine root @@ -44,11 +45,12 @@ final class Sensei { */ public static function getPath() { - if (! self::$path) { + if ( ! self::$path) { self::$path = dirname(__FILE__); } return self::$path; } + /** * simple autoload function * returns true if the class was loaded, otherwise false @@ -91,7 +93,7 @@ final class Sensei { if (class_exists($className, false)) { return false; } - if (! self::$path) { + if ( ! self::$path) { self::$path = dirname(__FILE__); } $class = self::$path . DIRECTORY_SEPARATOR . str_replace('_', DIRECTORY_SEPARATOR, $className) . '.php'; @@ -105,6 +107,7 @@ final class Sensei { throw new Sensei_Exception('Class ' . $className . ' does not exist and could not ' . 'be loaded.'); } + /** * Create a new instance of a class. * diff --git a/vendor/Sensei/Sensei/Doc/Renderer/Pdf.php b/vendor/Sensei/Sensei/Doc/Renderer/Pdf.php index f1971cfa0..14ce6048f 100644 --- a/vendor/Sensei/Sensei/Doc/Renderer/Pdf.php +++ b/vendor/Sensei/Sensei/Doc/Renderer/Pdf.php @@ -58,7 +58,7 @@ class Sensei_Doc_Renderer_Pdf extends Sensei_Doc_Renderer throw new Sensei_Doc_Renderer_Exception($message); } } - + /** * Deletes temporary files generated during LaTeX to PDF conversion. */ diff --git a/vendor/Sensei/Sensei/Doc/Renderer/Xhtml.php b/vendor/Sensei/Sensei/Doc/Renderer/Xhtml.php index b767f7564..32a245b2d 100644 --- a/vendor/Sensei/Sensei/Doc/Renderer/Xhtml.php +++ b/vendor/Sensei/Sensei/Doc/Renderer/Xhtml.php @@ -52,7 +52,7 @@ class Sensei_Doc_Renderer_Xhtml extends Sensei_Doc_Renderer $this->_wiki->setRenderConf('xhtml', 'Doclink', 'url_callback', array(&$this, 'makeUrl')); } - + /** * Renders table of contents as nested unordered lists. * @@ -103,7 +103,7 @@ class Sensei_Doc_Renderer_Xhtml extends Sensei_Doc_Renderer return $output; } - + /** * Renders section defined by 'section' option. If 'section' option is not * set, renders all sections. @@ -138,7 +138,7 @@ class Sensei_Doc_Renderer_Xhtml extends Sensei_Doc_Renderer return $output; } - + /** * Renders a sections and its children * diff --git a/vendor/Sensei/Sensei/Doc/Section.php b/vendor/Sensei/Sensei/Doc/Section.php index b21d4fa65..ee6df0d9e 100644 --- a/vendor/Sensei/Sensei/Doc/Section.php +++ b/vendor/Sensei/Sensei/Doc/Section.php @@ -39,7 +39,7 @@ class Sensei_Doc_Section implements Countable * @var string */ private $_name; - + /** * The index of this section among the subsections of its parent. The index * ranges from 0 to the number of subsections the parent has minus one. @@ -47,28 +47,28 @@ class Sensei_Doc_Section implements Countable * @var int */ private $_index; - + /** * Array containing the subsections of this section. * * @var array */ private $_children = array(); - + /** * The parent of this section. * * @var Sensei_Doc_Section */ private $_parent; - + /** * Level of this section in section hierarchy. * * @var int */ private $_level = 0; - + /** * Text contents of this section. * @@ -93,7 +93,7 @@ class Sensei_Doc_Section implements Countable $this->_level = $this->_parent->_level + 1; } } - + /** * Adds a subsection to this section. * @@ -104,7 +104,7 @@ class Sensei_Doc_Section implements Countable $child->_index = count($this); $this->_children[] = $child; } - + /** * Returns the index of this section. * @@ -119,7 +119,7 @@ class Sensei_Doc_Section implements Countable return ($this->_index + 1); } } - + /** * Returns the path of this section. * @@ -134,7 +134,7 @@ class Sensei_Doc_Section implements Countable return self::convertNameToPath($this->_name); } } - + /** * Returns the name of this section. * @@ -150,7 +150,7 @@ class Sensei_Doc_Section implements Countable return $this->_name; } } - + /** * Returns how many subsections this section has. * @@ -160,7 +160,7 @@ class Sensei_Doc_Section implements Countable { return count($this->_children); } - + /** * Returns the subsection that has the given index. * @@ -174,7 +174,7 @@ class Sensei_Doc_Section implements Countable { return $this->_children[$index]; } - + /** * Returns the parent of this section. * @@ -188,7 +188,7 @@ class Sensei_Doc_Section implements Countable return $this->_parent; } } - + /** * Returns the next section. * @@ -217,12 +217,12 @@ class Sensei_Doc_Section implements Countable } else { - if ((!$maxLevel || ($this->_level < $maxLevel)) + if (( ! $maxLevel || ($this->_level < $maxLevel)) && (count($this) > 0)) { return $this->getChild(0); } - if ((!$maxLevel || ($this->_level <= $maxLevel) ) + if (( ! $maxLevel || ($this->_level <= $maxLevel) ) && ($this->_index < count($this->_parent) - 1)) { return $this->_parent->getChild($this->_index + 1); } @@ -231,7 +231,7 @@ class Sensei_Doc_Section implements Countable } } - + /** * Returns the previous section. * @@ -254,7 +254,7 @@ class Sensei_Doc_Section implements Countable return $previousSibling->findLastChild($maxLevel); } } - + /** * Finds the last child or grand child of this section. * @@ -267,13 +267,13 @@ class Sensei_Doc_Section implements Countable */ public function findLastChild($maxLevel = 0) { - if ((!$maxLevel || $this->_level < $maxLevel) && count($this) > 0) { + if (( ! $maxLevel || $this->_level < $maxLevel) && count($this) > 0) { return $this->getChild(count($this) - 1)->findLastChild(); } else { return $this; } } - + /** * Returns true, if this section is the root section. * @@ -283,7 +283,7 @@ class Sensei_Doc_Section implements Countable { return $this->_parent === null; } - + /** * Returns the level of this section in section hierarchy. * @@ -293,7 +293,7 @@ class Sensei_Doc_Section implements Countable { return $this->_level; } - + /** * Returns the text contents of this section. * @@ -325,7 +325,7 @@ class Sensei_Doc_Section implements Countable // The current section did not have any text in this file. // Let's assume that the text is defined in another file. - if (!$current->isRoot() && $current->_text === '') { + if ( ! $current->isRoot() && $current->_text === '') { $otherFilename = $current->getPath(false, DIRECTORY_SEPARATOR) . '.txt'; @@ -370,7 +370,7 @@ class Sensei_Doc_Section implements Countable // The last section did not have any text in this file. // Let's assume that the text is defined in another file. - if (!$current->isRoot() && $current->_text === '') { + if ( ! $current->isRoot() && $current->_text === '') { $otherFilename = $current->getPath(false, DIRECTORY_SEPARATOR) . '.txt'; diff --git a/vendor/Sensei/Sensei/Doc/Toc.php b/vendor/Sensei/Sensei/Doc/Toc.php index 5537491e4..1bb32b61f 100644 --- a/vendor/Sensei/Sensei/Doc/Toc.php +++ b/vendor/Sensei/Sensei/Doc/Toc.php @@ -52,7 +52,7 @@ class Sensei_Doc_Toc implements Countable $this->_toc = new Sensei_Doc_Section(); $this->_toc->parse(dirname($filename), basename($filename)); } - + /** * Finds the section that matches the given path. * @@ -108,7 +108,7 @@ class Sensei_Doc_Toc implements Countable return $currentSection; } - + /** * Returns a root section with the given index. * @@ -119,7 +119,7 @@ class Sensei_Doc_Toc implements Countable { return $this->_toc->getChild($index); } - + /** * Returns the number of sections (excluding their subsections). * diff --git a/vendor/Text/Wiki.php b/vendor/Text/Wiki.php index f82ea47b6..f9d3af623 100644 --- a/vendor/Text/Wiki.php +++ b/vendor/Text/Wiki.php @@ -444,7 +444,7 @@ class Text_Wiki { function &singleton($parser = 'Default', $rules = null) { static $only = array(); - if (!isset($only[$parser])) { + if ( ! isset($only[$parser])) { $ret = & Text_Wiki::factory($parser, $rules); if (Text_Wiki::isError($ret)) { return $ret; @@ -469,9 +469,9 @@ class Text_Wiki { { $class = 'Text_Wiki_' . $parser; $file = str_replace('_', '/', $class).'.php'; - if (!class_exists($class)) { + if ( ! class_exists($class)) { require_once $file; - if (!class_exists($class)) { + if ( ! class_exists($class)) { return Text_Wiki::error( 'Class ' . $class . ' does not exist after requiring '. $file . ', install package ' . $class . "\n"); @@ -503,7 +503,7 @@ class Text_Wiki { { $rule = ucwords(strtolower($rule)); - if (! isset($this->parseConf[$rule])) { + if ( ! isset($this->parseConf[$rule])) { $this->parseConf[$rule] = array(); } @@ -539,7 +539,7 @@ class Text_Wiki { $rule = ucwords(strtolower($rule)); // the rule does not exist - if (! isset($this->parseConf[$rule])) { + if ( ! isset($this->parseConf[$rule])) { return null; } @@ -583,11 +583,11 @@ class Text_Wiki { $format = ucwords(strtolower($format)); $rule = ucwords(strtolower($rule)); - if (! isset($this->renderConf[$format])) { + if ( ! isset($this->renderConf[$format])) { $this->renderConf[$format] = array(); } - if (! isset($this->renderConf[$format][$rule])) { + if ( ! isset($this->renderConf[$format][$rule])) { $this->renderConf[$format][$rule] = array(); } @@ -625,7 +625,7 @@ class Text_Wiki { $format = ucwords(strtolower($format)); $rule = ucwords(strtolower($rule)); - if (! isset($this->renderConf[$format]) || + if ( ! isset($this->renderConf[$format]) || ! isset($this->renderConf[$format][$rule])) { return null; } @@ -664,7 +664,7 @@ class Text_Wiki { function setFormatConf($format, $arg1, $arg2 = null) { - if (! is_array($this->formatConf[$format])) { + if ( ! is_array($this->formatConf[$format])) { $this->formatConf[$format] = array(); } @@ -699,7 +699,7 @@ class Text_Wiki { function getFormatConf($format, $key = null) { // the format does not exist - if (! isset($this->formatConf[$format])) { + if ( ! isset($this->formatConf[$format])) { return null; } @@ -739,7 +739,7 @@ class Text_Wiki { function insertRule($name, $tgt = null) { $name = ucwords(strtolower($name)); - if (! is_null($tgt)) { + if ( ! is_null($tgt)) { $tgt = ucwords(strtolower($tgt)); } @@ -752,7 +752,7 @@ class Text_Wiki { // the target name is not null, and not '', but does not exist // in the list of rules. this means we're trying to insert after // a target key, but the target key isn't there. - if (! is_null($tgt) && $tgt != '' && + if ( ! is_null($tgt) && $tgt != '' && ! in_array($tgt, $this->rules)) { return false; } @@ -946,7 +946,7 @@ class Text_Wiki { // text. foreach ($this->rules as $name) { // do not parse the rules listed in $disable - if (! in_array($name, $this->disable)) { + if ( ! in_array($name, $this->disable)) { // load the parsing object $this->loadParseObj($name); @@ -1227,7 +1227,7 @@ class Text_Wiki { // multiple times with the same Text_Wiki object, the ID number // will not reset to zero. static $id; - if (! isset($id)) { + if ( ! isset($id)) { $id = 0; } else { $id ++; @@ -1241,7 +1241,7 @@ class Text_Wiki { 0 => $rule, 1 => $options ); - if (!isset($this->_countRulesTokens[$rule])) { + if ( ! isset($this->_countRulesTokens[$rule])) { $this->_countRulesTokens[$rule] = 1; } else { ++$this->_countRulesTokens[$rule]; @@ -1287,10 +1287,10 @@ class Text_Wiki { 1 => $options ); if ($rule != $oldRule) { - if (!($this->_countRulesTokens[$oldRule]--)) { + if ( ! ($this->_countRulesTokens[$oldRule]--)) { unset($this->_countRulesTokens[$oldRule]); } - if (!isset($this->_countRulesTokens[$rule])) { + if ( ! isset($this->_countRulesTokens[$rule])) { $this->_countRulesTokens[$rule] = 1; } else { ++$this->_countRulesTokens[$rule]; @@ -1315,7 +1315,7 @@ class Text_Wiki { $file = $rule . '.php'; $class = "Text_Wiki_Parse_$rule"; - if (! class_exists($class)) { + if ( ! class_exists($class)) { $loc = $this->findFile('parse', $file); if ($loc) { // found the class @@ -1352,7 +1352,7 @@ class Text_Wiki { $file = "$format/$rule.php"; $class = "Text_Wiki_Render_$format" . "_$rule"; - if (! class_exists($class)) { + if ( ! class_exists($class)) { // load the class $loc = $this->findFile('render', $file); if ($loc) { @@ -1386,7 +1386,7 @@ class Text_Wiki { $file = $format . '.php'; $class = "Text_Wiki_Render_$format"; - if (! class_exists($class)) { + if ( ! class_exists($class)) { $loc = $this->findFile('render', $file); if ($loc) { // found the class @@ -1420,7 +1420,7 @@ class Text_Wiki { function addPath($type, $dir) { $dir = $this->fixPath($dir); - if (! isset($this->path[$type])) { + if ( ! isset($this->path[$type])) { $this->path[$type] = array($dir); } else { array_unshift($this->path[$type], $dir); @@ -1445,7 +1445,7 @@ class Text_Wiki { { if (is_null($type)) { return $this->path; - } elseif (! isset($this->path[$type])) { + } elseif ( ! isset($this->path[$type])) { return array(); } else { return $this->path[$type]; @@ -1501,7 +1501,7 @@ class Text_Wiki { { $len = strlen($this->_dirSep); - if (! empty($path) && + if ( ! empty($path) && substr($path, -1 * $len, $len) != $this->_dirSep) { return $path . $this->_dirSep; } else { @@ -1524,7 +1524,7 @@ class Text_Wiki { function &error($message) { - if (! class_exists('PEAR_Error')) { + if ( ! class_exists('PEAR_Error')) { include_once 'PEAR.php'; } return PEAR::throwError($message); diff --git a/vendor/Text/Wiki/Parse/Default/Center.php b/vendor/Text/Wiki/Parse/Default/Center.php index b3c0a2d87..43bed1809 100644 --- a/vendor/Text/Wiki/Parse/Default/Center.php +++ b/vendor/Text/Wiki/Parse/Default/Center.php @@ -46,7 +46,7 @@ class Text_Wiki_Parse_Center extends Text_Wiki_Parse { */ var $regex = '/\n\= (.*?)\n/'; - + /** * * Generates a token entry for the matched text. diff --git a/vendor/Text/Wiki/Parse/Default/Code.php b/vendor/Text/Wiki/Parse/Default/Code.php index cf60656a3..0140e6ff8 100644 --- a/vendor/Text/Wiki/Parse/Default/Code.php +++ b/vendor/Text/Wiki/Parse/Default/Code.php @@ -51,7 +51,7 @@ class Text_Wiki_Parse_Code extends Text_Wiki_Parse { /* var $regex = '/^(\<code( .+)?\>)\n(.+)\n(\<\/code\>)(\s|$)/Umsi';*/ var $regex = ';^<code(\s[^>]*)?>((?:(?R)|.*?)*)\n</code>(\s|$);msi'; - + /** * * Generates a token entry for the matched text. Token options are: @@ -82,7 +82,7 @@ class Text_Wiki_Parse_Code extends Text_Wiki_Parse { $attr = $this->getAttrs($args); // ... and make sure we have a 'type' - if (! isset($attr['type'])) { + if ( ! isset($attr['type'])) { $attr['type'] = ''; } diff --git a/vendor/Text/Wiki/Parse/Default/Freelink.php b/vendor/Text/Wiki/Parse/Default/Freelink.php index f73aadf12..8f8931b41 100644 --- a/vendor/Text/Wiki/Parse/Default/Freelink.php +++ b/vendor/Text/Wiki/Parse/Default/Freelink.php @@ -44,7 +44,7 @@ class Text_Wiki_Parse_Freelink extends Text_Wiki_Parse { var $conf = array ( 'utf-8' => false ); - + /** * * Constructor. We override the Text_Wiki_Parse constructor so we can diff --git a/vendor/Text/Wiki/Parse/Default/Heading.php b/vendor/Text/Wiki/Parse/Default/Heading.php index ae0f1fd28..54629ab77 100644 --- a/vendor/Text/Wiki/Parse/Default/Heading.php +++ b/vendor/Text/Wiki/Parse/Default/Heading.php @@ -55,7 +55,7 @@ class Text_Wiki_Parse_Heading extends Text_Wiki_Parse { var $conf = array( 'id_prefix' => 'toc' ); - + /** * * Generates a replacement for the matched text. Token options are: @@ -77,7 +77,7 @@ class Text_Wiki_Parse_Heading extends Text_Wiki_Parse { // keep a running count for header IDs. we use this later // when constructing TOC entries, etc. static $id; - if (! isset($id)) { + if ( ! isset($id)) { $id = 0; } diff --git a/vendor/Text/Wiki/Parse/Default/Image.php b/vendor/Text/Wiki/Parse/Default/Image.php index fe9364a78..6642b84d6 100644 --- a/vendor/Text/Wiki/Parse/Default/Image.php +++ b/vendor/Text/Wiki/Parse/Default/Image.php @@ -121,7 +121,7 @@ class Text_Wiki_Parse_Image extends Text_Wiki_Parse { if (array_key_exists('link', $options['attr'])) { // external url ? if (($pos = strpos($options['attr']['link'], '://')) !== false) { - if (!preg_match($this->url, $options['attr']['link'])) { + if ( ! preg_match($this->url, $options['attr']['link'])) { return $matches[0]; } } elseif (in_array('Wikilink', $this->wiki->disable)) { diff --git a/vendor/Text/Wiki/Parse/Default/List.php b/vendor/Text/Wiki/Parse/Default/List.php index f6532dbb2..dc4300fb9 100644 --- a/vendor/Text/Wiki/Parse/Default/List.php +++ b/vendor/Text/Wiki/Parse/Default/List.php @@ -186,7 +186,7 @@ class Text_Wiki_Parse_List extends Text_Wiki_Parse { // add to the item count for this list (taking into account // which level we are at). - if (! isset($itemcount[$level])) { + if ( ! isset($itemcount[$level])) { // first count $itemcount[$level] = 0; } else { @@ -195,7 +195,7 @@ class Text_Wiki_Parse_List extends Text_Wiki_Parse { } // is this the very first item in the list? - if (! $pastFirst) { + if ( ! $pastFirst) { $first = true; $pastFirst = true; } else { diff --git a/vendor/Text/Wiki/Parse/Default/Wikilink.php b/vendor/Text/Wiki/Parse/Default/Wikilink.php index 3d6c1156e..b2e4d0408 100644 --- a/vendor/Text/Wiki/Parse/Default/Wikilink.php +++ b/vendor/Text/Wiki/Parse/Default/Wikilink.php @@ -87,7 +87,7 @@ class Text_Wiki_Parse_Wikilink extends Text_Wiki_Parse { // build the regular expression for finding WikiPage names. $this->regex = - "(!?" . // START WikiPage pattern (1) + "( ! ?" . // START WikiPage pattern (1) "[$upper]" . // 1 upper "[$either]*" . // 0+ alpha or digit "[$lower]+" . // 1+ lower or digit diff --git a/vendor/Text/Wiki/Render/Latex/Blockquote.php b/vendor/Text/Wiki/Render/Latex/Blockquote.php index 98106228d..5e5a784e5 100644 --- a/vendor/Text/Wiki/Render/Latex/Blockquote.php +++ b/vendor/Text/Wiki/Render/Latex/Blockquote.php @@ -3,7 +3,7 @@ class Text_Wiki_Render_Latex_Blockquote extends Text_Wiki_Render { var $conf = array('css' => null); - + /** * * Renders a token into text matching the requested format. diff --git a/vendor/Text/Wiki/Render/Latex/Colortext.php b/vendor/Text/Wiki/Render/Latex/Colortext.php index 86ff095ac..866bf35ef 100644 --- a/vendor/Text/Wiki/Render/Latex/Colortext.php +++ b/vendor/Text/Wiki/Render/Latex/Colortext.php @@ -42,7 +42,7 @@ class Text_Wiki_Render_Latex_Colortext extends Text_Wiki_Render { $type = $options['type']; $color = $options['color']; - if (! in_array($color, $this->colors)) { + if ( ! in_array($color, $this->colors)) { $color = '#' . $color; } diff --git a/vendor/Text/Wiki/Render/Latex/Font.php b/vendor/Text/Wiki/Render/Latex/Font.php index 0a85da2a8..81a5f9765 100644 --- a/vendor/Text/Wiki/Render/Latex/Font.php +++ b/vendor/Text/Wiki/Render/Latex/Font.php @@ -45,7 +45,7 @@ class Text_Wiki_Render_Latex_Font extends Text_Wiki_Render { 'LARGE' => 19, 'huge' => 22, 'Huge' => 9999); - + /** * Renders a token into text matching the requested format. * process the font size option diff --git a/vendor/Text/Wiki/Render/Latex/Image.php b/vendor/Text/Wiki/Render/Latex/Image.php index e6c084bcc..f141074ac 100644 --- a/vendor/Text/Wiki/Render/Latex/Image.php +++ b/vendor/Text/Wiki/Render/Latex/Image.php @@ -56,7 +56,7 @@ class Text_Wiki_Render_Latex_Image extends Text_Wiki_Render { } // always add an "alt" attribute per Stephane Solliec - if (! $alt) { + if ( ! $alt) { $attr .= ' alt="' . basename($options['src']) . '"'; } diff --git a/vendor/Text/Wiki/Render/Latex/Phplookup.php b/vendor/Text/Wiki/Render/Latex/Phplookup.php index 8c75604df..b8042d600 100644 --- a/vendor/Text/Wiki/Render/Latex/Phplookup.php +++ b/vendor/Text/Wiki/Render/Latex/Phplookup.php @@ -3,7 +3,7 @@ class Text_Wiki_Render_Latex_Phplookup extends Text_Wiki_Render { var $conf = array('target' => '_blank'); - + /** * * Renders a token into text matching the requested format. diff --git a/vendor/Text/Wiki/Render/Plain/Phplookup.php b/vendor/Text/Wiki/Render/Plain/Phplookup.php index a4268d169..08c432c70 100644 --- a/vendor/Text/Wiki/Render/Plain/Phplookup.php +++ b/vendor/Text/Wiki/Render/Plain/Phplookup.php @@ -3,7 +3,7 @@ class Text_Wiki_Render_Plain_Phplookup extends Text_Wiki_Render { var $conf = array('target' => '_blank'); - + /** * * Renders a token into text matching the requested format. diff --git a/vendor/Text/Wiki/Render/Xhtml/Colortext.php b/vendor/Text/Wiki/Render/Xhtml/Colortext.php index ba54fd7fb..0817cbe13 100644 --- a/vendor/Text/Wiki/Render/Xhtml/Colortext.php +++ b/vendor/Text/Wiki/Render/Xhtml/Colortext.php @@ -63,7 +63,7 @@ class Text_Wiki_Render_Xhtml_Colortext extends Text_Wiki_Render { $type = $options['type']; $color = $options['color']; - if (! in_array($color, $this->colors) && $color{0} != '#') { + if ( ! in_array($color, $this->colors) && $color{0} != '#') { $color = '#' . $color; } diff --git a/vendor/Text/Wiki/Render/Xhtml/Image.php b/vendor/Text/Wiki/Render/Xhtml/Image.php index 5f3ac8cf7..3ead33c80 100644 --- a/vendor/Text/Wiki/Render/Xhtml/Image.php +++ b/vendor/Text/Wiki/Render/Xhtml/Image.php @@ -85,7 +85,7 @@ class Text_Wiki_Render_Xhtml_Image extends Text_Wiki_Render { // use CSS for all alignment if (isset($options['attr']['align'])) { // make sure we have a style attribute - if (!isset($options['attr']['style'])) { + if ( ! isset($options['attr']['style'])) { // no style, set up a blank one $options['attr']['style'] = ''; } else { @@ -109,7 +109,7 @@ class Text_Wiki_Render_Xhtml_Image extends Text_Wiki_Render { // stephane@metacites.net -- 25/07/2004 // try to guess width and height - if (! isset($options['attr']['width']) && + if ( ! isset($options['attr']['width']) && ! isset($options['attr']['height'])) { // does the source refer to a local file or a URL? @@ -162,7 +162,7 @@ class Text_Wiki_Render_Xhtml_Image extends Text_Wiki_Render { } // always add an "alt" attribute per Stephane Solliec - if (! $alt) { + if ( ! $alt) { $alt = $this->textEncode(basename($options['src'])); $output .= " alt=\"$alt\""; } diff --git a/vendor/Text/Wiki/Render/Xhtml/Url.php b/vendor/Text/Wiki/Render/Xhtml/Url.php index ccae3f2fa..41041ced7 100644 --- a/vendor/Text/Wiki/Render/Xhtml/Url.php +++ b/vendor/Text/Wiki/Render/Xhtml/Url.php @@ -66,7 +66,7 @@ class Text_Wiki_Render_Xhtml_Url extends Text_Wiki_Render { in_array($ext, $this->getConf('img_ext', array()))) { // create alt text for the image - if (! isset($text) || $text == '') { + if ( ! isset($text) || $text == '') { $text = basename($href); $text = $this->textEncode($text); } diff --git a/vendor/Text/Wiki/Render/Xhtml/Wikilink.php b/vendor/Text/Wiki/Render/Xhtml/Wikilink.php index ef3073b37..b706d0d84 100644 --- a/vendor/Text/Wiki/Render/Xhtml/Wikilink.php +++ b/vendor/Text/Wiki/Render/Xhtml/Wikilink.php @@ -114,7 +114,7 @@ class Text_Wiki_Render_Xhtml_Wikilink extends Text_Wiki_Render { $href = $this->getConf('new_url', null); // set the proper HREF - if (! $href || trim($href) == '') { + if ( ! $href || trim($href) == '') { // no useful href, return the text as it is //TODO: This is no longer used, need to look closer into this branch @@ -141,7 +141,7 @@ class Text_Wiki_Render_Xhtml_Wikilink extends Text_Wiki_Render { // what kind of linking are we doing? $pos = $this->getConf('new_text_pos'); - if (! $pos || ! $new) { + if ( ! $pos || ! $new) { // no position (or no new_text), use css only on the page name $start = '<a'.$css.' href="'.$this->textEncode($href).'">'; @@ -156,7 +156,7 @@ class Text_Wiki_Render_Xhtml_Wikilink extends Text_Wiki_Render { $end = '<a'.$css.' href="'.$this->textEncode($href).'">'.$this->textEncode($new).'</a>'; } } - if (!strlen($text)) { + if ( ! strlen($text)) { $start .= $this->textEncode($page); } if (isset($type)) { diff --git a/vendor/spikephpcoverage/CoverageRecorder.php b/vendor/spikephpcoverage/CoverageRecorder.php index 0e93ed863..4eab01664 100644 --- a/vendor/spikephpcoverage/CoverageRecorder.php +++ b/vendor/spikephpcoverage/CoverageRecorder.php @@ -9,7 +9,7 @@ ?> <?php - if(!defined("__PHPCOVERAGE_HOME")) { + if( ! defined("__PHPCOVERAGE_HOME")) { define("__PHPCOVERAGE_HOME", dirname(__FILE__)); } require_once __PHPCOVERAGE_HOME . "/conf/phpcoverage.conf.php"; @@ -168,7 +168,7 @@ */ protected function removeAbsentPaths(&$dirs) { for($i = 0; $i < count($dirs); $i++) { - if(! file_exists($dirs[$i])) { + if( ! file_exists($dirs[$i])) { // echo "Not found: " . $dirs[$i] . "\n"; $this->errors[] = "Not found: " . $dirs[$i] . ". Removing ..."; @@ -211,7 +211,7 @@ $dirs[] = $dir; while(count($dirs) > 0) { $currDir = realpath(array_pop($dirs)); - if(!is_readable($currDir)) { + if( ! is_readable($currDir)) { continue; } //echo "Current Dir: $currDir \n"; @@ -271,7 +271,7 @@ continue; } } - if(!array_key_exists($files[$i], $this->coverageData)) { + if( ! array_key_exists($files[$i], $this->coverageData)) { $this->coverageData[$files[$i]] = array(); } } diff --git a/vendor/spikephpcoverage/PEAR.php b/vendor/spikephpcoverage/PEAR.php index 865b8a155..1626126e1 100644 --- a/vendor/spikephpcoverage/PEAR.php +++ b/vendor/spikephpcoverage/PEAR.php @@ -45,7 +45,7 @@ if (substr(PHP_OS, 0, 3) == 'WIN') { } // instant backwards compatibility -if (!defined('PATH_SEPARATOR')) { +if ( ! defined('PATH_SEPARATOR')) { if (OS_WINDOWS) { define('PATH_SEPARATOR', ';'); } else { @@ -164,7 +164,7 @@ class PEAR if (method_exists($this, $destructor)) { global $_PEAR_destructor_object_list; $_PEAR_destructor_object_list[] = &$this; - if (!isset($GLOBALS['_PEAR_SHUTDOWN_REGISTERED'])) { + if ( ! isset($GLOBALS['_PEAR_SHUTDOWN_REGISTERED'])) { register_shutdown_function("_PEAR_call_destructors"); $GLOBALS['_PEAR_SHUTDOWN_REGISTERED'] = true; } @@ -439,7 +439,7 @@ class PEAR } } return $deleted ? true : PEAR::raiseError("The expected error you submitted does not exist"); // IMPROVE ME - } elseif (!empty($error_code)) { + } elseif ( ! empty($error_code)) { // $error_code comes alone, trying to unset it if ($this->_checkDelExpect($error_code)) { return true; @@ -707,7 +707,7 @@ class PEAR */ function loadExtension($ext) { - if (!extension_loaded($ext)) { + if ( ! extension_loaded($ext)) { // if either returns true dl() will produce a FATAL error, stop that if ((ini_get('enable_dl') != 1) || (ini_get('safe_mode') == 1)) { return false; diff --git a/vendor/spikephpcoverage/XML/Parser.php b/vendor/spikephpcoverage/XML/Parser.php index 4173fbce4..79fd7a405 100644 --- a/vendor/spikephpcoverage/XML/Parser.php +++ b/vendor/spikephpcoverage/XML/Parser.php @@ -268,11 +268,11 @@ class XML_Parser extends PEAR */ function _initHandlers() { - if (!is_resource($this->parser)) { + if ( ! is_resource($this->parser)) { return false; } - if (!is_object($this->_handlerObj)) { + if ( ! is_object($this->_handlerObj)) { $this->_handlerObj = &$this; } switch ($this->mode) { @@ -328,7 +328,7 @@ class XML_Parser extends PEAR } if (is_resource($xp)) { if ($this->tgtenc !== null) { - if (!@xml_parser_set_option($xp, XML_OPTION_TARGET_ENCODING, + if ( ! @xml_parser_set_option($xp, XML_OPTION_TARGET_ENCODING, $this->tgtenc)) { return $this->raiseError('invalid target encoding', XML_PARSER_ERROR_INVALID_ENCODING); } @@ -341,7 +341,7 @@ class XML_Parser extends PEAR xml_parser_set_option($xp, XML_OPTION_CASE_FOLDING, $this->folding); return true; } - if (!in_array(strtoupper($this->srcenc), $this->_validEncodings)) { + if ( ! in_array(strtoupper($this->srcenc), $this->_validEncodings)) { return $this->raiseError('invalid source encoding', XML_PARSER_ERROR_INVALID_ENCODING); } return $this->raiseError('Unable to create XML parser resource.', XML_PARSER_ERROR_NO_RESOURCE); @@ -386,7 +386,7 @@ class XML_Parser extends PEAR * check, if file is a remote file */ if (eregi('^(http|ftp)://', substr($file, 0, 10))) { - if (!ini_get('allow_url_fopen')) { + if ( ! ini_get('allow_url_fopen')) { return $this->raiseError('Remote files cannot be parsed, as safe mode is enabled.', XML_PARSER_ERROR_REMOTE); } } @@ -476,7 +476,7 @@ class XML_Parser extends PEAR if (is_resource($this->fp)) { while ($data = fread($this->fp, 4096)) { - if (!$this->_parseString($data, feof($this->fp))) { + if ( ! $this->_parseString($data, feof($this->fp))) { $error = &$this->raiseError(); $this->free(); return $error; @@ -484,7 +484,7 @@ class XML_Parser extends PEAR } // otherwise, $this->fp must be a string } else { - if (!$this->_parseString($this->fp, true)) { + if ( ! $this->_parseString($this->fp, true)) { $error = &$this->raiseError(); $this->free(); return $error; @@ -525,11 +525,11 @@ class XML_Parser extends PEAR */ function parseString($data, $eof = false) { - if (!isset($this->parser) || !is_resource($this->parser)) { + if ( ! isset($this->parser) || !is_resource($this->parser)) { $this->reset(); } - if (!$this->_parseString($data, $eof)) { + if ( ! $this->_parseString($data, $eof)) { $error = &$this->raiseError(); $this->free(); return $error; diff --git a/vendor/spikephpcoverage/XML/Parser/Simple.php b/vendor/spikephpcoverage/XML/Parser/Simple.php index aa60ec95c..2476c5a0c 100644 --- a/vendor/spikephpcoverage/XML/Parser/Simple.php +++ b/vendor/spikephpcoverage/XML/Parser/Simple.php @@ -114,7 +114,7 @@ class XML_Parser_Simple extends XML_Parser 'notation_decl_handler' => 'notationHandler', 'external_entity_ref_handler' => 'entityrefHandler' ); - + /** * Creates an XML parser. * @@ -140,7 +140,7 @@ class XML_Parser_Simple extends XML_Parser */ function _initHandlers() { - if (!is_object($this->_handlerObj)) { + if ( ! is_object($this->_handlerObj)) { $this->_handlerObj = &$this; } diff --git a/vendor/spikephpcoverage/cli/driver.php b/vendor/spikephpcoverage/cli/driver.php index 2339c4b25..52c5d22ef 100644 --- a/vendor/spikephpcoverage/cli/driver.php +++ b/vendor/spikephpcoverage/cli/driver.php @@ -18,7 +18,7 @@ * * Originally contributed by Ed Espino <eespino@spikesource.com> */ - if(!defined("__PHPCOVERAGE_HOME")) { + if( ! defined("__PHPCOVERAGE_HOME")) { define("__PHPCOVERAGE_HOME", dirname(dirname(__FILE__))); } require_once __PHPCOVERAGE_HOME . "/conf/phpcoverage.conf.php"; @@ -148,30 +148,30 @@ $includePaths = array(); $excludePaths = array(); - if (!$OPTION['cov-url']){ - if(!$OPTION['report'] && !$OPTION['cov-data-files']) { + if ( ! $OPTION['cov-url']){ + if( ! $OPTION['report'] && !$OPTION['cov-data-files']) { echo "ERROR: No --cov-url option specified.\n"; exit(1); } } if($OPTION['init']) { - if(!$OPTION['tmp-dir']) { + if( ! $OPTION['tmp-dir']) { $OPTION['tmp-dir'] = $util->getTmpDir(); } - if(!$OPTION['cov-file-name']) { + if( ! $OPTION['cov-file-name']) { $OPTION['cov-file-name'] = "phpcoverage.data.xml"; } } if($OPTION['report']) { - if (!$OPTION['report-name']){ + if ( ! $OPTION['report-name']){ echo "ERROR: No --report-name option specified.\n"; exit(1); } - if(!$OPTION['report-dir']) { - if(!empty($PHPCOVERAGE_REPORT_DIR)) { + if( ! $OPTION['report-dir']) { + if( ! empty($PHPCOVERAGE_REPORT_DIR)) { $OPTION["report-dir"] = $PHPCOVERAGE_REPORT_DIR; } else { @@ -225,7 +225,7 @@ if($OPTION['cov-data-files']) { $OPTION['cov-data-fileset'] = explode(",", $OPTION['cov-data-files']); foreach($OPTION['cov-data-fileset'] as $covDataFile) { - if(!is_readable($covDataFile)) { + if( ! is_readable($covDataFile)) { echo "Error: Cannot read cov-data-file: " . $covDataFile . "\n"; exit(1); } diff --git a/vendor/spikephpcoverage/cli/instrument.php b/vendor/spikephpcoverage/cli/instrument.php index da3b6693e..f29689e73 100644 --- a/vendor/spikephpcoverage/cli/instrument.php +++ b/vendor/spikephpcoverage/cli/instrument.php @@ -10,7 +10,7 @@ <?php #!/bin/php - if(!defined("__PHPCOVERAGE_HOME")) { + if( ! defined("__PHPCOVERAGE_HOME")) { define("__PHPCOVERAGE_HOME", dirname(dirname(__FILE__))); } require_once __PHPCOVERAGE_HOME . "/conf/phpcoverage.conf.php"; @@ -81,7 +81,7 @@ } $fp = fopen($tmpfile, "w"); - if(!$fp) { + if( ! $fp) { error("Cannot write to file: $tmpfile"); } fputs($fp, $top); @@ -93,7 +93,7 @@ unlink($file); } $ret = rename($tmpfile, $file); - if(!$ret) { + if( ! $ret) { error("Cannot save file: $file"); } writeMsg("Instrumented: $file."); @@ -118,13 +118,13 @@ $fr = fopen($file, "r"); $fw = fopen($tmpfile, "w"); - if(!$fr) { + if( ! $fr) { error("Cannot read file: $file"); } - if(!$fr) { + if( ! $fr) { error("Cannot write to file: $tmpfile"); } - while(!feof($fr)) { + while( ! feof($fr)) { $line = fgets($fr); if(strpos($line, $top) === false && strpos($line, $bottom) === false) { fputs($fw, $line); @@ -138,7 +138,7 @@ unlink($file); } $ret = rename($tmpfile, $file); - if(!$ret) { + if( ! $ret) { error("Cannot save file: $file"); } writeMsg("Uninstrumented: $file"); @@ -158,7 +158,7 @@ $dirs[] = $dir; while(count($dirs) > 0) { $currDir = realpath(array_pop($dirs)); - if(!is_readable($currDir)) { + if( ! is_readable($currDir)) { continue; } $currFiles = scandir($currDir); @@ -236,7 +236,7 @@ } - if(!is_dir($LOCAL_PHPCOVERAGE_LOCATION)) { + if( ! is_dir($LOCAL_PHPCOVERAGE_LOCATION)) { error("LOCAL_PHPCOVERAGE_LOCATION [$LOCAL_PHPCOVERAGE_LOCATION] not found."); } if(empty($PHPCOVERAGE_HOME) || !is_dir($PHPCOVERAGE_HOME)) { @@ -251,14 +251,14 @@ unlink($LOCAL_PHPCOVERAGE_LOCATION . $top_file); } $ret = copy($PHPCOVERAGE_HOME . $top_file, $LOCAL_PHPCOVERAGE_LOCATION . $top_file); - if(!$ret) { + if( ! $ret) { error("Cannot copy to $LOCAL_PHPCOVERAGE_LOCATION"); } if(file_exists($LOCAL_PHPCOVERAGE_LOCATION . $bottom_file)) { unlink($LOCAL_PHPCOVERAGE_LOCATION . $bottom_file); } $ret = copy($PHPCOVERAGE_HOME . $bottom_file, $LOCAL_PHPCOVERAGE_LOCATION . $bottom_file); - if(!$ret) { + if( ! $ret) { error("Cannot copy to $LOCAL_PHPCOVERAGE_LOCATION"); } $top="<?php require_once \"" . $LOCAL_PHPCOVERAGE_LOCATION . $top_file ."\"; ?>\n"; @@ -267,12 +267,12 @@ if(empty($paths)) { $paths[] = getcwd(); } - if(!isset($EXCLUDE_FILES) || empty($EXCLUDE_FILES)) { + if( ! isset($EXCLUDE_FILES) || empty($EXCLUDE_FILES)) { $EXCLUDE_FILES = array(); } for($i = 0; $i < count($EXCLUDE_FILES); $i++) { // Remove a file from the array if it does not exist - if(!file_exists($EXCLUDE_FILES[$i])) { + if( ! file_exists($EXCLUDE_FILES[$i])) { array_splice($EXCLUDE_FILES, $i, 1); $i --; continue; diff --git a/vendor/spikephpcoverage/parser/BasicXmlParser.php b/vendor/spikephpcoverage/parser/BasicXmlParser.php index 1e546c931..4585dfc83 100644 --- a/vendor/spikephpcoverage/parser/BasicXmlParser.php +++ b/vendor/spikephpcoverage/parser/BasicXmlParser.php @@ -11,7 +11,7 @@ require_once("XML/Parser.php"); - if(!defined("ATTRIBUTES")) { + if( ! defined("ATTRIBUTES")) { define("ATTRIBUTES", "__ATTRIBUTES__"); } diff --git a/vendor/spikephpcoverage/parser/CoverageXmlParser.php b/vendor/spikephpcoverage/parser/CoverageXmlParser.php index 412dd3e8d..a44342238 100644 --- a/vendor/spikephpcoverage/parser/CoverageXmlParser.php +++ b/vendor/spikephpcoverage/parser/CoverageXmlParser.php @@ -42,7 +42,7 @@ case "FILE": $fileAttributes = $this->handleAttrTag($name, $attrs); $this->_lastFilePath = $fileAttributes["PATH"]; - if(!isset($this->_data[$this->_lastFilePath])) { + if( ! isset($this->_data[$this->_lastFilePath])) { $this->_data[$this->_lastFilePath] = array(); } break; @@ -50,7 +50,7 @@ case "LINE": $lineAttributes = $this->handleAttrTag($name, $attrs); $lineNumber = (int)$lineAttributes["LINE-NUMBER"]; - if(!isset($this->_data[$this->_lastFilePath][$lineNumber])) { + if( ! isset($this->_data[$this->_lastFilePath][$lineNumber])) { $this->_data[$this->_lastFilePath][$lineNumber] = (int)$lineAttributes["FREQUENCY"]; } else { diff --git a/vendor/spikephpcoverage/parser/PHPParser.php b/vendor/spikephpcoverage/parser/PHPParser.php index 35316c44f..9f6259a48 100644 --- a/vendor/spikephpcoverage/parser/PHPParser.php +++ b/vendor/spikephpcoverage/parser/PHPParser.php @@ -9,7 +9,7 @@ ?> <?php - if(!defined("__PHPCOVERAGE_HOME")) { + if( ! defined("__PHPCOVERAGE_HOME")) { define("__PHPCOVERAGE_HOME", dirname(dirname(__FILE__))); } require_once __PHPCOVERAGE_HOME . "/parser/Parser.php"; @@ -83,7 +83,7 @@ $artificialEnd = false; // If we are not inside PHP opening tag - if(!$this->inPHP) { + if( ! $this->inPHP) { $pos = -1; // Confirm that the line does not have T_OPEN_TAG_WITH_ECHO (< ? =) diff --git a/vendor/spikephpcoverage/parser/Parser.php b/vendor/spikephpcoverage/parser/Parser.php index ed242b0f3..0dea02f77 100644 --- a/vendor/spikephpcoverage/parser/Parser.php +++ b/vendor/spikephpcoverage/parser/Parser.php @@ -9,7 +9,7 @@ ?> <?php - if(!defined("__PHPCOVERAGE_HOME")) { + if( ! defined("__PHPCOVERAGE_HOME")) { define("__PHPCOVERAGE_HOME", dirname(dirname(__FILE__))); } require_once __PHPCOVERAGE_HOME . "/conf/phpcoverage.conf.php"; @@ -73,7 +73,7 @@ public function parse($filename) { $this->filename = $filename; $ret = $this->openFileReadOnly(); - if(!$ret) { + if( ! $ret) { die("Error: Cannot open file: $this->filename \n"); } } @@ -101,7 +101,7 @@ * @access public */ public function getLine() { - if(!feof($this->fileRef)) { + if( ! feof($this->fileRef)) { $this->line = fgets($this->fileRef); $this->processLine($this->line); } diff --git a/vendor/spikephpcoverage/phpcoverage.inc.php b/vendor/spikephpcoverage/phpcoverage.inc.php index bf004363b..d5892e8d4 100644 --- a/vendor/spikephpcoverage/phpcoverage.inc.php +++ b/vendor/spikephpcoverage/phpcoverage.inc.php @@ -43,7 +43,7 @@ } // Fallback - if(!defined("PHPCOVERAGE_HOME")) { + if( ! defined("PHPCOVERAGE_HOME")) { $include_path = get_include_path(); set_include_path($PHPCOVERAGE_HOME. PATH_SEPARATOR . $include_path); define('PHPCOVERAGE_HOME', $PHPCOVERAGE_HOME); diff --git a/vendor/spikephpcoverage/phpcoverage.remote.bottom.inc.php b/vendor/spikephpcoverage/phpcoverage.remote.bottom.inc.php index d894f5312..18b1d6b37 100644 --- a/vendor/spikephpcoverage/phpcoverage.remote.bottom.inc.php +++ b/vendor/spikephpcoverage/phpcoverage.remote.bottom.inc.php @@ -19,7 +19,7 @@ $logger->info("[phpcoverage.remote.bottom.inc.php] Session id: " . $session_id, __FILE__, __LINE__); - if(!isset($cov)) { + if( ! isset($cov)) { if(file_exists($tmpFile)) { $object = file_get_contents($tmpFile); $cov = unserialize($object); @@ -29,7 +29,7 @@ if(isset($cov)) { // PHPCoverage bottom half - if(!isset($called_script)) { + if( ! isset($called_script)) { $called_script = ""; } $logger->info("[phpcoverage.remote.bottom.inc.php] END: " . $called_script, diff --git a/vendor/spikephpcoverage/phpcoverage.remote.top.inc.php b/vendor/spikephpcoverage/phpcoverage.remote.top.inc.php index f31fe6a00..515082ffc 100644 --- a/vendor/spikephpcoverage/phpcoverage.remote.top.inc.php +++ b/vendor/spikephpcoverage/phpcoverage.remote.top.inc.php @@ -28,7 +28,7 @@ $this_script = basename(__FILE__); $called_script = basename($_SERVER["SCRIPT_FILENAME"]); - if(!empty($_REQUEST["PHPCOVERAGE_HOME"])) { + if( ! empty($_REQUEST["PHPCOVERAGE_HOME"])) { $PHPCOVERAGE_HOME = $_REQUEST["PHPCOVERAGE_HOME"]; } if(empty($PHPCOVERAGE_HOME)) { @@ -51,7 +51,7 @@ // Fallback - if(!defined("PHPCOVERAGE_HOME")) { + if( ! defined("PHPCOVERAGE_HOME")) { $include_path = get_include_path(); set_include_path($PHPCOVERAGE_HOME. ":" . $include_path); define('PHPCOVERAGE_HOME', $PHPCOVERAGE_HOME); @@ -94,16 +94,16 @@ __FILE__, __LINE__); } - if(!empty($_REQUEST["phpcoverage-action"])) { + if( ! empty($_REQUEST["phpcoverage-action"])) { $logger->info("[phpcoverage.remote.top.inc.php] phpcoverage-action=" . strtolower($_REQUEST["phpcoverage-action"]), __FILE__, __LINE__); switch(strtolower($_REQUEST["phpcoverage-action"])) { case "init": - if(!empty($_REQUEST["tmp-dir"])) { + if( ! empty($_REQUEST["tmp-dir"])) { $cov->setTmpDir($_REQUEST["tmp-dir"]); } $cov->setCoverageFileName($_REQUEST["cov-file-name"]); - if(!$cov->cleanCoverageFile()) { + if( ! $cov->cleanCoverageFile()) { die("Cannot delete existing coverage data."); } break; diff --git a/vendor/spikephpcoverage/remote/RemoteCoverageRecorder.php b/vendor/spikephpcoverage/remote/RemoteCoverageRecorder.php index a2a26ef52..85c989865 100644 --- a/vendor/spikephpcoverage/remote/RemoteCoverageRecorder.php +++ b/vendor/spikephpcoverage/remote/RemoteCoverageRecorder.php @@ -9,7 +9,7 @@ ?> <?php - if(!defined("__PHPCOVERAGE_HOME")) { + if( ! defined("__PHPCOVERAGE_HOME")) { define("__PHPCOVERAGE_HOME", dirname(dirname(__FILE__))); } require_once __PHPCOVERAGE_HOME . "/util/Utility.php"; @@ -124,7 +124,7 @@ global $util; $xmlString = ""; $xmlBody = ""; - if(!empty($this->coverageData)) { + if( ! empty($this->coverageData)) { foreach($this->coverageData as $file => &$lines) { $xmlBody .= "<file path=\"". $util->replaceBackslashes($file) . "\">"; foreach($lines as $linenum => &$frequency) { @@ -157,7 +157,7 @@ */ protected function parseCoverageXml(&$xml, $stream=false) { // Need to handle multiple xml files. - if(!is_array($xml)) { + if( ! is_array($xml)) { $xml = array($xml); } for($i = 0; $i < count($xml); $i++) { @@ -194,7 +194,7 @@ if(file_exists($filepath) && is_readable($filepath)) { $fp = fopen($filepath, "r"); if($fp) { - while(!feof($fp)) { + while( ! feof($fp)) { $xml = fread($fp, 4096); echo $xml; } @@ -225,10 +225,10 @@ */ protected function appendDataToFile($newXml) { $filepath = $this->tmpDir . "/" . $this->coverageFileName; - if(!file_exists($filepath)) { + if( ! file_exists($filepath)) { // If new file, write the xml start and end tags $bytes = file_put_contents($filepath, $this->xmlStart . "\n" . $this->xmlEnd); - if(!$bytes) { + if( ! $bytes) { $this->logger->critical("[RemoteCoverageRecorder::appendDataToFile()] Could not create file: " . $filepath, __FILE__, __LINE__); return false; } @@ -238,7 +238,7 @@ if($res) { fseek($res, -1 * strlen($this->xmlEnd), SEEK_END); $ret = fwrite($res, $newXml); - if(!$ret) { + if( ! $ret) { $this->logger->error("[RemoteCoverageRecorder::appendDataToFile()] Could not append data to file.", __FILE__, __LINE__); fclose($res); @@ -270,7 +270,7 @@ if($this->stopInstrumentation()) { $xml = $this->prepareCoverageXml(); $ret = $this->appendDataToFile($xml); - if(!$ret) { + if( ! $ret) { $this->logger->warn("[RemoteCoverageRecorder::saveCoverageXml()] " . "ERROR: Nothing was written to " . $filepath, __FILE__, __LINE__); diff --git a/vendor/spikephpcoverage/remote/XdebugTraceReader.php b/vendor/spikephpcoverage/remote/XdebugTraceReader.php index 58bd54669..a73cf799a 100644 --- a/vendor/spikephpcoverage/remote/XdebugTraceReader.php +++ b/vendor/spikephpcoverage/remote/XdebugTraceReader.php @@ -60,11 +60,11 @@ * @access public */ public function parseTraceFile() { - if(!$this->openTraceFile()) { + if( ! $this->openTraceFile()) { error_log("[XdebugTraceReader::parseTraceFile()] Unable to read trace file."); return false; } - while(!feof($this->handle)) { + while( ! feof($this->handle)) { $line = fgets($this->handle); // echo "Line: " . $line . "\n"; $this->processTraceLine($line); @@ -90,7 +90,7 @@ if($cnt < 2) { return false; } - if(!file_exists($dataparts[$cnt-2])) { + if( ! file_exists($dataparts[$cnt-2])) { // echo "No file: " . $dataparts[$cnt-2] . "\n"; return false; } @@ -98,7 +98,7 @@ $dataparts[$cnt-2] = trim($dataparts[$cnt-2]); $dataparts[$cnt-1] = trim($dataparts[$cnt-1]); - if(!isset($this->coverage[$dataparts[$cnt-2]][$dataparts[$cnt-1]])) { + if( ! isset($this->coverage[$dataparts[$cnt-2]][$dataparts[$cnt-1]])) { $this->coverage[$dataparts[$cnt-2]][$dataparts[$cnt-1]] = 1; } else { diff --git a/vendor/spikephpcoverage/reporter/CoverageReporter.php b/vendor/spikephpcoverage/reporter/CoverageReporter.php index f537bc42a..af90953ea 100644 --- a/vendor/spikephpcoverage/reporter/CoverageReporter.php +++ b/vendor/spikephpcoverage/reporter/CoverageReporter.php @@ -9,7 +9,7 @@ ?> <?php - if(!defined("__PHPCOVERAGE_HOME")) { + if( ! defined("__PHPCOVERAGE_HOME")) { define("__PHPCOVERAGE_HOME", dirname(dirname(__FILE__))); } require_once __PHPCOVERAGE_HOME . "/conf/phpcoverage.conf.php"; @@ -100,7 +100,7 @@ */ protected function createReportDir() { global $util; - if(!file_exists($this->outputDir)) { + if( ! file_exists($this->outputDir)) { $util->makeDirRecursive($this->outputDir, 0755); } if(file_exists($this->outputDir)) { @@ -200,9 +200,9 @@ } else { $filename = $util->replaceBackslashes($filename); - if(!file_exists(dirname($filename))) { + if( ! file_exists(dirname($filename))) { $ret = $util->makeDirRecursive(dirname($filename), 0755); - if(!$ret) { + if( ! $ret) { die ("Cannot create directory " . dirname($filename) . "\n"); } } diff --git a/vendor/spikephpcoverage/reporter/HtmlCoverageReporter.php b/vendor/spikephpcoverage/reporter/HtmlCoverageReporter.php index f520544f7..75d187d70 100644 --- a/vendor/spikephpcoverage/reporter/HtmlCoverageReporter.php +++ b/vendor/spikephpcoverage/reporter/HtmlCoverageReporter.php @@ -9,7 +9,7 @@ ?> <?php - if(!defined("__PHPCOVERAGE_HOME")) { + if( ! defined("__PHPCOVERAGE_HOME")) { define("__PHPCOVERAGE_HOME", dirname(dirname(__FILE__))); } require_once __PHPCOVERAGE_HOME . "/reporter/CoverageReporter.php"; @@ -66,7 +66,7 @@ * @access public */ public function generateReport(&$data) { - if(!file_exists($this->outputDir)) { + if( ! file_exists($this->outputDir)) { mkdir($this->outputDir); } $this->coverageData =& $data; @@ -154,7 +154,7 @@ mkdir($imagesDir); } $imagesSpikeDir = $imagesDir . "/spikesource"; - if(!file_exists($imagesSpikeDir)) { + if( ! file_exists($imagesSpikeDir)) { mkdir($imagesSpikeDir); } $imagesArrowUpFile = realpath(dirname(__FILE__)) . "/images/arrow_up.gif"; @@ -341,7 +341,7 @@ } $str .= $this->writeIndexFileTableHead(); $str .= '<tbody>'; - if(!empty($this->coverageData)) { + if( ! empty($this->coverageData)) { foreach($this->coverageData as $filename => &$lines) { $realFile = realpath($filename); $fileLink = $this->outputDir . $util->unixifyPath($realFile). ".html"; @@ -439,7 +439,7 @@ global $util; $fileLink = $util->replaceBackslashes($fileLink); $parentDir = $util->replaceBackslashes(dirname($fileLink)); - if(!file_exists($parentDir)) { + if( ! file_exists($parentDir)) { //echo "\nCreating dir: $parentDir\n"; $util->makeDirRecursive($parentDir, 0755); } @@ -510,7 +510,7 @@ $lastLineType = $type; //echo $line . "\t[" . $type . "]\n"; - if(!isset($coverageLines[$lineCnt])) { + if( ! isset($coverageLines[$lineCnt])) { $coverageLines[$lineCnt] = 0; } $fileLines[$lineCnt] = array("type" => $type, "lineCnt" => $lineCnt, "line" => $line, "coverageLines" => $coverageLines[$lineCnt]); diff --git a/vendor/spikephpcoverage/util/CoverageLogger.php b/vendor/spikephpcoverage/util/CoverageLogger.php index 71119b149..47a3865dc 100644 --- a/vendor/spikephpcoverage/util/CoverageLogger.php +++ b/vendor/spikephpcoverage/util/CoverageLogger.php @@ -22,7 +22,7 @@ ); public function setLevel($level) { - if(!is_numeric($level)) { + if( ! is_numeric($level)) { for($i = 0; $i < count($this->logLevels); $i++) { if(strcasecmp($this->logLevels[$i], $level) === 0) { $level = $i; diff --git a/vendor/spikephpcoverage/util/Utility.php b/vendor/spikephpcoverage/util/Utility.php index 250289c7b..8fcebffbc 100644 --- a/vendor/spikephpcoverage/util/Utility.php +++ b/vendor/spikephpcoverage/util/Utility.php @@ -9,7 +9,7 @@ ?> <?php - if(!defined("__PHPCOVERAGE_HOME")) { + if( ! defined("__PHPCOVERAGE_HOME")) { define("__PHPCOVERAGE_HOME", dirname(dirname(__FILE__))); } require_once __PHPCOVERAGE_HOME . "/conf/phpcoverage.conf.php"; @@ -171,7 +171,7 @@ // Crawl up the directory tree $next_pathname = substr($dir, 0, strrpos($dir, "/")); if ($this->makeDirRecursive($next_pathname, $mode)) { - if (!file_exists($dir)) { + if ( ! file_exists($dir)) { return mkdir($dir, $mode); } } @@ -210,7 +210,7 @@ public function getLogger($package=false) { global $spc_config; - if(!isset($this->logger) || $this->logger == NULL) { + if( ! isset($this->logger) || $this->logger == NULL) { $this->logger =& new CoverageLogger(); $this->logger->setLevel($spc_config["log_level"]); }