PHP Validation

MethodInterface

Describes Method interface.

Table of Contents

Methods

getMethod()  : callable|null
Retrieve a validation method callback by the given case-sensitive name.
getMethods()  : array<string, callable>
Retrieves all validation method callbacks.
hasMethod()  : bool
Checks if a method exists by the given case-sensitive name.
withMethod()  : static
Return an instance with the provided callback replacing the specified method.
withoutMethod()  : static
Return an instance without the specified method.

Methods

getMethod()

Retrieve a validation method callback by the given case-sensitive name.

public getMethod(string $Name) : callable|null
Parameters
$Name : string

The method name.

Return values
callable|null

getMethods()

Retrieves all validation method callbacks.

public getMethods() : array<string, callable>
Return values
array<string, callable>

hasMethod()

Checks if a method exists by the given case-sensitive name.

public hasMethod(string $Name) : bool
Parameters
$Name : string

The method name.

Return values
bool

withMethod()

Return an instance with the provided callback replacing the specified method.

public withMethod(string $Name, callable $Callback) : static
Parameters
$Name : string

The method name.

$Callback : callable

The method callback.

Return values
static

withoutMethod()

Return an instance without the specified method.

public withoutMethod(string $Name) : static
Parameters
$Name : string

The method name.

Return values
static

        
On this page

Search results