vendor/braintree/braintree_php/lib/Braintree/Address.php
(开头部分) 4KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
<?php
namespace Braintree;
/**
* Braintree Address module
* Creates and manages Braintree Addresses
*
* An Address belongs to a Customer. It can be associated to a
* CreditCard as the billing address. It can also be used
* as the shipping address when creating a Transaction.
*
* See our {@link https://developer.paypal.com/braintree/docs/reference/response/address developer docs} for information on attributes
*/
class Address extends Base
{
/**
* returns false if comparing object is not a Address,
* or is a Address with a different id
*
* @param object $other address to compare against
*
* @return boolean
*/
public function isEqual($other)
{
return !($other instanceof self) ?
false :
($this->id === $other->id && $this->customerId === $other->customerId);
}
// phpcs:ignore PEAR.Commenting.FunctionComment.Missing
public function __toString()
{
return __CLASS__ . '[' .
Util::attributesToString($this->_attributes) . ']';
}
// phpcs:ignore PEAR.Commenting.FunctionComment.Missing
protected function _initialize($addressAttribs)
{
// set the attributes
$this->_attributes = $addressAttribs;
}
/**
* Creates an instance of an Address from given attributes
*
* @param array $attributes response object attributes
*
* @return Address
*/
public static function factory($attributes)
{
$instance = new self();
$instance->_initialize($attributes);
return $instance;
}
/**
后面还有 95 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明
AI 解读
登录后可用,每次 10 积分,解读结果公开显示在下面。
还没有人解读过这个文件。
