hitagi-entrada/hitagi-entrada.php

35 lines
737 B
PHP

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