1010namespace Nette \Utils ;
1111
1212use Nette ;
13+ use Nette \HtmlStringable ;
1314use function is_array , is_float , is_object , is_string ;
1415
1516
230231 * @method self width(?int $val)
231232 * @method self wrap(?string $val)
232233 */
233- class Html implements \ArrayAccess, \Countable, \IteratorAggregate, IHtmlString
234+ class Html implements \ArrayAccess, \Countable, \IteratorAggregate, HtmlStringable
234235{
235236 use Nette \SmartObject;
236237
@@ -548,7 +549,7 @@ public function data(string $name, $value = null)
548549
549550 /**
550551 * Sets element's HTML content.
551- * @param IHtmlString |string $html
552+ * @param HtmlStringable |string $html
552553 * @return static
553554 */
554555 final public function setHtml ($ html )
@@ -569,12 +570,12 @@ final public function getHtml(): string
569570
570571 /**
571572 * Sets element's textual content.
572- * @param IHtmlString |string|int|float $text
573+ * @param HtmlStringable |string|int|float $text
573574 * @return static
574575 */
575576 final public function setText ($ text )
576577 {
577- if (!$ text instanceof IHtmlString ) {
578+ if (!$ text instanceof HtmlStringable ) {
578579 $ text = htmlspecialchars ((string ) $ text , ENT_NOQUOTES , 'UTF-8 ' );
579580 }
580581 $ this ->children = [(string ) $ text ];
@@ -593,7 +594,7 @@ final public function getText(): string
593594
594595 /**
595596 * Adds new element's child.
596- * @param IHtmlString |string $child Html node or raw HTML string
597+ * @param HtmlStringable |string $child Html node or raw HTML string
597598 * @return static
598599 */
599600 final public function addHtml ($ child )
@@ -604,12 +605,12 @@ final public function addHtml($child)
604605
605606 /**
606607 * Appends plain-text string to element content.
607- * @param IHtmlString |string|int|float $text
608+ * @param HtmlStringable |string|int|float $text
608609 * @return static
609610 */
610611 public function addText ($ text )
611612 {
612- if (!$ text instanceof IHtmlString ) {
613+ if (!$ text instanceof HtmlStringable ) {
613614 $ text = htmlspecialchars ((string ) $ text , ENT_NOQUOTES , 'UTF-8 ' );
614615 }
615616 return $ this ->insert (null , $ text );
@@ -630,7 +631,7 @@ final public function create(string $name, $attrs = null)
630631
631632 /**
632633 * Inserts child node.
633- * @param IHtmlString |string $child Html node or raw HTML string
634+ * @param HtmlStringable |string $child Html node or raw HTML string
634635 * @return static
635636 */
636637 public function insert (?int $ index , $ child , bool $ replace = false )
0 commit comments