* Config autoloader sample * Copy this to hydrogen.autoconfig.php */ namespace hydrogen; use hydrogen\config\Config; /* * Set the base path for the application here. This should not be the path to * Hydrogen, but rather, the "root" folder of this webapp. * * This MUST be an absolute path. You can use PHP's __DIR__ global to write an * absolute path that will allow your app to be moved or installed anywhere without * changing this value. The following example assumes that this autoconfig file is * two levels down from the root of the app. */ Config::setBasePath(__DIR__ . DIRECTORY_SEPARATOR . ".." . DIRECTORY_SEPARATOR . ".."); /* * Set the cache path for the application. This directory should allow PHP full * read/write permissions, and any data that PHP must cache in a file will be * stored here. Log files will also be stored here by default unless the path * is changed in the config. * * If a relative path is given, it will be relative in relation to the base * path. The following example assumes there is a fully-writable folder called * "cache" in the root of the webapp. */ Config::setCachePath("cache"); /* * This line loads the application's config file. * * The first argument is the path to the config file itself. This may be absolute,
*** Config autoloader sample *** Copy this to hydrogen.autoconfig.php ***/ namespace hydrogen; use hydrogen\config\Config; use hydrogen\view\engines\hydrogen\HydrogenEngine; /*** Set the base path for the application here. This should not be the path *** to Hydrogen, but rather, the "root" folder of this webapp. *** *** This MUST be an absolute path. You can use PHP's __DIR__ global to write *** an absolute path that will allow your app to be moved or installed *** anywhere without changing this value. The following example assumes that *** this autoconfig file is two levels down from the root of the app. ***/ Config::setBasePath(__DIR__ . "/../.."); /*** Set the cache path for the application. This directory should allow PHP *** full read/write permissions, and any data that PHP must cache in a file *** will be stored here. Log files will also be stored here by default *** unless the path is changed in the config. *** *** If a relative path is given, it will be relative in relation to the base *** path. The following example assumes there is a fully-writable folder *** called "cache" in the root of the webapp. ***/ Config::setCachePath("cache"); /*** This line loads the application's config file. *** *** The first argument is the path to the config file itself. This may be *** absolute, or relative to the base path given above. ***