@param string $name
@param string $value
@param string $type
@param string $documentName
@param string $format

@return null|array
198915
public function generateFilter($type, $name, $value, $documentName='', $format='')
    {
        /**
         * @var FilterTypeInterface $filterType
         */
        foreach ($this->filters as $filterType){
            if ($filterType->support($type)) {
                return $filterType->generateFilter($name, $value, $documentName, $format);
            }
        }

        return null;
    }
751817
public static function getFormatDefinition(string $name): ?string
    {
        if (!self::$formats) {
            self::$formats = self::initFormats();
        }

        return isset(self::$formats[$name]) ? self::$formats[$name] : null;
    }
1319847
protected function handleJsonType($name, $value)
    {
        if ($cast = array_get($this->repository->getCasts(), $name)) {
            if (in_array($cast, ['array', 'json'], true)) {
                $value = json_decode($value);
            }
        }

        return $value;
    }
67778
public static function checkType($name, $type, $value) {
    $given_type = self::getType($value);
    if ($given_type !== $type) {
      $value = $value instanceof Atom ? $value->toJson() : json_encode($value);
      throw new \UnexpectedValueException("`$value` should be a `$type` not `$given_type`. If you're decoding JSON, make sure you're using valid JSON.");
    }
  }
323633
public function mapValueToType($name, $value) {
		// just store as an untokenised string
		$type = 'String';
		
		if (strpos($name, ':')) {
			list($name, $type) = explode(':', $name);
			return $type;
		}

		// or an array of strings
		if (is_array($value)) {
			$type = 'MultiValueField';
		}
		
		if (is_double($value)) {
			return 'Double';
		}
		
		if (is_int($value)) {
			return 'Int';
		}

		return $type; 
	}
599601
protected static function ensureType($type, $value, $errorMessage)
    {
        if (!($value instanceof $type)) {
            throw new PdfTypeException(
                $errorMessage,
                PdfTypeException::INVALID_DATA_TYPE
            );
        }

        return $value;
    }
612906
protected function _constraint($name, $value, $schema = null) {
		$value += ['options' => []];
		$meta = isset($this->_constraints[$name]) ? $this->_constraints[$name] : null;
		$template = isset($meta['template']) ? $meta['template'] : null;
		if (!$template) {
			return;
		}

		$data = [];
		foreach ($value as $name => $value) {
			switch ($name) {
				case 'key':
				case 'index':
					if (isset($meta[$name])) {
						$data['index'] = $meta[$name];
					}
				break;
				case 'to':
					$data[$name] = $this->name($value);
				break;
				case 'on':
					$data[$name] = "ON {$value}";
				break;
				case 'expr':
					if (is_array($value)) {
						$result = [];
						$context = new Query(['type' => 'none']);
						foreach ($value as $key => $val) {
							$return = $this->_processConditions($key, $val, $context, $schema);
							if ($return) {
								$result[] = $return;
							}
						}
						$data[$name] = join(" AND ", $result);
					} else {
						$data[$name] = $value;
					}
				break;
				case 'toColumn':
				case 'column':
					$data[$name] = join(', ', array_map([$this, 'name'], (array) $value));
				break;
			}
		}

		return trim(Text::insert($template, $data, ['clean' => true]));
	}
133488
public function bind($value, $type = PDO::PARAM_STR, $name = null)
    {
        if (is_array($value)) {
            $this->bind = array_merge($this->bind, $value);
        } else {
            $name = $name ?: 'ThinkBind_' . (count($this->bind) + 1) . '_';

            $this->bind[$name] = [$value, $type];
            return $name;
        }

        return $this;
    }
255938
public function getSymbol($name, $value=null, $verbosity = FormatterContract::SHORT)
    {
        $key = $this->getSymbolKey($name, $value, $verbosity);

        if (!isset($this->formatCache[$key])) {
            $this->formatCache[$key] = $this->loadFormat($key);
        }

        if ($name == self::WEEKDAY || $name == self::MONTH) {
            $this->dateFormatCache = [];
        }

        return $this->formatCache[$key];
    }
332103
public static function post(String $name = NULL, $value = NULL)
    {
        return self::_method($name, $value, $_POST ,__FUNCTION__);
    }
1095850
protected function filterByTranslatableColumn($name, $type, $value)
    {
        $translation = $this->model->getTranslationModel();

        return $this->query->whereHas('translations', function ($query) use ($translation, $name, $type, $value) {
            return $query = $this->applyQueryElementByType($query, $translation->getTable(), $name, $type, $value);
        });
    }
