public function loadController($module, $controller) {

		if(false === is_string($module)) {
			return trigger_error(sprintf('Argument 1 passed to %s() must be of the type string, "%s" given', __METHOD__, gettype($module)), E_USER_ERROR);
		}

		if(false === is_string($controller)) {
			return trigger_error(sprintf('Argument 2 passed to %s() must be of the type string, "%s" given', __METHOD__, gettype($controller)), E_USER_ERROR);
		}

		$folders 	= explode('.', $controller); //Convert dots to directory separators
		$amount 	= count($folders) - 1;
		$namespace	= '';

		foreach($folders as $index => $folder) {

			if($amount === $index) {
				
				$controller = Application :: get(['prefix', 'controller']) . $folder;
				$namespace .= $controller;

				break;
			}

			$namespace 	.= $folder . DIRECTORY_SEPARATOR;
		}

		$controller = str_replace(DIRECTORY_SEPARATOR, '\\', $module . DIRECTORY_SEPARATOR . Application :: get(['directory', 'controller']) . $namespace);
			
		return $controller;
	}
public function loadController($module, $controller) {

		if(false === is_string($module)) {
			return trigger_error(sprintf('Argument 1 passed to %s() must be of the type string, "%s" given', __METHOD__, gettype($module)), E_USER_ERROR);
		}

		if(false === is_string($controller)) {
			return trigger_error(sprintf('Argument 2 passed to %s() must be of the type string, "%s" given', __METHOD__, gettype($controller)), E_USER_ERROR);
		}

		$folders 	= explode('.', $controller); //Convert dots to directory separators
		$amount 	= count($folders) - 1;
		$namespace	= '';

		foreach($folders as $index => $folder) {

			if($amount === $index) {
				
				$controller = Application :: get(['prefix', 'controller']) . $folder;
				$namespace .= $controller;

				break;
			}

			$namespace 	.= $folder . DIRECTORY_SEPARATOR;
		}

		$controller = str_replace(DIRECTORY_SEPARATOR, '\\', $module . DIRECTORY_SEPARATOR . Application :: get(['directory', 'controller']) . $namespace);
			
		return $controller;
	}
public function loadController ( $ module , $ controller ) { if ( false === is_string ( $ module ) ) { return trigger_error ( sprintf ( 'Argument 1 passed to %s() must be of the type string, "%s" given' , __METHOD__ , gettype ( $ module ) ) , E_USER_ERROR ) ; } if ( false === is_string ( $ controller ) ) { return trigger_error ( sprintf ( 'Argument 2 passed to %s() must be of the type string, "%s" given' , __METHOD__ , gettype ( $ controller ) ) , E_USER_ERROR ) ; } $ folders = explode ( '.' , $ controller ) ; //Convert dots to directory separators
 $ amount = count ( $ folders ) - 1 ; $ namespace = '' ; foreach ( $ folders as $ index => $ folder ) { if ( $ amount === $ index ) { $ controller = Application :: get ( [ 'prefix' , 'controller' ] ) . $ folder ; $ namespace .= $ controller ; break ; } $ namespace .= $ folder . DIRECTORY_SEPARATOR ; } $ controller = str_replace ( DIRECTORY_SEPARATOR , '\\' , $ module . DIRECTORY_SEPARATOR . Application :: get ( [ 'directory' , 'controller' ] ) . $ namespace ) ; return $ controller ; }
Loads controller by module name and controller name
@param string $module
@param string $controller
@return string
Loads controller by module name and controller name