100 lines
1.8 KiB
PHP
100 lines
1.8 KiB
PHP
<?php
|
|
|
|
namespace App\BusProNet\Model;
|
|
|
|
class Pickup
|
|
{
|
|
private ?int $id = null;
|
|
private ?int $busProId = null;
|
|
private ?string $code = null;
|
|
private ?string $city = null;
|
|
private ?string $street = null;
|
|
private ?string $time = null;
|
|
|
|
public static function fromArray(array $data): static
|
|
{
|
|
$instance = new static();
|
|
$instance
|
|
->setId($data['busProId'])
|
|
->setCode($data['code'] ?? null)
|
|
->setCity($data['city'])
|
|
->setStreet($data['street'])
|
|
->setTime($data['time'])
|
|
;
|
|
|
|
return $instance;
|
|
}
|
|
|
|
public function getId(): ?int
|
|
{
|
|
return $this->id;
|
|
}
|
|
|
|
public function setId(?int $id): static
|
|
{
|
|
$this->id = $id;
|
|
|
|
return $this;
|
|
}
|
|
|
|
public function getBusProId(): ?int
|
|
{
|
|
return $this->busProId;
|
|
}
|
|
|
|
public function setBusProId(?int $busProId): static
|
|
{
|
|
$this->busProId = $busProId;
|
|
|
|
return $this;
|
|
}
|
|
|
|
public function getCode(): ?string
|
|
{
|
|
return $this->code;
|
|
}
|
|
|
|
public function setCode(?string $code): static
|
|
{
|
|
$this->code = $code;
|
|
|
|
return $this;
|
|
}
|
|
|
|
public function getCity(): ?string
|
|
{
|
|
return $this->city;
|
|
}
|
|
|
|
public function setCity(?string $city): static
|
|
{
|
|
$this->city = $city;
|
|
|
|
return $this;
|
|
}
|
|
|
|
public function getStreet(): ?string
|
|
{
|
|
return $this->street;
|
|
}
|
|
|
|
public function setStreet(?string $street): static
|
|
{
|
|
$this->street = $street;
|
|
|
|
return $this;
|
|
}
|
|
|
|
public function getTime(): ?string
|
|
{
|
|
return $this->time;
|
|
}
|
|
|
|
public function setTime(?string $time): static
|
|
{
|
|
$this->time = $time;
|
|
|
|
return $this;
|
|
}
|
|
}
|