Gets the selected value for the pick items.

@param string $value
@param string $name
@param bool $isMultiple
@param string $defaultValue

@return string
165629
protected function getCheckedItemForPickItem($value, $name, $isMultiple, $defaultValue)
    {
        return $isMultiple ? $this->getMultipleCheckedItem($value, $name, $defaultValue) : $this->getCheckedItem($value, $name, $defaultValue);
    }
444950
protected function defaultValue(string $name, $value): Closure
    {
        return function (Table $table) use ($name, $value) {
            assert($table->hasColumn($name));
            $table->getColumn($name)->setDefault($value);
        };
    }
1068130
public function optionModeOptional($name, $description, $defaultValue = null)
    {
        $shortcut = null;
        $mode = InputOption::VALUE_OPTIONAL;
        return [$name, $shortcut, $mode, $description, $defaultValue];
    }
356308
public String option (
        String name, String value, String item, Object defaultValue)
    {
        String selectedValue = getValue(name, defaultValue);
        return fixedOption(name, value, item, selectedValue);
    }
640743
public function getDefaultValue(string $name, string $separator = null)
    {
        $separator = $separator ?: '.';
        $path = explode($separator, $name) ?: [];
        $offset = array_shift($path) ?? '';

        $current = $this->getDefaultValues();

        if (!isset($current[$offset])) {
            return null;
        }

        $current = $current[$offset];

        while ($path) {
            $offset = array_shift($path);

            if ((\is_array($current) || $current instanceof \ArrayAccess) && isset($current[$offset])) {
                $current = $current[$offset];
            } elseif (\is_object($current) && isset($current->{$offset})) {
                $current = $current->{$offset};
            } else {
                return null;
            }
        };

        return $current;
    }
389003
public function get($name, $default = null)
    {
        $result = $default;
        if (isset($this->_data[$name])) {
            $result = $this->_data[$name]->value;
        }

        return $result;
    }
808763
protected function getDefaultValue($name, $value = null)
    {
        if ($value !== null)
            return $value;

        if ($this->model && $this->model->has($name))
            return $this->model->get($name);

        return $value;
    }
866929
public function get(string $name, $default = null, $implode = ',')
    {
        $value = parent::get($this->normalize($name), $default);

        if (!empty($implode) && is_array($value)) {
            return implode($implode, $value);
        }

        return $value;
    }
455180
public function getRequestParameter($name, $defaultValue = null)
    {
        if (isset($_POST[$name])) {
            $value = $_POST[$name];
        } elseif (isset($_GET[$name])) {
            $value = $_GET[$name];
        } else {
            $value = $defaultValue;
        }

        return $value;
    }
1362156
function value($name, $default = false)
    {
        $values = $this->values($name);
        return count($values) ? $values[0] : $default;
    }
648400
protected String getValue (String name, Object defaultValue)
    {
        String value = getParameter(name);
        if (StringUtil.isBlank(value)) {
            if (defaultValue == null) {
                value = "";
            } else {
                value = String.valueOf(defaultValue);
            }
        }
        return HTMLUtil.entify(value);
    }
1115836
public function joinDefaults($name, $value, $separator = null)
    {
        if (\is_object($value)) {
            $value = (array) $value;
        }

        $old = $this->get($name, null, $separator);
        if ($old !== null) {
            $value = $this->getBlueprint()->mergeData($value, $old, $name, $separator);
        }

        $this->setNestedProperty($name, $value, $separator);

        return $this;
    }
631312
public function get($component, $name, $defaultValue = null)
    {
        $this->load();

        $propertyKey = sprintf('%s__%s', $component, $name);

        if (isset($this->properties[$propertyKey])) {
            return $this->properties[$propertyKey]->getValue();
        }

        return $defaultValue;
    }
296540
public function getValue($context, $name, $default = null)
    {
        $all = $this->getAll($context);

        if (array_key_exists($name, $all)) {
            return $all[$name];
        }

        return $default;
    }
560377
public function getAttr(array $name, array &$context, $defaultValue = null)
    {
        $current = array_shift($name);

        if (!array_key_exists($current, $context)) {
            return $defaultValue;
        }

        return count($name)
            ? $this->getAttr($name, $context[$current], $defaultValue)
            : $context[$current];
    }
1092114
public function get( $name, $default = null )
	{
		$value = $this->_getObject()->get( $name, $default );

		$this->_file->set( $name, $value, $default );

		return $value;
	}
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;
        }
    }