/** * 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; }