public function setFormat($name)
    {
        if (!$this->hasFactory($name)) {
            throw new \InvalidArgumentException(sprintf(
                    'Invalid Canvas Factory "%s"', $name
            ));
        }
        $this->activeFactoryName = $name;
        $this->activeCanvas = $this->getFactory($name)->getCanvas();

        return $this;
    }
public function setFormat($name)
    {
        if (!$this->hasFactory($name)) {
            throw new \InvalidArgumentException(sprintf(
                    'Invalid Canvas Factory "%s"', $name
            ));
        }
        $this->activeFactoryName = $name;
        $this->activeCanvas = $this->getFactory($name)->getCanvas();

        return $this;
    }
public function setFormat ( $ name ) { if ( ! $ this -> hasFactory ( $ name ) ) { throw new \ InvalidArgumentException ( sprintf ( 'Invalid Canvas Factory "%s"' , $ name ) ) ; } $ this -> activeFactoryName = $ name ; $ this -> activeCanvas = $ this -> getFactory ( $ name ) -> getCanvas ( ) ; return $ this ; }
Set canvas factory

@param string $name factory's name

@return \Jaguar\Canvas
@throws \InvalidArgumentException
Set canvas factory