2017 © Pedro Peláez
 

symfony-bundle repository-alias-bundle

Symfony2 bundle providing alias syntax for working with entity repositories

image

codemonkeys-ru/repository-alias-bundle

Symfony2 bundle providing alias syntax for working with entity repositories

  • Tuesday, November 3, 2015
  • by iVariable
  • Repository
  • 2 Watchers
  • 2 Stars
  • 42 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 4 Versions
  • 0 % Grown

The README.md

CodeMonkeys RepositoryAliasBundle

Bundle provides alternative syntax for working with entity repositories. See Example section for more., (*1)

Installation

Install thru composer, (*2)

php composer.phar require codemonkeys-ru/repository-alias-bundle

And add bundle to your AppKernel.php, (*3)

class AppKernel extends Kernel
{
    public function registerBundles()
    {
        ...
        new CodeMonkeysRu\RepositoryAliasBundle\RepositoryAliasBundle(),
        ...
    }
}

Example

config.yml, (*4)

repository_alias:
    repository_key: "project.repo"
    repository:
        blogpost: AcmeBundle:Blog\Post
        blogcomment: AcmeBundle:Blog\Comment

Instead of:, (*5)

$repo = $this->getDoctrine()->getRepository('AcmeBundle:Blog\Post');
$post = new Acme\AcmeBundle\Blog\Post('title', 'post', $author);

Use:, (*6)

$repo = $this->get('project.repo.blogpost'); //Note repository_key "project.repo" usage.
$post = $this->get('project.repo.blogpost')->newEntity('title', 'post', $author);

ChangeLog

v0.1.3

  • Added getOriginalRepository decorator. Useful while configuring repos thru di container

v0.1.2

  • Added getAliasFor() method

v0.1.1

  • Added backloop interface

v0.1.0

  • Initial version

The Versions

03/11 2015

dev-master

9999999-dev

Symfony2 bundle providing alias syntax for working with entity repositories

  Sources   Download

MIT

The Requires

 

repository alias symfony repository alias

03/11 2015

v0.1.3

0.1.3.0

Symfony2 bundle providing alias syntax for working with entity repositories

  Sources   Download

MIT

The Requires

 

repository alias symfony repository alias

12/11 2012

0.1.1

0.1.1.0

Symfony2 bundle providing alias syntax for working with entity repositories

  Sources   Download

MIT

The Requires

 

repository alias symfony repository alias

30/10 2012

v0.1.0

0.1.0.0

Symfony2 bundle providing alias syntax for working with entity repositories

  Sources   Download

MIT

The Requires

 

repository alias symfony repository alias