Files
ulmus/src/Attribute/Property/Virtual.php
T

23 lines
524 B
PHP

<?php
namespace Ulmus\Attribute\Property;
#[\Attribute(\Attribute::TARGET_PROPERTY)]
class Virtual extends Field implements ResettablePropertyInterface {
public bool $readonly = true;
public function __construct(
public null|string|array $method = null,
public ? \Closure $closure = null,
public null|string $name = null,
) {
$this->method ??= [ static::class, 'noop' ];
}
public static function noop() : null
{
return null;
}
}