mirror of
https://github.com/slawkens/myaac.git
synced 2026-03-16 07:53:32 +01:00
Nothing important, var name
This commit is contained in:
@@ -6,26 +6,25 @@ use MyAAC\Cache\PHP as CachePHP;
|
||||
|
||||
class Items
|
||||
{
|
||||
private string $error;
|
||||
private string $error = '';
|
||||
|
||||
public function getError(): string
|
||||
{
|
||||
public function getError(): string {
|
||||
return $this->error;
|
||||
}
|
||||
|
||||
public function load(): bool
|
||||
{
|
||||
$file_path = config('data_path') . 'items/items.toml';
|
||||
if (!file_exists($file_path)) {
|
||||
$this->error = 'Cannot load file ' . $file_path;
|
||||
$file = config('data_path') . 'items/items.toml';
|
||||
if (!file_exists($file)) {
|
||||
$this->error = 'Cannot load file ' . $file;
|
||||
return false;
|
||||
}
|
||||
|
||||
//$toml = file_get_contents($file_path);
|
||||
//$toml = file_get_contents($file);
|
||||
//$items = \Devium\Toml\Toml::decode($toml, asArray: false);
|
||||
|
||||
$itemsParser = new ItemsParser();
|
||||
$itemsParsed = $itemsParser->parse($file_path);
|
||||
$itemsParsed = $itemsParser->parse($file);
|
||||
|
||||
$items = [];
|
||||
foreach ($itemsParsed as $item) {
|
||||
|
||||
Reference in New Issue
Block a user