public function addExtension($className)
    {
        $object = is_object($className) ? $className : null;
        $className = is_object($className) ? get_class($object) : $className;

        $this->checkExtension($className);

        self::$extensions[$className] = $object;
        return $this;
    }