<?php
/**
 * @version $Id: bfImg.php 117 2009-07-14 20:29:10Z  $
 * @package Blue Flame Framework (bfFramework)
 * @copyright Copyright (C) 2003,2004,2005,2006,2007,2008,2009 Blue Flame IT Ltd. All rights reserved.
 * @license GNU General Public License
 * @link http://www.blueflameit.ltd.uk
 * @author Phil Taylor / Blue Flame IT Ltd.
 *
 * bfFramework is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * bfFramework is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this package.  If not, see http://www.gnu.org/licenses/
 */
defined ( '_JEXEC' ) or die ( 'Restricted access' );

final class bfImg {

	public function __construct() {
		throw new Exception ( 'All methods of bfImg are static' );
	}

	public static function buildURL($name, $ext = 'png', $framework = 1) {
		global $mainframe;
		if ($framework === 1) {
			return bfCompat::getLiveSite () . '/' . bfCompat::mambotsfoldername () . '/system/blueflame/view/images/' . $name . '.' . $ext;
		} else {
			return bfCompat::getLiveSite () . '/components/' . $mainframe->get ( 'component' ) . '/view/images/' . $name . '.' . $ext;
		}
	}

	public static function url_bullet_star() {
		return bfImg::buildURL ( 'bullet_star', 'gif' );
	}

	public static function url_bullet_error() {
		return bfImg::buildURL ( 'icon_error', 'gif' );
	}
}