search
HomeBackend DevelopmentPHP TutorialCI framework source code reading---------URI.php_PHP tutorial

[php]  

/** 
 * CodeIgniter 
 * 
 * An open source application development framework for PHP 5.1.6 or newer 
 * 
 * @package     CodeIgniter 
 * @author      ExpressionEngine Dev Team 
 * @copyright   Copyright (c) 2008 - 2011, EllisLab, Inc. 
 * @license     http://codeigniter.com/user_guide/license.html 
 * @link        http://codeigniter.com 
 * @since       Version 1.0 
 * @filesource 
 */  
  
// ------------------------------------------------------------------------  
  
/** 
 * URI Class 
 * 
 * Parses 解析 URIs and determines routing 
 * 
 * @package     CodeIgniter 
 * @subpackage  Libraries 
 * @category    URI 
 * @author      ExpressionEngine Dev Team 
 * @link        http://codeigniter.com/user_guide/libraries/uri.html 
 */  
class CI_URI {  
  
    /**
* List of cached uri segments
* Cache uri segment list
* @var array
* @access public
*/  
    var $keyval         = array();  
    /**
* Current uri string
* Current uri string
* @var string
* @access public
*/  
    var $uri_string;  
    /**
* List of uri segments
* uri segment list
* @var array
* @access public
*/  
    var $segments       = array();  
    /**
* Re-indexed list of uri segments
* Starts at 1 instead of 0
* Re-index the rui segment list starting from 1
* @var array
* @access public
*/  
    var $rsegments      = array();  
  
    /** 
     * Constructor 
     * 
     * Simply globalizes the $RTR object.  The front 
     * loads the Router class early on so it's not available 
     * normally as other classes are. 
     * 
     * @access  public 
     */  
    function __construct()  
    {  
        $this->config =& load_class('Config', 'core');  
        log_message('debug', "URI Class Initialized");  
    }  
  
  
    // --------------------------------------------------------------------  
  
    /** 
     * Get the URI String 
     * 
     * @access  private 
     * @return  string 
     */  
    function _fetch_uri_string()  
    {  
        // 下面的uri_protocol是在config.php里面的一个配置项,  
        // 其实是问你用哪种方式去检测uri的信息的意思,  
// The default is AUTO, automatic detection, that is, detection through various methods until it is detected, or all methods are detected. .
if (strtoupper($this->config->item('uri_protocol')) == 'AUTO')
{
// Is the request coming from the command line?
// Start trying various methods, mainly: command line, REQUEST_URI, PATH_INFO, QUERY_STRING.
                                                                                                                                                                                                                                                                                                   
// After the filtration and trimming value, the value of $ this-& gt; uri_string is temporarily understood as assignment.
                                       // If the script is run in command line mode, the parameters are passed through $_SERVER['argv']. Below
// $this->_parse_cli_args(); is to get some parameters related to routing that meet our needs
// If you do not use the command line to execute the script, the IF below can not be controlled for the time being.
                         // At this time we found that the URI class uses the function php_sapi_name() to test different environments
                                                                                                                                                                                                                                                                                               
// The result of the output output in CGI mode is "CGI-FCGI"
                                                                                                                                                                 
if (php_sapi_name() == 'cli' or defined('STDIN'))
                                                                 
$this->_set_uri_string($this->_parse_cli_args());
            return;                          
      }  
                                                                                                                                                                                                                                                                                                   
// Find uri
if ($uri = $this->_detect_uri())
                                                                 
// If you find the URI setting $ this- & gt; uri_string
$this->_set_uri_string($uri);
            return;                          
      }  
// Is there a PATH_INFO variable?
// Note: some servers seem to have trouble with getenv() so we'll test it two ways
// Get Path $ _Server ['PATH_INFO'] is not every request.
$path = (isset($_SERVER['PATH_INFO'])) ? $_SERVER['PATH_INFO'] : @getenv('PATH_INFO');
              if (trim($path, '/') != '' && $path != "/".SELF)  
                                                                 
$this->_set_uri_string($path);
            return;                          
      }  
// No PATH_INFO?... What about QUERY_STRING?
             // If $_SERVER['PATH_INFO'] is not found we use QUERY_STRING
