Given an aggregate Project
, one Team
(with many Devs
) and one Source
, if I $project->releaseEvents()
, should the Project
aggregate all events from all its related entities?
Example code:
<?php namespace App\Entities;
cd /var/www | |
mv railsapp railsapp-old | |
hg clone --updaterev 2.0-stable https://bitbucket.org/redmine/redmine-all railsapp | |
cp railsapp-old/config/email.yml railsapp/config/configuration.yml | |
cp railsapp-old/config/database.yml railsapp/config/database.yml | |
cp -r railsapp-old/files/ railsapp/files/ | |
chown -R root:www-data /var/www/railsapp | |
cd railsapp | |
gem install bundler | |
gem install test-unit |
<?php | |
use Laracasts\Commander\CommandBus; | |
class ExpectationCommandBus implements CommandBus | |
{ | |
/* | |
* Constructor injects the resolver... | |
*/ | |
protected $expectationResolver; |
<?php | |
namespace Acme; | |
use Symfony\Component\HttpKernel\HTTPKernelInterface; | |
use Psr\Http\Message\RequestInterface; | |
class MyMiddleware implements HTTPKernelInterface { | |
private $kernel; | |
<?php namespace Acme; | |
interface IFoo {} | |
class Foo implements IFoo {} | |
class Bar { | |
public function __construct(\Acme\IFoo $foo) {} | |
} |
<?php | |
abstract class Framework { | |
/** | |
* @type bool | |
*/ | |
private $installsGlobally; | |
abstract public function download(); | |
} |
<?php namespace App\Repositories; | |
// Already mapped to the Container in a ServiceProvider | |
use Doctrine\ORM\EntityManager; | |
use Doctrine\ORM\EntityRepository; | |
use App\Entities\Article; | |
class ArticleRepository extends EntityRepository | |
{ | |
public function __construct(EntityManager $em) |
<?php | |
class FooRepository extends EntityRepository implements FooRepositoryInterface | |
{ | |
public function startFooing($bar, $baz) | |
{ | |
$em = $this->getEntityManager(); | |
// Let's imagine we could | |
$foo = $em->create(Foo::class, [$bar, $baz]); | |
<?php | |
// I left an example in the mailing list with a Money object | |
class Money implements CastsToString, CastsToFloat { | |
const DOLLARS = '$'; | |
const POUND = '£'; | |
const YEN = '¥'; | |
private $currency; | |
private $amount; | |
<?php namespace App\Entities; | |
// IGNORE THE CONFIGURATION DETAILS :-) | |
/** | |
* @Entity | |
* @Cache(usage="NONSTRICT_READ_WRITE") | |
*/ | |
class Post { | |
/** |