<commit_before><?php
/**
 * @version     $Id$
 * @category    Nooku
 * @package     Nooku_Server
 * @copyright   Copyright (C) 2011 Timble CVBA and Contributors. (http://www.timble.net).
 * @license     GNU GPLv3 <http://www.gnu.org/licenses/gpl.html>
 * @link        http://www.nooku.org
 */

/**
 * Class to create and parse routes
 *
 * @author      <NAME> <http://nooku.assembla.com/profile/johanjanssens>
 * @category    Nooku
 * @package     Nooku_Server
 */
class JRouterAdministrator extends JRouter
{
	/**
	 * Function to convert a route to an internal URI
	 *
	 * @return array
	 */
	public function parse($uri)
	{
		$vars = array();
	    
	    $path = trim($uri->getPath(), '/');
		
		//Remove basepath
		$path = substr_replace($path, '', 0, strlen(JURI::base(true)));
		
		//Remove prefix
		$path = trim(str_replace('index.php', '', $path), '/');
		
		//Remove suffix
	    if(JFactory::getApplication()->getCfg('sef_suffix') && !empty($path))<commit_msg>re #161 : Added transparent handling for URL suffix.<commit_after><?php
/**
 * @version     $Id$
 * @category    Nooku
 * @package     Nooku_Server
 * @copyright   Copyright (C) 2011 Timble CVBA and Contributors. (http://www.timble.net).
 * @license     GNU GPLv3 <http://www.gnu.org/licenses/gpl.html>
 * @link        http://www.nooku.org
 */

/**
 * Class to create and parse routes
 *
 * @author      <NAME> <http://nooku.assembla.com/profile/johanjanssens>
 * @category    Nooku
 * @package     Nooku_Server
 */
class JRouterAdministrator extends JRouter
{
	/**
	 * Function to convert a route to an internal URI
	 *
	 * @return array
	 */
	public function parse($uri)
	{
		$vars = array();
	    
	    $path = trim($uri->getPath(), '/');
		
		//Remove basepath
		$path = substr_replace($path, '', 0, strlen(JURI::base(true)));
		
		//Remove prefix
		$path = trim(str_replace('index.php', '', $path), '/');
		
		//Remove suffix
	    if(!empty($path))
{'fraction_non_alphanumeric': 0.16935904116727463, 'fraction_numerical': 0.007816571130797291, 'mean_word_length': 2.9425051334702257, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 12, 'https://': 0, 'lorem ipsum': 0, 'www.': 6, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3090125', 'n_tokens_mistral': 698, 'n_tokens_neox': 635, 'n_words': 149}