Google News
logo
CakePHP - Interview Questions
What is behaviour in CakePHP?
Behaviors in CakePHP are a way to organize and enable horizontal re-use of Model layer logic. Conceptually they are similar to traits. However, behaviors are implemented as separate classes. This allows them to hook into the life-cycle callbacks that models emit, while providing trait-like features.
 
Behaviors provide a convenient way to package up behavior that is common across many models.
Advertisement