<?php
namespace App\Entity;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity(repositoryClass="App\Repository\RoomRepository")
*
* @ORM\Table(
* name="room",
* indexes={
*
* @ORM\Index(columns={"zipCode"})
* }
* )
*/
class Room implements \Stringable
{
/**
* @ORM\Id
*
* @ORM\Column(type="integer")
*
* @ORM\GeneratedValue(strategy="AUTO")
*/
protected $id;
/**
* @ORM\Column(type="string", length=255, unique=true)
*/
protected $name;
/**
* @ORM\Column(type="string", nullable=true)
*/
protected $localName;
/**
* @ORM\Column(type="string", length=255, unique=true)
*/
protected $code;
/**
* @ORM\Column(type="string", length=255)
*/
protected $street;
/**
* @ORM\Column(type="string", length=10)
*/
protected $zipCode;
/**
* @ORM\Column(type="string", length=255, unique=true)
*/
protected $city;
/**
* @ORM\Column(type="string", length=15, nullable=true)
*/
protected $phone;
/**
* @ORM\Column(type="string", length=15, nullable=true)
*/
protected $fax;
/**
* @ORM\Column(type="string", length=255, name="api_list", nullable=true)
*/
protected $apiList;
public function __toString(): string
{
return (string) $this->name;
}
/**
* Get id.
*
* @return int
*/
public function getId()
{
return $this->id;
}
/**
* Set name.
*
* @param string $name
*/
public function setName($name): void
{
$this->name = $name;
}
/**
* Get name.
*
* @return string
*/
public function getName()
{
return $this->name;
}
/**
* Set localName.
*/
public function setLocalName($localName): void
{
$this->localName = $localName;
}
/**
* Get localName.
*
* @return string
*/
public function getLocalName()
{
return $this->localName;
}
/**
* Set apiList.
*
* @param string $apiList
*/
public function setApiList($apiList): void
{
$this->apiList = $apiList;
}
/**
* Get apiList.
*
* @return string
*/
public function getApiList()
{
return $this->apiList;
}
/**
* Set code.
*
* @param code the value to set
*/
public function setCode($code): void
{
$this->code = $code;
}
/**
* Get code.
*
* @return code
*/
public function getCode()
{
return $this->code;
}
/**
* Set zipCode.
*
* @param string zipCode
*/
public function setZipCode($zipCode): void
{
$this->zipCode = $zipCode;
}
/**
* Get zipCode.
*
* @return zipCode
*/
public function getZipCode()
{
return $this->zipCode;
}
/**
* Set street.
*
* @param string street
*/
public function setStreet($street): void
{
$this->street = $street;
}
/**
* Get street.
*
* @return street
*/
public function getStreet()
{
return $this->street;
}
/**
* Set city.
*
* @param string city
*/
public function setCity($city): void
{
$this->city = $city;
}
/**
* Get city.
*
* @return city
*/
public function getCity()
{
return $this->city;
}
/**
* Set phone.
*
* @param string phone
*/
public function setPhone($phone): void
{
$this->phone = $phone;
}
/**
* Get phone.
*
* @return phone
*/
public function getPhone()
{
return $this->phone;
}
/**
* Set fax.
*
* @param string fax
*/
public function setFax($fax): void
{
$this->fax = $fax;
}
/**
* Get fax.
*
* @return fax
*/
public function getFax()
{
return $this->fax;
}
/**
* Temp method to streamline a bit while the whole room mess is fixed.
*/
public function isInternet()
{
return false !== stripos((string) $this->city, 'internet');
}
}