ReflectionClass クラス
(PHP 5, PHP 7, PHP 8)
はじめに
ReflectionClass クラスは クラスについての情報を報告します。
クラス概要
/* 定数 */
/* プロパティ */
/* メソッド */
}プロパティ
- name
-
クラス名。読み込み専用で、書き込もうとすると ReflectionException をスローします。
定義済み定数
ReflectionClass の修飾子
ReflectionClass::IS_IMPLICIT_ABSTRACT
-
抽象メソッドを持っているので abstract クラスであることを示します。
ReflectionClass::IS_EXPLICIT_ABSTRACT
-
その定義から abstract クラスであることを示します。
ReflectionClass::IS_FINAL
-
final クラスであることを示します。
ReflectionClass::IS_READONLY
-
readonly クラスであることを示します。
変更履歴
バージョン | 説明 |
---|---|
8.0.0 | ReflectionClass::export() は、削除されました。 |
目次
- ReflectionClass::__construct — ReflectionClass を作成する
- ReflectionClass::export — クラスをエクスポートする
- ReflectionClass::getAttributes — アトリビュートを取得する
- ReflectionClass::getConstant — 定義されている定数を取得する
- ReflectionClass::getConstants — 定数を取得する
- ReflectionClass::getConstructor — クラスのコンストラクタを取得する
- ReflectionClass::getDefaultProperties — デフォルトプロパティを取得する
- ReflectionClass::getDocComment — ドキュメントコメントを取得する
- ReflectionClass::getEndLine — 終了行を取得する
- ReflectionClass::getExtension — クラスを定義する拡張モジュールを表す ReflectionExtension オブジェクトを取得する
- ReflectionClass::getExtensionName — クラスを定義する拡張モジュールの名前を取得する
- ReflectionClass::getFileName — クラスが定義されているファイルのファイル名を取得する
- ReflectionClass::getInterfaceNames — インターフェイスの名前を取得する
- ReflectionClass::getInterfaces — インターフェイスを取得する
- ReflectionClass::getMethod — クラスメソッドの ReflectionMethod を取得する
- ReflectionClass::getMethods — メソッドの配列を取得する
- ReflectionClass::getModifiers — クラス修飾子を取得する
- ReflectionClass::getName — クラスの名前を取得する
- ReflectionClass::getNamespaceName — 名前空間の名前を取得する
- ReflectionClass::getParentClass — 親クラスを取得する
- ReflectionClass::getProperties — プロパティを取得する
- ReflectionClass::getProperty — クラスのプロパティを表す ReflectionProperty を取得する
- ReflectionClass::getReflectionConstant — クラス定数の ReflectionClassConstant を取得する
- ReflectionClass::getReflectionConstants — クラス定数を取得する
- ReflectionClass::getShortName — 短い名前を取得する
- ReflectionClass::getStartLine — 開始行を取得する
- ReflectionClass::getStaticProperties — staticプロパティを取得する
- ReflectionClass::getStaticPropertyValue — staticプロパティの値を取得する
- ReflectionClass::getTraitAliases — トレイトのエイリアスの配列を返す
- ReflectionClass::getTraitNames — このクラスが使うトレイトの名前の配列を返す
- ReflectionClass::getTraits — このクラスが使うトレイトの配列を返す
- ReflectionClass::hasConstant — 定数が定義されているかどうかを調べる
- ReflectionClass::hasMethod — メソッドが定義されているかどうかを調べる
- ReflectionClass::hasProperty — プロパティが定義されているかどうかを調べる
- ReflectionClass::implementsInterface — インターフェイスの実装を調べる
- ReflectionClass::inNamespace — 名前空間内にあるかどうかを調べる
- ReflectionClass::isAbstract — 抽象クラスであるかどうかを調べる
- ReflectionClass::isAnonymous — クラスが無名クラスかを調べる
- ReflectionClass::isCloneable — このクラスがクローン可能かどうかを返す
- ReflectionClass::isEnum — 列挙型であるかどうかを返す
- ReflectionClass::isFinal — final クラスであるかどうかを調べる
- ReflectionClass::isInstance — クラスのインスタンスであるかどうかを調べる
- ReflectionClass::isInstantiable — クラスのインスタンス化が可能であるかどうかを調べる
- ReflectionClass::isInterface — このクラスがインターフェイスであるかどうかを調べる
- ReflectionClass::isInternal — 拡張モジュールあるいはコアで定義された内部クラスであるかどうかを調べる
- ReflectionClass::isIterable — このクラスがイテレーション可能かを調べる
- ReflectionClass::isIterateable — のエイリアス ReflectionClass::isIterable
- ReflectionClass::isReadOnly — クラスが readonly かを調べる
- ReflectionClass::isSubclassOf — サブクラスであるかどうかを調べる
- ReflectionClass::isTrait — トレイトであるかどうかを返す
- ReflectionClass::isUserDefined — ユーザー定義であるかどうかを調べる
- ReflectionClass::newInstance — 指定した引数でクラスの新しいインスタンスを作成する
- ReflectionClass::newInstanceArgs — 指定した引数でクラスの新しいインスタンスを作成する
- ReflectionClass::newInstanceWithoutConstructor — コンストラクタを起動せずに新しいクラスのインスタンスを作成する
- ReflectionClass::setStaticPropertyValue — staticプロパティの値を設定する
- ReflectionClass::__toString — ReflectionClass オブジェクトの文字列表現を返す