Skip to content
This repository was archived by the owner on Oct 10, 2019. It is now read-only.
This repository was archived by the owner on Oct 10, 2019. It is now read-only.

Use static::printDebug('... instead of self::printDebug('... to allow Late Static Bindings #16

@ildar-aim

Description

@ildar-aim

In order to allow Late Static Bindings usage you have to use
static::printDebug('... instead of self::printDebug('...

In this case I will be able to overwrite your static method like this

class XCKlarna extends Klarna\XMLRPC\Klarna {
    public static function printDebug($msg, $mixed) {//{{{
        if (defined('XC_KLARNA_DEBUG')) {
            x_log_add('klarna', "{$msg}: \n" . print_r($mixed, true));
        }
    }//}}}
}

http://stackoverflow.com/questions/18848373/php-overwriting-of-static-methods-does-not-work-as-expected

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions