Пример #1
0
 protected function validateConcreteNode(ArrayNode $node)
 {
     $path = $node->getPath();
     if (null !== $this->key) {
         throw new InvalidDefinitionException(sprintf('->useAttributeAsKey() is not applicable to concrete nodes at path "%s"', $path));
     }
     if (true === $this->atLeastOne) {
         throw new InvalidDefinitionException(sprintf('->requiresAtLeastOneElement() is not applicable to concrete nodes at path "%s"', $path));
     }
     if ($this->default) {
         throw new InvalidDefinitionException(sprintf('->defaultValue() is not applicable to concrete nodes at path "%s"', $path));
     }
     if (false !== $this->addDefaultChildren) {
         throw new InvalidDefinitionException(sprintf('->addDefaultChildrenIfNoneSet() is not applicable to concrete nodes at path "%s"', $path));
     }
 }