original_string: public function renderBase64Img($message, $extension = null, $size = null, $padding = null, $attribs = array())
      {
          if (isset($extension)) {
              if (is_array($extension)) {
                  $attribs = $extension;
                  $extension = null;
              } elseif (isset($size)) {
                  if (is_array($size)) {
                      $attribs = $size;
                      $size = null;
                  } elseif (isset($padding) && is_array($padding)) {
                      $attribs = $padding;
                      $padding = null;
                  }
              }
          }
  
          $image          = $this->qrCodeService->getQrCodeContent($message, $extension, $size, $padding);
          $contentType    = $this->qrCodeService->generateContentType(
              isset($extension) ? $extension : QrCodeServiceInterface::DEFAULT_EXTENSION
          );
  
          return $this->renderer->render(self::IMG_BASE64_TEMPLATE, array(
              'base64'        => base64_encode($image),
              'contentType'   => $contentType,
              'attribs'       => $attribs
          ));
      }
code: public function renderBase64Img($message, $extension = null, $size = null, $padding = null, $attribs = array())
      {
          if (isset($extension)) {
              if (is_array($extension)) {
                  $attribs = $extension;
                  $extension = null;
              } elseif (isset($size)) {
                  if (is_array($size)) {
                      $attribs = $size;
                      $size = null;
                  } elseif (isset($padding) && is_array($padding)) {
                      $attribs = $padding;
                      $padding = null;
                  }
              }
          }
  
          $image          = $this->qrCodeService->getQrCodeContent($message, $extension, $size, $padding);
          $contentType    = $this->qrCodeService->generateContentType(
              isset($extension) ? $extension : QrCodeServiceInterface::DEFAULT_EXTENSION
          );
  
          return $this->renderer->render(self::IMG_BASE64_TEMPLATE, array(
              'base64'        => base64_encode($image),
              'contentType'   => $contentType,
              'attribs'       => $attribs
          ));
      }
code_tokens: public function renderBase64Img ( $ message , $ extension = null , $ size = null , $ padding = null , $ attribs = array ( ) ) { if ( isset ( $ extension ) ) { if ( is_array ( $ extension ) ) { $ attribs = $ extension ; $ extension = null ; } elseif ( isset ( $ size ) ) { if ( is_array ( $ size ) ) { $ attribs = $ size ; $ size = null ; } elseif ( isset ( $ padding ) && is_array ( $ padding ) ) { $ attribs = $ padding ; $ padding = null ; } } } $ image = $ this -> qrCodeService -> getQrCodeContent ( $ message , $ extension , $ size , $ padding ) ; $ contentType = $ this -> qrCodeService -> generateContentType ( isset ( $ extension ) ? $ extension : QrCodeServiceInterface :: DEFAULT_EXTENSION ) ; return $ this -> renderer -> render ( self :: IMG_BASE64_TEMPLATE , array ( 'base64' => base64_encode ( $ image ) , 'contentType' => $ contentType , 'attribs' => $ attribs ) ) ; }
docstring: Renders a img tag with a base64-encoded QR code
  @param string $message
  @param string|null $extension
  @param int|null $size
  @param null $padding
  @param array $attribs
  @return mixed
docstring_tokens: Renders a img tag with a base64 - encoded QR code