$path = (isset($_SERVER['QUERY_STRING'])) ? $_SERVER['QUERY_STRING'] : @getenv('QUERY_STRING');
          if (trim($path, '/') != '')
                                                                 
$this->_set_uri_string($path);
            return;                            
      }  
// As a last ditch effort lets try using the $_GET array
                      // If neither PATH_INFO nor QUERY_STRING is found, we can only use $_GET
if (is_array($_GET) && count($_GET) == 1 && trim(key($_GET), '/') != '')
                                                                 
$this->_set_uri_string(key($_GET));
            return;                            
      }  
// We've exhausted all our options...
// After the above efforts, we have not found URI, so we really can't find
$this->uri_string = '';
return;
} }
// I have rewritten it here to get uri_protocol. In fact, I think it is completely possible to get it only once. . .
$uri = strtoupper($this->config->item('uri_protocol'));
// The following is to choose different methods to obtain uri according to different methods
if ($uri == 'REQUEST_URI')
{
$this->_set_uri_string($this->_detect_uri());
return;
} }
elseif ($uri == 'CLI')
{
$this->_set_uri_string($this->_parse_cli_args());
return;
} }
// If the uri_protocol you define is outside the three methods of AUTO REQUEST_URI CLI, execute the following paragraph.
$path = (isset($_SERVER[$uri])) ? $_SERVER[$uri] : @getenv($uri);
$this->_set_uri_string($path);
}
//------------------------------------------------ -----------------------
/** 
     * Set the URI String 
     * 
     * @access  public 
     * @param   string 
     * @return  string 
     */
function _set_uri_string($str)
{
// Filter out control characters
// Filter string remove_invisible_characters function is in common.php
$str = remove_invisible_characters($str, FALSE);
// If the URI contains only a slash we'll kill it
// If the string contains only one /, clear it
$this->uri_string = ($str == '/') ? '' : $str;
}
//------------------------------------------------ -----------------------
/**
* Detects the URI
* Search uri
* This function will detect the URI automatically and fix the query string
* if necessary. Necessities
* This function will automatically find the uri and fix the query string if necessary.
*
* @access private
* @return string
*/
private function _detect_uri()
{
// If one of the two values ​​is missing, return (the two variables come from the web server. When encountering some special server programs, this may be empty.)
if ( ! isset($_SERVER['REQUEST_URI']) OR ! isset($_SERVER['SCRIPT_NAME']))
{
            return '';                                      
} }
// Get uri
$uri = $_SERVER['REQUEST_URI'];
// If the first occurrence of SCRIPT_NAME in $uri is 0
if (strpos($uri, $_SERVER['SCRIPT_NAME']) === 0)
{
                                                                                                                                                                                                                                                                                                   
$uri = substr($uri, strlen($_SERVER['SCRIPT_NAME']));
} }
// The effect here is the same as above, except that $_SERVER['SCRIPT_NAME'] is replaced by
// dirname($_SERVER['SCRIPT_NAME'])
elseif (strpos($uri, dirname($_SERVER['SCRIPT_NAME'])) === 0)
{
$uri = substr($uri, strlen(dirname($_SERVER['SCRIPT_NAME'])));
} }
// This section ensures that even on servers that require the URI
// to be in the query string (Nginx) a correct correct
// URI is found, and also fixes the QUERY_STRING server var and $_GET array.
// This part ensures that the uri can be found correctly even on the Nginx server, and also fixes the QUERY_STRING server and $_GET array.
// Determine whether the first two characters of $uri are the same?/
if (strncmp($uri, '?/', 2) === 0)
{
                                      // Remove the first two characters
$uri = substr($uri, 2);
} }
// Split the string using the original book
$parts = preg_split('#?#i', $uri, 2);
$uri = $parts[0];
// If two paragraphs can be divided through the above regular regularity, is it via Query_String? Route access in the form of
if (isset($parts[1]))
{
$_SERVER['QUERY_STRING'] = $parts[1];
                           // The function parses the query string into the $_GET variable.
parse_str($_SERVER['QUERY_STRING'], $_GET);
} }
else
{
$_SERVER['QUERY_STRING'] = '';
$_GET = array();
} }
// If it is /, or empty, there are two situations, or it is through query_string? Route access in the form of
// So at this time $parts[0] is equal to the following two possibilities, and at the same time we
// If you have obtained the information you want through $parts[1], you can return.
// Or it is in the form of a segment, but the segment information is empty, that is, accessing the entry file directly without
// Any routing information passed can also be returned directly.
if ($uri == '/' || emptyempty($uri))
{
            return '/';                                            
} }
//Return the path part of this url.
$uri = parse_url($uri, PHP_URL_PATH);
// Do some final cleaning of the URI and return it
// Replace // ../ in uri with / Return
return str_replace(array('//', '../'), '/', trim($uri, '/'));
}
//------------------------------------------------ -----------------------
/**
* Parse cli arguments
* Parse cli parameters
* Take each command line argument and assume it is a URI segment.
* If you do this in the command line
* php d:/wamp/www/CodeIgniter/index.php welcome index
* _parse_cli_args() returns a string of /welcome/index
*
* @access private
* @return string
*/
private function _parse_cli_args()
{
// Returns the parameters passed when running in command line mode.
// Because the first parameter is the current file name, we want to get it starting from the second one.
$args = array_slice($_SERVER['argv'], 1);
//Return a string concatenated by '/' strings, because $this->uri_string is a string.
return $args ? '/' . implode('/', $args) : '';
}
//------------------------------------------------ -----------------------
/**
* Filter segments for malicious characters
* Filter illegal characters
* @access private
* @param string
* @return string
*/
function _filter_uri($str)
{
if ($str != '' && $this->config->item('permitted_uri_chars') != '' && $this->config->item('enable_query_strings') == FALSE )
{
                  // preg_quote() in PHP 5.3 escapes -, so the str_replace() and addition of - to preg_quote() is to maintain backwards backwards
// compatibility compatibility as many are unaware of how characters in the permitted_uri_chars will be parsed as a regex pattern
// It probably means because of PHP5.3.0 characters -increased as a need for righteousness. So when using str_replace() here, you need to add preg_quote() to escape -
                                                                                                                                                                         '-'))."]+$|i", $str))
                                                                 
