設定ファイルから設定を取得します。

@param	string	$ini_path				設定ファイルのパス
@param	array	$allow_parameter_list	許可する設定のリスト
@param	array	$options				オプション
@return	array	設定のリスト
322846
public static function GetConfig ($ini_path, $allow_parameter_list = [], $options = []) {
		$static_cache = isset($options['static_cache']) && $options['static_cache'];
		isset($options['cache_dir']) && static::$_iniCacheFilePathList[$ini_path] = static::GetCacheFilePath($ini_path, $options['cache_dir']);
		$cache_file_path = isset(static::$_iniCacheFilePathList[$ini_path]) ? static::$_iniCacheFilePathList[$ini_path] : null;

		if ($static_cache && $cache_file_path !== null) {
			$ini_set = static::LoadCache($ini_path, $cache_file_path);
			if ($ini_set !== null) {
				return $ini_set;
			}
		}

		$ini_list = static::ReflectDynamicConfig(static::LoadConfig($ini_path, $allow_parameter_list, $options), $allow_parameter_list, $options);

		//キャッシュが有効な場合はキャッシュファイルを構築する
		if ($static_cache && $cache_file_path !== null) {
			$parent_cache_dir = dirname($cache_file_path);
			!file_exists($parent_cache_dir) && mkdir($parent_cache_dir, 0755, true);
			file_put_contents($cache_file_path, "<?php\n\nreturn " . var_export($ini_list, true));
		}

		return $ini_list;
	}
1295609
function (path, inside) {
            if (ariaUtilsType.isString(path)) {
                path = this.parse(path);
            }
            inside = inside ? inside : Aria.$window;
            if (ariaUtilsType.isArray(path)) {
                for (var index = 0, param, len = path.length; index < len; index++) {
                    param = path[index];
                    inside = inside[param];
                    if (!inside && index != len - 1) {
                        throw {
                            error : this.RESOLVE_FAIL,
                            args : [path],
                            object : inside
                        };
                    }
                }
                return inside;
            }
            throw {
                error : this.RESOLVE_FAIL,
                args : [path],
                object : inside
            };
        }
