Initial Commit

This commit is contained in:
GiacomoHome
2021-09-17 12:41:45 +02:00
commit 9001e4656e
570 changed files with 31013 additions and 0 deletions
+33
View File
@@ -0,0 +1,33 @@
<?php
class Zend_View_Helper_AuthInfo extends Zend_View_Helper_Abstract
{
protected $_authService;
public function authInfo($info = null)
{
if (null === $this->_authService) {
$this->_authService = new App_Service_Auth();
}
if (null === $info) {
return $this;
}
if (false === $this->isLoggedIn()) {
return null;
}
return $this->_authService->getIdentity()->$info;
}
public function isLoggedIn()
{
return $this->_authService->getAuth()->hasIdentity();
}
public function checkPermission($resourceName)
{
if ($this->isLoggedIn()) {
return $this->_authService->checkPermission($resourceName);
}
return false;
}
}