当前位置: 首页>>代码示例>>PHP>>正文


PHP SearchHelper::checkOpenOfficeAvailablity方法代码示例

本文整理汇总了PHP中SearchHelper::checkOpenOfficeAvailablity方法的典型用法代码示例。如果您正苦于以下问题:PHP SearchHelper::checkOpenOfficeAvailablity方法的具体用法?PHP SearchHelper::checkOpenOfficeAvailablity怎么用?PHP SearchHelper::checkOpenOfficeAvailablity使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在SearchHelper的用法示例。


在下文中一共展示了SearchHelper::checkOpenOfficeAvailablity方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: checkOpenOffice

 function checkOpenOffice()
 {
     $diagnose = SearchHelper::checkOpenOfficeAvailablity();
     if (!is_null($diagnose)) {
         $this->addIssue('Open Office Server', $diagnose);
     }
 }
开发者ID:jpbauer,项目名称:knowledgetree,代码行数:7,代码来源:cronResources.php

示例2: checkOO

 /**
  * Check that open office is running
  *
  * @return boolean
  */
 private function checkOO()
 {
     $available = SearchHelper::checkOpenOfficeAvailablity();
     if (is_null($available)) {
         return true;
     }
     return false;
 }
开发者ID:5haman,项目名称:knowledgetree,代码行数:13,代码来源:pdfConverter.php

示例3: isset

$sGiveOutput = isset($argv[1]) && $argv[1] == 'output' ? true : false;
// Check indexed document count
// If the number of indexed documents is greater than the set amount, restart open office
// this clears open office's memory usage
$resetPoint = 50;
// todo: put in config
$count = Indexer::getIndexedDocumentCount();
$restartOO = false;
if ($count > $resetPoint) {
    $restartOO = true;
    // reset the count
    Indexer::updateIndexedDocumentCount(0);
    $default->log->debug('Check Open Office Task: Restarting open office.');
}
// First we check the host:port to see if open office is running
$sCheckOO = SearchHelper::checkOpenOfficeAvailablity();
if (empty($sCheckOO) && !$restartOO) {
    // If the check returns empty then it is available on that port so we exit
    if ($sGiveOutput) {
        echo 1;
    }
    exit;
}
// Open office appears not to be running or requires a restart
if (OS_WINDOWS) {
    $OOService = 'ktopenoffice';
    $default->log->debug('Check Open Office Task: ' . get_current_user());
    if ($restartOO) {
        // If Open office needs to be restarted - stop it here
        $result_stop = win32_stop_service($OOService);
        // Wait for the service to stop fully before trying to restart it
开发者ID:jpbauer,项目名称:knowledgetree,代码行数:31,代码来源:checkopenoffice.php

示例4: diagnose

 public function diagnose()
 {
     if (!$this->useOO) {
         return true;
     }
     if (false === $this->python) {
         return _kt('Cannot locate python');
     }
     if (false === $this->documentConverter) {
         return _kt('Cannot locate DocumentConverter.py');
     }
     return SearchHelper::checkOpenOfficeAvailablity();
 }
开发者ID:sfsergey,项目名称:knowledgetree,代码行数:13,代码来源:StarOfficeExtractor.inc.php


注:本文中的SearchHelper::checkOpenOfficeAvailablity方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。