public function setStyle($style)
    {
        if ($style == null) {
            $this->style = new IdenticonStyle();
        } elseif ($style instanceof IdenticonStyle) {
            $this->style = $style;
        } elseif (is_array($style)) {
            $this->style = new IdenticonStyle($style);
        } else {
            throw new \InvalidArgumentException(
                "Invalid indenticon style was specified. ".
                "Allowed values are IdenticonStyle instances and associative ".
                "arrays containing IdenticonStyle options.");
        }
        
        return $this;
    }
public function setStyle($style)
    {
        if ($style == null) {
            $this->style = new IdenticonStyle();
        } elseif ($style instanceof IdenticonStyle) {
            $this->style = $style;
        } elseif (is_array($style)) {
            $this->style = new IdenticonStyle($style);
        } else {
            throw new \InvalidArgumentException(
                "Invalid indenticon style was specified. ".
                "Allowed values are IdenticonStyle instances and associative ".
                "arrays containing IdenticonStyle options.");
        }
        
        return $this;
    }
public function setStyle ( $ style ) { if ( $ style == null ) { $ this -> style = new IdenticonStyle ( ) ; } elseif ( $ style instanceof IdenticonStyle ) { $ this -> style = $ style ; } elseif ( is_array ( $ style ) ) { $ this -> style = new IdenticonStyle ( $ style ) ; } else { throw new \ InvalidArgumentException ( "Invalid indenticon style was specified. " . "Allowed values are IdenticonStyle instances and associative " . "arrays containing IdenticonStyle options." ) ; } return $ this ; }
Gets or sets the style of the icon.

@param array|\Jdenticon\IdenticonStyle $style The new style of the icon.
NULL will revert the identicon to use the default style.
@return self
Gets or sets the style of the icon .