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:
japatel
2014-10-06 11:16:47 -05:00
parent bb7654b0b8
commit 49b80f76af
150 changed files with 10975 additions and 6525 deletions

View File

@@ -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