Hi,
Is it possible to extend \Phalcon\Paginator\Adapter\Model, so that I could add some feature on it? If yes, what is the better way to do this? I have following class in Library folder
<?php
namespace CustomShopping\Libraries\Paginator; // CustomShopping\Libraries is registered in bootstrap file
class Paginator extends \Phalcon\Paginator\Adapter\Model
{
public function __construct(){
parent::__construct();
}
public function customFunction(){
return "Hello world";
}
}
?>
And then in my controller i used it like
$paginator = new CustomShopping\Libraries\Paginator(
array(
'data' => $users,
'limit' => $limit,
'page' => $page,
)
);
and in view i called it like,
$paginator->customFunction();
I get the error CustomShopping\Libraries\Paginator
not found error.
Thanks for the help