beecubu / php-foundation-api-rest-sqlite
API-REST Framework plugin for SQLite backend.
Installs: 1
Dependents: 0
Suggesters: 0
Security: 0
pkg:composer/beecubu/php-foundation-api-rest-sqlite
Requires
- php: >=8.4.0
- beecubu/php-foundation-api-rest: ^2.0
- beecubu/php-foundation-core: ^3.6
- beecubu/php-foundation-helpers: ^1.11
- beecubu/php-foundation-sqlite: ^1.0
This package is not auto-updated.
Last update: 2026-02-05 16:57:58 UTC
README
SQLite persistence plugin for php-foundation-api-rest. Provides repository implementations backed by SQLite and the bootstrap needed to register them.
What it provides
IUserRepositoryimplementation (UserDB)IPInfoCacheRepositoryimplementation (IPInfoCacheDB)RepositoryBootstrapto register both repositories
Installation
composer require beecubu/php-foundation-api-rest
composer require beecubu/php-foundation-api-rest-sqlite
Usage
1) Initialize repositories
use Beecubu\Foundation\ApiRest\SQLite\RepositoryBootstrap;
RepositoryBootstrap::init();
2) Configure SQLite storage
Ensure the SQLite file path used by your app is accessible and writable. The driver creates tables on demand.
3) Custom repositories (optional)
If you want to override the repositories:
use Beecubu\Foundation\ApiRest\Core\Persistence\RepositoryProvider;
use Beecubu\Foundation\ApiRest\SQLite\Core\Persistence\UserDB;
use Beecubu\Foundation\ApiRest\SQLite\Core\Persistence\IPInfoCacheDB;
RepositoryProvider::set(UserDB::current(), IPInfoCacheDB::current());
Notes
- The core package is database-agnostic.
- This plugin contains SQLite-specific repositories and query logic.