/** * 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']; }
/** * @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)); } }