Midgard Collector
From OpenPSA Wiki
Collector is a Midgard database query API which works similar to Query Builder. The main difference between the two is that Collector doesn't return MgdSchema objects as results, but an array with user-definable keys. Thus, it is well-suited for performance-critical sections of code.
[edit] Example
$mc = new midgard_collector('midgard_article', 'topic', 123); $mc->add_constraint('name', '<>', "index"); $mc->set_key_property('id'); $mc->add_value_property('title'); $mc->execute(); foreach ($mc->list_keys() as $key => $empty) { echo $mc->get_subkey($key, 'title'); }
In MidCOM, collector should always be called via the DBA class, so that MidCOM ACL checks can be executed.
[edit] Weblinks
http://www.midgard-project.org/documentation/php-midgard_collector/
