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


PHP Notify::method方法代码示例

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


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

示例1: _detectNotify

 /**
  * detectNotify method
  *
  * Check if it's windows - if it is set to log (temporary while some equivalent is found)
  *
  * Else, check which of the notify methods are available, first found is used
  *
  * @param bool $reset false
  * @return void
  * @access protected
  */
 protected static function _detectNotify($reset = false)
 {
     if (!$reset && Notify::$method) {
         return Notify::$method;
     }
     if (DS === '/') {
         foreach (Notify::$notifiers as $method => $params) {
             if (is_string($params)) {
                 $params = array('cmd' => $params);
             }
             exec('which ' . $params['cmd'], $_, $return);
             if (!$return) {
                 Notify::$method = $method;
                 if (!empty($params['statuses'])) {
                     Notify::$statuses = $params['statuses'];
                 }
                 return $method;
             }
         }
     } else {
         Notify::$method = 'Log';
         return 'Log';
     }
     return false;
 }
开发者ID:rodrigorm,项目名称:cake_autotest,代码行数:36,代码来源:notify.php

示例2: main

 /**
  * main method
  *
  * Check for the existance of a tmp/autopilot_running file. If it exists - and is less than an hour
  * old do not do anything to prevent the possibility of running autotest several times in parallel
  * on the same files. If the file is more than an hour old delete it and continue.
  * Delete the tmp/autopilot_stop file if it exists and being autopilot test/checking process.
  *
  * @return void
  * @access public
  */
 function main()
 {
     if (!$this->_registerPid()) {
         $this->out('Unable to register Pid');
         $this->_stop();
     }
     if (file_exists($this->params['working'] . DS . '.autotest')) {
         include $this->params['working'] . DS . '.autotest';
     }
     if (!empty($this->params['notify'])) {
         $this->settings['notify'] = $this->params['notify'];
     }
     if (!empty($this->params['mode'])) {
         $this->settings['mode'] = $this->params['mode'];
     }
     $suffix = '';
     if (!empty($this->settings['mode'])) {
         $suffix = ' (' . $this->settings['mode'] . ' mode)';
     }
     Notify::$method = $this->settings['notify'];
     $this->addHooks();
     Notify::message('Autopilot Starting', 'in ' . APP_DIR . $suffix, 0, false);
     $this->buildPaths();
     $this->run();
 }
开发者ID:rodrigorm,项目名称:cake_autotest,代码行数:36,代码来源:autopilot.php


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