public function __construct($directory) { /* * Construct function - initialises the objects properties * * $userdir - current user home directory (jail) * $workdir - the directory where filemanager is working at the time of call * $settings - array with filemager current configuration * */ global $topDirectory, $fm; // $this->config = $config; $this->userdir = addslash($topDirectory); $this->setWorkDir($directory); //new remote shell Remote::get(); if (!\Flm\Helper::remote_test($this->workdir, 'd')) { throw new Exception("Error Processing Request" . $this->workdir, 2); } // instantiating filesystem Fs::get(); $config = Flm\Helper::$config; if (!is_dir($config['tempdir'])) { var_dump(Flm\Helper::$config); throw new Exception("Error Processing Request", 17); } $this->settings = $config; $this->fman_path = dirname(__FILE__); }