From ffef2a8f2cd91b89bd2a5a9f464c55bbc946c206 Mon Sep 17 00:00:00 2001 From: falkolab Date: Thu, 2 Oct 2014 11:12:59 +0400 Subject: [PATCH 1/3] doc fix --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index eba5e5f..20c6b1d 100644 --- a/README.md +++ b/README.md @@ -99,15 +99,15 @@ If we wanted to validate an associative array, we would use a "map" filter: Filterus also ships with a procedural interface for calling filters. - \Filterus\filter($var, $filter); + \Filterus\filter($filter, $var); And - \Filterus\validate($var, $filter); + \Filterus\validate($filter, $var); Any filter is supported (both are basically simple wrappers): - function \Filterus\filter($var, $filter) { + function \Filterus\filter($filter, $var) { return \Filterus\Filter::factory($filter)->filter($var); } From 2ca61fe35a0f0d459ab911956c66dc8d0764b30d Mon Sep 17 00:00:00 2001 From: falkolab Date: Thu, 2 Oct 2014 11:48:37 +0400 Subject: [PATCH 2/3] small doc fix --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 20c6b1d..d6176c9 100644 --- a/README.md +++ b/README.md @@ -79,7 +79,7 @@ If you pass a filter to `Filter::factory()`, it will be returned unmodified. So Complex chaining can also be supported. So if you wanted to check if an array with a minimum size of 4, with numeric keys and containing strings of minimum length 5, that could be built like so: - $filter = Filter::array('min:4', 'int', 'string,min:5'); + $filter = Filter::arrays(‘min:4', 'int', 'string,min:5'); If we wanted to validate an associative array, we would use a "map" filter: From 5209deb06809543dd241d6d8b0a1e618288503f5 Mon Sep 17 00:00:00 2001 From: falkolab Date: Thu, 2 Oct 2014 11:51:44 +0400 Subject: [PATCH 3/3] - --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index d6176c9..1740a32 100644 --- a/README.md +++ b/README.md @@ -79,7 +79,7 @@ If you pass a filter to `Filter::factory()`, it will be returned unmodified. So Complex chaining can also be supported. So if you wanted to check if an array with a minimum size of 4, with numeric keys and containing strings of minimum length 5, that could be built like so: - $filter = Filter::arrays(‘min:4', 'int', 'string,min:5'); + $filter = Filter::arrays('min:4', 'int', 'string,min:5'); If we wanted to validate an associative array, we would use a "map" filter: