Exemplo n.º 1
0
 /**
  * Return a method signature
  *
  * @param string $method
  * @throws Exception\InvalidArgumentException
  * @return array
  */
 public function methodSignature($method)
 {
     $table = $this->server->getDispatchTable();
     if (!$table->hasMethod($method)) {
         throw new Exception\InvalidArgumentException('Method "' . $method . '" does not exist', 640);
     }
     $method = $table->getMethod($method)->toArray();
     return $method['prototypes'];
 }
Exemplo n.º 2
0
 /**
  * @group ZF-6034
  */
 public function testPrototypeReturnValueMustReflectDocBlock()
 {
     $server = new Server();
     $server->setClass('ZendTest\\XmlRpc\\TestClass');
     $table = $server->getDispatchTable();
     $method = $table->getMethod('test1');
     foreach ($method->getPrototypes() as $prototype) {
         $this->assertNotEquals('void', $prototype->getReturnType(), var_export($prototype, 1));
     }
 }