本文整理汇总了PHP中Option::hasBeenSet方法的典型用法代码示例。如果您正苦于以下问题:PHP Option::hasBeenSet方法的具体用法?PHP Option::hasBeenSet怎么用?PHP Option::hasBeenSet使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Option
的用法示例。
在下文中一共展示了Option::hasBeenSet方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getOutput
/**
* Called after arguments have been parsed, parameters are set and validated.
*
* Returns the output as raw HTML.
*
* @return string Raw HTMl
*/
public function getOutput()
{
$output = "<div id=\"disqus_thread\" class=\"{$this->getCSSClasses()}\" style=\"";
if ($this->width->hasBeenSet()) {
$output .= "width:{$this->width->getOutput()}px;";
}
if ($this->height->hasBeenSet()) {
$output .= "height:{$this->height->getOutput()}px;";
}
$output .= "\"></div>";
$output .= "\n<script type=\"text/javascript\">";
$output .= "\nvar disqus_shortname='{$this->shortname->getOutput()}';";
if ($this->id->hasBeenSet()) {
$output .= "\nvar disqus_identifier='{$this->id->getOutput()}';";
}
$output .= "\nvar disqus_title='{$this->title->getOutput()}';";
$output .= "\nvar disqus_url='{$this->url->getOutput()}';";
if ($this->dev->hasBeenSet()) {
$output .= "\nvar disqus_developer=1;";
}
$output .= "\n(function() {\r\nvar dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;\r\ndsq.src = 'http://' + disqus_shortname + '.disqus.com/embed.js';\r\n(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);\r\n})()";
$output .= "</script>";
$output .= "<noscript>Please enable JavaScript to view the <a href=\"http://disqus.com/?ref_noscript\">comments powered by Disqus.</a></noscript>";
// $output .= "<a href=\"http://disqus.com\" class=\"dsq-brlink\">comments powered by <span class=\"logo-disqus\">Disqus</span></a>";
return $output;
}
示例2: getOutput
/**
* Called after arguments have been parsed, parameters are set and validated.
*
* Returns the output as raw HTML.
*
* @return string raw HTML
*/
public function getOutput()
{
$output = "<a class=\"FlattrButton\" style=\"display:none;\" href=\"{$this->url->getOutput()}\" title=\"{$this->title->getOutput()}\"";
if ($this->uid->hasBeenSet()) {
$output .= " data-flattr-uid=\"{$this->uid->getOutput()}\"";
}
if ($this->category->hasBeenSet()) {
$output .= " data-flattr-category=\"{$this->category->getOutput()}\"";
}
if ($this->language->hasBeenSet()) {
$output .= " data-flattr-language=\"{$this->language->getOutput()}\"";
}
if ($this->tags->hasBeenSet()) {
$output .= " data-flattr-tags=\"{$this->tags->getOutput()}\"";
}
if ($this->compact->hasBeenSet()) {
$output .= " data-flattr-button=\"compact\"";
}
if ($this->nopopout->hasBeenSet()) {
$output .= " data-flattr-popout=\"0\"";
}
if ($this->hidden->hasBeenSet()) {
$output .= " data-flattr-hidden=\"1\"";
}
$output .= ">";
$output .= $this->description->getOutput();
$output .= "</a>";
$output .= "<script type=\"text/javascript\" src=\"http://api.flattr.com/js/0.6/load.js?mode=auto\"></script>";
if ($this->left->hasBeenSet() || $this->right->hasBeenSet()) {
$output = "<div class=\"{$this->getCSSClasses()}\">{$output}</div>";
}
return $output;
}