<?php Log::info('Init tag plugin'); Mreg::append('autoload', array('tagtrigger' => dirname(__FILE__) . 'lib/tagTrigger.php')); M::addPath('module', dirname(__FILE__) . '/modules/'); M::addPath('template', dirname(__FILE__) . '/templates/'); M::addPath('model', dirname(__FILE__) . '/models/');
<?php M::addPath('module', dirname(__FILE__) . '/modules/'); M::addPath('template', dirname(__FILE__) . '/templates/');
public static function bootstrap() { $paths[] = APP_ROOT . 'app/_shared/'; $paths[] = APP_ROOT . 'app/' . APP_NAME . '/'; $paths[] = APP_ROOT . 'app/'; set_include_path(get_include_path() . ':' . implode(':', $paths)); if (defined('E_DEPRECATED')) { ini_set('error_reporting', E_ALL & ~E_STRICT & ~E_NOTICE & ~E_DEPRECATED); } else { ini_set('error_reporting', E_ALL & ~E_STRICT & ~E_NOTICE); } switch (MODE) { case 'development': ini_set('display_errors', 1); $caching = false; break; case 'test': ini_set('display_errors', 1); $caching = false; break; case 'production': ini_set('display_errors', 0); $caching = true; break; } T::setConfig(array('path' => APP_ROOT . 'app/' . APP_NAME . '/lang/', 'encoding' => 'utf8', 'saveresult' => false, 'driver' => 'reader', 'autoexpire' => MODE == 'development')); if (!defined('DEFAULT_LANG')) { define('DEFAULT_LANG', 'en'); } M::addPath('lang', dirname(__FILE__) . '/lang/'); $lang = $_REQUEST['lang'] ? $_REQUEST['lang'] : DEFAULT_LANG; T::setLang($lang); M::addPath('templates', APP_ROOT . 'app/_shared/templates/'); M::addPath('templates', APP_ROOT . 'app/' . APP_NAME . '/templates/'); M::addPath('modules', 'modules'); M::addPath('plugins', realpath(dirname(__FILE__))); M::addPath('plugins', APP_ROOT . 'app/'); $opt =& PEAR::getStaticProperty('Module', 'global'); $opt['caching'] = $caching; $opt['cacheDir'] = APP_ROOT . 'app/' . APP_NAME . '/cache/'; $opt['cacheTime'] = 7200; $dispatchopt =& PEAR::getStaticProperty('Dispatcher', 'global'); $dispatchopt['all']['loginmodule'] = 'user'; $dispatchopt['all']['loginaction'] = 'login'; $dispatchopt['all']['modulepath'] = array('modules'); require APP_ROOT . 'app/setup.php'; $setup = new M_setup(); spl_autoload_register('M::m_autoload_db_dataobject'); Mreg::set('setup', $setup); }