function __get($k) { if (isset($this->flags[$k])) { return $this->flags[$k]; } if (isset($this->parent)) { return $this->parent->{$k}; } return NULL; }