Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

58 lines (52 sloc) 2.134 kb
<?php
/**
* This file is part of NoiseLabs-SmartyBundle
*
* NoiseLabs-SmartyBundle is free software; you can redistribute it
* and/or modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3 of the License, or (at your option) any later version.
*
* NoiseLabs-SmartyBundle is distributed in the hope that it will be
* useful, but WITHOUT ANY WARRANTY; without even the implied warranty
* of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with NoiseLabs-SmartyBundle; if not, see
* <http://www.gnu.org/licenses/>.
*
* Copyright (C) 2011-2012 Vítor Brandão
*
* @category NoiseLabs
* @package SmartyBundle
* @author Vítor Brandão <noisebleed@noiselabs.org>
* @copyright (C) 2011-2012 Vítor Brandão <noisebleed@noiselabs.org>
* @license http://www.gnu.org/licenses/lgpl-3.0-standalone.html LGPL-3
* @link http://www.noiselabs.org
*/
$vendorDir = __DIR__.'/../vendor';
require_once $vendorDir.'/symfony/src/Symfony/Component/ClassLoader/UniversalClassLoader.php';
use Symfony\Component\ClassLoader\UniversalClassLoader;
$loader = new UniversalClassLoader();
$loader->registerNamespaces(array(
'Symfony' => array($vendorDir.'/symfony/src', $vendorDir.'/bundles'),
'Monolog' => $vendorDir.'/monolog/src',
'Assetic' => $vendorDir.'/assetic/src',
));
$loader->registerPrefixes(array(
'Smarty_' => $vendorDir.'/smarty/libs',
));
$loader->register();
set_include_path($vendorDir.'/smarty/libs'.PATH_SEPARATOR.$vendorDir.get_include_path());
require_once 'Smarty.class.php';
spl_autoload_register(function($class) {
if (0 === strpos($class, 'NoiseLabs\\Bundle\\SmartyBundle\\')) {
$path = __DIR__.'/../'.implode('/', array_slice(explode('\\', $class), 3)).'.php';
if (!stream_resolve_include_path($path)) {
return false;
}
require_once $path;
return true;
}
});
Jump to Line
Something went wrong with that request. Please try again.