本文整理汇总了PHP中Errors::codes方法的典型用法代码示例。如果您正苦于以下问题:PHP Errors::codes方法的具体用法?PHP Errors::codes怎么用?PHP Errors::codes使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Errors
的用法示例。
在下文中一共展示了Errors::codes方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: init
protected static function init()
{
self::$codes = array();
// 0-99 = admin.
// 0-9 = admin.ajax.
self::$codes['admin.ajax.unknown'] = 1;
self::$codes['admin.ajax.no_method'] = 2;
self::$codes['admin.ajax.missing_param'] = 3;
// 10-19 = admin.feeds.
self::$codes['admin.feeds.invalid_url'] = 10;
self::$codes['admin.feeds.no_url'] = 11;
self::$codes['admin.feeds.no_id_or_url'] = 12;
self::$codes['admin.feeds.invalid_id'] = 13;
self::$codes['admin.feeds.protocol_error'] = 13;
// 20-39 = admin.importer.
// 20-29 = admin.importer.greader.
self::$codes['admin.importer.greader.invalid_auth'] = 20;
// 40-49 = admin.plugins.
self::$codes['admin.plugins.invalid_path'] = 40;
self::$codes['admin.plugins.not_found'] = 41;
// 100-199 = api.
// 100-109 = api.itemupdater.
self::$codes['api.itemupdater.itemerror'] = 100;
self::$codes['api.itemupdater.ajax.unknown'] = 101;
self::$codes['api.itemupdater.ajax.no_id'] = 102;
self::$codes['api.itemupdater.ajax.action_unknown'] = 103;
// 110-119 = api.items.
self::$codes['api.items.no_method'] = 110;
// 800-899 = auth.
self::$codes['auth.none'] = 800;
// 900-999 = update.
self::$codes['update.core'] = 900;
self::$codes['update.plugin'] = 901;
self::$codes['update.theme'] = 902;
}
示例2: init
protected static function init()
{
self::$codes = array();
// 0-99 = admin.
// 0-9 = admin.ajax.
self::$codes['admin.ajax.unknown'] = 1;
self::$codes['admin.ajax.no_method'] = 2;
self::$codes['admin.ajax.missing_param'] = 3;
// 10-19 = admin.feeds.
self::$codes['admin.feeds.invalid_url'] = 10;
self::$codes['admin.feeds.no_url'] = 11;
self::$codes['admin.feeds.no_id_or_url'] = 12;
self::$codes['admin.feeds.invalid_id'] = 13;
// 900-999 = update.
self::$codes['update.core'] = 900;
self::$codes['update.plugin'] = 901;
self::$codes['update.theme'] = 902;
}