Final Class Yiisoft\Hydrator\Attribute\Parameter\ToArrayOfStrings
| Inheritance | Yiisoft\Hydrator\Attribute\Parameter\ToArrayOfStrings |
|---|---|
| Implements | Yiisoft\Hydrator\Attribute\Parameter\ParameterAttributeInterface |
Casts the resolved value to array of strings.
Public Properties
Public Methods
| Method | Description | Defined By |
|---|---|---|
| __construct() | Yiisoft\Hydrator\Attribute\Parameter\ToArrayOfStrings | |
| getResolver() | Yiisoft\Hydrator\Attribute\Parameter\ToArrayOfStrings |
Property Details
Method Details
| public __construct( boolean $trim = false, boolean $removeEmpty = false, boolean $splitResolvedValue = true, string $separator = '\\R' ): mixed | ||
| $trim | boolean |
Trim each string of array. |
| $removeEmpty | boolean |
Remove empty strings from array. |
| $splitResolvedValue | boolean |
Split non-array resolved value to array of strings by $separator. |
| $separator | string |
The boundary string. It is a part of regular expression so should be taken into account or properly escaped with preg_quote(). |
public function __construct(
public readonly bool $trim = false,
public readonly bool $removeEmpty = false,
public readonly bool $splitResolvedValue = true,
public readonly string $separator = '\R',
) {}
| public getResolver( ): string |
public function getResolver(): string
{
return ToArrayOfStringsResolver::class;
}
Signup or Login in order to comment.