forked from UnionOfRAD/sphere
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
merging gwoo's orchestra updates except for db config
- Loading branch information
Showing
5 changed files
with
48 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
<?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; | ||
use lithium\action\Dispatcher; | ||
|
||
Dispatcher::applyFilter('run', function($self, $params, $chain) { | ||
$params['request']->url = ""; | ||
|
||
if (isset($_SERVER['REQUEST_URI']) && strlen(trim($_SERVER['REQUEST_URI'])) > 0) { | ||
$params['request']->url = parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH); | ||
} | ||
return $chain->next($self, $params, $chain); | ||
}); | ||
|
||
$resources = str_replace("//", "/", sys_get_temp_dir() . '/resources'); | ||
|
||
if (!is_dir($resources)) { | ||
mkdir($resources, 0777, true); | ||
mkdir("{$resources}/logs", 0777, true); | ||
mkdir("{$resources}/tmp/cache/templates", 0777, true); | ||
} | ||
Libraries::add('app', array('default'=> true, 'resources' => $resources)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters