PHP 클래스 Eloquent\Phony\Verification\Cardinality

파일 보기 프로젝트 열기: eloquent/phony 1 사용 예제들

공개 메소드들

메소드 설명
__construct ( integer $minimum = 1, integer | null $maximum = null, boolean $isAlways = false ) Construct a new cardinality.
assertSingular ( ) Asserts that this cardinality is suitable for events that can only happen once or not at all.
isAlways ( ) : boolean Returns true if 'always' is enabled.
isNever ( ) : boolean Returns true if this cardinality is 'never'.
matches ( integer | boolean $count, integer $maximumCount ) : boolean Returns true if the supplied count matches this cardinality.
maximum ( ) : integer | null Get the maximum.
minimum ( ) : integer Get the minimum.
setIsAlways ( boolean $isAlways ) Turn 'always' on or off.

메소드 상세

__construct() 공개 메소드

Construct a new cardinality.
public __construct ( integer $minimum = 1, integer | null $maximum = null, boolean $isAlways = false )
$minimum integer The minimum.
$maximum integer | null The maximum, or null for no maximum.
$isAlways boolean True if 'always' should be enabled.

assertSingular() 공개 메소드

Asserts that this cardinality is suitable for events that can only happen once or not at all.
public assertSingular ( )

isAlways() 공개 메소드

Returns true if 'always' is enabled.
public isAlways ( ) : boolean
리턴 boolean True if 'always' is enabled.

isNever() 공개 메소드

Returns true if this cardinality is 'never'.
public isNever ( ) : boolean
리턴 boolean True if this cardinality is 'never'.

matches() 공개 메소드

Returns true if the supplied count matches this cardinality.
public matches ( integer | boolean $count, integer $maximumCount ) : boolean
$count integer | boolean The count or result to check.
$maximumCount integer The maximum possible count.
리턴 boolean True if the supplied count matches this cardinality.

maximum() 공개 메소드

Get the maximum.
public maximum ( ) : integer | null
리턴 integer | null The maximum.

minimum() 공개 메소드

Get the minimum.
public minimum ( ) : integer
리턴 integer The minimum.

setIsAlways() 공개 메소드

Turn 'always' on or off.
public setIsAlways ( boolean $isAlways )
$isAlways boolean True to enable 'always'.