Converts this Source to an array suitable for transmission to the API

@return array
968795
public function toArray()
    {
        $data = array();
        $map = array(
            'id' => 'getId',
            'name' => 'getName',
            'source_type' => 'getSourceType',
            'status' => 'getStatus',
            'parameters' => 'getParameters',
            'auth' => 'getAuth',
            'resources' => 'getResources',
            'created_at' => 'getCreatedAt',
            'validate' => 'getValidate'
        );

        foreach ($map as $key => $getter) {
            $data[$key] = $this->$getter();
        }

        foreach (array('auth', 'resources', 'parameters') as $key) {
            if (isset($data[$key])) {
                $data[$key] = json_encode($data[$key]);
            }
        }

        return $data;
    }
695109
public function toArray()
    {
        return [
            'name'        => $this->name,
            'title'       => $this->title,
            'url'         => $this->url,
            'icon'        => $this->icon,
            'active'      => $this->isActive(),
            'children'    => $this->children->toArray(),
            'roles'       => $this->roles,
            'permissions' => $this->permissions,
        ];
    }
998926
public function toArray()
    {
        $data = array(
            'added' => $this->getAdded(true),
            'api' => $this->getApi(),
            'cwd' => $this->getCwd(true),
            'debug' => $this->getDebug(),
            'files' => $this->getFiles(true),
            'list' => $this->getList(),
            'netDrivers' => $this->getNetDrivers(),
            'options' => $this->getOptions(),
            'removed' => $this->getRemoved(true),
            'tree' => $this->getTree(true),
            'uplMaxSize' => $this->getUplMaxSize(),
            'content' => $this->getContent(),
            'size' => $this->getSize(),
            'error' => $this->getError(),
            'dim' => $this->getDim(),
        );

        return array_filter(
            $data,
            function ($var) {
                return !is_null($var);
            }
        );
    }
584026
public function toArray()
    {
        return [
            $this->id,
            $this->filterName,
            $this->operator,
            serialize($this->value),
        ];
    }
155060
public function toArray()
	{
		return array(
			'width' => $this->width,
			'height' => $this->height,
			'type' => $this->type,
			'bits' => $this->bits,
			'channels' => $this->channels,
			'mime' => $this->mime,
			'path' => $this->path,
			'size' => $this->size,
			'name' => $this->name,
			'directory' => $this->directory,
			'extension' => $this->extension,
		);
	}
1374225
public function toArray()
    {
        return array_filter(
            array(
                'method' => $this->getMethod(),
                'url' => $this->getUrl(),
                'headers' => $this->getHeaders(),
                'body' => $this->getBody(),
                'post_files' => $this->getPostFiles(),
                'post_fields' => $this->getPostFields(),
            )
        );
    }
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;
    }
50109
public function toArray(): array
    {
        if (!empty($this->warnings)) {
            $this->status = 'warning';
        } elseif (!empty($this->errors)) {
            $this->status = 'error';
        }

        return [
            'status' => $this->status,
            'errors' => array_merge(array_map(function($x) {
                return ['severity' => 'error', 'message' => $x];
            }, $this->errors), array_map(function($x) {
                return ['severity' => 'warning', 'message' => $x];
            }, $this->warnings)),
            'info' => $this->info
        ];
    }
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;
    }
971067
public function toArray(): array
    {
        $data = $this->resourceToArray();

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

        return $data;
    }
580619
public function toArray()
    {
        return [
            'sType'      => $this->sType,
            'aTo'        => array_filter(array_unique($this->aTo)),
            'aCc'        => array_filter(array_unique($this->aCc)),
            'aBcc'       => array_filter(array_unique($this->aBcc)),
            'sFromName'  => $this->sFromName,
            'sFromEmail' => $this->sFromEmail,
            'sSubject'   => $this->sSubject,
            'aData'      => $this->aData,
        ];
    }
1219912
public function toArray() {
        $ppts = get_object_vars($this);
        unset($ppts['_connection']);
        unset($ppts['_tableName']);
        unset($ppts['_by']);
        unset($ppts['_table']);
        unset($ppts['_content']);
        return $ppts;
    }
1178694
public function toArray(): array
    {
        $data = [
            'meta'     => $this->getMetadata(),
            'links'    => $this->linksToArray(),
            'errors'   => $this->errorsToArray(),
            'included' => $this->includedResourcesToArray()
        ];

        $data = array_filter($data, 'count');

        if ($this->jsonApi !== null) {
            $data['jsonapi'] = $this->jsonApi->toArray();
        }

        return $data;
    }
1329913
public function toArray()
    {
        $output = [];
        $output[] = sprintf(
            'HTTP/1.1 %s %s',
            $this->statusCode,
            self::codeToReason($this->statusCode)
        );
        foreach ($this->headers as $k => $v) {
            $output[] = sprintf('%s: %s', $k, $v);
        }
        $output[] = '';
        $output[] = $this->body;

        return $output;
    }
745160
public function toArray()
    {
        $body = $this->getBody();
        // Base64 encode when binary
        if (strpos($this->getContentType(), 'application/x-gzip') !== false
            || $this->getHeader('Content-Transfer-Encoding') == 'binary'
        ) {
            $body = base64_encode($body);
        }

        return array_filter(
            array(
                'status'    => $this->status,
                'headers'   => $this->getHeaders(),
                'body'      => $body
            )
        );
    }
1370092
public function toArray()
    {
        return [
            'fileId' => $this->file->getId(),
            'fileVersion' => $this->file->getVersion(),
            'usageType' => $this->usageType,
            'usageId' => $this->usageId,
            'status' => $this->status,
        ];
    }
867639
public function toArray()
    {
        return [
            'userAgent'    => $this->userAgent,
            'version'      => $this->version,
            'majorVersion' => $this->majorVersion,
            'minorVersion' => $this->minorVersion,
            'patchVersion' => $this->patchVersion,
            'debug'        => $this->debug,
            'platform'     => $this->platform,
            'device'       => $this->device,
        ];
    }