Methods summary
public static
mixed
|
#
to( string $type, mixed $value, integer $argNum = 0, (string|string[]|array)[] $pseudoTypes = [] )
Converts a given value in accordance with a given IDL type.
Converts a given value in accordance with a given IDL type.
Parameters
- $type
- The IDL type.
- $value
- The value being converted.
- $argNum
The argument offset that received the value being converted.
Arguments are counted starting from zero. If the caller method is __set(), this argument are ignored.
- $pseudoTypes
associative array with the identifiers of
callback interface types, enumeration types, callback function types or dictionary types
(the strings passed in $type) as key.
For the corresponding values, see the link.
Returns
mixed
Throws
InvalidArgumentException
If $value is not castable. The exception includes a message with method name etc.
DomainException If $value is not castable. The exception includes a message with method name etc.
Link
|
public static
|
#
throwReadonlyException( )
Throws an exception with a message that represents a read-only property. Must call from __set() method.
Throws an exception with a message that represents a read-only property. Must call from __set() method.
Throws
BadMethodCallException 呼び出し元のメソッドが __set() 以外の場合。
LogicException An exception with a message that represents a read-only property.
Link
|
public static
|
#
triggerVisibilityErrorOrDefineProperty( )
If a user tries setting to a private or protected property, it will trigger a fatal error.
If a user tries setting to a non-existing property, it will create a new public property.
Must call from __set() method.
If a user tries setting to a private or protected property, it will trigger a fatal error.
If a user tries setting to a non-existing property, it will create a new public property.
Must call from __set() method.
Throws
BadMethodCallException 呼び出し元のメソッドが __set() 以外の場合。
Link
|
public static
|
#
triggerVisibilityErrorOrUndefinedNotice( )
If a user tries setting to a private or protected property, it will trigger a fatal error.
If a user tries getting to a non-existing property, it will trigger a notice. Must call from __get() method.
If a user tries setting to a private or protected property, it will trigger a fatal error.
If a user tries getting to a non-existing property, it will trigger a notice. Must call from __get() method.
Throws
BadMethodCallException 呼び出し元のメソッドが __get() 以外の場合。
Link
|