[processOptionApiClient description]
@return [type] [description]
495633
public function processOptionApiClient()
    {
        $this->alert('API CLIENT PROCESS');

        // Verify option TABLE
        if (!in_array(strtoupper(trim($this->option('api-client'))), ['N','NO','FALSE'])) {
            $this->apiLumen = true;
        }

    }
284694
private function getApiKey()
    {
        if ($this->options['api-version'] == 0) {
            if (!empty($this->options['secret'])) {
                return $this->options['secret'];
            }
        } elseif ($this->options['api-version'] == 1) {
            if (!empty($this->options['api-key'])) {
                return $this->options['api-key'];
            }
        }
        if (!empty(getenv('WPC_API_KEY'))) {
            return getenv('WPC_API_KEY');
        }
        return '';
    }
180123
public function process()
	{
		$view = $this->getView();
		$context = $this->getContext();

		if( $view->param( 'c_step' ) !== 'process'
			|| $view->get( 'standardErrorList', [] ) !== []
			|| $view->get( 'standardStepActive' ) !== null
		) {
			return;
		}

		try
		{
			$orderCntl = \Aimeos\Controller\Frontend::create( $context, 'order' );
			$basketCntl = \Aimeos\Controller\Frontend::create( $context, 'basket' );


			if ( $view->param( 'cs_order', null ) !== null )
			{
				parent::process();

				$basket = $basketCntl->store();
				$orderItem = $orderCntl->add( $basket->getId(), ['order.type' => 'web'] )->store();

				$context->getSession()->set( 'aimeos/orderid', $orderItem->getId() );
			}
			elseif ( $view->param( 'cp_payment', null ) !== null )
			{
				$parts = \Aimeos\MShop\Order\Item\Base\Base::PARTS_ALL;
				$orderItem = $orderCntl->get( $context->getSession()->get( 'aimeos/orderid' ), false );
				$basket = $basketCntl->load( $orderItem->getBaseId(), $parts, false );
			}
			else
			{
				return;
			}

			$total = $basket->getPrice()->getValue() + $basket->getPrice()->getCosts();
			$services = $basket->getService( \Aimeos\MShop\Order\Item\Base\Service\Base::TYPE_PAYMENT );

			if( $services === [] || $total <= 0 && $this->isSubscription( $basket->getProducts() ) === false )
			{
				$orderCntl->save( $orderItem->setPaymentStatus( \Aimeos\MShop\Order\Item\Base::PAY_AUTHORIZED ) );
			}
			elseif( ( $form = $this->processPayment( $basket, $orderItem ) ) !== null )
			{
				$view->standardUrlNext = $form->getUrl();
				$view->standardMethod = $form->getMethod();
				$view->standardProcessParams = $form->getValues();
				$view->standardUrlExternal = $form->getExternal();
				$view->standardHtml = $form->getHtml();

				return;
			}

			$view->standardUrlNext = $this->getUrlConfirm( $view, [], [] );
			$view->standardMethod = 'POST';
		}
		catch( \Aimeos\Client\Html\Exception $e )
		{
			$error = array( $context->getI18n()->dt( 'client', $e->getMessage() ) );
			$view->standardErrorList = $view->get( 'standardErrorList', [] ) + $error;
		}
		catch( \Aimeos\Controller\Frontend\Exception $e )
		{
			$error = array( $context->getI18n()->dt( 'controller/frontend', $e->getMessage() ) );
			$view->standardErrorList = $view->get( 'standardErrorList', [] ) + $error;
		}
		catch( \Aimeos\MShop\Exception $e )
		{
			$error = array( $context->getI18n()->dt( 'mshop', $e->getMessage() ) );
			$view->standardErrorList = $view->get( 'standardErrorList', [] ) + $error;
		}
		catch( \Exception $e )
		{
			$error = array( $context->getI18n()->dt( 'client', 'A non-recoverable error occured' ) );
			$view->standardErrorList = $view->get( 'standardErrorList', [] ) + $error;
			$this->logException( $e );
		}
	}
