Author: ts Date: Thu Jan 17 17:51:28 2008 New Revision: 7170 Log: - Coding style fixes.
Modified: trunk/PersistentObject/design/design-1.4.txt Modified: trunk/PersistentObject/design/design-1.4.txt ============================================================================== --- trunk/PersistentObject/design/design-1.4.txt [iso-8859-1] (original) +++ trunk/PersistentObject/design/design-1.4.txt [iso-8859-1] Thu Jan 17 17:51:28 2008 @@ -139,19 +139,29 @@ new signatures are: :: - ezcPersistentSession::getRelatedObject( object $object, string $className, - string $relationName = null ) - - ezcPersistentSession::getRelatedObjects( object $object, string $className, - string $relationName = null ) - - ezcPersistentSession::addRelatedObject( object $object, - object $relationObject, - string $relationName = null ); - - ezcPersistentSession::removeRelatedObject( object $object, - object $relationObject, - string $relationName = null ); + ezcPersistentSession::getRelatedObject( + object $object, + string $className, + string $relationName = null + ) + + ezcPersistentSession::getRelatedObjects( + object $object, + string $className, + string $relationName = null + ) + + ezcPersistentSession::addRelatedObject( + object $object, + object $relationObject, + string $relationName = null + ); + + ezcPersistentSession::removeRelatedObject( + object $object, + object $relationObject, + string $relationName = null + ); The new parameter makes it possible to reach one new exceptional state: @@ -180,19 +190,28 @@ $personRelations = new ezcPersistentRelationCollection; $def->relations['Person'] = $personRelations; - $personRelations['Mother'] = new ezcPersistentOneToOneRelation( "persons", - "persons" ); + $personRelations['Mother'] = new ezcPersistentOneToOneRelation( + "persons", + "persons" + ); + $personRelations['Mother']->columnMap = array( - new ezcPersistentSingleTableMap( - "id", - "mother_id" ) ); - - $personRelations['Father'] = new ezcPersistentOneToOneRelation( "persons", - "persons" ); + new ezcPersistentSingleTableMap( + "id", + "mother_id" + ) + ); + + $personRelations['Father'] = new ezcPersistentOneToOneRelation( + "persons", + "persons" + ); $personRelations['Father']->columnMap = array( - new ezcPersistentSingleTableMap( - "id", - "father_id" ) ); + new ezcPersistentSingleTableMap( + "id", + "father_id" + ) + ); The changes do not break BC and require changes in PersistentSession to work. An extra if will have to be introduced to check for the existence of -- svn-components mailing list svn-components@lists.ez.no http://lists.ez.no/mailman/listinfo/svn-components