Controls whether requests and responses should be treated
as XML. Defaults to false (using JSON).

@param bool $option the new state of this feature
323868
public function useXml($option = true)
    {
        if ($option) {
            $this->contentType = self::MEDIA_TYPE_XML;
            $this->rawResponse = true;
        } else {
            $this->contentType = self::MEDIA_TYPE_JSON;
            $this->rawResponse = false;
        }
    }
439400
protected function optionSet(string $option) : bool
    {
        return isset($this->allOptions[$option]) && $this->allOptions[$option] === true
            || (isset($this->allOptions['all']) && $this->allOptions['all'] === true && $option !== 'overwrite' && $option !== 'prompt');
    }
530355
public static function getCurlOptionFromResponse(Response $response, $option = 0)
    {
        switch ($option) {
            case 0: // 0 == array of all curl options
                $info = array();
                foreach (self::$curlInfoList as $option => $key) {
                    $info[$key] = $response->getCurlInfo($key);
                }
                break;
            case CURLINFO_HTTP_CODE:
                $info = (int)$response->getStatusCode();
                break;
            case CURLINFO_SIZE_DOWNLOAD:
                $info = $response->getHeader('Content-Length');
                break;
            case CURLINFO_HEADER_SIZE:
                $info =  mb_strlen(HttpUtil::formatAsStatusWithHeadersString($response), 'ISO-8859-1');
                break;
            default:
                $info = $response->getCurlInfo($option);
                break;
        }

        if (!is_null($info)) {
            return $info;
        }

        $constants = get_defined_constants(true);
        $constantNames = array_flip($constants['curl']);
        throw new \BadMethodCallException("Not implemented: {$constantNames[$option]} ({$option}) ");
    }
153116
protected function resolveByOption($option)
    {
        $model = str_replace('/', '\\', $option);

        $namespaceModel = $this->container->getNamespace() .'Models\\' .$model;

        if (Str::startsWith($model, '\\')) {
            $this->data['fullModel'] = trim($model, '\\');
        } else {
            $this->data['fullModel'] = $namespaceModel;
        }

        $this->data['model'] = $model = class_basename(trim($model, '\\'));

        $this->data['camelModel'] = Str::camel($model);

        $this->data['pluralModel'] = Str::plural(Str::camel($model));

        //
        $config = $this->container['config'];

        $this->data['fullUserModel'] = $model = $config->get('auth.providers.users.model', 'App\Models\User');

        $this->data['userModel'] = class_basename(trim($model, '\\'));
    }
1155546
public function setOption($option = [])
    {
        if (!isset($option['sandbox'])) {
            $option['sandbox'] = false;
        }
        $this->provider->setOption($option);
    }
212018
private function is_site_option( $option ) {
            if ( WP_FS__ACCOUNTS_OPTION_NAME != $this->_id ) {
                return false;
            }

            if ( ! isset( self::$_SITE_OPTIONS_MAP ) ) {
                self::load_site_options_map();
            }

            return isset( self::$_SITE_OPTIONS_MAP[ $option ] );
        }
349622
public function xml2json(): void
    {
        $xml = simplexml_load_string($this->xmlData, NULL, LIBXML_NOCDATA);
        $this->jsonData = json_encode($xml);
    }
664772
private function isValidOption($option)
    {
        if (array_key_exists($option, $this->options)) {
            return true;
        }

        foreach ($this->encoders as $encoder) {
            if (array_key_exists($option, $encoder->getDefaultOptions())) {
                return true;
            }
        }

        return false;
    }
239195
public function hasOption($option) {
        if (!is_string($option)) {
            throw new \Console\Exception\InvalidArgument('Parameter must be string.');
        }

        return isset($this->_options[$option]);
    }
74671
public function uncheckAjaxCheckbox($option)
  {
    $page = $this->getSession()->getPage();
    $element = $page->find('css', "[id^='" . $option . "']");
    $element->uncheck();
  }
1287184
public function setOption($option = [])
    {
        $op = $option[$this->channel];
        $op['sandbox'] = isset($option['sandbox']) ? $option['sandbox'] : 0;
        $this->provider->setOption($op);
    }
776936
public function setOpt($option, $value)
    {
        /**
         * @var Curl $instance
         */
        foreach ($this->curlInstances as $instance) {
            $instance->setOpt($option, $value);
        }
    }
1336503
public static function Set($option, $value)
    {
        self::CheckBackend();

        self::$backend->Set($option, $value);
    }
941955
protected function assignSelected(Option $option)
	{
		$attributes = $option->getAttributes();
		$attributes[] = 'selected';
		$option->setAttributes($attributes);
	}
360050
public function check(bool $value = true)
    {
        if ($value == false) {
            unset($this->attributes['checked']);
        } else {
            $this->attributes['checked'] = $value;
        }
    }
159649
public function setFetchBodyOption($option) {
        if (is_bool($option)) {
            $this->fetch_body = $option;
        } elseif (is_null($option)) {
            $config = config('imap.options.fetch_body', true);
            $this->fetch_body = is_bool($config) ? $config : true;
        }

        return $this;
    }
5925
public static function response($data, $type = self::FORMAT_XML)
    {
        if (is_string($data) && strlen($data) === 0) {
            return true; // Many operations return an empty string for success
        }
        switch ($type) {
            case static::FORMAT_XML:
                return AbstractResponse::fromXml($data);
            case static::FORMAT_JSON:
                return AbstractResponse::fromJson($data);
        }
        throw new InvalidArgumentException("Type must be 'xml' or 'json'");
    }