本文整理汇总了PHP中equals函数的典型用法代码示例。如果您正苦于以下问题:PHP equals函数的具体用法?PHP equals怎么用?PHP equals使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了equals函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getDefaultDomainUrl
public static function getDefaultDomainUrl($useSSL)
{
$urlStr = GTConfig::getProperty("gexin_default_domainurl", null);
if ($urlStr == null || "" . equals(trim($urlStr))) {
if ($useSSL) {
$hosts = array("https://cncapi.getui.com/serviceex", "https://telapi.getui.com/serviceex", "https://api.getui.com/serviceex", "https://sdk1api.getui.com/serviceex", "https://sdk2api.getui.com/serviceex", "https://sdk3api.getui.com/serviceex");
} else {
$hosts = array("http://sdk.open.api.igexin.com/serviceex", "http://sdk.open.api.gepush.com/serviceex", "http://sdk.open.api.getui.net/serviceex", "http://sdk1.open.api.igexin.com/serviceex", "http://sdk2.open.api.igexin.com/serviceex", "http://sdk3.open.api.igexin.com/serviceex");
}
} else {
$list = explode(",", $urlStr);
$hosts = array();
foreach ($list as $value) {
if (strpos($value, "https://") === 0 && !$useSSL) {
continue;
}
if (strpos($value, "http://") === 0 && $useSSL) {
continue;
}
if ($useSSL && strpos($value, "http") != 0) {
$value = "https://" . $value;
}
array_push($hosts, $value);
}
}
return $hosts;
}
示例2: find
public function find($username, $start = 0, $limit = 10)
{
$queryBuilder = $this->manager->createQueryBuilder(Document\User::REPOSITORY);
$queryBuilder->limit($limit)->skip($start);
if ($username) {
$queryBuilder->field("username") . equals($username);
}
return $queryBuilder->getQuery()->execute();
}
示例3: cacheFileContainsSerializedAnnotationData
/**
* @test
*/
public function cacheFileContainsSerializedAnnotationData()
{
$annotations = new Annotations('someTarget');
AnnotationCache::put($annotations);
AnnotationCache::__shutdown();
$data = unserialize(file_get_contents(vfsStream::url('root/annotations.cache')));
assert($data, hasKey('someTarget'));
assert(unserialize($data['someTarget']), equals($annotations));
}
示例4: getDefaultDomainUrl
public static function getDefaultDomainUrl()
{
$urlStr = GTConfig::getProperty("gexin_default_domainurl", null);
if ($urlStr == null || "" . equals(trim($urlStr))) {
$hosts = array("http://sdk.open.api.igexin.com/serviceex", "http://sdk.open.api.gepush.com/serviceex", "http://sdk.open.api.getui.net/serviceex");
for ($i = 0; $i < 3; $i++) {
array_push($hosts, "http://sdk" . $i . ".open.api.igexin.com/serviceex");
}
return $hosts;
}
return explode(",", $urlStr);
}
示例5: signParams
function signParams($params, $privateKey)
{
ksort($params);
$unencoded = $encoded = "";
foreach ($params as $param => $value) {
if (!equals("debug-component", $param)) {
$unencoded .= "&" . $param . "=" . $value;
}
$encoded .= "&" . $param . "=" . rawurlencode($value);
}
$unencoded = substr($unencoded, 1);
$encoded = substr($encoded, 1);
return $encoded . "&signature=" . sha1($privateKey . "&" . $unencoded);
}
示例6: coopBuilderYResearcher
public function coopBuilderYResearcher()
{
if ($this->colaLibre($this->builder) && $this->colaLibre($this->researcher)) {
$this->builder->escanear();
$this->researcher->escanear();
$objetivo = $this->researcher->buscarObjetivos($this->builder->getEdificios());
switch ($objetivo["tipo"]) {
case "construcción":
$this->builder->construirEdificio($objetivo["edificio"]);
if (equals($objetivo["edificio"], $GLOBALS["stringLab"])) {
//Si se manda construir Laboratorio de Investigación, la cola del Researcher se sincronizará
$this->researcher->finCola = $this->builder->finCola;
}
break;
case "investigación":
$this->researcher->investigar($objetivo["investigación"]);
break;
}
}
}
示例7: menu
public function menu()
{
$menu = M("node");
$id = $_POST["id"];
if ($id == null || "" . equals($id)) {
//$list=$menu->select();
$con['level'] = array('elt', 2);
$con['ismenu'] = 1;
$list = $menu->where($con)->select();
//$list=$list["0"];attributes
//$list['info'] = 'info';
//dump($list);
//$this->ajaxReturn($list,"没有id",1);
$list = json_encode($list);
//$list.put('state','open');
echo $list;
//输出json数据
} else {
$list = $menu->where('pid=' + $id)->select();
//$this->ajaxReturn($list,"有id",1);
}
}
示例8: equals
<dd><input type="checkbox" name="banned" <?php
echo equals($update_user_data['banned'], true, ' checked ');
?>
/> <?php
echo lang('banned');
?>
</dd>
<dd><input type="checkbox" name="moderator" <?php
echo equals($update_user_data['moderator'], true, ' checked ');
?>
/> <?php
echo lang('moderator');
?>
</dd>
<dd><input type="checkbox" name="admin" <?php
echo equals($update_user_data['admin'], true, ' checked ');
?>
/> <?php
echo lang('admin');
?>
</dd>
</dl>
<dl class="input">
<dt><?php
echo lang('email');
?>
</dt>
<dd><input type="text" name="email" class="border" style="width: 40%" value="<?php
echo switchs($_POST['email'], $update_user_data['email']);
?>
"></dd>
示例9: lang
"><?php
echo lang('edit_account');
?>
</a></li>
<li><a href="<?php
echo $config['url_path'];
?>
/users.php?a=avatar" class="<?php
echo equals($action, "avatar", "menu-current", "menu");
?>
"><?php
echo lang('edit_avatar');
?>
</a></li>
<li><a href="<?php
echo $config['url_path'];
?>
/users.php?a=profile" class="<?php
echo equals($action, "profile", "menu-current", "menu");
?>
"><?php
echo lang('edit_profile');
?>
</a></li>
<?php
load_hook('user_navigation');
?>
<div class="clear"></div>
</ul>
<div class="clear"></div>
示例10: parseFromNonExistingSectionReturnsDefault
/**
* @test
* @since 5.0.0
*/
public function parseFromNonExistingSectionReturnsDefault()
{
assert($this->properties->parse('doesNotExist', 'rangeValue8'), equals(new Parse(null)));
}
示例11: equals
<dd><input type="checkbox" id="bbcode" name="bbcode" <?php
echo equals($config['bbcode'], true, ' checked ');
?>
/> <label for="bbcode"><?php
echo lang('allow_bbcode');
?>
</label></dd>
<dd><input type="checkbox" id="bbcode_url" name="bbcode_url" <?php
echo equals($config['bbcode_url'], true, ' checked ');
?>
/> <label for="bbcode_url"><?php
echo lang('allow_bbcode_url');
?>
</label></dd>
<dd><input type="checkbox" id="bbcode_image" name="bbcode_image" <?php
echo equals($config['bbcode_image'], true, ' checked ');
?>
/> <label for="bbcode_image"><?php
echo lang('allow_bbcode_img');
?>
</label></dd>
</dl>
</div>
<br clear="both" />
<h3 class="title admin"><?php
echo lang('message_settings');
?>
</h3>
示例12: isTrue
isTrue($id->increment);
isNull($id->default);
isFalse($id->nullable);
equals($id->max, PHP_INT_MAX);
isTrue($name->isString());
isFalse($name->primary);
isFalse($name->increment);
equals($name->default, "default name");
isTrue($name->nullable);
equals($name->max, 128);
isTrue($test->isString());
isFalse($test->primary);
isFalse($test->increment);
isNull($test->default);
isTrue($test->nullable);
equals($test->max, 255);
isTrue($body->isText());
isFalse($body->primary);
isFalse($body->increment);
isNull($body->default);
isFalse($body->nullable);
isTrue($bool->isBool());
isFalse($bool->primary);
isFalse($bool->increment);
isFalse($bool->default);
isTrue($bool->nullable);
isNull($hoge->ft);
isNull($hoge->dbl);
isNull($hoge->sint);
isNull($hoge->bint);
Sabel_Db_Connection::closeAll();
示例13: defaultRootpathIsAlwaysTheSame
/**
* @test
* @since 8.1.0
*/
public function defaultRootpathIsAlwaysTheSame()
{
assert(Rootpath::default(), equals(Rootpath::default()));
}
示例14: es_admin
public function es_admin()
{
return $this->Nombre . equals("admin");
}
示例15: equals
} else {
$default = $user_data['sex'];
}
}
?>
<select name="gender" class="border">
<option value="male"<?php
echo equals($default, "male", " selected", "");
?>
>Male</option>
<option value="female"<?php
echo equals($default, "female", " selected", "");
?>
>Female</option>
<option value="anonymous"<?php
echo equals($default, "anonymous", " selected", "");
?>
>Anonymous</option>
</select>
</dd>
</dl>
</td>
</tr>
<tr>
<td class="form">
<dl class="input">
<dt><?php
echo lang('msn');
?>
</dt>