[Flow] FlowQuery in PHP instead of in Eel?

Jacob Floyd cognifloyd at gmail.com
Sat Jul 13 12:45:28 CEST 2013


I want to play with a collection of objects. I'm planning to use Eel/FlowQuery within the YAML configuration file to work with that collection of objects, but I also want to be able to work with the collection from within PHP.

Is there a good way to run FlowQuery operations in PHP?
eg could I do q($objectCollection)->filter($fizzleString)->children()->count()

I guess I could setup an service of some kind that has an Eel context setup, but then you'll see something like:

function fooBar() {
$eelService->evaluate('q(objectCollection).filter(' . $this->$fizzleString . ').children().count()')
$eelService->evaluate(...)
$eelService->evaluate(...)
$eelService->evaluate(...)
$eelService->evaluate(...)
$eelService->evaluate(...)
$eelService->evaluate(...)
}

I think that's not an elegant solution to have to play with strings to run the operations from within PHP.

Thoughts?

Thanks!
Jacob Floyd


More information about the Flow mailing list