Used when archiving to serialize the Row's properties.
@return array
@ignore
556618
public function export()
    {
        return array(
            self::COLUMNS => $this->getArrayCopy(),
            self::METADATA => $this->metadata,
            self::DATATABLE_ASSOCIATED => $this->subtableId,
        );
    }
1017672
public function serialize()
    {
        $result = [
            'code' => $this->getCode(),
            'message' => $this->getMessage(),
            'errors' => $this->getErrors()
        ];

        $result['data'] = $this->getVariables();

        if ($result['data'] instanceof Traversable) {
            $result['data'] = ArrayUtils::iteratorToArray($result['data']);
        }

        if (null !== $this->jsonpCallback) {
            return $this->jsonpCallback . '(' . Json::encode($result) . ');';
        }

        return Json::encode($result);
    }
537509
public function toArray()
	{
		return [
			'creator' => SerializationHelper::stringOrNull($this->creator),
			'metadata' => SerializationHelper::serialize($this->metadata),
			'waypoints' => SerializationHelper::serialize($this->waypoints),
			'routes' => SerializationHelper::serialize($this->routes),
			'tracks' => SerializationHelper::serialize($this->tracks),
			'extensions' => SerializationHelper::serialize($this->extensions)
		];
	}
881055
public function serialize()
    {
        $cacheables = [];
        foreach ($this->getCacheables() as $cacheable) {
            $cacheables[$cacheable] = $this->{$cacheable};
        }

        return serialize($cacheables);
    }
224129
public function serialize() {
		$attributes = array();

		if ( $this->visible ) {
			// If visible attributes are set, we'll only reveal those.
			foreach ( $this->visible as $key ) {
				$attributes[ $key ] = $this->get_attribute( $key );
			}
		} elseif ( $this->hidden ) {
			// If hidden attributes are set, we'll grab everything and hide those.
			foreach ( $this->get_attribute_keys() as $key ) {
				if ( ! in_array( $key, $this->hidden ) ) {
					$attributes[ $key ] = $this->get_attribute( $key );
				}
			}
		} else {
			// If nothing is hidden/visible, we'll grab and reveal everything.
			foreach ( $this->get_attribute_keys() as $key ) {
				$attributes[ $key ] = $this->get_attribute( $key );
			}
		}

		return array_map( function ( $attribute ) {
			if ( $attribute instanceof Serializes ) {
				return $attribute->serialize();
			}

			return $attribute;
		}, $attributes );
	}
318337
public function serialize()
    {
        return serialize(array(
            null === $this->parentAcl ? null : $this->parentAcl->getId(),
            $this->objectIdentity,
            $this->classAces,
            $this->classFieldAces,
            $this->objectAces,
            $this->objectFieldAces,
            $this->id,
            $this->loadedSids,
            $this->entriesInheriting,
        ));
    }
1355037
public function properties()
    {
        return array(
            'nb' => $this->archive->numFiles,
            'comment' =>
                (($comment = $this->archive->getArchiveComment() !== false)
                    ? $comment : null),
            'status' => 'OK',
        );
    }
853067
public function jsonSerialize() : array
    {
        return [
          'id'        => $this->getId(),
          'timestamp' => $this->getTimestamp(),
          'name'      => $this->getTransactionName(),
          'duration'  => $this->summary['duration'],
          'type'      => $this->getMetaType(),
          'result'    => $this->getMetaResult(),
          'context'   => $this->getContext(),
          'spans'     => $this->getSpans(),
          'processor' => [
              'event' => 'transaction',
              'name'  => 'transaction',
          ]
      ];
    }
417640
public function serialize()
    {
        $data = [
            $this->gdImageData,
            $this->pts,
            $this->width,
            $this->height,
        ];

        return serialize($data);
    }
382389
public function toArray(): array
	{
		$columns = $this->columns;

		// Removes protected columns from the array

		if(!empty($this->protected))
		{
			$columns = array_diff_key($columns, array_flip($this->protected));
		}

		// Mutate column values if needed

		foreach($columns as $name => $value)
		{
			$value = $this->getColumnValue($name);

			if($value instanceof DateTimeInterface)
			{
				$value = $value->format($this->dateOutputFormat);
			}

			$columns[$name] = $value;
		}

		// Merge in related records

		foreach($this->related as $relation => $related)
		{
			if(in_array($relation, $this->protected))
			{
				continue;
			}

			$columns += [$relation => ($related === false ? $related : $related->toArray())];
		}

		// Returns array representation of the record

		return $columns;
	}
1290992
public function toArray()
	{
		return [
			'author' => $this->author,
			'year' => SerializationHelper::stringOrNull($this->year),
			'license' => SerializationHelper::stringOrNull($this->license)
		];
	}
1135865
public function serialize(): array {
        // base 64 encode
        $details = array_map(function($value) {
            return base64_encode($value);
        }, $this->details);

        // enrich with encryption type
        return $details + ['encryption' => $this->encryption];
    }
399771
public function serialize() {
		$assoc = $this->isAssociative === null ? 'n' : ( $this->isAssociative ? 't' : 'f' );

		$data = [
			'data' => $this->getArrayCopy(),
			'index' => $this->indexOffset,
			'typePointers' => $this->typePointers,
			'assoc' => $assoc
		];

		return serialize( $data );
	}
1072440
public function getRows()
    {
        $rows = [];

        foreach ($this->getComponents() as $component) {
            $rows[] = [
                $component->getStudlyName(),
                $component->enabled() ? 'Enabled' : 'Disabled',
                $component->get('order'),
                $component->getPath(),
            ];
        }

        return $rows;
    }
777895
public function serialize()
    {
        $objectData = array();

        foreach ($this as $propertyName => $propertyValue)
        {
            if (    is_scalar($propertyValue)
                ||  is_array($propertyValue)
                ||  $propertyValue instanceof Serializable)
            {
                $objectData[$propertyName] = $propertyValue;
            }
        }

        return serialize($objectData);
    }
1293874
public function exportItems()
    {
        $columns = $this->getColumns();
        $rows = $this->getRows();
        $items = [];
        foreach ($rows as $row) {
            $item = [];
            foreach ($row['data'] as $index => $value) {
                $item[$columns[$index]['datasourceId']] = $value;
            }
            $items[] = $item;
        }

        return $items;
    }
1270346
private function rows()
    {
        $collection = $this->collection();
        $properties = $this->properties();
        $metadata = $this->metadata();

        foreach ($collection as $c) {
            $row = [];
            foreach ($properties as $p) {
                // Use the property factory to get
                // the proper val to output in csv
                // as a string.
                $propertyMetadata = $metadata->get('properties.'.$p);
                $prop = $this->propertyFactory()->create($propertyMetadata['type']);
                $prop->setIdent($p);
                $prop->setData($propertyMetadata);
                $row[] = $this->stripContent($prop->displayVal($c->propertyValue($p)));
            }
            yield $row;
        }
    }