Skip to content

Commit

Permalink
adding orchestra bootstrap.
Browse files Browse the repository at this point in the history
  • Loading branch information
gwoo committed Feb 29, 2012
1 parent 5b75964 commit 10bc2f0
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 0 deletions.
7 changes: 7 additions & 0 deletions app/config/bootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,13 @@
*/
require __DIR__ . '/bootstrap/libraries.php';

/**
* The Orchestra Bootstrap file contains the code for running a Lithium application on the
* Orchestra.io PHP Platform. See http://orchestra.io for more information.
*
*/
require __DIR__ . '/bootstrap/orchestra.php';

/**
* The error configuration allows you to use the filter system along with the advanced matching
* rules of the `ErrorHandler` class to provide a high level of control over managing exceptions in
Expand Down
17 changes: 17 additions & 0 deletions app/config/bootstrap/orchestra.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?php
/**
* Orchestra.io Bootstap for Lithium
*
* add `require __DIR__ . '/bootstrap/orchestra.php';` immediately after
* `require __DIR__ . '/bootstrap/libraries.php';` in bootstrap.php
*/
use lithium\core\Libraries;

Libraries::add('app', array('default'=> true, 'resources' => call_user_func(function() {
if (!is_dir($resources = str_replace("//", "/", sys_get_temp_dir() . '/resources'))) {
foreach (array($resources, "{$resources}/logs", "{$resources}/tmp/cache/templates") as $d) {
mkdir($d, 0777, true);
}
}
return $resources;
})));

0 comments on commit 10bc2f0

Please sign in to comment.