Browse Source

added Input::merge method.

Taylor Otwell 12 years ago
parent
commit
f1feb467f1
2 changed files with 12 additions and 0 deletions
  1. 1 0
      laravel/documentation/changes.md
  2. 11 0
      laravel/input.php

+ 1 - 0
laravel/documentation/changes.md

@@ -54,6 +54,7 @@
 - Allow multiple views to be registered for a single composer.
 - Allow multiple views to be registered for a single composer.
 - Added `Request::set_env` method.
 - Added `Request::set_env` method.
 - `Schema::drop` now accepts `$connection` as second parameter.
 - `Schema::drop` now accepts `$connection` as second parameter.
+- Added `Input::merge` method.
 
 
 <a name="upgrade-3.2"></a>
 <a name="upgrade-3.2"></a>
 ## Upgrading From 3.1
 ## Upgrading From 3.1

+ 11 - 0
laravel/input.php

@@ -228,4 +228,15 @@ class Input {
 		Session::flash(Input::old_input, array());
 		Session::flash(Input::old_input, array());
 	}
 	}
 
 
+	/**
+	 * Merge new input into the current request's input array.
+	 *
+	 * @param  array  $input
+	 * @return void
+	 */
+	public static function merge(array $input)
+	{
+		Request::foundation()->request->replace($input);
+	}
+
 }
 }