mirror of
https://github.com/Mibew/CanteenHTML5.git
synced 2025-03-22 17:01:24 +03:00
38 lines
711 B
PHP
38 lines
711 B
PHP
<?php
|
|
|
|
/**
|
|
* @module Canteen\HTML5
|
|
*/
|
|
namespace Canteen\HTML5
|
|
{
|
|
/**
|
|
* Special node type representing an HTML5 inline comment.
|
|
* Do not initiate this class directly, use the `html('comment')` function:
|
|
*
|
|
* echo html('comment', 'Hidden HTML comment here');
|
|
*
|
|
* @class Comment
|
|
* @extends NodeContainer
|
|
* @constructor
|
|
* @param {String} text the plain text string
|
|
*/
|
|
class Comment extends NodeContainer
|
|
{
|
|
public function __construct($text)
|
|
{
|
|
parent::__construct($text);
|
|
}
|
|
|
|
/**
|
|
* Write to HTML
|
|
* @method __toString
|
|
* @return {String} The string representation of this HTML node
|
|
*/
|
|
public function __toString()
|
|
{
|
|
return '<!-- '.$this->_tag.' -->';
|
|
}
|
|
}
|
|
}
|
|
|
|
?>
|