. */ namespace SP\Repositories; use SP\Core\Context\ContextInterface; use SP\Storage\Database\Database; /** * Class Repository * * @package SP\Repositories */ abstract class Repository { /** * @var ContextInterface */ protected $context; /** * @var Database */ protected $db; /** * Repository constructor. * * @param Database $database * @param ContextInterface $session */ final public function __construct(Database $database, ContextInterface $session) { $this->db = $database; $this->context = $session; if (method_exists($this, 'initialize')) { $this->initialize(); } } }