public function isBookingStillAvailable() { $searchEngine = new SearchEngine($this->searchCriteria); $availableRooms = $searchEngine->runSearchForRoom($this->room->id); if ($availableRooms == null) { $this->errors = $searchEngine->errors; return false; } $roomCount = sizeof($availableRooms); return $roomCount > 0; }