wp-inirepo/includes/inirepo_old.php

61 lines
1.3 KiB
PHP

<?php
namespace cooini\Inirepo;
class inirepoOld implements pluginInterface
{
protected string $plugin_name = "inirepo";
protected string $plugin_friendly_name = "WP iniRepo";
protected string $version = "1.0.0";
protected array $repos;
public function __construct()
{
if (!$this->load_dependencies())
throw new \Exception("Failed to load plugin dependencies");
if (! $this->hasRequirements())
throw new \Exception();
}
public function activate() : bool
{
if (! $this->hasRequirements())
throw new \Exception("Plugin requirements not met");
if (! $this->isLicensed())
{
throw new \Exception("Plugin is not licensed for this site");
}
}
public function load_dependencies(): bool
{
// TODO: Implement load_dependencies() method.
}
public function hasRequirements(): bool
{
return true;
}
public function isLicensed() : bool
{
return true;
}
public function getVersion(): string
{
return $this->version;
}
public function getPluginName(): string
{
return $this->plugin_name;
}
public function getFriendlyPluginName(): string
{
return $this->plugin_friendly_name;
}
}