Download the PHP package digitalbitlabs/simple-pi without Composer

On this page you can find all versions of the php package digitalbitlabs/simple-pi. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package simple-pi

Simple Pi

Simple Pi is a REST API micro framework developed in PHP. The sole purpose of this framework is give you ready to use simple API which allows you to have custom configuration, routes and database operations. To begin with using the framework, follow the steps given below:

Installation

To install Simple Pi, you need to have composer installed. If you don't grab it from https://getcomposer.org/download/

composer create-project digitalbitlabs/simple-pi my-app

This will create a directory my-app in your current folder with all the code necessary to run the API.

Setup env file

Enter my-app folder and rename the .env.example file to .env

Configure database and application

Customise the configuration parameters in .env file accordingly. You can also update the settings in config.php file placed inside app folder in the root directory of your application.

Setup application routes

Change or add app routes through routes.php file inside app folder in the root directory of your application.

Run the application

To run the app you just created run the following in your terminal from the root folder of your app.

php -S localhost:8000 -t public\

Controllers

Controllers are custom classes to group similar operations together. They can be created inside app\controllers classes. A Demo controller is already present in the repository code.

Database operations

Simple Pi uses PHP PDO objects to run database queries. Following drivers are supported as per the php.net documentation.

To perform a query simply add the lines at the top of your controller or routes.php file

use SimplePi\Framework\DB;

Then run the query and fetch results using DB::query()->result() function.

DB::query("SELECT * FROM foo")->result();

That's it. You get an array of your database table.

Credits

This framework is developed by Sanket Raut as a hobby project at Digitalbit Labs to write a bare metal framework that can be kept as simple as possible.


All versions of simple-pi with dependencies

PHP Build Version
Package Version
Requires php Version >7.0
digitalbitlabs/simple-pi-framework Version v2.*
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package digitalbitlabs/simple-pi contains the following files

Loading the files please wait ....