Download the PHP package designcise/bitframe without Composer

On this page you can find all versions of the php package designcise/bitframe. 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 bitframe

CI Maintainability Test Coverage

BitFrame PHP Microframework

A highly customizable PSR-15 / PSR-7 compatible middleware-based microframework for PHP that comes bundled with a simple PSR-11 based DI container for sharing services and data across the application. It is:

  1. Easy-to-learn and intuitive;
  2. Standards-based;
  3. Simple by design;
  4. Free of unnecessary bloat;
  5. Non-intrusive;
  6. Customizable, modular and easy-to-scale.

Prerequisites

  1. PHP 8.2+;
  2. Server with URL Rewriting (such as Apache, Nginx, etc.).

How to Get Started?

You can get started in a few simple steps:

  1. Setup your environment;
  2. Install composer dependencies;
  3. Create your first "Hello World" app.

For a complete example, have a look at the simple dockerized boilerplate.

1. Setup Your Environment

You can refer to the following minimal Apache and Nginx configurations to get started:

Apache

Create an .htaccess file with at least the following code:

This sets the directive in Apache to redirect all Http requests to a front controller index.php file in which you can write your main application code.

Nginx

A configuration like the following in Nginx will help you set the directive to rewrite path to your application front controller (i.e. index.php):

Remember to make changes according to your project setup. For example, ensure that listen, root, fastcgi_pass, *_log, etc. are setup correctly according to your project.

2. Install Composer Dependencies

You can use composer require like so:

Or, alternatively, you can add the package dependency in your composer.json file.

Please note that you must include a PSR-17 factory in your composer dependencies. nyholm/psr7 and guzzle/psr7 are good examples of these — if you include either of these, they're automatically picked up by BitFrame. For any other PSR-17 factory implementation, you can add it add via \BitFrame\Factory\HttpFactory::addFactory() method before you instantiate \BitFrame\App.

3. Create Your First "Hello World" App

If you have ever used a middleware based framework, you will feel at ease. A "Hello World" app would look something like the following:

From the code above you can see that the application uses two middlewares:

  1. A PSR-15 middleware \BitFrame\Emitter\SapiEmitter (that comes bundled with BitFrame package) which allows to emit the HTTP Response to the requesting user-agent (such as a web browser);
  2. A closure middleware used to write Hello World! to the HTTP response stream.

This is of course a very basic example. In a real-world application, the setup would be much more complex than this. For example, you could extend the functionality by using an additional PSR-15 middleware such as a router, error handler, etc. For suggestions on how to go about designing your application (and to get started quickly), have a look at the simple dockerized boilerplate example.

Tests

To run the tests you can use the following commands:

Command Type
composer test PHPUnit tests
composer style CodeSniffer
composer style-fix CodeSniffer Fixer
composer md MessDetector
composer check PHPStan

Contributing

Please see CONTRIBUTING for details.

License

Please see License File for licensing information.


All versions of bitframe with dependencies

PHP Build Version
Package Version
Requires php Version >=8.2
ext-json Version *
psr/container Version ^2.0
psr/http-message Version ^2.0
psr/http-factory Version ^1.0
psr/http-server-middleware Version ^1.0
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 designcise/bitframe contains the following files

Loading the files please wait ....