show_error('The URI you submitted has disallowed characters.', 400);
      }  
} }
// Convert programatic characters to entities
// Convert character entity
        $bad    = array('$',        '(',        ')',        '%28',      '%29');  
        $good   = array('$',    '(',    ')',    '(',    ')');  
  
        return str_replace($bad, $good, $str);  
    }  
  
    // --------------------------------------------------------------------  
  
    /**
* Remove the suffix from the URL if needed
* // Remove our custom suffix from the url.
* @access private
* @return void
*/  
    function _remove_url_suffix()  
    {  
        if  ($this->config->item('url_suffix') != "")  
        {  
            $this->uri_string = preg_replace("|".preg_quote($this->config->item('url_suffix'))."$|", "", $this->uri_string);  
        }  
    }  
  
    // --------------------------------------------------------------------  
  
    /**
* Explode the URI Segments. The individual segments will
* be stored in the $this->segments array.
* Split the uri into positive segments and filter each segment, and store them in $this->segments[]
* @access private
* @return void
*/  
    function _explode_segments()  
    {  
        foreach (explode("/", preg_replace("|/*(.+?)/*$|", "\1", $this->uri_string)) as $val)  
        {  
            // Filter segments for security  
            $val = trim($this->_filter_uri($val));  
  
            if ($val != '')  
            {  
                $this->segments[] = $val;  
            }  
        }  
    }  
  
    // --------------------------------------------------------------------  
    /**
* Re-index Segments Re-index segment
* Makes the segments saved starting with subscript 1. This makes it easier to use because there is a 1:1 relationship between the segment array and the real segment
* This function re-indexes the $this->segment array so that it
* starts at 1 rather than 0. Doing so makes it simpler to
* use functions like $this->uri->segment(n) since there is
* a 1:1 relationship between the segment array and the actual segments.
*
* @access private
* @return void
*/  
    function _reindex_segments()  
    {  
        array_unshift($this->segments, NULL);  
        array_unshift($this->rsegments, NULL);  
        unset($this->segments[0]);  
        unset($this->rsegments[0]);  
    }  
  
    // --------------------------------------------------------------------  
  
    /** 
* Fetch a URI Segment
* Get a uri segment
* This function returns the URI segment based on the number provided. Provided
* This function returns a uri segment based on the provided number
* @access public
* @param integer
* @param bool
* @return string
*/
function segment($n, $no_result = FALSE)
{
return ( ! isset($this->segments[$n])) ? $no_result : $this->segments[$n];
}
//------------------------------------------------ -----------------------
/**
* Fetch a URI "routed" Segment
* Return a certain section after the routing is determined
* This function returns the re-routed URI segment (assuming routing rules are used)
* based on the number provided. If there is no routing this function returns the
* same result as $this->segment()
* This function returns a routed uri segment based on the provided number (assuming routing rules have been used)
* If not routed yet, this function will be the same as $this->segment()
*
* @access public
* @param integer
* @param bool
* @return string
*/
function rsegment($n, $no_result = FALSE)
{
return ( ! isset($this->rsegments[$n])) ? $no_result : $this->rsegments[$n];
}
//------------------------------------------------ -----------------------
/**
* Generate generates a key value pair from the URI string
* Generate an array of key-value pairs based on the uri string
*
* This function generates and associative array of URI data starting
* at the supplied by. . . Provide segment. For example, if this is your URI:
*
* example.com/user/search/name/joe/location/UK/gender/male
*
* You can use this function to generate an array with this prototype:
*
* array (
* name => joe
* location => UK
*   gender => male
* ) )
* This function generates an associative array from the uri segment
* Example: If your uri is like this
* example.com/user/search/name/joe/location/UK/gender/male
* Then a prototype like this will be generated
* array (
* name => joe
* location => UK
*   gender => male
* ) )
* @access public
* @param integer the starting segment number
* @param array an array of default values ​​
* @return array
*/
function uri_to_assoc($n = 3, $default = array())
{
return $this->_uri_to_assoc($n, $default, 'segment');
}
/**
* Identical exactly the same thing to above only it uses the re-routed segment array
* It is exactly the same as the previous function except that it flushes the routed segment array (note the third parameter)
* @access public
* @param integer the starting segment number
* @param array an array of default values ​​
* @return array
*
*/
function ruri_to_assoc($n = 3, $default = array())
{
return $this->_uri_to_assoc($n, $default, 'rsegment');
}
//------------------------------------------------ -----------------------
/**
* Generate a key value pair from the URI string or Re-routed URI string
* Generate an array of key-value pairs based on the uri string or the rerouted uri string
* @access private
* @param integer the starting segment number starting segment number
* @param array an array of default values ​​
* @param string which array we should use
* @return array
*/
function _uri_to_assoc($n = 3, $default = array(), $which = 'segment')
{
// Determine whether the segmented array is rerouted.
if ($which == 'segment')
{
$total_segments = 'total_segments';
$segment_array = 'segment_array';
} }
else
{
$total_segments = 'total_rsegments';
$segment_array = 'rsegment_array';
} }
// Is $n a number?
if ( ! is_numeric($n))
{
return $default;
} }
// There is enough key $n in the cache uri segment list
if (isset($this->keyval[$n]))
{
return $this->keyval[$n];
} }
// The total number of segments is less than $n
if ($this->$total_segments()
{
if (count($default) == 0)
                                                                 
return array();
      }  
$retval = array();
foreach ($default as $val)
                                                                 
$retval[$val] = FALSE;
      }  
