commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
lib
commercetools-api
src
Models
ApprovalRule
ApprovalRuleSetNameActionCollection.php
1
<?php
2
3
declare(strict_types=1);
9
namespace
Commercetools\Api\Models\ApprovalRule
;
10
11
use
Commercetools\Api\Models\ApprovalRule\ApprovalRuleUpdateActionCollection
;
12
use
Commercetools\Exception\InvalidArgumentException
;
13
use stdClass;
14
21
class
ApprovalRuleSetNameActionCollection
extends
ApprovalRuleUpdateActionCollection
22
{
30
public
function
add
($value)
31
{
32
if
(!$value instanceof
ApprovalRuleSetNameAction
) {
33
throw
new
InvalidArgumentException
();
34
}
35
$this->
store
($value);
36
37
return
$this;
38
}
39
43
protected
function
mapper
()
44
{
45
return
function
(?
int
$index): ?
ApprovalRuleSetNameAction
{
46
$data = $this->
get
($index);
47
if
($data instanceof stdClass) {
49
$data =
ApprovalRuleSetNameActionModel::of
($data);
50
$this->
set
($data, $index);
51
}
52
53
return
$data;
54
};
55
}
56
}
Commercetools\Api\Models\ApprovalRule\ApprovalRuleSetNameActionCollection
Definition:
ApprovalRuleSetNameActionCollection.php:22
Commercetools\Api\Models\ApprovalRule\ApprovalRuleSetNameActionCollection\add
add($value)
Definition:
ApprovalRuleSetNameActionCollection.php:30
Commercetools\Api\Models\ApprovalRule\ApprovalRuleUpdateActionCollection
Definition:
ApprovalRuleUpdateActionCollection.php:26
Commercetools\Base\BaseJsonObject\of
static of($data=null)
Definition:
BaseJsonObject.php:26
Commercetools\Base\MapperSequence\store
store($value)
Definition:
MapperSequence.php:106
Commercetools\Base\MapperSequence\mapper
mapper()
Commercetools\Exception\InvalidArgumentException
Definition:
InvalidArgumentException.php:15
Commercetools\Api\Models\ApprovalRule\ApprovalRuleSetNameAction
Definition:
ApprovalRuleSetNameAction.php:15
Commercetools\Api\Models\ApprovalRule
Definition:
ApprovalRule.php:9
Generated by
1.9.1