public function __get($var) { switch ($var) { case 'dep': $this->dep = null; return $this->dep; break; default: break; } }