phpdoc/Library/Helper/ConditionalComment.html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="robots" content="index, follow, all" />
<title>Library\Helper\ConditionalComment | Library</title>
<link rel="stylesheet" type="text/css" href="../../css/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="../../css/bootstrap-theme.min.css">
<link rel="stylesheet" type="text/css" href="../../css/sami.css">
<script src="../../js/jquery-1.11.1.min.js"></script>
<script src="../../js/bootstrap.min.js"></script>
<script src="../../js/typeahead.min.js"></script>
<script src="../../sami.js"></script>
<meta name="MobileOptimized" content="width">
<meta name="HandheldFriendly" content="true">
<meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1">
</head>
<body id="class" data-name="class:Library_Helper_ConditionalComment" data-root-path="../../">
<div id="content">
<div id="left-column">
<div id="control-panel">
<form id="search-form" action="../../search.html" method="GET">
<span class="glyphicon glyphicon-search"></span>
<input name="search"
class="typeahead form-control"
type="search"
placeholder="Search">
</form>
</div>
<div id="api-tree"></div>
</div>
<div id="right-column">
<nav id="site-nav" class="navbar navbar-default" role="navigation">
<div class="container-fluid">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#navbar-elements">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="../../index.html">Library</a>
</div>
<div class="collapse navbar-collapse" id="navbar-elements">
<ul class="nav navbar-nav">
<li><a href="../../classes.html">Classes</a></li>
<li><a href="../../namespaces.html">Namespaces</a></li>
<li><a href="../../interfaces.html">Interfaces</a></li>
<li><a href="../../traits.html">Traits</a></li>
<li><a href="../../doc-index.html">Index</a></li>
<li><a href="../../search.html">Search</a></li>
</ul>
</div>
</div>
</nav>
<div class="namespace-breadcrumbs">
<ol class="breadcrumb">
<li><span class="label label-default">class</span></li>
<li><a href="../../Library.html">Library</a></li>
<li><a href="../../Library/Helper.html">Helper</a></li>
<li>ConditionalComment</li>
</ol>
</div>
<div id="page-content">
<div class="page-header">
<h1>ConditionalComment</h1>
</div>
<p> class
<strong>ConditionalComment</strong>
</p>
<div class="description">
<p>Internet Explorer conditional HTML comment</p> <p>As for all helpers, all methods are statics.</p>
<p>For convenience, the best practice is to use:</p>
<pre><code>use Library\Helper\ConditionalComment as ConditionalCommentHelper;
// or
use Library\Helper\ConditionalComment as CCHelper;
</code></pre>
</p> </div>
<h2>Properties</h2>
<table class="table table-condensed">
<tr>
<td class="type" id="property_condition_shortcuts">
static
</td>
<td>$condition_shortcuts</td>
<td class="last">Shortcuts to use in conditions</td>
<td></td>
</tr>
<tr>
<td class="type" id="property_operator_shortcuts">
static
</td>
<td>$operator_shortcuts</td>
<td class="last">Operators to use in conditions</td>
<td></td>
</tr>
<tr>
<td class="type" id="property_conditional_item">
static
</td>
<td>$conditional_item</td>
<td class="last">
</td>
<td></td>
</tr>
<tr>
<td class="type" id="property_internet_explorer">
static
</td>
<td>$internet_explorer</td>
<td class="last">
</td>
<td></td>
</tr>
</table>
<h2>Methods</h2>
<div class="container-fluid underlined">
<div class="row">
<div class="col-md-2 type">
static
string
</div>
<div class="col-md-8 type">
<a href="#method_buildCondition">buildCondition</a>($content, $condition = 'if IE', $operator = 'OR', $global = false)
<p>Build an HTML condition string for Internet Explorer around content</p> </div>
<div class="col-md-2"></div>
</div>
<div class="row">
<div class="col-md-2 type">
static
string
</div>
<div class="col-md-8 type">
<a href="#method_writeCondition">writeCondition</a>(
string $content,
string $condition = null,
bool $global = false)
<p>Write an HTML condition for Internet Explorer around content</p> </div>
<div class="col-md-2"></div>
</div>
<div class="row">
<div class="col-md-2 type">
static
string
</div>
<div class="col-md-8 type">
<a href="#method_parseSingleCondition">parseSingleCondition</a>(
string $condition)
<p>Parse a single condition item replacing shortcuts</p> </div>
<div class="col-md-2"></div>
</div>
</div>
<h2>Details</h2>
<div id="method-details">
<div class="method-item">
<h3 id="method_buildCondition">
<div class="location">at line 88</div>
<code> static
string
<strong>buildCondition</strong>($content, $condition = 'if IE', $operator = 'OR', $global = false)</code>
</h3>
<div class="details">
<div class="method-description">
<p>Build an HTML condition string for Internet Explorer around content</p> <p>Condition can be an array of conditions, that will be related with the operator.</p>
<p>Each condition can be written like ">=5" for instance, to define a condition
for IE "greater than or equal to" version 5.</p> </div>
<div class="tags">
<h4>Parameters</h4>
<table class="table table-condensed">
<tr>
<td></td>
<td>$content</td>
<td>
</td>
</tr>
<tr>
<td></td>
<td>$condition</td>
<td>
</td>
</tr>
<tr>
<td></td>
<td>$operator</td>
<td>
</td>
</tr>
<tr>
<td></td>
<td>$global</td>
<td>
</td>
</tr>
</table>
<h4>Return Value</h4>
<table class="table table-condensed">
<tr>
<td>
string</td>
<td>
</td>
</tr>
</table>
</div>
</div>
</div>
<div class="method-item">
<h3 id="method_writeCondition">
<div class="location">at line 120</div>
<code> static
string
<strong>writeCondition</strong>(
string $content,
string $condition = null,
bool $global = false)</code>
</h3>
<div class="details">
<div class="method-description">
<p>Write an HTML condition for Internet Explorer around content</p> </div>
<div class="tags">
<h4>Parameters</h4>
<table class="table table-condensed">
<tr>
<td>
string</td>
<td>$content</td>
<td>
</td>
</tr>
<tr>
<td>
string</td>
<td>$condition</td>
<td>
</td>
</tr>
<tr>
<td>
bool</td>
<td>$global</td>
<td>May the content be also defined globally</td>
</tr>
</table>
<h4>Return Value</h4>
<table class="table table-condensed">
<tr>
<td>
string</td>
<td>
</td>
</tr>
</table>
</div>
</div>
</div>
<div class="method-item">
<h3 id="method_parseSingleCondition">
<div class="location">at line 144</div>
<code> static
string
<strong>parseSingleCondition</strong>(
string $condition)</code>
</h3>
<div class="details">
<div class="method-description">
<p>Parse a single condition item replacing shortcuts</p> <p>To build a final multi-items condition string, pass to this function a string like
"AND ..." which will render "&(...)".
To build a NOT condition string, pass to this function a string like
"NOT ..." which will render "!(...)".</p> </div>
<div class="tags">
<h4>Parameters</h4>
<table class="table table-condensed">
<tr>
<td>
string</td>
<td>$condition</td>
<td>
</td>
</tr>
</table>
<h4>Return Value</h4>
<table class="table table-condensed">
<tr>
<td>
string</td>
<td>
</td>
</tr>
</table>
</div>
</div>
</div>
</div>
</div>
<div id="footer">
Generated by <a href="http://sami.sensiolabs.org/">Sami, the API Documentation Generator</a>.
</div>
</div>
</div>
</body>
</html>