lalbert/silex-mongodb 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

lalbert/silex-mongodb

Composer 安装命令:

composer require lalbert/silex-mongodb

包简介

Simple mongodb service provider for Silex 2.x and official mongodb driver

README 文档

README

Simple mongodb service provider for Silex 2.x and official mongodb driver

Features

This library provides easy access to a MongoDB database using the extension (mongodb, not mongo) and the official MongoDB PHP driver.

Requirements

Installation

The best way to install the component is using Composer

$ composer require lalbert/silex-mongodb

Usage

Register service

$app->register(new MongoDBServiceProvider());

You can also pass configuration settings :

See http://php.net/manual/en/mongodb-driver-manager.construct.php for options allowed.

$app->register(new MongoDBServiceProvider(), [
    'mongodb.config' => [
        'server' => 'mongodb://localhost:27017',
        'options' => [],
        'driverOptions' => [],
    ]
]);

Your application :

$document = ['key' => 'value'];

$app['mongodb']
  ->mydatabase
  ->mycollection
  ->insert($document)
;

See official MongoDB PHP Library documentation

统计信息

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

GitHub 信息

  • Stars: 5
  • Watchers: 1
  • Forks: 2
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2016-05-27

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固