From 1ff5c35de5dbd70a782875a91dd2232fd01b002b Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 28 Apr 2024 14:38:04 +0200 Subject: Adding upstream version 0.10.1. Signed-off-by: Daniel Baumann --- .../ipl/orm/src/Common/PropertiesWithDefaults.php | 31 +++++++++++ vendor/ipl/orm/src/Common/SortUtil.php | 65 ++++++++++++++++++++++ 2 files changed, 96 insertions(+) create mode 100644 vendor/ipl/orm/src/Common/PropertiesWithDefaults.php create mode 100644 vendor/ipl/orm/src/Common/SortUtil.php (limited to 'vendor/ipl/orm/src/Common') diff --git a/vendor/ipl/orm/src/Common/PropertiesWithDefaults.php b/vendor/ipl/orm/src/Common/PropertiesWithDefaults.php new file mode 100644 index 0000000..e8d3a84 --- /dev/null +++ b/vendor/ipl/orm/src/Common/PropertiesWithDefaults.php @@ -0,0 +1,31 @@ +properties[$key]) && $this->properties[$key] instanceof Closure) { + $this->setProperty($key, $this->properties[$key]($this, $key)); + } + + return $this->parentGetProperty($key); + } + + public function getIterator(): Traversable + { + foreach ($this->properties as $key => $value) { + if (! $value instanceof Closure) { + yield $key => $value; + } + } + } +} diff --git a/vendor/ipl/orm/src/Common/SortUtil.php b/vendor/ipl/orm/src/Common/SortUtil.php new file mode 100644 index 0000000..0e014e9 --- /dev/null +++ b/vendor/ipl/orm/src/Common/SortUtil.php @@ -0,0 +1,65 @@ +