PHP code example of orbiter / satellite

1. Go to this page and download the library: Download orbiter/satellite 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/ */

    

orbiter / satellite example snippets

injectablephp
use function DI\autowire;
use function DI\get;

$dependencies = [
    Satellite\Event\EventListenerInterface::class => autowire(Satellite\Event\EventListener::class),
    Psr\EventDispatcher\ListenerProviderInterface::class => get(Satellite\Event\EventListenerInterface::class),
    Satellite\Event\EventDispatcher::class => autowire()
        ->constructorParameter('listener', get(Psr\EventDispatcher\ListenerProviderInterface::class))
        ->constructorParameter('invoker', get(Invoker\InvokerInterface::class)),
    Psr\EventDispatcher\EventDispatcherInterface::class => get(Satellite\Event\EventDispatcher::class),
];
injectablephp
/**
 * @var $invoker \Invoker\Invoker
 */
$invoker = $container->get(\Invoker\Invoker::class);
$invoker->getParameterResolver()->prependResolver(
    new Satellite\InvokerTypeHintContainerResolver($container)
);