Exemplo n.º 1
0
 /**
  * Constructor
  *
  * @param  array|\Traversable $options
  * @throws Exception\ExtensionNotLoadedException
  */
 public function __construct($options = null)
 {
     if (!extension_loaded("gd")) {
         throw new Exception\ExtensionNotLoadedException("Image CAPTCHA requires GD extension");
     }
     if (!function_exists("imagepng")) {
         throw new Exception\ExtensionNotLoadedException("Image CAPTCHA requires PNG support");
     }
     if (!function_exists("imageftbbox")) {
         throw new Exception\ExtensionNotLoadedException("Image CAPTCHA requires FT fonts support");
     }
     parent::__construct($options);
 }
Exemplo n.º 2
0
 /**
  * Constructor
  *
  * @param  null|string|array|\Traversable $options
  * @return void
  */
 public function __construct($options = null)
 {
     parent::__construct($options);
     $this->figlet = new FigletManager($options);
 }