Skip to content

Instantly share code, notes, and snippets.

View kajnelissen's full-sized avatar

Kaj Nelissen kajnelissen

View GitHub Profile
@kajnelissen
kajnelissen / BookingService.php
Last active October 13, 2024 16:45
Constructor Injection in CodeIgniter controllers. Also resolves nested dependencies.
<?php namespace Nelissen\LooseCI\Services;
use Nelissen\LooseCI\Repositories\Room\RoomRepositoryInterface;
use Nelissen\LooseCI\Repositories\Booking\BookingRepositoryInterface;
use Nelissen\LooseCI\Repositories\Booker\BookerRepositoryInterface;
use Nelissen\LooseCI\Models\Room;
use Nelissen\LooseCI\Models\Booker;
use Nelissen\LooseCI\Exceptions\BookingExceedsRoomCapacityException;
/**