protected function saveClassesInternal(string $dir, string $namespace_name, string $use = ''){
		if (empty($this->classes)){
			throw new \Exception("No classes were created, try running the generate() method first");
		}

		$dir = $this->checkDir($dir);

		foreach ($this->classes as $class_name => $class){
			$php_file = (string)$class;
			$php_file = "<?php\nnamespace $namespace_name;\n$use\n$php_file";
			file_put_contents("{$dir}/{$class_name}.php", $php_file);
		}
	}