Componere

目次

The Componere\Abstract\Definition class

はじめに

This final abstract represents a class entry, and should not be used by the programmer.

クラス概要

Componere\Abstract\Definition
final abstract class Componere\Abstract\Definition {
/* メソッド */
public Definition addInterface(string $interface)
public Definition addMethod(string $name, Componere\Method $method)
public Definition addTrait(string $trait)
public ReflectionClass getReflector()
}

The Componere\Definition class

はじめに

The Definition class allows the programmer to build and register a type at runtime.

Should a Definition replace an existing class, the existing class will be restored when the Definition is destroyed.

クラス概要

Componere\Definition
final class Componere\Definition extends Componere\Abstract\Definition {
/* Constructors */
public __construct(string $name)
public __construct(string $name, string $parent)
public __construct(string $name, array $interfaces)
public __construct(string $name, string $parent, array $interfaces)
/* メソッド */
public Definition addConstant(string $name, Componere\Value $value)
public Definition addProperty(string $name, Componere\Value $value)
public void register()
public bool isRegistered()
public Closure getClosure(string $name)
public array getClosures()
/* 継承したメソッド */
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()
}

The Componere\Patch class

はじめに

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.

クラス概要

Componere\Patch
final class Componere\Patch extends Componere\Abstract\Definition {
/* Constructors */
public __construct(object $instance)
public __construct(object $instance, array $interfaces)
/* メソッド */
public void apply()
public void revert()
public bool isApplied()
public Patch derive(object $instance)
public Closure getClosure(string $name)
public array getClosures()
/* 継承したメソッド */
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()
}

The Componere\Method class

はじめに

A Method represents a function with modifiable accessibility flags

クラス概要

Componere\Method
final class Componere\Method {
/* Constructor */
public __construct(Closure $closure)
/* メソッド */
public Method setPrivate()
public Method setProtected()
public Method setStatic()
public ReflectionMethod getReflector()
}

The Componere\Value class

はじめに

A Value represents a PHP variable of all types, including undefined

クラス概要

Componere\Value
final class Componere\Value {
/* Constructor */
public __construct( $default = ?)
/* メソッド */
public Value setPrivate()
public Value setProtected()
public Value setStatic()
public bool isPrivate()
public bool isProtected()
public bool isStatic()
public bool hasDefault()
}