PHP 클래스 HTMLPurifier_Length, yii

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

보호된 프로퍼티들

프로퍼티 타입 설명
$allowedUnits Array Lookup array of units recognized by CSS 2.1
$isValid Whether or not this length is valid. Null if not calculated yet.
$n String numeric magnitude.
$unit String unit. False is permitted if $n = 0.

공개 메소드들

메소드 설명
__construct ( string $n = '0', boolean | string $u = false )
compareTo ( HTMLPurifier_Length $l ) : integer Compares two lengths, and returns 1 if greater, -1 if less and 0 if equal.
getN ( ) : string Retrieves string numeric magnitude.
getUnit ( ) : string Retrieves string unit.
isValid ( ) : boolean Returns true if this length unit is valid.
make ( string $s ) : HTMLPurifier_Length
toString ( ) : string Returns string representation of number.

보호된 메소드들

메소드 설명
validate ( ) : boolean Validates the number and unit.

메소드 상세

__construct() 공개 메소드

public __construct ( string $n = '0', boolean | string $u = false )
$n string Magnitude
$u boolean | string Unit

compareTo() 공개 메소드

Compares two lengths, and returns 1 if greater, -1 if less and 0 if equal.
public compareTo ( HTMLPurifier_Length $l ) : integer
$l HTMLPurifier_Length
리턴 integer

getN() 공개 메소드

Retrieves string numeric magnitude.
public getN ( ) : string
리턴 string

getUnit() 공개 메소드

Retrieves string unit.
public getUnit ( ) : string
리턴 string

isValid() 공개 메소드

Returns true if this length unit is valid.
public isValid ( ) : boolean
리턴 boolean

make() 공개 정적인 메소드

public static make ( string $s ) : HTMLPurifier_Length
$s string Unit string, like '2em' or '3.4in'
리턴 HTMLPurifier_Length

toString() 공개 메소드

Returns string representation of number.
public toString ( ) : string
리턴 string

validate() 보호된 메소드

Validates the number and unit.
protected validate ( ) : boolean
리턴 boolean

프로퍼티 상세

$allowedUnits 보호되어 있는 정적으로 프로퍼티

Array Lookup array of units recognized by CSS 2.1
protected static $allowedUnits

$isValid 보호되어 있는 프로퍼티

Whether or not this length is valid. Null if not calculated yet.
protected $isValid

$n 보호되어 있는 프로퍼티

String numeric magnitude.
protected $n

$unit 보호되어 있는 프로퍼티

String unit. False is permitted if $n = 0.
protected $unit