Problems:
- permissions
- slow I/O because of vboxfs
Solution: mount the disk using NFS.
<?php | |
return [ | |
'doctrine.orm.configuration' => [ | |
'driver' => 'pdo_mysql', | |
'user' => 'root', | |
'password' => '', | |
'dbname' => get('doctrine.orm.db_name'), | |
], |
class MyClass { | |
/** | |
* @Inject | |
* @var MyService | |
*/ | |
private $service; | |
} |
; PHP developer shortcuts for BÉPO keyboard layouts | |
; Need AutoHotkey_L to support unicode encoding (http://www.autohotkey.com/download/) | |
; "->" for PHP (when typing <Alt>+8) | |
!-:: | |
Send -> | |
return | |
<?php | |
namespace Doctrine\Tests\Models\DDC1734; | |
/** | |
* @Entity | |
*/ | |
class DDC1734Article | |
{ |
sudo apt-get install subversion git mercurial python perl ruby |
Reflections on PHP-DI configuration.
Currently, the configuration is in PHP or annotations, PHP config has the following advantages:
Disadvantages of PHP:
<?php | |
// See also http://en.mnapoli.fr/the-optional-singleton-pattern/ | |
class MyService | |
{ | |
private static $singletonInstance = null; | |
/** | |
* Keep the constructor public | |
*/ |
<?php | |
/** | |
* In this example, a collection is a map of values indexed by a key (numeric or string) | |
*/ | |
interface Collection extends Countable, IteratorAggregate, ArrayAccess | |
{ | |
function add($value); | |
function set($key, $value); |
<?php | |
use A\Long\Namespace\User; | |
use Some\Namespace\ProductService; | |
// Doctrine: get entity | |
$user = $entityManager->find('A\Long\Namespace\User', 1234); | |
$user = $entityManager->find(User::class, 1234); | |
// Doctrine repositories |