Quick Search:

jump to detailed chart Line History

line history graph

View Mode

Logical Physical

Show Arbitrary Diff

From to

Supports revisions and tags.

Watches and RSS

History

trunk 76 1 1.0 224 82

latest revision download trunk

76 annotated / raw | Diffs: previous, other | Lines: 1656 ( +114, -114 )

Created: 2007-10-23 10:25:52 -0500 (10 months ago) | Author: opengeek | Changeset: 76

* Correct xPDO::connect() when not using native PDO in PHP 5+ to avoid trying to catch an exception, since the emulated PDO_ classes do not throw exceptions.
* When using native PDO, make sure to catch PDOException explicitly, and not Exception.
* Unset instance variables in xPDOGenerator after execution of parseSchema() to allow execution on multiple schemas.
* Fix error in xPDOObject::loadCollection() when using relative or fully-qualified classnames, e.g. when using classes in subpackages.
* Be sure the value is a string before attempting to unserialize it when phptype = array in xPDOObject::get().
* Updates and corrections to a few logging statements.

Branch point for: 1.0

71 annotated / raw | Diffs: previous, other | Lines: 1656 ( +204, -44 )

Created: 2007-09-24 14:32:33 -0500 (11 months ago) | Author: opengeek | Changeset: 71

* Modified xPDOCriteria constructor to delay the prepare() unless cacheFlag is false (or less than 0), allowing cached xPDOCriteria statements to avoid requiring a database connection.
* Lots more documentation updates, changed license headers, etc.

56 annotated / raw | Diffs: previous, other | Lines: 1496 ( +9, -12 )

Created: 2007-06-19 14:17:29 -0500 (14 months ago) | Author: opengeek | Changeset: 56

* Updates to allow auto-fallback to emulated PDO when native PDO fails to get a connection
* Updates to xPDOTransport and xPDOVehicle
        - Added XPDO_TRANSPORT_RESOLVE_FILES option to indicate manual override for resolving files within vehicles
* Updates to xPDOCacheManager::getCachePath()

55 annotated / raw | Diffs: previous, other | Lines: 1499 ( +4, -2 )

Created: 2007-06-18 14:46:25 -0500 (14 months ago) | Author: apoxx | Changeset: 55

Added fallback from native to emulated mode when a PDO driver isn't present

54 annotated / raw | Diffs: previous, other | Lines: 1497 ( +5, -1 )

Created: 2007-06-18 14:30:22 -0500 (14 months ago) | Author: apoxx | Changeset: 54

no comment

45 annotated / raw | Diffs: previous, other | Lines: 1493 ( +18, -3 )

Created: 2007-05-08 09:58:20 -0500 (16 months ago) | Author: opengeek | Changeset: 45

- Some PHP 4 bug fixes and refactoring to better handle aggregate and composite relations

40 annotated / raw | Diffs: previous, other | Lines: 1478 ( +20, -1 )

Created: 2007-04-23 02:24:00 -0500 (16 months ago) | Author: opengeek | Changeset: 40

- xPDOObject->getOne was assigning to _relatedObjects as reference and causing problems
- Corrected a few warnings in xPDOQuery
- Corrected an incorrect path in xPDOGenerator
- MakeForm needs additional refactoring and probably needs to be moved to the modx project at some point

37 annotated / raw | Diffs: previous, other | Lines: 1459 ( +6, -4 )

Created: 2007-03-27 10:10:30 -0500 (17 months ago) | Author: opengeek | Changeset: 37

- Corrections to xPDOGenerator for 1.0 beta changes
- Documentation updates

36 annotated / raw | Diffs: previous, other | Lines: 1457 ( +69, -48 )

Created: 2007-03-26 12:35:43 -0500 (17 months ago) | Author: opengeek | Changeset: 36

- Initial commit of 1.0 beta (potentially unstable)
- New aggregate and composite schema/map definitions
 - simpler definitions are faster and easier to process
 - refer to distinct relationships to another class by an alias rather than class name + key
 - new owner attribute to indicate if the local or foreign object owns the foreign key value used to define the relationship
 - to migrate:
   - modify schema:
     - add an alias attribute for each aggregate/composite relation (key attribute can be removed)
     - add an owner attribute for each aggregate/composite relation (value will be local or foreign)
   - Public API changes requiring code modifications (migration guide will be released with additional details):
     - xPDO class:
       - getObjectGraph()
       - getCollectionGraph()
       - getFKDefinition()
     - xPDOObject class and derivatives (i.e. all generated classes):
       - getOne()
       - getMany()
       - addOne()
       - addMany()
       - getFKDefinition()
     - xPDOQuery class
       - join()
       - innerJoin()
       - leftJoin()
       - rightJoin()
       - from()
       - bindGraph()
