ManaPHP\Security\Captcha::__construct PHP Method

__construct() public method

Captcha constructor.
public __construct ( array | Captcha $options = [] )
$options array | ConfManaPHP\Security\Captcha
    public function __construct($options = [])
    {
        if (is_object($options)) {
            $options = (array) $options;
        }
        if (isset($options['charset'])) {
            $this->_charset = $options['charset'];
        }
        if (!isset($options['fonts'])) {
            $options['fonts'] = ['@manaphp/Security/Captcha/Fonts/AirbusSpecial.ttf', '@manaphp/Security/Captcha/Fonts/StencilFour.ttf', '@manaphp/Security/Captcha/Fonts/SpicyRice.ttf'];
        }
        $this->_fonts = $options['fonts'];
        if (isset($options['length'])) {
            $this->_length = $options['length'];
        }
        if (isset($options['bgRGB'])) {
            $this->_bgRGB = $options['bgRGB'];
        }
    }