2024-12-12 19:27:10 +00:00
|
|
|
#!/usr/bin/php -q
|
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);
|
2024-12-12 19:27:10 +00:00
|
|
|
exit();
|