public function registerFormat($format, $class)
    {
        if ( ! class_exists($class)) {
            throw new \InvalidArgumentException("Responder formatter class {$class} not found.");
        }
        if ( ! is_a($class, 'Nathanmac\Utilities\Responder\Formats\FormatInterface', true)) {
            throw new \InvalidArgumentException('Responder formatters must implement the Nathanmac\Utilities\Responder\Formats\FormatInterface interface.');
        }

        $this->supported_formats[$format] = $class;

        return $this;
    }
public function registerFormat($format, $class)
    {
        if ( ! class_exists($class)) {
            throw new \InvalidArgumentException("Responder formatter class {$class} not found.");
        }
        if ( ! is_a($class, 'Nathanmac\Utilities\Responder\Formats\FormatInterface', true)) {
            throw new \InvalidArgumentException('Responder formatters must implement the Nathanmac\Utilities\Responder\Formats\FormatInterface interface.');
        }

        $this->supported_formats[$format] = $class;

        return $this;
    }
public function registerFormat ( $ format , $ class ) { if ( ! class_exists ( $ class ) ) { throw new \ InvalidArgumentException ( "Responder formatter class {$class} not found." ) ; } if ( ! is_a ( $ class , 'Nathanmac\Utilities\Responder\Formats\FormatInterface' , true ) ) { throw new \ InvalidArgumentException ( 'Responder formatters must implement the Nathanmac\Utilities\Responder\Formats\FormatInterface interface.' ) ; } $ this -> supported_formats [ $ format ] = $ class ; return $ this ; }
Register Format Class.

@param $format
@param $class

@throws InvalidArgumentException

@return self
Register Format Class .