Good day!
I would like to go further in learning php, and in my head there are a lot of classes I need to develop.
I have created a repository for myself, and I use most of the classes in all of my projects, but the feeling that
I make mistakes in the design of classes does not leave me.
I don’t have mentors who would use OOP and class repositories, so I ask the community to remove two small classes that I use everywhere.
The first class is
events {}
http://www.pastebin.ru/304393 (Display messages for the user or save to the database for the administration). To use the required class also mysqlLayer (for working with the database)
The second class is
images {}
http://www.pastebin.ru/304394 (Resizing pictures). To use the required class events.
I would like to know what mistakes in the design and use of the OOP approach in your opinion I made, and in general, what recommendations you can give.
UPD: (what conclusions from the discussion currently made for myself)
1 - Instead of error codes in digital form, use words (instead of 1 - notFile)
2 - Use the generic method name getInstance and not the load in the Singletone pattern
3 - Use enum-classes instead of string values in the class