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


PHP Notification::getType方法代码示例

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


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

示例1: testConstructor

 /**
  * Tests setting the name and body using the Notification class Constructor.
  */
 public function testConstructor()
 {
     // Create a new Notification using the Constructor to set the note name and body
     $note = new Notification('TestNote', 5, 'TestNoteType');
     // test assertions
     $this->assertTrue($note->getName() == 'TestNote', "Expecting note.getName() == 'TestNote'");
     $this->assertTrue($note->getBody() == 5, "Expecting note->getBody() as Number == 5");
     $this->assertTrue($note->getType() == 'TestNoteType', "Expecting note->getType() == 'TestNoteType'");
 }
开发者ID:xojunzheng,项目名称:puremvc-php-multicore-framework,代码行数:12,代码来源:NotificationTest.php

示例2: getType

 private static function getType(\Notification $n)
 {
     switch ($n->getType()) {
         case NotifyUI::SUCCESS:
             return 'SUCCESS';
         case NotifyUI::ERROR:
             return 'ERROR';
         case NotifyUI::WARNING:
             return 'WARNING';
         default:
             return 'UNKNOWN';
     }
 }
开发者ID:csdetschjr,项目名称:OrgSyncAdmin,代码行数:13,代码来源:NotifyUI.php

示例3: getType

 private static function getType(Notification $n)
 {
     switch ($n->getType()) {
         case INTERN_SUCCESS:
             return 'SUCCESS';
         case INTERN_ERROR:
             return 'ERROR';
         case INTERN_WARNING:
             return 'WARNING';
         default:
             return 'UNKNOWN';
     }
 }
开发者ID:jeffrafter,项目名称:InternshipInventory,代码行数:13,代码来源:Intern_NotifyUI.php

示例4: resolveType

 protected function resolveType(\Notification $notification)
 {
     switch ($notification->getType()) {
         case NotificationView::ERROR:
             return 'ERROR';
         case NotificationView::WARNING:
             return 'WARNING';
         case NotificationView::SUCCESS:
             return 'SUCCESS';
         default:
             return 'UNKNOWN';
     }
 }
开发者ID:jlbooker,项目名称:homestead,代码行数:13,代码来源:NotificationView.php

示例5: resolveType

 protected function resolveType(Notification $notification)
 {
     switch ($notification->getType()) {
         case FAX_NOTIFICATION_ERROR:
             return 'ERROR';
         case FAX_NOTIFICATION_WARNING:
             return 'WARNING';
         case FAX_NOTIFICATION_SUCCESS:
             return 'SUCCESS';
         default:
             return 'UNKNOWN';
     }
 }
开发者ID:sinkdb,项目名称:faxserv,代码行数:13,代码来源:FaxmasterNotificationView.php

示例6: getNotificationUrl

 public function getNotificationUrl(Notification $notification)
 {
     return $this->container->get('router')->generate('notification_show', array('slug' => $notification->getProject()->getSlug(), $notification->getType() => true));
 }
开发者ID:sebardo,项目名称:core,代码行数:4,代码来源:CoreExtension.php

示例7: configureDefault

 /**
  * Sets the congifuration settings of the given default notification.
  *
  * @param \Codenest\Ahem\Notification $notification
  *
  * @return \Codenest\Ahem\Notification
  */
 protected function configureDefault(Notification $notification)
 {
     $settings = $this->config->getSettings($notification->getType());
     return $notification->configure($settings);
 }
开发者ID:codenest,项目名称:ahem,代码行数:12,代码来源:Factory.php


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