Convert the model to an array.

@return array
775166
public function toArray()
    {
        $hydrator = new ClassMethods();
        $vars = $hydrator->extract($this);
        
        foreach ($vars as $key => &$value) {
            if ($value === null) {
                unset($vars[$key]);
            } elseif (is_object($value) && ! $value instanceof \ArrayObject) {
                if (method_exists($value, 'toArray')) {
                    $value = $value->toArray();
                    if (count($value) == 0) {
                        unset($vars[$key]);
                    }
                } elseif ($value instanceof IsNull) {
                    $vars[$key] = null;
                } elseif ($value instanceof \stdClass) {
                    $vars[$key] = new \stdClass();
                } else {
                    unset($vars[$key]);
                }
            } elseif (is_bool($value)) {
                $vars[$key] = (int) $value;
            }
        }
        
        return $vars;
    }
618343
public function toArray()
    {
        return array(
            'name' => $this->_name,
            'type' => $this->_datatype,
            'length' => $this->_length,
            'notnull' => $this->_notnull,
            'default' => $this->_default,
            'autoincrement' => $this->_autoIncrement,
            'comment' => $this->_comment,
        );
    }
464912
public function toArray()
	{
		return [
			'aTemp' => SerializationHelper::floatOrNull($this->aTemp),
			'wTemp' => SerializationHelper::floatOrNull($this->wTemp),
			'depth' => SerializationHelper::floatOrNull($this->depth),
			'hr' => SerializationHelper::floatOrNull($this->hr),
			'cad' => SerializationHelper::floatOrNull($this->cad),
			'speed' => SerializationHelper::floatOrNull($this->speed),
			'course' => SerializationHelper::integerOrNull($this->course),
			'bearing' => SerializationHelper::integerOrNull($this->bearing)
		];
	}
860078
public function toArray()
    {
        return [
            'id' => $this->id,
            'author_name' => $this->authorName,
            'author_email' => $this->authorEmail,
            'committer_name' => $this->committerName,
            'committer_email' => $this->committerEmail,
            'message' => $this->message,
        ];
    }
115424
public function toArray(): array
    {
        $data = array_filter([
            'id'     => $this->id,
            'status' => $this->status,
            'code'   => $this->code,
            'title'  => $this->title,
            'detail' => $this->detail
        ]);

        if ($this->hasLinks()) {
            $data['links'] = $this->linksToArray();
        }

        if ($this->hasMetadata()) {
            $data['meta'] = $this->getMetadata();
        }

        return $data;
    }
195503
public function toArray()
        {
            return array_merge(
                parent::toArray(),
                array(
                     'action'       => $this->getAction(),
                     'controller'   => $this->getController(),
                     'module'       => $this->getModule(),
                     'params'       => $this->getParams(),
                     'route'        => $this->getRoute(),
                     'reset_params' => $this->getResetParams(),
                     'encodeUrl'    => $this->getEncodeUrl(),
                     'scheme'       => $this->getScheme(),
                )
            );
        }
1340824
public function toArray()
    {
        return [
            'field' => $this->getRawProperty('field'),
            'from-field' => $this->getRawProperty('fromField'),
            'to-field' => $this->getRawProperty('toField'),
            'is-deleted' => $this->isDeleted,
            'is-added' => $this->isAdded,
        ];
    }
316560
public function toArray()
    {
        $arr = array();
        foreach ($this as $key => $value) {
            $method = 'get' . $key;
            if (method_exists($this, $method)) {
                $arr[$key] = $this->$method();
            }
        }

        return $arr;
    }
96995
public function toArray(){
        $ModelArray = [];
        foreach( get_object_vars( $this) as $propertyName => $propertyValue){
            if( is_subclass_of( $propertyValue, Model::class)){
                /** @var $propertyValue Model */
                $ModelArray[$propertyName] = $propertyValue->toArray();
            } else {
                $ModelArray[$propertyName] = $propertyValue;
            }
        }
        return $ModelArray;
    }
190621
public function toArray()
    {
        $ret = array();
        foreach (array_keys($this->values) as $key) {
            $ret[$key] = $this->get($key);
        }

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

        if (!empty($this->name) && empty($this->version)) {
            return $this->name;
        }

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

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

        return $result;
    }
392703
public function toArray()
    {
        return [
            'unique_id' => $this->uniqueId,
            'id' => $this->id,
            'name' => $this->name,
            'price' => $this->price,
            'quantity' => $this->quantity,
            'options' => $this->options,
        ];
    }
963322
public function toArray(): array
    {
        return [
            'name' => $this->name,
            'text' => $this->text,
            'style' => $this->style,
            'type' => $this->type,
            'value' => $this->value,
            'confirm' => $this->confirm ? $this->confirm->toArray() : null,
        ];
    }
1345106
public function toArray()
    {
        $schema = array(
            'name' => $this->_name,
            'label' => $this->_label,
            'description' => $this->_description,
            'type' => $this->_type,
            'store' => $this->_isStored,
            'index' => $this->_isIndexd,
            'multivalue' => $this->_isMultiValued,
        );

        if (isset($this->_size)) {
            $schema['size'] = $this->_size;
        }

        return $schema;
    }
970231
public function __toArray()
    {
        $datas = [
            'id'   => (string)$this->id,
            'type' => (string)$this->type
        ];
        if ($this->attributes !== null) {
            $datas['attributes'] = $this->attributes->__toArray();
        }
        return $datas;
    }
211490
public function toArray() {
		return [
			'key' => $this->key(),
			'url' => $this->url(),
			'formData' => $this->formData(),
			'cacheControl' => $this->cacheControl(),
			'expires' => $this->expires(),
			'acl' => $this->acl()
		];
	}
829665
public function toArray()
    {
        return [
            'message' => $this->getMessageException(),
            'errors' => $this->getErrors(),
            'debugCode' => $this->getDebugCode(),
            'details' => $this->getDetails(),
            'routeBack' => redirect()->back()->getTargetUrl()
        ];
    }