Skip to content
Snippets Groups Projects
Select Git revision
  • 5d53fa299ed4ae7adc51ad86c757fe437c2cca02
  • master default protected
  • 1.6.4
  • 1.6.3
  • 1.6.2
  • 1.6.1
  • 1.6.0
  • 1.5.0
  • 1.4.0
  • 1.3.1
  • 1.3.0
  • 1.3.0-beta1
  • 1.2.1
  • 1.2.0
  • 1.2.0-beta5
  • 1.2.0-beta4
  • 1.2.0-beta3
  • 1.2.0-beta2
  • 1.2.0-beta1
  • 1.1.0
  • 1.0.0
21 results

RepositoryRatingPetitionText.php

Blame
  • RepositoryRatingPetitionText.php 1.02 KiB
    <?php
    
    namespace WPDesk\RepositoryRating;
    
    class RepositoryRatingPetitionText implements PetitionText {
    
    	/**
    	 * @var string
    	 */
    	private $plugin_author;
    
    	/**
    	 * @var string
    	 */
    	private $plugin_title;
    
    	/**
    	 * @var string
    	 */
    	private $rating_url;
    
    	/**
    	 * @var string
    	 */
    	private $text_align;
    
    	/**
    	 * @param string $plugin_author
    	 * @param string $plugin_title
    	 * @param string $rating_url
    	 * @param string $text_align
    	 */
    	public function __construct( string $plugin_author, string $plugin_title, string $rating_url, string $text_align ) {
    		$this->plugin_author = $plugin_author;
    		$this->plugin_title  = $plugin_title;
    		$this->rating_url    = $rating_url;
    		$this->text_align    = $text_align;
    	}
    
    	/**
    	 * @inheritDoc
    	 */
    	public function get_petition_text(): string {
    		ob_start();
    		$plugin_author = $this->plugin_author;
    		$plugin_title = $this->plugin_title;
    		$rating_url = $this->rating_url;
    		$text_align = $this->text_align;
    		include __DIR__ . '/views/html-text-petition.php';
    
    		return ob_get_clean();
    	}
    }