将条码生成器库加载到 Yii2
Load Barcode Generator Library to Yii2
通常我总是使用 composer 安装一些扩展,但现在我需要使用 Barcode Generator 库
http://www.barcodebakery.com/en
为了使用他们的图书馆,我需要
require_once('class/BCGFontFile.php');
require_once('class/BCGColor.php');
require_once('class/BCGDrawing.php');
但我不知道用 yii2 做这件事的最佳做法是什么
请帮忙!!!
喜欢this doc
Yii relies on the class autoloading mechanism to locate and include
all required class files. It provides a high-performance class
autoloader that is compliant with the PSR-4 standard. The autoloader
is installed when you include the Yii.php file.
那么根据您的要求,上述文档中描述了您正在寻找的最佳实践。
通常我总是使用 composer 安装一些扩展,但现在我需要使用 Barcode Generator 库 http://www.barcodebakery.com/en
为了使用他们的图书馆,我需要
require_once('class/BCGFontFile.php');
require_once('class/BCGColor.php');
require_once('class/BCGDrawing.php');
但我不知道用 yii2 做这件事的最佳做法是什么 请帮忙!!!
喜欢this doc
Yii relies on the class autoloading mechanism to locate and include all required class files. It provides a high-performance class autoloader that is compliant with the PSR-4 standard. The autoloader is installed when you include the Yii.php file.
那么根据您的要求,上述文档中描述了您正在寻找的最佳实践。