diff --git a/src/vCaptcha/Managers/CaptchaInstanceManager.php b/src/vCaptcha/Managers/CaptchaInstanceManager.php new file mode 100644 index 0000000..d9e7dd8 --- /dev/null +++ b/src/vCaptcha/Managers/CaptchaInstanceManager.php @@ -0,0 +1,20 @@ +vcaptcha = $vcaptcha; + } + } \ No newline at end of file diff --git a/src/vCaptcha/package.json b/src/vCaptcha/package.json index d2a58a6..2af83af 100644 --- a/src/vCaptcha/package.json +++ b/src/vCaptcha/package.json @@ -38,7 +38,13 @@ { "required": true, "file": "vCaptcha.php" + }, + { + "required": true, + "file": "Managers/CaptchaInstanceManager.php" } ], - "files": [] + "files": [ + "package.json" + ] } \ No newline at end of file diff --git a/src/vCaptcha/vCaptcha.php b/src/vCaptcha/vCaptcha.php index 91fb93e..0cc6a7e 100644 --- a/src/vCaptcha/vCaptcha.php +++ b/src/vCaptcha/vCaptcha.php @@ -8,6 +8,7 @@ use acm2\Exceptions\ConfigurationNotDefinedException; use acm2\Objects\Schema; use mysqli; + use vCaptcha\Managers\CaptchaInstanceManager; class vCaptcha { @@ -26,6 +27,11 @@ */ private $DatabaseConnection; + /** + * @var CaptchaInstanceManager + */ + private $CaptchaInstanceManager; + /** * @throws ConfigurationNotDefinedException */ @@ -45,6 +51,7 @@ $this->acm->updateConfiguration(); $this->DatabaseConfiguration = $this->acm->getConfiguration('Database'); + $this->CaptchaInstanceManager = new CaptchaInstanceManager($this); } /** @@ -87,4 +94,12 @@ $this->DatabaseConfiguration['Port'] ); } + + /** + * @return CaptchaInstanceManager + */ + public function getCaptchaInstanceManager(): CaptchaInstanceManager + { + return $this->CaptchaInstanceManager; + } } \ No newline at end of file