php-mtg/php-mana-bridge
最新稳定版本:8.1.10
Composer 安装命令:
composer require php-mtg/php-mana-bridge
包简介
A library that brings the mana js library to the php world
README 文档
README
A library that brings the mana js library to the php world.
Installation
The installation of this library is made via composer and the autoloading of all classes of this library is made through their autoloader.
You must add the asset-packagist repository to your composer.json :
"repositories" : [{
"type" : "composer",
"url" : "https://asset-packagist.org",
"name" : "asset-packagist"
}
]
The repository is mandatory as the npm packages do not appear in the generic packagist repository. Then :
- Download
composer.pharfrom their website. - Run the following command to install this library as dependency :
php composer.phar php-mtg/php-mana-bridge ^8
Basic Usage
use PhpMtg\Mana\Mana;
$symb = Mana::findByCode('w'); // returns a white mana symbol
(string) $symb->getIconHtml(); // <i class="ms ms-w"></i>
For the icon to appear on an html page, you have to publish the css and font files (or uses a cdn like jsdeliver, as specified in the original readme of the mana-font library).
The methods Mana::getCssFilePath() and Mana::getFontFilePaths()
are made for this task, as they point to the existing files in the mana-font
library, under your vendor directory (as created by composer).
License
Proprietary
统计信息
- 总下载量: 5.16k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 1
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2020-04-07