public function addStyle(Style $style)
    {
        if (null === $style->getId()) {
            $this->register($style->getFont(), $this->fonts);
            $this->register($style->getFill(), $this->fills);
            $this->register($style->getBorder(), $this->borders);
            $this->register($style, $this->styles);
            $style->lock();
        }
    }
public function addStyle(Style $style)
    {
        if (null === $style->getId()) {
            $this->register($style->getFont(), $this->fonts);
            $this->register($style->getFill(), $this->fills);
            $this->register($style->getBorder(), $this->borders);
            $this->register($style, $this->styles);
            $style->lock();
        }
    }
public function addStyle ( Style $ style ) { if ( null === $ style -> getId ( ) ) { $ this -> register ( $ style -> getFont ( ) , $ this -> fonts ) ; $ this -> register ( $ style -> getFill ( ) , $ this -> fills ) ; $ this -> register ( $ style -> getBorder ( ) , $ this -> borders ) ; $ this -> register ( $ style , $ this -> styles ) ; $ style -> lock ( ) ; } }
Add a new style, if it doesnt exists yet.

@param Style $style
Add a new style if it doesnt exists yet .