4.2.34. Rename Class Constant¶
Rename a class constant into another one.
The rename applies the new name to the class constant, and its usage.
4.2.34.1. Before¶
<?php
class x {
const A = 1;
}
echo x::A;
?>
4.2.34.2. After¶
<?php
class x {
const B = 1;
}
echo x::B;
?>
4.2.34.3. Parameters¶
Name |
Default |
Type |
Description |
origin |
string |
The class constant to rename, along with its class name. x::A |
|
destination |
string |
The destination’s class constant name. B |
4.2.34.4. Reverse Cobbler¶
4.2.34.5. Specs¶
Short Name |
Classes/RenameConstant |
Exakat version |
2.3.0 |
Available in |