PHP code example of hopeter1018 / doctrine-discriminator-map-bundle

1. Go to this page and download the library: Download hopeter1018/doctrine-discriminator-map-bundle library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

hopeter1018 / doctrine-discriminator-map-bundle example snippets


return [
  ...,
  HoPeter1018\DoctrineDiscriminatorMapBundle\HoPeter1018DoctrineDiscriminatorMapBundle::class => ['all' => true],
];

$bundles = [
  ...,
  new HoPeter1018\DoctrineDiscriminatorMapBundle\HoPeter1018DoctrineDiscriminatorMapBundle(),
];

namespace Your\Bundle\Entity;

use HoPeter1018\DoctrineDiscriminatorMapBundle\Annotation\DiscriminatorParent;

/**
 * Class docblock
 *
 * @DiscriminatorParent
 */
class ParentEntityClass {
}

namespace Your\Bundle\Entity;

use HoPeter1018\DoctrineDiscriminatorMapBundle\Annotation\DiscriminatorParent;

/**
 * Class docblock
 *
 * @DiscriminatorEntry
 */
class EntryEntityClass {

}