/**
  * @see PropertyInfoStore::getPropertyInfo
  *
  * @param PropertyId $propertyId
  *
  * @return array|null
  * @throws InvalidArgumentException
  */
 public function getPropertyInfo(PropertyId $propertyId)
 {
     if ($propertyId->getEntityType() !== Property::ENTITY_TYPE) {
         throw new InvalidArgumentException('Property ID expected! ' . $propertyId);
     }
     $propertyInfo = $this->getAllPropertyInfo();
     $id = $propertyId->getNumericId();
     if (isset($propertyInfo[$id])) {
         return $propertyInfo[$id];
     }
     return null;
 }
示例#2
0
 public function testGetEntityType()
 {
     $id = new PropertyId('P1');
     $this->assertSame('property', $id->getEntityType());
 }