From da7600b8cbfbd0ce0ce01fd317bc610215384128 Mon Sep 17 00:00:00 2001 From: Andrey Kutejko Date: Sat, 22 Jun 2013 11:00:29 +0300 Subject: [PATCH] update examples --- README.org | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/README.org b/README.org index 48a55dd..d631221 100644 --- a/README.org +++ b/README.org @@ -37,7 +37,11 @@ This method returns ~true~ on successfull match of ~$url~ and matched parts in ~$matches~ array. - Example: ~RouteExpression::compile('[/ru]/story/')->match('/story/', $matches);~ returns ~true~ and ~$matches~ contains empty string which corresponds to optional part of expression. + Examples. + + ~RouteExpression::compile('[/ru]/story/')->match('/story/', $matches)~ returns ~true~ and ~$matches~ contains empty string which corresponds to optional part of expression. + + ~RouteExpression::compile('/article/:slug')->match('/article/php-is-awesome', $matches)~ returns ~true~ and ~$matches~ contains ~'php-is-awesome'~. ** Reversing @@ -47,3 +51,7 @@ This method substitutes values from ~$matches~ array to the expression and returns url. + Example. + + ~RouteExpression::compile('/article/:slug')->reverse(array('/article/php-is-awesome')~ returns ~'/article/php-is-awesome'~. + -- 2.49.0