setTimezone(); $sequence->detect(); $sequence->getENV(); $sequence->Application->config(); $sequence->Application->Modules->load(); $sequence->Autoloader->register(); $sequence->loadContainer(); $sequence->setApplication = [$sequence->Application]; $sequence->Requesthandler->handleCliRequest(); $sequence->Requesthandler->handleHttpRequest(); $parent = $this->getParentForNode($node); $parent->children[] = $node; $node->parent = $parent; */ class Engine implements ProgramInterface {//RuntimeInterface, //use \Webfan\ngModuleTrait; protected $currentProcessorContextType = null; protected $Batch = null; protected $DataPayload = null; protected $ProgramPayload = null; protected $OID_TABLE = null; public function configure(?ConfigType $configurator = null, $payload) { match($configurator){ ConfigType::Batch => $this->withConfigurationBatch($payload), default => $this->withConfiguration($payload), }; } public function load( $payload){ return $this->loadWebApp($payload); } /* public function load(DescriptorType $program, $payload){ // print_r($payload);die(); match($program){ // DescriptorType::Pipeline => parent::__construct("Bad Request - Invalid Method", 400), DescriptorType::WebApp => $this->loadWebApp($payload), // DescriptorType::Timeout => parent::__construct("Bad Request - Timeout", 400) DescriptorType::Batch => $this->loadBatch($payload), // default => null !== $this->currentProcessor ? $this->currentProcessor->load($payload) : $this->add($payload), //$this->$currentProcessorContextType default => $this->defaultLoad($payload), }; } case START_PROGRAM = << $this->defaulExecutionHandlerWith($payload), ExecutionContextType::http => $this->defaulExecutionHandlerWith($payload), default => $this->defaulExecutionHandlerWith($payload), }; } public function defaulExecutionHandlerWith($payload) { $AppLauncher = new \Webfan\AppLauncherLegacy(\frdl\r\f::i()->StubRunner); return $this->loadWebApp($AppLauncher); } public function build(?DescriptorType $program = null, ...$payload) { print_r($payload); } public function withConfiguration($payload) { print_r($payload); } public function withConfigurationBatch($payload) { print_r($payload); } public function batch( Batch $newBatch = null ) : Batch { if(null === $this->Batch){ $this->Batch =new Batch(); } if(null !== $newBatch){ $this->Batch =new Batch($this->Batch->{'@@@'}.' -> '.$newBatch->{'@@@'}, $this->Batch->{'.'}, array_merge($this->Batch->{'@@'}, $newBatch->{'@@'})); } return $this->Batch; } public function info( Baum $newBatch = null ) : Baum { if(null === $this->OID_TABLE){ $this->OID_TABLE =new Baum('ProgramDescriptors', Baum::class); } if(null !== $newBatch){ $this->OID_TABLE->children[] = $newBatch; $newBatch->parent = $this->OID_TABLE; } return $this->OID_TABLE; } public function program( Baum $newBatch = null ) : Baum { if(null === $this->ProgramPayload){ $this->ProgramPayload =new Baum('ProgramDescriptors', Baum::class); } if(null !== $newBatch){ $this->ProgramPayload->children[] = $newBatch; $newBatch->parent = $this->ProgramPayload; } return $this->ProgramPayload; } public function data( Baum $newBatch = null ) : Baum { if(null === $this->DataPayload){ $this->DataPayload =new Baum('DataDescriptors', Baum::class); } if(null !== $newBatch){ $this->DataPayload->children[] = $newBatch; $newBatch->parent = $this->DataPayload; } return $this->DataPayload; } public function defaultLoad($payload) { print_r(__METHOD__); print_r($payload); } public function loadBatch($payload) { return ($this->batch(is_object($payload) && !is_null($payload) && true === $payload instanceof Batch ? $payload : null))->load(is_object($payload) && !is_null($payload) && true === $payload instanceof Batch ? null : $payload); } public function loadWebApp(StubHelperInterface | WebAppInterface | StubRunnerInterface $payload){ if($payload instanceof WebAppInterface){ $AppLauncher =$payload; }elseif($payload instanceof StubRunnerInterface){ $AppLauncher = new \Webfan\AppLauncherLegacy($payload); }elseif($payload instanceof StubHelperInterface){ $AppLauncher = new \Webfan\AppLauncherLegacy($payload->getRunner()); }else{ throw new InvalidArgumentException(sprintf('Invalid parameter in %s payload of %s given but %s expected', __METHOD__, is_object($payload) && !is_null($paylod) ? \get_class($payload) : gettype($payload), 'one of StubHelperInterface | WebAppInterface | StubRunnerInterface')); } if(\method_exists($AppLauncher, 'launch')){ $AppLauncher->launch(); }elseif(!$AppLauncher->KernelFunctions()->isCLI() ){ $response = $AppLauncher->handle($AppLauncher->getContainer()->get('request')); if(is_object($response) && $response instanceof \Psr\Http\Message\ResponseInterface){ (new \Laminas\HttpHandlerRunner\Emitter\SapiEmitter)->emit($response); } }elseif($AppLauncher->KernelFunctions()->isCLI() ){ return $AppLauncher->handleCliRequest(); }else{ throw new \Exception('Could not handle request ('.\PHP_SAPI.')'); } } }__halt_compiler();----SIGNATURE:----bKWpF2pOrfJ3hKNqZVJ3n1W2iUA5U4Spqzq5i/ndbTmurTpBcRQv0fTQ2tXAXmzp0xQG2nYKjQISEVyMlHepbQh2Ei6V75nVlvIDaUSdjo4DVCuIMMuE4hp7dsLyi/eMIifyynBn66c8fxocb/ziKqaGgLW0K0/pGBOS51HYx4Xc8qYwkhR8nZ6XxdA903GLPrOyewZ0pEW6TOnuCKMc3HdCJh071AoMizC/Tyfz6EkyWAosePhcISpQVp5N3xB+vFhTTAfvkjZGMtBVme8pVmS1A4rENrpVnh//+CDL4ZtphsI9jOMLy/liD1DXPG2HSE3v9iNmxA3q1Yd9aTEMaEqA34MwnYYCq2qf+XpKYvRj+jOvdW8waqWAyPkL1yYbbw9VTW0DH9UKOV2CkeOvxaei7R4Kz0lSeC4uazJnnh3ct1vPFgbZOfmUCsTMnoUoXsMX/CB9tLLY4y6KqUVZNzuFRznqzXF8zwu91yFRh+F2pG8+ta+7NkksUIQ6bFP1k5xbPnJVVzi6lU/UOHCZpe4YRefbKniUkYDDeca7emmuD//hz1D6Zq0+DSJveBuwa544Ah46Tedpmj5HM0hxdm2dVwxKG+GyAFDirUEEgq0abJeVLKfW1kbhIlsuvBrKmmGEUOOIN7XzFDHVZ52a7qil+ST0QHAjnl4VzVLvxRI=----ATTACHMENT:----MzU3NDAzODIzNTkyODgyMSA5MjYzNzg0OTA0NDk4NjU2IDIwODkwMjgwOTAyNzQ3Mzg=