for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Benrowe\Formatter\Providers;
use Benrowe\Formatter\AbstractFormatterProvider;
/**
* Provides formatters that produce specific html based output
*
* @package Benrowe\Formatter
*/
class Html extends AbstractFormatterProvider
{
* Format the value as a html link
* @param string $value link
* @return string
public function asLink($value)
if ($value === null) {
return $this->nullValue;
}
return '<a href="'.$value.'">'.$value.'</a>';
* Format the value as a html image
* @param string $value image url
public function asImage($value)
return '<img src="'.$value.'">';