gwkunze/Structr — pull request #5 by rpkamp (2014-03-20 18:27:08+00:00)
Title: Added DeferredNode, fixed PrototypeNode::is()

Added a DeferredNode, which can be created via PrototypeNode::is() by passing it a `callable`. A DeferredNode does not have a definition that can be walked, but when it is called (i.e., DeferredNode::_walk_value), it will call the `callable`, and run the value through the result of that `callable`.
This can be interesting in instances where you want to predefine a certain type (say, currency) for use throughout an API and you want to fetch the currencies from a database first to built an enum, but you don't want to do this if the definition isn't used at all since that causes a round trip to the database for nothing.

Example
```php
$struct = Structr::define('currency')->currency()->is(function() use ($db) {
// assume $db instanceof \PDO
$stmt = $db->query('SELECT id FROM currency');
$currencies = array_column($stmt->fetchAll(\PDO::FETCH_ASSOC), 'id');
return Structr::define()->isString()->enum($currencies)->end();
});

// query isn't run yet

Strucrt::ize($something)->is('currency'); // query will run here
```

(array_column from this example is PHP >= 5.5: http://be2.php.net/manual/en/function.array-column.php)