<?php
|
namespace JVBase\managers\SEO\render\Traits\_Properties;
|
|
if (!defined('ABSPATH')) {
|
exit;
|
}
|
trait acceptsReservationsTrait {
|
/**
|
* @var bool|string Indicates whether a FoodEstablishment accepts reservations. Values can be Boolean, an URL at which reservations can be made or (for backwards compatibility) the strings Yes or No.
|
*/
|
protected bool|string $acceptsReservations;
|
|
public function getAcceptsReservations():bool|string|null
|
{
|
return $this->acceptsReservations??null;
|
}
|
public function setAcceptsReservations(bool|string $acceptsReservations):void
|
{
|
if (is_string($acceptsReservations)) {
|
if (!filter_var($acceptsReservations, FILTER_VALIDATE_URL)) {
|
error_log('[SEO] AcceptsReservations must be a URL pointing to where reservations can be made, or a boolean value.');
|
return;
|
}
|
}
|
$this->acceptsReservations = $acceptsReservations;
|
}
|
}
|