Skip to content

tina-junold/silex-pdo-service-provider

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

PDOServiceProvider

Usage

Define the configuration:

<?php
    $config = [
        // ...
        'pdo.options' => [
            'dsn'        => 'mysql:host=localhost;dbname=sample;charset=UTF8',
            'username'   => 'user',
            'password'   => 'pass',
            'options'    => [],
            'attributes' => [],
        ],

        // ...

and register the service:

<?php
    $app->register(new IPC\Silex\Provider\PDOServiceProvider(), ['pdo.options' => $config['pdo.options']]);

About

A silex service provider which provides a pdo connection

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages