PHP 클래스 Bravo3\Orm\Services\ScoreNormaliser

파일 보기 프로젝트 열기: bravo3/orm

공개 메소드들

메소드 설명
score ( mixed $item ) : float Return the score using the best scoring match for the given item
scoreArray ( array $item ) : float Return the score of an array, by counting its elements
scoreDateTime ( DateTime $item ) : float Return the score of a DateTime object
scoreNumber ( integer | float $item ) : float Return the score of a number
scoreObject ( object | Bravo3\Orm\Traits\ScorableInterface $item ) : float Return the score of an object
scoreString ( string $item ) : float Return the score of a string as a numeric representation

보호된 메소드들

메소드 설명
getCharacterScore ( string $c ) : string | null Get the score of a character as a 2-char string

메소드 상세

getCharacterScore() 보호된 메소드

Returns null if the character is not a non-printable ASCII char
protected getCharacterScore ( string $c ) : string | null
$c string
리턴 string | null

score() 공개 메소드

Return the score using the best scoring match for the given item
public score ( mixed $item ) : float
$item mixed
리턴 float

scoreArray() 공개 메소드

Return the score of an array, by counting its elements
public scoreArray ( array $item ) : float
$item array
리턴 float

scoreDateTime() 공개 메소드

Return the score of a DateTime object
public scoreDateTime ( DateTime $item ) : float
$item DateTime
리턴 float

scoreNumber() 공개 메소드

Return the score of a number
public scoreNumber ( integer | float $item ) : float
$item integer | float
리턴 float

scoreObject() 공개 메소드

Return the score of an object
public scoreObject ( object | Bravo3\Orm\Traits\ScorableInterface $item ) : float
$item object | Bravo3\Orm\Traits\ScorableInterface
리턴 float

scoreString() 공개 메소드

Return the score of a string as a numeric representation
public scoreString ( string $item ) : float
$item string
리턴 float