Changeset 8121
- Timestamp:
- 03/27/08 20:24:48 (8 months ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
plugins/sfPropelImpersonatorPlugin/trunk/lib/sfPropelObjectPeerImpersonator.class.php
r8120 r8121 25 25 * page views, you could return the same structure with sums, avgs and cie 26 26 * replacing the value field. Custom related class will be available through 27 * $previousobject->customCamelizedFieldName (property, not method) 27 * $previousobject->customCamelizedFieldName property, or if this field is 28 * specified as custom_related_by=->setterMethod it will fetch relation using 29 * the given method in previous object 28 30 * - custom_related_by_reverse: 29 31 * If you want to get a relation link back using custom_related_by, specify the 30 32 * underscored version of the field making link. sfPopi will call ->setCamelized(...) 31 33 * on the customized object. 34 * - alias: 35 * Provides a way to set an alias name for the table. This allows you to select a table 36 * more than once using propel. 37 * 32 38 * 33 39 * KNOWN PROBLEMS: … … 46 52 { 47 53 /** 48 * Relation type constants49 */50 const RELATION_NORMAL = 1;51 const RELATION_REVERSE = 2;52 const RELATION_I18N = 3;53 const RELATION_SELF = 4;54 55 /**56 54 * Custom SQL query, set by ->setQuery() 57 55 */ … … 357 355 assert($index-1>=0); 358 356 359 $rowObjects[$index-1]->{'custom'.sfInflector::camelize($this->getParameter($index, 'custom_related_by'))} = $rowObjects[$index]; 357 $method = $this->getParameter($index, 'custom_related_by'); 358 359 if (substr($method, 0, 2)=='->') 360 { 361 $rowObjects[$index-1]->{substr($method, 2)}($rowObjects[$index]); 362 } 363 else 364 { 365 $rowObjects[$index-1]->{'custom'.$method} = $rowObjects[$index]; 366 } 360 367 361 368 if (strlen($_field=sfInflector::camelize($this->getParameter($index, 'custom_related_by_reverse'))))