Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- namespace Application\CustomClasses\AccessControl;
- use Application\UserModel\UserRepoInterface;
- use Zend\Session\Container;
- interface AccessControlInterface{
- /**
- * Formulareingaben aus einem Login-Formular verarbeiten
- * und Session mit den notwendigen Login Informationen versorgen
- *
- * @param string $name
- * @param string $password
- * @return bool
- */
- public function getLogin(string $name, string $password);
- /**
- * Die aktuelle Session beenden und den Logout durchführen
- * @return bool
- */
- public function getLogout();
- /**
- * Den in der Session gespeicherten Login-Key auf seine Gültigkeit überprüfen
- * und bei fehlender Übereinstimmung ausloggen
- *
- * @param string $loginkey
- * @return bool
- */
- public function checkLoginStatus(string $loginkey);
- /**
- * Injection des User-Repositories
- * @param UserrRepoInterface $repo
- */
- public function setUserRepo(UserRepoInterface $repo);
- /**
- * Injection der AccessControl List
- * @param AccessControlList $acl
- */
- public function setAclList(AccessControlList $acl);
- /**
- * Wrapper für die gleichnamige Funktion der Klasse Acl
- * @param string $resource
- * @param string $privilege
- * @return bool
- */
- public function isAllowed(string $resource=null,string $privilege);
- /**
- * Ermittlung der Rolle des Users aus der DB
- * @return string
- */
- public function getUserRole();
- /**
- * Den aktuellen Container der Anwendung aus der Session holen
- * @return Container
- */
- public function getApplicationContainer();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement