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

Class: Formagic_Rule_Regex

Source Location: /Rule/Regex.php

Class Overview

Formagic_Rule_Abstract
   |
   --Formagic_Rule_Regex

Checks if value is given


Author(s):

  • Florian Sonnenburg

Version:

  • $Id: Regex.php 126 2011-05-18 18:41:58Z meweasle $

Copyright:

  • Copyright (c) 2007-2011 Florian Sonnenburg

Variables

Methods


Inherited Variables

Inherited Methods

Class: Formagic_Rule_Abstract

Formagic_Rule_Abstract::__construct()
Constructor
Formagic_Rule_Abstract::getMessage()
Returns translated error message of rule
Formagic_Rule_Abstract::getName()
Returns rule type identification string.
Formagic_Rule_Abstract::setMessage()
Sets the error message property.
Formagic_Rule_Abstract::validate()
Abstract of main validate method. Returns boolean value of check success.
Formagic_Rule_Abstract::_init()
Allows subclass initialization.

Class Details

[line 38]
Checks if value is given



Tags:

author:  Florian Sonnenburg
version:  $Id: Regex.php 126 2011-05-18 18:41:58Z meweasle $
copyright:  Copyright (c) 2007-2011 Florian Sonnenburg
license:  New BSD License


[ Top ]


Class Variables

$_pattern =

[line 44]

The regex pattern



Tags:

access:  protected

Type:   string


[ Top ]



Class Methods


method validate [line 68]

boolean validate( string $value)

Regex validation



Tags:

return:  True if the item value validated ok.
access:  public


Overrides Formagic_Rule_Abstract::validate() (Abstract of main validate method. Returns boolean value of check success.)

Parameters:

string   $value   Item to be checked

[ Top ]

method _init [line 54]

void _init( $arguments)

Allows subclass initialization.



Tags:

throws:  Formagic_Exception If no regex pattern provided
access:  protected


Overrides Formagic_Rule_Abstract::_init() (Allows subclass initialization.)

Parameters:

array   $arguments   Array of arguments passed to __construct() Required key "pattern", containing the regex pattern

[ Top ]


Documentation generated on Sun, 22 May 2011 22:40:21 +0200 by phpDocumentor 1.4.3