Download the PHP package codemonkeys-ru/repository-alias-bundle without Composer
On this page you can find all versions of the php package codemonkeys-ru/repository-alias-bundle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Table of contents
Download codemonkeys-ru/repository-alias-bundle
More information about codemonkeys-ru/repository-alias-bundle
Files in codemonkeys-ru/repository-alias-bundle
Download codemonkeys-ru/repository-alias-bundle
More information about codemonkeys-ru/repository-alias-bundle
Files in codemonkeys-ru/repository-alias-bundle
Vendor codemonkeys-ru
Package repository-alias-bundle
Short Description Symfony2 bundle providing alias syntax for working with entity repositories
License MIT
Package repository-alias-bundle
Short Description Symfony2 bundle providing alias syntax for working with entity repositories
License MIT
Please rate this library. Is it a good library?
Informations about the package repository-alias-bundle
CodeMonkeys RepositoryAliasBundle
Bundle provides alternative syntax for working with entity repositories. See Example section for more.
Installation
Install thru composer
php composer.phar require codemonkeys-ru/repository-alias-bundle
And add bundle to your AppKernel.php
class AppKernel extends Kernel
{
public function registerBundles()
{
...
new CodeMonkeysRu\RepositoryAliasBundle\RepositoryAliasBundle(),
...
}
}
Example
config.yml
repository_alias:
repository_key: "project.repo"
repository:
blogpost: AcmeBundle:Blog\Post
blogcomment: AcmeBundle:Blog\Comment
Instead of:
$repo = $this->getDoctrine()->getRepository('AcmeBundle:Blog\Post');
$post = new Acme\AcmeBundle\Blog\Post('title', 'post', $author);
Use:
$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
All versions of repository-alias-bundle with dependencies
PHP Build Version
Package Version
The package codemonkeys-ru/repository-alias-bundle contains the following files
Loading the files please wait ....