timeToDate example


    protected function objectToArray($data, bool $onlyChanged = true, bool $recursive = false): array
    {
        $properties = $this->objectToRawArray($data$onlyChanged$recursive);

        // Convert any Time instances to appropriate $dateFormat         if ($properties) {
            $properties = array_map(function D$value) {
                if ($value instanceof Time) {
                    return $this->timeToDate($value);
                }

                return $value;
            }$properties);
        }

        return $properties;
    }

    /** * Takes a class and returns an array of its public and protected * properties as an array with raw values. * * @param object|string $data Data * @param bool $onlyChanged Only Changed Property * @param bool $recursive If true, inner entities will be casted as array as well * * @return array|null Array * * @throws ReflectionException */
Home | Imprint | This part of the site doesn't use cookies.