Captcha::render PHP 메소드

render() 공개 정적인 메소드

Allows conditional ignoring of captcha rendering if skipped in the config.
public static render ( Gdn_Controller $controller ) : null;
$controller Gdn_Controller
리턴 null;
    public static function render($controller)
    {
        if (!Captcha::enabled()) {
            return null;
        }
        // Hook to allow rendering of captcha form
        $controller->fireAs('captcha')->fireEvent('render');
        return null;
    }

Usage Example

예제 #1
0
 /**
  * 输出缩略图
  */
 public function action_default($type = '')
 {
     $width = 80;
     $height = 30;
     if ($type && preg_match('#^([0-9]+)x([0-9]+)$#i', $type, $m)) {
         if ($m[1] > 0) {
             $width = $m[1];
         }
         if ($m[1] > 0) {
             $height = $m[2];
         }
     }
     Captcha::render(array('width' => $width, 'height' => $height));
 }
All Usage Examples Of Captcha::render