private function encodeLayersInformation($layers, Encoder $encoder)
    {
        $prepared = '';

        foreach ($layers as $layer) {
            if ($prepared) {
                $prepared .= ', ';
            }

            $prepared .= sprintf(
                '%s: %s',
                $encoder->encodeValue($layer->getLabel()),
                $encoder->encodeReference($layer)
            );
        }

        return '{' . $prepared . '}';
    }
private function encodeLayersInformation($layers, Encoder $encoder)
    {
        $prepared = '';

        foreach ($layers as $layer) {
            if ($prepared) {
                $prepared .= ', ';
            }

            $prepared .= sprintf(
                '%s: %s',
                $encoder->encodeValue($layer->getLabel()),
                $encoder->encodeReference($layer)
            );
        }

        return '{' . $prepared . '}';
    }
private function encodeLayersInformation ( $ layers , Encoder $ encoder ) { $ prepared = '' ; foreach ( $ layers as $ layer ) { if ( $ prepared ) { $ prepared .= ', ' ; } $ prepared .= sprintf ( '%s: %s' , $ encoder -> encodeValue ( $ layer -> getLabel ( ) ) , $ encoder -> encodeReference ( $ layer ) ) ; } return '{' . $ prepared . '}' ; }
Get layer information, so that label is used.

@param Layer[] $layers  The layers.
@param Encoder $encoder The encoder.

@return array
Get layer information so that label is used .