<?php
namespace nur\sery\php\content\impl;

use nur\sery\php\content\c;
use nur\sery\php\content\IContent;

class ATag implements IContent {
  function __construct(string $tag, $content=null) {
    $this->tag = $tag;
    $this->content = $content;
  }

  protected $tag;
  protected $content;

  function getContent(): iterable {
    return [
      "<$this->tag>",
      ...c::q($this->content),
      "</$this->tag>",
    ];
  }
}
