Ejecuta el Cron mediante el metodo indicado
Este es utilizado por el metodo forward del CronController y de uso interno al modulo
@param string $cron
@param string $method
@param array $propertiesEsp
483539
public function executeCron($cron, $method= "index", $propertiesEsp= NULL){
        $dir= PATHAPP . 'src/crons/' . $cron . '.php';
        //Analiza si existe el archivo
        if(file_exists($dir)){
            $cronIns= $this->instanceClass($dir, $cron, $propertiesEsp);
            //Analiza si existe el metodo indicado
            if(method_exists($cronIns, $method)){
                $cronIns->$method($this->cronRequest, $this->cronResponse);                
            }else{
                Error::general_error('Cron Controller Error', 'The Cron Controller ' . $cron . ' dont implement the method ' . $method . '()');
            }
        }else{
            Error::general_error('Cron Controller Error', 'The Cron Controller ' . $cron . ' dont exist');
        }
    }
291213
public function run($url = null, $method = null)
    {
        $this->startSession();
        if(!$this->inited)
            $this->init();
        Profiler::start('boot', 'boot');
//        Log::i('Welcome to GLFramework');
//        Log::i('· Version: ' . $this->getVersion());
//        Log::i('· PHP Version: ' . PHP_VERSION);
//        Log::i('· Server Type: ' . Server::get('SERVER_SOFTWARE', 'unknown'));
//        Log::i('· Server IP: ' . Server::get('SERVER_ADDR', '127.0.0.1') . ':' . (Server::get('SERVER_PORT', '0')));
//        Log::i('· Current User: ' . get_current_user());
//        Log::i('· Current Folder: ' . realpath('.'));
//        Log::i('· Extensiones de PHP: ');
//        Log::i(get_loaded_extensions());
//        Log::i('· Modules priority: ');
//        Log::i(array_map(function($module) { return $module->title; }, $this->manager->getModules()));

        if(!$this->setupSSL()) {
            return $this->redirectHttps();
        }
        Events::dispatch('onCoreInit');
        Profiler::stop('boot');
        Profiler::start('database');
        $this->setupDatabase();
        Profiler::stop('database');
        $this->manager->checkModulesPolicy();
        Events::dispatch('onCoreStartUp', array($this->startTime, $this->initTime));
        $response = $this->manager->run($url, $method);
        Events::dispatch('onAppStop');
        Log::i('Sending response...');
        if ($response) {
            $response->setUri($url);
        }
        $this->response = $response;
        return $response;
    }
768474
protected function writeCacheRecord($method, $args)
    {
        $this->checkReservedKeyPattern($args['key']);

        call_user_func_array([$this, 'storeKeywords'], array_only($args, ['key', 'minutes', 'keywords']));

        if (! $this->operatingOnKeywords()) {
            $this->resetCurrentKeywords();
        }

        call_user_func_array(['parent', $method], array_values($args));
    }
1084720
protected function useParentMethodAndExternals($method, $parameters, $includeExternals = false, $returnOne = false)
    {
        $result = call_user_func_array([
            $this,
            sprintf('parent::%s', $method),
        ], $parameters);
        if ($includeExternals === true && (($returnOne === true && $result === null) || $returnOne === false)) {
            $result = $this->useExternalSchemas($method, $parameters, $result, $returnOne);
        }
        return $result;
    }
1015977
public function call($method, array $params = array())
    {
        $params = array($this->getSession(), $method, $params);
        return $this->getClient()->call('call', $params);
    }
1331873
public function addCron(CronInterface $cron, $alias, $priority, $arguments)
    {
        if (!isset($this->crons[$priority])) {
            $this->crons[$priority] = array();
        }
        $cron->setAlias($alias);
        $cron->addArguments($arguments);
        $cron->addPriority($priority);
        $this->crons[$priority][$alias] = $cron;
    }
321563
private function assignProperty(string $method, string $property, $value)
    {
        $mutatorMethod = $method.'Attribute';

        // on prépare la valeur à sauvegarder dans la BDD
        if (method_exists($this, $mutatorMethod)) {
            $this->toSave[$property] = $this->$mutatorMethod($value);
        } else {
            $this->toSave[$property] = $value;
        }

        // on assigne la valeur à la propriétée
        $this->$property = $this->toSave[$property];
    }
1104800
public function setCustomMethod(Method $method)
    {
        $this->setMethod(self::METHOD_CUSTOM);
        $this->methods[$this->method] = get_object_vars($method);

        $this->loadSettings();
    }
695393
private function setMethod($Resource, $method) {
        switch ($method) {
            case Request::METHOD_GET:
                curl_setopt($Resource, CURLOPT_HTTPGET, true);
                break;
            case Request::METHOD_POST:
                curl_setopt($Resource, CURLOPT_POST, true);
                break;
        }
    }
1087404
function(cron, crons, server) {
  if(!containCron(cron.id, crons)) {
    server.crons.push(cron);
  } else {
    logger.warn('cron is duplicated: %j', cron);
  }
}
521491
protected function dispatch($method, $params)
    {
        foreach ($this->plugins as $plugin) {
            $plugin->$method(...$params);
        }
    }
