/var/www/vhosts/ihelp.ro/httpdocs/vendor/cakephp/cakephp/src/ORM
Edit: /var/www/vhosts/ihelp.ro/httpdocs/vendor/cakephp/cakephp/src/ORM/Entity.php (2793B)
1, 'name' => 'Andrew'])
* ```
*
* @param array
$properties hash of properties to set in this entity
* @param array $options list of options to use when creating this entity
*/
public function __construct(array $properties = [], array $options = [])
{
$options += [
'useSetters' => true,
'markClean' => false,
'markNew' => null,
'guard' => false,
'source' => null,
];
if (!empty($options['source'])) {
$this->setSource($options['source']);
}
if ($options['markNew'] !== null) {
$this->setNew($options['markNew']);
}
if (!empty($properties) && $options['markClean'] && !$options['useSetters']) {
$this->_fields = $properties;
return;
}
if (!empty($properties)) {
$this->set($properties, [
'setter' => $options['useSetters'],
'guard' => $options['guard'],
]);
}
if ($options['markClean']) {
$this->clean();
}
}
}