Yosymfony\Spress\Core\DataSource\Item::__construct PHP Method

__construct() public method

Constructor.
public __construct ( string $content, string $id, array $attributes = [], boolean $isBinary = false, $type = self::TYPE_ITEM )
$content string
$id string
$attributes array
$isBinary boolean
    public function __construct($content, $id, array $attributes = [], $isBinary = false, $type = self::TYPE_ITEM)
    {
        $this->snapshot = [];
        $this->pathSnapshot = [];
        $this->attributes = [];
        $this->setContent($content, self::SNAPSHOT_RAW);
        $this->setAttributes($attributes);
        $this->setCollection('pages');
        $this->setId($id);
        $this->type = $type;
        $this->isBinary = $isBinary;
        $this->relationshipCollection = new RelationshipCollection();
    }