PHP Classes

File: src/Contracts/Managers/LogoManagerInterface.php

Recommend this page to a friend!
  Packages of Amirreza Ebrahimi   HeroQR Powerful PHP QR Code Library to generate PNG, SVG, PDF, Logos Ready to Use with Laravel   src/Contracts/Managers/LogoManagerInterface.php   Download  
File: src/Contracts/Managers/LogoManagerInterface.php
Role: Class source
Content type: text/plain
Description: Class source
Class: HeroQR Powerful PHP QR Code Library to generate PNG, SVG, PDF, Logos Ready to Use with Laravel
Generate QR code images in several formats
Author: By
Last change: Update of src/Contracts/Managers/LogoManagerInterface.php
Date: 6 months ago
Size: 2,593 bytes
 

Contents

Class file image Download
<?php

namespace HeroQR\Contracts\Managers;

/**
 * Interface LogoManagerInterface
 *
 * This interface defines methods for managing the logo that can be included
 * in a QR code. It provides functionality for setting the logo's file path,
 * size, background visibility, and retrieving those properties.
 *
 * @package HeroQR\Contracts\Managers
 */
interface LogoManagerInterface
{
   
/**
     * Set the logo file path
     *
     * This method allows you to specify the file path of the logo that will
     * be placed on the QR code. The logo can be any image file (e.g., PNG, JPEG)
     *
     * @param string $logoPath The file path to the logo image
     * @return void
     */
   
public function setLogo(string $logoPath): void;

   
/**
     * Get the current logo file path
     *
     * This method retrieves the current file path of the logo that is set for
     * the QR code. It will return the file path of the logo
     *
     * @return string The file path to the logo image
     */
   
public function getLogoPath(): string;

   
/**
     * Set whether the logo should have a background
     *
     * This method allows you to set if the logo should be displayed with a background
     * This can help improve the visibility of the logo, especially if the QR code
     * contains colors that make the logo less visible.
     *
     * @param bool $logoBackground True if the logo should have a background, false otherwise.
     * @return void
     */
   
public function setLogoBackground(bool $logoBackground): void;

   
/**
     * Get the current logo background setting
     *
     * This method retrieves the current setting for whether the logo should have a background
     * It returns `true` if the logo has a background and `false` otherwise
     *
     * @return bool True if the logo has a background, false otherwise
     */
   
public function getLogoBackground(): bool;

   
/**
     * Set the logo size
     *
     * This method defines the size of the logo relative to the QR code
     * The size can be set in pixels or as a percentage of the QR code's overall size
     *
     * @param int $size The size of the logo in pixels or percentage
     * @return void
     */
   
public function setLogoSize(int $size): void;

   
/**
     * Get the current logo size
     *
     * This method retrieves the current size of the logo. The size is returned
     * in pixels or as a percentage of the QR code's size, depending on how it was set
     *
     * @return int The size of the logo in pixels or percentage
     */
   
public function getLogoSize(): int;
}