From 37cdba1bf5d8729bd57a90bc732805dcc241f04f Mon Sep 17 00:00:00 2001 From: w1n2k Date: Sun, 8 Feb 2015 17:45:16 +0300 Subject: [PATCH] Added doc block about ArrayAdapter; --- README.md | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/README.md b/README.md index 9c592f3..3164317 100644 --- a/README.md +++ b/README.md @@ -72,6 +72,24 @@ class TestController extends \Phalcon\Mvc\Controller { } ``` +### Controller (using Array): +```php +request->isAjax()) { + $array = $this->modelsManager->createQuery("SELECT * FROM \Example\Models\User") + ->execute()->toArray(); + + $dataTables = new DataTable(); + $dataTables->fromArray($array)->sendResponse(); + } + } +} +``` + ### Model: ```php