vendor/codeages/plugin-bundle/Event/LazySubscribers.php

(开头部分) 1KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

<?php

namespace Codeages\PluginBundle\Event;

use Symfony\Component\Config\ConfigCache;
use Symfony\Component\Config\Resource\FileResource;
use Symfony\Component\DependencyInjection\ContainerInterface;

class LazySubscribers
{
    const DEFAULT_PRIORITY = 0;
    /**
     * @var ContainerInterface
     */
    private $container;

    /**
     * @var string[]
     */
    private $services = array();

    /**
     * @var ConfigCache
     */
    private $cache;

    public function __construct(ContainerInterface $container)
    {
        $this->container = $container;

        $kernel = $this->container->get('kernel');
        $cacheFile = $kernel->getCacheDir().DIRECTORY_SEPARATOR.'event_map.php';
        $this->cache = new ConfigCache($cacheFile, $kernel->isDebug());
    }

    /**
     * return array(
     *    array(service|class, method)
     * )
     *
     * @param $eventName
     *
     * @return array
     */
    public function getCallbacks($eventName)
    {
        $eventMap = $this->getEventMap();

        if (isset($eventMap[$eventName])) {
            return $eventMap[$eventName];
        }

        return array();
    }

    /**
     * @param $service
     *
     * @return $this
     */

24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明

AI 解读 AI

登录后可用,每次 10 算力,解读结果公开显示在下面。

还没有人解读过这个文件。