for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Timegridio\Concierge\Calendar;
class Calendar
{
protected $strategy;
public function __construct($strategyName, $vacancies, $timezone = null)
switch ($strategyName) {
case 'timeslot':
$this->strategy = new TimeslotCalendar($vacancies, $timezone);
break;
case 'dateslot':
$this->strategy = new DateslotCalendar($vacancies, $timezone);
default:
// Throw exception
}
public function __call($name, $arguments)
if(method_exists($this->strategy, $name))
return $this->strategy->$name($arguments);
return false;