Overview

Packages

  • CONTENIDO
  • Core
    • Authentication
    • Backend
    • Cache
    • CEC
    • Chain
    • ContentType
    • Database
    • Debug
    • Exception
    • Frontend
      • Search
      • URI
      • Util
    • GenericDB
      • Model
    • GUI
      • HTML
    • I18N
    • LayoutHandler
    • Log
    • Security
    • Session
    • Util
    • Validation
    • Versioning
    • XML
  • Module
    • ContentRssCreator
    • ContentSitemapHtml
    • ContentSitemapXml
    • ContentUserForum
    • NavigationTop
    • ScriptCookieDirective
  • mpAutoloaderClassMap
  • None
  • Plugin
    • ContentAllocation
    • CronjobOverview
    • FormAssistant
    • FrontendLogic
    • FrontendUsers
    • Linkchecker
    • ModRewrite
    • Newsletter
    • Repository
      • FrontendNavigation
      • KeywordDensity
    • SearchSolr
    • SmartyWrapper
    • UrlShortener
    • UserForum
    • Workflow
  • PluginManager
  • Setup
    • Form
    • GUI
    • Helper
      • Environment
      • Filesystem
      • MySQL
      • PHP
    • UpgradeJob
  • Smarty
    • Cacher
    • Compiler
    • Config
    • Debug
    • PluginsBlock
    • PluginsFilter
    • PluginsFunction
    • PluginsInternal
    • PluginsModifier
    • PluginsModifierCompiler
    • PluginsShared
    • Security
    • Template
    • TemplateResources
  • Swift
    • ByteStream
    • CharacterStream
    • Encoder
    • Events
    • KeyCache
    • Mailer
    • Mime
    • Plugins
    • Transport

Classes

  • cValidatorAbstract
  • cValidatorEmail
  • cValidatorFactory
  • cValidatorRegex
  • Overview
  • Package
  • Class
  • Todo
  • Download

Class cValidatorEmail

E-Mail validation.

Supports following options:

- disallow_tld   (array)  Optional, list of top level domains to disallow
- disallow_host  (array)  Optional, list of hosts to disallow
- mx_check       (bool)   Optional, flag to check DNS records for MX type

Usage:

$validator = cValidatorFactory::getInstance('email');
if ($validator->isValid('user@contenido.org')) {
    // email is valid
} else {
    $errors = $validator->getErrors();
    foreach ($errors as $pos => $errItem) {
        echo $errItem->code . ": " . $errItem->message . "\n";
    }
}
cValidatorAbstract
Extended by cValidatorEmail
Package: Core\Validation
Copyright: four for business AG <www.4fb.de>
License: http://www.contenido.org/license/LIZENZ.txt
Author: Murat Purc murat@purc.de
Located at classes/validator/class.validator.email.php
Methods summary
public
# __construct( )

Constructor function, sets some predefined options

Constructor function, sets some predefined options

public static
# setFilterVarExists( boolean $exists )

Filter variable function exists setter

Filter variable function exists setter

Parameters

$exists
public static
# resetFilterVarExists( )

Unsets filter variable function state

Unsets filter variable function state

protected boolean
# _isValid( mixed $value )

Abstract isValid method, which has to be implemented by childs

Abstract isValid method, which has to be implemented by childs

Parameters

$value

Returns

boolean
private boolean
# _checkMx( string $host )

Check DNS Records for MX type.

Check DNS Records for MX type.

Parameters

$host
Host name

Returns

boolean
Methods inherited from cValidatorAbstract
addError(), getErrors(), getOption(), isValid(), setOption(), setOptions()
Properties summary
protected static boolean $_filterVarExists

Flag about existing flter_var function

Flag about existing flter_var function

#
Properties inherited from cValidatorAbstract
$_errors, $_options
CMS CONTENIDO 4.9.7 API documentation generated by ApiGen