/** * broadcast the given event class. * * @param \illuminate\contracts\broadcasting\shouldbroadcast $event * @return void */protectedfunctionbroadcastevent($event) {// why use this function name is broadcast// event class means event instanceif ($this->queueresolver) {// use this queueresolver function$connection = $eventinstanceof shouldbroadcastnow ? 'sync' : null;// determine this instance about$queue = method_exists($event, 'onqueue') ? $event->onqueue() : null;// determine method_exits$this->resolvequeue()->connection($connection)->pushon($queue, 'illuminate\broadcasting\broadcastevent', [ 'event' => serialize(clone$event), ]);// good look bad use ,maybe } } /** * get all of the listeners for a given event name. * * @param string $eventname * @return array */publicfunctiongetlisteners($eventname) {// get all of the listeners for a given event name.$wildcards = $this->getwildcardlisteners($eventname);// get the wild card by eventsname use this function ,that name is cardlisters// first use eventnameif (! isset($this->sorted[$eventname])) { $this->sortlisteners($eventname);// use this sort listeners }// if isset eventsname never be sort ,return array_merge($this->sorted[$eventname], $wildcards);// array_merge } /** * get the wildcard listeners for the event. * * @param string $eventname * @return array */protectedfunctiongetwildcardlisteners($eventname) {$wildcards = [];// getwildcardlisteners() set the listenerforeach ($this->wildcards as$key => $listeners) {// foreach $this->wildcards as keyif (str::is($key, $eventname)) {// determine is a str$wildcards = array_merge($wildcards, $listeners); // get the array_merge } } return$wildcards; }// first get listener,second get the wildcard listener
').addclass('pre-numbering').hide(); $(this).addclass('has-numbering').parent().append($numbering); for (i = 1; i ').text(i)); }; $numbering.fadein(1700); }); }); 以上就介绍了 [李景山php]每天laravel-20160906|dispatcher-6,包括了方面的内容,希望对php教程有兴趣的朋友有所帮助。