Delicious Bookmark this on Delicious Share on Facebook SlashdotSlashdot It! Digg! Digg



PHP : Function Reference : Classkit Functions : classkit_method_rename

classkit_method_rename

Dynamically changes the name of the given method (PECL classkit:0.1-0.4 runkit:0.7-0.9)
bool classkit_method_rename ( string classname, string methodname, string newname )

Example 394. classkit_method_rename() example

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

// Rename the 'foo' method to 'bar'
classkit_method_rename(
   
'Example',
   
'foo',
   
'bar'
);

// output renamed function
echo Example::bar();
?>

The above example will output:

foo!

Change Language


Follow Navioo On Twitter
classkit_import
classkit_method_add
classkit_method_copy
classkit_method_redefine
classkit_method_remove
classkit_method_rename
eXTReMe Tracker