application = $name; } // ################################################################### /** * Gets the application name * * @return string Application name */ public function getApplication() { return $this->application; } // ################################################################### /** * Sets the application's working path * * @param string Path */ public function setAppPath($path) { $this->appPath = BSFunctions::FetchSourcePath($path); } // ################################################################### /** * Returns the path to the application * * @return string Application path */ public function getAppPath() { return $this->appPath; } // ################################################################### /** * Sets the application version * * @param string Application version */ public function setAppVersion($vers) { $this->appVersion = $vers; } // ################################################################### /** * Gets the application version * * @return string Application version */ public function getAppVersion() { return $this->appVersion; } // ################################################################### /** * Sets the application's web path, which is the full path from the * server's web root * * @param string Path */ public function setWebPath($path) { $this->webPath = BSFunctions::FetchSourcePath($path); } // ################################################################### /** * Returns the web path to the application * * @return string Application's web path */ public function getWebPath() { return $this->webPath; } // ################################################################### /** * Sets the debug state * * @param bool Debug mode on? */ public function setDebug($debug) { $this->debug = $debug; } // ################################################################### /** * Gets the debug mode state * * @return bool Debug mode on? */ public function getDebug() { return $this->debug; } // ################################################################### /** * Registers a value in the master registry. You cannot overwrite * values. You must first unregister() them if you wish to do so. * * @param string Registry key * @param mixed Value to register */ public function register($key, $value) { if (isset($this->registry["$key"])) { trigger_error('Cannot overwrite a key in the registry'); return; } $this->registry["$key"] = $value; } // ################################################################### /** * Unregisters a value from the registry. This removes all traces of * it from this object. * * @param string Registry key */ public function unregister($key) { if (!isset($this->registry["$key"])) { trigger_error('You cannot unregister a key that does not exist'); return; } unset($this->registry["$key"]); } // ################################################################### /** * This gets a value from the registry with a specific key * * @param string The key * * @return mixed Value in the registry for key */ public function get($key) { if (!isset($this->registry["$key"])) { trigger_error('Cannot access the registry with a non-existent key'); return; } return $this->registry["$key"]; } // ################################################################### /** * Returns the entire registry stack * * @return array Complete registry */ public function getAll() { return $this->registry; } } /*=====================================================================*\ || ################################################################### || # $HeadURL$ || # $Id$ || ################################################################### \*=====================================================================*/ ?>