<?php
require_once __DIR__.'/RuntimeContext.php';
require_once dirname(__DIR__).'/gateway/ProductionGateway.php';
class RuntimeManager{
public function run(RuntimeContext $ctx){
$g=new ProductionGateway();
return [
'status'=>'OK',
'runtime_version'=>'3.4',
'context'=>[
'race_date'=>$ctx->raceDate,
'venue'=>$ctx->venue,
'race_num'=>$ctx->raceNum,
'mode'=>$ctx->mode
],
'gateway'=>$g->execute($ctx->raceDate,$ctx->venue,$ctx->raceNum),
'executed_at'=>date('c')
];
}
}
