Changeset 3016

Show
Ignore:
Timestamp:
07/09/08 16:10:48 (7 weeks ago)
Author:
Geert
Message:

Follow-up to r3015

  • Added Captcha::factory()
  • Added a Captcha example, try it out
Location:
trunk/system
Files:
3 modified

Legend:

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

    r3015 r3016  
    88 * 
    99 * Group Options: 
    10  *  style           - Style driver 
     10 *  style           - Captcha type, e.g. basic, riddle 
    1111 *  width           - Width of the Captcha image 
    1212 *  height          - Height of the Captcha image 
     
    1919$config['default'] = array 
    2020( 
    21     'style'           => 'riddle', 
     21    'style'           => 'basic', 
    2222    'width'           => 150, 
    2323    'height'          => 50, 
  • trunk/system/controllers/captcha.php

    r3015 r3016  
    11<?php defined('SYSPATH') or die('No direct script access.'); 
    22/** 
    3  * Outputs the dynamic Captcha image. 
     3 * Outputs the dynamic Captcha resource. 
    44 * Usage: Call the Captcha controller from a view, e.g. 
    55 *        <img src="<?php echo url::site('captcha') ?>" /> 
  • trunk/system/libraries/Captcha.php

    r3015 r3016  
    55 * $Id$ 
    66 * 
    7  * @package    Core 
     7 * @package    Captcha 
    88 * @author     Kohana Team 
    99 * @copyright  (c) 2007-2008 Kohana Team 
     
    3030 
    3131    /** 
     32     * Constructs and returns a new Captcha object. 
     33     * 
     34     * @param   array   configuration settings 
     35     * @return  object 
     36     */ 
     37    public function factory($config = array()) 
     38    { 
     39        return new Captcha($config); 
     40    } 
     41 
     42    /** 
    3243     * Constructs a new Captcha object. 
    3344     * 
    3445     * @throws  Kohana_Exception 
    35      * @param   string  configuration settings 
     46     * @param   array  configuration settings 
    3647     * @return  void 
    3748     */