protected function parseDoapProject(\DOMElement $element) { $project = new Project($this->getLinkToSelf($element), $this->getLinkToAlternate($element)); $project->setUuid($element->attributes->getNamedItem('id')->value); $project->setImage($this->getLinkNodeHref('./atom:link[@rel="foaf:depiction"]', $element)); $project->setName($this->getNodeValue('./doap:name', $element)); $project->setIsPrivate($this->getNodeValue('./is-private', $element)); $project->setSlug($this->getNodeValue('./slug', $element)); $project->setDescription($this->getNodeValue('./doap:description', $element)); $project->setType($project->getTypeFromTextual($this->getNodeValue('./doap:category', $element))); $project->setUrl($this->getNodeValue('./doap:homepage', $element)); $project->setRepositoryUrl($this->getNodeValue('./doap:Repository/doap:GitRepository/doap:location', $element)); $nodeList = $this->xpath->query('./xhtml:form', $element); if (1 === $nodeList->length) { $this->parseForm($project, $nodeList->item(0)); } $nodeList = $this->xpath->query('./contributors', $element); if (1 === $nodeList->length) { $contributors = $this->parseIndex($nodeList->item(0)); $project->setContributors($contributors); } return $project; }