php8.5
Home/ Manual/ reference / componere/ The Componere\Patch class

The Componere\Patch class

The Patch class allows the programmer to change the type of an instance at runtime without registering a new Definition

Intro

The Patch class allows the programmer to change the type of an instance at runtime without registering a new Definition

When a Patch is destroyed it is reverted, so that instances that were patched during the lifetime of the Patch are restored to their formal type.

Class synopsis

class Componere\Patch { }

Construct Apply Revert Isapplied Derive Getclosure Getclosures

Source: reference/componere/componere.patch.xml · from the official PHP manual (php/doc-en)