| @@ 357-369 (lines=13) @@ | ||
| 354 | } |
|
| 355 | ||
| 356 | $name = $property->getName(); |
|
| 357 | foreach (array_keys($this->propertiesDeclaredOnThisType) as $propertyName) { |
|
| 358 | if (0 == strcasecmp($propertyName, $name)) { |
|
| 359 | if (false === $throw) { |
|
| 360 | return; |
|
| 361 | } |
|
| 362 | throw new InvalidOperationException( |
|
| 363 | Messages::resourceTypePropertyWithSameNameAlreadyExists( |
|
| 364 | $propertyName, |
|
| 365 | $this->name |
|
| 366 | ) |
|
| 367 | ); |
|
| 368 | } |
|
| 369 | } |
|
| 370 | ||
| 371 | if ($property->isKindOf(ResourcePropertyKind::KEY)) { |
|
| 372 | if (ResourceTypeKind::ENTITY != $this->resourceTypeKind) { |
|
| @@ 541-550 (lines=10) @@ | ||
| 538 | } |
|
| 539 | ||
| 540 | $name = $namedStream->getName(); |
|
| 541 | foreach (array_keys($this->namedStreamsDeclaredOnThisType) as $namedStreamName) { |
|
| 542 | if (0 == strcasecmp($namedStreamName, $name)) { |
|
| 543 | throw new InvalidOperationException( |
|
| 544 | Messages::resourceTypeNamedStreamWithSameNameAlreadyExists( |
|
| 545 | $name, |
|
| 546 | $this->name |
|
| 547 | ) |
|
| 548 | ); |
|
| 549 | } |
|
| 550 | } |
|
| 551 | ||
| 552 | $this->namedStreamsDeclaredOnThisType[$name] = $namedStream; |
|
| 553 | // Set $this->allNamedStreams to null, the first call to getAllNamedStreams |
|