|
@@ -56,6 +56,19 @@ class Entity implements EntityInterface
|
|
|
];
|
|
];
|
|
|
$this->_className = get_class($this);
|
|
$this->_className = get_class($this);
|
|
|
|
|
|
|
|
|
|
+ if (!empty($options['source'])) {
|
|
|
|
|
+ $this->source($options['source']);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ if ($options['markNew'] !== null) {
|
|
|
|
|
+ $this->isNew($options['markNew']);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ if (!empty($properties) && $options['markClean'] && !$options['useSetters']) {
|
|
|
|
|
+ $this->_properties = $properties;
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
if (!empty($properties)) {
|
|
if (!empty($properties)) {
|
|
|
$this->set($properties, [
|
|
$this->set($properties, [
|
|
|
'setter' => $options['useSetters'],
|
|
'setter' => $options['useSetters'],
|
|
@@ -66,13 +79,5 @@ class Entity implements EntityInterface
|
|
|
if ($options['markClean']) {
|
|
if ($options['markClean']) {
|
|
|
$this->clean();
|
|
$this->clean();
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
- if ($options['markNew'] !== null) {
|
|
|
|
|
- $this->isNew($options['markNew']);
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- if (!empty($options['source'])) {
|
|
|
|
|
- $this->source($options['source']);
|
|
|
|
|
- }
|
|
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|