Returns the value of the specified parameter as a boolean value.

@param  string $name
@param  bool   $default
@param  bool   $optional
@return bool
@throws InvalidParameterException
505363
public function getBooleanParam($name, $default = null, $optional = false)
    {
        $value = $this->getParam($name, $default, $optional);
        if ($value !== null) {
            if (!is_bool($value) && !preg_match('/^(0|1|true|false)$/', $value)) {
                throw new InvalidParameterException("Parameter '{$name}' is invalid");
            }
            $value = $value === true || $value === '1' || $value === 'true';
        }
        return $value;
    }
855239
public function bool($name, $default = null)
    {
        $cmnd = $name.' tinyint(1)';
        //
        if (!empty($default)) {
            $default = $default ? '1' : '0';
            $cmnd .= " DEFAULT $default ";
        }
        //
        self::$colmuns[] = $cmnd;
        //
        return $this;
    }
546458
public static function isEnabled(array $options, string $name, $default = false): bool
    {
        $enabled = $default;
        $options = self::normalize($options);

        if (array_key_exists('*', $options)) {
            $enabled = $options['*'];
        }

        if (array_key_exists($name, $options)) {
            $enabled = (bool) $options[$name];
        }

        return $enabled;
    }
757765
public function getValue(string $name, $default = null)
    {
        if ($this->hasValue($name)) {
            return $this->data[$name];
        }

        return $default;
    }
567909
public function getInt($name, $default = null)
    {
        $value = $this->get($name, $default);
        return null === $value ? null : intval($value);
    }
795354
protected static function getOption($name, $default = null)
    {
        return isset(self::$options[$name]) ? self::$options[$name] : $default;
    }
356451
public static function requestBool($name, $default = null)
    {
        if (isset($_REQUEST[$name]) && $_REQUEST[$name] !== '') return self::parseInputToBool($_REQUEST[$name]);
        return (is_null($default) ? null : ((bool)$default));
    }
1177335
public function get($name = null, $default = null)
    {
        $source = $this->_context->_REQUEST;

        if ($name === null) {
            return $source;
        }

        if (isset($source[$name]) && $source[$name] !== '') {
            $value = $source[$name];

            if (is_array($value) && is_scalar($default)) {
                throw new InvalidValueException(['the value of `:name` name is not scalar', 'name' => $name]);
            }

            if ($default !== null) {
                $type = gettype($default);
                if ($type === 'string') {
                    return (string)$value;
                } elseif ($type === 'integer') {
                    return (int)$value;
                } elseif ($type === 'double') {
                    return (float)$value;
                } elseif ($type === 'boolean') {
                    return (bool)$value;
                } else {
                    return $value;
                }
            } else {
                return $value;
            }
        } else {
            if ($default === null) {
                throw new MissingRequiredFieldsException($name);
            }

            return $default;
        }
    }
1031701
public function getIntParam($name, $default = null, $optional = false)
    {
        $value = $this->getParam($name, $default, $optional);
        if ($value !== null) {
            if (!preg_match('/^\-?\d*$/', $value)) {
                throw new InvalidParameterException("Parameter '{$name}' is invalid");
            }
            $value = (int)$value;
        }
        return $value;
    }
219009
protected function getOption($name, $default = null)
    {
        $matchedOption = null;
        foreach ($this->actions[$this->actionName]->getOptions() as $option) {
            if ($option->matchParam($name)) {
                $matchedOption = $option;
            }
        }
        $value = $matchedOption->getValue($this->args, $default);

        return $value;
    }
1097285
public function find($name, $default = null)
    {
        return ($options = $this->fetchAll()->lists('value', 'key')) && $options->has($name)
            ? $options->get($name)
            : $default;
    }
672565
public Boolean getParameterBoolean(String name, Boolean defaultValue)
   {
      String value = getParameterValue(name, null);

      if (value != null)
      {
         return new Boolean(value);
      }
      return defaultValue;
   }
366640
public function getParam($name, $default = null)
    {
        switch ($name) {
            case 'processor':
                return $this->getProcessor();
            case 'message':
                return $this->getMessage();
            case 'result':
                return $this->getResult();
            default:
                return parent::getParam($name, $default);
        }
    }
1102920
public function getParam($name, $default = null)
    {
        if (!array_key_exists($name, $this->userConfig->params)) {
            return $default;
        }

        return $this->userConfig->params[$name];
    }
748186
public final function getOption( string $name, $defaultValue = false )
   {

      if ( ! $this->hasOption( $name ) )
      {
         return $defaultValue;
      }

      return $this->_options[ $name ];

   }
199202
public static function get($name, $default = '') {
        $_GET = self::paramFilter($_GET);
        if (isset($_GET[$name])) {
            if (empty($_GET[$name])) {
                return $default;
            }
            return $_GET[$name];
        }
        return false;
    }
1362156
function value($name, $default = false)
    {
        $values = $this->values($name);
        return count($values) ? $values[0] : $default;
    }