Refactoring

This commit is contained in:
Yusuf Kandemir
2018-11-11 22:47:37 +03:00
parent faeb1f97a0
commit 4cdd720082
2 changed files with 25 additions and 27 deletions

View File

@ -33,12 +33,11 @@ class MicrodataParser
$memory[] = $item;
$itemtype = $item->getAttribute('itemtype');
$result->type = $itemtype ? preg_split('/\s+/', $itemtype) : [];
$result->type = $this->tokenizeAttribute('itemtype');
// @todo Check if types are valid absolute urls
if ($itemId = $item->getAttribute('itemid')) {
$result->id = $itemId;
if ($item->hasAttribute('itemid')) {
$result->id = $item->getAttribute('itemid');
}
// @todo Check if item ids are valid absolute urls or like isbn:xxx