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 cValidatorFactory

Validator factory

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.factory.php
Methods summary
public static cValidatorAbstract
# getInstance( string $validator, array $options = array() )

Instantiates and returns the validator. Sets also validators default options.

Instantiates and returns the validator. Sets also validators default options.

Each validator can be configured through CONTENIDO $cfg configuration variable. Example for email validator:

$cfg['validator']['email'] = array(
    // List of top level domains to disallow
    'disallow_tld' => array('.test', '.example', '.invalid', '.localhost'),
    // List of hosts to disallow
    'disallow_host' => array('example.com', 'example.org', 'example.net'),
    // Flag to check DNS records for MX type
    'mx_check' => false,
);

Parameters

$validator
Validator to get
$options

Options to use for the validator. Any passed option overwrites the related option in global validator configuration.

Returns

cValidatorAbstract

Throws

cInvalidArgumentException

If type of validator is unknown or not available or if someone tries to get cValidatorFactory instance.

CMS CONTENIDO 4.9.7 API documentation generated by ApiGen