Download the PHP package luna-fw/djinn without Composer

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

Djinn - DI Container

Build Status Latest Stable Version Total Downloads License

Djinn is a full featured DI container for PHP. We call it Djinn, because a DI container is pretty much as a Djinn: It grants wishes (dependencies) to his master (the caller).

Install

The package must be installed using composer:

Or include luna-fw/djinn on your composer.json dependencies.

Usage

This package implements the PSR-11 interfaces and Exceptions:

For further details, please refer to: https://www.php-fig.org/psr/psr-11/

We consider the PSR-11 specification too much simple, so we added some additional interfaces to the implementation (those extended implementations don't prevent someone to use the container as a PSR-11 compatible container).

Here are the extended interfaces:

To use it, you need to have the vendor/autoload.php file included. Then all you have to do is to instantiate the Luna\Djinn class and star using it.

This is the simplest use of the DI container. In a practical environment, you'll want to split all the config for the container on a specific file (like dependencies.php, or something like that), and you'll try to push all the calls to the container methods to the "borders" of the system (probably to the router), since PSR-11 recommends to don't pass the container object inside other objects.

Pay attention that we always have two steps on the resolution:

  1. Configure the container, letting him know how it should resolve your dependencies.
  2. Use the container

Some important considerations:

Configuration/Binding Examples

Simple binding:

Binding a singleton (the same, but Djinn will always return the same object):

Binding interfaces to implementations:

Contextual binding (lets say that you want to upload photos to google photos and videos to youtube):

Binding a primitive (and running a method):

To get more examples on this container usage, please refer to the tests under tests folder.

Testing

To run the tests on the package, first run composer install, and then go to the root folder, and run one of the commands below:

On Linux/Unix:

On Windows:

Or even (any platform):

You can use all the phpunit options.

Contribute

Luna framework is still a very premature project. I just started, and I'm alone so far.

If you want to contribute, contact me at [email protected], and we can discuss how you can help.

Right now, we don't have any process defined for pull requests, so you can help me to define the process and be part of it.


All versions of djinn 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 luna-fw/djinn contains the following files

Loading the files please wait ....