Php/docs/class.componere-patch
(Componere 2 >= 2.1.0)
简介
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.
类摘要
final Componere\Patch extends Componere\Abstract\Definition {
public __construct
( object $instance
)
public __construct
( object $instance
, array $interfaces
)
/* 方法 */
public apply ( ) : void
public revert ( ) : void
public isApplied ( ) : bool
public derive
( object $instance
) : Patch
public getClosure
( string $name
) : Closure
public getClosures ( ) : array
/* 继承的方法 */
public Componere\Abstract\Definition::addInterface
( string $interface
) : Definition
public Componere\Abstract\Definition::addMethod
( string $name
, Componere\Method $method
) : Definition
public Componere\Abstract\Definition::addTrait
( string $trait
) : Definition
}
Table of Contents
- Componere\Patch::__construct — Patch Construction
- Componere\Patch::apply — Application
- Componere\Patch::revert — Reversal
- Componere\Patch::isApplied — State Detection
- Componere\Patch::derive — Patch Derivation
- Componere\Patch::getClosure — Get Closure
- Componere\Patch::getClosures — Get Closures
/* Constructors */