function getValidRoles($release, $clear = false)
    {
        if (!isset($GLOBALS['_PEAR_INSTALLER_ROLES'])) {
            PEAR_Installer_Role::registerRoles();
        }

        static $ret = array();
        if ($clear) {
            $ret = array();
        }

        if (isset($ret[$release])) {
            return $ret[$release];
        }

        $ret[$release] = array();
        foreach ($GLOBALS['_PEAR_INSTALLER_ROLES'] as $role => $okreleases) {
            if (in_array($release, $okreleases['releasetypes'])) {
                $ret[$release][] = strtolower(str_replace('PEAR_Installer_Role_', '', $role));
            }
        }

        return $ret[$release];
    }
function getValidRoles($release, $clear = false)
    {
        if (!isset($GLOBALS['_PEAR_INSTALLER_ROLES'])) {
            PEAR_Installer_Role::registerRoles();
        }

        static $ret = array();
        if ($clear) {
            $ret = array();
        }

        if (isset($ret[$release])) {
            return $ret[$release];
        }

        $ret[$release] = array();
        foreach ($GLOBALS['_PEAR_INSTALLER_ROLES'] as $role => $okreleases) {
            if (in_array($release, $okreleases['releasetypes'])) {
                $ret[$release][] = strtolower(str_replace('PEAR_Installer_Role_', '', $role));
            }
        }

        return $ret[$release];
    }
function getValidRoles ( $ release , $ clear = false ) { if ( ! isset ( $ GLOBALS [ '_PEAR_INSTALLER_ROLES' ] ) ) { PEAR_Installer_Role :: registerRoles ( ) ; } static $ ret = array ( ) ; if ( $ clear ) { $ ret = array ( ) ; } if ( isset ( $ ret [ $ release ] ) ) { return $ ret [ $ release ] ; } $ ret [ $ release ] = array ( ) ; foreach ( $ GLOBALS [ '_PEAR_INSTALLER_ROLES' ] as $ role => $ okreleases ) { if ( in_array ( $ release , $ okreleases [ 'releasetypes' ] ) ) { $ ret [ $ release ] [ ] = strtolower ( str_replace ( 'PEAR_Installer_Role_' , '' , $ role ) ) ; } } return $ ret [ $ release ] ; }
Get a list of file roles that are valid for the particular release type.

For instance, src files serve no purpose in regular php releases.
@param string
@param bool clear cache
@return array
@static
Get a list of file roles that are valid for the particular release type .