1
0
mirror of https://github.com/dannyvankooten/AltoRouter.git synced 2025-08-10 10:24:32 +02:00

fix internal links

This commit is contained in:
Danny van Kooten
2023-10-09 20:14:26 +02:00
parent 034b84533b
commit 6bd61a7a04
5 changed files with 24 additions and 24 deletions

View File

@@ -4,7 +4,7 @@ layout: default
--- ---
<h1> <h1>
<small>Using AltoRouter</small> <small>Using AltoRouter</small>
Installation Installation
</h1> </h1>
@@ -37,7 +37,7 @@ php composer.phar install
require 'vendor/autoload.php'; require 'vendor/autoload.php';
{% endhighlight %} {% endhighlight %}
<p>You are now ready to use the <code>AltoRouter</code> class. <a href="/usage/rewrite-requests.html">Rewrite all requests to your application file</a> and start <a href="/usage/mapping-routes.html">mapping your routes</a>. </p> <p>You are now ready to use the <code>AltoRouter</code> class. <a href="{{ '/usage/rewrite-requests.html' | relative_url }}">Rewrite all requests to your application file</a> and start <a href="/usage/mapping-routes.html">mapping your routes</a>. </p>
<h2 class="subtitle">Install AltoRouter manually</h2> <h2 class="subtitle">Install AltoRouter manually</h2>
<p>Just <a href="https://github.com/dannyvankooten/AltoRouter/zipball/master">download the AltoRouter class</a> and require it in your application file.</p> <p>Just <a href="https://github.com/dannyvankooten/AltoRouter/zipball/master">download the AltoRouter class</a> and require it in your application file.</p>
@@ -47,6 +47,6 @@ require 'AltoRouter.php';
{% endhighlight %} {% endhighlight %}
<p> <p>
<a style="float:right;" href="/usage/rewrite-requests.html">Rewrite requests &raquo;</a> <a style="float:right;" href="{{ '/usage/rewrite-requests.html' | relative_url }}">Rewrite requests &raquo;</a>
<br style="clear:both;"> <br style="clear:both;">
</p> </p>

View File

@@ -3,11 +3,11 @@ title: "Mapping routes using AltoRouter"
layout: default layout: default
--- ---
<h1> <h1>
<small>Using AltoRouter</small> <small>Using AltoRouter</small>
Mapping Routes Mapping Routes
</h1> </h1>
<p>By now, you should have <a href="/usage/rewrite-requests.html">rewritten al requests to be handled by a single file in which you created an AltoRouter instance.</a></p> <p>By now, you should have <a href="{{ '/usage/rewrite-requests.html' | relative_url }}">rewritten al requests to be handled by a single file in which you created an AltoRouter instance.</a></p>
<p>To map your routes, use the <code>map()</code> method. The following example maps all <code>GET /</code> requests.</p> <p>To map your routes, use the <code>map()</code> method. The following example maps all <code>GET /</code> requests.</p>
{% highlight php startinline %} {% highlight php startinline %}
@@ -129,7 +129,7 @@ $router->addMatchTypes(array('cId' => '[a-zA-Z]{2}[0-9](?:_[0-9]++)?'));
<p>Once your routes are all mapped you can start matching requests and continue processing the request.</p> <p>Once your routes are all mapped you can start matching requests and continue processing the request.</p>
<p> <p>
<a style="float:left;" href="/usage/rewrite-requests.html">&laquo; Rewriting requests</a> <a style="float:left;" href="{{ '/usage/rewrite-requests.html' | relative_url }}">&laquo; Rewriting requests</a>
<a style="float:right;" href="/usage/matching-requests.html">Matching requests &raquo;</a> <a style="float:right;" href="{{ '/usage/matching-requests.html' | relative_url }}">Matching requests &raquo;</a>
<br style="clear:both;"> <br style="clear:both;">
</p> </p>

View File

