public function encodeIcon(ImageIcon $icon, Encoder $encoder)
    {
        return sprintf(
            '%s = L.icon(%s);',
            $encoder->encodeReference($icon),
            $encoder->encodeArguments(array($icon->getOptions()))
        );
    }
public function encodeIcon(ImageIcon $icon, Encoder $encoder)
    {
        return sprintf(
            '%s = L.icon(%s);',
            $encoder->encodeReference($icon),
            $encoder->encodeArguments(array($icon->getOptions()))
        );
    }
public function encodeIcon ( ImageIcon $ icon , Encoder $ encoder ) { return sprintf ( '%s = L.icon(%s);' , $ encoder -> encodeReference ( $ icon ) , $ encoder -> encodeArguments ( array ( $ icon -> getOptions ( ) ) ) ) ; }
Encode the icon.

@param ImageIcon $icon    The icon.
@param Encoder   $encoder The encoder.

@return string
Encode the icon .