« PHP 8.3 Manual トップ
著作権 »
per page, with , order by , clip by
Results of 1 - 10 of about 10 for rClass (0.001 sec.)
ReflectionProperty::getSettableType — set フックのパラメータの型を返す | PHP 8.... 11602
ReflectionProperty::getSettableType (PHP 8 >= 8.4.0) ReflectionProperty::getSettableType — set フックのパラメータの型を返す 説明 public function ReflectionProperty::getSettableType (): ? ReflectionType set フックに指定されたパラメータの型を ... le $value ) => (string) $value ; } public string $virtual { get => 'Do not change this' ; } public $untyped = 'silly' ; } $rClass = new \ReflectionClass ( Example ::class); var_dump ( $rClass -> getProperty ( 'basic' )-> getSettableType ()); var_dump ( ... $rClass -> getProperty ( 'wider' )-> getSettableType ()); var_dump ( $rClass -> getProperty ( 'virtual' )-> getSettableType ()); v ... ar_dump ( $rClass -> getProperty ( 'untyped' )-> getSettableType ()); ?> 上の例の出力は以下となります。 object(ReflectionNamedType)#3 (0) { ...
https://man.mtool.work/php/8.3/reflectionproperty.getsettabletype.html
ReflectionProperty::isFinal — プロパティが final かどうかを判定する | PHP 8.3 11048
ReflectionProperty::isFinal (PHP 8 >= 8.4.0) ReflectionProperty::isFinal — プロパティが final かどうかを判定する 説明 public function ReflectionProperty::isFinal (): bool 警告 この関数は、 現在のところ詳細な情報はありません。引数のリストのみ ... isFinal() の例 <?php class Example { public string $name ; final protected int $age ; public private(set) string $job ; } $rClass = new \ReflectionClass ( Example ::class); var_dump ( $rClass -> getProperty ( 'name' )-> isFinal ()); var_dump ( $rClass ... -> getProperty ( 'age' )-> isFinal ()); var_dump ( $rClass -> getProperty ( 'job' )-> isFinal ()); ?> 上の例の出力は以下となります。 bool(false) bool(true) bool(true) 参考 final キー ...
https://man.mtool.work/php/8.3/reflectionproperty.isfinal.html
ReflectionProperty::isVirtual — プロパティが仮想プロパティかどうかを判定する | ... 10780
ReflectionProperty::isVirtual (PHP 8 >= 8.4.0) ReflectionProperty::isVirtual — プロパティが仮想プロパティかどうかを判定する 説明 public function ReflectionProperty::isVirtual (): bool プロパティが仮想プロパティかどうかを判定します。 パラメー ... umentException (); } $this -> age = $value ; } } // フックがないプロパティは常に仮想プロパティです public string $job ; } $rClass = new \ReflectionClass ( Example ::class); var_dump ( $rClass -> getProperty ( 'name' )-> isVirtual ()); var_dump ( $rClas ... s -> getProperty ( 'age' )-> isVirtual ()); var_dump ( $rClass -> getProperty ( 'job' )-> isVirtual ()); ?> 上の例の出力は以下となります。 bool(true) bool(false) bool(false) 参考 仮想プ ...
https://man.mtool.work/php/8.3/reflectionproperty.isvirtual.html
ReflectionProperty::hasHooks — プロパティに何かしらのフックが定義されているかど... 9385
ReflectionProperty::hasHooks (PHP 8 >= 8.4.0) ReflectionProperty::hasHooks — プロパティに何かしらのフックが定義されているかどうかを返す 説明 public function ReflectionProperty::hasHooks (): bool 警告 この関数は、 現在のところ詳細な情報はあり ... ctionProperty::hasHooks() の例 <?php class Example { public string $name { get => "Name here" ; } public string $none ; } $rClass = new \ReflectionClass ( Example ::class); var_dump ( $rClass -> getProperty ( 'name' )-> hasHooks ()); var_dump ( $rClass ...
https://man.mtool.work/php/8.3/reflectionproperty.hashooks.html
ReflectionProperty::getHooks — このプロパティに指定された全てのフックを配列で返... 9242
ReflectionProperty::getHooks (PHP 8 >= 8.4.0) ReflectionProperty::getHooks — このプロパティに指定された全てのフックを配列で返す 説明 public function ReflectionProperty::getHooks (): array このプロパティに指定された全てのフックを配列で返しま ... lectionProperty::getHooks() の例 <?php class Example { public string $name { get => "Name here" ; } public int $count ; } $rClass = new \ReflectionClass ( Example ::class); $rProp = $rClass -> getProperty ( 'name' ); var_dump ( $rProp -> getHooks ()); ... $rProp = $rClass -> getProperty ( 'count' ); var_dump ( $rProp -> getHooks ()); ?> 上の例の出力は以下となります。 array(1) { ["get"]=> obje ...
https://man.mtool.work/php/8.3/reflectionproperty.gethooks.html
ReflectionProperty::hasHook — プロパティに指定されたフックが定義されているかど... 8277
ReflectionProperty::hasHook (PHP 8 >= 8.4.0) ReflectionProperty::hasHook — プロパティに指定されたフックが定義されているかどうかを返す 説明 public function ReflectionProperty::hasHook ( PropertyHookType $type ): bool プロパティに指定されたフ ... を返します。 例 例1 ReflectionProperty::hasHook() の例 <?php class Example { public string $name { get => "Name here" ; } } $rClass = new \ReflectionClass ( Example ::class); $rProp = $rClass -> getProperty ( 'name' ); var_dump ( $rProp -> hasHook ( Prop ...
https://man.mtool.work/php/8.3/reflectionproperty.hashook.html
ReflectionProperty::getHook — 指定したフックに対応するリフレクションオブジェク... 8134
ReflectionProperty::getHook (PHP 8 >= 8.4.0) ReflectionProperty::getHook — 指定したフックに対応するリフレクションオブジェクトを返す 説明 public function ReflectionProperty::getHook ( PropertyHookType $type ): ? ReflectionMethod プロパティフ ... を返します。 例 例1 ReflectionProperty::getHook() の例 <?php class Example { public string $name { get => "Name here" ; } } $rClass = new \ReflectionClass ( Example ::class); $rProp = $rClass -> getProperty ( 'name' ); var_dump ( $rProp -> getHook ( Prop ...
https://man.mtool.work/php/8.3/reflectionproperty.gethook.html
ReflectionProperty::getRawValue — get フックが定義されていたとしても、それを迂... 7723
ReflectionProperty::getRawValue (PHP 8 >= 8.4.0) ReflectionProperty::getRawValue — get フックが定義されていたとしても、それを迂回してプロパティの値を返す 説明 public function ReflectionProperty::getRawValue ( object $object ): mixed 警告 こ ... ample { public string $tag { get => strtolower ( $this -> tag ); } } $example = new Example (); $example -> tag = 'PHP' ; $rClass = new \ReflectionClass ( Example ::class); $rProp = $rClass -> getProperty ( 'tag' ); // getフックを経由した値なので、"php ...
https://man.mtool.work/php/8.3/reflectionproperty.getrawvalue.html
ReflectionProperty::setRawValue — set フックが定義されていたとしても、それを迂... 7723
ReflectionProperty::setRawValue (PHP 8 >= 8.4.0) ReflectionProperty::setRawValue — set フックが定義されていたとしても、それを迂回してプロパティの値を設定する 説明 public function ReflectionProperty::setRawValue ( object $object , mixed $val ... { if ( $value <= 0 ) { throw new \InvalidArgumentException (); } $this -> age = $value ; } } } $example = new Example (); $rClass = new \ReflectionClass ( Example ::class); $rProp = $rClass -> getProperty ( 'age' ); // フックを経由して値を設定し、例外が ...
https://man.mtool.work/php/8.3/reflectionproperty.setrawvalue.html
コマンドラインオプション | PHP 8.3 5363
コマンドラインオプション PHP バイナリにより提供されるコマンドラインオプションの一覧は、 -h スイッチを指定して PHP を実行することにより いつでも調べることができます。 Usage: php [options] [-f] <file> [--] [args...] php [options] -r <code> [- ... blic function var_dump ] { - Parameters [2] { Parameter #0 [ <required> $var ] Parameter #1 [ <optional> $... ] } } --rc --rclass 指定したクラスについての情報 (定数、プロパティおよびメソッドの一覧) を表示します。 このオプションは、PHP が リフレクション ...
https://man.mtool.work/php/8.3/features.commandline.options.html
PREV 1 NEXT