@param ITypedObject $object
@param array        $input

@return void
965938
public function invokeBeforeSubmitCallbacks(ITypedObject $object, array $input)
    {
        foreach ($this->beforeSubmitCallbacks as $callback) {
            $callback($object, $input);
        }
    }
262749
protected function setType(InputInterface $input)
    {
        $type = TypeTable::query()
            ->setFilter([
                'ID' => $input->getArgument('type'),
            ])
            ->setSelect(['ID'])
            ->exec();

        if ($type->getSelectedRowsCount() <= 0) {
            $this->errors[] = 'Type not found';
        }

        $this->type = $type->fetch()['ID'];
    }
266503
public static function set($object, $key = null) {
        if (!is_object($object)) {
            throw new InvalidObjectException('The object to register must be instantiated');
        }

        if (!$key) {
            $key = get_class($object);
        }

        static::$_registered[$key] = $object;

        return $object;
    }
17677
public function updateFromObject(stdClass $object)
    {

        $this->name  = property_exists($object, 'name') ? $object->name : null;
        $this->email = property_exists($object, 'email') ? $object->email : null;
    }
485066
public function move($object, $parentObject = null) {
		$this->em->flush();
		
		if ($parentObject !== null) {
			$this->valMove($object, $parentObject);
		}
		
		$newLft = 1;
		if ($parentObject === null) {
			if (null !== ($maxRgt = $this->lookupMaxRgt($object))) {
				$newLft = $maxRgt + 1;
			}
		} else {
			$newLft = $this->lookupLftRgt($parentObject)['rgt'];
		}
		
		$this->moveToLft($object, $newLft);
	}
1259449
public function index($type, $object)
    {
        foreach ($this->getIndexes($type) as $index) {
            $index->index($object);
        }
    }
417643
public static function fromProtobuf($input, $object = NULL, &$start = 0, $end = NULL)
	{
		if ($object === null) {
			$object = new NamePart();
		}

		if ($end === null) {
			$end = strlen($input);
		}

		while ($start < $end) {
			$tag = Binary::decodeVarint($input, $start);
			$wireType = $tag & 0x7;
			$number = $tag >> 3;
			switch ($number) {
				case 1:
					if ($wireType !== 2) {
						throw new ProtobufException('Unexpected wire type ' . $wireType . ', expected 2.', $number);
					}
					$length = Binary::decodeVarint($input, $start);
					$expectedStart = $start + $length;
					if ($expectedStart > $end) {
						throw new ProtobufException('Not enough data.');
					}
					$object->namePart = substr($input, $start, $length);
					$start += $length;
					if ($start !== $expectedStart) {
						throw new ProtobufException('Unexpected start. Expected ' . $expectedStart . ', got ' . $start . '.', $number);
					}
					break;
				case 2:
					if ($wireType !== 0) {
						throw new ProtobufException('Unexpected wire type ' . $wireType . ', expected 0.', $number);
					}
					$object->isExtension = (bool)Binary::decodeVarint($input, $start);
					break;
				default:
					switch ($wireType) {
						case 0:
							Binary::decodeVarint($input, $start);
							break;
						case 1:
							$start += 8;
							break;
						case 2:
							$start += Binary::decodeVarint($input, $start);
							break;
						case 5:
							$start += 4;
							break;
						default:
							throw new ProtobufException('Unexpected wire type ' . $wireType . '.', $number);
					}
			}
		}

		return $object;
	}
994556
public function preUpdate($object)
    {
        $this->blockManager->get($object)->preUpdate($object);

        // fix weird bug with setter object not being call
        $object->setChildren($object->getChildren());

        if ($object->getPage() instanceof PageInterface) {
            $object->getPage()->setEdited(true);
        }
    }
662760
public function invokeOnSaveCallbacks(ITypedObject $object, array $input)
    {
        foreach ($this->onSaveCallbacks as $callback) {
            $callback($object, $input);
        }
    }
