* GNU General Public license for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. * * @category FluxBB * @package Core * @copyright Copyright (c) 2008-2012 FluxBB (http://fluxbb.org) * @license http://www.gnu.org/licenses/gpl.html GNU General Public License */ define('FLUXBB_VERSION', '2.0-alpha1'); Autoloader::namespaces(array('fluxbb' => __DIR__ . DS . 'classes')); if (fluxbb\Core::installed()) { Request::set_env('fluxbb'); } // Set up our custom session handler if (!Request::cli() && !Session::started()) { Session::extend('fluxbb::session', function () { return new fluxbb\Session\Driver(Laravel\Database::connection()); }); Config::set('session.driver', 'fluxbb::session'); Session::load(); } // View composers require 'helpers/composers.php'; // Route filters require 'helpers/filters.php'; // HTML helpers require 'helpers/html.php'; // Validators require 'helpers/validator.php';
$cache = IoC::resolve('doctrine::cache.provider'); } else { $cache = new Doctrine\Common\Cache\ArrayCache(); } /** * Register the cache provider with the Doctrine configuration. */ $config = new Doctrine\ORM\Configuration(); $config->setMetadataCacheImpl($cache); $config->setQueryCacheImpl($cache); /** * Resolve and register the meta-data driver. */ if (IoC::registered('doctrine::metadata.driver')) { $driverImpl = IoC::resolve('doctrine::metadata.driver', array($config)); } else { $driverImpl = $config->newDefaultAnnotationDriver(Config::get('doctrine::config.models')); } $config->setMetadataDriverImpl($driverImpl); /** * Register the proxy configuration with Doctrine. */ $config->setProxyDir(Config::get('doctrine::config.proxy.directory')); $config->setProxyNamespace(Config::get('doctrine::config.proxy.namespace')); $config->setAutoGenerateProxyClasses(Config::get('doctrine::config.proxy.auto_generate')); /** * Register an EntityManager in the IoC container as an instance. */ $em = EntityManager::create(array('pdo' => Laravel\Database::connection()->pdo), $config); IoC::instance('doctrine::manager', $em); });