public function addClass(ResponsiveImageClass $class)
    {
        $this->classes_added = true;
        if (array_key_exists($class->getName(), $this->classes)) {
            throw new \Exception(sprintf('A responsive image class with name "%s" is already registered', $class->getName()));
        }
        if ($this->default_filters instanceof FilterInterface) {
            $class->addFilter($this->default_filters);
        }
        if ($this->default_post_filters instanceof FilterInterface) {
            $class->addPostFilter($this->default_post_filters);
        }
        if ($this->default_scaling_algorithm != '') {
            $class->setScaleAlgorithm($this->default_scaling_algorithm);
        }
        if ($this->default_output_type_map instanceof OutputTypeMap) {
            $class->setOutputTypeMap($this->default_output_type_map);
        }
        $this->classes[$class->getName()] = $class;
    }
public function addClass(ResponsiveImageClass $class)
    {
        $this->classes_added = true;
        if (array_key_exists($class->getName(), $this->classes)) {
            throw new \Exception(sprintf('A responsive image class with name "%s" is already registered', $class->getName()));
        }
        if ($this->default_filters instanceof FilterInterface) {
            $class->addFilter($this->default_filters);
        }
        if ($this->default_post_filters instanceof FilterInterface) {
            $class->addPostFilter($this->default_post_filters);
        }
        if ($this->default_scaling_algorithm != '') {
            $class->setScaleAlgorithm($this->default_scaling_algorithm);
        }
        if ($this->default_output_type_map instanceof OutputTypeMap) {
            $class->setOutputTypeMap($this->default_output_type_map);
        }
        $this->classes[$class->getName()] = $class;
    }
public function addClass ( ResponsiveImageClass $ class ) { $ this -> classes_added = true ; if ( array_key_exists ( $ class -> getName ( ) , $ this -> classes ) ) { throw new \ Exception ( sprintf ( 'A responsive image class with name "%s" is already registered' , $ class -> getName ( ) ) ) ; } if ( $ this -> default_filters instanceof FilterInterface ) { $ class -> addFilter ( $ this -> default_filters ) ; } if ( $ this -> default_post_filters instanceof FilterInterface ) { $ class -> addPostFilter ( $ this -> default_post_filters ) ; } if ( $ this -> default_scaling_algorithm != '' ) { $ class -> setScaleAlgorithm ( $ this -> default_scaling_algorithm ) ; } if ( $ this -> default_output_type_map instanceof OutputTypeMap ) { $ class -> setOutputTypeMap ( $ this -> default_output_type_map ) ; } $ this -> classes [ $ class -> getName ( ) ] = $ class ; }
Add a ResponsiveImageClass object to the registered responsive image classes

@param ResponsiveImageClass $class The ResponsiveImageClass object
@throws \Exception
Add a ResponsiveImageClass object to the registered responsive image classes