workshop-gitlab-acceptance/localPackages/example_extension/Classes/Domain/Model/Address.php

120 lines
2.4 KiB
PHP

<?php
namespace Workshop\ExampleExtension\Domain\Model;
/*
* Copyright (C) 2018 Daniel Siepmann <coding@daniel-siepmann.de>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
* 02110-1301, USA.
*/
use TYPO3\CMS\Extbase\DomainObject\AbstractEntity;
class Address extends AbstractEntity
{
/**
* @var string
* @validate NotEmpty
*/
protected $companyName;
/**
* @var string
*/
protected $street;
/**
* @var string
*/
protected $houseNumber;
/**
* @var string
* @validate RegularExpression(regularExpression = '/^[0-9]{5}$/')
*/
protected $zip;
/**
* @var string
*/
protected $city;
/**
* @var string
*/
protected $country;
public function setCompanyName(string $companyName)
{
$this->companyName = $companyName;
}
public function getCompanyName(): string
{
return $this->companyName;
}
public function setStreet(string $street)
{
$this->street = $street;
}
public function getStreet(): string
{
return $this->street;
}
public function setHouseNumber(string $houseNumber)
{
$this->houseNumber = $houseNumber;
}
public function getHouseNumber(): string
{
return $this->houseNumber;
}
public function setZip(string $zip)
{
$this->zip = $zip;
}
public function getZip(): string
{
return $this->zip;
}
public function setCity(string $city)
{
$this->city = $city;
}
public function getCity(): string
{
return $this->city;
}
public function setCountry(string $country)
{
$this->country = $country;
}
public function getCountry(): string
{
return $this->country;
}
}