当前位置: 首页>>代码示例>>PHP>>正文


PHP PucFactory::addVersion方法代码示例

本文整理汇总了PHP中PucFactory::addVersion方法的典型用法代码示例。如果您正苦于以下问题:PHP PucFactory::addVersion方法的具体用法?PHP PucFactory::addVersion怎么用?PHP PucFactory::addVersion使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在PucFactory的用法示例。


在下文中一共展示了PucFactory::addVersion方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: addVersion

        public static function addVersion($generalClass, $versionedClass, $version)
        {
            if (!isset(self::$classVersions[$generalClass])) {
                self::$classVersions[$generalClass] = array();
            }
            self::$classVersions[$generalClass][$version] = $versionedClass;
            self::$sorted = false;
        }
    }
}
require_once dirname(__FILE__) . '/github-checker.php';
//Register classes defined in this file with the factory.
PucFactory::addVersion('PluginUpdateChecker', 'PluginUpdateChecker_2_2', '2.2');
PucFactory::addVersion('PluginUpdate', 'PluginUpdate_2_2', '2.2');
PucFactory::addVersion('PluginInfo', 'PluginInfo_2_2', '2.2');
PucFactory::addVersion('PucGitHubChecker', 'PucGitHubChecker_2_2', '2.2');
/**
 * Create non-versioned variants of the update checker classes. This allows for backwards
 * compatibility with versions that did not use a factory, and it simplifies doc-comments.
 */
if (!class_exists('PluginUpdateChecker', false)) {
    class PluginUpdateChecker extends PluginUpdateChecker_2_2
    {
    }
}
if (!class_exists('PluginUpdate', false)) {
    class PluginUpdate extends PluginUpdate_2_2
    {
    }
}
if (!class_exists('PluginInfo', false)) {
开发者ID:andrewkhunn,项目名称:lancero,代码行数:31,代码来源:plugin-update-checker.php

示例2: addVersion

        public static function addVersion($generalClass, $versionedClass, $version)
        {
            if (!isset(self::$classVersions[$generalClass])) {
                self::$classVersions[$generalClass] = array();
            }
            self::$classVersions[$generalClass][$version] = $versionedClass;
            self::$sorted = false;
        }
    }
}
require_once dirname(__FILE__) . '/github-checker.php';
//Register classes defined in this file with the factory.
PucFactory::addVersion('PluginUpdateChecker', 'PluginUpdateChecker_3_0', '3.0');
PucFactory::addVersion('PluginUpdate', 'PluginUpdate_3_0', '3.0');
PucFactory::addVersion('PluginInfo', 'PluginInfo_3_0', '3.0');
PucFactory::addVersion('PucGitHubChecker', 'PucGitHubChecker_3_0', '3.0');
/**
 * Create non-versioned variants of the update checker classes. This allows for backwards
 * compatibility with versions that did not use a factory, and it simplifies doc-comments.
 */
if (!class_exists('PluginUpdateChecker', false)) {
    class PluginUpdateChecker extends PluginUpdateChecker_3_0
    {
    }
}
if (!class_exists('PluginUpdate', false)) {
    class PluginUpdate extends PluginUpdate_3_0
    {
    }
}
if (!class_exists('PluginInfo', false)) {
开发者ID:apxeonTepukc,项目名称:kalo-plugin-auto,代码行数:31,代码来源:plugin-update-checker.php

示例3: addVersion

         */
        public static function addVersion($generalClass, $versionedClass, $version)
        {
            if (!isset(self::$classVersions[$generalClass])) {
                self::$classVersions[$generalClass] = array();
            }
            self::$classVersions[$generalClass][$version] = $versionedClass;
            self::$sorted = false;
        }
    }
}
//RH require_once(dirname(__FILE__) . '/github-checker.php');
//Register classes defined in this file with the factory.
PucFactory::addVersion('PluginUpdateChecker', 'PluginUpdateChecker_2_0', '2.0');
PucFactory::addVersion('PluginUpdate', 'PluginUpdate_2_0', '2.0');
PucFactory::addVersion('PluginInfo', 'PluginInfo_2_0', '2.0');
//RH PucFactory::addVersion('PucGitHubChecker', 'PucGitHubChecker_2_0', '2.0');
/**
 * Create non-versioned variants of the update checker classes. This allows for backwards
 * compatibility with versions that did not use a factory, and it simplifies doc-comments.
 */
