clean up a few more things.

This commit is contained in:
Taylor Otwell 2011-09-17 23:55:36 -05:00
parent cb5a426cba
commit 7898094e25
2 changed files with 13 additions and 4 deletions

View File

@ -108,7 +108,7 @@
($request->spoofed()) ? $input = $_POST : parse_str(file_get_contents('php://input'), $input); ($request->spoofed()) ? $input = $_POST : parse_str(file_get_contents('php://input'), $input);
} }
unset($input['_REQUEST_METHOD_']); unset($input['_REQUEST_METHOD']);
return new Input($container->resolve('laravel.file'), $container->resolve('laravel.cookie'), $input, $_FILES); return new Input($container->resolve('laravel.file'), $container->resolve('laravel.cookie'), $input, $_FILES);
}), }),

View File

@ -13,7 +13,14 @@ class Connection {
protected $config; protected $config;
/** /**
* The PDO connection. * The query grammar instance for the connection.
*
* @var Grammars\Grammar
*/
protected $grammar;
/**
* The raw PDO connection instance.
* *
* @var PDO * @var PDO
*/ */
@ -127,13 +134,15 @@ public function table($table)
*/ */
protected function grammar() protected function grammar()
{ {
if (isset($this->grammar)) return $this->grammar;
switch (isset($this->config['grammar']) ? $this->config['grammar'] : $this->driver()) switch (isset($this->config['grammar']) ? $this->config['grammar'] : $this->driver())
{ {
case 'mysql': case 'mysql':
return new Grammars\MySQL; return $this->grammar = new Grammars\MySQL;
default: default:
return new Grammars\Grammar; return $this->grammar = new Grammars\Grammar;
} }
} }