original_string: public function build(
          $action,
          array $data,
          CliInput $input,
          Mapping $mapping
      ) {
          $context = new ZMQContext();
          $socket = new ZMQSocket($context, ZMQ::SOCKET_REQ);
          $socket->setSockOpt(ZMQ::SOCKOPT_LINGER, 0);
  
          if ($input->getMapping() === 'compact') {
              $transportMapper = new CompactTransportMapper();
              $runtimeCallMapper = new CompactRuntimeCallMapper($transportMapper);
          } else {
              $transportMapper = new ExtendedTransportMapper();
              $runtimeCallMapper = new ExtendedRuntimeCallMapper($transportMapper);
          }
  
          $caller = new ZeroMQRuntimeCaller(
              new MessagePackSerializer(),
              new CompactTransportMapper(),
              $socket,
              $runtimeCallMapper,
              new Timer()
          );
  
          $transport = $this->mapper->getTransport($data);
          return new ActionApi(
              $this->logger->getRequestLogger($transport->getMeta()->getId()),
              $this->component,
              $mapping,
              dirname(realpath($_SERVER['SCRIPT_FILENAME'])),
              $input->getName(),
              $input->getVersion(),
              $input->getFrameworkVersion(),
              $input->getVariables(),
              $input->isDebug(),
              $action,
              $caller,
              $transport,
              new TypeCatalog(),
              $this->mapper->getParams($data)
          );
      }
code: public function build(
          $action,
          array $data,
          CliInput $input,
          Mapping $mapping
      ) {
          $context = new ZMQContext();
          $socket = new ZMQSocket($context, ZMQ::SOCKET_REQ);
          $socket->setSockOpt(ZMQ::SOCKOPT_LINGER, 0);
  
          if ($input->getMapping() === 'compact') {
              $transportMapper = new CompactTransportMapper();
              $runtimeCallMapper = new CompactRuntimeCallMapper($transportMapper);
          } else {
              $transportMapper = new ExtendedTransportMapper();
              $runtimeCallMapper = new ExtendedRuntimeCallMapper($transportMapper);
          }
  
          $caller = new ZeroMQRuntimeCaller(
              new MessagePackSerializer(),
              new CompactTransportMapper(),
              $socket,
              $runtimeCallMapper,
              new Timer()
          );
  
          $transport = $this->mapper->getTransport($data);
          return new ActionApi(
              $this->logger->getRequestLogger($transport->getMeta()->getId()),
              $this->component,
              $mapping,
              dirname(realpath($_SERVER['SCRIPT_FILENAME'])),
              $input->getName(),
              $input->getVersion(),
              $input->getFrameworkVersion(),
              $input->getVariables(),
              $input->isDebug(),
              $action,
              $caller,
              $transport,
              new TypeCatalog(),
              $this->mapper->getParams($data)
          );
      }
code_tokens: public function build ( $ action , array $ data , CliInput $ input , Mapping $ mapping ) { $ context = new ZMQContext ( ) ; $ socket = new ZMQSocket ( $ context , ZMQ :: SOCKET_REQ ) ; $ socket -> setSockOpt ( ZMQ :: SOCKOPT_LINGER , 0 ) ; if ( $ input -> getMapping ( ) === 'compact' ) { $ transportMapper = new CompactTransportMapper ( ) ; $ runtimeCallMapper = new CompactRuntimeCallMapper ( $ transportMapper ) ; } else { $ transportMapper = new ExtendedTransportMapper ( ) ; $ runtimeCallMapper = new ExtendedRuntimeCallMapper ( $ transportMapper ) ; } $ caller = new ZeroMQRuntimeCaller ( new MessagePackSerializer ( ) , new CompactTransportMapper ( ) , $ socket , $ runtimeCallMapper , new Timer ( ) ) ; $ transport = $ this -> mapper -> getTransport ( $ data ) ; return new ActionApi ( $ this -> logger -> getRequestLogger ( $ transport -> getMeta ( ) -> getId ( ) ) , $ this -> component , $ mapping , dirname ( realpath ( $ _SERVER [ 'SCRIPT_FILENAME' ] ) ) , $ input -> getName ( ) , $ input -> getVersion ( ) , $ input -> getFrameworkVersion ( ) , $ input -> getVariables ( ) , $ input -> isDebug ( ) , $ action , $ caller , $ transport , new TypeCatalog ( ) , $ this -> mapper -> getParams ( $ data ) ) ; }
docstring: Build an Action Api class instance
  
  @param string $action
  @param array $data
  @param CliInput $input
  @param Mapping $mapping
  @return ActionApi
docstring_tokens: Build an Action Api class instance