Various bug fixes
This commit is contained in:
parent
cc04c24950
commit
e850c1db04
|
@ -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);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -33,5 +33,7 @@
|
|||
"file": "Objects/Schema.php"
|
||||
}
|
||||
],
|
||||
"files": []
|
||||
"files": [
|
||||
"package.json"
|
||||
]
|
||||
}
|
|
@ -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'));
|
Loading…
Reference in New Issue