1326397
public function stream_open(string $uri, string $mode, int $options, &$openedPath): bool
    {
        if (null === self::$server) {
            trigger_error(sprintf(
                'HTTP wrapper must be registered using %s::register() method',
                self::class
            ), E_USER_WARNING);

            return false;
        }

        if (in_array($mode, ['w', 'w+', 'a', 'a+', 'x', 'x+', 'c', 'c+'], true)) {
            trigger_error('HTTP wrapper does not support writeable connections', E_USER_WARNING);

            return false;
        }

        $protocolVersion = 1.0;
        $method = 'GET';
        $headers = [];
        $body = null;
        $userAgent = ini_get('user_agent');

        $followRedirects = true;
        $maxRedirects = 20;

        if (null !== $this->context) {
            $contextOptions = stream_context_get_options($this->context);
            $contextOptions = $contextOptions['http'] ?? [];

            if (isset($contextOptions['method'])) {
                $method = $contextOptions['method'];
            }

            if (isset($contextOptions['header'])) {
                foreach ((array) $contextOptions['header'] as $header) {
                    if (!is_string($header) || !strpos($header, ':')) {
                        continue;
                    }

                    list($name, $value) = preg_split('/:\s*/', $header, 2);
                    if (!isset($headers[$name])) {
                        $headers[$name] = $value;
                    }
                }
            }

            if (isset($contextOptions['user_agent'])) {
                $userAgent = $contextOptions['user_agent'];
            }

            if (isset($contextOptions['content'])) {
                $body = $contextOptions['content'];
            }

            if (isset($contextOptions['follow_location'])) {
                $followRedirects = (bool) $contextOptions['follow_location'];
            }

            if (isset($contextOptions['max_redirects'])) {
                $maxRedirects = (int) $contextOptions['max_redirects'];
            }

            if (isset($contextOptions['protocol_version'])) {
                $protocolVersion = (float) $contextOptions['protocol_version'];
            }
        }

        $protocolVersion = sprintf('%01.1f', $protocolVersion);

        if ('' !== $userAgent && !in_array('user-agent', array_map('strtolower', array_keys($headers)), true)) {
            $headers['User-Agent'] = $userAgent;
        }

        $request = new Request($method, $uri, $headers, $body, $protocolVersion);

        if (null === $this->response = self::$server->handle($request)) {
            return $this->triggerError(sprintf(
                'The server used by HTTP wrapper returned no response for request %s %s.',
                $request->getMethod(),
                $request->getUri()
            ), $options);
        }

        if ($this->response->getStatusCode() >= 400) {
            return $this->triggerError(sprintf(
                'Request %s %s failed: %d %d.',
                $request->getMethod(),
                $request->getUri(),
                $this->response->getStatusCode(),
                $this->response->getReasonPhrase()
            ), $options);
        }

        if ($followRedirects) {
            $redirections = 0;
            $currentRequest = $request;
            while (($redirectUri = $this->response->getHeader('Location')) && '' !== $redirectUri = $redirectUri[0]) {
                $requestUri = $currentRequest->getUri();

                if (false === strpos($redirectUri, '://')) {
                    if (0 !== strpos($redirectUri, '/')) {
                        $path = $requestUri->getPath();
                        $redirectUri = substr($path, 0, strrpos($path, '/') + 1).'/'.$redirectUri;
                    }

                    if (null !== $port = $requestUri->getPort()) {
                        $redirectUri = ':'.$port.$redirectUri;
                    }

                    $redirectUri = $requestUri->getScheme().'://'.$requestUri->getHost().$redirectUri;
                }

                if ($redirections++ >= $maxRedirects) {
                    return $this->triggerError(sprintf(
                        'Request %s %s got redirected to %s but redirection limit (%d) has been reached.',
                        $request->getMethod(),
                        $request->getUri(),
                        $redirectUri,
                        $maxRedirects
                    ), $options);
                }

                $currentRequest = new Request('GET', $redirectUri, $headers, null, $protocolVersion);

                if (null === $this->response = self::$server->handle($currentRequest)) {
                    return $this->triggerError(sprintf(
                        'Request %s %s got redirected to %s but no response was returned by the server.',
                        $request->getMethod(),
                        $request->getUri(),
                        $redirectUri
                    ), $options);
                }

                if ($this->response->getStatusCode() >= 400) {
                    return $this->triggerError(sprintf(
                        'Request %s %s failed: %d %d.',
                        $request->getMethod(),
                        $request->getUri(),
                        $this->response->getStatusCode(),
                        $this->response->getReasonPhrase()
                    ), $options);
                }
            }
        }

        $body = $this->response->getBody();
        if ($body->isSeekable()) {
            $body->rewind();
        }

        return true;
    }
826564
static function PathExecutable($in_path)
    {
        $perms = fileperms($in_path);

        if (!is_dir($in_path)) {
            return false;
        }

        if (!strtoupper(substr(PHP_OS, 0, 3)) === 'WIN' && is_executable($in_path)) {
            return false;
        }

        if (!is_writeable($in_path)) {
            return false;
        }

        return true;
    }
409211
private function writeTmpIni(array $iniFiles, $tmpDir, &$error)
    {
        if (!$this->tmpIni = @tempnam($tmpDir, '')) {
            return false;
        }

        // $iniFiles has at least one item and it may be empty
        if (empty($iniFiles[0])) {
            array_shift($iniFiles);
        }

        $content = '';
        $regex = '/^\s*(zend_extension\s*=.*xdebug.*)$/mi';

        foreach ($iniFiles as $file) {
            // Check for inaccessible ini files
            if (!$data = @file_get_contents($file)) {
                $error = 'Unable to read ini: '.$file;
                return false;
            }
            $content .= preg_replace($regex, ';$1', $data).PHP_EOL;
        }

        // Merge loaded settings into our ini content, if it is valid
        if ($config = parse_ini_string($content)) {
            $loaded = ini_get_all(null, false);
            $content .= $this->mergeLoadedConfig($loaded, $config);
        }

        // Work-around for https://bugs.php.net/bug.php?id=75932
        $content .= 'opcache.enable_cli=0'.PHP_EOL;

        return @file_put_contents($this->tmpIni, $content);
    }
