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

Class: Validator

Source Location: /util/Validator.php

Class Overview


Validator class.


Author(s):

  • Norman Markgraf (nmarkgraf(at)user.sourceforge.net)

Version:

  • $Revision: 161 $

Copyright:

  • Copyright in 2006, 2007 by OpenDocumentPHP Team

Methods



Class Details

[line 40]
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.




Tags:

author:  Norman Markgraf (nmarkgraf(at)user.sourceforge.net)
version:  $Revision: 161 $
copyright:  Copyright in 2006, 2007 by OpenDocumentPHP Team
since:  0.5.1 - 10.02.2007
license:  GNU General Public License 2.0.


[ Top ]


Class Methods


static method checkFamilyValues [line 123]

static void checkFamilyValues( $value)

Checks if the input is a family value.



Tags:

since:  0.5.2 - 19.03.2007
access:  public


Parameters:

   $value  

[ Top ]

static method checkNCName [line 76]

static bool checkNCName( mixed $input)

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



Tags:

return:  Is true, only if $input is a non-colonized name.
todo:  This should be something like '([a-zA-Z_])(a-zA-Z0-9.-_)*'...?
since:  0.5.1 - 10.02.2007
access:  public


Parameters:

mixed   $input   Input which is been tested.

[ Top ]

static method checkStyleNameRef [line 91]

static bool checkStyleNameRef( mixed $input)

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



Tags:

return:  Is true, only if $input is of "styleNameRef" type.
since:  0.5.1 - 10.02.2007
access:  public


Parameters:

mixed   $input   Input which is been tested.

[ Top ]

static method isColor [line 105]

static void isColor( $input)

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



Tags:

since:  0.5.1 - 10.02.2007
access:  public


Parameters:

   $input  

[ Top ]

static method isInteger [line 60]

static bool isInteger( mixed $input)

Checks if the input is a integer.



Tags:

return:  Is true, only if it is a positive integer.
since:  0.5.1 - 10.02.2007
access:  public


Parameters:

mixed   $input   Input which is been testet.

[ Top ]

static method isPositiveInteger [line 49]

static bool isPositiveInteger( mixed $input)

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



Tags:

return:  Is true, only if it is a positive integer.
since:  0.5.1 - 10.02.2007
access:  public


Parameters:

mixed   $input   Input which is been testet.

[ Top ]

static method isPositiveLength [line 114]

static void isPositiveLength( $input)

Checks if the input is a positiveLength.



Tags:

since:  0.5.1 - 10.02.2007
access:  public


Parameters:

   $input  

[ Top ]


Documentation generated on Tue, 12 Jun 2007 10:01:07 +0200 by phpDocumentor 1.3.2