Hunter Black Hat SEO
Server:LiteSpeed
System:Linux raton.hozzt.com 4.18.0-553.144.1.lve.el8.x86_64 #1 SMP Thu Jul 16 08:31:06 UTC 2026 x86_64
User:altinkayamarble (1260)
PHP:7.4.33
Disabled:symlink, show_source, system, virtual, shell_exec,passthru, exec, popen, proc_open, proc_close, proc_nice, proc_terminate,proc_get_status, pfsockopen,allow_url_fopen, posix_getpwuid, eval,posix_setsid, posix_mkfifo, posix_setpgid,posix_setuid, posix_uname,posix_kill,apache_child_terminate, apache_setenv,define_syslog_variables,escapeshellarg, escapeshellcmd, leak, dl, fp, fput,ftp_connect, ftp_exec,ftp_get, ftp_login, ftp_nb_fput, ftp_put, ftp_raw, ftp_rawlist,highlight_file, ini_alter, ini_get_all, ini_restore, inject_code
Upload Files
File: /home/altinkayamarble/www/wp-content/plugins/akeebabackupwp/app/Awf/Document/Toolbar/Button.php
<?php
/**
 * @package   awf
 * @copyright Copyright (c)2014-2022 Nicholas K. Dionysopoulos / Akeeba Ltd
 * @license   GNU GPL version 3 or later
 */

namespace Awf\Document\Toolbar;
use Awf\Input\Filter;

/**
 * Class Button
 *
 * Definition of a toolbar button
 *
 * @package   Awf\Document\Toolbar
 */
class Button
{
	/**
	 * The class of the button. Usually used to define the color of the button.
	 *
	 * @var   string
	 */
	private $class = '';

	/**
	 * The class of the button's icon
	 *
	 * @var   string
	 */
	private $icon = '';

	/**
	 * The title of the button
	 *
	 * @var   string
	 */
	private $title = '';

	/**
	 * The DOM identifier of the button
	 *
	 * @var   string
	 */
	private $id = '';

	/**
	 * The onClick event of the button
	 *
	 * @var   string
	 */
	private $onClick = '';

	/**
	 * A custom URL to visit when the button's clicked. Overrides the onClick
	 * handler.
	 *
	 * @var   string
	 */
	private $url = '';

	/**
	 * Public constructor
	 *
	 * @param   array  $options  The configuration parameters of this menu item
	 *
	 * @throws  \Exception  When basic parameters are missing
	 */
	public function __construct(array $options)
	{
		foreach ($options as $k => $v)
		{
			$method = 'set' . ucfirst($k);

			if (method_exists($this, $method))
			{
				$this->$method($v);
			}
		}
	}

	/**
	 * Sets the button's class
	 *
	 * @param   string  $class
	 *
	 * @return  void
	 *
	 * @codeCoverageIgnore
	 */
	public function setClass($class)
	{
		$this->class = $class;
	}

	/**
	 * Gets the button's class
	 *
	 * @return  string
	 *
	 * @codeCoverageIgnore
	 */
	public function getClass()
	{
		return $this->class;
	}

	/**
	 * Sets the button icon's class
	 *
	 * @param   string  $icon
	 *
	 * @return  void
	 *
	 * @codeCoverageIgnore
	 */
	public function setIcon($icon)
	{
		$this->icon = $icon;
	}

	/**
	 * Gets the button icon's class
	 *
	 * @return  string
	 *
	 * @codeCoverageIgnore
	 */
	public function getIcon()
	{
		return $this->icon;
	}

	/**
	 * Sets the button's DOM identifier
	 *
	 * @param   string  $id
	 *
	 * @return  void
	 *
	 * @codeCoverageIgnore
	 */
	public function setId($id)
	{
		$this->id = $id;
	}

	/**
	 * Gets the button's DOM identifier
	 *
	 * @return  string
	 */
	public function getId()
	{
		if (empty($this->id))
		{
			$filter = new Filter();
			$this->id = $filter->clean($this->getTitle(), 'cmd');
		}

		return $this->id;
	}

	/**
	 * Sets the button's onClick handler
	 *
	 * @param   string  $onClick
	 *
	 * @return  void
	 *
	 * @codeCoverageIgnore
	 */
	public function setOnClick($onClick)
	{
		$this->onClick = $onClick;
	}

	/**
	 * Gets the button's onClick handler
	 *
	 * @return  string
	 *
	 * @codeCoverageIgnore
	 */
	public function getOnClick()
	{
		return $this->onClick;
	}

	/**
	 * Sets the button's title (raw key)
	 *
	 * @param   string  $title
	 *
	 * @return  void
	 *
	 * @codeCoverageIgnore
	 */
	public function setTitle($title)
	{
		$this->title = $title;
	}

	/**
	 * Gets the button's title (raw key)
	 *
	 * @return  string
	 *
	 * @codeCoverageIgnore
	 */
	public function getTitle()
	{
		return $this->title;
	}

	/**
	 * Sets the button's direct URL
	 *
	 * @param   string  $url
	 *
	 * @return  void
	 *
	 * @codeCoverageIgnore
	 */
	public function setUrl($url)
	{
		$this->url = $url;
	}

	/**
	 * Gets the button's direct URL
	 *
	 * @return  string
	 *
	 * @codeCoverageIgnore
	 */
	public function getUrl()
	{
		return $this->url;
	}
}