original_string: private function createCallbackFromString( $callFunc, $params ) {
  
  		if ( is_string( $callFunc ) ) {
  			$callFunc = function () use ( $callFunc, $params ) {
  				$controllerParts    = explode( '@', $callFunc );
  				$controllerParts[0] = explode( '\\', $controllerParts[0] );
  				$hmvc               = '';
  				$controllerPaths    = count( $controllerParts[0] );
  
  				if ( $controllerPaths > 1 ) {
  
  					foreach ( $controllerParts[0] as $idx => $controllerPart ) {
  
  						if ( $idx == ( $controllerPaths - 1 ) ) {
  							break;
  						}
  
  						$hmvc .= '\\' . $controllerPart;
  					}
  
  				}
  
  				$controller = $hmvc . '\\Controllers\\' . $controllerParts[0][ $controllerPaths - 1 ];
  				$c          = new \ReflectionClass( $controller );
  				$c          = $c->newInstanceArgs( $params );
  
  				return call_user_func_array( array( $c, $controllerParts[1] ), $this->route->getParams() );
  			};
  
  			return $callFunc;
  
  		}
  
  		return $callFunc;
  	}
code: private function createCallbackFromString( $callFunc, $params ) {
  
  		if ( is_string( $callFunc ) ) {
  			$callFunc = function () use ( $callFunc, $params ) {
  				$controllerParts    = explode( '@', $callFunc );
  				$controllerParts[0] = explode( '\\', $controllerParts[0] );
  				$hmvc               = '';
  				$controllerPaths    = count( $controllerParts[0] );
  
  				if ( $controllerPaths > 1 ) {
  
  					foreach ( $controllerParts[0] as $idx => $controllerPart ) {
  
  						if ( $idx == ( $controllerPaths - 1 ) ) {
  							break;
  						}
  
  						$hmvc .= '\\' . $controllerPart;
  					}
  
  				}
  
  				$controller = $hmvc . '\\Controllers\\' . $controllerParts[0][ $controllerPaths - 1 ];
  				$c          = new \ReflectionClass( $controller );
  				$c          = $c->newInstanceArgs( $params );
  
  				return call_user_func_array( array( $c, $controllerParts[1] ), $this->route->getParams() );
  			};
  
  			return $callFunc;
  
  		}
  
  		return $callFunc;
  	}
code_tokens: private function createCallbackFromString ( $ callFunc , $ params ) { if ( is_string ( $ callFunc ) ) { $ callFunc = function ( ) use ( $ callFunc , $ params ) { $ controllerParts = explode ( '@' , $ callFunc ) ; $ controllerParts [ 0 ] = explode ( '\\' , $ controllerParts [ 0 ] ) ; $ hmvc = '' ; $ controllerPaths = count ( $ controllerParts [ 0 ] ) ; if ( $ controllerPaths > 1 ) { foreach ( $ controllerParts [ 0 ] as $ idx => $ controllerPart ) { if ( $ idx == ( $ controllerPaths - 1 ) ) { break ; } $ hmvc .= '\\' . $ controllerPart ; } } $ controller = $ hmvc . '\\Controllers\\' . $ controllerParts [ 0 ] [ $ controllerPaths - 1 ] ; $ c = new \ ReflectionClass ( $ controller ) ; $ c = $ c -> newInstanceArgs ( $ params ) ; return call_user_func_array ( array ( $ c , $ controllerParts [ 1 ] ) , $ this -> route -> getParams ( ) ) ; } ; return $ callFunc ; } return $ callFunc ; }
docstring: Create Callback from string
  
  @param $callFunc
  @param $params
  
  @return Closure
docstring_tokens: Create Callback from string