PHP code example of alexjumperman / doctrinetemptable
1. Go to this page and download the library: Download alexjumperman/doctrinetemptable 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/ */
alexjumperman / doctrinetemptable example snippets
php
namespace AppBundle\Repository;
use AlexJumperman\TempTableBundle\Utils\TempTableTrait;
class ProductRepository extends \Doctrine\ORM\EntityRepository
{
use TempTableTrait;
}
php
namespace AppBundle\Controller;
class DefaultController extends Controller
{
public function indexAction()
{
$qb = $this->get('doctrine.orm.entity_manager')
->getRepository('AppBundle:Product')
->createQueryBuilderForTempTable('p');
}
}
php
namespace AppBundle\Controller;
class DefaultController extends Controller
{
public function indexAction()
{
$repository = $this->get('doctrine.orm.entity_manager')->getRepository('AppBundle:Product');
$qb = $this->get('alex_jumperman_temp_table.factory')
->createQueryBuilderForTempTable($repository, 'p');
}
}