-- Adler Medrado <[EMAIL PROTECTED]> wrote
(on Wednesday, 30 July 2008, 09:48 AM -0300):
> I am trying to create a Zend_Rest_Server but it is not working and always
> return a response like that:
> <rest generator="zend" version="1.0">
> <response>
> <message>An unknown error occured. Please try again.</message>
> </response>
> <status>failed</status>
> </rest>
>
> Does anyone have some example? i think i am doing someting wrong but i am
> following the Documentation and i do not know where look for it.
>
> Below follow the sources:
<snip>
> Example class:
> class Example {
> public function hello($nome)
> {
> return "Hello $nome";
> }
>
> }
You need to read the documentation more carefully. All server
implementations require that you provide docblocks for all methods that
contain, minimally, parameter and return types. For instance, your
example should have the following:
class Example
{
/**
* Hello
*
* @param string $nome
* @return string
*/
public function hello($nome)
{
return "Hello $nome";
}
}
--
Matthew Weier O'Phinney
Software Architect | [EMAIL PROTECTED]
Zend Framework | http://framework.zend.com/