You are here

function PclZipUtilOptionText in Quiz 6.5

Same name and namespace in other branches
  1. 6.6 includes/moodle/lib/pclzip/pclzip.lib.php \PclZipUtilOptionText()
2 calls to PclZipUtilOptionText()
PclZip::privFileDescrParseAtt in includes/moodle/lib/pclzip/pclzip.lib.php
PclZip::privParseOptions in includes/moodle/lib/pclzip/pclzip.lib.php

File

includes/moodle/lib/pclzip/pclzip.lib.php, line 5695

Code

function PclZipUtilOptionText($p_option) {

  //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, "PclZipUtilOptionText", "option='".$p_option."'");
  $v_list = get_defined_constants();
  for (reset($v_list); $v_key = key($v_list); next($v_list)) {
    $v_prefix = substr($v_key, 0, 10);
    if (($v_prefix == 'PCLZIP_OPT' || $v_prefix == 'PCLZIP_CB_' || $v_prefix == 'PCLZIP_ATT') && $v_list[$v_key] == $p_option) {

      //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_key);
      return $v_key;
    }
  }
  $v_result = 'Unknown';

  //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
  return $v_result;
}