The Componere\Definition class

(Componere 2 >= 2.1.0)

Introduction

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.

Class synopsis

final 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 )
/* Methods */
public addConstant ( string $name , \Componere\Value $value ) : Definition
public addProperty ( string $name , \Componere\Value $value ) : Definition
public register ( void ) : void
public isRegistered ( void ) : bool
public getClosure ( string $name ) : \Closure
public getClosures ( void ) : array
/* Inherited methods */
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
public Componere\Abstract\Definition::getReflector ( void ) : \ReflectionClass
}

Table of Contents