Sets a new data

Data dokonania czynności

@param \KCH\PCC3\TNaglowekType\DataAnonymousType $data
@return self
551179
public function setData(\KCH\PCC3\TNaglowekType\DataAnonymousType $data)
    {
        $this->data = $data;
        return $this;
    }
520893
public function setData(array $data)
    {
        foreach ($this->getData()->toArray() as $key => $value) {
            $this->getData()->offsetUnset($key);
        }

        $this->addData($data);

        return $this;
    }
1143044
public function setDataObject($data)
    {
        if (true === is_object($data)) {
            $data = json_encode($data);
        }

        return $this->setData($data);
    }
1166295
public function setAllData($data)
    {
        array_walk(
            $data,
            function ($value, $key) {
                $this->{$key} = $value;
            }
        );

        return $this;
    }
193720
public function setData(array $data)
    {
        $this->data = $data;
        
        // Force recreation of collections and properties.
        $this->educations = null;
        $this->employments = null;
        $this->link = null;
        
        return $this;
    }
287794
public function setData(array $data)
    {
        parent::setData($data);

        $this->setChoices($this->buildChoicesFromSprite());

        return $this;
    }
1122514
public function setData($data)
    {
        foreach ($data as $key => $dtoData) {
            $this->data[$key] = new ChampionDto($dtoData);
        }
    
        return $this;
    }
564366
public function setData($data)
    {
        if ($this->getEntryType() === FileType::class) {
            $data = self::normalizeFilesArray($data);
        }

        $this->data = $data;

        return $this;
    }
1144812
public function setDefaultData(array $data)
    {
        foreach ($data as $key => $val) {
            $this->defaultData[$key] = $val;
        }

        return $this;
    }
1328800
public function setContentData(string $data): self
    {
        $this->contentData = $data;
        $this->contentLength = strlen($this->contentData);
        $extraLength = $this->contentLength % 8;
        $this->paddingLength = $extraLength ? (8 - $extraLength) : 0;
        return $this;
    }
1110102
public function set(array $data)
    {
        foreach ($data as $field => $value) {
            $this->fields[] = $field;
            $this->dataParameters[":{$field}"] = $value;
        }
        return $this;
    }
111809
public function setData($data)
    {
        foreach ($data as $field => $value) {
            $this->set($field, $value);
        }
        return $this;
    }
640577
public function setData($data)
    {
        foreach ($data as $key => $dtoData) {
            $this->data[$key] = new ProfileIconDetailsDto($dtoData);
        }
    
        return $this;
    }
130207
public function setData($data)
    {
        foreach($this->data as $args)
        {
            Event::off(...$args);
        }
        $this->data = $data;
        foreach($this->data as $args)
        {
            Event::on(...$args);
        }
    }
815565
public function set($data, $batch = false) {
        $this->data  = $data;
        $this->batch = $batch;

        return $this;
    }
528932
private function setData($data) {

		if(false === is_array($data)) {
   			return trigger_error(sprintf('Argument 1 passed to %s() must be of the type array, "%s" given', __METHOD__, gettype($data)), E_USER_ERROR);
   		}

		$this -> data = $data;
	}
388000
public function withData($data): self
    {
        $new = clone $this;
        $new->data = $data instanceof MessageData ? $data : MessageData::fromArray($data);

        return $new;
    }