public function methodSignature($method)
    {
        if (!is_string($method) || !isset($this->server[$method])) {
            throw new \InvalidArgumentException('Invalid method');
        }

        $reflector  = $this->server[$method]->getReflector();
        $doc        = $reflector->getDocComment();
        if ($doc === false) {
            return 'undef';
        }

        $tags       = static::extractTypes($doc);
        $returnType = static::adaptType($tags['retval']);
        if ($returnType === null) {
            return 'undef';
        }

        $params     = array();
        foreach ($reflector->getParameters() as $param) {
            if (!isset($tags['params'][$param->getName()])) {
                return 'undef';
            }
            $type       = static::adaptType($tags['params'][$param->getName()]);
            if ($type === null) {
                return 'undef';
            }
            $params[]   = $type;
        }

        return array(array_merge(array($returnType), $params));
    }
public function methodSignature($method)
    {
        if (!is_string($method) || !isset($this->server[$method])) {
            throw new \InvalidArgumentException('Invalid method');
        }

        $reflector  = $this->server[$method]->getReflector();
        $doc        = $reflector->getDocComment();
        if ($doc === false) {
            return 'undef';
        }

        $tags       = static::extractTypes($doc);
        $returnType = static::adaptType($tags['retval']);
        if ($returnType === null) {
            return 'undef';
        }

        $params     = array();
        foreach ($reflector->getParameters() as $param) {
            if (!isset($tags['params'][$param->getName()])) {
                return 'undef';
            }
            $type       = static::adaptType($tags['params'][$param->getName()]);
            if ($type === null) {
                return 'undef';
            }
            $params[]   = $type;
        }

        return array(array_merge(array($returnType), $params));
    }
public function methodSignature ( $ method ) { if ( ! is_string ( $ method ) || ! isset ( $ this -> server [ $ method ] ) ) { throw new \ InvalidArgumentException ( 'Invalid method' ) ; } $ reflector = $ this -> server [ $ method ] -> getReflector ( ) ; $ doc = $ reflector -> getDocComment ( ) ; if ( $ doc === false ) { return 'undef' ; } $ tags = static :: extractTypes ( $ doc ) ; $ returnType = static :: adaptType ( $ tags [ 'retval' ] ) ; if ( $ returnType === null ) { return 'undef' ; } $ params = array ( ) ; foreach ( $ reflector -> getParameters ( ) as $ param ) { if ( ! isset ( $ tags [ 'params' ] [ $ param -> getName ( ) ] ) ) { return 'undef' ; } $ type = static :: adaptType ( $ tags [ 'params' ] [ $ param -> getName ( ) ] ) ; if ( $ type === null ) { return 'undef' ; } $ params [ ] = $ type ; } return array ( array_merge ( array ( $ returnType ) , $ params ) ) ; }
Return possible signatures for a method.

\param string $method
Name of the method.

\retval array
An array containing:
- The return type of the method as its first value
- The types for the method's parameters in the following values
Return possible signatures for a method .