hitagi-entrada/hitagi-entrada.php

35 lines
720 B
PHP
Raw Normal View History

2024-12-12 14:00:09 +00:00
<?php
2024-12-12 18:39:48 +00:00
require 'vendor/autoload.php';
require 'includes/wrapper-noswoole.php';
2024-12-12 14:00:09 +00:00
$stdin = fopen('php://stdin', 'r');
$stdout = fopen('php://stdout', 'w');
2024-12-12 18:39:48 +00:00
$fgId = (isset($argv[1])) ? $argv[1] : ''; // DID
2024-12-12 14:00:09 +00:00
2024-12-12 18:39:48 +00:00
$logEnabled = true;
$isXampp = (file_exists('C:\xampp'));
2024-12-12 14:00:09 +00:00
$appdir = dirname(__FILE__);
2024-12-12 18:39:48 +00:00
2024-12-12 14:00:09 +00:00
chdir($appdir);
date_default_timezone_set('America/Bahia');
2024-12-12 18:39:48 +00:00
$agientrada = new \Hit\Ami\AGIEntrada(
2024-12-12 14:00:09 +00:00
array(
'agiRunCmd' => agiRunCmdWrapper($stdin, $stdout),
'agiLog' => agiLogWrapper($logEnabled)
),
array(
2024-12-12 18:39:48 +00:00
'fgId' => $fgId,
'logEnabled' => $logEnabled,
'appdir' => $appdir,
'isXampp' => $isXampp
2024-12-12 14:00:09 +00:00
)
);
$agientrada->run();
fclose($stdin);
fclose($stdout);
exit();