Maison > développement back-end > tutoriel php > [李景山php]每天laravel-20160901|Dispatcher-1

[李景山php]每天laravel-20160901|Dispatcher-1

WBOY
Libérer: 2016-07-28 08:30:19
original
948 Les gens l'ont consulté

<code>
namespace Illuminate\Events;

use Exception;
use ReflectionClass;
use Illuminate\Support\Str;
use Illuminate\Container\Container;
use Illuminate\Contracts\Broadcasting\ShouldBroadcast;
use Illuminate\Contracts\Broadcasting\ShouldBroadcastNow;
use Illuminate\Contracts\Events\Dispatcher as DispatcherContract;
use Illuminate\Contracts\Container\Container as ContainerContract;
<span>// use namespace</span>
class Dispatcher implements DispatcherContract
{<span>// a Dispatcher implements Dispatcher Contract</span><span>/**
     * The IoC container instance.
     *
     *<span> @var</span> \Illuminate\Contracts\Container\Container
     */</span><span>protected</span> $container;<span>// The Ioc container instance.</span><span>/**
     * The registered event listeners.
     *
     *<span> @var</span> array
     */</span><span>protected</span> $listeners = [];<span>// listeners be registered</span><span>/**
     * The wildcard listeners.
     *
     *<span> @var</span> array
     */</span><span>protected</span> $wildcards = [];<span>// The wildcard listeners. like store</span><span>/**
     * The sorted event listeners.
     *
     *<span> @var</span> array
     */</span><span>protected</span> $sorted = [];<span>// The sorted event listeners.</span><span>/**
     * The event firing stack.
     *
     *<span> @var</span> array
     */</span><span>protected</span> $firing = [];<span>//The event firing stack.</span><span>/**
     * The queue resolver instance.
     *
     *<span> @var</span> callable
     */</span><span>protected</span> $queueResolver;<span>// The queue resolver instance.</span><span>// at last ,we find to instance ,some listeners</span><span>/**
     * Create a new event dispatcher instance.
     *
     *<span> @param</span>  \Illuminate\Contracts\Container\Container|null  $container
     *<span> @return</span> void
     */</span><span>// dispathcer is use to make it like you want</span><span>public</span> function <span>__construct</span>(ContainerContract $container = <span>null</span>)
    {
        $<span>this</span>->container = $container ?: <span>new</span> Container;
    }<span>// ContainerContract is $contanier</span></code>
Copier après la connexion
').addClass('pre-numbering').hide(); $(this).addClass('has-numbering').parent().append($numbering); for (i = 1; i ').text(i)); }; $numbering.fadeIn(1700); }); });

以上就介绍了 [李景山php]每天laravel-20160901|Dispatcher-1,包括了方面的内容,希望对PHP教程有兴趣的朋友有所帮助。

Étiquettes associées:
source:php.cn
Déclaration de ce site Web
Le contenu de cet article est volontairement contribué par les internautes et les droits d'auteur appartiennent à l'auteur original. Ce site n'assume aucune responsabilité légale correspondante. Si vous trouvez un contenu suspecté de plagiat ou de contrefaçon, veuillez contacter admin@php.cn
Tutoriels populaires
Plus>
Derniers téléchargements
Plus>
effets Web
Code source du site Web
Matériel du site Web
Modèle frontal