return $retval;
} }
$segments = array_slice($this->$segment_array(), ($n - 1));
$i = 0;
        $lastval = '';  
        $retval  = array();  
        foreach ($segments as $seg)  
        {  
            if ($i % 2)  
            {  
                $retval[$lastval] = $seg;  
            }  
            else  
            {  
                $retval[$seg] = FALSE;  
                $lastval = $seg;  
            }  
  
            $i++;  
        }  
  
        if (count($default) > 0)  
        {  
            foreach ($default as $val)  
            {  
                if ( ! array_key_exists($val, $retval))  
                {  
                    $retval[$val] = FALSE;  
                }  
            }  
        }  
  
        // Cache the array for reuse  
        // 缓存数组一遍重用  
        $this->keyval[$n] = $retval;  
        return $retval;  
    }  
  
    // --------------------------------------------------------------------  
  
    /**
* Generate a URI string from an associative associative array array
* Generate a uri string based on an associative array
*
* @access public
* @param array an associative array of key/values ​​
* @return array
*/  
    function assoc_to_uri($array)  
    {  
        $temp = array();  
        foreach ((array)$array as $key => $val)  
        {  
            $temp[] = $key;  
            $temp[] = $val;  
        }  
  
        return implode('/', $temp);  
    }  
  
    // --------------------------------------------------------------------  
  
    /**
* Fetch a URI Segment and add a trailing slash
* Get a uri segment and add a /
*
* @access public
* @param integer
* @param string
* @return string
*/  
    function slash_segment($n, $where = 'trailing')  
    {  
        return $this->_slash_segment($n, $where, 'segment');  
    }  
  
    // --------------------------------------------------------------------  
  
    /** 
     * Fetch a URI Segment and add a trailing slash 
     * 获取一个已经路由的uri段并且添加/ 
     * @access  public 
     * @param   integer 
     * @param   string 
     * @return  string 
     */  
    function slash_rsegment($n, $where = 'trailing')  
    {  
        return $this->_slash_segment($n, $where, 'rsegment');  
    }  
  
    // --------------------------------------------------------------------  
  
    /** 
     * Fetch a URI Segment and add a trailing slash - helper function 
     * 
     * @access  private 
     * @param   integer 
     * @param   string 
     * @param   string 
     * @return  string 
     */  
    function _slash_segment($n, $where = 'trailing', $which = 'segment')  
    {  
        $leading    = '/';  
        $trailing   = '/';  
  
        if ($where == 'trailing')  
        {  
            $leading    = '';  
        }  
        elseif ($where == 'leading')  
        {  
            $trailing   = '';  
        }  
  
        return $leading.$this->$which($n).$trailing;  
    }  
  
    // --------------------------------------------------------------------  
  
    /**
* Segment Array
* Get segment array
* @access public
* @return array
*/  
    function segment_array()  
    {  
        return $this->segments;  
    }  
  
    // --------------------------------------------------------------------  
  
    /**
* Routed Segment Array
* Get the routed segment array
* @access public
* @return array
*/  
    function rsegment_array()  
    {  
        return $this->rsegments;  
    }  
  
    // --------------------------------------------------------------------  
  
    /**
* Total number of segments
* Get the total number of segments
* @access public
* @return integer
*/  
    function total_segments()  
    {  
        return count($this->segments);  
    }  
  
    // --------------------------------------------------------------------  
  
    /**
* Total number of routed segments
* Get the total number of routed segments
* @access public
* @return integer
*/  
    function total_rsegments()  
    {  
        return count($this->rsegments);  
    }  
  
    // --------------------------------------------------------------------  
  
    /** 
     * Fetch the entire URI string 
     * 
     * @access  public 
     * @return  string 
     */  
    function uri_string()  
    {  
        return $this->uri_string;  
    }  
  
  
    // --------------------------------------------------------------------  
  
    /** 
     * Fetch the entire Re-routed URI string 
     *  www.2cto.com
     * @access  public 
     * @return  string 
     */  
    function ruri_string()  
    {  
        return '/'.implode('/', $this->rsegment_array());  
    }  
  
}  
// END URI Class  
  
