Endroid\QrCode\QrCode::setLabelFontPath PHP Method

setLabelFontPath() public method

Set QR Code label font path.
public setLabelFontPath ( integer $label_font_path ) : QrCode
$label_font_path integer Path to the QR Code label's TTF font file
return QrCode
    public function setLabelFontPath($label_font_path)
    {
        $this->label_font_path = $label_font_path;
        return $this;
    }

Usage Example

コード例 #1
0
ファイル: QrCodeFactory.php プロジェクト: endroid/qrcode
 /**
  * Creates a QR code.
  *
  * @param array $options
  *
  * @return QrCode
  */
 public function createQrCode(array $options = array())
 {
     $options = $this->optionsResolver->resolve($options);
     $qrCode = new QrCode();
     if (isset($options['text']) && !is_null($options['text'])) {
         $qrCode->setText($options['text']);
     }
     if (isset($options['size']) && !is_null($options['size'])) {
         $qrCode->setSize($options['size']);
     }
     if (isset($options['padding']) && !is_null($options['padding'])) {
         $qrCode->setPadding($options['padding']);
     }
     if (isset($options['extension']) && !is_null($options['extension'])) {
         $qrCode->setExtension($options['extension']);
     }
     if (isset($options['error_correction_level']) && !is_null($options['error_correction_level'])) {
         $qrCode->setErrorCorrection($options['error_correction_level']);
     }
     if (isset($options['foreground_color']) && !is_null($options['foreground_color'])) {
         $qrCode->setForegroundColor($options['foreground_color']);
     }
     if (isset($options['background_color']) && !is_null($options['background_color'])) {
         $qrCode->setBackgroundColor($options['background_color']);
     }
     if (isset($options['label']) && !is_null($options['label'])) {
         $qrCode->setLabel($options['label']);
     }
     if (isset($options['label_font_size']) && !is_null($options['label_font_size'])) {
         $qrCode->setLabelFontSize($options['label_font_size']);
     }
     if (isset($options['label_font_path']) && !is_null($options['label_font_path'])) {
         $qrCode->setLabelFontPath($options['label_font_path']);
     }
     return $qrCode;
 }
All Usage Examples Of Endroid\QrCode\QrCode::setLabelFontPath