2018-09-22 17:06:13 +01:00
|
|
|
<?php
|
2025-03-29 10:50:03 +00:00
|
|
|
|
2022-02-14 20:48:15 -08:00
|
|
|
/**
|
|
|
|
|
* Represents a single item within a Collection.
|
2018-09-22 17:06:13 +01:00
|
|
|
*
|
2022-02-14 20:48:15 -08:00
|
|
|
* @package NamelessMC\Collections
|
|
|
|
|
* @see Collection
|
|
|
|
|
* @author Samerton
|
|
|
|
|
* @version 2.0.0-pr8
|
|
|
|
|
* @license MIT
|
2018-09-22 17:06:13 +01:00
|
|
|
*/
|
2024-03-09 03:19:55 -08:00
|
|
|
abstract class CollectionItemBase
|
|
|
|
|
{
|
2021-10-07 14:02:46 -07:00
|
|
|
private int $_order;
|
|
|
|
|
private bool $_enabled;
|
2020-12-13 20:42:04 -08:00
|
|
|
|
2024-03-09 03:19:55 -08:00
|
|
|
public function __construct(int $order, bool $enabled)
|
|
|
|
|
{
|
2020-12-13 19:38:04 +01:00
|
|
|
$this->_order = $order;
|
|
|
|
|
$this->_enabled = $enabled;
|
|
|
|
|
}
|
2018-09-22 17:06:13 +01:00
|
|
|
|
2024-03-09 03:19:55 -08:00
|
|
|
public function getOrder(): int
|
|
|
|
|
{
|
2020-12-13 19:38:04 +01:00
|
|
|
return $this->_order;
|
|
|
|
|
}
|
2018-09-22 17:06:13 +01:00
|
|
|
|
2024-03-09 03:19:55 -08:00
|
|
|
public function isEnabled(): bool
|
|
|
|
|
{
|
2020-12-13 19:38:04 +01:00
|
|
|
return $this->_enabled;
|
|
|
|
|
}
|
2018-09-22 17:06:13 +01:00
|
|
|
|
2022-01-15 15:18:05 -08:00
|
|
|
abstract public function getContent(): string;
|
2020-12-13 19:38:04 +01:00
|
|
|
}
|