Creates an array based representation of class data to be serialized

@return array
489552
public function jsonSerialize()
    {
        $data = array();
        foreach (get_object_vars($this) as $k => $v) {
            if (!empty($v)) {
                $data[$k] = $v;
            }
        }
        return $data;
    }
584792
public function serialize()
    {
        $row = array();
        $row = $this->_data->getRowData();
        $row = array_merge($row, $this->getAffectedRowData());

        return serialize(array('row' => $row, 'identifier' => (string) $this->getIdentifier()));
    }
909912
public function toArray()
    {
        return [
            'type'     => get_class($this),
            'value'    => $this->getValue(),
            'children' => array_map(function ($node) {
                return $node->jsonSerialize();
            }, $this->getChildren()),
        ];
    }
770501
public function serialize()
    {
        $data = array(
            // Serialized data ID.
            self::VERSION,
            $this->_headers->getArrayCopy(),
            // TODO: BC
            $this->_eol
        );

        return serialize($data);
    }
879897
public function toArray()
    {
        $data = array();
        foreach ($this->violations as $violation) {
            $data[] = $violation->getMessage();
        }

        return $data;
    }
269671
public function toArray()
	{
		return [
			'name' => SerializationHelper::stringOrNull($this->name),
			'desc' => SerializationHelper::stringOrNull($this->description),
			'author' => SerializationHelper::serialize($this->author),
			'copyright' => SerializationHelper::serialize($this->copyright),
			'links' => SerializationHelper::serialize($this->links),
			'time' => DateTimeHelper::formatDateTime($this->time),
			'keywords' => SerializationHelper::stringOrNull($this->keywords),
			'bounds' => SerializationHelper::serialize($this->bounds),
			'extensions' => SerializationHelper::serialize($this->extensions)
		];
	}
946238
function &generateClassIDArray()
    {
        $classIDArray = array();
        foreach( $this->NodeObjectArray as $nodeObject )
        {
            $contentObject = $nodeObject->object();
            $classIDArray[] = $contentObject->attribute( 'contentclass_id' );
        }
        $classIDArray = array_unique( $classIDArray );
        return $classIDArray;
    }
592703
public function jsonSerialize()
    {
        return [
            'active' => $this->active,
            'attr' => $this->attr,
            'classes' => $this->classes,
            'description' => $this->description,
            'id' => $this->id,
            'item_id' => $this->item_id,
            'item_type' => $this->item_type,
            'link' => $this->link,
            'modified_at' => $this->modified_at,
            'order' => $this->order,
            'parent_id' => $this->parent_id,
            'target' => $this->target,
            'title' => $this->title,
        ];
    }
958859
public function toArray()
	{
		return [
			'name' => SerializationHelper::stringOrNull($this->name),
			'cmt' => SerializationHelper::stringOrNull($this->comment),
			'desc' => SerializationHelper::stringOrNull($this->description),
			'src' => SerializationHelper::stringOrNull($this->source),
			'link' => SerializationHelper::serialize($this->links),
			'number' => SerializationHelper::integerOrNull($this->number),
			'type' => SerializationHelper::stringOrNull($this->type),
			'extensions' => SerializationHelper::serialize($this->extensions),
			'rtep' => SerializationHelper::serialize($this->points),
			'stats' => SerializationHelper::serialize($this->stats)
		];
	}
541480
public function serialize()
    {
        $output = array();
        foreach( $this->data as $key => $value ) {
            if( !array_key_exists( $key, static::$defaults ) or static::$defaults[$key] !== $value ) {
                $output[$key] = $value;
            }
        }
        return json_encode(
            array(
                $this->name,
                $this->entity,
                $this->fullyQualifiedName,
                $output
            )
        );
    }
827327
public function toArray()
    {
        $array = array();

        foreach($this->_data as $key=>$value)
            $array[$key] = ($value instanceof PropertyReference) ? $value->value() : $value;

        return $array;
    }
460107
public function create(): array
    {
        $attributes = collect($this->getDataKeys())
            ->flip()
            ->map(function() {
                return null;
            })->all();

        // Build a fake Model class based on attributes
        return $this->transform(new class($attributes) extends \stdClass
        {
            public function __construct($attributes)
            {
                $this->attributes = $attributes;

                foreach($attributes as $name => $value) {
                    $this->$name = $value;
                }
            }
            public function toArray()
            {
                return $this->attributes;
            }
        });
    }
1262194
public function aujaSerialize() {
        $result = array();

        $result['type'] = $this->getType();
        $result[$this->getType()] = $this->basicSerialize();

        if ($this->nextPageUrl != null || $this->totalPageUrl != null) {
            $result['paging'] = array();
            if ($this->nextPageUrl != null) {
                $result['paging']['next'] = $this->nextPageUrl;
            }
            if ($this->totalPageUrl != null) {
                $result['paging']['total'] = $this->totalPageUrl;
            }
        }

        return $result;
    }
891563
public static function toArray()
    {
        $class = get_called_class();
        if (!array_key_exists($class, self::$cache)) {
            $reflection          = new \ReflectionClass($class);
            self::$cache[$class] = $reflection->getConstants();
        }

        return self::$cache[$class];
    }
363557
public function serialize() {

        return serialize( (object) [
            'classname' => $this->classname,
            'type' => $this->type,
            'service' => $this->service,
            'parameters' => $this->parameters,
            'request' => $this->request,
            'query' => $this->query
        ]);

    }
53440
public function jsonSerialize() {
        $ret = new \stdClass();

        $ret->masterName = $this->masterName;
        $ret->fromName = $this->fromName;
        $ret->fromDomain = $this->fromDomain;
        $ret->division = $this->division;
        $ret->encoding = $this->encoding;
        $ret->subject = $this->subject;
        $ret->deliveryType = $this->deliveryType;
        $ret->friendlyFrom = $this->friendlyFrom;
        $ret->description = $this->description;
        $ret->campaign = $this->campaign;

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

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

        return $ret;
    }
363917
public function serialize() {
		return $this->map(function( $element ) {
			if ( $element instanceof Serializes ) {
				return $element->serialize();
			}

			return $element;
		} )->to_array();
	}