本文整理汇总了PHP中H::setContents方法的典型用法代码示例。如果您正苦于以下问题:PHP H::setContents方法的具体用法?PHP H::setContents怎么用?PHP H::setContents使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类H
的用法示例。
在下文中一共展示了H::setContents方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: A
<?php
$a = new A("Link", "http://www.google.com", array("style" => "color:blue"));
echo $a;
$h1 = new H("1", "This is a h1");
$h2 = new H("2", "This is a h2");
echo $h1 . $h2;
$hr = new HR();
$h1->setContents("This is the new contents");
echo $hr . $h1 . $h2;
$p = new P();
$br = new BR();
$p->setContents("This is some {$br} contents");
echo $p;
$comment = new Comment("This is commented out");
echo $comment;
$img = new Img("https://i.ytimg.com/vi/KY4IzMcjX3Y/maxresdefault.jpg", "This is a dog", array("width" => "100", "height" => "100"));
echo $img;
$table = new Table();
$table->columns(array("col1", "col2", "col3"));
$table->addRow(array("data col1", "data col2", "data col3"));
echo $table;
$list = new BootstrapList();
$list->addLi("item 1")->addLi("item 2");
echo $list;
$div = new Div();
$div->setContents($p . $img);
echo $div;
$span = new Span();
$span->setContents("This is a span");
$div->setContents($span->setContents("This is some new content"));