public function __construct(Environment $env) { $this->oldWorkingDir = getcwd(); chdir($env->getPath()); $this->psy = new PsyShell($env->getPsyShConfiguration()); $this->psy->setAutoExit(false); $this->psy->add(new Load()); $this->psy->add(new Export()); $this->psy->add(new PWD()); $this->env = $env; }