for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Pilipinews\Common\Converters;
use League\HTMLToMarkdown\Converter\ConverterInterface;
use League\HTMLToMarkdown\ElementInterface;
/**
* Image Converter
*
* @package Pilipinews
* @author Rougin Gutib <[email protected]>
*/
class ImageConverter implements ConverterInterface
{
* Converts the specified element into a parsed string.
* @param \League\HTMLToMarkdown\ElementInterface $element
* @return string
public function convert(ElementInterface $element)
if (! $source = $element->getAttribute('src'))
return '';
}
return "\n\nPHOTO: " . $source . "\n\n";
* Returns the supported HTML tags.
* @return string[]
public function getSupportedTags()
return array('img');