#5700: Getters and Setters should be used whenever they fit
--------------------------------+-------------------------------------------
Reporter: rafaelbandeira3 | Type: Optimization
Status: new | Priority: Low
Milestone: 1.2.x.x | Component: General
Version: RC3 | Severity: Normal
Keywords: | Php_version: n/a
Cake_version: |
--------------------------------+-------------------------------------------
For design principles and for the sake of extensibility, whenever a
builtin getter/setter method can be used, it MUST be, allowing
extensibility of the code without having to rewrite methods that use it.
Getters and Setters may provide some overhead, but it really make things
cleaner, easier and promotes code reusability, so, although the methods
that are going to be mentioned could be deprecated, as they are not used,
I think the proper approach would be to put them in use.
For now I've only noticed it on the Model class, where we have at least
two getters that aren't used:
- Model::getDataSource() isn't used in favor of it's functionality;
- Model::getDisplayField() isn't used in favor of direct access to the
property;
--
Ticket URL: <https://trac.cakephp.org/ticket/5700>
CakePHP : The Rapid Development Framework for PHP <https://trac.cakephp.org/>
Cake is a rapid development framework for PHP which uses commonly known design
patterns like ActiveRecord, Association Data Mapping, Front Controller and MVC.
Our primary goal is to provide a structured framework that enables PHP users at
all levels to rapidly develop robust web applications, without any loss to
flexibility.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"tickets cakephp" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/tickets-cakephp?hl=en
-~----------~----~----~----~------~----~------~--~---