<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>2.3. æåã¨ãã³ãã¬ã¼ããã¡ã¤ã«</title>
<link rel="stylesheet" href="style.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.73.2">
<link rel="start" href="index.html" title="Runemaster ããã¥ã¢ã«">
<link rel="up" href="installation.html" title="第2ç« æºåã¨è¨å®">
<link rel="prev" href="runemaster.cunstruct.html" title="2.2. Runemaster ã®ã³ã³ã¹ãã©ã¯ã¿">
<link rel="next" href="variable.html" title="第3ç« ãã³ãã¬ã¼ã夿°">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<div class="navheader">
<table width="100%" summary="Navigation header">
<tr><th colspan="3" align="center">2.3. æåã¨ãã³ãã¬ã¼ããã¡ã¤ã«</th></tr>
<tr>
<td width="20%" align="left">
<a accesskey="p" href="runemaster.cunstruct.html">åã®ãã¼ã¸</a> </td>
<th width="60%" align="center">第2ç« æºåã¨è¨å®</th>
<td width="20%" align="right"> <a accesskey="n" href="variable.html">次ã®ãã¼ã¸</a>
</td>
</tr>
</table>
<hr>
</div>
<div class="section" lang="ja">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
<a name="cast.and.selection.template"></a>2.3. æåã¨ãã³ãã¬ã¼ããã¡ã¤ã«</h2></div></div></div>
<div class="section" lang="ja">
<div class="titlepage"><div><div><h3 class="title">
<a name="runemaster.cast"></a>2.3.1. æå</h3></div></div></div>
<p>
æåå¦çãè¡ãã«ã¯ãRunemaster ã¤ã³ã¹ã¿ã³ã¹ã® cast ã¡ã½ãããå®è¡ãã¾ãã
ã¾ã cast ã¡ã½ããå®è¡æã«ã¯ãæåå
容ã®ãã¼ã¹ã¨ãªããã³ãã¬ã¼ãåããããã¦æå®ãã¾ãã
</p>
<p>
ãã³ãã¬ã¼ãåã¨ã¯ããã³ãã¬ã¼ããã¼ã¿ã¨ãã¦æºåããããã¡ã¤ã«åç§°ããæ¡å¼µåãé¤ãããã®ã§ãã
ã¾ããã³ãã¬ã¼ãã®ãã¡ã¤ã«åç§°ã¯ã.htmlãæ¡å¼µåããã£ããã®ã§ãã
ï¼å¤æ´ãããã¨ãã§ãã¾ããï¼
</p>
<div class="example">
<a name="id296323"></a><p class="title"><b>ä¾ 2.2. æåå¦ç</b></p>
<div class="example-contents"><pre class="programlisting">
$master = new Rune_Master($templatesDirectory);
$master->cast('Example');
</pre></div>
</div>
<br class="example-break">
</div>
<div class="section" lang="ja">
<div class="titlepage"><div><div><h3 class="title">
<a name="template.file.selection"></a>2.3.2. ãã³ãã¬ã¼ããã¡ã¤ã«ã®æå®ã«ã¤ãã¦</h3></div></div></div>
<p>
ãããã³ãã¬ã¼ããã£ã¬ã¯ããªå
ãããã¤ãã®ãã£ã¬ã¯ããªããªã¼ã§æ§æããã¦ãã¦ããã®ããªã¼å
é¨ã®ãã³ãã¬ã¼ããã¡ã¤ã«ãæå®ãããå ´åã¯ãcast ã¡ã½ããã§ãåæ§ã«ã¹ã©ãã·ã¥ã§åºåã£ãå½¢å¼ã§è¨è¿°ãã¾ãã
</p>
<p>
ãã¨ãã°ãã³ãã¬ã¼ããã£ã¬ã¯ããªä»¥ä¸ã« myweb/items/ ã¨ããåç§°ã®ãã£ã¬ã¯ããªããããitems å
ã® list.html ã¨ãããã³ãã¬ã¼ããã¡ã¤ã«ã使ã£ã¦æåãããå ´åã¯ã次ã®ãããªã³ã¼ããè¨è¿°ãã¾ãã
</p>
<div class="example">
<a name="id296358"></a><p class="title"><b>ä¾ 2.3. 夿®µãã£ã¬ã¯ããªå
ã®ãã³ãã¬ã¼ããã¡ã¤ã«</b></p>
<div class="example-contents"><pre class="programlisting">
$master = new Rune_Master($templatesDirectory);
$master->cast('myweb/items/list');
</pre></div>
</div>
<br class="example-break">
</div>
<div class="section" lang="ja">
<div class="titlepage"><div><div><h3 class="title">
<a name="change.tempalte.suffix"></a>2.3.3. ãã³ãã¬ã¼ãæ¡å¼µåã®å¤æ´</h3></div></div></div>
<p>
åè¿°ããã¨ããããã³ãã¬ã¼ããã¼ã¿ã¯ã.htmlãã¨ããæ¡å¼µåããã£ããã¡ã¤ã«ãæºåãå©ç¨ãã¾ãã
</p>
<p>
ãããã³ãã¬ã¼ãã¨ãã¦å©ç¨ãããã¡ã¤ã«ã®æ¡å¼µåãå¥ã®ãã®ã«ãããå ´åã¯ã
setTemplateSuffix ã¡ã½ããã使ç¨ãã¾ãã
次ã®ä¾ã§ã¯ããã³ãã¬ã¼ããã.tplãã¨ããæ¡å¼µåã«å¤æ´ãå©ç¨ããããã«ãã¾ãããã®ã¨ãæåã«å©ç¨ããããã³ãã¬ã¼ããã¡ã¤ã«ã¯ãhello.tplãã«ãªãã¾ãã
</p>
<div class="example">
<a name="id296392"></a><p class="title"><b>ä¾ 2.4. ãã³ãã¬ã¼ãæ¡å¼µåãã.tplãã«å¤æ´</b></p>
<div class="example-contents"><pre class="programlisting">
$master = new Rune_Master($templatesDirectory);
$master->setTemplateSuffix('.tpl');
$master->cast('hello');
</pre></div>
</div>
<br class="example-break">
</div>
</div>
<div class="navfooter">
<hr>
<table width="100%" summary="Navigation footer">
<tr>
<td width="40%" align="left">
<a accesskey="p" href="runemaster.cunstruct.html">åã®ãã¼ã¸</a> </td>
<td width="20%" align="center"><a accesskey="u" href="installation.html">ä¸ã«æ»ã</a></td>
<td width="40%" align="right"> <a accesskey="n" href="variable.html">次ã®ãã¼ã¸</a>
</td>
</tr>
<tr>
<td width="40%" align="left" valign="top">2.2. Runemaster ã®ã³ã³ã¹ãã©ã¯ã¿Â </td>
<td width="20%" align="center"><a accesskey="h" href="index.html">ãã¼ã </a></td>
<td width="40%" align="right" valign="top"> 第3ç« ãã³ãã¬ã¼ã夿°</td>
</tr>
</table>
</div>
</body>
</html>