294516
function _processOptions (options) {
        // Options parsing
        var
            name,
            maxLen;
        if (options instanceof Array) {
            options = gpf.Parameter.parse([{
                name: "port",
                type: "number",
                defaultValue: 80,
                prefix: "port"
            }, {
                name: "root",
                type: "string",
                defaultValue: ".",
                prefix: "root"
            }, {
                name: "chunkSize",
                type: "number",
                defaultValue: 65536,
                prefix: "chunk"
            }, gpf.Parameter.VERBOSE, gpf.Parameter.HELP], options);
        }
        // Server boot trace
        console.log("GPF " + gpf.version() + " web server");
        if (options.root === ".") {
            options.root = process.cwd();
        }
        if (options.verbose) {
            maxLen = 0;
            for (name in options) {
                if (options.hasOwnProperty(name)) {
                    if (name.length > maxLen) {
                        maxLen = name.length;
                    }
                }
            }
            ++maxLen;
            for (name in options) {
                if (options.hasOwnProperty(name)) {
                    console.log([
                        "\t",
                        name,
                        (new Array(maxLen - name.length + 1)).join(" "),
                        ": ",
                        options[name]
                    ].join(""));
                }
            }
        }
        return options;
    }
621234
public function process() {
		$route = $this->findFirstMatchingRoute();
		if( !$route ) {
			// Not found, look for an alternative (with /)
			$route = $this->findFirstMatchingRoute(true);
			if( $route ) {
				// Alternative found, try to redirect to this one
				$r = $this->redirect($route);
				if( $r ) {
					// Redirect
					return $r;
				}
				// Unable to redirect, throw not found
				$route = null;
			}
		}
		return $this->processRoute($route);
	}
920879
private function processSelect()
    {
        $this->processTableDefinition();
        $this->processFieldDefinition();
        $this->processFilterDefinition();
        $this->processParamsDefinition();
        $this->processGroupByDefinition();
        $this->processHavingDefinition();
        $this->processJoinDefinition();
        $this->processOrderDefinition();
        $this->processLimitDefinition();
    }
1225541
public function getAPI()
    {
        if (!isset($this->_api)) {
            $session = AnRequest::get('session.oauth', 'raw', array());
            $session = new AnConfig($session);
            $api = pick($this->getRequest()->server, $session->api);

            if (!$api) {
                return;
            }

            //get the api server from the request
            $this->_api = $this->getService('com:connect.oauth.service.'.$api);

            if (!$this->_consumer) {
                $name = $this->_api->getName();
                $key = get_config_value('com_connect.'.$name.'_key');
                $secret = get_config_value('com_connect.'.$name.'_secret');
                $query = array(
                    'option=com_'.$this->_mixer->getIdentifier()->package,
                     'view='.$this->_mixer->getIdentifier()->name,
                     'server='.$this->server,
                     'get=accesstoken',
                );

                // if ($this->oid) {
                //    $query[] = 'oid='.$this->oid;
                // }

                $callback = route(implode($query, '&'), true);

                $this->_consumer = new ComConnectOauthConsumer(new AnConfig(array(
                    'key' => $key,
                    'secret' => $secret,
                    'callback_url' => (string) $callback,
                )));
            }

            //set the consumer
            $this->_api->setConsumer($this->_consumer);
            $this->_api->setToken($session->token);
        }

        return $this->_api;
    }
1279997
public function processAction() {
        // allow callers to set a targetUrl via the request
        if ($targetUrl = $this->_getSubmittedTargetUrl()) {
            Garp_Auth::getInstance()->getStore()->targetUrl = $targetUrl;
        }

        // never cache the process request
        $this->_helper->cache->setNoCacheHeaders($this->getResponse());
        // This action does not render a view, it only redirects elsewhere.
        $this->_helper->viewRenderer->setNoRender(true);
        $method = $this->getRequest()->getParam('method') ?: 'db';
        $adapter = Garp_Auth_Factory::getAdapter($method);
        $authVars = Garp_Auth::getInstance()->getConfigValues();

        $postData = $this->getRequest()->getPost();
        // Before login hook.
        $this->_beforeLogin($authVars, $adapter, $postData);

        /**
         * Params can come from GET or POST.
         * The implementing adapter should decide which to use,
         * using the current request to fetch params.
         */
        if (!$userData = $adapter->authenticate($this->getRequest(), $this->getResponse())) {
            $this->_respondToFaultyProcess($adapter);
            return;
        }

        $this->_helper->viewRenderer->setNoRender(true);

        // Check if adapter issued a redirect (as is the case with oAuth for instance)
        if ($this->getResponse()->isRedirect()) {
            return;
        }

        if ($userData instanceof Garp_Db_Table_Row) {
            $userData = $userData->toArray();
        }

        // Save user data in a store.
        Garp_Auth::getInstance()->store($userData, $method);

        // Store User role in a cookie, so that we can use it with Javascript.
        if (!Garp_Auth::getInstance()->getStore() instanceof Garp_Store_Cookie) {
            $this->_storeRoleInCookie();
        }

        // Determine targetUrl.
        // This is the URL the user was trying to access before logging in, or a default URL.
        $router = Zend_Controller_Front::getInstance()->getRouter();
        if (!empty($authVars['login']['successRoute'])) {
            $targetUrl = $router->assemble(array(), $authVars['login']['successRoute']);
        } elseif (!empty($authVars['login']['successUrl'])) {
            $targetUrl = $authVars['login']['successUrl'];
        } else {
            $targetUrl = '/';
        }
        $store = Garp_Auth::getInstance()->getStore();
        if ($store->targetUrl) {
            $targetUrl = $store->targetUrl;
            unset($store->targetUrl);
        }

        // After login hook.
        $this->_afterLogin($userData, $targetUrl);

        // Set a Flash message welcoming the user.
        $flashMessenger = $this->_helper->getHelper('FlashMessenger');
        $fullName = new Garp_Util_FullName($userData);
        $successMsg = __($authVars['login']['successMessage']);
        if (strpos($successMsg, '%s') !== false) {
            $successMsg = sprintf($successMsg, $fullName);
        } elseif (strpos('%USERNAME%', $successMsg) !== false) {
            $successMsg = Garp_Util_String::interpolate(
                $successMsg, array(
                'USERNAME' => $fullName
                )
            );
        }
        $flashMessenger->addMessage($successMsg);
        $this->_redirect($targetUrl);
    }
