@param string $messageName

@return MessageFlowRegistration[]
@throws NoMessageNameDefinedForMessageFlowException
@throws \SimplyCodedSoftware\IntegrationMessaging\MessagingException
349811
public function getFlowRegistrationsFor(string $messageName) : array
    {
        $messageFlows = [];
        foreach ($this->messageFlowRegistrations as $messageFlowName => $definedMessageFlows) {
            if (preg_match("#^{$messageFlowName}$#", $messageName)) {
                $messageFlows = array_merge($messageFlows, $definedMessageFlows);
            }
        }

        if (!$messageFlows) {
            throw NoMessageNameDefinedForMessageFlowException::create("No message with name {$messageName} defined in message flow. Did you remember to add MessageFlowAnnotation or register Flow via ApplicationContext?");
        }

        return $messageFlows;
    }
952644
public function getListeners($eventName)
    {
        $listeners = isset($this->listeners[$eventName]) ? $this->listeners[$eventName] : [];

        $listeners = array_merge(
            $listeners,
            $this->getWildcardListeners($eventName)
        );

        return class_exists($eventName, false)
            ? $this->addInterfaceListeners($eventName, $listeners)
            : $listeners;
    }
79974
public function getMessages()
    {
        $this->getBotId();

        $messageContent = $this->getMessageContent($this->event->get('id'));

        $message = new IncomingMessage($messageContent->text, $messageContent->roomId, $messageContent->personId, $messageContent);

        if ($this->getBotId() === $messageContent->personId) {
            $message->setIsFromBot(true);
        }

        return [$message];
    }
70163
public function getEventMessages($eventName) {
        $filter = is_array($eventName) ? $eventName : array(
            'EVENT_NAME' => $eventName,
        );

        $by = 'id';
        $order = 'asc';

        $result = array();
        $dbres = \CEventMessage::GetList($by, $order, $filter);
        while ($item = $dbres->Fetch()) {
            $result[] = $this->prepareEventMessage($item);
        }
        return $result;
    }
784242
public function getMessages()
    {
        $message = new IncomingMessage(Location::PATTERN, $this->event->get('ToUserName'), $this->event->get('FromUserName'),
            $this->event);
        $message->setLocation($this->getLocation());

        return [$message];
    }
1063772
public function loadMessages(/*# string */ $className)/*# : array */
    {
        $map = [];

        // reflect
        if (class_exists($className)) {
            $class = new \ReflectionClass($className);
            $file  = $class->getFileName();
            // language file 'Message.php' -> 'Message.zh_CN.php'
            $nfile = substr_replace($file, '.' . $this->language . '.php', -4);
            if (file_exists($nfile)) {
                $res = include $nfile;
                if (is_array($res)) {
                    $map = $res;
                }
            }
        }

        return $map;
    }
908900
public function getMappedFirstEntitiesByEntityType($entityName)
    {
        $entities = [];
        foreach ($this->data as $data) {
            $entity = $this->createAndReturnNewFirstEntity($data, $entityName);
            if ($entity) {
                $entities[] = $entity;
            }
        }
        return $entities;
    }
153927
public function getListeners($eventName = null)
    {

        if (empty($eventName)) return $this->listeners;
        if (!empty($eventName) && !isset($this->listeners[$eventName])) return [];

        return $this->listeners[$eventName];
    }
57451
public function getNotificationEvent($eventName)
    {
        // normalise the event name
        $eventName = strtr($eventName, '_', '-');
        if ($this->hasNotificationEvent($eventName)) {
            return $this->events[$eventName];
        } else {
            throw new \InvalidArgumentException('Event '.$eventName.' is not registered');
        }
    }
1322728
public function getListeners(string $eventName = ''): array
    {
        $this->sortListeners($eventName);
        if ('' !== $eventName) {
            return \array_key_exists($eventName, $this->listeners) ? $this->listeners[$eventName] : [];
        }
        return $this->listeners;
    }
1309990
public function getResponse(MessageInterface $response)
    {
        $result = [];

        if (null !== $response) {
            $responseStr = $this->parser->getBodyWithHeaders($response);

            $result = ['response' => $responseStr];
        }

        return $result;
    }
353349
protected static function getBindingsForApp(string $className): array
    {
        $bindings   = parent::getBindingsForApp($className);
        $bindings[] = function(Binder $binder)
        {
            $binder->bind(InputStream::class)
                   ->named('stdin')
                   ->toInstance(ConsoleInputStream::forIn());
            $binder->bind(OutputStream::class)
                   ->named('stdout')
                   ->toInstance(ConsoleOutputStream::forOut());
            $binder->bind(OutputStream::class)
                   ->named('stderr')
                   ->toInstance(ConsoleOutputStream::forError());
        };
        return $bindings;
    }
1190104
public function getListeners($eventName = NULL)
	{
		if($eventName === NULL)
		{
			$listeners = [];
			
			foreach(array_keys($this->listeners) as $k)
			{
				$listeners[$k] = [];
				
				foreach(clone $this->listeners[$k] as $listener)
				{
					$listeners[$k][] = $listener;
				}
			}
			
			ksort($listeners);
			
			return $listeners;
		}
		
		if($eventName instanceof \ReflectionClass)
		{
			$eventName = $eventName->name;
		}
		
		if(empty($this->listeners[$eventName]))
		{
			return [];
		}
		
		$listeners = [];
		
		foreach(clone $this->listeners[$eventName] as $listener)
		{
			$listeners[] = $listener;
		}
		
		return $listeners;
	}
637861
public function getEventActions($eventName)
    {
        $events = isset($this->events[$eventName]) ? $this->events[$eventName] : [];

        return is_array($events) ? $events : [$events];
    }
950748
protected function getWildcardListeners($eventName)
    {
        $wildcards = [];

        foreach ($this->wildcards as $key => $listeners) {
            if (Str::is($key, $eventName)) {
                $wildcards = array_merge($wildcards, $listeners);
            }
        }

        return $wildcards;
    }
1076217
public function listeners(string $eventName) : array
    {
        if (!isset($this->listeners[$eventName])) {
            return [];
        }

        // The list is not sorted
        if (!$this->listeners[$eventName][0]) {
            // Sorting
            /** @psalm-suppress MixedArgument */
            \array_multisort($this->listeners[$eventName][1], SORT_NUMERIC, $this->listeners[$eventName][2]);

            // Marking the listeners as sorted
            $this->listeners[$eventName][0] = true;
        }

        return $this->listeners[$eventName][2];
    }
709271
public function create(string $className): array
    {
        $this->findIdentityField($className);

        $class = $this->metadata->getReflectionClass();
        $methods = $class->getMethods(ReflectionMethod::IS_PUBLIC);
        $fieldConfigurations = [];
        foreach ($methods as $method) {
            // Skip non-callable or non-instance
            if ($method->isAbstract() || $method->isStatic()) {
                continue;
            }

            // Skip non-getter methods
            $name = $method->getName();
            if (!preg_match($this->getMethodPattern(), $name)) {
                continue;
            }

            // Skip exclusion specified by user
            if ($this->isExcluded($method)) {
                continue;
            }

            $configuration = $this->methodToConfiguration($method);
            if ($configuration) {
                $fieldConfigurations[] = $configuration;
            }
        }

        return $fieldConfigurations;
    }