Skip to content

Instantly share code, notes, and snippets.

View tyler-sommer's full-sized avatar
🖖
Working remote

Tyler Sommer tyler-sommer

🖖
Working remote
View GitHub Profile
@tyler-sommer
tyler-sommer / gist:5165830
Last active March 23, 2018 17:15
example procedural cli-config.php with multiple entity managers
<?php
require_once '../../lib/vendor/doctrine-common/lib/Doctrine/Common/ClassLoader.php';
$classLoader = new \Doctrine\Common\ClassLoader('Doctrine\ORM', realpath(__DIR__ . '/../../lib'));
$classLoader->register();
$classLoader = new \Doctrine\Common\ClassLoader('Doctrine\DBAL', realpath(__DIR__ . '/../../lib/vendor/doctrine-dbal/lib'));
$classLoader->register();
$classLoader = new \Doctrine\Common\ClassLoader('Doctrine\Common', realpath(__DIR__ . '/../../lib/vendor/doctrine-common/lib'));
$classLoader->register();
<?php
use Doctrine\ORM\Mapping as ORM,
Doctrine\Common\Collections\ArrayCollection;
/**
* File Entity
*
* @ORM\Entity
* @ORM\Table(name="files")
@tyler-sommer
tyler-sommer / call.versus.reflection.php
Created April 2, 2012 22:32
__call versus reflection
<?php
/**
* A Simple Operation Benchmark Class
*
* @author Tyler Sommer
*/
class Benchmark {
protected $_length;