Login   Register  
PHP Classes
elePHPant
Icontem

File: lib/misc.fns.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Pierre-Henry Soria  >  PHP Lorem-Ipsum Generator Class  >  lib/misc.fns.php  >  Download  
File: lib/misc.fns.php
Role: Auxiliary script
Content type: text/plain
Description: Example script
Class: PHP Lorem-Ipsum Generator Class
Generate fake text to test page presentation
Author: By
Last change: Inversion of the information in the header DocBlock
Date: 2013-02-20 06:50
Size: 906 bytes
 

Contents

Class file image Download
<?php
/**
 * @category         Lorem Ipsum Generator
 * @package          String
 * @author           Pierre-Henry Soria <ph7software@gmail.com>
 * @copyright        (c) 2013, Pierre-Henry Soria. All Rights Reserved.
 * @link             http://github.com/pH-7/Lorem-Ipsum-Generator
 * @license          GNU General Public License <http://www.gnu.org/licenses/gpl.html>
 */

defined('PH') or die('Forbidden acces');

/**
 * Get the output format of the LoremIpsum class.
 *
 * @param string  $sFormat 'html', 'plain' or 'text'
 * @return integer LoremIpsum constant.
 */
function getLoremIpsumFormat($sFormat)
{
    switch(
$sFormat)
    {
        case 
'html':
            
$iFormat LoremIpsum::HTML_FORMAT;
        break;

        case 
'plain':
            
$iFormat LoremIpsum::PLAIN_FORMAT;
        break;

        default:
            
$iFormat LoremIpsum::TEXT_FORMAT;
    }

    return 
$iFormat;
}