lib/Formatter/FormatRegistry.php
public function register($name, FormatInterface $format)
    {
        if (isset($this->formats[$name])) {
            throw new \InvalidArgumentException(sprintf(
                'Formatter with name "%s" is already registered',
                $name
            ));
        }

        $this->formats[$name] = $format;
    }
public function register($name, FormatInterface $format)
    {
        if (isset($this->formats[$name])) {
            throw new \InvalidArgumentException(sprintf(
                'Formatter with name "%s" is already registered',
                $name
            ));
        }

        $this->formats[$name] = $format;
    }
public function register ( $ name , FormatInterface $ format ) { if ( isset ( $ this -> formats [ $ name ] ) ) { throw new \ InvalidArgumentException ( sprintf ( 'Formatter with name "%s" is already registered' , $ name ) ) ; } $ this -> formats [ $ name ] = $ format ; }
Register a format class.

@param string $name
@param FormatInterface $format
Register a format class .