eZ\Publish\Core\REST\Client\Values\Content\Content::__construct PHP Method

__construct() public method

Creates a new struct from the given $data array.
public __construct ( eZ\Publish\API\Repository\ContentService $contentService, array $data = [] )
$contentService eZ\Publish\API\Repository\ContentService
$data array
    public function __construct(ContentService $contentService, array $data = array())
    {
        $this->contentService = $contentService;
        foreach ($data as $propertyName => $propertyValue) {
            $this->{$propertyName} = $propertyValue;
        }
        foreach ($this->internalFields as $field) {
            $this->fields[$field->fieldDefIdentifier][$field->languageCode] = $field;
        }
    }