コード例 #1
0
/* 
 * 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.
 *
 * The second argument dictates how the config file is cached.  If true, the
 * processed config will be cached by its filename.  If it's a string, it will
 * be cached by that string.  If false, it won't be cached at all.  The
 * recommended value is "true" unless there's a chance you'll be loading
 * multiple config files with the same name.
 *
 * If the third argument is true, it will check to see if the config file has been 
 * modified every time the page is loaded, and, when a change is detected, update the 
 * cached version of the file.  In production, this value can be set to false to save 
 * CPU cycles and stat() calls.  To make config changes take effect in this case, 
 * simply delete the cached config file.
 */
Config::addConfig('config' . DIRECTORY_SEPARATOR . 'config.ini.php', true, true);
/*
 * The rest of this file can be used to override user-specified config settings or
 * set config new items that shouldn't be presented to the user.
 */
// The folder, relative to the base path, where views for the View library are stored.
Config::setVal("view", "folder", "themes" . DIRECTORY_SEPARATOR . "default");
// The URL path to add to the general->app_url config value to target view files
// within the web browser.  This is usually the same as the folder above.
Config::setVal("view", "url_path", "themes/default");
// Alternatively, you can set an entirely new URL as the view root.  This is only
// needed in special circumstances.  Do not set this unless you know you need it.
// Config::setVal("view", "root_url", "http://cloud.domain.com/theme/default");
コード例 #2
0
	'lib/myapp/filters/BorkFilter.php'); */
//HydrogenEngine::addFilterNamespace('\myapp\filters');
/***  FOR THE 'hydrogen' VIEW ENGINE ONLY:
 ***  Custom tag declarations
 ***
 ***  The following methods can be used to add custom tags to the Hydrogen
 ***  templating engine without them physically existing in the Hydrogen
 ***  library folder or namespace.  The first method declares classes
 ***  individually (with optional file path if it won't be autoloaded), while
 ***  the second adds a namespace from which tags can be autoloaded.  See
 ***  the documentation in hydrogen/view/engines/hydrogen/HydrogenEngine.php
 ***  for details and usage.
 ***/
/*HydrogenEngine::addTag('onweekdays', '\myapp\tags\OnweekdaysTag',
	'lib/myapp/tags/OnweekdaysTag.php'); */
//HydrogenEngine::addTagNamespace('\myapp\tags');
/***  [view] -> use_cache
 ***  This is a REQUIRED value
 ***
 ***  This value controls the cacheing of compiled views.  This *dramatically*
 ***  increases the performance of your view rendering, shaving a considerable
 ***  amount execution time, RAM, and CPU usage off of each request.  If on,
 ***  each view will be loaded from a raw PHP file (opcode-cached if you're
 ***  using something like XCache or APC) inside of the cache folder defined
 ***  above.  However, any time a change is made to a view template, the cached
 ***  files will have to be manually deleted to cause Hydrogen to recompile the
 ***  view.  It is recommended to leave this off during development to avoid
 ***  that hassle, but keep it on in production.
 ***/
Config::setVal("view", "use_cache", false);