silverstripe-framework/tests/php/View/ViewableDataTest/UnescapedCaster.php

24 lines
391 B
PHP
Raw Normal View History

2016-10-14 03:30:05 +02:00
<?php
namespace SilverStripe\View\Tests\ViewableDataTest;
use SilverStripe\Core\Convert;
use SilverStripe\Dev\TestOnly;
use SilverStripe\View\ViewableData;
class UnescapedCaster extends ViewableData implements TestOnly
{
protected $value;
public function setValue($value)
{
$this->value = $value;
}
public function forTemplate()
{
return Convert::raw2xml($this->value);
}
}