GeoJson\Feature\Feature::getProperties PHP Méthode

getProperties() public méthode

Return the properties for this Feature object.
public getProperties ( ) : array
Résultat array
    public function getProperties()
    {
        return $this->properties;
    }

Usage Example

 public function testSerialization()
 {
     $geometry = $this->getMockGeometry();
     $geometry->expects($this->any())->method('jsonSerialize')->will($this->returnValue('geometry'));
     $properties = array('key' => 'value');
     $id = 'identifier';
     $feature = new Feature($geometry, $properties, $id);
     $expected = array('type' => 'Feature', 'geometry' => 'geometry', 'properties' => $properties, 'id' => 'identifier');
     $this->assertSame('Feature', $feature->getType());
     $this->assertSame($geometry, $feature->getGeometry());
     $this->assertSame($id, $feature->getId());
     $this->assertSame($properties, $feature->getProperties());
     $this->assertSame($expected, $feature->jsonSerialize());
 }