Created
August 13, 2012 20:18
-
-
Save oojacoboo/3343826 to your computer and use it in GitHub Desktop.
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
/** | |
* The model behavior for the bathroom fan | |
*/ | |
class Fan extends Courtesy { | |
//it is ok to leave it off if it's all fresh | |
protected $position = false; | |
/** | |
* If the can was used, fan should be on | |
*/ | |
private function __initialize() { | |
if($this->wasCanUsed()) { | |
$this->position = true; | |
} | |
} | |
/** | |
* Was the can used for number 1 or number 2 | |
*/ | |
public function wasCanUsed($numberDone = 2) { | |
return $numberDone == 2; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment