Gets an input variable. Attempts to determine what its type is
and returns a sanitized type

@param string $name
@param interger $filter
@param string $verb
@param interger $flags
@param array $options
321764
public function getVar($name, $filter = '', $default = '', $verb = 'get', $options = array())
    {

        if (strtolower($verb) == 'request') {
            $verb = $this->getVerb();
        }
        //just form casting
        $verb = strtolower($verb);

        if (!($input = $this->data($verb))) {
            return $default;
        }

        //Undefined
        if (empty($name) || !isset($input) || !isset($input[$name])) {
            if (isset($default) && !empty($default)) {
                return $default;
            } else {
                return null; //nothing for that name;
            }
        }

        //Do we have a filter;
        if (!isset($filter) || !is_int($filter)) {
            //PHP warns against using gettype to get type,
            //but its much easier than running every is_* to determine type
            //so fo now we go with gettype;
            $type = gettype($input[$name]);

            switch ($type) {
                case "interger":
                    $filter = \IS\INTERGER;
                    break;
                case "float":
                case "double":
                    $filter = \IS\FLOAT;
                    $options = array(
                        "flags" => FILTER_FLAG_ALLOW_SCIENTIFIC | FILTER_FLAG_ALLOW_FRACTION | FILTER_FLAG_ALLOW_THOUSAND,
                        "options" => $options
                    );
                    break;
                case "string":
                    $filter = \IS\STRING;
                    $options = array(
                        "flags" => !FILTER_FLAG_STRIP_LOW,
                        "options" => $options
                    );
                    break;
                case "object": //@TODO,
                case "resource":
                case "NULL":
                case "unknown type":
                default:
                    $filter = \IS\RAW;
                    $options = array(
                        "flags" => !FILTER_FLAG_STRIP_LOW,
                        "options" => $options
                    );
                    break;
            }
        }
        //uhhhnrrr...
        $variable = $input[$name];

        //Pre treat;
        if (get_magic_quotes_gpc() && ($input[$name] != $default) && ($verb != 'files')) {
            $variable = stripslashes($input[$name]); //??
        }

        return $this->filter($variable, $filter, $options);
    }
408128
public function getParameter($name, $filter = null, $default = false)
  {
    if (!$this->hasParameter($name) || is_array($this->parameters[$name])) {
      return $default;
    }

    $v = $this->parameters[$name];

    return Filter::Value($v, $filter, $default);
  }
140203
public static function getPutParameter(string $name, string $default = null, array $allowed = null): string
    {
        return self::get('PUT', $name, $default, $allowed);
    }
586421
public function session($name = '', $default = null, $filter = '')
    {
        if (empty($this->session)) {
            $this->session = Session::get();
        }
        if (is_array($name)) {
            return $this->session = array_merge($this->session, $name);
        }
        return $this->input($this->session, $name, $default, $filter);
    }
478833
public static function checked($type, $name, $checked = false, $options = [])
    {
        if (!isset($options['name'])) {
            $options['name'] = $name;
        }

        $id = self::getIdAttribute($name, $options);

        $merge = compact('type', 'value', 'id');
        $options = array_merge($options, $merge);

        $checked = !$checked ? '' : 'checked';

        return '<input'.Html::attributes($options)." $checked>";
    }
320454
public function post($name = null, $default = null, $filter = true, $type = null)
    {
        $post = $this->request['post'];

        if ($filter !== 'raw') {
            gplcart_array_trim($post, (bool) $filter);
        }

        if (isset($name)) {
            $result = gplcart_array_get($post, $name);
            $return = isset($result) ? $result : $default;
        } else {
            $return = $post;
        }

        gplcart_settype($return, $type, $default);
        return $return;
    }
722799
public function getPosted($name, $default = null, $filter = true, $type = 'string')
    {
        return $this->request->post($name, $default, $filter, $type);
    }
196574
public function input($type, $name, $label = null, $value = null, array $options = [])
    {
        $label = $this->getLabelTitle($label, $name);

        $optionsField = $this->getFieldOptions(array_except($options, ['suffix', 'prefix']), $name);

        $inputElement = '';

         if(isset($options['prefix'])) {
            $inputElement = $options['prefix'];
        }

        $inputElement .= $type === 'password' ? $this->form->password($name, $optionsField) : $this->form->{$type}($name, $value, $optionsField);

         if(isset($options['suffix'])) {
            $inputElement .= $options['suffix'];
        }

         if(isset($options['prefix']) || isset($options['suffix'])) {
            $inputElement = '<div class="input-group">' . $inputElement . '</div>';
        }

        $wrapperOptions = $this->isHorizontal() ? ['class' => $this->getRightColumnClass()] : [];
        $wrapperElement = '<div' . $this->html->attributes($wrapperOptions) . '>' . $inputElement . $this->getFieldError($name) . $this->getHelpText($name, $optionsField) . '</div>';

        return $this->getFormGroup($name, $label, $wrapperElement);
    }
98449
protected function getInputFilterByName(ServiceLocatorInterface $serviceLocator, $name)
    {
        if ($serviceLocator->has('InputFilterManager')) {
            $serviceLocator = $serviceLocator->get('InputFilterManager');
        }

        $obj = $serviceLocator->get($name);
        if (!$obj instanceof InputFilterInterface) {
            throw new Exception\RuntimeException(sprintf(
                'Instance of type %s is invalid; must implement %s',
                (is_object($obj) ? get_class($obj) : gettype($obj)),
                InputFilterInterface::class
            ));
        }
        return $obj;
    }
830632
public function getBoolean($name, $default = '', $verb = 'get', $options = array())
    {
        //FILTER_SANITIZE_NUMBER_INT
        $filter = \IS\BOOLEAN;
        $options = array(
            "options" => $options
        );

        $boolean = $this->getVar($name, $filter, $default, $verb, $options);

        //@TODO valid is float before return

        return (boolean)$boolean;
    }
916083
public function getQuery($name = null, $filter = null, $default = null)
    {
        return $this->getHelper($_GET, $name, $filter, $default);
    }
625949
public function get($name = '', $default = null, $filter = null) {
        $value = $_GET;
        if ($name) {
            $value = $value[ $name ];
        }
        return $this->value($value, $default, $filter);
    }
1348507
public function data($data = [], $filter = FILTER_DEFAULT, $options = [])
    {
        $sanitized = new static($data, $filter, $options, new Validate);

        return $sanitized->getData();
    }
654680
public static function input(Input $input, $filter = self::FILTER_NONE): string
    {
        return self::tag($input->tag(), $input->attributes(), $input->value(), $filter, $input);
    }
1356102
public static function get($name, $options = [])
    {
        $default = isset($options["default"]) ? $options["default"] : null;

        return isset($_REQUEST[$name]) ? $_REQUEST[$name]: $default;
    }
922013
public function create($filterTypeAlias, $name = null, array $options = [])
    {
        $alias = strtolower($filterTypeAlias);

        if (!$this->filterChain->hasType($alias)) {
            throw new FilterCreatorException(sprintf('Given filter type alias "%s" does not exist.', $alias));
        }


        /** @var FilterInterface $filter */
        $filter = clone $this->filterChain->getType($alias);

        if (!($filter instanceof FilterInterface)) {
            // The filter must implement the bundles FilterInterface.
            throw new FilterCreatorException(sprintf(
                'Filter "%s" must implement Da2e\FiltrationBundle\Filter\Filter\FilterInterface interface.',
                get_class($filter)
            ));
        }

        $filter->setName($name === null ? $this->generateUniqueName($alias) : $name);

        if (count($options) > 0) {
            // Handle filter options if there are such.
            $this->filterOptionHandler->handle($filter, $options);
        }

        return $filter;
    }
1265366
public function put($name = '', $default = null, $filter = null) {
        if (is_null($this->put)) {
            $content = $this->body();
            if (strpos($content, '":')) {
                $this->put = json_decode($content, true);
            } else {
                parse_str($content, $this->put);
            }
        }
        if (!$name) {
            $value = $this->put;
        } else {
            $value = $this->put[ $name ];
        }
        return $this->value($value, $default, $filter);
    }