class GenerateSitemap extends Job implements ConsoleAwareInterface (View source)

Traits

A trait that provides awareness of the console to objects

Constants

EOL

The end-of-line terminator.

Properties

protected Application|null $traitConsole from  ConsoleAwareTrait
protected OutputInterface|null $traitOutput from  ConsoleAwareTrait
protected InputInterface|null $traitInput from  ConsoleAwareTrait

Methods

setConsole(Application $console, OutputInterface $output = null, InputInterface $input = null)

Set the console object

setOutput(OutputInterface $output)

Set the output object to use

setInput(InputInterface $input)

Set the input object to use

OutputInterface
getOutput()

Get an output object

InputInterface
getInput()

Get an input object

bool
hasConsole()

Find out if we are in console context

string
getJobName()

Returns the job name.

string
getJobDescription()

Returns the job description.

string
run()

Executes the job.

static 
addPage(SimpleXMLElement $xmlDoc, int $cID, array $instances)

Check if the specified page should be included in the sitemap.xml file; if so adds it to the XML document.

static 
canIncludePageInSitemap($page, $instances)

No description

Details

ConsoleAwareTrait setConsole(Application $console, OutputInterface $output = null, InputInterface $input = null)

Set the console object

Parameters

Application $console
OutputInterface $output
InputInterface $input

Return Value

ConsoleAwareTrait

ConsoleAwareTrait setOutput(OutputInterface $output)

Set the output object to use

Parameters

OutputInterface $output

Return Value

ConsoleAwareTrait

ConsoleAwareTrait setInput(InputInterface $input)

Set the input object to use

Parameters

InputInterface $input

Return Value

ConsoleAwareTrait

protected OutputInterface getOutput()

Get an output object

Return Value

OutputInterface

protected InputInterface getInput()

Get an input object

Return Value

InputInterface

protected bool hasConsole()

Find out if we are in console context

Return Value

bool

string getJobName()

Returns the job name.

Return Value

string

string getJobDescription()

Returns the job description.

Return Value

string

string run()

Executes the job.

Return Value

string

Returns a string describing the job result in case of success.

Exceptions

Exception

static private addPage(SimpleXMLElement $xmlDoc, int $cID, array $instances)

Check if the specified page should be included in the sitemap.xml file; if so adds it to the XML document.

Parameters

SimpleXMLElement $xmlDoc

The xml document containing the sitemap nodes.

int $cID

The page collection id.

array $instances

An array with some already instantiated helpers, models, ...

Exceptions

Exception

static protected canIncludePageInSitemap($page, $instances)

No description

Parameters

$page
$instances