Initial Commit
This commit is contained in:
26
Classes/HtRule/Rule/Comment.php
Normal file
26
Classes/HtRule/Rule/Comment.php
Normal file
@@ -0,0 +1,26 @@
|
||||
<?php
|
||||
|
||||
class HtRule_Rule_Comment extends HtRule
|
||||
{
|
||||
public function __construct()
|
||||
{
|
||||
$this->AddParam(new HtRule_Param('text', 'Comment', HtRule_Param::TYPE_TEXT, 'A Comment'));
|
||||
parent::__construct();
|
||||
}
|
||||
public static function GetName()
|
||||
{
|
||||
return 'Comment';
|
||||
}
|
||||
public function RequireRewriteEngine()
|
||||
{
|
||||
return False;
|
||||
}
|
||||
public function __toString()
|
||||
{
|
||||
$text = $this->params['text']->Value();
|
||||
|
||||
$text = '# '.str_replace("\n", "\n# ", $text);
|
||||
|
||||
return $text;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user