
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
-
dleffler October 23rd, 2018 @ 12:06 PM
- State changed from new to open
Implemented by a recent push...less the 'destruct' method
-
dleffler March 8th, 2019 @ 03:37 PM
- State changed from open to resolved
We may not need the destruct method except in certain cases...may possibly implement this in the future.
Please Sign in or create a free account to add a new ticket.
With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.
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