/* End of file URI.php */  
/* Location: ./system/core/URI.php */  
 

www.bkjia.comtruehttp://www.bkjia.com/PHPjc/477684.htmlTechArticle[php] ?php if ( ! defined(BASEPATH)) exit(No direct script access allowed); /** * CodeIgniter * * An open source application development framework for PHP 5.1.6 or newer * * @packag...
Statement
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
PHP Dependency Injection Container: A Quick StartPHP Dependency Injection Container: A Quick StartMay 13, 2025 am 12:11 AM

APHPDependencyInjectionContainerisatoolthatmanagesclassdependencies,enhancingcodemodularity,testability,andmaintainability.Itactsasacentralhubforcreatingandinjectingdependencies,thusreducingtightcouplingandeasingunittesting.

Dependency Injection vs. Service Locator in PHPDependency Injection vs. Service Locator in PHPMay 13, 2025 am 12:10 AM

Select DependencyInjection (DI) for large applications, ServiceLocator is suitable for small projects or prototypes. 1) DI improves the testability and modularity of the code through constructor injection. 2) ServiceLocator obtains services through center registration, which is convenient but may lead to an increase in code coupling.

PHP performance optimization strategies.PHP performance optimization strategies.May 13, 2025 am 12:06 AM

PHPapplicationscanbeoptimizedforspeedandefficiencyby:1)enablingopcacheinphp.ini,2)usingpreparedstatementswithPDOfordatabasequeries,3)replacingloopswitharray_filterandarray_mapfordataprocessing,4)configuringNginxasareverseproxy,5)implementingcachingwi

