LoginSignup
0
0

More than 5 years have passed since last update.

hitSuji\Templateクラス

Last updated at Posted at 2015-02-04

hitSuji\Templateクラス

Web framework delivered as a C-extension for PHP

hitSuji\Templateクラス
class hitSuji\Template {
    public function layout(string $failename);
    public function content(string $failename);
    public function assigns(array $values);
    public function assign(string $key, mixed $value);
    public function display();
}

レイアウトの設定

public function layout(string $failename);

引数

名前 概要
failename string ファイル名
\hitSuji::view(
)->layout('layout.tpl');

メインコンテンツの設定

public function content(string $failename);

引数

名前 概要
failename string ファイル名
\hitSuji::view(
)->content('main.tpl');

配列の登録

public function assigns(array $values);

引数

名前 概要
values array 連想配列
\hitSuji::view(
)->assigns(array(
  'id'  => 3,
  'name'=> 'seeps',
));

変数の登録

public function assign(string $key, mixed $value);

引数

名前 概要
key string キー
value mixed 変数
\hitSuji::view(
)->assign('id', 3);

表示処理

public function display();

\hitSuji::view(
)->layout('layout.tpl'
)->display();
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0