#1429 new

Feature request: add magic methods to MVC

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

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.

No comments found

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.

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