52659
public function redirectIfNotUrl($url, array $allowParams = array())
    {
        if ($url != $this->getRequest()->getRequestUri()) {
            $redirect = true;
            $newArgs = array();
            try {
                $tmp = parse_url($this->getRequest()->getRequestUri());
                if (isset($tmp['path']) && $tmp['path'] == $url) {
                    $redirect = false;
                }
                if (isset($tmp['query'])) {
                    parse_str($tmp['query'], $args);
                    $alloweds = array_merge($allowParams, $this->getParameter('nyroDev_utility.redirectIfNotUrl_params', array()));
                    foreach ($alloweds as $k) {
                        if (isset($args[$k])) {
                            $newArgs[$k] = $args[$k];
                        }
                    }
                    $redirect = count($newArgs) != count($args);
                }
            } catch (\Exception $e) {
                $redirect = false;
            }
            if ($redirect) {
                return new RedirectResponse($url.(count($newArgs) ? '?'.http_build_query($newArgs) : ''), 301);
            }
        }

        return false;
    }
1228043
function mergePath(options, deps, base) {
    return deps.map(function (item) {
        var origId = item.origId;

        // 防止多次merge
        if (item.path) {
            return;
        }
        origId = margeConfig(options, origId);
        return {
            id: item.id,
            extName: item.extName,
            path: origId.slice(0, 4) === 'http' || origId.slice(0, 2) === '//' ? origId : path.resolve(base, origId),
            origId: origId
        };
    });
}
463620
public static function ini(string $ini_file, $environment = null) : array {
		$result = [];
		$data = parse_ini_file($ini_file, true);
		// processing environment
		if (!empty($data['environment'])) {
			foreach ($data['environment'] as $k => $v) {
				array_key_set($result, explode('.', $k), $v);
			}
		}
		unset($data['environment']);
		// small chicken and egg problem for environment variable
		if ($environment == null && !empty($result['environment'])) {
			$environment = $result['environment'];
		}
		// processing dependencies first
		if (!empty($data['dependencies'])) {
			foreach ($data['dependencies'] as $k => $v) {
				array_key_set($result, $k, $v);
			}
		}
		unset($data['dependencies']);
		// proccesing environment specific sectings
		foreach ($data as $section => $values) {
			$sections = explode(',', $section);
			if (empty($values) || (!in_array($environment, $sections) && !in_array('*', $sections))) continue;
			foreach ($values as $k=>$v) {
				array_key_set($result, $k, $v);
			}
		}
		return $result;
	}
50683
private function _parseIni($iniFile)
    {
        $aParsedIni = parse_ini_file($iniFile, true, INI_SCANNER_RAW);
        $tmpArray = array();
        foreach ($aParsedIni as $key=>$value) {
            if (strpos($key, ':') !== false) {
                $sections = explode(':', $key);
                if (count($sections) != 2) {
                    throw new Exception('Malformed section header!');
                }
                $currentSection = trim($sections[0]);
                $parentSection = trim($sections[1]);
                $value = array_merge_recursive(
                    $aParsedIni[$parentSection],
                    $aParsedIni[$key]
                );
                $aParsedIni[$currentSection] = $value;
                unset($aParsedIni[$key]);
                $key = $currentSection;
            }
            if (is_array($value)) {
                foreach ($value as $vk=>$vv) {
                    $newKey = $key.".".$vk;
                    $tmpArray[$newKey] = $vv;
                    if (
                           is_string($vv) &&
                           preg_match_all('/\${([a-zA-Z0-9\.]+)}/', $vv, $match)
                        ) {
                        if (!isset($match[1])) {
                            continue;
                        }
                        $variableKey = $match[1];
                        foreach ($variableKey as &$var) {
                            if (strpos($var, '.') === false) {
                                $var = $key . '.' . $var;
                            }
                        }
                        $this->_varDeps[$newKey] = $variableKey;
                    }
                }
            }
        }
        if (!empty($tmpArray)) {
            $aParsedIni = $tmpArray;
        }
        foreach ($aParsedIni as $key=>$value) {    //extract parsed array keys
            if (array_key_exists($key, $this->_varDeps)) {
                $deps = &$this->_varDeps;
                $value = preg_replace_callback(
                    '/\${([a-zA-Z0-9\.]+)}/',
                    function ($match) use ($key, $aParsedIni, &$deps) {
                        return $aParsedIni[array_shift($deps[$key])];
                    },
                    $value
                );
                $aParsedIni[$key] = $value;
            }
            $this->_tmpValue = $value;//set temporay value to current ini value
            $aXKey = explode($this->_delimiter, $key);    //get ini key segments
            //set object properties recursively based on parsed ini
            $this->_recursiveInit($this->_obj, $aXKey);
        }
    }
