Download the PHP package soluble/dbwrapper without Composer

On this page you can find all versions of the php package soluble/dbwrapper. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package dbwrapper

soluble/dbwrapper

PHP 7.1+ Build Status codecov Scrutinizer Quality Score Latest Stable Version Total Downloads License

Introduction

Minimalist (but universal) database wrapper to rule them all (and to not choose).

Features

Requirements

For PHP 5.6+, 7.0+ or HHVM >= 3.9 look at version 1.3. For PHP < 5.6 take the 1.2 version

Documentation

Installation

Instant installation via composer.

Quick start

Connection

Create an adapter from an existing Mysqli connection

Querying database

Execute SQL

Get connection infos

Execute SQL

API methods

AdapterFactory

The DbWrapper\AdapterFactory allows to instanciate an Adapter from en existing connection link or resource.

Methods Return Comment
static createAdapterFromResource($resource) AdapterInterface From existing resource (mysqli, pdo)
static createAdapterFromDbal2($dbal) AdapterInterface From doctrine/dbal connection
static createAdapterFromCapsule5($capsule) AdapterInterface From Laravel connection
static createAdapterFromZendDb2($zend) AdapterInterface From zend-db connection

AdapterInterface

The DbWrapper\Adapter\AdapterInterface provides common operation on your database.

Methods Return Description
query($query) Resultset Iterable results DbWrapper\Result\Resultset
execute($query) void Execute command (set, ...)
quoteValue($value) string Quote value
getConnection() ConnectionInterface ConnectionInterface

Resultset

The DbWrapper\Result\Resultset is can be easily iterated through a simple foreach loop. Additionnaly you can call the following methods :

Methods Return Description
count() int Count the number of results

ConnectionInterface

The DbWrapper\Connection\ConnectionInterface provides information about your connection

Methods Return Description
getCurrentSchema() string|false Return current schema
getResource() mixed Return internal connection (pdo, mysqli...)
getHost() string Return server hostname or IP

Supported databases

Native

soluble/dbwrapper supports natively :

Database PHP ext
Mysql mysqli, pdo_mysql
MariaDb mysqli, pdo_mysql
Sqlite pdo_sqlite

For examples, see the native drivers doc

Userland implementations

Some of the supported databases can be (incomplete list) :

Database Doctrine Laravel Zend
Mysql Yes Yes Yes
MariaDb Yes Yes Yes
Sqlite Yes Yes Yes
Oracle Yes No Yes
Sqlserver Yes Yes Yes
Postgres Yes Yes Yes

(...)

For examples, see the userland drivers doc

Motivations

Initially the reason behind the development of soluble/dbwrapper was to get a reliable and lightweight library to abstract the PDO_mysql and mysqli driver interfaces.

Later on, while developing some libraries, I feel the need for something more framework agnostic that could still be integrated easily into any modern framework. The userland drivers idea was born.

Contributing

Contribution and pull request are more than welcome, see the contribution guide

Coding standards


All versions of dbwrapper with dependencies

PHP Build Version
Package Version
Requires php Version ^7.1
ext-pdo Version *
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package soluble/dbwrapper contains the following files

Loading the files please wait ....