public function addSandbox()
{
$sandbox_posible_locations = array('agiletoolkit-sandbox' => 'agiletoolkit-sandbox', '../agiletoolkit-sandbox' => '../agiletoolkit-sandbox', 'agiletoolkit-sandbox.phar' => 'phar://agiletoolkit-sandbox.phar', '../agiletoolkit-sandbox.phar' => 'phar://../agiletoolkit-sandbox.phar');
$this->sandbox = null;
foreach ($sandbox_posible_locations as $k => $v) {
if ($this->sandbox) {
continue;
}
if (file_exists($k)) {
if (is_dir($k)) {
$this->sandbox = $this->app->pathfinder->base_location->addRelativeLocation($v);
} else {
$this->sandbox = $this->app->pathfinder->addLocation()->setBasePath($v);
}
break;
}
}
if ($this->sandbox) {
$this->sandbox->defineContents(array('template' => 'template', 'addons' => 'addons', 'php' => 'lib'));
}
}