From cbad97c78d3cfc00379f43b33414603e83d82c08 Mon Sep 17 00:00:00 2001
From: Qiang Xue <qiang.xue@gmail.com>
Date: Sun, 29 Dec 2013 09:51:36 -0500
Subject: [PATCH] change back the visibility of findTableNames to protected.

---
 framework/yii/db/mysql/Schema.php       | 2 +-
 framework/yii/db/pgsql/QueryBuilder.php | 2 +-
 framework/yii/db/pgsql/Schema.php       | 2 +-
 framework/yii/db/sqlite/Schema.php      | 2 +-
 tests/unit/framework/db/SchemaTest.php  | 2 +-
 5 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/framework/yii/db/mysql/Schema.php b/framework/yii/db/mysql/Schema.php
index d5258c1..a649d8a 100644
--- a/framework/yii/db/mysql/Schema.php
+++ b/framework/yii/db/mysql/Schema.php
@@ -280,7 +280,7 @@ class Schema extends \yii\db\Schema
 	 * @param string $schema the schema of the tables. Defaults to empty string, meaning the current or default schema.
 	 * @return array all table names in the database. The names have NO schema name prefix.
 	 */
-	public function findTableNames($schema = '')
+	protected function findTableNames($schema = '')
 	{
 		$sql = 'SHOW TABLES';
 		if ($schema !== '') {
diff --git a/framework/yii/db/pgsql/QueryBuilder.php b/framework/yii/db/pgsql/QueryBuilder.php
index f1ac032..998e746 100644
--- a/framework/yii/db/pgsql/QueryBuilder.php
+++ b/framework/yii/db/pgsql/QueryBuilder.php
@@ -109,7 +109,7 @@ class QueryBuilder extends \yii\db\QueryBuilder
 	{
 		$enable = $check ? 'ENABLE' : 'DISABLE';
 		$schema = $schema ? $schema : $this->db->schema->defaultSchema;
-		$tableNames = $table ? [$table] : $this->db->schema->findTableNames($schema);
+		$tableNames = $table ? [$table] : $this->db->schema->getTableNames($schema);
 		$command = '';
 
 		foreach ($tableNames as $tableName) {
diff --git a/framework/yii/db/pgsql/Schema.php b/framework/yii/db/pgsql/Schema.php
index 59340c9..96889ab 100644
--- a/framework/yii/db/pgsql/Schema.php
+++ b/framework/yii/db/pgsql/Schema.php
@@ -158,7 +158,7 @@ class Schema extends \yii\db\Schema
 	 * @param string $schema the schema of the tables. Defaults to empty string, meaning the current or default schema.
 	 * @return array all table names in the database. The names have NO schema name prefix.
 	 */
-	public function findTableNames($schema = '')
+	protected function findTableNames($schema = '')
 	{
 		if ($schema === '') {
 			$schema = $this->defaultSchema;
diff --git a/framework/yii/db/sqlite/Schema.php b/framework/yii/db/sqlite/Schema.php
index 6548999..9f410b4 100644
--- a/framework/yii/db/sqlite/Schema.php
+++ b/framework/yii/db/sqlite/Schema.php
@@ -87,7 +87,7 @@ class Schema extends \yii\db\Schema
 	 * If not empty, the returned table names will be prefixed with the schema name.
 	 * @return array all table names in the database.
 	 */
-	public function findTableNames($schema = '')
+	protected function findTableNames($schema = '')
 	{
 		$sql = "SELECT DISTINCT tbl_name FROM sqlite_master WHERE tbl_name<>'sqlite_sequence'";
 		return $this->db->createCommand($sql)->queryColumn();
diff --git a/tests/unit/framework/db/SchemaTest.php b/tests/unit/framework/db/SchemaTest.php
index 3727737..05a0ff2 100644
--- a/tests/unit/framework/db/SchemaTest.php
+++ b/tests/unit/framework/db/SchemaTest.php
@@ -11,7 +11,7 @@ use yii\db\Schema;
  */
 class SchemaTest extends DatabaseTestCase
 {
-	public function testFindTableNames()
+	public function testGetTableNames()
 	{
 		/** @var Schema $schema */
 		$schema = $this->getConnection()->schema;
--
libgit2 0.27.1