This package provides a layer between the source of data and consumption. The idea is that if the database and other sources of data have the same interface, it will not matter what database -- or API -- the data comes from.
👀🌋 This Is A Module Of The Caldera Framework
-
🌋 Find Caldera Forms Here:
-
🌋 Issues and pull requests, should be submitted to the main Caldera repo.
This is used in the forms package for the database, but not for the REST API, which is a bad smell that needs corrected.
- Add to your package:
composer require calderawp/http
- Install for development:
git clone [email protected]:CalderaWP/http.git && composer install
use calderawp\DB\Factory;
use calderawp\interop\Attribute;
calderawp\interop\Collections\Attributes;
$tableName = 'cf_whatever';
$primaryKey = 'id';
$indexes = ['name'];
$tableSchema = $factory->tableSchema([], $tableName, $primaryKey, $indexes);
- Run unit tests and integration tests
composer tests
- Run unit tests
composer test:unit
- Run integration tests
composer test:integration
Copyright 2018+ CalderaWP LLC and licensed under the terms of the GNU GPL license. Please share with your neighbor.