Joli\JoliNotif\NotifierFactory::getDefaultNotifiers PHP Method

getDefaultNotifiers() public static method

public static getDefaultNotifiers ( ) : Joli\JoliNotif\Notifier[]
return Joli\JoliNotif\Notifier[]
    public static function getDefaultNotifiers()
    {
        // Don't retrieve notifiers which are certainly not supported on this
        // system. This helps to lower the number of process to run.
        if (OsHelper::isUnix()) {
            return self::getUnixNotifiers();
        }
        return self::getWindowsNotifiers();
    }

Usage Example

 public function testGetDefaultNotifiers()
 {
     $notifiers = NotifierFactory::getDefaultNotifiers();
     if (OsHelper::isUnix()) {
         $expectedNotifierClasses = ['Joli\\JoliNotif\\Notifier\\GrowlNotifyNotifier', 'Joli\\JoliNotif\\Notifier\\TerminalNotifierNotifier', 'Joli\\JoliNotif\\Notifier\\AppleScriptNotifier', 'Joli\\JoliNotif\\Notifier\\NotifySendNotifier'];
     } else {
         $expectedNotifierClasses = ['JoliNotif\\Notifier\\ToasterNotifier', 'JoliNotif\\Notifier\\NotifuNotifier'];
     }
     $this->assertNotifierClasses($expectedNotifierClasses, $notifiers);
 }