« ReflectionReference::getId
ReflectionAttribute::__construct »

ReflectionAttribute クラス

(PHP 8)

はじめに

ReflectionAttribute クラスは、 アトリビュート に関する情報を提供します。

クラス概要

class ReflectionAttribute implements Reflector {
/* 定数 */
public const int IS_INSTANCEOF;
/* プロパティ */
public string $name;
/* メソッド */
private function __construct()
public function getArguments(): array
public function getName(): string
public function getTarget(): int
public function isRepeated(): bool
public function newInstance(): object
}

プロパティ

name

アトリビュート名。

定義済み定数

ReflectionAttribute のフラグ

ReflectionAttribute::IS_INSTANCEOF int

instanceof のチェックを使い、 アトリビュートを取得します。

注意:

これらの定数の値は、 PHP のバージョンによっては変更される可能性があります。 値そのものに依存せず、定数を使うことを推奨します。

変更履歴

バージョン 説明
8.4.0 すべてのクラス定数が型付けされました。
8.4.0 ReflectionAttribute::$name プロパティが追加されました。

目次

関連キーワード:
ReflectionAttribute   アトリビュート   定数   construct   プロパティ   private   getArguments   getName   getTarget   isRepeated   newInstance   インスタンス   ReflectionReference   getId   リフレクション   提供   概要   implements   Reflector   フラグ   instanceof   チェック   可能性   依存   推奨
関連する関数・ページ:
reflectionattribute.getname   reflectionattribute.getarguments   reflectionattribute.newinstance   reflectionattribute.isrepeated   reflectionattribute.gettarget   reflectionattribute.construct