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
[email protected]
http://osflash.org/mailman/listinfo/osflash_osflash.org