Get default value

@param  string &$name
@return string|null
@access protected
355882
protected function defaultValue(/*# string */ &$name)
    {
        $default = null;
        if (false !== strpos($name, ':-')) {
            list($name, $default) = explode(':-', $name, 2);
        } elseif (false !== strpos($name, ':=')) {
            list($name, $default) = explode(':=', $name, 2);
            if (false === getenv($name)) {
                $this->setEnv($name, $default, false);
            }
        }
        return $default;
    }
474213
public function getVariable($name, $default = null)
    {
        if (!array_key_exists($name, $this->variables)) {
            return $default;
        }
        return $this->variables[$name];
    }
549722
public function getValue($name)
    {
        return (isset($this->options['params'][$name])) ? $this->options['params'][$name] : null;
    }
296540
public function getValue($context, $name, $default = null)
    {
        $all = $this->getAll($context);

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

        return $default;
    }
557712
public function getValue(string $name): ?string
    {
        if (isset($this->data[$name])) {
            return $this->data[$name]->value;
        }
        return null;
    }
1225022
public function get(string $name, $default = null)
    {
        $key = strtolower($name);
        if (!array_key_exists($key, $this->headers)) {
            return $default;
        }

        return $this->headers[$key]->getValuesAsString();
    }
911204
public function getValueFor($name, $defaultValue = null)
    {
        if (!$this->hasParameter($name)) {
            return $defaultValue;
        }
        return $this->parameters[strtolower($name)]->getValue();
    }
1349620
protected function getParameter($name, $default = null)
    {
        return array_key_exists($name, $this->params)?$this->params[$name]:$default;
    }
765649
public function getprop($name, $default = '')
    {
        $value = $this->config[$name];

        if ($name == 'des_key' && !$this->configured && !isset($_REQUEST["_$name"])) {
            $value = rcube_utils::random_bytes(24);
        }

        return $value !== null && $value !== '' ? $value : $default;
    }
515343
public function get( $name, $default = null )
	{
		$parts = explode( '/', trim( $name, '/' ) );

		if( ( $value = $this->_get( $this->_config, $parts ) ) !== null ) {
			return $value;
		}

		foreach( $this->_paths as $fspath ) {
			$this->_config = $this->_load( $this->_config, $fspath, $parts );
		}

		if( ( $value = $this->_get( $this->_config, $parts ) ) !== null ) {
			return $value;
		}

		return $default;
	}
501793
public function value($name, $default = null)
    {
        if (! is_null($value = $this->valueFromOld($name))) {
            return $value;
        }

        if (! is_null($value = $this->valueFromModel($name))) {
            return $value;
        }
        return $default;
    }
803077
public function get(string $name, $default = null)
    {
        return isset($this->options[$name]) ? $this->options[$name] : $default;
    }
1299621
public function getOptionOrDefault($name)
    {
        return isset($this->options[$name]) ? $this->options[$name] : $this->getDefault($name);
    }
230526
public function getPropertyValue(string $name) {
		if (isset($this->values[$name])) {
			return $this->values[$name];
		}
		return null;
	}
323982
public function getValue($name)
    {
        if (! is_string($name)) {
            return null;
        }

        $bits = explode('.', $name);
        $postData = $_POST;

        foreach ($bits as $key) {
            if (is_array($postData) && isset($postData[$key])) {
                $postData = $postData[$key];
            } else {
                return null;
            }
        }

        return $postData;
    }
387488
public final function getHeaderValue($name)
    {
        self::checkString($name);

        foreach ($this->_headers as $headerName => $headerValue) {

            if (strcasecmp($name, $headerName) === 0) {

                return $headerValue;
            }
        }

        return null;
    }
1164570
private function _get($name, $default = null)
    {
        return array_key_exists($name, $this->getData()) ? $this->getData()[$name] : $default;
    }