* @license PHP License * @package WB * @subpackage content */ /** * Load base class */ WBClass::load('WBContent' ,'WBContent_SEO'); /** * Content component: SEO * * @version 1.1.0 * @package WB * @subpackage content */ class WBContent_SEO_Robots extends WBContent_SEO { /** * my parameter list * @var array */ protected $config = array( 'disallow' => '', ); /** * run * * run component * * @see sendAndExit() * @return array parameter list */ public function run() { $cnt = <<config['disallow'])) { $this->config['disallow'] = trim($this->config['disallow']); if (!empty($this->config['disallow'])) { $this->config['disallow'] = array($this->config['disallow']); } } foreach ($this->config['disallow'] as $line) { $cnt .= sprintf("Disallow: %s\n", $line); } $this->res->add($cnt); $this->sendAndExit('text/plain'); } }