AdamStipak\RestRoute::__construct PHP Method

__construct() public method

public __construct ( $module = NULL, $defaultFormat = 'json' )
    public function __construct($module = NULL, $defaultFormat = 'json')
    {
        if (!array_key_exists($defaultFormat, $this->formats)) {
            throw new InvalidArgumentException("Format '{$defaultFormat}' is not allowed.");
        }
        $this->module = $module;
        $this->defaultFormat = $defaultFormat;
    }