Created
October 10, 2012 14:42
-
-
Save bedeabza/3866063 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
<?php | |
class Octi extends Human implements Troll, Fisherman | |
{ | |
private $cellPhone; | |
private $fishingStick; | |
private $trollStack; | |
protected $brain; | |
protected $actsAs = array( | |
'project_manager' => array() | |
); | |
public function __wakeup() | |
{ | |
$this->cellPhone->readMessages(); | |
$this->trollStack = $this->brain->thinkAboutHowToTrollColt(); | |
} | |
public function __call($method, array $params) | |
{ | |
switch($method){ | |
case 'hearing': | |
if($params[0] == 'Coltz leaving for a smoke'){ | |
$this->startInfiniteTrollLoop(); | |
} | |
break; | |
} | |
} | |
protected function startInfiniteTrollLoop() | |
{ | |
while(count($this->trollStack)){ | |
$this->troll(array_pop($this->trollStack)); | |
} | |
$this->__sleep(); | |
} | |
protected function troll($message) | |
{ | |
echo 'Coltz!!: ' . $message; | |
} | |
public function __sleep() | |
{ | |
$this->__wakeup(); | |
} | |
//@todo | |
//implement Fisherman interface | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment