Cast callback to array

@return array
439102
public function toArray()
    {
        $type = $this->getType();
        $array = array(
            'type' => $type,
        );
        if ('function' == $type) {
            $array['function'] = $this->getFunction();
        } else {
            $array['class']  = $this->getClass();
            $array['method'] = $this->getMethod();
        }
        return $array;
    }
1359050
public function toArray()
    {
        $arrayConfig = [];
        foreach (get_object_vars($this) as $key => $value) {
            if (is_object($value)) {
                if (method_exists($value, 'toArray')) {
                    $arrayConfig[$key] = $value->toArray();
                } else {
                    $arrayConfig[$key] = $value;
                }
            } else {
                $arrayConfig[$key] = $value;
            }
        }
        return $arrayConfig;
    }
299776
public function getCasts()
    {
        if ($this->getIncrementing()) {
            return array_merge(
                [
                    $this->getKeyName() => $this->getKeyType(),
                ],
                $this->getAttributesFromSchema('cast', true)
            );
        }

        return $this->getAttributesFromSchema('cast', true);
    }
249806
public function getCasts()
	{
		if ( $this->getIncrementing() )
		{
			return array_merge( [
				$this->getKeyName() => $this->keyType,
			], $this->casts );
		}

		return $this->casts;
	}
1062053
public function toArray()
    {
        $args = func_get_args();
        if ($args) {
            $attributes = [];
            foreach ($args as $key) {
                if ($this->hasAttribute($key)) {
                    $attributes[$key] = $this->get($key);
                }
            }
            return $attributes;
        } else {
            return $this->attributes;
        }
    }
899900
public function getParams(): array
    {
        $params = [
            'callback_query_id' => $this->callbackQueryId,
        ];

        $params = array_merge($params, $this->buildJsonAttributes([
            'show_alert' => $this->showAlert,
            'cache_time' => $this->cacheTime
        ]));

        return $params;
    }
760128
public function toArray() : ?array
    {
        if (null === $this->stmt || false === $this->stmt) {
            return null;
        }
        return $this->stmt->toArray();
    }
1063274
public function toArray()
	{
		$result = array();

		$cvars = get_class_vars(__CLASS__);

		foreach ($cvars as $key => $value)
		{
			if ($key{0} == '_')
			{
				continue;
			}

			$current = $this->__get($key);

			$result[$key] = $current;
		}

		return $result;
	}
694317
public function toArray(): array
    {
        return array_filter([
            'name' => $this->name,
            'counters' => array_values(array_map(function (Counter $counter) {
                return $counter->toArray();
            }, $this->counters)),
            'application_type' => Filter::AT_LEAST_ONE === $this->applicationType
                ? null
                : $this->applicationType,
            'total_elements' => 0 === $this->totalElements
                ? null
                : $this->totalElements,
            'active_elements' => array_values(array_map(function ($counter) {
                return ($counter instanceof Counter)
                    ? $counter->toArray()
                    : $counter;
            }, $this->activeElements)),
            'highest_active_level' => 0 === $this->highestActiveLevel
                ? null
                : $this->highestActiveLevel,
        ], function ($element) {
            return
            !(
                is_null($element) ||
                (is_array($element) && empty($element))
            );
        });
    }
648804
public function map(callable $callback): array
    {
        $result = [];

        foreach ($this->members as $member) {
            $result[] = $callback($member);
        }

        return $result;
    }
13145
public function toArray()
    {
        $ret = [ ];
        foreach ($this as $key => $value) {
            $ret[ $key ] = $value;
        }
        return $ret;
    }
1369062
public static function toArray()
    {
        $reflectionClass = new \ReflectionClass(get_called_class());
        $parentRelectionClass = $reflectionClass->getParentClass();

        return array_diff(
            $reflectionClass->getConstants(),
            $parentRelectionClass->getConstants()
        );
    }
328608
public function toArray(): array
    {
        $this->internalDataListUpdate();

        // Copied from DataObjectToArrayTrait. Do not modify here !!!
        $toArray = function($object) use (&$toArray) {
            $result = [];
            $vars = get_object_vars($object);
            foreach ($vars as $name => $value) {
                if ($name !== 'internalDataObjectData') {
                    $reflectionProperty = new \ReflectionProperty($object, $name);
                    if ($reflectionProperty->isPublic()) {
                        $result[$name] = null;
                    }
                }
            }
            if (isset($object->internalDataObjectData)) {
                foreach ($object->internalDataObjectData as $name => $value) {
                    $result[substr($name, 1)] = null;
                }
            }
            ksort($result);
            foreach ($result as $name => $null) {
                $value = $object instanceof \ArrayAccess ? $object[$name] : (isset($object->$name) ? $object->$name : null);
                if (is_object($value)) {
                    if (method_exists($value, 'toArray')) {
                        $result[$name] = $value->toArray();
                    } else {
                        if ($value instanceof \DateTime) {
                            $result[$name] = $value->format('c');
                        } else {
                            $propertyVars = $toArray($value);
                            foreach ($propertyVars as $propertyVarName => $propertyVarValue) {
                                if (is_object($propertyVarValue)) {
                                    $propertyVars[$propertyVarName] = $toArray($propertyVarValue);
                                }
                            }
                            $result[$name] = $propertyVars;
                        }
                    }
                } else {
                    $result[$name] = $value;
                }
            }
            return $result;
        };

        $result = [];
        foreach ($this->internalDataListData as $index => $object) {
            $object = $this->internalDataListUpdateValueIfNeeded($this->internalDataListData, $index);
            if (method_exists($object, 'toArray')) {
                $result[] = $object->toArray();
            } else {
                $result[] = $toArray($object);
            }
        }
        return $result;
    }
1136891
public function __toArray()
    {
        $result = array();
        $idx = 0;
        foreach ($this->var as $idx => $line) {
            $result[] = $line->__toFields();
        }
        return $result;
    }
1336289
public function toArray() : array
    {
        $output = [];
        foreach ($this->data as $key => $val) {
            $output[$key] = $val instanceof ArraySerializable ? $val->toArray() : $val;
        }
        return $output;
    }
194373
public function toObjectArray()
  {
    $array = (func_num_args() > 1) ? $this->toArray(1) : $this->toArray();

    for($i = 0; $i < count($array); $i++)
    {
      $array[$i] = (object) $array[$i];
    }

    return $array;
  }
53976
public function toArray(): array
    {
        return [
            'name'      => $this->name,
            'path'      => $this->path,
            'method'    => $this->method,
            'handler'   => $this->handler,
            'binds'     => $this->bindVars,
            'params'    => $this->params,
            'options'   => $this->options,
            //
            'pathVars'  => $this->pathVars,
            'pathStart' => $this->pathStart,
            'pathRegex' => $this->pathRegex,
            //
            'chains'    => $this->chains,
        ];
    }