src/Amadeus/Client/RequestCreator/Base.php
protected function findBuilderForMessage($messageName)
    {
        $builder = null;

        if (array_key_exists($messageName, $this->messageBuilders) &&
            $this->messageBuilders[$messageName] instanceof ConvertInterface
        ) {
            $builder = $this->messageBuilders[$messageName];
        } else {
            $section = substr($messageName, 0, strpos($messageName, '_'));
            $message = substr($messageName, strpos($messageName, '_') + 1);

            $builderClass = __NAMESPACE__.'\\Converter\\'.$section.'\\'.$message."Conv";

            if (class_exists($builderClass)) {
                /** @var ConvertInterface $builder */
                $builder = new $builderClass();
                $builder->setParams($this->params);

                $this->messageBuilders[$messageName] = $builder;
            }
        }

        return $builder;
    }
protected function findBuilderForMessage($messageName)
    {
        $builder = null;

        if (array_key_exists($messageName, $this->messageBuilders) &&
            $this->messageBuilders[$messageName] instanceof ConvertInterface
        ) {
            $builder = $this->messageBuilders[$messageName];
        } else {
            $section = substr($messageName, 0, strpos($messageName, '_'));
            $message = substr($messageName, strpos($messageName, '_') + 1);

            $builderClass = __NAMESPACE__.'\\Converter\\'.$section.'\\'.$message."Conv";

            if (class_exists($builderClass)) {
                /** @var ConvertInterface $builder */
                $builder = new $builderClass();
                $builder->setParams($this->params);

                $this->messageBuilders[$messageName] = $builder;
            }
        }

        return $builder;
    }
protected function findBuilderForMessage ( $ messageName ) { $ builder = null ; if ( array_key_exists ( $ messageName , $ this -> messageBuilders ) && $ this -> messageBuilders [ $ messageName ] instanceof ConvertInterface ) { $ builder = $ this -> messageBuilders [ $ messageName ] ; } else { $ section = substr ( $ messageName , 0 , strpos ( $ messageName , '_' ) ) ; $ message = substr ( $ messageName , strpos ( $ messageName , '_' ) + 1 ) ; $ builderClass = __NAMESPACE__ . '\\Converter\\' . $ section . '\\' . $ message . "Conv" ; if ( class_exists ( $ builderClass ) ) { /** @var ConvertInterface $builder */ $ builder = new $ builderClass ( ) ; $ builder -> setParams ( $ this -> params ) ; $ this -> messageBuilders [ $ messageName ] = $ builder ; } } return $ builder ; }
Find the correct builder for a given message

Builder classes implement the ConvertInterface and are used to build only one kind of message.

The standard converter class is
__NAMESPACE__ \ Converter \ Sectionname \ Messagename + "Conv"
e.g.
Amadeus\Client\RequestCreator\Converter\DocIssuance\IssueTicketConv

@param string $messageName
@return ConvertInterface|null
Find the correct builder for a given message