refactor: documents
Signed-off-by: Sebastian Krupinski <krupinski01@gmail.com>
This commit is contained in:
@@ -26,8 +26,8 @@ abstract class NodePropertiesBaseAbstract implements NodePropertiesBaseInterface
|
||||
$data[static::JSON_PROPERTY_TYPE] = static::JSON_TYPE;
|
||||
}
|
||||
|
||||
if (!isset($data[static::JSON_PROPERTY_VERSION])) {
|
||||
$data[static::JSON_PROPERTY_VERSION] = 1;
|
||||
if (!isset($data[static::JSON_PROPERTY_SCHEMA])) {
|
||||
$data[static::JSON_PROPERTY_SCHEMA] = 1;
|
||||
}
|
||||
|
||||
$this->data = $data;
|
||||
@@ -50,8 +50,8 @@ abstract class NodePropertiesBaseAbstract implements NodePropertiesBaseInterface
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
public function version(): int {
|
||||
return $this->data[static::JSON_PROPERTY_VERSION];
|
||||
public function schema(): int {
|
||||
return $this->data[static::JSON_PROPERTY_SCHEMA];
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -22,7 +22,7 @@ interface NodePropertiesBaseInterface extends JsonSerializable {
|
||||
|
||||
public const JSON_TYPE = 'resource.data';
|
||||
public const JSON_PROPERTY_TYPE = '@type';
|
||||
public const JSON_PROPERTY_VERSION = 'version';
|
||||
public const JSON_PROPERTY_SCHEMA = 'schema';
|
||||
|
||||
/**
|
||||
* Get resource node properties type
|
||||
@@ -30,8 +30,8 @@ interface NodePropertiesBaseInterface extends JsonSerializable {
|
||||
public function type(): string;
|
||||
|
||||
/**
|
||||
* Get resource node properties version
|
||||
* Get resource node properties schema
|
||||
*/
|
||||
public function version(): int;
|
||||
public function schema(): int;
|
||||
|
||||
}
|
||||
|
||||
@@ -11,13 +11,13 @@ interface ProviderInterface
|
||||
{
|
||||
|
||||
public const TYPE_AUTHENTICATION = 'authentication';
|
||||
public const TYPE_DOCUMENT = 'document';
|
||||
public const TYPE_PEOPLE = 'people';
|
||||
public const TYPE_CHRONO = 'chrono';
|
||||
public const TYPE_FILES = 'files';
|
||||
public const TYPE_MAIL = 'mail';
|
||||
|
||||
/**
|
||||
* Provider type (e.g., 'authentication', 'storage', 'notification')
|
||||
* Provider type (e.g., 'authentication', 'document', 'people', 'chrono', 'mail')
|
||||
*/
|
||||
public function type(): string;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user