@@ 395-403 (lines=9) @@ | ||
392 | } |
|
393 | ||
394 | $name = $property->getName(); |
|
395 | foreach (array_keys($this->_propertiesDeclaredOnThisType) as $propertyName) { |
|
396 | if (strcasecmp($propertyName, $name) == 0) { |
|
397 | throw new InvalidOperationException( |
|
398 | Messages::resourceTypePropertyWithSameNameAlreadyExists( |
|
399 | $propertyName, $this->_name |
|
400 | ) |
|
401 | ); |
|
402 | } |
|
403 | } |
|
404 | ||
405 | if ($property->isKindOf(ResourcePropertyKind::KEY)) { |
|
406 | if ($this->_resourceTypeKind != ResourceTypeKind::ENTITY) { |
|
@@ 582-592 (lines=11) @@ | ||
579 | } |
|
580 | ||
581 | $name = $namedStream->getName(); |
|
582 | foreach (array_keys($this->_namedStreamsDeclaredOnThisType) |
|
583 | as $namedStreamName |
|
584 | ) { |
|
585 | if (strcasecmp($namedStreamName, $name) == 0) { |
|
586 | throw new InvalidOperationException( |
|
587 | Messages::resourceTypeNamedStreamWithSameNameAlreadyExists( |
|
588 | $name, $this->_name |
|
589 | ) |
|
590 | ); |
|
591 | } |
|
592 | } |
|
593 | ||
594 | $this->_namedStreamsDeclaredOnThisType[$name] = $namedStream; |
|
595 | // Set $this->_allNamedStreams to null, the first call to getAllNamedStreams |