Reflection ReflectionParameter 클래스

(PHP 5, PHP 7, PHP 8)


소개

ReflectionParameter 클래스는 함수 또는 메서드의 매개변수에 대한 정보를 검색합니다.

함수 매개변수를 검사하려면 먼저 ReflectionFunction 또는 ReflectionMethod 클래스의 인스턴스를 만든 다음 해당 ReflectionFunctionAbstract::getParameters() 메서드를 사용하여 매개변수 배열을 검색합니다.


클래스 개요

                  
class ReflectionParameter implements Reflector {

  /* Properties */
  public string $name;

  /* Methods */
  public __construct(string|array|object $function, int|string $param)
  public allowsNull(): bool
  public canBePassedByValue(): bool
  private __clone(): void
  public static export(string $function, string $parameter, bool $return = ?): string
  public getAttributes(?string $name = null, int $flags = 0): array
  public getClass(): ?ReflectionClass
  public getDeclaringClass(): ?ReflectionClass
  public getDeclaringFunction(): ReflectionFunctionAbstract
  public getDefaultValue(): mixed
  public getDefaultValueConstantName(): ?string
  public getName(): string
  public getPosition(): int
  public getType(): ?ReflectionType
  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
}
                  
                

Properties

name
매개변수의 이름입니다. 읽기 전용, 쓰기 시도 시 ReflectionException이 발생합니다.

목차