Dynamic inheritance/implementation in PHP 5.*
        Posted  
        
            by Rolf
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by Rolf
        
        
        
        Published on 2010-04-22T19:59:09Z
        Indexed on 
            2010/04/23
            14:43 UTC
        
        
        Read the original article
        Hit count: 391
        
Hi everyone,
I'm implementing a Logger, based on a XML declaration (path to class, method name, custom log message). There is also a Logger interface that defines the function __call, the latter logs what's needed and then relays the call to the target method.
The only difficulty is to make each class, declared in the XML file, implement this interface with __call. So finally my question: is there a way to set at runtime the parent class or the implemented interface of another class ?
Thanks in advance ! Rolf
© Stack Overflow or respective owner