Controller/JsonRpcController.php
public function addMethod($alias, $service, $method, $overwrite = false)
    {
        if (!isset($this->functions)) $this->functions = array();
        if (isset($this->functions[$alias]) && !$overwrite) {
            throw new \InvalidArgumentException('JsonRpcController: The function "' . $alias . '" already exists.');
        }
        $this->functions[$alias] = array(
            'service' => $service,
            'method' => $method
        );
    }
public function addMethod($alias, $service, $method, $overwrite = false)
    {
        if (!isset($this->functions)) $this->functions = array();
        if (isset($this->functions[$alias]) && !$overwrite) {
            throw new \InvalidArgumentException('JsonRpcController: The function "' . $alias . '" already exists.');
        }
        $this->functions[$alias] = array(
            'service' => $service,
            'method' => $method
        );
    }
public function addMethod ( $ alias , $ service , $ method , $ overwrite = false ) { if ( ! isset ( $ this -> functions ) ) $ this -> functions = array ( ) ; if ( isset ( $ this -> functions [ $ alias ] ) && ! $ overwrite ) { throw new \ InvalidArgumentException ( 'JsonRpcController: The function "' . $ alias . '" already exists.' ) ; } $ this -> functions [ $ alias ] = array ( 'service' => $ service , 'method' => $ method ) ; }
Add a new function that can be called by RPC

@param string $alias The function name used in the RPC call
@param string $service The service name of the method to call
@param string $method The method of $service
@param bool $overwrite Whether to overwrite an existing function
@throws \InvalidArgumentException
Add a new function that can be called by RPC