mirror of
https://github.com/Mibew/CanteenHTML5.git
synced 2025-04-20 21:27:24 +03:00
39 lines
669 B
PHP
39 lines
669 B
PHP
<?php
|
|
|
|
/**
|
|
* @module Canteen\HTML5
|
|
*/
|
|
namespace Canteen\HTML5
|
|
{
|
|
/**
|
|
* Special Node representing plain text. Do not initiate this
|
|
* class directly, it is created whenever a text is passed into
|
|
* a container tag:
|
|
*
|
|
* echo html('p', 'Some Text Here');
|
|
*
|
|
* @class Text
|
|
* @extends Node
|
|
* @constructor
|
|
* @param {String} text the plain text string
|
|
*/
|
|
class Text extends Node
|
|
{
|
|
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;
|
|
}
|
|
}
|
|
}
|
|
|
|
?>
|