当前位置: 首页>>代码示例>>PHP>>正文


PHP equals函数代码示例

本文整理汇总了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;
 }
开发者ID:eyblog,项目名称:library,代码行数:27,代码来源:GTConfig.php

示例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();
 }
开发者ID:symfony-tutorial,项目名称:app,代码行数:9,代码来源:UserService.php

示例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));
 }
开发者ID:stubbles,项目名称:stubbles-reflect,代码行数:12,代码来源:AnnotationCacheTest.php

示例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);
 }
开发者ID:leidong666,项目名称:H5P.Server,代码行数:12,代码来源:GTConfig.php

示例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);
}
开发者ID:pombredanne,项目名称:ip-copyright-search,代码行数:14,代码来源:SafeCreativeAPI.inc.php

示例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;
         }
     }
 }
开发者ID:Javain,项目名称:kOGsmos,代码行数:20,代码来源:planeta.php

示例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);
     }
 }
开发者ID:putrantos,项目名称:easyui,代码行数:22,代码来源:LayoutAction.class.php

示例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>
开发者ID:nijikokun,项目名称:NinkoBB,代码行数:31,代码来源:users.php

示例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>
开发者ID:amenski,项目名称:BookSharing,代码行数:31,代码来源:navigation.php

示例10: parseFromNonExistingSectionReturnsDefault

 /**
  * @test
  * @since  5.0.0
  */
 public function parseFromNonExistingSectionReturnsDefault()
 {
     assert($this->properties->parse('doesNotExist', 'rangeValue8'), equals(new Parse(null)));
 }
开发者ID:stubbles,项目名称:stubbles-values,代码行数:8,代码来源:PropertiesTest.php

示例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>
		
开发者ID:nijikokun,项目名称:NinkoBB,代码行数:30,代码来源:settings.php

示例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();
开发者ID:reoring,项目名称:sabel,代码行数:31,代码来源:test.php

示例13: defaultRootpathIsAlwaysTheSame

 /**
  * @test
  * @since  8.1.0
  */
 public function defaultRootpathIsAlwaysTheSame()
 {
     assert(Rootpath::default(), equals(Rootpath::default()));
 }
开发者ID:stubbles,项目名称:stubbles-values,代码行数:8,代码来源:RootpathTest.php

示例14: es_admin

 public function es_admin()
 {
     return $this->Nombre . equals("admin");
 }
开发者ID:villafloresmf,项目名称:EntorGrafFinal,代码行数:4,代码来源:UsuarioLogica.php

示例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>
开发者ID:KR3W,项目名称:NinkoBB,代码行数:31,代码来源:profile.php


注:本文中的equals函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。