PHP Classes
Icontem

File: StrictInt.php


  Search   All class groups All class groups   Latest entries Latest entries   Top 10 charts Top 10 charts   Newsletter Newsletter   Blog Blog   Forums Forums   Help FAQ Help FAQ  
  Login   Register  
Recommend this page to a friend! ReTweet ReTweet Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Martin Alterisio  >  Type Hint Class  >  StrictInt.php  
File: StrictInt.php
Role: Class source
Content type: text/plain
Description: StrictInt TypeHint
Class: Type Hint Class
Implement type hinting support for base PHP types
 

Contents

Class file image Download
<?php
/**
 * @package typehintclass
 */

/**
 * Type hint class for values that are native php ints.
 */
final class StrictInt implements TypeHint {
    
/**
     * Type hint class, cannot be instantiated nor extended.
     */
    
private function __construct() { }
    
    
/**
     * Indicates if this class represents a type hint for provided value.
     * @param mixed $value The value.
     * @return bool True if this class represents a type hint for that value.
     */
    
public static function isTypeHintFor($value) {
        return 
is_int($value);
    }
}
?>

 
  Advertise on this site Advertise on this site   Site map Site map   Statistics Statistics   Site tips Site tips   Privacy policy Privacy policy   Contact Contact  

For more information send a message to :
info at phpclasses dot org.
Copyright (c) Icontem 1999-2009 PHP Classes - PHP Class Scripts
  PHP Book Reviews - Reviews of books and other products