mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
37 lines
709 B
PHP
37 lines
709 B
PHP
<?php
|
|
|
|
namespace SilverStripe\View\Tests\SSViewerTest;
|
|
|
|
use SilverStripe\Dev\TestOnly;
|
|
use SilverStripe\View\ViewableData;
|
|
|
|
/**
|
|
* @property string $TextValue
|
|
* @property string $HTMLValue
|
|
*/
|
|
class TestViewableData extends ViewableData implements TestOnly
|
|
{
|
|
|
|
private static $default_cast = 'Text';
|
|
|
|
private static $casting = [
|
|
'TextValue' => 'Text',
|
|
'HTMLValue' => 'HTMLFragment'
|
|
];
|
|
|
|
public function methodWithOneArgument($arg1)
|
|
{
|
|
return "arg1:{$arg1}";
|
|
}
|
|
|
|
public function methodWithTwoArguments($arg1, $arg2)
|
|
{
|
|
return "arg1:{$arg1},arg2:{$arg2}";
|
|
}
|
|
|
|
public function Type($arg)
|
|
{
|
|
return gettype($arg) . ':' . $arg;
|
|
}
|
|
}
|