Compiles the object down to an array format, suitable for serializing.

@return array
This object, rendered to an array.
181317
protected function compile() : array
    {
        // Start with any extensions, since that's already an array.
        $response = $this->extensions;

        // These properties are optional.
        foreach (['title', 'type', 'status', 'detail', 'instance'] as $key) {
            if (!empty($this->$key)) {
                $response[$key] = $this->$key;
            }
        }

        return $response;
    }
1203339
public function toArray()
    {
        $headers = array();

        //Method to implode header parameters
        $implode = function($parameters)
        {
            $results = array();
            foreach ($parameters as $key => $parameter)
            {
                if(!is_numeric($key))
                {
                    //Parameters
                    if(is_array($parameter))
                    {
                        $modifiers = array();
                        foreach($parameter as $k => $v) {
                            $modifiers[] = $k.'='.$v;
                        }

                        $results[] = $key.';'.implode($modifiers, ',');
                    }
                    else $results[] = $key.'='.$parameter;
                }
                else $results[] = $parameter;
            }

            return $value = implode($results, ', ');
        };

        //Serialise the headers to an array
        ksort($this->_data);
        foreach ($this->_data as $name => $values)
        {
            $name    = implode('-', array_map('ucfirst', explode('-', $name)));
            $results = array();

            foreach($values as $value)
            {
                if(is_array($value)) {
                    $results[] = $implode($value);
                }  else {
                    $results[] = $value;
                }
            }

            if ($value = implode($results, ', ')) {
                $headers[$name] = $value;
            }
        }

        return $headers;
    }
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)
		];
	}
835687
public function toArray() {
        $result = iterator_to_array($this);
        foreach($result as $key => &$value) {
            if($value instanceof ArrayObject) {
                $value = $value->toArray();
            }
        }

        return $result;
    }
478837
public function toArray()
    {
        $result = [];

        if (!empty($this->name)) {
            $result['name'] = $this->name;
        }
        
        if (!empty($this->version)) {
            $result['version'] = $this->version->toArray();
        }

        if (isset($result['version']) && empty($result['version'])) {
            unset($result['version']);
        }

        return $result;
    }
1336505
public function toArray()
    {
        return array(
            'name'           => $this->getName(),
            'type'           => $this->getType()->getName(),
            'length'         => $this->getLength(),
            'precision'      => $this->getPrecision(),
            'scale'          => $this->getScale(),
            'unsigned'       => $this->isUnsigned(),
            'fixed'          => $this->isFixed(),
            'not_null'       => $this->isNotNull(),
            'default'        => $this->getDefault(),
            'auto_increment' => $this->isAutoIncrement(),
            'comment'        => $this->getComment(),
        );
    }
66221
public function toArray()
	{
		$result = parent::toArray();

		if (isset($result['suspended']))
		{
			$result['suspended'] = $this->getSuspendedAttribute($result['suspended']);
		}
		if (isset($result['banned']))
		{
			$result['banned'] = $this->getBannedAttribute($result['banned']);
		}
		if (isset($result['last_attempt_at']) and $result['last_attempt_at'] instanceof DateTime)
		{
			$result['last_attempt_at'] = $result['last_attempt_at']->format('Y-m-d H:i:s');
		}
		if (isset($result['suspended_at']) and $result['suspended_at'] instanceof DateTime)
		{
			$result['suspended_at'] = $result['suspended_at']->format('Y-m-d H:i:s');
		}

		return $result;
	}
923052
public function toArray()
    {
        return array_merge($this->wrappedObject->toArray(), [
            'created_at'        => $this->created_at(),
            'updated_at'        => $this->updated_at(),
            'default_view_name' => $this->default_view_name(),
        ]);
    }
350673
public function toArray()
    {
        return (isset($_SESSION[$this->_namespace]) && is_array($_SESSION[$this->_namespace])) ? $_SESSION[$this->_namespace] : [];
    }
1344276
public function toArray()
    {
        return array_merge($this->wrappedObject->toArray(), [
            'human_status' => $this->human_status(),
            'permalink'    => $this->permalink(),
            'created_at'   => $this->created_at(),
            'updated_at'   => $this->updated_at(),
        ]);
    }
1264181
public function toArray()
        {
            return [
                'tag' => $this->tag,
                'void' => $this->void,
                'attributes' => $this->attributes,
                'content' => $this->recursivelyArrayify($this->content)
            ];
        }
952319
public function toArray()
	{
		return [
			'points' => SerializationHelper::serialize($this->points),
			'extensions' => SerializationHelper::serialize($this->extensions),
			'stats' => SerializationHelper::serialize($this->stats)
		];
	}
353284
public function toArray()
    {
        $result = array();
        if($row = $this->getIterator()->current()) {
            $result = $row->toArray();
        }

        return $result;
    }
909912
public function toArray()
    {
        return [
            'type'     => get_class($this),
            'value'    => $this->getValue(),
            'children' => array_map(function ($node) {
                return $node->jsonSerialize();
            }, $this->getChildren()),
        ];
    }
136682
public function toArray()
    {
        $json            = [];
        $json['jsonrpc'] = $this->jsonrpc;

        if ($this->method) {
            $json['method'] = $this->method;
        }

        $json['method'] = $this->method;

        if ($this->params) {
            $json['params'] = $this->params;
        }

        if ($this->id) {
            $json['id'] = $this->id;
        }

        return $json;
    }
216850
public function toArray()
    {
        $array = array();
        $allowed = get_class_vars(get_class($this));
        foreach (get_object_vars($this) as $key => $item) {
            if (array_key_exists($key, $allowed) && isset($item)) {
                $array[constant(strtoupper("CURLOPT_" . $key))] = (method_exists($item, 'build') ? $item->build() : $item);
            }
        }
        return $array;
    }
252977
public static function toArray() {
        $enumClass = get_called_class();

        if(!array_key_exists($enumClass, self::$cache)) {
            $reflector = new ReflectionClass($enumClass);
            self::$cache[$enumClass] = $reflector->getConstants();
        }

        return self::$cache[$enumClass];
    }