Overview

Packages

  • Core
    • Authentication
    • Backend
    • Cache
    • CEC
    • Chain
    • ContentType
    • Database
    • Datatype
    • Debug
    • Exception
    • Frontend
      • Search
      • URI
      • Util
    • GenericDB
      • Model
    • GUI
      • HTML
    • I18N
    • LayoutHandler
    • Log
    • Security
    • Session
    • Util
    • Validation
    • Versioning
    • XML
  • Module
    • ContentSitemapHtml
    • ContentSitemapXml
    • ContentUserForum
    • NavigationTop
  • 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

Classes

  • cValidatorAbstract
  • cValidatorEmail
  • cValidatorFactory
  • cValidatorRegex
  • Overview
  • Package
  • Class
  • Tree
  • Deprecated
  • Todo

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
string
$validator Validator to get
$options
array
$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
CMS CONTENIDO 4.9.1 API documentation generated by ApiGen 2.8.0