\Tenant_HTTP_Response_RobotsTxt

Defines a http response for robots.txt file. It renders content of robots.txt as response.

If robots.txt file does not exist, an empty string will be considered as rendered content of robots.txt.

It also adds some URLs as sitemap in the end of response content.

Summary

Methods
Properties
Constants
__construct()
render()
outputHeaders()
hashCode()
$content
$headers
$status_code
$cookies
$status_code_list
$filePath
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
$host
N/A

Properties

$content

$content : 

Content of the response.

Type

$headers

$headers : 

Array of the headers to add.

For example $this->headers['Content-Type'] = 'text/html; charset=utf-8';

Type

$status_code

$status_code : 

Status code of the answer.

Type

$cookies

$cookies : 

Cookies to send.

$this->cookies['my_cookie'] = 'content of the cookie';

Type

$status_code_list

$status_code_list : 

Status code list.

Type

$filePath

$filePath : 

Type

$host

$host : 

Type

Methods

__construct()

__construct(  $host,   $filepath) 

Constructor of the response.

Parameters

$host
$filepath

render()

render(  $output_body = true) 

Render a response object.

Parameters

$output_body

outputHeaders()

outputHeaders() 

Output headers.

hashCode()

hashCode() 

Return hash code of the object