protected function _getQRCodeInline($name, $secret, $title = null, $params = array())
    {
        $url = $this->_getQRCodeUrl($title, $name, $secret);
        list($width, $height, $level) = $this->_getQRParams($params);

        $renderer = new \BaconQrCode\Renderer\Image\Png();
        $renderer->setWidth($width)
                 ->setHeight($height)
                 ->setMargin(0);
        $bacon    = new \BaconQrCode\Writer($renderer);
        $data     = $bacon->writeString($urlencoded, $encoding, \BaconQrCode\Common\ErrorCorrectionLevel::M);
        return 'data:image/png;base64,' . base64_encode($data);
    }
protected function _getQRCodeInline($name, $secret, $title = null, $params = array())
    {
        $url = $this->_getQRCodeUrl($title, $name, $secret);
        list($width, $height, $level) = $this->_getQRParams($params);

        $renderer = new \BaconQrCode\Renderer\Image\Png();
        $renderer->setWidth($width)
                 ->setHeight($height)
                 ->setMargin(0);
        $bacon    = new \BaconQrCode\Writer($renderer);
        $data     = $bacon->writeString($urlencoded, $encoding, \BaconQrCode\Common\ErrorCorrectionLevel::M);
        return 'data:image/png;base64,' . base64_encode($data);
    }
protected function _getQRCodeInline ( $ name , $ secret , $ title = null , $ params = array ( ) ) { $ url = $ this -> _getQRCodeUrl ( $ title , $ name , $ secret ) ; list ( $ width , $ height , $ level ) = $ this -> _getQRParams ( $ params ) ; $ renderer = new \ BaconQrCode \ Renderer \ Image \ Png ( ) ; $ renderer -> setWidth ( $ width ) -> setHeight ( $ height ) -> setMargin ( 0 ) ; $ bacon = new \ BaconQrCode \ Writer ( $ renderer ) ; $ data = $ bacon -> writeString ( $ urlencoded , $ encoding , \ BaconQrCode \ Common \ ErrorCorrectionLevel :: M ) ; return 'data:image/png;base64,' . base64_encode ( $ data ) ; }
Get QR-Code URL for image, using inline data uri.

@param string $name The person using it
@param string $secret Above code in authenticator
@param string $title
@param array  $params

@return string
Get QR - Code URL for image using inline data uri .