/**
* Set the robot policy for the page: <http://www.robotstxt.org/meta.html>
*
- * @param string $policy the literal string to output as the contents of
- * the meta tag. Will be parsed according to the spec and output in
- * standardized form.
+ * @param string|array $policy string such as "noindex,nofollow" or an array in this
+ * format:
+ * array(
+ * 'index' => 'noindex' // or 'index'
+ * 'follow' => 'nofollow' // or 'follow'
+ * )
* @return null
*/
public function setRobotPolicy( $policy ) {
/**
* Sets headers - this should be called from the execute() method of all derived classes!
- */
- function setHeaders() {
+ * @param string|array $robotPolicy string such as "noindex,nofollow" or an array in this
+ * format:
+ * array(
+ * 'index' => 'noindex' // or 'index'
+ * 'follow' => 'nofollow' // or 'follow'
+ * )
+ */
+ function setHeaders( $robotPolicy = "noindex,nofollow" ) {
$out = $this->getOutput();
$out->setArticleRelated( false );
- $out->setRobotPolicy( "noindex,nofollow" );
+ $out->setRobotPolicy( $robotPolicy );
$out->setPageTitle( $this->getDescription() );
}