本文整理匯總了PHP中Notify::statuses方法的典型用法代碼示例。如果您正苦於以下問題:PHP Notify::statuses方法的具體用法?PHP Notify::statuses怎麽用?PHP Notify::statuses使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Notify
的用法示例。
在下文中一共展示了Notify::statuses方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的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;
}