. */ /** * Access Service. This class provides functionality to * handle accesses */ require_once(FILESYSTEMROOTPATH."events/include/dao/AccessDao.php"); class AccessService { private $accessDao; /** * Default constructor * * @param AccessDao */ public function __construct(AccessDao $accessDao) { $this->accessDao = $accessDao; } /** * Load all accesses * * @return array with accesses */ public function loadAll() { return $this->accessDao->loadAll(); } /** * Load all accesses, but only numeric values (not names of roles) * * @return array with accesses, but only numeric values (not names of roles) */ public function loadAllValues() { return array_values($this->accessDao->loadAll()); } /** * Load all accesses that require a smaller or equal access level than the parameter * * @param int access: the access to be compared * @return array with accesses that require a smaller or equal access level than the parameter */ public function loadStructural($access) { return $this->accessDao->loadStructural($access); } /** * Load all accesses that have been assigned to the requested group * * @param string access: the group to look for * @return array with accesses that have been assigned to the requested group */ public function loadNonStructural($access, $allbodies) { return $this->accessDao->loadNonStructural($access, $allbodies); } }