PHP Classes

How to Use a PHP REST API Library to Implement an API that Uses the MVC Design Pattern Using the Package Web Service PHP MySQL: Implement an API using MySQL to store objects

Recommend this page to a friend!
  Info   Documentation   View files Files   Install with Composer Install with Composer   Download Download   Reputation   Support forum   Blog    
Last Updated Ratings Unique User Downloads Download Rankings
2024-11-20 (12 hours ago) RSS 2.0 feedNot yet rated by the usersTotal: Not yet counted Not yet ranked
Version License PHP version Categories
webservicephpmysql 1.0The PHP License5PHP 5, Web services, Design Patterns
Description 

Author

This package can implement an API using MySQL to store objects.

It provides a router class that can register URL patterns associated with controller classes.

The package can process the current request to check if the request URL matches any of the URL patterns, call the associated controller class to process the request, and generate the API call response.

Picture of António Lira Fernandes
Name: António Lira Fernandes <contact>
Classes: 12 packages by
Country: Portugal Portugal
Innovation award
Innovation award
Nominee: 3x

Winner: 2x

Documentation

routes

The goal of this package is to implement a routing mechanism to present beautiful URLs. With this mechanism, all requests are made in the public folder and then redirected to a specific file according to the route (URL) written.

version

Version 1.0 2023/03/06

install

  1. Copy all files to the website root.
  2. Update .htaccess for the actual configuration. Change line 3 to set for the url to public folder.

edit the routes file to match a route to a file. Each route or set of routes should correspond to a website service. In order to edit the routes.php file to make the correspondence you need to open the file and add the desired route and the corresponding service. For example, if you want to match the route "/my-route" to the "my-service" service, you can add the following line to the routes.php file:

Route::get('/my-route', 'MyService@index'); This will make it so that when a request is sent to the "/my-route" URL, the "MyService" service is invoked. You can also use route parameters and wildcards to make more complex matches. For more information on the routing system in PHP, please refer to the official documentation.


  Files folder image Files (42)  
File Role Description
Files folder imageapp (4 files)
Files folder imageclasses (1 file, 1 directory)
Files folder imageimage (5 files)
Files folder imagejson (4 files)
Files folder imagepublic (2 files)
Files folder imageroutes (1 file)
Files folder imagesrc (7 files, 1 directory)
Files folder imagetemplates (2 directories)
Accessible without login Plain text file .htaccess Data Auxiliary data
Accessible without login Plain text file autoload.php Aux. Auxiliary script
Accessible without login Plain text file bootstrap.php Example Example script
Accessible without login Plain text file config.php Aux. Configuration script
Accessible without login Plain text file PHP - Sistema de Rotas.pdf Data Auxiliary data
Accessible without login Plain text file README.md Doc. Documentation

  Files folder image Files (42)  /  app  
File Role Description
  Plain text file Controller.php Class Class source
  Plain text file ControllerCarros.php Class Class source
  Plain text file ControllerCarrosJSON.php Class Class source
  Plain text file Database.php Class Class source

  Files folder image Files (42)  /  classes  
File Role Description
Files folder imageauthentication (2 files)
  Accessible without login HTML file index.html Doc. Documentation

  Files folder image Files (42)  /  classes  /  authentication  
File Role Description
  Plain text file Authentication.php Class Class source
  Plain text file Users.php Class Class source

  Files folder image Files (42)  /  image  
File Role Description
  Accessible without login Image file carro1.png Icon Icon image
  Accessible without login Image file carro2.png Icon Icon image
  Accessible without login Image file carro3.png Icon Icon image
  Accessible without login Image file carro4.png Icon Icon image
  Plain text file ControllerCarros2.php Class Class source

  Files folder image Files (42)  /  json  
File Role Description
  Accessible without login Plain text file apiJson.php Aux. Configuration script
  Accessible without login Plain text file dados copy.json Data Auxiliary data
  Accessible without login Plain text file dados.json Data Auxiliary data
  Accessible without login Plain text file dadosOld.json Data Auxiliary data

  Files folder image Files (42)  /  public  
File Role Description
  Accessible without login Plain text file .htaccess Data Auxiliary data
  Accessible without login Plain text file index.php Aux. Configuration script

  Files folder image Files (42)  /  routes  
File Role Description
  Accessible without login Plain text file routes.php Example Example script

  Files folder image Files (42)  /  src  
File Role Description
Files folder imagehelpers (1 file)
  Plain text file Connection.php Class Class source
  Plain text file Dispacher.php Class Class source
  Plain text file Request.php Class Class source
  Plain text file Response.php Class Class source
  Plain text file Route.php Class Class source
  Plain text file RouteCollection.php Class Class source
  Plain text file Router.php Class Class source

  Files folder image Files (42)  /  src  /  helpers  
File Role Description
  Accessible without login Plain text file helper_routes.php Example Example script

  Files folder image Files (42)  /  templates  
File Role Description
Files folder imagebase (3 files)
Files folder imageErrors (4 files, 1 directory)

  Files folder image Files (42)  /  templates  /  base  
File Role Description
  Accessible without login HTML file index.html Doc. Documentation
  Accessible without login HTML file tabelaCarros.html Doc. Documentation
  Accessible without login HTML file timeline.html Doc. Documentation

  Files folder image Files (42)  /  templates  /  Errors  
File Role Description
Files folder imageimages (2 files)
  Accessible without login Plain text file erro401.php Aux. Configuration script
  Accessible without login Plain text file erro404.php Aux. Configuration script
  Accessible without login Plain text file estilo.css Data Auxiliary data
  Accessible without login HTML file index.html Doc. Documentation

  Files folder image Files (42)  /  templates  /  Errors  /  images  
File Role Description
  Accessible without login Image file 401.png Icon Icon image
  Accessible without login Image file 404.png Icon Icon image

The PHP Classes site has supported package installation using the Composer tool since 2013, as you may verify by reading this instructions page.
Install with Composer Install with Composer
 Version Control Unique User Downloads  
 100%
Total:0
This week:0