Various bug fixes

This commit is contained in:
Netkas 2021-09-23 20:02:50 -04:00
parent cc04c24950
commit e850c1db04
3 changed files with 29 additions and 3 deletions

View File

@ -42,11 +42,13 @@
$vendor = strtolower($vendor);
$this->VendorName = $vendor;
$this->WorkingDirectory = DIRECTORY_SEPARATOR . 'var' . DIRECTORY_SEPARATOR . 'acm';
$this->WorkingDirectory = DIRECTORY_SEPARATOR . 'etc' . DIRECTORY_SEPARATOR . 'acm';
$this->MasterConfigurationPath = $this->WorkingDirectory . DIRECTORY_SEPARATOR . $this->VendorName . '.json';
if(file_exists($this->WorkingDirectory) == false)
throw new ConfigurationFolderNotFoundException('The configuration folder \'' . $this->WorkingDirectory . '\' was not found');
$this->reloadConfiguration();
}
/**
@ -69,7 +71,7 @@
return;
}
$this->Configuration = json_decode(file_get_contents($this->MasterConfigurationPath));
$this->Configuration = json_decode(file_get_contents($this->MasterConfigurationPath), true);
}
/**

View File

@ -33,5 +33,7 @@
"file": "Objects/Schema.php"
}
],
"files": []
"files": [
"package.json"
]
}

View File

@ -0,0 +1,22 @@
<?php
require('ppm');
import('net.intellivoid.acm2');
$acm = new \acm2\acm2('Acm Test');
$schema = new \acm2\Objects\Schema();
$schema->setName('Database');
$schema->setDefinition('Driver', 'MySQL');
$schema->setDefinition('Host', '127.0.0.1');
$schema->setDefinition('Host2', '127.0.0.2');
$schema->setDefinition('Port', 12345);
$schema->setDefinition('AuthenticationMethods', [
'foo' => 'bar',
'username' => 'password'
]);
$acm->defineSchema($schema);
var_dump($acm->getConfiguration('Database'));