public/QRCode/QRCode.class.php
/**
     * Photo (avatar).
     *
     * @param string $sImgUrl URL of the image.
     * @return object this
     * @throws InvalidArgumentException If the image format is invalid.
     */
Photo (avatar).
@param string $sImgUrl URL of the image.
@return object this
@throws InvalidArgumentException If the image format is invalid.
Photo ( avatar ) . @param string $sImgUrl URL of the image . @return object this @throws InvalidArgumentException If the image format is invalid .
public function photo($sImgUrl)
    {
        $bIsImgExt = strtolower(substr(strrchr($sImgUrl, '.'), 1)); 
        if ($bIsImgExt == 'jpeg' || $bIsImgExt == 'jpg' || $bIsImgExt == 'png' || $bIsImgExt == 'gif')
            $sExt = strtoupper($bIsImgExt);
        else
            throw new InvalidArgumentException('Invalid format Image!');
        $this->_sData .= 'PHOTO;VALUE=URL;TYPE=' . $sExt . ':' . $sImgUrl . "\n";
        return $this;
    }
public function photo ( $ sImgUrl ) { $ bIsImgExt = strtolower ( substr ( strrchr ( $ sImgUrl , '.' ) , 1 ) ) ; if ( $ bIsImgExt == 'jpeg' || $ bIsImgExt == 'jpg' || $ bIsImgExt == 'png' || $ bIsImgExt == 'gif' ) $ sExt = strtoupper ( $ bIsImgExt ) ; else throw new InvalidArgumentException ( 'Invalid format Image!' ) ; $ this -> _sData .= 'PHOTO;VALUE=URL;TYPE=' . $ sExt . ':' . $ sImgUrl . " \n " ; return $ this ; }
Photo (avatar).
Photo ( avatar ) .
// Get the file extension.