mirror of
https://github.com/Karaka-Management/oms-Labeling.git
synced 2026-02-08 22:08:41 +00:00
auto fixes + some impl.
This commit is contained in:
parent
dccf1df831
commit
6549ec0323
|
|
@ -20,7 +20,6 @@ use phpOMS\Message\Http\HttpRequest;
|
||||||
use phpOMS\Message\Http\HttpResponse;
|
use phpOMS\Message\Http\HttpResponse;
|
||||||
use phpOMS\Module\InstallerAbstract;
|
use phpOMS\Module\InstallerAbstract;
|
||||||
use phpOMS\Module\ModuleInfo;
|
use phpOMS\Module\ModuleInfo;
|
||||||
use phpOMS\Uri\HttpUri;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Installer class.
|
* Installer class.
|
||||||
|
|
@ -83,7 +82,7 @@ final class Installer extends InstallerAbstract
|
||||||
|
|
||||||
foreach ($layouts as $layout) {
|
foreach ($layouts as $layout) {
|
||||||
$response = new HttpResponse();
|
$response = new HttpResponse();
|
||||||
$request = new HttpRequest(new HttpUri(''));
|
$request = new HttpRequest();
|
||||||
|
|
||||||
$request->header->account = 1;
|
$request->header->account = 1;
|
||||||
$request->setData('title', \reset($layout['l11n']));
|
$request->setData('title', \reset($layout['l11n']));
|
||||||
|
|
@ -123,7 +122,7 @@ final class Installer extends InstallerAbstract
|
||||||
}
|
}
|
||||||
|
|
||||||
$response = new HttpResponse();
|
$response = new HttpResponse();
|
||||||
$request = new HttpRequest(new HttpUri(''));
|
$request = new HttpRequest();
|
||||||
|
|
||||||
$request->header->account = 1;
|
$request->header->account = 1;
|
||||||
$request->setData('title', $l11n);
|
$request->setData('title', $l11n);
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@ use phpOMS\Account\PermissionType;
|
||||||
use phpOMS\Router\RouteVerb;
|
use phpOMS\Router\RouteVerb;
|
||||||
|
|
||||||
return [
|
return [
|
||||||
'^.*/warehouse/labeling/item/list.*$' => [
|
'^.*/warehouse/labeling/item/list(\?.*$|$)' => [
|
||||||
[
|
[
|
||||||
'dest' => '\Modules\Labeling\Controller\BackendController:viewItemList',
|
'dest' => '\Modules\Labeling\Controller\BackendController:viewItemList',
|
||||||
'verb' => RouteVerb::GET,
|
'verb' => RouteVerb::GET,
|
||||||
|
|
@ -17,7 +17,7 @@ return [
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
'^.*/warehouse/labeling/item\?.*$' => [
|
'^.*/warehouse/labeling/item(\?.*$|$)' => [
|
||||||
[
|
[
|
||||||
'dest' => '\Modules\Labeling\Controller\BackendController:viewItem',
|
'dest' => '\Modules\Labeling\Controller\BackendController:viewItem',
|
||||||
'verb' => RouteVerb::GET,
|
'verb' => RouteVerb::GET,
|
||||||
|
|
@ -28,7 +28,7 @@ return [
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
'^.*/warehouse/labeling/layout\?.*$' => [
|
'^.*/warehouse/labeling/layout(\?.*$|$)' => [
|
||||||
[
|
[
|
||||||
'dest' => '\Modules\Labeling\Controller\BackendController:viewLayout',
|
'dest' => '\Modules\Labeling\Controller\BackendController:viewLayout',
|
||||||
'verb' => RouteVerb::GET,
|
'verb' => RouteVerb::GET,
|
||||||
|
|
@ -39,7 +39,7 @@ return [
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
'^.*/warehouse/labeling/layout/list.*$' => [
|
'^.*/warehouse/labeling/layout/list(\?.*$|$)' => [
|
||||||
[
|
[
|
||||||
'dest' => '\Modules\Labeling\Controller\BackendController:viewItemLabelList',
|
'dest' => '\Modules\Labeling\Controller\BackendController:viewItemLabelList',
|
||||||
'verb' => RouteVerb::GET,
|
'verb' => RouteVerb::GET,
|
||||||
|
|
|
||||||
|
|
@ -94,7 +94,10 @@ final class ApiController extends Controller
|
||||||
private function createLabelLayoutFromRequest(RequestAbstract $request) : LabelLayout
|
private function createLabelLayoutFromRequest(RequestAbstract $request) : LabelLayout
|
||||||
{
|
{
|
||||||
$labelLayout = new LabelLayout();
|
$labelLayout = new LabelLayout();
|
||||||
$labelLayout->setL11n($request->getDataString('title') ?? '', $request->getDataString('language') ?? ISO639x1Enum::_EN);
|
$labelLayout->setL11n(
|
||||||
|
$request->getDataString('title') ?? '',
|
||||||
|
ISO639x1Enum::tryFromValue($request->getDataString('language')) ?? ISO639x1Enum::_EN
|
||||||
|
);
|
||||||
|
|
||||||
$path = '/Modules/Labeling/Templates/' . $request->getDataString('title');
|
$path = '/Modules/Labeling/Templates/' . $request->getDataString('title');
|
||||||
$uploadedFiles = $request->files;
|
$uploadedFiles = $request->files;
|
||||||
|
|
@ -176,12 +179,10 @@ final class ApiController extends Controller
|
||||||
*/
|
*/
|
||||||
private function createLabelLayoutL11nFromRequest(RequestAbstract $request) : BaseStringL11n
|
private function createLabelLayoutL11nFromRequest(RequestAbstract $request) : BaseStringL11n
|
||||||
{
|
{
|
||||||
$labelLayoutL11n = new BaseStringL11n();
|
$labelLayoutL11n = new BaseStringL11n();
|
||||||
$labelLayoutL11n->ref = $request->getDataInt('layout') ?? 0;
|
$labelLayoutL11n->ref = $request->getDataInt('layout') ?? 0;
|
||||||
$labelLayoutL11n->setLanguage(
|
$labelLayoutL11n->language = ISO639x1Enum::tryFromValue($request->getDataString('language')) ?? $request->header->l11n->language;
|
||||||
$request->getDataString('language') ?? $request->header->l11n->language
|
$labelLayoutL11n->content = $request->getDataString('title') ?? '';
|
||||||
);
|
|
||||||
$labelLayoutL11n->content = $request->getDataString('title') ?? '';
|
|
||||||
|
|
||||||
return $labelLayoutL11n;
|
return $labelLayoutL11n;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -60,13 +60,13 @@ class LabelLayout implements \JsonSerializable
|
||||||
if ($l11n instanceof BaseStringL11n) {
|
if ($l11n instanceof BaseStringL11n) {
|
||||||
$this->l11n = $l11n;
|
$this->l11n = $l11n;
|
||||||
} elseif (isset($this->l11n) && $this->l11n instanceof BaseStringL11n) {
|
} elseif (isset($this->l11n) && $this->l11n instanceof BaseStringL11n) {
|
||||||
$this->l11n->content = $l11n;
|
$this->l11n->content = $l11n;
|
||||||
$this->l11n->setLanguage($lang);
|
$this->l11n->language = $lang;
|
||||||
} else {
|
} else {
|
||||||
$this->l11n = new BaseStringL11n();
|
$this->l11n = new BaseStringL11n();
|
||||||
$this->l11n->content = $l11n;
|
$this->l11n->content = $l11n;
|
||||||
$this->l11n->ref = $this->id;
|
$this->l11n->ref = $this->id;
|
||||||
$this->l11n->setLanguage($lang);
|
$this->l11n->language = $lang;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -90,7 +90,7 @@ class LabelLayout implements \JsonSerializable
|
||||||
public function toArray() : array
|
public function toArray() : array
|
||||||
{
|
{
|
||||||
return [
|
return [
|
||||||
'id' => $this->id,
|
'id' => $this->id,
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -37,10 +37,10 @@ final class LabelLayoutL11nMapper extends DataMapperFactory
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
public const COLUMNS = [
|
public const COLUMNS = [
|
||||||
'labeling_layout_l11n_id' => ['name' => 'labeling_layout_l11n_id', 'type' => 'int', 'internal' => 'id'],
|
'labeling_layout_l11n_id' => ['name' => 'labeling_layout_l11n_id', 'type' => 'int', 'internal' => 'id'],
|
||||||
'labeling_layout_l11n_name' => ['name' => 'labeling_layout_l11n_name', 'type' => 'string', 'internal' => 'content', 'autocomplete' => true],
|
'labeling_layout_l11n_name' => ['name' => 'labeling_layout_l11n_name', 'type' => 'string', 'internal' => 'content', 'autocomplete' => true],
|
||||||
'labeling_layout_l11n_type' => ['name' => 'labeling_layout_l11n_type', 'type' => 'int', 'internal' => 'ref'],
|
'labeling_layout_l11n_type' => ['name' => 'labeling_layout_l11n_type', 'type' => 'int', 'internal' => 'ref'],
|
||||||
'labeling_layout_l11n_language' => ['name' => 'labeling_layout_l11n_language', 'type' => 'string', 'internal' => 'language'],
|
'labeling_layout_l11n_language' => ['name' => 'labeling_layout_l11n_language', 'type' => 'string', 'internal' => 'language'],
|
||||||
];
|
];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -37,8 +37,8 @@ final class LabelLayoutMapper extends DataMapperFactory
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
public const COLUMNS = [
|
public const COLUMNS = [
|
||||||
'labeling_layout_id' => ['name' => 'labeling_layout_id', 'type' => 'int', 'internal' => 'id'],
|
'labeling_layout_id' => ['name' => 'labeling_layout_id', 'type' => 'int', 'internal' => 'id'],
|
||||||
'labeling_layout_template' => ['name' => 'labeling_layout_template', 'type' => 'int', 'internal' => 'template'],
|
'labeling_layout_template' => ['name' => 'labeling_layout_template', 'type' => 'int', 'internal' => 'template'],
|
||||||
];
|
];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -49,11 +49,11 @@ final class LabelLayoutMapper extends DataMapperFactory
|
||||||
*/
|
*/
|
||||||
public const HAS_MANY = [
|
public const HAS_MANY = [
|
||||||
'l11n' => [
|
'l11n' => [
|
||||||
'mapper' => LabelLayoutL11nMapper::class,
|
'mapper' => LabelLayoutL11nMapper::class,
|
||||||
'table' => 'labeling_layout_l11n',
|
'table' => 'labeling_layout_l11n',
|
||||||
'self' => 'labeling_layout_l11n_type',
|
'self' => 'labeling_layout_l11n_type',
|
||||||
'column' => 'content',
|
'column' => 'content',
|
||||||
'external' => null,
|
'external' => null,
|
||||||
],
|
],
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
@ -64,9 +64,9 @@ final class LabelLayoutMapper extends DataMapperFactory
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
public const OWNS_ONE = [
|
public const OWNS_ONE = [
|
||||||
'template' => [
|
'template' => [
|
||||||
'mapper' => CollectionMapper::class,
|
'mapper' => CollectionMapper::class,
|
||||||
'external' => 'labeling_layout_template',
|
'external' => 'labeling_layout_template',
|
||||||
],
|
],
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -15,6 +15,6 @@ declare(strict_types=1);
|
||||||
return ['Navigation' => [
|
return ['Navigation' => [
|
||||||
'Labeling' => 'Etikettierung',
|
'Labeling' => 'Etikettierung',
|
||||||
'List' => 'Liste',
|
'List' => 'Liste',
|
||||||
'Layouts' => 'Designs',
|
'Layouts' => 'Designs',
|
||||||
'Name' => 'Name',
|
'Name' => 'Name',
|
||||||
]];
|
]];
|
||||||
|
|
|
||||||
|
|
@ -15,6 +15,6 @@ declare(strict_types=1);
|
||||||
return ['Navigation' => [
|
return ['Navigation' => [
|
||||||
'Labeling' => 'Labeling',
|
'Labeling' => 'Labeling',
|
||||||
'List' => 'List',
|
'List' => 'List',
|
||||||
'Layouts' => 'Layouts',
|
'Layouts' => 'Layouts',
|
||||||
'Name' => 'Name',
|
'Name' => 'Name',
|
||||||
]];
|
]];
|
||||||
|
|
|
||||||
|
|
@ -25,53 +25,53 @@ echo $this->data['nav']->render(); ?>
|
||||||
<section class="portlet">
|
<section class="portlet">
|
||||||
<div class="portlet-head"><?= $this->getHtml('Items', 'ItemManagement', 'Backend'); ?><i class="g-icon download btn end-xs">download</i></div>
|
<div class="portlet-head"><?= $this->getHtml('Items', 'ItemManagement', 'Backend'); ?><i class="g-icon download btn end-xs">download</i></div>
|
||||||
<div class="slider">
|
<div class="slider">
|
||||||
<table id="iSalesItemList" class="default sticky">
|
<table id="iItemList" class="default sticky">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
<td><?= $this->getHtml('Number', 'ItemManagement', 'Backend'); ?>
|
<td><?= $this->getHtml('Number', 'ItemManagement', 'Backend'); ?>
|
||||||
<label for="iSalesItemList-sort-1">
|
<label for="iItemList-sort-1">
|
||||||
<input type="radio" name="iSalesItemList-sort" id="iSalesItemList-sort-1">
|
<input type="radio" name="iItemList-sort" id="iItemList-sort-1">
|
||||||
<i class="sort-asc g-icon">expand_less</i>
|
<i class="sort-asc g-icon">expand_less</i>
|
||||||
</label>
|
</label>
|
||||||
<label for="iSalesItemList-sort-2">
|
<label for="iItemList-sort-2">
|
||||||
<input type="radio" name="iSalesItemList-sort" id="iSalesItemList-sort-2">
|
<input type="radio" name="iItemList-sort" id="iItemList-sort-2">
|
||||||
<i class="sort-desc g-icon">expand_more</i>
|
<i class="sort-desc g-icon">expand_more</i>
|
||||||
</label>
|
</label>
|
||||||
<label>
|
<label>
|
||||||
<i class="filter g-icon">filter_alt</i>
|
<i class="filter g-icon">filter_alt</i>
|
||||||
</label>
|
</label>
|
||||||
<td><?= $this->getHtml('Name', 'ItemManagement', 'Backend'); ?>
|
<td><?= $this->getHtml('Name', 'ItemManagement', 'Backend'); ?>
|
||||||
<label for="iSalesItemList-sort-3">
|
<label for="iItemList-sort-3">
|
||||||
<input type="radio" name="iSalesItemList-sort" id="iSalesItemList-sort-3">
|
<input type="radio" name="iItemList-sort" id="iItemList-sort-3">
|
||||||
<i class="sort-asc g-icon">expand_less</i>
|
<i class="sort-asc g-icon">expand_less</i>
|
||||||
</label>
|
</label>
|
||||||
<label for="iSalesItemList-sort-4">
|
<label for="iItemList-sort-4">
|
||||||
<input type="radio" name="iSalesItemList-sort" id="iSalesItemList-sort-4">
|
<input type="radio" name="iItemList-sort" id="iItemList-sort-4">
|
||||||
<i class="sort-desc g-icon">expand_more</i>
|
<i class="sort-desc g-icon">expand_more</i>
|
||||||
</label>
|
</label>
|
||||||
<label>
|
<label>
|
||||||
<i class="filter g-icon">filter_alt</i>
|
<i class="filter g-icon">filter_alt</i>
|
||||||
</label>
|
</label>
|
||||||
<td><?= $this->getHtml('Name', 'ItemManagement', 'Backend'); ?>
|
<td><?= $this->getHtml('Name', 'ItemManagement', 'Backend'); ?>
|
||||||
<label for="iSalesItemList-sort-5">
|
<label for="iItemList-sort-5">
|
||||||
<input type="radio" name="iSalesItemList-sort" id="iSalesItemList-sort-5">
|
<input type="radio" name="iItemList-sort" id="iItemList-sort-5">
|
||||||
<i class="sort-asc g-icon">expand_less</i>
|
<i class="sort-asc g-icon">expand_less</i>
|
||||||
</label>
|
</label>
|
||||||
<label for="iSalesItemList-sort-6">
|
<label for="iItemList-sort-6">
|
||||||
<input type="radio" name="iSalesItemList-sort" id="iSalesItemList-sort-6">
|
<input type="radio" name="iItemList-sort" id="iItemList-sort-6">
|
||||||
<i class="sort-desc g-icon">expand_more</i>
|
<i class="sort-desc g-icon">expand_more</i>
|
||||||
</label>
|
</label>
|
||||||
<label>
|
<label>
|
||||||
<i class="filter g-icon">filter_alt</i>
|
<i class="filter g-icon">filter_alt</i>
|
||||||
</label>
|
</label>
|
||||||
<td class="wf-100"><?= $this->getHtml('Name', 'ItemManagement', 'Backend'); ?>
|
<td class="wf-100"><?= $this->getHtml('Name', 'ItemManagement', 'Backend'); ?>
|
||||||
<label for="iSalesItemList-sort-7">
|
<label for="iItemList-sort-7">
|
||||||
<input type="radio" name="iSalesItemList-sort" id="iSalesItemList-sort-7">
|
<input type="radio" name="iItemList-sort" id="iItemList-sort-7">
|
||||||
<i class="sort-asc g-icon">expand_less</i>
|
<i class="sort-asc g-icon">expand_less</i>
|
||||||
</label>
|
</label>
|
||||||
<label for="iSalesItemList-sort-8">
|
<label for="iItemList-sort-8">
|
||||||
<input type="radio" name="iSalesItemList-sort" id="iSalesItemList-sort-8">
|
<input type="radio" name="iItemList-sort" id="iItemList-sort-8">
|
||||||
<i class="sort-desc g-icon">expand_more</i>
|
<i class="sort-desc g-icon">expand_more</i>
|
||||||
</label>
|
</label>
|
||||||
<label>
|
<label>
|
||||||
|
|
|
||||||
|
|
@ -25,29 +25,29 @@ echo $this->data['nav']->render(); ?>
|
||||||
<section class="portlet">
|
<section class="portlet">
|
||||||
<div class="portlet-head"><?= $this->getHtml('Layouts'); ?><i class="g-icon download btn end-xs">download</i></div>
|
<div class="portlet-head"><?= $this->getHtml('Layouts'); ?><i class="g-icon download btn end-xs">download</i></div>
|
||||||
<div class="slider">
|
<div class="slider">
|
||||||
<table id="iSalesItemList" class="default sticky">
|
<table id="iLayoutList" class="default sticky">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
<td><?= $this->getHtml('ID', '0', '0'); ?>
|
<td><?= $this->getHtml('ID', '0', '0'); ?>
|
||||||
<label for="iSalesItemList-sort-1">
|
<label for="iLayoutList-sort-1">
|
||||||
<input type="radio" name="iSalesItemList-sort" id="iSalesItemList-sort-1">
|
<input type="radio" name="iLayoutList-sort" id="iLayoutList-sort-1">
|
||||||
<i class="sort-asc g-icon">expand_less</i>
|
<i class="sort-asc g-icon">expand_less</i>
|
||||||
</label>
|
</label>
|
||||||
<label for="iSalesItemList-sort-2">
|
<label for="iLayoutList-sort-2">
|
||||||
<input type="radio" name="iSalesItemList-sort" id="iSalesItemList-sort-2">
|
<input type="radio" name="iLayoutList-sort" id="iLayoutList-sort-2">
|
||||||
<i class="sort-desc g-icon">expand_more</i>
|
<i class="sort-desc g-icon">expand_more</i>
|
||||||
</label>
|
</label>
|
||||||
<label>
|
<label>
|
||||||
<i class="filter g-icon">filter_alt</i>
|
<i class="filter g-icon">filter_alt</i>
|
||||||
</label>
|
</label>
|
||||||
<td class="wf-100"><?= $this->getHtml('Name'); ?>
|
<td class="wf-100"><?= $this->getHtml('Name'); ?>
|
||||||
<label for="iSalesItemList-sort-1">
|
<label for="iLayoutList-sort-1">
|
||||||
<input type="radio" name="iSalesItemList-sort" id="iSalesItemList-sort-1">
|
<input type="radio" name="iLayoutList-sort" id="iLayoutList-sort-1">
|
||||||
<i class="sort-asc g-icon">expand_less</i>
|
<i class="sort-asc g-icon">expand_less</i>
|
||||||
</label>
|
</label>
|
||||||
<label for="iSalesItemList-sort-2">
|
<label for="iLayoutList-sort-2">
|
||||||
<input type="radio" name="iSalesItemList-sort" id="iSalesItemList-sort-2">
|
<input type="radio" name="iLayoutList-sort" id="iLayoutList-sort-2">
|
||||||
<i class="sort-desc g-icon">expand_more</i>
|
<i class="sort-desc g-icon">expand_more</i>
|
||||||
</label>
|
</label>
|
||||||
<label>
|
<label>
|
||||||
|
|
@ -55,7 +55,7 @@ echo $this->data['nav']->render(); ?>
|
||||||
</label>
|
</label>
|
||||||
<tbody>
|
<tbody>
|
||||||
<?php $count = 0; foreach ($layouts as $key => $value) : ++$count;
|
<?php $count = 0; foreach ($layouts as $key => $value) : ++$count;
|
||||||
$url = UriFactory::build('{/base}/warehouse/labeling/layout?id=' . $value->id);
|
$url = UriFactory::build('{/base}/warehouse/labeling/layout?id=' . $value->id);
|
||||||
?>
|
?>
|
||||||
<tr data-href="<?= $url; ?>">
|
<tr data-href="<?= $url; ?>">
|
||||||
<td>
|
<td>
|
||||||
|
|
|
||||||
|
|
@ -75,8 +75,8 @@ final class Autoloader
|
||||||
*/
|
*/
|
||||||
public static function defaultAutoloader(string $class) : void
|
public static function defaultAutoloader(string $class) : void
|
||||||
{
|
{
|
||||||
$class = \ltrim($class, '\\');
|
$class = \ltrim($class, '\\');
|
||||||
$class = \strtr($class, '_\\', '//');
|
$class = \strtr($class, '_\\', '//');
|
||||||
|
|
||||||
if (\stripos($class, 'Web/Backend') !== false || \stripos($class, 'Web/Api') !== false) {
|
if (\stripos($class, 'Web/Backend') !== false || \stripos($class, 'Web/Api') !== false) {
|
||||||
$class = \is_dir(__DIR__ . '/Web') ? $class : \str_replace('Web/', 'MainRepository/Web/', $class);
|
$class = \is_dir(__DIR__ . '/Web') ? $class : \str_replace('Web/', 'MainRepository/Web/', $class);
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,15 @@
|
||||||
<?php
|
<?php
|
||||||
|
/**
|
||||||
|
* Jingga
|
||||||
|
*
|
||||||
|
* PHP Version 8.1
|
||||||
|
*
|
||||||
|
* @package Modules\Labeling\tests
|
||||||
|
* @copyright Dennis Eichhorn
|
||||||
|
* @license OMS License 2.0
|
||||||
|
* @version 1.0.0
|
||||||
|
* @link https://jingga.app
|
||||||
|
*/
|
||||||
declare(strict_types=1);
|
declare(strict_types=1);
|
||||||
|
|
||||||
\ini_set('memory_limit', '2048M');
|
\ini_set('memory_limit', '2048M');
|
||||||
|
|
@ -67,10 +78,10 @@ $GLOBALS['is_github'] = $IS_GITHUB;
|
||||||
$tmp = FileLogger::getInstance(__DIR__ . '/../Logs');
|
$tmp = FileLogger::getInstance(__DIR__ . '/../Logs');
|
||||||
|
|
||||||
$CONFIG = [
|
$CONFIG = [
|
||||||
'db' => [
|
'db' => [
|
||||||
'core' => [
|
'core' => [
|
||||||
'masters' => [
|
'masters' => [
|
||||||
'admin' => [
|
'admin' => [
|
||||||
'db' => 'mysql', /* db type */
|
'db' => 'mysql', /* db type */
|
||||||
'host' => '127.0.0.1', /* db host address */
|
'host' => '127.0.0.1', /* db host address */
|
||||||
'port' => '3306', /* db host port */
|
'port' => '3306', /* db host port */
|
||||||
|
|
@ -80,7 +91,7 @@ $CONFIG = [
|
||||||
'weight' => 1000, /* db table prefix */
|
'weight' => 1000, /* db table prefix */
|
||||||
'datetimeformat' => 'Y-m-d H:i:s',
|
'datetimeformat' => 'Y-m-d H:i:s',
|
||||||
],
|
],
|
||||||
'insert' => [
|
'insert' => [
|
||||||
'db' => 'mysql', /* db type */
|
'db' => 'mysql', /* db type */
|
||||||
'host' => '127.0.0.1', /* db host address */
|
'host' => '127.0.0.1', /* db host address */
|
||||||
'port' => '3306', /* db host port */
|
'port' => '3306', /* db host port */
|
||||||
|
|
@ -90,7 +101,7 @@ $CONFIG = [
|
||||||
'weight' => 1000, /* db table prefix */
|
'weight' => 1000, /* db table prefix */
|
||||||
'datetimeformat' => 'Y-m-d H:i:s',
|
'datetimeformat' => 'Y-m-d H:i:s',
|
||||||
],
|
],
|
||||||
'select' => [
|
'select' => [
|
||||||
'db' => 'mysql', /* db type */
|
'db' => 'mysql', /* db type */
|
||||||
'host' => '127.0.0.1', /* db host address */
|
'host' => '127.0.0.1', /* db host address */
|
||||||
'port' => '3306', /* db host port */
|
'port' => '3306', /* db host port */
|
||||||
|
|
@ -100,7 +111,7 @@ $CONFIG = [
|
||||||
'weight' => 1000, /* db table prefix */
|
'weight' => 1000, /* db table prefix */
|
||||||
'datetimeformat' => 'Y-m-d H:i:s',
|
'datetimeformat' => 'Y-m-d H:i:s',
|
||||||
],
|
],
|
||||||
'update' => [
|
'update' => [
|
||||||
'db' => 'mysql', /* db type */
|
'db' => 'mysql', /* db type */
|
||||||
'host' => '127.0.0.1', /* db host address */
|
'host' => '127.0.0.1', /* db host address */
|
||||||
'port' => '3306', /* db host port */
|
'port' => '3306', /* db host port */
|
||||||
|
|
@ -110,7 +121,7 @@ $CONFIG = [
|
||||||
'weight' => 1000, /* db table prefix */
|
'weight' => 1000, /* db table prefix */
|
||||||
'datetimeformat' => 'Y-m-d H:i:s',
|
'datetimeformat' => 'Y-m-d H:i:s',
|
||||||
],
|
],
|
||||||
'delete' => [
|
'delete' => [
|
||||||
'db' => 'mysql', /* db type */
|
'db' => 'mysql', /* db type */
|
||||||
'host' => '127.0.0.1', /* db host address */
|
'host' => '127.0.0.1', /* db host address */
|
||||||
'port' => '3306', /* db host port */
|
'port' => '3306', /* db host port */
|
||||||
|
|
@ -120,7 +131,7 @@ $CONFIG = [
|
||||||
'weight' => 1000, /* db table prefix */
|
'weight' => 1000, /* db table prefix */
|
||||||
'datetimeformat' => 'Y-m-d H:i:s',
|
'datetimeformat' => 'Y-m-d H:i:s',
|
||||||
],
|
],
|
||||||
'schema' => [
|
'schema' => [
|
||||||
'db' => 'mysql', /* db type */
|
'db' => 'mysql', /* db type */
|
||||||
'host' => '127.0.0.1', /* db host address */
|
'host' => '127.0.0.1', /* db host address */
|
||||||
'port' => '3306', /* db host port */
|
'port' => '3306', /* db host port */
|
||||||
|
|
@ -132,7 +143,7 @@ $CONFIG = [
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
'postgresql' => [
|
'postgresql' => [
|
||||||
'admin' => [
|
'admin' => [
|
||||||
'db' => 'pgsql', /* db type */
|
'db' => 'pgsql', /* db type */
|
||||||
'host' => '127.0.0.1', /* db host address */
|
'host' => '127.0.0.1', /* db host address */
|
||||||
'port' => '5432', /* db host port */
|
'port' => '5432', /* db host port */
|
||||||
|
|
@ -142,7 +153,7 @@ $CONFIG = [
|
||||||
'weight' => 1000, /* db table prefix */
|
'weight' => 1000, /* db table prefix */
|
||||||
'datetimeformat' => 'Y-m-d H:i:s',
|
'datetimeformat' => 'Y-m-d H:i:s',
|
||||||
],
|
],
|
||||||
'insert' => [
|
'insert' => [
|
||||||
'db' => 'pgsql', /* db type */
|
'db' => 'pgsql', /* db type */
|
||||||
'host' => '127.0.0.1', /* db host address */
|
'host' => '127.0.0.1', /* db host address */
|
||||||
'port' => '5432', /* db host port */
|
'port' => '5432', /* db host port */
|
||||||
|
|
@ -152,7 +163,7 @@ $CONFIG = [
|
||||||
'weight' => 1000, /* db table prefix */
|
'weight' => 1000, /* db table prefix */
|
||||||
'datetimeformat' => 'Y-m-d H:i:s',
|
'datetimeformat' => 'Y-m-d H:i:s',
|
||||||
],
|
],
|
||||||
'select' => [
|
'select' => [
|
||||||
'db' => 'pgsql', /* db type */
|
'db' => 'pgsql', /* db type */
|
||||||
'host' => '127.0.0.1', /* db host address */
|
'host' => '127.0.0.1', /* db host address */
|
||||||
'port' => '5432', /* db host port */
|
'port' => '5432', /* db host port */
|
||||||
|
|
@ -162,7 +173,7 @@ $CONFIG = [
|
||||||
'weight' => 1000, /* db table prefix */
|
'weight' => 1000, /* db table prefix */
|
||||||
'datetimeformat' => 'Y-m-d H:i:s',
|
'datetimeformat' => 'Y-m-d H:i:s',
|
||||||
],
|
],
|
||||||
'update' => [
|
'update' => [
|
||||||
'db' => 'pgsql', /* db type */
|
'db' => 'pgsql', /* db type */
|
||||||
'host' => '127.0.0.1', /* db host address */
|
'host' => '127.0.0.1', /* db host address */
|
||||||
'port' => '5432', /* db host port */
|
'port' => '5432', /* db host port */
|
||||||
|
|
@ -172,7 +183,7 @@ $CONFIG = [
|
||||||
'weight' => 1000, /* db table prefix */
|
'weight' => 1000, /* db table prefix */
|
||||||
'datetimeformat' => 'Y-m-d H:i:s',
|
'datetimeformat' => 'Y-m-d H:i:s',
|
||||||
],
|
],
|
||||||
'delete' => [
|
'delete' => [
|
||||||
'db' => 'pgsql', /* db type */
|
'db' => 'pgsql', /* db type */
|
||||||
'host' => '127.0.0.1', /* db host address */
|
'host' => '127.0.0.1', /* db host address */
|
||||||
'port' => '5432', /* db host port */
|
'port' => '5432', /* db host port */
|
||||||
|
|
@ -182,7 +193,7 @@ $CONFIG = [
|
||||||
'weight' => 1000, /* db table prefix */
|
'weight' => 1000, /* db table prefix */
|
||||||
'datetimeformat' => 'Y-m-d H:i:s',
|
'datetimeformat' => 'Y-m-d H:i:s',
|
||||||
],
|
],
|
||||||
'schema' => [
|
'schema' => [
|
||||||
'db' => 'pgsql', /* db type */
|
'db' => 'pgsql', /* db type */
|
||||||
'host' => '127.0.0.1', /* db host address */
|
'host' => '127.0.0.1', /* db host address */
|
||||||
'port' => '5432', /* db host port */
|
'port' => '5432', /* db host port */
|
||||||
|
|
@ -194,37 +205,37 @@ $CONFIG = [
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
'sqlite' => [
|
'sqlite' => [
|
||||||
'admin' => [
|
'admin' => [
|
||||||
'db' => 'sqlite', /* db type */
|
'db' => 'sqlite', /* db type */
|
||||||
'database' => __DIR__ . '/../Karaka/phpOMS/Localization/Defaults/localization.sqlite', /* db name */
|
'database' => __DIR__ . '/../Karaka/phpOMS/Localization/Defaults/localization.sqlite', /* db name */
|
||||||
'weight' => 1000, /* db table prefix */
|
'weight' => 1000, /* db table prefix */
|
||||||
'datetimeformat' => 'Y-m-d H:i:s',
|
'datetimeformat' => 'Y-m-d H:i:s',
|
||||||
],
|
],
|
||||||
'insert' => [
|
'insert' => [
|
||||||
'db' => 'sqlite', /* db type */
|
'db' => 'sqlite', /* db type */
|
||||||
'database' => __DIR__ . '/../Karaka/phpOMS/Localization/Defaults/localization.sqlite', /* db name */
|
'database' => __DIR__ . '/../Karaka/phpOMS/Localization/Defaults/localization.sqlite', /* db name */
|
||||||
'weight' => 1000, /* db table prefix */
|
'weight' => 1000, /* db table prefix */
|
||||||
'datetimeformat' => 'Y-m-d H:i:s',
|
'datetimeformat' => 'Y-m-d H:i:s',
|
||||||
],
|
],
|
||||||
'select' => [
|
'select' => [
|
||||||
'db' => 'sqlite', /* db type */
|
'db' => 'sqlite', /* db type */
|
||||||
'database' => __DIR__ . '/../Karaka/phpOMS/Localization/Defaults/localization.sqlite', /* db name */
|
'database' => __DIR__ . '/../Karaka/phpOMS/Localization/Defaults/localization.sqlite', /* db name */
|
||||||
'weight' => 1000, /* db table prefix */
|
'weight' => 1000, /* db table prefix */
|
||||||
'datetimeformat' => 'Y-m-d H:i:s',
|
'datetimeformat' => 'Y-m-d H:i:s',
|
||||||
],
|
],
|
||||||
'update' => [
|
'update' => [
|
||||||
'db' => 'sqlite', /* db type */
|
'db' => 'sqlite', /* db type */
|
||||||
'database' => __DIR__ . '/../Karaka/phpOMS/Localization/Defaults/localization.sqlite', /* db name */
|
'database' => __DIR__ . '/../Karaka/phpOMS/Localization/Defaults/localization.sqlite', /* db name */
|
||||||
'weight' => 1000, /* db table prefix */
|
'weight' => 1000, /* db table prefix */
|
||||||
'datetimeformat' => 'Y-m-d H:i:s',
|
'datetimeformat' => 'Y-m-d H:i:s',
|
||||||
],
|
],
|
||||||
'delete' => [
|
'delete' => [
|
||||||
'db' => 'sqlite', /* db type */
|
'db' => 'sqlite', /* db type */
|
||||||
'database' => __DIR__ . '/../Karaka/phpOMS/Localization/Defaults/localization.sqlite', /* db name */
|
'database' => __DIR__ . '/../Karaka/phpOMS/Localization/Defaults/localization.sqlite', /* db name */
|
||||||
'weight' => 1000, /* db table prefix */
|
'weight' => 1000, /* db table prefix */
|
||||||
'datetimeformat' => 'Y-m-d H:i:s',
|
'datetimeformat' => 'Y-m-d H:i:s',
|
||||||
],
|
],
|
||||||
'schema' => [
|
'schema' => [
|
||||||
'db' => 'sqlite', /* db type */
|
'db' => 'sqlite', /* db type */
|
||||||
'database' => __DIR__ . '/../Karaka/phpOMS/Localization/Defaults/localization.sqlite', /* db name */
|
'database' => __DIR__ . '/../Karaka/phpOMS/Localization/Defaults/localization.sqlite', /* db name */
|
||||||
'weight' => 1000, /* db table prefix */
|
'weight' => 1000, /* db table prefix */
|
||||||
|
|
@ -232,7 +243,7 @@ $CONFIG = [
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
'mssql' => [
|
'mssql' => [
|
||||||
'admin' => [
|
'admin' => [
|
||||||
'db' => 'mssql', /* db type */
|
'db' => 'mssql', /* db type */
|
||||||
'host' => '127.0.0.1', /* db host address */
|
'host' => '127.0.0.1', /* db host address */
|
||||||
'port' => '1433', /* db host port */
|
'port' => '1433', /* db host port */
|
||||||
|
|
@ -242,7 +253,7 @@ $CONFIG = [
|
||||||
'weight' => 1000, /* db table prefix */
|
'weight' => 1000, /* db table prefix */
|
||||||
'datetimeformat' => 'Y-m-d H:i:s',
|
'datetimeformat' => 'Y-m-d H:i:s',
|
||||||
],
|
],
|
||||||
'insert' => [
|
'insert' => [
|
||||||
'db' => 'mssql', /* db type */
|
'db' => 'mssql', /* db type */
|
||||||
'host' => '127.0.0.1', /* db host address */
|
'host' => '127.0.0.1', /* db host address */
|
||||||
'port' => '1433', /* db host port */
|
'port' => '1433', /* db host port */
|
||||||
|
|
@ -252,7 +263,7 @@ $CONFIG = [
|
||||||
'weight' => 1000, /* db table prefix */
|
'weight' => 1000, /* db table prefix */
|
||||||
'datetimeformat' => 'Y-m-d H:i:s',
|
'datetimeformat' => 'Y-m-d H:i:s',
|
||||||
],
|
],
|
||||||
'select' => [
|
'select' => [
|
||||||
'db' => 'mssql', /* db type */
|
'db' => 'mssql', /* db type */
|
||||||
'host' => '127.0.0.1', /* db host address */
|
'host' => '127.0.0.1', /* db host address */
|
||||||
'port' => '1433', /* db host port */
|
'port' => '1433', /* db host port */
|
||||||
|
|
@ -262,7 +273,7 @@ $CONFIG = [
|
||||||
'weight' => 1000, /* db table prefix */
|
'weight' => 1000, /* db table prefix */
|
||||||
'datetimeformat' => 'Y-m-d H:i:s',
|
'datetimeformat' => 'Y-m-d H:i:s',
|
||||||
],
|
],
|
||||||
'update' => [
|
'update' => [
|
||||||
'db' => 'mssql', /* db type */
|
'db' => 'mssql', /* db type */
|
||||||
'host' => '127.0.0.1', /* db host address */
|
'host' => '127.0.0.1', /* db host address */
|
||||||
'port' => '1433', /* db host port */
|
'port' => '1433', /* db host port */
|
||||||
|
|
@ -272,7 +283,7 @@ $CONFIG = [
|
||||||
'weight' => 1000, /* db table prefix */
|
'weight' => 1000, /* db table prefix */
|
||||||
'datetimeformat' => 'Y-m-d H:i:s',
|
'datetimeformat' => 'Y-m-d H:i:s',
|
||||||
],
|
],
|
||||||
'delete' => [
|
'delete' => [
|
||||||
'db' => 'mssql', /* db type */
|
'db' => 'mssql', /* db type */
|
||||||
'host' => '127.0.0.1', /* db host address */
|
'host' => '127.0.0.1', /* db host address */
|
||||||
'port' => '1433', /* db host port */
|
'port' => '1433', /* db host port */
|
||||||
|
|
@ -282,7 +293,7 @@ $CONFIG = [
|
||||||
'weight' => 1000, /* db table prefix */
|
'weight' => 1000, /* db table prefix */
|
||||||
'datetimeformat' => 'Y-m-d H:i:s',
|
'datetimeformat' => 'Y-m-d H:i:s',
|
||||||
],
|
],
|
||||||
'schema' => [
|
'schema' => [
|
||||||
'db' => 'mssql', /* db type */
|
'db' => 'mssql', /* db type */
|
||||||
'host' => '127.0.0.1', /* db host address */
|
'host' => '127.0.0.1', /* db host address */
|
||||||
'port' => '1433', /* db host port */
|
'port' => '1433', /* db host port */
|
||||||
|
|
@ -322,16 +333,16 @@ $CONFIG = [
|
||||||
'password' => '123456',
|
'password' => '123456',
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
'log' => [
|
'log' => [
|
||||||
'file' => [
|
'file' => [
|
||||||
'path' => __DIR__ . '/Logs',
|
'path' => __DIR__ . '/Logs',
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
'page' => [
|
'page' => [
|
||||||
'root' => '/',
|
'root' => '/',
|
||||||
'https' => false,
|
'https' => false,
|
||||||
],
|
],
|
||||||
'app' => [
|
'app' => [
|
||||||
'path' => __DIR__,
|
'path' => __DIR__,
|
||||||
'default' => [
|
'default' => [
|
||||||
'app' => 'Backend',
|
'app' => 'Backend',
|
||||||
|
|
@ -350,7 +361,7 @@ $CONFIG = [
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
'socket' => [
|
'socket' => [
|
||||||
'master' => [
|
'master' => [
|
||||||
'host' => '127.0.0.1',
|
'host' => '127.0.0.1',
|
||||||
'limit' => 300,
|
'limit' => 300,
|
||||||
|
|
@ -360,7 +371,7 @@ $CONFIG = [
|
||||||
'language' => [
|
'language' => [
|
||||||
'en',
|
'en',
|
||||||
],
|
],
|
||||||
'apis' => [
|
'apis' => [
|
||||||
],
|
],
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user