551889
public function holder($name = null, $value = null) {
        if ($name === null && $value === null) {
            return $this->holders[ 'default' ];
        }
        if ($value === null) {
            $value = $name;
            $name = 'default';
        }
        $this->holders[ $name ] = $value;
        return null;
    }
1198930
public function getPost(string $name, string $type = null, $default = null)
    {
        $value = $this->getUserData($this->post, $name);

        if ($type) {
            $value = $this->validateType($value, $type, $default);
        }

        return $value;
    }
925641
public function input($type, $name, $value = null, $options = [])
    {
        // Don't add form-control for some input types (like submit, checkbox, radio)
        if (!in_array($type, ['submit', 'checkbox', 'radio', 'reset', 'file'])) {
            $options = $this->appendClassToOptions('form-control', $options);
        } else if (in_array($type, ['submit', 'reset'])) {
            $options = $this->appendClassToOptions('btn', $options);
        }

        // Call the parent input method so that Laravel can handle
        // the rest of the input set up.
        return parent::input($type, $name, $value, $options);
    }
1014719
protected function date($name, $value, $format){
        //Si no se completo no se valida
        if(! $this->isComplete($value)){
            return TRUE;
        }
        $separator_type= array(
            "/",
            "-",
            "."
        );        
        $separator_used= NULL;
        foreach ($separator_type as $separator) {
            $find= stripos($value, $separator);
            if($find <> FALSE){
                $separator_used= $separator;
            }
        }        
        if($separator_used != NULL){      
            $dato_array= explode($separator_used, $value);
            $valid= FALSE;
            switch ($format){
                case 'Y-m-d':
                    if($separator_used == '-'){
                        $valid= checkdate($dato_array[1], $dato_array[2], $dato_array[0]);
                    }
                    break;
                case 'd-m-Y':
                    if($separator_used == '-'){
                        $valid= checkdate($dato_array[1], $dato_array[0], $dato_array[2]);
                    }
                    break;
                case 'd/m/Y':
                    if($separator_used == '/'){
                        $valid= checkdate($dato_array[1], $dato_array[0], $dato_array[2]);
                    }
                    break;
                case 'Y/m/d':
                    if($separator_used == '/'){
                        $valid= checkdate($dato_array[1], $dato_array[2], $dato_array[0]);
                    }
                    break;
                case 'Y.m.d':
                    if($separator_used == '.'){
                        $valid= checkdate($dato_array[1], $dato_array[2], $dato_array[0]);
                    }
                    break;
                case 'd.m.Y':
                    if($separator_used == '.'){
                        $valid= checkdate($dato_array[1], $dato_array[0], $dato_array[2]);
                    }
                    break;
                default :
                    if($separator_used == '-'){
                        $valid= checkdate($dato_array[1], $dato_array[2], $dato_array[0]);
                    }
                    break;          
            }
        }else{
            $valid= false;
        }
        
        if($valid){
            return TRUE;
        }else{
            $this->add_message($name, 'date', array('format' => $format));
            return FALSE;
        }        
    }
65563
public function input($type, $name, $value = null)
    {
        $value = $this->inputs ? $this->inputs->get($name, $value) : $value;
        $form  = (new Input($type, $name))->value($value);
        return $this->setClass($form);
    }
308448
protected static function _method($name, $value, $input, $type)
    {
        if( empty($name) )
        {
            return $input;
        }

        # @value parametresi boş değilse 5.4.7[edited]
        if( $value !== NULL )
        {
            switch( $type )
            {
                case 'post'    : $_POST[$name]    = $value; break;
                case 'get'     : $_GET[$name]     = $value; break;
                case 'request' : $_REQUEST[$name] = $value; break;
                case 'env'     : $_ENV[$name]     = $value; break;
                default        : $_POST[$name]    = $value; break;
            }

            return true;
        }

        if( isset($input[$name]) )
        {
            if( is_scalar($input[$name]) )
            {
                if( Json::check($input[$name]) )
                {
                    return $input[$name];
                }
                else
                {
                    return htmlspecialchars($input[$name], ENT_QUOTES, "utf-8");
                }
            }
            elseif( is_array($input[$name]) )
            {
                return array_map('ZN\Security\Html::encode', $input[$name]);
            }

            return $input[$name];
        }

        return false;
    }