PHP Classes


Recommend this page to a friend!
  Classes of Ezhaym Najera M   View   Download  
Role: Documentation
Content type: text/markdown
Description: Documentation
Class: View
Generate HTML for page views from variable values
Author: By
Last change: v1.1
Date: 5 years ago
Size: 765 bytes


Class file image Download


Generate Views from main Layout and HTML files with PHP

simple as:

$view = new View();

// Get contact.html and load into visitor_layout.html
$view->setView('contact', 'visitor_layout');

// Add <script> tag to <head> section

// Add 'title' variable to <body> section
$view->add(['title' => 'Hello World!']);

// Print on screen

visitor_layout.html example:

<!DOCTYPE html>
<html lang="en">

contact.html example:


  • TODO: - Set Arrays on variable views.

_Cause we can only set strings for now._