src/Filter/Setting/CustomSql.php
private function getValueFromSource($source, $valueName, $arguments)
    {
        switch (strtolower($source)) {
            case 'get':
                return $this->container->get(Input::class)->get($valueName);

            case 'post':
                return $this->container->get(Input::class)->post($valueName);

            case 'cookie':
                return $this->container->get(Input::class)->cookie($valueName);

            case 'session':
                return $this->container->get(Session::class)->get($valueName);

            case 'filter':
                if (is_array($this->filterParameters)) {
                    if (array_key_exists($valueName, $this->filterParameters)) {
                        return $this->filterParameters[$valueName];
                    }

                    return null;
                }
                break;

            case 'container':
                // @codingStandardsIgnoreStart
                @trigger_error(
                    'Getting filter values from the service container is deprecated, the container will get removed.',
                    E_USER_DEPRECATED
                );
                // @codingStandardsIgnoreEnd
                return $this->getValueFromServiceContainer($valueName, $arguments);

            default:
        }

        // Unknown sources always resort to null.
        return null;
    }
private function getValueFromSource($source, $valueName, $arguments)
    {
        switch (strtolower($source)) {
            case 'get':
                return $this->container->get(Input::class)->get($valueName);

            case 'post':
                return $this->container->get(Input::class)->post($valueName);

            case 'cookie':
                return $this->container->get(Input::class)->cookie($valueName);

            case 'session':
                return $this->container->get(Session::class)->get($valueName);

            case 'filter':
                if (is_array($this->filterParameters)) {
                    if (array_key_exists($valueName, $this->filterParameters)) {
                        return $this->filterParameters[$valueName];
                    }

                    return null;
                }
                break;

            case 'container':
                // @codingStandardsIgnoreStart
                @trigger_error(
                    'Getting filter values from the service container is deprecated, the container will get removed.',
                    E_USER_DEPRECATED
                );
                // @codingStandardsIgnoreEnd
                return $this->getValueFromServiceContainer($valueName, $arguments);

            default:
        }

        // Unknown sources always resort to null.
        return null;
    }
Retrieve the value with the given name from the source with the given name.

@param string $source    The source to retrieve the value from.
Valid values are: ('get', 'post', 'cookie', 'session', 'filter' or 'container').

@param string $valueName The name of the value in the source to retrieve.

@param array  $arguments The arguments of the parameter.

@return mixed