public function addAlternative($ratio, Medium $alternative)
    {
        if (!is_numeric($ratio) || $ratio === 0) {
            return;
        }

        $alternative->set('ratio', $ratio);
        $width = $alternative->get('width');

        $this->alternatives[$width] = $alternative;
    }
public function addAlternative($ratio, Medium $alternative)
    {
        if (!is_numeric($ratio) || $ratio === 0) {
            return;
        }

        $alternative->set('ratio', $ratio);
        $width = $alternative->get('width');

        $this->alternatives[$width] = $alternative;
    }
public function addAlternative ( $ ratio , Medium $ alternative ) { if ( ! is_numeric ( $ ratio ) || $ ratio === 0 ) { return ; } $ alternative -> set ( 'ratio' , $ ratio ) ; $ width = $ alternative -> get ( 'width' ) ; $ this -> alternatives [ $ width ] = $ alternative ; }
Add alternative Medium to this Medium.

@param int|float $ratio
@param Medium $alternative
Add alternative Medium to this Medium .