phpDocumentor OpenDocumentPHP
util
[ class tree: OpenDocumentPHP ] [ index: OpenDocumentPHP ] [ all elements ]

Class: Validator

Source Location: /util/Validator.php

Class Validator

Class Overview

Validator class.

This class will have several static methods to check if a input string is of a certain format.

Most of the definition is reight out of the original RelaxNG schemata for OpenDocuments.

We use Regular Expression Functions (Perl-Compatible) aka PCRE in this Validator class. Beginning with PHP 4.2.0 these functions are enabled by default. You can disable the PCRE functions with --without-pcre-regex. Use --with-pcre-regex=DIR to specify DIR where PCRE's include and library files are located, if not using bundled library. For older versions you have to configure and compile PHP with --with-pcre-regex[=DIR] in order to use these functions.

The windows version of PHP has built in support for this extension. You do not need to load any additional extension in order to use these functions.

Located in /util/Validator.php [line 78]



		
				Author(s):
		
  • Norman Markgraf (nmarkgraf(at)user.sourceforge.net)
Information Tags:
Version:  Release: @package_version@
Copyright:  Copyright in 2006, 2007 by OpenDocumentPHP Team
Link:  http://opendocumentphp.org
Since:  0.5.1 - 10. Feb. 2007
License:  GNU General Public License 2.0.

Methods

[ Top ]
Method Summary
static void   checkFamilyValues()   Checks if the input is a family value.
static bool   checkNCName()   Checks if the input string is 'non-colonized name' (NCName).
static bool   checkStyleNameRef()   Checks if the input string is of "styleNameRef" type. Which is eigther a NCName string or empty.
static void   isColor()   Checks if the input string represents a color, like #00FF00 is green.
static bool   isInteger()   Checks if the input is a integer.
static bool   isPositiveInteger()   Checks if the input is a positive integer (input > 0).
static void   isPositiveLength()   Checks if the input is a positiveLength.

[ Top ]
Methods
static method checkFamilyValues  [line 185]

  static void checkFamilyValues( $value  )

Checks if the input is a family value.

Parameters:
   $value: 

API Tags:
Access:  public

Information Tags:
Since:  0.5.2 - 19. Mar. 2007

[ Top ]
static method checkNCName  [line 117]

  static bool checkNCName( mixed $input  )

Checks if the input string is 'non-colonized name' (NCName).

Parameters:
mixed   $input:  Input which is been tested.

API Tags:
Return:  Is true, only if $input is a non-colonized name.
Access:  public

Information Tags:
Since:  0.5.1 - 10. Feb. 2007

[ Top ]
static method checkStyleNameRef  [line 137]

  static bool checkStyleNameRef( mixed $input  )

Checks if the input string is of "styleNameRef" type. Which is eigther a NCName string or empty.

Parameters:
mixed   $input:  Input which is been tested.

API Tags:
Return:  Is true, only if $input is of "styleNameRef" type.
Access:  public

Information Tags:
Since:  0.5.1 - 10. Feb. 2007

[ Top ]
static method isColor  [line 153]

  static void isColor( $input  )

Checks if the input string represents a color, like #00FF00 is green.

Parameters:
   $input: 

API Tags:
Access:  public

Information Tags:
Since:  0.5.1 - 10. Feb. 2007

[ Top ]
static method isInteger  [line 100]

  static bool isInteger( mixed $input  )

Checks if the input is a integer.

Parameters:
mixed   $input:  Input which is been testet.

API Tags:
Return:  Is true, only if it is a positive integer.
Access:  public

Information Tags:
Since:  0.5.1 - 10. Feb. 2007

[ Top ]
static method isPositiveInteger  [line 87]

  static bool isPositiveInteger( mixed $input  )

Checks if the input is a positive integer (input > 0).

Parameters:
mixed   $input:  Input which is been testet.

API Tags:
Return:  Is true, only if it is a positive integer.
Access:  public

Information Tags:
Since:  0.5.1 - 10. Feb. 2007

[ Top ]
static method isPositiveLength  [line 169]

  static void isPositiveLength( $input  )

Checks if the input is a positiveLength.

Parameters:
   $input: 

API Tags:
Access:  public

Information Tags:
Since:  0.5.1 - 10. Feb. 2007

[ Top ]

Documentation generated on Wed, 18 Jun 2008 06:34:19 +0200 by phpDocumentor 1.3.2