285978
private function applyTypeValidation(Input $input): Input
    {
        return Rule::make(function ($value, Input $input): void {
            if ($this->isValidType($value)) {
                return;
            }

            $reason = beautify_parse('a <type:type> was expected', [
                'type' => $this->type->stringify(),
            ]);

            $input->reject($reason);
        })->execute($input);
    }
750477
public function updateFromObject(stdClass $object)
    {
        $this->bodyParts               = EmailBodyPartCollection::createFromObjects(property_exists($object, 'bodyParts') ? $object->bodyParts : null);
        $this->contentTransferEncoding = $object->contentTransferEncoding;
        $this->contentType             = $object->contentType;
        $this->rawContent              = property_exists($object, 'rawContent') ? $object->rawContent : null;
    }
66607
public function invoke($object, $value)
    {
        if (null !== $value) {
            $this->method->invoke($object, $value);
        }
    }
485711
protected function setDomainObjectInProperty($object, $propertyName, $domainObject, $lastObject, array $objectArrayPropertyPath)
    {
        if (is_object($object)) {
            ObjectAccess::setProperty($object, $propertyName, $domainObject);
        } elseif (is_array($object)) {
            $this->injectDomainObjectInLastObject($domainObject, $lastObject, $objectArrayPropertyPath);
        }
    }
1360566
protected function runHandler($object, $data = null)
    {
        /** @var ITypedObject $object */
        /** @var ArrayDataObject $data */
        $input = $data->getArray();

        if ($this->dataSource instanceof IValueObjectCollection) {
            /** @var IValueObject $object */
            /** @var IValueObject $newObject */
            $newObject = $this->form->createNewObjectFromInput($input);

            $this->form->invokeBeforeSubmitCallbacks($newObject, $input);
            $this->form->bindToObject($newObject, $input);
            $this->form->invokeOnSubmitCallbacks($newObject, $input);

            $this->dataSource->update($object, $newObject);

            $this->form->invokeOnSaveCallbacks($object, $input);

            return $newObject;
        } else {
            $this->form->invokeBeforeSubmitCallbacks($object, $input);
            $this->form->bindToObject($object, $input);
            $this->form->invokeOnSubmitCallbacks($object, $input);

            $this->dataSource->save($object);

            $this->form->invokeOnSaveCallbacks($object, $input);

            return $object;
        }
    }
988900
public static function fromProtobuf($input, $object = NULL, &$start = 0, $end = NULL)
	{
		if ($object === null) {
			$object = new EnumValueDescriptorProto();
		}

		if ($end === null) {
			$end = strlen($input);
		}

		while ($start < $end) {
			$tag = Binary::decodeVarint($input, $start);
			$wireType = $tag & 0x7;
			$number = $tag >> 3;
			switch ($number) {
				case 1:
					if ($wireType !== 2) {
						throw new ProtobufException('Unexpected wire type ' . $wireType . ', expected 2.', $number);
					}
					$length = Binary::decodeVarint($input, $start);
					$expectedStart = $start + $length;
					if ($expectedStart > $end) {
						throw new ProtobufException('Not enough data.');
					}
					$object->name = substr($input, $start, $length);
					$start += $length;
					if ($start !== $expectedStart) {
						throw new ProtobufException('Unexpected start. Expected ' . $expectedStart . ', got ' . $start . '.', $number);
					}
					break;
				case 2:
					if ($wireType !== 0) {
						throw new ProtobufException('Unexpected wire type ' . $wireType . ', expected 0.', $number);
					}
					$object->number = Binary::decodeVarint($input, $start);
					break;
				case 3:
					if ($wireType !== 2) {
						throw new ProtobufException('Unexpected wire type ' . $wireType . ', expected 2.', $number);
					}
					$length = Binary::decodeVarint($input, $start);
					$expectedStart = $start + $length;
					if ($expectedStart > $end) {
						throw new ProtobufException('Not enough data.');
					}
					$object->options = EnumValueOptionsMeta::fromProtobuf($input, null, $start, $start + $length);
					if ($start !== $expectedStart) {
						throw new ProtobufException('Unexpected start. Expected ' . $expectedStart . ', got ' . $start . '.', $number);
					}
					break;
				default:
					switch ($wireType) {
						case 0:
							Binary::decodeVarint($input, $start);
							break;
						case 1:
							$start += 8;
							break;
						case 2:
							$start += Binary::decodeVarint($input, $start);
							break;
						case 5:
							$start += 4;
							break;
						default:
							throw new ProtobufException('Unexpected wire type ' . $wireType . '.', $number);
					}
			}
		}

		return $object;
	}
