| Server IP : 87.98.154.146 / Your IP : 216.73.216.101 Web Server : Apache System : Linux webm005.cluster126.gra.hosting.ovh.net 6.18.42-ovh-vps-grsec-zfs+ #1 SMP PREEMPT_DYNAMIC Wed Aug 5 15:59:48 CEST 2026 x86_64 User : bsiadvisil ( 110003) PHP Version : 7.3.33 Disable Function : _dyuweyrj4,_dyuweyrj4r,dl MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /home/bsiadvisil/www/libraries/msframework/helpers/ |
Upload File : |
<?php
/**
* MS Framework
*
* @package MS Framework Library
* @version 1.2.1.573
*
* @author Michael Snoeren
* @link https://snoerendevelopment.nl/
* @license GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
*/
// Deny direct access
defined('_JEXEC') or die;
class MSFrameworkFooter
{
/**
* Class Variables
* @var Mixed
* @access Protected
*/
protected $extName = '';
protected $extJEDUrl = '';
protected $includeDonate = false;
protected static $instance = null;
/**
* Constructor
* @param String $name The name of the extension (Translatable)
* @param String $url The url to the JED page of this extension
* @param Boolean $incd Include the donation link? Default: true
* @access Public
* @return Void
*/
public function __construct($name, $url, $incd = true)
{
if (!empty($name)) {
$this->extName = $name;
}
if (!empty($url)) {
$this->extJEDUrl = $url;
}
$this->includeDonate = $incd;
}
/**
* Render a footer
* @access Public
* @return String
*/
public function render()
{
ob_start();
echo '<div class="msf-footer text-center">';
echo $this->renderTitle();
echo $this->renderRate();
echo $this->renderCopyright();
if ($this->includeDonate) {
echo $this->renderDonate();
}
echo '</div>';
return ob_get_clean();
}
/**
* Render the title
* @access Protected
* @return String
*/
protected function renderTitle()
{
return $this->extName;
}
/**
* Render the rating row
* @access Protected
* @return String
*/
protected function renderRate()
{
if (empty($this->extJEDUrl)) {
return '<br />';
}
ob_start();
?><div class="msf-rate">
<?php
echo JText::sprintf(
'PLG_MSFRAMEWORK_FOOTER_RATE',
$this->extJEDUrl . '#reviews'
);
?>
</div>
<?php
return ob_get_clean();
}
/**
* Render the copyright text
* @access Protected
* @return String
*/
protected function renderCopyright()
{
$newDate = (int) date('Y') !== 2016 ? ' - ' . date('Y') : '';
return '<small>
<a href="https://snoerendevelopment.nl/" target="_blank">Snoeren Development</a>
© 2016' . $newDate . '
</small>';
}
/**
* Render the donation button
* @access Protected
* @return String
*/
protected function renderDonate()
{
return '<br /><small><a href="http://justa.beer/snoerendevelopment" target="_blank">Buy me a beer!</a></small>';
}
/**
* Set the footer instance
* @param Object $footer The footer instance
* @access Public
* @return Void
*/
public static function setInstance(MSFrameworkFooter $footer)
{
self::$instance = $footer;
}
/**
* Get the footer instance
* @param Object $footer The footer instance
* @access Public
* @return Object|Null
*/
public static function getInstance()
{
return self::$instance;
}
}