| 1 | <?php |
||
| 13 | abstract class AbstractContentGenerator extends AbstractBasicGenerator |
||
| 14 | { |
||
| 15 | /** |
||
| 16 | * @param Indention $indention |
||
| 17 | * @param null|string|array|GeneratorInterface $content |
||
| 18 | * @throws InvalidArgumentException |
||
| 19 | */ |
||
| 20 | public function __construct(Indention $indention, $content = null) |
||
| 21 | { |
||
| 22 | $this->setIndention($indention); |
||
| 23 | if (!is_null($content)) { |
||
| 24 | $this->add($content); |
||
| 25 | } |
||
| 26 | } |
||
| 27 | |||
| 28 | /** |
||
| 29 | * @param string|array|GeneratorInterface $content |
||
| 30 | * @throws InvalidArgumentException |
||
| 31 | */ |
||
| 32 | abstract public function add($content); |
||
| 33 | |||
| 34 | /** |
||
| 35 | * @return int |
||
| 36 | */ |
||
| 37 | abstract public function count(); |
||
| 38 | } |