classkit_import
(no version information, might be only in CVS)
classkit_import -- Import new class method definitions from a file
説明
array
classkit_import ( string filename)
注意: この関数により現在実行中(もしくはチェーンド)のメソッドを走査することはできません。
警告 |
この関数は、
実験的なステータスにあります。これは、この関数の
動作、関数名、ここで書かれていること全てがPHPの将来のバージョンで予告
なく変更される可能性があることを意味します。注意を喚起するとともに自分
のリスクでこの関数を使用して下さい。 |
パラメータリスト
- filename
The filename of the class method definitions to import
戻り値
Associative array of imported methods
例
例 1. classkit_import() example
<?php // file: newclass.php class Example { function foo() { return "bar!\n"; } } ?>
|
<?php // requires newclass.php (see above) class Example { function foo() { return "foo!\n"; } }
$e = new Example();
// output original echo $e->foo();
// import replacement method classkit_import('newclass.php');
// output imported echo $e->foo();
?>
|
上の例の出力は以下となります: |