Download the PHP package radynsade/database-clock without Composer
On this page you can find all versions of the php package radynsade/database-clock. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Please rate this library. Is it a good library?
Informations about the package database-clock
Database Clock
A PSR-20 clock implementation that reads the current time from a database server and returns it as an immutable UTC value.
The package supports MySQL, MariaDB, and PostgreSQL through PDO and native database extensions.
Requirements
- PHP 8.4.1 or later (below PHP 9.0)
- A supported database server
- The extension required by the selected adapter:
| Adapter | Required extensions |
|---|---|
DatabaseClock\MySql\PdoClock |
ext-pdo, ext-pdo_mysql |
DatabaseClock\MySql\MysqliClock |
ext-mysqli |
DatabaseClock\PostgreSql\PdoClock |
ext-pdo, ext-pdo_pgsql |
DatabaseClock\PostgreSql\PgsqlClock |
ext-pgsql |
Installation
Usage
All adapters implement Psr\Clock\ClockInterface and return a DateTimeImmutable instance in UTC.
With PDO
MySQL with MySQLi
PostgreSQL with ext-pgsql
Testing
To include the PDO and Pgsql integration tests for PostgreSQL, provide a connection URL:
To include the PDO and MySQLi integration tests for MySQL or MariaDB, provide a connection URL:
License
MIT
All versions of database-clock with dependencies
PHP Build Version
Package Version
The package radynsade/database-clock contains the following files
Loading the files please wait ...