Download the PHP package netpositive/discriminatormap-bundle without Composer
On this page you can find all versions of the php package netpositive/discriminatormap-bundle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Table of contents
Download netpositive/discriminatormap-bundle
More information about netpositive/discriminatormap-bundle
Files in netpositive/discriminatormap-bundle
Download netpositive/discriminatormap-bundle
More information about netpositive/discriminatormap-bundle
Files in netpositive/discriminatormap-bundle
Vendor netpositive
Package discriminatormap-bundle
Short Description Dynamic DiscriminatorMap extender for Symfony2 with Doctrine ORM 2
License MIT
Homepage https://github.com/Netpositive/NetpositiveDiscriminatorMapBundle
Package discriminatormap-bundle
Short Description Dynamic DiscriminatorMap extender for Symfony2 with Doctrine ORM 2
License MIT
Homepage https://github.com/Netpositive/NetpositiveDiscriminatorMapBundle
Please rate this library. Is it a good library?
Informations about the package discriminatormap-bundle
Provides the possibility to extend DiscriminatorMap on an Inheritance Mapped class with Class Table Inheritance in Symfony2 with Doctrine ORM 2.
This bundle was intended to extend an existing DiscriminatorMap (comes from any mapping) through the config file, if you can't do it by hand (ie: the bundle you want to extend is developed outside your project).
Installation
1, Using composer
1.1 Add netpositive/discriminatormapbundle to your composer.json
// composer.json
{
"require": {
...
"netpositive/discriminatormap-bundle": "dev-master"
1.2 Enable it at your kernel
// app/AppKernel.php
class AppKernel extends Kernel
{
public function registerBundles()
{
$bundles = array(
...
new Netpositive\DiscriminatorMapBundle\NetpositiveDiscriminatorMapBundle(),
2, Using vendors
2.1 Add to the deps file
[NetpositiveDiscriminatorMapBundle]
git=git://github.com/Netpositive/NetpositiveDiscriminatorMapBundle.git
target=bundles/Netpositive/DiscriminatorMapBundle
2.2 Register the namespace in your autoload.php
// app/autoload.php
$loader->registerNamespaces(array(
...
'Netpositive' => __DIR__.'/../vendor/bundles',
2.3 Enable it at your kernel
// app/AppKernel.php
class AppKernel extends Kernel
{
public function registerBundles()
{
$bundles = array(
...
new Netpositive\DiscriminatorMapBundle\NetpositiveDiscriminatorMapBundle(),
Configuration
# app/config/config.yml
netpositive_discriminator_map:
discriminator_map:
content:
entity: Netpositive\CmsBundle\Entity\Content
children:
course: University\CmsBundle\Entity\Content\Course
phonebook_entry: University\CmsBundle\Entity\Content\PhonebookEntry
...
Parent class:
/**
* Netpositive\CmsBundle\Entity\Content
*
* @ORM\Table(name="content")
* @ORM\Entity()
* @ORM\InheritanceType("JOINED")
* @ORM\DiscriminatorColumn(name="content_type", type="string", length="20")
* @ORM\DiscriminatorMap({"content" = "Content", "article" = "Article", ... })
*
*/
class Content
{
...
children classes:
/**
* University\CmsBundle\Entity\Content\Course
*
* @ORM\Table(name="course")
* @ORM\Entity()
*/
class Course extends Content
{
...
/**
* University\CmsBundle\Entity\Content\PhonebookEntry
*
* @ORM\Table(name="phonebook_entry")
* @ORM\Entity()
*/
class PhonebookEntry extends Content
{
...
All versions of discriminatormap-bundle with dependencies
PHP Build Version
Package Version
The package netpositive/discriminatormap-bundle contains the following files
Loading the files please wait ....