SoapClient large refactoring & tests update
This commit is contained in:
36
src/BeSimple/SoapBundle/Soap/SoapAttachmentList.php
Normal file
36
src/BeSimple/SoapBundle/Soap/SoapAttachmentList.php
Normal file
@ -0,0 +1,36 @@
|
||||
<?php
|
||||
|
||||
namespace BeSimple\SoapBundle\Soap;
|
||||
|
||||
class SoapAttachmentList
|
||||
{
|
||||
private $soapAttachments;
|
||||
|
||||
/**
|
||||
* @param SoapAttachment[] $soapAttachments
|
||||
*/
|
||||
public function __construct(array $soapAttachments = [])
|
||||
{
|
||||
$this->soapAttachments = $soapAttachments;
|
||||
}
|
||||
|
||||
public function hasSoapAttachments()
|
||||
{
|
||||
return $this->soapAttachments !== null && count($this->soapAttachments) > 0;
|
||||
}
|
||||
|
||||
public function getSoapAttachments()
|
||||
{
|
||||
return $this->soapAttachments;
|
||||
}
|
||||
|
||||
public function getSoapAttachmentIds()
|
||||
{
|
||||
$ids = [];
|
||||
foreach ($this->getSoapAttachments() as $soapAttachment) {
|
||||
$ids[] = $soapAttachment->getId();
|
||||
}
|
||||
|
||||
return $ids;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user