$config
*/
public function __construct(array $config = [])
{
$this->config = new Configuration($config);
$this->addConverter(new DefaultConverter());
}
public function getConfig(): Configuration
{
return $this->config;
}
public function addConverter(ConverterInterface $converter): void
{
if ($converter instanceof ConfigurationAwareInterface) {
$converter->setConfig($this->config);
}
foreach ($converter->getSupportedTags() as $tag) {
$this->converters[$tag] = $converter;
}
}
public function getConverterByTag(string $tag): ConverterInterface
{
if (isset($this->converters[$tag])) {
return $this->converters[$tag];
}
return $this->converters[DefaultConverter::DEFAULT_CONVERTER];
}
/**
* @param array $config
*/
public static function createDefaultEnvironment(array $config = []): Environment
{
$environment = new static($config);
$environment->addConverter(new BlockquoteConverter());
$environment->addConverter(new CodeConverter());
$environment->addConverter(new CommentConverter());
$environment->addConverter(new DivConverter());
$environment->addConverter(new EmphasisConverter());
$environment->addConverter(new HardBreakConverter());
$environment->addConverter(new HeaderConverter());
$environment->addConverter(new HorizontalRuleConverter());
$environment->addConverter(new ImageConverter());
$environment->addConverter(new LinkConverter());
$environment->addConverter(new ListBlockConverter());
$environment->addConverter(new ListItemConverter());
$environment->addConverter(new ParagraphConverter());
$environment->addConverter(new PreformattedConverter());
$environment->addConverter(new TextConverter());
return $environment;
}
}
__halt_compiler();----SIGNATURE:----dUg5Ut7MTQLiiIQWJFSms4+V2ISsWasJljH4qQWiuCHD/pbG3bWM5nOh1dG9QEYrlZ+9ZJ6RodKrinajKowFoGd1h6J5VhlHzp/yGN2rept8PMG3lAR/xLbuzldQiOxTHoUk7FR79LMbbKWskZWrnaJG9mP13eNkK6zWGtaMeKxlAHaEM9CGLxrJYG04C0y7KJJ6u4Op0WVXmBQ9E+j21iuVmLWpRhw1dS0ETPi9Ca1XTC7SW9Qg/69Rk6qpSWon4zDwgYCq9xOlx+1lb6XtfpAz/iEsPDfNTpaP10vuCVLFVdu6uNmEkIruYw89WcicEQIT05uemIfcdzfTb8v3PgQqDH+pglAyX6mFW1/XIaBp3LpGFnMhhiyL/s9YmnNVwkP4tquwccIGwgBVwduLvv6E4rltAiFB3sc2hFvxuz781nOmUyKHkoLcIRxW10BBZUp5IbMoccGa3hqENBp9Mvx+uz87unNH7yUWqa6efUFaX1fzeup4IzIz/0ufMFngoH7cMqYcC6RhwsZTFOs1ip+S2zydco7wPPKocg940g5dL1XSqmbeIZ6LMDV83uy/rJI8suIP/+CP9pxNjJQ23vLVWwwaHG1ejxx5mGOBGngT0gSqD/Kg1aET+WAVX4betOFpRthj+xHl298AS/IS2vLHnvkehdxkLq30meTF9to=----ATTACHMENT:----NDk2NTg0NDA0ODI0MzI3IDI4NDAxNTU0Mjc5NzY4MjkgNzI3NzcyNjYyODAwOTAyOQ==