Example #1
0
 /**
  * getStatLgth
  * 
  * @param int $hid
  * @return array
  */
 public function getStatLgth($hid)
 {
     $lgth = $this->getStatDays($hid);
     if (!isset($lgth['len']) || !is_array($lgth = $lgth['len'])) {
         return array();
     }
     $maps = getStatLgths();
     $lgth = array_combine($lgth, str_replace(array_keys($maps), $maps, $lgth));
     return $lgth;
 }
Example #2
0
/**
 * getStatLgthNameByCode
 * 
 * @param mixed $code
 * @return mixed
 */
function getStatLgthNameByCode($code)
{
    $names = getStatLgths();
    return isset($names[$code]) ? $names[$code] : null;
}