Response
class Response (View source)
A CLI specific response implementation
Constants
| STYLE_BRIGHT | 
                     Constants for output styles  | 
            
| STYLE_FAINT | 
                     
  | 
            
| STYLE_ITALIC | 
                     
  | 
            
| STYLE_UNDERLINED | 
                     
  | 
            
| STYLE_INVERSE | 
                     
  | 
            
| STYLE_STRIKETHROUGH | 
                     
  | 
            
| STYLE_ERROR | 
                     
  | 
            
| STYLE_SUCCESS | 
                     
  | 
            
| OUTPUTFORMAT_RAW | 
                     Constants for output formats  | 
            
| OUTPUTFORMAT_PLAIN | 
                     
  | 
            
| OUTPUTFORMAT_STYLED | 
                     
  | 
            
Methods
Sets the numerical exit code which should be returned when exiting this application.
Gets the numerical exit code which should be returned when exiting this application.
Overrides and sets the content of the response
Appends content to the already existing content.
Returns the response content without sending it.
Sets color support / styled output to yes, no or auto detection
Tells if the response content should be styled on send().
Sets the desired output format.
Returns the currently set output format.
Sends the response
Details
        
                            void
    setExitCode(int $exitCode)
        
    
    Sets the numerical exit code which should be returned when exiting this application.
        
                            int
    getExitCode()
        
    
    Gets the numerical exit code which should be returned when exiting this application.
        
                            void
    setContent(string $content)
        
    
    Overrides and sets the content of the response
        
                            void
    appendContent(string $content)
        
    
    Appends content to the already existing content.
        
                            string
    getContent()
        
    
    Returns the response content without sending it.
        
                            void
    setColorSupport(bool $colorSupport)
        
    
    Sets color support / styled output to yes, no or auto detection
        
                            bool
    hasColorSupport()
        
    
    Tells if the response content should be styled on send().
Regardless of this setting content will only be styled with output format set to "styled".
        
                            void
    setOutputFormat(int $outputFormat)
        
    
    Sets the desired output format.
        
                            int
    getOutputFormat()
        
    
    Returns the currently set output format.
        
                            void
    send()
        
    
    Sends the response