Returns a (de)serializable representation of the internal value. The
returned format MUST be acceptable as a new value on the valueholder
to reconstitute it.

@return mixed value that can be used for serializing/deserializing
320566
public function toNative()
    {
        if ($this->valueEquals($this->getAttribute()->getNullValue())) {
            return [];
        }

        $links = [];
        foreach ($this->getValue() as $link) {
            $links[] = $link->toNative();
        }

        return $links;
    }
1219407
public function deserialize(): object
    {
        $this->buffer->position($this->assetOffset / 2);

        $this->transaction->amount = $this->buffer->readUInt64();
        $this->transaction->expiration = $this->buffer->readUInt32();
        $this->transaction->recipientId = Base58::encodeCheck(new Buffer(hex2bin($this->buffer->readHex(21))));

        return $this->parseSignatures($this->assetOffset + (8 + 4 + 21) * 2);
    }
1236180
public function getSerial(){
        if(empty($this->serial)){
            $this->serial = $this->buildSerial();
        }
        $returnValue = $this->serial;

        return (string) $returnValue;
    }
1005678
public function getConvertedFromValue()
    {
        if ($this->valueHasBeenConverted === false) {
            $value = $this->executeValueConversion();

            $this->convertedFromValue = $value[0];
            $this->convertedToValue = $value[1];

            $this->valueHasBeenConverted = true;
        }

        return $this->convertedFromValue;
    }
417809
public function getValue()
    {
        switch ($this->method) {
            case 'createTable':
                $columns = [];

                foreach ((array)$this->data as $column => $schema) {
                    $columns[] = TableColumnFactory::build([
                        'schema' => $this->schema,
                        'name' => $column,
                        'type' => $schema['type'],
                        'length' => $schema['length'] ?? null,
                        'isNotNull' => $schema['isNotNull'] ?? null,
                        'isUnique' => $schema['isUnique'] ?? null,
                        'isPrimaryKey' => $schema['isPrimaryKey'] ?? null,
                        'check' => $schema['check'] ?? null,
                        'default' => $schema['default'] ?? null,
                        'append' => $schema['append'] ?? null,
                        'isUnsigned' => $schema['isUnsigned'] ?? null,
                        'comment' => !empty($schema['comment']) ? $schema['comment'] : null,
                    ]);
                }
                return $columns;

            case 'renameColumn':
                return [
                    'old' => $this->data[0],
                    'new' => $this->data[1],
                ];

            case 'addColumn':
            case 'alterColumn':
                return TableColumnFactory::build([
                    'schema' => $this->schema,
                    'name' => $this->data[0],
                    'type' => $this->data[1]['type'],
                    'length' => $this->data[1]['length'] ?? null,
                    'isNotNull' => $this->data[1]['isNotNull'] ?? null,
                    'isUnique' => $this->data[1]['isUnique'] ?? null,
                    'isPrimaryKey' => $this->data[1]['isPrimaryKey'] ?? null,
                    'check' => $this->data[1]['check'] ?? null,
                    'default' => $this->data[1]['default'] ?? null,
                    'append' => $this->data[1]['append'] ?? null,
                    'isUnsigned' => $this->data[1]['isUnsigned'] ?? null,
                    'comment' => !empty($this->data[1]['comment']) ? $this->data[1]['comment'] : null,
                ]);

            case 'addPrimaryKey':
                return new TablePrimaryKey([
                    'name' => $this->data[0],
                    'columns' => $this->data[1],
                ]);

            case 'addForeignKey':
                return new TableForeignKey([
                    'name' => $this->data[0],
                    'columns' => $this->data[1],
                    'refTable' => $this->data[2],
                    'refColumns' => $this->data[3],
                ]);

            case 'createIndex':
                return new TableIndex([
                    'name' => $this->data[0],
                    'columns' => $this->data[1],
                    'unique' => $this->data[2],
                ]);

            case 'addCommentOnColumn':
                return [
                    'name' => $this->data[0],
                    'comment' => $this->data[1],
                ];

            case 'renameTable':
            case 'dropTable':
            case 'dropColumn':
            case 'dropPrimaryKey':
            case 'dropForeignKey':
            case 'dropIndex':
            case 'dropCommentFromColumn':
            default:
                return $this->data;
        }
    }
