PHP code example of syslogic / doctrine-json-functions
1. Go to this page and download the library: Download syslogic/doctrine-json-functions 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/ */
syslogic / doctrine-json-functions example snippets
use Scienta\DoctrineJsonFunctions\Query\AST\Functions\Mysql as DqlFunctions;
$config = new \Doctrine\ORM\Configuration();
$config->addCustomStringFunction(DqlFunctions\JsonExtract::FUNCTION_NAME, DqlFunctions\JsonExtract::class);
$config->addCustomStringFunction(DqlFunctions\JsonSearch::FUNCTION_NAME, DqlFunctions\JsonSearch::class);
$em = EntityManager::create($dbParams, $config);
$queryBuilder = $em->createQueryBuilder();