2008-02-26から1日間の記事一覧

フレームワークを考える(Pops:仮称)@PHP

テンプレート側、フレームワークを使う側の末端のIFはこんな感じ x->merge('x.php') ->y->merge('y.php') ->obStart()?> <html><head></head><title></title> <body> <ul id="for:x;name:x-ul"> <li id="var:x.name;attr:class=x.class"></li> </ul> <span id="overload:x-ul"></span> </body></html> テンプレートとコンテキストの…

PHP一枚でもテンプレート

merge('x','x.php') ->merge('y','y.php') ->obStart()?> <html><head></head><title></title> <body> <ul id="for:x"> <li id="var:x.name;attr:class=x.class"></li> </ul> </body></html> こんな感じ。ob_startでHTMLの出力をバッファリングして Templateのインスタンスがdestructされる際にバッファリングからHTMLを 取得…