* @since 1.0.0 */ private $location = []; /** * Constructor. * * @param null|Account $account Account to initialize this profile with * * @since 1.0.0 */ public function __construct(Account $account = null) { $this->image = new NullMedia(); $this->birthday = new \DateTime('now'); $this->account = $account ?? new Account(); } /** * Get account id. * * @return int Account id * * @since 1.0.0 */ public function getId() : int { return $this->id; } /** * Get account locations. * * @return array * * @since 1.0.0 */ public function getLocation() : array { return $this->location; } /** * Add location. * * @param Location $location Location * * @return void * * @since 1.0.0 */ public function addLocation(Location $location) : void { $this->location[] = $location; } /** * Get account image. * * @return Media * * @since 1.0.0 */ public function getImage() : Media { return $this->image; } /** * Set account image. * * @param Media $image Profile image * * @return void * * @since 1.0.0 */ public function setImage(Media $image) : void { $this->image = $image; } /** * Set account. * * @param Account $account Profile account * * @return void * * @since 1.0.0 */ public function setAccount(Account $account) : void { $this->account = $account; } /** * Get account. * * @return Account * * @since 1.0.0 */ public function getAccount() : Account { return $this->account ?? new NullAccount(); } /** * Set birthday. * * @param \DateTime $birthday Birthday * * @return void * * @since 1.0.0 */ public function setBirthday(\DateTime $birthday) : void { $this->birthday = $birthday; } /** * Get birthday. * * @return \DateTime * * @since 1.0.0 */ public function getBirthday() : \DateTime { return $this->birthday; } /** * {@inheritdoc} */ public function jsonSerialize() { return [ 'id' => $this->id ]; } }