populate

@param array $data
@param array $ignore

@return void
176990
public function populate(array $data = [], array $ignore = ['createdByUserId', 'createdDate', 'createdReason'])
    {
        if (!empty($data['iso3']) && !in_array('iso3', $ignore)) {
            $this->setIso3($data['iso3']);
        }
        if (!empty($data['iso2']) && !in_array('iso2', $ignore)) {
            $this->setIso2($data['iso2']);
        }
        if (!empty($data['countryName']) && !in_array('countryName', $ignore)) {
            $this->setCountryName($data['countryName']);
        }
    }
995045
public function populateFromObject(
        ApiPopulatableInterface $object,
        array $ignore = []
    ) {
        if ($object instanceof Domain) {
            $this->populate($object->toArray(['additionalDomains']), $ignore);
        }
    }
877235
public function toArray($ignore = [])
    {
        $data = parent::toArray($ignore);

        if (!in_array('iso639_1', $ignore)) {
            $data['iso639_1'] = $this->getIso6391();
        }
        if (!in_array('iso639_2b', $ignore)) {
            $data['iso639_2b'] = $this->getIso6392b();
        }
        if (!in_array('iso639_2t', $ignore)) {
            $data['iso639_2t'] = $this->getIso6392t();
        }

        return $data;
    }
814162
public function populateFromObject(
        ApiPopulatableInterface $object,
        array $ignore = []
    ) {
        if ($object instanceof Page) {
            $this->populate($object->toArray(), $ignore);
        }
    }
329203
public function populate($data = array())
    {
        if (isset($data['answer']) && $data['answer'] !== null) {
            $this->answer = $data['answer'];
        }

        if (isset($data['explanation']) && $data['explanation'] !== null) {
            $this->explanation = $data['explanation'];
        }

        if (isset($data['jsonData']) && $data['jsonData'] !== null) {
            $this->jsonData = $data['jsonData'];
        }

        if (isset($data['type']) && $data['type'] !== null) {
            $this->type = $data['type'];
        }

        if (isset($data['position']) && $data['position'] !== null) {
            $this->position = $data['position'];
        }

        if (isset($data['image']) && $data['image'] !== null) {
            $this->image = $data['image'];
        }

        if (isset($data['video']) && $data['video'] !== null) {
            $this->video = $data['video'];
        }

        if (isset($data['points']) && $data['points'] !== null) {
            $this->points = $data['points'];
        }

        if (isset($data['correct']) && $data['correct'] !== null) {
            $this->correct = $data['correct'];
        }
    }
1153987
public function toArray($ignoreEmpty = false)
    {
        if (!$ignoreEmpty) {
            return $this->data;
        }

        return array_filter(
            $this->data,
            function ($value) {
                return !empty($value);
            }
        );
    }
646863
public function populate($data = array())
    {
        if (isset($data['name']) && $data['name'] != null) {
            $this->name = $data['name'];
        }

        if (isset($data['active']) && $data['active'] != null) {
            $this->active = $data['active'];
        }

        if (isset($data['bouncePage']) && $data['bouncePage'] != null) {
            $this->bouncePage = $data['bouncePage'];
        }

        if (isset($data['logo']) && $data['logo'] != null) {
            $this->logo = $data['logo'];
        }

        if (isset($data['smallLogo']) && $data['smallLogo'] != null) {
            $this->smallLogo = $data['smallLogo'];
        }

        if (isset($data['website']) && $data['website'] != null) {
            $this->website = $data['website'];
        }

        if (isset($data['facebook']) && $data['facebook'] != null) {
            $this->facebook = $data['facebook'];
        }

        if (isset($data['newsletter']) && $data['newsletter'] != null) {
            $this->newsletter = $data['newsletter'];
        }
    }
928646
public function populate($data = array())
    {
        if (isset($data['title']) && $data['title'] !== null) {
            $this->title = $data['title'];
        }
        if (isset($data['description']) && $data['description'] !== null) {
            $this->description = $data['description'];
        }
        if (isset($data['formjsonified']) && $data['formjsonified'] !== null) {
            $this->formjsonified = $data['formjsonified'];
        }
        if (isset($data['formtemplate']) && $data['formtemplate'] !== null) {
            $this->formtemplate = $data['formtemplate'];
        }
        if (isset($data['active']) && $data['active'] !== null) {
            $this->active = $data['active'];
        }
    }