@@ -3,7 +3,7 @@ title: Matching requests using AltoRouter
layout: default layout: default
--- ---
<h1> <h1>
<small>Using AltoRouter</small> <small>Using AltoRouter</small>
Matching Requests Matching Requests
</h1> </h1>
@@ -40,10 +40,10 @@ $router->map( 'GET', '/', function() { .. }, 'home' );
$match = $router->match(); $match = $router->match();
/* /*
array(3) { array(3) {
["target"] => object(Closure)#2 (0) { } ["target"] => object(Closure)#2 (0) { }
["params"] => array(0) { } ["params"] => array(0) { }
["name"] => 'home' ["name"] => 'home'
} }
*/ */
{% endhighlight %} {% endhighlight %}
@@ -51,7 +51,7 @@ array(3) {
<p>AltoRouter does not process the request for you, you are free to use the method you prefer. Here is a simplified example <a href="/usage/processing-requests.html">how to process requests using closures</a> though.</p> <p>AltoRouter does not process the request for you, you are free to use the method you prefer. Here is a simplified example <a href="/usage/processing-requests.html">how to process requests using closures</a> though.</p>
<p> <p>
<a style="float:left;" href="/usage/mapping-routes.html">&laquo; Mapping routes</a> <a style="float:left;" href="{{ '/usage/mapping-routes.html' | relative_url }}">&laquo; Mapping routes</a>
<a style="float:right;" href="/usage/processing-requests.html">Processing requests &raquo;</a> <a style="float:right;" href="{{ '/usage/processing-requests.html' | relative_url }}">Processing requests &raquo;</a>
<br style="clear:both;"> <br style="clear:both;">
</p> </p>

View File

@@ -3,7 +3,7 @@ title: Processing requests using AltoRouter
layout: default layout: default
--- ---
<h1> <h1>
<small>Using AltoRouter</small> <small>Using AltoRouter</small>
Processing Requests Processing Requests
</h1> </h1>
@@ -27,7 +27,7 @@ $match = $router->match();
// call closure or throw 404 status // call closure or throw 404 status
if( is_array($match) && is_callable( $match['target'] ) ) { if( is_array($match) && is_callable( $match['target'] ) ) {
call_user_func_array( $match['target'], $match['params'] ); call_user_func_array( $match['target'], $match['params'] );
} else { } else {
// no route was matched // no route was matched
header( $_SERVER["SERVER_PROTOCOL"] . ' 404 Not Found'); header( $_SERVER["SERVER_PROTOCOL"] . ' 404 Not Found');
@@ -35,6 +35,6 @@ if( is_array($match) && is_callable( $match['target'] ) ) {
{% endhighlight %} {% endhighlight %}
<p> <p>
<a style="float:left;" href="/usage/matching-requests.html">&laquo; Matching requests</a> <a style="float:left;" href="{{ '/usage/matching-requests.html' | relative_url }}">&laquo; Matching requests</a>
<br style="clear:both;"> <br style="clear:both;">
</p> </p>

View File

@@ -3,7 +3,7 @@ title: "Rewrite all requests to AltoRouter"
layout: default layout: default
--- ---
<h1> <h1>
<small>Using AltoRouter</small> <small>Using AltoRouter</small>
Rewrite all requests to AltoRouter Rewrite all requests to AltoRouter
</h1> </h1>
@@ -34,10 +34,10 @@ $router = new AltoRouter();
$router->setBasePath('/alto-app/'); $router->setBasePath('/alto-app/');
{% endhighlight %} {% endhighlight %}
<p>You are now ready to start <a href="/usage/mapping-routes.html">mapping your routes</a>.</p> <p>You are now ready to start <a href="{{ '/usage/mapping-routes.html' | relative_url }}">mapping your routes</a>.</p>
<p> <p>
<a style="float:left;" href="/usage/install.html">&laquo; Installing AltoRouter</a> <a style="float:left;" href="{{ '/usage/install.html' | relative_url }}">&laquo; Installing AltoRouter</a>
<a style="float:right;" href="/usage/mapping-routes.html">Mapping routes &raquo;</a> <a style="float:right;" href="{{ '/usage/mapping-routes.html' | relative_url }}">Mapping routes &raquo;</a>
<br style="clear:both;"> <br style="clear:both;">
</p> </p>