Returns the value of an option received.

@param mixed $option Option name or array of options
@param mixed $filters Filter name or array of filters [Optional]
@param mixed $defaultValue Default value [Optional]

@return mixed
972140
public function getOption($option, $filters = null, $defaultValue = null)
    {
        if (is_array($option)) {
            foreach ($option as $optionItem) {
                if (isset($this->_parameters[$optionItem])) {
                    if ($filters !== null) {
                        return $this->filter($this->_parameters[$optionItem], $filters);
                    }

                    return $this->_parameters[$optionItem];
                }
            }

            return $defaultValue;
        }

        if (isset($this->_parameters[$option])) {
            if ($filters !== null) {
                return $this->filter($this->_parameters[$option], $filters);
            }

            return $this->_parameters[$option];
        }

        return $defaultValue;
    }
93610
public function getOption($option, $default = NULL)
	{
		return isset($this->options[ $option ]) ? $this->options[ $option ] : $default;
	}
630393
public function get($param = null, $defaultValue = null)
    {
        // return $this->getRequest()->get($param, $defaultValue);

        if ($param === null) {
            return $_REQUEST;
        }

        return isset($_REQUEST[$param]) ? $_REQUEST[$param] : $defaultValue;
    }
1127106
protected function filter($value, $filter)
    {
        if (null !== $filter) {
            $value = Filter::_($value, $filter);
        }

        return $value;
    }
555210
public function optionalItem($key, $defaultValue = null)
    {
        if (!$this->hasItem($key)) {
            return $defaultValue;
        }

        return $this->getItem($key);
    }
696289
public function getArg($name, $defaultValue = null)
    {
        if (array_key_exists($name, $this->args)) {
            return $this->args[$name];
        }

        return $defaultValue;
    }
172765
protected function getParam($param = null, $defaultValue = null)
    {
        $request = $this->getRequest();
        if ($param === null) {
            return array_merge($request->getQuery(), $request->getParams());
        }

        $value = $request->getParam($param);
        if ($value === null) {
            return $request->getQuery($param, $defaultValue);
        }

        return $value;
    }
776999
protected function value($value, $default = null, $filter = null) {
        if ($this->valueFilter == null) {
            $this->valueFilter = Ioc::get(ValueFilter::class);
        }
        if (is_array($value)) {
            $data = array();
            foreach ($value as $key => $val) {
                $data[ $key ] = $this->valueFilter->filter($val);
            }
            return $data;
        }
        if (!isset($value)) {
            $value = $default;
        }
        $value = $this->valueFilter->filter($value, $filter);
        return $value;
    }
1192789
final protected function get($option)
    {
        if (array_key_exists($key = "$option", $this->options)) {
            return $this->options[$key];
        }

        if (array_key_exists($key, $this->defaults)) {
            return $this->defaults[$key];
        }
    }
334045
public function fileOption($attribute, $option, $defaultValue = null)
    {
        return ArrayHelper::getValue($this->attributes[$attribute], $option, $defaultValue);
    }
24193
public function get(string $key, $defaultValue = null)
    {
        $key = $this->prepareKey($key);
        return Arr::get($this->properties, $key, $defaultValue);
    }
198775
public function get($key = null, $defaultValue = null) {
		$conditions = compact('key');
		if ($key === null) {
			return $this->find('all', $conditions);
		} else {
			$value = $this->field('value', $conditions);
			return $this->find('count', array('conditions' => $conditions)) ? $value : $defaultValue;
		}
	}
953332
public static function get(string $filename, string $defaultValue = ''): string
    {
        if (!self::exist($filename)) {
            return $defaultValue;
        }
        return file_get_contents($filename);
    }
979909
public static function getOptionValues($filter = array())
    {
        $filter = Filter::create($filter);
        return self::getCollection('/options/values' . $filter->toQuery(), 'OptionValue');
    }
45350
public function getCascadeOption($cascadeValue)
    {
        $defaultCascade = $this->getRegistry()->config->get(static::CFG_DEFAULT_CASCADE);
        if (empty($cascadeValue) && !empty($defaultCascade)) {
            return [$defaultCascade];
        }

        /** @var Validator $validator */
        $validator = $this->getRegistry()->validator->get(static::CFG_DEFAULT_CASCADE);

        $cascadeValue = array_map('strtolower', array_map('trim', explode(',', $cascadeValue)));
        $cascadeValue = array_intersect($cascadeValue, $validator->getChoices());
        $cascadeValue = array_filter($cascadeValue);
        if(empty($cascadeValue)) {
            return null;
        }

        return $cascadeValue;
    }
366610
public function getQueryParam($param, $default = null, $filter = null, $filterOptions = null)
    {
        $params = $this->getQueryParams();
        $value = isset($params[$param]) ? $params[$param] : $default;
        
        if (isset($filter) && isset($value)) {
            $value = filter_var($value, $filter, $filterOptions);
        }
        
        return $value;
    }
410497
protected function filterValue($value, ?string $filter = null)
    {
        $resolver = $this->getFilterResolver($filter);

        if (\method_exists($resolver[0], $resolver[1])) {
            return $this->callFilterResolver($resolver, $value);
        }

        return $value;
    }