- New physical class/map structure to better support for platform-specific optimizations
 - packages now require both a class file in the package root, as well as classes for each driver implementation in the appropriate subdirectory
 - to migrate, move your existing classes to the package root, and regenerate from the schema to create the new driver specific class stubs

33 annotated / raw | Diffs: previous, other | Lines: 1436 ( +23, -12 )

Created: 2007-02-21 14:19:57 -0600 (18 months ago) | Author: opengeek | Changeset: 33

* Allow xPDO model packages to specify the root directory where the model classes and maps will be stored/generated/loaded, via a second parameter on xPDO::setPackage().
* Related optimizations and refactorings to xPDO::loadClass().

31 annotated / raw | Diffs: previous, other | Lines: 1425 ( +2, -2 )

Created: 2007-02-17 13:07:41 -0600 (18 months ago) | Author: opengeek | Changeset: 31

* Fix for xPDOQuery :: join(); was overwriting existing join definitions rather than creating new ones on subsequent calls.
* Fix for xPDOObject :: addOne(); was adding a reference to a reference, which did not work with hydrate_rel_obj_vars configuration option.
* Added cacheFlag parameter xPDO :: newQuery() call in xPDO :: getCollectionGraph().
* Made default $key parameter on xPDO :: getFKDefinition() default to empty string.

27 annotated / raw | Diffs: previous, other | Lines: 1425 ( +154, -22 )

Created: 2007-02-15 00:08:22 -0600 (18 months ago) | Author: opengeek | Changeset: 27

* Introducing xPDOQuery, an extension to xPDOCriteria that provides an API for building a variety of common queries without the need for SQL:
 -- methods include, command(), select(), from(), where(), groupby(), having(), limit(), join(), leftJoin(), rightJoin(), innerJoin(), and more
 -- also provides support for automating queries to populate related object graphs in a single query
 -- various refactoring of method implementations to make use of xPDOQuery
* Introduced simply FILE logging target to write error logs to the cache directory
* Added new methods to xPDO, including getCount(), getObjectGraph(), and getCollectionGraph()
* Added xPDOObject :: encode() to allow custom encoding of properties using various methods; provides md5 by default
* Bug fixes and additional features to xPDOObject :: remove() to prevent nasty loops with circular composite references; needs more work

25 annotated / raw | Diffs: previous, other | Lines: 1293 ( +1, -1 )

Created: 2007-02-09 14:18:59 -0600 (18 months ago) | Author: opengeek | Changeset: 25

* Fixed bug when forcing XPDO_MODE to XPDO_MODE_EMULATED (2) and PDO is present.

22 annotated / raw | Diffs: previous, other | Lines: 1293 ( +12, -11 )

Created: 2007-02-07 10:23:55 -0600 (18 months ago) | Author: opengeek | Changeset: 22

* Allow transient runtime properties to be accessed with get()/set() and hydrated according to options.
* Removed xPDO::getTableType() in favor of getTableMeta() (TODO: add support in xPDOManager and xPDOGenerator for access to SHOW TABLE STATUS data).

21 annotated / raw | Diffs: previous, other | Lines: 1292 ( +3, -2 )

Created: 2007-02-05 11:49:54 -0600 (19 months ago) | Author: opengeek | Changeset: 21

* Fixed bug with non-native PDO loading since changing emulated classnames to PDO_ and PDOStatement_.

20 annotated / raw | Diffs: previous, other | Lines: 1291 ( +13, -3 )

Created: 2007-02-04 15:47:45 -0600 (19 months ago) | Author: opengeek | Changeset: 20

* Fix yearSkew warning in xPDOObject class.
* Refactored PDO for PHP 4 classes to work even when native PDO is loaded, but necessary drivers are not available (renamed classes to PDO_ and PDOStatement_).

19 annotated / raw | Diffs: previous, other | Lines: 1281 ( +19, -8 )

Created: 2007-02-01 18:05:03 -0600 (19 months ago) | Author: opengeek | Changeset: 19

