4.2.36. Rename Enums

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.36.1. Before

<?php
enum E {}

function foo(E $a) {}

?>

4.2.36.2. After

<?php
enum EFG {}

function foo(EFG $a) {}

?>

4.2.36.3. Parameters

Name

Default

Type

Description

origin

string

The class to rename

destination

string

The destination’s class name

4.2.36.4. Reverse Cobbler

4.2.36.5. Specs

Short Name

Enums/RenameEnums

Exakat version

2.3.0

Available in