/** * Parse the directories and the files (depending on what the $directories * and $files properties have been set to with setInput()) and return a * UML model. * * @param string $modelName A model name (e.g., the name of your application) * * @return PHP_UML_Metamodel_Superstructure The resulting UML model */ public function parse($modelName = 'default') { $this->model->initModel($modelName); if ($this->importer instanceof PHP_UML_Input_PHP_FileScanner) { $this->setInputPhpParserOptions(); } $this->importer->setFiles($this->files); $this->importer->setDirectories($this->directories); $this->importer->setMatchPatterns($this->matchPatterns); $this->importer->setIgnorePatterns($this->ignorePatterns); $this->importer->import(); if ($this->removeEmptyNamespaces) { PHP_UML_Metamodel_Helper::deleteEmptyPackages($this->model->packages); } return $this->model; }