#Install git clone https://github.com/stvkoch/RepApify.git cd RespApify composer install
php -S localhost:8080 -t ./src/public/
- in SourceSimpleAll return data from connection insted of SQL
- Middleware ParseQuery try find especific interpreter for the "table"
- default use Interpreter\SimpleQuery
- all interpreter should be return a query where "repository/source" can call
- After interpreter make a query, app pass to next middleware, until run the route.
- The route call 'middleware RetrieveData':
- first "retrieveData" try find aproprieate "repository/source" for the "table"
- default source is "repository\SourceSimpleAll"
- source is call and retrieve data using query interpreted
- first "retrieveData" try find aproprieate "repository/source" for the "table"
- after source return data and assign response, all middleware will be reactivated to process the data received
- you can create a middleware where remove sensiveData, or save on cache....
PRAGMA foreign_keys = off; BEGIN TRANSACTION;
-- Table: addresses CREATE TABLE addresses (idCustomer INTEGER REFERENCES customers (idCustomer) ON DELETE CASCADE, address VARCHAR (255), email VARCHAR (255)) INSERT INTO addresses (idCustomer, address, email) VALUES (1, 'rua X', 'testeete');
-- Table: customers CREATE TABLE customers (idCustomer INTEGER PRIMARY KEY, name VARCHAR (255) NOT NULL, email VARCHAR (255) NOT NULL) INSERT INTO customers (idCustomer, name, email) VALUES (1, 'Mare Willins', 'marewilli@mail.com'); INSERT INTO customers (idCustomer, name, email) VALUES (2, 'John Wets', 'johnwtes@mail.com'); INSERT INTO customers (idCustomer, name, email) VALUES (3, 'Marc Leoye', 'marc@mail.com');
COMMIT TRANSACTION;