Download the PHP package purpleharmonie/dependency-injection without Composer

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

Purple Framework Documentation

Table of Contents

  1. Introduction
  2. Core Components
  3. Dependency Injection Container
  4. Kernel
  5. Service Management
  6. Event System
  7. Kernel Extensions
  8. Configuration Management
  9. Caching
  10. Service Discovery
  11. Compiler Passes
  12. Error Handling

Introduction

Purple is a comprehensive PHP framework designed to provide a robust foundation for building scalable and maintainable applications. It features a powerful dependency injection container, modular architecture, and various tools to enhance development productivity. Inspired by popular frameworks like Symfony but with its own unique features. It provides a flexible and extensible way to manage dependencies and services in PHP applications. NOTE STILL UNDER DEVELOPMENT BUT CAN BE USED IN APPLLICATIONS.

Installation

You can install PHP Container via Composer. Run the following command in your terminal:

Core Components

Dependency Injection Container

The heart of the Purple framework, managing service instantiation and dependencies.

Features:

Kernel

Manages the application's lifecycle and bootstraps the framework.

Features:

Service Management

Service Registration

Service Configuration

New Methods

Event System

Allows hooking into various points of the application lifecycle.

Features:

Kernel Extensions

Modular way to extend and configure the kernel and container.

Features:

Configuration Management

Caching

Service Discovery

Automatic discovery and registration of services based on directory structure and namespaces.

Service Tracking

Monitors service usage and implements basic garbage collection:

Compiler Passes

Custom logic for modifying container configuration before it's compiled. view usage examples below and the examples folder

Features:

Error Handling

Customizable error handling and logging system.


This documentation provides an overview of the main features and components of the Purple framework. For detailed usage instructions and advanced configurations, please refer to the specific component documentation or code examples.

USAGE EXAMPLES

EventDispatcherInterface:

Defines methods for dispatching events and adding listeners. The example implementation allows adding listeners with priorities and dispatching events to all registered listeners.

KernelExtensionInterface:

Defines a load method that extensions use to configure the container. The example DatabaseExtension shows how you might set up a database connection service.

bindIf() usage:

Allows setting a default implementation that won't be overwritten if already defined. In the example, we set a FileLogger as the default, and a subsequent attempt to bind a ConsoleLogger doesn't overwrite it.

callable() usage:

Allows defining a service using a callable factory. In the example, we define a Mailer service that depends on other services from the container.

Decorator Usage

Alias Usage

The setAlias() method in Container now automatically sets the alias as public.

Middleware Usage

middleware interface

Annotation Directory Scanner Usage

General examples


All versions of dependency-injection with dependencies

PHP Build Version
Package Version
No informations.
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 purpleharmonie/dependency-injection contains the following files

Loading the files please wait ....