public function setConfig($config_location = NULL)
	{

		static $CAPTCHA_CONFIG = array();
		$path = ( NULL === $config_location )
			? __DIR__ . DIRECTORY_SEPARATOR . 'captcha_config.php'
			: realpath($config_location);

		if ( false === $path ) {
			throw new CaptchaException(
				sprintf("Config File not found in: %s ", $config_location)
			);
		}

		if ( $path ) {

			include_once $path;

			foreach (get_class_vars(get_class($this)) as $key => $value) {

				$config = preg_replace('/^[\_A-Z]/', '\\1', $key);

				if ( array_key_exists($config, $CAPTCHA_CONFIG) ) {
					$this->$key = $CAPTCHA_CONFIG[$config];
				}
			}
		}
	}
public function setConfig($config_location = NULL)
	{

		static $CAPTCHA_CONFIG = array();
		$path = ( NULL === $config_location )
			? __DIR__ . DIRECTORY_SEPARATOR . 'captcha_config.php'
			: realpath($config_location);

		if ( false === $path ) {
			throw new CaptchaException(
				sprintf("Config File not found in: %s ", $config_location)
			);
		}

		if ( $path ) {

			include_once $path;

			foreach (get_class_vars(get_class($this)) as $key => $value) {

				$config = preg_replace('/^[\_A-Z]/', '\\1', $key);

				if ( array_key_exists($config, $CAPTCHA_CONFIG) ) {
					$this->$key = $CAPTCHA_CONFIG[$config];
				}
			}
		}
	}
public function setConfig ( $ config_location = NULL ) { static $ CAPTCHA_CONFIG = array ( ) ; $ path = ( NULL === $ config_location ) ? __DIR__ . DIRECTORY_SEPARATOR . 'captcha_config.php' : realpath ( $ config_location ) ; if ( false === $ path ) { throw new CaptchaException ( sprintf ( "Config File not found in: %s " , $ config_location ) ) ; } if ( $ path ) { include_once $ path ; foreach ( get_class_vars ( get_class ( $ this ) ) as $ key => $ value ) { $ config = preg_replace ( '/^[\_A-Z]/' , '\\1' , $ key ) ; if ( array_key_exists ( $ config , $ CAPTCHA_CONFIG ) ) { $ this -> $ key = $ CAPTCHA_CONFIG [ $ config ] ; } } } }
Set global reCAPTCHA options by loading an external config file
these options can be set for all instances of reCAPTCHA in your
app, this avoid to set options, private and public Keys all the
time individualy within your forms that has a Captcha widget.

@param string $config_location The absolute path to config file
@throws \ReCaptcha\CaptchaException
@return void
Set global reCAPTCHA options by loading an external config file these options can be set for all instances of reCAPTCHA in your app this avoid to set options private and public Keys all the time individualy within your forms that has a Captcha widget .