src/Timetable/Timetable.php
public function capacity($date, $time, $service, $capacity = null)
    {
        $path = $this->dimensions(compact('date', 'service', 'time'));

        return $capacity === null
            ? $this->array_get($this->timetable, $path)
            : $this->array_set($this->timetable, $path, $capacity);
    }
public function capacity($date, $time, $service, $capacity = null)
    {
        $path = $this->dimensions(compact('date', 'service', 'time'));

        return $capacity === null
            ? $this->array_get($this->timetable, $path)
            : $this->array_set($this->timetable, $path, $capacity);
    }
public function capacity ( $ date , $ time , $ service , $ capacity = null ) { $ path = $ this -> dimensions ( compact ( 'date' , 'service' , 'time' ) ) ; return $ capacity === null ? $ this -> array_get ( $ this -> timetable , $ path ) : $ this -> array_set ( $ this -> timetable , $ path , $ capacity ) ; }
Set the capacity for a slot.

@param  string $date
@param  string $time
@param  string $service
@param  int $capacity

@return int
Set the capacity for a slot .