A simple but powerful PSR-11 dependency injection container
Welcome to the refreshed documentation with a beautiful dark mode theme. This new design features:
Here's how the enhanced syntax highlighting looks:
<?php
use League\Container\Container;
use League\Container\ReflectionContainer;
// Create a new container instance
$container = new Container();
// Enable auto-wiring
$container->delegate(
new ReflectionContainer()
);
// Add a service definition
$container->add(SomeService::class)
->addArgument('some-argument')
->addMethodCall('setLogger', [LoggerInterface::class]);
// Resolve the service
$service = $container->get(SomeService::class);
The new dark theme provides a more comfortable reading experience, especially during extended documentation sessions. The carefully chosen color palette reduces eye strain while maintaining excellent readability.
The typography has been significantly enhanced with:
We've switched to Source Serif Pro for body text, providing better readability and a more comfortable reading experience. Code blocks now use JetBrains Mono for enhanced code legibility with proper ligature support.
Base font size increased to 16pt
with improved line height (1.7
) for better readability. Headings have been rebalanced with improved spacing and visual hierarchy.
The new GitHub-inspired dark color scheme includes: