public function add(Style $style)
    {
        if (!$style->getTag()) {
            throw new LogicException('The tag of a style added to the style set must be set.');
        }

        $this->styles[$style->getTag()] = $style;
    }
public function add(Style $style)
    {
        if (!$style->getTag()) {
            throw new LogicException('The tag of a style added to the style set must be set.');
        }

        $this->styles[$style->getTag()] = $style;
    }
public function add ( Style $ style ) { if ( ! $ style -> getTag ( ) ) { throw new LogicException ( 'The tag of a style added to the style set must be set.' ) ; } $ this -> styles [ $ style -> getTag ( ) ] = $ style ; }
Adds a style.

@param Style $style The style to add.

@throws LogicException If the tag of the style is not set.
Adds a style .