Each "kQuery" object would be a hash of data objects that certain operations can be applied to, much in the same way jQuery objects are a hash of javascript objects.
The syntax is essentially like this so far (think CSS2 selectors, sort-of):
Code: Select all
// select by id
kq('datatype #id'); //--> selects the data object (not just a row) with the id "id"
// comma separates cumulative queries
kq('datatype #id, datatype #id2'); //--> selects the 2 data objects with the ids "id" and "id2"
// find by property
kq('datatype [property]'); //--> selects data objects that have this property
// find by property value
kq("datatype [property='value']"); //--> selects data objects where property = value
// find by value
kq("datatype [='value']"); //--> selects data objects where any property = value
// find by value test
kq("datatype [property>=5]");
// find by neg. value test
kq("datatype [property!='bob']");
//...and so onCode: Select all
echo kq('datatype #id')->each(strtoupper($this->name))->toXML();NSG - I just know this looks appealing to you!