Download the PHP package liquidbox/silex-pdo without Composer

On this page you can find all versions of the php package liquidbox/silex-pdo. 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 silex-pdo

GitHub release Build Status Code Coverage Scrutinizer Code Quality Packagist

You are reading the documentation for Silex 2.x. Switch to the documentation for Silex 1.x.

PHP Data Objects

The PdoServiceProvider provides integration with the PHP Data Objects (PDO) extension.

Parameters

The parameters pdo.driver and pdo.connection are ignored if pdo.dsn is set.

Services

Registering

Example #1 Connecting to MySQL

The two registered connections are equivalent.

Example #2 Connecting to SQLite

Example #3 Using Doctrine service names

The services pdo and pdo.connections will be renamed db and dbs respectively.

Add PDO as a dependency:

Usage

Example #1 Demonstrate query

Example #2 Prepare an SQL statement with named parameters

Using multiple databases

The PDO provider can allow access to multiple databases. In order to configure the data sources, use pdo.dsn as an array of configurations where keys are connection names and values are parameters:

The first registered connection is the default and can simply be accessed as you would if there was only one connection. Given the above configuration, these two lines are equivalent:

You can use different drivers for each connection.

This registers $app['pdo.dbs']['member_db'], $app['pdo.dbs']['content_db'], and $app['pdo.dbs']['session_storage'] using PostgreSQL, MySQL, and SQLite drivers respectively.

Traits

LiquidBox\Silex\Application\PdoTrait adds the following shortcut:

For more information, check out the official PDO documentation.


All versions of silex-pdo with dependencies

PHP Build Version
Package Version
Requires silex/silex Version ^2.0
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 liquidbox/silex-pdo contains the following files

Loading the files please wait ....