Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1c03860fc4 | ||
|
|
47aa384c4b | ||
|
|
7954d83f52 | ||
|
|
75fb7ba155 | ||
|
|
ec061bcd9f | ||
|
|
9855a00451 | ||
|
|
9507a1e596 | ||
|
|
f197443871 |
No files matched your search
@@ -0,0 +1,64 @@
|
|||||||
|
#### Date Field Symbol Table
|
||||||
|
|
||||||
|
source: https://unicode-org.github.io/icu/userguide/format_parse/datetime/#date-field-symbol-table
|
||||||
|
|
||||||
|
| Symbol | Meaning | Pattern | Example Output |
|
||||||
|
| --- | --- | --- | --- |
|
||||||
|
| `G` | era designator | `G`, `GG`, or `GGG`<br/>`GGGG`<br/>`GGGGG` | AD<br/>Anno Domini<br/>A |
|
||||||
|
| `y` | year | `yy`<br/>`y` or `yyyy` | 96<br/>1996 |
|
||||||
|
| `Y` | year in “Week of Year” based calendars in which the year transition occurs on a week boundary; may differ from calendar year ‘y’ near a year transition. This year designation is used with pattern character ‘w’ in the ISO 8601 year-week calendar, for example. | `Y` | 1997 |
|
||||||
|
| `u` | extended year | `u` | 4601 |
|
||||||
|
| `U` | cyclic year name, as in Chinese lunar calendar | `U` | 甲子 |
|
||||||
|
| `r` | related Gregorian year | `r` | 1996 |
|
||||||
|
| `Q` | quarter | `Q`<br/>`QQ`<br/>`QQQ`<br/>`QQQQ`<br/>`QQQQQ` | 2<br/>02<br/>Q2<br/>2nd quarter<br/>2 |
|
||||||
|
| `q` | stand-alone quarter | `q`<br/>`qq`<br/>`qqq`<br/>`qqqq`<br/>`qqqqq` | 2<br/>02<br/>Q2<br/>2nd quarter<br/>2 |
|
||||||
|
| `M` | month in year | `M`<br/>`MM`<br/>`MMM`<br/>`MMMM`<br/>`MMMMM` | 9<br/>09<br/>Sep<br/>September<br/>S |
|
||||||
|
| `L` | stand-alone month in year | `L`<br/>`LL`<br/>`LLL`<br/>`LLLL`<br/>`LLLLL` | 9<br/>09<br/>Sep<br/>September<br/>S |
|
||||||
|
| `w` | week of year | `w`<br/>`ww` | 27<br/>27 |
|
||||||
|
| `W` | week of month | `W` | 2 |
|
||||||
|
| `d` | day in month | `d`<br/>`dd` | 2<br/>02 |
|
||||||
|
| `D` | day of year | `D` | 189 |
|
||||||
|
| `F` | day of week in month | `F` | 2 (2nd Wed in July) |
|
||||||
|
| `g` | modified julian day | `g` | 2451334 |
|
||||||
|
| `E` | day of week | `E,` `EE`, or `EEE`<br/>`EEEE`<br/>`EEEEE`<br/>`EEEEEE` | Tue<br/>Tuesday<br/>T<br/>Tu |
|
||||||
|
| `e` | local day of week<br/>example: if Monday is 1st day, Tuesday is 2nd ) | `e`<br>`ee`<br/>`eee`<br/>`eeee`<br/>`eeeee`<br/>`eeeeee` | 2<br>02<br/>Tue<br/>Tuesday<br/>T<br/>Tu |
|
||||||
|
| `c` | stand-alone local day of week | `c` or `cc`<br/>`ccc`<br/>`cccc`<br/>`ccccc`<br/>`cccccc` | 2<br/>Tue<br/>Tuesday<br/>T<br/>Tu |
|
||||||
|
| `a` | AM or PM | `a`, `aa`, or `aaa`<br/>`aaaa`<br/>`aaaaa` | PM [abbrev]<br/>PM [wide]<br/>p |
|
||||||
|
| `b` | am, pm, noon, midnight | `b`, `bb`, or `bbb`<br/>`bbbb`<br/>`bbbbb` | mid.<br/>midnight<br/>md |
|
||||||
|
| `B` | flexible day periods | `B`, `BB`, or `BBB`<br/>`BBBB`<br/>`BBBBB` | at night [abbrev]<br/>at night [wide]<br/>at night [narrow] |
|
||||||
|
| `h` | hour in am/pm (1~12) | `h`<br/>`hh` | 7<br/>07 |
|
||||||
|
| `H` | hour in day (0~23) | `H`<br/>`HH` | 0<br/>00 |
|
||||||
|
| `k` | hour in day (1~24) | `k`<br/>`kk` | 24<br/>24 |
|
||||||
|
| `K` | hour in am/pm (0~11) | `K`<br/>`KK` | 0<br/>00 |
|
||||||
|
| `m` | minute in hour | `m`<br/>`mm` | 4<br/>04 |
|
||||||
|
| `s` | second in minute | `s`<br/>`ss` | 5<br/>05 |
|
||||||
|
| `S` | fractional second - truncates (like other time fields)<br/>to the count of letters when formatting. Appends<br/>zeros if more than 3 letters specified. Truncates at<br/>three significant digits when parsing. | `S`<br/>`SS`<br/>`SSS`<br/>`SSSS` | 2<br/>23<br/>235<br/>2350 |
|
||||||
|
| `A` | milliseconds in day | `A` | 61201235 |
|
||||||
|
| `z` | Time Zone: specific non-location | `z`, `zz`, or `zzz`<br/>`zzzz` | PDT<br/>Pacific Daylight Time |
|
||||||
|
| `Z` | Time Zone: ISO8601 basic hms? / RFC 822<br/>Time Zone: long localized GMT (=OOOO)<br/>Time Zone: ISO8601 extended hms? (=XXXXX) | `Z`, `ZZ`, or `ZZZ`<br/>`ZZZZ`<br/>`ZZZZZ` | -0800<br/>GMT-08:00<br/>-08:00, -07:52:58, Z |
|
||||||
|
| `O` | Time Zone: short localized GMT<br/>Time Zone: long localized GMT (=ZZZZ) | `O`<br/>`OOOO` | GMT-8<br/>GMT-08:00 |
|
||||||
|
| `v` | Time Zone: generic non-location<br/>(falls back first to VVVV) | `v`<br/>`vvvv` | PT<br/>Pacific Time or Los Angeles Time |
|
||||||
|
| `V` | Time Zone: short time zone ID<br/>Time Zone: long time zone ID<br/>Time Zone: time zone exemplar city<br/>Time Zone: generic location (falls back to OOOO) | `V`<br/>`VV`<br/>`VVV`<br/>`VVVV` | uslax<br/>America/Los_Angeles<br/>Los Angeles<br/>Los Angeles Time |
|
||||||
|
| `X` | Time Zone: ISO8601 basic hm?, with Z for 0<br/>Time Zone: ISO8601 basic hm, with Z<br/>Time Zone: ISO8601 extended hm, with Z<br/>Time Zone: ISO8601 basic hms?, with Z<br/>Time Zone: ISO8601 extended hms?, with Z | `X`<br/>`XX`<br/>`XXX`<br/>`XXXX`<br/>`XXXXX` | -08, +0530, Z<br/>-0800, Z<br/>-08:00, Z<br/>-0800, -075258, Z<br/>-08:00, -07:52:58, Z |
|
||||||
|
| `x` | Time Zone: ISO8601 basic hm?, without Z for 0<br/>Time Zone: ISO8601 basic hm, without Z<br/>Time Zone: ISO8601 extended hm, without Z<br/>Time Zone: ISO8601 basic hms?, without Z<br/>Time Zone: ISO8601 extended hms?, without Z | `x`<br/>`xx`<br/>`xxx`<br/>`xxxx`<br/>`xxxxx` | -08, +0530<br/>-0800<br/>-08:00<br/>-0800, -075258<br/>-08:00, -07:52:58 |
|
||||||
|
| `'` | escape for text | `'` | (nothing) |
|
||||||
|
| `''` | two single quotes produce one | `''` | ' |
|
||||||
|
|
||||||
|
> :point_right: **Note**: *Any characters in the pattern that are not in the ranges of
|
||||||
|
['a'..'z'] and ['A'..'Z'] will be treated as quoted text. For instance,
|
||||||
|
characters like `':'`, `'.'`, `' '`, `'#'` and `'@'` will appear in the resulting time
|
||||||
|
text even they are not enclosed within single quotes. The single quote is used to
|
||||||
|
'escape' letters. Two single quotes in a row, whether inside or outside a quoted
|
||||||
|
sequence, represent a 'real' single quote.*
|
||||||
|
|
||||||
|
> :point_right: **Note**: *A pattern containing any invalid pattern letter results in a failing `UErrorCode`
|
||||||
|
result during formatting or parsing.*
|
||||||
|
|
||||||
|
| Format Pattern | Result |
|
||||||
|
| --- | --- |
|
||||||
|
| `"yyyy.MM.dd G 'at' HH:mm:ss zzz"` | "1996.07.10 AD at 15:08:56 PDT" |
|
||||||
|
| `"EEE, MMM d, ''yy"` | "Wed, July 10, '96" |
|
||||||
|
| `"h:mm a"` | "12:08 PM" |
|
||||||
|
| `"hh 'o''clock' a, zzzz"` | "12 o'clock PM, Pacific Daylight Time" |
|
||||||
|
| `"K:mm a, z"` | "0:00 PM, PST" |
|
||||||
|
| `"yyyyy.MMMM.dd GGG hh:mm aaa"` | "01996.July.10 AD 12:08 PM" |
|
||||||
@@ -79,7 +79,7 @@ class MySQL implements AdapterInterface, MigrateInterface, SqlAdapterInterface {
|
|||||||
$pdo->setAttribute(\PDO::ATTR_EMULATE_PREPARES, false);
|
$pdo->setAttribute(\PDO::ATTR_EMULATE_PREPARES, false);
|
||||||
$pdo->setAttribute(\PDO::ATTR_AUTOCOMMIT, false);
|
$pdo->setAttribute(\PDO::ATTR_AUTOCOMMIT, false);
|
||||||
$pdo->setAttribute(\PDO::ATTR_DEFAULT_FETCH_MODE, \PDO::FETCH_ASSOC);
|
$pdo->setAttribute(\PDO::ATTR_DEFAULT_FETCH_MODE, \PDO::FETCH_ASSOC);
|
||||||
$pdo->setAttribute(\PDO::MYSQL_ATTR_USE_BUFFERED_QUERY, false);
|
$pdo->setAttribute(\Pdo\Mysql::ATTR_USE_BUFFERED_QUERY, false);
|
||||||
}
|
}
|
||||||
catch(\PDOException $ex){
|
catch(\PDOException $ex){
|
||||||
throw $ex;
|
throw $ex;
|
||||||
|
|||||||
@@ -0,0 +1,11 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace Ulmus\Attribute\Property\Field;
|
||||||
|
|
||||||
|
#[\Attribute(\Attribute::TARGET_PROPERTY)]
|
||||||
|
class Dataset {
|
||||||
|
public function __construct(
|
||||||
|
public bool $allowPull = true,
|
||||||
|
public bool $allowPush = true,
|
||||||
|
) {}
|
||||||
|
}
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace Ulmus\Attribute\Property\Field;
|
||||||
|
|
||||||
|
#[\Attribute(\Attribute::TARGET_PROPERTY)]
|
||||||
|
class Migration {
|
||||||
|
public function __construct(
|
||||||
|
public bool $skipField = false
|
||||||
|
) {}
|
||||||
|
}
|
||||||
@@ -5,6 +5,6 @@ namespace Ulmus\Attribute\Property;
|
|||||||
#[\Attribute(\Attribute::TARGET_PROPERTY | \Attribute::IS_REPEATABLE)]
|
#[\Attribute(\Attribute::TARGET_PROPERTY | \Attribute::IS_REPEATABLE)]
|
||||||
class Filter {
|
class Filter {
|
||||||
public function __construct(
|
public function __construct(
|
||||||
public string $method = ""
|
public \Closure|string $method
|
||||||
) {}
|
) {}
|
||||||
}
|
}
|
||||||
+1
-1
@@ -59,7 +59,7 @@ trait CacheTrait
|
|||||||
$this->eventRegister(new class($this->cache, $this->entityCacheKey()) implements Event\Query\Update {
|
$this->eventRegister(new class($this->cache, $this->entityCacheKey()) implements Event\Query\Update {
|
||||||
use Cache\CacheEventTrait;
|
use Cache\CacheEventTrait;
|
||||||
|
|
||||||
public function execute(RepositoryInterface $repository, object|array $entity, ?array $dataset = null, bool $replace = false): void
|
public function execute(RepositoryInterface $repository, object|array $entity, array $dataset, array $diff, bool $replace = false): void
|
||||||
{
|
{
|
||||||
$this->purgeCache();
|
$this->purgeCache();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ class EntityField implements WhereRawParameter
|
|||||||
$select = $this->entityResolver->searchFieldAnnotation($this->name, [Field\Select::class]);
|
$select = $this->entityResolver->searchFieldAnnotation($this->name, [Field\Select::class]);
|
||||||
|
|
||||||
if ($select) {
|
if ($select) {
|
||||||
return "(" . str_replace(['%NAME%'], [$fullname], $select->sql) . ") AS code";
|
return "(" . str_replace(['%NAME%'], [$fullname], $select->sql) . ") AS $name";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ class EntityResolver {
|
|||||||
|
|
||||||
public string $entityClass;
|
public string $entityClass;
|
||||||
|
|
||||||
public ReflectedClass $reflectedClass;
|
public readonly ReflectedClass $reflectedClass;
|
||||||
|
|
||||||
protected array $fieldList = [];
|
protected array $fieldList = [];
|
||||||
|
|
||||||
@@ -129,6 +129,11 @@ class EntityResolver {
|
|||||||
return $this->reflectedClass->getProperties(true)[$name]->getTypes()[0]->type ?? false;
|
return $this->reflectedClass->getProperties(true)[$name]->getTypes()[0]->type ?? false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function searchPropertyAttributeList(array|string $className, bool $deepSearch = true) : array
|
||||||
|
{
|
||||||
|
return $this->reflectedClass->getPropertyAttributeListFromClassname($className, $deepSearch, false);
|
||||||
|
}
|
||||||
|
|
||||||
public function searchFieldAnnotation(string $field, array|object|string $annotationType, bool $caseSensitive = true) : ? object
|
public function searchFieldAnnotation(string $field, array|object|string $annotationType, bool $caseSensitive = true) : ? object
|
||||||
{
|
{
|
||||||
return $this->searchFieldAnnotationList($field, $annotationType, $caseSensitive)[0] ?? null;
|
return $this->searchFieldAnnotationList($field, $annotationType, $caseSensitive)[0] ?? null;
|
||||||
@@ -136,8 +141,6 @@ class EntityResolver {
|
|||||||
|
|
||||||
public function searchFieldAnnotationList(string $field, array|object|string $attributeType, bool $caseSensitive = true) : false|array
|
public function searchFieldAnnotationList(string $field, array|object|string $attributeType, bool $caseSensitive = true) : false|array
|
||||||
{
|
{
|
||||||
$list = [];
|
|
||||||
|
|
||||||
$properties = $this->reflectedClass->getProperties(true);
|
$properties = $this->reflectedClass->getProperties(true);
|
||||||
|
|
||||||
$search = $caseSensitive ? $properties : array_change_key_case($properties, \CASE_LOWER);
|
$search = $caseSensitive ? $properties : array_change_key_case($properties, \CASE_LOWER);
|
||||||
|
|||||||
@@ -1,143 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
namespace Ulmus\Common;
|
|
||||||
|
|
||||||
use PDO,
|
|
||||||
PDOStatement;
|
|
||||||
|
|
||||||
class PdoObject extends PDO {
|
|
||||||
|
|
||||||
public static ? string $dump = null;
|
|
||||||
|
|
||||||
public bool $executionStatus;
|
|
||||||
|
|
||||||
public int $rowCount = 0;
|
|
||||||
|
|
||||||
public mixed $lastInsertId = null;
|
|
||||||
|
|
||||||
public \Closure $onClose;
|
|
||||||
|
|
||||||
public function select(string $sql, array $parameters = []): PDOStatement
|
|
||||||
{
|
|
||||||
static::$dump && call_user_func_array(static::$dump, [ $this->fillDebugSqlParameters($sql, $parameters) ]);
|
|
||||||
|
|
||||||
try {
|
|
||||||
if (false !== ( $statement = $this->prepare($sql) )) {
|
|
||||||
$statement->setFetchMode(\PDO::FETCH_ASSOC);
|
|
||||||
$this->execute($statement, $parameters, false);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
catch (\Throwable $e) {
|
|
||||||
throw new \PdoException($e->getMessage() . " `$sql` with data:" . json_encode($parameters));
|
|
||||||
}
|
|
||||||
|
|
||||||
return $statement;
|
|
||||||
}
|
|
||||||
|
|
||||||
public function __destruct()
|
|
||||||
{
|
|
||||||
if ($this->onClose ?? null) {
|
|
||||||
call_user_func($this->onClose, $this);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public function runQuery(string $sql, array $parameters = []): ? static
|
|
||||||
{
|
|
||||||
static::$dump && call_user_func_array(static::$dump, [ $this->fillDebugSqlParameters($sql, $parameters) ]);
|
|
||||||
|
|
||||||
try {
|
|
||||||
if (false !== ( $statement = $this->prepare($sql) )) {
|
|
||||||
return $this->execute($statement, $parameters, true);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
catch(\PDOException $pdo) {
|
|
||||||
if (!str_starts_with($pdo->getMessage(), 'There is no active transaction')) {
|
|
||||||
throw $pdo;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
catch (\Throwable $e) {
|
|
||||||
throw new \PdoException($e->getMessage() . " `$sql` with data:" . json_encode($parameters), (int) $e->getCode(), $e);
|
|
||||||
}
|
|
||||||
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
public function runInsertQuery(string $sql, array $parameters = []) : ? static
|
|
||||||
{
|
|
||||||
return $this->runQuery($sql, $parameters);
|
|
||||||
}
|
|
||||||
|
|
||||||
public function runUpdateQuery(string $sql, array $parameters = []) : ? static
|
|
||||||
{
|
|
||||||
return $this->runQuery($sql, $parameters);
|
|
||||||
}
|
|
||||||
|
|
||||||
public function runDeleteQuery(string $sql, array $parameters = []) : ? static
|
|
||||||
{
|
|
||||||
return $this->runQuery($sql, $parameters);
|
|
||||||
}
|
|
||||||
|
|
||||||
public function execute(PDOStatement $statement, array $parameters = [], bool $commit = true) : ? static
|
|
||||||
{
|
|
||||||
$this->executionStatus = false;
|
|
||||||
$this->lastInsertId = null;
|
|
||||||
|
|
||||||
try {
|
|
||||||
if (! $this->inTransaction()) {
|
|
||||||
$this->beginTransaction();
|
|
||||||
}
|
|
||||||
|
|
||||||
$this->bindVariables($statement, $parameters);
|
|
||||||
|
|
||||||
$this->executionStatus = $statement->execute();
|
|
||||||
|
|
||||||
if ( $this->executionStatus ) {
|
|
||||||
$this->lastInsertId = $this->lastInsertId();
|
|
||||||
$this->rowCount = $statement->rowCount();
|
|
||||||
|
|
||||||
if ( $commit ) {
|
|
||||||
$this->commit();
|
|
||||||
}
|
|
||||||
|
|
||||||
return $this;
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
throw new \PDOException($statement->errorCode() . " - " . json_encode($statement->errorInfo()));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
catch (\PDOException $e) {
|
|
||||||
$this->rollback();
|
|
||||||
|
|
||||||
throw $e;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
protected function bindVariables(PDOStatement $statement, array &$parameters) : void
|
|
||||||
{
|
|
||||||
if ($parameters) {
|
|
||||||
if (array_is_list($parameters)) {
|
|
||||||
$parameters = array_combine(range(1, count($parameters)), array_values($parameters));
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
foreach ($parameters as $key => $value) {
|
|
||||||
$type = match (strtolower(gettype($value))) {
|
|
||||||
"boolean", "integer" => Pdo::PARAM_INT,
|
|
||||||
"null" => Pdo::PARAM_NULL,
|
|
||||||
default => Pdo::PARAM_STR,
|
|
||||||
};
|
|
||||||
|
|
||||||
$statement->bindValue($key, $value, $type);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
protected function fillDebugSqlParameters(string $sql, array $parameters) : string
|
|
||||||
{
|
|
||||||
$parameters = array_reverse($parameters);
|
|
||||||
|
|
||||||
return str_replace(array_keys($parameters), array_map(fn($e) => is_numeric($e) ? $e : (
|
|
||||||
is_bool($e) ? (int) $e : $this->quote($e)
|
|
||||||
), array_values($parameters)), $sql);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,43 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
namespace Ulmus\Common\PdoObject;
|
|
||||||
|
|
||||||
class SqlPdoObject extends \Ulmus\Common\PdoObject
|
|
||||||
{
|
|
||||||
protected int $openedTransaction = 0;
|
|
||||||
|
|
||||||
public function beginTransaction(): bool
|
|
||||||
{
|
|
||||||
if ( 0 === $this->openedTransaction++ ) {
|
|
||||||
return $this->openTransaction();
|
|
||||||
}
|
|
||||||
|
|
||||||
return $this->exec("SAVEPOINT transaction_{$this->openedTransaction}") !== false;
|
|
||||||
}
|
|
||||||
|
|
||||||
public function commit() : bool
|
|
||||||
{
|
|
||||||
if ( 0 === --$this->openedTransaction) {
|
|
||||||
return parent::commit();
|
|
||||||
}
|
|
||||||
|
|
||||||
return $this->exec("RELEASE SAVEPOINT transaction_{$this->openedTransaction}") !== false;
|
|
||||||
}
|
|
||||||
|
|
||||||
public function rollback() : bool
|
|
||||||
{
|
|
||||||
if ($this->openedTransaction > 1) {
|
|
||||||
return $this->exec('ROLLBACK TO transaction_' . $this->openedTransaction--) !== false;
|
|
||||||
}
|
|
||||||
elseif ($this->openedTransaction-- === 1) {
|
|
||||||
return parent::rollback();
|
|
||||||
}
|
|
||||||
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
protected function openTransaction() : bool
|
|
||||||
{
|
|
||||||
return parent::beginTransaction();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,40 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
namespace Ulmus\Common\PdoObject;
|
|
||||||
|
|
||||||
class SqlitePdoObject extends SqlPdoObject
|
|
||||||
{
|
|
||||||
public bool $inTransaction = false;
|
|
||||||
|
|
||||||
public function inTransaction(): bool
|
|
||||||
{
|
|
||||||
return $this->openedTransaction > 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
public function commit(): bool
|
|
||||||
{
|
|
||||||
if ( 0 === --$this->openedTransaction) {
|
|
||||||
return $this->exec("COMMIT") !== false;
|
|
||||||
}
|
|
||||||
|
|
||||||
return $this->exec("RELEASE SAVEPOINT transaction_{$this->openedTransaction}") !== false;
|
|
||||||
}
|
|
||||||
|
|
||||||
public function rollback() : bool
|
|
||||||
{
|
|
||||||
if ($this->openedTransaction > 1) {
|
|
||||||
return $this->exec('ROLLBACK TO transaction_' . $this->openedTransaction--) !== false;
|
|
||||||
}
|
|
||||||
elseif ($this->openedTransaction-- === 1) {
|
|
||||||
# We must do it manually since opening a transaction manually stucks PDO into thinking we've got no transaction opened
|
|
||||||
return $this->exec('ROLLBACK') !== false;
|
|
||||||
}
|
|
||||||
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
protected function openTransaction(): bool
|
|
||||||
{
|
|
||||||
return $this->exec("BEGIN IMMEDIATE TRANSACTION") !== false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -11,7 +11,6 @@ use Ulmus\Ulmus;
|
|||||||
|
|
||||||
class DatasetHandler
|
class DatasetHandler
|
||||||
{
|
{
|
||||||
|
|
||||||
public function __construct(
|
public function __construct(
|
||||||
protected EntityResolver $entityResolver,
|
protected EntityResolver $entityResolver,
|
||||||
protected bool $entityStrictFieldsDeclaration = false,
|
protected bool $entityStrictFieldsDeclaration = false,
|
||||||
@@ -20,6 +19,10 @@ class DatasetHandler
|
|||||||
public function pull(object $entity, bool $nullable = true) : Generator
|
public function pull(object $entity, bool $nullable = true) : Generator
|
||||||
{
|
{
|
||||||
foreach($this->entityResolver->fieldList(EntityResolver::KEY_ENTITY_NAME, true) as $key => $field) {
|
foreach($this->entityResolver->fieldList(EntityResolver::KEY_ENTITY_NAME, true) as $key => $field) {
|
||||||
|
if (false === ($this->entityResolver->searchFieldAnnotation($key,[ Field\Dataset::class ])->allowPull ?? true)) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
$attribute = $this->entityResolver->searchFieldAnnotation($key,[ Field::class ]);
|
$attribute = $this->entityResolver->searchFieldAnnotation($key,[ Field::class ]);
|
||||||
|
|
||||||
if ( $entity->__isset($key) ) {
|
if ( $entity->__isset($key) ) {
|
||||||
@@ -28,6 +31,7 @@ class DatasetHandler
|
|||||||
elseif ( $nullable && $field->allowsNull() ) {
|
elseif ( $nullable && $field->allowsNull() ) {
|
||||||
yield $attribute->name ?? $key => null;
|
yield $attribute->name ?? $key => null;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -36,6 +40,10 @@ class DatasetHandler
|
|||||||
$unmatched = [];
|
$unmatched = [];
|
||||||
|
|
||||||
foreach($dataset as $key => $value) {
|
foreach($dataset as $key => $value) {
|
||||||
|
if (false === ($this->entityResolver->searchFieldAnnotation($key,[ Field\Dataset::class ])->allowPush ?? true)) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
$field = $this->entityResolver->field(strtolower($key), EntityResolver::KEY_COLUMN_NAME, false) ?? $this->entityResolver->field(strtolower($key), EntityResolver::KEY_LC_ENTITY_NAME, false);
|
$field = $this->entityResolver->field(strtolower($key), EntityResolver::KEY_COLUMN_NAME, false) ?? $this->entityResolver->field(strtolower($key), EntityResolver::KEY_LC_ENTITY_NAME, false);
|
||||||
|
|
||||||
if ( $field === null ) {
|
if ( $field === null ) {
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ trait DatetimeTrait
|
|||||||
return $obj;
|
return $obj;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function setTime($hour, $minute, $second = 0, $microsecond = 0) : \DateTimeInterface
|
public function setTime($hour, $minute, $second = 0, $microsecond = 0) : \DateTime
|
||||||
{
|
{
|
||||||
$fromParent = parent::setTime($hour, $minute, $second, $microsecond);
|
$fromParent = parent::setTime($hour, $minute, $second, $microsecond);
|
||||||
|
|
||||||
@@ -49,6 +49,8 @@ trait DatetimeTrait
|
|||||||
return strftime($format, $this->getTimestamp());
|
return strftime($format, $this->getTimestamp());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# patterns: https://unicode-org.github.io/icu/userguide/format_parse/datetime/#date-field-symbol-table
|
||||||
|
# see also 100-datetime-format.md file in DOC
|
||||||
public function formatLocaleIntl(int $dateFormatter = \IntlDateFormatter::LONG, int $timeFormatter = \IntlDateFormatter::NONE, ? string $pattern = null) : string
|
public function formatLocaleIntl(int $dateFormatter = \IntlDateFormatter::LONG, int $timeFormatter = \IntlDateFormatter::NONE, ? string $pattern = null) : string
|
||||||
{
|
{
|
||||||
$formatter = new \IntlDateFormatter(\Locale::getDefault(), $dateFormatter, $timeFormatter, \date_default_timezone_get(), \IntlDateFormatter::GREGORIAN, $pattern);
|
$formatter = new \IntlDateFormatter(\Locale::getDefault(), $dateFormatter, $timeFormatter, \date_default_timezone_get(), \IntlDateFormatter::GREGORIAN, $pattern);
|
||||||
@@ -58,7 +60,7 @@ trait DatetimeTrait
|
|||||||
|
|
||||||
public function ageAt(null|\DateTime $dateTime) : int
|
public function ageAt(null|\DateTime $dateTime) : int
|
||||||
{
|
{
|
||||||
return (int) ( (int) ($dateTime ?: new DateTime())->format('Ymd') - (int) $this->format('Ymd') ) / 10000;
|
return (int) (( (int) ($dateTime ?: new DateTime())->format('Ymd') - (int) $this->format('Ymd') ) / 10000);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function jsonSerialize(): mixed
|
public function jsonSerialize(): mixed
|
||||||
|
|||||||
@@ -322,7 +322,7 @@ class EntityCollection extends \ArrayObject implements \JsonSerializable {
|
|||||||
case is_string($value):
|
case is_string($value):
|
||||||
$value = (string) $value;
|
$value = (string) $value;
|
||||||
|
|
||||||
$list[$key] = $item->$value;
|
$list[(string) $key] = $item->$value;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,8 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace Ulmus\Pdo;
|
||||||
|
|
||||||
|
interface PdoDebugQueryInterface
|
||||||
|
{
|
||||||
|
public function debug(string $query) : void;
|
||||||
|
}
|
||||||
+12
-3
@@ -7,6 +7,8 @@ use PDO,
|
|||||||
|
|
||||||
trait PdoTrait
|
trait PdoTrait
|
||||||
{
|
{
|
||||||
|
public static PdoDebugQueryInterface $debugQuery;
|
||||||
|
|
||||||
public bool $executionStatus;
|
public bool $executionStatus;
|
||||||
|
|
||||||
public int $rowCount = 0;
|
public int $rowCount = 0;
|
||||||
@@ -17,9 +19,10 @@ trait PdoTrait
|
|||||||
|
|
||||||
public function select(string $sql, array $parameters = []): PDOStatement
|
public function select(string $sql, array $parameters = []): PDOStatement
|
||||||
{
|
{
|
||||||
# static::$dump && call_user_func_array(static::$dump, [ $this->fillDebugSqlParameters($sql, $parameters) ]);
|
isset(static::$debugQuery) && static::$debugQuery->debug($this->fillDebugSqlParameters($sql, $parameters));
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
|
||||||
if (false !== ( $statement = $this->prepare($sql) )) {
|
if (false !== ( $statement = $this->prepare($sql) )) {
|
||||||
$statement->setFetchMode(\PDO::FETCH_ASSOC);
|
$statement->setFetchMode(\PDO::FETCH_ASSOC);
|
||||||
$this->execute($statement, $parameters, false);
|
$this->execute($statement, $parameters, false);
|
||||||
@@ -28,6 +31,9 @@ trait PdoTrait
|
|||||||
catch (\Throwable $e) {
|
catch (\Throwable $e) {
|
||||||
throw new \PdoException($e->getMessage() . " `$sql` with data:" . json_encode($parameters));
|
throw new \PdoException($e->getMessage() . " `$sql` with data:" . json_encode($parameters));
|
||||||
}
|
}
|
||||||
|
finally {
|
||||||
|
isset(static::$debugQuery) && static::$debugQuery->endQuery();
|
||||||
|
}
|
||||||
|
|
||||||
return $statement;
|
return $statement;
|
||||||
}
|
}
|
||||||
@@ -41,7 +47,7 @@ trait PdoTrait
|
|||||||
|
|
||||||
public function runQuery(string $sql, array $parameters = []): ? static
|
public function runQuery(string $sql, array $parameters = []): ? static
|
||||||
{
|
{
|
||||||
# static::$dump && call_user_func_array(static::$dump, [ $this->fillDebugSqlParameters($sql, $parameters) ]);
|
isset(static::$debugQuery) && static::$debugQuery->debug($this->fillDebugSqlParameters($sql, $parameters));
|
||||||
|
|
||||||
try {
|
try {
|
||||||
if (false !== ( $statement = $this->prepare($sql) )) {
|
if (false !== ( $statement = $this->prepare($sql) )) {
|
||||||
@@ -56,6 +62,9 @@ trait PdoTrait
|
|||||||
catch (\Throwable $e) {
|
catch (\Throwable $e) {
|
||||||
throw new \PdoException($e->getMessage() . " `$sql` with data:" . json_encode($parameters), (int) $e->getCode(), $e);
|
throw new \PdoException($e->getMessage() . " `$sql` with data:" . json_encode($parameters), (int) $e->getCode(), $e);
|
||||||
}
|
}
|
||||||
|
finally {
|
||||||
|
isset(static::$debugQuery) && static::$debugQuery->endQuery();
|
||||||
|
}
|
||||||
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
@@ -135,7 +144,7 @@ trait PdoTrait
|
|||||||
$parameters = array_reverse($parameters);
|
$parameters = array_reverse($parameters);
|
||||||
|
|
||||||
return str_replace(array_keys($parameters), array_map(fn($e) => is_numeric($e) ? $e : (
|
return str_replace(array_keys($parameters), array_map(fn($e) => is_numeric($e) ? $e : (
|
||||||
is_bool($e) ? (int) $e : $this->quote($e)
|
is_bool($e) ? (int) $e : $this->quote($e)
|
||||||
), array_values($parameters)), $sql);
|
), array_values($parameters)), $sql);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
+20
-15
@@ -158,26 +158,20 @@ class Repository implements RepositoryInterface
|
|||||||
throw new \Exception("Your entity class `" . get_class($entity) . "` cannot match entity type of repository `{$this->entityClass}`");
|
throw new \Exception("Your entity class `" . get_class($entity) . "` cannot match entity type of repository `{$this->entityClass}`");
|
||||||
}
|
}
|
||||||
|
|
||||||
$primaryKeyDefinition = Ulmus::resolveEntity($this->entityClass)->getPrimaryKeyField();
|
if ($primaryKeyDefinition = Ulmus::resolveEntity($this->entityClass)->getPrimaryKeyField()) {
|
||||||
|
|
||||||
if ( $primaryKeyDefinition !== null ) {
|
|
||||||
$pkField = key($primaryKeyDefinition);
|
$pkField = key($primaryKeyDefinition);
|
||||||
|
|
||||||
$this->eventExecute(Event\Query\Delete::class, $this, $entity);
|
$this->eventExecute(Event\Query\Delete::class, $this, $entity);
|
||||||
|
|
||||||
return $this->deleteFromPk($entity->$pkField);
|
return $this->deleteFromPk($entity->$pkField);
|
||||||
}
|
}
|
||||||
|
elseif ($compoundKeyFields = Ulmus::resolveEntity($this->entityClass)->getCompoundKeyFields()) {
|
||||||
|
$this->eventExecute(Event\Query\Delete::class, $this, $entity);
|
||||||
|
|
||||||
|
return $this->deleteFromCompoundKeys(array_combine($compoundKeyFields->column, array_map(fn($column) => $entity->$column, $compoundKeyFields->column)));
|
||||||
|
}
|
||||||
else {
|
else {
|
||||||
$compoundKeyFields = Ulmus::resolveEntity($this->entityClass)->getCompoundKeyFields();
|
throw new \Exception(sprintf("No primary key found for entity %s", $this->entityClass));
|
||||||
|
|
||||||
if ($compoundKeyFields) {
|
|
||||||
$this->eventExecute(Event\Query\Delete::class, $this, $entity);
|
|
||||||
|
|
||||||
return $this->deleteFromCompoundKeys(array_combine($compoundKeyFields->column, array_map(fn($column) => $entity->$column, $compoundKeyFields->column)));
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
throw new \Exception(sprintf("No primary key found for entity %s", $this->entityClass));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -375,7 +369,11 @@ class Repository implements RepositoryInterface
|
|||||||
$dataset = $this->generateDatasetDiff($entity, $oldValues);
|
$dataset = $this->generateDatasetDiff($entity, $oldValues);
|
||||||
|
|
||||||
foreach($dataset as $field => $value) {
|
foreach($dataset as $field => $value) {
|
||||||
if ( false === ( $this->entityResolver->searchFieldAnnotation($field, Field::class, false)->readonly ?? false ) ) {
|
$readonly = $this->entityResolver->searchFieldAnnotation($field, Field::class, false)->readonly ??
|
||||||
|
$this->entityResolver->searchField($field)->getAttribute(Field::class)->object->readonly ??
|
||||||
|
false;
|
||||||
|
|
||||||
|
if ( ! $readonly ) {
|
||||||
$intersect[$field] = $field;
|
$intersect[$field] = $field;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -612,7 +610,7 @@ class Repository implements RepositoryInterface
|
|||||||
|
|
||||||
$this->eventExecute(\Ulmus\Event\Repository\CollectionFromQueryDatasetInterface::class, $this, $dataset);
|
$this->eventExecute(\Ulmus\Event\Repository\CollectionFromQueryDatasetInterface::class, $this, $dataset);
|
||||||
|
|
||||||
foreach($dataset ?: Ulmus::iterateQueryBuilder($this->queryBuilder, $this->adapter) as $entityData) {
|
foreach($dataset ?: Ulmus::iterateQueryBuilder($this->queryBuilder, $this->adapter) as $i => $entityData) {
|
||||||
$this->eventExecute(\Ulmus\Event\Repository\CollectionFromQueryItemInterface::class, $entityData);
|
$this->eventExecute(\Ulmus\Event\Repository\CollectionFromQueryItemInterface::class, $entityData);
|
||||||
|
|
||||||
$entity = $this->instanciateEntity($entityClass);
|
$entity = $this->instanciateEntity($entityClass);
|
||||||
@@ -680,8 +678,15 @@ class Repository implements RepositoryInterface
|
|||||||
|
|
||||||
public function instanciateEntity(? string $entityClass = null, array $dataset = []) : object
|
public function instanciateEntity(? string $entityClass = null, array $dataset = []) : object
|
||||||
{
|
{
|
||||||
|
static $loopDebug = 0;
|
||||||
|
|
||||||
$entityClass ??= $this->entityClass;
|
$entityClass ??= $this->entityClass;
|
||||||
|
|
||||||
|
/* if ($loopDebug++ >= 10256) {
|
||||||
|
debug_print_backtrace();
|
||||||
|
die();
|
||||||
|
}*/
|
||||||
|
|
||||||
try {
|
try {
|
||||||
$entity = new $entityClass($dataset);
|
$entity = new $entityClass($dataset);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ trait JoinBuilderTrait
|
|||||||
|
|
||||||
$fields = (array) $fields;
|
$fields = (array) $fields;
|
||||||
|
|
||||||
usort($fields, fn($e1, $e2) => str_contains($e1, '.') <=> str_contains($e2, '.'));
|
usort($fields, fn($e1, $e2) => str_contains((string) $e1, '.') <=> str_contains((string) $e2, '.'));
|
||||||
|
|
||||||
# @TODO Apply fff annotation to this too !
|
# @TODO Apply fff annotation to this too !
|
||||||
foreach(array_filter($fields, fn($e) => $e && ! isset($this->joined[$e]) ) as $item) {
|
foreach(array_filter($fields, fn($e) => $e && ! isset($this->joined[$e]) ) as $item) {
|
||||||
@@ -127,7 +127,7 @@ trait JoinBuilderTrait
|
|||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function joinFieldObject(mixed $field, string $entityClass, string $alias = null) : \Stringable
|
protected function joinFieldObject(mixed $field, string $entityClass, ?string $alias = null) : \Stringable
|
||||||
{
|
{
|
||||||
if ( ! is_object($field) ) {
|
if ( ! is_object($field) ) {
|
||||||
return $entityClass::field($field, $alias);
|
return $entityClass::field($field, $alias);
|
||||||
@@ -138,7 +138,7 @@ trait JoinBuilderTrait
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
protected function joinFieldValue(mixed $value, string $alias = null) : mixed
|
protected function joinFieldValue(mixed $value, ?string $alias = null) : mixed
|
||||||
{
|
{
|
||||||
if ( $value instanceof EntityField ) {
|
if ( $value instanceof EntityField ) {
|
||||||
$value = clone $value;
|
$value = clone $value;
|
||||||
|
|||||||
@@ -43,7 +43,7 @@ trait QueryBuildingTrait
|
|||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function update(string $table, string $alias, ? string $schema) : self
|
public function queryUpdate(string $table, string $alias, ? string $schema) : self
|
||||||
{
|
{
|
||||||
$this->queryBuilder->update($this->escapeTable($table), $alias ? $this->escapeIdentifier($alias) : null, $this->escapedDatabase(), $schema);
|
$this->queryBuilder->update($this->escapeTable($table), $alias ? $this->escapeIdentifier($alias) : null, $this->escapedDatabase(), $schema);
|
||||||
|
|
||||||
@@ -210,7 +210,7 @@ trait QueryBuildingTrait
|
|||||||
protected function updateSqlQuery(array $dataset) : self
|
protected function updateSqlQuery(array $dataset) : self
|
||||||
{
|
{
|
||||||
if ( null === $this->queryBuilder->getFragment(Query\Update::class) ) {
|
if ( null === $this->queryBuilder->getFragment(Query\Update::class) ) {
|
||||||
$this->update($this->entityResolver->tableName(), $this->alias, $this->entityResolver->schemaName());
|
$this->queryUpdate($this->entityResolver->tableName(), $this->alias, $this->entityResolver->schemaName());
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->set($dataset);
|
$this->set($dataset);
|
||||||
|
|||||||
@@ -84,7 +84,6 @@ class RelationBuilder
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch(\Throwable $e) {
|
catch(\Throwable $e) {
|
||||||
|
|
||||||
throw new $e(sprintf("An error occurred while calling method from your #[Virtual] attribute in entity '%s::%s'. Caught '%s'", $this->entity::class, $name, $e->getMessage(), $e->getCode(), $e ));
|
throw new $e(sprintf("An error occurred while calling method from your #[Virtual] attribute in entity '%s::%s'. Caught '%s'", $this->entity::class, $name, $e->getMessage(), $e->getCode(), $e ));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -156,7 +155,12 @@ class RelationBuilder
|
|||||||
protected function applyFilter(Repository $repository, string $name) : Repository
|
protected function applyFilter(Repository $repository, string $name) : Repository
|
||||||
{
|
{
|
||||||
foreach($this->filters ?? [] as $filter) {
|
foreach($this->filters ?? [] as $filter) {
|
||||||
$repository = call_user_func_array([ $this->entity, $filter->method ], [ $repository, $name, false ]);
|
if (is_string($filter->method)) {
|
||||||
|
$repository = call_user_func_array([$this->entity, $filter->method], [$repository, $name, false]);
|
||||||
|
}
|
||||||
|
elseif (is_callable($filter->method)) {
|
||||||
|
$repository = call_user_func_array($filter->method, [ $repository, $this->entity, false, ], );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return $repository;
|
return $repository;
|
||||||
|
|||||||
@@ -61,7 +61,8 @@ trait SearchRequestFromRequestTrait
|
|||||||
{
|
{
|
||||||
$this->objectReflection = ObjectReflection::fromClass(static::class)->reflectClass();
|
$this->objectReflection = ObjectReflection::fromClass(static::class)->reflectClass();
|
||||||
|
|
||||||
$this->page = $data['page'] ?? 1;
|
# REMOVED - this could cause legacy problems, kept in case of a quick uncomment is needed
|
||||||
|
# $this->page = $data['page'] ?? 1;
|
||||||
|
|
||||||
$this->applyValues(
|
$this->applyValues(
|
||||||
fn($propertyName, $attribute) => $data[$propertyName] ?? null
|
fn($propertyName, $attribute) => $data[$propertyName] ?? null
|
||||||
@@ -86,9 +87,9 @@ trait SearchRequestFromRequestTrait
|
|||||||
$this->prepare($request);
|
$this->prepare($request);
|
||||||
}
|
}
|
||||||
|
|
||||||
$queryParams = new \ArrayObject(array_filter($request->getQueryParams(), function($i) { return ! is_null($i) && $i !== ""; }));
|
# REMOVED - this could cause legacy problems, kept in case of a quick uncomment is needed
|
||||||
|
# $queryParams = new \ArrayObject(array_filter($request->getQueryParams(), function($i) { return ! is_null($i) && $i !== ""; }));
|
||||||
$this->page = $queryParams->offsetExists('page') ? $queryParams['page'] : 1;
|
# $this->page = $queryParams->offsetExists('page') ? $queryParams['page'] : 1;
|
||||||
|
|
||||||
$this->applyValues(
|
$this->applyValues(
|
||||||
fn($propertyName, $attribute) =>$this->getValueFromSource($request, $propertyName, $attribute)
|
fn($propertyName, $attribute) =>$this->getValueFromSource($request, $propertyName, $attribute)
|
||||||
@@ -155,6 +156,21 @@ trait SearchRequestFromRequestTrait
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function getPropertyAttribute(string $name) : ? Attribute\SearchParameter
|
||||||
|
{
|
||||||
|
foreach($this->objectReflection->getProperties() as $propertyName => $property) {
|
||||||
|
if ($propertyName === $name) {
|
||||||
|
$attribute = $property->getAttribute(Attribute\SearchParameter::class)->object ?? false;
|
||||||
|
|
||||||
|
if ($attribute) {
|
||||||
|
return $attribute;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
protected function applyValues(\Closure $getValue) : void
|
protected function applyValues(\Closure $getValue) : void
|
||||||
{
|
{
|
||||||
foreach($this->objectReflection->getProperties() as $propertyName => $property) {
|
foreach($this->objectReflection->getProperties() as $propertyName => $property) {
|
||||||
|
|||||||
Reference in new issue
Block a user