PHP code example of alm / querymap

1. Go to this page and download the library: Download alm/querymap 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/ */

    

alm / querymap example snippets


/** @var \QueryMap\Bundle\QueryMapBundle\Service\QueryMapFactoryService $qmFactory */
$qmFactory = $this->container->get('querymap.factory');

$qm = $qmFactory->create(Team::class, 't');

/** @var $query \Doctrine\ORM\QueryBuilder */
$query = $qm->query([
    'points__gt' => '6',
    'continent' => 'Europe'
]);

echo $query->getDQL();
//SELECT t FROM FootballBundle\Entity\Team t
//WHERE (t.points >= 6) AND (t.continent = 'Europe')


$bundles = [
    ...
    new QueryMap\Bundle\QueryMapBundle\QueryMapBundle($this),
    ...
]