Browse files

removed constants WWW_DIR, APP_DIR & LIBS_DIR

  • Loading branch information...
1 parent 2efee7e commit 6656c1cbc4c38f1caea9f0da35ca40ce8c915260 @dg dg committed Nov 2, 2012
Showing with 4 additions and 13 deletions.
  1. +3 −3 app/bootstrap.php
  2. +1 −10 www/index.php
@@ -5,7 +5,7 @@
// Load Nette Framework or autoloader generated by Composer
-require LIBS_DIR . '/autoload.php';
+require __DIR__ . '/../libs/autoload.php';
// Configure application
@@ -18,8 +18,8 @@
// Enable RobotLoader - this will load all classes automatically
$configurator->setTempDirectory(__DIR__ . '/../temp');
- ->addDirectory(APP_DIR)
- ->addDirectory(LIBS_DIR)
+ ->addDirectory(__DIR__)
+ ->addDirectory(__DIR__ . '/../libs')
// Create Dependency Injection container from config.neon file
@@ -3,14 +3,5 @@
// uncomment this line if you must temporarily take down your site for maintenance
// require '.maintenance.php';
-// absolute filesystem path to this web root
-define('WWW_DIR', __DIR__);
-// absolute filesystem path to the application root
-define('APP_DIR', WWW_DIR . '/../app');
-// absolute filesystem path to the libraries
-define('LIBS_DIR', WWW_DIR . '/../libs');
// load bootstrap file
-require APP_DIR . '/bootstrap.php';
+require __DIR__ . '/../app/bootstrap.php';

6 comments on commit 6656c1c

juzna commented on 6656c1c Nov 28, 2012


I liked them and it was an easy and convenient way reference files within project.


I think because is it global


They're useless.

juzna commented on 6656c1c Nov 28, 2012

And is that a problem that these are global? It had been like this for some time, so it didn't matter before?

They were always useful for me. Being it useless for you doesn't mean it can't be useful for others.

dg commented on 6656c1c Nov 28, 2012

It seemed that the constants are required by Nette Framework (and they are not documented). It was right for 0.x versions, but now they are useless (for framework and sandbox, maybe not for you).

juzna commented on 6656c1c Nov 28, 2012

Got it now. Thanks for clear explanation.

Please sign in to comment.