Download the PHP package geeshoe/dblib without Composer
On this page you can find all versions of the php package geeshoe/dblib. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download geeshoe/dblib
More information about geeshoe/dblib
Files in geeshoe/dblib
Informations about the package dblib
DbLib
DbLib is a PHP library intended to make it easier to work with MySQL/MariaDb databases within your project.
Please note that this project is in initial development and as such, some documentation may be incomplete.
Getting Started
DbLib is intended to be fully compliant with PSR-1, PSR-2, & PSR-4
Prerequisites
DbLib works with both MySQL and MariaDb.
- PHP 7.1+
- PDO_MYSQL extension
- PDO_JSON extension - If using the supplied Json configuration adapter.
To check if the above PHP extension's are enabled, run the following command in the CLI or add it to a page in your web root...
Installing
To add DbLib to your project, run:
If you prefer to use the development branch of dblib-php, use following line of code in the composer.json file.
Note: The development branch of DbLib is unstable at times and therefor not recommended in a production environment.
Configure
DbLib Configuration parameters can be set using various formats. However, JSON is the only format currently supported out of the box. Other formats such as .env, yaml, etc.. are soon to follow.
It is possible to brew your own config adapter using the AbstractConfigObject in the meantime.
Copy the included dblibConfig_DIST.json to a secure location outside of your projects web root.
Change the values to reflect your database configuration.
The param is not required. If the database is not specified in the config file, you must explicitly declare the database to use in your SQL statements.
I.e.
PDO Attributes are not fully supported in the current release. The ability to use attributes is provided but has not yet been implemented in DbLib automatically. This is currently at the top of the development list to bring back PDO Attributes as before. Full support for attributes is intended for the next major release, if not sooner.
PDO Attributes can be set in the config file as demonstrated above. More than one attribute can be set as follows:
Persistent Connections are planned in the future for DbLib, but currently are not supported. Because DbLib does not explicitly close PDO connections, it is possible to extend the DbLib class and override the method to set .
Documentation
API & usage documentation is soon to come.
Authors
- Jesse Rushlow - Lead developer - geeShoe Development
Source available at (https://github.com/geeshoe)
For questions, comments, or rant's, drop me a line at
All versions of dblib with dependencies
ext-pdo_mysql Version *
ext-pdo Version *
ext-json Version *