PHP Classes

File: app/pages/product.page.php

Recommend this page to a friend!
  Classes of Pierre-Henry Soria   Minimalist PHP Sales Site   app/pages/product.page.php   Download  
File: app/pages/product.page.php
Role: Auxiliary script
Content type: text/plain
Description: Auxiliary script
Class: Minimalist PHP Sales Site
Implement a sales site from configuration files
Author: By
Last change:
Date: 4 months ago
Size: 492 bytes
 

Contents

Class file image Download
<?php

use PHenry\App\Kernel\Helper\Template;

const
PRODUCT_DETAILS = [
   
'productImage' => 'https://source.unsplash.com/250x250/?coffee,cup',
   
'productName' => 'Red Cup ?',
   
'productDescription' => '?A perfect red cup (without coffee).',
   
'productPrice' => '$5',
   
'purchaseUrl' => 'https://www.buymeacoffee.com/pierrehenry',
];

Template::output('product/index', 'Product', PRODUCT_DETAILS);
/* or */
// echo Template::render('product/index', 'Product', PRODUCT_DETAILS);