Last active
December 12, 2015 02:18
-
-
Save michalhisim/4696976 to your computer and use it in GitHub Desktop.
Happy birthday Tom!
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
<?php | |
// Happy birthday Tom | |
class Tom extends Person{ | |
public function runBirthday(){ | |
$this->age++; | |
if($this->age == 18){ | |
$this->acl->allow('doing own decisions'); | |
$this->acl->allow('realize own dreams'); | |
$this->acl->allow('driving a car'); | |
$this->acl->allow('drinking'); | |
Logger::log('Full access to life enabled!'); | |
} | |
} | |
public function rutine(){ | |
$this->dayOfLife++; | |
if($this->isBirthday()){ | |
$this->runBirthday(); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment