Overview

Namespaces

  • esperecyan
    • webidl
      • lib

Classes

  • BooleanType
  • DictionaryType
  • FloatType
  • IntegerType
  • NullableType
  • ObjectType
  • SequenceType
  • StringType
  • Type
  • UnionType

Traits

  • Error
  • Overview
  • Namespace
  • Class
  • Tree

Class StringType

esperecyan\webidl\lib\StringType uses esperecyan\webidl\lib\Utility (not available)
Namespace: esperecyan\webidl\lib
Internal
Located at lib/StringType.php
Methods summary
public static boolean
# isStringCastable( mixed $value )

与えられた値が文字列型に変換可能であれば真を返します。

与えられた値が文字列型に変換可能であれば真を返します。

次の型の値が文字列型に変換可能であるとみなされます。 論理型。整数型。浮動小数点型。文字列型。null型。オブジェクト型のうち、__toString()メソッドを持つインスタンス。

Parameters

$value

Returns

boolean
public static string
# toDOMString( boolean|integer|float|string|object|null $value )

toUSVString() のエイリアスです。

toUSVString() のエイリアスです。

Parameters

$value

Returns

string

Link

WebIDL Level 1
public static string
# toByteString( boolean|integer|float|string|object|null $value )

与えられた値を文字列型に変換して返します。

与えられた値を文字列型に変換して返します。

Parameters

$value

Returns

string

Throws

InvalidArgumentException
配列、__toString()メソッドなどを持たないオブジェクト、またはリソースが与えられた場合。

Link

WebIDL Level 1
public static string
# toUSVString( boolean|integer|float|string|object|null $value )

与えられた値を、符号化方式が UTF-8 である文字列型に変換して返します。

与えられた値を、符号化方式が UTF-8 である文字列型に変換して返します。

Parameters

$value

Returns

string

Throws

InvalidArgumentException
符号化方式が UTF-8 でない文字列、配列、__toString()メソッドなどを持たないオブジェクト、またはリソースが与えられた場合。

Link

WebIDL Level 1
public static string
# toEnumerationValue( string $value, string $identifier, string[] $enum )

与えられた値を文字列型に変換し、列挙値のいずれかに一致するかチェックして返します。

与えられた値を文字列型に変換し、列挙値のいずれかに一致するかチェックして返します。

Parameters

$value
$identifier
列挙型の識別子。
$enum
列挙値の配列。

Returns

string

Throws

InvalidArgumentException
$value が文字列化できない場合。
DomainException
$value が $enum で与えられた列挙値のいずれにも一致しなかった場合。
esperecyan/webidl documentation API documentation generated by ApiGen