* Refactored db cache features:
 -- Modified xPDOCacheManager and xPDOFileCache to auto-determine a writable tmp directory to cache files if no cache_dir is specified in the config.
 -- Modified xPDOFileCache filenames and file structure to divide files into logical containers, and reduce the number of cache files in a single directory.
 -- Added utility functions to xPDOCacheManager, including writeFile($path, $content, $mode) and deleteTree($path)
* Updates to xPDOObject to prevent errors from revealing critical database connection information.

16 annotated / raw | Diffs: previous, other | Lines: 1270 ( +5, -5 )

Created: 2007-01-23 14:49:12 -0600 (19 months ago) | Author: jason | Changeset: 16

* Bug fixes to generator class when generating auto_increment column definitions.
* Expanded phptype-to-MySQL type matching in generator to identify floats, datetime, and date types
* Added ability to force XPDO_MODE by predefining the constant.  This will allow PHP 5.1+ users with PDO but without appropriate drivers, to revert to the emulated PDO class provided with xPDO.

15 annotated / raw | Diffs: previous, other | Lines: 1270 ( +45, -20 )

Created: 2007-01-21 22:24:11 -0600 (19 months ago) | Author: jason | Changeset: 15

* Add hydrate_object_vars and hydrate_rel_object_vars options to add references to persistent properties and related objects as actual class members.
* Replace repetitive get_class calls with references to xPDOObject::_class, set once in the constructor.
* Add return false on connection failure in extended PDO methods in xPDO
* Remove stray return in XPDOTest for PHPUnit2
* Several small bug fixes in xPDOObject

11 annotated / raw | Diffs: previous, other | Lines: 1245 ( +12, -275 )

Created: 2006-12-31 20:53:06 -0600 (20 months ago) | Author: jason | Changeset: 11

* Removed trailing PHP tag from all files.  Not needed and can lead to extra whitespace.
* Moved xPDOGenerator to xpdo/om/mysql
* Migrated remaining db-specific code from xPDO class to mysql/xPDOObject in preparation to create ports optimized for other db systems.
 - load(), loadCollection(), loadCriteria(), and getSelectColumns are now static methods of xPDOObject that now implement db-specific code to power xPDO::getObject(), xPDO::getCollection(), xPDO::getCriteria(), and xPDO::getSelectColumns(), respectively.

9 annotated / raw | Diffs: previous, other | Lines: 1508 ( +5, -1 )

Created: 2006-12-27 19:20:44 -0600 (20 months ago) | Author: jason | Changeset: 9

* Various PHP warnings fixed.
* Bug fixes and feature additions to MakeTable.

Branch point for: 2.0

8 annotated / raw | Diffs: previous, other | Lines: 1504 ( +5, -3 )

Created: 2006-12-24 20:44:52 -0600 (20 months ago) | Author: jason | Changeset: 8

* xPDOCacheHandler class updated to allow configuration properties to determine a class for handling xPDO object and result set caching.
* Modified fromArray() so it is not responsible for determining the _new attribute of xPDOObject instances.  This is the responsibility of xPDO::getObject(), which uses xPDO::load(), and xPDO::getCollection().
* Fixed all line endings to Unix style...

1 new annotated / raw | Lines: 1502 ( +1502, -0 )

Created: 2006-11-15 15:40:08 -0600 (21 months ago) | Author: jason | Changeset: 1

Importing xPDO

latest revision download Branch 1.0

224 annotated / raw | Diffs: previous, other | Lines: 1999 ( +20, -20 )

Created: 2008-08-28 11:25:05 -0500 (10 days ago) | Author: opengeek | Changeset: 224

* Changed calls from _log() to log().

215 annotated / raw | Diffs: previous, other | Lines: 1999 ( +15, -10 )

Created: 2008-08-20 13:26:20 -0500 (18 days ago) | Author: opengeek | Changeset: 215

* Correct XPDO_OPT_BASE_PACKAGES loader to expect format package.one:root/path/[,package.two:root/path/]*

213 annotated / raw | Diffs: previous, other | Lines: 1994 ( +11, -0 )

Created: 2008-08-15 01:31:19 -0500 (23 days ago) | Author: opengeek | Changeset: 213

* Added XPDO_CLI_MODE with a boolean value; will be true if php_sapi_name() == 'cli'

208 annotated / raw | Diffs: previous, other | Lines: 1983 ( +21, -0 )

