class_implements
    (PHP 5)
class_implements -- 
   与えられたクラスが実装しているインターフェースを返す
  
説明
array 
class_implements ( mixed class [, bool autoload] )
   この関数は、与えられたクラス class
   とその親が実装しているインターフェースを配列で返します。
  
パラメータ
   
- class
 
       オブジェクト (クラスインターフェース)
       もしくは文字列 (クラス名) を指定します。
      
- autoload
 
       __autoload
       マジックメソッドを通じて、
       この関数にクラスを自動的にロードさせるかどうかを指定します。
       デフォルトは TRUE です。
      
 
  返り値
   配列もしくはエラー時に FALSE を返します。
  
例
   
例 1. class_implements() の例 
<?php
  interface foo { } class bar implements foo {}
  print_r(class_implements(new bar));
  // since PHP 5.1 you may also specify the parameter as a string print_r(class_implements('bar'));
 
  function __autoload($class_name) {    require_once $class_name . '.php'; }
  // use __autoload to load the 'not_loaded' class print_r(class_implements('not_loaded', true));
  ?>
 |  
 上の例の出力は、たとえば
以下のようになります。 Array
(
    [foo] => foo
)
Array
(
    [interface_of_not_loaded] => interface_of_not_loaded
) |  
  |