File tree Expand file tree Collapse file tree 1 file changed +31
-3
lines changed Expand file tree Collapse file tree 1 file changed +31
-3
lines changed Original file line number Diff line number Diff line change @@ -1617,6 +1617,34 @@ public function __get($name)
1617
1617
return null ;
1618
1618
}
1619
1619
1620
+ /**
1621
+ * ORM isset property
1622
+ *
1623
+ * @param string $name
1624
+ * @return void
1625
+ */
1626
+ public function __isset ($ name ) {
1627
+
1628
+ if (isset ($ this ->_writeProperties [$ name ])) {
1629
+
1630
+ return true ;
1631
+ }
1632
+
1633
+ return isset ($ this ->_readProperties [$ name ]);
1634
+ }
1635
+
1636
+ /**
1637
+ * ORM unset property
1638
+ *
1639
+ * @param string $name
1640
+ * @return void
1641
+ */
1642
+ public function __unset ($ name ) {
1643
+
1644
+ unset($ this ->_writeProperties [$ name ]);
1645
+ unset($ this ->_readProperties [$ name ]);
1646
+ }
1647
+
1620
1648
/**
1621
1649
* ArrayAccess offsetSet
1622
1650
*
@@ -1626,7 +1654,7 @@ public function __get($name)
1626
1654
*/
1627
1655
public function offsetSet ($ offset , $ value ) {
1628
1656
1629
- $ this ->_writeProperties [ $ offset] = $ value ;
1657
+ return $ this ->__set ( $ offset, $ value) ;
1630
1658
}
1631
1659
1632
1660
/**
@@ -1637,7 +1665,7 @@ public function offsetSet($offset, $value) {
1637
1665
*/
1638
1666
public function offsetExists ($ offset ) {
1639
1667
1640
- return isset ( $ this ->_readProperties [ $ offset] );
1668
+ return $ this ->__isset ( $ offset );
1641
1669
}
1642
1670
1643
1671
/**
@@ -1648,7 +1676,7 @@ public function offsetExists($offset) {
1648
1676
*/
1649
1677
public function offsetUnset ($ offset ) {
1650
1678
1651
- unset( $ this ->_writeProperties [ $ offset] );
1679
+ return $ this ->__unset ( $ offset );
1652
1680
}
1653
1681
1654
1682
/**
You can’t perform that action at this time.
0 commit comments