40
40
use Phalcon \Mvc \Model \ValidationFailed ;
41
41
use Phalcon \Mvc \ModelInterface ;
42
42
use Phalcon \Filter \Validation \ValidationInterface ;
43
+ use Phalcon \Support \Collection ;
44
+ use Phalcon \Support \Collection \CollectionInterface ;
43
45
use Serializable ;
44
46
45
47
/**
@@ -1294,6 +1296,17 @@ public function save(): bool
1294
1296
{
1295
1297
}
1296
1298
1299
+ /**
1300
+ * Inserted or updates model instance, expects a visited list of objects.
1301
+ *
1302
+ * @param CollectionInterface $visited
1303
+ *
1304
+ * @return bool
1305
+ */
1306
+ public function doSave (\Phalcon \Support \Collection \CollectionInterface $ visited ): bool
1307
+ {
1308
+ }
1309
+
1297
1310
/**
1298
1311
* Serializes the object ignoring connections, services, related objects or
1299
1312
* static properties
@@ -1673,10 +1686,11 @@ protected function preSave(\Phalcon\Mvc\Model\MetaDataInterface $metaData, bool
1673
1686
* Saves related records that must be stored prior to save the master record
1674
1687
*
1675
1688
* @param ModelInterface[] $related
1689
+ * @param CollectionInterface $visited
1676
1690
* @return bool
1677
1691
* @param \Phalcon\Db\Adapter\AdapterInterface $connection
1678
1692
*/
1679
- protected function preSaveRelatedRecords (\Phalcon \Db \Adapter \AdapterInterface $ connection , $ related ): bool
1693
+ protected function preSaveRelatedRecords (\Phalcon \Db \Adapter \AdapterInterface $ connection , $ related, \ Phalcon \ Support \ Collection \ CollectionInterface $ visited ): bool
1680
1694
{
1681
1695
}
1682
1696
@@ -1695,10 +1709,11 @@ protected function postSave(bool $success, bool $exists): bool
1695
1709
* Save the related records assigned in the has-one/has-many relations
1696
1710
*
1697
1711
* @param ModelInterface[] $related
1712
+ * @param CollectionInterface $visited
1698
1713
* @return bool
1699
1714
* @param \Phalcon\Db\Adapter\AdapterInterface $connection
1700
1715
*/
1701
- protected function postSaveRelatedRecords (\Phalcon \Db \Adapter \AdapterInterface $ connection , $ related ): bool
1716
+ protected function postSaveRelatedRecords (\Phalcon \Db \Adapter \AdapterInterface $ connection , $ related, \ Phalcon \ Support \ Collection \ CollectionInterface $ visited ): bool
1702
1717
{
1703
1718
}
1704
1719
0 commit comments