Exemple #1
0
 public function run()
 {
     require_once EPROCESS_AUTOLOAD;
     $loop = Factory::create();
     $messenger = MessengerFactory::client($this->unix, $loop);
     $application = ApplicationFactory::create($this->class);
     $application->messenger($messenger);
     $application->loop($loop);
     $application->data($this->data);
     $messenger->send('initialized', true);
     try {
         $application->run();
         $loop->run();
     } catch (\Exception $e) {
         echo $e;
     }
 }
Exemple #2
0
<?php

require_once __DIR__ . '/autoload.php';
use Doctrine\Common\Annotations\AnnotationRegistry;
use EProcess\Application\ApplicationFactory;
use Examples\Simple\Main;
AnnotationRegistry::registerLoader(array($loader, 'loadClass'));
/**
 * We are using namespaces structure to let external autoloader know where to find things.
 */
ApplicationFactory::launch(Main::class);