Commit d9a23975 by Alexander Makarov

Relaxed access level for `yii\gii\generators\model\Generator`

parent e2b2326e
...@@ -508,16 +508,16 @@ class Generator extends \yii\gii\Generator ...@@ -508,16 +508,16 @@ class Generator extends \yii\gii\Generator
} }
} }
private $_tableNames; protected $tableNames;
private $_classNames; protected $classNames;
/** /**
* @return array the table names that match the pattern specified by [[tableName]]. * @return array the table names that match the pattern specified by [[tableName]].
*/ */
protected function getTableNames() protected function getTableNames()
{ {
if ($this->_tableNames !== null) { if ($this->tableNames !== null) {
return $this->_tableNames; return $this->tableNames;
} }
$db = $this->getDbConnection(); $db = $this->getDbConnection();
if ($db === null) { if ($db === null) {
...@@ -540,10 +540,10 @@ class Generator extends \yii\gii\Generator ...@@ -540,10 +540,10 @@ class Generator extends \yii\gii\Generator
} }
} elseif (($table = $db->getTableSchema($this->tableName, true)) !== null) { } elseif (($table = $db->getTableSchema($this->tableName, true)) !== null) {
$tableNames[] = $this->tableName; $tableNames[] = $this->tableName;
$this->_classNames[$this->tableName] = $this->modelClass; $this->classNames[$this->tableName] = $this->modelClass;
} }
return $this->_tableNames = $tableNames; return $this->tableNames = $tableNames;
} }
/** /**
...@@ -574,8 +574,8 @@ class Generator extends \yii\gii\Generator ...@@ -574,8 +574,8 @@ class Generator extends \yii\gii\Generator
*/ */
protected function generateClassName($tableName) protected function generateClassName($tableName)
{ {
if (isset($this->_classNames[$tableName])) { if (isset($this->classNames[$tableName])) {
return $this->_classNames[$tableName]; return $this->classNames[$tableName];
} }
if (($pos = strrpos($tableName, '.')) !== false) { if (($pos = strrpos($tableName, '.')) !== false) {
...@@ -601,7 +601,7 @@ class Generator extends \yii\gii\Generator ...@@ -601,7 +601,7 @@ class Generator extends \yii\gii\Generator
} }
} }
return $this->_classNames[$tableName] = Inflector::id2camel($className, '_'); return $this->classNames[$tableName] = Inflector::id2camel($className, '_');
} }
/** /**
......
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