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;
}
/** * 输出缩略图 */ 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)); }