PHP code example of robertwesner / simple-mvc-php-demo-bundle
1. Go to this page and download the library: Download robertwesner/simple-mvc-php-demo-bundle 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/ */
robertwesner / simple-mvc-php-demo-bundle example snippets
use RobertWesner\SimpleMvcPhpDemoBundle\DemoBundle;
use RobertWesner\SimpleMvcPhpDemoBundle\DemoBundleConfiguration;
Configuration::BUNDLES
::load(
DemoBundle::class,
new DemoBundleConfiguration(
greeting: 'Hello',
),
);
use RobertWesner\SimpleMvcPhpDemoBundle\Demo\DemoInterface;
final readonly class GreetingService
{
public function __construct(
private DemoInterface $demo,
) {}
public function doGreet(): void
{
print $this->demo->greetWorld();
}
}