<?php
namespace Medienreaktor\Persons\Domain\Model;

/***
 *
 * This file is part of the "Persons" Extension for TYPO3 CMS.
 *
 * For the full copyright and license information, please read the
 * LICENSE.txt file that was distributed with this source code.
 *
 *  (c) 2018
 *
 ***/

/**
 * Address
 */
class Address extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity
{
    /**
     * title
     *
     * @var string
     */
    protected $title = '';

    /**
     * phone
     *
     * @var string
     */
    protected $phone = '';

    /**
     * fax
     *
     * @var string
     */
    protected $fax = '';

    /**
     * zip
     *
     * @var string
     */
    protected $zip = '';

    /**
     * city
     *
     * @var string
     */
    protected $city = '';

    /**
     * street
     *
     * @var string
     */
    protected $street = '';

    /**
     * number
     *
     * @var string
     */
    protected $number = '';

    /**
     * latitude
     *
     * @var string
     */
    protected $latitude = '';


    /**
     * longitude
     *
     * @var string
     */
    protected $longitude = '';

    /**
     * company
     *
     * @var \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\Medienreaktor\Persons\Domain\Model\Company>
     */
    protected $company = null;

    /**
     * location
     *
     * @var \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\Medienreaktor\Persons\Domain\Model\Location>
     */
    protected $location = null;

    /**
     * person
     *
     * @var \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\Medienreaktor\Persons\Domain\Model\Person>
     */
    protected $person = null;

    /**
     * mail
     *
     * @var string
     */
    protected $mail = '';

    /**
     * image
     *
     * @var \TYPO3\CMS\Extbase\Domain\Model\FileReference
     */
    #[\TYPO3\CMS\Extbase\Annotation\ORM\Cascade(['value' => 'remove'])]
    protected $image = null;

    /**
     * Initializes all ObjectStorage properties
     * Do not modify this method!
     * It will be rewritten on each save in the extension builder
     * You may modify the constructor of this class instead
     *
     * @return void
     */
    protected function initStorageObjects()
    {
        $this->company = new \TYPO3\CMS\Extbase\Persistence\ObjectStorage();
        $this->location = new \TYPO3\CMS\Extbase\Persistence\ObjectStorage();
        $this->person = new \TYPO3\CMS\Extbase\Persistence\ObjectStorage();
    }

    /**
     * Returns the title
     *
     * @return string $title
     */
    public function getTitle()
    {
        return $this->title;
    }

    /**
     * Sets the title
     *
     * @param string $title
     * @return void
     */
    public function setTitle($title): void
    {
        $this->title = $title;
    }

    /**
     * Returns the phone
     *
     * @return string $phone
     */
    public function getPhone()
    {
        return $this->phone;
    }

    /**
     * Sets the phone
     *
     * @param string $phone
     * @return void
     */
    public function setPhone($phone): void
    {
        $this->phone = $phone;
    }

    /**
     * Returns the fax
     *
     * @return string $fax
     */
    public function getFax()
    {
        return $this->fax;
    }

    /**
     * Sets the fax
     *
     * @param string $fax
     * @return void
     */
    public function setFax($fax): void
    {
        $this->fax = $fax;
    }

    /**
     * Returns the zip
     *
     * @return string $zip
     */
    public function getZip()
    {
        return $this->zip;
    }

    /**
     * Sets the zip
     *
     * @param string $zip
     * @return void
     */
    public function setZip($zip): void
    {
        $this->zip = $zip;
    }

    /**
     * Returns the city
     *
     * @return string $city
     */
    public function getCity()
    {
        return $this->city;
    }

    /**
     * Sets the city
     *
     * @param string $city
     * @return void
     */
    public function setCity($city): void
    {
        $this->city = $city;
    }

    /**
     * Returns the street
     *
     * @return string $street
     */
    public function getStreet()
    {
        return $this->street;
    }

    /**
     * Sets the street
     *
     * @param string $street
     * @return void
     */
    public function setStreet($street): void
    {
        $this->street = $street;
    }

    /**
     * Returns the number
     *
     * @return string $number
     */
    public function getNumber()
    {
        return $this->number;
    }

    /**
     * Sets the number
     *
     * @param string $number
     * @return void
     */
    public function setNumber($number): void
    {
        $this->number = $number;
    }

