PHP Classes

File: README.md

Recommend this page to a friend!
  Packages of Ramesh Narayan Jangid (Sharma)   Open Swoole Microservices   README.md   Download  
File: README.md
Role: Documentation
Content type: text/markdown
Description: Documentation
Class: Open Swoole Microservices
Implement microservices using Open Swoole
Author: By
Last change: refactor
Date: 3 days ago
Size: 4,711 bytes
 

Contents

Class file image Download

PHP low code API generator

This is a light & easy low code API generator using configuration arrays. It can be used to create API's in very short time once you are done with your database.

.env File

Configuration Rules

JavaScript Examples

SQL File

  • Sql/global.sql Import this SQL file on your MySql global instance
  • Sql/customer\_master.sql Import this SQL file on your MySql customer instance
  • Note: One can import both sql's in a single database to start with. Just configure the same details in the environment files.

Folders

File Folder

  • Config Basic configuration folder
  • File Folder for uploaded files.
  • Hook Hook.
  • Log Folder for application Log.
  • Supplement Customised coding for APIs
  • TestCase Folder for Test Cases
  • Validation Contains validation classes.

/File Folder

  • Dropbox/Public Uploaded files for open to web
  • Dropbox/Closed Uploaded files by authorised user
  • ServingFile/HTML HTML files to be served with dynamic response (XSLT)
  • ServingFile/PHP PHP view files to be served with dynamic response
  • ServingFile/XSLT XSLT files to be served with dynamic response

/Supplement Folder

  • Crons Contains classes for cron API's
  • Custom Contains classes for custom API's
  • ThirdParty Contains classes for third-party API's
  • Upload Contains classes for upload file API's

Route Folder

/Config/Route

  • /Config/Route/Private/<GroupName>
  • /Config/Route/Public
  • <GroupName> is the group user belongs to for accessing the API's

File

  • /GETroutes.php for all GET method routes configuration.
  • /POSTroutes.php for all POST method routes configuration.
  • /PUTroutes.php for all PUT method routes configuration.
  • /PATCHroutes.php for all PATCH method routes configuration.
  • /DELETEroutes.php for all DELETE method routes configuration.

Sql Folder

These files locations are used in routes config to be used for generating response.

/Config/Sql

  • /Config/Sql/Private/GlobalDB for global database.
  • /Config/Sql/Private/CustomerDB for customer (including all hosts and their databases).
  • /Config/Sql/Public for Public to Web API's (No Authentication).

File

  • /GET/<filenames>.php GET method SQL.
  • /POST/<filenames>;.php POST method SQL.
  • /PUT/<filenames>.php PUT method SQL.
  • /PATCH/<filenames>.php PATCH method SQL.
  • /DELETE/<filenames>.php DELETE method SQL.

One can replace <filenames> tag with desired name as per functionality.

Setting route CIDR

Below are route level CIDR settings for a set of system routes (starting / ending with)

`customer`.`cronRestrictedCidr` VARCHAR(250) DEFAULT '0.0.0.0/0'
`customer`.`customRestrictedCidr` VARCHAR(250) DEFAULT '0.0.0.0/0'
`customer`.`dropboxRestrictedCidr` VARCHAR(250) DEFAULT '0.0.0.0/0'
`customer`.`explainRestrictedCidr` VARCHAR(250) DEFAULT '0.0.0.0/0'
`customer`.`exportRestrictedCidr` VARCHAR(250) DEFAULT '0.0.0.0/0'
`customer`.`importSampleRestrictedCidr` VARCHAR(250) DEFAULT '0.0.0.0/0'
`customer`.`importRestrictedCidr` VARCHAR(250) DEFAULT '0.0.0.0/0'
`customer`.`reloadRestrictedCidr` VARCHAR(250) DEFAULT '0.0.0.0/0'
`customer`.`routesRestrictedCidr` VARCHAR(250) DEFAULT '0.0.0.0/0'
`customer`.`thirdPatyRestrictedCidr` VARCHAR(250) DEFAULT '0.0.0.0/0'
`customer`.`uploadRestrictedCidr` VARCHAR(250) DEFAULT '0.0.0.0/0'

Contributing

Issues and feature request are welcome.<br /> Feel free to share them on issues page

Author

  • Ramesh N. Jangid (Sharma)

Github: @polygoncoin

License

Copyright © 2026 Ramesh N. Jangid (Sharma).<br /> This project is MIT licensed.