Skip to content

Instantly share code, notes, and snippets.

@oojacoboo
Created August 13, 2012 20:18
Show Gist options
  • Save oojacoboo/3343826 to your computer and use it in GitHub Desktop.
Save oojacoboo/3343826 to your computer and use it in GitHub Desktop.
/**
* 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