xpdo
xpdo copied to clipboard
Make it possible to find key/value pairs
I use CakePHP at work and I love how easy it is to find key/value pairs.
This would also be very useful in for example MODX. It would make it easier to show the "display name" of a system setting (like the name of the default template) instead of the value for the primary key.
It is often useful to generate an associative array of data from your application’s data. For example, this is very useful when creating
$query = $articles->find('list'); $data = $query->toArray(); // Data now looks like $data = [ 1 => 'First post', 2 => 'Second article I wrote', ];