mirror of
https://github.com/php/doc-ja.git
synced 2026-03-25 23:52:16 +01:00
git-svn-id: https://svn.php.net/repository/phpdoc/ja/trunk@308049 c90b9560-bf6c-de11-be94-00142212c4b1
128 lines
3.2 KiB
XML
128 lines
3.2 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<!-- $Revision$ -->
|
|
<!-- EN-Revision: fead37cf3b37fa12c0462767dd3ed106e9c6eb0d Maintainer: hirokawa Status: ready -->
|
|
<!-- CREDITS: shimooka -->
|
|
<refentry xml:id="function.method-exists" xmlns="http://docbook.org/ns/docbook">
|
|
<refnamediv>
|
|
<refname>method_exists</refname>
|
|
<refpurpose>クラスメソッドが存在するかどうかを確認する</refpurpose>
|
|
</refnamediv>
|
|
<refsect1 role="description">
|
|
&reftitle.description;
|
|
<methodsynopsis>
|
|
<type>bool</type><methodname>method_exists</methodname>
|
|
<methodparam><type>mixed</type><parameter>object</parameter></methodparam>
|
|
<methodparam><type>string</type><parameter>method_name</parameter></methodparam>
|
|
</methodsynopsis>
|
|
<para>
|
|
指定した <parameter>object</parameter> にクラスメソッドが存在するかどうかを調べます。
|
|
</para>
|
|
</refsect1>
|
|
<refsect1 role="parameters">
|
|
&reftitle.parameters;
|
|
<para>
|
|
<variablelist>
|
|
<varlistentry>
|
|
<term><parameter>object</parameter></term>
|
|
<listitem>
|
|
<para>
|
|
オブジェクトのインスタンス、あるいはクラス名。
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry>
|
|
<term><parameter>method_name</parameter></term>
|
|
<listitem>
|
|
<para>
|
|
メソッドの名前。
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
</variablelist>
|
|
</para>
|
|
</refsect1>
|
|
<refsect1 role="returnvalues">
|
|
&reftitle.returnvalues;
|
|
<para>
|
|
<parameter>method_name</parameter> で指定したメソッドが
|
|
指定した <parameter>object</parameter> において定義されている場合に
|
|
&true;、そうでない場合に &false; を返します。
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="notes">
|
|
&reftitle.notes;
|
|
¬e.uses-autoload;
|
|
</refsect1>
|
|
|
|
<refsect1 role="examples">
|
|
&reftitle.examples;
|
|
<para>
|
|
<example>
|
|
<title><function>method_exists</function> の例</title>
|
|
<programlisting role="php">
|
|
<![CDATA[
|
|
<?php
|
|
$directory = new Directory('.');
|
|
var_dump(method_exists($directory,'read'));
|
|
?>
|
|
]]>
|
|
</programlisting>
|
|
&example.outputs;
|
|
<screen>
|
|
<![CDATA[
|
|
bool(true)
|
|
]]>
|
|
</screen>
|
|
</example>
|
|
<example>
|
|
<title>静的な <function>method_exists</function> の例</title>
|
|
<programlisting role="php">
|
|
<![CDATA[
|
|
<?php
|
|
var_dump(method_exists('Directory','read'));
|
|
?>
|
|
]]>
|
|
</programlisting>
|
|
&example.outputs;
|
|
<screen>
|
|
<![CDATA[
|
|
bool(true)
|
|
]]>
|
|
</screen>
|
|
</example>
|
|
</para>
|
|
</refsect1>
|
|
<refsect1 role="seealso">
|
|
&reftitle.seealso;
|
|
<para>
|
|
<simplelist>
|
|
<member><function>function_exists</function></member>
|
|
<member><function>is_callable</function></member>
|
|
<member><function>class_exists</function></member>
|
|
</simplelist>
|
|
</para>
|
|
</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
|
|
-->
|