I was on my mobile at the time of posting the reply, otherwise I'd have
given you an example as well :) Glad I could help!
On Tuesday, 3 June 2014 07:17:58 UTC+2, Reuben wrote:
>
> Oh, that's handy. As you can see, I've zero experience in anonymous
> functions.
>
> For those at home:
>
> $name = 'CakePHP';
>
> $query = $articles->find();
>
> $query->matching('Tags', function($q) use ($name){
> return $q->where(['Tags.name' => $name]);});
>
>
> On Tuesday, 3 June 2014 14:45:14 UTC+10, Dakota wrote:
>>
>> Use the use statement. See
>> http://www.php.net/manual/en/functions.anonymous.php example 3 for an
>> example.
>
>
--
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP
---
You received this message because you are subscribed to the Google Groups
"CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/d/optout.