mirror of
https://github.com/nextcloud/server.git
synced 2026-04-22 14:50:17 -04:00
Signed-off-by: Maxence Lange <maxence@artificial-owl.com> d Signed-off-by: Maxence Lange <maxence@artificial-owl.com> f Signed-off-by: Maxence Lange <maxence@artificial-owl.com> d Signed-off-by: Maxence Lange <maxence@artificial-owl.com>
31 lines
691 B
PHP
31 lines
691 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
/**
|
|
* SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors
|
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
|
*/
|
|
namespace OCP\Migration\Attributes;
|
|
|
|
use JsonSerializable;
|
|
|
|
class GenericMigrationAttribute extends MigrationAttribute implements JsonSerializable {
|
|
public function __construct(
|
|
private readonly array $details = []
|
|
) {
|
|
parent::__construct(
|
|
$details['table'] ?? '',
|
|
$details['description'] ?? '',
|
|
$details['notes'] ?? []
|
|
);
|
|
}
|
|
|
|
public function definition(): string {
|
|
return json_encode($this->jsonSerialize(), JSON_UNESCAPED_SLASHES);
|
|
}
|
|
|
|
public function jsonSerialize(): array {
|
|
return $this->details;
|
|
}
|
|
}
|