I have two Controller
Project\Frontend\Controllers\IndexController
...
and
Project\Backend\Controllers\TestController
<?php
namespace Project\Backend\Controllers;
use Project\Backend\Models\Teams;
class TestController extends \Phalcon\Mvc\Controller
{
public function indexAction()
{
$this->dispatcher->forward(array(
"action" => "list"
));
}
public function listAction()
{
$this->tag->setTitle('List');
$moods = Moods::find();
$paginator = new \Phalcon\Paginator\Adapter\Model(array(
"data" => $moods,
"limit"=> 20,
"page" => 1
));
$page = $paginator->getPaginate(); // Problem
$this->view->setVar('moods', $page->items);
}
}
When i call method getPaginate()
, Phalcon is return IndexController
:(, but when remove this line, Phalcon return TestController.
My server:
Phalcon version 1.3.1
cPanel
Apache/2.2.27
PHP Version 5.5.11
PHP loaded extensions:
Core, date, ereg, libxml, openssl, pcre, sqlite3, zlib, bcmath, calendar, ctype, curl, dom, filter, ftp, gd, hash, iconv, SPL, json, mbstring, mcrypt, session, mysql, standard, Phar, posix, Reflection, mysqlnd, SimpleXML, sockets, imap, tokenizer, xml, xmlreader, xmlwriter, cgi-fcgi, PDO, pdo_sqlite, mongo, pdo_mysql, phalcon
Please help me