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

Class: Formagic_Rule

Source Location: /Rule/Rule.php

Class Overview


FormagicRule abstract superclass


Author(s):

  • Florian Sonnenburg

Version:

  • $Id: Rule.php 17 2007-08-19 20:40:10Z meweasle $

Copyright:

  • Copyright (c) 2007

Variables

Methods


Child classes:

Formagic_Rule_Email
Email rule checks if a valid email address is entered.
Formagic_Rule_Equal
Checks if value is given
Formagic_Rule_Length
Checks if value is between min and max length
Formagic_Rule_Mandatory
Checks if value is given
Formagic_Rule_Numeric
Checks if value is numeric

Class Details

[line 32]
FormagicRule abstract superclass



Tags:

author:  Florian Sonnenburg
version:  $Id: Rule.php 17 2007-08-19 20:40:10Z meweasle $
copyright:  Copyright (c) 2007
abstract:  


[ Top ]


Class Variables

$_args =

[line 45]

Arguments passed to to rule object



Tags:

access:  protected

Type:   array


[ Top ]

$_errorCode =

[line 57]

Error code



Tags:

access:  protected

Type:   integer


[ Top ]

$_errorLevel =  Formagic::ERROR

[line 65]

Level of error occured in rule. Can be Formagic::DEBUG, Formagic::NOTICE or Formagic::ERROR



Tags:

access:  protected

Type:   integer


[ Top ]

$_errorMessage =  ''

[line 51]

Error message



Tags:

access:  protected

Type:   mixed


[ Top ]

$_type =

[line 39]

Rule type



Tags:

access:  protected

Type:   string


[ Top ]



Class Methods


constructor __construct [line 75]

void __construct( string $type, [mixed $errorMessage = null], [array $args = null])

Constructor



Tags:

access:  public


Overridden in child classes as:

Formagic_Rule_Length::__construct()
Extends parent constructor

Parameters:

string   $type  
mixed   $errorMessage  
array   $args  

[ Top ]

method check [line 133]

boolean check( Formagic_Item $itemObj)

Abstract of main check method. Returns boolean value of check success.

Subclasses have to implement their behaviour here.




Tags:

abstract:  
access:  protected


Overridden in child classes as:

Formagic_Rule_Email::check()
Performs rule check
Formagic_Rule_Equal::check()
Performs rule check
Formagic_Rule_Length::check()
Performs rule check
Formagic_Rule_Mandatory::check()
Performs rule check
Formagic_Rule_Numeric::check()
Performs rule check

Parameters:

Formagic_Item   $itemObj  

[ Top ]

method getCode [line 99]

void getCode( )

Returns error code of rule



Tags:

access:  public


[ Top ]

method getLevel [line 109]

integer getLevel( )

Returns error level of rule. Default is Formagic::ERROR



Tags:

access:  public


[ Top ]

method getMessage [line 89]

string getMessage( )

Returns error message of rule



Tags:

access:  public


[ Top ]

method getType [line 119]

string getType( )

Returns rule type identification string



Tags:

access:  public


[ Top ]


Documentation generated on Thu, 23 Aug 2007 00:29:47 +0200 by phpDocumentor 1.4.0