Login   Register  
PHP Classes
elePHPant
Icontem

Class: PHP Typification Class

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  >  Download .tar.gz .zip  >  Support forum Support forum (2)  >  Blog Blog  >  RSS 1.0 feed RSS 2.0 feed Latest changes  
Name: PHP Typification Class
Base name: typevalidator
Description: Check the types of parameters passed to a function
Related classes:
Version: -
PHP version: -
License: GNU Free Documentation License (FDL)
All time users: 544 users
All time rank: 4308
Week users: 0 users
Week rank: 2600
Picture of Dmitry Sheiko
Author: Dmitry Sheiko <e-mail contact>
Packages: 9 Browse this author's classes Browse this author's classes
Country: Belarus Belarus - PHP jobs in Belarus
Age: 37
All time rank: 631 in Belarus Belarus
Week rank: 144 Down1 in Belarus Belarus Equal
Innovation award
Innovation award
Nominee: 5x

Winner: 1x


  Detailed description  
This class can be used to check the types of the parameters passed to a function at run time.

It is meant to help detecting eventual bugs caused by passing function parameters of the wrong type.

It can take the list of function arguments values and verify whether they match a function argument type specification defined by a string.

If the type of one or more arguments does not match the expected type, the class triggers an error by dumping all the information about the class and the line of the function being called.

 

  Groups  
Group folder image Language Constructs to assist in the language control View top rated classes

  Rate classes User ratings   Applications   Files Files  

  Innovation Award  
PHP Programming Innovation award nominee
November 2005
Number 8
PHP is a loose typed language. This means that it is not required to declare types of variables and function arguments before they are used, like with strong typed languages.

While loose typed languages are more flexible, they have the inconvenient of not allowing to detect bugs caused by mistakes of passing function argument values of the wrong type.

This class provides a solution for verifying the correct type of function arguments at runtime. It can help detecting bugs that otherwise would go unnoticed.

Manuel Lemos

  User ratings  
There are not enough user ratings to display for this class.

  Applications that use this class  
No application links were specified for this class.
Add link image If you know an application of this package, send a message to the author to add a link here.
  Files folder image Files  
File Role Description
Plain text file sample.php Example Example
Plain text file typification.class.php Class Typification Class

Download all files: typevalidator.tar.gz typevalidator.zip
NOTICE: if you are using a download manager program like 'GetRight', please Login before trying to download this archive.