Skip to content

Instantly share code, notes, and snippets.

@MartinSadovy
Forked from michalhisim/Tom.php
Created February 2, 2013 13:01
Show Gist options
  • Save MartinSadovy/4697247 to your computer and use it in GitHub Desktop.
Save MartinSadovy/4697247 to your computer and use it in GitHub Desktop.
<?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->hasBirthday()){
$this->runBirthday();
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment