| Server IP : 66.29.153.156 / Your IP : 216.73.216.151 Web Server : LiteSpeed System : Linux premium322.web-hosting.com 4.18.0-553.50.1.lve.el8.x86_64 #1 SMP Thu Apr 17 19:10:24 UTC 2025 x86_64 User : lastyfjz ( 1521) PHP Version : 8.1.34 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /home/lastyfjz/dermalaserclinic.co.uk/wp-content/plugins/boxzilla/src/ |
Upload File : |
<?php
namespace Boxzilla;
class Plugin
{
/**
* @var string The current version of the plugin
*/
protected $version = '1.0';
/**
* @var string
*/
protected $file = '';
/**
* @var string
*/
protected $dir = '';
/**
* @var string
*/
protected $name = '';
/**
* @var string
*/
protected $slug = '';
/**
* @var int
*/
protected $id = 0;
/**
* Constructor
*
* @param int $id
* @param string $name
* @param string $version
* @param string $file
* @param string $dir (optional)
*/
public function __construct($id, $name, $version, $file, $dir = '')
{
$this->id = $id;
$this->name = $name;
$this->version = $version;
$this->file = $file;
$this->dir = $dir;
$this->slug = plugin_basename($file);
if (empty($dir)) {
$this->dir = dirname($file);
}
}
/**
* @return int
*/
public function id()
{
return $this->id;
}
/**
* @return string
*/
public function slug()
{
return $this->slug;
}
/**
* @return string
*/
public function name()
{
return $this->name;
}
/**
* @return string
*/
public function version()
{
return $this->version;
}
/**
* @return string
*/
public function file()
{
return $this->file;
}
/**
* @return string
*/
public function dir()
{
return $this->dir;
}
/**
* @param string $path
*
* @return mixed
*/
public function url($path = '')
{
return plugins_url($path, $this->file());
}
}