@param Map     $map
@param Event[] $eventsOnce

@return Event[]
331677
public function collect(Map $map, array $eventsOnce = [])
    {
        return $this->collectValues($map->getEventManager()->getEventsOnce(), $eventsOnce);
    }
1292737
public function collect(Map $map, array $extendables = [])
    {
        return $this->collectValues($map->getBound()->getExtendables(), $extendables);
    }
999838
public function collect(Map $map, array $rectangles = [])
    {
        return $this->collectValues($map->getOverlayManager()->getRectangles(), $rectangles);
    }
563409
public static event[] get(nitro_service client) throws Exception
	{
		event resource = new event();
		resource.validate("get");
		return (event[]) resource.get_resources(client);
	}
194159
private function doRender(Map $map, $eventName)
    {
        $this->getEventDispatcher()->dispatch($eventName, $event = new MapEvent($map));

        return $event->getCode();
    }
15203
public function getListenersForEvent($eventClassName)
    {
        if (FALSE === array_key_exists($eventClassName, $this->eventMap))
        {
            return [];
        }
        return $this->eventMap[$eventClassName];
    }
330769
public static function map(array $object, array $map)
    {
        $result = [];

        foreach ($map as $from => $to) {
            if ( ! isset($object[$from])) {
                continue;
            }

            $result[$to] = $object[$from];
        }

        return $result;
    }
605261
private function createEvent(Map $map, Marker $marker)
    {
        $formatter = $this->getFormatter();

        $rawEvent = new Event(
            $marker->getVariable(),
            $marker->getInfoWindow()->getOpenEvent(),
            $formatter->renderClosure($formatter->renderLines([
                $formatter->renderCall(
                    $formatter->renderProperty(
                        $formatter->renderContainerVariable($map, 'functions'),
                        'info_windows_close'
                    ),
                    [],
                    true
                ),
                $formatter->renderCode(
                    $this->getInfoWindowOpenRenderer()->render($marker->getInfoWindow(), $map, $marker),
                    true,
                    false
                ),
            ]))
        );

        $rawEvent->setVariable($marker->getVariable().'_info_window_open_event');

        return $rawEvent;
    }
43090
public function collect(Autocomplete $autocomplete, array $eventsOnce = [])
    {
        return $this->collectValues($autocomplete->getEventManager()->getEventsOnce(), $eventsOnce);
    }
302273
public static function checkAnyOrder(...$events): ?EventCollection
    {
        $container = self::$globals::$container;

        return $container->eventOrderVerifier->checkAnyOrder(...$events);
    }
421988
private function buildEventMap()
    {
        $this->synchronousEventMap  = new EventMapping();
        $this->asynchronousEventMap = new EventMapping();

        $eventMap       = NULL;
        $annotationName = 'Helmich\\EventBroker\\Annotations\\Listener';

        $classes = $this->reflectionService->getClassesContainingMethodsAnnotatedWith($annotationName);
        foreach ($classes as $class)
        {
            $classReflection = new ClassReflection($class);
            /** @var MethodReflection $method */
            foreach ($classReflection->getMethods() as $method)
            {
                if ($this->reflectionService->isMethodAnnotatedWith($class, $method->getName(), $annotationName))
                {
                    /** @var Listener $annotation */
                    $annotation = $this->reflectionService->getMethodAnnotation(
                        $class,
                        $method->getName(),
                        $annotationName
                    );

                    $event = $annotation->event;
                    $this
                        ->getEventMap($annotation->synchronous)
                        ->addListenerForEvent($event, [$class, $method->getName()]);
                }
            }
        }
    }
331202
public function render(Map $map)
    {
        $this->getEventDispatcher()->dispatch(StaticMapEvents::HTML, $event = new StaticMapEvent($map));

        $query = preg_replace('/(%5B[0-9]+%5D)+=/', '=', http_build_query($event->getParameters(), '', '&'));
        $url = 'https://maps.googleapis.com/maps/api/staticmap?'.$query;

        if ($this->hasSecret()) {
            $url = UrlSigner::sign($url, $this->secret, $this->clientId, $this->channel);
        }

        return $url;
    }
467154
public function openOn(Map $map)
    {
        $this->map = $map;
        $map->addLayer($this);

        return $this->addMethod('openOn', array($map));
    }
673395
protected function newEvent(
        $eventName,
        $target = null,
        array $parameters = []
    )/*# : EventInterface */ {
        if (is_object($eventName)) {
            return $eventName;
        } else {
            return new Event($eventName, $target, $parameters);
        }
    }
1122676
public function mapCollection(array $response, MethodResultCollectionInterface $method)
    {
        $return = [];

        foreach ($response as $item) {
            $return[] = $this->map($item, $method->createResultObject());
        }

        return $return;
    }
510729
public function createSuccess(array $events = []): EventCollection
    {
        $suiteClass = $this->suiteClass;
        $suiteClass::current()->assert($this->successConfig);

        return new EventSequence($events, $this->callVerifierFactory);
    }
203605
protected function dispatchMapEvent($eventName, $params)
    {
        $map = $this->mapStorage->getMap($params['map']['uid']);

        $this->dispatch(
            $eventName,
            [
                $params['count'],
                isset($params['time']) ? $params['time'] : time(),
                isset($params['restarted']) ? $params['restarted'] : false,
                $map,
            ]
        );
    }