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

Class: NumberValidator

Source Location: /validator/NumberValidator.class.php

Class Overview

ParameterHolder
   |
   --Validator
      |
      --NumberValidator

NumberValidator verifies a parameter is a number and allows you to apply size constraints.


Author(s):

  • Sean Kerr (skerr@mojavi.org)

Version:

  • $Id: NumberValidator.class.php 513 2004-12-01 14:41:30Z seank $

Copyright:

Methods


Inherited Variables

Inherited Methods

Class: Validator

Validator::execute()
Execute this validator.
Validator::getContext()
Retrieve the current application context.
Validator::initialize()
Initialize this validator.

Class: ParameterHolder

ParameterHolder::clearParameters()
Clear all parameters associated with this request.
ParameterHolder::getParameter()
Retrieve a parameter.
ParameterHolder::getParameterNames()
Retrieve an array of parameter names.
ParameterHolder::getParameters()
Retrieve an array of parameters.
ParameterHolder::hasParameter()
Indicates whether or not a parameter exists.
ParameterHolder::removeParameter()
Remove a parameter.
ParameterHolder::setParameter()
Set a parameter.
ParameterHolder::setParameterByRef()
Set a parameter by reference.
ParameterHolder::setParameters()
Set an array of parameters.
ParameterHolder::setParametersByRef()
Set an array of parameters by reference.

Class Details

[line 38]
NumberValidator verifies a parameter is a number and allows you to apply size constraints.

Optional parameters:

  • max - [none] - Maximum number size.
  • max_error - [Input is too large] - An error message to use when input is too large.
  • min - [none] - Minimum number size.
  • min_error - [Input is too small] - An error message to use when input is too small.
  • nan_error - [Input is not a number] - Default error message when input is not a number.
  • type - [Any] - Type of number (Any, Float).
  • type_error - [Input is not a number] - An error message to use when input is not a number.




Tags:

version:  $Id: NumberValidator.class.php 513 2004-12-01 14:41:30Z seank $
since:  1.0.0
copyright:  (c) Sean Kerr, http://www.mojavi.org
author:  Sean Kerr (skerr@mojavi.org)


[ Top ]


Class Methods


method execute [line 57]

bool execute( mixed &$value, error &$error)

Execute this validator.



Tags:

return:  true, if this validator executes successfully, otherwise false.
access:  public
since:  3.0.0
author:  Sean Kerr (skerr@mojavi.org)


Overrides Validator::execute() (Execute this validator.)

Parameters:

mixed   &$value   A file or parameter value/array.
error   &$error   An error message reference.

[ Top ]

method initialize [line 132]

bool initialize( Context $context, [array $parameters = null])

Initialize this validator.



Tags:

return:  true, if initialization completes successfully, otherwise false.
access:  public
since:  3.0.0
author:  Sean Kerr (skerr@mojavi.org)


Overrides Validator::initialize() (Initialize this validator.)

Parameters:

Context   $context   The current application context.
array   $parameters   An associative array of initialization parameters.

[ Top ]


Documentation generated on Tue, 21 Feb 2006 01:45:22 +0900 by phpDocumentor 1.3.0RC5