Navigate to nested value in source array by name,
creating a null placeholder if it doesn't exist.

@internal
@param string $name
@param array $source
@return mixed Reference to value in $source
185945
protected function &nestedValueRef($name, &$source)
    {
        // Find var to change
        $var = &$source;
        foreach (explode('.', $name) as $namePart) {
            if (!isset($var)) {
                $var = [];
            }
            if (!isset($var[$namePart])) {
                $var[$namePart] = null;
            }
            $var = &$var[$namePart];
        }
        return $var;
    }
1361475
public function getValue($name)
	{
		if (! isset($this->values[$name]))
		{
			$this->values[$name] = arg($name);
		}

		return $this->values[$name];
	}
394293
public function getValue($name)
    {
        if (isset($this->map[$name])) {
            return $this->map[$name]->getValue();
        }

        return null;
    }
1295803
public function getFieldValue($name)
    {
        $value = null;
        $field = $this->getField($name);
        if (null !== $this->getField($name)) {
            $value = (array_key_exists('value', $field) && null !== $field['value']) ? $field['value'] : null;
        }
        return $value;
    }
115904
public function &__get($name)
    {
        // This method must return a reference and not use ternary operators for __set()ing multi-dimensional arrays
        // http://stackoverflow.com/questions/4310473/using-set-with-arrays-solved-but-why
        // http://stackoverflow.com/questions/5966918/return-null-by-reference-via-get
        switch ($name) {
            case 'global':
                if (is_null(static::$global)) {
                    static::$global = new Container;
                }

                return static::$global;
                break;
            case 'session':
                if (is_null(static::$session)) {
                    static::$session = new Session;
                }

                return static::$session;
                break;
            case 'request':
            case 'dir':
            case 'url':
            case 'html':
                return $this->$name;
                break;
            default:
                return $this->html[strtolower($name)];
                break;
        }
    }
1132326
public function getRawValue($name)
    {
        $value = null;
        if ($this->has($name)) {
            $value = call_user_func_array(
                [$this->_inputs[$name], 'getRawValue'],
                [$name]
            );
        }
        return $value;
    }
77310
protected function resolveValue($name, &$source = null, $sanitize = true, $array = false)
    {
        $result = $array ? array() : null;

        if (empty($name)) {
            $result = $source;
        }
        elseif (isset($source[$name])) {
            $result = $source[$name];
        }

        if (!$sanitize) {
            return $result;
        }

        if (is_array($result)) {
            foreach ($result as $key => $value) {
                $result[$key] = $this->resolveValue('', $value, $sanitize);
            }
        }
        else {
            $filter = 0;
            $flags  = FILTER_FLAG_EMPTY_STRING_NULL | FILTER_NULL_ON_FAILURE;

            if ($sanitize) {
                $filter = $filter | FILTER_SANITIZE_STRING;
                $flags  = $flags | FILTER_FLAG_STRIP_LOW | FILTER_FLAG_STRIP_HIGH;
            }

            if ($array) {
                $flags = $flags | FILTER_FORCE_ARRAY;
            }

            $result = filter_var($result, $filter, array('flags' => $flags));
        }

        return $result;
    }
599910
public function fromName($name)
    {
        self::init();
        $name = strtolower($name);
        return array_key_exists($name, self::$values) ? self::$values[$name] : null;
    }
1120697
public function setSource($source)
    {
        $sourceAttribute = $this->sourceAttribute;
        return (is_string($sourceAttribute) && !empty($sourceAttribute)) ? $this->$sourceAttribute = $source : null;
    }
1283040
public function offsetGet($name)
    {
        deprecationWarning(
            'The ArrayAccess methods will be removed in 4.0.0.' .
            'Use getParam(), getData() and getQuery() instead.'
        );

        if (isset($this->params[$name])) {
            return $this->params[$name];
        }
        if ($name === 'url') {
            return $this->query;
        }
        if ($name === 'data') {
            return $this->data;
        }

        return null;
    }
662407
function val($sources = null) {
		if (isset($sources)) {
			$this->val = $sources;
			return $this->val; 
		} else {
			return $this->val;
		}
	}
248912
public function getSourceAdapter($name)
    {
        foreach (array_reverse($this->sourceAdapters) as $pattern => $adapter) {
            if (preg_match($pattern, $name)) {
                return $adapter;
            }
        }

        return null;
    }
33
public function getInArray($name, array $array)
    {
        $value = $this->get($name);
        return in_array($value, $array) ? $value : $array[key($array)];
    }
21260
protected function getValue(/*# string */ $name)
    {
        // get '${_SERVER.HTTP_HOST}' etc.
        if ('_' === $name[0]) {
            return $this->getSuperGlobalValue($name);

        // get raw value of $name
        } else {
            return $this->searchTree($name, $this->pool);
        }
    }
518086
public function getPlaceholder($name)
    {
        return isset($this->_placeholders[$name]) ? $this->_placeholders[$name] : null;
    }
528509
private function dotGet(string $name)
    {
        $data = $this->data;

        //Generating path relative to a given name and prefix
        $path = (!empty($this->prefix) ? $this->prefix . '.' : '') . $name;
        if (empty($path)) {
            return $data;
        }

        $path = explode('.', rtrim($path, '.'));
        foreach ($path as $step) {
            if (!is_array($data) || !array_key_exists($step, $data)) {
                throw new DotNotFoundException("Unable to find requested element '{$name}'");
            }
            $data = &$data[$step];
        }

        return $data;
    }
108256
public function get($name)
    {
        $value = $this->cache->get($name);

        return is_array($value)
            ? new Location($value)
            : null;
    }