lox/pheasant — pull request #29 by lox (2013-01-18 01:52:50+00:00)
Title: Chaining and() and or() in Criteria now works

As originally designed, the and() and or() methods on a Criteria object didn't chain:

```php
and('llamas = true')->and('quantity > 1');
// results in (quantity > 1)
```

Obviously this wasn't expected, or the desired behavior, but it came about to support complex chaining like:

```php
or(
$c->and('llamas = true', 'quantity > 1'),
'alpaca = true'
);
// results in (llamas = true AND quantity > 1) OR alpaca = true
```

The more I've thought about that syntax, the crazier it is. The above is now accomplished like this:

```php
or(
Criteria::concatAnd('llamas = true', 'quantity > 1'),
'alpaca = true'
);
// results in (llamas = true AND quantity > 1) OR alpaca = true
```

Chaining now works as you'd expect it to:

```php
and('llamas = true')->and('quantity > 1');
// results in ((llamas = true) AND quantity > 1)
```