PHP
downloads | documentation | faq | getting help | mailing lists | reporting bugs | php.net sites | links | conferences | my php.net

search for in the

classkit_method_rename> <classkit_method_redefine
Last updated: Fri, 29 Aug 2008

view this page in

classkit_method_remove

(PECL classkit:0.1-0.4 runkit:0.7-0.9)

classkit_method_remove指定したメソッドを動的に削除する

説明

bool classkit_method_remove ( string $classname , string $methodname )

注意: この関数により現在実行中 (もしくはチェーンド)のメソッドを操作することはできません。

警告

この関数は、 実験的 なものです。この関数の動作・ 名前・その他ドキュメントに書かれている事項は、予告なく、将来的な PHP のリリースにおいて変更される可能性があります。 この関数は自己責任で使用してください。

パラメータ

classname

メソッドを削除するクラス。

methodname

削除するメソッドの名前。

返り値

成功した場合に TRUE を、失敗した場合に FALSE を返します。

例1 classkit_method_remove() の例

<?php
class Example {
    function 
foo() {
        return 
"foo!\n";
    }
    
    function 
bar() {
        return 
"bar!\n";
    }
}

// 'foo' メソッドを削除する
classkit_method_remove(
    
'Example',
    
'foo'
);

echo 
implode(' 'get_class_methods('Example'));

?>

上の例の出力は以下となります。

bar



add a note add a note User Contributed Notes
classkit_method_remove
There are no user contributed notes for this page.

classkit_method_rename> <classkit_method_redefine
Last updated: Fri, 29 Aug 2008
 
 
show source | credits | sitemap | contact | advertising | mirror sites