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

Class: RegexValidator

Source Location: /validator/RegexValidator.class.php

Class Overview

ParameterHolder
   |
   --Validator
      |
      --RegexValidator

RegexValidator allows you to match a value against a regular expression pattern.


Author(s):

  • Sean Kerr (skerr@mojavi.org)

Version:

  • $Id: RegexValidator.class.php 664 2004-12-15 04:27:49Z 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 37]
RegexValidator allows you to match a value against a regular expression pattern.

Required parameters:

  • pattern - [none] - A PCRE, preg_match() style regular expression pattern.
Optional parameters:

  • match - [true] - Indicates that the pattern must be matched or must not match.
  • match_error - [Invalid input] - An error message to use when the input does not meet the regex specifications.




Tags:

version:  $Id: RegexValidator.class.php 664 2004-12-15 04:27:49Z 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 56]

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

Execute this validator.



Tags:

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


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

Parameters:

string   &$value   A parameter value.
string   &$error   An error message reference.

[ Top ]

method initialize [line 90]

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:25 +0900 by phpDocumentor 1.3.0RC5