Zend_Rest_Client_Resultset toArray proposal

View: New views
1 Messages — Rating Filter:   Alert me  

Zend_Rest_Client_Resultset toArray proposal

by Georgi Sokolov :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi guys and thanks for the great work,
I am unsure if someone else proposed this but wouldn't it be great if we
had toArray method in Zend_Rest_Client_Resultset class, so we can have 2
way array communication between Zend_Rest_Server and Zend_Rest_Client.
Here some sample code I would like to have(I already did that by
extending Zend_Rest_Client & Zend_Rest_Client_Resultset):

in Service binding class:

public function fetchAll() {
        return $this->_language->fetchAll()->toArray();
}

in service client wrapper:

$client = new Liquidsoft_Rest_Client($service_url); //Optionally changed
to Zend_Rest_Client if toArray is implemented in resultset
print_r($client->fetchAll()->get()->toArray());

Thanks,
Georgi
LightInTheBox - Buy quality products at wholesale price