PHP Email Validation: Ensuring Emails Are Sent CorrectlyPHP Email Validation: Ensuring Emails Are Sent CorrectlyMay 13, 2025 am 12:06 AM

PHPemailvalidationinvolvesthreesteps:1)Formatvalidationusingregularexpressionstochecktheemailformat;2)DNSvalidationtoensurethedomainhasavalidMXrecord;3)SMTPvalidation,themostthoroughmethod,whichchecksifthemailboxexistsbyconnectingtotheSMTPserver.Impl

How to make PHP applications fasterHow to make PHP applications fasterMay 12, 2025 am 12:12 AM

TomakePHPapplicationsfaster,followthesesteps:1)UseOpcodeCachinglikeOPcachetostoreprecompiledscriptbytecode.2)MinimizeDatabaseQueriesbyusingquerycachingandefficientindexing.3)LeveragePHP7 Featuresforbettercodeefficiency.4)ImplementCachingStrategiessuc

PHP Performance Optimization Checklist: Improve Speed NowPHP Performance Optimization Checklist: Improve Speed NowMay 12, 2025 am 12:07 AM

ToimprovePHPapplicationspeed,followthesesteps:1)EnableopcodecachingwithAPCutoreducescriptexecutiontime.2)ImplementdatabasequerycachingusingPDOtominimizedatabasehits.3)UseHTTP/2tomultiplexrequestsandreduceconnectionoverhead.4)Limitsessionusagebyclosin

PHP Dependency Injection: Improve Code TestabilityPHP Dependency Injection: Improve Code TestabilityMay 12, 2025 am 12:03 AM

Dependency injection (DI) significantly improves the testability of PHP code by explicitly transitive dependencies. 1) DI decoupling classes and specific implementations make testing and maintenance more flexible. 2) Among the three types, the constructor injects explicit expression dependencies to keep the state consistent. 3) Use DI containers to manage complex dependencies to improve code quality and development efficiency.

PHP Performance Optimization: Database Query OptimizationPHP Performance Optimization: Database Query OptimizationMay 12, 2025 am 12:02 AM

DatabasequeryoptimizationinPHPinvolvesseveralstrategiestoenhanceperformance.1)Selectonlynecessarycolumnstoreducedatatransfer.2)Useindexingtospeedupdataretrieval.3)Implementquerycachingtostoreresultsoffrequentqueries.4)Utilizepreparedstatementsforeffi

See all articles

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

Dreamweaver Mac version

Dreamweaver Mac version

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

EditPlus Chinese cracked version

EditPlus Chinese cracked version

Small size, syntax highlighting, does not support code prompt function

MinGW - Minimalist GNU for Windows

MinGW - Minimalist GNU for Windows

This project is in the process of being migrated to osdn.net/projects/mingw, you can continue to follow us there. MinGW: A native Windows port of the GNU Compiler Collection (GCC), freely distributable import libraries and header files for building native Windows applications; includes extensions to the MSVC runtime to support C99 functionality. All MinGW software can run on 64-bit Windows platforms.

SecLists

SecLists

SecLists is the ultimate security tester's companion. It is a collection of various types of lists that are frequently used during security assessments, all in one place. SecLists helps make security testing more efficient and productive by conveniently providing all the lists a security tester might need. List types include usernames, passwords, URLs, fuzzing payloads, sensitive data patterns, web shells, and more. The tester can simply pull this repository onto a new test machine and he will have access to every type of list he needs.