1017151
public function processOptionTable()
    {
        $this->alert('TABLE PROCESS');

        // Tables
        $tables = DB::select('SHOW TABLES');

        foreach ($tables as $t) {
            if (in_array($t->{'Tables_in_' . env('DB_DATABASE')}, ['migrations', 'password_resets'])) {
                continue;
            }

            $prepareName = function ($name, $format) {
                $name = explode('_', $name);
                $name[count($name) - 1] = Pluralizer::{$format}(end($name));

                return implode('_', $name);
            };

            // Make the table object
            $objTab = new \stdClass();
            $objTab->name = $t->{'Tables_in_' . env('DB_DATABASE')};
            $objTab->relationTable = false;
            $objTab->singular = camel_case($prepareName($objTab->name, 'singular'));
            $objTab->plural = camel_case($prepareName($objTab->name, 'plural'));
            $objTab->snakeSingular = snake_case($objTab->singular);
            $objTab->snakePlural = snake_case($objTab->plural);
            $objTab->fieldDisplay = false;
            $objTab->fk = $objTab->snakeSingular . '_id';
            $objTab->fields = [];
            $objTab->belongsTo = [];
            $objTab->hasMany = [];
            $objTab->hasOne = [];
            $objTab->belongsToMany = [];
            $objTab->marks = [];
            $objTab->arqs = [];


            array_push($this->tables, $objTab);
        }

        // dd($this->tables);

        // Register belongsToMany
        foreach ($this->tables as $table) {
            $tabs = explode('_', $table->name);

            if (count($tabs) === 2) {
                $tab1 = Pluralizer::plural($tabs[0]);
                $tab2 = Pluralizer::plural($tabs[1]);
                $rel1 = false;
                $rel2 = false;

                foreach ($this->tables as $t) {
                    if ($t->name == $tab1) {
                        $rel1 = true;
                    }

                    if ($t->name == $tab2) {
                        $rel2 = true;
                    }
                }

                if ($rel1 && $rel2) {
                    foreach ($this->tables as $t) {
                        if ($t->name == $tab1) {
                            $t->belongsToMany[$table->name] = $tab2;
                        }

                        if ($t->name == $tab2) {
                            $t->belongsToMany[$table->name] = $tab1;
                        }
                    }

                    $table->relationTable = true;
                }


            }

        }

        // dd($this->tables);


        // Verify option TABLE
        if (trim($this->option('table')) === '') {

            $this->alert('TABLES');
            foreach ($this->tables as $tableKey => $table) {
                $this->info($tableKey . '->' . $table->name);
            }
            die;

        } else {
            foreach ($this->tables as $tableKey => $table) {
                $this->readTable($tableKey);
            }
        }

        foreach ($this->tables as $table) {
            // Register hasMany and hasOne
            foreach ($this->tables as $t) {
                if ($table->name === $t->name || $t->relationTable === true) {
                    continue;
                }

                if (in_array($table->name, $t->belongsTo)) {
                    foreach ($t->fields as $f) {
                        if ($f->name === $table->fk) {
                            array_push($table->{$f->unique ? 'hasOne' : 'hasMany'}, $t->name);
                        }
                    }
                }
            }


            // Process Marks
            $table->marks = $this->processMarks($table);
        }



        // DUMPS
        // if (trim($this->option('table')) === 'all') {
        //     dd($this->tables);

        // } elseif (trim($this->option('table')) !== '') {
        //     $tableKey = $this->option('table');
        //     dd($this->tables[$tableKey]);
        // }


    }
