當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Objects::equal方法代碼示例

本文整理匯總了PHP中Objects::equal方法的典型用法代碼示例。如果您正苦於以下問題:PHP Objects::equal方法的具體用法?PHP Objects::equal怎麽用?PHP Objects::equal使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Objects的用法示例。


在下文中一共展示了Objects::equal方法的7個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: equals

 /**
  * Returns whether a given value is equal to this mime part
  *
  * @param  var $cmp
  * @return bool
  */
 public function equals($cmp)
 {
     return $cmp instanceof self && $this->contenttype === $cmp->contenttype && $this->charset === $cmp->charset && $this->encoding === $cmp->encoding && $this->disposition === $cmp->disposition && $this->name === $cmp->name && $this->filename === $cmp->filename && $this->id === $cmp->id && $this->body === $cmp->body && Objects::equal($this->headers, $cmp->headers);
 }
開發者ID:melogamepay,項目名稱:xp-framework,代碼行數:10,代碼來源:MimePart.class.php

示例2: doesMatchArg

 /**
  * Indicates whether the argument on postion $pos machtes the specified
  * value.
  *
  * @param   int pos
  * @param   var value
  * @return  bool
  */
 private function doesMatchArg($pos, $value)
 {
     $argVal = $this->args[$pos];
     if ($argVal instanceof IArgumentMatcher) {
         return $argVal->matches($value);
     } else {
         return Objects::equal($argVal, $value);
     }
 }
開發者ID:melogamepay,項目名稱:xp-framework,代碼行數:17,代碼來源:Expectation.class.php

示例3: equals

 /**
  * Returns whether a given value is equal to this payload
  * 
  * @param  var cmp
  * @return bool
  */
 public function equals($cmp)
 {
     return $cmp instanceof self && Objects::equal($cmp->value, $this->value) && $this->properties === $cmp->properties;
 }
開發者ID:melogamepay,項目名稱:xp-framework,代碼行數:10,代碼來源:Payload.class.php

示例4: equals

 /**
  * Checks whether an object is equal to this DSN
  *
  * @param   lang.Generic cmp
  * @return  bool
  */
 public function equals($cmp)
 {
     return $cmp instanceof self && $cmp->getDriver() === $this->getDriver() && $cmp->getUser() === $this->getUser() && $cmp->getPassword() === $this->getPassword() && $cmp->getHost() === $this->getHost() && $cmp->getPort() === $this->getPort() && $cmp->getDatabase() === $this->getDatabase() && $cmp->flags === $this->flags && Objects::equal($cmp->prop, $this->prop);
 }
開發者ID:melogamepay,項目名稱:xp-framework,代碼行數:10,代碼來源:DSN.class.php

示例5: equals

 /** Check if is equal to other object */
 public function equals($cmp) : bool
 {
     if (!$cmp instanceof self) {
         return false;
     }
     // If based on files, and both base on the same file, then they're equal
     if (null === $this->_data && null === $cmp->_data) {
         return $this->_file === $cmp->_file;
     } else {
         return Objects::equal($this->_data, $cmp->_data);
     }
 }
開發者ID:xp-framework,項目名稱:core,代碼行數:13,代碼來源:Properties.class.php

示例6: equals

 /**
  * Returns whether a given value is equal to this Response instance
  *
  * @param  var cmp
  * @return bool
  */
 public function equals($cmp)
 {
     return $cmp instanceof self && $this->status === $cmp->status && Objects::equal($this->headers, $cmp->headers) && Objects::equal($this->cookies, $cmp->cookies);
 }
開發者ID:melogamepay,項目名稱:xp-framework,代碼行數:10,代碼來源:Output.class.php

示例7: assertNotEquals

 /**
  * Assert that two values are not equal
  *
  * @param   var expected
  * @param   var actual
  * @param   string error default 'equal'
  */
 public function assertNotEquals($expected, $actual, $error = '!equals')
 {
     if (Objects::equal($expected, $actual)) {
         $this->fail($error, $actual, $expected);
     }
 }
開發者ID:melogamepay,項目名稱:xp-framework,代碼行數:13,代碼來源:TestCase.class.php


注:本文中的Objects::equal方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。