1152224
public function updateWith(Cron $cron, $key)
    {
        $this->cronManipulator->replace($this->updateContent($cron, $key));
    }
132425
public function request($method, $uri, array $parameters = [], array $options = [])
    {
        $parameters['key'] = $this->apiKey;
        $options['query'] = $parameters;

        $uri = $this->apiUrl.$uri.'/json';

        $this->log($method, $uri, $options);
        $response = $this->httpClient->request($method, $uri, $options);

        $result = $this->decoder->decode($response);

        if (!isset($result['status'])) {
            throw new ClientErrorException('Missing return status');
        }

        if (!in_array($result['status'], [
                'OK',
                'ZERO_RESULTS',
            ], true)) {
            throw new ClientErrorException(sprintf('Invalid return status "%s"', $result['status']));
        }

        return $result;
    }
367647
public function addCron(CronInterface $cron, string $alias, int $priority, string $expression, string $arguments)
    {
        if (!isset($this->crons[$priority])) {
            $this->crons[$priority] = [];
        }
        $cron->setAlias($alias);
        $cron->addArguments($arguments);
        $cron->addPriority($priority);
        $cron->addExpression($expression);
        $this->crons[$priority][$alias] = $cron;
    }
279264
public function commit($method, $url, $params = [], $options = [])
    {
        $userAgent = [
            'bindings_version' => $this->config['version'],
            'lang'             => 'php',
            'lang_version'     => phpversion(),
            'publisher'        => 'conekta',
            'uname'            => php_uname(),
        ];

        $request = [
            'exceptions'      => false,
            'timeout'         => '80',
            'connect_timeout' => '30',
            'headers'         => [
                'Accept'                      => "application/vnd.conekta-v{$this->config['version']}+json",
                'Accept-Language'             => $this->config['locale'],
                'Authorization'               => 'Basic '.base64_encode($this->config['private_key'].':'),
                'Content-Type'                => 'application/json',
                'RaiseHtmlError'              => 'false',
                'X-Conekta-Client-User-Agent' => json_encode($userAgent),
                'User-Agent'                  => 'Conekta PayMeBindings/'.$this->config['version'],
            ],
        ];

        if (!empty($params)) {
            $request[$method === 'get' ? 'query' : 'json'] = $params;
        }

        $rawResponse = $this->getHttpClient()->{$method}($url, $request);
        $statusCode = $rawResponse->getStatusCode();

        $response = $statusCode == 200
            ? $this->parseResponse($rawResponse->getBody())
            : $this->responseError($rawResponse->getBody(), $statusCode);

        return $this->respond($response);
    }
1032824
public function setPaymentMethod($method)
    {
        try {
            if ($method instanceof PagSeguroDirectPaymentMethods) {
                $this->paymentMethod = $method;
            } else {
                $this->paymentMethod = new PagSeguroDirectPaymentMethods($method);
            }
        } catch (Exception $e) {
            die($e->getMessage());
        }
    }
591516
public function execute($method, $url, array $query = [], array $headers = [])
    {
        // Merge global and request headers
        $headers = array_merge(
            Arr::get($this->config, 'headers', []),
            $headers
        );

        // Merge global and request queries
        $query = array_merge(
            Arr::get($this->config, 'query', []),
            $query
        );

        $this->errors = null;

        $curl = curl_init();

        // Set options
        curl_setopt_array($curl, [
            CURLOPT_URL => $this->getUrl($url),
            CURLOPT_HTTPHEADER => $headers,
            CURLOPT_CONNECTTIMEOUT => 20,
            CURLOPT_TIMEOUT => 90,
            CURLOPT_RETURNTRANSFER => 1,
            CURLOPT_SSL_VERIFYPEER => 0,
            CURLOPT_SSL_VERIFYHOST => 0,
            CURLOPT_HEADER => 1,
            CURLINFO_HEADER_OUT => 1,
            CURLOPT_VERBOSE => 1,
        ]);

        // Setup method specific options
        switch ($method) {
            case 'PUT':
            case 'PATCH':
            case 'POST':
                curl_setopt_array($curl, [
                    CURLOPT_CUSTOMREQUEST => $method,
                    CURLOPT_POST => true,
                    CURLOPT_POSTFIELDS => $query,
                ]);
                break;

            case 'DELETE':
                curl_setopt($curl, CURLOPT_CUSTOMREQUEST, 'DELETE');
                break;

            default:
                curl_setopt($curl, CURLOPT_CUSTOMREQUEST, 'GET');
                break;
        }

        // Make request
        curl_setopt($curl, CURLOPT_HEADER, true);
        $response = curl_exec($curl);

        // Set HTTP response code
        $this->http_code = curl_getinfo($curl, CURLINFO_HTTP_CODE);

        // Set errors if there are any
        if (curl_errno($curl)) {
            $this->errors = curl_error($curl);
        }

        // Parse body
        $header_size = curl_getinfo($curl, CURLINFO_HEADER_SIZE);
        $header = substr($response, 0, $header_size);
        $body = substr($response, $header_size);

        curl_close($curl);

        return [$body, $this->parseHeaders($header)];
    }