so I want to follow the mvc conventions, but haven't really gotten it.
I have a problem with a clear difference between the model and class of the library and how they relate to each other.
eg. I want to create classes for adding / editing contacts, as well as adding them to a group.
I thought it should be divided into 2 classes: contact and group.
The first class will create a contact. Another will add the contact to the group. I thought this separation would be ideal because their logic is isolated from each other. The contact does not matter whether the Group exists or not. The group doesn't care how the Contact looks.
So Contact will have the following methods:
$Contact->add($name, $email, $address, $phone)
$Contact->delete($id)
$Contact->edit($id, $name, $email, $address, $phone)
And Group:
$Group->createGroup($name)
$Group->delete($id)
$Group->addContact($groupId, $contactId)
, , -, . , ? , . SYSTEM/LIBRARIES CodeIgniter. , ?
?
, - ! !