How saryn7373/mukhambetov-241-3210-php works
Project type and purpose
• This is a small-to-medium PHP MVC web application (under the project/ directory) accompanied by several lab/homework folders.
• The core “project” folder implements an MVC pattern with Controllers, Models (Active Record entities), Services (DB connection + settings), View classes, and template files under templates/, all front-ended by an Apache/PHP entry point in www/index.php with routing in www/route.php.
File structure
Top-level:
• many lab/ homework folders (one-off exercises)
• “project/” – your real application
Under project/:
• src/Controllers – ArticleController, CommentController, MainController
• src/Models – generic ActiveRecordEntity + domain subfolders Articles/Article, Comments/Comment, Users/User
• src/Services – Db (database connection wrapper), settings (configuration)
• src/View – View (template rendering engine)
• templates/ – PHP template views for articles, comments, main pages, plus header/footer
• www/ – public folder (entry: index.php, routing: route.php, .htaccess for URL rewriting)
Implicit architecture
• MVC pattern
• Front controller + router (www/index.php → route.php → Controllers)
• Controllers use Services (Db) and Models (ActiveRecord) to fetch/persist data
• Controllers hand off data to View service → render templates