Download the PHP package headio/phalcon-bootstrap without Composer

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

Phalcon application bootstrap

A flexible application bootstrap for Phalcon-based projects

Build Status Coverage Status

Description

This library provides flexible application bootstrapping, encapsulating module registration (or handler registration for micro applications), event management and middleware logic assignment for mvc, micro and cli-based applications. A simple factory instantiates the dependency injection container, encapsulating the registration of service dependency definitions defined in the configuration setttings.

Dependencies

See composer.json for more details

Installation

Composer

Open a terminal window and run:

Usage

Micro applications (Api, prototype or micro service)

First create a config definition file inside your Phalcon project. This file should include the configuration settings, service & middleware definitions and a path to your handlers.

To get started, let's assume the following project structure:

and your PSR-4 autoload declaration is:

Create a config file Config.php inside the Config directory and copy-&-paste the following definition:

The handlerPath declaration must include your handlers; the best strategy is to utilize Phalcon collections. The contents of this file might look something like this:

Now, create an index file inside the public directory and copy-&-paste the following:

Finally, paste the following bootstrap code inside the Boot.php file:

Mvc applications

Create a config definition file inside your Phalcon project. This file should include your configuration settings and service & middleware definitions.

Let's assume the following mvc project structure:

and your PSR-4 autoload declaration is:

Create a config file Config.php inside the Config directory and copy-&-paste the following definition:

Now, create an index file inside the public directory and paste the following:

Finally, paste the following bootstrap code inside the Boot.php file:

Console application

Create a config definition file inside your Phalcon project. This file should include your configuration settings and service & middleware definitions.

Let's assume the following project structure:

and your PSR-4 autoload declaration is:

Create a config file Config.php inside the Config directory and copy-&-paste the following definition:

Finally, paste the following bootstrap code inside the Cli.php file:

DI container factory

From the examples above you will have noticed that we instantiated Phalcon's factory default mvc or cli container services.

Naturally, you can override the factory default services by simply defining a service definition in your config file, like so:

Then create the respective service provider and modify its behaviour:

For complete control over the registration of service dependencies, or more generally, the services available in the container, you have two options: firstly, you can use Phalcon's base DI container, which is an empty container; or you can create your own DI container by implementing Phalcon's Phalcon\Di\DiInterface. See the following for an example:

The DI factory create method expects an instance of Phalcon\Di\DiInterface.

Application factory

The bootstrap factory will automatically instantiate a Phalcon application and return the response. If you want to bootstrap the application yourself, you can use the application factory directly.

Testing

To see the tests, run:

License

Phalcon bootstrap is open-source and licensed under MIT License.


All versions of phalcon-bootstrap with dependencies

PHP Build Version
Package Version
Requires php Version >=8.0
ext-mbstring Version *
ext-phalcon Version >= 5.0.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 headio/phalcon-bootstrap contains the following files

Loading the files please wait ....