1. Go to this page and download the library: Download decodelabs/monarch 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/ */
use DecodeLabs\Monarch;
Monarch::$paths->alias('@components', '@root/components');
Monarch::$paths->alias('@assets', '@root/assets');
use DecodeLabs\Monarch;
$path = Monarch::$paths->resolve('@components/MyComponent.php');
// /var/www/my-cool-app/components/MyComponent.php
use DecodeLabs\Monarch;
use DecodeLabs\Pandora\Container;
if(Monarch::$container instanceof Container) {
Monarch::$container->bind('myService', new MyService());
}
use DecodeLabs\Monarch;
$service = Monarch::$container->get('myService');
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.