PHP Classes
elePHPant
Icontem

File: sample.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Dmitry Sheiko  >  PHP Typification Class  >  sample.php  >  Download  
File: sample.php
Role: Example script
Content type: text/plain
Description: Example
Class: PHP Typification Class
Check the types of parameters passed to a function
Author: By
Last change:
Date: 9 years ago
Size: 469 bytes
 

Contents

Class file image Download
<?PHP
include_once("typification.class.php");

// Example:
// Options of types specifing are similar Regular Expressions:
// type_of_value{left_limit,right_limit}[posible_value1|posible_value2]; ..

class Sample {
    function
Sample() {
       
// Validate parameters types and values
       
new FuncParams("string{0,3}(abc|bbc); integer; array{2}; ArrayOfStrings");
        print
"PASS";
    }
}

$r = new Sample('abc', 2, array(1,2), array("123","ABC"));
?>