shapecode/repository-as-a-service 问题修复 & 功能扩展

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

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

shapecode/repository-as-a-service

最新稳定版本:2.0.0

Composer 安装命令:

composer require shapecode/repository-as-a-service

包简介

Symfony2 Bundle which you can register repositories easily.

README 文档

README

SensioLabsInsight Dependency Status Latest Stable Version Total Downloads License

This bundle allows to register repositories as a service.

Install instructions

Installing this bundle can be done through these simple steps:

Add the bundle to your project as a composer dependency:

// composer.json
{
    // ...
    require: {
        // ...
        "shapecode/repository-as-a-service": "~1.2"
    }
}

Update your composer installation:

$ composer update

Add the bundle to your application kernel:

<?php

// application/ApplicationKernel.php
public function registerBundles()
{
	// ...
	$bundle = array(
		// ...
        new Shapecode\Bundle\RasSBundle\ShapecodeRasSBundle(),
	);
    // ...

    return $bundles;
}

Start using the bundle and set repositories as services:

app.repository.example:
    class: %app.repository.example.class%
    tags:
        -  { name: doctrine.repository, class: %app.entity.example.class%, alias: example_repository }

or let the bundle do the job for you. It creates automatically services for you. Just access it with "lowercaseentitnyname_repository".

<?php

$this->getContainer()->get('lowercaseentitnyname_repository');

The old way to get repository is also supported. If you get them like this ...

<?php

$this->getRepository('ShapecodeRasSBundle:TestEntity');

... you get the service off the repository instead.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2015-04-01