mirror of
https://github.com/Karaka-Management/phpOMS.git
synced 2026-02-14 07:28:41 +00:00
Fix install process
This commit is contained in:
parent
cfb8cad454
commit
879691d68d
|
|
@ -1494,7 +1494,7 @@ class DataMapperAbstract implements DataMapperInterface
|
||||||
}
|
}
|
||||||
|
|
||||||
$objects = $mapper::get($values);
|
$objects = $mapper::get($values);
|
||||||
$reflectionProperty->setValue($obj, !is_array($objects) ? [$objects] : $objects);
|
$reflectionProperty->setValue($obj, !is_array($objects) ? [$objects->getId() => $objects] : $objects);
|
||||||
|
|
||||||
if (!$accessible) {
|
if (!$accessible) {
|
||||||
$reflectionProperty->setAccessible(false);
|
$reflectionProperty->setAccessible(false);
|
||||||
|
|
|
||||||
|
|
@ -107,6 +107,10 @@ class Dispatcher
|
||||||
$views = [];
|
$views = [];
|
||||||
$dispatch = explode(':', $controller);
|
$dispatch = explode(':', $controller);
|
||||||
|
|
||||||
|
if (!file_exists($path = __DIR__ . '/../../' . str_replace('\\', '/', $dispatch[0]) . '.php')) {
|
||||||
|
throw new PathException($path);
|
||||||
|
}
|
||||||
|
|
||||||
if (($c = count($dispatch)) === 3) {
|
if (($c = count($dispatch)) === 3) {
|
||||||
/* Handling static functions */
|
/* Handling static functions */
|
||||||
$function = $dispatch[0] . '::' . $dispatch[2];
|
$function = $dispatch[0] . '::' . $dispatch[2];
|
||||||
|
|
@ -170,10 +174,6 @@ class Dispatcher
|
||||||
private function getController(string $controller) /* : object */
|
private function getController(string $controller) /* : object */
|
||||||
{
|
{
|
||||||
if (!isset($this->controllers[$controller])) {
|
if (!isset($this->controllers[$controller])) {
|
||||||
if (!file_exists($path = __DIR__ . '/../../' . str_replace('\\', '/', $controller) . '.php')) {
|
|
||||||
throw new PathException($path);
|
|
||||||
}
|
|
||||||
|
|
||||||
// If module controller use module manager for initialization
|
// If module controller use module manager for initialization
|
||||||
if (strpos('\Modules\Controller', $controller) === 0) {
|
if (strpos('\Modules\Controller', $controller) === 0) {
|
||||||
$split = explode('\\', $controller);
|
$split = explode('\\', $controller);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user