diff options
author | Ivan Enderlin <ivan.enderlin@hoa-project.net> | 2015-01-23 19:27:33 +0100 |
---|---|---|
committer | Ivan Enderlin <ivan.enderlin@hoa-project.net> | 2015-01-23 19:27:33 +0100 |
commit | 791af4a325187e979d6a7c56b3af3bb441235be1 (patch) | |
tree | 5c334e205b4b24710db67c0acab613855ae95845 | |
parent | 447262d9b71cdc0e7f92745a651829478c8b5eb9 (diff) | |
parent | c22dab76f4d1264bacd86c6468494f7442610d23 (diff) | |
download | View-791af4a325187e979d6a7c56b3af3bb441235be1.zip View-791af4a325187e979d6a7c56b3af3bb441235be1.tar.gz View-791af4a325187e979d6a7c56b3af3bb441235be1.tar.bz2 |
Merge branch 'doc' into incoming
-rw-r--r-- | Documentation/En/Index.xyl | 8 | ||||
-rw-r--r-- | Documentation/Fr/Index.xyl | 19 |
2 files changed, 14 insertions, 13 deletions
diff --git a/Documentation/En/Index.xyl b/Documentation/En/Index.xyl index 83ee80f..f624dc6 100644 --- a/Documentation/En/Index.xyl +++ b/Documentation/En/Index.xyl @@ -48,16 +48,16 @@ for each method:</p> <ul> <li><code>getData</code> should preferably return a - <code>Hoa\Core\Data</code> object (see <a href="@lh:chapter=Core">the + <code>Hoa\Core\Data</code> object (see <a href="@hack:chapter=Core">the <code>Hoa\Core</code> library</a>); nevertheless, it is possible to return any kind of objects,</li> <li><code>getRouter</code> must return a router of kind - <code>Hoa\Router\Router</code> (see <a href="@lh:chapter=Router">the + <code>Hoa\Router\Router</code> (see <a href="@hack:chapter=Router">the <code>Hoa\Router</code> library</a>),</li> <li><code>render</code> returns a void value,</li> <li><code>getOutputStream</code> must return a stream implementing the <code>Hoa\Stream\IStream\Out</code> interface (see - <a href="@lh:chapter=Stream">the <code>Hoa\Stream</code> library</a>); it + <a href="@hack:chapter=Stream">the <code>Hoa\Stream</code> library</a>); it can be a file, a string, an HTTP response…</li> </ul> <p>Even if this approach may seem simplistic at first sight, this interface @@ -66,7 +66,7 @@ <h2 id="Example" for="main-toc">Example</h2> - <p><a href="@lh:chapter=Xyl">The <code>Hoa\Xyl</code> library</a> uses + <p><a href="@hack:chapter=Xyl">The <code>Hoa\Xyl</code> library</a> uses <code>Hoa\View\Viewable</code>, but it is a little bit complex for a first example (which must not prevent you to take a look at it!). That's why we are going to give a more simple and basic example.</p> diff --git a/Documentation/Fr/Index.xyl b/Documentation/Fr/Index.xyl index 032872d..127d7fa 100644 --- a/Documentation/Fr/Index.xyl +++ b/Documentation/Fr/Index.xyl @@ -50,17 +50,18 @@ chacune de ces méthodes :</p> <ul> <li><code>getData</code> doit préférablement retourner un objet - <code>Hoa\Core\Data</code> (voir <a href="@lh:chapter=Core">la bibliothèque - <code>Hoa\Core</code></a>) ; il est néanmoins possible de retourner un objet - quelconque ;</li> + <code>Hoa\Core\Data</code> (voir <a href="@hack:chapter=Core">la + bibliothèque <code>Hoa\Core</code></a>) ; il est néanmoins possible de + retourner un objet quelconque ;</li> <li><code>getRouter</code> doit retourner un routeur de type - <code>Hoa\Router\Router</code> (voir <a href="@lh:chapter=Router">la + <code>Hoa\Router\Router</code> (voir <a href="@hack:chapter=Router">la bibliothèque <code>Hoa\Router</code></a>) ;</li> <li><code>render</code> ne doit rien retourner ;</li> <li><code>getOutputStream</code> doit retourner un flux implémentant l'interface <code>Hoa\Stream\IStream\Out</code> (voir - <a href="@lh:chapter=Stream">la bibliothèque <code>Hoa\Stream</code></a>) ; - ça peut être un fichier, une chaîne de caractères, une réponse HTTP…</li> + <a href="@hack:chapter=Stream">la bibliothèque + <code>Hoa\Stream</code></a>) ; ça peut être un fichier, une chaîne de + caractères, une réponse HTTP…</li> </ul> <p>Même si cette approche peut sembler simpliste au premier abord, cette interface couvre l'ensemble des besoins, et vous permet d'écrire la vue que @@ -68,7 +69,7 @@ <h2 id="Example" for="main-toc">Exemple</h2> - <p><a href="@lh:chapter=Xyl">La bibliothèque <code>Hoa\Xyl</code></a> + <p><a href="@hack:chapter=Xyl">La bibliothèque <code>Hoa\Xyl</code></a> utilise <code>Hoa\View\Viewable</code>, mais elle est un peu complexe pour servir de premier exemple (ce qui ne vous empêche pas d'aller y jeter un œil !). C'est pourquoi nous allons donner un exemple plus simple et @@ -82,8 +83,8 @@ <li>les données seront <strong>isolées</strong>, ce qui veut dire qu'une vue n'aura pas accès aux données d'une autre vue ;</li> <li>nos données seront basées sur - <a href="http://php.net/reserved.classes">la classe <code>StdClass</code></a> - pour plus de simplicité.</li> + <a href="http://php.net/reserved.classes">la classe + <code>StdClass</code></a> pour plus de simplicité.</li> </ul> <p>Commençons par écrire la classe <code>SuperView</code> :</p> <pre data-line="44"><code class="language-php">class SuperView implements Hoa\View\Viewable { |