Created: 2008-08-08 20:16:26 -0500 (30 days ago) | Author: opengeek | Changeset: 208

* Added a log() method with same parameters as _log() to serve as the public logging interface.

207 annotated / raw | Diffs: previous, other | Lines: 1962 ( +10, -1 )

Created: 2008-07-21 17:33:02 -0500 (48 days ago) | Author: opengeek | Changeset: 207

Syncing change made to trunk directly.

206 annotated / raw | Diffs: previous, other | Lines: 1953 ( +11, -10 )

Created: 2008-07-21 17:15:33 -0500 (48 days ago) | Author: opengeek | Changeset: 206

* Removing adodb-time extension.
* Licensing header updates.

203 annotated / raw | Diffs: previous, other | Lines: 1952 ( +2, -2 )

Created: 2008-04-25 14:36:40 -0500 (4 months 13 days ago) | Author: opengeek | Changeset: 203

* [#XPDO-16] xPDO::getCacheManager() always returns an instance of xPDOCacheManager.

202 annotated / raw | Diffs: previous, other | Lines: 1952 ( +3, -3 )

Created: 2008-04-25 13:12:55 -0500 (4 months 13 days ago) | Author: opengeek | Changeset: 202

* Copyright updates

199 annotated / raw | Diffs: previous, other | Lines: 1952 ( +1, -1 )

Created: 2008-04-17 13:29:53 -0500 (4 months 21 days ago) | Author: splittingred | Changeset: 199

- fix to xPDO::getCount not properly handling joins and creating an ambiguous primary key

188 annotated / raw | Diffs: previous, other | Lines: 1952 ( +0, -1 )

Created: 2008-04-01 09:28:39 -0500 (5 months 6 days ago) | Author: opengeek | Changeset: 188

* Changed from using static functions for xPDOValidator and xPDOValidationRules to actual object instances/methods.

186 annotated / raw | Diffs: previous, other | Lines: 1953 ( +1, -0 )

Created: 2008-03-31 17:43:26 -0500 (5 months 7 days ago) | Author: splittingred | Changeset: 186

- Automatically set a new xPDOObject's fields to dirty
- Fix bug where checking if field exists was not returning correct value

181 annotated / raw | Diffs: previous, other | Lines: 1952 ( +49, -0 )

Created: 2008-03-31 15:32:27 -0500 (5 months 7 days ago) | Author: opengeek | Changeset: 181

* Changes and updates to new xPDO validation package:
        -Added 4 basic xPDOValidationRule classes:
                -xPDOMaxLengthValidationRule
                -xPDOMaxValueValidationRule
                -xPDOMinLengthValidationRule
                -xPDOMinValueValidationRule
        -Added sample validation rules to sample schema.
        -Added xPDOGenerator support for validation rules.
        -Added on-demand loading of schema validation rules in xPDOObject, either when validate() is called, or when rules are added/removed via addValidationRule()/removeValidationRule(), whichever comes first.
* Added xPDO::getConfig() and xPDO::setConfig() methods for proper public access to xPDO::config and the ability to extend the behavior.

180 annotated / raw | Diffs: previous, other | Lines: 1903 ( +2, -0 )

Created: 2008-03-29 16:27:36 -0500 (5 months 9 days ago) | Author: opengeek | Changeset: 180

* Introducing the validation package:
        -Provides extensible xPDOValidator for customizing the validation process through a static validate() method.
        -Provides xPDOValidationRule interface class for developing custom validation rules to apply to object fields.  The interface defines a single function, isValid() that derivatives must implement.
        -xPDOObject provides new functions to call validation: validate(), set validation rules via the API: addValidationRule, as well as options and data structures to manage automatic and manual validation for modified fields.
        -xPDO provides XPDO_OPT_VALIDATION_CLASS to define the global xPDOValidator class to be used.
        -xPDO provides XPDO_OPT_VALIDATE_ON_SAVE to trigger automatic validation when save() is called.
        -Still to do is provide a schema representation of validation rules that can be defined and generated into the class maps; these map entries could then be used to automatically load the rules when validation is attempted.
* Added public methods getOption and setOption to xPDOObject to allow options to be set/overridden on any xPDOObject instance.

173 annotated / raw | Diffs: previous, other | Lines: 1901 ( +1, -1 )

Created: 2008-03-13 15:41:06 -0500 (5 months 25 days ago) | Author: opengeek | Changeset: 173

* [XPDO-13] Added lazy loading of object fields.  You can now use all xPDO getObject* and getCollection* functions to load objects with only certain fields populated.  Data for other attributes will be loaded when requested via the xPDOObject get() method.

169 annotated / raw | Diffs: previous, other | Lines: 1901 ( +2, -8 )

Created: 2008-02-29 10:25:30 -0600 (6 months ago) | Author: opengeek | Changeset: 169

* [#XPDO-10] Add loadCollectionGraph static function to xPDOObject and incorporate into getObjectLoader() facilities.

167 annotated / raw | Diffs: previous, other | Lines: 1907 ( +14, -2 )

Created: 2008-02-26 22:17:06 -0600 (6 months ago) | Author: opengeek | Changeset: 167

[#XPDO-8] Check all ancestry matches from XPDO_OPT_LOADER_CLASSES for a valid callback method rather than just the first.

155 annotated / raw | Diffs: previous, other | Lines: 1895 ( +1, -1 )

Created: 2007-12-14 14:05:18 -0600 (8 months ago) | Author: opengeek | Changeset: 155

* Fixed bug in xPDO::getCount() when calling on a class with compound primary keys.

154 annotated / raw | Diffs: previous, other | Lines: 1895 ( +2, -2 )

Created: 2007-12-13 17:03:01 -0600 (8 months ago) | Author: opengeek | Changeset: 154

* Remove error suppression on includes in xPDO::_loadClass().

146 annotated / raw | Diffs: previous, other | Lines: 1895 ( +34, -11 )

Created: 2007-11-30 01:54:14 -0600 (9 months ago) | Author: opengeek | Changeset: 146

* Added xPDO::getObjectLoader() to find any overridden static methods by name from a given xPDOObject derivative. Used by xPDO::getObject() and getCollection() to find load() and loadCollection() functions on any xPDOObject derivative in the ancestry of the class being retrieved and use those functions instead of the xPDOObject equivalents. To prevent searching on every call, classes which override these functions should be added to the xPDO::$config array using the XPDO_OPT_LOADER_CLASSES constant.

144 annotated / raw | Diffs: previous, other | Lines: 1872 ( +8, -1 )

Created: 2007-11-25 15:25:54 -0600 (9 months ago) | Author: opengeek | Changeset: 144

* Refactored xPDOObject::set() method to allow third parameter, vType, to be of type callable. When this parameter is a valid callable, the responsibility of setting the value of the appropriate xPDOObject::$_fields array element becomes that of the callback function.  The callback should accept three parameters, the key of the field, the value to set, and a reference to the xPDOObject instance, (i.e. $this).
* Added logic to xPDOObject::set() when working with fields of type date,  datetime, or timestamp for vType='utc'; this will indicate that the string being passed is already a valid utc format string acceptable as is to the database, avoiding the venerable strtotime/strftime conversion that would otherwise take place.
* Added XPDO_PHP_VERSION constant which holds the php_version() result that can be referenced throughout any xPDO-base code.
* Added check to xPDOObject::strtotime() implementation to revert back to PHP's default implementation if XPDO_PHP_VERSION >= 5.1.0.

142 annotated / raw | Diffs: previous, other | Lines: 1865 ( +57, -0 )

Created: 2007-11-21 18:42:10 -0600 (9 months ago) | Author: opengeek | Changeset: 142

* Fix for reverse-engineering enum fields with spaces in a value.
        -Added a new static function xPDO :: escSplit() that can split a string on certain characters as long as they don't appear between a specified escape character.  This was used to ignore the spaces in the enum precision definition, and allowed the proper retrieval of that data.
* Forced the dbtype to lowercase in the schema writing process for comparison, and for generation.

140 annotated / raw | Diffs: previous, other | Lines: 1808 ( +3, -3 )

Created: 2007-11-19 11:30:40 -0600 (9 months ago) | Author: opengeek | Changeset: 140

* Changed the default xPDOCriteria::cacheFlag attribute to false, along with the default values in the constructor cacheFlag parameter.

133 annotated / raw | Diffs: previous, other | Lines: 1808 ( +38, -31 )

Created: 2007-11-16 00:07:17 -0600 (9 months ago) | Author: opengeek | Changeset: 133

* Sync'ing 1.0 branch with accidental commit direct to trunk.

129 annotated / raw | Diffs: previous, other | Lines: 1801 ( +2, -1 )

Created: 2007-11-15 08:12:18 -0600 (9 months ago) | Author: splittingred | Changeset: 129

- Fixed bug with uninitialized var.

127 annotated / raw | Diffs: previous, other | Lines: 1800 ( +33, -31 )

Created: 2007-11-13 11:26:31 -0600 (9 months ago) | Author: opengeek | Changeset: 127

* Fix bug in xPDO::toCache() trying to retrieve cached objects using the original signature, rather than the processed signature string.

123 annotated / raw | Diffs: previous, other | Lines: 1798 ( +13, -10 )

Created: 2007-11-13 00:40:11 -0600 (9 months ago) | Author: opengeek | Changeset: 123

* Added XPDO_OPT_HYDRATE_ADHOC_FIELDS option to xPDO and xPDOObject.
* Additional refactoring to xPDO::toCache() and xPDO::fromCache(), including allowing generic __sqlResult queries to be cached, though that needs some additional commits to enable fully. Still more to come.
* Documented xPDOCacheManager object caching functions.
* Fix undefined variable $fromCache in xPDOObject::loadObject() and loadCollection() functions.
* Tweaks to xPDOCacheManager::generateObject() to use raw values in toArray() and fromArray() calls used to create the cache representation.
* Fix xPDOObject::loadCollection() to use rawValues when loading objects using fromArray().
* Fix xPDOQuery::hydrateGraph() and hydrateGraphNode() functions to use rawValues when loading objects with fromArray().
* Fix strrpos() call in xPDOObject::__construct() to work properly in PHP 4 and 5 since PHP 4 does not allow the needle parameter to be more than a single character string.
* Adding XPDO_TRANSPORT_ACTION_* constants to represent INSTALL, UPGRADE, and UNINSTALL actions that can be performed on a package.

117 annotated / raw | Diffs: previous, other | Lines: 1795 ( +7, -4 )

Created: 2007-11-12 14:00:43 -0600 (9 months ago) | Author: opengeek | Changeset: 117

* Added XPDO_OPT_CACHE_DB_* constants for configuring and referring to object result-set caching settings.

112 annotated / raw | Diffs: previous, other | Lines: 1792 ( +10, -11 )

Created: 2007-11-12 11:44:43 -0600 (9 months ago) | Author: opengeek | Changeset: 112

* Another tweak to xPDO::toCache (not working on objects with no relations still, doh!).

109 annotated / raw | Diffs: previous, other | Lines: 1793 ( +93, -39 )

Created: 2007-11-12 10:54:38 -0600 (9 months ago) | Author: opengeek | Changeset: 109

* Additional refactoring of xPDO::toCache()
        - Smart deletes based on aggregate and composite relations.
        - All xPDOObject queries can now be cached by query signature and primary key(s).

108 annotated / raw | Diffs: previous, other | Lines: 1739 ( +42, -30 )

Created: 2007-11-09 20:34:42 -0600 (9 months ago) | Author: opengeek | Changeset: 108

* Started refactoring result-set caching behavior. Needs lots of testing and likely many more tweaks.
        - Default cacheFlag is now true everywhere, but xPDO must have a cache_db config option now or toCache will not cache the object.
        - More to come.
* Fixed bug in modTransport which was calling setDebug() where it should have called getDebug(), and as a result was echo'ing all the files being zipped when pack() was called.

97 annotated / raw | Diffs: previous, other | Lines: 1727 ( +6, -3 )

Created: 2007-11-06 13:36:16 -0600 (10 months ago) | Author: opengeek | Changeset: 97

* Refactored transport packages, adding ability to update_object separate from preserve_keys; this will help indicate if existing records should be left alone or updated if they already exist.  Preserve_keys will now tell the object to preserve the original native key when loading the object, this if you update_object, it will update an existing record, or insert new record with auto-generated keys. Please note that preserve_keys only affects database-generated primary keys (i.e. auto_increment in mysql).
* Added file_exists() checks to xPDO::_loadClass() to avoid PHP warnings.

89 annotated / raw | Diffs: previous, other | Lines: 1724 ( +1, -0 )

Created: 2007-11-02 17:41:24 -0500 (10 months ago) | Author: opengeek | Changeset: 89

* Fix warning in xPDOObject::set() when XPDO_OPT_ON_SET_STRIPSLASHES is not set in xPDO::config.
* Modify PDO_mysql::quote() and PDOStatement_mysql::quote() functions to addslashes to literal escaped strings in code.  mysql_real_escape_string likes to consume and replace literally escaped strings with appropriate MySQL representations, unline native PDO::quote() and PDOStatement::quote() implementations with the mysql driver.
* Fix warning with invalid index table_prefix, when empty array is passed as options to xPDO constructor.

87 annotated / raw | Diffs: previous, other | Lines: 1723 ( +10, -0 )

Created: 2007-11-01 20:02:48 -0500 (10 months ago) | Author: opengeek | Changeset: 87

* Added XPDO_OPT constants for supported core xPDO options
 - XPDO_OPT_TABLE_PREFIX defines the runtime table prefix applied to an object container (i.e. table) name.
 - XPDO_OPT_HYDRATE_FIELDS defines the option to turn on the population of xPDOObject _fields as references directly on the objects; i.e. object->get('attr') would be available as object->attr as well. This option can be toggled globally and per xPDOObject instance.
 - XPDO_OPT_HYDRATE_RELATED_OBJECTS defines the option to turn on the population of xPDOObject aggregates and composites, i.e. _relatedObjects, as references directly on the parent object; i.e. object->getOne('Alias') is available as object->Alias as well. This option can be toggled globally and per xPDOObject instance.
 - XPDO_OPT_ON_SET_STRIPSLASHES defines a new option to apply stripslashes to string values when using xPDOObject::set(). This option can be toggled globally and per xPDOObject instance.
* Added xPDOObject->_options to hold settings applicable to an object instance.
* Removed xPDOObject->_hydrateFields and _hydrateObjects in favor of _options using the new XPDO_OPT constants.

85 annotated / raw | Diffs: previous, other | Lines: 1713 ( +54, -15 )

Created: 2007-10-31 20:50:55 -0500 (10 months ago) | Author: opengeek | Changeset: 85

* xPDO::__construct() refactorings:
 - Changed tablePrefix param to options array; legacy calls with a string will place a table_prefix option into the configuration for compatibility.
 - A "default" package called 'om' is now set with the XPDO_CORE_PATH.
 - Can now specify base_packages in the options parameter to be added automatically.
 - Can now specify base_classes to load instead of xPDOObject and xPDOSimpleObject to allow more flexibility in overriding core behavior.
* Added xPDO::addPackage(pgk, path) function to add packages and core paths for those packages to the xPDO class search path.  setPackage() now uses addPackage().
* Fixed bug in xPDO::_loadClass(); PHP errors now suppressed on include_once and include calls.

83 annotated / raw | Diffs: previous, other | Lines: 1674 ( +28, -10 )

Created: 2007-10-30 18:28:28 -0500 (10 months ago) | Author: opengeek | Changeset: 83

* Refactored xPDO::loadClass()
 - Made xPDO::packages a single-dimensional array of package names and paths.
 - Changed the way classes are loaded by searching through all registered packages if not found in the current package, and isolated actual class/map loading logic to a separate _loadClass() function. Needs some profiling.
        - TODO: Need to remove the loading of base classes from the constructor for more control in using custom base classes.
* Added package to the map metadata for each object; requires full map regeneration.
* Fixed xPDOObject::addMany() to properly set compound primary keys on _relatedObjects, i.e. only if all keys in a compound primary key are set.
* Fixed xPDOObject::_saveRelatedObject() functionality to set _relatedObjects of cardinality=many with proper keys and remove placeholder objects with keys like __new1, __new2, etc.
* XPDOTest::testCascadeSave(), added an assertion to ensure multiple related object trees are saved properly.
* Modified xPDOObject::getFKClass() to use loadClass() and validate the relationship is usable.
* Introducing xPDOGenerator::compile()
 - Started adding in functionality to compile all classes and maps from a single package into one file for potentially quicker loading in some situations.

82 new annotated / raw | Diffs: previous, other | Lines: 1656 ( +1656, -0 )

Created: 2007-10-30 17:59:53 -0500 (10 months ago) | Author: opengeek | Changeset: 82

Creating a 1.0 working branch

Atlassian FishEye, Subversion, CVS & Perforce analysis. (Version:1.5.4 Build:build-308 2008-07-31 ) - Administration - Page generated 2008-09-08 01:28 -0500