[osflash] [announcement] CakeAMFPHP 0.6.0 released

Marcelo de Moraes Serpa celoserpa at gmail.com
Tue Oct 24 11:28:23 EDT 2006


Hi Marco,

This *action*_count is a built-in feature of amfphp, right? What code should
be on the client side for this to work? (AFAIK it only works when you are
using the recordset class).

Also, why do you wrap the array returned by Cake into the Arrayf object?

Cheers,

Marcelo.

On 10/24/06, Marco Madarco <osflash at madarco.it> wrote:
>
> Marcelo de Moraes Serpa ha scritto:
> > Yes too. Ever since I started using CakeAMFPHP I never really thought or
> > needed to use recordsets. And about the paging feature, I guess I could
> > easily implement a custom paging system myself without using the
> built-in
> > recordset.
> >
> If it can help, it is easy to implement the AMF paging feature:
> returning an Arrayf and implementing the method *action*_count:
>
> /**
> * @access remote
> * @pagesize 25
> */
> function getFoo($offset=0, $limit=25) {
> ...
> $data = $this->Foo->findAll(...);
> $r = _arrayft($data, 'Foo');
> return new Arrayf($r, array_keys($r[0]));
> }
> function getFoo_count() { ... }
>
> In the function _arrayft you should take care of the kind of associative
> array returned by findAll:
> array( [0] => array([TABLE] => array(data))) if there is only a single
> table
> array( [TABLE] => array(data) ) otherwise.
>
> I haven't find an easy way to join the arrays if multiple tables are
> returned, any suggestion? :)
> --
> Marco Madarco
>
> _______________________________________________
> osflash mailing list
> osflash at osflash.org
> http://osflash.org/mailman/listinfo/osflash_osflash.org
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://osflash.org/pipermail/osflash_osflash.org/attachments/20061024/9cde1330/attachment.htm


More information about the osflash mailing list