public static function initialize()
    {
        static $initialized = false;
        static $structures  = array();

        if (defined('T_CALLABLE')) {
            return;
        }

        if (!$initialized) {
            spl_autoload_register(
                function ($class) {
                    $parts  = array_map('strrev', explode('\\', strrev($class), 2));
                    $short  = array_shift($parts);
                    $ns     = (string) array_shift($parts);

                    if ($short === 'callable') {
                        // The class to load is "callable", inject the alias.
                        if (class_alias('\\Erebot\\CallableInterface', $class, true) !== true) {
                            throw new \RuntimeException('Could not load wrapper');
                        }
                        return true;
                    }

                    // Otherwise, inject the alias in the namespace
                    // of the class being loaded.
                    class_exists("$ns\\callable");
                    return false;
                },
                true
            );
            $initialized = true;
        }

        // Inject the alias in existing namespaces.
        $funcs  = get_defined_functions();
        $new    = array_merge(
            $funcs['user'],
            get_declared_classes(),
            get_declared_interfaces()
        );

        if ($new != $structures) {
            $newNS = array();
            foreach (array_diff($new, $structures) as $structure) {
                    $parts = explode('\\', strrev($structure), 2);
                    array_shift($parts); // Remove class/interface name.
                    $newNS[] = (string) array_shift($parts);
            }
            $structures = $new;
            $newNS      = array_unique($newNS);
            foreach ($newNS as $ns) {
                class_exists(strrev($ns) . '\\callable');
            }
        }
    }