Calls the process() method of the given class-plugin name.

@param string $plugName the class plugin name (without `Plugin` prefix)
@param array  $params   an array of parameters to send to the process() method

@return string the process() return value
197139
public function classCall($plugName, array $params = array())
    {
        $class  = self::toCamelCase($plugName);
        $plugin = $this->getObjectPlugin($class);

        return call_user_func_array(array($plugin, 'process'), $params);
    }
808243
private function _PluginCallbackExecution($PluginClassName, $HookMethod) {
      if (class_exists($PluginClassName)) {
         $Plugin = new $PluginClassName();
         if (method_exists($PluginClassName, $HookMethod)) {
            $Plugin->$HookMethod();
         }
      }
   }
935595
public function trigger($eventName, array $params = []) {
        $event = clone $this->event;
        $event->setName($eventName);

        // Add optional extra arguments
        foreach ($params as $key => $value) {
            $event->setArgument($key, $value);
        }

        // Fetch current user
        $user = $event->getRequest()->getUser();

        // Trigger all listeners for this event and pass in the event instance
        foreach ($this->getListenersForEvent($eventName) as $listener) {
            $event->setArgument('handler', $listener['handler']);
            $callback = $this->getHandlerInstance($listener['handler']);

            if ($callback instanceof ListenerInterface) {
                $callback = [$callback, $listener['method']];
            }

            $users = $listener['users'];

            if (!$this->triggersFor($user, $users)) {
                continue;
            }

            $callback($event);

            if ($event->isPropagationStopped()) {
                break;
            }
        }

        return $this;
    }
183959
public function callFunction($functionName, $parameters)
    {
        $parameters = is_array($parameters) ? $parameters : array();
        $response = call_user_func_array(array($this->getObject(), $functionName), $parameters);

        return $response;
    }
87940
public function main($plugin = null)
    {
        $filename = 'bootstrap';
        if ($this->params['cli']) {
            $filename .= '_cli';
        }

        $this->bootstrap = ROOT . DIRECTORY_SEPARATOR . 'config' . DIRECTORY_SEPARATOR . $filename . '.php';

        if (!$plugin) {
            $this->err('You must provide a plugin name in CamelCase format.');
            $this->err('To load an "Example" plugin, run `cake plugin load Example`.');

            return false;
        }

        $options = $this->makeOptions();

        $app = APP . 'Application.php';
        if (file_exists($app) && !$this->param('no_app')) {
            $this->modifyApplication($app, $plugin, $options);

            return true;
        }

        return $this->_modifyBootstrap($plugin, $options);
    }
32708
protected function processGetValue($value, $params = [], $processCallbacks = true)
    {
        return $processCallbacks ? $this->processCallback($this->onGetCallback, $value, $params) : $value;
    }
172581
public function className($plugin = true) {
		return (($plugin && !empty($this->plugin)) ? $this->plugin . '.' : '') . $this->name;
	}
1232827
public function signalize($signalName, array $parameters = [])
    {

        $signal = $this->getSignal($signalName);

        foreach ($this->receivers($signal->name) as $receiver) {

            $this->callBeforeListeners('signalize', [$receiver, $signal, $parameters]);

            $response = $this->client->post($receiver->getUrl(), [
                'parameters' => $parameters
            ], $this->contentType);

            $this->callAfterListeners('signalize', [$receiver, $signal, $parameters, $response]);

        }

        return;
    }
652022
public function call($param = null)
    {
        // get the class within the correct namespace
        // initiate object
        $object = $this->prepareObject(new $this->class());

        $return    = new \SplFixedArray(2);
        $return[1] = $object;

        if (!empty($this->method)) {
            if (!empty($param) && !empty($this->param)) {
                $return[0] = $object->{$this->method}(array_merge((array)$this->param, (array)$param));

                return $return;
            }
            $return[0] = $object->{$this->method}();

            return $return;
        }

        return $return;
    }