if (!class_exists('PluginUpdateChecker')) {
    class PluginUpdateChecker extends PluginUpdateChecker_2_0
    {
    }
}
if (!class_exists('PluginUpdate')) {
    class PluginUpdate extends PluginUpdate_2_0
    {
    }
}
开发者ID:xronn01,项目名称:www.prosvitcenter.org,代码行数:31,代码来源:class-plugin-update-checker.php

示例4: addVersion

         * @param string $version Version number, e.g. '1.2'.
         */
        public static function addVersion($generalClass, $versionedClass, $version)
        {
            if (!isset(self::$classVersions[$generalClass])) {
                self::$classVersions[$generalClass] = array();
            }
            self::$classVersions[$generalClass][$version] = $versionedClass;
            self::$sorted = false;
        }
    }
}
//Register classes defined in this file with the factory.
PucFactory::addVersion('PluginUpdateChecker', 'PluginUpdateChecker_1_5', '1.5');
PucFactory::addVersion('PluginUpdate', 'PluginUpdate_1_3', '1.3');
PucFactory::addVersion('PluginInfo', 'PluginInfo_1_3', '1.3');
/**
 * Create non-versioned variants of the update checker classes. This allows for backwards
 * compatibility with versions that did not use a factory, and it simplifies doc-comments.
 */
if (!class_exists('PluginUpdateChecker')) {
    class PluginUpdateChecker extends PluginUpdateChecker_1_5
    {
    }
}
if (!class_exists('PluginUpdate')) {
    class PluginUpdate extends PluginUpdate_1_3
    {
    }
}
if (!class_exists('PluginInfo')) {
开发者ID:SayenkoDesign,项目名称:gogo-racing.com,代码行数:31,代码来源:plugin-update-checker.php

示例5: addVersion

        public static function addVersion($generalClass, $versionedClass, $version)
        {
            if (!isset(self::$classVersions[$generalClass])) {
                self::$classVersions[$generalClass] = array();
            }
            self::$classVersions[$generalClass][$version] = $versionedClass;
            self::$sorted = false;
        }
    }
}
require_once dirname(__FILE__) . '/github-checker.php';
//Register classes defined in this file with the factory.
PucFactory::addVersion('PluginUpdateChecker', 'PluginUpdateChecker_2_1', '2.1');
PucFactory::addVersion('PluginUpdate', 'PluginUpdate_2_1', '2.1');
PucFactory::addVersion('PluginInfo', 'PluginInfo_2_1', '2.1');
PucFactory::addVersion('PucGitHubChecker', 'PucGitHubChecker_2_1', '2.1');
/**
 * Create non-versioned variants of the update checker classes. This allows for backwards
 * compatibility with versions that did not use a factory, and it simplifies doc-comments.
 */
if (!class_exists('PluginUpdateChecker', false)) {
    class PluginUpdateChecker extends PluginUpdateChecker_2_1
    {
    }
}
if (!class_exists('PluginUpdate', false)) {
    class PluginUpdate extends PluginUpdate_2_1
    {
    }
}
if (!class_exists('PluginInfo', false)) {
开发者ID:kjellberg,项目名称:goproxy,代码行数:31,代码来源:plugin-update-checker.php

示例6: addVersion

        public static function addVersion($generalClass, $versionedClass, $version)
        {
            if (!isset(self::$classVersions[$generalClass])) {
                self::$classVersions[$generalClass] = array();
            }
            self::$classVersions[$generalClass][$version] = $versionedClass;
            self::$sorted = false;
        }
    }
}
require_once dirname(__FILE__) . '/github-checker.php';
//Register classes defined in this file with the factory.
PucFactory::addVersion('PluginUpdateChecker', 'PluginUpdateChecker_2_0', '2.0');
PucFactory::addVersion('PluginUpdate', 'PluginUpdate_2_0', '2.0');
PucFactory::addVersion('PluginInfo', 'PluginInfo_2_0', '2.0');
PucFactory::addVersion('PucGitHubChecker', 'PucGitHubChecker_2_0', '2.0');
/**
 * Create non-versioned variants of the update checker classes. This allows for backwards
 * compatibility with versions that did not use a factory, and it simplifies doc-comments.
 */
