read()) if ((substr($entry, strlen($entry) - 4, 4) == '.inc') && is_file($typesINC_dirname . '/'.$entry)) { include_once($typesINC_dirname . '/'.$entry); } /** * Returns a list of available account types. * * @return array list of types */ function getTypes() { $dirname = substr(__FILE__, 0, strlen(__FILE__) - 10) . "/types"; $dir = dir($dirname); $return = array(); // get type names. while ($entry = $dir->read()) if ((substr($entry, strlen($entry) - 4, 4) == '.inc') && is_file($dirname . '/'.$entry)) { $entry = substr($entry, 0, strpos($entry, '.')); $return[] = $entry; } return $return; } /** * Returns the alias name of an account type. * * @param string $type type name * @return string type alias */ function getTypeAlias($type) { $obj = new $type(); return $obj->getAlias(); } /** * Returns the description of an account type. * * @param string $type type name * @return string type description */ function getTypeDescription($type) { $obj = new $type(); return $obj->getDescription(); } /** * Returns the class name for the list object. * * @param string $type account type * @return string class name */ function getListClassName($type) { $obj = new $type(); return $obj->getListClassName(); } /** * Returns the default attribute list for an account type. * It is used as default value for the configuration editor. * * @param string $type account type * @return string attribute list */ function getDefaultListAttributes($type) { $obj = new $type(); return $obj->getDefaultListAttributes(); } /** * Returns a list of attributes which have a translated description. * This is used for the head row in the list view. * * @param string $type account type * @return array list of descriptions */ function getListAttributeDescriptions($type) { $obj = new $type(); return $obj->getListAttributeDescriptions(); } ?>