downloads | documentation | faq | getting help | mailing lists | licenses | wiki | reporting bugs | php.net sites | conferences | my php.net

search for in the

ReflectionClass::newInstanceArgs> <ReflectionClass::isUserDefined
[edit] Last updated: Fri, 17 May 2013

view this page in

ReflectionClass::newInstance

(PHP 5)

ReflectionClass::newInstance指定した引数でクラスの新しいインスタンスを作成する

説明

public object ReflectionClass::newInstance ( mixed $args [, mixed $... ] )

クラスの新しいインスタンスを作成します。指定した引数をクラスのコンストラクタに渡します。

パラメータ

args

可変長の引数を受け付け、それを call_user_func() と同じ方式でクラスのコンストラクタに渡します。

返り値

エラー / 例外

コンストラクタが public でない場合は ReflectionException が発生します。

クラスにコンストラクタがないときに args を指定すると ReflectionException が発生します。

参考



add a note add a note User Contributed Notes ReflectionClass::newInstance - [0 notes]
There are no user contributed notes for this page.

 
show source | credits | sitemap | contact | advertising | mirror sites