kodi-app / kodi-pandabase-provider
KodiApp Pandabase provider
Installs: 23
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 2
Forks: 0
Open Issues: 0
pkg:composer/kodi-app/kodi-pandabase-provider
Requires
- php: ^7.0
- kodi-app/kodi-core: v0.9.*
- nagyatka/pandabase: v0.20.*
Requires (Dev)
- phpunit/phpunit: 5.4.8
This package is not auto-updated.
Last update: 2025-10-04 06:49:42 UTC
README
ServiceProvider for KodiApp which provides Pandabase ORM.
Installation
$ composer require kodi-app/kodi-pandabase-provider
About PandaBase
Check the official documentation (It supports PandaBase version v0.20.0 or above)
Initialization of PandaBaseProvider
Initialization of one connection:
$application->run([ // ... KodiConf::SERVICES => [ // List of Services [ "class_name" => PandaBaseProvider::class, "parameters" => [ "name" => "test_connection", // Connection's name. "driver" => "mysql", // Same as PDO parameter "dbname" => "test_dbname", // Same as PDO parameter "host" => "127.0.0.1", // Same as PDO parameter "user" => "root", // Same as PDO parameter "password" => "" // Same as PDO parameter "attributes"=> [ attributeName => value, ... ] // Optional, PDO attributes ] ] // ... ], // ... ]);
Usage of Pandabase
// You can get ConnectionManager via Application singleton instance $db = Application::get("db"); // Or you can get it via ConnectionManager singleton instance $db = ConnectionManager::getInstance();