This commit is contained in:
2026-04-26 23:47:49 +02:00
parent 1b95f03d1e
commit b073e009d8
5288 changed files with 1112699 additions and 55536 deletions

View File

@@ -0,0 +1,38 @@
<?php
namespace ElfsightYoutubeGalleryApi\Core;
class User {
private $Helper;
private $pluginFile;
private $tableName;
public function __construct($Helper, $config) {
$this->Helper = $Helper;
$this->pluginFile = $config['plugin_file'];
$this->tableName = $this->Helper->getTableName('user');
if (!$this->Helper->tableExist($this->tableName)) {
$this->Helper->tableCreate($this->tableName, array('public_id' => 'varchar(255)', 'data' => 'text'));
}
}
public function get($public_id) {
return $this->Helper->tableRowGet($this->tableName, array('public_id' => $public_id));
}
public function set($public_id, $data) {
return !!$this->Helper->tableRowUpdate(
$this->tableName,
array(
'public_id' => $public_id,
'data' => $data
),
array('public_id' => $public_id)
);
}
}