You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
52 lines
834 B
52 lines
834 B
2 years ago
|
<?php
|
||
|
|
||
|
namespace Sabberworm\CSS\Comment;
|
||
|
|
||
|
use Sabberworm\CSS\Renderable;
|
||
|
|
||
|
class Comment implements Renderable {
|
||
|
protected $iLineNo;
|
||
|
protected $sComment;
|
||
|
|
||
|
public function __construct($sComment = '', $iLineNo = 0) {
|
||
|
$this->sComment = $sComment;
|
||
|
$this->iLineNo = $iLineNo;
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* @return string
|
||
|
*/
|
||
|
public function getComment() {
|
||
|
return $this->sComment;
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* @return int
|
||
|
*/
|
||
|
public function getLineNo() {
|
||
|
return $this->iLineNo;
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* @return string
|
||
|
*/
|
||
|
public function setComment($sComment) {
|
||
|
$this->sComment = $sComment;
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* @return string
|
||
|
*/
|
||
|
public function __toString() {
|
||
|
return $this->render(new \Sabberworm\CSS\OutputFormat());
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* @return string
|
||
|
*/
|
||
|
public function render(\Sabberworm\CSS\OutputFormat $oOutputFormat) {
|
||
|
return '/*' . $this->sComment . '*/';
|
||
|
}
|
||
|
|
||
|
}
|