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


PHP Dispatcher::subscribe方法代码示例

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


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

示例1: listen

 public function listen(Dispatcher $events)
 {
     $events->subscribe('Flarum\\Lock\\Listeners\\AddClientAssets');
     $events->subscribe('Flarum\\Lock\\Listeners\\AddApiAttributes');
     $events->subscribe('Flarum\\Lock\\Listeners\\PersistData');
     $events->subscribe('Flarum\\Lock\\Listeners\\NotifyDiscussionLocked');
     $events->subscribe('Flarum\\Lock\\Listeners\\ConfigurePermissions');
 }
开发者ID:redstarxz,项目名称:flarumone,代码行数:8,代码来源:Extension.php

示例2: listen

 public function listen(Dispatcher $events)
 {
     $events->subscribe('Flarum\\Tags\\Listeners\\AddClientAssets');
     $events->subscribe('Flarum\\Tags\\Listeners\\AddModelRelationship');
     $events->subscribe('Flarum\\Tags\\Listeners\\ConfigureDiscussionPermissions');
     $events->subscribe('Flarum\\Tags\\Listeners\\ConfigureTagPermissions');
     $events->subscribe('Flarum\\Tags\\Listeners\\AddApiAttributes');
     $events->subscribe('Flarum\\Tags\\Listeners\\PersistData');
     $events->subscribe('Flarum\\Tags\\Listeners\\LogDiscussionTagged');
     $events->subscribe('Flarum\\Tags\\Listeners\\UpdateTagMetadata');
     $events->subscribe('Flarum\\Tags\\Listeners\\AddTagGambit');
 }
开发者ID:redstarxz,项目名称:flarumone,代码行数:12,代码来源:Extension.php

示例3: listen

 public function listen(Dispatcher $events)
 {
     $events->subscribe('S12g\\ImageAttachments\\Listeners\\AddClientAssets');
     $events->listen(RegisterApiRoutes::class, function (RegisterApiRoutes $event) {
         $event->post('/s12g/image_attachments', 's12g.imageattachments.upload', 'S12g\\ImageAttachments\\UploadAction');
     });
 }
开发者ID:stoensin,项目名称:flarumone,代码行数:7,代码来源:Extension.php

示例4: __construct

 /**
  * @param CommentForm  $commentForm
  * @param Dispatcher   $events
  */
 public function __construct(CommentForm $commentForm, Dispatcher $events)
 {
     $this->beforeFilter('auth', ['only' => ['update', 'trash', 'approve']]);
     $this->commentForm = $commentForm;
     $events->subscribe('FIIP\\Comments\\CommentEventHandler');
     Comments::setDispatcher($events);
 }
开发者ID:adriancatalinsv,项目名称:fiip,代码行数:11,代码来源:CommentsController.php

示例5: boot

 /**
  * Bootstrap the application services.
  * @param Dispatcher $dispatcher
  */
 public function boot(Dispatcher $dispatcher)
 {
     // Merge config
     $this->mergeConfigFrom(base_path('vendor/aginev/login-activity/config/login-activity.php'), 'login-activity');
     // Publish config
     $this->publishes([base_path('vendor/aginev/login-activity/config/login-activity.php') => config_path('login-activity.php')], 'config');
     // Publish migrations
     $this->publishes([base_path('vendor/aginev/login-activity/migrations/create_user_login_activities_table.php') => database_path('/migrations/' . date('Y_m_d_His', time()) . '_create_user_login_activities_table.php')], 'migrations');
     // Register event subscriber
     $dispatcher->subscribe(LoginActivityListener::class);
 }
开发者ID:aginev,项目名称:login-activity,代码行数:15,代码来源:LoginActivityServiceProvider.php

示例6: listen

 public function listen(Dispatcher $events)
 {
     $events->subscribe('Flarum\\Mentions\\Listeners\\AddClientAssets');
     $events->subscribe('Flarum\\Mentions\\Listeners\\AddModelRelationships');
     $events->subscribe('Flarum\\Mentions\\Listeners\\AddApiRelationships');
     $events->subscribe('Flarum\\Mentions\\Listeners\\AddUserMentionsFormatter');
     $events->subscribe('Flarum\\Mentions\\Listeners\\AddPostMentionsFormatter');
     $events->subscribe('Flarum\\Mentions\\Listeners\\UpdateUserMentionsMetadata');
     $events->subscribe('Flarum\\Mentions\\Listeners\\UpdatePostMentionsMetadata');
 }
开发者ID:redstarxz,项目名称:flarumone,代码行数:10,代码来源:Extension.php

示例7: makeDispatcher

 /**
  * Setup and boot EventDispatcher.
  *
  * @return  \Illuminate\Contracts\Events\Dispatcher
  */
 protected function makeDispatcher()
 {
     $events = new Dispatcher();
     foreach ($this->listen as $event => $listeners) {
         foreach ($listeners as $listener) {
             $events->listen($event, $listener);
         }
     }
     foreach ($this->subscribe as $subscriber) {
         $events->subscribe($subscriber);
     }
     return $events;
 }
开发者ID:bvqbao,项目名称:app-skeleton,代码行数:18,代码来源:EventServiceProvider.php

示例8: listen

 public function listen(Dispatcher $events)
 {
     $events->subscribe(Listeners\AddTranslateJs::class);
 }
开发者ID:hyn,项目名称:flarum-google-translate,代码行数:4,代码来源:Extension.php

示例9: listen

 public function listen(Dispatcher $events)
 {
     $events->subscribe('Flarum\\Markdown\\Listeners\\AddClientAssets');
     $events->subscribe('Flarum\\Markdown\\Listeners\\AddMarkdownFormatter');
 }
开发者ID:redstarxz,项目名称:flarumone,代码行数:5,代码来源:Extension.php

示例10: listen

 public function listen(Dispatcher $events)
 {
     $events->subscribe('S12g\\NoSlug\\Listeners\\AddClientAssets');
 }
开发者ID:redstarxz,项目名称:flarumone,代码行数:4,代码来源:Extension.php

示例11: listen

 public function listen(Dispatcher $events)
 {
     $events->subscribe(__NAMESPACE__ . '\\Listener');
 }
开发者ID:redstarxz,项目名称:flarumone,代码行数:4,代码来源:bootstrap.php

示例12: listen

 public function listen(Dispatcher $events)
 {
     $events->subscribe('Flarum\\Suspend\\Listeners\\AddClientAssets');
     $events->subscribe('Flarum\\Suspend\\Listeners\\AddApiAttributes');
     $events->subscribe('Flarum\\Suspend\\Listeners\\PersistData');
 }
开发者ID:redstarxz,项目名称:flarumone,代码行数:6,代码来源:Extension.php

示例13: subscribe

 /**
  * Register an event subscriber with the dispatcher.
  *
  * @param object|string $subscriber
  * @return void 
  * @static 
  */
 public static function subscribe($subscriber)
 {
     \Illuminate\Events\Dispatcher::subscribe($subscriber);
 }
开发者ID:satriashp,项目名称:tour,代码行数:11,代码来源:_ide_helper.php


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