Internationalization Collator::setAttribute
Collator::setAttribute
collator_set_attribute
(PHP 5 >= 5.3.0, PHP 7, PHP 8, PECL intl >= 1.0.0)
Collator::setAttribute -- collator_set_attribute — 데이터 정렬 속성 설정
설명
객체 지향 스타일
public Collator::setAttribute(int $attribute
, int $value
): bool
절차적 스타일
collator_set_attribute(Collator $object
, int $attribute
, int $value
): bool
매개변수
object
- Collator object.
attribute
- Attribute.
value
- Attribute value.
반환 값
성공하면 true
를, 실패하면 false
를 반환합니다.
Examples
예제 #1 collator_set_attribute() 예제
<?php
$coll = collator_create( 'en_CA' );
$val = collator_get_attribute( $coll, Collator::NUMERIC_COLLATION );
if ($val === false) {
// Handle error.
} elseif ($val === Collator::ON) {
// Do something useful.
}
?>
기타
- Collator 상수
- collator_get_attribute() - 데이터 정렬 속성 값 가져오기
- collator_set_strength() - 대조 강도 설정