655075
public static function fromProtobuf($input, $object = NULL, &$start = 0, $end = NULL)
	{
		if ($object === null) {
			$object = new FieldOptions();
		}

		if ($end === null) {
			$end = strlen($input);
		}

		while ($start < $end) {
			$tag = Binary::decodeVarint($input, $start);
			$wireType = $tag & 0x7;
			$number = $tag >> 3;
			switch ($number) {
				case 1:
					if ($wireType !== 0) {
						throw new ProtobufException('Unexpected wire type ' . $wireType . ', expected 0.', $number);
					}
					$object->ctype = Binary::decodeVarint($input, $start);
					break;
				case 2:
					if ($wireType !== 0) {
						throw new ProtobufException('Unexpected wire type ' . $wireType . ', expected 0.', $number);
					}
					$object->packed = (bool)Binary::decodeVarint($input, $start);
					break;
				case 6:
					if ($wireType !== 0) {
						throw new ProtobufException('Unexpected wire type ' . $wireType . ', expected 0.', $number);
					}
					$object->jstype = Binary::decodeVarint($input, $start);
					break;
				case 5:
					if ($wireType !== 0) {
						throw new ProtobufException('Unexpected wire type ' . $wireType . ', expected 0.', $number);
					}
					$object->lazy = (bool)Binary::decodeVarint($input, $start);
					break;
				case 3:
					if ($wireType !== 0) {
						throw new ProtobufException('Unexpected wire type ' . $wireType . ', expected 0.', $number);
					}
					$object->deprecated = (bool)Binary::decodeVarint($input, $start);
					break;
				case 10:
					if ($wireType !== 0) {
						throw new ProtobufException('Unexpected wire type ' . $wireType . ', expected 0.', $number);
					}
					$object->weak = (bool)Binary::decodeVarint($input, $start);
					break;
				case 999:
					if ($wireType !== 2) {
						throw new ProtobufException('Unexpected wire type ' . $wireType . ', expected 2.', $number);
					}
					if (!(isset($object->uninterpretedOption) && is_array($object->uninterpretedOption))) {
						$object->uninterpretedOption = array();
					}
					$length = Binary::decodeVarint($input, $start);
					$expectedStart = $start + $length;
					if ($expectedStart > $end) {
						throw new ProtobufException('Not enough data.');
					}
					$object->uninterpretedOption[] = UninterpretedOptionMeta::fromProtobuf($input, null, $start, $start + $length);
					if ($start !== $expectedStart) {
						throw new ProtobufException('Unexpected start. Expected ' . $expectedStart . ', got ' . $start . '.', $number);
					}
					break;
				default:
					switch ($wireType) {
						case 0:
							Binary::decodeVarint($input, $start);
							break;
						case 1:
							$start += 8;
							break;
						case 2:
							$start += Binary::decodeVarint($input, $start);
							break;
						case 5:
							$start += 4;
							break;
						default:
							throw new ProtobufException('Unexpected wire type ' . $wireType . '.', $number);
					}
			}
		}

		return $object;
	}
701403
public function persistObject(PersistenceContext $context, ITypedObject $object) : \Dms\Core\Persistence\Db\Row
    {
        return $this->persistAllObjects($context, [0 => $object])[0];
    }