public function __construct(\Pop\Db\Record $table)
{
// Check that the table has the appropriate columns.
$tableInfo = $table->getTableInfo();
if (!array_key_exists('timestamp', $tableInfo['columns']) || !array_key_exists('priority', $tableInfo['columns']) || !array_key_exists('name', $tableInfo['columns']) || !array_key_exists('message', $tableInfo['columns'])) {
throw new Exception("Error: The required table fields ('timestamp', 'priority', 'name' & 'message') do not exist in the table.");
}
$this->table = $table;
}