Skip to content

Instantly share code, notes, and snippets.

View rabbl's full-sized avatar

Ralf Junghanns rabbl

View GitHub Profile
@rabbl
rabbl / User.php
Last active February 2, 2019 22:26
User.php
<?php
// src/Entity/User.php
declare(strict_types=1);
namespace App\Entity;
use ApiPlatform\Core\Annotation\ApiResource;
use Doctrine\ORM\Mapping as ORM;
use Ramsey\Uuid\Uuid;
// This is working
public function testInsertNullRaster()
{
$conn = $this->entityManager->getConnection();
$stmt = $conn->prepare('SET NAMES \'UTF8\'');
$stmt->execute();
$stmt = $conn->prepare('SELECT NEXTVAL(\'rasters_id_seq\')');
$stmt->execute();
@rabbl
rabbl / RasterBand.php
Last active February 22, 2016 08:28
Raster as Custom Mapping Type in Doctrine
<?php
namespace AppBundle\Model;
class RasterBand
{
/**
* @var float[][]
*/
private $data;
<?php
/**
* Recursively takes the specified criteria and adds too the expression.
*
* The criteria is defined in an array notation where each item in the list
* represents a comparison <fieldName, operator, value>. The operator maps to
* comparison methods located in ExpressionBuilder. The key in the array can
* be used to identify grouping of comparisons.
*