@param array $data

@return Place
330917
public static function createFromArray(array $data): self
    {
        $obj = new self();
        $obj->name = $data['name'];
        $obj->type = $data['type'];
        $obj->date = date_create_from_format('d.m.y H:i', sprintf('%s %s', $data['date'], $data['time']));

        if (isset($data['routeIdx'])) {
            $obj->routeIdx = $data['routeIdx'];
        }

        if (isset($data['track'])) {
            $obj->track = $data['track'];
        }

        if (isset($data['rtTrack'])) {
            $obj->rtTrack = $data['rtTrack'];
        }

        if (!$obj->track && $obj->rtTrack) {
            $obj->track = $obj->rtTrack;
        }

        if (!$obj->rtTrack && $obj->track) {
            $obj->rtTrack = $obj->track;
        }

        return $obj;
    }
630573
public function create(array $data) {
        $this->_checkAcl('create');
        $pk = $this->_model->insert($data);
        return $pk;
    }
32341
public function configure(array $data) 
	{
		$this->checkData($data);
		$body = new MimeMessage();
		$body->addPart($this->getPart($data));
		$this->setBody($body);

		$this->addTo($data['to']);
		//$this->addReplyTo($data['from']);
		$this->setSubject(utf8_decode($this->subject));
		
		return $this;
	}
783856
public function data(array $data = null)
    {
        if (is_null($data)) {
            return $this->data;
        }

        $this->data = $data;

        return $this;
    }
1021787
public static function createFromArray(array $data)
    {
        $self = new self();

        if (isset($data['id'])) {
            $self->setId($data['id']);
        }
        if (isset($data['content'])) {
            $self->setContent($data['content']);
        }
        if (isset($data['unverified'])) {
            $self->setUnverified($data['unverified']);
        }
        if (isset($data['excluded'])) {
            $self->setExcluded($data['excluded']);
        }
        if (isset($data['plural_suffix'])) {
            $self->setPluralSuffix($data['plural_suffix']);
        }
        if (isset($data['created_at'])) {
            $self->setCreatedAt($data['created_at']);
        }
        if (isset($data['updated_at'])) {
            $self->setUpdatedAt($data['updated_at']);
        }
        if (isset($data['placeholders'])) {
            $self->setPlaceholders($data['placeholders']);
        }
        if (isset($data['word_count'])) {
            $self->setWordCount($data['word_count']);
        }
        if (isset($data['key']) && is_array($data['key'])) {
            $self->setKey(Key::createFromArray($data['key']));
        }
        if (isset($data['locale']) && is_array($data['locale'])) {
            $self->setLocale(Locale::createFromArray($data['locale']));
        }
        if (isset($data['user']) && is_array($data['user'])) {
            $self->setUser(User::createFromArray($data['user']));
        }

        return $self;
    }
1103266
public static function createFromArray(array $data)
    {
        $self = new self();

        foreach ($data as $searchResult) {
            $self->addSearchResult(KeySearchResult::createFromArray($searchResult));
        }

        return $self;
    }
1321478
protected function setWithArrayData(array $data)
    {
        if (isset($data[0])) { // multiple rows
            foreach ($data as $row) {
                $this->set($row);
            }
        } else { // multiple values
            foreach ($data as $col => $val) {
                $this->set($col, $val);
            }
            $this->set_row++;
        }
        return $this;
    }
1294887
public function setData(array $data)
    {
        foreach ($data as $name => $value) {
            if (is_string($name)) {
                $this->__set($name, $value);
            }
        }

        return $this;
    }
132520
private function buildLocations(array $data)
    {
        $locationInstances = [];

        foreach ($data as $locationData) {
            $locationInstances[] = $this->buildLocation($locationData);
        }

        return $locationInstances;
    }
190182
public static function fromArray(array $data): self
    {
        $fixed_list = new static();

        $fixed_list->decorated = SplFixedArray::fromArray($data, false);

        return $fixed_list;
    }
1086447
public static function fromArray(array $data) {
		$ret = new FormOptions();
		foreach($data as $value => $text) {
			$ret->add($value, $text);
		}
		return $ret;
	}
772691
public function import(array $data)
    {
        foreach ($data as $param => $value) {

            if ($param === 'headers') {
                continue;
            }

            if (property_exists($this, $param)) {
                $this->$param = $value;
            }
        }

        $this->headers = array();

        if (isset($data['headers'])) {
            $this->setHeaders((array) $data['headers']);
        }

        return $this;
    }
373230
public function mapData(array $data) {
        $this->flush();

        if (!empty($data[$this->primaryKey])) {
            $this->_exists = true;
        }

        $this->_original = Hash::exclude($data, $this->reserved);
        $this->_attributes = $data;

        return $this;
    }
646519
public function create(array $data)
    {
        $response = $this->ontraport->post(
            $this->getNamespace(), $this->toArray($data)
        );

        return $this->ontraport->item($this, $response);
    }
20109
public function mergePropertiesFromArray(array $data = [])
    {
        if ($this->verifyArray($data)) {
            $this->data = array_merge($data, $this->data);
        } else {
            // @TODO something
        }
        return $this;
    }
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;
    }
826027
public static function createFromArray(array $data)
    {
        $self = new self();

        if (isset($data['id'])) {
            $self->setId($data['id']);
        }
        if (isset($data['type'])) {
            $self->setType($data['type']);
        }
        if (isset($data['translated'])) {
            $self->setTranslated($data['translated']);
        }
        if (isset($data['flagged'])) {
            $self->setFlagged($data['flagged']);
        }
        if (isset($data['status'])) {
            $self->setStatus($data['status']);
        }
        if (isset($data['translation'])) {
            $self->setTranslation($data['translation']);
        }
        if (isset($data['revision'])) {
            $self->setRevision($data['revision']);
        }
        if (isset($data['comments'])) {
            $self->setComments($data['comments']);
        }
        if (isset($data['modified'])) {
            $self->setModified($data['modified']);
        }
        if (isset($data['author'])) {
            $self->setAuthor($data['author']);
        }
        if (isset($data['flagger'])) {
            $self->setFlagger($data['flagger']);
        }
        if (isset($data['locale'])) {
            $self->setLocale($data['locale']);
        }
        if (isset($data['plurals'])) {
            $self->setPlurals($data['plurals']);
        }

        return $self;
    }