1. Go to this page and download the library: Download bitexpert/disco 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/ */
bitexpert / disco example snippets
$beanFactory = new \bitExpert\Disco\AnnotationBeanFactory(MyConfiguration::class);
\bitExpert\Disco\BeanFactoryRegistry::register($beanFactory);
use bitExpert\Disco\Annotations\Configuration;
/**
* @Configuration
*/
class MyConfiguration
{
}
use bitExpert\Disco\Annotations\Bean;
use bitExpert\Disco\Annotations\Configuration;
use bitExpert\Disco\Helper\SampleService;
/**
* @Configuration
*/
class MyConfiguration
{
/**
* @Bean
*/
public function mySampleService() : SampleService
{
return new SampleService();
}
}