public static function getByType(string $type, string $content = null): ResponseContextAbstract
    {
        switch ($type) {
            case self::RESPONSE_TYPE_JSON:
                return new JsonResponseContext($content);
            default:
                return new DummyResponseContext($content);
        }
    }
public static function getByType(string $type, string $content = null): ResponseContextAbstract
    {
        switch ($type) {
            case self::RESPONSE_TYPE_JSON:
                return new JsonResponseContext($content);
            default:
                return new DummyResponseContext($content);
        }
    }
public static function getByType ( string $ type , string $ content = null ) : ResponseContextAbstract { switch ( $ type ) { case self :: RESPONSE_TYPE_JSON : return new JsonResponseContext ( $ content ) ; default : return new DummyResponseContext ( $ content ) ; } }
Create response context instance

@param string $type
@param string|null $content

@return ResponseContextAbstract
Create response context instance