Overview

Namespaces

  • esperecyan
    • webidl
      • lib

Classes

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

Traits

  • Error
  • Overview
  • Namespace
  • Class
  • Tree

Class UnionType

esperecyan\webidl\lib\UnionType uses esperecyan\webidl\lib\Utility (not available)
Namespace: esperecyan\webidl\lib
Internal
Located at lib/UnionType.php
Methods summary
public static mixed
# toUnion( mixed $value, string $unitTypeString, array $pseudoTypes = [] )

与えられた値を、指定された型のいずれか一つに変換して返します。

与えられた値を、指定された型のいずれか一つに変換して返します。

Parameters

$value
$unitTypeString
共用体型。先頭、末尾の丸括弧も含む文字列。
$pseudoTypes
callback interface 型、列挙型、callback 関数型、または dictionary 型の識別子をキーとした型情報の配列。

Returns

mixed

Throws

InvalidArgumentException
指定された型のいずれにも一致しない値が与えられた場合。
DomainException
指定された型のいずれにも一致しない値が与えられた場合。

Link

WebIDL Level 1
WebIDL Level 1
Web IDL
public static (string[]|int)[]
# getFlattenedTypesAndNullableNums( string $unionTypeString )

共用体型の平坦化メンバ型、および nullable メンバ型の個数を返す。

共用体型の平坦化メンバ型、および nullable メンバ型の個数を返す。

Parameters

$unionTypeString

Returns

(string[]|int)[]

flattenedMemberTypesキーの値に平坦化メンバ型の配列、 numberOfNullableMemberTypesキーの値に nullable メンバ型の個数。

Link

WebIDL Level 1
WebIDL Level 1
esperecyan/webidl documentation API documentation generated by ApiGen