diff --git a/Admin/Install/Interfaces/DatabaseExchanger/import.tpl.php b/Admin/Install/Interfaces/DatabaseExchanger/import.tpl.php index 770077a..e14fdfb 100755 --- a/Admin/Install/Interfaces/DatabaseExchanger/import.tpl.php +++ b/Admin/Install/Interfaces/DatabaseExchanger/import.tpl.php @@ -71,7 +71,7 @@ if (!empty($settingData)) { $currentExportTableFields = !empty($exportTables) ? $exportSchemaMapper->getFields($exportTables[0]) : []; } -$isNew = $currentSetting instanceof NullExchangeSetting; +$isNew = $currentSetting->id === 0; ?>
@@ -181,10 +181,10 @@ $isNew = $currentSetting instanceof NullExchangeSetting; getId() . '&setting=' . $setting->getId()); + $url = UriFactory::build('{/base}/admin/exchange/import/profile?id=' . $interface->id . '&setting=' . $setting->id); ?> - getId(); ?> + id; ?> title; ?> diff --git a/Controller/ApiController.php b/Controller/ApiController.php index b9ccc2f..09a86d9 100755 --- a/Controller/ApiController.php +++ b/Controller/ApiController.php @@ -205,7 +205,7 @@ final class ApiController extends Controller ); foreach ($uploaded as $upload) { - if ($upload instanceof NullMedia) { + if ($upload->id === 0) { continue; } @@ -220,7 +220,7 @@ final class ApiController extends Controller $request->header->account ); - if ($collection instanceof NullCollection) { + if ($collection->id === 0) { $response->header->status = RequestStatusCode::R_403; $this->fillJsonResponse($request, $response, NotificationLevel::ERROR, 'Interface', 'Couldn\'t create collection for interface', null); @@ -232,7 +232,7 @@ final class ApiController extends Controller $this->createModel($request->header->account, $collection, CollectionMapper::class, 'collection', $request->getOrigin()); - $interface = $this->createInterfaceFromRequest($request, $collection->getId()); + $interface = $this->createInterfaceFromRequest($request, $collection->id); $this->createModel($request->header->account, $interface, InterfaceManagerMapper::class, 'interface', $request->getOrigin()); diff --git a/Models/ExchangeLog.php b/Models/ExchangeLog.php index 79d378f..b430242 100755 --- a/Models/ExchangeLog.php +++ b/Models/ExchangeLog.php @@ -32,7 +32,7 @@ class ExchangeLog implements \JsonSerializable * @var int * @since 1.0.0 */ - protected int $id = 0; + public int $id = 0; /** * Message. @@ -58,7 +58,7 @@ class ExchangeLog implements \JsonSerializable * @var int * @since 1.0.0 */ - private int $type = ExchangeType::IMPORT; + public int $type = ExchangeType::IMPORT; /** * Exchange specific subtype. diff --git a/Models/ExchangeSetting.php b/Models/ExchangeSetting.php index 632373e..e3ffe73 100755 --- a/Models/ExchangeSetting.php +++ b/Models/ExchangeSetting.php @@ -32,7 +32,7 @@ class ExchangeSetting implements \JsonSerializable * @var int * @since 1.0.0 */ - protected int $id = 0; + public int $id = 0; /** * Title. diff --git a/Models/InterfaceManager.php b/Models/InterfaceManager.php index 2b8c9ef..1a60769 100755 --- a/Models/InterfaceManager.php +++ b/Models/InterfaceManager.php @@ -38,7 +38,7 @@ class InterfaceManager * @var int * @since 1.0.0 */ - protected int $id = 0; + public int $id = 0; /** * File path. diff --git a/Theme/Backend/exchange-export-list.tpl.php b/Theme/Backend/exchange-export-list.tpl.php index ace99cf..51e2c24 100755 --- a/Theme/Backend/exchange-export-list.tpl.php +++ b/Theme/Backend/exchange-export-list.tpl.php @@ -39,7 +39,7 @@ echo $this->getData('nav')->render(); $value) : ++$count; - $url = \phpOMS\Uri\UriFactory::build('{/base}/admin/exchange/export/profile?{?}&id=' . $value->getId()); ?> + $url = \phpOMS\Uri\UriFactory::build('{/base}/admin/exchange/export/profile?{?}&id=' . $value->id); ?> printHtml($value->title); ?> diff --git a/Theme/Backend/exchange-import-list.tpl.php b/Theme/Backend/exchange-import-list.tpl.php index ea4173a..4d7930b 100755 --- a/Theme/Backend/exchange-import-list.tpl.php +++ b/Theme/Backend/exchange-import-list.tpl.php @@ -39,7 +39,7 @@ echo $this->getData('nav')->render(); $value) : ++$count; - $url = \phpOMS\Uri\UriFactory::build('{/base}/admin/exchange/import/profile?{?}&id=' . $value->getId()); ?> + $url = \phpOMS\Uri\UriFactory::build('{/base}/admin/exchange/import/profile?{?}&id=' . $value->id); ?> printHtml($value->title); ?> diff --git a/Theme/Backend/exchange-log-list.tpl.php b/Theme/Backend/exchange-log-list.tpl.php index 9c65379..4442a59 100755 --- a/Theme/Backend/exchange-log-list.tpl.php +++ b/Theme/Backend/exchange-log-list.tpl.php @@ -102,10 +102,10 @@ echo $this->getData('nav')->render(); ?> $value) : ++$count; - $url = UriFactory::build('{/base}/admin/exchange/log?{?}&id=' . $value->getId()); + $url = UriFactory::build('{/base}/admin/exchange/log?{?}&id=' . $value->id); ?> - getId(); ?> + id; ?> getType(); ?> subtype; ?> exchange->title; ?> diff --git a/Theme/Backend/exchange-log.tpl.php b/Theme/Backend/exchange-log.tpl.php index dbf9b30..9b33f10 100755 --- a/Theme/Backend/exchange-log.tpl.php +++ b/Theme/Backend/exchange-log.tpl.php @@ -26,11 +26,11 @@ echo $this->getData('nav')->render();
-
getHtml('ID', '0', '0'); ?>getId(); ?> +
getHtml('ID', '0', '0'); ?>id; ?>
getHtml('Type'); ?>getType(); ?>
getHtml('Subtype'); ?>subtype; ?>
getHtml('Created'); ?>createdAt->format('Y-m-d'); ?> -
getHtml('Creator'); ?>createdBy->name1; ?> +
getHtml('Creator'); ?>createdBy->name1; ?>
message; ?>
diff --git a/tests/Controller/ApiControllerTest.php b/tests/Controller/ApiControllerTest.php index 2a3de0f..85d3a65 100755 --- a/tests/Controller/ApiControllerTest.php +++ b/tests/Controller/ApiControllerTest.php @@ -168,7 +168,7 @@ final class ApiControllerTest extends \PHPUnit\Framework\TestCase TestUtils::setMember($request, 'files', $files); $this->module->apiInterfaceInstall($request, $response); - self::assertGreaterThan(0, $response->get('')['response']->getId()); + self::assertGreaterThan(0, $response->get('')['response']->id); } if (\is_dir(__DIR__ . '/temp')) { diff --git a/tests/Interfaces/OMS/Exporter.php b/tests/Interfaces/OMS/Exporter.php index b7a6522..dd83a58 100755 --- a/tests/Interfaces/OMS/Exporter.php +++ b/tests/Interfaces/OMS/Exporter.php @@ -36,7 +36,7 @@ final class Exporter extends ExporterAbstract * @var int * @since 1.0.0 */ - private int $account = 1; + public int $account = 1; /** * Export all data in time span diff --git a/tests/Interfaces/OMS/Importer.php b/tests/Interfaces/OMS/Importer.php index b981bc0..0f0c928 100755 --- a/tests/Interfaces/OMS/Importer.php +++ b/tests/Interfaces/OMS/Importer.php @@ -39,7 +39,7 @@ final class Importer extends ImporterAbstract * @var int * @since 1.0.0 */ - private int $account = 1; + public int $account = 1; /** * Import all data in time span diff --git a/tests/Models/ExchangeLogTest.php b/tests/Models/ExchangeLogTest.php index 0a87d7c..ce3a0cd 100755 --- a/tests/Models/ExchangeLogTest.php +++ b/tests/Models/ExchangeLogTest.php @@ -38,7 +38,7 @@ final class ExchangeLogTest extends \PHPUnit\Framework\TestCase */ public function testDefault() : void { - self::assertEquals(0, $this->log->getId()); + self::assertEquals(0, $this->log->id); self::assertEquals('', $this->log->message); self::assertEquals('', $this->log->subtype); self::assertEquals(0, $this->log->exchange); diff --git a/tests/Models/InterfaceManagerTest.php b/tests/Models/InterfaceManagerTest.php index 11b6267..1843dae 100755 --- a/tests/Models/InterfaceManagerTest.php +++ b/tests/Models/InterfaceManagerTest.php @@ -37,7 +37,7 @@ final class InterfaceManagerTest extends \PHPUnit\Framework\TestCase */ public function testDefault() : void { - self::assertEquals(0, $this->interface->getId()); + self::assertEquals(0, $this->interface->id); self::assertEquals('', $this->interface->getPath()); self::assertEquals('', $this->interface->title); self::assertFalse($this->interface->hasImport); diff --git a/tests/Models/NullExchangeLogTest.php b/tests/Models/NullExchangeLogTest.php index 30e265a..349e693 100755 --- a/tests/Models/NullExchangeLogTest.php +++ b/tests/Models/NullExchangeLogTest.php @@ -37,6 +37,6 @@ final class NullExchangeLogTest extends \PHPUnit\Framework\TestCase public function testId() : void { $null = new NullExchangeLog(2); - self::assertEquals(2, $null->getId()); + self::assertEquals(2, $null->id); } } diff --git a/tests/Models/NullInterfaceManagerTest.php b/tests/Models/NullInterfaceManagerTest.php index bc6576c..c6f96b4 100755 --- a/tests/Models/NullInterfaceManagerTest.php +++ b/tests/Models/NullInterfaceManagerTest.php @@ -37,6 +37,6 @@ final class NullInterfaceManagerTest extends \PHPUnit\Framework\TestCase public function testId() : void { $null = new NullInterfaceManager(2); - self::assertEquals(2, $null->getId()); + self::assertEquals(2, $null->id); } }