ReflectionClass::newInstanceWithoutConstructor
(PHP >= 5.4.0)
ReflectionClass::newInstanceWithoutConstructor — コンストラクタを起動せずに新しいクラスのインスタンスを作成する
説明
public object ReflectionClass::newInstanceWithoutConstructor
( void
)
クラスの新しいインスタンスを、そのクラスのコンストラクタを実行せずに作成します。
パラメータ
返り値
エラー / 例外
そのクラスが内部クラスであり、コンストラクタを実行せずにインスタンスを作成することができなかった場合に ReflectionException が発生します。
参考
- ReflectionClass::newInstance() - 指定した引数でクラスの新しいインスタンスを作成する
- ReflectionClass::newInstanceArgs() - 指定した引数でクラスの新しいインスタンスを作成する