for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
declare(strict_types=1);
namespace POData\ObjectModel;
/**
* Class ODataBagContent
* Represents value of a bag (collection) property. Bag can be of two types:
* (1) Primitive Bag
* (2) Complex Bag.
*/
class ODataBagContent
{
* The type name of the element.
*
* @var string|null
private $type;
* Represents elements of the bag.
* @var string[]|ODataPropertyContent[]|null
private $propertyContents = [];
* ODataBagContent constructor.
* @param string $type
* @param ODataPropertyContent[]|string[] $propertyContents
public function __construct(string $type = null, array $propertyContents = null)
$this
->setType($type)
->setPropertyContents($propertyContents);
}
* @return string|null
public function getType(): ?string
return $this->type;
* @param string|null $type
* @return ODataBagContent
public function setType(?string $type): ODataBagContent
$this->type = $type;
return $this;
* @return ODataPropertyContent[]|string[]
public function getPropertyContents(): ?array
return $this->propertyContents;
public function setPropertyContents(?array $propertyContents): ODataBagContent
$this->propertyContents = $propertyContents;
public function addPropertyContent($propertyContent)
$this->propertyContents[] = $propertyContent;