Download the PHP package iviphp/framework without Composer

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

Ivi Framework

Application bootstrapping, service providers, dependency coordination and console integration for the IviPHP ecosystem.

iviphp/framework provides the central runtime used to assemble an IviPHP application. It coordinates the service container, configuration, bootstrap operations, service providers and console commands through a small framework-independent API.

Requirements

Installation

Features

Core components

Application

Application represents the running application.

It manages:

FrameworkManager

FrameworkManager coordinates the application and console runtime.

It provides the main management API for:

Framework

Framework is the public application-facing API.

It wraps FrameworkManager and exposes a compact interface for normal framework usage.

Bootstrapper

Bootstrapper stores named application initialization callbacks and executes them in registration order.

ServiceProvider

ServiceProvider is the reusable base class for framework service providers.

Concrete providers implement service registration and may optionally perform boot-time initialization.

Creating a framework application

The base path must reference an existing directory.

Starting the framework

Starting the framework performs two stages:

  1. application bootstrap operations;
  2. service-provider booting.

Repeated calls to start() do not execute completed lifecycle stages again.

Application lifecycle

The application lifecycle follows this order:

Bootstrap callbacks execute before service providers are booted.

Provider registration happens when the provider is added to the application.

Application base path

Resolve a path relative to the application base directory:

Example result:

Passing an empty string returns the application base path:

Absolute paths are rejected.

Paths containing parent-directory traversal are also rejected:

Application environment

Create an application for a specific environment:

Retrieve the environment:

Check one environment:

Check several environments:

Change the environment before bootstrapping:

The environment cannot be changed after application bootstrapping begins.

Service container

Retrieve the application container:

Resolve a service:

Check whether a service exists:

The framework automatically registers several core services.

Configuration

Retrieve the application configuration service:

The returned object is the Ivi\Config\Config instance registered in the application container.

A custom configuration object may be supplied during creation:

Custom container

A custom container instance may be supplied:

The framework registers its core services in the supplied container.

Bootstrap operations

Register a named bootstrap callback:

Register another operation:

Bootstrap operations execute in registration order.

Replacing a bootstrap operation

The named operation must already exist when calling Bootstrapper::replace() directly.

Accessing the bootstrapper

List registered operation names:

List completed operations:

Check whether an operation exists:

Check whether an operation completed:

Inspect the current operation during bootstrap:

Creating a service provider

Extend the base service-provider class:

Registering a provider

Register a provider class:

The framework creates the provider by passing the application instance to its constructor.

Register a provider instance:

A provider cannot belong to another application instance.

Registering multiple providers

Providers are registered in the supplied order.

They are also booted in registration order.

Provider lifecycle

A service provider has two lifecycle stages.

Registration

Registration should define:

Registration happens immediately when the provider is added to the application.

Booting

Booting happens after application bootstrap operations complete.

At boot time, providers may safely coordinate services registered by other providers.

Provider state

Retrieve a provider:

Check its lifecycle state:

The base ServiceProvider class also exposes:

Provider service declarations

Providers may declare the services they supply:

Retrieve declared services:

Check one service:

Find all providers declaring a service:

Service declarations are intended for diagnostics and framework introspection.

They do not automatically register container bindings.

Checking registered providers

Return all registered providers:

Return the provider count:

Manual bootstrap and boot

Bootstrap without booting providers:

Boot providers:

Calling boot() before bootstrap() automatically bootstraps the application first.

Check lifecycle state:

Console integration

The framework integrates iviphp/console.

Retrieve the console API:

Retrieve the console manager:

Registering a console command

Registering command objects

Register several commands:

Replace commands with matching names:

Inspecting console commands

Check whether a command exists:

Return all commands:

Exclude hidden commands:

Return the number of registered commands:

Running the console application

The framework is started before console execution.

A minimal bin/console file may look like this:

Make the file executable:

Run it:

Executing custom console input

execute() starts the framework and executes the supplied input without using the console manager's automatic exception handling.

Accessing the application

Access it through the public contract:

The application contract exposes:

Using Application directly

The higher-level Framework API is recommended, but Application may also be used directly.

Using FrameworkManager directly

Exceptions

Framework lifecycle failures are represented by:

Examples include:

Exception context contains safe diagnostic metadata such as:

It should not contain service values, configuration secrets or request data.

Lifecycle restrictions

To keep framework state predictable:

Complete example

Design principles

iviphp/framework follows these principles:

License

Ivi Framework is open-source software released under the MIT License.

Maintainer

Maintained by Gaspard Kirira and Softadastra.


All versions of framework with dependencies

PHP Build Version
Package Version
Requires php Version >=8.2
iviphp/config Version ^0.1
iviphp/console Version ^0.1
iviphp/container Version ^0.1
iviphp/contracts Version ^0.1
iviphp/debug Version ^0.1
iviphp/http Version ^0.1
iviphp/support Version ^0.1
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 iviphp/framework contains the following files

Loading the files please wait ...