/** * @param ENVIRONMENT $env Global environment. */ public function __construct($env) { $this->env = $env; parent::__construct(); $this->date_time_toolkit = $this->env->date_time_toolkit; $class_name = $this->final_class_name('COOKIE', 'webcore/util/cookie.php'); $this->cookie = new $class_name(); $this->cookie->path = '/'; $this->storage = $this->cookie; $class_name = $this->final_class_name('CONTEXT_DISPLAY_OPTIONS'); $this->display_options = new $class_name($this); $class_name = $this->final_class_name('CONTEXT_MAIL_OPTIONS'); $this->mail_options = new $class_name(); $class_name = $this->final_class_name('CONTEXT_DATABASE_OPTIONS'); $this->database_options = new $class_name(); $class_name = $this->final_class_name('CONTEXT_UPLOAD_OPTIONS'); $this->upload_options = new $class_name(); $class_name = $this->final_class_name('CONTEXT_STORAGE_OPTIONS'); $this->storage_options = new $class_name(); $this->text_options = global_text_options(); }
public function __construct() { $this->date_time_toolkit = global_date_time_toolkit(); $this->file_options = global_file_options(); $this->url_options = global_url_options(); $this->logs = new LOGGER_CONTAINER(); parent::__construct(); $this->auto_detect_os(); /* server-local paths */ $this->set_path(Folder_name_system_temp, temp_folder()); $this->set_forced_root(Folder_name_system_temp, false); $this->set_path(Folder_name_logs, '/var/log'); $this->set_forced_root(Folder_name_logs, false); /* URLs */ $this->set_path(Folder_name_root, '/'); $this->set_path(Folder_name_resources, '{' . Folder_name_root . '}'); $this->set_path(Folder_name_apps, '{' . Folder_name_root . '}'); $this->set_path(Folder_name_data, '{' . Folder_name_root . '}data'); $this->set_path(Folder_name_pages, '{' . Folder_name_resources . '}'); $this->set_path(Folder_name_functions, '{' . Folder_name_pages . '}'); $this->set_path(Folder_name_icons, '{' . Folder_name_resources . '}icons'); $this->set_path(Folder_name_styles, '{' . Folder_name_resources . '}styles'); $this->set_path(Folder_name_themes, '{' . Folder_name_styles . '}themes'); $this->set_path(Folder_name_scripts, '{' . Folder_name_resources . '}scripts'); $this->set_extension(Folder_name_themes, 'css'); $this->set_extension(Folder_name_styles, 'css'); $this->set_extension(Folder_name_scripts, 'js'); $this->set_extension(Folder_name_icons, 'png'); /* Set up the path to the library. */ $url = new FILE_URL(realpath(__FILE__)); $url->strip_name(); $url->go_back(); $url->go_back(); $this->library_path = $url->as_text(); }