Development

Changeset 29423

You must first sign up to be able to contribute.

Changeset 29423

Show
Ignore:
Timestamp:
05/12/10 16:55:25 (3 years ago)
Author:
Leon.van.der.Ree
Message:

added aggregator for filtering

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • plugins/sfDataSourcePlugin/trunk/lib/sfDataSourceInterface.class.php

    r28806 r29423  
    6262 * @version    SVN: $Id$ 
    6363 */ 
    64 interface sfDataSourceInterface extends SeekableIterator, ArrayAccess, Countable 
     64interface sfDataSourceInterface extends SeekableIterator, ArrayAccess, Countable, sfDataSourceFilterableInterface 
    6565{ 
    6666  const ASC  = 'asc'; 
     
    9999   */ 
    100100  public function setSort($column, $order = sfDataSourceInterface::ASC); 
    101  
    102   /** 
    103    *  
    104    * // TODO: remove Criteria dependancy 
    105    *  
    106    *  
    107    * An associative array of field-names with an associative array of value/operator-pairs 
    108    * array(field => array('value' => $value, 'operator' => $operator)) 
    109    * 
    110    * field names can match column-names but the implementation is up to you. 
    111    * 
    112    * @param array[array[string, string]] $columns 
    113    */ 
    114   public function addFilter($column, $value, $comparison = sfDataSource::EQUAL); 
    115101 
    116102  /** 
  • plugins/sfDataSourcePlugin/trunk/lib/sfDataSourcePropel.class.php

    r29186 r29423  
    159159    { 
    160160      $method = 'get'.$accessor; //TODO: maybe move to sfPropelObjectPathBehaviorPlugin? object->getValueByPropertyPath($field)... 
    161       $obj = $obj->$method(); 
     161      if ($obj) 
     162      { 
     163        $obj = $obj->$method(); 
     164      } 
    162165    } 
    163166