commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
lib
commercetools-api
src
Models
GraphQl
GraphQLVariablesMapModel.php
1
<?php
2
3
declare(strict_types=1);
9
namespace
Commercetools\Api\Models\GraphQl
;
10
11
use
Commercetools\Base\DateTimeImmutableCollection
;
12
use
Commercetools\Base\JsonObject
;
13
use
Commercetools\Base\JsonObjectModel
;
14
use
Commercetools\Base\MapperFactory
;
15
use stdClass;
16
20
final
class
GraphQLVariablesMapModel
extends
JsonObjectModel
implements
GraphQLVariablesMap
21
{
25
public
function
__construct
(
26
) {
27
}
28
29
30
31
35
public
function
by
(
string
$key)
36
{
37
$data = $this->
raw
($key);
38
if
(is_null($data)) {
39
return
null
;
40
}
41
if
(preg_match(
GraphQLVariablesMap::FIELD_PATTERN0
, $key) === 1) {
43
return
JsonObjectModel::of
($data);
44
}
45
46
return
$data;
47
}
48
}
Commercetools\Api\Models\GraphQl\GraphQLVariablesMapModel
Definition:
GraphQLVariablesMapModel.php:21
Commercetools\Api\Models\GraphQl\GraphQLVariablesMapModel\by
by(string $key)
Definition:
GraphQLVariablesMapModel.php:35
Commercetools\Api\Models\GraphQl\GraphQLVariablesMapModel\__construct
__construct()
Definition:
GraphQLVariablesMapModel.php:25
Commercetools\Base\BaseJsonObject\raw
raw(string $field)
Definition:
BaseJsonObject.php:57
Commercetools\Base\BaseJsonObject\of
static of($data=null)
Definition:
BaseJsonObject.php:26
Commercetools\Base\DateTimeImmutableCollection
Definition:
DateTimeImmutableCollection.php:21
Commercetools\Base\JsonObjectModel
Definition:
JsonObjectModel.php:15
Commercetools\Base\MapperFactory
Definition:
MapperFactory.php:16
Commercetools\Api\Models\GraphQl\GraphQLVariablesMap
Definition:
GraphQLVariablesMap.php:15
Commercetools\Api\Models\GraphQl\GraphQLVariablesMap\FIELD_PATTERN0
const FIELD_PATTERN0
Definition:
GraphQLVariablesMap.php:16
Commercetools\Base\JsonObject
Definition:
JsonObject.php:15
Commercetools\Api\Models\GraphQl
Definition:
GraphQLError.php:9
Generated by
1.9.1