private function getCallbackReturnList($service, $method, $args)
    {
        if ($args != null) {
            $parsedArgs = json_decode($args, true);
            if (!is_array($parsedArgs)) {
                $parsedArgs = explode(',', $args);
            }
        } else {
            $parsedArgs = null;
        }
        $serviceInstance = \Drupal::service($service);

        if (!method_exists($serviceInstance, $method)) {
            throw new \Symfony\Component\DependencyInjection\Exception\BadMethodCallException($this->trans('commands.debug.container.errors.method-not-exists'));

            return $serviceDetail;
        }
        $serviceDetail[] = [
            $this->addGreenTranslationWrapper('commands.debug.container.messages.service'),
            $this->addWrapper($service),
        ];
        $serviceDetail[] = [
            $this->addGreenTranslationWrapper('commands.debug.container.messages.class'),
            $this->addWrapper(get_class($serviceInstance)),
        ];
        $methods = [$method];
        $this->extendArgumentList($serviceInstance, $methods);
        $serviceDetail[] = [
            $this->addGreenTranslationWrapper('commands.debug.container.messages.method'),
            $this->addWrapper($methods[0]),
        ];
        if ($parsedArgs) {
            $serviceDetail[] = [
                $this->addGreenTranslationWrapper('commands.debug.container.messages.arguments'),
                $this->addWrapper(json_encode($parsedArgs, JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE)),
            ];
        }
        $return = call_user_func_array([$serviceInstance,$method], $parsedArgs);
        $serviceDetail[] = [
            $this->addGreenTranslationWrapper('commands.debug.container.messages.return'),
            $this->addWrapper(json_encode($return, JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE)),
        ];
        return $serviceDetail;
    }
private function getCallbackReturnList($service, $method, $args)
    {
        if ($args != null) {
            $parsedArgs = json_decode($args, true);
            if (!is_array($parsedArgs)) {
                $parsedArgs = explode(',', $args);
            }
        } else {
            $parsedArgs = null;
        }
        $serviceInstance = \Drupal::service($service);

        if (!method_exists($serviceInstance, $method)) {
            throw new \Symfony\Component\DependencyInjection\Exception\BadMethodCallException($this->trans('commands.debug.container.errors.method-not-exists'));

            return $serviceDetail;
        }
        $serviceDetail[] = [
            $this->addGreenTranslationWrapper('commands.debug.container.messages.service'),
            $this->addWrapper($service),
        ];
        $serviceDetail[] = [
            $this->addGreenTranslationWrapper('commands.debug.container.messages.class'),
            $this->addWrapper(get_class($serviceInstance)),
        ];
        $methods = [$method];
        $this->extendArgumentList($serviceInstance, $methods);
        $serviceDetail[] = [
            $this->addGreenTranslationWrapper('commands.debug.container.messages.method'),
            $this->addWrapper($methods[0]),
        ];
        if ($parsedArgs) {
            $serviceDetail[] = [
                $this->addGreenTranslationWrapper('commands.debug.container.messages.arguments'),
                $this->addWrapper(json_encode($parsedArgs, JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE)),
            ];
        }
        $return = call_user_func_array([$serviceInstance,$method], $parsedArgs);
        $serviceDetail[] = [
            $this->addGreenTranslationWrapper('commands.debug.container.messages.return'),
            $this->addWrapper(json_encode($return, JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE)),
        ];
        return $serviceDetail;
    }
private function getCallbackReturnList ( $ service , $ method , $ args ) { if ( $ args != null ) { $ parsedArgs = json_decode ( $ args , true ) ; if ( ! is_array ( $ parsedArgs ) ) { $ parsedArgs = explode ( ',' , $ args ) ; } } else { $ parsedArgs = null ; } $ serviceInstance = \ Drupal :: service ( $ service ) ; if ( ! method_exists ( $ serviceInstance , $ method ) ) { throw new \ Symfony \ Component \ DependencyInjection \ Exception \ BadMethodCallException ( $ this -> trans ( 'commands.debug.container.errors.method-not-exists' ) ) ; return $ serviceDetail ; } $ serviceDetail [ ] = [ $ this -> addGreenTranslationWrapper ( 'commands.debug.container.messages.service' ) , $ this -> addWrapper ( $ service ) , ] ; $ serviceDetail [ ] = [ $ this -> addGreenTranslationWrapper ( 'commands.debug.container.messages.class' ) , $ this -> addWrapper ( get_class ( $ serviceInstance ) ) , ] ; $ methods = [ $ method ] ; $ this -> extendArgumentList ( $ serviceInstance , $ methods ) ; $ serviceDetail [ ] = [ $ this -> addGreenTranslationWrapper ( 'commands.debug.container.messages.method' ) , $ this -> addWrapper ( $ methods [ 0 ] ) , ] ; if ( $ parsedArgs ) { $ serviceDetail [ ] = [ $ this -> addGreenTranslationWrapper ( 'commands.debug.container.messages.arguments' ) , $ this -> addWrapper ( json_encode ( $ parsedArgs , JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE ) ) , ] ; } $ return = call_user_func_array ( [ $ serviceInstance , $ method ] , $ parsedArgs ) ; $ serviceDetail [ ] = [ $ this -> addGreenTranslationWrapper ( 'commands.debug.container.messages.return' ) , $ this -> addWrapper ( json_encode ( $ return , JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE ) ) , ] ; return $ serviceDetail ; }
Get callback list.

@param string $service
Service name.
@param string $method
Methods name.
@param array $args
Arguments.

@return array
List of callbacks.
Get callback list .