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;
/**
* @package Benrowe\Formatter
*/
class Base extends AbstractFormatterProvider
{
public $booleanFormat = ['No', 'Yes'];
* Handle the raw content
*
* @param mixed $value
* @return mixed
public function asRaw($value)
if ($value === null) {
return $this->nullValue;
}
return $value;
* As text
* @return string
public function asText($value)
return htmlentities($value);
* Format the value using the boolean values
public function asBoolean($value)
return $value ? $this->booleanFormat[1] : $this->booleanFormat[0];