private Config(ConfigurationMutable config) { Preconditions.NotNull(config, "config"); PHPSettings = new PHPConfiguration(config.PHPConfiguration.PHPPath, config.PHPConfiguration.PHPParsePath, config.PHPConfiguration.PHPExts); GraphSettings = new GraphConfiguration(config.GraphConfiguration.GraphvizPath, config.GraphConfiguration.GraphvizArguments); ComponentSettings = new ComponentConfiguration(config.ComponentSettings.ComponentFolder, config.ComponentSettings.IncludeComponents); FuncSpecSettings = new FuncSpecConfiguration(config.FuncSpecSettings.PHPSpecs, config.FuncSpecSettings.ExtensionSpecs); }
public ProjectParser(string projectPath, PHPConfiguration settings) { Preconditions.NotNull(projectPath, "projectPath"); Preconditions.NotNull(settings, "settings"); PHPSettings = settings; if (!Directory.Exists(projectPath)) { string errorMsg = "Directory does not exist. (" + projectPath + ")"; throw new DirectoryNotFoundException(errorMsg); } this.ProjectPath = projectPath; }