Ver Mensaje Individual
  #4 (permalink)  
Antiguo 26/05/2011, 05:52
Avatar de abimaelrc
abimaelrc
Colaborador
 
Fecha de Ingreso: mayo-2009
Ubicación: En el planeta de Puerto Rico
Mensajes: 14.734
Antigüedad: 15 años
Puntos: 1517
Respuesta: metodos estáticos en modelos de codeigniter

Según este post http://stackoverflow.com/questions/2...static-methods

Si quieres usa como referencia una pregunta sencilla ¿Hace sentido el llamar el método sin haber creado un objeto? Luego vi este comentario y me gustó
Cita:
Define static methods in the following scenarios only:
  • If you are writing utility classes and they and they are not supposed to be changed.
  • If the method is not using any instance variable.
  • If any operation is not dependent on instance creation.
  • If there is some code that can easily be shared by all the instance methods, extract that code into a static method.
  • If you are sure that the definition of the method will never be changed or overridden. As static methods can not be overridden.
__________________
Verifica antes de preguntar.
Los verdaderos amigos se hieren con la verdad, para no perderlos con la mentira. - Eugenio Maria de Hostos