From bf0aaa3cc75348b8ed7910ddeaec0f435dcc6ef2 Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Fri, 19 Aug 2011 20:19:45 -0500 Subject: [PATCH] remove query::table method. --- laravel/db/query.php | 21 ++------------------- 1 file changed, 2 insertions(+), 19 deletions(-) diff --git a/laravel/db/query.php b/laravel/db/query.php index f90af77b..d65fac06 100644 --- a/laravel/db/query.php +++ b/laravel/db/query.php @@ -90,18 +90,6 @@ public function __construct($table, Connection $connection) $this->from = 'FROM '.$this->wrap($table); } - /** - * Create a new query instance. - * - * @param string $table - * @param Connection $connection - * @return Query - */ - public static function table($table, Connection $connection) - { - return new static($table, $connection); - } - /** * Force the query to return distinct results. * @@ -638,16 +626,11 @@ public function delete($id = null) */ private function wrap($value) { - if (strpos(strtolower($value), ' as ') !== false) - { - return $this->wrap_alias($value); - } - - $wrap = $this->connection->wrapper(); + if (strpos(strtolower($value), ' as ') !== false) return $this->wrap_alias($value); foreach (explode('.', $value) as $segment) { - $wrapped[] = ($segment != '*') ? $wrap.$segment.$wrap : $segment; + $wrapped[] = ($segment != '*') ? $this->connection->wrapper().$segment.$this->connection->wrapper() : $segment; } return implode('.', $wrapped);