some cosmetic changes
This commit is contained in:
parent
a119f49bcb
commit
e0dd10bf7d
3 changed files with 16 additions and 16 deletions
|
@ -27,23 +27,22 @@
|
|||
use Volkszaehler\Util;
|
||||
|
||||
// TODO replace by state class
|
||||
const BACKEND_DIR = '/home/steffen/workspace/volkszaehler.org/backend';
|
||||
const DEV_ENV = TRUE;
|
||||
const VZ_BACKEND_DIR = '/home/steffen/workspace/volkszaehler.org/backend';
|
||||
|
||||
// class autoloading
|
||||
require BACKEND_DIR . '/lib/Util/ClassLoader.php';
|
||||
require VZ_BACKEND_DIR . '/lib/Util/ClassLoader.php';
|
||||
|
||||
$classLoaders = array();
|
||||
$classLoaders[] = new Volkszaehler\Util\ClassLoader('Doctrine', BACKEND_DIR . '/lib/vendor/Doctrine');
|
||||
$classLoaders[] = new Volkszaehler\Util\ClassLoader('Symfony', BACKEND_DIR . '/lib/vendor/Symfony');
|
||||
$classLoaders[] = new Volkszaehler\Util\ClassLoader('Volkszaehler', BACKEND_DIR . '/lib');
|
||||
$classLoaders[] = new Volkszaehler\Util\ClassLoader('Doctrine', VZ_BACKEND_DIR . '/lib/vendor/Doctrine');
|
||||
$classLoaders[] = new Volkszaehler\Util\ClassLoader('Symfony', VZ_BACKEND_DIR . '/lib/vendor/Symfony');
|
||||
$classLoaders[] = new Volkszaehler\Util\ClassLoader('Volkszaehler', VZ_BACKEND_DIR . '/lib');
|
||||
|
||||
foreach ($classLoaders as $loader) {
|
||||
$loader->register(); // register on SPL autoload stack
|
||||
}
|
||||
|
||||
// load configuration
|
||||
Util\Configuration::load(BACKEND_DIR . '/volkszaehler.conf');
|
||||
Util\Configuration::load(VZ_BACKEND_DIR . '/volkszaehler.conf');
|
||||
|
||||
$em = Volkszaehler\Dispatcher::createEntityManager();
|
||||
|
||||
|
@ -52,8 +51,9 @@ $helperSet = new \Symfony\Component\Console\Helper\HelperSet(array(
|
|||
'em' => new \Doctrine\ORM\Tools\Console\Helper\EntityManagerHelper($em)
|
||||
));
|
||||
|
||||
|
||||
$cli = new \Symfony\Component\Console\Application('Doctrine Command Line Interface', Doctrine\ORM\Version::VERSION);
|
||||
$cli->setCatchExceptions(TRUE);
|
||||
$cli->setCatchExceptions(true);
|
||||
$cli->setHelperSet($helperSet);
|
||||
$cli->addCommands(array(
|
||||
// DBAL Commands
|
||||
|
@ -74,7 +74,7 @@ $cli->addCommands(array(
|
|||
new \Doctrine\ORM\Tools\Console\Command\GenerateProxiesCommand(),
|
||||
new \Doctrine\ORM\Tools\Console\Command\ConvertMappingCommand(),
|
||||
new \Doctrine\ORM\Tools\Console\Command\RunDqlCommand(),
|
||||
new \Doctrine\ORM\Tools\Console\Command\ValidateSchemaCommand(),
|
||||
new \Doctrine\ORM\Tools\Console\Command\ValidateSchemaCommand()
|
||||
));
|
||||
$cli->run();
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
/**
|
||||
* Backend bootstrapping entrypoint
|
||||
* Backend bootstrap entrypoint
|
||||
*
|
||||
* @author Steffen Vogel <info@steffenvogel.de>
|
||||
* @copyright Copyright (c) 2010, The volkszaehler.org project
|
||||
|
@ -29,6 +29,9 @@ namespace Volkszaehler;
|
|||
use Volkszaehler\Util;
|
||||
use Volkszaehler\Controller;
|
||||
|
||||
// enable strict error reporting
|
||||
error_reporting(E_ALL);
|
||||
|
||||
// TODO replace by state class
|
||||
define('VZ_VERSION', 0.2);
|
||||
define('VZ_DIR', realpath(__DIR__ . '/..'));
|
||||
|
@ -39,17 +42,14 @@ define('DEV_ENV', TRUE);
|
|||
require VZ_BACKEND_DIR . '/lib/Util/ClassLoader.php';
|
||||
|
||||
$classLoaders = array();
|
||||
$classLoaders[] = new Util\ClassLoader('Doctrine', VZ_BACKEND_DIR . '/lib/vendor/Doctrine');
|
||||
$classLoaders[] = new Util\ClassLoader('Symfony', VZ_BACKEND_DIR . '/lib/vendor/Symfony');
|
||||
$classLoaders[] = new Util\ClassLoader('Volkszaehler', VZ_BACKEND_DIR . '/lib');
|
||||
$classLoaders[] = new Util\ClassLoader('Doctrine', VZ_BACKEND_DIR . '/lib/vendor/Doctrine');
|
||||
//$classLoaders[] = new Util\ClassLoader('Symfony', VZ_BACKEND_DIR . '/lib/vendor/Symfony'); // only required for the cli
|
||||
|
||||
foreach ($classLoaders as $loader) {
|
||||
$loader->register(); // register on SPL autoload stack
|
||||
}
|
||||
|
||||
// enable strict error reporting
|
||||
error_reporting(E_ALL);
|
||||
|
||||
Util\Configuration::load(VZ_BACKEND_DIR . '/volkszaehler.conf');
|
||||
|
||||
$fc = new Dispatcher; // spawn frontcontroller / dispatcher
|
||||
|
|
|
@ -24,6 +24,6 @@
|
|||
* along with volkszaehler.org. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
header('Location: frontend');
|
||||
header('Location: frontend/');
|
||||
|
||||
?>
|
||||
|
|
Loading…
Add table
Reference in a new issue