PHPKonf Istanbul PHP Conference 2019 - Call for Papers

The Componere\Patch class

(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 {
/* Constructors */
public __construct ( object $instance )
public __construct ( object $instance , array $interfaces )
/* メソッド */
public void apply ( void )
public void revert ( void )
public bool isApplied ( void )
public Patch derive ( object $instance )
public \Closure getClosure ( string $name )
public array getClosures ( void )
/* 継承したメソッド */
public Definition Componere\Abstract\Definition::addInterface ( string $interface )
public Definition Componere\Abstract\Definition::addMethod ( string $name , \Componere\Method $method )
public Definition Componere\Abstract\Definition::addTrait ( string $trait )
public \ReflectionClass Componere\Abstract\Definition::getReflector ( void )
}

目次

add a note add a note

User Contributed Notes

There are no user contributed notes for this page.
To Top