fuel/fuel/core/classes/validation.php
public function input($key = null, $default = null)
	{
		if ($key === null)
		{
			return $this->input;
		}

		// key transformation from form array to dot notation
		if (strpos($key,'[') !== false)
		{
			$key = str_replace(array('[', ']'),array('.', ''),$key);
		}

		// if we don't have this key
		if ( ! array_key_exists($key, $this->input))
		{
			// it might be in dot-notation
			if (strpos($key,'.') !== false)
			{
				// check the input first
				if (($result = \Arr::get($this->input, $key, null)) !== null)
				{
					$this->input[$key] = $result;
				}
				else
				{
					$this->input[$key] =  $this->global_input_fallback ? \Arr::get(\Input::param(), $key, $default) : $default;
				}
			}
			else
			{
				// do a fallback to global input if needed, or use the provided default
				$this->input[$key] =  $this->global_input_fallback ? \Input::param($key, $default) : $default;
			}
		}

		return $this->input[$key];
	}
public function input($key = null, $default = null)
	{
		if ($key === null)
		{
			return $this->input;
		}

		// key transformation from form array to dot notation
		if (strpos($key,'[') !== false)
		{
			$key = str_replace(array('[', ']'),array('.', ''),$key);
		}

		// if we don't have this key
		if ( ! array_key_exists($key, $this->input))
		{
			// it might be in dot-notation
			if (strpos($key,'.') !== false)
			{
				// check the input first
				if (($result = \Arr::get($this->input, $key, null)) !== null)
				{
					$this->input[$key] = $result;
				}
				else
				{
					$this->input[$key] =  $this->global_input_fallback ? \Arr::get(\Input::param(), $key, $default) : $default;
				}
			}
			else
			{
				// do a fallback to global input if needed, or use the provided default
				$this->input[$key] =  $this->global_input_fallback ? \Input::param($key, $default) : $default;
			}
		}

		return $this->input[$key];
	}
public function input ( $ key = null , $ default = null ) { if ( $ key === null ) { return $ this -> input ; } // key transformation from form array to dot notation if ( strpos ( $ key , '[' ) !== false ) { $ key = str_replace ( array ( '[' , ']' ) , array ( '.' , '' ) , $ key ) ; } // if we don't have this key if ( ! array_key_exists ( $ key , $ this -> input ) ) { // it might be in dot-notation if ( strpos ( $ key , '.' ) !== false ) { // check the input first if ( ( $ result = \ Arr :: get ( $ this -> input , $ key , null ) ) !== null ) { $ this -> input [ $ key ] = $ result ; } else { $ this -> input [ $ key ] = $ this -> global_input_fallback ? \ Arr :: get ( \ Input :: param ( ) , $ key , $ default ) : $ default ; } } else { // do a fallback to global input if needed, or use the provided default $ this -> input [ $ key ] = $ this -> global_input_fallback ? \ Input :: param ( $ key , $ default ) : $ default ; } } return $ this -> input [ $ key ] ; }
Fetches the input value from either post or given input

@param   string
@param   mixed
@return  mixed|array  the input value or full input values array
Fetches the input value from either post or given input