Location: PHPKode > scripts > Type Hint Class > type-hint-class/Resource.php
<?php
/**
 * @package typehintclass
 */

/**
 * Type hint class for values that are resource type.
 */
final class Resource 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_resource($value);
    }
}
?>
Return current item: Type Hint Class