#1429 ✓resolved
dleffler

Feature request: add magic methods to MVC

Reported by dleffler | February 26th, 2018 @ 06:32 PM | in 2.5.0 (closed)

We currently don't include most php 'magic' methods in our controllers and models (__destruct, __get, __set, __isset, __unset) which more modern php version would recommend. Though there are some generic methods which could easily be integrated (currently they are commented out), they disrupt the execution of Exponent since we rely on the empty() method but this acts differently once these magic methods are in place.

With good coding practices, the get/set methods are not needed, HOWEVER the __destruct method could become valuable for operations with large databases. In that objects don't normally release their associated objects when they are unset. And in most cases we simply rewrite over the variable object or set it to null which leaves the associated objects in memory.

Comments and changes to this ticket

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

Bug Tracker for Exponent CMS

Shared Ticket Bins

People watching this ticket

Pages