summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorge Halkiadakis <gchalkiadakis@sklavenitis.co.gr>2023-03-26 23:17:22 +0300
committerGeorge Halkiadakis <gchalkiadakis@sklavenitis.co.gr>2023-03-26 23:17:22 +0300
commite32735e01bab8f73ce0fb0413254cfd8e18249e2 (patch)
tree0d6b5284a20bdc25debf7986830618c9cb1cef6a
parent21fedb3af692b12c1f0aa266bbf788b01f2cbe4c (diff)
downloadclassroom-e32735e01bab8f73ce0fb0413254cfd8e18249e2.tar.gz
classroom-e32735e01bab8f73ce0fb0413254cfd8e18249e2.tar.bz2
classroom-e32735e01bab8f73ce0fb0413254cfd8e18249e2.zip
extends forlder for personalizing the general classes
-rw-r--r--core/classes/Registry.php6
-rw-r--r--core/classes/authentication/Core/UserManager.php1
-rw-r--r--html/app/extends/ClassUserMagager.php62
3 files changed, 69 insertions, 0 deletions
diff --git a/core/classes/Registry.php b/core/classes/Registry.php
index df012e9..047fd54 100644
--- a/core/classes/Registry.php
+++ b/core/classes/Registry.php
@@ -2,6 +2,7 @@
/** Registry
* ---
+ *
* Regisrty is a global repository of {key: value} pairs,
* where key is a friendly label, and...
* value can be anything (numbet|string|array|object etc)
@@ -9,6 +10,11 @@
* It has a central role in the framework.
* By default it holds the Request instance and several
* othe core instanses like database connections etc.
+ *
+ * It implements the Facade design pattern;
+ * it defines a new interface for existing objects.
+ *
+ * ---
*/
class Registry
{
diff --git a/core/classes/authentication/Core/UserManager.php b/core/classes/authentication/Core/UserManager.php
index 22a87f5..776cee9 100644
--- a/core/classes/authentication/Core/UserManager.php
+++ b/core/classes/authentication/Core/UserManager.php
@@ -96,4 +96,5 @@ class UserManager implements UserManagerInterface
unset($_SESSION[UserTokenInterface::DEFAULT_PREFIX_KEY]);
}
}
+
}
diff --git a/html/app/extends/ClassUserMagager.php b/html/app/extends/ClassUserMagager.php
new file mode 100644
index 0000000..c365670
--- /dev/null
+++ b/html/app/extends/ClassUserMagager.php
@@ -0,0 +1,62 @@
+<?php
+
+namespace app\extends;
+
+use app\models\admin\User_model;
+use \Registry;
+
+/** ClassUserManager
+ *
+ * extends (anom's) UserManager
+ *
+ * this way it specializes the UserManagement
+ * according to this app's special rules
+ *
+ */
+class ClassUserMagager extends UserManager
+{
+
+ public function create_user()
+ {
+
+ }
+
+
+ public function register_user()
+ {
+
+
+ }
+
+
+ public function login_user()
+ {
+
+ }
+
+
+ /** forgot password
+ *
+ * send an otp
+ * (then verify)
+ *
+ */
+ public function forgot_password()
+ {
+
+ }
+
+
+ /** Verify Account
+ *
+ * check if posted OTP matched the one sent to the user
+ *
+ */
+ public function verify_otp()
+ {
+
+ }
+
+
+
+} \ No newline at end of file