I have been using Magento and PHP CodeIgniter MVC for about 4 months. I had an incomprehensible problem in understanding where to set the verification logic for both CodeIgniter and Magento, only if I consider the MVC architecture to be my true nature and in a very correct semantic way.
First of all, I will start with Magento: -
Let's say I have a “ Assignment” module in Magento that deals with players and tournaments. I have 3 methods of action in this controller of the module " Assignment", where I need to check and verify the following: -
This check is also required in the module of the class " Assignment", as well as in three action methods.
So my query is whether I should write checks for the above two points in this controller class or in the Model class, because I will need to use checks in both the Block class and the Controller class?
Also, what does the actual MVC architecture offer in this case?
If possible, provide a code snippet highlighting the logic of your implementation.
Regarding CodeIgniter or any other PHP MVC Framework: -
Since checking something using sessions is quite specific to pages, and since CodeIgniter lacks the concept of blocks, so usually session checking and setting session variables are performed only in the Controller class.
, , ?
, MVC?
, , , .
, . , . / . .
: -
, Magento , , , ?