本文整理汇总了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);
}
示例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);
}
}
示例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;
}
示例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);
}
示例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);
}
}
示例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);
}
示例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);
}
}