1. Go to this page and download the library: Download hatem-azzouzi/z-di library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
shell
$ cd tests/injection
$ php index.php config=injection
bootstrapping..
get Client definition
send function call
ZDI\tests\injection\Email instantiated: email
ZDI\tests\injection\Client instantiated: client
ZDI\tests\injection\Email email sent: a test message
shell
$ cd tests/ignition
$ php index.php config=lazy
bootstrapping..
get ClassA definition
foo function call
ZDI\tests\ignition\ClassA instantiated: hello
ZDI\tests\ignition\ClassA function called: bar
shell
$ cd tests/ignition
$ php index.php config=eager
bootstrapping..
ZDI\tests\ignition\ClassA instantiated: hello
get ClassA definition
foo function call
ZDI\tests\ignition\ClassA function called: bar
shell
$ cd tests/ignition
$ php index.php
bootstrapping..
get ClassA definition
foo function call
ZDI\tests\ignition\ClassA instantiated: foo
ZDI\tests\ignition\ClassA function called: bar
shell
$ cd tests/ignition
$ php index.php config=dev
bootstrapping..
get ClassA definition
foo function call
ZDI\tests\ignition\ClassB instantiated: foo
ZDI\tests\ignition\ClassB function called: bar
shell
$ cd tests/ignition
$ php index.php config=prod
bootstrapping..
get ClassA definition
foo function call
ZDI\tests\ignition\ClassC instantiated: foo 1
ZDI\tests\ignition\ClassC function called: bar
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.