From 26a786694e22edef373134a1940d6444f4f0ac02 Mon Sep 17 00:00:00 2001 From: Joe Watkins Date: Thu, 8 Mar 2018 07:59:34 +0000 Subject: [PATCH] Better introduction content git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@344463 c90b9560-bf6c-de11-be94-00142212c4b1 --- reference/componere/book.xml | 34 ++++++++++++++++++++++++++++++++-- 1 file changed, 32 insertions(+), 2 deletions(-) diff --git a/reference/componere/book.xml b/reference/componere/book.xml index 1ef0623fe3..8ae969d62d 100644 --- a/reference/componere/book.xml +++ b/reference/componere/book.xml @@ -1,15 +1,45 @@ - + Componere Componere &reftitle.intro; - Componere is able to compose classes at runtime, and monkey patch objects. + Componere (latin, English: compose) targets production environments and provides an API for + composition of classes, monkey patching, and casting. + + Composition: + + Componere\Definition is used to define (or redefine) a class at runtime; + The class can then be registered, and in the case of redefinition it replaces the original class + for as long as the Componere\Definition exists. + + + + + + Patching: + + Componere\Patch is used to change the class of a specific instance of an object at runtime; + Upon application the patch will remain applied for as long as the Componere\Patch exists, and can be reverted explicitly. + + + + + + Casting: + + Componere\ casting functions can cast among user defined compatible types; + Where compatible means Type is contravariant or covariant with the class of object. + + + + + &reference.componere.setup;