987351
protected function createHttpClientOption()
    {
        $options = [];
        if ($this->config->getDebug()) {
            $options[RequestOptions::DEBUG] = fopen($this->config->getDebugFile(), 'a');
            if (!$options[RequestOptions::DEBUG]) {
                throw new \RuntimeException('Failed to open the debug file: ' . $this->config->getDebugFile());
            }
        }

        return $options;
    }
438367
protected function process()
    {
        extract($this->compileExpression());

        $this->clean();
        $this->resolver->close();

        $this->resolver->setParameter($params);
        $this->resolver->setSource($source);
        $this->resolver->setFilter($filter);

        if ($image = $this->resolver->getCached()) {
            $src = $this->base.$this->resolver->getCachedUrl($image);

            $extension = $image->getSourceFormat(true);
            $this->resolver->close();
            $image->close();

            return $src.'.'.$extension;
        }

        if ($image = $this->resolver->resolve($image)) {
            $src = $this->resolver->getImageUrl($image);
            $this->resolver->close();
            $image->close();

            return $src;
        }

        $this->resolver->close();

        return;
    }
1290812
public function processOptionRoutes()
    {
        $this->alert('ROUTES PROCESS');

        // Verify option ROUTES
        if (in_array(strtoupper(trim($this->option('routes'))), ['N','NO','FALSE'])) {
            $this->routes = false;
        }

    }
227909
protected function process()
    {

        // prepare the store view code
        $this->prepareStoreViewCode($this->getRow());

        // prepare the attributes
        $attr = $this->prepareAttributes();

        // load store/option ID
        $storeId = $attr[MemberNames::STORE_ID];
        $optionId = $attr[MemberNames::OPTION_ID];

        // if the store has already been mapped, return immediately
        if ($this->isMapped($optionId, $storeId)) {
            return;
        }

        // initialize and save the product bundle option value
        if ($bundleOption = $this->initializeBundleOptionValue($attr)) {
            $this->persistProductBundleOptionValue($bundleOption);
        }

        // add the store => option mapping
        $this->addOptionValueStoreMapping($optionId, $storeId);
    }
1147443
public function process()
	{
		$context = $this->getContext();

		try
		{
			$view = $this->getView();
			$id = $view->param( 'dl_id' );

			/** client/html/account/download/error/url/target
			 * Destination of the URL to redirect the customer if the file download isn't allowed
			 *
			 * The destination can be a page ID like in a content management system or the
			 * module of a software development framework. This "target" must contain or know
			 * the controller that should be called by the generated URL.
			 *
			 * @param string Destination of the URL
			 * @since 2019.04
			 * @category Developer
			 */
			$target = $context->getConfig()->get( 'client/html/account/download/error/url/target' );

			if( $this->checkAccess( $id ) === false ) {
				return $view->response()->withStatus( 401 )->withHeader( 'Location', $view->url( $target ) );
			}

			$manager = \Aimeos\MShop::create( $context, 'order/base/product/attribute' );
			$item = $manager->getItem( $id );

			if( $this->checkDownload( $id ) === false ) {
				return $view->response()->withStatus( 403 )->withHeader( 'Location', $view->url( $target ) );
			} else {
				$this->addDownload( $item );
			}

			parent::process();
		}
		catch( \Exception $e )
		{
			$this->logException( $e );
		}
	}
1371357
protected function HTTPOptionsTrait():void{

		if(!\is_array($this->curl_options)){
			$this->curl_options = [];
		}

		if(!\is_string($this->user_agent) || empty(\trim($this->user_agent))){
			throw new ClientException('invalid user agent');
		}

		$this->setCA();
	}
908383
public function process()
    {
        $lang = $this->getLang();
        $request = $this->getRequest();
        $paymentBuilder = $this->getPaymentBuilder();
        $payPalOrderManager = $this->getOrderManager();

        // Create Payment from Request.
        $paymentBuilder->setLang($lang);
        $paymentBuilder->setRequest($request);
        $orderPayment = $paymentBuilder->buildPayment();

        $payPalOrderManager->setOrderPayment($orderPayment);
        $processSuccess = $payPalOrderManager->updateOrderStatus();

        return $processSuccess;
    }
1307611
function processOptions(opt) {
        keys(opt).forEach(function (key) {
            var value = opt[key];
            if (typeof value === 'string') {
                opt[key] = grunt.template.process(value);
            } else if (Array.isArray(value)) {
                opt[key] = value.slice().map(function (i) {
                    return grunt.template.process(i);
                });
            }
        });
    }