- quickfixes
This commit is contained in:
parent
14c3fb79ad
commit
84e3b91199
|
@ -31,6 +31,8 @@ class I18n implements MissingKeyInterface
|
||||||
$this->dataReader = $dataReader;
|
$this->dataReader = $dataReader;
|
||||||
$this->cacheReader = $cacheReader;
|
$this->cacheReader = $cacheReader;
|
||||||
$this->missingKey = $missingKey;
|
$this->missingKey = $missingKey;
|
||||||
|
|
||||||
|
$this->locale = \Locale::getDefault() ?: $this->locale;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function initialize(bool $useCache) : bool
|
public function initialize(bool $useCache) : bool
|
||||||
|
|
|
@ -39,6 +39,11 @@ class PhpReader implements ReaderInterface {
|
||||||
public function save(string $filepath, array $content) : bool
|
public function save(string $filepath, array $content) : bool
|
||||||
{
|
{
|
||||||
$path = $this->pathList[0];
|
$path = $this->pathList[0];
|
||||||
return (bool) file_put_contents($path . DIRECTORY_SEPARATOR . "$filepath." . $this->accept[0], "return " . var_export($content, true) . ";");
|
|
||||||
|
if ( ! file_exists($path) ) {
|
||||||
|
mkdir($path, '0775', true);
|
||||||
|
}
|
||||||
|
|
||||||
|
return (bool) file_put_contents($path . DIRECTORY_SEPARATOR . "$filepath." . $this->accept[0], "<?php return " . var_export($content, true) . ";");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue