Development

Changeset 8102

You must first sign up to be able to contribute.

Changeset 8102

Show
Ignore:
Timestamp:
03/27/08 00:52:47 (5 years ago)
Author:
francois
Message:

Fixed typos

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • plugins/sfPropelFinderPlugin/README

    r8101 r8102  
    7474$articles = $articleFinder->whereTitle('like', 'foo%')->find(); 
    7575// Finding all Articles where published_at less than time() 
    76 $articles = $articleFinder->wherePublisheAt('<', time())->find(); 
     76$articles = $articleFinder->wherePublishedAt('<', time())->find(); 
    7777}}} 
    7878 
     
    110110=== Writing your own business logic into a finder === 
    111111 
    112 You can create a new finder for your objects, with custom methods. The only prerequisites are to extend `sfPropelFinder` and to define a protected `$peerClass` property. Then, the object has acces to a protected `$criteria` proprty, whici is a Propel Criteria that can be augmented in the usual wqy. Don't forget to return the current object (`$this`) in the new methods. 
     112You can create a new finder for your objects, with custom methods. The only prerequisites are to extend `sfPropelFinder` and to define a protected `$peerClass` property. Then, the object has access to a protected `$criteria` property, which is a Propel Criteria that can be augmented in the usual way. Don't forget to return the current object (`$this`) in the new methods. 
    113113 
    114114For instance, to add a `recent()` method to an article finder: 
     
    126126      ArticlePeer::CREATED_AT, 
    127127      time() - sfConfig::get('app_recent_days', 5) * 24 * 60 * 60, 
    128       Criteria::GREATER_THAN); 
     128      Criteria::GREATER_THAN 
     129    ); 
    129130    return $this; 
    130131  } 
     
    136137 * Handle Joins 
    137138 * Add more magic! 
    138  * Merge with sfPropelImpersonatorPlugin
     139 * Merge with sfPropelImpersonatorPlugin
    139140 
    140141== Changelog ==