承接 ammarshaikh-coderkube/bracket-generator 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

ammarshaikh-coderkube/bracket-generator

Composer 安装命令:

composer require ammarshaikh-coderkube/bracket-generator

包简介

Bracket generator for PHP

README 文档

README

Version v0.2

Table of Contents

  1. Introduction
  2. Downloading
  3. Usage example

Introduction

Welcome to bracket generator for PHP7 repo. This library uses HTML tables to render nice and clean game brackets. You can create brackets based on participant count, match list or even custom tree. Bracket visuals are also completly customizable.

Please, refer mainly to the wiki pages.

Downloading

The easiest way to get this library is to use Composer. While having Composer installed it takes only composer require ammarshaikh-coderkube/bracket-generator and composer update to get the library up and ready!

If you are not fan of Composer, you can download whole repository in .zip archive or clone the repository using Git - git clone https://github.com/ammarshaikh-coderkube/bracket-generator. But in this case, you will have to create your own autoload function.

Usage example

All it takes to create a bracket is this:

use BracketGenerator\Bracket;
echo Bracket::create(8);

And what will you end up with after this? Take a look:

Empty bracket for 8 participants

It looks a bit empty so you can fill it up very easily - let's start from the beginning:

use BracketGenerator\Bracket;

$bracket = Bracket::create(8);
$bracket->fillByParticipantList([
	[ 'Participant 1', 0 ],
	[ 'Participant 2', 0 ],
	[ 'Participant 3', 0 ],
	[ 'Participant 4', 0 ],
	[ 'Participant 5', 0 ],
	[ 'Participant 6', 0 ],
	[ 'Participant 7', 0 ],
	[ 'Participant 8', 0 ],
]);

echo $bracket;

And that gives us:

Filled bracket for 8 participants

Please remember that the bracket visuals are completly customizable. This is just an example.

For more, please see the wiki pages.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: GPL-3.0-or-later
  • 更新时间: 2025-01-01