1
0
mirror of https://github.com/php/doc-ja.git synced 2026-03-30 02:52:08 +02:00
Files
archived-doc-ja/reference/classobj/functions/interface-exists.xml
Hideyuki Shimooka 48e9078dcb added japanese manual
git-svn-id: https://svn.php.net/repository/phpdoc/ja/trunk@185797 c90b9560-bf6c-de11-be94-00142212c4b1
2005-05-04 17:17:50 +00:00

72 lines
2.2 KiB
XML

<?xml version="1.0" encoding="utf-8" ?>
<!-- $Revision: 1.1 $ -->
<!-- EN-Revision: 1.1 Maintainer: shimooka Status: ready -->
<refentry id="function.interface-exists">
<refnamediv>
<refname>interface_exists</refname>
<refpurpose>インターフェースが宣言されているかどうかを確認する</refpurpose>
</refnamediv>
<refsect1>
<title>説明</title>
<methodsynopsis>
<type>bool</type><methodname>interface_exists</methodname>
<methodparam><type>string</type><parameter>interface_name</parameter></methodparam>
<methodparam choice="opt"><type>bool</type><parameter>autoload</parameter></methodparam>
</methodsynopsis>
<para>
この関数は、<parameter>interface_name</parameter>
で与えられたインターフェースが宣言されていれば &true; を返します。
そうでなければ &false; を返します。
</para>
<para>
<example>
<title><function>interface_exists</function> の例</title>
<programlisting role="php">
<![CDATA[
<?php
// 使用する前にインターフェースが存在するかどうかを確認する
if (interface_exists('MyInterface')) {
class MyClass implements MyInterface
{
// メソッド
}
}
?>
]]>
</programlisting>
</example>
</para>
<para>
<function>interface_exists</function> はデフォルトで &link.autoload;
のコールを試みます。もし <function>interface_exists</function>
&link.autoload; をコールしたくない場合、パラメータ
<parameter>autoload</parameter>&false; に設定してください。
</para>
<simpara>
<function>class_exists</function> も参照ください。
</simpara>
</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:"../../../../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
-->