1

Normally I always install some extension by using composer , but now I need to use Barcode Generator library http://www.barcodebakery.com/en

In order to use their library I need to

require_once('class/BCGFontFile.php');
require_once('class/BCGColor.php');
require_once('class/BCGDrawing.php');

but I don't know what is the best practice to do it with yii2 Please help!!!

jsgoupil
  • 3,788
  • 3
  • 38
  • 53
Chhorn Soro
  • 3,061
  • 8
  • 27
  • 43

1 Answers1

1

Like in 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.

Then for your requirement the best pratice you are looking for is described in the doc mentioned above.

ScaisEdge
  • 131,976
  • 10
  • 91
  • 107