Truncate
Less than 1 minute
Truncate
class Truncate extends \Hazaar\Model\Attribute\BaseProperties
length
The maximum length to truncate the string property to.
private int $lengthMethods
__construct
Constructor for the Truncate attribute.
public __construct(int $length): voidParameters
| Parameter | Type | Description |
|---|---|---|
$length | int | the maximum length to truncate the string property to |
evaluate
Truncates the string property value to the specified maximum length.
public evaluate(mixed $propertyValue, \ReflectionProperty $property): boolParameters
| Parameter | Type | Description |
|---|---|---|
$propertyValue | mixed | the value of the property to truncate (passed by reference) |
$property | \ReflectionProperty | the reflection property instance for metadata (passed by reference) |
getLength
Gets the maximum length to truncate the string property to.
public getLength(): intGenerated by Hazaar API Doc Generator on Tue, 21 Apr 2026 04:00:23 +0000