for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php namespace SimpleUPS\Track\SmallPackage;
/**
* @internal
*/
class Response extends \SimpleUPS\Track\Response
{
private
/* @var Shipment $shipments */
$shipments;
* @param Shipment $shipment
*
* @return Response
public function addShipment(Shipment $shipment)
if ($this->shipments === null) {
$this->shipments = array();
}
$this->shipments[] = $shipment;
return $this;
* @return Shipment[]|null
public function getShipments()
return $this->shipments;
* @param \SimpleXMLElement $xml
public function fromXml(\SimpleXMLElement $xml)
foreach ($xml->Shipment as $xml) {
$this->addShipment(Shipment::fromXml($xml));