scope = $scope; $this->meta = $this->get_metaData(); } /** * Dummy function, meta data is provided by sub classes. * * @return array empty array */ function get_metaData() { return array(); } /** * Returns the account type of this module (user, group, host) * * @return string account type */ function get_scope() { return $this->scope; } /** * Returns true if this module fits for the current scope. * * @return boolean true if module fits */ function can_manage() { if (is_array($this->meta["account_types"]) && in_array($this->scope, $this->meta["account_types"])) return true; else return false; } /** * Returns true if this module is enough to provide a sensible account. * * There is no relation to the name of this class. * * @return boolean true if base module */ function is_base_module() { if ($this->meta['is_base'] == true) return true; else return false; } /** * returns an LDAP filter for the account lists * * @return string LDAP filter */ function get_ldap_filter() { if (isset($this->meta['ldap_filter'])) return $this->meta['ldap_filter']; else return ""; } /** * Returns an alias name for the module. * * This alias is used in various places instead of the less descriptive class name. * The alias also has less syntax restrictions and may contain spaces or special characters. * * @return string alias name */ function get_alias() { if (isset($this->meta['alias'])) return $this->meta['alias']; else return get_class($this); } // TODO implement missing interface } ?>