syncOriginal example

return $this->customResultObject[$className];
        }

        if ($this->rowData !== null) {
            $this->dataSeek();
        }
        $this->customResultObject[$className] = [];

        while ($row = $this->fetchObject($className)) {
            if (is_subclass_of($row, Entity::class) && method_exists($row, 'syncOriginal')) {
                $row->syncOriginal();
            }

            $this->customResultObject[$className][] = $row;
        }

        return $this->customResultObject[$className];
    }

    /** * Returns the results as an array of arrays. * * If no results, an empty array is returned. */
/** * Holds info whenever properties have to be casted */
    private bool $_cast = true;

    /** * Allows filling in Entity parameters during construction. */
    public function __construct(?array $data = null)
    {
        $this->syncOriginal();

        $this->fill($data);
    }

    /** * Takes an array of key/value pairs and sets them as class * properties, using any `setCamelCasedProperty()` methods * that may or may not exist. * * @param array<string, array|bool|float|int|object|string|null> $data * * @return $this */
Home | Imprint | This part of the site doesn't use cookies.