53365
protected function update_init_params(array &$params, context $context,
            array $options = null) {

        $rowsnumber = $this->count_button_rows($params);
        if ($rowsnumber > 1) {
            $this->add_button_before($params, 1, 'pdw_toggle', '');
            $params['pdw_toggle_on'] = 1;
            $params['pdw_toggle_toolbars'] = join(',', range(2, $rowsnumber));

            // Add JS file, which uses default name.
            $this->add_js_plugin($params);
        }
    }
122692
private function getRouteParametersByInternalName($internalName, $locale, $parameters = array())
    {
        $url = '';
        $translation = $this->em->getRepository('KunstmaanNodeBundle:NodeTranslation')
            ->getNodeTranslationByLanguageAndInternalName($locale, $internalName);

        if (!is_null($translation)) {
            $url = $translation->getUrl();
        }

        return array_merge(
            array(
                'url' => $url,
                '_locale' => $locale,
            ),
            $parameters
        );
    }
399784
protected function _appendIniData(&$ini, $key, $iniRow)
    {
        if ($this->_processIniSection && is_array($iniRow)) {
            $ini .= '[' . $key . ']' . "\n";
            foreach ($iniRow as $rowKey => $rowData) {
                $ini .= $rowKey . ' = ' . $rowData . "\n";
            }
        } else {
            $ini .= $key . ' = ' . $iniRow . "\n";
        }
    }
314144
protected function evaluateFile(array $ini)
	{
		$savePath = $this->findValue('session.save_path', $ini);

		if ($savePath === '/tmp') {
			$this->setDescription('Custom path not set, default (/tmp) is world writeable');
			$this->fail();
			return false;
		}

		if (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') {
			$this->na();
			$this->setDescription('Cannot check Windows permissions. Please verify them manually');
			return true;
		}

		$perms = substr(sprintf('%o', fileperms($savePath)), - 3);
		if ($perms == 777) {
			$this->fail();
			$this->setDescription('Path '.$savePath.' is world writeable');
			return false;
		} else {
			$this->pass();
			return true;
		}
	}
92160
public function pathinfo(string $path, int $options = null)
    {
        [$scheme, $path] = $this->getSchemeAndHierarchy($path);

        if ($this->normalize || ($scheme && null === $this->normalize)) {
            $path = $this->normalizePathPart($path);
        }

        return $this->pathinfoInternal($scheme, $path, $options);
    }
50763
protected function ftpRawlist($options, $path)
    {
        $connection = $this->getConnection();

        if ($this->isPureFtpd) {
            $path = str_replace(' ', '\ ', $path);
        }
        return ftp_rawlist($connection, $options . ' ' . $path);
    }
1215307
def edit_ini(ini_filepath=None):
    
    if ini_filepath == None:
        ini_filepath = get_ini_filepath()

    try:
        click.edit(filename=ini_filepath)
    except click.exceptions.ClickException as err:
        print("Click err: %s" % err)
        webbrowser.open(ini_filepath)
