production/vendor/spipu/html2pdf/src/Extension/AbstractExtension.php
2025-12-02 11:29:44 +00:00

45 lines
817 B
PHP
Executable File

<?php
/**
* Html2Pdf Library
*
* HTML => PDF converter
* distributed under the OSL-3.0 License
*
* @package Html2pdf
* @author Laurent MINGUET <webmaster@html2pdf.fr>
* @copyright 2025 Laurent MINGUET
*/
namespace Spipu\Html2Pdf\Extension;
use Spipu\Html2Pdf\Tag\TagInterface;
/**
* Class AbstractExtension
*/
abstract class AbstractExtension implements ExtensionInterface
{
/**
* @var array
*/
protected $tagDefinitions = array();
/**
* {@inheritDoc}
*/
public function getTags()
{
if (empty($this->tagDefinitions)) {
$this->tagDefinitions = $this->initTags();
}
return $this->tagDefinitions;
}
/**
* Init the tags
*
* @return TagInterface[]
*/
abstract protected function initTags();
}