thekid/rfc — Issue #99: RFC 0099: New rdbms.finder API
Author: thekid
Created: 2011-10-09 15:03:32+00:00
State: open

Scope of Change
====
The new finder API will assist in finding DataSet objects.

Rationale
====
Make it unnecessary to extend the DataSet objects.

Functionality
====

Current
----

```php
doSelect(new Criteria(Restrictions::allOf(
Restrictions::like('title', 'Hello%'),
Restrictions::greaterThan('valid_from', DateUtil::getMidnight(Date::now()))
));
$iterator= News::getPeer()->iteratorFor(new Criteria());
$entity= News::getByNews_id(1);
?>
```

New
----

```php
findAll($nf->todaysHelloNews());
$iterator= $nf->iterate($nf->all());
$entity= $nf->find($nf->byPrimary(1));
?>
```

Finder class
----

```php

```

Security considerations
====
n/a

Speed impact
====
n/a

Dependencies
====
n/a

Related documents
====
- http://xp-framework.net/rfc/contrib/rfc0099.diff
Implementing patch

Comments
====