Phalcon: the order of 2 functions “initialize” and “onConstruct” in Controller and Model
I check myself and see that, the order of execution on Controller is "onConstruct" then "initialize", while on Model is "initialize" then "onConstruct". So why the order of execution of these methods is different on Controller and Model? Any idea? Besides the same name, initialize has different purposes in Models and Controllers: For Models initialize will mostly take care of initializing the model's metada(column mapping, model relationships, etc) that's why it's called before the constructor since all model metadata is stored statically in the model class (btw that's why initialize is called