Build and return the class representation as an array.

@return array
@throws \Exception If the current representation mode cannot be used
547310
public function toArray()
    {
        $fn = 'toArray' . ucfirst($this->presentation);
        if (!method_exists($this, $fn)) {
            throw new \Exception('There is no method ' . $fn . '.');
        }
        return $this->$fn();
    }
564408
public function toArray()
    {
        return array(
            'id' => $this->getId(),
            'name' => $this->getName(),
            'description' => $this->getDescription(),
            'is_active' => $this->getIsActive(),
            'unit' => $this->getUnit()
        );
    }
801012
public function toArray()
    {
        $this->buildGroupsCollection();

        return parent::toArray() + [
                'stub'             => $this->stubElements,
                'name'             => $this->relationName,
                'label'            => $this->label,
                'groups'           => $this->groups,
                'remove'           => $this->toRemove,
                'newEntitiesCount' => $this->new,
                'limit'            => $this->limit,
            ];
    }
43428
public function toArray()
    {
        $result = array();
        if($entity = $this->getIterator()->current()) {
            $result = $entity->toArray();
        }

        return $result;
    }
827327
public function toArray()
    {
        $array = array();

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

        return $array;
    }
498396
public function toArray()
    {
        $result = [
            'command' => $this->_command,
            'arguments' => $this->_args,
            'options' => $this->_options,
            'subcommands' => $this->_subcommands,
            'description' => $this->_description,
            'epilog' => $this->_epilog
        ];

        return $result;
    }
125320
public function toArray(): array
    {
        $result = [];
        foreach (static::getInstanceProperties() as $key) {
            $result[$key] = $this->$key;
        }

        return $result;
    }
501842
public function toArray()
    {
        $data = $this->_data;
        $data['message'] = $this->getMessage();
        $data['code'] = $this->getCode();
        $data['key'] = $this->getkey();
        $data = array_reverse($data);

        return $data;
    }
785755
public function toArray()
    {
        $this->dataType('array');
        
        $this->execute();
        
        if ($this->def['savePath']) {
            return $this->save();
        } elseif ($this->def['verbose']) {
            return $this->getVerboseResponse();
        }
        
        return $this->getError() ? : json_decode($this->responseText, true);
    }
68779
public function toArray() : array
    {
        $result = [];

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

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

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

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

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

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

        if (!empty($this->source)) {
            $result['source'] = $this->source->map(function ($item) {
                return $item;
            });
        }

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

        if (!empty($this->exception)) {
            $e = $this->exception;
            if ($e instanceof ExtendedLoggingInformation) {
                $result['exception'] = $e->context();
            } else {
                $result['exception'] = [
                    'exception' => get_class($e),
                    'message' => $e->getMessage(),
                    'stacktrace' => $e->getTrace(),
                ];
            }
        }

        return $result;
    }
856004
public function toArray()
	{
		$result = [];
		
		foreach (get_class_methods($this) as $method)
		{
			if (stripos($method, 'get') === 0)
			{
				$result[strtolower(substr($method, 3))] = $this->{$method}();
			}
		}
		
		return $result;
	}
90863
public function toArray()
    {
        return array(
            "resourceId" => $this->resourceId,
            "operation" => $this->operation,
            "specTypes" => $this->specTypes,
            "storeName" => $this->storeName,
            "podName" => $this->podName
        );
    }
536058
public function toArray()
    {
        return [
            'name'                  => $this->name,
            'label'                 => $this->label,
            'description'           => $this->description,
            'class_name'            => $this->className,
            'singleton'             => $this->singleton,
            'read_only'             => $this->readOnly,
            'subscription_required' => $this->subscriptionRequired,
        ];
    }
1043480
public function toArray()
    {
        return array_map(static function ($value) {
            if ($value instanceof ArraySerializableInterface) {
                $value = $value->toArray();
            }
            return $value;
        }, get_object_vars($this));
    }
17231
public function toArray()
    {
        $response = [
            'type' => $this->type,
            'className' => $this->className
        ];

        if (count($this->properties)) {
            $response['properties'] = [];

            foreach ($this->properties as $property) {
                $response['properties'][$property->getName()] = $property->toArray();
            }
        }

        return $response;
    }
251044
public function toArray()
    {
        $classData = [];
        foreach ($this->getReflector()->getProperties(\ReflectionProperty::IS_PROTECTED) as $reflectionProperty) {
            if (!$reflectionProperty->isStatic()) {
                $reflectionProperty->setAccessible(true);
                $classData[$reflectionProperty->getName()] = $reflectionProperty->getValue($this);
            }
        }
        return $classData;
    }
901003
public function toArray() {
        $params = array();
        foreach ($this->getParams() as $param) {
            $params[$param->getName()] = $param->toArray();
        }
        $m = array(
            //'description',
            //'transport' => null,
            'parameters' => $params,
            //'returns' => null
        );
        if ($this->use_canonical) {
            $m['target'] = $this->smd->getTarget(). '/' . $this->service->getDottedClassname() . '.' . $this->getName();
        }
        return $m;
    }