当前位置: 首页>>代码示例>>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;未经允许,请勿转载。