This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Give you have the following classes | |
Member (entity) | |
MemeberRepository | |
RegisterMemberCommand (command request) | |
RegisterMemberCommandHandler (command handler) | |
MemeberWasRegistered (event) | |
Company (entity) | |
CompanyRepository |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public function present($nest = true) | |
{ | |
return array_map( | |
function ($model) use ($nest) { | |
return $this->createPresenter($model)->present($nest); | |
}, | |
$this->collection | |
); | |
} | |
Or |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public function SpawnWorker($task) | |
{ | |
for($i = 0; $i < $this->size; $i++) | |
{ | |
$this->workers[$i] = new Worker($i,$this->loader); | |
$this->workers[$i]->start(); | |
$this->workers[$i]->stack($task); | |
usleep(100); //Stops Crash | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
wget http://uk1.php.net/distributions/php-5.4.15.tar.bz2 | |
apt-get update | |
apt-get upgrade -yq | |
apt-get -yq install bzip2 openssl libxml2 libxml2-dev gcc make autoconf htop sudo git dstat | |
tar xvjf php-5*.tar.bz2 | |
cd php-5* | |
cd ext/ | |
git clone git://github.com/krakjoe/pthreads.git | |
cd ../ |
NewerOlder