} if (!
$resource) { throw new \
InvalidArgumentException(sprintf('The <import> element in file "%s" must have a "resource" attribute or element.',
$path));
} $type =
$node->
getAttribute('type'
);
$prefix =
$node->
getAttribute('prefix'
);
$schemes =
$node->
hasAttribute('schemes'
) ?
preg_split('/[\s,\|]++/',
$node->
getAttribute('schemes'
), -1, \PREG_SPLIT_NO_EMPTY
) : null;
$methods =
$node->
hasAttribute('methods'
) ?
preg_split('/[\s,\|]++/',
$node->
getAttribute('methods'
), -1, \PREG_SPLIT_NO_EMPTY
) : null;
$trailingSlashOnRoot =
$node->
hasAttribute('trailing-slash-on-root'
) ? XmlUtils::
phpize($node->
getAttribute('trailing-slash-on-root'
)) : true;
$namePrefix =
$node->
getAttribute('name-prefix'
) ?: null;
[$defaults,
$requirements,
$options,
$condition, /* $paths */,
$prefixes,
$hosts] =
$this->
parseConfigs($node,
$path);
if ('' !==
$prefix &&
$prefixes) { throw new \
InvalidArgumentException(sprintf('The <route> element in file "%s" must not have both a "prefix" attribute and <prefix> child nodes.',
$path));
} $exclude =
[];
foreach ($node->childNodes
as $child) { if ($child instanceof \DOMElement &&
$child->localName ===
$exclude && self::NAMESPACE_URI ===
$child->namespaceURI
) {