private function getLegendProperty(LegendInterface $legend, $propertyName)
    {
        if ($legend->hasProperty($propertyName)) {
            $property = $legend->getProperty($propertyName);
        } else {
            $property = new Property($propertyName);
            $legend->addProperty($property);
        }

        return $property;
    }
private function getLegendProperty(LegendInterface $legend, $propertyName)
    {
        if ($legend->hasProperty($propertyName)) {
            $property = $legend->getProperty($propertyName);
        } else {
            $property = new Property($propertyName);
            $legend->addProperty($property);
        }

        return $property;
    }
private function getLegendProperty ( LegendInterface $ legend , $ propertyName ) { if ( $ legend -> hasProperty ( $ propertyName ) ) { $ property = $ legend -> getProperty ( $ propertyName ) ; } else { $ property = new Property ( $ propertyName ) ; $ legend -> addProperty ( $ property ) ; } return $ property ; }
Get a property from a legend. Create if not exists.

@param LegendInterface $legend       The legend.
@param string          $propertyName The property name.

@return PropertyInterface
Get a property from a legend . Create if not exists .