File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1617,6 +1617,34 @@ public function __get($name)
16171617 return null ;
16181618 }
16191619
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+
16201648 /**
16211649 * ArrayAccess offsetSet
16221650 *
@@ -1626,7 +1654,7 @@ public function __get($name)
16261654 */
16271655 public function offsetSet ($ offset , $ value ) {
16281656
1629- $ this ->_writeProperties [ $ offset] = $ value ;
1657+ return $ this ->__set ( $ offset, $ value) ;
16301658 }
16311659
16321660 /**
@@ -1637,7 +1665,7 @@ public function offsetSet($offset, $value) {
16371665 */
16381666 public function offsetExists ($ offset ) {
16391667
1640- return isset ( $ this ->_readProperties [ $ offset] );
1668+ return $ this ->__isset ( $ offset );
16411669 }
16421670
16431671 /**
@@ -1648,7 +1676,7 @@ public function offsetExists($offset) {
16481676 */
16491677 public function offsetUnset ($ offset ) {
16501678
1651- unset( $ this ->_writeProperties [ $ offset] );
1679+ return $ this ->__unset ( $ offset );
16521680 }
16531681
16541682 /**
You can’t perform that action at this time.
0 commit comments