mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-09-05 06:14:59 +00:00
[address] allow to add custom data on addresses
This commit is contained in:
@@ -44,6 +44,13 @@ class Address
|
||||
*/
|
||||
private $isNoAddress = false;
|
||||
|
||||
/**
|
||||
* A list of metadata, added by customizable fields
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
private $customs = [];
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
$this->validFrom = new \DateTime();
|
||||
@@ -183,6 +190,29 @@ class Address
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get customs informations in the address
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function getCustoms(): array
|
||||
{
|
||||
return $this->customs;
|
||||
}
|
||||
|
||||
/**
|
||||
* Store custom informations in the address
|
||||
*
|
||||
* @param array $customs
|
||||
* @return $this
|
||||
*/
|
||||
public function setCustoms(array $customs): self
|
||||
{
|
||||
$this->customs = $customs;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Validate the address.
|
||||
*
|
||||
|
Reference in New Issue
Block a user