FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
url-map/example.php at master · stackphp/url-map · GitHub
Uh oh!
There was an error while loading.
Please reload this page
.
This repository was archived by the owner on Jul 29, 2024. It is now read-only.
stackphp
/
url-map
Public archive
Notifications
You must be signed in to change notification settings
Fork
10
Star
45
Code
Issues
1
Pull requests
0
Actions
Projects
Wiki
Security and quality
0
Insights
Additional navigation options
Code
Issues
Pull requests
Actions
Projects
Wiki
Security and quality
Insights
Expand file tree
Breadcrumbs
url-map
/
example.php
Copy path
More file actions
More file actions
Latest commit
History
History
History
28 lines (18 loc) · 542 Bytes
Breadcrumbs
url-map
/
example.php
Copy path
File metadata and controls
28 lines (18 loc) · 542 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
<?php
use
Silex
\
Application
;
use
Symfony
\
Component
\
HttpFoundation
\
Request
;
require
'
vendor/autoload.php
'
;
$
app
=
new
Silex
\
Application
();
$
app
->
get
(
'
/
'
,
function
() {
return
"
Main application!
"
;
});
$
blog
=
new
Silex
\
Application
();
$
blog
->
get
(
'
/
'
,
function
() {
return
"
This is the blog!
"
;
});
$
stack
= (
new
Stack
\
Builder
)
->
push
(
'
Stack\UrlMap
'
, [
'
/blog
'
=>
$
blog
]);
$
app
=
$
stack
->
resolve
(
$
app
);
$
request
= Request::
createFromGlobals
();
$
response
=
$
app
->
handle
(
$
request
)->
send
();
$
app
->
terminate
(
$
request
,
$
response
);
Back
|
FazBrowse Home
|
New Git URL