Commit 5cc7c3a6 authored by Taylor Otwell's avatar Taylor Otwell

refactoring.

parent 3dbc60ae
......@@ -40,7 +40,7 @@ class Cookie {
*/
public function get($name, $default = null)
{
return Arr::get($_COOKIE, $name, $default);
return Arr::get($this->cookies, $name, $default);
}
/**
......@@ -81,7 +81,7 @@ class Cookie {
{
if (headers_sent()) return false;
if ($minutes < 0) unset($_COOKIE[$name]);
if ($minutes < 0) unset($this->cookies[$name]);
// Since PHP needs the cookie lifetime in seconds, we will calculate it here.
// A "0" lifetime means the cookie expires when the browser closes.
......
......@@ -80,7 +80,7 @@ class Form {
*/
protected static function action($action, $https)
{
$uri = IoC::container()->resolve('laravel.uri')->get();
$uri = IoC::container()->core('uri')->get();
return HTML::entities(URL::to(((is_null($action)) ? $uri : $action), $https));
}
......@@ -159,7 +159,7 @@ class Form {
throw new \Exception("A session driver must be specified before using CSRF tokens.");
}
return IoC::container()->resolve('laravel.session')->get('csrf_token');
return IoC::container()->core('session')->get('csrf_token');
}
/**
......
......@@ -116,7 +116,7 @@ class Input {
throw new \Exception('A session driver must be specified in order to access old input.');
}
$driver = IoC::container()->resolve('laravel.session');
$driver = IoC::container()->core('session');
return Arr::get($driver->get(Input::old_input, array()), $key, $default);
}
......
......@@ -25,7 +25,7 @@ date_default_timezone_set(Config::get('application.timezone'));
*/
if (Config::get('session.driver') !== '')
{
$session = $container->resolve('laravel.session.manager');
$session = $container->core('session.manager');
$container->instance('laravel.session', $session->payload(Config::get('session')));
}
......@@ -36,15 +36,15 @@ if (Config::get('session.driver') !== '')
* will be called with the current requst instance. If no route is found, the 404
* response will be returned to the browser.
*/
$request = $container->resolve('laravel.request');
$request = $container->core('request');
list($method, $uri) = array($request->method(), $request->uri());
$route = $container->resolve('laravel.routing.router')->route($request, $method, $uri);
$route = $container->core('routing.router')->route($request, $method, $uri);
if ( ! is_null($route))
{
$response = $container->resolve('laravel.routing.caller')->call($route);
$response = $container->core('routing.caller')->call($route);
}
else
{
......@@ -65,9 +65,9 @@ $response->content = $response->render();
*/
if (isset($session))
{
$flash = array(Input::old_input => $container->resolve('laravel.input')->get());
$flash = array(Input::old_input => $container->core('input')->get());
$session->close($container->resolve('laravel.session'), Config::get('session'), $flash);
$session->close($container->core('session'), Config::get('session'), $flash);
}
/**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment