topolis/queue 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

topolis/queue

Composer 安装命令:

composer require topolis/queue

包简介

A dynamic queuing system

README 文档

README

A simple queueing system. You can add items into a list and order them by priorities or before/after other items. priorities or item keys dont need to be unique.

Note that the keys of an object might get a unique suffix if it is already taken

Sample

You can find samples inside the folder sample

  • silex.php Demonstrating queue usage and lazy loading inside a silex application
  • simple A simple stand-alone queue usage
$queue = new Queue();

// Add item at priority
$queue->add($item, Queue::EARLY);

// Add item with specific key at priority
$queue->add($item, Queue::EARLY, "myItem");

// Add item before other item in queue
$queue->addBefore($item, $otherItem);

// Add item before key of other item in queue
$queue->addAfter($item, "otherItem");

// Check if item with key is in queue
$check = $queue->has("myItem");

// Check if item is in queue
$check = $queue->has($item);

// Iterate through queue in order
foreach($queue as $item){
    $item->doSomething()
}

统计信息

  • 总下载量: 529
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 4
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2019-06-03

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固