Skip to content

Instantly share code, notes, and snippets.

@michalhisim
Last active December 12, 2015 02:18
Show Gist options
  • Save michalhisim/4696976 to your computer and use it in GitHub Desktop.
Save michalhisim/4696976 to your computer and use it in GitHub Desktop.
Happy birthday Tom!
<?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