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

Class: Formagic_Rule_Email

Source Location: /Rule/Email.php

Class Overview

Formagic_Rule_Abstract
   |
   --Formagic_Rule_Email

Email rule checks if a valid email address is entered.


Author(s):

  • Florian Sonnenburg
  • Marc Schrader

Version:

  • $Id: Email.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 45]
Email rule checks if a valid email address is entered.

The following arguments are supported:

  • (boolean)'checkDns': Performs DNS lookup




Tags:

author:  Florian Sonnenburg
author:  Marc Schrader
version:  $Id: Email.php 126 2011-05-18 18:41:58Z meweasle $
copyright:  Copyright (c) 2007-2011 Florian Sonnenburg


[ Top ]


Class Variables

$_checkDns =  false

[line 63]

Defines if reverse lookup of mail domain DNS is executed



Tags:

access:  private

Type:   boolean


[ Top ]

$_message =  'Please enter a valid mail address'

[line 51]

Default error message



Tags:

access:  protected

Type:   string
Overrides:   Array


[ Top ]

$_validationStrategy =

[line 57]

Validation strategy



Tags:

access:  private

Type:   Formagic_Rule_Email_ValidationInterface


[ Top ]



Class Methods


method validate [line 107]

boolean validate( string $value)

Performs rule check



Tags:

return:  True if the item value is email formatted
access:  public


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

Parameters:

string   $value   Item value object to be validated

[ Top ]

method _getValidationStrategy [line 87]

void _getValidationStrategy( )



Tags:

access:  private


[ Top ]

method _init [line 71]

void _init( $arguments)

Initializes email rule.

Supports key "checkDns"




Tags:

access:  protected


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

Parameters:

array   $arguments   Array of arguments

[ Top ]


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