533134
public function addUserData(array $data = [], $reset = false, $override = false) {
        if ($data && is_array($data)) {
            if ($override) {
                $data = array_diff_key($data, $_REQUEST);
            }
            if ($reset) {
                $this->userData = $data;
            } else {
                $this->userData = array_merge($this->userData, $data);
            }
        }
    }
928583
public function populate($data = array())
    {
        if (isset($data['name']) && $data['name'] !== null) {
            $this->name = $data['name'];
        }
        if (isset($data['locale']) && $data['locale'] !== null) {
            $this->locale = $data['locale'];
        }
    }
61753
public function setIgnores(array $ignores = []): self
    {
        foreach ($ignores as $ignore) {
            $this->addIgnore($ignore);
        }

        return $this;
    }
913438
private function populateWith(array $data): array
    {
        $newData = [];
        foreach ($data as $row) {
            $tmp = [];
            foreach ($row as $key => $value) {
                if (false !== strpos($key, '__')) {
                    list($prefix, $postfix) = explode('__', $key);
                    if (!isset($tmp[$prefix])) {
                        $tmp[$prefix] = [];
                    }
                    $tmp[$prefix][$postfix] = $value;
                } else {
                    $tmp[$key] = $value;
                }
            }
            $newData[] = $tmp;
        }

        return $newData;
    }
278621
public function populateFromDynamoDB(array $data)
    {
        $this->tableName        = $data['TableName'];
        $this->tableStatus      = $data['TableStatus'];
        $this->creationDateTime = $data['CreationDateTime'];

        $this->itemCount        = (isset($data['ItemCount'])?$data['ItemCount']:0);
        $this->tableSizeBytes   = (isset($data['TableSizeBytes'])?$data['TableSizeBytes']:0);

        $keySchema = $data['KeySchema'];
        $hash = new KeySchemaElement(
            $keySchema['HashKeyElement']['AttributeName'],
            $keySchema['HashKeyElement']['AttributeType']
        );
        if (isset($keySchema['RangeKeyElement'])) {
            $range = new KeySchemaElement(
                $keySchema['RangeKeyElement']['AttributeName'],
                $keySchema['RangeKeyElement']['AttributeType']
            );
        } else {
            $range = null;
        }

        $this->keySchema = new KeySchema($hash, $range);

        $provisionedThroughput = $data['ProvisionedThroughput'];
        $this->provisionedThroughput = new ProvisionedThroughput(
            $provisionedThroughput['ReadCapacityUnits'],
            $provisionedThroughput['WriteCapacityUnits'],
            (isset($provisionedThroughput['LastIncreaseDateTime'])?$provisionedThroughput['LastIncreaseDateTime']:null),
            (isset($provisionedThroughput['LastDecreaseDateTime'])?$provisionedThroughput['LastDecreaseDateTime']:null)
        );
    }
1115454
public function populate(array $data) {
        foreach ($data as $property => $value) {
            $property = \Util::_toCamel($property);
            $method = 'set' . ucfirst($property);
            if (method_exists($this, $method)) {
                $this->$method($value);
            }
            elseif (property_exists($this, $property)) {
                $this->$property = $value;
            }
        }

        return $this;
    }
1374919
public function populate($data = array())
    {
        if (isset($data['name']) && $data['name'] !== null) {
            $this->name = $data['name'];
        }

        if (isset($data['type']) && $data['type'] !== null) {
            $this->type = $data['type'];
        }
    }
208324
public function fill($data)
    {
        if ($this->data) {
            throw new Exception('Trying to feel not empty context');
        }
        
        $this->data = $data;
        $this->version++;
    }
49777
public function populate(array $data, array $ignore = ['createdByUserId', 'createdDate', 'createdReason'])
    {
        if (isset($data['layoutContainer'])
            && !in_array(
                'layoutContainer',
                $ignore
            )
        ) {
            $this->setLayoutContainer($data['layoutContainer']);
        }

        // @bc
        if (isset($data['renderOrder']) && !in_array('renderOrder', $ignore)) {
            $this->setRenderOrder($data['renderOrder']);
        }

        if (isset($data['rowNumber']) && !in_array('rowNumber', $ignore)) {
            $this->setRowNumber($data['rowNumber']);
        }

        if (isset($data['columnClass']) && !in_array('columnClass', $ignore)) {
            $this->setColumnClass($data['columnClass']);
        }

        if (isset($data['instance']) && $data['instance'] instanceof PluginInstance
            && !in_array('instance', $ignore)
        ) {
            $this->setInstance($data['instance']);
        }
    }