helios-ag/fm-lessql-bundle 问题修复 & 功能扩展

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

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

helios-ag/fm-lessql-bundle

最新稳定版本:0.1

Composer 安装命令:

composer require helios-ag/fm-lessql-bundle

包简介

Lessql bundle, adds LessQL ORM PHP to your Symfony project

README 文档

README

LessQL integration in Symfony2

LessQL is a lightweight and powerful alternative to Object-Relational Mapping for PHP.

Installation

Step 1: Installation

Using Composer, just add the following configuration to your composer.json:

Or you can use composer to install this bundle: Add FMBbcodeBundle in your composer.json:

    composer require helios-ag/fm-lessql-bundle

Now tell composer to download the bundle by running the command:

    composer update helios-ag/fm-lessql-bundle

Step 2: Enable the bundle

Finally, enable the bundle in the kernel:

<?php
// app/AppKernel.php

public function registerBundles()
{
    $bundles = array(
        // ...
        new FM\LessqlBundle\FMLessqlBundle(),
    );
}

Configuration

You can configure bundle as follows

fm_lessql:
    instances:
        default:
            dsn: sqlite:%kernel.root_dir%/test.sqlite3
            username: ''
            password: ''
            options:
        mysql:
            dsn: mysql:host=localhost;dbname=testdb;charset=utf8
            username: root
            password: 12345
            options:
              'PDO::ATTR_EMULATE_PREPARES': { value: false }
              'PDO::ATTR_ERRMODE': { value: 'PDO::ERRMODE_EXCEPTION' }

##Usage Controller

class AppController extends Controller
{
    /**
     * @Template()
     */
    public function indexAction()
    {

        $db = $this->get('fm_lessql.manager')->getDB('default');
        $posts = array();
        $result = $db->table_name();
        $result = $db->table( 'post' );
        $row = $result->fetch();      // fetch next row in result
        $rows = $result->fetchAll();  // fetch all rows
    }     
}

More information can be found at http://lessql.net/

统计信息

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

GitHub 信息

  • Stars: 1
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2015-09-23

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固