Pop\Log\Writer\Db::__construct PHP Метод

__construct() публичный Метод

Instantiate the DB writer object.
public __construct ( Record $table ) : Db
$table Pop\Db\Record
Результат Db
    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;
    }