2023-01-11 21:37:48 +01:00
|
|
|
<?php
|
|
|
|
|
2023-02-01 04:05:54 +01:00
|
|
|
namespace SilverStripe\View\Tests\ViewableDataTest;
|
2023-01-11 21:37:48 +01:00
|
|
|
|
|
|
|
use SilverStripe\Dev\TestOnly;
|
|
|
|
use SilverStripe\ORM\DataObject;
|
|
|
|
|
|
|
|
class ViewableDataTestObject extends DataObject implements TestOnly
|
|
|
|
{
|
2023-01-31 00:18:34 +01:00
|
|
|
private string $privateProperty = 'private property';
|
|
|
|
|
|
|
|
protected string $protectedProperty = 'protected property';
|
|
|
|
|
|
|
|
public string $publicProperty = 'public property';
|
|
|
|
|
2023-01-11 21:37:48 +01:00
|
|
|
private function privateMethod(): string
|
|
|
|
{
|
|
|
|
return 'Private function';
|
|
|
|
}
|
|
|
|
|
2023-01-31 00:18:34 +01:00
|
|
|
protected function protectedMethod(): string
|
|
|
|
{
|
|
|
|
return 'Protected function';
|
|
|
|
}
|
|
|
|
|
2023-01-11 21:37:48 +01:00
|
|
|
public function publicMethod(): string
|
|
|
|
{
|
|
|
|
return 'Public function';
|
|
|
|
}
|
|
|
|
}
|