• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /dokuwiki/vendor/simplepie/simplepie/library/SimplePie/

Lines Matching defs:input

396 	 * @param string $input
399 protected function remove_dot_segments($input)
402 while (strpos($input, './') !== false || strpos($input, '/.') !== false || $input === '.' || $input === '..')
404 // A: If the input buffer begins with a prefix of "../" or "./", then remove that prefix from the input buffer; otherwise,
405 if (strpos($input, '../') === 0)
407 $input = substr($input, 3);
409 elseif (strpos($input, './') === 0)
411 $input = substr($input, 2);
413 // B: if the input buffer begins with a prefix of "/./" or "/.", where "." is a complete path segment, then replace that prefix with "/" in the input buffer; otherwise,
414 elseif (strpos($input, '/./') === 0)
416 $input = substr($input, 2);
418 elseif ($input === '/.')
420 $input = '/';
422 // C: if the input buffer begins with a prefix of "/../" or "/..", where ".." is a complete path segment, then replace that prefix with "/" in the input buffer and remove the last segment and its preceding "/" (if any) from the output buffer; otherwise,
423 elseif (strpos($input, '/../') === 0)
425 $input = substr($input, 3);
428 elseif ($input === '/..')
430 $input = '/';
433 // D: if the input buffer consists only of "." or "..", then remove that from the input buffer; otherwise,
434 elseif ($input === '.' || $input === '..')
436 $input = '';
438 // E: move the first path segment in the input buffer to the end of the output buffer, including the initial "/" character (if any) and any subsequent characters up to, but not including, the next "/" character or the end of the input buffer
439 elseif (($pos = strpos($input, '/', 1)) !== false)
441 $output .= substr($input, 0, $pos);
442 $input = substr_replace($input, '', 0, $pos);
446 $output .= $input;
447 $input = '';
450 return $output . $input;