1186842
public function execute($commandName, $params = [])
    {
        $className = str_replace(' ', '', ucwords(str_replace('-', ' ', $commandName))) . 'Command';
        $clearCommandName = $this->getNamespace() . "\\console\\" . $className;
        if (!class_exists($clearCommandName)) $clearCommandName = '\\app\\console\\' . $className;
        if (!class_exists($clearCommandName)) $clearCommandName = 'PhpDevil\\framework\\console\\commands\\' . $className;
        if (!class_exists($clearCommandName)) die("\nCommand " . $commandName . " not found");
        (new $clearCommandName)->execute($params);
    }
583514
private function getPhpProcess($fileName, ArrayObject $args)
    {
        $cmd = sprintf('%s %s %s', PHP_BINARY, $fileName, $args->map('escapeshellarg')->implode(' '));
        return new Process($cmd, dirname($fileName), null, null, 10);
    }
1285145
protected function processDefinitionParameters(array $params, stdClass $definition) {
		foreach ($params as $param) {
			$name = $param->getName();
			
			if ($name === 'arguments') {
				$content = $param->getContent();
				
				if (! empty($content)) {
					$definition->arguments = $this->processArguments($content);
				}
				continue;
			}
			
			if ($name === 'calls') {
				$content = $param->getContent();
				
				if (! empty($content)) {
					$definition->calls = $this->processCalls($content);
				}
				continue;
			}
			
			throw new InvalidConfig('Unknown element "' . $param->getName() . '" in service devinition', null, null, $param);
		}
	}
483402
public function call($methodName, array $params = array())
    {
        $options = array_merge($this->defaultApiOptions, $this->createConfigByMethodName($methodName));
        if (in_array($methodName, $this->postMethodNames)) {
            if (!($methodName == 'account/settings' && empty($params))) {
                $options['http'] = 'post';
            }
        }
        return $this->internalCall($methodName, $options, $params);
    }
681231
public function call($command, array $params = [])
    {
        $params['command'] = $command;
        $this->lastOutput = new BufferedOutput();

        return $this->find($command)->run(new ArrayInput($params), $this->lastOutput);
    }
166288
final public function execute(...$args)
    {
        $className = get_class($this);

        if (!method_exists($this, 'process')) {
            throw new RuntimeException(
                sprintf(
                    'Context "%s" should have process method',
                    $className
                )
            );
        }

        $process = new ReflectionMethod($className, 'process');

        if (!$process->isProtected()) {
            throw new RuntimeException('Method "process" should be protected');
        }

        return call_user_func_array([$this, 'process'], $args);
    }
290330
public function process($options)
    {
        $tool = sprintf('php %s %s %s', $this->toolPathFinder->find('phpunit-randomizer'), '--order rand', $options);

        $process = new Process($tool);

        return $this->runProcess($process);
    }
443746
private function processRequest($params = null)
    {
        // Ensure this api is currently enabled/supported
        $this->assertEnabled();

        // Instantiate requester
        $requestor = new Requestor($this->config);

        switch ($this->config['dataFormat']) {
            case 'xml':
                // Do nothing special for XML
                break;
            case 'json':
                // Validate and sanitize parameters (json decode/encode)
                if ($this->config['paramValidationEnabled']) {
                    $params_decoded = json_decode($params, TRUE);
                    $params_decoded = $this->validateApiParameters($this->keys, $params_decoded);
                    // Add URI method and version to payload
                    $params_decoded['_method'] = $this->id;
                    $params_decoded['_version'] = $requestor->version;
                    $params = json_encode($params_decoded);
                }
                break;
            case 'array':
                // Validate and sanitize parameters
                if ($this->config['paramValidationEnabled']) {
                    $params = $this->validateApiParameters($this->keys, $params);
                } else {
                    $params = $this->setAuthenticationParametersNoValidation($params);
                }
                // Add URI method and version to payload
                $params['_method'] = $this->id;
                $params['_version'] = $requestor->version;
                break;
            default:
                throw new ApiException(
                    'Invalid dataFormat: '.$this->config['dataFormat']
                );
        }

        // Send request
        $response = $requestor->request('post', $this->id, $params);

        // Return result
        $this->lastApiResponse = $response;
        return $response;
    }