From cfccddaf150cf610b9efa037e25887871371eb8d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?K=C3=A9vin=20Gomez?= Date: Thu, 12 Oct 2017 13:40:37 +0200 Subject: [PATCH] Make it clearer that you can filter native collections (of arrays or objects) --- doc/filter.md | 7 ++++++- doc/index.md | 1 + 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/doc/filter.md b/doc/filter.md index 0eb5e1b..e527dd8 100644 --- a/doc/filter.md +++ b/doc/filter.md @@ -5,7 +5,9 @@ This guide will show you how to filter any kind of target using a simple languag Here is a summary of what you will have to do: - * [instantiate the RulerZ engine](writing_rules.md#step-1-instantiate-the-rulerz-engine) ; + * [instantiate the RulerZ engine](writing_rules.md#step-1-instantiate-the-rulerz-engine) + and be sure to **include an instance of `\RulerZ\Target\Native\Native` to the + compilation targets** ; * [write a rule](writing_rules.md#step-2-write-a-rule) ; * [filter your target](#filter-your-target). @@ -21,6 +23,9 @@ $users = [ ]; ``` +**Note:** RulerZ will work the same way, whether you want to filter a collection +of arrays or a collection of objects. + ## Filter your target Let's say that we want to retrieve the female players having at least 30 points. diff --git a/doc/index.md b/doc/index.md index ec4cdce..e2461c7 100644 --- a/doc/index.md +++ b/doc/index.md @@ -26,6 +26,7 @@ composer require 'kphoen/rulerz' ## Cookbooks + * [Using native PHP arrays or objects](filter.md) * [Using Doctrine ORM](cookbooks/doctrine_orm.md) * [Using Pomm](cookbooks/pomm.md) * [Using Elasticsearch and ruflin/Elastica](cookbooks/ruflin_elastica.md)