Flash given data
If not passed, flash form data
@param array data
@return self
488099
public function flash(array $data = array())
    {
        if(count($data) == 0 && $this->exe->request === null)
            return;

        $data = count($data) > 0 ? $data : $this->exe->request->getParsedBody();

        $this->exe->flash->set('form_data', $data);

        return $this;
    }
1165688
public static function make(array $data)
    {
        # Convert values to ArrayObject instances
        foreach ($data as &$value) {
            if (is_array($value)) {
                $value = static::make($value);
            }
        }
        unset($value);

        return new self($data, \ArrayObject::ARRAY_AS_PROPS);
    }
376526
public function keepFlashData($mKey = null)
    {
        if (empty($this->oSession)) {
            return $this;
        }

        if (is_null($mKey)) {
            $aKeys = $this->oSession->get_flash_keys();
        } elseif (is_array($mKey)) {
            $aKeys = $mKey;
        } else {
            $aKeys = [$mKey];
        }

        foreach ($aKeys as $sKey) {
            $this->oSession->mark_as_flash($sKey);
        }

        return $this;
    }
708099
public function setData(array $data)
    {
        if (count($data)) {
            $data = array_combine($data, $data);
        }

        $this->_data = $data;

        return $this;
    }
1084708
public function add(array $data): self
    {
        $this->data = array_merge_recursive($this->data, $data);
        return $this;
    }
343864
public function setData(array $data): self
    {
        list($this->foreignKeys, $this->belongsToMany, $this->relationshipTypes,
            $this->reversedRelationships,$this->tableNames, $this->primaryKeys,
            $this->attributeTypes, $this->attributeLengths, $this->attributes, $this->rawAttributes,
            $this->reversedClasses) = $data;

        return $this;
    }
1036680
public function setData(array $data)
    {
        foreach ($data as $key => $val) {
            $setter = $this->setter($key);
            if (is_callable([ $this, $setter ])) {
                $this->{$setter}($val);
            } else {
                $this->{$key} = $val;
            }
        }

        return $this;
    }
25829
public function fill(array $data)
    {
        $this->fields->each(function (Field $field) use ($data) {
            $field->fill($data);
        });

        return $this;
    }
733605
private function flashManagement()
    {
        $flashdata = $_SESSION[$this->flashdataId] ?? null;

        if ($flashdata !== null) {
            $flashdata = unserialize(base64_decode($flashdata));
            unset($_SESSION[$this->flashdataId]);
            if (!empty($flashdata)) {
                $this->flashdata = $flashdata;
                $this->incrementFlashStorage();
            }
        }
    }
479107
public static function createFromArray(array $data)
    {
        $self = new self();

        if (isset($data['id'])) {
            $self->setId($data['id']);
        }
        if (isset($data['username'])) {
            $self->setUsername($data['username']);
        }
        if (isset($data['name'])) {
            $self->setName($data['name']);
        }

        return $self;
    }
139619
public function add_data(array $data)
	{
		$ar = \func_get_args();
		foreach ( $ar as $d ){
			if ( \is_array($d) ){
				$this->data = $this->has_data() ? array_merge($this->data,$d) : $d;
			}
		}
		return $this;
	}
1229757
public static function createFromArray(array $data): self
    {
        $obj = new self();
        $obj->name = $data['name'];
        $obj->type = $data['type'];
        $obj->origin = Place::createFromArray($data['Origin']);
        $obj->destination = Place::createFromArray($data['Destination']);

        if (isset($data['Notes']['text'])) {
            $obj->notes = self::setNotes($data['Notes']['text'], $data['type']);
        }

        if (isset($data['JourneyDetailRef']['ref'])) {
            $obj->journeyDetails = JourneyDetailParser::parseJourneyDetailUrl($data['JourneyDetailRef']['ref']);
        }

        return $obj;
    }
469557
public function fill(array $data)
    {
        if (isset($data['failures'])) {
            $this->failures = $data['failures'];
        }

        if (isset($data['rules'])) {
            $this->setRules($data['rules']);
        }

        if (isset($data['validator_class'])) {
            $this->setValidatorClass($data['validator_class']);
        }

        return $this;
    }
1294887
public function setData(array $data)
    {
        foreach ($data as $name => $value) {
            if (is_string($name)) {
                $this->__set($name, $value);
            }
        }

        return $this;
    }
1374487
protected function fromArray($data)
    {
        if (empty($data)) {
            return $this;
        }

        $this->data = array_replace_recursive($this->data, $data);

        return $this;
    }
354630
public function setFormData(array $data)
    {
        $objData = $this->objData();
        $merged = array_replace_recursive($objData, $data);

        // Remove null values
        $merged = array_filter($merged, function ($val) {
            if ($val === null) {
                return false;
            }

            return true;
        });

        $this->formData = $merged;
        $this->obj()->setData($merged);

        return $this;
    }
313918
public function update($data = array()) {
    foreach ($data as $key => $value) {
      $this->{$key} = $value;
    }

    $postData = array();
    foreach (static::$properties as $name) {
      $postData[$name] = $this->data[$name];
    }

    $this->client->put(static::$path . '/' . $this->id(), $postData);

    return $this;
  }