1340321
public function getCeil()
	{
		if ( $this->getIsDecimal() === false )
		{
			return $this;
		}

		if ( $this->getIsNegative() === true )
		{
			return new DecimalValue( bcadd( $this->_value, '0', 0 ) );
		}

		return new DecimalValue( bcadd( $this->_value, '1', 0 ) );  // Add one and truncate
	}
491045
public function getValue() {
        $value = parent::getValue();
        if ($value) {
            $value = unformat_float($value, true);
        }
        return $value;
    }
161455
private function deserializeValue($value)
    {
        if (is_array($value) && isset($value['class']) && isset($value['payload'])) {
            return $this->deserializeObjectRecursively($value);
        } elseif (is_array($value)) {
            return $this->deserializeArrayRecursively($value);
        }

        return $value;
    }
956900
public function jsonSerialize() {
        $ret = new \stdClass();
        $ret->name = $this->name;

        if(count($this->values) > 0) {
            $values = array();
            $values['values'] = $this->values;
            $ret->values = $values;
        }

        $ret->nullable = $this->nullable;

        return $ret;
    }
1352943
public function serialize($value) {
        if ($value instanceof SerializablePersonalDataValue) {
            return $this->serializePersonalDataValue($value);
        } elseif ($value instanceof SerializableValue) {
            return $this->serializeValue($value);
        }
        return $value;
    }
968663
public function getFormat()
    {
        switch (true) {
            case ($this->encoder instanceof Base32Encoder):
                $format = self::FORMAT_BASE32;
                break;
            case ($this->encoder instanceof HexEncoder):
                $format = self::FORMAT_HEX;
                break;
            case ($this->encoder instanceof RawEncoder):
            default:
                $format = self::FORMAT_RAW;
        }

        return $format;
    }
60911
public function serialize()
    {
        $result = array();
        foreach ($this->getKeys() as $k => $v) {
            $result[] = $k . ': ' . $v;
        }
        foreach ($this->getVariables() as $k => $v) {
            if (is_array($v)) {
                foreach ($v as $singleValue) {
                    $result[] = $this->serializeVariable($k, $singleValue);
                }
            } else {
                $result[] = $this->serializeVariable($k, $v);
            }
        }
        $mStr = $this->finishMessage(implode(self::EOL, $result));
        return $mStr;
    }
76741
public function value()
    {
        $value = lego_default($this->getOriginalValue(), $this->default);
        foreach ($this->pipes as $pipe) {
            $value = $pipe->handle($value, $this->data, $this);
        }

        return new HtmlString((string) $value);
    }
136777
public function deserialize(): object
    {
        $this->buffer->position($this->assetOffset / 2);

        $this->transaction->asset = [
            'multisignature' => [
                'min'      => $this->buffer->readUInt8() & 0xff,
                'lifetime' => $this->buffer->skip(1)->readUInt8() & 0xff,
            ],
        ];

        $count = $this->buffer->readUInt8() & 0xff;
        for ($i = 0; $i < $count; $i++) {
            $indexStart = $this->assetOffset + 6;

            if ($i > 0) {
                $indexStart += $i * 66;
            }

            $this->transaction->asset['multisignature']['keysgroup'][] = $this->buffer->position($indexStart)->readHexRaw(66);
        }

        return $this->parseSignatures($this->assetOffset + 6 + $count * 66);
    }
786837
public function getFormValue()
    {
        $mapper = new PropertyMapper();
        return $mapper->mapDataToForm($this->getEntityContainer()->getEntity(), $this->getName());
    }
422531
public function getValue()
    {
        $out = [];
        foreach ($this->value as $key => $value) {
            $out[] = $key.'='.(is_array($value) ? implode(',', $value) : $value);
        }

        return strtoupper(implode(';', $out));
    }
1171794
public function unserialize($value)
    {
        if (\is_array($value) && isset($value[self::SCALAR_TYPE])) {
            return $this->unserializeData($value);
        }

        $this->reset();

        return $this->unserializeData($this->serializationStrategy->unserialize($value));
    }