if (!class_exists('PluginUpdateChecker')) {
    class PluginUpdateChecker extends PluginUpdateChecker_2_0
    {
    }
}
if (!class_exists('PluginUpdate')) {
    class PluginUpdate extends PluginUpdate_2_0
    {
    }
}
if (!class_exists('PluginInfo')) {
开发者ID:Pattentively,项目名称:wp_video,代码行数:31,代码来源:plugin-update-checker.php

示例7: addVersion

         * @param string $version Version number, e.g. '1.2'.
         */
        public static function addVersion($generalClass, $versionedClass, $version)
        {
            if (!isset(self::$classVersions[$generalClass])) {
                self::$classVersions[$generalClass] = array();
            }
            self::$classVersions[$generalClass][$version] = $versionedClass;
            self::$sorted = false;
        }
    }
}
//Register classes defined in this file with the factory.
PucFactory::addVersion('PluginUpdateChecker', 'PluginUpdateChecker_1_6', '1.6');
PucFactory::addVersion('PluginUpdate', 'PluginUpdate_1_6', '1.6');
PucFactory::addVersion('PluginInfo', 'PluginInfo_1_6', '1.6');
/**
 * Create non-versioned variants of the update checker classes. This allows for backwards
 * compatibility with versions that did not use a factory, and it simplifies doc-comments.
 */
if (!class_exists('PluginUpdateChecker')) {
    class PluginUpdateChecker extends PluginUpdateChecker_1_6
    {
    }
}
if (!class_exists('PluginUpdate')) {
    class PluginUpdate extends PluginUpdate_1_6
    {
    }
}
if (!class_exists('PluginInfo')) {
开发者ID:SrMeowMeow,项目名称:srmeowmeow.github.io,代码行数:31,代码来源:plugin-update-checker.php

示例8: addVersion

        public static function addVersion($generalClass, $versionedClass, $version)
        {
            if (!isset(self::$classVersions[$generalClass])) {
                self::$classVersions[$generalClass] = array();
            }
            self::$classVersions[$generalClass][$version] = $versionedClass;
            self::$sorted = false;
        }
    }
}
require_once dirname(__FILE__) . '/github-checker.php';
//Register classes defined in this file with the factory.
PucFactory::addVersion('PluginUpdateChecker', 'PluginUpdateChecker_2_3', '2.3');
PucFactory::addVersion('PluginUpdate', 'PluginUpdate_2_3', '2.3');
PucFactory::addVersion('PluginInfo', 'PluginInfo_2_3', '2.3');
PucFactory::addVersion('PucGitHubChecker', 'PucGitHubChecker_2_3', '2.3');
/**
 * Create non-versioned variants of the update checker classes. This allows for backwards
 * compatibility with versions that did not use a factory, and it simplifies doc-comments.
 */
if (!class_exists('PluginUpdateChecker', false)) {
    class PluginUpdateChecker extends PluginUpdateChecker_2_3
    {
    }
}
if (!class_exists('PluginUpdate', false)) {
    class PluginUpdate extends PluginUpdate_2_3
    {
    }
}
if (!class_exists('PluginInfo', false)) {
开发者ID:StephenPunwasi,项目名称:plugin-update-checker,代码行数:31,代码来源:plugin-update-checker.php

示例9: compareVersions

        }
        protected static function compareVersions($a, $b)
        {
            return -version_compare($a, $b);
        }
        /**
         * Register a version of a class.
         *
         * @access private This method is only for internal use by the library.
         *
         * @param string $generalClass Class name without version numbers, e.g. 'PluginUpdateChecker'.
         * @param string $versionedClass Actual class name, e.g. 'PluginUpdateChecker_1_2'.
         * @param string $version Version number, e.g. '1.2'.
         */
        public static function addVersion($generalClass, $versionedClass, $version)
        {
            if (!isset(self::$classVersions[$generalClass])) {
                self::$classVersions[$generalClass] = array();
            }
            self::$classVersions[$generalClass][$version] = $versionedClass;
            self::$sorted = false;
        }
    }
}
require_once dirname(__FILE__) . '/github-checker.php';
//Register classes defined in this file with the factory.
PucFactory::addVersion('PluginUpdateChecker', 'PluginUpdateChecker_3_1', '3.1');
PucFactory::addVersion('PluginUpdate', 'PluginUpdate_3_1', '3.1');
PucFactory::addVersion('PluginInfo', 'PluginInfo_3_1', '3.1');
PucFactory::addVersion('PucGitHubChecker', 'PucGitHubChecker_3_1', '3.1');
开发者ID:pehaa,项目名称:pht-page-builder,代码行数:30,代码来源:plugin-update-checker.php


注:本文中的PucFactory::addVersion方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。