| 1 |
<?php |
| 2 |
/** |
| 3 |
* @package VikBooking |
| 4 |
* @subpackage core |
| 5 |
* @author E4J s.r.l. |
| 6 |
* @copyright Copyright (C) 2026 E4J s.r.l. All Rights Reserved. |
| 7 |
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL |
| 8 |
* @link https://vikwp.com |
| 9 |
*/ |
| 10 |
|
| 11 |
// No direct access |
| 12 |
defined('ABSPATH') or die('No script kiddies please!'); |
| 13 |
|
| 14 |
/** |
| 15 |
* Chat context adapter class. |
| 16 |
* |
| 17 |
* @since 1.8 |
| 18 |
*/ |
| 19 |
abstract class VBOChatContextaware implements VBOChatContext |
| 20 |
{ |
| 21 |
/** |
| 22 |
* The foreign key to link the messages to the context. |
| 23 |
* |
| 24 |
* @var int |
| 25 |
*/ |
| 26 |
protected $id; |
| 27 |
|
| 28 |
/** |
| 29 |
* Class constructor. |
| 30 |
* |
| 31 |
* @param int $id The context foreign key. |
| 32 |
*/ |
| 33 |
public function __construct(int $id) |
| 34 |
{ |
| 35 |
$this->id = $id; |
| 36 |
} |
| 37 |
|
| 38 |
/** |
| 39 |
* @inheritDoc |
| 40 |
*/ |
| 41 |
final public function getID() |
| 42 |
{ |
| 43 |
return $this->id; |
| 44 |
} |
| 45 |
|
| 46 |
/** |
| 47 |
* @inheritDoc |
| 48 |
*/ |
| 49 |
public function getMetadata(bool $public = false) |
| 50 |
{ |
| 51 |
return []; |
| 52 |
} |
| 53 |
|
| 54 |
/** |
| 55 |
* @inheritDoc |
| 56 |
*/ |
| 57 |
public function setMetadata(string $key, $value) |
| 58 |
{ |
| 59 |
// do nothing |
| 60 |
} |
| 61 |
|
| 62 |
/** |
| 63 |
* @inheritDoc |
| 64 |
*/ |
| 65 |
public function useAssets(VBOChatUser $user) |
| 66 |
{ |
| 67 |
// do nothing |
| 68 |
} |
| 69 |
|
| 70 |
/** |
| 71 |
* @inheritDoc |
| 72 |
*/ |
| 73 |
public function getActions(VBOChatUser $user) |
| 74 |
{ |
| 75 |
return []; |
| 76 |
} |
| 77 |
} |
| 78 |
|