1
0
mirror of https://github.com/php/doc-ja.git synced 2026-03-24 07:02:08 +01:00
Files
Yoshinari Takaoka 996fb2ce5d [PHP 8.4] プロパティフック関係の、Reflection まわりの追加変更に追随
但し、 #271 で問題になっている propertyhooktype.xml は除く。
2025-09-07 16:22:39 +09:00

103 lines
2.7 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<!-- EN-Revision: a16ad380e58039833f84dac4ad95893104868338 Maintainer: mumumu Status: ready -->
<refentry xml:id="reflectionproperty.hashooks" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
<refnamediv>
<refname>ReflectionProperty::hasHooks</refname>
<refpurpose>プロパティに何かしらのフックが定義されているかどうかを返す</refpurpose>
</refnamediv>
<refsect1 role="description">
&reftitle.description;
<methodsynopsis role="ReflectionProperty">
<modifier>public</modifier> <type>bool</type><methodname>ReflectionProperty::hasHooks</methodname>
<void/>
</methodsynopsis>
&warn.undocumented.func;
<simpara>
プロパティに何かしらのフックが定義されているかどうかを返します。
</simpara>
</refsect1>
<refsect1 role="parameters">
&reftitle.parameters;
&no.function.parameters;
</refsect1>
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<simpara>
プロパティに少なくともひとつフックが存在する場合、&true; を返します。
そうでない場合、&false; を返します。
</simpara>
</refsect1>
<refsect1 role="examples">
&reftitle.examples;
<example xml:id="reflectionproperty.hashooks.example.basic">
<title><methodname>ReflectionProperty::hasHooks</methodname> の例</title>
<programlisting role="php">
<![CDATA[
<?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->getProperty('none')->hasHooks());
?>
]]>
</programlisting>
&example.outputs;
<screen>
<![CDATA[
bool(true)
bool(false)
]]>
</screen>
</example>
</refsect1>
<refsect1 role="notes">
&reftitle.notes;
<note>
<simpara>
このメソッドは、<methodname>ReflectionProperty::getHooks</methodname>
の戻り値が空配列かどうかをチェックすることと同じです。
</simpara>
</note>
</refsect1>
<refsect1 role="seealso">
&reftitle.seealso;
<simplelist>
<member><methodname>ReflectionProperty::getHooks</methodname></member>
</simplelist>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
indent-tabs-mode:nil
sgml-parent-document:nil
sgml-default-dtd-file:"~/.phpdoc/manual.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->