0 follower

Final Class Yiisoft\Hydrator\Attribute\Parameter\Trim

InheritanceYiisoft\Hydrator\Attribute\Parameter\Trim
ImplementsYiisoft\Hydrator\Attribute\Parameter\ParameterAttributeInterface

Strip whitespace (or other characters) from the beginning and end of a resolved string value.

See also https://www.php.net/manual/function.trim.php.

Public Properties

Hide inherited properties

Property Type Description Defined By
$characters string|null Yiisoft\Hydrator\Attribute\Parameter\Trim

Property Details

Hide inherited properties

$characters public property
public string|null $characters null

Method Details

Hide inherited methods

__construct() public method

public mixed __construct ( string|null $characters null )
$characters string|null

The list all characters that you want to be stripped. With .. you can specify a range of characters.

                public function __construct(
    public readonly ?string $characters = null,
) {
}

            
getResolver() public method

public string getResolver ( )

                public function getResolver(): string
{
    return TrimResolver::class;
}