    /**
     * Returns the latitude
     *
     * @return string $latitude
     */
    public function getLatitude()
    {
        return $this->latitude;
    }

    /**
     * Sets the latitude
     *
     * @param string $latitude
     * @return void
     */
    public function setLatitude($latitude): void
    {
        $this->latitude = $latitude;
    }

    /**
     * Returns the longitude
     *
     * @return string $longitude
     */
    public function getLongitude()
    {
        return $this->longitude;
    }

    /**
     * Sets the longitude
     *
     * @param string $longitude
     * @return void
     */
    public function setLongitude($longitude): void
    {
        $this->longitude = $longitude;
    }

    /**
     * Adds a Company
     *
     * @param \Medienreaktor\Persons\Domain\Model\Company $company
     * @return void
     */
    public function addCompany($company): void
    {
        $this->company->attach($company);
    }

    /**
     * Removes a Company
     *
     * @param \Medienreaktor\Persons\Domain\Model\Company $companyToRemove The Company to be removed
     * @return void
     */
    public function removeCompany($companyToRemove): void
    {
        $this->company->detach($companyToRemove);
    }

    /**
     * Returns the company
     *
     * @return \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\Medienreaktor\Persons\Domain\Model\Company> company
     */
    public function getCompany()
    {
        return $this->company;
    }

    /**
     * Sets the company
     *
     * @param \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\Medienreaktor\Persons\Domain\Model\Company> company
     * @return void
     */
    public function setCompany(\TYPO3\CMS\Extbase\Persistence\ObjectStorage $company): void
    {
        $this->company = $company;
    }



    /**
     * Adds a Person
     *
     * @param \Medienreaktor\Persons\Domain\Model\Person $person
     * @return void
     */
    public function addPerson($person): void
    {
        $this->person->attach($person);
    }

    /**
     * Removes a Person
     *
     * @param \Medienreaktor\Persons\Domain\Model\Person $personToRemove The Person to be removed
     * @return void
     */
    public function removePerson($personToRemove): void
    {
        $this->person->detach($personToRemove);
    }

    /**
     * Returns the person
     *
     * @return \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\Medienreaktor\Persons\Domain\Model\Person> person
     */
    public function getPerson()
    {
        return $this->person;
    }

    /**
     * Sets the person
     *
     * @param \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\Medienreaktor\Persons\Domain\Model\Person> person
     * @return void
     */
    public function setPerson(\TYPO3\CMS\Extbase\Persistence\ObjectStorage $person): void
    {
        $this->person = $person;
    }








    /**
     * Adds a Location
     *
     * @param \Medienreaktor\Persons\Domain\Model\Location $location
     * @return void
     */
    public function addLocation($location): void
    {
        $this->location->attach($location);
    }

    /**
     * Removes a location
     *
     * @param \Medienreaktor\Persons\Domain\Model\Location $locationToRemove The Location to be removed
     * @return void
     */
    public function removeLocation($locationToRemove): void
    {
        $this->location->detach($locationToRemove);
    }

    /**
     * Returns the location
     *
     * @return \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\Medienreaktor\Persons\Domain\Model\Location> location
     */
    public function getLocation()
    {
        return $this->location;
    }

    /**
     * Sets the location
     *
     * @param \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\Medienreaktor\Persons\Domain\Model\Location> location
     * @return void
     */
    public function setLocation(\TYPO3\CMS\Extbase\Persistence\ObjectStorage $location): void
    {
        $this->location = $location;
    }

    /**
     * Returns the mail
     *
     * @return string $mail
     */
    public function getMail()
    {
        return $this->mail;
    }

    /**
     * Sets the mail
     *
     * @param string $mail
     * @return void
     */
    public function setMail($mail): void
    {
        $this->mail = $mail;
    }

    /**
     * Returns the image
     *
     * @return \TYPO3\CMS\Extbase\Domain\Model\FileReference $image
     */
    public function getImage()
    {
        return $this->image;
    }

    /**
     * Sets the image
     *
     * @param \TYPO3\CMS\Extbase\Domain\Model\FileReference $image
     * @return void
     */
    public function setImage(\TYPO3\CMS\Extbase\Domain\Model\FileReference $image): void
    {
        $this->image = $image;
    }




}
