You can also pass the directory as constructor arg. Not super elegant, but at least you don't have to work with reflection or composer.
Parent:
directory = $directory;
}
protected function getDir() {
return $this->directory;
}
}
?>
Child:
getDir();
}
}
?>