コード例 #1
0
function getCookieValue($_key, $_filter = false, $_maxlen = 0)
{
    global $CONFIG;
    if (empty($CONFIG["gl_colt"])) {
        return null;
    }
    if (empty($_COOKIE["lz_" . $_key])) {
        return null;
    }
    if ($_filter) {
        return filterParam(base64_decode($_COOKIE["lz_" . $_key]), "", FILTER_SANITIZE_STRING, null, $_maxlen);
    }
    return base64_decode($_COOKIE["lz_" . $_key]);
}
コード例 #2
0
 /**
  * Extracts method parameter types from the PHPDoc.
  *
  * @param \ReflectionMethod $reflect The ReflectionMethod
  *
  * @return array
  */
 public function getPHPDocParams(ReflectionMethod $reflect) : array
 {
     $comment = $reflect->getDocComment();
     if (trim($comment) === '') {
         return null;
     }
     $commentArray = $this->getPHPDocParamsFilter($comment);
     $filtered = [];
     foreach ($commentArray as $value) {
         $filtered[] = filterParam($value);
         $filtered[] = filterReturn($value);
     }
     return $filtered;
 }