Reflection
PHP Manual

The ReflectionParameter class

(PHP 5, PHP 7)

Einführung

The ReflectionParameter class retrieves information about function's or method's parameters.

To introspect function parameters, first create an instance of the ReflectionFunction or ReflectionMethod classes and then use their ReflectionFunctionAbstract::getParameters() method to retrieve an array of parameters.

Klassenbeschreibung

ReflectionParameter implements Reflector {
/* Eigenschaften */
public $name ;
/* Methoden */
public bool allowsNull ( void )
public bool canBePassedByValue ( void )
final private void __clone ( void )
public __construct ( string $function , string $parameter )
public static string export ( string $function , string $parameter [, bool $return ] )
public ReflectionClass getClass ( void )
public ReflectionClass getDeclaringClass ( void )
public ReflectionFunctionAbstract getDeclaringFunction ( void )
public mixed getDefaultValue ( void )
public string getDefaultValueConstantName ( void )
public string getName ( void )
public int getPosition ( void )
public ReflectionType getType ( void )
public bool hasType ( void )
public bool isArray ( void )
public bool isCallable ( void )
public bool isDefaultValueAvailable ( void )
public bool isDefaultValueConstant ( void )
public bool isOptional ( void )
public bool isPassedByReference ( void )
public bool isVariadic ( void )
public string __toString ( void )
}

Eigenschaften

name

Name of the parameter. Read-only, throws ReflectionException in attempt to write.

Inhaltsverzeichnis


Reflection
PHP Manual