The method is in the DataSource object. Hence, you don't see an error
when you call it properly.

On Tue, Sep 11, 2012 at 8:59 AM, Salines <nikola.parad...@gmail.com> wrote:
> Hi,
>
> Could someone of you explain the following:
>
> I have made the datasource, where I have a simple custom method, through
> which calls the external data and return results within, ie the total number
> of posts.
>
> public function totalfeeds () {
>
> // get data from remote source
>
> }
>
>
>
> How can a call method  within my model, in function paginateCount.
>
> if  put the
>
> public function paginateCount ($conditions = null, $recursive = 0, $extra =
> array ()) {
>      $countdata = $this-> totalfeeds ();
> return $countdata;
> }
>
> get an error from the title, Fatal Error : Call to undefined method
> MydataSource::query().
>
>
> CRUD methods in the DataSource works great, I just need this custom method
> to successfully worked pagination. On a remote source, the total number of
> posts is not displayed when I call the read method.
> If I use $this->getDataSource()->totalfeeds(); ii don't see error..
>
> I hope you understand what I'm looking for :)
>
> Thanks
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "CakePHP" group.
> To post to this group, send email to cake-php@googlegroups.com.
> To unsubscribe from this group, send email to
> cake-php+unsubscr...@googlegroups.com.
> Visit this group at http://groups.google.com/group/cake-php?hl=en-US.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com.
To unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php?hl=en-US.


Reply via email to