static function getName($namespace,$folder = ''){

		// is namespace empty?
		if($namespace == ''){
			user_error('No Namespace');
			exit;
		}
		self::setEnvironment();
		
		// check environment have data?
		if(count(self::$env) == 0){
			user_error('Environment Registry is empty');
			exit;
		}
		
		$segments = preg_split('/(\.|\\\\)/',$namespace);
		$appname = $segments[0];

		if($folder !== ''){
			array_splice($segments,1,0,[$folder]);
		}

		$path = VENDOR_PATH;

		if(isset(self::$env[$appname])){
			$path = self::$env[$appname];	
		}
		
		// remove first array
		array_shift($segments);

		$p = implode(DS,$segments);

		$name = (object)[
			'app' => $appname,
			'namespace' => '\\'.$appname.'\\'.str_replace('/','\\',$p),
			'class' => end($segments),
			'path' => $path . $p. '.php',
			'segments' => $segments
		];
		return $name;
	}