Exemplo n.º 1
0
Arquivo: Async.php Projeto: vucms/aha
 /**
  * @brief 异步后台进程初始化
  */
 public function __construct()
 {
     define('APP_NAME', 'Daemon');
     define('APPLICATION_PATH', dirname(__DIR__));
     define('AHA_SRC_PATH', dirname(dirname(__DIR__)) . DIRECTORY_SEPARATOR . 'src');
     require_once AHA_SRC_PATH . '/Aha/Daemon.php';
     \Aha\Daemon::initLoader();
     $this->_objAha = \Aha\Daemon::getInstance(APP_NAME, 'product');
     $this->_objAha->getLoader()->registerNamespace(APP_NAME, APPLICATION_PATH);
     $this->_objAha->run();
 }
Exemplo n.º 2
0
 /**
  * @brief 异步后台进程初始化
  */
 public function __construct()
 {
     define('APP_NAME', 'Daemon');
     define('APPLICATION_PATH', dirname(__DIR__) . '/../');
     define('AHA_SRC_PATH', dirname(__DIR__) . '/../../src');
     require_once AHA_SRC_PATH . '/Aha/Daemon.php';
     \Aha\Daemon::initLoader();
     $this->_objAha = \Aha\Daemon::getInstance(APP_NAME, 'dev');
     $this->_objAha->getLoader()->registerNamespace(APP_NAME, APPLICATION_PATH);
     $this->_objAha->run();
     $this->_objProtocolPackage = new \Aha\Process\Protocol\Package();
     \Daemon\Library\Ipc\Shared::initTable();
 }