diff --git a/Models/Contact.php b/Models/Contact.php index a9320bf..138338f 100644 --- a/Models/Contact.php +++ b/Models/Contact.php @@ -27,81 +27,233 @@ use Modules\Media\Models\NullMedia; */ class Contact { + /** + * Id. + * + * @var int + * @since 1.0.0 + */ protected int $id = 0; + /** + * Name1 + * + * @var string + * @since 1.0.0 + */ protected string $name1 = ''; + /** + * Name2 + * + * @var string + * @since 1.0.0 + */ protected string $name2 = ''; + /** + * Name2 + * + * @var string + * @since 1.0.0 + */ protected string $name3 = ''; + /** + * Description + * + * @var string + * @since 1.0.0 + */ protected string $description = ''; + /** + * Company name + * + * @var string + * @since 1.0.0 + */ protected string $company = ''; + /** + * Job title + * + * @var string + * @since 1.0.0 + */ protected string $job = ''; + /** + * Birthday + * + * @var null|\DateTime + * @since 1.0.0 + */ protected ?\DateTime $birthday = null; + /** + * Contact image + * + * @var Media + * @since 1.0.0 + */ protected Media $image; + /** + * Profile this contact belongs to + * + * @var int + * @since 1.0.0 + */ private int $profile = 0; + /** + * Constructor. + * + * @since 1.0.0 + */ public function __construct() { $this->image = new NullMedia(); } + /** + * Get id. + * + * @return int + * + * @since 1.0.0 + */ public function getId() : int { return $this->id; } + /** + * Get name1. + * + * @return string + * + * @since 1.0.0 + */ public function getName1() : string { return $this->name1; } + /** + * Set name1 + * + * @param string $name Name + * + * @return void + * + * @since 1.0.0 + */ public function setName1(string $name) : void { $this->name1 = $name; } + /** + * Get name2. + * + * @return string + * + * @since 1.0.0 + */ public function getName2() : string { return $this->name2; } + /** + * Set name2 + * + * @param string $name Name + * + * @return void + * + * @since 1.0.0 + */ public function setName2(string $name) : void { $this->name2 = $name; } + /** + * Get name3. + * + * @return string + * + * @since 1.0.0 + */ public function getName3() : string { return $this->name3; } + /** + * Set name3 + * + * @param string $name Name + * + * @return void + * + * @since 1.0.0 + */ public function setName3(string $name) : void { $this->name3 = $name; } + /** + * Get the contact description + * + * @return string + * + * @since 1.0.0 + */ public function getDescription() : string { return $this->description; } + /** + * Set the description + * + * @param string $description Description + * + * @return void + * + * @since 1.0.0 + */ public function setDescription(string $description) : void { $this->description = $description; } + /** + * Set the image + * + * @param Media $image Image + * + * @return void + * + * @since 1.0.0 + */ public function setImage(Media $image) : void { $this->image = $image; } + /** + * Get the image + * + * @return Media + * + * @since 1.0.0 + */ public function getImage() : Media { return $this->image; diff --git a/Models/ContactElement.php b/Models/ContactElement.php index e261601..b703719 100755 --- a/Models/ContactElement.php +++ b/Models/ContactElement.php @@ -59,7 +59,7 @@ class ContactElement /** * Order. * - * @var string + * @var int * @since 1.0.0 */ private int $order = 0; diff --git a/Models/ContactMapper.php b/Models/ContactMapper.php index 2d7100d..270fa6d 100644 --- a/Models/ContactMapper.php +++ b/Models/ContactMapper.php @@ -15,6 +15,7 @@ declare(strict_types=1); namespace Modules\Profile\Models; use phpOMS\DataStorage\Database\DataMapperAbstract; +use Modules\Media\Models\MediaMapper; /** * Contact mapper class. @@ -47,7 +48,7 @@ final class ContactMapper extends DataMapperAbstract /** * Has one relation. * - * @var array + * @var array * @since 1.0.0 */ protected static array $ownsOne = [ diff --git a/Models/ProfileMapper.php b/Models/ProfileMapper.php index 8fa1528..b3585a3 100755 --- a/Models/ProfileMapper.php +++ b/Models/ProfileMapper.php @@ -47,7 +47,7 @@ final class ProfileMapper extends DataMapperAbstract /** * Has one relation. * - * @var array + * @var array * @since 1.0.0 */ protected static array $ownsOne = [