• Welcome to PHPVIBE Forums. Please log in.
avatar_Marius P.

Understanding the PHPVibe routing/flow

Started by Marius P.,

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Marius P.Topic starter

PHPVibe diverges from a custom PHP framework or an MVC model, opting instead for an easily navigable file system. The central controller, index.php, serves as the core orchestrator, encompassing subsequent files.

index.php initiates a route, a view, a PHP file situated in the /views folder, named views/{name}.route.php. This view, in turn, invokes a template file located at /themes/{current theme}/{name}.php as its display (template).

Why this approach?

It simplifies the system for easy editing, avoiding the use of a custom PHP framework or MVC model. Notably, no files are overwritten even if mixed within the same folder during coding. This avoids potential conflicts, such as having two files named video.php in different folders—one for components and another for theme output.

Here's a flow example for a single video page:

index.php
Utilizes load.php, which consolidates all libraries.
Invokes:
views/video.route.php
Calls:
themes/main/video.php
Serving as the final destination for theme output.




Happy with my help? Buy me a coffee.
Please, always use the search before opening a new topic! We're all here on our (limited) free time! Make sure you help yourself too!
  •  
    The following users thanked this post: fox_mulder

 

Similar topics (7)

Important Announcement: PHPVibe Video Sharing CMS End of Life

Started by Marius P.


Replies: 1
Views: 36221

The PHPVibe Archive is now public

Started by Marius P.


Replies: 0
Views: 15895

[ Video Sharing CMS v4 ] Problems with accents (PHPVIBE 3.6)

Started by pome


Replies: 5
Views: 1127

[ Video Sharing CMS v4 ] @Mario PLEASE add moov start of file (like clip-bucket) using MP4Box in phpvibe

Started by spirog


Replies: 4
Views: 1833

[ Video Sharing CMS v4 ] PhpVibe Pro Logo upload failed.

Started by longstand


Replies: 5
Views: 2436

[ Video Sharing CMS v4 ] UTF-8 by Youtube Import bug with PHPVibe v4

Started by javadev8x


Replies: 7
Views: 1718

[ Video Sharing CMS v4 ] PHPVibe Pro (v3.5) comming soon ?

Started by ajitsingh


Replies: 3
Views: 2657