Componere
PHP Manual

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

Table of Contents


Componere
PHP Manual