University task. PHP Design patterns