本文整理匯總了PHP中Tpl::compile方法的典型用法代碼示例。如果您正苦於以下問題:PHP Tpl::compile方法的具體用法?PHP Tpl::compile怎麽用?PHP Tpl::compile使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Tpl
的用法示例。
在下文中一共展示了Tpl::compile方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: doParse
private static function doParse($source)
{
$data = self::parseTopic($source);
$content = Tpl::compile("freemind/freemind.xml", array('topic' => $data));
$savepath = self::getSavePath();
$filepath = $savepath . '/' . $data['meta']['id'] . '.mm';
file_put_contents($filepath, $content);
return $filepath;
}
示例2: doParse
private static function doParse($source)
{
// 附件
$attachments = array();
$data = array('meta' => self::generateMeta(), 'topic' => self::parseTopic($source, $attachments));
$content = Tpl::compile("xmind/content.xml", $data);
$meta = Tpl::compile("xmind/meta.xml");
$revisionsData = self::getRevisionsData();
$revisions = Tpl::compile("xmind/revisions.xml", array('meta' => $data['meta'], 'revisions' => $revisionsData));
$rev = Tpl::compile("xmind/rev.xml", $data);
$manifest = Tpl::compile("xmind/manifest.xml", array('meta' => $data['meta'], 'revisions' => $revisionsData, 'attachments' => $attachments));
$path = self::write($data['meta'], array('content' => $content, 'meta' => $meta, 'revisions' => $revisions, 'rev' => $rev, 'manifest' => $manifest, 'attachments' => $attachments));
$archivePath = Ziper::compress($path);
return self::move($data['meta'], $archivePath);
}