merged skunkworks into develop.

This commit is contained in:
Taylor Otwell
2012-01-16 13:59:24 -06:00
parent 610d8827c4
commit b5442c67fc
117 changed files with 7268 additions and 3999 deletions

View File

@@ -0,0 +1,38 @@
<?php namespace Laravel\Database\Schema\Grammars;
use Laravel\Fluent;
use Laravel\Database\Schema\Table;
abstract class Grammar extends \Laravel\Database\Grammar {
/**
* Get the appropriate data type definition for the column.
*
* @param Fluent $column
* @return string
*/
protected function type(Fluent $column)
{
return $this->{'type_'.$column->type}($column);
}
/**
* Wrap a value in keyword identifiers.
*
* @param Table|string $value
* @return string
*/
public function wrap($value)
{
// This method is primarily for convenience so we can just pass a
// column or table instance into the wrap method without sending
// in the name each time we need to wrap one of these objects.
if ($value instanceof Table or $value instanceof Fluent)
{
$value = $value->name;
}
return parent::wrap($value);
}
}