Skip to content

Commit

Permalink
Changed $_ENV[dir.documentRoot] to $_ENV[dir.bootstrap]
Browse files Browse the repository at this point in the history
  • Loading branch information
KrisJordan committed Dec 5, 2008
1 parent 83a52a5 commit 221ecf1
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 20 deletions.
6 changes: 3 additions & 3 deletions TestRunner.php
Expand Up @@ -5,11 +5,11 @@
require_once('recess/lib/simpletest/mock_objects.php');
require_once('recess/lib/simpletest/unit_tester.php');

$_ENV['dir.documentRoot'] = str_replace('\\','/',realpath(dirname(__FILE__))) . '/';
$_ENV['dir.bootstrap'] = str_replace('\\','/',realpath(dirname(__FILE__))) . '/';
$_ENV['url.base'] = str_replace('TestRunner.php', '', $_SERVER['PHP_SELF']);

$_ENV['dir.recess'] = $_ENV['dir.documentRoot'] . 'recess/';
$_ENV['dir.apps'] = $_ENV['dir.documentRoot'] . 'apps/';
$_ENV['dir.recess'] = $_ENV['dir.bootstrap'] . 'recess/';
$_ENV['dir.apps'] = $_ENV['dir.bootstrap'] . 'apps/';
$_ENV['dir.test'] = $_ENV['dir.recess'] . 'test/';
$_ENV['dir.temp'] = $_ENV['dir.recess'] . 'temp/';
$_ENV['dir.lib'] = $_ENV['dir.recess'] . 'lib/';
Expand Down
2 changes: 1 addition & 1 deletion bootstrap.php
Expand Up @@ -4,7 +4,7 @@
*
* @author Kris Jordan
*/
$_ENV['dir.documentRoot'] = str_replace('\\','/',realpath(dirname(__FILE__))) . '/';
$_ENV['dir.bootstrap'] = str_replace('\\','/',realpath(dirname(__FILE__))) . '/';
$_ENV['url.base'] = str_replace('bootstrap.php', '', $_SERVER['PHP_SELF']);

$bootstrapped = true;
Expand Down
27 changes: 14 additions & 13 deletions recess-conf.php
@@ -1,34 +1,36 @@
<?php if(isset($bootstrapped)) unset($bootstrapped); else exit;

/* RECESS FRAMEWORK CONFIGURATION SETTINGS */
/**
* Welcome to Recess! Let's have some fun.
*
* Recess! is full-stack, PHP application development framework.
* For tutorials, documentation, bug reports, feature suggestions
* head over to: http://www.recessframework.com/
*
* Enjoy! -Kris Jordan (http://www.krisjordan.com)
*/

RecessConf::$mode = RecessConf::DEVELOPMENT; // or RecessConf::PRODUCTION

RecessConf::$applications
= array( 'recess.apps.tools.RecessToolsApplication',
'saranacFinder.SaranacFinderApplication',
'blog.BlogApplication',
);

RecessConf::$defaultTimeZone = 'America/New_York';

RecessConf::$defaultDatabase
= array( 'sqlite:' . $_ENV['dir.documentRoot'] . 'recess/sqlite/default.db'
= array( 'sqlite:' . $_ENV['dir.bootstrap'] . 'recess/sqlite/default.db'
// 'mysql:host=localhost;dbname=recess', 'recess', 'recess'
);

RecessConf::$namedDatabases
= array( // 'name' => array('sqlite:' . $_ENV['dir.documentRoot'] . 'recess/sqlite/default.db')
= array( // 'name' => array('sqlite:' . $_ENV['dir.bootstrap'] . 'recess/sqlite/default.db')
// 'name' => array('mysql:host=localhost;dbname=recess', 'username', 'password')
// 'sqlite2' => 'sqlite:' . $_ENV['dir.documentRoot'] . 'recess/sqlite/sqlite2.db',
'recess' => array(
'mysql:host=localhost;dbname=recess',
'recess',
'recess'),
);

// Paths to the recess and apps directories
RecessConf::$recessDir = $_ENV['dir.documentRoot'] . 'recess/';
RecessConf::$appsDir = $_ENV['dir.documentRoot'] . 'apps/';
RecessConf::$recessDir = $_ENV['dir.bootstrap'] . 'recess/';
RecessConf::$appsDir = $_ENV['dir.bootstrap'] . 'apps/';

RecessConf::$cacheProviders
= array(
Expand All @@ -38,5 +40,4 @@
);

RecessConf::$useTurboSpeed = false; // I wanna go FAST! (Note: Experimental feature.)

?>
Expand Up @@ -15,7 +15,7 @@
</pre>

<h2><span class="highlight">Last Step</span>: Activate <span class="highlight"><?php echo $applicationFullClass; ?></span> in recess-conf.php</h2>
<p>To enable your application open the Recess! config file: <span class="highlight"><?php echo $_ENV['dir.documentRoot']; ?>recess-conf.php</span></p>
<p>To enable your application open the Recess! config file: <span class="highlight"><?php echo $_ENV['dir.bootstrap']; ?>recess-conf.php</span></p>
<p>Find the RecessConf::$applications array and <span class="highlight">add the following application string</span>:</p>
<pre name="code" class="php:nogutter">
RecessConf::$applications
Expand Down
2 changes: 1 addition & 1 deletion recess/lib/recess/apps/tools/views/apps/uninstall.php
Expand Up @@ -5,7 +5,7 @@
?>
<h1>To <span class="removed">Uninstall</span> <?php echo $app->name; ?>...</h1>
<ol>
<li><span class="highlight">Open <?php echo $_ENV['dir.documentRoot']; ?>recess-conf.php</span></li>
<li><span class="highlight">Open <?php echo $_ENV['dir.bootstrap']; ?>recess-conf.php</span></li>
<li>Find the <span class="highlight">RecessConf::$applications</span> array.</li>
<?php
$appClass = Library::getFullyQualifiedClassName(get_class($app));
Expand Down
2 changes: 1 addition & 1 deletion recess/lib/recess/apps/tools/views/database/newSource.php
Expand Up @@ -7,7 +7,7 @@
<p>Recess! allows for multiple named data sources. Currently only MySQL and Sqlite are supported.</p>

<ol>
<li><span class="highlight">Open <?php echo $_ENV['dir.documentRoot']; ?>recess-conf.php</span></li>
<li><span class="highlight">Open <?php echo $_ENV['dir.bootstrap']; ?>recess-conf.php</span></li>
<li>Find the <span class="highlight">RecessConf::$namedDatabases</span> variable.</li>
<li>Add a new keyed entry to the $namedDatabasesarray based on your RDBMS:
<ul>
Expand Down

0 comments on commit 221ecf1

Please sign in to comment.