From ff52640622c0ea10c5febe4187246c336f6acd02 Mon Sep 17 00:00:00 2001 From: "Filip.Cieslik" Date: Wed, 22 Jan 2025 12:15:22 +0000 Subject: [PATCH] [AB#38683] added entity map to instance. --- src/eCloud/Entities/InstanceSoftware.php | 14 +++++++++++--- src/eCloud/InstanceSoftwareClient.php | 11 +---------- 2 files changed, 12 insertions(+), 13 deletions(-) diff --git a/src/eCloud/Entities/InstanceSoftware.php b/src/eCloud/Entities/InstanceSoftware.php index df2d286f..69616f5a 100644 --- a/src/eCloud/Entities/InstanceSoftware.php +++ b/src/eCloud/Entities/InstanceSoftware.php @@ -16,8 +16,16 @@ */ class InstanceSoftware extends Entity { - /** - * @var array - */ protected $dates = ['createdAt', 'updatedAt']; + + public static $entityMap = [ + 'id' => 'id', + 'name' => 'name', + 'instance_id' => 'instanceId', + 'software_id' => 'softwareId', + 'sync' => 'sync', + 'task' => 'task', + 'created_at' => 'createdAt', + 'updated_at' => 'updatedAt', + ]; } diff --git a/src/eCloud/InstanceSoftwareClient.php b/src/eCloud/InstanceSoftwareClient.php index 3294d8bb..136f05d1 100644 --- a/src/eCloud/InstanceSoftwareClient.php +++ b/src/eCloud/InstanceSoftwareClient.php @@ -14,16 +14,7 @@ class InstanceSoftwareClient extends Client implements ClientEntityInterface public function getEntityMap() { - return [ - 'id' => 'id', - 'name' => 'name', - 'instance_id' => 'instanceId', - 'software_id' => 'softwareId', - 'sync' => 'sync', - 'task' => 'task', - 'created_at' => 'createdAt', - 'updated_at' => 'updatedAt', - ]; + return InstanceSoftware::$entityMap; } public function loadEntity($data)