added facades and made other ioc improvements.

This commit is contained in:
Taylor Otwell
2011-08-30 22:09:47 -05:00
parent 501953f2db
commit 0ef96fb8d0
27 changed files with 271 additions and 276 deletions

View File

@@ -1,6 +1,8 @@
<?php namespace Laravel;
class Input {
class Input extends Facade { public static $resolve = 'input'; }
class Input_Engine {
/**
* The applicable input for the request.
@@ -24,7 +26,7 @@ class Input {
public $post;
/**
* The cookie manager instance.
* The cookie engine instance.
*
* @var Cookie
*/
@@ -82,7 +84,7 @@ class Input {
*
* @param string $key
* @param mixed $default
* @return string
* @return mixed
*/
public function get($key = null, $default = null)
{
@@ -109,7 +111,7 @@ class Input {
*/
public function old($key = null, $default = null)
{
$driver = IoC::container()->resolve('laravel.session.driver');
$driver = IoC::container()->resolve('laravel.session');
return Arr::get($driver->get('laravel_old_input', array()), $key, $default);
}