interface_existsとは? わかりやすく解説

Weblio 辞書 > コンピュータ > PHP関数リファレンス > interface_existsの意味・解説 

interface_exists

(PHP 5 >= 5.0.2)
interface_exists — インターフェースが宣言されているかどうかを確認する

説明

bool interface_exists ( string interface_name [, bool autoload] )
指定したインターフェイスが定義されているかどうかを調べます。

パラメータ

interface_name
インターフェイス名。
autoload
デフォルトで __autoload をコールするかどうか。

返り値

interface_name で与えられたインターフェースが宣言されていれば TRUE を返します。 そうでなければ FALSE を返します。

例 357. interface_exists() の例
<?php
// 使用する前にインターフェースが存在するかどうかを確認する
if (interface_exists('MyInterface')) {
   class MyClass implements MyInterface
   {
       // メソッド
   }
}

?>


参考

class_exists()




英和和英テキスト翻訳>> Weblio翻訳
英語⇒日本語日本語⇒英語
  

辞書ショートカット

すべての辞書の索引

「interface_exists」の関連用語

interface_existsのお隣キーワード
検索ランキング

   

英語⇒日本語
日本語⇒英語
   



interface_existsのページの著作権
Weblio 辞書 情報提供元は 参加元一覧 にて確認できます。

   
PHP Documentation GroupPHP Documentation Group
Copyright © 1997 - 2024 by the PHP Documentation Group.

©2024 GRAS Group, Inc.RSS