yii\db\Schema::quoteSimpleTableName PHP Method

quoteSimpleTableName() public method

A simple table name should contain the table name only without any schema prefix. If the table name is already quoted, this method will do nothing.
public quoteSimpleTableName ( string $name ) : string
$name string table name
return string the properly quoted table name
    public function quoteSimpleTableName($name)
    {
        return strpos($name, "'") !== false ? $name : "'" . $name . "'";
    }

Usage Example

 /**
  * @param string $alias
  * @param string|array $columns
  * @param \yii\db\Schema $schema
  * @return string
  */
 protected function quoteColumn($alias, $columns, $schema)
 {
     $t = $schema->quoteSimpleTableName($alias);
     if (!is_array($columns)) {
         return $t . '.' . $schema->quoteSimpleColumnName($columns);
     }
     $result = array();
     foreach ($columns as $column) {
         $result[] = $t . '.' . $schema->quoteSimpleColumnName($column);
     }
     return implode(',', $result);
 }