コード例 #1
0
 /**
  * @test
  * @group Entity
  * @group Value
  */
 public function the_same_entity_ids_are_considered_equal()
 {
     $base = new EntityId('a');
     $theSame = new EntityId('a');
     $different = new EntityId('A');
     $this->assertTrue($base->equals($theSame));
     $this->assertFalse($base->equals($different));
 }
コード例 #2
0
 /**
  * @param EntityId[] $entityIds
  * @return null|EntityId
  */
 private function getNearestAuthenticatingAuthorityEntityId(array $entityIds)
 {
     $lastEntityId = array_pop($entityIds);
     if ($lastEntityId === null) {
         return null;
     }
     if (!$this->engineBlockEntityId->equals($lastEntityId)) {
         return $lastEntityId;
     }
     return array_pop($entityIds);
 }
コード例 #3
0
 /**
  * @param EntityId $entityId
  * @return ContactPersonList
  */
 public function findAllForIdp(EntityId $entityId)
 {
     $identityProviderJson = $this->apiClient->read('metadata/idp?entity-id=%s', [$entityId->getEntityId()]);
     return ContactPersonListFactory::createListFromMetadata($identityProviderJson);
 }
コード例 #4
0
 /**
  * @param Entity $other
  * @return bool
  */
 public function equals(Entity $other)
 {
     return $this->entityId->equals($other->entityId) && $this->entityType->equals($other->entityType);
 }