24 private $typeProcessor;
36 $this->typeProcessor = $typeProcessor;
37 $this->methodsMap = $methodsMap;
52 $this->methodsMap->getMethodParams($schemaType, $schemaMethod);
53 }
catch (\Exception $e) {
54 throw new \LogicException(
56 'Service method specified for topic "%s" is not available. Given "%s"',
58 $schemaType .
'::' . $schemaMethod
76 $this->methodsMap->getMethodParams($serviceName, $methodName);
77 }
catch (\Exception $e) {
78 throw new \LogicException(
80 'Service method specified in handler for consumer "%s"' 81 .
' is not available. Given "%s"',
83 $serviceName .
'::' . $methodName
100 if (strpos($topicName,
'#') ===
false && strpos($topicName,
'*') ===
false) {
101 if (in_array($topicName, $topics)) {
106 if (count(preg_grep(
$pattern, $topics))) {
111 throw new \LogicException(
112 sprintf(
'Topic "%s" declared in binds must be defined in topics', $topicName)
125 $pattern =
'/^' . str_replace(
'.',
'\.', $wildcardKey);
128 if (strpos($wildcardKey,
'#') === strlen($wildcardKey)) {
148 if (!in_array($publisherName, $publishers)) {
149 throw new \LogicException(
151 'Publisher "%s", specified in env.php for topic "%s" is not declared.',
171 }
catch (\Exception $e) {
172 throw new \LogicException(
174 'Response schema definition for topic "%s" should reference existing type or service class. ' 195 }
catch (\Exception $e) {
196 throw new \LogicException(
198 'Schema definition for topic "%s" should reference existing type or service class. ' 216 if ($this->typeProcessor->isTypeSimple($typeName)) {
219 if ($this->typeProcessor->isArrayType($typeName)) {
220 $arrayItemType = $this->typeProcessor->getArrayItemType($typeName);
221 $this->methodsMap->getMethodsMap($arrayItemType);
223 $this->methodsMap->getMethodsMap($typeName);
validateBindTopic($topics, $topicName)
validateSchemaMethodType($schemaType, $schemaMethod, $topicName)
validateSchemaType($schema, $topicName)
__construct(TypeProcessor $typeProcessor, MethodsMap $methodsMap)
validateResponseSchemaType($responseSchema, $topicName)
validateTopicPublisher($publishers, $publisherName, $topicName)
buildWildcardPattern($wildcardKey)
validateHandlerType($serviceName, $methodName, $consumerName)