function getDir(Project $p) { if ($this->isReference()) { return $this->getRef($p)->getDir($p); } return $this->dir; }