Changeset 1668

Show
Ignore:
Timestamp:
01/04/2008 10:01:49 AM (12 months ago)
Author:
Shadowhand
Message:

Small cleanups:

  • Updated system/config file comments
  • Added Encrypt::instance()
Location:
trunk/system
Files:
20 modified

Legend:

Unmodified
Added
Removed
  • trunk/system/config/cache.php

    r1360 r1668  
    11<?php defined('SYSPATH') or die('No direct script access.'); 
    22/** 
     3 * @package  Cache 
     4 * 
    35 * Cache backend driver. Kohana comes with file, database, and memcache drivers. 
    46 * - File cache is fast and reliable, but requires many filesystem lookups. 
  • trunk/system/config/cache_sqlite.php

    r1530 r1668  
    11<?php defined('SYSPATH') or die('No direct script access.'); 
    2  
     2/** 
     3 * @package  Cache:SQLite 
     4 */ 
    35$config['schema'] = 
    46'CREATE TABLE caches( 
  • trunk/system/config/cookie.php

    r1522 r1668  
    11<?php defined('SYSPATH') or die('No direct script access.'); 
    22/** 
     3 * @package  Core 
     4 * 
    35 * Prefix, used to avoid collisions between cookie names. 
    46 */ 
  • trunk/system/config/database.php

    r1522 r1668  
    11<?php defined('SYSPATH') or die('No direct script access.'); 
    22/** 
     3 * @package  Database 
     4 * 
    35 * Database connection settings, defined as arrays, or "groups". If no group 
    46 * name is used when loading the database library, the group named "default" 
  • trunk/system/config/encryption.php

    r1522 r1668  
    11<?php defined('SYSPATH') or die('No direct script access.'); 
    22/** 
     3 * @package  Encrypt 
     4 * 
    35 * Encryption key used to do encryption and decryption. The default option 
    46 * should never be used for a production website. 
  • trunk/system/config/hooks.php

    r1325 r1668  
    11<?php defined('SYSPATH') or die('No direct script access.'); 
    22/** 
     3 * @package  Core 
     4 * 
    35 * Enable or disable hooks. Setting this option to TRUE will enable 
    46 * all hooks. By using an array of hook filenames, you can control 
  • trunk/system/config/image.php

    r1639 r1668  
    11<?php defined('SYSPATH') or die('No direct script access.'); 
    2  
     2/** 
     3 * @package  Image 
     4 * 
     5 * Driver name. 
     6 */ 
    37$config['driver'] = 'ImageMagick'; 
    48 
     9/** 
     10 * Driver parameters. 
     11 */ 
    512$config['params'] = array 
    613( 
  • trunk/system/config/locale.php

    r1331 r1668  
    11<?php defined('SYSPATH') or die('No direct access allowed.'); 
    22/** 
     3 * @package  Core 
     4 * 
    35 * Default language locale name. 
    46 * @see http://php.net/locales 
  • trunk/system/config/log.php

    r1522 r1668  
    11<?php defined('SYSPATH') or die('No direct script access.'); 
    22/** 
     3 * @package  Core 
     4 * 
    35 * Message logging is a very useful debugging tool for production websites, as 
    46 * well as a useful tool during development to see what files are being loaded 
  • trunk/system/config/mimes.php

    r1522 r1668  
    11<?php defined('SYSPATH') or die('No direct access allowed.'); 
    22/** 
     3 * @package  Core 
     4 * 
    35 * A list of mime types. Our list is generally more complete and accurate than 
    46 * the operating system MIME list. 
  • trunk/system/config/pagination.php

    r1522 r1668  
    11<?php defined('SYSPATH') or die('No direct access allowed.'); 
    22/** 
     3 * @package  Pagination 
     4 * 
    35 * Views folder in which your pagination style templates reside. 
    46 */ 
  • trunk/system/config/payment.php

    r1645 r1668  
    11<?php defined('SYSPATH') or die('No direct script access.'); 
    22/** 
     3 * @package  Payment 
     4 * 
    35 * Settings related to the Payment library. 
    46 * This file has settings for each driver. 
  • trunk/system/config/profiler.php

    r1325 r1668  
    11<?php defined('SYSPATH') or die('No direct script access.'); 
    22/** 
     3 * @package  Profiler 
     4 * 
    35 * Show benchmarks. 
    46 */ 
  • trunk/system/config/routes.php

    r1653 r1668  
    11<?php defined('SYSPATH') or die('No direct access allowed.'); 
    22/** 
     3 * @package  Core 
     4 * 
    35 * Supported Shortcuts: 
    46 *  :any - matches any non-blank string 
     
    79 
    810/** 
    9  * Permitted URI characters. 
     11 * Permitted URI characters. Note that "?", "#", and "=" are URL characters, and do 
     12 * not to be added here. 
    1013 */ 
    1114$config['_allowed'] = 'a-z 0-9~%.,:_-'; 
    1215 
    1316/** 
    14  * Default route when no URI segments are found. 
     17 * Default route to use when no URI segments are available. 
    1518 */ 
    1619$config['_default'] = 'welcome'; 
  • trunk/system/config/session.php

    r1522 r1668  
    11<?php defined('SYSPATH') or die('No direct access allowed.'); 
    22/** 
     3 * @package Session 
     4 * 
    35 * Session driver name. 
    46 */ 
  • trunk/system/config/sql_types.php

    r1522 r1668  
    11<?php defined('SYSPATH') or die('No direct script access.'); 
    22/** 
     3 * @package  Database 
     4 * 
    35 * SQL data types. If there are missing values, please report them: 
    46 * 
  • trunk/system/config/upload.php

    r1657 r1668  
    11<?php defined('SYSPATH') or die('No direct access allowed.'); 
    22/** 
    3  * Relative to your index file. 
     3 * @package  Core 
     4 * 
     5 * This path is relative to your index file. Absolute paths are also supported. 
    46 */ 
    57$config['upload_directory'] = 'upload'; 
    68 
    79/** 
    8  * Remove spaces from filenames. 
     10 * Remove spaces from uploaded filenames. 
    911 */ 
    1012$config['remove_spaces'] = TRUE; 
  • trunk/system/config/user_agents.php

    r1522 r1668  
    11<?php defined('SYSPATH') or die('No direct access allowed.'); 
    22/** 
     3 * @package  Core 
     4 * 
    35 * This file contains four arrays of user agent data.  It is used by the 
    46 * User Agent library to help identify browser, platform, robot, and 
     
    810$config['platform'] = array 
    911( 
    10         'windows nt 6.0' => 'Windows Longhorn', 
     12        'windows nt 6.0' => 'Windows Vista', 
    1113        'windows nt 5.2' => 'Windows 2003', 
    1214        'windows nt 5.0' => 'Windows 2000', 
     
    2224        'windows'        => 'Unknown Windows OS', 
    2325        'os x'           => 'Mac OS X', 
     26        'intel mac'      => 'Intel Mac', 
    2427        'ppc mac'        => 'Power PC Mac', 
     28        'ppc'            => 'Macintosh', 
    2529        'freebsd'        => 'FreeBSD', 
    26         'ppc'            => 'Macintosh', 
    2730        'linux'          => 'Linux', 
    2831        'debian'         => 'Debian', 
  • trunk/system/config/view.php

    r1526 r1668  
    11<?php defined('SYSPATH') or die('No direct script access.'); 
    2  
     2/** 
     3 * @package  Core 
     4 * 
     5 * Allowed non-php view types. Most file extensions are supported. 
     6 */ 
    37$config['allowed_filetypes'] = array 
    48( 
  • trunk/system/libraries/Encrypt.php

    r1522 r1668  
    1414class Encrypt_Core { 
    1515 
    16         // mcrypt rand type 
     16        // OS-dependant RAND type to use 
    1717        protected static $rand; 
     18 
     19        // Configuration 
     20        protected $config; 
     21 
     22        /** 
     23         * Returns a singleton instance of Encrypt. 
     24         * 
     25         * @param   array    configuration options 
     26         * @return  object 
     27         */ 
     28        public static function instance($config = NULL) 
     29        { 
     30                static $instance; 
     31 
     32                // Create the singleton 
     33                empty($instance) and $instance = new Encrypt((array) $config); 
     34 
     35                return $instance; 
     36        } 
    1837 
    1938        /**