1. Go to this page and download the library: Download dastur/capsule 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/ */
namespace Package\Service
class Service
{
public $anotherService;
public $string;
public function __construct(AnotherService $anotherService, $string)
{
$this->anotherService = $anotherService;
$this->string = $string;
}
}
namespace Package\Service
class Service
{
public $router;
public $logger;
public function __construct(Router $router, Logger $logger)
{
$this->router = $router;
$this->logger = $logger;
}
}