@return array

An array suitable for passing to \PaulJulio\StreamJson\StreamJson
434700
public function getAsArray() {
        $a = ['type'=>$this->type];
        switch ($this->type) {
            case ResponseSpeechSO::TYPE_PLAIN_TEXT:
                $a['text'] = $this->text;
                break;
            case ResponseSpeechSO::TYPE_SSML:
                $a['ssml'] = $this->ssml;
                break;
        }
        return $a;
    }
752656
public function jsonSerialize()
    {
        return [
            'draw'            => (int) $this->draw,
            'recordsTotal'    => (int) $this->recordsTotal,
            'recordsFiltered' => (int) $this->recordsFiltered,
            'data'            => $this->data,
        ];
    }
1169434
public function toArray()
    {
        $result             = parent::toArray();
        $result['mediaId']  = $this->mediaId;
        $result['format']   = $this->format;

        return $result;
    }
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;
    }
1068154
public function toArray()
    {
        $array = [];

        foreach ($this->items as $key => $value) {
            if ($value instanceof ExportableInterface) {
                $array[$key] = $value->toArray();
            } else {
                $array[$key] = $value;
            }
        }

        return $array;
    }
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)
		];
	}
233430
function jsonSerialize()
    {
        $result = [
            'title'        => $this->getTitle(),
            'link'         => $this->getLink(),
            'publicId'     => $this->getPublicId(),
            'description'  => $this->getDescription(),
            'lastModified' => $this->getLastModified()->format(\DateTime::ATOM),
            'url'          => $this->getUrl(),
            'items'        => $this->getItems(),
            'relations'    => $this->getRelations(),
        ];
        return $result;
    }
318859
public function toJsonArray() {
        $array = $this->_properties;
        foreach ($array as $key => $value) {
            if (in_array($key, $this->fields) && !is_null($value)) {
                $parser = $this->getParser($key);
                $array[$key] = $parser->unparse($value);
            }
            else unset($array[$key]);
        }
        return $array;
    }
1336289
public function toArray() : array
    {
        $output = [];
        foreach ($this->data as $key => $val) {
            $output[$key] = $val instanceof ArraySerializable ? $val->toArray() : $val;
        }
        return $output;
    }
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,
        ];
    }
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);
    }
1260050
public function jsonSerialize()
    {
        // @codeCoverageIgnoreStart
        if ( ! $this->originalFilename()) {
            return [];
        }
        // @codeCoverageIgnoreEnd

        $data = [];

        foreach ($this->variants(true) as $variant) {
            $data[ $variant ] = [
                'path' => $this->variantPath($variant),
                'url'  => $this->url($variant)
            ];
        }

        return $data;
    }
1224189
public function jsonSerialize()
    {
        return array_filter(
            [
                'enable' => $this->getEnable(),
                'utm_source' => $this->getCampaignSource(),
                'utm_medium' => $this->getCampaignMedium(),
                'utm_term' => $this->getCampaignTerm(),
                'utm_content' => $this->getCampaignContent(),
                'utm_campaign' => $this->getCampaignName()
            ],
            function ($value) {
                return $value !== null;
            }
        ) ?: null;
    }
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;
    }
596657
public function jsonSerialize()
    {
        $data = [];

        foreach ($this as $element) {
            if ($element instanceof \JsonSerializable) {
                $data[] = $element->jsonSerialize();
            }
        }

        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,
        ];
    }
641957
public function toArray() : array
    {
        $output = [];
        foreach ($this->entries as $entry) {
            $output[] = $entry instanceof ArraySerializable ? $entry->toArray() : $entry;
        }
        return $output;
    }