Advertisement
europcsolutions

FuelPHP Config

Oct 20th, 2012
132
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 7.42 KB | None | 0 0
  1. <?php
  2. /**
  3.  * Fuel is a fast, lightweight, community driven PHP5 framework.
  4.  *
  5.  * @package    Fuel
  6.  * @version    1.0
  7.  * @author     Fuel Development Team
  8.  * @license    MIT License
  9.  * @copyright  2010 - 2012 Fuel Development Team
  10.  * @link       http://fuelphp.com
  11.  */
  12.  
  13. return array(
  14.  
  15.     /**
  16.      * base_url - The base URL of the application.
  17.      * MUST contain a trailing slash (/)
  18.      *
  19.      * You can set this to a full or relative URL:
  20.      *
  21.      *     'base_url' => '/foo/',
  22.      *     'base_url' => 'http://foo.com/'
  23.      *
  24.      * Set this to null to have it automatically detected.
  25.      */
  26.     'base_url'  => 'http://proj-ecommerce.loc/',
  27.  
  28.     /**
  29.      * url_suffix - Any suffix that needs to be added to
  30.      * URL's generated by Fuel. If the suffix is an extension,
  31.      * make sure to include the dot
  32.      *
  33.      *     'url_suffix' => '.html',
  34.      *
  35.      * Set this to an empty string if no suffix is used
  36.      */
  37.     'url_suffix'  => '',
  38.  
  39.     /**
  40.      * index_file - The name of the main bootstrap file.
  41.      *
  42.      * Set this to false or remove if you using mod_rewrite.
  43.      */
  44.     'index_file'  => false,
  45.  
  46.     'profiling'  => false,
  47.  
  48.     /**
  49.      * Default location for the file cache
  50.      */
  51.     'cache_dir'       => APPPATH.'cache/',
  52.  
  53.     /**
  54.      * Settings for the file finder cache (the Cache class has it's own config!)
  55.      */
  56.     'caching'         => false,
  57.     'cache_lifetime'  => 3600, // In Seconds
  58.  
  59.     /**
  60.      * Callback to use with ob_start(), set this to 'ob_gzhandler' for gzip encoding of output
  61.      */
  62.     'ob_callback'  => null,
  63.  
  64.     'errors'  => array(
  65.         // Which errors should we show, but continue execution? You can add the following:
  66.         // E_NOTICE, E_WARNING, E_DEPRECATED, E_STRICT to mimic PHP's default behaviour
  67.         // (which is to continue on non-fatal errors). We consider this bad practice.
  68.         'continue_on'  => array(),
  69.         // How many errors should we show before we stop showing them? (prevents out-of-memory errors)
  70.         'throttle'     => 10,
  71.         // Should notices from Error::notice() be shown?
  72.         'notices'      => true,
  73.     ),
  74.  
  75.     /**
  76.      * Localization & internationalization settings
  77.      */
  78.     'language'           => 'en', // Default language
  79.     'language_fallback'  => 'en', // Fallback language when file isn't available for default language
  80.     'locale'             => null, // PHP set_locale() setting, null to not set
  81.  
  82.     'encoding'  => 'UTF-8',
  83.  
  84.     /**
  85.      * DateTime settings
  86.      *
  87.      * server_gmt_offset    in seconds the server offset from gmt timestamp when time() is used
  88.      * default_timezone     optional, if you want to change the server's default timezone
  89.      */
  90.     'server_gmt_offset'  => 0,
  91.     'default_timezone'   => 'UTC',
  92.  
  93.     /**
  94.      * Logging Threshold.  Can be set to any of the following:
  95.      *
  96.      * Fuel::L_NONE
  97.      * Fuel::L_ERROR
  98.      * Fuel::L_WARNING
  99.      * Fuel::L_DEBUG
  100.      * Fuel::L_INFO
  101.      * Fuel::L_ALL
  102.      */
  103.     'log_threshold'    => Fuel::L_WARNING,
  104.     'log_path'         => APPPATH.'logs/',
  105.     'log_date_format'  => 'Y-m-d H:i:s',
  106.  
  107.     /**
  108.      * Security settings
  109.      */
  110.     'security' => array(
  111.         'csrf_autoload'    => false,
  112.         'csrf_token_key'   => 'fuel_csrf_token',
  113.         'csrf_expiration'  => 0,
  114.         'uri_filter'       => array('htmlentities'),
  115.  
  116.         /**
  117.          * This input filter can be any normal PHP function as well as 'xss_clean'
  118.          *
  119.          * WARNING: Using xss_clean will cause a performance hit.
  120.          * How much is dependant on how much input data there is.
  121.          */
  122.         'input_filter'  => array(),
  123.  
  124.         /**
  125.          * This output filter can be any normal PHP function as well as 'xss_clean'
  126.          *
  127.          * WARNING: Using xss_clean will cause a performance hit.
  128.          * How much is dependant on how much input data there is.
  129.          */
  130.         'output_filter'  => array('Security::htmlentities'),
  131.  
  132.         /**
  133.          * Whether to automatically filter view data
  134.          */
  135.         'auto_filter_output'  => true,
  136.  
  137.         /**
  138.          * With output encoding switched on all objects passed will be converted to strings or
  139.          * throw exceptions unless they are instances of the classes in this array.
  140.          */
  141.         'whitelisted_classes' => array(
  142.             'Fuel\\Core\\Response',
  143.             'Fuel\\Core\\View',
  144.             'Fuel\\Core\\ViewModel',
  145.             'Fuel\\Core\\Validation',
  146.             'Closure',
  147.         )
  148.     ),
  149.  
  150.     /**
  151.      * Cookie settings
  152.      */
  153.     'cookie' => array(
  154.         // Number of seconds before the cookie expires
  155.         'expiration'  => 0,
  156.         // Restrict the path that the cookie is available to
  157.         'path'        => '/',
  158.         // Restrict the domain that the cookie is available to
  159.         'domain'      => null,
  160.         // Only transmit cookies over secure connections
  161.         'secure'      => false,
  162.         // Only transmit cookies over HTTP, disabling Javascript access
  163.         'http_only'   => false,
  164.     ),
  165.  
  166.     /**
  167.      * Validation settings
  168.      */
  169.     'validation' => array(
  170.         /**
  171.          * Wether to fallback to global when a value is not found in the input array.
  172.          */
  173.         'global_input_fallback' => true,
  174.         'open_error'            => '<p class="form_error">',
  175.         'close_error'           => '</p>',
  176.     ),
  177.  
  178.     /**
  179.      * Routing settings
  180.      */
  181.     'routing' => array(
  182.         /**
  183.          * Whether URI routing is case sensitive or not
  184.          */
  185.         'case_sensitive' => true,
  186.     ),
  187.  
  188.     /**
  189.      * To enable you to split up your application into modules which can be
  190.      * routed by the first uri segment you have to define their basepaths
  191.      * here. By default empty, but to use them you can add something
  192.      * like this:
  193.      *      array(APPPATH.'modules'.DS)
  194.      *
  195.      * Paths MUST end with a directory separator (the DS constant)!
  196.      */
  197.     'module_paths' => array(
  198.         //APPPATH.'modules'.DS
  199.     ),
  200.  
  201.     /**
  202.      * To enable you to split up your additions to the framework, packages are
  203.      * used. You can define the basepaths for your packages here. By default
  204.      * empty, but to use them you can add something like this:
  205.      *      array(APPPATH.'modules'.DS)
  206.      *
  207.      * Paths MUST end with a directory separator (the DS constant)!
  208.      */
  209.     'package_paths' => array(
  210.         //PKGPATH
  211.     ),
  212.  
  213.  
  214.     /**************************************************************************/
  215.     /* Always Load                                                            */
  216.     /**************************************************************************/
  217.     'always_load'  => array(
  218.  
  219.         /**
  220.          * These packages are loaded on Fuel's startup.
  221.          * You can specify them in the following manner:
  222.          *
  223.          * array('auth'); // This will assume the packages are in PKGPATH
  224.          *
  225.          * // Use this format to specify the path to the package explicitly
  226.          * array(
  227.          *     array('auth' => PKGPATH.'auth/')
  228.          * );
  229.          */
  230.         'packages'  => array(
  231.             'orm',
  232.         ),
  233.  
  234.         /**
  235.          * These modules are always loaded on Fuel's startup. You can specify them
  236.          * in the following manner:
  237.          *
  238.          * array('module_name');
  239.          *
  240.          * A path must be set in module_paths for this to work.
  241.          */
  242.         'modules'  => array(),
  243.  
  244.         /**
  245.          * Classes to autoload & initialize even when not used
  246.          */
  247.         'classes'  => array(),
  248.  
  249.         /**
  250.          * Configs to autoload
  251.          *
  252.          * Examples: if you want to load 'session' config into a group 'session' you only have to
  253.          * add 'session'. If you want to add it to another group (example: 'auth') you have to
  254.          * add it like 'session' => 'auth'.
  255.          * If you don't want the config in a group use null as groupname.
  256.          */
  257.         'config'  => array(),
  258.  
  259.         /**
  260.          * Language files to autoload
  261.          *
  262.          * Examples: if you want to load 'validation' lang into a group 'validation' you only have to
  263.          * add 'validation'. If you want to add it to another group (example: 'forms') you have to
  264.          * add it like 'validation' => 'forms'.
  265.          * If you don't want the lang in a group use null as groupname.
  266.          */
  267.         'language'  => array(),
  268.     ),
  269.  
  270. );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement