PHP Classes
elePHPant
Icontem

File: examples/tags/upper/tag.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Oliver Lillie  >  PHP Custom Tags  >  examples/tags/upper/tag.php  >  Download  
File: examples/tags/upper/tag.php
Role: Auxiliary script
Content type: text/plain
Description: Example script
Class: PHP Custom Tags
Template engine based on tags similar to HTML
Author: By
Last change: reorganized for composer support
Date: 1 year ago
Size: 330 bytes
 

Contents

Class file image Download
<?php

   
namespace CustomTags;

    function
ct_upper($tag)
    {
        switch(
strtolower($tag['attributes']['type']))
        {
            case
'ucwords' :
                return
ucwords($tag['content']);
                break;
            case
'ucfirst' :
                return
ucfirst($tag['content']);
                break;
            case
'ucwords' :
            default :
                return
strtoupper($tag['content']);
        }
    }