forked from LiveCarta/PayPal-PHP-SDK
Removing Dependency from SDK Core Project
- Copied files required for Rest API SDK - Removed PPApiContext and directly connected APIContext with PPConfigManager - Removed duplicate data storage of configuration and credentials. - Code Style Fixes - Remove build.xml file as it is not required anymore - Updated the samples - Updated the documentations
This commit is contained in:
@@ -17,14 +17,16 @@ class ItemList extends PPModel
|
||||
/**
|
||||
* Construct an empty list.
|
||||
*/
|
||||
function __construct() {
|
||||
function __construct()
|
||||
{
|
||||
$this->items = array();
|
||||
}
|
||||
|
||||
/**
|
||||
/**
|
||||
* Is this list empty?
|
||||
*/
|
||||
public function isEmpty() {
|
||||
public function isEmpty()
|
||||
{
|
||||
return empty($this->items);
|
||||
}
|
||||
|
||||
@@ -67,26 +69,30 @@ class ItemList extends PPModel
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Append an item to the list.
|
||||
* @return PayPal\Api\Item
|
||||
*/
|
||||
public function addItem($item) {
|
||||
return $this->setItems(
|
||||
array_merge($this->items, array($item))
|
||||
);
|
||||
}
|
||||
/**
|
||||
* Append an item to the list.
|
||||
*
|
||||
* @return PayPal\Api\Item
|
||||
*/
|
||||
public function addItem($item)
|
||||
{
|
||||
return $this->setItems(
|
||||
array_merge($this->items, array($item))
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove an item from the list.
|
||||
* Items are compared using === comparision (PHP.net)
|
||||
* @return PayPal\Api\Item
|
||||
*/
|
||||
public function removeItem($item) {
|
||||
return $this->setItems(
|
||||
array_diff($this->items, array($item))
|
||||
);
|
||||
}
|
||||
/**
|
||||
* Remove an item from the list.
|
||||
* Items are compared using === comparision (PHP.net)
|
||||
*
|
||||
* @return PayPal\Api\Item
|
||||
*/
|
||||
public function removeItem($item)
|
||||
{
|
||||
return $this->setItems(
|
||||
array_diff($this->items, array($item))
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get Shipping Address
|
||||
|
||||
Reference in New Issue
Block a user