for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
declare(strict_types=1);
namespace BEAR\Resource\Module;
use BEAR\Resource\Annotation\AppName;
use Override;
use Ray\Di\AbstractModule;
/**
* Provides ResourceInterface and derived bindings
*
* The following module is installed:
* AppName
* ResourceClientModule
* AnnotationModule
* EmbedResourceModule
* HttpClientModule
*/
final class ResourceModule extends AbstractModule
{
/** @param string $appName Application name ex) 'Vendor\Project' */
public function __construct(
private readonly string $appName = '',
) {
parent::__construct();
}
* {@inheritDoc}
#[Override]
protected function configure(): void
$this->install(new ResourceClientModule());
$this->install(new EmbedResourceModule());
$this->install(new HttpClientModule());
$this->bind()->annotatedWith(AppName::class)->toInstance($this->appName);