Download the PHP package symlex/di-microkernel without Composer

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

Micro-Kernel for PHP Applications

Latest Stable Version License Test Coverage Build Status Documentation

This library contains a micro-kernel for bootstrapping almost any PHP application, including Silex, Symlex (a framework stack for agile Web development based on Symfony) and Symfony Console. The kernel itself is just a few lines to set a bunch of environment parameters and create a service container instance with that.

Micro-Kernel Architecture

Run an App

Creating a kernel instance and calling run() is enough to start an application:

Configuration

YAML files located in config/ configure the application and all of it's dependencies as a service. The filename matches the application's environment name (e.g. config/console.yml). The configuration can additionally be modified for sub environments such as local or production by providing a matching config file like config/console.local.yml (see app.sub_environment parameter). These files are in the same well documented format you might know from Symfony:

This provides a uniform approach for bootstrapping Web applications like Silex\Application, Symlex\Application\Web or command-line applications like Symfony\Component\Console\Application using the same kernel. The result is much cleaner and leaner than the usual bootstrap and configuration madness you know from many frameworks.

Parameters

The kernel sets a number of default parameters that can be used for configuring services. The default values can be changed via setter methods of the kernel or overwritten/extended by container config files and environment variables (e.g. url: '%env(DATABASE_URL)%').

Parameter Getter method Setter method Default value
app.name getName() setName() 'Kernel'
app.version getVersion() setVersion() '1.0'
app.environment getEnvironment() setEnvironment() 'app'
app.sub_environment getSubEnvironment() setSubEnvironment() 'local'
app.debug isDebug() setDebug() false
app.charset getCharset() setCharset() 'UTF-8'
app.path getAppPath() setAppPath() './'
app.config_path getConfigPath() setConfigPath() './config'
app.base_path getBasePath() setBasePath() '../'
app.storage_path getStoragePath() setStoragePath() '../storage'
app.log_path getLogPath() setLogPath() '../storage/log'
app.cache_path getCachePath() setCachePath() '../storage/cache'
app.src_path getSrcPath() setSrcPath() '../src'

Customization

The kernel base class can be extended to customize it for a specific purpose such as long running console applications:

Caching

If debug mode is turned off, the service container configuration is cached by the kernel in the directory set as cache path. You have to delete all cache files after updating the configuration. To disable caching completely, add container.cache: false to your configuration parameters:

Composer

To use this library in your project, simply run composer require symlex/di-microkernel or add "symlex/di-microkernel" to your composer.json file and run composer update:

About

DIMicroKernel is maintained by Michael Mayer. Feel free to send an e-mail to [email protected] if you have any questions, need commercial support or just want to say hello. We welcome contributions of any kind. If you have a bug or an idea, read our guide before opening an issue.


All versions of di-microkernel with dependencies

PHP Build Version
Package Version
Requires php Version >=7.1
symfony/dependency-injection Version ^4.0
symfony/yaml Version ^4.0
psr/container Version *
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 symlex/di-microkernel contains the following files

Loading the files please wait ....