__dir__ -> __DIR__

This commit is contained in:
2020-03-28 19:48:09 +09:00
parent baba2d34dd
commit 8f95d4b279
51 changed files with 109 additions and 109 deletions
+1 -1
View File
@@ -264,7 +264,7 @@ class ActionLogger{
return;
}
$templates = new \League\Plates\Engine(__dir__.'/../templates');
$templates = new \League\Plates\Engine(__DIR__.'/../templates');
$render_me = [
'crewtype' => $me->getCrewTypeShortName(),
+3 -3
View File
@@ -7,7 +7,7 @@ class ResetHelper{
}
static public function clearDB(){
$servRoot = realpath(__dir__.'/../');
$servRoot = realpath(__DIR__.'/../');
if(!file_exists($servRoot.'/logs') || !file_exists($servRoot.'/data')){
if(!is_writable($servRoot)){
@@ -195,8 +195,8 @@ class ResetHelper{
];
}
Util::generateFileUsingSimpleTemplate(
__dir__.'/../templates/base_map.orig.js',
__dir__.'/../d_shared/base_map.js',
__DIR__.'/../templates/base_map.orig.js',
__DIR__.'/../d_shared/base_map.js',
[
'cityPosition'=>Json::encode($cityPositions),
'regionMap'=>Json::encode(CityConst::$regionMap),
+4 -4
View File
@@ -2,7 +2,7 @@
namespace sammo;
class Scenario{
const SCENARIO_PATH = __dir__.'/../scenario';
const SCENARIO_PATH = __DIR__.'/../scenario';
private $scenarioIdx;
private $scenarioPath;
@@ -449,10 +449,10 @@ class Scenario{
}
public function buildConf(){
$path = __dir__.'/../d_setting';
$path = __DIR__.'/../d_setting';
$mapPath = __dir__.'/../scenario/map';
$unitPath = __dir__.'/../scenario/unit';
$mapPath = __DIR__.'/../scenario/map';
$unitPath = __DIR__.'/../scenario/unit';
$mapName = $this->gameConf['mapName'];
$unitSet = $this->gameConf['unitSet'];