getBaseUrl();
        }
        $icons = $this->_getIconFilenames();
        if (!isset($icons[$name])) {
            throw new Msd_Exception(
                'GetIcon: unknown icon \'' . $name . '\' requested'
            );
        }
        $img    = '
';
        $config = Msd_Registry::getConfig();
        if ($size !== null) {
            $img = '
';
            $ret = sprintf(
                $img,
                $config->getParam('paths.iconPath'),
                $size,
                $size,
                $icons[$name],
                $title, $title
            );
        } else {
            $ret = sprintf(
                $img,
                $config->getParam('paths.iconPath'),
                $icons[$name],
                $title,
                $title
            );
        }
        return $ret;
    }
    /**
     * Get default values from defaultConfig.ini
     *
     * @return object
     */
    private function _getIconFilenames()
    {
        static $icons = false;
        if (!$icons) {
            $config   = $this->view->config;
            $file     = realpath(
                APPLICATION_PATH . '/../public/'
                . $config->getParam('paths.iconPath') . '/icon.ini'
            );
            $iconsIni = new Zend_Config_Ini($file, 'icons');
            $icons    = $iconsIni->toArray();
            unset($iconsIni);
        }
        return $icons;
    }
}