Files
IPB/system/Extensions/CommunityEnhancementsAbstract.php
T
2025-12-19 16:27:35 -08:00

62 lines
1.2 KiB
PHP

<?php
/**
* @brief CommunityEnhancementsAbstract
* @author <a href='https://www.invisioncommunity.com'>Invision Power Services, Inc.</a>
* @copyright (c) Invision Power Services, Inc.
* @license https://www.invisioncommunity.com/legal/standards/
* @package Invision Community
* @subpackage
* @since 11/16/2023
*/
namespace IPS\Extensions;
/* To prevent PHP errors (extending class does not exist) revealing path */
use LogicException;
if ( !defined( '\IPS\SUITE_UNIQUE_KEY' ) )
{
header( ( $_SERVER['SERVER_PROTOCOL'] ?? 'HTTP/1.0' ) . ' 403 Forbidden' );
exit;
}
abstract class CommunityEnhancementsAbstract
{
/**
* @brief Enhancement is enabled?
*/
public bool $enabled = FALSE;
/**
* @brief IPS-provided enhancement?
*/
public bool $ips = FALSE;
/**
* @brief Enhancement has configuration options?
*/
public bool $hasOptions = TRUE;
/**
* @brief Icon data
*/
public string $icon = "";
/**
* Edit
*
* @return void
*/
abstract public function edit() : void;
/**
* Enable/Disable
*
* @param $enabled bool Enable/Disable
* @return void
* @throws LogicException
*/
abstract public function toggle( bool $enabled ) : void;
}