This commit is contained in:
2026-02-17 14:56:23 +01:00
commit 68f7a95fdf
695 changed files with 154611 additions and 0 deletions

View File

@@ -0,0 +1,23 @@
<?php
namespace DynCom\mysyde\common\traits;
/**
* Created by PhpStorm.
* User: Bauer
* Date: 16.07.2015
* Time: 12:55
*/
trait arrayGettableTrait
{
/**
* @return array
*/
protected function getAllFieldsAsArray() {
$ref = new \ReflectionClass($this);
$arr = [];
foreach ($ref->getProperties() as $property) {
$name = $property->name;
$arr[$name] = clone $this->$name;
}
return $arr;
}
}