<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
arturdoruch / doctrine-entity-manager-bundle example snippets
$bundles = [
new ArturDoruch\DoctrineEntityManagerBundle\ArturDoruchDoctrineEntityManagerBundle(),
];
namespace AppBundle\Doctrine;
use AppBundle\Entity\Foo;
use ArturDoruch\DoctrineEntityManagerBundle\AbstractEntityManager;
class FooManager extends AbstractEntityManager
{
public function getRepository()
{
return $this->doGetRepository(Foo::class);
}
// Custom entity manager methods.
/*public function create(): Foo
{
$foo = new Foo();
return $foo;
}
public function save(Foo $foo)
{
$this->persist($foo);
}
public function remove(Foo $foo)
{
$this->doRemove($foo);
}*/
}
namespace AppBundle\Doctrine;
use AppBundle\Entity\Foo;
use AppBundle\Doctrine\BarManager;
use ArturDoruch\DoctrineEntityManagerBundle\AbstractEntityManager;
class FooManager extends AbstractEntityManager
{
/**
* @var BarManager
*/
private $barManager;
public function initialize()
{
$this->barManager = $this->getManager(BarManager::class);
}
}
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.