refactor: people entity properties objects
Signed-off-by: Sebastian Krupinski <krupinski01@gmail.com>
This commit is contained in:
@@ -0,0 +1,51 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
/**
|
||||
* SPDX-FileCopyrightText: Sebastian Krupinski <krupinski01@gmail.com>
|
||||
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
*/
|
||||
|
||||
namespace KTXF\People\Entity;
|
||||
|
||||
use DateTimeInterface;
|
||||
use KTXF\Json\JsonSerializableObject;
|
||||
use KTXF\People\Entity\Property\MediaCollection;
|
||||
use KTXF\People\Entity\Property\MemberCollection;
|
||||
use KTXF\People\Entity\Property\NameSimpleObject;
|
||||
use KTXF\People\Entity\Property\NoteCollection;
|
||||
use KTXF\People\Entity\Property\TagCollection;
|
||||
use KTXF\People\Entity\Property\VirtualLocationCollection;
|
||||
|
||||
class GroupObject extends JsonSerializableObject {
|
||||
|
||||
// Meta Information
|
||||
public string $type = 'group';
|
||||
public int $version = 1;
|
||||
public string|null $urid = null;
|
||||
public ?DateTimeInterface $created = null;
|
||||
public ?DateTimeInterface $modified = null;
|
||||
// Group Information
|
||||
public string|null $label = null;
|
||||
public NameSimpleObject $names;
|
||||
// Membership Information
|
||||
public MemberCollection $members;
|
||||
// Communication Information
|
||||
public VirtualLocationCollection $virtualLocations;
|
||||
// Media Information
|
||||
public MediaCollection $media;
|
||||
// Organizational Information
|
||||
public TagCollection $tags;
|
||||
public NoteCollection $notes;
|
||||
|
||||
public function __construct() {
|
||||
$this->names = new NameSimpleObject();
|
||||
$this->members = new MemberCollection();
|
||||
$this->virtualLocations = new VirtualLocationCollection();
|
||||
$this->media = new MediaCollection();
|
||||
$this->tags = new TagCollection();
|
||||
$this->notes = new NoteCollection();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,75 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
/**
|
||||
* SPDX-FileCopyrightText: Sebastian Krupinski <krupinski01@gmail.com>
|
||||
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
*/
|
||||
|
||||
namespace KTXF\People\Entity;
|
||||
|
||||
use DateTimeInterface;
|
||||
use KTXF\Json\JsonSerializableObject;
|
||||
use KTXF\People\Entity\Property\AffiliationCollection;
|
||||
use KTXF\People\Entity\Property\AnniversaryCollection;
|
||||
use KTXF\People\Entity\Property\CryptoCollection;
|
||||
use KTXF\People\Entity\Property\EmailCollection;
|
||||
use KTXF\People\Entity\Property\LanguageCollection;
|
||||
use KTXF\People\Entity\Property\MediaCollection;
|
||||
use KTXF\People\Entity\Property\NameComplexObject;
|
||||
use KTXF\People\Entity\Property\NoteCollection;
|
||||
use KTXF\People\Entity\Property\PhoneCollection;
|
||||
use KTXF\People\Entity\Property\PhysicalLocationCollection;
|
||||
use KTXF\People\Entity\Property\TagCollection;
|
||||
use KTXF\People\Entity\Property\TitleCollection;
|
||||
use KTXF\People\Entity\Property\VirtualLocationCollection;
|
||||
|
||||
class IndividualObject extends JsonSerializableObject {
|
||||
|
||||
// Meta Information
|
||||
public string $type = 'individual';
|
||||
public int $version = 1;
|
||||
public string|null $urid = null;
|
||||
public ?DateTimeInterface $created = null;
|
||||
public ?DateTimeInterface $modified = null;
|
||||
// Personal Information
|
||||
public string|null $label = null;
|
||||
public NameComplexObject $names;
|
||||
public TitleCollection $titles;
|
||||
public AnniversaryCollection $anniversaries;
|
||||
// Location Information
|
||||
public PhysicalLocationCollection $physicalLocations;
|
||||
// Communication Information
|
||||
public PhoneCollection $phones;
|
||||
public EmailCollection $emails;
|
||||
public VirtualLocationCollection $virtualLocations;
|
||||
// Media Information
|
||||
public MediaCollection $media;
|
||||
// Organizations Information
|
||||
public AffiliationCollection $organizations;
|
||||
// Organizational Information
|
||||
public TagCollection $tags;
|
||||
public NoteCollection $notes;
|
||||
// Localization Information
|
||||
public string|null $language = null;
|
||||
public LanguageCollection $languages;
|
||||
// Other Information
|
||||
public CryptoCollection $crypto;
|
||||
|
||||
public function __construct() {
|
||||
$this->names = new NameComplexObject();
|
||||
$this->anniversaries = new AnniversaryCollection();
|
||||
$this->phones = new PhoneCollection();
|
||||
$this->emails = new EmailCollection();
|
||||
$this->physicalLocations = new PhysicalLocationCollection();
|
||||
$this->organizations = new AffiliationCollection();
|
||||
$this->titles = new TitleCollection();
|
||||
$this->tags = new TagCollection();
|
||||
$this->notes = new NoteCollection();
|
||||
$this->crypto = new CryptoCollection();
|
||||
$this->virtualLocations = new VirtualLocationCollection();
|
||||
$this->media = new MediaCollection();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,61 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
/**
|
||||
* SPDX-FileCopyrightText: Sebastian Krupinski <krupinski01@gmail.com>
|
||||
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
*/
|
||||
|
||||
namespace KTXF\People\Entity;
|
||||
|
||||
use DateTimeInterface;
|
||||
use KTXF\Json\JsonSerializableObject;
|
||||
use KTXF\People\Entity\Property\CryptoCollection;
|
||||
use KTXF\People\Entity\Property\EmailCollection;
|
||||
use KTXF\People\Entity\Property\MediaCollection;
|
||||
use KTXF\People\Entity\Property\NameSimpleObject;
|
||||
use KTXF\People\Entity\Property\NoteCollection;
|
||||
use KTXF\People\Entity\Property\PhoneCollection;
|
||||
use KTXF\People\Entity\Property\PhysicalLocationCollection;
|
||||
use KTXF\People\Entity\Property\TagCollection;
|
||||
use KTXF\People\Entity\Property\VirtualLocationCollection;
|
||||
|
||||
class OrganizationObject extends JsonSerializableObject {
|
||||
|
||||
// Meta Information
|
||||
public string $type = 'organization';
|
||||
public int $version = 1;
|
||||
public string|null $urid = null;
|
||||
public ?DateTimeInterface $created = null;
|
||||
public ?DateTimeInterface $modified = null;
|
||||
// Organization Information
|
||||
public string|null $label = null;
|
||||
public NameSimpleObject $names;
|
||||
// Location Information
|
||||
public PhysicalLocationCollection $physicalLocations;
|
||||
// Communication Information
|
||||
public PhoneCollection $phones;
|
||||
public EmailCollection $emails;
|
||||
public VirtualLocationCollection $virtualLocations;
|
||||
// Media Information
|
||||
public MediaCollection $media;
|
||||
// Organizational Information
|
||||
public TagCollection $tags;
|
||||
public NoteCollection $notes;
|
||||
// Other Information
|
||||
public CryptoCollection $crypto;
|
||||
|
||||
public function __construct() {
|
||||
$this->names = new NameSimpleObject();
|
||||
$this->physicalLocations = new PhysicalLocationCollection();
|
||||
$this->phones = new PhoneCollection();
|
||||
$this->emails = new EmailCollection();
|
||||
$this->virtualLocations = new VirtualLocationCollection();
|
||||
$this->media = new MediaCollection();
|
||||
$this->tags = new TagCollection();
|
||||
$this->notes = new NoteCollection();
|
||||
$this->crypto = new CryptoCollection();
|
||||
}
|
||||
|
||||
}
|
||||
+3
-3
@@ -7,14 +7,14 @@ declare(strict_types=1);
|
||||
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
*/
|
||||
|
||||
namespace KTXF\People\Entity\Individual;
|
||||
namespace KTXF\People\Entity\Property;
|
||||
|
||||
use KTXF\Json\JsonSerializableCollection;
|
||||
|
||||
class IndividualAliasCollection extends JsonSerializableCollection {
|
||||
class AffiliationCollection extends JsonSerializableCollection {
|
||||
|
||||
public function __construct(array $data = []) {
|
||||
parent::__construct($data, IndividualAliasObject::class);
|
||||
parent::__construct($data, AffiliationObject::class, 'string');
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
/**
|
||||
* SPDX-FileCopyrightText: Sebastian Krupinski <krupinski01@gmail.com>
|
||||
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
*/
|
||||
|
||||
namespace KTXF\People\Entity\Property;
|
||||
|
||||
use KTXF\Json\JsonSerializableObject;
|
||||
|
||||
class AffiliationObject extends JsonSerializableObject {
|
||||
|
||||
public string|null $label = null;
|
||||
public array|null $units = null;
|
||||
public string|null $sortName = null;
|
||||
public string|null $context = null;
|
||||
public int|null $priority = null;
|
||||
|
||||
}
|
||||
+4
-4
@@ -7,14 +7,14 @@ declare(strict_types=1);
|
||||
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
*/
|
||||
|
||||
namespace KTXF\People\Entity\Individual;
|
||||
namespace KTXF\People\Entity\Property;
|
||||
|
||||
use KTXF\Json\JsonSerializableCollection;
|
||||
|
||||
class IndividualPronounCollection extends JsonSerializableCollection {
|
||||
class AliasCollection extends JsonSerializableCollection {
|
||||
|
||||
public function __construct(array $data = []) {
|
||||
parent::__construct($data, IndividualPronounObject::class);
|
||||
parent::__construct($data, AliasObject::class);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
+2
-2
@@ -7,11 +7,11 @@ declare(strict_types=1);
|
||||
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
*/
|
||||
|
||||
namespace KTXF\People\Entity\Individual;
|
||||
namespace KTXF\People\Entity\Property;
|
||||
|
||||
use KTXF\Json\JsonSerializableObject;
|
||||
|
||||
class IndividualAliasObject extends JsonSerializableObject {
|
||||
class AliasObject extends JsonSerializableObject {
|
||||
|
||||
public string|null $label = null;
|
||||
public string|null $context = null;
|
||||
+5
-3
@@ -7,12 +7,14 @@ declare(strict_types=1);
|
||||
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
*/
|
||||
|
||||
namespace KTXF\People\Entity\Individual;
|
||||
namespace KTXF\People\Entity\Property;
|
||||
|
||||
use KTXF\Json\JsonSerializableCollection;
|
||||
|
||||
class IndividualLanguageCollection extends JsonSerializableCollection {
|
||||
class AnniversaryCollection extends JsonSerializableCollection {
|
||||
|
||||
public function __construct(array $data = []) {
|
||||
parent::__construct($data, IndividualLanguageObject::class);
|
||||
parent::__construct($data, AnniversaryObject::class);
|
||||
}
|
||||
|
||||
}
|
||||
+3
-3
@@ -7,14 +7,14 @@ declare(strict_types=1);
|
||||
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
*/
|
||||
|
||||
namespace KTXF\People\Entity\Individual;
|
||||
namespace KTXF\People\Entity\Property;
|
||||
|
||||
use DateTimeInterface;
|
||||
use KTXF\Json\JsonSerializableObject;
|
||||
|
||||
class IndividualAnniversaryObject extends JsonSerializableObject {
|
||||
class AnniversaryObject extends JsonSerializableObject {
|
||||
|
||||
public IndividualAnniversaryTypes|null $type = null;
|
||||
public AnniversaryTypes|null $type = null;
|
||||
public DateTimeInterface|null $when = null;
|
||||
public string|null $location = null;
|
||||
|
||||
+2
-2
@@ -7,9 +7,9 @@ declare(strict_types=1);
|
||||
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
*/
|
||||
|
||||
namespace KTXF\People\Entity\Individual;
|
||||
namespace KTXF\People\Entity\Property;
|
||||
|
||||
enum IndividualAnniversaryTypes: string {
|
||||
enum AnniversaryTypes: string {
|
||||
case Birth = 'birth';
|
||||
case Death = 'death';
|
||||
case Nuptial = 'nuptial';
|
||||
@@ -0,0 +1,20 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
/**
|
||||
* SPDX-FileCopyrightText: Sebastian Krupinski <krupinski01@gmail.com>
|
||||
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
*/
|
||||
|
||||
namespace KTXF\People\Entity\Property;
|
||||
|
||||
use KTXF\Json\JsonSerializableCollection;
|
||||
|
||||
class CryptoCollection extends JsonSerializableCollection {
|
||||
|
||||
public function __construct(array $data = []) {
|
||||
parent::__construct($data, CryptoObject::class, 'string');
|
||||
}
|
||||
|
||||
}
|
||||
+2
-2
@@ -7,11 +7,11 @@ declare(strict_types=1);
|
||||
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
*/
|
||||
|
||||
namespace KTXF\People\Entity\Individual;
|
||||
namespace KTXF\People\Entity\Property;
|
||||
|
||||
use KTXF\Json\JsonSerializableObject;
|
||||
|
||||
class IndividualCryptoObject extends JsonSerializableObject {
|
||||
class CryptoObject extends JsonSerializableObject {
|
||||
|
||||
public string|null $data = null;
|
||||
public string|null $type = null;
|
||||
@@ -0,0 +1,20 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
/**
|
||||
* SPDX-FileCopyrightText: Sebastian Krupinski <krupinski01@gmail.com>
|
||||
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
*/
|
||||
|
||||
namespace KTXF\People\Entity\Property;
|
||||
|
||||
use KTXF\Json\JsonSerializableCollection;
|
||||
|
||||
class EmailCollection extends JsonSerializableCollection {
|
||||
|
||||
public function __construct(array $data = []) {
|
||||
parent::__construct($data, EmailObject::class, 'string');
|
||||
}
|
||||
|
||||
}
|
||||
+2
-2
@@ -7,11 +7,11 @@ declare(strict_types=1);
|
||||
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
*/
|
||||
|
||||
namespace KTXF\People\Entity\Individual;
|
||||
namespace KTXF\People\Entity\Property;
|
||||
|
||||
use KTXF\Json\JsonSerializableObject;
|
||||
|
||||
class IndividualEmailObject extends JsonSerializableObject {
|
||||
class EmailObject extends JsonSerializableObject {
|
||||
|
||||
public string|null $address = null;
|
||||
public string|null $context = null;
|
||||
@@ -0,0 +1,20 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
/**
|
||||
* SPDX-FileCopyrightText: Sebastian Krupinski <krupinski01@gmail.com>
|
||||
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
*/
|
||||
|
||||
namespace KTXF\People\Entity\Property;
|
||||
|
||||
use KTXF\Json\JsonSerializableCollection;
|
||||
|
||||
class LanguageCollection extends JsonSerializableCollection {
|
||||
|
||||
public function __construct(array $data = []) {
|
||||
parent::__construct($data, LanguageObject::class);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
/**
|
||||
* SPDX-FileCopyrightText: Sebastian Krupinski <krupinski01@gmail.com>
|
||||
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
*/
|
||||
|
||||
namespace KTXF\People\Entity\Property;
|
||||
|
||||
use KTXF\Json\JsonSerializableObject;
|
||||
|
||||
class LanguageObject extends JsonSerializableObject {
|
||||
|
||||
public string|null $data = null;
|
||||
public string|null $id = null;
|
||||
public int|null $priority = null;
|
||||
public string|null $context = null;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
/**
|
||||
* SPDX-FileCopyrightText: Sebastian Krupinski <krupinski01@gmail.com>
|
||||
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
*/
|
||||
|
||||
namespace KTXF\People\Entity\Property;
|
||||
|
||||
use KTXF\Json\JsonSerializableCollection;
|
||||
|
||||
class MediaCollection extends JsonSerializableCollection {
|
||||
|
||||
public function __construct(array $data = []) {
|
||||
parent::__construct($data, MediaObject::class, 'string');
|
||||
}
|
||||
|
||||
}
|
||||
+3
-3
@@ -7,11 +7,11 @@ declare(strict_types=1);
|
||||
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
*/
|
||||
|
||||
namespace KTXF\People\Entity\Individual;
|
||||
namespace KTXF\People\Entity\Property;
|
||||
|
||||
use KTXF\Json\JsonSerializableObject;
|
||||
|
||||
class IndividualMediaObject extends JsonSerializableObject {
|
||||
class MediaObject extends JsonSerializableObject {
|
||||
|
||||
public string $type = 'Media';
|
||||
public string $kind;
|
||||
@@ -21,4 +21,4 @@ class IndividualMediaObject extends JsonSerializableObject {
|
||||
public int|null $pref = null;
|
||||
public string|null $label = null;
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
/**
|
||||
* SPDX-FileCopyrightText: Sebastian Krupinski <krupinski01@gmail.com>
|
||||
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
*/
|
||||
|
||||
namespace KTXF\People\Entity\Property;
|
||||
|
||||
use KTXF\Json\JsonSerializableCollection;
|
||||
|
||||
class MemberCollection extends JsonSerializableCollection {
|
||||
|
||||
public function __construct(array $data = []) {
|
||||
parent::__construct($data, MemberObject::class, 'string');
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
/**
|
||||
* SPDX-FileCopyrightText: Sebastian Krupinski <krupinski01@gmail.com>
|
||||
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
*/
|
||||
|
||||
namespace KTXF\People\Entity\Property;
|
||||
|
||||
use KTXF\Json\JsonSerializableObject;
|
||||
|
||||
class MemberObject extends JsonSerializableObject {
|
||||
|
||||
public string|null $entityId = null;
|
||||
public string|null $role = null;
|
||||
public string|null $context = null;
|
||||
public int|null $priority = null;
|
||||
|
||||
}
|
||||
+4
-4
@@ -7,11 +7,11 @@ declare(strict_types=1);
|
||||
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
*/
|
||||
|
||||
namespace KTXF\People\Entity\Individual;
|
||||
namespace KTXF\People\Entity\Property;
|
||||
|
||||
use KTXF\Json\JsonSerializableObject;
|
||||
|
||||
class IndividualNameObject extends JsonSerializableObject {
|
||||
class NameComplexObject extends JsonSerializableObject {
|
||||
|
||||
public string|null $family = null;
|
||||
public string|null $given = null;
|
||||
@@ -21,10 +21,10 @@ class IndividualNameObject extends JsonSerializableObject {
|
||||
public string|null $phoneticFamily = null;
|
||||
public string|null $phoneticGiven = null;
|
||||
public string|null $phoneticAdditional = null;
|
||||
public IndividualAliasCollection $aliases;
|
||||
public AliasCollection $aliases;
|
||||
|
||||
public function __construct() {
|
||||
$this->aliases = new IndividualAliasCollection();
|
||||
$this->aliases = new AliasCollection();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
/**
|
||||
* SPDX-FileCopyrightText: Sebastian Krupinski <krupinski01@gmail.com>
|
||||
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
*/
|
||||
|
||||
namespace KTXF\People\Entity\Property;
|
||||
|
||||
use KTXF\Json\JsonSerializableObject;
|
||||
|
||||
class NameSimpleObject extends JsonSerializableObject {
|
||||
|
||||
public string|null $full = null;
|
||||
public string|null $sort = null;
|
||||
public AliasCollection $aliases;
|
||||
|
||||
public function __construct() {
|
||||
$this->aliases = new AliasCollection();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
/**
|
||||
* SPDX-FileCopyrightText: Sebastian Krupinski <krupinski01@gmail.com>
|
||||
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
*/
|
||||
|
||||
namespace KTXF\People\Entity\Property;
|
||||
|
||||
use KTXF\Json\JsonSerializableCollection;
|
||||
|
||||
class NoteCollection extends JsonSerializableCollection {
|
||||
|
||||
public function __construct(array $data = []) {
|
||||
parent::__construct($data, NoteObject::class, 'string');
|
||||
}
|
||||
|
||||
}
|
||||
+2
-3
@@ -7,18 +7,17 @@ declare(strict_types=1);
|
||||
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
*/
|
||||
|
||||
namespace KTXF\People\Entity\Individual;
|
||||
namespace KTXF\People\Entity\Property;
|
||||
|
||||
use DateTimeInterface;
|
||||
use KTXF\Json\JsonSerializableObject;
|
||||
|
||||
class IndividualNoteObject extends JsonSerializableObject {
|
||||
class NoteObject extends JsonSerializableObject {
|
||||
|
||||
public string|null $content = null;
|
||||
public DateTimeInterface|null $date = null;
|
||||
public string|null $authorUri = null;
|
||||
public string|null $authorName = null;
|
||||
|
||||
public string|null $context = null;
|
||||
public int|null $priority = null;
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
/**
|
||||
* SPDX-FileCopyrightText: Sebastian Krupinski <krupinski01@gmail.com>
|
||||
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
*/
|
||||
|
||||
namespace KTXF\People\Entity\Property;
|
||||
|
||||
use KTXF\Json\JsonSerializableCollection;
|
||||
|
||||
class PhoneCollection extends JsonSerializableCollection {
|
||||
|
||||
public function __construct(array $data = []) {
|
||||
parent::__construct($data, PhoneObject::class, 'string');
|
||||
}
|
||||
|
||||
}
|
||||
+3
-3
@@ -7,15 +7,15 @@ declare(strict_types=1);
|
||||
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
*/
|
||||
|
||||
namespace KTXF\People\Entity\Individual;
|
||||
namespace KTXF\People\Entity\Property;
|
||||
|
||||
use KTXF\Json\JsonSerializableObject;
|
||||
|
||||
class IndividualPhoneObject extends JsonSerializableObject {
|
||||
class PhoneObject extends JsonSerializableObject {
|
||||
|
||||
public string|null $number = null;
|
||||
|
||||
public string|null $label = null;
|
||||
public string|null $context = null;
|
||||
public int|null $priority = null;
|
||||
|
||||
}
|
||||
+4
-4
@@ -7,14 +7,14 @@ declare(strict_types=1);
|
||||
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
*/
|
||||
|
||||
namespace KTXF\People\Entity\Individual;
|
||||
namespace KTXF\People\Entity\Property;
|
||||
|
||||
use KTXF\Json\JsonSerializableCollection;
|
||||
|
||||
class IndividualCryptoCollection extends JsonSerializableCollection {
|
||||
class PhysicalLocationCollection extends JsonSerializableCollection {
|
||||
|
||||
public function __construct(array $data = []) {
|
||||
parent::__construct($data, IndividualCryptoObject::class, 'string');
|
||||
parent::__construct($data, PhysicalLocationObject::class, 'string');
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
+2
-4
@@ -7,11 +7,11 @@ declare(strict_types=1);
|
||||
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
*/
|
||||
|
||||
namespace KTXF\People\Entity\Individual;
|
||||
namespace KTXF\People\Entity\Property;
|
||||
|
||||
use KTXF\Json\JsonSerializableObject;
|
||||
|
||||
class IndividualPhysicalLocationObject extends JsonSerializableObject {
|
||||
class PhysicalLocationObject extends JsonSerializableObject {
|
||||
|
||||
public string|null $box = null;
|
||||
public string|null $unit = null;
|
||||
@@ -20,11 +20,9 @@ class IndividualPhysicalLocationObject extends JsonSerializableObject {
|
||||
public string|null $region = null;
|
||||
public string|null $code = null;
|
||||
public string|null $country = null;
|
||||
|
||||
public string|null $label = null;
|
||||
public string|null $coordinates = null;
|
||||
public string|null $timeZone = null;
|
||||
|
||||
public string|null $context = null;
|
||||
public int|null $priority = null;
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
/**
|
||||
* SPDX-FileCopyrightText: Sebastian Krupinski <krupinski01@gmail.com>
|
||||
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
*/
|
||||
|
||||
namespace KTXF\People\Entity\Property;
|
||||
|
||||
use KTXF\Json\JsonSerializableCollection;
|
||||
|
||||
class PronounCollection extends JsonSerializableCollection {
|
||||
|
||||
public function __construct(array $data = []) {
|
||||
parent::__construct($data, PronounObject::class);
|
||||
}
|
||||
|
||||
}
|
||||
+3
-4
@@ -7,14 +7,13 @@ declare(strict_types=1);
|
||||
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
*/
|
||||
|
||||
namespace KTXF\People\Entity\Individual;
|
||||
namespace KTXF\People\Entity\Property;
|
||||
|
||||
use KTXF\Json\JsonSerializableObject;
|
||||
|
||||
class IndividualPronounObject extends JsonSerializableObject {
|
||||
|
||||
class PronounObject extends JsonSerializableObject {
|
||||
|
||||
public string|null $pronoun = null;
|
||||
|
||||
public string|null $context = null;
|
||||
public int|null $priority = null;
|
||||
|
||||
+3
-3
@@ -7,14 +7,14 @@ declare(strict_types=1);
|
||||
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
*/
|
||||
|
||||
namespace KTXF\People\Entity\Individual;
|
||||
namespace KTXF\People\Entity\Property;
|
||||
|
||||
use KTXF\Json\JsonSerializableCollection;
|
||||
|
||||
class IndividualTagCollection extends JsonSerializableCollection {
|
||||
class TagCollection extends JsonSerializableCollection {
|
||||
|
||||
public function __construct(array $data = []) {
|
||||
parent::__construct($data, 'string');
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
/**
|
||||
* SPDX-FileCopyrightText: Sebastian Krupinski <krupinski01@gmail.com>
|
||||
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
*/
|
||||
|
||||
namespace KTXF\People\Entity\Property;
|
||||
|
||||
use KTXF\Json\JsonSerializableCollection;
|
||||
|
||||
class TitleCollection extends JsonSerializableCollection {
|
||||
|
||||
public function __construct(array $data = []) {
|
||||
parent::__construct($data, TitleObject::class, 'string');
|
||||
}
|
||||
|
||||
}
|
||||
+4
-5
@@ -7,16 +7,15 @@ declare(strict_types=1);
|
||||
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
*/
|
||||
|
||||
namespace KTXF\People\Entity\Individual;
|
||||
namespace KTXF\People\Entity\Property;
|
||||
|
||||
use KTXF\Json\JsonSerializableObject;
|
||||
|
||||
class IndividualTitleObject extends JsonSerializableObject {
|
||||
class TitleObject extends JsonSerializableObject {
|
||||
|
||||
public IndividualTitleTypes|null $kind = null;
|
||||
public string|null $label = null;
|
||||
public TitleTypes|null $kind = null;
|
||||
public string|null $label = null;
|
||||
public string|null $relation = null;
|
||||
|
||||
public string|null $context = null;
|
||||
public int|null $priority = null;
|
||||
|
||||
+2
-2
@@ -7,9 +7,9 @@ declare(strict_types=1);
|
||||
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
*/
|
||||
|
||||
namespace KTXF\People\Entity\Individual;
|
||||
namespace KTXF\People\Entity\Property;
|
||||
|
||||
enum IndividualTitleTypes: string {
|
||||
enum TitleTypes: string {
|
||||
case Title = 't';
|
||||
case Role = 'r';
|
||||
}
|
||||
+4
-4
@@ -7,14 +7,14 @@ declare(strict_types=1);
|
||||
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
*/
|
||||
|
||||
namespace KTXF\People\Entity\Individual;
|
||||
namespace KTXF\People\Entity\Property;
|
||||
|
||||
use KTXF\Json\JsonSerializableCollection;
|
||||
|
||||
class IndividualTitleCollection extends JsonSerializableCollection {
|
||||
class VirtualLocationCollection extends JsonSerializableCollection {
|
||||
|
||||
public function __construct(array $data = []) {
|
||||
parent::__construct($data, IndividualTitleObject::class, 'string');
|
||||
parent::__construct($data, VirtualLocationObject::class, 'string');
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
+2
-3
@@ -7,14 +7,13 @@ declare(strict_types=1);
|
||||
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
*/
|
||||
|
||||
namespace KTXF\People\Entity\Individual;
|
||||
namespace KTXF\People\Entity\Property;
|
||||
|
||||
use KTXF\Json\JsonSerializableObject;
|
||||
|
||||
class IndividualVirtualLocationObject extends JsonSerializableObject {
|
||||
class VirtualLocationObject extends JsonSerializableObject {
|
||||
|
||||
public string|null $location = null;
|
||||
|
||||
public string|null $label = null;
|
||||
public string|null $context = null;
|
||||
public int|null $priority = null;
|
||||
@@ -1,20 +0,0 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
/**
|
||||
* SPDX-FileCopyrightText: Sebastian Krupinski <krupinski01@gmail.com>
|
||||
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
*/
|
||||
|
||||
namespace KTXF\People\Entity\Individual;
|
||||
|
||||
use KTXF\Json\JsonSerializableCollection;
|
||||
|
||||
class IndividualAnniversaryCollection extends JsonSerializableCollection {
|
||||
|
||||
public function __construct(array $data = []) {
|
||||
parent::__construct($data, IndividualAnniversaryObject::class);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,20 +0,0 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
/**
|
||||
* SPDX-FileCopyrightText: Sebastian Krupinski <krupinski01@gmail.com>
|
||||
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
*/
|
||||
|
||||
namespace KTXF\People\Entity\Individual;
|
||||
|
||||
use KTXF\Json\JsonSerializableCollection;
|
||||
|
||||
class IndividualEmailCollection extends JsonSerializableCollection {
|
||||
|
||||
public function __construct(array $data = []) {
|
||||
parent::__construct($data, IndividualEmailObject::class, 'string');
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,22 +0,0 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
/**
|
||||
* SPDX-FileCopyrightText: Sebastian Krupinski <krupinski01@gmail.com>
|
||||
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
*/
|
||||
|
||||
namespace KTXF\People\Entity\Individual;
|
||||
|
||||
use KTXF\Json\JsonSerializableObject;
|
||||
|
||||
class IndividualLanguageObject extends JsonSerializableObject {
|
||||
|
||||
public string|null $Data = null;
|
||||
|
||||
public string|null $Id = null;
|
||||
public int|null $Priority = null;
|
||||
public string|null $Context = null;
|
||||
|
||||
}
|
||||
@@ -1,20 +0,0 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
/**
|
||||
* SPDX-FileCopyrightText: Sebastian Krupinski <krupinski01@gmail.com>
|
||||
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
*/
|
||||
|
||||
namespace KTXF\People\Entity\Individual;
|
||||
|
||||
use KTXF\Json\JsonSerializableCollection;
|
||||
|
||||
class IndividualMediaCollection extends JsonSerializableCollection {
|
||||
|
||||
public function __construct(array $data = []) {
|
||||
parent::__construct($data, IndividualMediaObject::class, 'string');
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,20 +0,0 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
/**
|
||||
* SPDX-FileCopyrightText: Sebastian Krupinski <krupinski01@gmail.com>
|
||||
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
*/
|
||||
|
||||
namespace KTXF\People\Entity\Individual;
|
||||
|
||||
use KTXF\Json\JsonSerializableCollection;
|
||||
|
||||
class IndividualNoteCollection extends JsonSerializableCollection {
|
||||
|
||||
public function __construct(array $data = []) {
|
||||
parent::__construct($data, IndividualNoteObject::class, 'string');
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,62 +0,0 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
/**
|
||||
* SPDX-FileCopyrightText: Sebastian Krupinski <krupinski01@gmail.com>
|
||||
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
*/
|
||||
|
||||
namespace KTXF\People\Entity\Individual;
|
||||
|
||||
use DateTimeInterface;
|
||||
use KTXF\Json\JsonSerializableObject;
|
||||
|
||||
class IndividualObject extends JsonSerializableObject {
|
||||
|
||||
// Meta Information
|
||||
public string $type = 'individual';
|
||||
public int $version = 1;
|
||||
public string|null $urid = null;
|
||||
public ?DateTimeInterface $created = null;
|
||||
public ?DateTimeInterface $modified = null;
|
||||
// Personal Information
|
||||
public string|null $label = null;
|
||||
public IndividualNameObject $names;
|
||||
public IndividualTitleCollection $titles;
|
||||
public IndividualAnniversaryCollection $anniversaries;
|
||||
// Location Information
|
||||
public IndividualPhysicalLocationCollection $physicalLocations;
|
||||
// Communication Information
|
||||
public IndividualPhoneCollection $phones;
|
||||
public IndividualEmailCollection $emails;
|
||||
public IndividualVirtualLocationCollection $virtualLocations;
|
||||
// Media Information
|
||||
public IndividualMediaCollection $media;
|
||||
// Organizations Information
|
||||
public IndividualOrganizationCollection $organizations;
|
||||
// Organizational Information
|
||||
public IndividualTagCollection $tags;
|
||||
public IndividualNoteCollection $notes;
|
||||
// Localization Information
|
||||
public string|null $language = null;
|
||||
public IndividualLanguageCollection $languages;
|
||||
// Other Information
|
||||
public IndividualCryptoCollection $crypto;
|
||||
|
||||
public function __construct() {
|
||||
$this->names = new IndividualNameObject();
|
||||
$this->anniversaries = new IndividualAnniversaryCollection();
|
||||
$this->phones = new IndividualPhoneCollection();
|
||||
$this->emails = new IndividualEmailCollection();
|
||||
$this->physicalLocations = new IndividualPhysicalLocationCollection();
|
||||
$this->organizations = new IndividualOrganizationCollection();
|
||||
$this->titles = new IndividualTitleCollection();
|
||||
$this->tags = new IndividualTagCollection();
|
||||
$this->notes = new IndividualNoteCollection();
|
||||
$this->crypto = new IndividualCryptoCollection();
|
||||
$this->virtualLocations = new IndividualVirtualLocationCollection();
|
||||
$this->media = new IndividualMediaCollection();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,20 +0,0 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
/**
|
||||
* SPDX-FileCopyrightText: Sebastian Krupinski <krupinski01@gmail.com>
|
||||
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
*/
|
||||
|
||||
namespace KTXF\People\Entity\Individual;
|
||||
|
||||
use KTXF\Json\JsonSerializableCollection;
|
||||
|
||||
class IndividualOrganizationCollection extends JsonSerializableCollection {
|
||||
|
||||
public function __construct(array $data = []) {
|
||||
parent::__construct($data, IndividualOrganizationObject::class, 'string');
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,29 +0,0 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
/**
|
||||
* SPDX-FileCopyrightText: Sebastian Krupinski <krupinski01@gmail.com>
|
||||
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
*/
|
||||
|
||||
namespace KTXF\People\Entity\Individual;
|
||||
|
||||
use KTXF\Json\JsonSerializableObject;
|
||||
use OCA\JMAPC\Objects\BaseStringCollection;
|
||||
|
||||
class IndividualOrganizationObject extends JsonSerializableObject {
|
||||
|
||||
public string|null $Label;
|
||||
public BaseStringCollection $Units;
|
||||
|
||||
public string|null $sortName = null;
|
||||
|
||||
public string|null $context = null;
|
||||
public int|null $priority = null;
|
||||
|
||||
public function __construct() {
|
||||
$this->units = new BaseStringCollection();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,20 +0,0 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
/**
|
||||
* SPDX-FileCopyrightText: Sebastian Krupinski <krupinski01@gmail.com>
|
||||
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
*/
|
||||
|
||||
namespace KTXF\People\Entity\Individual;
|
||||
|
||||
use KTXF\Json\JsonSerializableCollection;
|
||||
|
||||
class IndividualPhoneCollection extends JsonSerializableCollection {
|
||||
|
||||
public function __construct(array $data = []) {
|
||||
parent::__construct($data, IndividualPhoneObject::class, 'string');
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,20 +0,0 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
/**
|
||||
* SPDX-FileCopyrightText: Sebastian Krupinski <krupinski01@gmail.com>
|
||||
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
*/
|
||||
|
||||
namespace KTXF\People\Entity\Individual;
|
||||
|
||||
use KTXF\Json\JsonSerializableCollection;
|
||||
|
||||
class IndividualPhysicalLocationCollection extends JsonSerializableCollection {
|
||||
|
||||
public function __construct(array $data = []) {
|
||||
parent::__construct($data, IndividualPhysicalLocationObject::class, 'string');
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,20 +0,0 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
/**
|
||||
* SPDX-FileCopyrightText: Sebastian Krupinski <krupinski01@gmail.com>
|
||||
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
*/
|
||||
|
||||
namespace KTXF\People\Entity\Individual;
|
||||
|
||||
use KTXF\Json\JsonSerializableCollection;
|
||||
|
||||
class IndividualVirtualLocationCollection extends JsonSerializableCollection {
|
||||
|
||||
public function __construct(array $data = []) {
|
||||
parent::__construct($data, IndividualVirtualLocationObject::class, 'string');
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user