loso/di-annotations-bundle 问题修复 & 功能扩展

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

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

loso/di-annotations-bundle

Composer 安装命令:

composer require loso/di-annotations-bundle

包简介

A bundle that enables Dependency Injection by annotations into your Symfony2 projects.

README 文档

README

What is LosoDiAnnotationsBundle?

A bundle that enables Dependency Injection by annotations into your Symfony2 projects.

Build Status

Requirements

LosoDiAnnotationsBundle requires PHP 5.3 or later. It has been tested with Symfony v2.0.4.

You will need at least the following libraries in your vendor directory:

  • Doctrine\Common
  • Symfony

If you want to use the functionalities around entity repositories, you will also need:

  • Doctrine\DBAL
  • Doctrine\ORM

License

The files in this archive are released under the MIT license. You can find a copy of this license in the LICENSE file.

Documentation

You can read the documentation in Resources/doc/index.rst

Tests

LosoDiAnnotationsBundle is heavily tested! To run the tests, you'll need to set the path to the vendors libraries in Tests/bootstrap.php and run the following command from the project's root:

phpunit --colors --bootstrap Tests/bootstrap.php Tests

Also LosoDiAnnotationsBundle uses Travis for continuous integration, see: Build Status

Installation

1. Add LosoDiAnnotationsBundle to your vendor libraries:

$ cp -r <path_to>/LosoDiAnnotationsBundle vendor/bundles/Loso/Bundle/DiAnnotationsBundle

Or via Git:

$ git submodule add git://github.com/loicfrering/LosoDiAnnotationsBundle.git vendor/bundles/Loso/Bundle/DiAnnotationsBundle

2. Register Loso namespace with the autoloader in app/autoload.php:

<?php
$loader->registerNamespaces(array(
    // ...
    'Symfony'          => array(__DIR__.'/../vendor/symfony/src', __DIR__.'/../vendor/bundles'),
    'Doctrine\\Common' => __DIR__.'/../vendor/doctrine-common/lib',
    'Loso'             => __DIR__.'/../vendor/bundles',
    // ...
));

3. Register LosoDiAnnotationsBundle with your application's kernel in app/AppKernel.php:

<?php
public function registerBundles()
{
    $bundles = array(
        // ...
        new Loso\Bundle\DiAnnotationsBundle\LosoDiAnnotationsBundle(),
        // ...
    );

    // ...

    return $bundles;
}

Configuration

You can configure LosoDiAnnotationsBundle in one of the following ways in app/config/config.yml:

# app/config/config.yml
loso_di_annotations:
    service_scan:
        DemoBundle: ~
        MyBundle:
            base_namespace: [Prefix1, Prefix2\SubPrefix]
        arbitrary_key:
            dir:
                - dir1
                - dir2

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2011-11-07

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固