承接 herrera-io/silex-pdo 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

herrera-io/silex-pdo

最新稳定版本:1.2.1

Composer 安装命令:

composer require herrera-io/silex-pdo

包简介

A simple PDO service provider.

README 文档

README

Build Status

A simple PDO service provider.

Summary

A stupid simple PDO service provider. I cannot get any more clear than this.

Installation

Add it to your list of Composer dependencies:

$ composer require "herrera-io/silex-pdo=1.*"

Usage

use Herrera\Pdo\PdoServiceProvider;
use Silex\Application;

$app = new Application();
$app->register(
    new PdoServiceProvider(),
    array(
        'pdo.dsn' => 'pdo_mysql:dbname=test;host=127.0.0.1',
        'pdo.username' => 'username', // optional
        'pdo.password' => 'password', // optional
        'pdo.options' => array( // optional
            PDO::MYSQL_ATTR_INIT_COMMAND => "SET NAMES 'UTF8'"
        )
    )
);

$pdo = $app['pdo'];

You can also use the PdoTrait to add a prepare method to your application:

use Herrera\Pdo\PdoTrait;
use Silex\Application;

class MyApp extends Application
{
    use PdoTrait;
}

You will still need to register the service provider.

If debugging is enabled and Monolog is available, a logging version of PDO will be used to log queries and their execution time.

统计信息

  • 总下载量: 172.38k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 24
  • 点击次数: 1
  • 依赖项目数: 1
  • 推荐数: 0

GitHub 信息

  • Stars: 22
  • Watchers: 3
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2013-05-31

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固