Commit 1f3b737abd323c2e46b84cf4ea1361d561c3a8ae
1 parent
95805956
test new routing
Showing
2 changed files
with
57 additions
and
0 deletions
Show diff stats
app/library/App/Bootstrap/RouteBootstrap.php
| @@ -39,5 +39,13 @@ class RouteBootstrap implements BootstrapInterface | @@ -39,5 +39,13 @@ class RouteBootstrap implements BootstrapInterface | ||
| 39 | $view->setVar('documentationPath', $config->hostName . '/export/documentation.json'); | 39 | $view->setVar('documentationPath', $config->hostName . '/export/documentation.json'); |
| 40 | return $view->render('general/documentation'); | 40 | return $view->render('general/documentation'); |
| 41 | }); | 41 | }); |
| 42 | + | ||
| 43 | + $api->get('/test.html', function() use ($api) { | ||
| 44 | + | ||
| 45 | + /** @var \Phalcon\Mvc\View\Simple $view */ | ||
| 46 | + $view = $api->di->get(Services::VIEW); | ||
| 47 | + | ||
| 48 | + return $view->render('general/index'); | ||
| 49 | + }); | ||
| 42 | } | 50 | } |
| 43 | } | 51 | } |
| 44 | \ No newline at end of file | 52 | \ No newline at end of file |
| 1 | + | ||
| 2 | +<!doctype html> | ||
| 3 | +<html lang="en"> | ||
| 4 | +<head> | ||
| 5 | + <meta charset="UTF-8"> | ||
| 6 | + <title>Phalcon REST Boilerplate</title> | ||
| 7 | + <style> | ||
| 8 | + @import url(//fonts.googleapis.com/css?family=Lato:700); | ||
| 9 | + | ||
| 10 | + body { | ||
| 11 | + margin:0; | ||
| 12 | + font-family:'Lato', sans-serif; | ||
| 13 | + text-align:center; | ||
| 14 | + color: #999; | ||
| 15 | + } | ||
| 16 | + | ||
| 17 | + .welcome { | ||
| 18 | + width: 300px; | ||
| 19 | + height: 200px; | ||
| 20 | + position: absolute; | ||
| 21 | + left: 50%; | ||
| 22 | + top: 50%; | ||
| 23 | + margin-left: -150px; | ||
| 24 | + margin-top: -100px; | ||
| 25 | + } | ||
| 26 | + | ||
| 27 | + a, a:visited { | ||
| 28 | + text-decoration:none; | ||
| 29 | + } | ||
| 30 | + | ||
| 31 | + h1 { | ||
| 32 | + font-size: 32px; | ||
| 33 | + margin: 16px 0 0 0; | ||
| 34 | + } | ||
| 35 | + </style> | ||
| 36 | +</head> | ||
| 37 | +<body> | ||
| 38 | +<div class="welcome"> | ||
| 39 | + <a href="http://phalcon-rest.redound.org?itsworking" title="Phalcon REST"> | ||
| 40 | + <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> | ||
| 41 | + <svg width="100" version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" | ||
| 42 | + viewBox="0 0 16 16" enable-background="new 0 0 16 16" xml:space="preserve"> | ||
| 43 | + <path fill="#81bb5e" d="M8,0C3.6,0,0,3.6,0,8s3.6,8,8,8s8-3.6,8-8S12.4,0,8,0z M7,11L4,8l1.5-1.5L7,8l3.5-3.5L12,6L7,11z"/> | ||
| 44 | + </svg> | ||
| 45 | + </a> | ||
| 46 | + <h1>It is testing.</h1> | ||
| 47 | +</div> | ||
| 48 | +</body> | ||
| 49 | +</html> | ||
| 0 | \ No newline at end of file | 50 | \ No newline at end of file |