Skip to content

Commit

Permalink
rename WebController to IWebController
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelneu committed Sep 14, 2017
1 parent 703c1c4 commit 74eb9a6
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
12 changes: 6 additions & 6 deletions src/Classes/FileSystemWebController.cls
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = False
Attribute VB_Exposed = False
Implements WebController
Implements IWebController

Private m_directory As String

Expand All @@ -30,17 +30,17 @@ Public Property Let Directory(val As String)
End Property


Private Property Get WebController_UrlPattern() As String
WebController_UrlPattern = "*"
Private Property Get IWebController_UrlPattern() As String
IWebController_UrlPattern = "*"
End Property


Private Function WebController_ProcessRequest(request As HttpRequest) As HttpResponse
Private Function IWebController_ProcessRequest(request As HttpRequest) As HttpResponse
Dim response As HttpResponse
Set response = New HttpResponse

Dim filename As String
filename = ResolveFile(request.url)
filename = ResolveFile(request.Url)

Dim file As FileInfo
Set file = New FileInfo
Expand All @@ -55,7 +55,7 @@ Private Function WebController_ProcessRequest(request As HttpRequest) As HttpRes
response.StatusCode = 404
End If

Set WebController_ProcessRequest = response
Set IWebController_ProcessRequest = response
End Function


Expand Down
2 changes: 1 addition & 1 deletion src/Classes/HttpServer.cls
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ End Sub


Private Function ProcessRequest(request As HttpRequest) As HttpResponse
Dim controller As WebController
Dim controller As IWebController
Set controller = Controllers.GetMatchingController(request.Url)

If Not controller Is Nothing Then
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ VERSION 1.0 CLASS
BEGIN
MultiUse = -1 'True
END
Attribute VB_Name = "WebController"
Attribute VB_Name = "IWebController"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = False
Expand Down
4 changes: 2 additions & 2 deletions src/Classes/WebControllerCollection.cls
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@ Private Sub Class_Initialize()
End Sub


Public Sub AddController(controller As WebController)
Public Sub AddController(controller As IWebController)
m_controllers.Add controller
End Sub


Public Function GetMatchingController(requestUrl As String) As WebController
Public Function GetMatchingController(requestUrl As String) As IWebController
For Each controller In m_controllers
If requestUrl Like controller.UrlPattern Then
Set GetMatchingController = controller
Expand Down

0 comments on commit 74eb9a6

Please sign in to comment.