Get the action for a "url" option.

@param  array|string $options

@return string
19851
protected function getUrlAction($options)
    {
        if (is_array($options)) {
            return $this->url->to($options[0], array_slice($options, 1));
        }

        return $this->url->to($options);
    }
222948
public function getOpt($option)
    {
        return isset($this->options[$option]) ? $this->options[$option] : null;
    }
690467
protected function getRegex(Config\Options $options) : string
    {
        $regex = $options->get('regex');
        if (empty($regex)) {
            throw new ActionFailed('No regex option');
        }
        return $regex;
    }
574886
public function get($url, $params = array(), $options = array())
    {
        $rst = $this->getRequest()->get($url, $params, $options);
        return $rst;
    }
797231
protected function _formUrl($context, $options)
    {
        $request = $this->_View->getRequest();

        if ($options['action'] === null && $options['url'] === null) {
            return $request->getRequestTarget();
        }

        if (is_string($options['url']) ||
            (is_array($options['url']) && isset($options['url']['_name']))
        ) {
            return $options['url'];
        }

        if (isset($options['action']) && empty($options['url']['action'])) {
            $options['url']['action'] = $options['action'];
        }

        $actionDefaults = [
            'plugin' => $this->_View->getPlugin(),
            'controller' => $request->getParam('controller'),
            'action' => $request->getParam('action'),
        ];

        $action = (array)$options['url'] + $actionDefaults;

        $pk = $context->primaryKey();
        if (count($pk)) {
            $id = $this->getSourceValue($pk[0]);
        }
        if (empty($action[0]) && isset($id)) {
            $action[0] = $id;
        }

        return $action;
    }
47905
public function getOption($option)
    {
        switch ($option) {
            case FTPClient::TIMEOUT_SEC:
            case FTPClient::AUTOSEEK:
                $result = @ftp_get_option($this->connection, $option);

                return $result;
                break;
            
            default:
                throw new Exception('Unsupported option');
                break;
        }
    }
1095034
private function getAction($options)
    {
        if (isset($options['action'])) {
            $action = $this->_generator->to($options['action']);
        } else {
            $action = $_SERVER['REQUEST_URI'];
        }

        return $action;
    }
754845
protected function getRouteAction($options)
    {
        if (is_array($options)) {
            return $this->url->route($options[0], array_slice($options, 1));
        }

        return $this->url->route($options);
    }
1066567
public function fetch($url, $options = array())
    {
        $this->debug->groupCollapsed(__METHOD__);
        $optionsDefault = $this->getOptionsDefault();
        $options = $this->getOptions($optionsDefault, $options);
        $urlParts = Html::parseUrl($url);
        $useCurl = $urlParts['scheme'] == 'https' || \array_diff_key($options, $optionsDefault);
        $return = $useCurl
            ? $this->fetchCurl($url, $options)
            : $this->fetchFsock($url, $options);
        #$this->debug->log('return',$return);
        $this->debug->groupEnd();
        return $return;
    }
682286
public function get(array $options)
    {
        $options = $this->options($options);

        $response = $this->client->request('GET', $this->api_host.$this->api_prefix, $options);
        $content = $response->getBody()->getContents();

        $content = $this->repair->repair($content);
        $content = $this->detector->detect($content);

        return $content;
    }
209517
public function addOptions(array $options) : Getopt
    {
        if (!empty($this->options)){
            $this->options = array_merge($this->options, $options);
        }
        else{
            $this->options = $options;
        }
        return $this;
    }
239347
public function request($url, $options)
    {
        $this->url = $url;
        $this->options = array_replace_recursive($this->settings['defaults'], $options);

        try {
            return $this->handleRequest();
        } catch (TokenExpiredException $e) {
            $this->refresh();

            return $this->handleRequest();
        }
    }
1072409
protected function callHttp(array $options)
    {
        $options += [
            'method' => 'post',
            'dataType' => 'json',
            'throwException' => false,
        ];
        $options['url'] = $this->baseUrl . $options['url'];
        $options['data'] = json_encode($options['data'], JSON_UNESCAPED_UNICODE);

        $http = $this->http($options);

        return $this->parseResponse($http, $options);
    }
617765
public function logout($options = []) {
		$options = Hash::merge($this->getConfig('logout'), $options);
		$Auth = $this->_getAuthObject();
		$user = $Auth->user();

		if (empty($user)) {
			return $this->getController()->redirect($this->getController()->referer());
		}

		$logoutRedirect = $Auth->logout();
		if (is_null($options['successRedirectUrl'])) {
			$options['successRedirectUrl'] = $logoutRedirect;
		}

		return $this->handleFlashAndRedirect('success', $options);
	}
923531
public function httpGet($url, array $options = [])
    {
        \Yii::info([
            'url' => $url,
            'options' => $options
        ], __METHOD__);
        return $this->parseHttpRequest(function($url) {
            return $this->http($url);
        }, $this->httpBuildQuery($url, $options));
    }
834118
public function getOption($option)
    {
        if (!empty($this->options->{$option})) {
            return $this->options->{$option};
        }

        return false;
    }
159240
public static function get($url, $query = [], $options = [])
    {
        $options['query'] = $query;
        return self::doRequest('get', $url, $options);
    }