ReflectionParameter クラス

(PHP 5, PHP 7)

はじめに

ReflectionParameter クラスは、 関数またはメソッドのパラメータに関する情報を取得します。

関数パラメータの内部を調べる際には、まず ReflectionFunction クラスまたは ReflectionMethod クラスのインスタンスを作成する必要があります。次に、 ReflectionFunctionAbstract::getParameters() メソッドを使ってパラメータの配列を取得します。

クラス概要

ReflectionParameter implements Reflector {
/* プロパティ */
public $name ;
/* メソッド */
public __construct ( string|array|object $function , int|string $param )
public allowsNull ( ) : bool
public canBePassedByValue ( ) : bool
final private __clone ( ) : void
public static export ( string $function , string $parameter , bool $return = ? ) : string
public getClass ( ) : ReflectionClass|null
public getDefaultValue ( ) : mixed
public getDefaultValueConstantName ( ) : string|null
public getName ( ) : string
public getPosition ( ) : int
public getType ( ) : ReflectionType|null
public hasType ( ) : bool
public isArray ( ) : bool
public isCallable ( ) : bool
public isDefaultValueAvailable ( ) : bool
public isDefaultValueConstant ( ) : bool
public isOptional ( ) : bool
public isPassedByReference ( ) : bool
public isVariadic ( ) : bool
public __toString ( ) : string
}

プロパティ

name

パラメータ名。読み込み専用で、書き込もうとすると ReflectionException をスローします。

目次