/** * Processes the content. * Make sure to return the string again, otherwise the output will remain blank. * * @param string $strContent * * @return string */ public function processContent($strContent) { $arrTemp = array(); preg_match_all("#\\[qrcode,([ \\?\\&\\-=:+%;A-Za-z0-9_\\./\\\\]+)(,[1-3])\\]#i", $strContent, $arrTemp); foreach ($arrTemp[0] as $intKey => $strSearchString) { $intSize = 1; $strSubstr = isset($arrTemp[2][$intKey]) ? (int) substr($arrTemp[2][$intKey], 1) : 1; if ($strSubstr >= 1 && $strSubstr <= 3) { $intSize = $strSubstr; } $objQrCode = new class_qrcode(); $objQrCode->setIntSize($intSize); $strImage = $objQrCode->getImageForString($arrTemp[1][$intKey]); $strContent = uniStrReplace($strSearchString, _webpath_ . "/" . $strImage, $strContent); } return $strContent; }