Piwik\DbHelper::getTableColumns PHP Method

getTableColumns() public static method

Get list of installed columns in a table
public static getTableColumns ( string $tableName ) : array
$tableName string The name of a table.
return array Installed columns indexed by the column name.
    public static function getTableColumns($tableName)
    {
        return Schema::getInstance()->getTableColumns($tableName);
    }

Usage Example

 /**
  * @expectedException \Zend_Db_Statement_Exception
  * @expectedExceptionMessage custom_dimensions
  */
 public function test_shouldBeAbleToUninstallConfigTable()
 {
     $this->config->uninstall();
     try {
         DbHelper::getTableColumns($this->tableName);
         // doesn't work anymore as table was removed
     } catch (Zend_Db_Statement_Exception $e) {
         $this->config->install();
         throw $e;
     }
     $this->config->install();
 }
All Usage Examples Of Piwik\DbHelper::getTableColumns