original_string: protected function outputAttachSuccess()
      {
          if ($this->returnType === 'image') {
              $this->outputImage();
          }
  
          if ($this->returnType === 'json' || $this->returnType === 'none') {
              header('Content-type: application/json; charset=UTF-8');
              echo json_encode(['success' => 'attached']);
          }
  
          if ($this->returnType === 'jsonp') {
              $data = json_encode(['success' => 'attached']);
              echo $_REQUEST['callback'] . "($data, 200);";
          }
  
          if ($this->returnType === 'redirect') {
              $url = $_REQUEST['return_url'];
              header("Location: $url", true, 307);
              echo "You're being redirected to <a href='{$url}'>$url</a>";
          }
      }
code: protected function outputAttachSuccess()
      {
          if ($this->returnType === 'image') {
              $this->outputImage();
          }
  
          if ($this->returnType === 'json' || $this->returnType === 'none') {
              header('Content-type: application/json; charset=UTF-8');
              echo json_encode(['success' => 'attached']);
          }
  
          if ($this->returnType === 'jsonp') {
              $data = json_encode(['success' => 'attached']);
              echo $_REQUEST['callback'] . "($data, 200);";
          }
  
          if ($this->returnType === 'redirect') {
              $url = $_REQUEST['return_url'];
              header("Location: $url", true, 307);
              echo "You're being redirected to <a href='{$url}'>$url</a>";
          }
      }
code_tokens: protected function outputAttachSuccess ( ) { if ( $ this -> returnType === 'image' ) { $ this -> outputImage ( ) ; } if ( $ this -> returnType === 'json' || $ this -> returnType === 'none' ) { header ( 'Content-type: application/json; charset=UTF-8' ) ; echo json_encode ( [ 'success' => 'attached' ] ) ; } if ( $ this -> returnType === 'jsonp' ) { $ data = json_encode ( [ 'success' => 'attached' ] ) ; echo $ _REQUEST [ 'callback' ] . "($data, 200);" ; } if ( $ this -> returnType === 'redirect' ) { $ url = $ _REQUEST [ 'return_url' ] ; header ( "Location: $url" , true , 307 ) ; echo "You're being redirected to <a href='{$url}'>$url</a>" ; } }
docstring: Output on a successful attach
docstring_tokens: Output on a successful attach