PHP 클래스 Leafo\ScssPhp\Node\Number

{@internal This is a work-in-progress. The \ArrayAccess interface is temporary until the migration is complete.}}
저자: Anthon Pang ([email protected])
상속: extends Leafo\ScssPhp\Node, implements ArrayAccess
파일 보기 프로젝트 열기: leafo/scssphp 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
$dimension integer | float
$precision integer
$units array

보호된 프로퍼티들

프로퍼티 타입 설명
$unitTable array

공개 메소드들

메소드 설명
__construct ( mixed $dimension, mixed $initialUnit ) Initialize number
__toString ( )
coerce ( array $units ) : Number Coerce number to target units
normalize ( ) : Number Normalize number
offsetExists ( $offset )
offsetGet ( $offset )
offsetSet ( $offset, $value )
offsetUnset ( $offset )
output ( Compiler $compiler = null ) : string Output number
unitStr ( ) : string Returns unit(s) as the product of numerator units divided by the product of denominator units
unitless ( ) : boolean Returns true if the number is unitless

비공개 메소드들

메소드 설명
normalizeUnits ( integer | float &$dimension, array &$units, string $baseUnit = 'in' ) Normalize units

메소드 상세

__construct() 공개 메소드

Initialize number
public __construct ( mixed $dimension, mixed $initialUnit )
$dimension mixed
$initialUnit mixed

__toString() 공개 메소드

public __toString ( )

coerce() 공개 메소드

Coerce number to target units
public coerce ( array $units ) : Number
$units array
리턴 Number

normalize() 공개 메소드

Normalize number
public normalize ( ) : Number
리턴 Number

offsetExists() 공개 메소드

public offsetExists ( $offset )

offsetGet() 공개 메소드

public offsetGet ( $offset )

offsetSet() 공개 메소드

public offsetSet ( $offset, $value )

offsetUnset() 공개 메소드

public offsetUnset ( $offset )

output() 공개 메소드

Output number
public output ( Compiler $compiler = null ) : string
$compiler Leafo\ScssPhp\Compiler
리턴 string

unitStr() 공개 메소드

Returns unit(s) as the product of numerator units divided by the product of denominator units
public unitStr ( ) : string
리턴 string

unitless() 공개 메소드

Returns true if the number is unitless
public unitless ( ) : boolean
리턴 boolean

프로퍼티 상세

$dimension 공개적으로 프로퍼티

public int|float $dimension
리턴 integer | float

$precision 공개적으로 정적으로 프로퍼티

public static int $precision
리턴 integer

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

또한 보기: http://www.w3.org/TR/2012/WD-css3-values-20120308/
protected static array $unitTable
리턴 array

$units 공개적으로 프로퍼티

public array $units
리턴 array