Commit 45bc7fe9 authored by Josh Pollock's avatar Josh Pollock
Browse files

Added lazy-loaded singletons

parent 9b17f88d
<?php
namespace calderawp\CalderaContainers\Tests\Mocks;
use calderawp\CalderaContainers\Interfaces\ProvidesService;
use calderawp\CalderaContainers\Interfaces\ServiceContainer;
class SivanService implements ProvidesService
{
/** @inheritdoc */
public function registerService(ServiceContainer $container)
{
$container->bind( $this->getAlias(), function (){
return (object) [
'Roy',
'Mike'
];
} );
}
/** @inheritdoc */
public function getAlias()
{
return 'SIVAN';
}
}
\ No newline at end of file
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment