同步操作将从 inhere/php-queue 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
<?php/*** Created by PhpStorm.* User: inhere* Date: 2017年5月29日* Time: 上午10:36*/namespace Inhere\Queue;use Inhere\Queue\Driver\DbQueue;use Inhere\Queue\Driver\PhpQueue;use Inhere\Queue\Driver\RedisQueue;use Inhere\Queue\Driver\ShmQueue;use Inhere\Queue\Driver\SysVQueue;/*** Class Queue - queue factory* @package Inhere\Queue*/final class Queue{const DRIVER_DB = 'db';const DRIVER_PHP = 'php';// const DRIVER_LDB = 'levelDb';// const DRIVER_RDB = 'rocksDb';const DRIVER_SHM = 'shm';const DRIVER_SYSV = 'sysv';const DRIVER_REDIS = 'redis';/*** driver map* @var array*/private static $driverMap = ['db' => DbQueue::class,'php' => PhpQueue::class,'sysv' => SysVQueue::class,'shm' => ShmQueue::class,'redis' => RedisQueue::class,];/*** @param string $driver* @param array $config* @return QueueInterface*/public static function make(array $config = [], $driver = ''){if (!$driver && isset($config['driver'])) {$driver = $config['driver'];unset($config['driver']);}if ($driver && ($class = self::getDriverClass($driver))) {return new $class($config);}return new PhpQueue($config);}/*** @param $driver* @return mixed|null*/public static function getDriverClass($driver){return self::$driverMap[$driver] ?? null;}/*** @return array*/public static function getDriverMap(): array{return self::$driverMap;}}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。