src/classes/CCRouter.php
public static function events_matching( $event, $rule )
	{
		if ( !array_key_exists( $event, static::$events ) )
		{
			return array();
		}
		
		$callbacks = array();
		
		foreach( static::$events[$event] as $route => $events )
		{
			$rgx = "~^".str_replace( '*', '(.*)', $route )."$~";
			if ( preg_match( $rgx, $rule ) )
			{
				$callbacks = array_merge( $callbacks, $events );
			}
		}
		
		return $callbacks;
	}
public static function events_matching( $event, $rule )
	{
		if ( !array_key_exists( $event, static::$events ) )
		{
			return array();
		}
		
		$callbacks = array();
		
		foreach( static::$events[$event] as $route => $events )
		{
			$rgx = "~^".str_replace( '*', '(.*)', $route )."$~";
			if ( preg_match( $rgx, $rule ) )
			{
				$callbacks = array_merge( $callbacks, $events );
			}
		}
		
		return $callbacks;
	}
public static function events_matching ( $ event , $ rule ) { if ( ! array_key_exists ( $ event , static :: $ events ) ) { return array ( ) ; } $ callbacks = array ( ) ; foreach ( static :: $ events [ $ event ] as $ route => $ events ) { $ rgx = "~^" . str_replace ( '*' , '(.*)' , $ route ) . "$~" ; if ( preg_match ( $ rgx , $ rule ) ) { $ callbacks = array_merge ( $ callbacks , $ events ) ; } } return $ callbacks ; }
Get all events matching a rule

@param string		$event
@param string 	$route
@param mixed 		$callback
@return void
Get all events matching a rule