recurly/recurly-client-php — pull request #36 by kainosnoema (2012-06-01 00:53:59+00:00)
Title: Fix un-pageable array results (no href is present), such as invoice/transactions

Certain nested array results are not always part of a pageable collection, so when we parse them into a `Recurly_Pager` object, we need to pre-load the `$_count` property so we can iterate properly.

In order to properly implement this, an accurate count of XML `$node->childNodes` was required, which was being thrown off because we weren't ignoring whitespace nodes. This change then required a slight rewrite of the parser.

Here's a currently broken example that this pull fixes:

``` php
transactions as $transaction) {
echo "$transaction->uuid\n"; // $transaction is NULL
}
```

I added a new test to cover this case, and all tests pass.