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;
    }