Download the PHP package weew/kernel without Composer

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

PHP Kernel

Build Status Code Quality Test Coverage Version Licence

Table of contents

Installation

composer require weew/kernel

Introduction

Kernel is responsible for the bootstrap process of service providers. It offers you a easy and intuitive way to register your own providers. The boot process consists of three steps - instantiation, initialization and booting. There is also an additional step - shutdown. This gives your providers a lot of flexibility on when to do what.

Usage

Creating a provider

Any class can be used as a provider. If the provider has any of these methods configure, initialize, boot, shutdown, the container will invoke them accordingly. It does not require a specific interface. This is by choice, I'll explain why I chose this solution in one of the future readme updates.

Registering providers

It is fairly easy to create a kernel and register your own providers.

Configuration

When you configure the kernel, all of its service providers get instantiated and configured.

Initialization

When you initialize the kernel, all of its service providers get initialized.

Booting

On boot, all service providers will be booted. This is a good place to setup your provider and do some work.

Shutdown

This will shutdown the kernel and all of its providers.

Extension

The kernel comes without a container. Out of the box the service providers will be very limited since they have no way to share anything. There are several workarounds for this.

Sharing data between providers

The easiest way to share data between providers is to use kernel's shared arguments.

Custom container support

A better way to enable container access for your providers is to replace the default implementation of the IProviderInvoker with your own. In this example I'll be using this powerful container.

From now on all providers will benefit from constructor and method injection and will be able to share anything in the container. Depending on which container package you use the IProviderInvoker implementation may vary, but the idea stays the same.

Existing container integrations

There is an integration available for the weew/container container. See weew/kernel-container-aware.

Related projects


All versions of kernel with dependencies

PHP Build Version
Package Version
Requires weew/helpers-string Version ^1.0
weew/collections 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 weew/kernel contains the following files

Loading the files please wait ....