PHP code example of juliangut / doctrine-orm-repositories

1. Go to this page and download the library: Download juliangut/doctrine-orm-repositories 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/ */

    

juliangut / doctrine-orm-repositories example snippets


/**
 * Comment entity.
 *
 * @ORM\Entity(repositoryClass="\Jgut\Doctrine\Repository\ORM\RelationalRepository")
 */
class Comment
{
}

use Jgut\Doctrine\Repository\ORM\RelationalRepositoryFactory;

$config = new \Doctrine\ORM\Configuration;
$config->setRepositoryFactory(new RelationalRepositoryFactory);

$entityManager = \Doctrine\ORM\EntityManager::create([], $config);