Collator::getAttribute
collator_get_attribute
(PHP 5 >= 5.3.0, PHP 7, PECL intl >= 1.0.0)
Collator::getAttribute -- collator_get_attribute — 照合用の属性の値を取得する
説明
オブジェクト指向型
public
Collator::getAttribute
( int $attr
) : int
手続き型
collator_get_attribute
( Collator $coll
, int $attr
) : int
collator の属性の値を取得します。
返り値
属性の値、あるいはエラー時に bool false
を返します。
例
例1 collator_get_attribute() の例
<?php$coll = collator_create( 'en_CA' );$val = collator_get_attribute( $coll, Collator::NUMERIC_COLLATION );if( $val === false ){ // エラー処理}?>
参考
- [[Php/docs/class.collator#intl|]]Collator の定数
- collator_set_attribute() - 照合用の属性を設定する
- collator_get_strength() - 現在の照合強度を取得する