PHP Class Calotype\SEO\Generators\RobotsGenerator

Show file Open project: calotype/seo

Protected Properties

Property Type Description
$lines array The lines of for the robots.txt

Public Methods

Method Description
addAllow ( string | array $directories ) Add a allow rule to the robots.txt.
addComment ( string $comment ) Add a comment to the robots.txt.
addDisallow ( string | array $directories ) Add a disallow rule to the robots.txt.
addHost ( string $host ) Add a Host to the robots.txt.
addLine ( string $line ) Add a line to the robots.txt.
addLines ( string | array $lines ) Add multiple lines to the robots.txt.
addSitemap ( string $sitemap ) Add a Sitemap to the robots.txt.
addSpacer ( ) Add a spacer to the robots.txt.
addUserAgent ( string $userAgent ) Add a User-agent to the robots.txt.
generate ( ) : string Generate the robots.txt data.
reset ( ) : void Reset the lines.

Protected Methods

Method Description
addRuleLine ( string | array $directories, string $rule ) Add a rule to the robots.txt.

Method Details

addAllow() public method

Add a allow rule to the robots.txt.
public addAllow ( string | array $directories )
$directories string | array

addComment() public method

Add a comment to the robots.txt.
public addComment ( string $comment )
$comment string

addDisallow() public method

Add a disallow rule to the robots.txt.
public addDisallow ( string | array $directories )
$directories string | array

addHost() public method

Add a Host to the robots.txt.
public addHost ( string $host )
$host string

addLine() public method

Add a line to the robots.txt.
public addLine ( string $line )
$line string

addLines() public method

Add multiple lines to the robots.txt.
public addLines ( string | array $lines )
$lines string | array

addRuleLine() protected method

Add a rule to the robots.txt.
protected addRuleLine ( string | array $directories, string $rule )
$directories string | array
$rule string

addSitemap() public method

Add a Sitemap to the robots.txt.
public addSitemap ( string $sitemap )
$sitemap string

addSpacer() public method

Add a spacer to the robots.txt.
public addSpacer ( )

addUserAgent() public method

Add a User-agent to the robots.txt.
public addUserAgent ( string $userAgent )
$userAgent string

generate() public method

Generate the robots.txt data.
public generate ( ) : string
return string

reset() public method

Reset the lines.
public reset ( ) : void
return void

Property Details

$lines protected property

The lines of for the robots.txt
protected array $lines
return array