63619
public function privParseOptions(&$p_options_list, $p_size, &$v_result_list, $v_requested_options = false)
    {
        $v_result=1;

        // ----- Read the options
        $i=0;
        while ($i<$p_size) {
            // ----- Check if the option is supported
            if (!isset($v_requested_options[$p_options_list[$i]])) {
                // ----- Error log
                PclZip::privErrorLog(PCLZIP_ERR_INVALID_PARAMETER, "Invalid optional parameter '".$p_options_list[$i]."' for this method");

                // ----- Return
                return PclZip::errorCode();
            }

            // ----- Look for next option
            switch ($p_options_list[$i]) {
                // ----- Look for options that request a path value
                case PCLZIP_OPT_PATH:
                case PCLZIP_OPT_REMOVE_PATH:
                case PCLZIP_OPT_ADD_PATH:
                    // ----- Check the number of parameters
                    if (($i+1) >= $p_size) {
                        // ----- Error log
                        PclZip::privErrorLog(PCLZIP_ERR_MISSING_OPTION_VALUE, "Missing parameter value for option '".PclZipUtilOptionText($p_options_list[$i])."'");

                        // ----- Return
                        return PclZip::errorCode();
                    }

                    // ----- Get the value
                    $v_result_list[$p_options_list[$i]] = PclZipUtilTranslateWinPath($p_options_list[$i+1], false);
                    $i++;
                    break;

                case PCLZIP_OPT_TEMP_FILE_THRESHOLD:
                    // ----- Check the number of parameters
                    if (($i+1) >= $p_size) {
                        PclZip::privErrorLog(PCLZIP_ERR_MISSING_OPTION_VALUE, "Missing parameter value for option '".PclZipUtilOptionText($p_options_list[$i])."'");
                        return PclZip::errorCode();
                    }

                    // ----- Check for incompatible options
                    if (isset($v_result_list[PCLZIP_OPT_TEMP_FILE_OFF])) {
                        PclZip::privErrorLog(PCLZIP_ERR_INVALID_PARAMETER, "Option '".PclZipUtilOptionText($p_options_list[$i])."' can not be used with option 'PCLZIP_OPT_TEMP_FILE_OFF'");
                        return PclZip::errorCode();
                    }

                    // ----- Check the value
                    $v_value = $p_options_list[$i+1];
                    if ((!is_integer($v_value)) || ($v_value<0)) {
                        PclZip::privErrorLog(PCLZIP_ERR_INVALID_OPTION_VALUE, "Integer expected for option '".PclZipUtilOptionText($p_options_list[$i])."'");
                        return PclZip::errorCode();
                    }

                    // ----- Get the value (and convert it in bytes)
                    $v_result_list[$p_options_list[$i]] = $v_value*1048576;
                    $i++;
                    break;

                case PCLZIP_OPT_TEMP_FILE_ON:
                    // ----- Check for incompatible options
                    if (isset($v_result_list[PCLZIP_OPT_TEMP_FILE_OFF])) {
                        PclZip::privErrorLog(PCLZIP_ERR_INVALID_PARAMETER, "Option '".PclZipUtilOptionText($p_options_list[$i])."' can not be used with option 'PCLZIP_OPT_TEMP_FILE_OFF'");
                        return PclZip::errorCode();
                    }

                    $v_result_list[$p_options_list[$i]] = true;
                    break;

                case PCLZIP_OPT_TEMP_FILE_OFF:
                    // ----- Check for incompatible options
                    if (isset($v_result_list[PCLZIP_OPT_TEMP_FILE_ON])) {
                        PclZip::privErrorLog(PCLZIP_ERR_INVALID_PARAMETER, "Option '".PclZipUtilOptionText($p_options_list[$i])."' can not be used with option 'PCLZIP_OPT_TEMP_FILE_ON'");
                        return PclZip::errorCode();
                    }
                    // ----- Check for incompatible options
                    if (isset($v_result_list[PCLZIP_OPT_TEMP_FILE_THRESHOLD])) {
                        PclZip::privErrorLog(PCLZIP_ERR_INVALID_PARAMETER, "Option '".PclZipUtilOptionText($p_options_list[$i])."' can not be used with option 'PCLZIP_OPT_TEMP_FILE_THRESHOLD'");
                        return PclZip::errorCode();
                    }
                    $v_result_list[$p_options_list[$i]] = true;
                    break;

                case PCLZIP_OPT_EXTRACT_DIR_RESTRICTION:
                    // ----- Check the number of parameters
                    if (($i+1) >= $p_size) {
                        // ----- Error log
                        PclZip::privErrorLog(PCLZIP_ERR_MISSING_OPTION_VALUE, "Missing parameter value for option '".PclZipUtilOptionText($p_options_list[$i])."'");
                        // ----- Return
                        return PclZip::errorCode();
                    }

                    // ----- Get the value
                    if (is_string($p_options_list[$i+1]) && ($p_options_list[$i+1] != '')) {
                        $v_result_list[$p_options_list[$i]] = PclZipUtilTranslateWinPath($p_options_list[$i+1], false);
                        $i++;
                    } else {
                    }
                    break;
                // ----- Look for options that request an array of string for value
                case PCLZIP_OPT_BY_NAME:
                    // ----- Check the number of parameters
                    if (($i+1) >= $p_size) {
                        // ----- Error log
                        PclZip::privErrorLog(PCLZIP_ERR_MISSING_OPTION_VALUE, "Missing parameter value for option '".PclZipUtilOptionText($p_options_list[$i])."'");
                        // ----- Return
                        return PclZip::errorCode();
                    }

                    // ----- Get the value
                    if (is_string($p_options_list[$i+1])) {
                            $v_result_list[$p_options_list[$i]][0] = $p_options_list[$i+1];
                    } elseif (is_array($p_options_list[$i+1])) {
                            $v_result_list[$p_options_list[$i]] = $p_options_list[$i+1];
                    } else {
                        // ----- Error log
                        PclZip::privErrorLog(PCLZIP_ERR_INVALID_OPTION_VALUE, "Wrong parameter value for option '".PclZipUtilOptionText($p_options_list[$i])."'");
                        // ----- Return
                        return PclZip::errorCode();
                    }
                    $i++;
                    break;
                // ----- Look for options that request an EREG or PREG expression
                case PCLZIP_OPT_BY_EREG:
                    // ereg() is deprecated starting with PHP 5.3. Move PCLZIP_OPT_BY_EREG
                    // to PCLZIP_OPT_BY_PREG
                    $p_options_list[$i] = PCLZIP_OPT_BY_PREG;
                case PCLZIP_OPT_BY_PREG:
                //case PCLZIP_OPT_CRYPT :
                    // ----- Check the number of parameters
                    if (($i+1) >= $p_size) {
                        // ----- Error log
                        PclZip::privErrorLog(PCLZIP_ERR_MISSING_OPTION_VALUE, "Missing parameter value for option '".PclZipUtilOptionText($p_options_list[$i])."'");
                        // ----- Return
                        return PclZip::errorCode();
                    }

                    // ----- Get the value
                    if (is_string($p_options_list[$i+1])) {
                            $v_result_list[$p_options_list[$i]] = $p_options_list[$i+1];
                    } else {
                        // ----- Error log
                        PclZip::privErrorLog(PCLZIP_ERR_INVALID_OPTION_VALUE, "Wrong parameter value for option '".PclZipUtilOptionText($p_options_list[$i])."'");
                        // ----- Return
                        return PclZip::errorCode();
                    }
                    $i++;
                    break;

                // ----- Look for options that takes a string
                case PCLZIP_OPT_COMMENT:
                case PCLZIP_OPT_ADD_COMMENT:
                case PCLZIP_OPT_PREPEND_COMMENT:
                    // ----- Check the number of parameters
                    if (($i+1) >= $p_size) {
                        // ----- Error log
                        PclZip::privErrorLog(PCLZIP_ERR_MISSING_OPTION_VALUE, "Missing parameter value for option '".PclZipUtilOptionText($p_options_list[$i])."'");

                        // ----- Return
                        return PclZip::errorCode();
                    }

                    // ----- Get the value
                    if (is_string($p_options_list[$i+1])) {
                            $v_result_list[$p_options_list[$i]] = $p_options_list[$i+1];
                    } else {
                        // ----- Error log
                        PclZip::privErrorLog(PCLZIP_ERR_INVALID_OPTION_VALUE, "Wrong parameter value for option '" .PclZipUtilOptionText($p_options_list[$i]) ."'");

                        // ----- Return
                        return PclZip::errorCode();
                    }
                    $i++;
                    break;

                // ----- Look for options that request an array of index
                case PCLZIP_OPT_BY_INDEX:
                    // ----- Check the number of parameters
                    if (($i+1) >= $p_size) {
                        // ----- Error log
                        PclZip::privErrorLog(PCLZIP_ERR_MISSING_OPTION_VALUE, "Missing parameter value for option '".PclZipUtilOptionText($p_options_list[$i])."'");

                        // ----- Return
                        return PclZip::errorCode();
                    }

                    // ----- Get the value
                    $v_work_list = array();
                    if (is_string($p_options_list[$i+1])) {
                        // ----- Remove spaces
                        $p_options_list[$i+1] = strtr($p_options_list[$i+1], ' ', '');

                        // ----- Parse items
                        $v_work_list = explode(",", $p_options_list[$i+1]);
                    } elseif (is_integer($p_options_list[$i+1])) {
                            $v_work_list[0] = $p_options_list[$i+1].'-'.$p_options_list[$i+1];
                    } elseif (is_array($p_options_list[$i+1])) {
                            $v_work_list = $p_options_list[$i+1];
                    } else {
                        // ----- Error log
                        PclZip::privErrorLog(PCLZIP_ERR_INVALID_OPTION_VALUE, "Value must be integer, string or array for option '".PclZipUtilOptionText($p_options_list[$i])."'");

                        // ----- Return
                        return PclZip::errorCode();
                    }

                    // ----- Reduce the index list
                    // each index item in the list must be a couple with a start and
                    // an end value : [0,3], [5-5], [8-10], ...
                    // ----- Check the format of each item
                    $v_sort_flag=false;
                    $v_sort_value=0;
                    for ($j=0; $j<sizeof($v_work_list); $j++) {
                        // ----- Explode the item
                        $v_item_list = explode("-", $v_work_list[$j]);
                        $v_size_item_list = sizeof($v_item_list);

                        // ----- TBC : Here we might check that each item is a
                        // real integer ...

                        // ----- Look for single value
                        if ($v_size_item_list == 1) {
                            // ----- Set the option value
                            $v_result_list[$p_options_list[$i]][$j]['start'] = $v_item_list[0];
                            $v_result_list[$p_options_list[$i]][$j]['end'] = $v_item_list[0];
                        } elseif ($v_size_item_list == 2) {
                            // ----- Set the option value
                            $v_result_list[$p_options_list[$i]][$j]['start'] = $v_item_list[0];
                            $v_result_list[$p_options_list[$i]][$j]['end'] = $v_item_list[1];
                        } else {
                            // ----- Error log
                            PclZip::privErrorLog(PCLZIP_ERR_INVALID_OPTION_VALUE, "Too many values in index range for option '".PclZipUtilOptionText($p_options_list[$i])."'");

                            // ----- Return
                            return PclZip::errorCode();
                        }


                        // ----- Look for list sort
                        if ($v_result_list[$p_options_list[$i]][$j]['start'] < $v_sort_value) {
                            $v_sort_flag=true;

                            // ----- TBC : An automatic sort should be writen ...
                            // ----- Error log
                            PclZip::privErrorLog(PCLZIP_ERR_INVALID_OPTION_VALUE, "Invalid order of index range for option '".PclZipUtilOptionText($p_options_list[$i])."'");

                            // ----- Return
                            return PclZip::errorCode();
                        }
                        $v_sort_value = $v_result_list[$p_options_list[$i]][$j]['start'];
                    }

                    // ----- Sort the items
                    if ($v_sort_flag) {
                        // TBC : To Be Completed
                    }
                    // ----- Next option
                    $i++;
                    break;
                // ----- Look for options that request no value
                case PCLZIP_OPT_REMOVE_ALL_PATH:
                case PCLZIP_OPT_EXTRACT_AS_STRING:
                case PCLZIP_OPT_NO_COMPRESSION:
                case PCLZIP_OPT_EXTRACT_IN_OUTPUT:
                case PCLZIP_OPT_REPLACE_NEWER:
                case PCLZIP_OPT_STOP_ON_ERROR:
                    $v_result_list[$p_options_list[$i]] = true;
                    break;
                // ----- Look for options that request an octal value
                case PCLZIP_OPT_SET_CHMOD:
                    // ----- Check the number of parameters
                    if (($i+1) >= $p_size) {
                        // ----- Error log
                        PclZip::privErrorLog(PCLZIP_ERR_MISSING_OPTION_VALUE, "Missing parameter value for option '".PclZipUtilOptionText($p_options_list[$i])."'");
                        // ----- Return
                        return PclZip::errorCode();
                    }
                    // ----- Get the value
                    $v_result_list[$p_options_list[$i]] = $p_options_list[$i+1];
                    $i++;
                    break;

                // ----- Look for options that request a call-back
                case PCLZIP_CB_PRE_EXTRACT:
                case PCLZIP_CB_POST_EXTRACT:
                case PCLZIP_CB_PRE_ADD:
                case PCLZIP_CB_POST_ADD:
                /* for futur use
                case PCLZIP_CB_PRE_DELETE :
                case PCLZIP_CB_POST_DELETE :
                case PCLZIP_CB_PRE_LIST :
                case PCLZIP_CB_POST_LIST :
                */
                    // ----- Check the number of parameters
                    if (($i+1) >= $p_size) {
                        // ----- Error log
                        PclZip::privErrorLog(PCLZIP_ERR_MISSING_OPTION_VALUE, "Missing parameter value for option '".PclZipUtilOptionText($p_options_list[$i])."'");
                        // ----- Return
                        return PclZip::errorCode();
                    }

                    // ----- Get the value
                    $v_function_name = $p_options_list[$i+1];

                    // ----- Check that the value is a valid existing function
                    if (!function_exists($v_function_name)) {
                        // ----- Error log
                        PclZip::privErrorLog(PCLZIP_ERR_INVALID_OPTION_VALUE, "Function '".$v_function_name."()' is not an existing function for option '".PclZipUtilOptionText($p_options_list[$i])."'");
                        // ----- Return
                        return PclZip::errorCode();
                    }

                    // ----- Set the attribute
                    $v_result_list[$p_options_list[$i]] = $v_function_name;
                    $i++;
                    break;
                default:
                    // ----- Error log
                    PclZip::privErrorLog(PCLZIP_ERR_INVALID_PARAMETER, "Unknown parameter '" .$p_options_list[$i]."'");

                    // ----- Return
                    return PclZip::errorCode();
            }

            // ----- Next options
            $i++;
        }

        // ----- Look for mandatory options
        if ($v_requested_options !== false) {
            for ($key=reset($v_requested_options); $key=key($v_requested_options); $key=next($v_requested_options)) {
                // ----- Look for mandatory option
                if ($v_requested_options[$key] == 'mandatory') {
                    // ----- Look if present
                    if (!isset($v_result_list[$key])) {
                        // ----- Error log
                        PclZip::privErrorLog(PCLZIP_ERR_INVALID_PARAMETER, "Missing mandatory parameter ".PclZipUtilOptionText($key)."(".$key.")");

                        // ----- Return
                        return PclZip::errorCode();
                    }
                }
            }
        }

        // ----- Look for default values
        if (!isset($v_result_list[PCLZIP_OPT_TEMP_FILE_THRESHOLD])) {
        }

        // ----- Return
        return $v_result;
    }