public static function getRulePos($rules) {
		$result = 1;
		$before = array();
		$after  = array();

		foreach($rules as $key => $val) {
			if($key == '<module:\w+>/<controller:\w+>/<action:\w+>')
				break;
			$result++;
		}

		$i = 1;
		foreach($rules as $key => $val) {
			if($i < $result)
				$before[$key] = $val;
			elseif($i >= $pos)
				$after[$key]  = $val;
			$i++;
		}

		return array('after' => $after, 'before' => $before);
	}
public static function getRulePos($rules) {
		$result = 1;
		$before = array();
		$after  = array();

		foreach($rules as $key => $val) {
			if($key == '<module:\w+>/<controller:\w+>/<action:\w+>')
				break;
			$result++;
		}

		$i = 1;
		foreach($rules as $key => $val) {
			if($i < $result)
				$before[$key] = $val;
			elseif($i >= $pos)
				$after[$key]  = $val;
			$i++;
		}

		return array('after' => $after, 'before' => $before);
	}
public static function getRulePos ( $ rules ) { $ result = 1 ; $ before = array ( ) ; $ after = array ( ) ; foreach ( $ rules as $ key => $ val ) { if ( $ key == '<module:\w+>/<controller:\w+>/<action:\w+>' ) break ; $ result ++ ; } $ i = 1 ; foreach ( $ rules as $ key => $ val ) { if ( $ i < $ result ) $ before [ $ key ] = $ val ; elseif ( $ i >= $ pos ) $ after [ $ key ] = $ val ; $ i ++ ; } return array ( 'after' => $ after , 'before' => $ before ) ; }
Split rules into two part

@param array $rules
@return array
Split rules into two part