Location: PHPKode > projects > HikaShop > front/sef_ext.php
<?php
/**
 * @package		HikaShop for Joomla!
 * @version		1.4.3
 * @author		hikashop.com
 * @copyright	(C) 2010 HIKARI SOFTWARE. All rights reserved.
 * @license		GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
 */
defined('_JEXEC') or die('Restricted access');
?>
<?php
class sef_hikashop {
    function create($string) {
		$string = str_replace("&amp;", "&", preg_replace('#(index\.php\??)#i','',$string));
		$query = array();
		$allValues = explode('&',$string);
		foreach($allValues as $oneValue){
			list($var,$val) = explode('=',$oneValue);
			$query[$var] = $val;
		}
		$segments = array();
		if (isset($query['ctrl'])) {
			$segments[] = $query['ctrl'];
			unset( $query['ctrl'] );
			if (isset($query['task'])) {
				$segments[] = $query['task'];
				unset( $query['task'] );
			}
		}elseif(isset($query['view'])){
			$segments[] = $query['view'];
			unset( $query['view'] );
			if(isset($query['layout'])){
				$segments[] = $query['layout'];
				unset( $query['layout'] );
			}
		}
		unset($query['option']);
		if(!empty($query)){
			foreach($query as $name => $value){
				$segments[] = $name.':'.$value;
			}
		}
        return implode('/',$segments);
    }
}
Return current item: HikaShop