Neuron-PHP

IsTime extends Base
in package

Requires time to be in a specific format. Defaults to g:i:s A

Table of Contents

Properties

$_format  : string

Methods

__construct()  : mixed
getFormat()  : string
isValid()  : bool
Returns true if validation is successful
setFormat()  : void
validate()  : bool
Abstract method to be implemented by all validators.

Properties

$_format

private string $_format = 'g:i:s A'

Methods

__construct()

public __construct() : mixed

getFormat()

public getFormat() : string
Return values
string

isValid()

Returns true if validation is successful

public isValid(mixed $value) : bool
Parameters
$value : mixed
Return values
bool

setFormat()

public setFormat(string $format) : void
Parameters
$format : string

validate()

Abstract method to be implemented by all validators.

protected validate(mixed $value) : bool
Parameters
$value : mixed
Return values
bool

        
On this page

Search results