4.2.32. Rename Class

Rename a class into another one.

The rename applies the new name to the class, and its usage : static calls, types, extends and instanceof.

4.2.32.1. Before

<?php
class x {
     function m() {}
}

(new x)->m();

?>

4.2.32.2. After

<?php
class x {
     function newM() {}
}

(new x)->newM();

?>

4.2.32.3. Parameters

Name

Default

Type

Description

origin

string

The method to rename, along with its parent class. Like theClass::Method

destination

string

The destination’s method name. Only the name.

4.2.32.4. Reverse Cobbler

4.2.32.5. Specs

Short Name

Classes/RenameMethod

Exakat version

2.3.0

Available in