1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-16 19:44:09 +02:00

Generated PHPDoc for all classes in e107_handlers where one was missing. toNumber() updated to always return int or float.

This commit is contained in:
Cameron
2022-04-04 10:54:24 -07:00
parent 813f2bf38f
commit 55980a29a8
104 changed files with 5498 additions and 1221 deletions

View File

@@ -10,12 +10,19 @@
if (!defined('e107_INIT')) { exit; }
/**
*
*/
class e_ranks
{
public $ranks;
private $userRanks;
private $imageFolder;
/**
* @param $force
*/
public function __construct($force = false)
{
$this->ranks = array();
@@ -65,6 +72,9 @@ class e_ranks
}
}
/**
* @return void
*/
protected function setDefaultRankData()
{
e107::coreLan('userclass');
@@ -165,11 +175,18 @@ class e_ranks
}
/**
* @return array
*/
public function getRankData()
{
return $this->ranks;
}
/**
* @param $info
* @return string
*/
private function _getImage(&$info)
{
$img = $info['image'];
@@ -182,6 +199,10 @@ class e_ranks
}
/**
* @param $info
* @return mixed|string
*/
private function _getName(&$info)
{
if(!isset($info['name_parsed'])) $info['name_parsed'] = e107::getParser()->toHTML($info['name'], FALSE, 'defs');
@@ -189,6 +210,12 @@ class e_ranks
}
// TODO - custom ranks (e.g. forum moderator)
/**
* @param $userId
* @param $moderator
* @return array|mixed
*/
function getRanks($userId, $moderator = false)
{
$e107 = e107::getInstance();
@@ -272,6 +299,11 @@ class e_ranks
}
// TODO - custom ranking by array key - e.g. user_comments only
/**
* @param $userData
* @return float
*/
private function _calcLevel(&$userData)
{
$forumCount = varset($userData['user_plugin_forum_posts'], 0) * 5;